排查计划

pull/4/head
chenxinying 2024-02-04 17:03:34 +08:00
parent 614f0b6293
commit 0064748958
9 changed files with 153 additions and 1 deletions

View File

@ -1531,6 +1531,55 @@ public class ListManagerController extends BaseController {
return map;
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/mergeCheckPlan")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "排查计划",instructionsType = "根据分类统计清单")
public Object mergeCheckPlan() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
List<PageData> planList = listmanagerService.listAllPlan(null);
Map<String,PageData> planMap = new HashMap<String,PageData>();
for (PageData pageData : planList) {
pageData.put("dept_str", "");
planMap.put(pageData.getString("type_bianma") + "," + pageData.getString("level_bianma") + "," + pageData.getString("period_bianma"),pageData);
}
//企业所有应查数
List<PageData> staList = listStatisticsService.mergeListAllForPlan(pd);
for (PageData pageData : staList) {
String rowName = pageData.getString("TYPE") + "," + pageData.getString("level_bianma") + "," + pageData.getString("PERIOD");
PageData row = planMap.get(rowName);
if(row!=null){
row.put("check_count",Integer.parseInt(row.get("check_count").toString()) + Integer.parseInt(pageData.get("NOTEXAMINEDNUM").toString()));
}
}
//企业所有清单数
List<PageData> liList = listmanagerService.mergeListAllForPlan(pd);
for (PageData pageData : liList) {
String rowName = pageData.getString("TYPE") + "," + pageData.getString("level_bianma") + "," + pageData.getString("PERIOD");
PageData row = planMap.get(rowName);
if(row!=null){
row.put("list_count",Integer.parseInt(row.get("list_count").toString()) + 1 );
row.put("dept_str",row.get("dept_str").toString() + pageData.getString("DEPARTMENT_ID") + ",");
}
}
for (PageData pageData : planList) {
if(pageData.get("dept_str")!=null && pageData.get("dept_str").toString()!="")
pageData.put("dept_count", new HashSet(Arrays.asList(pageData.get("dept_str").toString().substring(0,pageData.get("dept_str").toString().length()-1).split(","))).size());
}
map.put("planList",planList);
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
@ -1580,7 +1629,6 @@ public class ListManagerController extends BaseController {
return map;
}
// /**根据分类统计清单
// * @param page
// * @throws Exception

View File

@ -222,6 +222,8 @@ public interface ListManagerMapper {
List<PageData> listAllForPlan(PageData pd);
List<PageData> mergeListAllForPlan(PageData pd);
List<PageData> getCountNumBi(PageData pd);
List<PageData> listForDocking(PageData pd);

View File

@ -104,5 +104,7 @@ public interface ListStatisticsMapper {
List<PageData> countByPeriodUser(PageData pd);
List<PageData> listAllForPlan(PageData pd);
List<PageData> mergeListAllForPlan(PageData pd);
}

View File

@ -215,6 +215,8 @@ public interface ListManagerService {
public List<PageData> listAllPlan(PageData pd)throws Exception;
public List<PageData> listAllForPlan(PageData pd)throws Exception;
public List<PageData> mergeListAllForPlan(PageData pd)throws Exception;
public List<PageData> getCountNumBi(PageData pd)throws Exception;
void saveBaoBaoType(PageData pd) throws Exception;

View File

@ -314,6 +314,10 @@ public class ListManagerServiceImpl implements ListManagerService {
return listmanagerMapper.listAllForPlan(pd);
}
public List<PageData> mergeListAllForPlan(PageData pd)throws Exception{
return listmanagerMapper.mergeListAllForPlan(pd);
}
public List<PageData> getCountNumBi(PageData pd)throws Exception{
return listmanagerMapper.getCountNumBi(pd);
}

View File

@ -106,5 +106,7 @@ public interface ListStatisticsService{
public List<PageData> countByPeriodUser(PageData pd)throws Exception;
public List<PageData> listAllForPlan(PageData pd)throws Exception;
public List<PageData> mergeListAllForPlan(PageData pd)throws Exception;
}

View File

@ -153,5 +153,9 @@ public class ListStatisticsServiceImpl implements ListStatisticsService {
public List<PageData> listAllForPlan(PageData pd)throws Exception{
return listStatisticsMapper.listAllForPlan(pd);
}
public List<PageData> mergeListAllForPlan(PageData pd)throws Exception{
return listStatisticsMapper.mergeListAllForPlan(pd);
}
}

View File

@ -2285,6 +2285,63 @@
</if>
</select>
<select id="mergeListAllForPlan" parameterType="pd" resultType="pd">
select * from (select f.NAME,
f.PERIOD,
f.TYPE,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.LISTMANAGER_ID as ID,
f.DEPARTMENT_ID,
f.POST_ID,
f.USER_ID,
f.START_DATE,
f.END_DATE,
f.SCREENTYPE,
f.BAO_BAO_DEPARTMENT_ID,
f.BAO_BAO_USER_ID,
f.BAO_BAO_TYPE,
f.TASK_TYPE,d.LEVEL level_bianma
from BUS_LISTMANAGER f
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
where f.ISDELETE = '0' and f.TYPE != 'listType0006'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
union
select f.NAME,
f.PERIOD,
f.TYPE,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.CUSTOM_ID as ID,
f.DEPARTMENT_ID,
f.POST_ID,
f.USER_ID,
f.START_DATE,
f.END_DATE,
f.SCREENTYPE,
f.BAO_BAO_DEPARTMENT_ID,
f.BAO_BAO_USER_ID,
f.BAO_BAO_TYPE,
f.TASK_TYPE,d.LEVEL level_bianma
from bus_hiddendangercheckstandard_custom f
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
where f.ISDELETE = '0' and f.TYPE != 'listType0006'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
) z
</select>
<select id="getCountNumBi" parameterType="pd" resultType="pd">
select count(1) count,d.NAME
from BUS_LISTMANAGER f

View File

@ -483,4 +483,35 @@
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
</select>
<select id="mergeListAllForPlan" parameterType="pd" resultType="pd">
select * from (select f.*,d.LEVEL level_bianma
from BUS_LIST_STATISTICS f
left join SYS_USER u on u.USER_ID = f.USER_ID
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
where 1=1
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.STARTTIME LIKE CONCAT(CONCAT('%', #{YEAR}),'%')
</if>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
union
SELECT
f.*,
d.LEVEL level_bianma
FROM
bus_hiddendangercheckstandard_statistics f
LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
LEFT JOIN OA_DEPARTMENT d ON d.DEPARTMENT_ID = u.DEPARTMENT_ID
WHERE
1 = 1
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.STARTTIME LIKE CONCAT(CONCAT('%', #{YEAR}),'%')
</if>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
) z
</select>
</mapper>