提交 58a106f7 authored 作者: zhoushaopan's avatar zhoushaopan

feat(列装模块,配发,退回,维修,维修退回,申请模块): 修改了阅知

修改了阅知
上级 a50a2ee0
......@@ -367,9 +367,8 @@ public class AllotBillController {
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "发起配发业务:" + MessageFormatUtil.spellTwoWicket(allotBillEntity.getSendUnit(),allotBillEntity.getReceiveUnit()), idList, 1);
List<String> collect = allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "发起配发出库:" +
MessageFormatUtil.spellTwoWicket(allotBillEntity.getSendUnit(),allotBillEntity.getReceiveUnit())+
"【型号:"+String.join(",",collect)+
"共"+allotBillSaveVo.getAllotCount()+"件装备】", idList, 1);
MessageFormatUtil.spellTwoWicket(allotBillEntity.getSendUnit(),allotBillEntity.getReceiveUnit())
+MessageFormatUtil.spellModelAndCount(collect,allotBill.getAllotedCount()), idList, 1);
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "对" + userPublicService.getAreaNameByUnitName(allotBillEntity.getReceiveUnit()) + "发起配发", idList, 1);
messageService.add(messageBto);
log.info("[配发模块]:" + allotBillEntity.getSendUnit() + "对" + allotBillEntity.getReceiveUnit() + "发起配发");
......@@ -500,23 +499,23 @@ public class AllotBillController {
// messageService.add(messageBto);
// }
//签发人阅知
if (allotReceiveVo.getSendUserbId() != null && sendbIsExist) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(allotReceiveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (allotReceiveVo.getSendUserbId() != null && sendbIsExist) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(allotReceiveVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//根据status判断是否业务完结,发送不同的阅知message
// String message = allotReceiveVo.getStatus() == 0 ? "办结配发业务:" :"接收配发装备:";
String message = allotReceiveVo.getStatus() == 0 ? "办结配发业务:" :"接收配发入库:";
String message ="办结 配发业务";
if (allotReceiveVo.getStatus() ==0){
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), message+MessageFormatUtil.spellTwoWicket(allotBillEntity.getSendUnit(),allotBillEntity.getReceiveUnit()), ids, 1);
List<ScriptSaveVo> scriptSaveVos = JacksonUtil.readValue(allotBillEntity.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {});
List<String> collect = scriptSaveVos.stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
message+MessageFormatUtil.spellTwoWicket(allotBillEntity.getSendUnit(),allotBillEntity.getReceiveUnit())
+"【型号:"+String.join(",",collect)+
"共"+allotReceiveVo.getReceiveCount()+"件装备】", ids, 1);
+MessageFormatUtil.spellModelAndCount(collect,allotBillEntity.getAllotedCount()), ids, 1);
messageService.add(messageBto);
}
log.info("[配发模块]:接收并发起入库");
......@@ -718,12 +717,12 @@ public class AllotBillController {
deviceLogService.addLog(deviceLogDto);
});
//签发人阅知
if (fileUploadVo.getSendUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(fileUploadVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (fileUploadVo.getSendUserbId() != null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(fileUploadVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//发送阅知信息
List<Integer> ids = userPublicService.findOtherUser(userId);
// ids.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(allotBill.getSendUnit())).stream()
......@@ -736,13 +735,12 @@ public class AllotBillController {
// String content = "发起配发业务已办结";
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
// content, ids, 1);
String message = "接收配发入库";
String message = "接收 配发入库";
List<ScriptSaveVo> scriptSaveVos = JacksonUtil.readValue(allotBill.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {});
List<String> collect = scriptSaveVos.stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
message+MessageFormatUtil.spellTwoWicket(allotBill.getSendUnit(),allotBill.getReceiveUnit())
+"【型号:"+String.join(",",collect)+
"共"+allotBill.getReceiveCount()+"件装备】", ids, 1);
+MessageFormatUtil.spellModelAndCount(collect,allotBill.getAllotedCount()), ids, 1);
messageService.add(messageBto);
return ResponseEntity.ok("上传成功");
}
......@@ -773,14 +771,14 @@ public class AllotBillController {
idList.add(fileVo.getReceiveUserbId());
}
//签发人阅知
if (fileVo.getSendUserbId() != null) {
allotBill.setSendUserbId(fileVo.getSendUserbId());
allotBill.setAgent(userPublicService.getOne(fileVo.getSendUserbId()).getName());
List<Integer> idList1 = new ArrayList<>();
idList1.add(fileVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (fileVo.getSendUserbId() != null) {
// allotBill.setSendUserbId(fileVo.getSendUserbId());
// allotBill.setAgent(userPublicService.getOne(fileVo.getSendUserbId()).getName());
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(fileVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//保存账单
//回执单
allotBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles()));
......@@ -832,8 +830,7 @@ public class AllotBillController {
List<String> collect = scriptSaveVos.stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
content+MessageFormatUtil.spellTwoWicket(allotBill.getSendUnit(),allotBill.getReceiveUnit())
+"【型号:"+String.join(",",collect)+
"共"+allotBill.getAllotedCount()+"件装备】", ids, 1);
+MessageFormatUtil.spellModelAndCount(collect,allotBill.getAllotedCount()), ids, 1);
messageService.add(messageBto);
return ResponseEntity.ok("OK");
}
......
......@@ -220,16 +220,19 @@ public class BackController {
.map(User::getUserId)
.collect(Collectors.toList()));
//给被选签发人推阅知
if (allotBillSaveVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(allotBillSaveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (allotBillSaveVo.getSendUserbId()!=null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(allotBillSaveVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//给同单位专管员和收件单位专管员推阅知
// MessageBto messageBto = new MessageBto(saveEntity.getId(),saveEntity.getBusinessType(),"对" + userPublicService.getAreaNameByUnitName(allotBackBill.getReceiveUnit()) + "发起退回",idList,1);
MessageBto messageBto = new MessageBto(saveEntity.getId(),saveEntity.getBusinessType(),"发起退回业务:" + MessageFormatUtil.spellTwoWicket(allotBackBill1.getSendUnit(),allotBackBill1.getReceiveUnit()),idList,1);
//获取型号
List<String> collect = allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(saveEntity.getId(),saveEntity.getBusinessType(),"发起退回业务:" +
MessageFormatUtil.spellTwoWicket(allotBackBill1.getSendUnit(),allotBackBill1.getReceiveUnit())+
MessageFormatUtil.spellModelAndCount(collect,allotBillSaveVo.getAllotedCount()),idList,1);
messageService.add(messageBto);
log.info("[退回模块]:" + allotBackBill.getSendUnit() + "对" + allotBackBill.getReceiveUnit() + "发起退回");
//添加taskId
......@@ -343,18 +346,23 @@ public class BackController {
// messageService.add(messageBto);
// }
//签发人阅知
if (allotBackReceiveVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(allotBackReceiveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (allotBackReceiveVo.getSendUserbId()!=null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(allotBackReceiveVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//根据status判断是否业务完结,发送不同的阅知message
// String message = allotBackReceiveVo.getStatus()==0?"业务办结":"接收退回装备";
String message = allotBackReceiveVo.getStatus()==0?"办结退回:":"接收退回装备:";
String message = "办结 退回业务:";
if(allotBackReceiveVo.getStatus()==0){
List<ScriptSaveVo> scriptSaveVos = JacksonUtil.readValue(allotBackBill.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {});
List<String> collect = scriptSaveVos.stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),
message+MessageFormatUtil.spellTwoWicket(allotBackBill.getSendUnit(),allotBackBill.getReceiveUnit()),ids,1);
message+MessageFormatUtil.spellTwoWicket(allotBackBill.getSendUnit(),allotBackBill.getReceiveUnit())+
MessageFormatUtil.spellModelAndCount(collect,allotBackBill.getBackedCount()),ids,1);
messageService.add(messageBto);
}
log.info("[退回模块]:接收并发起入库");
myWebSocket.sendMessage1();
return ResponseEntity.ok("退回接收入库");
......@@ -404,12 +412,12 @@ public class BackController {
deviceLogService.addLog(deviceLogDto);
});
//签发人阅知
if (fileUploadVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(fileUploadVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (fileUploadVo.getSendUserbId()!=null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(fileUploadVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//发送阅知信息
List<Integer> ids = userPublicService.findOtherUser(userId);
// ids.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(allotBackBill.getSendUnit())).stream()
......@@ -419,8 +427,11 @@ public class BackController {
.map(User::getUserId)
.collect(Collectors.toList()));
// MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"业务办结",ids,1);
List<ScriptSaveVo> scriptSaveVos = JacksonUtil.readValue(allotBackBill.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {});
List<String> collect = scriptSaveVos.stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),
"办结退回业务:"+MessageFormatUtil.spellTwoWicket(allotBackBill.getSendUnit(),allotBackBill.getReceiveUnit()),ids,1);
"接收 退回入库:"+MessageFormatUtil.spellTwoWicket(allotBackBill.getSendUnit(),allotBackBill.getReceiveUnit())+
MessageFormatUtil.spellModelAndCount(collect,allotBackBill.getBackedCount()),ids,1);
messageService.add(messageBto);
return ResponseEntity.ok("上传成功");
}
......@@ -450,14 +461,14 @@ public class BackController {
idList.add(fileVo.getReceiveUserbId());
}
//签发人阅知
if (fileVo.getSendUserbId()!=null){
allotBackBill.setSendUserbId(fileVo.getSendUserbId());
allotBackBill.setAgent(userPublicService.getOne(fileVo.getSendUserbId()).getName());
List<Integer> idList1 = new ArrayList<>();
idList1.add(fileVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (fileVo.getSendUserbId()!=null){
// allotBackBill.setSendUserbId(fileVo.getSendUserbId());
// allotBackBill.setAgent(userPublicService.getOne(fileVo.getSendUserbId()).getName());
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(fileVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//保存账单
//回执单
allotBackBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles()));
......@@ -499,8 +510,11 @@ public class BackController {
userIds.addAll(userDao.findAllByUnitsId(allotBackBill.getReceiveUnitId()).stream()
.map(User::getUserId)
.collect(Collectors.toList()));
List<ScriptSaveVo> scriptSaveVos = JacksonUtil.readValue(allotBackBill.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {});
List<String> collect = scriptSaveVos.stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(taskBto.getParentTaskId(),taskBto.getBusinessType(),
"办结退回业务"+MessageFormatUtil.spellTwoWicket(allotBackBill.getSendUnit(),allotBackBill.getReceiveUnit()),userIds,1);
"办结 退回业务"+MessageFormatUtil.spellTwoWicket(allotBackBill.getSendUnit(),allotBackBill.getReceiveUnit()
+MessageFormatUtil.spellModelAndCount(collect,allotBackBill.getBackedCount())),userIds,1);
messageService.add(messageBto);
return ResponseEntity.ok("OK");
}
......@@ -513,8 +527,8 @@ public class BackController {
List<Integer> idList = new ArrayList<>();
idList.add(agentVo.getSendUserbId());
//签发人阅知
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"被选为签发人",idList,1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"被选为签发人",idList,1);
// messageService.add(messageBto);
//账单保存签发人
AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId());
allotBackBill.setAgent(agentVo.getName());
......@@ -853,12 +867,12 @@ public class BackController {
.map(User::getUserId)
.collect(Collectors.toList()));
//给被选签发人推阅知
if (allotBillSaveVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(allotBillSaveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (allotBillSaveVo.getSendUserbId()!=null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(allotBillSaveVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
//给同单位专管员和收件单位专管员推阅知
// MessageBto messageBto = new MessageBto(saveEntity.getId(),saveEntity.getBusinessType(),"对" +
// userPublicService.getAreaNameByUnitName(allotBackBill.getReceiveUnit()) + "发起退回",idList,1);
......
......@@ -212,18 +212,25 @@ public class DeviceApplyController {
String message;
switch (deviceApplySaveVo.getApplyType()){
case 2:
message = "发起退役申请";
message = "发起 退役申请";
break;
case 3:
message = "发起报废申请";
message = "发起 报废申请";
break;
case 4:
message = "发起销毁申请";
message = "发起 销毁申请";
break;
default:
message = "发起装备申请";
message = "发起 装备申请";
}
MessageBto messageBto = new MessageBto(taskBto1.getId(),taskBto1.getBusinessType(),message,userIds);
// MessageBto messageBto = new MessageBto(taskBto1.getId(),taskBto1.getBusinessType(),message,userIds);
//获取列装id 通过列装id获取型号
List<Integer> packingIds = deviceApplySaveVo.getStorageBillDetailVoList().stream().map(ApplyBillDetailVo::getPackingId).distinct()
.collect(Collectors.toList());
List<String> models = packingLibraryService.getModelsById(packingIds);
MessageBto messageBto = new MessageBto(taskBto1.getId(),taskBto1.getBusinessType(),message+
MessageFormatUtil.spellTwoWicket(deviceApplySaveVo.getApplyUnit(),deviceApplySaveVo.getApplyUnit())+
MessageFormatUtil.spellModelAndCount(models,deviceApplySaveVo.getApplyAllNum()),userIds);
messageService.add(messageBto);
log.info("[申请模块]:"+message);
myWebSocket.sendMessage1();
......@@ -259,7 +266,7 @@ public class DeviceApplyController {
deviceApplyBillService.update(applyBillEntity);
//发送阅知信息
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),
"不同意申请业务:【"+userPublicService.getAreaNameByUnitName(applyBillEntity.getApplyUnit()) + "->【中办机要局】",ids);
"不同意 申请业务:【"+userPublicService.getAreaNameByUnitName(applyBillEntity.getApplyUnit()) + "->【中办机要局】",ids);
messageService.add(messageBto);
log.info("[申请模块]:装备申请驳回");
myWebSocket.sendMessage1();
......@@ -386,12 +393,12 @@ public class DeviceApplyController {
userIds.addAll(userDao.findAllByUnitsId(allotBillEntity.getReceiveUnitId()).stream()
.map(User::getUserId)
.collect(Collectors.toList()));
if (deviceApplyAllotSaveVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(deviceApplyAllotSaveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto1.getId(), taskBto1.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (deviceApplyAllotSaveVo.getSendUserbId()!=null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(deviceApplyAllotSaveVo.getSendUserbId());
// MessageBto messageBto = new MessageBto(taskBto1.getId(), taskBto1.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
MessageBto messageBto = new MessageBto(taskBto1.getId(),taskBto1.getBusinessType(),"对" + userPublicService.getAreaNameByUnitName(allotBillEntity.getReceiveUnit()) + "发起配发",userIds,1);
messageService.add(messageBto);
log.info("[申请模块]:装备申请后发起配发");
......@@ -466,9 +473,9 @@ public class DeviceApplyController {
if (uploadApplyFile.getStatus()==0){
taskService.moveToEnd(taskBto);
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"申请不同意,业务办结",userIds,0);
messageService.add(messageBto);
DeviceApplyBill deviceApplyBill = deviceApplyBillService.getOne(taskBto.getBillId());
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"申请不同意,申请业务办结",userIds,0);
messageService.add(messageBto);
deviceApplyBill.setApplyStatus(1);
deviceApplyBill.setBackFiles(FilesUtil.stringFileToList(uploadApplyFile.getBackFiles()));
if (uploadApplyFile.getReplyVos() != null && uploadApplyFile.getReplyVos().size() > 0) {
......@@ -664,7 +671,7 @@ public class DeviceApplyController {
}
}
@ApiOperation(value = "手动办结申请任务", notes = "手动办结申请任务")
@ApiOperation(value = "手动办结申请任务", notes = "手动办结申请任务")//不用了
@PostMapping("/over/{id}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity over(@PathVariable("id") int taskId) {
......
......@@ -80,6 +80,10 @@ public class DeviceApplySaveVo {
@ApiModelProperty(value = "选择试用装备详情类")
private List<ApplyTryVo> applyTryVos;
@NotNull(message = "applyAllNum不能为空")
@ApiModelProperty(value = "申请总数量")
private Integer applyAllNum;
/**
* 转实体
......
......@@ -622,6 +622,29 @@ public class DeviceLibraryController {
return ResultUtil.success(map);
}
// @ApiOperation(value = "本级模糊查询核心装备统计分页", notes = "可以通过这个接口查询装备列表")
// @PostMapping("/core/stat/local/summary")
// public ResponseEntity getLocalDeviceStatisticsPage(@RequestBody DeviceLibrarySelectVo deviceLibrarySelectVo) {
// List<DeviceStatisticsVo> deviceStatisticsVoList = deviceLibraryService.getDeviceStatisticsPage(deviceLibrarySelectVo, deviceLibrarySelectVo.getPageable(),deviceLibrarySelectVo.getPageable().getSort());
// List<DeviceStatisticsVo> deviceStatisticsVoSorts = deviceStatisticsVoList.stream()
// .sorted(Comparator.comparing(DeviceStatisticsVo::getModel).thenComparing(DeviceStatisticsVo::getName))
// .collect(Collectors.toList());
// Page<DeviceStatisticsVo> deviceStatisticsVos = PageUtil.getPerPage(deviceLibrarySelectVo.getPage(), deviceLibrarySelectVo.getSize(), deviceStatisticsVoSorts, deviceLibrarySelectVo.getPageable());
// Map<String,Object> map = new HashMap<>();
// Map<Integer, String> styleMap = configCache.getStyleMap();
// List<String> models = deviceStatisticsVoList.stream().map(DeviceStatisticsVo::getModel).distinct().collect(Collectors.toList());
// List<String> modelToSort = DeviceModelSort.modelToSort(models);
// map.put("pages",deviceStatisticsVos);
// map.put("models",modelToSort);
// //名称排序
// map.put("names",deviceStatisticsVoList.stream().map(DeviceStatisticsVo::getName).distinct().sorted(Comparator.comparing(String::toString)).collect(Collectors.toList()));
// //形态
// List<Integer> types = deviceStatisticsVoList.stream().map(DeviceStatisticsVo::getType).distinct().collect(Collectors.toList());
// Collections.sort(types);
// map.put("types",types.stream().map(integer -> new TypeVo(integer,styleMap.get(integer))).collect(Collectors.toList()));
// return ResultUtil.success(map);
// }
@ApiOperation(value = "查询核心装备详情的详情", notes = "可以通过这个接口查询核心装备详情的详情")
@GetMapping("/core/feature/detail/{id}")
public ResponseEntity getDeviceDetail(@PathVariable("id") @Min(value = 1,message = "id不能小于1") int id) {
......
......@@ -240,7 +240,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
List<DeviceLibrary> libraryEntities = getCoreDevicePage(d);
if (libraryEntities.size() > 0) {
// Map<String, List<DeviceLibrary>> map = libraryEntities.stream().collect(groupingBy(deviceLibrary -> deviceLibrary.getModel()+"Ǵ"+deviceLibrary.getName()));
Map<String, List<DeviceLibrary>> map = libraryEntities.stream().collect(groupingBy(deviceLibrary -> deviceLibrary.getModel()+"Ǵ"+deviceLibrary.getName()+"Ǵ"+deviceLibrary.getType()+"Ǵ"+deviceLibrary.getMatchingRangeName()+"Ǵ"+deviceLibrary.getIsPart()));
Map<String, List<DeviceLibrary>> map = libraryEntities.stream().collect(groupingBy(deviceLibrary ->
deviceLibrary.getModel()+"Ǵ"+deviceLibrary.getName()+"Ǵ"+deviceLibrary.getType()+"Ǵ"
+deviceLibrary.getMatchingRangeName()+"Ǵ"+deviceLibrary.getIsPart()));
//按型号遍历统计各种状态的装备数量
for (String s : map.keySet()) {
String[] strings = s.split("Ǵ");
......
package com.tykj.dev.device.library.subject.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author zsp
*/
@Data
@ApiModel("本级装备统计类")
public class LocalDeviceStatisticsVo {
@ApiModelProperty(value = "型号", example = "bmxx")
public String model;
@ApiModelProperty(value = "名称", example = "BM-1")
public String name;
@ApiModelProperty(value = "所属单位", example = "省机要局")
private String ownUnit;
@ApiModelProperty(value = "装备类型总数", example = "100")
private Integer deviceNumber;
@ApiModelProperty(value = "在库数量", example = "10")
private Integer inLibraryNum;
@ApiModelProperty(value = "维修数量", example = "10")
private Integer repairNum;
@ApiModelProperty(value = "销毁数量", example = "10")
private Integer destoryNum;
@ApiModelProperty(value = "退役数量", example = "10")
private Integer retiredNum;
@ApiModelProperty(value = "报废数量", example = "10")
private Integer scrappedNum;
@ApiModelProperty(value = "运输中数量", example = "10")
private Integer allotNum;
@ApiModelProperty(value = "使用数量", example = "10")
private Integer useNum;
@ApiModelProperty(value = "其他数量", example = "10")
private Integer otherNum;
@ApiModelProperty(value = "其他数量id", example = "10")
private List<Integer> otherNumIds = new ArrayList<>();
@ApiModelProperty(value = "该型号所有装备Id列表")
private List<Integer> deviceIds = new ArrayList<>();
@ApiModelProperty(value = "该型号在库装备Id列表")
private List<Integer> inLibraryIds = new ArrayList<>();
@ApiModelProperty(value = "该型号维修装备Id列表")
private List<Integer> repairIds = new ArrayList<>();
@ApiModelProperty(value = "该型号销毁装备Id列表")
private List<Integer> destoryIds = new ArrayList<>();
@ApiModelProperty(value = "该型号退役装备Id列表")
private List<Integer> retiredIds = new ArrayList<>();
@ApiModelProperty(value = "该型号报废装备Id列表")
private List<Integer> scrappedIds = new ArrayList<>();
@ApiModelProperty(value = "该型号运输中装备Id列表")
private List<Integer> allotIds = new ArrayList<>();
@ApiModelProperty(value = "该型号使用中装备Id列表")
private List<Integer> useIds = new ArrayList<>();
@ApiModelProperty(value = "序列号区间")
public String seqs;
@ApiModelProperty(value = "装备形态")
public Integer type;
@ApiModelProperty(value = "装备配用范围")
public String matchingRangeName;
@ApiModelProperty(value = "是不是配件(0:不是,1:是)")
private Integer isPart;
}
package com.tykj.dev.misc.utils;
import java.util.List;
/**
* @author zjm
* @version 1.0.0
......@@ -29,6 +31,15 @@ public class MessageFormatUtil {
"】";
};
/**
* 阅知中拼接型号和数量
*/
public static String spellModelAndCount(List<String> models,Integer count) {
return "【型号:" +
String.join(",",models) +
"共"+count+"件装备】";
}
/**
* 一个【】填空内容的通用接口
......
......@@ -244,4 +244,11 @@ public interface PackingLibraryService{
*/
List<PackingLibrary> findByIds(@RequestBody List<Integer> ids);
/**
* 通过列装id获取型号
* @param ids 列装id的集合
* @return 型号的集合
*/
List<String> getModelsById(List<Integer> ids);
}
......@@ -1079,6 +1079,11 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
return packingLibraryDao.findAllByIdIn(ids);
}
@Override
public List<String> getModelsById(List<Integer> ids) {
return packingLibraryDao.findAllByIdIn(ids).stream().map(PackingLibrary::getModel).distinct().collect(Collectors.toList());
}
private Specification<PackingLibrary> getSelectSpecification(PackingLibrarySelectVo packingLibrarySelectVo) {
PredicateBuilder<PackingLibrary> predicateBuilder = Specifications.and();
Integer level = userUtils.getCurrentUnitLevel();
......
......@@ -289,8 +289,10 @@ public class RepairController {
//发送阅知信息
List<Integer> userIds = userPublicService.findOtherUser(userUtils.getCurrentUserId());
List<String> models = deviceLibraryService.findAllByIds(ids).stream().map(DeviceLibrary::getModel)
.collect(Collectors.toList());
MessageBto messageBto = new MessageBto(0, 5, "添加维修业务:型号为"+models, userIds, 1);
.distinct().collect(Collectors.toList());
// MessageBto messageBto = new MessageBto(0, 5, "添加维修业务:型号为"+models, userIds, 1);
MessageBto messageBto = new MessageBto(0, 5, "添加待维修装备"+
MessageFormatUtil.spellModelAndCount(models,ids.size()), userIds, 1);
//阅知记录存放detailIds
messageBto.setRecord(StringSplitUtil.idListToString(detailIds));
messageService.add(messageBto);
......@@ -615,16 +617,18 @@ public class RepairController {
//添加出库白名单
inputOutputDeviceService.addWhiteDevices(idList, userUtils.getCurrentUnitId(), 1);
//发送阅知信息
if (repairBillSaveVo.getStartUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(repairBillSaveVo.getStartUserbId());
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
// if (repairBillSaveVo.getStartUserbId() != null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(repairBillSaveVo.getStartUserbId());
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
// String content = "待领取送修装备,型号为"+deviceLibraryService.findAllByIds(idList)
// .stream().map(DeviceLibrary::getModel).collect(Collectors.toList());
String content = "发起维修业务"+MessageFormatUtil.spellTwoWicket(repairBill2.getSendUnit(),
repairBill2.getReceiveUnit());
//获取型号
List<String> collect = repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
String content = "发起 维修业务"+MessageFormatUtil.spellTwoWicket(repairBill2.getSendUnit(),
repairBill2.getReceiveUnit())+MessageFormatUtil.spellModelAndCount(collect,repairBillSaveVo.getSendedCount());
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "向" + userPublicService.getAreaNameByUnitName(repairBill.getReceiveUnit()) + "发起装备维修", ids, 1);
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), content, ids, 1);
messageService.add(messageBto);
......@@ -718,11 +722,15 @@ public class RepairController {
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
// "接收维修装备型号为"+repairDetailEntities.stream()
// .map(RepairDetail::getModel).collect(Collectors.toList()), ids, 1);
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
"接收维修业务"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),
repairBill.getReceiveUnit()), ids, 1);
messageService.add(messageBto);
// //获取型号
// List<Integer> deviceIds = repairReceiveVo.getDeviceList().stream().map(DeviceDetailVo::getDeviceId)
// .collect(Collectors.toList());
// List<String> models = deviceLibraryService.findAllByIds(deviceIds).stream().map(DeviceLibrary::getModel).distinct().collect(Collectors.toList());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
// "接收 维修业务"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),
// repairBill.getReceiveUnit())+MessageFormatUtil.spellModelAndCount(models,deviceIds.size()), ids, 1);
//
// messageService.add(messageBto);
} else {
//推到待上传签收单状态
taskService.moveToSpecial(taskBto, StatusEnum.WAIT_UPLOAD_FILE);
......@@ -784,15 +792,15 @@ public class RepairController {
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList1, 1);
// messageService.add(messageBto);
// }
if (repairReceiveVo.getStartUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(repairReceiveVo.getStartUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
"接收维修业务"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),repairBill.getReceiveUnit()), ids, 1);
messageService.add(messageBto);
// if (repairReceiveVo.getStartUserbId() != null) {
// List<Integer> idList1 = new ArrayList<>();
// idList1.add(repairReceiveVo.getStartUserbId());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
// }
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
// "接收 维修业务"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),repairBill.getReceiveUnit()), ids, 1);
// messageService.add(messageBto);
myWebSocket.sendMessage1();
return ResultUtil.success("维修装备接收入库");
}
......@@ -891,9 +899,11 @@ public class RepairController {
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "业务办结", ids, 1);
// List<RepairDetail> repairDetails = deviceRepairDetailService.findByBillId(repairBill.getId());
// List<String> models = repairDetails.stream().map(RepairDetail::getModel).collect(Collectors.toList());
//获取型号
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
"接收维修业务"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),
repairBill.getReceiveUnit()), ids, 1);
"接收 维修业务"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),
repairBill.getReceiveUnit()+MessageFormatUtil.spellModelAndCount(fileUploadVo.getModels(),
fileUploadVo.getDeviceCount())), ids, 1);
messageService.add(messageBto);
repairSendBill.setBillFileName(fileUploadVo.getBillFileName());
repairSendBill.setBillFileUrl(fileUploadVo.getBillFileUrl());
......@@ -910,8 +920,8 @@ public class RepairController {
repairBill.setStartUserB(s);
repairSendBill.setStartUserbId(fileUploadVo.getStartUserbId());
repairSendBill.setAgent(s);
MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileUploadVo.getStartUserbId()), 1);
messageService.add(messageBto1);
// MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileUploadVo.getStartUserbId()), 1);
// messageService.add(messageBto1);
}
//收件方经办人
if (fileUploadVo.getRepairUserbId() != null) {
......@@ -1113,13 +1123,16 @@ public class RepairController {
if (repairBackBillSaveVo.getStartUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(repairBackBillSaveVo.getStartUserbId());
MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
}
// MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(), "向" + userPublicService.getAreaNameByUnitName(repairBackBill.getReceiveUnit()) + "退回维修装备", ids, 1);
//获取型号
List<String> models = repairBackBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(),
"退回维修业务"+MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),
repairBackBill1.getReceiveUnit()), ids, 1);
repairBackBill1.getReceiveUnit()+MessageFormatUtil.spellModelAndCount(models,repairBackBillSaveVo.getSendedCount()))
, ids, 1);
messageService.add(messageBto);
myWebSocket.sendMessage1();
//添加taskId
......@@ -1354,16 +1367,24 @@ public class RepairController {
if (repairReceiveVo.getStartUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(repairReceiveVo.getStartUserbId());
MessageBto messageBto = new MessageBto(taskBto2.getId(), taskBto2.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(taskBto2.getId(), taskBto2.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
}
// String message = repairReceiveVo.getStatus() == 0 ? "业务办结" : "接收维修领取装备";
String message = repairReceiveVo.getStatus() == 0 ? "接收维修业务"+MessageFormatUtil.spellTwoWicket(
repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit()) : "发起退回维修任务"+
MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit());
//获取型号
List<String> models = repairReceiveVo.getModels();
// String message = repairReceiveVo.getStatus() == 0 ? "接收 维修入库"+MessageFormatUtil.spellTwoWicket(
// repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit())
// +MessageFormatUtil.spellModelAndCount(models,repairReceiveVo.getReceiveCount()) : "退回 维修完成设备"+
// MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit())+
// MessageFormatUtil.spellModelAndCount(models,repairReceiveVo.getSendedCount());
if (repairReceiveVo.getStatus() == 0){
String message = "接收 维修入库";
MessageBto messageBto = new MessageBto(taskBto2.getId(), taskBto2.getBusinessType(),
message+deviceLibraries.stream().map(DeviceLibrary::getModel).collect(Collectors.toList()), ids, 1,1);
message, ids, 1,1);
messageService.add(messageBto);
}
//遍历map依次发送阅知
messageMap.keySet().forEach(integer -> {
List<Integer> integerList = new ArrayList<>();
......@@ -1371,8 +1392,9 @@ public class RepairController {
.map(User::getUserId)
.collect(Collectors.toList()));
// MessageBto messageBto2 = new MessageBto(0, 5, "待领取送修装备", integerList);
MessageBto messageBto2 = new MessageBto(0, 5, "发起退回维修任务"+
MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit()),
MessageBto messageBto2 = new MessageBto(0, 5, "退回 维修完成设备"+
MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit())+
MessageFormatUtil.spellModelAndCount(models,repairReceiveVo.getSendedCount()),
integerList,1,1);
//存放详情id集合
messageBto2.setRecord(StringSplitUtil.idListToString(messageMap.get(integer)));
......@@ -1469,9 +1491,11 @@ public class RepairController {
// .collect(Collectors.toList());
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
// "维修业务已办结,装备型号为"+models, ids, 1);
List<String> models = fileUploadVo.getModels();
Integer deviceCount = fileUploadVo.getDeviceCount();
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
"办结维修退回业务"+MessageFormatUtil.spellTwoWicket(repairBackBill.getSendUnit(),
repairBackBill.getReceiveUnit()), ids, 1);
"接收 维修入库"+MessageFormatUtil.spellTwoWicket(repairBackBill.getSendUnit(),
repairBackBill.getReceiveUnit())+MessageFormatUtil.spellModelAndCount(models,deviceCount), ids, 1);
messageService.add(messageBto);
repairBackBill.setBillFileName(fileUploadVo.getBillFileName());
repairBackBill.setBillFileUrl(fileUploadVo.getBillFileUrl());
......@@ -1479,8 +1503,8 @@ public class RepairController {
if (fileUploadVo.getStartUserbId() != null) {
repairBackBill.setStartUserbId(fileUploadVo.getStartUserbId());
repairBackBill.setAgent(userPublicService.getOne(fileUploadVo.getStartUserbId()).getName());
MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileUploadVo.getStartUserbId()), 1);
messageService.add(messageBto1);
// MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileUploadVo.getStartUserbId()), 1);
// messageService.add(messageBto1);
}
//经办人阅知
if (fileUploadVo.getReceiveUserbId() != null) {
......@@ -1604,14 +1628,14 @@ public class RepairController {
// messageBto2.setRecord(StringSplitUtil.idListToString(messageMap.get(integer)));
// MessageBto messageBto2 = new MessageBto(0, 5, "接收维修业务,型号为"+
// deviceLibraries.stream().map(DeviceLibrary::getModel).collect(Collectors.toList()), ids2,1,1);
Set<String> models = new HashSet<>();
repairStatusChangeVo.getId().forEach(i->{
String model = deviceLibraryService.getOne(repairDetailService.getOne(i).getDeviceId()).getModel();
models.add(model);
});
MessageBto messageBto2 = new MessageBto(0, 5, "接收维修业务,型号为"+models, ids2,1,1);
messageBto2.setRecord(StringSplitUtil.idListToString(messageMap.get(integer)));
messageService.add(messageBto2);
// Set<String> models = new HashSet<>();
// repairStatusChangeVo.getId().forEach(i->{
// String model = deviceLibraryService.getOne(repairDetailService.getOne(i).getDeviceId()).getModel();
// models.add(model);
// });
// MessageBto messageBto2 = new MessageBto(0, 5, "接收维修业务,型号为"+models, ids2,1,1);
// messageBto2.setRecord(StringSplitUtil.idListToString(messageMap.get(integer)));
// messageService.add(messageBto2);
});
return ResultUtil.success("修改成功");
}
......@@ -2130,10 +2154,10 @@ public class RepairController {
// MessageBto messageBto2 = new MessageBto(0, 5, "待领取送修装备,型号为"+
// deviceLibraries.stream().map(DeviceLibrary::getModel).collect(Collectors.toList()), integerList,1,1);
// messageBto2.setRecord(String.valueOf(repairDetail1.getId()));
MessageBto messageBto2 = new MessageBto(0, 5, "退回维修业务"+
MessageFormatUtil.spellTwoWicket(repairDetail1.getLocationUnit(),repairDetail1.getOwnUnit()), integerList,1,1);
messageBto2.setRecord(String.valueOf(repairDetail1.getId()));
messageService.add(messageBto2);
// MessageBto messageBto2 = new MessageBto(0, 5, "退回维修业务"+
// MessageFormatUtil.spellTwoWicket(repairDetail1.getLocationUnit(),repairDetail1.getOwnUnit()), integerList,1,1);
// messageBto2.setRecord(String.valueOf(repairDetail1.getId()));
// messageService.add(messageBto2);
}
//旧的维修记录改为已报废
repairDetail.setRepairStatus(4);
......@@ -2238,8 +2262,8 @@ public class RepairController {
if (fileVo.getStartUserbId() != null) {
repairBackBill.setStartUserbId(fileVo.getStartUserbId());
repairBackBill.setAgent(userPublicService.getOne(fileVo.getStartUserbId()).getName());
MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileVo.getStartUserbId()), 1);
messageService.add(messageBto1);
// MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileVo.getStartUserbId()), 1);
// messageService.add(messageBto1);
}
repairBackBill.setBackStatus(5);
repairBackBill.setReceiveTime(new Date());
......@@ -2257,11 +2281,11 @@ public class RepairController {
.map(User::getUserId)
.collect(Collectors.toList()));
//阅知
// List<String> models = deviceRepairDetailService.findByBackBillId(repairBackBill.getId()).stream().map(RepairDetail::getModel)
// .collect(Collectors.toList());
List<String> models = deviceRepairDetailService.findByBackBillId(repairBackBill.getId()).stream().map(RepairDetail::getModel)
.collect(Collectors.toList());
MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(),
"办结维修退回业务"+MessageFormatUtil.spellTwoWicket(repairBackBill.getSendUnit(),
repairBackBill.getReceiveUnit()), ids, 1);
"接收 维修入库"+MessageFormatUtil.spellTwoWicket(repairBackBill.getSendUnit(), repairBackBill.getReceiveUnit())
+MessageFormatUtil.spellModelAndCount(models,fileVo.getDeviceCount()), ids, 1);
// MessageBto messageBto1 = new MessageBto(taskBto.getParentTaskId(), taskBto.getBusinessType(), "业务办结", userIds, 1);
messageService.add(messageBto1);
//装备日志
......@@ -2320,8 +2344,9 @@ public class RepairController {
integerList.addAll(userDao.findAllByUnitsId(integer).stream()
.map(User::getUserId)
.collect(Collectors.toList()));
MessageBto messageBto2 = new MessageBto(0, 5, "接收维修业务"+
MessageFormatUtil.spellTwoWicket(repairBackBill.getSendUnit(),repairBackBill.getReceiveUnit()),
MessageBto messageBto2 = new MessageBto(0, 5, "接收 维修入库"+
MessageFormatUtil.spellTwoWicket(repairBackBill.getSendUnit(),repairBackBill.getReceiveUnit())
+MessageFormatUtil.spellModelAndCount(models,fileVo.getDeviceCount()),
integerList,1,1);
//阅知记录id拼接
messageBto2.setRecord(StringSplitUtil.idListToString(messageMap.get(integer)));
......@@ -2355,8 +2380,8 @@ public class RepairController {
repairBill.setStartUserB(startUserB);
repairSendBill.setStartUserbId(fileVo.getStartUserbId());
repairSendBill.setAgent(startUserB);
MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileVo.getStartUserbId()), 1);
messageService.add(messageBto1);
// MessageBto messageBto1 = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", Collections.singletonList(fileVo.getStartUserbId()), 1);
// messageService.add(messageBto1);
}
if (fileVo.getReceiveUseraId() != null) {
repairBill.setRepairUserA(userPublicService.getOne(fileVo.getReceiveUseraId()).getName());
......@@ -2389,8 +2414,8 @@ public class RepairController {
// MessageBto messageBto1 = new MessageBto(taskBto.getParentTaskId(), taskBto.getBusinessType(),
// "业务办结", userIds, 1);
MessageBto messageBto1 = new MessageBto(taskBto.getParentTaskId(), taskBto.getBusinessType(),
"接收维修业务:"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),
repairBill.getReceiveUnit()), userIds, 1);
"办结 维修业务:"+MessageFormatUtil.spellTwoWicket(repairBill.getSendUnit(),
repairBill.getReceiveUnit()+MessageFormatUtil.spellModelAndCount(models,fileVo.getDeviceCount())), userIds, 1);
messageService.add(messageBto1);
//装备日志
List<FileVo> fileVoList = new ArrayList<>();
......@@ -2444,8 +2469,8 @@ public class RepairController {
List<Integer> idList = new ArrayList<>();
idList.add(agentBackVo.getStartUserbId());
//签发人阅知
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList, 1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList, 1);
// messageService.add(messageBto);
RepairBill repairBill = deviceRepairBillService.getOne(taskBto.getBillId());
repairBill.setStartUserB(agentBackVo.getName());
RepairSendBill repairSendBill = deviceRepairSendBillDao.findByDeviceRepairBillId(repairBill.getId());
......@@ -2461,8 +2486,8 @@ public class RepairController {
List<Integer> idList = new ArrayList<>();
idList.add(agentBackVo.getStartUserbId());
//签发人阅知
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList, 1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList, 1);
// messageService.add(messageBto);
RepairBackBill repairBackBill = deviceRepairBackBillService.getOne(taskBto.getBillId());
repairBackBill.setAgent(agentBackVo.getName());
repairBackBill.setStartUserbId(agentBackVo.getStartUserbId());
......@@ -2988,13 +3013,14 @@ public class RepairController {
if (repairBillSaveVo.getStartUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(repairBillSaveVo.getStartUserbId());
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
}
List<String> models = repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
// MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(), "向" + userPublicService.getAreaNameByUnitName(repairBill.getReceiveUnit()) + "发起装备维修", ids, 1);
MessageBto messageBto = new MessageBto(saveEntity.getId(), saveEntity.getBusinessType(),
"发起维修业务"+MessageFormatUtil.spellTwoWicket(repairBill1.getSendUnit(),
repairBill1.getReceiveUnit()), ids, 1);
"发起 维修业务"+MessageFormatUtil.spellTwoWicket(repairBill1.getSendUnit(),
repairBill1.getReceiveUnit()+MessageFormatUtil.spellModelAndCount(models,repairBillSaveVo.getSendedCount())), ids, 1);
messageService.add(messageBto);
myWebSocket.sendMessage1();
//添加taskId
......@@ -3108,13 +3134,14 @@ public class RepairController {
if (repairBackBillSaveVo.getStartUserbId() != null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(repairBackBillSaveVo.getStartUserbId());
MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
// MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(), "被选为签发人", idList1, 1);
// messageService.add(messageBto);
}
// MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(), "向" + userPublicService.getAreaNameByUnitName(repairBackBill.getReceiveUnit()) + "退回维修装备", ids, 1);
List<String> models = repairBackBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList());
MessageBto messageBto = new MessageBto(task.getId(), task.getBusinessType(),
"退回维修业务"+MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),
repairBackBill1.getReceiveUnit()), ids, 1);
"退回 维修完成设备"+MessageFormatUtil.spellTwoWicket(repairBackBill1.getSendUnit(),repairBackBill1.getReceiveUnit())
+MessageFormatUtil.spellModelAndCount(models,repairBackBillSaveVo.getSendedCount()), ids, 1);
messageService.add(messageBto);
myWebSocket.sendMessage1();
//添加taskId字段
......
......@@ -47,4 +47,10 @@ public class FileUploadVo {
@ApiModelProperty(value = "接收单位B岗")
private Integer repairUserbId;
@ApiModelProperty(value = "型号的集合")
private List<String> models;
@ApiModelProperty(value = "接收维修装备的数量")
private Integer deviceCount;
}
......@@ -36,4 +36,7 @@ public class FileVo {
@ApiModelProperty(value = "发件单位B岗")
private Integer startUserbId;
@ApiModelProperty(value = "接收维修装备的数量")
private Integer deviceCount;
}
......@@ -101,4 +101,7 @@ public class RepairReceiveVo {
@ApiModelProperty(value = "收件单位Id")
private Integer receiveUnitId;
@ApiModelProperty(value = "接收维修装备的型号")
private List<String> models;
}
......@@ -7,4 +7,4 @@ spring.jpa.hibernate.ddl-auto=update
#file.path=C:/Users/dengdiyi/Documents/file/
# spring boot admin
spring.boot.admin.client.url=http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087w
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论