Commit 46ccfd27 authored by zhangyingbin's avatar zhangyingbin

修改 监察任务分析列表,应建/已建数据统计 接口

parent 9d77ad73
......@@ -10,7 +10,9 @@ import java.util.Map;
public interface IdxUjerMapper extends BaseMapper<IdxUjer> {
IPage<IdxUjerDto> getPage(IPage<IdxUjerDto> page, @Param("ids") List<String> ids, @Param("bizType") String bizType);
IPage<IdxUjerDto> getPageByOver(IPage<IdxUjerDto> page, @Param("ids") List<String> ids, @Param("bizType") String bizType);
IPage<IdxUjerDto> getPageByMust(IPage<IdxUjerDto> page, @Param("ids") List<String> ids, @Param("bizType") String bizType);
List<Map<String,String>> getCompanyInfo();
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.tzs.api.mapper.IdxUjerMapper">
<select id="getPage" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto">
SELECT a.* FROM (
SELECT
<select id="getPageByOver" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto">
SELECT
a.`BUSINESS_NAME` as businessName,
a.`CREDIT_CODE` as creditCode,
a.`BUSINESS_TYPE` as businessType,
......@@ -11,11 +10,12 @@
a.`CONTACTS` as contacts,
a.`CONTACT_NUMBER` as contactNumber,
a.`COMPANYID` as companyId,
IF(b.SEQUENCE_NBR is null, '未建', '已建') as bizType,
b.SEQUENCE_NBR
FROM idx_biz_odgu a
LEFT JOIN idx_biz_ujer b on a.BUSINESS_NAME = b.BUSINESS_NAME
) AS a
IF(b.SEQUENCE_NBR is null, '未建', '已建') as bizType
FROM idx_biz_ujer b
LEFT JOIN
(SELECT * FROM
idx_biz_odgu
GROUP BY BUSINESS_NAME) a on a.BUSINESS_NAME = b.BUSINESS_NAME
<where>
<if test="ids !=null and ids.size()>0">
AND a.companyId in
......@@ -27,10 +27,41 @@
<!-- AND b.SEQUENCE_NBR is null-->
<!-- </if>-->
<if test="bizType=='yijian'">
AND a.SEQUENCE_NBR is not null
AND b.SEQUENCE_NBR is not null
</if>
</where>
</select>
<select id="getPageByMust" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto">
SELECT
a.`BUSINESS_NAME` as businessName,
a.`CREDIT_CODE` as creditCode,
a.`BUSINESS_TYPE` as businessType,
a.`BUSINESS_ADDRESS` as businessAddress,
a.`CONTACTS` as contacts,
a.`CONTACT_NUMBER` as contactNumber,
a.`COMPANYID` as companyId,
IF(b.SEQUENCE_NBR is null, '未建', '已建') as bizType
FROM idx_biz_odgu a
LEFT JOIN
(SELECT * FROM
idx_biz_ujer
GROUP BY BUSINESS_NAME) b on a.BUSINESS_NAME = b.BUSINESS_NAME
<where>
<if test="ids !=null and ids.size()>0">
AND a.companyId in
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<!-- <if test="bizType=='yingjian'">-->
<!-- AND b.SEQUENCE_NBR is null-->
<!-- </if>-->
<if test="bizType=='yijian'">
AND b.SEQUENCE_NBR is not null
</if>
</where>
GROUP BY a.businessName
</select>
<select id="getCompanyInfo" resultType="java.util.Map">
......
......@@ -65,7 +65,12 @@ public class InspectionServiceImpl implements InspectionService {
// convertCompanyTreeToMap(companyModels, null, companyMap);
IPage<IdxUjerDto> idxUjerPage = new Page<>(current, size);
IPage<IdxUjerDto> page = idxUjerMapper.getPage(idxUjerPage, companyIds, bizType);
IPage<IdxUjerDto> page = new Page<>();
if("yingjian".equals(bizType)){
page = idxUjerMapper.getPageByMust(idxUjerPage, companyIds, bizType);
} else {
page = idxUjerMapper.getPageByOver(idxUjerPage, companyIds, bizType);
}
List<IdxUjerDto> records = page.getRecords();
if (!CollectionUtils.isEmpty(records)) {
for (IdxUjerDto record : records) {
......
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