diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java index c95599b1..1a85fc9b 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java @@ -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 backLog(AbnormalBillDto abnormalBillDto) { - String user = CommonMethods.getUser(); + String user = "CJN"; String site = CommonMethods.getSite(); List userGroupList = userGroupMapper.findUserGroupListByUser(site, user); //判断该用户组中有没有administrator,如果有的话就等于null @@ -1086,6 +1089,56 @@ public class AbnormalBillServiceImpl extends ServiceImpl 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 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 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 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); } diff --git a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml index 189c2dfd..2ceb97ef 100644 --- a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml +++ b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml @@ -964,25 +964,46 @@ - AND (ZAB.REPORT_SEND_USER_GROUP IN + AND ZAB.REPORT_SEND_USER_GROUP IN UPPER(#{item.userGroup}) - OR - ZAB.CANCEL_SEND_USER_GROUP IN - - UPPER(#{item.userGroup}) - - OR - ZABD.DUTY_SEND_USER_GROUP IN - - UPPER(#{item.userGroup}) - - OR - ZABD.RESOLVE_SEND_USER_GROUP IN - - UPPER(#{item.userGroup}) - ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +