Commit 6f74f827 authored by suhuiguang's avatar suhuiguang

feat(已纳管设备无证时可编辑):已纳管设备调整

1.已纳管设备调整 2.技术参数整理
parent 23503f7a
...@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper; ...@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.dto.KeyValueDto; import com.yeejoin.amos.boot.biz.common.dto.KeyValueDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO; import com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO;
...@@ -314,5 +315,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> { ...@@ -314,5 +315,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
String queryUnitCreditCodeBySeq(String unitSeq); String queryUnitCreditCodeBySeq(String unitSeq);
String queryUnitNameByCreditCode(String unitCreditCode); String queryUnitNameByCreditCode(String unitCreditCode);
List<CountDto> countBizNumAfterUseRegBatchEquip(@Param("records") List<String> records);
List<CountDto> countBizNumAfterUseRegBatchProjectContraption(@Param("projectContraptionIds") List<Long> projectContraptionIds);
} }
...@@ -2543,6 +2543,7 @@ ...@@ -2543,6 +2543,7 @@
tzs_jg_change_registration_reform_eq b tzs_jg_change_registration_reform_eq b
where where
a.sequence_nbr = b.equip_transfer_id a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId}) and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废') and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
UNION all UNION all
...@@ -2553,6 +2554,7 @@ ...@@ -2553,6 +2554,7 @@
tzs_jg_change_registration_transfer_eq b tzs_jg_change_registration_transfer_eq b
where where
a.sequence_nbr = b.equip_transfer_id a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId}) and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废') and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
UNION all UNION all
...@@ -2563,6 +2565,7 @@ ...@@ -2563,6 +2565,7 @@
tzs_jg_change_registration_unit_eq b tzs_jg_change_registration_unit_eq b
where where
a.sequence_nbr = b.unit_change_registration_id a.sequence_nbr = b.unit_change_registration_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId}) and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废') and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
UNION all UNION all
...@@ -2573,6 +2576,7 @@ ...@@ -2573,6 +2576,7 @@
tzs_jg_scrap_cancel_eq b tzs_jg_scrap_cancel_eq b
where where
a.sequence_nbr = b.equip_transfer_id a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId}) and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废') and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
UNION all UNION all
...@@ -2586,6 +2590,7 @@ ...@@ -2586,6 +2590,7 @@
tzs_jg_change_registration_name n tzs_jg_change_registration_name n
where where
n.sequence_nbr = e.name_change_registration_id n.sequence_nbr = e.name_change_registration_id
and n.is_delete = 0
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne
where where
ne.record in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId}) ne.record in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
...@@ -2835,4 +2840,217 @@ ...@@ -2835,4 +2840,217 @@
<select id="queryUnitNameByCreditCode" resultType="java.lang.String"> <select id="queryUnitNameByCreditCode" resultType="java.lang.String">
select use_unit from tz_base_enterprise_info where use_unit_code = #{unitCreditCode} select use_unit from tz_base_enterprise_info where use_unit_code = #{unitCreditCode}
</select> </select>
<select id="countBizNumAfterUseRegBatchEquip" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
select
sum(inUseNumber) longValue,
record as keyStr
from (
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_use_registration a,
tzs_jg_use_registration_eq b
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_reform a,
tzs_jg_change_registration_reform_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_transfer a,
tzs_jg_change_registration_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_scrap_cancel a,
tzs_jg_scrap_cancel_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
ne.record
from
(SELECT
json_array_elements(e.equip_info)->>'SEQUENCE_NBR' AS record
FROM
tzs_jg_change_registration_name_eq e,
tzs_jg_change_registration_name n
where
n.sequence_nbr = e.name_change_registration_id
and n.is_delete = 0
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne
where
ne.record in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
group by ne.record
)
group by record
</select>
<select id="countBizNumAfterUseRegBatchProjectContraption" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
select
sum(inUseNumber) longValue,
projectContraptionId as keyStr
from (
select
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_use_registration a,
tzs_jg_use_registration_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
union all
select
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_maintain_notice a,
tzs_jg_maintain_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6616')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
select
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_reform_notice a,
tzs_jg_reform_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6616')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
SELECT
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_change_registration_reform a,
tzs_jg_change_registration_reform_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and ( a.audit_status <![CDATA[ <> ]]> '已作废' AND a.audit_status <![CDATA[ <> ]]> '已完成')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
SELECT
count(1) as inUseNumber,
b.project_contraption_id as projectContraptionId
from
tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and (a.status <![CDATA[ <> ]]> '已作废' AND a.status <![CDATA[ <> ]]> '已完成')
and a.is_delete = 0
and b.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by b.project_contraption_id
union all
SELECT
count(1) as inUseNumber,
pc.sequence_nbr as projectContraptionId
from
tzs_jg_change_registration_name_eq e,
tzs_jg_change_registration_name n,
tzs_jg_use_registration_manage m,
idx_biz_jg_project_contraption pc
where
n.sequence_nbr = e.name_change_registration_id
and e.certificate_seq = m.sequence_nbr
and n.is_delete = 0
and pc.use_registration_code = m.use_registration_code
and m.equ_list_code ='8000'
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废'
AND pc.sequence_nbr in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by pc.sequence_nbr
)
group by projectContraptionId
</select>
</mapper> </mapper>
...@@ -28,7 +28,7 @@ public class DiffUtils { ...@@ -28,7 +28,7 @@ public class DiffUtils {
public static boolean compare(String type, String newValue, String oldValue) { public static boolean compare(String type, String newValue, String oldValue) {
if (isNullOrEmpty(newValue) && isNullOrEmpty(oldValue)) return true; if (isNullOrEmpty(newValue) && isNullOrEmpty(oldValue)) return true;
if (isNullOrEmpty(newValue) || isNullOrEmpty(oldValue)) return true; if (isNullOrEmpty(newValue) || isNullOrEmpty(oldValue)) return false;
if (type == null) { if (type == null) {
return Objects.equals(newValue, oldValue); return Objects.equals(newValue, oldValue);
} }
......
...@@ -3192,4 +3192,14 @@ public class CommonServiceImpl implements ICommonService { ...@@ -3192,4 +3192,14 @@ public class CommonServiceImpl implements ICommonService {
result.put("dataQualityScore", String.valueOf(remindServiceImpl.getReminderLevel(bizId, businessTypeEnum.name()))); result.put("dataQualityScore", String.valueOf(remindServiceImpl.getReminderLevel(bizId, businessTypeEnum.name())));
} }
public static String genRegTypeByDataSource(String dataSource) {
if (dataSource.contains("jg_his_black")) {
return "2";
} else if (dataSource.contains("jg_his")) {
return "1";
} else {
return "0";
}
}
} }
\ No newline at end of file
...@@ -15,6 +15,8 @@ import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQu ...@@ -15,6 +15,8 @@ import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQu
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...@@ -24,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage; ...@@ -24,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum; import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum; import com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService; import com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService;
...@@ -135,6 +138,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -135,6 +138,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired @Autowired
private JgUseRegistrationManageServiceImpl registrationManageService; private JgUseRegistrationManageServiceImpl registrationManageService;
@Autowired
private CommonMapper commonMapper;
@Override @Override
public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) { public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) {
...@@ -348,7 +353,9 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -348,7 +353,9 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
IPage<IdxBizJgProjectContraption> pageList = queryWrapper.page(page); IPage<IdxBizJgProjectContraption> pageList = queryWrapper.page(page);
// 单位类型区分的企业还是监管 // 单位类型区分的企业还是监管
String companyType2 = CommonServiceImpl.getCompanyType(company); String companyType2 = CommonServiceImpl.getCompanyType(company);
if (!ValidationUtil.isEmpty(pageList.getRecords())) { if (!ValidationUtil.isEmpty(pageList.getRecords())) {
Map<String, Boolean> projectContraptionUseMap = getPidUseMap(pageList);
pageList.getRecords().forEach(record -> { pageList.getRecords().forEach(record -> {
BigDecimal pipelineLength = BigDecimal.valueOf(record.getPipelineLength()); BigDecimal pipelineLength = BigDecimal.valueOf(record.getPipelineLength());
BigDecimal roundedValue = pipelineLength.setScale(3, RoundingMode.HALF_UP); BigDecimal roundedValue = pipelineLength.setScale(3, RoundingMode.HALF_UP);
...@@ -362,6 +369,10 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -362,6 +369,10 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
.collect(Collectors.joining()) .collect(Collectors.joining())
); );
record.setCompanyType(companyType2); record.setCompanyType(companyType2);
// 来源类型:前端控制编辑按钮显示隐藏
record.setRegType(CommonServiceImpl.genRegTypeByDataSource(record.getDataSource()));
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
record.setHappenAfterBiz(projectContraptionUseMap.getOrDefault(record.getProjectContraptionNo(), false));
}); });
List<Long> projectContraptionIdList = pageList.getRecords().stream().map(IdxBizJgProjectContraption::getSequenceNbr).collect(Collectors.toList()); List<Long> projectContraptionIdList = pageList.getRecords().stream().map(IdxBizJgProjectContraption::getSequenceNbr).collect(Collectors.toList());
...@@ -375,6 +386,16 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -375,6 +386,16 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
return pageList; return pageList;
} }
/**
* 按照装置id查询 是否做过后续业务
* @param pageList 装置集合
* @return key-装置id;value-true(发生后续业务)、false(未发生后续业务)
*/
private Map<String, Boolean> getPidUseMap(IPage<IdxBizJgProjectContraption> pageList) {
List<CountDto> useCount = commonMapper.countBizNumAfterUseRegBatchProjectContraption(pageList.getRecords().stream().map(BaseEntity::getSequenceNbr).collect(Collectors.toList()));
return useCount.stream().collect(Collectors.toMap(CountDto::getKeyStr, e->e.getLongValue() > 0));
}
private SFunction<IdxBizJgProjectContraption, ?> resolveField(String field) { private SFunction<IdxBizJgProjectContraption, ?> resolveField(String field) {
switch (field) { switch (field) {
......
...@@ -19,6 +19,7 @@ import com.google.common.base.Joiner; ...@@ -19,6 +19,7 @@ import com.google.common.base.Joiner;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.*; import com.yeejoin.amos.boot.biz.common.utils.*;
...@@ -2850,6 +2851,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2850,6 +2851,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
) )
); );
} }
// 获取是否发生过后续业务集合
Map<String, Boolean> afterBizMap = getHasHappenAfterBiz(equIds);
// 更新设备使用情况和设备地址 // 更新设备使用情况和设备地址
for (JSONObject item : list) { for (JSONObject item : list) {
item.put("REC_DATE", Instant.ofEpochMilli(Long.parseLong(item.getString("REC_DATE"))) item.put("REC_DATE", Instant.ofEpochMilli(Long.parseLong(item.getString("REC_DATE")))
...@@ -2861,6 +2866,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2861,6 +2866,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
item.put("CAN_DELETE", this.checkEquipIsCanDelete(item.getString(SEQUENCE_NBR))); item.put("CAN_DELETE", this.checkEquipIsCanDelete(item.getString(SEQUENCE_NBR)));
// 单位类型区分是监管还是企业 // 单位类型区分是监管还是企业
item.put("companyType", companyLevel); item.put("companyType", companyLevel);
// 区分新增设备、历史有证设备、历史无证设备,与使用登记一致:0-新设备、1-历史有证设备、2-历史无证设备
item.put("regType", CommonServiceImpl.genRegTypeByDataSource(item.getString(DATA_SOURCE)));
// 是否发生后续业务,前端控制是否可编辑
item.put(BaseUseRegisterResultData.HAPPEN_AFTER_BIZ, afterBizMap.getOrDefault(item.getString(SEQUENCE_NBR), false));
item.put("DATA_QUALITY_SCORE", commonServiceImpl.castDataQualityScore2Name(item.getString(DATA_QUALITY_SCORE), item.getBoolean(IS_INTO_MANAGEMENT))); item.put("DATA_QUALITY_SCORE", commonServiceImpl.castDataQualityScore2Name(item.getString(DATA_QUALITY_SCORE), item.getBoolean(IS_INTO_MANAGEMENT)));
} }
} }
...@@ -2873,6 +2882,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2873,6 +2882,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return result; return result;
} }
private Map<String, Boolean> getHasHappenAfterBiz(List<String> equIds) {
List<CountDto> countDtoList = commonMapper.countBizNumAfterUseRegBatchEquip(equIds);
return countDtoList.stream().collect(Collectors.toMap(CountDto::getKeyStr, e-> e.getLongValue() > 0));
}
private String getCompanyLevel(JSONObject company) { private String getCompanyLevel(JSONObject company) {
if (BaseController.COMPANY_TYPE_COMPANY.equals(company.getString("level"))) { if (BaseController.COMPANY_TYPE_COMPANY.equals(company.getString("level"))) {
......
...@@ -319,5 +319,19 @@ public class IdxBizJgProjectContraption extends BaseEntity { ...@@ -319,5 +319,19 @@ public class IdxBizJgProjectContraption extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String companyType; private String companyType;
/**
* 是否发生后续业务
*/
@TableField(exist = false)
private Boolean happenAfterBiz;
/**
* 登记类型:0-新增;1-历史有证;2-历史无证
*/
@TableField(exist = false)
private String regType;
} }
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