保存模板不能保存不限权重的

This commit is contained in:
wulin 2020-11-19 18:42:05 +08:00
parent 4e40ad44cd
commit 054c991aea
2 changed files with 16 additions and 12 deletions

View File

@ -129,15 +129,7 @@ public class ResultModelServiceImpl extends ServiceImpl<ResultModelMapper, Resul
resultModel.setGradeStatus(resultModelDetailReq.getGradeStatus());
resultModel.setEvaluationGroupId(resultModelDetailReq.getEvaluationGroupId());
resultModel.setOrderBy(resultModelOrderBy);
if(resultModel.getId() == null){
resultModelMapper.insertResultModel(resultModel);
}else{
resultModelMapper.updateCoverWeightResultModelById(resultModel);
if(resultModel.getIsDelete() != null && resultModel.getIsDelete().intValue() == 1){
delCount--;
}
}
if(itemReq.getTagetLibItems() != null){
int libOrderBy = 0;
List<ResultTagetLib> inserts = new ArrayList<>();
@ -179,6 +171,18 @@ public class ResultModelServiceImpl extends ServiceImpl<ResultModelMapper, Resul
resultModelOrderBy++;
}
}
if(resultModel.getId() == null){
resultModelMapper.insertResultModel(resultModel);
}else{
if(resultModel.getWeight() == null){
resultModel.setWeight(BigDecimal.ZERO);
}
resultModelMapper.updateResultModelById(resultModel);
if(resultModel.getIsDelete() != null && resultModel.getIsDelete().intValue() == 1){
delCount--;
}
}
}
/*if(delCount == 0){

View File

@ -441,7 +441,7 @@ public class DingtalkBusiness {
info.getId(), 0);
ThirdMsgSendRecord thirdMsgSendRecord =
thirdMsgSendRecordService.selectThirdMsgSendRecordByWorkIdAndStaffIdAndTypeAndStatus(
info.getResultRecord().getId(), flowChange.getApprovalId(), 1, 0);
info.getResultRecord().getId(), flowChange.getApprovalId(), 1, 1);
if(thirdMsgSendRecord != null){//把原来的任务更新掉
dingTalkUtil.updateWorkMSG(thirdMsgSendRecord, token);
}
@ -461,7 +461,7 @@ public class DingtalkBusiness {
ThirdMsgSendRecord thirdMsgSendRecord =
thirdMsgSendRecordService.selectThirdMsgSendRecordByWorkIdAndStaffIdAndTypeAndStatus(
info.getResultRecord().getId(),
flowChange.getApprovalId(), 1, 0);
flowChange.getApprovalId(), 1, 1);
if(thirdMsgSendRecord != null){//把原来的任务更新掉
dingTalkUtil.updateWorkMSG(thirdMsgSendRecord, token);
}
@ -479,7 +479,7 @@ public class DingtalkBusiness {
thirdMsgSendRecord =
thirdMsgSendRecordService.selectThirdMsgSendRecordByWorkIdAndStaffIdAndTypeAndStatus(
info.getResultRecord().getId(),
flowRecord.getApprovalStaffId(), 1, 0);
flowRecord.getApprovalStaffId(), 1, 1);
if(thirdMsgSendRecord != null){//把原来的任务更新掉
dingTalkUtil.updateWorkMSG(thirdMsgSendRecord, token);
}
@ -523,7 +523,7 @@ public class DingtalkBusiness {
ThirdMsgSendRecord thirdMsgSendRecord =
thirdMsgSendRecordService.selectThirdMsgSendRecordByWorkIdAndStaffIdAndTypeAndStatus(
info.getResultRecord().getId(),
flowRecord.getApprovalStaffId(), 1, 0);
flowRecord.getApprovalStaffId(), 1, 1);
if(thirdMsgSendRecord != null){//把原来的任务更新掉
dingTalkUtil.updateWorkMSG(thirdMsgSendRecord, token);
}else{