|
@@ -127,11 +127,6 @@ public class EmsProdplanWeightAdjustmentController extends BaseRESTfulController
|
|
|
EmsProdplanWeightAdjustment emsProdplanWeightAdjustment;
|
|
|
for (EmsProdplanWeightAdjustment model : models) {
|
|
|
emsProdplanWeightAdjustment = emsProdplanWeightAdjustmentMapper.selectByPrimaryKey(model.getId());
|
|
|
- System.out.println(models.length);
|
|
|
- System.out.println(emsProdplanWeightAdjustment);
|
|
|
- if (emsProdplanWeightAdjustment.getAuditStatus().equals("1")) {
|
|
|
- return failed(null,"编号为"+emsProdplanWeightAdjustment.getId()+",已经提交申请,请勿重复操作");
|
|
|
- }
|
|
|
if (emsProdplanWeightAdjustment.getAuditStatus().equals("2")) {
|
|
|
return failed(null,"编号为"+emsProdplanWeightAdjustment.getId()+",领导部门已经审批,请勿重复操作");
|
|
|
}
|
|
@@ -141,7 +136,6 @@ public class EmsProdplanWeightAdjustmentController extends BaseRESTfulController
|
|
|
emsProdplanWeightAdjustment.setSubmitter(userId);
|
|
|
emsProdplanWeightAdjustment.setSubmitTime(new Date());
|
|
|
emsProdplanWeightAdjustment.setAuditStatus(model.getAuditStatus());
|
|
|
- emsProdplanWeightAdjustment.setRecordWeight(emsProdplanWeightAdjustment.getPlanWeight());
|
|
|
emsProdplanWeightAdjustment.setPlanWeight(model.getPlanWeight());
|
|
|
emsProdplanWeightAdjustmentMapper.updateByPrimaryKey(emsProdplanWeightAdjustment);
|
|
|
result = true;
|
|
@@ -252,12 +246,12 @@ public class EmsProdplanWeightAdjustmentController extends BaseRESTfulController
|
|
|
return failed(null,"计划编号为:"+emsProdplanWeightAdjustment.getId()+",审核失败,请勿重复操作");
|
|
|
}
|
|
|
EmsGmPcJh emsGmPcJh = emsGmPcJhMapper.selectByPrimaryKey(model.getId());
|
|
|
- emsGmPcJh.setPlanWeight(emsProdplanWeightAdjustment.getPlanWeight());
|
|
|
emsProdplanWeightAdjustment.setReviewer(userId);
|
|
|
emsProdplanWeightAdjustment.setReviewerTime(new Date());
|
|
|
+ emsProdplanWeightAdjustment.setRecordWeight(emsGmPcJh.getPlanWeight());
|
|
|
emsProdplanWeightAdjustment.setAuditStatus("3");
|
|
|
- emsProdplanWeightAdjustment.setPlanWeightOld(emsProdplanWeightAdjustment.getRecordWeight());
|
|
|
emsProdplanWeightAdjustmentMapper.updateByPrimaryKey(emsProdplanWeightAdjustment);
|
|
|
+ emsGmPcJh.setPlanWeight(emsProdplanWeightAdjustment.getPlanWeight());
|
|
|
emsGmPcJhMapper.updateByPrimaryKey(emsGmPcJh);
|
|
|
// result = true;
|
|
|
// soketMessage+=model.getId()+",";
|
|
@@ -293,10 +287,12 @@ public class EmsProdplanWeightAdjustmentController extends BaseRESTfulController
|
|
|
if(emsProdplanWeightAdjustment.getAuditStatus().equals("4")){
|
|
|
return failed(null,"计划编号为:"+emsProdplanWeightAdjustment.getId()+",审核失败,请勿重复操作");
|
|
|
}
|
|
|
- emsProdplanWeightAdjustment.setPlanWeight(emsProdplanWeightAdjustment.getPlanWeightOld());
|
|
|
+ EmsGmPcJh emsGmPcJh = emsGmPcJhMapper.selectByPrimaryKey(model.getId());
|
|
|
+ emsGmPcJh.setPlanWeight(emsProdplanWeightAdjustment.getRecordWeight());
|
|
|
+ emsGmPcJhMapper.updateByPrimaryKey(emsGmPcJh);
|
|
|
emsProdplanWeightAdjustment.setReviewer(userId);
|
|
|
emsProdplanWeightAdjustment.setReviewerTime(new Date());
|
|
|
- emsProdplanWeightAdjustment.setAuditStatus("4");
|
|
|
+ emsProdplanWeightAdjustment.setAuditStatus("2");
|
|
|
emsProdplanWeightAdjustmentMapper.updateByPrimaryKey(emsProdplanWeightAdjustment);
|
|
|
}
|
|
|
}
|