Commit 67a27385 authored by suhuiguang's avatar suhuiguang

fix(jyjc): 报检规则4.0开发

1.去掉自建机构
parent cddb32a1
...@@ -252,7 +252,7 @@ public class RuleActionHandler { ...@@ -252,7 +252,7 @@ public class RuleActionHandler {
.collect(Collectors.toSet()); .collect(Collectors.toSet());
// 需要匹配核准项目时,将符合核准项目要求的单位code和指定的单位code取交集,否则直接符合指定的机构 // 需要匹配核准项目时,将符合核准项目要求的单位code和指定的单位code取交集,否则直接符合指定的机构
List<String> designatedUnitMatch = isMatchItem ? Arrays.stream(defaultInspectionCode.split(",")).filter(unitCodes::contains).collect(Collectors.toList()) : Arrays.asList(defaultInspectionCode.split(",")); List<String> designatedUnitMatch = isMatchItem ? Arrays.stream(defaultInspectionCode.split(",")).filter(unitCodes::contains).collect(Collectors.toList()) : Arrays.asList(defaultInspectionCode.split(","));
matchEnterpriseInfos = tzBaseEnterpriseInfoMapper.getInspectionUnitListByCode(designatedUnitMatch, areaCode, openBizType); matchEnterpriseInfos = tzBaseEnterpriseInfoMapper.getInspectionUnitListByCodeNoZjjg(designatedUnitMatch, areaCode, openBizType);
// 返回下一步是否可不予返回,供下一节点审核时显示判断是否显示不予受理按钮,在提交时数据会写入到主表:true-必须处理,false-可不予受理 // 返回下一步是否可不予返回,供下一节点审核时显示判断是否显示不予受理按钮,在提交时数据会写入到主表:true-必须处理,false-可不予受理
this.setIsCanNoAccept(matchEnterpriseInfos, isMustAccept); this.setIsCanNoAccept(matchEnterpriseInfos, isMustAccept);
} }
...@@ -274,7 +274,7 @@ public class RuleActionHandler { ...@@ -274,7 +274,7 @@ public class RuleActionHandler {
List<TzBaseEnterpriseInfoDto> matchEnterpriseInfos = new ArrayList<>(); List<TzBaseEnterpriseInfoDto> matchEnterpriseInfos = new ArrayList<>();
// 按照资质 + areaCode,进行设备单位的筛选 // 按照资质 + areaCode,进行设备单位的筛选
if (!legalUnitCodes.isEmpty()) { if (!legalUnitCodes.isEmpty()) {
matchEnterpriseInfos = tzBaseEnterpriseInfoMapper.getInspectionUnitListByCode(legalUnitCodes, areaCode, openBizType); matchEnterpriseInfos = tzBaseEnterpriseInfoMapper.getInspectionUnitListByCodeNoZjjg(legalUnitCodes, areaCode, openBizType);
// 返回下一步是否可不予返回,供下一节点审核时显示判断是否显示不予受理按钮,在提交时数据会写入 // 返回下一步是否可不予返回,供下一节点审核时显示判断是否显示不予受理按钮,在提交时数据会写入
this.setIsCanNoAccept(matchEnterpriseInfos, isCanNoAccept); this.setIsCanNoAccept(matchEnterpriseInfos, isCanNoAccept);
} }
...@@ -291,7 +291,7 @@ public class RuleActionHandler { ...@@ -291,7 +291,7 @@ public class RuleActionHandler {
// 所有符合单位的code // 所有符合单位的code
Set<String> unitCodes = unitLicenceList.stream().map(TzBaseUnitLicence::getUnitCode).collect(Collectors.toSet()); Set<String> unitCodes = unitLicenceList.stream().map(TzBaseUnitLicence::getUnitCode).collect(Collectors.toSet());
// 不匹配核准项目时,不按照符合资质过滤,默认开通状态 // 不匹配核准项目时,不按照符合资质过滤,默认开通状态
List<TzBaseEnterpriseInfoDto> matchEnterpriseInfos = tzBaseEnterpriseInfoMapper.getInspectionUnitListByCode(isMatchItem ? new ArrayList<>(unitCodes) : null, areaCode, openBizType); List<TzBaseEnterpriseInfoDto> matchEnterpriseInfos = tzBaseEnterpriseInfoMapper.getInspectionUnitListByCodeNoZjjg(isMatchItem ? new ArrayList<>(unitCodes) : null, areaCode, openBizType);
// 返回下一步是否可不予返回,供下一节点审核时显示判断是否显示不予受理按钮,在提交时数据会写入到主表:true-必须处理,false-可不予受理 // 返回下一步是否可不予返回,供下一节点审核时显示判断是否显示不予受理按钮,在提交时数据会写入到主表:true-必须处理,false-可不予受理
this.setIsCanNoAccept(matchEnterpriseInfos, isCanNoAccept); this.setIsCanNoAccept(matchEnterpriseInfos, isCanNoAccept);
return matchEnterpriseInfos; return matchEnterpriseInfos;
......
...@@ -179,6 +179,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -179,6 +179,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Resource @Resource
private EquipCategoryTypeHandler equipCategoryTypeHandler; private EquipCategoryTypeHandler equipCategoryTypeHandler;
@Autowired
private JyjcInspectionHistoryServiceImpl jyjcInspectionHistoryServiceImpl;
@NotNull @NotNull
...@@ -503,6 +505,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -503,6 +505,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(seq); jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(seq);
jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(seq); jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(seq);
jyjcInspectionApplicationPushLogService.getBaseMapper().deleteByApplicationSeq(seq); jyjcInspectionApplicationPushLogService.getBaseMapper().deleteByApplicationSeq(seq);
jyjcInspectionHistoryServiceImpl.remove(new LambdaQueryWrapper<JyjcInspectionHistory>().eq(JyjcInspectionHistory::getSSeq, sequenceNbr));
} }
return true; return true;
} }
......
...@@ -70,6 +70,15 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -70,6 +70,15 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List<TzBaseEnterpriseInfoDto> getInspectionUnitListByCode(@Param("list") List<String> codes, @Param("city") String city, @Param("openBizType") String openBizType); List<TzBaseEnterpriseInfoDto> getInspectionUnitListByCode(@Param("list") List<String> codes, @Param("city") String city, @Param("openBizType") String openBizType);
/** /**
* 查询非自检机构的单位
* @param codes 单位code
* @param city 开通区县
* @param openBizType 开通业务类型
* @return 非自检机构开通的单位
*/
List<TzBaseEnterpriseInfoDto> getInspectionUnitListByCodeNoZjjg(@Param("list") List<String> codes, @Param("city") String city, @Param("openBizType") String openBizType);
/**
* 根据ID查找企业详情信息 * 根据ID查找企业详情信息
* *
* @param sequenceNbr sequenceNbr * @param sequenceNbr sequenceNbr
......
...@@ -290,6 +290,22 @@ ...@@ -290,6 +290,22 @@
and tjoa.detection_region like concat('%',#{city},'%') and tjoa.detection_region like concat('%',#{city},'%')
</if> </if>
</select> </select>
<select id="getInspectionUnitListByCodeNoZjjg" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto">
<include refid="unit-list-info" />
INNER JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
AND tjoa.status = '已完成'
and tjoa.open_biz_type = #{openBizType}
and tjoa.agency_classify != 'JYJGFL_ZJJG'
<if test="list !=null and list.size()>0">
AND info.use_code in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="city != null and city != ''">
and tjoa.detection_region like concat('%',#{city},'%')
</if>
</select>
<select id="selectBySeq" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"> <select id="selectBySeq" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo">
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr} select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
</select> </select>
......
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