增加 入库查询推荐库位

master
wanghao 4 months ago
parent 6e269354ac
commit ff4d79bdf5

@ -70,13 +70,17 @@ public class WmsPdaApiController extends BaseController {
return toAjax(result); return toAjax(result);
} }
// 入库查询批次
@PostMapping("/raw/inSelectCode") @PostMapping("/raw/inSelectCode")
public R<WmsInstockPrintVo> inSelectCode(String code) { public R<WmsInstockPrintVo> inSelectCode(String code) {
WmsInstockPrintVo wmsInstockPrintVo = apiService.inSelectCode(code); WmsInstockPrintVo wmsInstockPrintVo = apiService.inSelectCode(code);
if (wmsInstockPrintVo == null) { if (wmsInstockPrintVo == null) {
R.fail(); R.fail();
} }
String locationCode = apiService.selectInstoreRecordLocaltionCode(wmsInstockPrintVo.getMaterialId());
wmsInstockPrintVo.setLocationCode(locationCode);
return R.ok(wmsInstockPrintVo); return R.ok(wmsInstockPrintVo);
} }
@PostMapping("/raw/inSubmit") @PostMapping("/raw/inSubmit")

@ -14,7 +14,7 @@ import org.springframework.stereotype.Repository;
*/ */
@Repository @Repository
public interface WmsInstockPrintMapper extends BaseMapperPlus<WmsInstockPrint, WmsInstockPrintVo> { public interface WmsInstockPrintMapper extends BaseMapperPlus<WmsInstockPrint, WmsInstockPrintVo> {
@Select("select top 1 material_spe,batch_code,material_categoryId,material_code,material_name,unit_name, " + @Select("select top 1 material_spe,batch_code,material_code,material_name,unit_name, " +
" material_id,instock_print_id,apportion_qty,instock_code,material_qty " + " material_id,instock_print_id,apportion_qty,instock_code,material_qty " +
"from wms_instock_print where batch_code=#{code}") "from wms_instock_print where batch_code=#{code}")
WmsInstockPrintVo inSelectCode(String code); WmsInstockPrintVo inSelectCode(String code);

@ -56,4 +56,6 @@ public interface WmsPdaApiMapper {
WmsOutstockRecordVo setHppOutRecord(String code); WmsOutstockRecordVo setHppOutRecord(String code);
int semiDeleteErrorCode(String code); int semiDeleteErrorCode(String code);
String selectInstoreRecordLocaltionCode(@Param("materialId") Long materialId);
} }

@ -79,4 +79,6 @@ public interface IWmsPdaApiService {
WmsInventoryVo ledgerSelect(String batchCode, String locationCode); WmsInventoryVo ledgerSelect(String batchCode, String locationCode);
boolean moveSubmit(WmsInventoryVo vo); boolean moveSubmit(WmsInventoryVo vo);
String selectInstoreRecordLocaltionCode(Long materialId);
} }

@ -540,4 +540,9 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
int i = wmsInventoryMapper.updateById(inventory); int i = wmsInventoryMapper.updateById(inventory);
return i > 0; return i > 0;
} }
@Override
public String selectInstoreRecordLocaltionCode(Long materialId) {
return apiMapper.selectInstoreRecordLocaltionCode(materialId);
}
} }

@ -176,5 +176,9 @@
delete from wms_hpp_in_stock_detail where card_no=#{code} delete from wms_hpp_in_stock_detail where card_no=#{code}
</delete> </delete>
<select id="selectInstoreRecordLocaltionCode" resultType="String">
select top 1 location_code from wms_instock_record where material_id = #{materialId} order by create_time desc
</select>
</mapper> </mapper>

Loading…
Cancel
Save