合并分支 'dev_20230216' 到 'master'

Dev 20230216

查看合并请求 laws-foton-slrs/foton-wkflow-rest!19
This commit is contained in:
高嵩
2023-03-29 14:23:27 +08:00
2 changed files with 46 additions and 21 deletions
@@ -191,27 +191,51 @@ public class WebServiceOAServiceImpl implements WebServiceOAService {
List<BusProcessNew> list = iBusProcessNewService.list(queryWrapper1);
if(!list.isEmpty()){
List<NotifyTodoSendContext> notifyTodoSendContexts = new ArrayList<>();
list.forEach(busProcessNew -> {
NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
notifyTodoSendContext.setAppName("SRMS");
notifyTodoSendContext.setModelId(busProcessNew.getId());
notifyTodoSendContext.setModelName(busProcessNew.getTaskInfo());
notifyTodoSendContext.setType("1");
notifyTodoSendContext.setOptType("2");
Map<String, Object> map = new HashMap<>();
ResponseMessage<UserVO> byId = lawsUserInfoService.getById(busProcessNew.getUserId());
map.put("LoginName",byId == null ? "" : byId.getData().getAccount());
JSONObject jsonLoginName = new JSONObject(map);
notifyTodoSendContext.setTargets(jsonLoginName.toJSONString());
notifyTodoSendContext.setUserId(busProcessNew.getUserId());
notifyTodoSendContexts.add(notifyTodoSendContext);
});
Map<String,Object> map = new TreeMap<>();
map.put("todoId",pId);
map.put("list",notifyTodoSendContexts);
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(map);
log.info("调用MQ数据!!!:"+jsonObject.toString());
oaService.setTodoDeleteMq(jsonObject.toString());
// list.forEach(busProcessNew -> {
// NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
// notifyTodoSendContext.setAppName("SRMS");
// notifyTodoSendContext.setModelId(busProcessNew.getId());
// notifyTodoSendContext.setModelName(busProcessNew.getTaskInfo());
// notifyTodoSendContext.setType("1");
// notifyTodoSendContext.setOptType("2");
// Map<String, Object> map = new HashMap<>();
// ResponseMessage<UserVO> byId = lawsUserInfoService.getById(busProcessNew.getUserId());
// map.put("LoginName",byId == null ? "" : byId.getData().getAccount());
// JSONObject jsonLoginName = new JSONObject(map);
// notifyTodoSendContext.setTargets(jsonLoginName.toJSONString());
// notifyTodoSendContext.setUserId(busProcessNew.getUserId());
// notifyTodoSendContexts.add(notifyTodoSendContext);
// //循环调用
// map.put("todoId",pId);
// map.put("list",notifyTodoSendContexts);
// net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(map);
// log.info("调用MQ数据!!!:"+jsonObject.toString());
// oaService.setTodoDeleteMq(jsonObject.toString());
for (BusProcessNew busProcessNew : list) {
NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
notifyTodoSendContext.setAppName("SRMS");
notifyTodoSendContext.setModelId(busProcessNew.getId());
notifyTodoSendContext.setModelName(busProcessNew.getTaskInfo());
notifyTodoSendContext.setType("1");
notifyTodoSendContext.setOptType("2");
Map<String, Object> map = new HashMap<>();
ResponseMessage<UserVO> byId = lawsUserInfoService.getById(busProcessNew.getUserId());
map.put("LoginName",byId == null ? "" : byId.getData().getAccount());
JSONObject jsonLoginName = new JSONObject(map);
notifyTodoSendContext.setTargets(jsonLoginName.toJSONString());
notifyTodoSendContext.setUserId(busProcessNew.getUserId());
//notifyTodoSendContexts.add(notifyTodoSendContext);
//循环调用
map.put("todoId",pId);
map.put("list",notifyTodoSendContext);
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(map);
log.info("调用MQ数据!!!:"+jsonObject.toString());
oaService.setTodoDeleteMq(jsonObject.toString());
}
// });
}
}
@@ -23,6 +23,7 @@ public class answerBefore implements TaskListener {
if(!list.isEmpty()){
BusProcessNew one1 = list.get(0);
one1.setTaskId(delegateTask.getId());
one1.setTaskInfo(delegateTask.getName());
busBean.saveOrUpdate(one1);
CreateMQService oaService = SpringContextUtil.getBean(CreateMQService.class);