diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java index 5c13c373..439a4590 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java @@ -3,9 +3,12 @@ package com.zcloud.service.highriskwork.impl; import java.util.Date; import java.util.List; +import com.zcloud.entity.system.Dictionaries; import com.zcloud.service.highriskwork.HotWorkApplicationDelayedService; import com.zcloud.service.highriskwork.HotWorkApplicationUserService; +import com.zcloud.service.system.DictionariesService; import com.zcloud.util.DateUtil; +import com.zcloud.util.Tools; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -30,6 +33,8 @@ public class HotWorkApplicationServiceImpl implements HotWorkApplicationService{ private HotWorkApplicationUserService hotWorkApplicationUserService; @Autowired private HotWorkApplicationDelayedService hotWorkApplicationDelayedService; + @Autowired + private DictionariesService dictionariesService; /**新增 * @param pd @@ -87,7 +92,21 @@ public class HotWorkApplicationServiceImpl implements HotWorkApplicationService{ * @throws Exception */ public PageData findById(PageData pd)throws Exception{ - return hotworkapplicationMapper.findById(pd); + PageData data = hotworkapplicationMapper.findById(pd); + String workMethodId = data.getString("HOT_WORK_METHOD_ID"); + //动火方法 + if (Tools.notEmpty(workMethodId)) { + String[] split = workMethodId.split(","); + List dictionaries = dictionariesService.listSubDictByIds(split); + StringBuilder methodName = new StringBuilder(); + for (Dictionaries dictionary : dictionaries) { + methodName.append(dictionary.getNAME()).append(","); + } + methodName.deleteCharAt(methodName.length() - 1); + data.put("HOT_WORK_METHOD_NAME", methodName); + } + + return data; } /**批量删除 diff --git a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml index 2df76a17..1f51a337 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml @@ -155,13 +155,13 @@ select , u.NAME CREATORNAME, - d.NAME DEPARTMENTNAME, - p.name as HOT_WORK_METHOD_NAME + d.NAME DEPARTMENTNAME + from f left join sys_user u on f.CREATOR = u.USER_ID left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID - left join sys_dictionaries p on f.HOT_WORK_METHOD_ID = p.DICTIONARIES_ID + where f.HOTWORKAPPLICATION_ID = #{HOTWORKAPPLICATION_ID}