驳回时不选择驳回目标的前端拦截并提示,提交审批时后端逻辑错误的前端展示
This commit is contained in:
parent
6298717ff0
commit
fcfa25fdeb
@ -323,26 +323,32 @@ public class ResultRecordController extends AbstractController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultCommentService.addOrUpdateComment(req, getUserId(), status);
|
resultCommentService.addOrUpdateComment(req, getUserId(), status);
|
||||||
try {
|
|
||||||
if(r != null && (int)r.get("code") == 0){//下面推送消息
|
if(r != null){//下面推送消息
|
||||||
|
if(r.isSuccess()){
|
||||||
StaffEntity mySelf = (StaffEntity)r.get("from");
|
StaffEntity mySelf = (StaffEntity)r.get("from");
|
||||||
StaffEntity toSelf = (StaffEntity)r.get("to");
|
StaffEntity toSelf = (StaffEntity)r.get("to");
|
||||||
WorkMsgTypeEnum workMsgTypeEnum = (WorkMsgTypeEnum)r.get("type");
|
WorkMsgTypeEnum workMsgTypeEnum = (WorkMsgTypeEnum)r.get("type");
|
||||||
String url = domain + "/management/dingtalklogin?url=";//免登接口
|
String url = domain + "/management/dingtalklogin?url=";//免登接口
|
||||||
String jump;
|
String jump;
|
||||||
if((int)r.get("count") == 1){//一个提交
|
if((int)r.get("count") == 1){//一个提交
|
||||||
|
logger.info("单个提交推送消息");
|
||||||
jump = domain + "/management/recorddetail?id=" + req.getRecordResultId()
|
jump = domain + "/management/recorddetail?id=" + req.getRecordResultId()
|
||||||
+ "&recordType=3" ;//跳转接口
|
+ "&recordType=3" ;//跳转接口
|
||||||
}else{//批量提交
|
}else{//批量提交
|
||||||
|
logger.info("批量提交推送消息");
|
||||||
jump = domain + "/management/result-record-lzresultrecordapp";//跳转接口
|
jump = domain + "/management/result-record-lzresultrecordapp";//跳转接口
|
||||||
}
|
}
|
||||||
|
|
||||||
jump = URLEncoder.encode(jump);
|
jump = URLEncoder.encode(jump);
|
||||||
String msg = dingtalkBusiness.sendWorkMSGByEntity(appid, mySelf, toSelf, workMsgTypeEnum, url + jump);
|
String msg = dingtalkBusiness.sendWorkMSGByEntity(appid, mySelf, toSelf, workMsgTypeEnum, url + jump);
|
||||||
|
logger.info("发送钉钉工作消息{}", msg);
|
||||||
|
return R.ok("成功");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
return r;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok("成功");
|
return R.ok("成功");
|
||||||
//return r != null ? r : R.ok("成功");
|
//return r != null ? r : R.ok("成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -324,7 +324,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
if (CollectionUtils.isEmpty(resultDetails)) {
|
if (CollectionUtils.isEmpty(resultDetails)) {
|
||||||
return R.error("请先添加业绩");
|
return R.error("请先添加业绩");
|
||||||
}
|
}
|
||||||
double sum = resultDetails.stream().filter(p -> p.getType() == 1).mapToDouble(p -> NumberUtil.objToDoubleWithDefault(p.getCheckWeight(), 0d)).sum();
|
double sum = resultDetails.parallelStream().filter(p -> p.getType() == 1).mapToDouble(p -> NumberUtil.objToDoubleWithDefault(p.getCheckWeight(), 0d)).sum();
|
||||||
if (sum < 0.7) {
|
if (sum < 0.7) {
|
||||||
return R.error("recordId为[" + recordId + "]业绩权重之和必需大于0.7");
|
return R.error("recordId为[" + recordId + "]业绩权重之和必需大于0.7");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user