Commit 904e14af authored by suhuiguang's avatar suhuiguang

1.检验检测大屏接口接口开发,增加检验人员、单位按照办公地点过滤,有监管机构时 优先监管

parent ac4071a9
......@@ -261,7 +261,7 @@ public class DPStatisticsServiceImpl {
}
regionCodeOrgCodeMap.put(dpFilterParamDto.getCityCode(), orgCode);
}
Long num = userInfoMapper.countUserByPostAndAreaCode(orgCode, "6552");
Long num = userInfoMapper.countUserByPostAndAreaCode(orgCode, "6552", dpFilterParamDto.getCityCode());
result.put(DPMapStatisticsItemEnum.OPERATORS.getCode(), num);
}
......
......@@ -22,5 +22,5 @@ public interface JyjcInspectionResultMapper extends BaseMapper<JyjcInspectionRes
Page<JyjcInspectionResultModel> selectForPage(@Param("page") Page<JyjcInspectionResultModel> page, @Param("jyjcInspectionResultModel") JyjcInspectionResultModel jyjcInspectionResultModel,@Param("identity") String identity);
List<InspectionTimelinesDto> queryInspectionTimelinessTopXX(@Param("top") String top,@Param("orgCode") String orgCode);
List<InspectionTimelinesDto> queryInspectionTimelinessTopXX(@Param("top") String top, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto);
}
package com.yeejoin.amos.boot.module.jyjc.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
......@@ -31,7 +32,8 @@ public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningAppl
/**
* 检验机构公示
* @param orgCode 区域对应的orgCode
* @param dpFilterParamDto 过滤条件
* @return List<PublicityInspectOrgInfoDto>
*/
List<PublicityInspectOrgInfoDto> queryInspectionOrgListForPublicity(String orgCode);
List<PublicityInspectOrgInfoDto> queryInspectionOrgListForPublicity(@Param("orgCode") String orgCode, @Param("dpFilterParamDto") DPFilterParamDto dpFilterParamDto);
}
......@@ -225,7 +225,7 @@
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%')
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 != '6610' and a.status != '6615'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
and date_le(CAST(a.application_date as date),#{dto.endDate})
......@@ -240,7 +240,8 @@
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616'
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 EXISTS (select 1 from tz_jyjc_inspection_result r where r.result_status='1' and a.application_no = r.application_no)
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_le(CAST(a.accept_date as date),#{dto.endDate})
group by a.inspection_type
......@@ -256,7 +257,8 @@
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616'
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 EXISTS (select 1 from tz_jyjc_inspection_result r where r.result_status='1' and a.application_no = r.application_no)
and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_le(CAST(a.accept_date as date),#{dto.endDate})
GROUP BY a.equip_classify
......@@ -271,7 +273,8 @@
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status != '6610' and a.status != '6615'
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 != '6610' and a.status != '6615'
and date_ge(CAST(a.application_date as date),#{dto.beginDate}) and date_le(CAST(a.application_date as date),#{dto.endDate})
GROUP BY a.equip_classify
</select>
......@@ -284,8 +287,8 @@
where
a.inspection_unit_code= b.use_unit_code
and a.status != '6610' and a.status != '6615'
and b.supervise_org_code like CONCAT(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
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}, '%')))
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
......
......@@ -173,7 +173,7 @@
where
r.result_status ='2'
and r.inspection_unit_code= b.use_unit_code
AND b.supervise_org_code like CONCAT(#{orgCode}, '%')
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}, '%')))
GROUP BY r.inspection_unit_code ORDER BY avgtime
limit #{top}
) a1,
......
......@@ -80,6 +80,7 @@
and a.unit_code=l.unit_code
and l.cert_type_code = a.open_biz_type
and b.supervise_org_code like CONCAT(#{orgCode}, '%')
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}, '%')))
ORDER BY unitName
</select>
</mapper>
......@@ -209,7 +209,7 @@ public class DPStatisticsServiceImpl {
if (StringUtils.isEmpty(orgCode)) {
yData.add(0L);
} else {
Long num = tzsUserInfoMapper.countUserByPostAndAreaCode(orgCode, "6615");
Long num = tzsUserInfoMapper.countUserByPostAndAreaCode(orgCode, "6615",regionModel.getRegionCode() + "");
yData.add(num);
}
});
......@@ -301,12 +301,12 @@ public class DPStatisticsServiceImpl {
public List<InspectionTimelinesDto> queryInspectionTimelinessTopXX(String top, DPFilterParamDto dpFilterParamDto) {
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
return inspectionResultMapper.queryInspectionTimelinessTopXX(top, orgCode);
return inspectionResultMapper.queryInspectionTimelinessTopXX(top, orgCode, dpFilterParamDto);
}
public List<PublicityInspectOrgInfoDto> queryInspectionOrgListForPublicity(DPFilterParamDto dpFilterParamDto) {
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
return openingApplicationMapper.queryInspectionOrgListForPublicity(orgCode);
return openingApplicationMapper.queryInspectionOrgListForPublicity(orgCode, dpFilterParamDto);
}
public Map<String, Object> queryInspectionEquipByEquList(DPFilterParamDto dpFilterParamDto) {
......
......@@ -6,11 +6,8 @@ import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
Page<TzsUserInfoDto> selectPageMessage(@Param("page") Page<TzsUserInfoDto> page, @Param("dto") TzsUserInfoDto dto);
Long countUserByPostAndAreaCode(@Param("orgCode") String orgCode, @Param("post") String post);
Long countUserByPostAndAreaCode(@Param("orgCode") String orgCode, @Param("post") String post, @Param("regionCode") String regionCode);
}
......@@ -57,7 +57,7 @@
WHERE
tui.unit_code = bi.use_unit_code
and tui.post LIKE concat ( '%', #{post}, '%' )
and bi.supervise_org_code LIKE CONCAT ( #{orgCode}, '%' )
and ((bi.supervise_org_code != '50' and bi.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (bi.supervise_org_code = '50' and bi.office_region LIKE CONCAT ('%', #{regionCode}, '%')))
and tui.is_delete=false
</select>
</mapper>
\ No newline at end of file
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