Commit f8157667 authored by tianyiming's avatar tianyiming

大屏-检验检测业务管理下钻功能实现

parent 7b047300
......@@ -94,6 +94,8 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
Long countAllInFlowingForDPNoFinishedBizData(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto, @Param("businessType") String businessType);
Page<Map<String, Object>> getInspectDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto, @Param("businessType") String businessType);
Page<Map<String, Object>> getInspectBusinessList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto, @Param("businessType") String businessType);
}
......@@ -401,4 +401,66 @@
and a.inspection_type = #{businessType}
</if>
</select>
<select id="getInspectBusinessList" resultType="java.util.Map">
SELECT
tjia.sequence_nbr AS sequenceNbr,
CASE
WHEN tjia.inspection_type = 'DQJY' THEN
'定期检验'
WHEN tjia.inspection_type = 'SCJY' THEN
'首次检验'
WHEN tjia.inspection_type = 'AZJDJY' THEN
'安装监督检验'
WHEN tjia.inspection_type = 'GZJDJY' THEN
'改造监督检验'
WHEN tjia.inspection_type = 'WXJDJY' THEN
'维修监督检验'
WHEN tjia.inspection_type = 'DTJC' THEN
'电梯检测'
ELSE '其他'
END AS businessType,
tjia.application_unit_name AS unitName,
tjia.inspection_unit_name AS receiveOrgName,
tjia.application_date AS createDate,
tjia.accept_date AS handleDate,
GROUP_CONCAT ( DISTINCT ( SELECT NAME FROM tz_equipment_category WHERE code = ri.EQU_LIST ) ) AS equList,
GROUP_CONCAT ( DISTINCT ( SELECT NAME FROM tz_equipment_category WHERE code = ri.EQU_CATEGORY ) ) AS equCategory,
CASE
WHEN tjia.status = '6616' THEN
'已完成' ELSE '进行中'
END AS status,
tjia.status statusCode
FROM
"tz_jyjc_inspection_application" tjia
LEFT JOIN tz_base_enterprise_info tbei ON tjia.inspection_unit_code = tbei.use_unit_code
LEFT JOIN tz_jyjc_inspection_application_equip tjiae ON tjia.sequence_nbr = tjiae.application_seq
LEFT JOIN idx_biz_jg_register_info ri ON tjiae.equip_unicode = ri.RECORD
where
tjia.status != '6617' and
((tbei.supervise_org_code != '50' and tbei.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or
(tbei.supervise_org_code = '50' and tbei.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(tjia.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(tjia.accept_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
<if test="dto.superviseUnitName != null and dto.superviseUnitName != ''">
and inspection_unit_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
<if test="businessType !=null and businessType !=''">
and tjia.inspection_type = #{businessType}
</if>
<if test="dto.equListCode != null and dto.equListCode != ''">
and ri.EQU_LIST = #{dto.equListCode}
</if>
<if test="dto.equCategoryCode != null and dto.equCategoryCode != ''">
and ri.EQU_CATEGORY = #{dto.equCategoryCode}
</if>
group by tjia.sequence_nbr
order by tjia.application_date desc
</select>
</mapper>
......@@ -276,6 +276,16 @@ public class JYJCDPStatisticsController {
Page<Map<String, Object>> page = new Page<>(current, size);
return ResponseHelper.buildResponse(statisticsService.getInspectDetailList(dpFilterParamForDetailDto, page));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/inspectApplication/getInspectBusinessList")
@ApiOperation(httpMethod = "POST", value = "大屏检验检测业务管理下钻获取下部列表", notes = "大屏检验检测业务管理下钻获取下部列表")
public ResponseModel<Page<Map<String, Object>>> getInspectBusinessList(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto,
@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.getInspectBusinessList(dpFilterParamForDetailDto, page));
}
}
......
......@@ -867,11 +867,11 @@ public class JYJCDPStatisticsServiceImpl {
public List<Map<String, Object>> getBusinessType(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<HashMap<String, Object>> enumList = JYJCBusinessTypeEnum.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);
List<Map<String, Object>> result = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
map.put("title", "all".equals(dpFilterParamForDetailDto.getBusinessTypeCode()) ? "检验检测全部业务" : "业务类型");
map.put("value", "0");
map.put("children", enumList);
result.add(map);
return result;
}
......@@ -1104,4 +1104,26 @@ public class JYJCDPStatisticsServiceImpl {
}
return list;
}
public Page<Map<String, Object>> getInspectBusinessList(DPFilterParamForDetailDto dpFilterParamForDetailDto, Page<Map<String, Object>> page) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode());
DPFilterParamDto filterParamDto = new DPFilterParamDto();
filterParamDto.setCityCode(dpFilterParamForDetailDto.getCityCode());
filterParamDto.setCompanyName(dpFilterParamForDetailDto.getCompanyName());
filterParamDto.setSuperviseUnitName(dpFilterParamForDetailDto.getSuperviseUnitName());
filterParamDto.setEquListCode(dpFilterParamForDetailDto.getEquListCode());
filterParamDto.setEquCategoryCode(dpFilterParamForDetailDto.getEquCategoryCode());
if (null != dpFilterParamForDetailDto.getTimeSearchOne()) {
filterParamDto.setBeginDate(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate());
filterParamDto.setEndDate(dpFilterParamForDetailDto.getTimeSearchOne().getEndDate());
}
if(null != dpFilterParamForDetailDto.getTreeValue()){
if("0".equals(dpFilterParamForDetailDto.getTreeValue())){
Page<Map<String, Object>> maps = inspectionApplicationMapper.getInspectBusinessList(page, orgCode, filterParamDto, null);
return maps;
}
}
Page<Map<String, Object>> maps = inspectionApplicationMapper.getInspectBusinessList(page, orgCode, filterParamDto, dpFilterParamForDetailDto.getTreeValue());
return maps;
}
}
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