提交 04e41aec authored 作者: zhoushaopan's avatar zhoushaopan

feat(列装模块,退装模块): 修改阅知

修改阅知
上级 f5e8dfb4
...@@ -153,10 +153,10 @@ public class PackingController { ...@@ -153,10 +153,10 @@ public class PackingController {
packingLog.setPackingId(packingLibrary1.getId()); packingLog.setPackingId(packingLibrary1.getId());
packingLogService.add(packingLog); packingLogService.add(packingLog);
//发送阅知信息 //发送阅知信息
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId()); // List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(0,1,"添加列装目录:"+mapToString(nowMap),userIds,0); // MessageBto messageBto = new MessageBto(0,1,"添加列装目录:"+mapToString(nowMap),userIds,0);
messageBto.setRecord(packingLibrary1.getId().toString()); // messageBto.setRecord(packingLibrary1.getId().toString());
messageService.add(messageBto); // messageService.add(messageBto);
//更新型号和排序号的对应map //更新型号和排序号的对应map
packingLibraryService.getSortMap(); packingLibraryService.getSortMap();
return ResponseEntity.ok(packingLibraryService.getOne(packingLibrary1.getId())); return ResponseEntity.ok(packingLibraryService.getOne(packingLibrary1.getId()));
...@@ -256,7 +256,7 @@ public class PackingController { ...@@ -256,7 +256,7 @@ public class PackingController {
partMap.put("名称",packingLibrary.getName()); partMap.put("名称",packingLibrary.getName());
partMap.put("配用范围",packingLibrary.getMatchingRangeName()); partMap.put("配用范围",packingLibrary.getMatchingRangeName());
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId()); List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(0,1,"添加列装信息:"+mapToString(partMap),userIds,0); MessageBto messageBto = new MessageBto(0,1,"添加 列装信息:"+mapToString(partMap),userIds,0);
messageBto.setRecord(packingLibrary1.getId().toString()); messageBto.setRecord(packingLibrary1.getId().toString());
messageService.add(messageBto); messageService.add(messageBto);
//添加列装日志 //添加列装日志
...@@ -280,7 +280,8 @@ public class PackingController { ...@@ -280,7 +280,8 @@ public class PackingController {
childMap.put("名称",packingLibrary.getName()); childMap.put("名称",packingLibrary.getName());
childMap.put("配用范围",packingLibrary.getMatchingRangeName()); childMap.put("配用范围",packingLibrary.getMatchingRangeName());
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId()); List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(0,1,"添加列装信息:"+mapToString(partMap)+"子级"+mapToString(childMap),userIds,0); MessageBto messageBto = new MessageBto(0,1,"添加 列装信息:"+mapToString(partMap)
+"子级"+mapToString(childMap),userIds,0);
messageBto.setRecord(packingLibrary1.getId().toString()); messageBto.setRecord(packingLibrary1.getId().toString());
messageService.add(messageBto); messageService.add(messageBto);
//添加列装日志 //添加列装日志
...@@ -309,7 +310,7 @@ public class PackingController { ...@@ -309,7 +310,7 @@ public class PackingController {
nowMap.put("名称",packingLibrary.getName()); nowMap.put("名称",packingLibrary.getName());
nowMap.put("配用范围",packingLibrary.getMatchingRangeName()); nowMap.put("配用范围",packingLibrary.getMatchingRangeName());
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId()); List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(0,1,"删除列装信息:"+mapToString(nowMap),userIds,0); MessageBto messageBto = new MessageBto(0,1,"删除 列装信息:"+mapToString(nowMap),userIds,0);
messageBto.setRecord(packingLibrary.getId().toString()); messageBto.setRecord(packingLibrary.getId().toString());
messageService.add(messageBto); messageService.add(messageBto);
return ResponseEntity.ok("删除成功"); return ResponseEntity.ok("删除成功");
...@@ -627,7 +628,6 @@ public class PackingController { ...@@ -627,7 +628,6 @@ public class PackingController {
// }else { // }else {
if (packingLog.getRemark()!=null){ if (packingLog.getRemark()!=null){
messageBto= new MessageBto(0, 1, "修改"+packingLibrary.getModel()+"列装目录为:原"+mapToString(originalMap)+"-->现"+mapToString(nowMap), userIds, 0); messageBto= new MessageBto(0, 1, "修改"+packingLibrary.getModel()+"列装目录为:原"+mapToString(originalMap)+"-->现"+mapToString(nowMap), userIds, 0);
} }
// } // }
messageService.add(messageBto); messageService.add(messageBto);
......
...@@ -413,10 +413,10 @@ public class PackingLibraryServiceImpl implements PackingLibraryService { ...@@ -413,10 +413,10 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
packingLogService.add(packingLog); packingLogService.add(packingLog);
} }
//发送阅知信息 //发送阅知信息
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId()); // List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(0,1,"恢复列装",userIds,0); // MessageBto messageBto = new MessageBto(0,1,"恢复列装",userIds,0);
messageBto.setRecord(StringSplitUtil.idListToString(ids)); // messageBto.setRecord(StringSplitUtil.idListToString(ids));
messageService.add(messageBto); // messageService.add(messageBto);
} }
// /** // /**
......
...@@ -195,7 +195,13 @@ public class DeviceRetiredController { ...@@ -195,7 +195,13 @@ public class DeviceRetiredController {
TaskBto task = taskService.start(initTaskBto(retiredBill)); TaskBto task = taskService.start(initTaskBto(retiredBill));
//发送阅知信息 //发送阅知信息
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId()); List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(task.getId(),task.getBusinessType(),"业务办结",userIds,0); // MessageBto messageBto = new MessageBto(task.getId(),task.getBusinessType(),"业务办结",userIds,0);
List<PackingLibrary> packingLibraries = packingLibraryService.findByIds(formVo.getPackings());
packingLibraries.forEach(PackingLibrary::setConfigName);
String content = "完成 列装退装"+String.join("-",spellModelAndCount(packingLibraries));
MessageBto messageBto = new MessageBto(task.getId(),task.getBusinessType(),content,userIds,0);
// MessageBto messageBto = new MessageBto(task.getId(),task.getBusinessType(),"业务办结",userIds,0);
messageBto.setRecord(String.valueOf(task.getBillId())); messageBto.setRecord(String.valueOf(task.getBillId()));
messageService.add(messageBto); messageService.add(messageBto);
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
...@@ -366,4 +372,14 @@ public class DeviceRetiredController { ...@@ -366,4 +372,14 @@ public class DeviceRetiredController {
} }
return deviceRetiredResultVoList; return deviceRetiredResultVoList;
} }
private List<String> spellModelAndCount(List<PackingLibrary> packingLibraries) {
List<String> strings = new ArrayList<>();
packingLibraries.forEach(packingLibrary -> {
String s = "【型号:" + packingLibrary.getModel() + ",名称:" + packingLibrary.getName() + ",适用范围:" +
packingLibrary.getMatchingRange() + "】";
strings.add(s);
});
return strings;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论