重置次数优化
This commit is contained in:
parent
5b5f836ad8
commit
50fef10840
@ -609,7 +609,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
WmsOutPlan outPlan = wmsOutPlanMapper.selectWmsOutPlanByPlanCode(zdTask.getAttr4());
|
WmsOutPlan outPlan = wmsOutPlanMapper.selectWmsOutPlanByPlanCode(zdTask.getAttr4());
|
||||||
if (outPlan == null){
|
if (outPlan == null){
|
||||||
WmsOutPlan outPlanTemp = new WmsOutPlan();
|
WmsOutPlan outPlanTemp = new WmsOutPlan();
|
||||||
outPlanTemp.setPlanCode(zdTask.getAttr4());
|
outPlanTemp.setPlanCode(zdTask.getAttr4() == null ? zdTask.getCode() : zdTask.getAttr4());
|
||||||
outPlanTemp.setWmsBusinessTypeId(12L);
|
outPlanTemp.setWmsBusinessTypeId(12L);
|
||||||
outPlanTemp.setPlanState("1");
|
outPlanTemp.setPlanState("1");
|
||||||
outPlanTemp.setPlanType("ZDCK");
|
outPlanTemp.setPlanType("ZDCK");
|
||||||
@ -697,7 +697,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
|
|
||||||
// 更新重置次数
|
// 更新重置次数
|
||||||
outPlanFlag = false;
|
outPlanFlag = false;
|
||||||
baseKnife.setResetCount(resetCount);
|
baseKnife.setResetCount(resetCount - 1);
|
||||||
baseKnifeService.updateBaseKnife(baseKnife);
|
baseKnifeService.updateBaseKnife(baseKnife);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,16 +709,16 @@ public class BaseKnifeController extends BaseController
|
|||||||
// 出库计划明细
|
// 出库计划明细
|
||||||
for (int j = 0; j < outPlanDetail.getPlannedQuantity(); j++) {
|
for (int j = 0; j < outPlanDetail.getPlannedQuantity(); j++) {
|
||||||
WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity();
|
WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity();
|
||||||
wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i++).getBaseKnifeId());
|
wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i).getBaseKnifeId());
|
||||||
wmsOutPlanDetailEntity.setAreaCode(baseKnifeListOutPlan.get(i++).getAreaCode());
|
wmsOutPlanDetailEntity.setAreaCode(baseKnifeListOutPlan.get(i).getAreaCode());
|
||||||
wmsOutPlanDetailEntity.setItemOrProduct(baseKnifeListOutPlan.get(i++).getItemOrProduct());
|
wmsOutPlanDetailEntity.setItemOrProduct(baseKnifeListOutPlan.get(i).getItemOrProduct());
|
||||||
wmsOutPlanDetailEntity.setKnifeCode(baseKnifeListOutPlan.get(i++).getKnifeCode());
|
wmsOutPlanDetailEntity.setKnifeCode(baseKnifeListOutPlan.get(i).getKnifeCode());
|
||||||
wmsOutPlanDetailEntity.setKnifeName(baseKnifeListOutPlan.get(i++).getKnifeName());
|
wmsOutPlanDetailEntity.setKnifeName(baseKnifeListOutPlan.get(i).getKnifeName());
|
||||||
wmsOutPlanDetailEntity.setPlanSheet(baseKnifeListOutPlan.get(i++).getPlanSheet());
|
wmsOutPlanDetailEntity.setPlanSheet(baseKnifeListOutPlan.get(i).getPlanSheet());
|
||||||
wmsOutPlanDetailEntity.setKnifeLife(baseKnifeListOutPlan.get(i++).getKnifeLife());
|
wmsOutPlanDetailEntity.setKnifeLife(baseKnifeListOutPlan.get(i).getKnifeLife());
|
||||||
wmsOutPlanDetailEntity.setResetCount(baseKnifeListOutPlan.get(i++).getResetCount());
|
wmsOutPlanDetailEntity.setResetCount(baseKnifeListOutPlan.get(i).getResetCount());
|
||||||
wmsOutPlanDetailEntity.setKnifeUnit(baseKnifeListOutPlan.get(i++).getKnifeUnit());
|
wmsOutPlanDetailEntity.setKnifeUnit(baseKnifeListOutPlan.get(i).getKnifeUnit());
|
||||||
wmsOutPlanDetailEntity.setSafeStock(baseKnifeListOutPlan.get(i++).getKnifeType());
|
wmsOutPlanDetailEntity.setSafeStock(baseKnifeListOutPlan.get(i).getKnifeType());
|
||||||
wmsOutPlanDetailEntity.setStandardQuantity(baseKnifeListOutPlan.get(i++).getStandardQuantity());
|
wmsOutPlanDetailEntity.setStandardQuantity(baseKnifeListOutPlan.get(i++).getStandardQuantity());
|
||||||
wmsOutPlanDetailEntity.setWmsOutPlanDetailId(outPlanDetail.getWmsOutPlanDetailId());
|
wmsOutPlanDetailEntity.setWmsOutPlanDetailId(outPlanDetail.getWmsOutPlanDetailId());
|
||||||
wmsOutPlanDetailEntity.setCreateBy(getUsername());
|
wmsOutPlanDetailEntity.setCreateBy(getUsername());
|
||||||
@ -761,7 +761,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsInPlanTemp.setState("1");
|
wmsInPlanTemp.setState("1");
|
||||||
wmsInPlanTemp.setSourceType("SGLR");
|
wmsInPlanTemp.setSourceType("SGLR");
|
||||||
wmsInPlanTemp.setCellCode(zdTask.getAttr3());
|
wmsInPlanTemp.setCellCode(zdTask.getAttr3());
|
||||||
wmsInPlanTemp.setPlanCode(zdTask.getAttr4());
|
wmsInPlanTemp.setPlanCode(zdTask.getAttr4() == null ? zdTask.getCode() : zdTask.getAttr4());
|
||||||
wmsInPlanTemp.setRelBillCode("组装单据");
|
wmsInPlanTemp.setRelBillCode("组装单据");
|
||||||
wmsInPlanTemp.setPlanTypeId("13");
|
wmsInPlanTemp.setPlanTypeId("13");
|
||||||
wmsInPlanTemp.setCreateBy(getUsername());
|
wmsInPlanTemp.setCreateBy(getUsername());
|
||||||
|
@ -102,7 +102,7 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
|
|||||||
hashMap.put("resetCount", nowWmsOutPlanDetailEntity.getResetCount());
|
hashMap.put("resetCount", nowWmsOutPlanDetailEntity.getResetCount());
|
||||||
|
|
||||||
// 寿命预警
|
// 寿命预警
|
||||||
if (nowWmsOutPlanDetailEntity.getKnifeLife() <= mdItem.getAttr2())
|
if ("PRODUCT".equals(nowWmsOutPlanDetailEntity.getItemOrProduct()) && nowWmsOutPlanDetailEntity.getKnifeLife() <= mdItem.getAttr2())
|
||||||
hashMap.put("knifeWarning", true);
|
hashMap.put("knifeWarning", true);
|
||||||
else
|
else
|
||||||
hashMap.put("knifeWarning", false);
|
hashMap.put("knifeWarning", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user