修复数量统计bug,手动组装整刀不锁定
This commit is contained in:
parent
ce7a6197ae
commit
5eb96ee45b
@ -588,12 +588,12 @@ public class BaseKnifeController extends BaseController
|
||||
|
||||
// 查询工艺bom
|
||||
BaseTechnologyBom technologyBom = new BaseTechnologyBom();
|
||||
Boolean lockedFlag = false;
|
||||
if (zdTask.getAttr4() != null){
|
||||
lockedFlag = true;
|
||||
technologyBom = baseTechnologyBomService.selectBaseTechnologyBomByTechnologyBomId(zdTask.getAttr4());
|
||||
} else {
|
||||
technologyBom.setFigureCode(zdTask.getCode());
|
||||
technologyBom.setLockedStartTime(DateUtils.getNowDate());
|
||||
technologyBom.setLockedEndTime(DateUtils.getNowDate());
|
||||
}
|
||||
|
||||
// 出库基础物料
|
||||
@ -622,9 +622,13 @@ public class BaseKnifeController extends BaseController
|
||||
baseKnife.setStandardQuantity("1");
|
||||
baseKnife.setKnifeLife(100);
|
||||
baseKnife.setKnifeFineState(0);
|
||||
baseKnife.setIsLocked(1);
|
||||
baseKnife.setLockedStartTime(technologyBom.getLockedStartTime());
|
||||
baseKnife.setLockedEndTime(technologyBom.getLockedEndTime());
|
||||
if (lockedFlag) {
|
||||
baseKnife.setIsLocked(1);
|
||||
baseKnife.setLockedStartTime(technologyBom.getLockedStartTime());
|
||||
baseKnife.setLockedEndTime(technologyBom.getLockedEndTime());
|
||||
} else {
|
||||
baseKnife.setIsLocked(0);
|
||||
}
|
||||
baseKnife.setPlanSheet(zdTask.getAttr4());
|
||||
baseKnife.setItemOrProduct("PRODUCT");
|
||||
baseKnife.setCreateBy(getUsername());
|
||||
@ -716,10 +720,14 @@ public class BaseKnifeController extends BaseController
|
||||
wmsOutTask.setCreateBy(getUsername());
|
||||
wmsOutTask.setCreateTime(DateUtils.getNowDate());
|
||||
wmsOutTaskMapper.insertWmsOutTask(wmsOutTask);
|
||||
|
||||
// 更新基础物料数量
|
||||
MdItem mdItem = mdItemService.selectMdItemById(outPlanDetail.getMdItemId());
|
||||
mdItem.setStandardNumber(mdItem.getStandardNumber() - outPlanDetail.getRealQuantity());
|
||||
mdItemService.updateMdItem(mdItem);
|
||||
}
|
||||
|
||||
// 整刀入库计划
|
||||
Random random = new Random();
|
||||
WmsInPlan wmsInPlan = new WmsInPlan();
|
||||
wmsInPlan.setState("1");
|
||||
wmsInPlan.setSourceType("SGLR");
|
||||
|
@ -560,6 +560,6 @@
|
||||
<select id="countBaseKnife" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
FROM BASE_KNIFE BK
|
||||
WHERE MBB_BD_MRL_ID = #{mbbBdMrlId}
|
||||
WHERE MBB_BD_MRL_ID = #{mbbBdMrlId} AND KNIFE_FINE_STATE = 0 OR KNIFE_FINE_STATE = 1
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user