Commit 117a2ebc authored by 麻笑宇's avatar 麻笑宇

大屏监管施工情况列表增加下钻列表

parent f15848d7
...@@ -88,4 +88,9 @@ public class DPFilterParamForDetailDto { ...@@ -88,4 +88,9 @@ public class DPFilterParamForDetailDto {
*/ */
private String anomalyType; private String anomalyType;
/**
* 地址
*/
private String address;
} }
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;
}
}
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);
......
...@@ -465,6 +465,82 @@ ...@@ -465,6 +465,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 +840,84 @@ ...@@ -764,4 +840,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>
...@@ -306,6 +306,31 @@ public class JGDPStatisticsController { ...@@ -306,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) {
......
...@@ -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;
...@@ -1653,4 +1653,34 @@ public class JGDPStatisticsServiceImpl { ...@@ -1653,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);
}
}
} }
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