Commit 893e1d9c authored by tianbo's avatar tianbo

fix(jg): 修复检验检测机构名称设置逻辑及SQL查询条件

- 注释掉检验检测机构名称自动设置的相关代码逻辑 - 在SQL查询条件中增加监管机构代码的过滤条件以支持监察处置单位可查看使用登记单据数据
parent f9be4eaa
......@@ -425,7 +425,11 @@
<choose>
<when test="client == 'jgAudit'">
AND (fu.receive_company_code = #{dto.receiveCompanyCode}
OR fu.transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
OR fu.transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%')
<if test="dto.supervisionOrgCode != null and dto.supervisionOrgCode != '50'">
OR (fu.reg_type = '2' AND fu.supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%'))
</if>
)
</when>
<otherwise>
<if test="dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''">
......@@ -673,7 +677,11 @@
<choose>
<when test="client == 'jgAudit'">
AND (ur.receive_company_code = #{dto.receiveCompanyCode}
OR ur.transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
OR ur.transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%')
<if test="dto.supervisionOrgCode != null and dto.supervisionOrgCode != '50'">
OR (ur.reg_type = '2' AND ur.supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%'))
</if>
)
</when>
<otherwise>
<if test="dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''">
......
......@@ -3666,10 +3666,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} else if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory)) {
//更新时 固定式压力容器(2100)和 气瓶(2300)可以更新检验检测信息
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
List<Map<String, Object>> inspectionAndTestingInstitutions = commonService.getUnitListByType("inspection", "gasCylindersForCars", false);
Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap());
inspectionDetectionInfo.setInspectOrgName((String) mapOrDefault.getOrDefault("useUnit", inspectionDetectionInfo.getInspectOrgName()));
// List<Map<String, Object>> inspectionAndTestingInstitutions = commonService.getUnitListByType("inspection", "gasCylindersForCars", false);
// Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
// Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap());
// inspectionDetectionInfo.setInspectOrgName((String) mapOrDefault.getOrDefault("useUnit", inspectionDetectionInfo.getInspectOrgName()));
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
if (inspectionDetectionInfo.getNextInspectDate() != null) {
......
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