待办事项提交

master
赵嘉伟 4 years ago
parent 257710c268
commit 63b82d900a

@ -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
@ -321,7 +324,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
@Override
public List<AbnormalBillDto> backLog(AbnormalBillDto abnormalBillDto) {
String user = CommonMethods.getUser();
String user = "CJN";
String site = CommonMethods.getSite();
List<UserGroup> userGroupList = userGroupMapper.findUserGroupListByUser(site, user);
//判断该用户组中有没有administrator,如果有的话就等于null
@ -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);
}

@ -964,25 +964,46 @@
</if>
<choose>
<when test="userGroupList != null and userGroupList.size != 0">
AND (ZAB.REPORT_SEND_USER_GROUP IN
AND ZAB.REPORT_SEND_USER_GROUP IN
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
UPPER(#{item.userGroup})
</foreach>
OR
ZAB.CANCEL_SEND_USER_GROUP IN
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
UPPER(#{item.userGroup})
</foreach>
OR
ZABD.DUTY_SEND_USER_GROUP IN
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
UPPER(#{item.userGroup})
</foreach>
OR
ZABD.RESOLVE_SEND_USER_GROUP IN
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
UPPER(#{item.userGroup})
</foreach>)
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'X' AND ZAB.REPORT_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'X'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'Q' AND ZAB.CANCEL_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'Q'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'J' AND ZABD.DUTY_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'J'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'F' AND ZABD.RESOLVE_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'F'-->
<!-- END)-->
</when>
<otherwise>
<if test="userGroupList == null">

Loading…
Cancel
Save