异常发送消息通知

master
赵嘉伟 3 years ago
parent 79378ab83a
commit 5c19d31d85

@ -491,7 +491,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
LocalDateTime now = LocalDateTime.now();
abnormalBillDispose.setHandle(HandleEnum.ABNORMAL_BILL_DISPOSE.getHandle(site,abnormalBill.getAbnormalNo()));
if(!StringUtil.isBlank(abnormalBillDispose.getRouterBo())){
//分割该工艺路线
String[] routerSplit = abnormalBillDispose.getRouterBo().split(",");
@ -507,7 +506,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
}
}
//判断返修工单是否正确
if(!StringUtil.isBlank(abnormalBillDispose.getResolveShopOrder())){
ShopOrder shopOrder = shopOrderMapper.selectById(HandleEnum.SHOP_ORDER.getHandle(site, abnormalBillDispose.getResolveShopOrder()));
@ -527,8 +525,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalBill.setStatus(Constants.PROGRAM_CONFIRM);
abnormalBill.setProgram("true");
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
this.saveOrUpdate(abnormalBill);
@ -1018,6 +1014,11 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalMessage.setMessageType(messageType.getMessageType());
//格式化消息
String message = this.formatMessage(abnormalBill, abnormalMessage.getMessageType(), site);
//得到消息触发的时间
abnormalMessage.setResponseDateTime(now);
//得到要发送的消息
abnormalMessage.setContent(message);
//设置发送的用户组和异常节点
switch (abnormalBill.getStatus()){
//新建
@ -1080,12 +1081,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//得到消息触发的时间
abnormalMessage.setResponseDateTime(now);
//得到要发送的消息
abnormalMessage.setContent(message);
//设置状态新建是N响应为N纠防确认是N方案确认是Y取消是Y,N为可以升级Y为不可以升级
if(Constants.ABNORMAL_MESSAGE_RESPONSE.equals(abnormalMessage.getNode()) ||
Constants.ABNORMAL_MESSAGE_REPORT.equals(abnormalMessage.getNode())){

@ -70,8 +70,6 @@ public class AnomalyJobServiceImpl implements AnomalyJobService {
abnormalMessageQueryWrapper.lt("UP_DATE_TIME",now);
// AbnormalBill abnormalBill = new AbnormalBill();
List<Message> abnormalMessages = messageMapper.selectList(abnormalMessageQueryWrapper);
for(Message _abnormalMessage : abnormalMessages){
String uuid = UUID.randomUUID().toString();
Message abnormalMessage = new Message();
@ -119,7 +117,8 @@ public class AnomalyJobServiceImpl implements AnomalyJobService {
if(Constants.ABNORMAL_MESSAGE_REPORT.equals(abnormalMessage.getNode())){
abnormalMessage.setContent(message+",现已超时未响应");
}else if(Constants.ABNORMAL_MESSAGE_RESPONSE.equals(abnormalMessage.getNode())){
abnormalMessage.setContent(message+",现已响应超时");
//走判责提交和方案确认
abnormalMessage.setContent(message+",现已响应超时未方案确认");
};
//设置时间

Loading…
Cancel
Save