合并分支 'dev_20230216' 到 'master'
OA删除 循环 查看合并请求 laws-foton-slrs/foton-wkflow-rest!20
This commit is contained in:
+25
-45
@@ -191,51 +191,31 @@ public class WebServiceOAServiceImpl implements WebServiceOAService {
|
|||||||
List<BusProcessNew> list = iBusProcessNewService.list(queryWrapper1);
|
List<BusProcessNew> list = iBusProcessNewService.list(queryWrapper1);
|
||||||
if(!list.isEmpty()){
|
if(!list.isEmpty()){
|
||||||
List<NotifyTodoSendContext> notifyTodoSendContexts = new ArrayList<>();
|
List<NotifyTodoSendContext> notifyTodoSendContexts = new ArrayList<>();
|
||||||
// list.forEach(busProcessNew -> {
|
list.forEach(busProcessNew -> {
|
||||||
// NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
|
NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
|
||||||
// notifyTodoSendContext.setAppName("SRMS");
|
notifyTodoSendContext.setAppName("SRMS");
|
||||||
// notifyTodoSendContext.setModelId(busProcessNew.getId());
|
notifyTodoSendContext.setModelId(busProcessNew.getId());
|
||||||
// notifyTodoSendContext.setModelName(busProcessNew.getTaskInfo());
|
notifyTodoSendContext.setModelName(busProcessNew.getTaskInfo());
|
||||||
// notifyTodoSendContext.setType("1");
|
notifyTodoSendContext.setType("1");
|
||||||
// notifyTodoSendContext.setOptType("2");
|
notifyTodoSendContext.setOptType("2");
|
||||||
// Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
// ResponseMessage<UserVO> byId = lawsUserInfoService.getById(busProcessNew.getUserId());
|
ResponseMessage<UserVO> byId = lawsUserInfoService.getById(busProcessNew.getUserId());
|
||||||
// map.put("LoginName",byId == null ? "" : byId.getData().getAccount());
|
map.put("LoginName",byId == null ? "" : byId.getData().getAccount());
|
||||||
// JSONObject jsonLoginName = new JSONObject(map);
|
JSONObject jsonLoginName = new JSONObject(map);
|
||||||
// notifyTodoSendContext.setTargets(jsonLoginName.toJSONString());
|
notifyTodoSendContext.setTargets(jsonLoginName.toJSONString());
|
||||||
// notifyTodoSendContext.setUserId(busProcessNew.getUserId());
|
notifyTodoSendContext.setUserId(busProcessNew.getUserId());
|
||||||
// notifyTodoSendContexts.add(notifyTodoSendContext);
|
notifyTodoSendContexts.add(notifyTodoSendContext);
|
||||||
// //循环调用
|
});
|
||||||
// map.put("todoId",pId);
|
for (NotifyTodoSendContext data: notifyTodoSendContexts){
|
||||||
// map.put("list",notifyTodoSendContexts);
|
List<NotifyTodoSendContext> notifyTodoSendContextArrayList = new ArrayList<>();
|
||||||
// net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(map);
|
notifyTodoSendContextArrayList.add(data);
|
||||||
// log.info("调用MQ数据!!!:"+jsonObject.toString());
|
Map<String,Object> map = new TreeMap<>();
|
||||||
// oaService.setTodoDeleteMq(jsonObject.toString());
|
map.put("todoId",pId);
|
||||||
|
map.put("list",notifyTodoSendContextArrayList);
|
||||||
for (BusProcessNew busProcessNew : list) {
|
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(map);
|
||||||
NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
|
log.info("调用MQ数据!!!:"+jsonObject.toString());
|
||||||
notifyTodoSendContext.setAppName("SRMS");
|
oaService.setTodoDeleteMq(jsonObject.toString());
|
||||||
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user