更新CustomItemMapper的listAll

pull/4/head
wangpeng 2024-02-01 10:43:52 +08:00
parent 862461a376
commit 7735a53bc6
4 changed files with 223 additions and 34 deletions

View File

@ -586,7 +586,7 @@ public class AppListManagerController extends BaseController {
*/
@RequestMapping(value = "/goCheck")
@ResponseBody
@LogAnno(menuType = "手机", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "获取检查项")
@LogAnno(menuType = "手机", menuServer = "风险排查", instructionsOperate = "清单管理", instructionsType = "获取检查项")
public Object goCheck() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";

View File

@ -191,13 +191,13 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
map.put("CHECK_ITEM", records.get(0).get("CHECK_ITEM"));
map.put("checkmap", checkmap);
}
}
@ -219,10 +219,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -242,10 +242,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -268,10 +268,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -294,10 +294,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -320,10 +320,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -345,10 +345,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -368,10 +368,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -391,10 +391,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -414,10 +414,10 @@ public class AppCustomController extends BaseController {
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
Map<String, Integer> checkmap = new HashMap<String, Integer>();//记录所有风险点
for (PageData item : checkedList) {
if (!checkmap.containsKey(item.getString("IDENTIFICATION_ID"))) {
checkmap.put(item.getString("IDENTIFICATION_ID"), 1);
if (!checkmap.containsKey(item.getString("CHECK_ITEM"))) {
checkmap.put(item.getString("CHECK_ITEM"), 1);
} else {
checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1);
checkmap.put(item.getString("CHECK_ITEM"), checkmap.get(item.getString("CHECK_ITEM")) + 1);
}
}
map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
@ -429,5 +429,183 @@ public class AppCustomController extends BaseController {
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/goCheck")
@ResponseBody
@LogAnno(menuType = "手机", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "获取检查项")
public Object goCheck() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<PageData> varList = customItemService.listAll(pd);
for (PageData item : varList) {
item.put("RECORDITEM_ID", this.get32UUID()); //主键
}
map.put("varList", varList);
String USER_ID = pd.getString("USER_NAME");
pd = customService.findById(pd);
if (pd.getString("TYPE").equals("listType0005")) {
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"), DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_XUN", 1);//查询方法和旬一样,直接借用
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
type.put("BEGINTIME", pd.getString("START_DATE") + " 00:00:00");
type.put("ENDTIME", pd.getString("END_DATE") + " 23:59:59");
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
}
map.put("result", errInfo);
return map;
}
String cycle = pd.getString("PERIODNAME");
if (cycle.equals("每日")) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_DAY", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
} else if (cycle.equals("每周")) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_WEEK", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
} else if (cycle.equals("每旬")) {
//1-10
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_XUN", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00");
type.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59");
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
}
//10-20
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_XUN", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00");
type.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59");
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
}
//20-月底
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_XUN", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00");
type.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
}
} else if (cycle.equals("每月")) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_MONTH", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
} else if (cycle.equals("每季")) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_QUARTER", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
} else if (cycle.equals("半年")) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_HALFYEAR", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
} else if (cycle.equals("每年")) {
PageData type = new PageData();
type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
type.put("IS_YEAR", 1);
type.put("FINISHED", '0');
type.put("USER_ID", USER_ID);
List<PageData> records = customCheckRecordService.listAllUnfinished(type);
if (records != null && records.size() > 0) {
PageData record = new PageData();
record.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID"));
List<PageData> checkedList = customCheckRecordItemService.listAll(record);
map.put("records", checkedList);
}
}
map.put("result", errInfo);
return map;
}
}

View File

@ -199,9 +199,20 @@
left join bus_hiddendangercheckstandard_dictionary bhd1 on bhd1.DICTIONARY_ID = f.CHECK_CATEGORY and bhd1.ISDELETE = 0
left join bus_hiddendangercheckstandard_dictionary bhd2 on bhd2.DICTIONARY_ID = f.CHECK_ITEM and bhd2.ISDELETE = 0
where f.ISDELETE = '0'
<if test="CUSTOM_ID != null and CUSTOM_ID != ''"><!-- 关键词检索 -->
<if test="CUSTOM_ID != null and CUSTOM_ID != ''"><!-- 检查表id -->
and f.CUSTOM_ID = #{CUSTOM_ID}
</if>
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
and
(
f.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
f.CHECK_STANDARD LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
f.REFERENCE_BASIS LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
)
</if>
order by f.COMMON_ITEM_SORT ASC
</select>
<!-- 批量删除 -->

View File

@ -5,7 +5,7 @@
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_custom
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM
</sql>
<!--数据字典表名 -->