Browse Source

邮件通知

chenyuehu 3 years ago
parent
commit
a40be53911

+ 8 - 8
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -226,7 +226,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         });
         // 通过给当天值班维修人员
         SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_APPLICATION.getValue(),
-                model.getId(), MessageTemplateUtil.getRepairApplicationForReceive(model.getId()),
+                model.getId(), MessageTemplateUtil.getRepairApplicationForReceive(model.getNo()),
                 model.getId(), userIds, mails));
         return form;
     }
@@ -294,7 +294,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         super.modModelByPrimaryKey(applicationForm);
 
         SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.RECEIVE.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_RECEIVE.getValue(),
-                applicationForm.getId(), MessageTemplateUtil.getReceive(applicationForm.getId()),
+                applicationForm.getId(), MessageTemplateUtil.getReceive(applicationForm.getNo()),
                 applicationForm.getId(), ListUtils.newArrayList(applicationForm.getUserId())));
     }
 
@@ -338,7 +338,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
 
         SysUser repairUser = userMapper.selectByPrimaryKey(model.getRepairUserId());
         SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_DISPATCH.getValue(),
-                applicationForm.getId(), MessageTemplateUtil.getRepairDispatch(applicationForm.getId()),
+                applicationForm.getId(), MessageTemplateUtil.getRepairDispatch(applicationForm.getNo()),
                 applicationForm.getId(), ListUtils.newArrayList(model.getRepairUserId()), ListUtils.newArrayList(repairUser.getEmail())));
     }
 
@@ -393,7 +393,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             // 发送通知给主管,主管是验收人,他收到通知,进行调拨给使用人员
             SysUser checkUser = userMapper.selectByPrimaryKey(applicationForm.getCheckUserId());
             SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_FINISH.getValue(),
-                    applicationForm.getId(), MessageTemplateUtil.getRepairCheck(applicationForm.getId()),
+                    applicationForm.getId(), MessageTemplateUtil.getRepairCheck(applicationForm.getNo()),
                     applicationForm.getId(), ListUtils.newArrayList(applicationForm.getCheckUserId()), ListUtils.newArrayList(checkUser.getEmail())));
         }
     }
@@ -416,7 +416,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
 
         SysUser noticeUser = userMapper.selectByPrimaryKey(applicationForm.getRepairUserId());
         SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_OK.getValue(),
-                applicationForm.getId(), MessageTemplateUtil.getRepairOk(applicationForm.getId()),
+                applicationForm.getId(), MessageTemplateUtil.getRepairOk(applicationForm.getNo()),
                 applicationForm.getId(), ListUtils.newArrayList(applicationForm.getRepairUserId()), ListUtils.newArrayList(noticeUser.getEmail())));
     }
 
@@ -432,7 +432,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
 
         SysUser noticeUser = userMapper.selectByPrimaryKey(applicationForm.getRepairUserId());
         SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_BACK.getValue(),
-                dto.getId(), MessageTemplateUtil.getRepairBack(applicationForm.getId()),
+                dto.getId(), MessageTemplateUtil.getRepairBack(applicationForm.getNo()),
                 applicationForm.getId(), ListUtils.newArrayList(applicationForm.getRepairUserId()), ListUtils.newArrayList(noticeUser.getEmail())));
     }
 
@@ -464,7 +464,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
                 mapper.updateByPrimaryKeySelective(update);
 
                 SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_APPLICATION.getValue(),
-                        item.getId(), MessageTemplateUtil.getRepairApplicationForReceive(item.getId()),
+                        item.getId(), MessageTemplateUtil.getRepairApplicationForReceive(item.getNo()),
                         item.getId(), Arrays.asList(repairManager.getUserId()), Arrays.asList(repairManager.getEmail())));
             });
         }
@@ -511,7 +511,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             List<String> userIds = users.stream().map(item -> item.getUserId()).collect(Collectors.toList());
             List<String> mails = users.stream().map(item -> item.getEmail()).collect(Collectors.toList());
             tasks.forEach(item -> SpringContextHolder.publishEvent(new WorkplaceBacklogEvent(WorkplaceBacklogTypeEnum.REPAIR_NOT_FINISH.getValue(), WorkplaceBacklogDetailTypeEnum.REPAIR_APPLICATION.getValue(),
-                    item.getId(), MessageTemplateUtil.getRepairApplicationForNotFinishNotic(item.getId(), 3),
+                    item.getId(), MessageTemplateUtil.getRepairApplicationForNotFinishNotic(item.getNo(), 3),
                     item.getId(), userIds, mails)));
         }
     }