Commit 444a8266 authored by 麻笑宇's avatar 麻笑宇

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents e8b7dc41 5eb3e947
package com.yeejoin.amos.boot.module.jg.api.enums;
import java.util.HashMap;
import java.util.Map;
/**
* 问题状态
*/
public enum ProblemStatusEnum {
NORMAL("正常", "0", "已处理"),
ABNORMAL("异常", "1", "未处理");
private String name;
private String code;
private String desc;
ProblemStatusEnum(String name, String code, String desc) {
this.name = name;
this.code = code;
this.desc = desc;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public static Map<String, String> getNameByCode = new HashMap<>();
public static Map<String, String> getCodeByName = new HashMap<>();
public static Map<String, String> getDescByCode = new HashMap<>();
public static Map<String, String> getNameByDesc = new HashMap<>();
static {
for (ProblemStatusEnum e : ProblemStatusEnum.values()) {
getNameByCode.put(e.code, e.name);
getNameByDesc.put(e.desc, e.name);
getDescByCode.put(e.code, e.desc);
getCodeByName.put(e.name, e.code);
}
}
}
package com.yeejoin.amos.boot.module.jg.api.mapper; package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
...@@ -44,4 +45,5 @@ public interface JgMaintainNoticeMapper extends CustomBaseMapper<JgMaintainNotic ...@@ -44,4 +45,5 @@ public interface JgMaintainNoticeMapper extends CustomBaseMapper<JgMaintainNotic
Map<String, Object> getEquipInfoByRecord(String record); Map<String, Object> getEquipInfoByRecord(String record);
List<CompanyEquipCountDto> queryForFlowingEquipList();
} }
package com.yeejoin.amos.boot.module.jg.api.mapper; package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
...@@ -40,4 +41,6 @@ public interface JgReformNoticeMapper extends CustomBaseMapper<JgReformNotice> { ...@@ -40,4 +41,6 @@ public interface JgReformNoticeMapper extends CustomBaseMapper<JgReformNotice> {
List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr); List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr);
void updatePromoter(@Param("id") Long id); void updatePromoter(@Param("id") Long id);
List<CompanyEquipCountDto> queryForFlowingEquipList();
} }
package com.yeejoin.amos.boot.module.jg.api.mapper; package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
...@@ -26,4 +27,6 @@ public interface JgTransferNoticeMapper extends CustomBaseMapper<JgTransferNotic ...@@ -26,4 +27,6 @@ public interface JgTransferNoticeMapper extends CustomBaseMapper<JgTransferNotic
@MapKey("sequenceNbr") @MapKey("sequenceNbr")
List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr); List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr);
List<CompanyEquipCountDto> queryForFlowingEquipList();
} }
...@@ -274,5 +274,16 @@ ...@@ -274,5 +274,16 @@
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = oi.record LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = oi.record
WHERE oi.record = #{record} ORDER BY oi."rec_date" DESC LIMIT 1 WHERE oi.record = #{record} ORDER BY oi."rec_date" DESC LIMIT 1
</select> </select>
<select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto">
select
a.install_unit_credit_code as companyCode,
group_concat(b.equ_id) as records
from
tzs_jg_maintain_notice a,
tzs_jg_maintain_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.notice_status not in('6614','6615','6610','6617','6616')
GROUP BY a.install_unit_credit_code
</select>
</mapper> </mapper>
...@@ -203,4 +203,16 @@ ...@@ -203,4 +203,16 @@
set promoter = null set promoter = null
where sequence_nbr = #{id} where sequence_nbr = #{id}
</update> </update>
<select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto">
select
a.install_unit_credit_code as companyCode,
group_concat(b.equ_id) as records
from
tzs_jg_reform_notice a,
tzs_jg_reform_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.notice_status not in('6614','6615','6610','6617','6616')
GROUP BY a.install_unit_credit_code
</select>
</mapper> </mapper>
...@@ -217,4 +217,16 @@ ...@@ -217,4 +217,16 @@
tjtn.sequence_nbr = #{sequenceNbr} tjtn.sequence_nbr = #{sequenceNbr}
LIMIT 1 LIMIT 1
</select> </select>
<select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto">
select
a.install_unit_credit_code as companyCode,
group_concat(b.equ_id) as records
from
tzs_jg_transfer_notice a,
tzs_jg_transfer_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.notice_status not in('6614','6615','6610','6617','6616')
GROUP BY a.install_unit_credit_code
</select>
</mapper> </mapper>
...@@ -28,10 +28,12 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentInfoDto; ...@@ -28,10 +28,12 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentInfoDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecord; import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecord;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecordEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecordEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.entity.SafetyProblemTracing;
import com.yeejoin.amos.boot.module.jg.api.enums.*; import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
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.mapper.SafetyProblemTracingMapper;
import com.yeejoin.amos.boot.module.jg.biz.config.PressureVesselListener; import com.yeejoin.amos.boot.module.jg.biz.config.PressureVesselListener;
import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext; import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
...@@ -654,7 +656,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -654,7 +656,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
return objMap; return objMap;
} }
@Autowired
private SafetyProblemTracingMapper safetyProblemTracingMapper;
/** /**
* 查询设备基本信息 * 查询设备基本信息
* *
...@@ -669,6 +672,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -669,6 +672,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String county = ""; String county = "";
String street = ""; String street = "";
String fullAddress = ""; String fullAddress = "";
// 设备问题信息(大屏二级页面使用)
LambdaQueryWrapper<SafetyProblemTracing> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(SafetyProblemTracing::getSourceId, record);
lambdaQueryWrapper.orderByDesc(SafetyProblemTracing::getRecDate);
List<SafetyProblemTracing> safetyProblemTracings = safetyProblemTracingMapper.selectList(lambdaQueryWrapper);
if (!ObjectUtils.isEmpty(safetyProblemTracings)) {
objMap.put("problemStatus", ProblemStatusEnum.getNameByDesc.get(safetyProblemTracings.get(0).getProblemStatus()));
objMap.put("problemTime", safetyProblemTracings.get(0).getProblemTime());
}
// 使用信息 // 使用信息
IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.getOneData(record); IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(useInfo)) { if (!ValidationUtil.isEmpty(useInfo)) {
......
...@@ -96,6 +96,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -96,6 +96,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private static final String SUBMIT_TYPE_FLOW = "1"; private static final String SUBMIT_TYPE_FLOW = "1";
private static final String PROCESS_DEFINITION_KEY = "installationNotificationNew"; private static final String PROCESS_DEFINITION_KEY = "installationNotificationNew";
private static final String PROCESS_INSTALL_NOTICE_KEY = "installNotice";
private static final String TABLE_PAGE_ID = "1734141426742095873"; private static final String TABLE_PAGE_ID = "1734141426742095873";
private static final String CONSTRUCTION_TYPE = "SGLX"; private static final String CONSTRUCTION_TYPE = "SGLX";
private static final String CONSTRUCTION_TYPE_NAME = "安装"; private static final String CONSTRUCTION_TYPE_NAME = "安装";
...@@ -431,7 +433,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -431,7 +433,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
LambdaQueryWrapper<JgInstallationNoticeEq> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgInstallationNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgInstallationNoticeEq::getEquipTransferId, jgInstallationNotice.getSequenceNbr()); queryWrapper.eq(JgInstallationNoticeEq::getEquipTransferId, jgInstallationNotice.getSequenceNbr());
JgInstallationNoticeEq jgRelationEquip = jgInstallationNoticeEqMapper.selectOne(queryWrapper); JgInstallationNoticeEq jgRelationEquip = jgInstallationNoticeEqMapper.selectOne(queryWrapper);
EquipUsedCheckStrategyContext.getUsedStrategy("installNotice").equipRepeatUsedCheck(jgRelationEquip.getEquId(), jgInstallationNotice.getInstallUnitCreditCode()); EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_INSTALL_NOTICE_KEY).equipRepeatUsedCheck(jgRelationEquip.getEquId(), jgInstallationNotice.getInstallUnitCreditCode());
} }
} }
...@@ -648,12 +650,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -648,12 +650,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private void rollBackForDelRedisData() { private void rollBackForDelRedisData() {
FlowingEquipRedisContext.getContext().forEach(e -> { FlowingEquipRedisContext.getContext().forEach(e -> {
EquipUsedCheckStrategyContext.getUsedStrategy("installNotice").delDataForCheckWithKey(e.getData(), e.getRedisKey()); EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_INSTALL_NOTICE_KEY).delDataForCheckWithKey(e.getData(), e.getRedisKey());
}); });
} }
private void repeatUsedEquipCheck(List<Map<String, Object>> equipList, String companyCode) { private void repeatUsedEquipCheck(List<Map<String, Object>> equipList, String companyCode) {
equipList.forEach(equipMap -> EquipUsedCheckStrategyContext.getUsedStrategy("installNotice").equipRepeatUsedCheck(String.valueOf(equipMap.get("SEQUENCE_NBR")), companyCode)); equipList.forEach(equipMap -> EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_INSTALL_NOTICE_KEY).equipRepeatUsedCheck(String.valueOf(equipMap.get("SEQUENCE_NBR")), companyCode));
} }
private void updateRedisBatch(List<JgInstallationNotice> jgInstallationNotices) { private void updateRedisBatch(List<JgInstallationNotice> jgInstallationNotices) {
...@@ -955,7 +957,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -955,7 +957,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
LambdaQueryWrapper<JgInstallationNoticeEq> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgInstallationNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgInstallationNoticeEq::getEquipTransferId, jgInstallationNotice.getSequenceNbr()); queryWrapper.eq(JgInstallationNoticeEq::getEquipTransferId, jgInstallationNotice.getSequenceNbr());
JgInstallationNoticeEq jgRelationEquip = jgInstallationNoticeEqMapper.selectOne(queryWrapper); JgInstallationNoticeEq jgRelationEquip = jgInstallationNoticeEqMapper.selectOne(queryWrapper);
EquipUsedCheckStrategyContext.getUsedStrategy("installNotice").delDataForCheckEquipRepeatUsed(Collections.singletonList(jgRelationEquip.getEquId()), jgInstallationNotice.getInstallUnitCreditCode()); EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_INSTALL_NOTICE_KEY).delDataForCheckEquipRepeatUsed(Collections.singletonList(jgRelationEquip.getEquId()), jgInstallationNotice.getInstallUnitCreditCode());
} }
@GlobalTransactional(rollbackFor = Exception.class) @GlobalTransactional(rollbackFor = Exception.class)
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author Administrator
*/
@Component
@Slf4j
public class MaintainNoticeEquipUsedCheckImpl extends BaseEquipUsedCheckService {
private RedissonClient redissonClient;
private String bizType = "maintainNotice";
private JgMaintainNoticeMapper maintainNoticeMapper;
public MaintainNoticeEquipUsedCheckImpl(RedissonClient redissonClient, JgMaintainNoticeMapper maintainNoticeMapper) {
this.redissonClient = redissonClient;
this.maintainNoticeMapper = maintainNoticeMapper;
}
@Override
public RedissonClient getRedisClient() {
return redissonClient;
}
@Override
public String getApplyBizType() {
return bizType;
}
@Override
public void init() {
// 初始化已经完成或者在流程中安装告知的设备数据
List<CompanyEquipCountDto> companyEquipCountDtos = maintainNoticeMapper.queryForFlowingEquipList();
companyEquipCountDtos.forEach(c -> {
RBucket<Set<String>> rBucket = redissonClient.getBucket(getFlowingEquipRedisKey(c.getCompanyCode(), bizType));
rBucket.set(Arrays.stream(c.getRecords().split(",")).collect(Collectors.toSet()));
});
}
}
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author Administrator
*/
@Component
@Slf4j
public class ReformNoticeEquipUsedCheckImpl extends BaseEquipUsedCheckService {
private RedissonClient redissonClient;
private String bizType = "renovationNoticeNew";
private JgReformNoticeMapper reformNoticeMapper;
public ReformNoticeEquipUsedCheckImpl(RedissonClient redissonClient, JgReformNoticeMapper reformNoticeMapper) {
this.redissonClient = redissonClient;
this.reformNoticeMapper = reformNoticeMapper;
}
@Override
public RedissonClient getRedisClient() {
return redissonClient;
}
@Override
public String getApplyBizType() {
return bizType;
}
@Override
public void init() {
// 初始化已经完成或者在流程中安装告知的设备数据
List<CompanyEquipCountDto> companyEquipCountDtos = reformNoticeMapper.queryForFlowingEquipList();
companyEquipCountDtos.forEach(c -> {
RBucket<Set<String>> rBucket = redissonClient.getBucket(getFlowingEquipRedisKey(c.getCompanyCode(), bizType));
rBucket.set(Arrays.stream(c.getRecords().split(",")).collect(Collectors.toSet()));
});
}
}
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author Administrator
*/
@Component
@Slf4j
public class TransferNoticeEquipUsedCheckImpl extends BaseEquipUsedCheckService {
private RedissonClient redissonClient;
private String bizType = "transferNotice";
private JgTransferNoticeMapper noticeMapper;
public TransferNoticeEquipUsedCheckImpl(RedissonClient redissonClient, JgTransferNoticeMapper noticeMapper) {
this.redissonClient = redissonClient;
this.noticeMapper = noticeMapper;
}
@Override
public RedissonClient getRedisClient() {
return redissonClient;
}
@Override
public String getApplyBizType() {
return bizType;
}
@Override
public void init() {
// 初始化已经完成或者在流程中安装告知的设备数据
List<CompanyEquipCountDto> companyEquipCountDtos = noticeMapper.queryForFlowingEquipList();
companyEquipCountDtos.forEach(c -> {
RBucket<Set<String>> rBucket = redissonClient.getBucket(getFlowingEquipRedisKey(c.getCompanyCode(), bizType));
rBucket.set(Arrays.stream(c.getRecords().split(",")).collect(Collectors.toSet()));
});
}
}
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
"name": "移装告知", "name": "移装告知",
"code": "GZ_YZ", "code": "GZ_YZ",
"image": "upload/tzs/common/image/移装告知.png", "image": "upload/tzs/common/image/移装告知.png",
"disabled": true "disabled": false
} }
], ],
"DJGL": [ "DJGL": [
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"name": "移装变更登记", "name": "移装变更登记",
"code": "DJ_YZ", "code": "DJ_YZ",
"image": "upload/tzs/common/image/移装变更登记.png", "image": "upload/tzs/common/image/移装变更登记.png",
"disabled": true "disabled": false
}, },
{ {
"name": "单位变更登记", "name": "单位变更登记",
...@@ -88,16 +88,16 @@ ...@@ -88,16 +88,16 @@
"image": "upload/tzs/common/image/注销报废.png" "image": "upload/tzs/common/image/注销报废.png"
}, },
{ {
"name": "设备启用", "name": "启用",
"code": "SB_QY", "code": "SB_QY",
"image": "upload/tzs/common/image/设备启用.png", "image": "upload/tzs/common/image/设备启用.png",
"disabled": true "disabled": false
}, },
{ {
"name": "设备停用", "name": "停用",
"code": "SB_TY", "code": "SB_TY",
"image": "upload/tzs/common/image/设备停用.png", "image": "upload/tzs/common/image/设备停用.png",
"disabled": true "disabled": false
} }
], ],
"XZSB": [ "XZSB": [
......
...@@ -65,4 +65,12 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti ...@@ -65,4 +65,12 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
* @return 统计信息 * @return 统计信息
*/ */
List<CountDto> queryAllPendingResultInspectApp(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto); List<CountDto> queryAllPendingResultInspectApp(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto);
/**
* 按照8大类,查询指定区域下的报检数量、待检数量
* @param orgCode 指定区域对应的公司
* @param dpFilterParamDto 时间过滤条件
* @return List<CountDto>
*/
List<CountDto> queryAppByEquListForDP(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto);
} }
...@@ -242,6 +242,37 @@ ...@@ -242,6 +242,37 @@
a.inspection_unit_code= b.use_unit_code a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616' and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616'
and EXISTS (select 1 from tz_jyjc_inspection_result r where r.result_status='1' and a.application_no = r.application_no) and EXISTS (select 1 from tz_jyjc_inspection_result r where r.result_status='1' and a.application_no = r.application_no)
and date_ge(CAST(a.application_date as date),#{dto.beginDate}) and date_le(CAST(a.application_date as date),#{dto.endDate}) and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_le(CAST(a.accept_date as date),#{dto.endDate})
group by a.inspection_type
</select>
<select id="queryAppByEquListForDP" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
-- 8大类 待检数量
SELECT
count(1) as longValue,
a.equip_classify as keyStr,
'pending' as label
FROM
tz_jyjc_inspection_application a,
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616'
and EXISTS (select 1 from tz_jyjc_inspection_result r where r.result_status='1' and a.application_no = r.application_no)
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_le(CAST(a.accept_date as date),#{dto.endDate})
GROUP BY a.equip_classify
-- 8大类 报检数量统计
union all
SELECT
count(1) as longValue,
a.equip_classify as keyStr,
'reporting' as label
FROM
tz_jyjc_inspection_application a,
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status != '6610' and a.status != '6615'
and date_ge(CAST(a.application_date as date),#{dto.beginDate}) and date_le(CAST(a.application_date as date),#{dto.endDate})
GROUP BY a.equip_classify
</select> </select>
</mapper> </mapper>
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
<groupId>net.javacrumbs.shedlock</groupId> <groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-redis-spring</artifactId> <artifactId>shedlock-provider-redis-spring</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>visual-feign-morphic</artifactId>
<version>1.9.0-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
package com.yeejoin.amos.boot.module.jyjc.biz.config;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
/**
* @Author: xl
* @Description:
* @Date: 2022/9/21 18:04
*/
@Configuration
public class RestTemplateConfig {
@Bean
@LoadBalanced
public RestTemplate getRestTemplate() {
return new RestTemplate();
}
}
\ No newline at end of file
...@@ -114,4 +114,14 @@ public class DPStatisticsController { ...@@ -114,4 +114,14 @@ public class DPStatisticsController {
return ResponseHelper.buildResponse(statisticsService.queryInspectionOrgListForPublicity(dpFilterParamDto)); return ResponseHelper.buildResponse(statisticsService.queryInspectionOrgListForPublicity(dpFilterParamDto));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏-检验检测-八大类设备报检/待检数量统计", notes = "大屏-检验检测-八大类设备报检/待检数量统计")
@PostMapping(value = "/jy/inspectionEquip/countByEquList")
public ResponseModel<Map<String, Object>> inspectionEquipCountByEquList(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(statisticsService.queryInspectionEquipByEquList(dpFilterParamDto));
}
} }
package com.yeejoin.amos.boot.module.jyjc.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.DPSubServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Map;
/**
* 大屏统计controller
*
* @author Administrator
*/
@RestController
@RequestMapping("/dp/sub")
@Api(tags = "大屏二级弹窗")
public class DPSubController {
private DPSubServiceImpl subService;
public DPSubController(DPSubServiceImpl subService) {
this.subService = subService;
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "动态详情页", notes = "动态详情页")
@PostMapping(value = "/{template}")
public ResponseModel<JSONObject> commonQuery(@PathVariable String template, @RequestBody Map<String, Object> param) {
if (template.equals("company")){
Assert.notNull(param.get("useUnitCode"), "企业统一信用代码不能为空");
} else if (template.equals("equip")){
param.put("record", param.get("SEQUENCE_NBR"));
param.put("equList", param.get("EQU_LIST_CODE"));
Assert.notNull(param.get("record"), "设备ID不能为空");
Assert.notNull(param.get("equList"), "设备种类不能为空");
template = template + "_" + param.get("equList");
} else {
throw new RuntimeException("暂无模板");
}
return ResponseHelper.buildResponse(subService.commonQuery(template, param));
}
}
...@@ -283,4 +283,46 @@ public class DPStatisticsServiceImpl { ...@@ -283,4 +283,46 @@ public class DPStatisticsServiceImpl {
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
return openingApplicationMapper.queryInspectionOrgListForPublicity(orgCode); return openingApplicationMapper.queryInspectionOrgListForPublicity(orgCode);
} }
public Map<String, Object> queryInspectionEquipByEquList(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>();
// 1.查询条件构造未上送时间时,默认查询数据为近一个月数据
this.setDefaultFilter(dpFilterParamDto);
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
// 2.x轴数据构建
List<EquipmentCategoryDto> equipmentCategoryDtos = equipmentCategoryMapper.selectClassify();
this.setXDataForInspectionEquipByEquList(result, equipmentCategoryDtos);
// 3.y轴数据设置
// 目前都单设备报检故统计主表即可
List<CountDto> countDtos = inspectionApplicationMapper.queryAppByEquListForDP(orgCode, dpFilterParamDto);
Map<String, List<CountDto>> groupByMap = countDtos.stream().collect(Collectors.groupingBy(CountDto::getLabel));
this.setYDataForInspectionEquipByEquList(result, groupByMap, equipmentCategoryDtos);
// 4.图列数据设置
this.setLegendDataForInspectionEquipByEquList(result);
return result;
}
private void setYDataForInspectionEquipByEquList(Map<String, Object> result, Map<String, List<CountDto>> groupByMap, List<EquipmentCategoryDto> equipmentCategoryDtos) {
groupByMap.forEach((key, value) -> result.put(key, this.setInspectionEquipData(value, equipmentCategoryDtos)));
}
private List<Long> setInspectionEquipData(List<CountDto> countDtos, List<EquipmentCategoryDto> equipmentCategoryDtos) {
return equipmentCategoryDtos.stream().map(e -> countDtos.stream().filter(c -> c.getKeyStr().equals(e.getCode())).mapToLong(CountDto::getLongValue).sum()).collect(Collectors.toList());
}
private void setLegendDataForInspectionEquipByEquList(Map<String, Object> result) {
Map<String, Object> item1 = new LinkedHashMap<>();
item1.put("dataKey", "pending");
item1.put("value", "待检数量");
Map<String, Object> item2 = new LinkedHashMap<>();
item2.put("dataKey", "reporting");
item2.put("value", "报检数量");
result.put("legendData", Arrays.asList(item1, item2));
}
private void setXDataForInspectionEquipByEquList(Map<String, Object> result, List<EquipmentCategoryDto> equipmentCategoryDtos) {
// 8大类
List<String> names = equipmentCategoryDtos.stream().map(EquipmentCategoryDto::getName).collect(Collectors.toList());
result.put("xdata", names);
}
} }
package com.yeejoin.amos.boot.module.jyjc.biz.util;
import org.springframework.core.io.ClassPathResource;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class DpSubUtils {
public static String companyJson = null;
public static String textJson = null;
public static String imageJson = null;
public static String circleJson = null;
public static String rectJson = null;
static {
// companyJson = getFileContent("company.json");
// textJson = getFileContent("text.json");
// imageJson = getFileContent("image.json");
// circleJson = getFileContent("circle.json");
// rectJson = getFileContent("rect.json");
}
public static String getFileContent(String filename){
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new ClassPathResource("json/"+filename).getInputStream()));
StringBuffer sb = new StringBuffer();
String line = null;
while((line = br.readLine())!=null){
if(line.trim().length()>0)
sb.append(line);
}
br.close();
return sb.toString();
} catch (Exception e) {
throw new RuntimeException(e);
// return null;
}
}
}
package com.yeejoin.amos.boot.module.jyjc.biz.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Strings;
/**
* @Author: xl
* @Description: json快速取值
* @Date: 2022/5/12 11:11
*/
public class JsonValueUtils {
public static Object getValueByKey(Object originObject, String startKey,
String targetKey) {
if (Strings.isNullOrEmpty(startKey)) {
return originObject;
}
if (originObject instanceof JSONObject) {
return getValueFromJSONObjectByKey((JSONObject) originObject, startKey,
targetKey);
}
if (originObject instanceof JSONArray) {
return getValueFromJSONArrayByKey((JSONArray) originObject, startKey,
targetKey);
}
return null;
}
private static String getNextKey(String startKey, String targetKey) {
if (Strings.isNullOrEmpty(targetKey)) {
return null;
}
String[] keys = targetKey.split("\\.");
for (int i = 0; i < keys.length; i++) {
if (keys[i].equals(startKey) && (i < keys.length - 1)) {
return keys[i + 1];
}
}
return null;
}
private static Object getValueFromJSONArrayByKey(JSONArray originObject,
String startKey,
String targetKey) {
try {
Integer integer = Integer.valueOf(startKey);
JSONObject jsonObject = originObject.getJSONObject(integer);
Object targetObject = getValueFromJSONObjectByKey(jsonObject, getNextKey(startKey, targetKey),
targetKey);
if (targetObject != null) {
return targetObject;
}
} catch (NumberFormatException e) {
e.printStackTrace();
}
return null;
}
private static Object getValueFromJSONObjectByKey(JSONObject originObject,
String startKey,
String targetKey) {
Object object = originObject.get(startKey);
return object != null
? getValueByKey(object, getNextKey(startKey, targetKey),
targetKey)
: null;
}
}
package com.yeejoin.amos.boot.module.jyjc.biz.util;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import java.net.URI;
import java.util.Map;
/**
* @Author: xl
* @Description: 远程调用工具类
* @Date: 2021/10/8 13:46
*/
public class RestTemplateUtils {
private static class SingletonRestTemplate {
static final RestTemplate INSTANCE = new RestTemplate();
}
private RestTemplateUtils() {
}
public static RestTemplate getInstance() {
return SingletonRestTemplate.INSTANCE;
}
/**
* 带请求头的GET请求调用方式
*
* @param uri 请求URL
* @param headers 请求头参数
* @param responseType 返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
*/
public static <T> ResponseEntity<T> get(URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType, Map<String, ?> uriVariables) {
HttpEntity<?> requestEntity = new HttpEntity<>(headers);
return RestTemplateUtils.getInstance().exchange(uri, HttpMethod.GET, requestEntity, responseType);
}
/**
* @param restTemplate 可传入负载均衡的restTemplate
* @param uri
* @param headers
* @param responseType
* @param uriVariables
* @param <T>
* @return
*/
public static <T> ResponseEntity<T> get(RestTemplate restTemplate, URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType, Map<String, ?> uriVariables) {
HttpEntity<?> requestEntity = new HttpEntity<>(headers);
return restTemplate.exchange(uri, HttpMethod.GET, requestEntity, responseType);
}
/**
* 带请求头的POST请求调用方式
*
* @param uri 请求URL
* @param headers 请求头参数
* @param requestBody 请求参数体
* @param responseType 返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
*/
public static <T> ResponseEntity<T> post(URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType, Map<String, ?> uriVariables) {
HttpEntity<Object> requestEntity = new HttpEntity<Object>(requestBody, headers);
return RestTemplateUtils.getInstance().postForEntity(uri, requestEntity, responseType);
}
/**
* @param restTemplate 可传入负载均衡的restTemplate
* @param uri
* @param headers
* @param requestBody
* @param responseType
* @param uriVariables
* @param <T>
* @return
*/
public static <T> ResponseEntity<T> post(RestTemplate restTemplate, URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType, Map<String, ?> uriVariables) {
HttpEntity<Object> requestEntity = new HttpEntity<Object>(requestBody, headers);
return restTemplate.postForEntity(uri, requestEntity, responseType);
}
/**
* 带请求头的PUT请求调用方式
*
* @param uri 请求URL
* @param headers 请求头参数
* @param requestBody 请求参数体
* @param responseType 返回对象类型
* @return ResponseEntity 响应对象封装类
*/
public static <T> ResponseEntity<T> put(URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType) {
HttpEntity<Object> requestEntity = new HttpEntity<Object>(requestBody, headers);
return RestTemplateUtils.getInstance().exchange(uri, HttpMethod.PUT, requestEntity, responseType);
}
/**
* @param restTemplate 可传入负载均衡的restTemplate
* @param uri
* @param headers
* @param requestBody
* @param responseType
* @param <T>
* @return
*/
public static <T> ResponseEntity<T> put(RestTemplate restTemplate, URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType) {
HttpEntity<Object> requestEntity = new HttpEntity<Object>(requestBody, headers);
return restTemplate.exchange(uri, HttpMethod.PUT, requestEntity, responseType);
}
/**
* 带请求头的DELETE请求调用方式
*
* @param uri 请求URL
* @param headers 请求头参数
* @param requestBody 请求参数体
* @param responseType 返回对象类型
* @return ResponseEntity 响应对象封装类
*/
public static <T> ResponseEntity<T> delete(URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType) {
HttpEntity<Object> requestEntity = new HttpEntity<Object>(requestBody, headers);
return RestTemplateUtils.getInstance().exchange(uri, HttpMethod.DELETE, requestEntity, responseType);
}
/**
* @param restTemplate 可传入负载均衡的restTemplate
* @param uri
* @param headers
* @param requestBody
* @param responseType
* @param <T>
* @return
*/
public static <T> ResponseEntity<T> delete(RestTemplate restTemplate, URI uri, HttpHeaders headers, Object requestBody, Class<T> responseType) {
HttpEntity<Object> requestEntity = new HttpEntity<Object>(requestBody, headers);
return restTemplate.exchange(uri, HttpMethod.DELETE, requestEntity, responseType);
}
}
package com.yeejoin.amos.boot.module.jyjc.biz.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/8/24 9:58
*/
public class StringUtils {
public static boolean contrastLowerStr(String str1, String str2) {
boolean flag = false;
if (str1.toLowerCase().equals(str2.toLowerCase())) {
flag = true;
}
return flag;
}
/**
* 将map转换成url
*
* @param map
* @return
*/
public static String transMap2UrlParam(Map<String, Object> map) {
StringBuilder stringBuilder = new StringBuilder();
for (Map.Entry entry : map.entrySet()) {
// 值为空或匹配total不拼接
if (ValidationUtil.isEmpty(entry.getValue()) || "total".equals(entry.getKey()))
continue;
try {
stringBuilder.append("&").append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue().toString(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
return stringBuilder.toString();
}
/**
* 将list转换成url
*
* @param list
* @return
*/
public static String transList2UrlParam(List<Map<String, Object>> list) {
StringBuilder stringBuilder = new StringBuilder();
list.forEach(x -> {
Map<String, Object> map = JSONObject.parseObject(JSON.toJSONString(x));
try {
stringBuilder.append("&").append(map.get("key")).append("=").append(URLEncoder.encode(map.get("value").toString(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
});
return stringBuilder.toString();
}
}
{
"name": "检验检测机构模板",
"tabs": [
{
"key": "basic",
"displayName": "基本信息",
"renderType": "basic",
"formSeq": "1793454184889085953",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/tcm/baseEnterprise/getInfoByUseCode/map",
"params": {
"useCode": "{useUnitCode}"
}
},
"resultConvert": ""
}
},
{
"key": "devtable",
"displayName": "设备列表",
"renderType": "table",
"formSeq": "1792821076963651585",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/page",
"params": {
"number": 1,
"size": 10,
"USE_UNIT_CREDIT_CODE": "{useUnitCode}"
}
}
}
}
],
"content": {
"basic": {
"columns": 2,
"datas": [],
"qrcode": {},
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-锅炉",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "gl",
"displayName": "锅炉技术参数",
"renderType": "basic",
"formSeq": "1734819004637278210",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"gl": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-压力容器",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "ylrq",
"displayName": "压力容器技术参数",
"renderType": "basic",
"formSeq": "1734818687287848961",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"ylrq": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-电梯",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "dt",
"displayName": "电梯技术参数",
"renderType": "basic",
"formSeq": "1734504628768239617",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"dt": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-起重机械",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "qzqx",
"displayName": "起重机械技术参数",
"renderType": "basic",
"formSeq": "1734818709194698753",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"qzqx": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-场(厂)内机动车",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "cnjdc",
"displayName": "场(厂)内机动车技术参数",
"renderType": "basic",
"formSeq": "1734818684284727297",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"cnjdc": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-大型游乐设施",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "dxylss",
"displayName": "大型游乐设施技术参数",
"renderType": "basic",
"formSeq": "1734818700369883137",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"dxylss": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-压力管道",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "ylgd",
"displayName": "压力管道",
"renderType": "basic",
"formSeq": "1734818687287848961",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"ylgd": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "设备-客运索道",
"tabs": [
{
"key": "basic",
"displayName": "设备信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
}
},
{
"key": "kysd",
"displayName": "客运索道",
"renderType": "basic",
"formSeq": "1734818694514634753",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/equipment-register/{record}",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result.equipParams"
}
}
}
},
{
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/common/equOnJgServiceOperationRecords",
"params": {
"record": "{record}"
},
"ruleData": {
"responseSuccess": "data.result",
"operater": "content"
}
}
}
},
{
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equipId/page",
"params": {
"number": 1,
"size": 10,
"record": "{record}"
}
}
}
}
],
"content": {
"basic": {
"columns": 3,
"datas": [],
"qrcode": {},
"subs": []
},
"kysd": {
"columns": 4,
"datas": [],
"subs": []
}
}
}
\ No newline at end of file
{
"name": "非检验检测机构模板",
"tabs": [
{
"key": "basic",
"displayName": "基本信息",
"renderType": "basic",
"formSeq": "1793454184889085953",
"dataConfig": {
"api": {
"reqType":"GET",
"url":"/tcm/baseEnterprise/getInfoByUseCode",
"params": {
"useCode": "{useUnitCode}"
}
}
}
},
{
"key": "devtable",
"displayName": "设备列表",
"renderType": "table",
"formSeq": "1792821076963651585",
"dataConfig": {
"api": {
"reqType":"GET",
"url":"/jg/equipment-register/page",
"params": {
"number": 1,
"size": 10,
"USE_UNIT_CREDIT_CODE": "{useUnitCode}"
}
}
}
}
],
"content": {
"basic": {
"columns": 2,
"datas": [],
"qrcode": {
"src": "/public/ag/zongshu.png",
"text": "2023/12/26",
"subtext": "23:10:16"
},
"subs": []
}
}
}
\ No newline at end of file
...@@ -289,6 +289,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto { ...@@ -289,6 +289,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
@ApiModelProperty(value = "行业主管部门") @ApiModelProperty(value = "行业主管部门")
private String industrySupervisor; private String industrySupervisor;
@ApiModelProperty(value = "企业问题状态")
private String status;
private String region; private String region;
......
package com.yeejoin.amos.boot.module.tcm.api.enums;
import java.util.HashMap;
import java.util.Map;
/**
* 问题状态
*/
public enum ProblemStatusEnum {
NORMAL("正常", "0"),
ABNORMAL("异常", "1");
private String name;
private String code;
ProblemStatusEnum(String name, String code) {
this.name = name;
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setStatus(String code) {
this.code = code;
}
public static Map<String, String> getName = new HashMap<>();
public static Map<String, String> getCode = new HashMap<>();
static {
for (ProblemStatusEnum e : ProblemStatusEnum.values()) {
getName.put(e.code, e.name);
getCode.put(e.name, e.code);
}
}
}
package com.yeejoin.amos.boot.module.tcm.api.mapper; package com.yeejoin.amos.boot.module.tcm.api.mapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -11,6 +8,9 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto; ...@@ -11,6 +8,9 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 企业数据信息 Mapper 接口 * 企业数据信息 Mapper 接口
* *
...@@ -54,4 +54,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -54,4 +54,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List<TzBaseEnterpriseInfo> listNoQrCode(); List<TzBaseEnterpriseInfo> listNoQrCode();
List<Map<String, Object>> getEquipType(@Param("type")String type); List<Map<String, Object>> getEquipType(@Param("type")String type);
Map<String, Object> getProblemInfoBySourceId(@Param("sourceId")String sourceId);
} }
...@@ -172,5 +172,8 @@ ...@@ -172,5 +172,8 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getProblemInfoBySourceId" resultType="java.util.Map">
select * from tzs_safety_problem_tracing where source_id = #{sourceId} order by rec_date desc limit 1
</select>
</mapper> </mapper>
...@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto; ...@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.*; import com.yeejoin.amos.boot.module.tcm.api.entity.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.EnterpriseEnums; import com.yeejoin.amos.boot.module.tcm.api.enums.EnterpriseEnums;
import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum; import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.ProblemStatusEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum; import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
...@@ -242,7 +243,8 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -242,7 +243,8 @@ public class TzBaseEnterpriseInfoServiceImpl
@Override @Override
public Map<String, Object> getInfoByUseCodeMap(String useCode) { public Map<String, Object> getInfoByUseCodeMap(String useCode) {
TzBaseEnterpriseInfoDto infoByUseCode = getInfoByUseCode(useCode); TzBaseEnterpriseInfoDto infoByUseCode = getInfoByUseCode(useCode);
// 通过sourceId获取问题信息
Map<String,Object> problemInfo = baseMapper.getProblemInfoBySourceId(infoByUseCode.getSequenceNbr().toString());
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();
Map<String,Object> resultMap = new HashMap<>(); Map<String,Object> resultMap = new HashMap<>();
...@@ -272,6 +274,12 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -272,6 +274,12 @@ public class TzBaseEnterpriseInfoServiceImpl
resultMap.remove("regUnitIcDto"); resultMap.remove("regUnitIcDto");
resultMap.remove("regUnitInfoDto"); resultMap.remove("regUnitInfoDto");
resultMap.remove("tzsBaseInstitution"); resultMap.remove("tzsBaseInstitution");
resultMap.put("unitAddress", resultMap.get("province") + "/" + resultMap.get("city") + "/" + resultMap.get("district"));
resultMap.put("longitudeLatitude", resultMap.get("address"));
resultMap.put("problemTime", ObjectUtils.isEmpty(problemInfo) ? null : problemInfo.get("problem_time"));
resultMap.put("problemStatus", (ObjectUtils.isEmpty(resultMap.get("status")) || "null".equals(resultMap.get("status"))) ? ProblemStatusEnum.NORMAL.getName() : ProblemStatusEnum.getName.get(resultMap.get("status")));
return resultMap; return resultMap;
} }
......
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