refactor(入库任务): 批量执行任务,优化
This commit is contained in:
parent
ec39dfceb7
commit
36fdaa5687
@ -171,15 +171,35 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
|||||||
baseKnifeQuery.setKnifeFineState(2);
|
baseKnifeQuery.setKnifeFineState(2);
|
||||||
List<BaseKnife> baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeQuery);
|
List<BaseKnife> baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeQuery);
|
||||||
|
|
||||||
|
// 获取库位信息
|
||||||
|
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaId(wmsInTask.getCellTgt());
|
||||||
|
|
||||||
for (int i = 0; i < wmsInTask.getActualInQuantity(); i++) {
|
for (int i = 0; i < wmsInTask.getActualInQuantity(); i++) {
|
||||||
BaseKnife baseKnife = baseKnifeList.get(i);
|
// BaseKnife baseKnife = baseKnifeList.get(i);
|
||||||
// 设置状态为 解锁
|
// // 设置状态为 解锁
|
||||||
baseKnife.setIsLocked(0);
|
// baseKnife.setIsLocked(0);
|
||||||
// 设置工具状态 已入库
|
// // 设置工具状态 已入库
|
||||||
|
// baseKnife.setKnifeFineState(1);
|
||||||
|
// // 更新台账状态
|
||||||
|
// baseKnifeService.updateBaseKnife(baseKnife);
|
||||||
|
// 生成台账
|
||||||
|
BaseKnife baseKnife = new BaseKnife();
|
||||||
|
baseKnife.setMbbBdMrlId(mbbBdMrlMitm.getItemId());
|
||||||
|
baseKnife.setKnifeCode(mbbBdMrlMitm.getItemCode());
|
||||||
|
baseKnife.setKnifeName(mbbBdMrlMitm.getItemName());
|
||||||
|
baseKnife.setKnifeUnit(mbbBdMrlMitm.getUnitName());
|
||||||
|
baseKnife.setKnifeType(mbbBdMrlMitm.getItemTypeName());
|
||||||
|
baseKnife.setAreaCode(wmStorageArea.getAreaCode());
|
||||||
|
baseKnife.setSafeStock(mbbBdMrlMitm.getMinStock());
|
||||||
|
baseKnife.setStandardQuantity("1");
|
||||||
|
baseKnife.setKnifeLife(100);
|
||||||
|
// 设置台账状态 入库
|
||||||
baseKnife.setKnifeFineState(1);
|
baseKnife.setKnifeFineState(1);
|
||||||
// 更新台账状态
|
baseKnife.setPlanSheet("");
|
||||||
baseKnifeService.updateBaseKnife(baseKnife);
|
baseKnife.setResetCount(mbbBdMrlMitm.getAttr1());
|
||||||
|
baseKnife.setItemOrProduct(mbbBdMrlMitm.getItemOrProduct());
|
||||||
|
|
||||||
|
baseKnifeService.insertBaseKnife(baseKnife);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user