Commit c898d6ea authored by tianbo's avatar tianbo

Merge branch 'develop_tzs_register_to_0715' into develop_tzs_register

parents fc801f16 2bdd34a8
...@@ -1101,20 +1101,36 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -1101,20 +1101,36 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
f.setValue(o.toString()); f.setValue(o.toString());
} }
// 派遣状态 // 派遣状态
if ("dispatchStatus".equals(f.getKey()) && Boolean.TRUE.equals(dto.getDispatchStatus())) { if ("dispatchStatus".equals(f.getKey())) {
if (Boolean.TRUE.equals(dto.getDispatchStatus())){
f.setValue("已通知已派遣"); f.setValue("已通知已派遣");
}else {
f.setValue("未通知未派遣");
}
} }
// 到达状态 // 到达状态
if ("arriveStatus".equals(f.getKey()) && Boolean.TRUE.equals(dto.getArriveStatus())) { if ("arriveStatus".equals(f.getKey())) {
if (Boolean.TRUE.equals(dto.getArriveStatus())){
f.setValue("已到达"); f.setValue("已到达");
}else {
f.setValue("未到达");
}
} }
// 伤亡状态 // 伤亡状态
if ("casualtiesStatus".equals(f.getKey()) && Boolean.TRUE.equals(dto.getCasualtiesStatus())) { if ("casualtiesStatus".equals(f.getKey())) {
if ( Boolean.TRUE.equals(dto.getCasualtiesStatus())){
f.setValue("出现伤亡"); f.setValue("出现伤亡");
}else {
f.setValue("未出现伤亡");
}
} }
// 救援状态 // 救援状态
if ("rescueStatus".equals(f.getKey()) && Boolean.TRUE.equals(dto.getRescueStatus())) { if ("rescueStatus".equals(f.getKey())) {
if (Boolean.TRUE.equals(dto.getRescueStatus())){
f.setValue("救援成功"); f.setValue("救援成功");
}else{
f.setValue("未救援成功");
}
} }
// 是否超时 // 是否超时
if ("isTimeout".equals(f.getKey())) { if ("isTimeout".equals(f.getKey())) {
......
...@@ -88,4 +88,9 @@ public class DPFilterParamForDetailDto { ...@@ -88,4 +88,9 @@ public class DPFilterParamForDetailDto {
*/ */
private String anomalyType; private String anomalyType;
/**
* 地址
*/
private String address;
} }
...@@ -13,7 +13,7 @@ public enum BusinessTypeEnum { ...@@ -13,7 +13,7 @@ public enum BusinessTypeEnum {
DQJY("dqjy","定期检验"), DQJY("dqjy","定期检验"),
BGDJ("bgdj","变更登记"), BGDJ("bgdj","变更登记"),
ZXBX("zxbx","注销报"); ZXBX("zxbx","注销报");
private BusinessTypeEnum(String code, String name){ private BusinessTypeEnum(String code, String name){
......
package com.yeejoin.amos.boot.module.common.api.enums;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
public enum NoticBusinessTypeEnum {
AZ("az","安装"),
WX("wx","维修"),
GZ("gz","改造"),
YZ("yz","移装");
private NoticBusinessTypeEnum(String code, String name){
this.code=code;
this.name=name;
}
private String code;
private String name;
public String getCode() {
return code;
}
public String getName() {
return name;
}
public static List<HashMap<String,Object>> getEnumList() {
List<HashMap<String, Object>> list = new ArrayList<>();
for (NoticBusinessTypeEnum testEnum : EnumSet.allOf(NoticBusinessTypeEnum.class)) {
HashMap<String, Object> map = new HashMap<>();
map.put("title",testEnum.name);
map.put("value",testEnum.code);
list.add(map);
}
return list;
}
}
...@@ -301,4 +301,7 @@ public class TzBaseEnterpriseInfoDto extends BaseDto { ...@@ -301,4 +301,7 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
@ApiModelProperty(value = "企业标签信息") @ApiModelProperty(value = "企业标签信息")
private String regulatoryLabels; private String regulatoryLabels;
@ApiModelProperty(value = "单位所在城市Code")
private String cityCode;
} }
...@@ -40,6 +40,7 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -40,6 +40,7 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
*/ */
TzBaseEnterpriseInfo selectByUseUnit(String useUnit); TzBaseEnterpriseInfo selectByUseUnit(String useUnit);
String getOrgCodeByCompanyCode(String companyCode);
IPage<TzBaseEnterpriseInfoDto> page(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto); IPage<TzBaseEnterpriseInfoDto> page(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto);
......
...@@ -134,17 +134,12 @@ ...@@ -134,17 +134,12 @@
AND regulatory_labels LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.regulatoryLabels},'%') AND regulatory_labels LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.regulatoryLabels},'%')
</if> </if>
<if test="orgCodeList != null and ! orgCodeList.isEmpty() and orgCodeList.size() > 0"> <if test="orgCodeList != null and !orgCodeList.isEmpty()">
AND (
<foreach collection="orgCodeList" item="item" index="index" > <foreach collection="orgCodeList" item="item" separator=" OR ">
<if test="index==0"> supervise_org_code LIKE CONCAT('%', #{item}, '%')
AND
</if>
<if test="index!= 0">
OR
</if>
supervise_org_code LIKE CONCAT('%',#{item},'%')
</foreach> </foreach>
)
</if> </if>
AND is_delete = 0 AND is_delete = 0
</where> </where>
...@@ -155,4 +150,8 @@ ...@@ -155,4 +150,8 @@
select * from tz_base_enterprise_info where use_unit = #{useUnit} select * from tz_base_enterprise_info where use_unit = #{useUnit}
</select> </select>
<select id="getOrgCodeByCompanyCode" resultType="java.lang.String">
select org_code from privilege_company where company_code = #{companyCode} limit 1
</select>
</mapper> </mapper>
...@@ -38,12 +38,11 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -38,12 +38,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -90,6 +89,8 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -90,6 +89,8 @@ public class TzBaseEnterpriseInfoServiceImpl
@Autowired @Autowired
StartPlatformTokenService platformTokenService; StartPlatformTokenService platformTokenService;
private static final Map<String, String> regionCodeOrgCodeMap = new ConcurrentHashMap<>();
/** /**
* 企业管理员变更缓存key前缀 * 企业管理员变更缓存key前缀
*/ */
...@@ -122,10 +123,23 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -122,10 +123,23 @@ public class TzBaseEnterpriseInfoServiceImpl
} }
} }
} }
if (tzBaseEnterpriseInfoDto.getCityCode() != null){
orgCodeList.add(this.getAndSetOrgCode(tzBaseEnterpriseInfoDto.getCityCode()));
}
return this.baseMapper.pageList(page, tzBaseEnterpriseInfoDto, orgCodeList); return this.baseMapper.pageList(page, tzBaseEnterpriseInfoDto, orgCodeList);
} }
public String getAndSetOrgCode(String cityCode) {
String orgCode = regionCodeOrgCodeMap.get(cityCode);
if (orgCode == null) {
orgCode = this.baseMapper.getOrgCodeByCompanyCode(cityCode);
if (orgCode != null) {
regionCodeOrgCodeMap.put(cityCode, orgCode);
}
}
return orgCode;
}
@Override @Override
public TzBaseEnterpriseInfoDto detail(Long id) { public TzBaseEnterpriseInfoDto detail(Long id) {
TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = new TzBaseEnterpriseInfoDto(); TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = new TzBaseEnterpriseInfoDto();
......
...@@ -76,6 +76,9 @@ public class SafetyProblemTracingDto extends BaseDto { ...@@ -76,6 +76,9 @@ public class SafetyProblemTracingDto extends BaseDto {
@ApiModelProperty(value = "所属区域代码(6100000/6100010/6100011)") @ApiModelProperty(value = "所属区域代码(6100000/6100010/6100011)")
private String regionCode; private String regionCode;
@ApiModelProperty(value = "所属区域代码(6100000/6100010/6100011)")
private String cityCode;
@ApiModelProperty(value = "问题状态(0未处理、1已处理)") @ApiModelProperty(value = "问题状态(0未处理、1已处理)")
private String problemStatus; private String problemStatus;
......
...@@ -1185,8 +1185,13 @@ ...@@ -1185,8 +1185,13 @@
</select> </select>
<select id="countBizFinishedNumForDPList" resultType="java.util.Map"> <select id="countBizFinishedNumForDPList" resultType="java.util.Map">
SELECT * FROM (SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as SELECT * FROM (SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as
receiveOrgName,create_date as createDate,handle_date as handleDate FROM "tzs_jg_installation_notice" where receiveOrgName,create_date as createDate,handle_date as handleDate,
receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' CASE when notice_status = 0 then '已完成'
ELSE '进行中'
END as status
FROM "tzs_jg_installation_notice"
where
receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if> </if>
...@@ -1202,14 +1207,17 @@ ...@@ -1202,14 +1207,17 @@
union all union all
SELECT SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as
receiveOrgName,application_date as createDate,accept_date as handleDate receiveOrgName,application_date as createDate,accept_date as handleDate,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
FROM FROM
"tz_jyjc_inspection_application" a, "tz_jyjc_inspection_application" a,
tz_base_enterprise_info b tz_base_enterprise_info b
where where
a.inspection_unit_code= b.use_unit_code a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%'))) and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise' and a.biz_type = 'supervise'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -1224,7 +1232,7 @@ ...@@ -1224,7 +1232,7 @@
</if> </if>
union all union all
SELECT * FROM ( SELECT * FROM (
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1239,7 +1247,7 @@ ...@@ -1239,7 +1247,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1255,14 +1263,17 @@ ...@@ -1255,14 +1263,17 @@
) )
union all union all
SELECT SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
FROM FROM
"tz_jyjc_inspection_application" a, "tz_jyjc_inspection_application" a,
tz_base_enterprise_info b tz_base_enterprise_info b
where where
a.inspection_unit_code= b.use_unit_code a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%'))) and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY' AND a.inspection_type = 'DQJY'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -1277,7 +1288,7 @@ ...@@ -1277,7 +1288,7 @@
</if> </if>
union all union all
SELECT * FROM ( SELECT * FROM (
SELECT a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status = '已完成' SELECT a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,a.audit_status as status FROM tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1291,7 +1302,7 @@ ...@@ -1291,7 +1302,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,audit_status as status FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1305,7 +1316,7 @@ ...@@ -1305,7 +1316,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,audit_status as status FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1319,7 +1330,7 @@ ...@@ -1319,7 +1330,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1333,7 +1344,7 @@ ...@@ -1333,7 +1344,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1348,7 +1359,7 @@ ...@@ -1348,7 +1359,7 @@
</if> </if>
) )
union all union all
select a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate from tzs_jg_scrap_cancel a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status = '已完成' select a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,a.status as status from tzs_jg_scrap_cancel a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1555,34 +1566,34 @@ ...@@ -1555,34 +1566,34 @@
union all union all
SELECT count(1) as num FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status != '使用单位待提交' and audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成' SELECT count(1) as num FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status != '使用单位待提交' and audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_ge(CAST(create_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate}) and date_le(CAST(create_date as date),#{dto.endDate})
</if> </if>
union all union all
SELECT count(1) as num FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status != '使用单位待提交' and audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成' SELECT count(1) as num FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status != '使用单位待提交' and audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_ge(CAST(create_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate}) and date_le(CAST(create_date as date),#{dto.endDate})
</if> </if>
union all union all
SELECT count(1) as num FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' SELECT count(1) as num FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate}) and date_le(CAST(apply_date as date),#{dto.endDate})
</if> </if>
union all union all
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate}) and date_le(CAST(apply_date as date),#{dto.endDate})
</if> </if>
) )
</select> </select>
...@@ -1596,7 +1607,10 @@ ...@@ -1596,7 +1607,10 @@
</if> </if>
</select> </select>
<select id="countBizFinishedNumForDPListAZGZ" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListAZGZ" resultType="java.util.Map">
SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,handle_date as handleDate FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,handle_date as handleDate,
CASE when notice_status = 0 then '已完成'
ELSE '进行中'
END as status FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if> </if>
...@@ -1612,14 +1626,17 @@ ...@@ -1612,14 +1626,17 @@
</select> </select>
<select id="countBizFinishedNumForDPListJDJY" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListJDJY" resultType="java.util.Map">
SELECT SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
FROM FROM
"tz_jyjc_inspection_application" a, "tz_jyjc_inspection_application" a,
tz_base_enterprise_info b tz_base_enterprise_info b
where where
a.inspection_unit_code= b.use_unit_code a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%'))) and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise' and a.biz_type = 'supervise'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -1635,7 +1652,7 @@ ...@@ -1635,7 +1652,7 @@
</select> </select>
<select id="countBizFinishedNumForDPListSYDJ" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListSYDJ" resultType="java.util.Map">
SELECT * FROM ( SELECT * FROM (
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1648,7 +1665,7 @@ ...@@ -1648,7 +1665,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1665,19 +1682,22 @@ ...@@ -1665,19 +1682,22 @@
</select> </select>
<select id="countBizFinishedNumForDPListDQJY" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListDQJY" resultType="java.util.Map">
SELECT SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
FROM FROM
"tz_jyjc_inspection_application" a, "tz_jyjc_inspection_application" a,
tz_base_enterprise_info b tz_base_enterprise_info b
where where
a.inspection_unit_code= b.use_unit_code a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%'))) and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY' and a.inspection_type = 'DQJY'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate}) and date_le(CAST(a.application_date as date),#{dto.endDate})
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%') and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -1688,12 +1708,12 @@ ...@@ -1688,12 +1708,12 @@
</select> </select>
<select id="countBizFinishedNumForDPListBGDJ" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListBGDJ" resultType="java.util.Map">
SELECT * FROM ( SELECT * FROM (
SELECT a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status = '已完成' SELECT a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,a.audit_status as status FROM tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and (date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) or date_ge(CAST(a.create_date as date),#{dto.beginDate}))
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) and (date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) or date_le(CAST(a.create_date as date),#{dto.endDate}))
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -1702,12 +1722,12 @@ ...@@ -1702,12 +1722,12 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,audit_status as status FROM "tzs_jg_change_registration_reform" a where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and (date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) or date_ge(CAST(a.create_date as date),#{dto.beginDate}))
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate}) and (date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) or date_le(CAST(a.create_date as date),#{dto.endDate}))
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -1716,12 +1736,12 @@ ...@@ -1716,12 +1736,12 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,audit_status as status FROM "tzs_jg_change_registration_transfer" a where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and (date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) or date_ge(CAST(a.create_date as date),#{dto.beginDate}))
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate}) and (date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) or date_le(CAST(a.create_date as date),#{dto.endDate}))
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -1730,12 +1750,12 @@ ...@@ -1730,12 +1750,12 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_change_registration_unit" a where receive_company_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and (date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) or date_ge(CAST(a.create_date as date),#{dto.beginDate}))
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate}) and (date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) or date_le(CAST(a.create_date as date),#{dto.endDate}))
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -1744,12 +1764,12 @@ ...@@ -1744,12 +1764,12 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
union all union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成' SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,status FROM "tzs_jg_change_vehicle_registration_unit" a where org_branch_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and (date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) or date_ge(CAST(a.create_date as date),#{dto.beginDate}))
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate}) and (date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) or date_le(CAST(a.create_date as date),#{dto.endDate}))
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -1757,15 +1777,16 @@ ...@@ -1757,15 +1777,16 @@
<if test="dto.superviseUnitName != null and dto.superviseUnitName != ''"> <if test="dto.superviseUnitName != null and dto.superviseUnitName != ''">
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%') and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if> </if>
) ) b where b.status != '使用单位待提交' and b.status != '使用单位已撤回'
</select> </select>
<select id="countBizFinishedNumForDPListZXBX" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListZXBX" resultType="java.util.Map">
select a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate from tzs_jg_scrap_cancel a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status = '已完成' select a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,a.audit_status as status from tzs_jg_scrap_cancel a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%')
and audit_status != '使用单位待提交'
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and (date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) or date_ge(CAST(a.create_date as date),#{dto.beginDate}))
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) and (date_le(CAST(a.audit_pass_date as date),#{dto.endDate}) or date_le(CAST(a.create_date as date),#{dto.endDate}))
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
......
...@@ -158,9 +158,16 @@ ...@@ -158,9 +158,16 @@
INNER JOIN privilege_company pc on tjurm.receive_company_code = pc.company_code INNER JOIN privilege_company pc on tjurm.receive_company_code = pc.company_code
<where> <where>
tjurm.is_delete = 0 and pc.org_code like concat (#{orgCode}, '%') tjurm.is_delete = 0 and pc.org_code like concat (#{orgCode}, '%')
<choose>
<when test="dto.equList != null and dto.equList != '' and dto.equList == '气瓶'">
and tjurm.equ_category = #{dto.equList}
</when>
<otherwise>
<if test="dto.equList != null and dto.equList != ''"> <if test="dto.equList != null and dto.equList != ''">
and tjurm.equ_list = #{dto.equList} and tjurm.equ_list = #{dto.equList}
</if> </if>
</otherwise>
</choose>
<if test="dto.equListCode != null and dto.equListCode != ''"> <if test="dto.equListCode != null and dto.equListCode != ''">
and tjurm.equ_list_code = #{dto.equListCode} and tjurm.equ_list_code = #{dto.equListCode}
</if> </if>
......
...@@ -2169,7 +2169,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2169,7 +2169,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolean isCopy = !ValidationUtil.isEmpty(equipmentInfoForm.get(IS_COPY)); boolean isCopy = !ValidationUtil.isEmpty(equipmentInfoForm.get(IS_COPY));
operateType = isCopy ? OPERATESAVE : operateType; operateType = isCopy ? OPERATESAVE : operateType;
// 新增设备保存时 : 历史设备=》dataSource为"his" jg新录入设备dataSource为"jg" // 新增设备保存时 : 历史设备=》dataSource为"his" jg新录入设备dataSource为"jg"
String dataSource = OPERATESAVE.equals(operateType) ? ("new".equals(equipSource) ? "jg" : "jg_his") : equipmentInfoForm.get("DATA_SOURCE").toString(); String dataSource = OPERATESAVE.equals(operateType) ? ("new".equals(equipSource) ? "jg" : "jg_his") : ValidationUtil.isEmpty(equipmentInfoForm.get("DATA_SOURCE")) ? "jg_his" : equipmentInfoForm.get("DATA_SOURCE").toString();
if (isCopy) { if (isCopy) {
String sourceRecord = equipmentClassForm.get(RECORD).toString(); String sourceRecord = equipmentClassForm.get(RECORD).toString();
// dataSource = "new".equals(equipSource) ? ("jg_" + sourceRecord) : ("jg_his_" + sourceRecord); // dataSource = "new".equals(equipSource) ? ("jg_" + sourceRecord) : ("jg_his_" + sourceRecord);
......
...@@ -65,13 +65,12 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr ...@@ -65,13 +65,12 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
} }
public Page<SafetyProblemTracingDto> getProblemRecords(Page<SafetyProblemTracingDto> page, SafetyProblemTracingDto problemModel) { public Page<SafetyProblemTracingDto> getProblemRecords(Page<SafetyProblemTracingDto> page, SafetyProblemTracingDto problemModel) {
String orgCode = getAndSetOrgCode(problemModel.getRegionCode()); String orgCode = getAndSetOrgCode(problemModel.getCityCode());
if (ObjectUtils.isEmpty(orgCode)){ if (ObjectUtils.isEmpty(orgCode)){
return new Page<>(); return new Page<>();
} }
problemModel.setGoverningBodyOrgCode(orgCode); problemModel.setGoverningBodyOrgCode(orgCode);
// 使用orgCode过滤 // 使用orgCode过滤
problemModel.setRegionCode(null);
// 将单位类型从code转化为value // 将单位类型从code转化为value
if (!ValidationUtil.isEmpty(problemModel.getPrincipalUnitType())){ if (!ValidationUtil.isEmpty(problemModel.getPrincipalUnitType())){
Collection<DataDictionary> unitTypeList = iDataDictionaryService.list(new QueryWrapper<DataDictionary>() Collection<DataDictionary> unitTypeList = iDataDictionaryService.list(new QueryWrapper<DataDictionary>()
......
package com.yeejoin.amos.boot.module.jyjc.api.dto; package com.yeejoin.amos.boot.module.jyjc.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
/** /**
...@@ -8,7 +9,7 @@ import lombok.Data; ...@@ -8,7 +9,7 @@ import lombok.Data;
* @author Administrator * @author Administrator
*/ */
@Data @Data
public class PublicityInspectOrgInfoDto { public class PublicityInspectOrgInfoDto extends BaseDto {
/** /**
* 单位名称 * 单位名称
......
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
b.use_code as unitCode, b.use_code as unitCode,
b.use_code as useUnitCode, b.use_code as useUnitCode,
a.expiry_date as businessDeadline, a.expiry_date as businessDeadline,
a.licenceType a.licenceType,
b.sequence_nbr as sequenceNbr
from from
(SELECT (SELECT
unit_code, unit_code,
......
package com.yeejoin.amos.boot.module.statistics.api.enums;
import java.util.function.Function;
public enum MatinfoEnum {
EXCEL("/public/webico/resources/上传-excl.png", (str) -> str.equals("xls") || str.equals("xlsx")),
PDF("/public/webico/resources/上传-pdf.png", (str) -> str.equals("pdf")),
PPT("/public/webico/resources/上传-ppt.png", (str) -> str.equals("ppt")),
WOED("/public/webico/resources/上传-word.png", (str) -> str.equals("doc") || str.equals("docx") || str.equals("txt")),
// IMAGE("/public/webico/resources/上传-图片.png", (str) -> false),
VIDEO("/public/webico/resources/上传-视频.png", (str) -> str.equals("mp4") || str.equals("avi") || str.equals("flv"));
private String icon;
private Function<String, Boolean> buildFunction;
MatinfoEnum() {
}
MatinfoEnum(String icon, Function<String, Boolean> buildFunction) {
this.icon = icon;
this.buildFunction = buildFunction;
}
public String getIcon() {
return icon;
}
public Function<String, Boolean> getBuildFunction() {
return buildFunction;
}
public static MatinfoEnum getIconUrl(String suffix){
for (MatinfoEnum value : values()) {
if (value.getBuildFunction().apply(suffix)) {
return value;
}
}
return null;
}
}
package com.yeejoin.amos.boot.module.statistics.api.mapper; package com.yeejoin.amos.boot.module.statistics.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.dto.CountDto; import com.yeejoin.amos.boot.biz.common.dto.CountDto;
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.common.api.dto.DPFilterParamForDetailDto;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -55,6 +57,11 @@ public interface JGStatisticsMapper { ...@@ -55,6 +57,11 @@ public interface JGStatisticsMapper {
Long changeCountByOrgCode(@Param("orgCode") String orgCode); Long changeCountByOrgCode(@Param("orgCode") String orgCode);
List<Map<String, Object>> selectNoticeList(@Param("orgCode") String orgCode, @Param("time") String time); List<Map<String, Object>> selectNoticeList(@Param("orgCode") String orgCode, @Param("time") String time);
Page<Map<String, Object>> selectNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
Page<Map<String, Object>> selectAZNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
Page<Map<String, Object>> selectWXNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
Page<Map<String, Object>> selectGZNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
Page<Map<String, Object>> selectYZNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
List<Map<String, Object>> selectNoticeCountTopTen(@Param("orgCode") String orgCode, @Param("time") String time); List<Map<String, Object>> selectNoticeCountTopTen(@Param("orgCode") String orgCode, @Param("time") String time);
......
...@@ -142,7 +142,8 @@ ...@@ -142,7 +142,8 @@
sequence_nbr AS sequenceNbr, sequence_nbr AS sequenceNbr,
source_type AS sourceType, source_type AS sourceType,
problem_type AS problemType, problem_type AS problemType,
problem_time AS problemTime problem_time AS problemTime,
principal_unit AS principalUnit
FROM FROM
tzs_safety_problem_tracing tzs_safety_problem_tracing
WHERE WHERE
......
...@@ -118,8 +118,9 @@ ...@@ -118,8 +118,9 @@
FROM FROM
tz_alert_called tz_alert_called
WHERE WHERE
biz_org_code like concat(#{orgCode}, '%') is_delete = 0
and (alarm_type_code = '960' or alarm_type_code = '961') and biz_org_code like concat(#{orgCode}, '%')
and (alarm_type_code = '960' or alarm_type_code = '961' or alarm_type_code = '962')
<if test="dto.beginDate !=null and dto.beginDate !=''"> <if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(call_time as date),#{dto.beginDate}) and date_ge(CAST(call_time as date),#{dto.beginDate})
</if> </if>
......
...@@ -314,6 +314,7 @@ ...@@ -314,6 +314,7 @@
WHERE WHERE
C.org_code LIKE concat ( #{orgCode}, '%' ) C.org_code LIKE concat ( #{orgCode}, '%' )
and A.certificate_status = '已登记' and A.certificate_status = '已登记'
and A.is_delete = 0
</select> </select>
<select id="useCountByOrgCode" resultType="java.lang.Long"> <select id="useCountByOrgCode" resultType="java.lang.Long">
...@@ -348,21 +349,21 @@ ...@@ -348,21 +349,21 @@
tzs_jg_installation_notice T tzs_jg_installation_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION all
SELECT COUNT SELECT COUNT
( 1 ) ( 1 )
FROM FROM
tzs_jg_maintain_notice T tzs_jg_maintain_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION all
SELECT COUNT SELECT COUNT
( 1 ) ( 1 )
FROM FROM
tzs_jg_reform_notice T tzs_jg_reform_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION all
SELECT COUNT SELECT COUNT
( 1 ) ( 1 )
FROM FROM
...@@ -465,6 +466,82 @@ ...@@ -465,6 +466,82 @@
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )) A AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )) A
ORDER BY A."constructionDate" DESC ORDER BY A."constructionDate" DESC
</select> </select>
<select id="selectNoticeDetailList" resultType="java.util.Map">
select
*
from
( SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.install_start_date AS constructionDate
FROM
tzs_jg_installation_notice T
WHERE
install_start_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate
FROM
tzs_jg_maintain_notice T
WHERE
plan_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate
FROM
tzs_jg_reform_notice T
WHERE
plan_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate
FROM
tzs_jg_transfer_notice T
WHERE
plan_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )) A
ORDER BY A."constructionDate" DESC
</select>
<select id="selectNoticeCountTopTen" resultType="java.util.Map"> <select id="selectNoticeCountTopTen" resultType="java.util.Map">
SELECT SUM( T.num ) AS count, SELECT SUM( T.num ) AS count,
T.company T.company
...@@ -764,4 +841,84 @@ ...@@ -764,4 +841,84 @@
) T ) T
GROUP BY T.org_code GROUP BY T.org_code
</select> </select>
<select id="selectAZNoticeDetailList" resultType="java.util.Map">
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.install_start_date AS constructionDate
FROM
tzs_jg_installation_notice T
WHERE
install_start_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
order by T.install_start_date desc
</select>
<select id="selectWXNoticeDetailList" resultType="java.util.Map">
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate
FROM
tzs_jg_maintain_notice T
WHERE
plan_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
order by T.plan_date desc
</select>
<select id="selectGZNoticeDetailList" resultType="java.util.Map">
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate
FROM
tzs_jg_reform_notice T
WHERE
plan_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
order by T.plan_date desc
</select>
<select id="selectYZNoticeDetailList" resultType="java.util.Map">
SELECT
CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate
FROM
tzs_jg_transfer_notice T
WHERE
plan_date &gt;= #{time}
<if test="dto.companyName != null and dto.companyName != ''">
AND (T.install_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_name like CONCAT(#{dto.companyName},'%') or T.use_unit_credit_code like CONCAT(#{dto.companyName},'%'))
</if>
<if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
order by T.plan_date desc
</select>
</mapper> </mapper>
...@@ -11,10 +11,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -11,10 +11,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError; import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...@@ -132,12 +129,14 @@ public class JGDPStatisticsController { ...@@ -132,12 +129,14 @@ public class JGDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏总览-右侧-使用监管下钻列表", notes = "大屏总览-右侧-使用监管下钻列表") @ApiOperation(httpMethod = "POST", value = "大屏总览-右侧-使用监管下钻列表", notes = "大屏总览-右侧-使用监管下钻列表")
@PostMapping(value = "/zl/right/queryBizCycleDataDetailList") @PostMapping(value = "/zl/right/queryBizCycleDataDetailList")
public ResponseModel<Page<Map<String, Object>>> queryBizCycleDataDetailList(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto, BindingResult result) { public ResponseModel<Page<Map<String, Object>>> queryBizCycleDataDetailList(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto, BindingResult result,
@RequestParam(value = "current", defaultValue = "1") Integer current,
@RequestParam(value = "size", defaultValue = "20") Integer size) {
List<FieldError> fieldErrors = result.getFieldErrors(); List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) { if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage()); throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
} }
Page<Map<String, Object>> page = new Page<>(dpFilterParamForDetailDto.getCurrent(),dpFilterParamForDetailDto.getSize()); Page<Map<String, Object>> page = new Page<>(current,size);
return ResponseHelper.buildResponse(statisticsService.queryBizCycleDataDetailList(dpFilterParamForDetailDto,page)); return ResponseHelper.buildResponse(statisticsService.queryBizCycleDataDetailList(dpFilterParamForDetailDto,page));
} }
...@@ -307,6 +306,31 @@ public class JGDPStatisticsController { ...@@ -307,6 +306,31 @@ public class JGDPStatisticsController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "监管大屏-右屏-施工情况列表(近30天)下钻列表", notes = "监管大屏-右屏-施工情况列表(近30天)下钻列表")
@PostMapping(value = "/noticeDetailList")
public ResponseModel<Page<Map<String, Object>>> noticeDetailList(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamDto, BindingResult result,
@RequestParam(value = "current", defaultValue = "1") Integer current,
@RequestParam(value = "size", defaultValue = "20") Integer size) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
Page<Map<String, Object>> page = new Page<>(current, size);
return ResponseHelper.buildResponse(statisticsService.noticeDetailList(page,dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "监管大屏-右屏-施工情况列表(近30天)下钻类型接口", notes = "监管大屏-右屏-施工情况列表(近30天)下钻类型接口")
@PostMapping(value = "/noticeListBusinessType")
public ResponseModel<List<Map<String, Object>>> noticeListBusinessType(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(statisticsService.noticeListBusinessType(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "监管大屏-右屏-施工单位施工总量排名TOP10", notes = "大屏总览-右屏-施工单位施工总量排名TOP10") @ApiOperation(httpMethod = "POST", value = "监管大屏-右屏-施工单位施工总量排名TOP10", notes = "大屏总览-右屏-施工单位施工总量排名TOP10")
@PostMapping(value = "/noticeCountTop") @PostMapping(value = "/noticeCountTop")
public ResponseModel<List<Map<String, Object>>> noticeCountTop(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) { public ResponseModel<List<Map<String, Object>>> noticeCountTop(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
......
...@@ -201,11 +201,15 @@ public class JYJCDPStatisticsController { ...@@ -201,11 +201,15 @@ public class JYJCDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏-检验检测-八大类设备检验临期、超期统计下钻下部列表", notes = "大屏-检验检测-八大类设备检验临期、超期统计下钻下部列表") @ApiOperation(httpMethod = "POST", value = "大屏-检验检测-八大类设备检验临期、超期统计下钻下部列表", notes = "大屏-检验检测-八大类设备检验临期、超期统计下钻下部列表")
@PostMapping(value = "/equipInspectTime/equipInspectTimeCountListDetailList") @PostMapping(value = "/equipInspectTime/equipInspectTimeCountListDetailList")
public ResponseModel<Page<JSONObject>> equipInspectTimeCountListDetailList(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamDto, BindingResult result) { public ResponseModel<Page<JSONObject>> equipInspectTimeCountListDetailList(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamDto, BindingResult result,
@RequestParam(value = "current", defaultValue = "1") Integer current,
@RequestParam(value = "size", defaultValue = "20") Integer size) {
List<FieldError> fieldErrors = result.getFieldErrors(); List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) { if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage()); throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
} }
dpFilterParamDto.setCurrent(current);
dpFilterParamDto.setSize(size);
return ResponseHelper.buildResponse(statisticsService.equipInspectTimeCountListDetailList(dpFilterParamDto)); return ResponseHelper.buildResponse(statisticsService.equipInspectTimeCountListDetailList(dpFilterParamDto));
} }
...@@ -266,8 +270,10 @@ public class JYJCDPStatisticsController { ...@@ -266,8 +270,10 @@ public class JYJCDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/inspectApplication/getInspectDetailList") @PostMapping(value = "/inspectApplication/getInspectDetailList")
@ApiOperation(httpMethod = "POST", value = "大屏检验检测下钻获取下部列表", notes = "大屏检验检测下钻获取下部列表") @ApiOperation(httpMethod = "POST", value = "大屏检验检测下钻获取下部列表", notes = "大屏检验检测下钻获取下部列表")
public ResponseModel<Page<Map<String, Object>>> getInspectDetailList(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto) { public ResponseModel<Page<Map<String, Object>>> getInspectDetailList(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto,
Page<Map<String, Object>> page = new Page<>(dpFilterParamForDetailDto.getCurrent(),dpFilterParamForDetailDto.getSize()); @RequestParam(value = "current", defaultValue = "1") Integer current,
@RequestParam(value = "size", defaultValue = "20") Integer size) {
Page<Map<String, Object>> page = new Page<>(current, size);
return ResponseHelper.buildResponse(statisticsService.getInspectDetailList(dpFilterParamForDetailDto, page)); return ResponseHelper.buildResponse(statisticsService.getInspectDetailList(dpFilterParamForDetailDto, page));
} }
} }
......
...@@ -210,7 +210,11 @@ public class YJDPStatisticsController { ...@@ -210,7 +210,11 @@ public class YJDPStatisticsController {
@ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格", @ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格",
notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格") notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格")
@PostMapping("/alertRecordTable/dp") @PostMapping("/alertRecordTable/dp")
public ResponseModel<IPage<Map<String, Object>>> alertRecordTableForDP(@Validated @RequestBody DPFilterParamForDetailDto recordFilterVo) { public ResponseModel<IPage<Map<String, Object>>> alertRecordTableForDP(@Validated @RequestBody DPFilterParamForDetailDto recordFilterVo,
@RequestParam(value = "current") Integer current,
@RequestParam(value = "size") Integer size) {
recordFilterVo.setCurrent(current);
recordFilterVo.setSize(size);
return statisticsService.alertRecordTableForDP(recordFilterVo); return statisticsService.alertRecordTableForDP(recordFilterVo);
} }
...@@ -243,7 +247,11 @@ public class YJDPStatisticsController { ...@@ -243,7 +247,11 @@ public class YJDPStatisticsController {
@ApiOperation(value = "月度困人故障高发使用单位-右上角更多-地市月度应急事件高发使用单位-表格", @ApiOperation(value = "月度困人故障高发使用单位-右上角更多-地市月度应急事件高发使用单位-表格",
notes = "月度困人故障高发使用单位-右上角更多-地市月度应急事件高发使用单位-表格") notes = "月度困人故障高发使用单位-右上角更多-地市月度应急事件高发使用单位-表格")
@PostMapping("/alertUseUnitTable/dp") @PostMapping("/alertUseUnitTable/dp")
public ResponseModel<IPage<AlertUseUnitStatistics>> alertUseUnitTableForDP(@Validated @RequestBody DPFilterParamForDetailDto detailDto) { public ResponseModel<IPage<AlertUseUnitStatistics>> alertUseUnitTableForDP(@Validated @RequestBody DPFilterParamForDetailDto detailDto,
@RequestParam(value = "current") Integer current,
@RequestParam(value = "size") Integer size) {
detailDto.setCurrent(current);
detailDto.setSize(size);
return statisticsService.alertUseUnitTableForDP(detailDto); return statisticsService.alertUseUnitTableForDP(detailDto);
} }
} }
...@@ -116,7 +116,11 @@ public class ZLDPStatisticsController { ...@@ -116,7 +116,11 @@ public class ZLDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/viewEquipPage") @PostMapping(value = "/viewEquipPage")
@ApiOperation(httpMethod = "POST", value = "查询设备管理列表", notes = "查询设备管理列表") @ApiOperation(httpMethod = "POST", value = "查询设备管理列表", notes = "查询设备管理列表")
public ResponseModel<Page<JSONObject>> viewEquipPage(@RequestBody DPFilterParamForDetailDto paramDto) { public ResponseModel<Page<JSONObject>> viewEquipPage(@RequestBody DPFilterParamForDetailDto paramDto,
@RequestParam("size") Integer size,
@RequestParam("current") Integer current) {
paramDto.setCurrent(current);
paramDto.setSize(size);
return ResponseHelper.buildResponse(statisticsService.viewEquipPage(paramDto)); return ResponseHelper.buildResponse(statisticsService.viewEquipPage(paramDto));
} }
...@@ -132,4 +136,16 @@ public class ZLDPStatisticsController { ...@@ -132,4 +136,16 @@ public class ZLDPStatisticsController {
public ResponseModel<List<EquCategoryVo>> getEquCategoryTree(@RequestBody DPFilterParamForDetailDto paramDto){ public ResponseModel<List<EquCategoryVo>> getEquCategoryTree(@RequestBody DPFilterParamForDetailDto paramDto){
return ResponseHelper.buildResponse(statisticsService.getEquCategoryList(paramDto.getTreeValue())); return ResponseHelper.buildResponse(statisticsService.getEquCategoryList(paramDto.getTreeValue()));
} }
/**
* 设备八大类列表树
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "设备八大类列表树", notes = "设备八大类列表树")
@GetMapping(value = "/equipTree")
public ResponseModel<Object> equipTree(@RequestParam(value = "type", required = false) String type) {
return ResponseHelper.buildResponse(statisticsService.equipTree(type));
}
} }
...@@ -288,13 +288,15 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -288,13 +288,15 @@ public class CylinderDPStatisticsServiceImpl {
private Map<String, Object> getCylinderMapCount(String orgCode, Map<String, Object> result) { private Map<String, Object> getCylinderMapCount(String orgCode, Map<String, Object> result) {
if (StringUtils.isNotEmpty(orgCode)) { if (StringUtils.isNotEmpty(orgCode)) {
result.put("cylindersCount", this.countForCylinderNum(orgCode)); Long cylindersCount = this.countForCylinderNum(orgCode);
Long automotiveGasCount = this.countForCylinderNumForVehicleUsed(orgCode);
result.put("cylindersCount", cylindersCount);
result.put("stationCount", cylinderStatisticsMapper.countEnterpriseNumForCylinder(orgCode)); result.put("stationCount", cylinderStatisticsMapper.countEnterpriseNumForCylinder(orgCode));
result.put("operatorCount", cylinderAreaDataMapper.getOpertorStatisticsDataByCity(Collections.singletonList(orgCode))); result.put("operatorCount", cylinderAreaDataMapper.getOpertorStatisticsDataByCity(Collections.singletonList(orgCode)));
// 液化气瓶 (个) // 液化气瓶 (个)
result.put("liquefiedGasCount", 0L); result.put("liquefiedGasCount", cylindersCount - automotiveGasCount);
// 车用气瓶 (个) // 车用气瓶 (个)
result.put("automotiveGasCount", this.countForCylinderNumForVehicleUsed(orgCode)); result.put("automotiveGasCount", automotiveGasCount);
// 工业气瓶 (个) // 工业气瓶 (个)
result.put("industrialGasCount", 0L); result.put("industrialGasCount", 0L);
// 使用登记数量 // 使用登记数量
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RestTemplateUtils; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RestTemplateUtils;
import com.yeejoin.amos.boot.biz.common.utils.StringUtils; import com.yeejoin.amos.boot.biz.common.utils.StringUtils;
import com.yeejoin.amos.boot.module.statistcs.biz.utils.DpSubUtils; import com.yeejoin.amos.boot.module.statistcs.biz.utils.DpSubUtils;
import com.yeejoin.amos.boot.module.statistics.api.enums.DPStatusEnum; import com.yeejoin.amos.boot.module.statistics.api.enums.DPStatusEnum;
import com.yeejoin.amos.boot.module.statistics.api.enums.MatinfoEnum;
import com.yeejoin.amos.feign.morphic.Morphic; import com.yeejoin.amos.feign.morphic.Morphic;
import com.yeejoin.amos.feign.morphic.model.FormSceneModel; import com.yeejoin.amos.feign.morphic.model.FormSceneModel;
import jdk.nashorn.api.scripting.ScriptObjectMirror; import jdk.nashorn.api.scripting.ScriptObjectMirror;
...@@ -33,6 +34,7 @@ import javax.script.ScriptEngineManager; ...@@ -33,6 +34,7 @@ import javax.script.ScriptEngineManager;
import java.net.URI; import java.net.URI;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream;
/** /**
* 大屏二级页面实现类 * 大屏二级页面实现类
...@@ -526,9 +528,9 @@ public class DPSubServiceImpl { ...@@ -526,9 +528,9 @@ public class DPSubServiceImpl {
e.printStackTrace(); e.printStackTrace();
} }
} }
if ("正常".equals(problemStatus)) { if ("正常".equals(problemStatus) || "已处理".equals(problemStatus)) {
color = "green"; color = "green";
} else if ("异常".equals(problemStatus)) { } else if ("异常".equals(problemStatus) || "未处理".equals(problemStatus)) {
color = "red"; color = "red";
} }
qrcode.put("value", !ValidationUtil.isEmpty(result.get("SUPERVISORY_CODE")) ? "https://sxtzsb.sxsei.com:9435/tzs/?code=" + result.get("SUPERVISORY_CODE") : result.get("USE_ORG_CODE")); qrcode.put("value", !ValidationUtil.isEmpty(result.get("SUPERVISORY_CODE")) ? "https://sxtzsb.sxsei.com:9435/tzs/?code=" + result.get("SUPERVISORY_CODE") : result.get("USE_ORG_CODE"));
...@@ -592,6 +594,17 @@ public class DPSubServiceImpl { ...@@ -592,6 +594,17 @@ public class DPSubServiceImpl {
JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas"); JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas");
if (!ValidationUtil.isEmpty(value)) { if (!ValidationUtil.isEmpty(value)) {
JSONObject attachmentUploadDatasObj = new JSONObject(); JSONObject attachmentUploadDatasObj = new JSONObject();
log.info("附件数据:{}", value);
((JSONArray)value).stream().forEach(y -> {
JSONObject yObj = (JSONObject) y;
String[] str = yObj.getString("url").split("\\.");
if (ValidationUtil.isEmpty(str)){
yObj.put("thumb", yObj.getString("url"));
} else {
MatinfoEnum iconUrl = MatinfoEnum.getIconUrl(str[1]);
yObj.put("thumb", ValidationUtil.isEmpty(iconUrl) ? yObj.getString("url") : iconUrl.getIcon());
}
});
attachmentUploadDatasObj.put("value", value); attachmentUploadDatasObj.put("value", value);
String accept = visualParams.getString("accept"); String accept = visualParams.getString("accept");
String label = visualParams.getString("label"); String label = visualParams.getString("label");
...@@ -599,6 +612,7 @@ public class DPSubServiceImpl { ...@@ -599,6 +612,7 @@ public class DPSubServiceImpl {
label = label + "(" + displayName + ")"; label = label + "(" + displayName + ")";
} }
attachmentUploadDatasObj.put("label", label); attachmentUploadDatasObj.put("label", label);
attachmentUploadDatasObj.put("useThumb", true);
if (accept.equals(".*") || accept.contains("doc") || accept.contains("docx") || accept.contains("pdf") || accept.contains("xls") || accept.contains("xlsx")){ if (accept.equals(".*") || accept.contains("doc") || accept.contains("docx") || accept.contains("pdf") || accept.contains("xls") || accept.contains("xlsx")){
attachmentUploadDatasObj.put("type", "file"); attachmentUploadDatasObj.put("type", "file");
} else if(accept.contains("png") || accept.contains("img")){ } else if(accept.contains("png") || accept.contains("img")){
...@@ -628,6 +642,24 @@ public class DPSubServiceImpl { ...@@ -628,6 +642,24 @@ public class DPSubServiceImpl {
jsonObject.put("value", ((JSONObject) z).getString("nameKey")); jsonObject.put("value", ((JSONObject) z).getString("nameKey"));
}); });
} }
} else if ("radio".equals(xObj.getString("componentKey"))) {
if (!ValidationUtil.isEmpty(visualParams.getJSONObject("api"))){
ResponseModel checkboxResult = this.getApiResult(visualParams.getJSONObject("api"), null);
if (!ValidationUtil.isEmpty(checkboxResult) && checkboxResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
List<Object> collect = ((JSONArray) checkboxResult.getResult()).stream().filter(y -> ((JSONArray) value).contains(JsonValueUtils.getValueByKey(y, "valueKey", "valueKey"))).collect(Collectors.toList());
String nameKey = collect.stream().map(item -> ((JSONObject) item).getString("nameKey")).collect(Collectors.joining("、"));
jsonObject.put("value", nameKey);
}
} else if(!ValidationUtil.isEmpty(value) && !ValidationUtil.isEmpty(visualParams.get("data"))){
JSONArray data = visualParams.getJSONArray("data");
Map<String, String> fieldMap = IntStream.range(0, data.size())
.mapToObj(index -> data.getJSONObject(index))
.collect(Collectors.toMap(
json -> json.getString("value"),
json -> json.getString("name")
));
jsonObject.put("value", fieldMap.get(value));
}
} }
} }
if (!("upload".equals(xObj.getString("componentKey")) || "attachmentUpload".equals(xObj.getString("componentKey")))){ if (!("upload".equals(xObj.getString("componentKey")) || "attachmentUpload".equals(xObj.getString("componentKey")))){
......
...@@ -2,13 +2,13 @@ package com.yeejoin.amos.boot.module.statistcs.biz.service.impl; ...@@ -2,13 +2,13 @@ package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import cn.hutool.core.date.DateField; import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.dto.CountDto; import com.yeejoin.amos.boot.biz.common.dto.CountDto;
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.common.api.dto.DPFilterParamForDetailDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto; import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto;
import com.yeejoin.amos.boot.module.common.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.common.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.common.api.enums.NoticBusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto; import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto; import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto;
import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum; import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum;
...@@ -581,17 +581,17 @@ public class JGDPStatisticsServiceImpl { ...@@ -581,17 +581,17 @@ public class JGDPStatisticsServiceImpl {
private CountDto getGreenStatusCompany(DPFilterParamDto dpFilterParamDto) { private CountDto getGreenStatusCompany(DPFilterParamDto dpFilterParamDto) {
CountDto countDto = new CountDto(); CountDto countDto = new CountDto();
countDto.setLongValue(this.countCompanyByOperatingStatus(dpFilterParamDto, "在业")); countDto.setLongValue(this.countCompanyByOperatingStatus(dpFilterParamDto, "在业","开业", "迁入"));
countDto.setLabel("正常在业"); countDto.setLabel("正常在业、开业、迁入");
return countDto; return countDto;
} }
private long countCompanyByOperatingStatus(DPFilterParamDto dpFilterParamDto, String operatingStatus) { private long countCompanyByOperatingStatus(DPFilterParamDto dpFilterParamDto, String... operatingStatus) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCode == null) { if (orgCode == null) {
return 0L; return 0L;
} }
return enterpriseInfoMapper.countByOperatingStatusAndOrgCode(orgCode, operatingStatus, dpFilterParamDto.getCityCode()); return enterpriseInfoMapper.countByOperatingStatusAndOrgCode(orgCode,Arrays.stream(operatingStatus).collect(Collectors.toList()), dpFilterParamDto.getCityCode());
} }
private Map<String, CountDto> countUserNum(DPFilterParamDto dpFilterParamDto) { private Map<String, CountDto> countUserNum(DPFilterParamDto dpFilterParamDto) {
...@@ -631,14 +631,25 @@ public class JGDPStatisticsServiceImpl { ...@@ -631,14 +631,25 @@ public class JGDPStatisticsServiceImpl {
this.setDefaultFilter(dpFilterParamDto); this.setDefaultFilter(dpFilterParamDto);
result.put("xdata", Arrays.asList("安装告知", "监督检验", "使用登记", "定期检验", "变更登记", "注销报废")); result.put("xdata", Arrays.asList("安装告知", "监督检验", "使用登记", "定期检验", "变更登记", "注销报废"));
List<Long> ydata = this.countBizFinishedNum(dpFilterParamDto); List<Long> ydata = this.countBizFinishedNum(dpFilterParamDto);
Long allFinishedCount = ydata.stream().mapToLong(e -> e).sum(); Long allFinishedCount = this.calEveryAll(dpFilterParamDto, ydata).stream().mapToLong(e -> e).sum();
result.put("ydata", ydata); result.put("ydata", this.calEveryAll(dpFilterParamDto, ydata));
result.put("allCount", allFinishedCount); result.put("allCount", allFinishedCount);
result.put("percentData", this.calEveryPercent(dpFilterParamDto, ydata)); result.put("percentData", this.calEveryPercent(dpFilterParamDto, ydata));
result.put("completionRate", this.calPercentForBizCycleData(dpFilterParamDto, allFinishedCount)); result.put("completionRate", this.calPercentForBizCycleData(dpFilterParamDto, allFinishedCount));
return result; return result;
} }
private List<Long> calEveryAll(DPFilterParamDto dpFilterParamDto, List<Long> everyFinished) {
List<Long> everyInFlow = countBizDataInFlowing(dpFilterParamDto);
List<Long> allArray = new ArrayList<>();
for (int i = 0; i < everyInFlow.size(); i++) {
Long flowIng = everyInFlow.get(i);
Long finished = everyFinished.get(i);
allArray.add(flowIng+finished);
}
return allArray;
}
private List<String> calEveryPercent(DPFilterParamDto dpFilterParamDto, List<Long> everyFinished) { private List<String> calEveryPercent(DPFilterParamDto dpFilterParamDto, List<Long> everyFinished) {
List<Long> everyInFlow = countBizDataInFlowing(dpFilterParamDto); List<Long> everyInFlow = countBizDataInFlowing(dpFilterParamDto);
List<String> percentArray = new ArrayList<>(); List<String> percentArray = new ArrayList<>();
...@@ -650,8 +661,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -650,8 +661,7 @@ public class JGDPStatisticsServiceImpl {
BigDecimal all = flowIngBig.add(finishedBig); BigDecimal all = flowIngBig.add(finishedBig);
if (all.compareTo(BigDecimal.ZERO) > 0) { if (all.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal percent = finishedBig.divide(all, 2, RoundingMode.HALF_UP); BigDecimal percent = finishedBig.divide(all, 2, RoundingMode.HALF_UP);
BigDecimal percentX100 = percent.multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP); percentArray.add(percent.toPlainString());
percentArray.add(percentX100.toPlainString());
} else { } else {
percentArray.add("0"); percentArray.add("0");
} }
...@@ -717,7 +727,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -717,7 +727,7 @@ public class JGDPStatisticsServiceImpl {
boolMust.must(QueryBuilders.termsQuery("EQU_LIST_CODE", StCommonServiceImpl.getEquipmentCategory().stream().map(EquipmentCategoryDto::getCode).collect(Collectors.toList()))); boolMust.must(QueryBuilders.termsQuery("EQU_LIST_CODE", StCommonServiceImpl.getEquipmentCategory().stream().map(EquipmentCategoryDto::getCode).collect(Collectors.toList())));
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
builder.query(boolMust); builder.query(boolMust);
TermsAggregationBuilder aggregationBuilder = AggregationBuilders.terms("EQU_STATE_COUNT").field("EQU_STATE").size(20); TermsAggregationBuilder aggregationBuilder = AggregationBuilders.terms("EQU_STATE_COUNT").field("EQU_STATE").size(20).missing(EquimentEnum.WEIDENGJI.getCode());
builder.aggregation(aggregationBuilder); builder.aggregation(aggregationBuilder);
builder.size(0); builder.size(0);
request.source(builder); request.source(builder);
...@@ -730,7 +740,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -730,7 +740,7 @@ public class JGDPStatisticsServiceImpl {
long docCount = bucket.getDocCount(); long docCount = bucket.getDocCount();
dataMap.put(category, docCount); dataMap.put(category, docCount);
} }
resultList = Arrays.stream(EquimentEnum.values()).filter(e -> e.getCode() > 0).map(e -> { resultList = Arrays.stream(EquimentEnum.values()).map(e -> {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("name", e.getName()); map.put("name", e.getName());
map.put("value", dataMap.getOrDefault(e.getCode().toString(), 0L)); map.put("value", dataMap.getOrDefault(e.getCode().toString(), 0L));
...@@ -1417,7 +1427,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -1417,7 +1427,7 @@ public class JGDPStatisticsServiceImpl {
// 2.压力管道长度统计 // 2.压力管道长度统计
stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode); stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode);
// 3.已纳管设备总数 // 3.已纳管设备总数
this.staticsCenterMapCountDataForEquipIsManage(result, orgCode); this.staticsCenterMapCountDataForEquipIsManage(result);
// 4.登记证总数 // 4.登记证总数
this.staticsCenterMapCountCertificate(result, orgCode); this.staticsCenterMapCountCertificate(result, orgCode);
// 5.超过15年电梯数量 // 5.超过15年电梯数量
...@@ -1459,30 +1469,14 @@ public class JGDPStatisticsServiceImpl { ...@@ -1459,30 +1469,14 @@ public class JGDPStatisticsServiceImpl {
result.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), num); result.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), num);
} }
private void staticsCenterMapCountDataForEquipIsManage(Map<String, Object> result, String orgCode) { private void staticsCenterMapCountDataForEquipIsManage(Map<String, Object> result) {
long num = 0; result.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), result.get(DPMapStatisticsItemEnum.TOTAL.getCode()));
CountRequest request = new CountRequest(); result.remove(DPMapStatisticsItemEnum.TOTAL.getCode());
request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));
// 只统计已纳管设备
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
// 且8大类,目的去掉脏数据
boolMust.must(QueryBuilders.termsQuery("EQU_LIST_CODE", StCommonServiceImpl.getEquipmentCategory().stream().map(EquipmentCategoryDto::getCode).collect(Collectors.toList())));
request.query(boolMust);
try {
CountResponse response = restHighLevelClient.count(request, RequestOptions.DEFAULT);
num = response.getCount();
} catch (IOException e) {
throw new RuntimeException(e);
}
result.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), num);
} }
public List<Map<String, Object>> JGCenterMapCountForOverview(DPFilterParamDto dpFilterParamDto) { public List<Map<String, Object>> JGCenterMapCountForOverview(DPFilterParamDto dpFilterParamDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamDto); List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamDto);
List<Map<String, Object>> result = regionModels.parallelStream().map(r -> { return regionModels.parallelStream().map(r -> {
DPFilterParamDto filterParamDto = new DPFilterParamDto(); DPFilterParamDto filterParamDto = new DPFilterParamDto();
filterParamDto.setCityCode(r.getRegionCode().toString()); filterParamDto.setCityCode(r.getRegionCode().toString());
Map<String, Object> itemResult = JGCenterMapCountForGlobal(filterParamDto); Map<String, Object> itemResult = JGCenterMapCountForGlobal(filterParamDto);
...@@ -1490,7 +1484,6 @@ public class JGDPStatisticsServiceImpl { ...@@ -1490,7 +1484,6 @@ public class JGDPStatisticsServiceImpl {
itemResult.put("regionName", r.getRegionName()); itemResult.put("regionName", r.getRegionName());
return itemResult; return itemResult;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return result;
} }
public List<Map<String, Object>> noticeList(DPFilterParamDto dpFilterParamDto) { public List<Map<String, Object>> noticeList(DPFilterParamDto dpFilterParamDto) {
...@@ -1579,12 +1572,11 @@ public class JGDPStatisticsServiceImpl { ...@@ -1579,12 +1572,11 @@ public class JGDPStatisticsServiceImpl {
BigDecimal all = everyNum.add(finishedNum); BigDecimal all = everyNum.add(finishedNum);
if (all.compareTo(BigDecimal.ZERO) > 0) { if (all.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal percent = finishedNum.divide(all, 2, RoundingMode.HALF_UP); BigDecimal percent = finishedNum.divide(all, 2, RoundingMode.HALF_UP);
BigDecimal percentX100 = percent.multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP); itemResult.put("percentData", percent.toPlainString());
itemResult.put("percentData", percentX100.toPlainString());
} else { } else {
itemResult.put("percentData", "0"); itemResult.put("percentData", "0");
} }
itemResult.put("finishedNum", finishedNum); itemResult.put("finishedNum", all);
return itemResult; return itemResult;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -1661,4 +1653,34 @@ public class JGDPStatisticsServiceImpl { ...@@ -1661,4 +1653,34 @@ public class JGDPStatisticsServiceImpl {
} }
return maps; return maps;
} }
public List<Map<String,Object>> noticeListBusinessType(DPFilterParamForDetailDto dpFilterParamDto) {
List<HashMap<String, Object>> enumList = NoticBusinessTypeEnum.getEnumList();
List<Map<String,Object>> result = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
map.put("title","业务类型");
map.put("value","0");
map.put("children",enumList);
result.add(map);
return result;
}
public Page<Map<String, Object>> noticeDetailList(Page<Map<String, Object>> page, DPFilterParamForDetailDto dpFilterParamDto) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCode == null) {
return new Page<>();
}
String time = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
if(NoticBusinessTypeEnum.AZ.getCode().equals(dpFilterParamDto.getTreeValue())){
return jgStatisticsMapper.selectAZNoticeDetailList(page,orgCode, time, dpFilterParamDto);
}else if(NoticBusinessTypeEnum.WX.getCode().equals(dpFilterParamDto.getTreeValue())){
return jgStatisticsMapper.selectWXNoticeDetailList(page,orgCode, time, dpFilterParamDto);
}else if(NoticBusinessTypeEnum.GZ.getCode().equals(dpFilterParamDto.getTreeValue())){
return jgStatisticsMapper.selectGZNoticeDetailList(page,orgCode, time, dpFilterParamDto);
}else if(NoticBusinessTypeEnum.YZ.getCode().equals(dpFilterParamDto.getTreeValue())){
return jgStatisticsMapper.selectYZNoticeDetailList(page,orgCode, time, dpFilterParamDto);
}else {
return jgStatisticsMapper.selectNoticeDetailList(page,orgCode, time, dpFilterParamDto);
}
}
} }
...@@ -623,7 +623,7 @@ public class JYJCDPStatisticsServiceImpl { ...@@ -623,7 +623,7 @@ public class JYJCDPStatisticsServiceImpl {
long currentDayAfter30DayTime = DateUtil.offsetDay(DateUtil.parse(DateUtil.today(), "yyy-MM-dd"), 30).getTime(); long currentDayAfter30DayTime = DateUtil.offsetDay(DateUtil.parse(DateUtil.today(), "yyy-MM-dd"), 30).getTime();
boolMust.must(QueryBuilders.rangeQuery("NEXT_INSPECT_DATE").gte(currentDayTime).lte(currentDayAfter30DayTime)); boolMust.must(QueryBuilders.rangeQuery("NEXT_INSPECT_DATE").gte(currentDayTime).lte(currentDayAfter30DayTime));
if(StrUtil.isNotEmpty(dpFilterParamForDetailDto.getTreeValue())) { if(StrUtil.isNotEmpty(dpFilterParamForDetailDto.getTreeValue()) && !"0".equals(dpFilterParamForDetailDto.getTreeValue())) {
boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", dpFilterParamForDetailDto.getTreeValue())); boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", dpFilterParamForDetailDto.getTreeValue()));
}else{ }else{
// 且8大类,目的去掉脏数据 // 且8大类,目的去掉脏数据
...@@ -661,7 +661,7 @@ public class JYJCDPStatisticsServiceImpl { ...@@ -661,7 +661,7 @@ public class JYJCDPStatisticsServiceImpl {
long currentDayTime = DateUtil.parse(DateUtil.now(), "yyy-MM-dd").getTime(); long currentDayTime = DateUtil.parse(DateUtil.now(), "yyy-MM-dd").getTime();
boolMust.must(QueryBuilders.rangeQuery("NEXT_INSPECT_DATE").lt(currentDayTime)); boolMust.must(QueryBuilders.rangeQuery("NEXT_INSPECT_DATE").lt(currentDayTime));
if(StrUtil.isNotEmpty(dpFilterParamForDetailDto.getTreeValue())) { if(StrUtil.isNotEmpty(dpFilterParamForDetailDto.getTreeValue()) && !"0".equals(dpFilterParamForDetailDto.getTreeValue())) {
boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", dpFilterParamForDetailDto.getTreeValue())); boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", dpFilterParamForDetailDto.getTreeValue()));
}else{ }else{
// 且8大类,目的去掉脏数据 // 且8大类,目的去掉脏数据
......
...@@ -245,7 +245,8 @@ public class StCommonServiceImpl { ...@@ -245,7 +245,8 @@ public class StCommonServiceImpl {
// 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量 // 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
if(bucket.getKeyAsString().equals(EquipmentClassifityEnum.YLRQ.getCode())){ if(bucket.getKeyAsString().equals(EquipmentClassifityEnum.YLRQ.getCode())){
countMap.put(bucket.getKeyAsString(), bucket.getDocCount() - cylinderNum); countMap.put(bucket.getKeyAsString(), bucket.getDocCount() - cylinderNum);
} else { } else if(!bucket.getKeyAsString().equals(EquipmentClassifityEnum.YLGD.getCode())) {
// 压力管道单独统计,求总数时,不包括压力管道
countMap.put(bucket.getKeyAsString(), bucket.getDocCount()); countMap.put(bucket.getKeyAsString(), bucket.getDocCount());
} }
} }
...@@ -254,7 +255,8 @@ public class StCommonServiceImpl { ...@@ -254,7 +255,8 @@ public class StCommonServiceImpl {
equipmentCategoryDtos.forEach(c -> { equipmentCategoryDtos.forEach(c -> {
result.put(this.castCategoryCode2WebCode(c.getCode()), countMap.getOrDefault(c.getCode(), 0L)); result.put(this.castCategoryCode2WebCode(c.getCode()), countMap.getOrDefault(c.getCode(), 0L));
}); });
result.put(DPMapStatisticsItemEnum.TOTAL.getCode(), countMap.values().stream().mapToLong(e -> e).sum() + cylinderNum); // 注意,求总数时:countMap不包括气瓶数量、压力管道数量(20240819修改)
result.put(DPMapStatisticsItemEnum.TOTAL.getCode(), countMap.values().stream().mapToLong(e -> e).sum());
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -400,7 +400,7 @@ public class YJDPStatisticsServiceImpl { ...@@ -400,7 +400,7 @@ public class YJDPStatisticsServiceImpl {
public Map<String, Object> getCenterMapCountDataForGlobal(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> getCenterMapCountDataForGlobal(DPFilterParamDto dpFilterParamDto) {
this.setDefaultFilter(dpFilterParamDto); // this.setDefaultFilter(dpFilterParamDto);
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto);
if (StringUtils.isNotEmpty(orgCode)) { if (StringUtils.isNotEmpty(orgCode)) {
return this.getCenterMapOverviewData(orgCode, dpFilterParamDto); return this.getCenterMapOverviewData(orgCode, dpFilterParamDto);
......
...@@ -12,12 +12,14 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto; ...@@ -12,12 +12,14 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertStatistics; import com.yeejoin.amos.boot.module.common.api.entity.AlertStatistics;
import com.yeejoin.amos.boot.module.common.api.enums.UnitTypeEnum; import com.yeejoin.amos.boot.module.common.api.enums.UnitTypeEnum;
import com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum; import com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum;
import com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper; import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper; import com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.vo.EquCategoryVo; import com.yeejoin.amos.boot.module.statistics.api.vo.EquCategoryVo;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory; import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.apache.commons.compress.utils.Lists; import org.apache.commons.compress.utils.Lists;
...@@ -37,6 +39,8 @@ import org.elasticsearch.search.aggregations.Aggregations; ...@@ -37,6 +39,8 @@ import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -71,6 +75,9 @@ public class ZLDPStatisticsServiceImpl { ...@@ -71,6 +75,9 @@ public class ZLDPStatisticsServiceImpl {
// 设备纳管 纳管:true 未纳管:false // 设备纳管 纳管:true 未纳管:false
public static final String IS_INTO_MANAGEMENT = "IS_INTO_MANAGEMENT"; public static final String IS_INTO_MANAGEMENT = "IS_INTO_MANAGEMENT";
@Value("classpath:/json/equipCategory.json")
private Resource equipCategory;
public ZLDPStatisticsServiceImpl(ZLStatisticsMapper screenMapper, DataDictionaryServiceImpl iDataDictionaryService, AlertStatisticsMapper alertStatisticsMapper, RestHighLevelClient restHighLevelClient, StCommonServiceImpl stCommonService, EquipmentCategoryMapper equipmentCategoryMapper) { public ZLDPStatisticsServiceImpl(ZLStatisticsMapper screenMapper, DataDictionaryServiceImpl iDataDictionaryService, AlertStatisticsMapper alertStatisticsMapper, RestHighLevelClient restHighLevelClient, StCommonServiceImpl stCommonService, EquipmentCategoryMapper equipmentCategoryMapper) {
this.screenMapper = screenMapper; this.screenMapper = screenMapper;
this.iDataDictionaryService = iDataDictionaryService; this.iDataDictionaryService = iDataDictionaryService;
...@@ -685,8 +692,8 @@ public class ZLDPStatisticsServiceImpl { ...@@ -685,8 +692,8 @@ public class ZLDPStatisticsServiceImpl {
public Map<String, Object> getEquipManagementRateStatistics(DPFilterParamForDetailDto paramDto) { public Map<String, Object> getEquipManagementRateStatistics(DPFilterParamForDetailDto paramDto) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
List<Map<String, Object>> legendData = new ArrayList<>(); List<Map<String, Object>> legendData = new ArrayList<>();
legendData.add(createLegend("设备总数", "equipTotal", "bar")); legendData.add(createLegend("设备总数", "equipTotal", "bar", "个"));
legendData.add(createLegend("纳管率", "claimRate", "line")); legendData.add(createLegend("纳管率", "claimRate", "line", "%"));
List<RegionModel> regionList = stCommonService.setRegionIfRootParentAndNoAccessIf3Level("610000"); List<RegionModel> regionList = stCommonService.setRegionIfRootParentAndNoAccessIf3Level("610000");
// 获取区域名称并过滤 // 获取区域名称并过滤
...@@ -746,11 +753,12 @@ public class ZLDPStatisticsServiceImpl { ...@@ -746,11 +753,12 @@ public class ZLDPStatisticsServiceImpl {
} }
} }
private Map<String, Object> createLegend(String value, String dataKey, String chartType) { private Map<String, Object> createLegend(String value, String dataKey, String chartType, String unit) {
return new HashMap<String, Object>() {{ return new HashMap<String, Object>() {{
put("value", value); put("value", value);
put("dataKey", dataKey); put("dataKey", dataKey);
put("chartType", chartType); put("chartType", chartType);
put("unit", unit);
}}; }};
} }
...@@ -841,8 +849,11 @@ public class ZLDPStatisticsServiceImpl { ...@@ -841,8 +849,11 @@ public class ZLDPStatisticsServiceImpl {
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("EQU_LIST_CODE")); if ("2300".equals(map.getString("EQU_LIST_CODE"))) {
meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST_CODE", test)); meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY_CODE", QueryParser.escape(map.getString("EQU_LIST_CODE"))));
} else {
meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST_CODE", QueryParser.escape(map.getString("EQU_LIST_CODE"))));
}
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_LIST"))) {
...@@ -953,25 +964,42 @@ public class ZLDPStatisticsServiceImpl { ...@@ -953,25 +964,42 @@ public class ZLDPStatisticsServiceImpl {
query.must(QueryBuilders.matchPhraseQuery("USE_UNIT_NAME", "*" + test + "*")); query.must(QueryBuilders.matchPhraseQuery("USE_UNIT_NAME", "*" + test + "*"));
boolMust.must(query); boolMust.must(query);
} }
if (!ObjectUtils.isEmpty(paramDto.getTreeValue())) { if (!ObjectUtils.isEmpty(paramDto.getTreeValue())) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); if ("2300".equals(paramDto.getTreeValue())) {
String test = QueryParser.escape(paramDto.getTreeValue()); if (paramDto.getEquCategoryCode() != null) {
meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST_CODE", test)); // treeValue 为 "2300" 且 equCategoryCode 非空时
boolMust.must(meBuilder); BoolQueryBuilder query = QueryBuilders.boolQuery();
String escapedValue = QueryParser.escape(paramDto.getEquCategoryCode());
query.must(QueryBuilders.matchPhraseQuery("EQU_DEFINE_CODE", escapedValue));
boolMust.must(query);
} else {
// treeValue 为 "2300" 且 equCategoryCode 为空时
BoolQueryBuilder query = QueryBuilders.boolQuery();
String escapedValue = QueryParser.escape(paramDto.getTreeValue());
query.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY_CODE", escapedValue));
boolMust.must(query);
} }
} else {
// treeValue 不为 "2300" 时
BoolQueryBuilder query = QueryBuilders.boolQuery();
String escapedValue = QueryParser.escape(paramDto.getTreeValue());
query.must(QueryBuilders.matchPhraseQuery("EQU_LIST_CODE", escapedValue));
if (!ObjectUtils.isEmpty(paramDto.getEquCategoryCode())) { // 处理 equCategoryCode 为空的情况
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); if (paramDto.getEquCategoryCode() != null) {
String test = QueryParser.escape(paramDto.getEquCategoryCode()); escapedValue = QueryParser.escape(paramDto.getEquCategoryCode());
meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY_CODE", test)); query.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY_CODE", escapedValue));
boolMust.must(meBuilder); }
boolMust.must(query);
}
} }
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String param = QueryParser.escape("true"); String param = QueryParser.escape("true");
pBuilder.must(QueryBuilders.matchQuery(IS_INTO_MANAGEMENT, param)); pBuilder.must(QueryBuilders.matchQuery(IS_INTO_MANAGEMENT, param));
boolMust.must(pBuilder); boolMust.must(pBuilder);
boolMust.must(QueryBuilders.termsQuery("EQU_LIST_CODE",
StCommonServiceImpl.getEquipmentCategory().stream().map(EquipmentCategoryDto::getCode).collect(Collectors.toList())));
builder.query(boolMust); builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC); builder.sort("REC_DATE", SortOrder.DESC);
...@@ -1015,4 +1043,26 @@ public class ZLDPStatisticsServiceImpl { ...@@ -1015,4 +1043,26 @@ public class ZLDPStatisticsServiceImpl {
.map(dto -> new EquCategoryVo(dto.getName(), dto.getCode(), null)) .map(dto -> new EquCategoryVo(dto.getName(), dto.getCode(), null))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
public List<Map<String, Object>> equipTree(String type) {
List<Map<String, Object>> menus = new ArrayList<>();
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(equipCategory);
List<Map<String, Object>> mapList;
if (ValidationUtil.isEmpty(type)) {
mapList = resourceJson.get(EquipmentClassifityEnum.BDLS.getCode());
} else {
if ("QTBF".equals(type)) {
type = "superviseBusiness";
}
mapList = resourceJson.get(type) == null ? resourceJson.get(EquipmentClassifityEnum.BDLS.getCode()) : resourceJson.get(type);
}
for (Map map : mapList) {
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("instanceName", map.get("name"));
resultMap.put("instanceId", map.get("code"));
resultMap.put("image", map.get("imageUrl"));
menus.add(resultMap);
}
return menus;
}
} }
package com.yeejoin.amos.boot.module.statistcs.biz.utils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.io.IOUtils;
import org.springframework.core.io.Resource;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Map;
public class JsonUtils {
//将json文件转化为Map<list<Map<>>>
public static Map getResourceJson(Resource resource) {
String json = null;
try {
json = IOUtils.toString(resource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new RuntimeException(resource + "json文件转化失败");
}
return JSONObject.parseObject(json, Map.class);
}
}
{
"__eightCategory__": "设备一码通总览使用",
"eightCategory": [
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"imageUrl": "upload/tzs/common/image/监管电梯.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "elevator"
},
{
"name": "起重机械",
"code": "4000",
"image": "upload/tzs/common/image/总览起重机械.png",
"imageUrl": "upload/tzs/common/image/监管起重机械.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "lifting"
},
{
"name": "场(厂)内专用机动车辆",
"code": "5000",
"image": "upload/tzs/common/image/总览厂车.png",
"imageUrl": "upload/tzs/common/image/监管厂车.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vehicle"
},
{
"name": "大型游乐设施",
"code": "6000",
"image": "upload/tzs/common/image/总览游乐设施.png",
"imageUrl": "upload/tzs/common/image/监管游乐设施.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "rides"
},
{
"name": "客运索道",
"code": "9000",
"image": "upload/tzs/common/image/总览索道.png",
"imageUrl": "upload/tzs/common/image/监管索道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "ropeway"
},
{
"name": "锅炉",
"code": "1000",
"image": "upload/tzs/common/image/总览锅炉.png",
"imageUrl": "upload/tzs/common/image/监管锅炉.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "boiler"
},
{
"name": "压力容器",
"code": "2000",
"image": "upload/tzs/common/image/总览压力容器.png",
"imageUrl": "upload/tzs/common/image/监管压力容器.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vessel"
},
{
"name": "压力管道",
"code": "8000",
"image": "upload/tzs/common/image/总览压力管道.png",
"imageUrl": "upload/tzs/common/image/监管压力管道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "pipeline"
},
{
"name": "气瓶",
"code": "2300",
"image": "upload/tzs/common/image/总览压力容器.png",
"imageUrl": "upload/tzs/common/image/监管压力容器.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "cylinder"
}
],
"__other__": "监管业务使用",
"other": [
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"imageUrl": "upload/tzs/common/image/监管电梯.png"
},
{
"name": "起重机械",
"code": "4000",
"image": "upload/tzs/common/image/总览起重机械.png",
"imageUrl": "upload/tzs/common/image/监管起重机械.png"
},
{
"name": "场(厂)内专用机动车辆",
"code": "5000",
"image": "upload/tzs/common/image/总览厂车.png",
"imageUrl": "upload/tzs/common/image/监管厂车.png"
},
{
"name": "锅炉",
"code": "1000",
"image": "upload/tzs/common/image/总览锅炉.png",
"imageUrl": "upload/tzs/common/image/监管锅炉.png"
},
{
"name": "压力容器",
"code": "2000",
"image": "upload/tzs/common/image/总览压力容器.png",
"imageUrl": "upload/tzs/common/image/监管压力容器.png"
},
{
"name": "压力管道",
"code": "8000",
"image": "upload/tzs/common/image/总览压力管道.png",
"imageUrl": "upload/tzs/common/image/监管压力管道.png"
},
{
"name": "大型游乐设施",
"code": "6000",
"image": "upload/tzs/common/image/总览游乐设施.png",
"imageUrl": "upload/tzs/common/image/监管游乐设施.png"
},
{
"name": "客运索道",
"code": "9000",
"image": "upload/tzs/common/image/总览索道.png",
"imageUrl": "upload/tzs/common/image/监管索道.png"
}
],
"__superviseBusiness__": "监管业务-启停注销使用",
"superviseBusiness": [
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"imageUrl": "upload/tzs/common/image/监管电梯.png"
},
{
"name": "起重机械",
"code": "4000",
"image": "upload/tzs/common/image/总览起重机械.png",
"imageUrl": "upload/tzs/common/image/监管起重机械.png"
},
{
"name": "场(厂)内专用机动车辆",
"code": "5000",
"image": "upload/tzs/common/image/总览厂车.png",
"imageUrl": "upload/tzs/common/image/监管厂车.png"
},
{
"name": "锅炉",
"code": "1000",
"image": "upload/tzs/common/image/总览锅炉.png",
"imageUrl": "upload/tzs/common/image/监管锅炉.png"
},
{
"name": "压力容器",
"code": "2000",
"image": "upload/tzs/common/image/总览压力容器.png",
"imageUrl": "upload/tzs/common/image/监管压力容器.png"
},
{
"name": "压力管道",
"code": "8000",
"image": "upload/tzs/common/image/总览压力管道.png",
"imageUrl": "upload/tzs/common/image/监管压力管道.png"
},
{
"name": "大型游乐设施",
"code": "6000",
"image": "upload/tzs/common/image/总览游乐设施.png",
"imageUrl": "upload/tzs/common/image/监管游乐设施.png"
},
{
"name": "客运索道",
"code": "9000",
"image": "upload/tzs/common/image/总览索道.png",
"imageUrl": "upload/tzs/common/image/监管索道.png"
}
],
"__supervise__": "检验检测使用",
"supervise": [
{
"name": "锅炉",
"code": "1000",
"image": "upload/tzs/common/image/总览锅炉.png",
"imageUrl": "upload/tzs/common/image/监管锅炉.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "boiler"
},
{
"name": "压力容器",
"code": "2000",
"image": "upload/tzs/common/image/总览压力容器.png",
"imageUrl": "upload/tzs/common/image/监管压力容器.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vessel"
},
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"imageUrl": "upload/tzs/common/image/监管电梯.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "elevator"
},
{
"name": "客运索道",
"code": "9000",
"image": "upload/tzs/common/image/总览索道.png",
"imageUrl": "upload/tzs/common/image/监管索道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "ropeway"
},
{
"name": "大型游乐设施",
"code": "6000",
"image": "upload/tzs/common/image/总览游乐设施.png",
"imageUrl": "upload/tzs/common/image/监管游乐设施.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "rides"
}
],
"__SCJY__": "检验检测使用",
"SCJY": [
{
"name": "起重机械",
"code": "4000",
"image": "upload/tzs/common/image/总览起重机械.png",
"imageUrl": "upload/tzs/common/image/监管起重机械.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "lifting"
},
{
"name": "场(厂)内专用机动车辆",
"code": "5000",
"image": "upload/tzs/common/image/总览厂车.png",
"imageUrl": "upload/tzs/common/image/监管厂车.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vehicle"
}
],
"__DQJY__": "检验检测使用",
"DQJY": [
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"imageUrl": "upload/tzs/common/image/监管电梯.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "elevator"
},
{
"name": "起重机械",
"code": "4000",
"image": "upload/tzs/common/image/总览起重机械.png",
"imageUrl": "upload/tzs/common/image/监管起重机械.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "lifting"
},
{
"name": "场(厂)内专用机动车辆",
"code": "5000",
"image": "upload/tzs/common/image/总览厂车.png",
"imageUrl": "upload/tzs/common/image/监管厂车.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vehicle"
},
{
"name": "锅炉",
"code": "1000",
"image": "upload/tzs/common/image/总览锅炉.png",
"imageUrl": "upload/tzs/common/image/监管锅炉.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "boiler"
},
{
"name": "压力容器",
"code": "2000",
"image": "upload/tzs/common/image/总览压力容器.png",
"imageUrl": "upload/tzs/common/image/监管压力容器.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vessel"
},
{
"name": "压力管道",
"code": "8000",
"image": "upload/tzs/common/image/总览压力管道.png",
"imageUrl": "upload/tzs/common/image/监管压力管道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "pipeline"
},
{
"name": "大型游乐设施",
"code": "6000",
"image": "upload/tzs/common/image/总览游乐设施.png",
"imageUrl": "upload/tzs/common/image/监管游乐设施.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "rides"
},
{
"name": "客运索道",
"code": "9000",
"image": "upload/tzs/common/image/总览索道.png",
"imageUrl": "upload/tzs/common/image/监管索道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "ropeway"
}
],
"__DTJC__": "检验检测使用",
"DTJC": [
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"imageUrl": "upload/tzs/common/image/监管电梯.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "elevator"
}
]
}
\ No newline at end of file
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -141,11 +143,11 @@ ...@@ -141,11 +143,11 @@
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -145,11 +147,11 @@ ...@@ -145,11 +147,11 @@
"problem": [] "problem": []
}, },
"keyParams_default": [ "keyParams_default": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
...@@ -159,7 +161,7 @@ ...@@ -159,7 +161,7 @@
{ "key": "USE_INNER_CODE", "label": "单位内编号" } { "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"keyParams_2300_true": [ "keyParams_2300_true": [
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
...@@ -169,7 +171,7 @@ ...@@ -169,7 +171,7 @@
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
], ],
"keyParams_2300_false": [ "keyParams_2300_false": [
{ "key": "EQU_TYPE", "label": "气瓶品种" }, { "key": "EQU_LIST", "label": "气瓶品种" },
{ "key": "PRODUCT_NAME", "label": "产品名称" }, { "key": "PRODUCT_NAME", "label": "产品名称" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -141,11 +143,11 @@ ...@@ -141,11 +143,11 @@
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -137,11 +139,11 @@ ...@@ -137,11 +139,11 @@
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -133,11 +135,11 @@ ...@@ -133,11 +135,11 @@
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -127,11 +129,11 @@ ...@@ -127,11 +129,11 @@
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -133,11 +135,11 @@ ...@@ -133,11 +135,11 @@
"problem": [] "problem": []
}, },
"keyParams_default": [ "keyParams_default": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
...@@ -147,7 +149,7 @@ ...@@ -147,7 +149,7 @@
{ "key": "USE_INNER_CODE", "label": "单位内编号" } { "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"keyParams_8300": [ "keyParams_8300": [
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
"dataConfig": { "dataConfig": {
"api": { "api": {
"httpMethod":"GET", "httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map", "apiPath":"/jg/equipment-register/{record}",
"params": { "params": {
"alias": "{EQU_LIST_CODE}", "record": "{record}"
"id": "{SEQUENCE_NBR}" },
"ruleData": {
"responseSuccess": "data.result.equipInfo"
} }
} }
} }
...@@ -133,11 +135,11 @@ ...@@ -133,11 +135,11 @@
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_LIST", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_DEFINE", "label": "设备品种", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "EQU_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
......
...@@ -77,6 +77,10 @@ ...@@ -77,6 +77,10 @@
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{principalUnit}", "title": "{principalUnit}",
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [ "keyParams": [
{ "key": "sourceType", "label": "隐患主体类型" }, { "key": "sourceType", "label": "隐患主体类型" },
{ "key": "problemType", "label": "隐患类型" }, { "key": "problemType", "label": "隐患类型" },
......
...@@ -80,7 +80,7 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -80,7 +80,7 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
* @param cityCode 区域code * @param cityCode 区域code
* @return Long 统计数量 * @return Long 统计数量
*/ */
Long countByOperatingStatusAndOrgCode(@Param("orgCode") String orgCode, @Param("operatingStatus") String operatingStatus, @Param("cityCode") String cityCode); Long countByOperatingStatusAndOrgCode(@Param("orgCode") String orgCode, @Param("operatingStatus") List<String> operatingStatus, @Param("cityCode") String cityCode);
List<TzBaseEnterpriseInfoDto> queryByUseCode(@Param("useCodes") List<String> useCode); List<TzBaseEnterpriseInfoDto> queryByUseCode(@Param("useCodes") List<String> useCode);
......
...@@ -223,7 +223,10 @@ ...@@ -223,7 +223,10 @@
where where
1=1 1=1
and ((supervise_org_code != '50' and supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (supervise_org_code = '50' and office_region LIKE CONCAT ('%', #{cityCode}, '%'))) and ((supervise_org_code != '50' and supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (supervise_org_code = '50' and office_region LIKE CONCAT ('%', #{cityCode}, '%')))
and operating_status = #{operatingStatus} and
<foreach collection="operatingStatus" item="status" separator="or" open="(" close=")">
operating_status = #{status}
</foreach>
and register_type !='个人主体' and register_type !='个人主体'
</select> </select>
<select id="queryByUseCode" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto"> <select id="queryByUseCode" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto">
......
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