Commit 0418506c authored by 刘林's avatar 刘林

fix(jg):维修告知bug修改

parent 05e96580
......@@ -42,6 +42,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
......@@ -156,6 +157,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
private JgCertificateChangeRecordServiceImpl certificateChangeRecordService;
@Autowired
private JgCertificateChangeRecordEqServiceImpl jgCertificateChangeRecordEqServiceImpl;
@Autowired
private IdxBizJgProjectContraptionMapper idxBizJgProjectContraptionMapper;
/**
* 根据sequenceNbr查询
......@@ -183,6 +186,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainInfo.put("county", ObjectUtils.isEmpty(notice.getCounty()) ? null : notice.getCounty() + "_" + notice.getCountyName());
maintainInfo.put("fullAddress", notice.getProvinceName() + notice.getCityName() + notice.getCounty() + notice.getStreetName() + notice.getAddress());
maintainInfo.put("projectContraption", notice.getProjectContraption());
maintainInfo.put("projectContraptionId", notice.getProjectContraptionId());
maintainInfo.put("EQU_LIST_CODE", notice.getEquListCode());
maintainInfo.put("EQU_CATEGORY_CODE", notice.getEquCategory());
maintainInfo.put("QUERY_TYPE", "GZ_WX");
......@@ -274,11 +278,18 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
private void setNewEquipInfo(Long sequenceNbr, Map<String, Object> maintainInfo) {
List<JgMaintainNoticeEq> jgMaintainNoticeEq = jgMaintainNoticeEqMapper.selectList(new LambdaQueryWrapper<JgMaintainNoticeEq>().eq(JgMaintainNoticeEq::getEquipTransferId, sequenceNbr));
List<String> ids = jgMaintainNoticeEq.stream().map(JgMaintainNoticeEq::getEquId).collect(Collectors.toList());
List<String> equIds = jgMaintainNoticeEqMapper.selectList(
new LambdaQueryWrapper<JgMaintainNoticeEq>()
.eq(JgMaintainNoticeEq::getEquipTransferId, sequenceNbr))
.stream()
.map(JgMaintainNoticeEq::getEquId)
.collect(Collectors.toList());
String equListCode = String.valueOf(maintainInfo.get("EQU_LIST_CODE"));
String projectContraptionId = String.valueOf(maintainInfo.get("projectContraptionId"));
List<Map<String, Object>> deviceList = EquipmentClassifityEnum.YLGD.getCode().equals(equListCode)
? idxBizJgProjectContraptionMapper.selectPipelineList(projectContraptionId)
: getEquipListMaps(esEquipmentCategory.findAllById(equIds));
Iterable<ESEquipmentCategoryDto> esEquipmentCategoryDtos = esEquipmentCategory.findAllById(ids);
List<Map<String, Object>> deviceList = getEquipListMaps(esEquipmentCategoryDtos);
maintainInfo.put("deviceList", deviceList);
}
......
......@@ -107,4 +107,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
* @return
*/
List<Map<String, Object>> selectPipelineListPage(@Param("sequenceNbr") String sequenceNbr, @Param("current") int current, @Param("size") int size);
List<Map<String, Object>> selectPipelineList(@Param("sequenceNbr") String sequenceNbr);
}
\ No newline at end of file
......@@ -206,7 +206,7 @@
limit #{current},#{size}
</select>
<select id="selectPipelineListPage" resultType="java.util.Map">
<sql id="Base_Column_List">
SELECT
ibjpc.SEQUENCE_NBR,
ibjpc.SEQUENCE_NBR AS PROJECT_CONTRAPTION_ID,
......@@ -233,12 +233,25 @@
ibjui.EQU_STATE,
ibjtpp."PIPE_NAME" AS PRODUCT_NAME,
ibjui.record
</sql>
<select id="selectPipelineListPage" resultType="java.util.Map">
<include refid="Base_Column_List" />
FROM IDX_BIZ_JG_PROJECT_CONTRAPTION ibjpc
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.PROJECT_CONTRAPTION_ID = ibjpc.SEQUENCE_NBR
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
WHERE ibjpc.SEQUENCE_NBR = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
LIMIT #{current}, #{size}
</select>
<select id="selectPipelineList" resultType="java.util.Map">
<include refid="Base_Column_List" />
FROM IDX_BIZ_JG_PROJECT_CONTRAPTION ibjpc
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.PROJECT_CONTRAPTION_ID = ibjpc.SEQUENCE_NBR
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
WHERE ibjpc.SEQUENCE_NBR = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
limit #{current},#{size}
</select>
<select id="selectEquipCount" resultType="java.util.Map">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment