bug修复

pull/4/head
zhangyanli 2024-02-05 14:28:40 +08:00
parent dfae8753cc
commit 2519724187
6 changed files with 243 additions and 94 deletions

View File

@ -1950,6 +1950,7 @@ public class ListManagerController extends BaseController {
npd.put("PERIOD",pd.getString("PERIOD")); npd.put("PERIOD",pd.getString("PERIOD"));
npd.put("STATUS",pd.getString("STATUS")); npd.put("STATUS",pd.getString("STATUS"));
npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL")); npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
npd.put("LIST_TYPE",pd.getString("LIST_TYPE"));
page.setPd(npd); page.setPd(npd);
List<PageData> varList = listmanagerService.riskStandardCheckList(page); //列出ListManager列表 List<PageData> varList = listmanagerService.riskStandardCheckList(page); //列出ListManager列表
for (PageData list : varList) { for (PageData list : varList) {

View File

@ -48,7 +48,10 @@ public class CommonController extends BaseController {
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
PageData corpinfo = corpinfoService.findById(pd); //根据ID读取 PageData corpinfo = corpinfoService.findById(pd); //根据ID读取
pd.put("CORP_TYPE_NAME", corpinfo.getString("CORP_TYPE_NAME")); pd.put("CORP_TYPE", corpinfo.getString("CORP_TYPE"));
pd.put("CORP_TYPE2", corpinfo.getString("CORP_TYPE2"));
pd.put("CORP_TYPE3", corpinfo.getString("CORP_TYPE3"));
pd.put("CORP_TYPE4", corpinfo.getString("CORP_TYPE4"));
page.setPd(pd); page.setPd(pd);
List<PageData> varList = commonService.list(page); //列出RiskCheckItem列表 List<PageData> varList = commonService.list(page); //列出RiskCheckItem列表
map.put("varList", varList); map.put("varList", varList);

View File

@ -1759,91 +1759,127 @@ public class CustomController extends BaseController {
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
//
// /**清单检查记录(日检)统计 /**
// * @param * @param out
// * @throws Exception * @throws Exception
// */ */
// @RequestMapping(value="/statisticsListCheckDay") @RequestMapping(value="/enable")
// @ResponseBody // @RequiresPermissions("listmanager:del")
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(日检)统计") @ResponseBody
// public Object statisticsListCheckDay() throws Exception{ @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "启用")
// Map<String,Object> map = new HashMap<String,Object>(); public Object enable() throws Exception{
// String errInfo = "success"; Map<String,String> map = new HashMap<String,String>();
// PageData pd = new PageData(); String errInfo = "success";
// pd = this.getPageData(); PageData pd = new PageData();
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 pd = this.getPageData();
// if (Tools.notEmpty(KEYWORDS)) pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
// pd.put("KEYWORDS", KEYWORDS.trim()); pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// customService.enable(pd);
// System.out.println(pd.getString("KEYWORDS")); pd = customService.findById(pd);
// List<PageData> varList = listcheckitemService.listAll(pd); // 启用清单时,修改禁用清单时间段的结束时间
// PageData data = listmanagerService.findById(pd); //根据ID读取 PageData disPd = new PageData();
// data.put("YEAR", pd.getString("YEAR")); disPd.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
// List<PageData> recordList = checkrecordService.listAllYearForDay(data);//获取查询月在检查周期内的检查记录 disPd.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
// disPd = customDisableTimeService.findByList(pd);
// map.put("pd", data); disPd.put("ENDTIME", DateUtil.date2Str(new Date()));
// map.put("varList", varList); disPd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
// map.put("recordList", recordList); disPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// map.put("result", errInfo); customDisableTimeService.editEndTime(disPd);
// return map; // 修改清单统计
// } if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
// if("listType0005".equals(pd.get("TYPE").toString())) {
// /**清单检查记录(周检)统计 pd.put("CUSTOMSTATISTICS_ID", this.get32UUID()); //主键
// * @param pd.put("STARTTIME", pd.get("START_DATE").toString()+" 00:00:00");
// * @throws Exception pd.put("ENDTIME", pd.get("END_DATE").toString()+" 23:59:59");
// */ pd.put("PERIOD", null);
// @RequestMapping(value="/statisticsListCheckWeek") PageData statistics = customStatisticsService.findByCondition(pd);
// @ResponseBody if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(周检)统计") statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+2);
// public Object statisticsListCheckWeek() throws Exception{ customStatisticsService.edit(statistics);
// Map<String,Object> map = new HashMap<String,Object>(); }
// String errInfo = "success"; pd.put("ISSTATISTICS", '1');
// PageData pd = new PageData(); // 本期已检查的不计入统计
// pd = this.getPageData(); customCheckRecordService.editStatistics(pd);
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 } else {
// if (Tools.notEmpty(KEYWORDS)) if(pd.get("PERIOD") != null && Tools.notEmpty(pd.get("PERIOD").toString())) {
// pd.put("KEYWORDS", KEYWORDS.trim()); String period = pd.get("PERIOD").toString();
// switch (period) {
// System.out.println(pd.getString("KEYWORDS")); case "checkPeriod0001"://每日
// List<PageData> varList = listcheckitemService.listAll(pd); pd.put("STARTTIME", DateUtil.getDay()+" 00:00:00");
// PageData data = listmanagerService.findById(pd); //根据ID读取 pd.put("ENDTIME", DateUtil.getDay()+" 23:59:59");
// data.put("YEAR", pd.getString("YEAR")); break;
// List<PageData> recordList = checkrecordService.listAllYearForWeek(data);//获取检查周期内的检查记录
// case "checkPeriod0002"://每周
// map.put("pd", data); pd.put("STARTTIME", DateUtil.getWeekStart());
// map.put("varList", varList); pd.put("ENDTIME", DateUtil.getWeekEnd());
// map.put("recordList", recordList); break;
// map.put("result", errInfo);
// return map; case "checkPeriod0003"://每旬
// } String year = DateUtil.getYear().toString();
// String month = DateUtil.getMonth().toString();
// /**清单检查记录(旬检)统计 Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
// * @param String startTime = year + "-" + month + "-";
// * @throws Exception String endTime = year + "-" + month + "-";
// */ if(day <= 10) {
// @RequestMapping(value="/statisticsListCheckTenday") startTime = startTime+"01 00:00:00";
// @ResponseBody endTime = endTime+"10 23:59:59";
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(旬检)统计") } else if(day > 10 && day <= 20) {
// public Object statisticsListCheckTenday() throws Exception{ startTime = startTime+"11 00:00:00";
// Map<String,Object> map = new HashMap<String,Object>(); endTime = endTime+"20 23:59:59";
// String errInfo = "success"; } else {
// PageData pd = new PageData(); startTime = startTime+"21 00:00:00";
// pd = this.getPageData(); endTime = DateUtil.getMonthEndDay()+" 23:59:59";
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 }
// if (Tools.notEmpty(KEYWORDS)) pd.put("STARTTIME", startTime);
// pd.put("KEYWORDS", KEYWORDS.trim()); pd.put("ENDTIME", endTime);
// break;
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd); case "checkPeriod0004"://每月
// PageData data = listmanagerService.findById(pd); //根据ID读取 pd.put("STARTTIME", DateUtil.getMonthFirstDay()+" 00:00:00");
// data.put("YEAR", pd.getString("YEAR")); pd.put("ENDTIME", DateUtil.getMonthEndDay()+" 23:59:59");
// List<PageData> recordList = checkrecordService.statisticsListCheckTenday(data);//获取检查周期内的检查记录 break;
//
// map.put("pd", data); case "checkPeriod0005"://每季
// map.put("varList", varList); pd.put("STARTTIME", DateUtil.quarterStart()+" 00:00:00");
// map.put("recordList", recordList); pd.put("ENDTIME", DateUtil.quarterEnd()+" 23:59:59");
// map.put("result", errInfo); break;
// return map;
// } case "checkPeriod0006"://每年
pd.put("STARTTIME", DateUtil.getCurrYearFirst()+" 00:00:00");
pd.put("ENDTIME", DateUtil.getCurrYearLast()+" 23:59:59");
break;
case "checkPeriod0007"://半年
String byear = DateUtil.getYear().toString();
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
if(bmonth <= 6) {
pd.put("STARTTIME", byear+"-01-01 00:00:00");
pd.put("ENDTIME", byear+"-06-30 23:59:59");
} else if(bmonth > 6) {
pd.put("STARTTIME", byear+"-07-01 00:00:00");
pd.put("ENDTIME", byear+"-12-31 23:59:59");
}
break;
default:
break;
}
}
PageData statistics = customStatisticsService.findByCondition(pd);
if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+1);
customStatisticsService.edit(statistics);
}
pd.put("ISSTATISTICS", '1');
// 本期已检查的不计入统计
customCheckRecordService.editStatistics(pd);
}
}
// 将本频率内已检查的记录,改为不计入
map.put("result", errInfo); //返回结果
return map;
}
} }

View File

@ -1514,6 +1514,9 @@
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="pd.LIST_TYPE != null and pd.LIST_TYPE != ''">
and "1" = #{pd.LIST_TYPE}
</if>
order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc ) order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc )
union union
(select (select
@ -1550,6 +1553,106 @@
and and
f.CORPINFO_ID = #{pd.CORPINFO_ID} f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if> </if>
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((f.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
(f.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.USER_ID = #{pd.USER_ID})
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and f.USER_ID = #{pd.USER_ID}
and f.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<if test="pd.USERNAME != null and pd.USERNAME != ''"> <if test="pd.USERNAME != null and pd.USERNAME != ''">
and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%') and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
</if> </if>
@ -1562,10 +1665,10 @@
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 --> <if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
<choose> <choose>
<when test='pd.STATUS=="1"'> <when test='pd.STATUS=="1"'>
AND getCheckedNum(f.LISTMANAGER_ID) &gt; 0 AND getStandardCheckedNum(f.CUSTOM_ID) &gt; 0
</when> </when>
<when test='pd.STATUS=="0"'> <when test='pd.STATUS=="0"'>
AND getCheckedNum(f.LISTMANAGER_ID) = 0 AND getStandardCheckedNum(f.CUSTOM_ID) = 0
</when> </when>
<otherwise> <otherwise>
</otherwise> </otherwise>
@ -1581,6 +1684,9 @@
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="pd.LIST_TYPE != null and pd.LIST_TYPE != ''">
and "2" = #{pd.LIST_TYPE}
</if>
order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc ) order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc )
</select> </select>

View File

@ -97,7 +97,10 @@
and bhci.ISDELETE = 0 and bhci.ISDELETE = 0
and f.COMMON_STATUS = 1 and f.COMMON_STATUS = 1
and bhci.COMMON_ITEM_STATUS = 1 and bhci.COMMON_ITEM_STATUS = 1
<!-- and f.INDUSTRY_TYPE_NAMES = #{pd.CORP_TYPE_NAME} --> and ( f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE}),'%')
or f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE2}),'%')
or f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE3}),'%')
or f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE4}),'%') )
<if test="pd.OTHERKEYWORDS != null and pd.OTHERKEYWORDS != ''"><!-- 关键词检索 --> <if test="pd.OTHERKEYWORDS != null and pd.OTHERKEYWORDS != ''"><!-- 关键词检索 -->
and and
( (

View File

@ -4,7 +4,7 @@
<!--表名 --> <!--表名 -->
<sql id="tableName"> <sql id="tableName">
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME BUS_HIDDENDANGERCHECKSTANDARD_DISABLETIME
</sql> </sql>
<!--数据字典表名 --> <!--数据字典表名 -->
@ -15,7 +15,7 @@
<!-- 字段 --> <!-- 字段 -->
<sql id="Field"> <sql id="Field">
f.CUSTOMDISABLETIME_ID, f.CUSTOMDISABLETIME_ID,
f.CUSTOM_ID f.CUSTOM_ID,
f.CORPINFO_ID, f.CORPINFO_ID,
f.STARTTIME, f.STARTTIME,
f.ENDTIME, f.ENDTIME,
@ -80,7 +80,7 @@
update update
<include refid="tableName"></include> <include refid="tableName"></include>
set set
LISTMANAGER_ID = #{LISTMANAGER_ID}, CUSTOM_ID = #{CUSTOM_ID},
CORPINFO_ID = #{CORPINFO_ID}, CORPINFO_ID = #{CORPINFO_ID},
STARTTIME = #{STARTTIME}, STARTTIME = #{STARTTIME},
ENDTIME = #{ENDTIME}, ENDTIME = #{ENDTIME},