|
|
|
@ -10,10 +10,10 @@ import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillDisposeMapper;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillMapper;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.model.*;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.service.*;
|
|
|
|
|
import com.foreverwin.mesnac.common.enums.AnomalyConstant;
|
|
|
|
|
import com.foreverwin.mesnac.common.constant.Constants;
|
|
|
|
|
import com.foreverwin.mesnac.common.dto.ScrapDto;
|
|
|
|
|
import com.foreverwin.mesnac.common.dto.UsrDto;
|
|
|
|
|
import com.foreverwin.mesnac.common.enums.AnomalyConstant;
|
|
|
|
|
import com.foreverwin.mesnac.common.enums.HandleEnum;
|
|
|
|
|
import com.foreverwin.mesnac.common.helper.NextNumberHelper;
|
|
|
|
|
import com.foreverwin.mesnac.common.mapper.MessageMapper;
|
|
|
|
@ -132,6 +132,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
@Autowired
|
|
|
|
|
private NcCodeService ncCodeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private DataFieldListMapper dataFieldListMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1086,6 +1089,56 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
messageMap.put("ncCodeDescription",ncCodeDescription);
|
|
|
|
|
}
|
|
|
|
|
messageMap.put("shutDown",AnomalyConstant.ShutDown.msg(messageContent.getShutDown()));
|
|
|
|
|
|
|
|
|
|
//判断该异常单的状态是否是纠防确认
|
|
|
|
|
if(Constants.CORRECTION_CONFIRM.equals(messageContent.getStatus())){
|
|
|
|
|
|
|
|
|
|
DataField dataField = new DataField();
|
|
|
|
|
dataField.setSite(site);
|
|
|
|
|
//原因分类
|
|
|
|
|
String dutyCauseType = messageContent.getDutyType();
|
|
|
|
|
if(!StringUtil.isBlank(dutyCauseType)){
|
|
|
|
|
List<String> dutyCauseTypeList = Arrays.asList(dutyCauseType.split(","));
|
|
|
|
|
dataField.setDataField("REASON_CATEGORY");
|
|
|
|
|
dataField.setDataValue(dutyCauseTypeList);
|
|
|
|
|
String dutyCauseTypeDescription = dataFieldListMapper.findDataFieldListByDataField(dataField, locale);
|
|
|
|
|
messageMap.put("dutyCauseType",dutyCauseTypeDescription);
|
|
|
|
|
}else{
|
|
|
|
|
messageMap.put("dutyCauseType","");
|
|
|
|
|
}
|
|
|
|
|
//责任部门
|
|
|
|
|
String dutyDepart = messageContent.getDutyDepart();
|
|
|
|
|
if(!StringUtil.isBlank(dutyDepart)){
|
|
|
|
|
List<String> dutyDepartList = Arrays.asList(dutyDepart.split(","));
|
|
|
|
|
dataField.setDataField("RESPONSIBILITY_DEPARTMENT");
|
|
|
|
|
dataField.setDataValue(dutyDepartList);
|
|
|
|
|
String dutyDepartDescription = dataFieldListMapper.findDataFieldListByDataField(dataField, locale);
|
|
|
|
|
messageMap.put("dutyDepart",dutyDepartDescription);
|
|
|
|
|
}else{
|
|
|
|
|
messageMap.put("dutyDepart","");
|
|
|
|
|
}
|
|
|
|
|
//责任分类
|
|
|
|
|
String dutyType = messageContent.getDutyDepart();
|
|
|
|
|
if(!StringUtil.isBlank(dutyType)){
|
|
|
|
|
List<String> dutyTypeList = Arrays.asList(dutyType.split(","));
|
|
|
|
|
dataField.setDataField("RESPONSIBILITY_TYPE");
|
|
|
|
|
dataField.setDataValue(dutyTypeList);
|
|
|
|
|
String dutyDepartDescription = dataFieldListMapper.findDataFieldListByDataField(dataField, locale);
|
|
|
|
|
messageMap.put("dutyType",dutyDepartDescription);
|
|
|
|
|
}else{
|
|
|
|
|
messageMap.put("dutyType","");
|
|
|
|
|
}
|
|
|
|
|
List<UsrDto> list = userService.findList(messageContent.getPrincipalUser());
|
|
|
|
|
if(list.size() > 0){
|
|
|
|
|
messageMap.put("principalUser",list.get(0).getFullName());
|
|
|
|
|
}
|
|
|
|
|
messageMap.put("dutyCauseDescription",messageContent.getDutyCauseDescription());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(Constants.PROGRAM_CONFIRM.equals(messageContent.getStatus())){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//格式化之后的消息
|
|
|
|
|
return StringUtils.format(messageBody, messageMap);
|
|
|
|
|
}
|
|
|
|
|