Commit 3cd25d40 authored by suhuiguang's avatar suhuiguang

1.修改单位过滤,解决韩城杨凌西咸独立后数据筛选问题

parent 489273ed
...@@ -20,10 +20,11 @@ public interface JyjcInspectionApplicationEquipMapper extends BaseMapper<JyjcIns ...@@ -20,10 +20,11 @@ public interface JyjcInspectionApplicationEquipMapper extends BaseMapper<JyjcIns
/** /**
* 检验检测次数统计维度按照设备种类、检验类型进行统计 * 检验检测次数统计维度按照设备种类、检验类型进行统计
* *
* @param dpFilterParamDto g过滤条件 * @param dpFilterParamDto 过滤条件时间
* @param orgCode 过滤条件区域对应的公司的orgCode
* @return 统计列表 * @return 统计列表
*/ */
List<InspectTimeCountDto> countInspectTimeCountByTypeAndEquList(DPFilterParamDto dpFilterParamDto); List<InspectTimeCountDto> countInspectTimeCountByTypeAndEquList(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto);
Integer inspectTimeCount(@Param("dpFilterParamDto") DPFilterParamDto dpFilterParamDto); Integer inspectTimeCount(@Param("dpFilterParamDto") DPFilterParamDto dpFilterParamDto);
} }
...@@ -21,31 +21,29 @@ ...@@ -21,31 +21,29 @@
c.equ_define, c.equ_define,
count(1) as num count(1) as num
from from
(SELECT (
ae.equ_list, SELECT
ae.equ_category, ae.equ_list,
ae.equ_define, ae.equ_category,
a.biz_type, ae.equ_define,
concat(u.PROVINCE,'#', u.CITY,'#', u.COUNTY) as areaCode a.biz_type,
FROM s.ORG_BRANCH_CODE as orgBranchCode
"tz_jyjc_inspection_application_equip" ae, FROM
tz_jyjc_inspection_application a, "tz_jyjc_inspection_application_equip" ae,
"idx_biz_jg_use_info" u tz_jyjc_inspection_application a,
where "idx_biz_jg_supervision_info" s
ae.equip_unicode = u."RECORD" where
and a.sequence_nbr = ae.application_seq s."RECORD" = ae.equip_unicode
and (a.application_date between #{beginDate} and #{endDate}) and a.sequence_nbr = ae.application_seq
and a.status='6616' and a.application_date between #{dto.beginDate} and #{dto.endDate}
and u."PROVINCE" <![CDATA[<>]]> '' and a.status='6616'
and u."CITY" <![CDATA[<>]]> '' ) c
and u."COUNTY" <![CDATA[<>]]> ''
) c
where where
c.areaCode like concat('%',#{cityCode}, '%') c.orgBranchCode like concat(#{orgCode}, '%')
group by c.biz_type, group by c.biz_type,
c.equ_list, c.equ_list,
c.equ_category, c.equ_category,
c.equ_define c.equ_define
</select> </select>
<select id="inspectTimeCount" resultType="java.lang.Integer"> <select id="inspectTimeCount" resultType="java.lang.Integer">
SELECT COUNT SELECT COUNT
......
...@@ -114,8 +114,9 @@ public class DPStatisticsServiceImpl { ...@@ -114,8 +114,9 @@ public class DPStatisticsServiceImpl {
} }
private void buildYData(Map<String, Object> result, List<BizTypeEnum> bizTypeEnums, DPFilterParamDto dpFilterParamDto, List<EquipmentCategoryDto> equipmentCategoryDtos) { private void buildYData(Map<String, Object> result, List<BizTypeEnum> bizTypeEnums, DPFilterParamDto dpFilterParamDto, List<EquipmentCategoryDto> equipmentCategoryDtos) {
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
// 待统计的数据本来sql可以单独统计,但是要求气瓶单独从压力容器里拎出来,与八大类同级,故java处理 // 待统计的数据本来sql可以单独统计,但是要求气瓶单独从压力容器里拎出来,与八大类同级,故java处理
List<InspectTimeCountDto> inspectTimeCountDtos = inspectionApplicationEquipMapper.countInspectTimeCountByTypeAndEquList(dpFilterParamDto); List<InspectTimeCountDto> inspectTimeCountDtos = inspectionApplicationEquipMapper.countInspectTimeCountByTypeAndEquList(orgCode,dpFilterParamDto);
bizTypeEnums.forEach(bizTypeEnum -> { bizTypeEnums.forEach(bizTypeEnum -> {
result.put(bizTypeEnum.getCode(), this.countNumByBizTypeAndEquList(equipmentCategoryDtos, bizTypeEnum.getCode(), inspectTimeCountDtos)); result.put(bizTypeEnum.getCode(), this.countNumByBizTypeAndEquList(equipmentCategoryDtos, bizTypeEnum.getCode(), inspectTimeCountDtos));
}); });
......
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