Commit 3cd25d40 authored by suhuiguang's avatar suhuiguang

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

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