|
|
@ -185,7 +185,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public HashMap<String, Object> init(String messageType) {
|
|
|
|
public HashMap<String, Object> init(String messageType,String type) {
|
|
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
//消息类型
|
|
|
|
//消息类型
|
|
|
@ -224,6 +224,18 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
if(nwaUsers != null){
|
|
|
|
if(nwaUsers != null){
|
|
|
|
hashMap.put("currentUser",nwaUsers.get(0).getFullName());
|
|
|
|
hashMap.put("currentUser",nwaUsers.get(0).getFullName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//初始化异常单号
|
|
|
|
|
|
|
|
String abnormalNo = null;
|
|
|
|
|
|
|
|
//生成异常单号
|
|
|
|
|
|
|
|
if("Q".equals(type)){//其他异常
|
|
|
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_OTHER", 1, null).get(0);
|
|
|
|
|
|
|
|
}else if("Z".equals(type)){//质量异常
|
|
|
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_QUALITY", 1, null).get(0);
|
|
|
|
|
|
|
|
}else if("S".equals(type)){//设备异常
|
|
|
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_DEVICE", 1, null).get(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
hashMap.put("abnormalNo",abnormalNo);
|
|
|
|
|
|
|
|
|
|
|
|
return hashMap;
|
|
|
|
return hashMap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -370,16 +382,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
LocalDateTime currentTime = LocalDateTime.now();
|
|
|
|
LocalDateTime currentTime = LocalDateTime.now();
|
|
|
|
String user = CommonMethods.getUser();
|
|
|
|
String user = CommonMethods.getUser();
|
|
|
|
if(StringUtil.isBlank(abnormalBill.getAbnormalNo())){
|
|
|
|
if(StringUtil.isBlank(abnormalBill.getAbnormalNo())){
|
|
|
|
String abnormalNo = null;
|
|
|
|
throw BusinessException.build("异常单号不存在");
|
|
|
|
//生成异常单号
|
|
|
|
|
|
|
|
if("Q".equals(abnormalBill.getType())){//其他异常
|
|
|
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_OTHER", 1, null).get(0);
|
|
|
|
|
|
|
|
}else if("Z".equals(abnormalBill.getType())){//质量异常
|
|
|
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_QUALITY", 1, null).get(0);
|
|
|
|
|
|
|
|
}else if("S".equals(abnormalBill.getType())){//设备异常
|
|
|
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_DEVICE", 1, null).get(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
abnormalBill.setAbnormalNo(abnormalNo);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|