增加 入库查询推荐库位

master
wanghao 4 months ago
parent 6e269354ac
commit ff4d79bdf5

@ -66,17 +66,21 @@ public class WmsPdaApiController extends BaseController {
// 退库入库提交
@PostMapping("/returnStore/submit")
public R<Void> returnStoreSubmit(@RequestBody WmsReturnOrderVo data) {
Boolean result = wmsReturnOrderService.returnStoreSubmit(data);
Boolean result = wmsReturnOrderService.returnStoreSubmit(data);
return toAjax(result);
}
// 入库查询批次
@PostMapping("/raw/inSelectCode")
public R<WmsInstockPrintVo> inSelectCode(String code) {
WmsInstockPrintVo wmsInstockPrintVo = apiService.inSelectCode(code);
if (wmsInstockPrintVo == null) {
R.fail();
}
String locationCode = apiService.selectInstoreRecordLocaltionCode(wmsInstockPrintVo.getMaterialId());
wmsInstockPrintVo.setLocationCode(locationCode);
return R.ok(wmsInstockPrintVo);
}
@PostMapping("/raw/inSubmit")

@ -14,7 +14,7 @@ import org.springframework.stereotype.Repository;
*/
@Repository
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 " +
"from wms_instock_print where batch_code=#{code}")
WmsInstockPrintVo inSelectCode(String code);

@ -56,4 +56,6 @@ public interface WmsPdaApiMapper {
WmsOutstockRecordVo setHppOutRecord(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);
boolean moveSubmit(WmsInventoryVo vo);
String selectInstoreRecordLocaltionCode(Long materialId);
}

@ -540,4 +540,9 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
int i = wmsInventoryMapper.updateById(inventory);
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>
<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>

Loading…
Cancel
Save