forked from integrated_whb/integrated_whb
				
			检查明细
							parent
							
								
									0602963d2f
								
							
						
					
					
						commit
						8de91d0ca9
					
				|  | @ -56,7 +56,7 @@ public class AppListManagerController extends BaseController { | |||
|      */ | ||||
|     @RequestMapping(value = "/checkList") | ||||
|     @ResponseBody | ||||
|     @LogAnno(menuType = "手机", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "列表") | ||||
|     @LogAnno(menuType = "手机", menuServer = "风险排查", instructionsOperate = "清单管理", instructionsType = "列表") | ||||
|     public Object checkList() throws Exception { | ||||
|         Map<String, Object> map = new HashMap<String, Object>(); | ||||
|         String errInfo = "success"; | ||||
|  |  | |||
|  | @ -0,0 +1,433 @@ | |||
| package com.zcloud.controller.hiddenDangerCheckStandard; | ||||
| 
 | ||||
| import com.zcloud.controller.base.BaseController; | ||||
| import com.zcloud.entity.Page; | ||||
| import com.zcloud.entity.PageData; | ||||
| import com.zcloud.logs.LogAnno; | ||||
| import com.zcloud.service.check.*; | ||||
| import com.zcloud.service.hiddenDangerCheckStandard.CustomCheckRecordItemService; | ||||
| import com.zcloud.service.hiddenDangerCheckStandard.CustomCheckRecordService; | ||||
| import com.zcloud.service.hiddenDangerCheckStandard.CustomItemService; | ||||
| import com.zcloud.service.hiddenDangerCheckStandard.CustomService; | ||||
| import com.zcloud.service.offduty.OffDutyService; | ||||
| import com.zcloud.service.risk.IdentificationPartsService; | ||||
| import com.zcloud.service.risk.RiskPointService; | ||||
| import com.zcloud.service.statistics.ListStatisticsService; | ||||
| import com.zcloud.service.system.DepartmentService; | ||||
| import com.zcloud.service.system.UsersService; | ||||
| import com.zcloud.util.DateUtil; | ||||
| import com.zcloud.util.Jurisdiction; | ||||
| import com.zcloud.util.Tools; | ||||
| import com.zcloud.util.Warden; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Controller; | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.ResponseBody; | ||||
| 
 | ||||
| import java.util.Date; | ||||
| import java.util.HashMap; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:清单管理-隐患排查清单 | ||||
|  * 作者:luoxiaobao | ||||
|  * 时间:2020-12-30 | ||||
|  * 官网:www.zcloudchina.com | ||||
|  */ | ||||
| @Controller | ||||
| @RequestMapping("/app/hiddenDangerCheckStandardCustom") | ||||
| public class AppCustomController extends BaseController { | ||||
| 
 | ||||
| 	@Autowired | ||||
| 	private CustomService customService; | ||||
| 	@Autowired | ||||
| 	private CustomItemService customItemService; | ||||
| 	@Autowired | ||||
| 	private ListCheckItemService listcheckitemService; | ||||
| 	@Autowired | ||||
| 	private DepartmentService departmentService; | ||||
| 	@Autowired | ||||
| 	private CustomCheckRecordService customCheckRecordService; | ||||
| 	@Autowired | ||||
| 	private CustomCheckRecordItemService customCheckRecordItemService; | ||||
| 	@Autowired | ||||
| 	private RiskPointService riskpointService; | ||||
| 	@Autowired | ||||
| 	private ListStatisticsService listStatisticsService; | ||||
| 	@Autowired | ||||
| 	private IdentificationPartsService identificationPartsService; | ||||
| 	@Autowired | ||||
| 	private ListDisableTimeService listdisabletimeService; | ||||
| 	@Autowired | ||||
| 	private CheckRouteService checkRouteService; | ||||
| 	@Autowired | ||||
| 	private UsersService usersService; | ||||
| 	@Autowired | ||||
| 	private OffDutyService offdutyService; | ||||
| 
 | ||||
| 	/** | ||||
| 	 * 列表 | ||||
| 	 * | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	@RequestMapping(value = "/checkList") | ||||
| 	@ResponseBody | ||||
| 	@LogAnno(menuType = "手机", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "列表") | ||||
| 	public Object checkList() throws Exception { | ||||
| 		Map<String, Object> map = new HashMap<String, Object>(); | ||||
| 		String errInfo = "success"; | ||||
| 		PageData pd = new PageData(); | ||||
| 		pd = this.getPageData(); | ||||
| 		String USER_NAME = pd.getString("USER_NAME"); | ||||
| 		PageData cpd = new PageData(); | ||||
| 		cpd = usersService.findById(pd); | ||||
| 		pd.put("ISLEADER", cpd.getString("ISLEADER")); | ||||
| 		PageData dept = new PageData(); | ||||
| 		dept.put("DEPARTMENT_ID", pd.getString("CHECK_DEPARTMENT_ID")); | ||||
| 		dept = departmentService.findById(dept); | ||||
| 		if (dept != null && dept.getString("ISSUPERVISE").equals("1")) { | ||||
| 			pd.put("SUP_DEPARTMENT_ID", dept.getString("DEPARTMENT_ID")); | ||||
| 			pd.put("ISSUPERVISE", dept.getString("ISSUPERVISE")); | ||||
| 		} else { | ||||
| 			pd.put("DEPARTMENT_ID", pd.getString("CHECK_DEPARTMENT_ID")); | ||||
| 		} | ||||
| 		if (cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")) { | ||||
| 			String DEPARTMENT_ID = pd.getString("CHECK_DEPARTMENT_ID"); | ||||
| 			String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID); | ||||
| 			ids = pd.getString("CHECK_DEPARTMENT_ID") + "," + ids;   //把自己部门插入进去
 | ||||
| 			if (ids != null && Tools.notEmpty(ids) && ids.lastIndexOf(",") > -1) { | ||||
| 				ids = ids.substring(0, ids.lastIndexOf(",")); | ||||
| 				pd.put("DEPARTMENT_IDS", ids.split(",")); | ||||
| 			} else { | ||||
| 				pd.put("DEPARTMENT_IDS", DEPARTMENT_ID); | ||||
| 			} | ||||
| 		} | ||||
| 		pd.put("orderUserId", pd.get("USER_ID")); | ||||
| 		List<PageData> varList = customService.getMyCheckList(pd);//列出ListManager列表
 | ||||
| 		for (PageData list : varList) { | ||||
| 			String cycle = list.getString("PERIODNAME"); | ||||
| 			if (cycle.equals("每日")) { | ||||
| 				list.put("START_DATE", DateUtil.getDay()); | ||||
| 				list.put("END_DATE", DateUtil.getDay()); | ||||
| 			} else if (cycle.equals("每周")) { | ||||
| 				list.put("START_DATE", DateUtil.getWeekStart().substring(0, 10)); | ||||
| 				list.put("END_DATE", DateUtil.getWeekEnd().substring(0, 10)); | ||||
| 			} 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"))) { | ||||
| 					list.put("START_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01"); | ||||
| 					list.put("END_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10"); | ||||
| 				} | ||||
| 				//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"))) { | ||||
| 					list.put("START_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11"); | ||||
| 					list.put("END_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20"); | ||||
| 				} | ||||
| 				//20-月底
 | ||||
| 				if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { | ||||
| 					list.put("START_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21"); | ||||
| 					list.put("END_DATE", DateUtil.getMonthEndDay()); | ||||
| 				} | ||||
| 
 | ||||
| 			} else if (cycle.equals("每月")) { | ||||
| 				list.put("START_DATE", DateUtil.getMonthFirstDay()); | ||||
| 				list.put("END_DATE", DateUtil.getMonthEndDay()); | ||||
| 			} else if (cycle.equals("每季")) { | ||||
| 				list.put("START_DATE", DateUtil.quarterStart()); | ||||
| 				list.put("END_DATE", DateUtil.quarterEnd()); | ||||
| 			} else if (cycle.equals("半年")) { | ||||
| 				Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString()); | ||||
| 				if (bmonth <= 6) { | ||||
| 					list.put("START_DATE", DateUtil.getYear() + "-01-01"); | ||||
| 					list.put("END_DATE", DateUtil.getYear() + "-06-30"); | ||||
| 				} else if (bmonth > 6) { | ||||
| 					list.put("START_DATE", DateUtil.getYear() + "-07-01"); | ||||
| 					list.put("END_DATE", DateUtil.getYear() + "-12-31"); | ||||
| 				} | ||||
| 			} else if (cycle.equals("每年")) { | ||||
| 				list.put("START_DATE", DateUtil.getCurrYearFirst()); | ||||
| 				list.put("END_DATE", DateUtil.getCurrYearLast()); | ||||
| 			} | ||||
| 		} | ||||
| 		map.put("varList", varList); | ||||
| 		map.put("result", errInfo); | ||||
| 		return map; | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 	/** | ||||
| 	 * 获取清单风险点 | ||||
| 	 * | ||||
| 	 * @param | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	@RequestMapping(value = "/getCheckItem") | ||||
| 	@ResponseBody | ||||
| 	@LogAnno(menuType = "手机", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "获取清单风险点") | ||||
| 	public Object getRisk() throws Exception { | ||||
| 		Map<String, Object> map = new HashMap<String, Object>(); | ||||
| 		String errInfo = "success"; | ||||
| 		PageData pd = new PageData(); | ||||
| 		pd = this.getPageData(); | ||||
| 		String USER_ID = pd.getString("USER_NAME"); | ||||
| 		List<PageData> varList = customItemService.getCheckItem(pd); | ||||
| 		map.put("varList", varList); | ||||
| 		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("CUSTOM_ID", pd.get("CUSTOM_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<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); | ||||
| 						} else { | ||||
| 							checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 						} | ||||
| 					} | ||||
| 					map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 					map.put("checkmap", checkmap); | ||||
| 				} | ||||
| 			} | ||||
| 			map.put("result", errInfo); | ||||
| 			return map; | ||||
| 		} | ||||
| 		String cycle = pd.getString("PERIODNAME"); | ||||
| 		if (cycle.equals("每日")) { | ||||
| 			PageData type = new PageData(); | ||||
| 			type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); | ||||
| 			type.put("IS_DAY", 1); | ||||
| 			type.put("FINISHED", '0'); | ||||
| 			type.put("USER_ID", USER_ID); | ||||
| 			List<PageData> records = customCheckRecordService.listAllUnfinished(type); | ||||
| 			pd.put("checkCount", records == null ? 0 : records.size()); | ||||
| 			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<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); | ||||
| 					} else { | ||||
| 						checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 					} | ||||
| 				} | ||||
| 				map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 				map.put("checkmap", checkmap); | ||||
| 			} | ||||
| 		} else if (cycle.equals("每周")) { | ||||
| 			PageData type = new PageData(); | ||||
| 			type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); | ||||
| 			type.put("IS_WEEK", 1); | ||||
| 			type.put("FINISHED", '0'); | ||||
| 			type.put("USER_ID", USER_ID); | ||||
| 			List<PageData> records = customCheckRecordService.listAllUnfinished(type); | ||||
| 			pd.put("checkCount", records == null ? 0 : records.size()); | ||||
| 			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<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); | ||||
| 					} else { | ||||
| 						checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 					} | ||||
| 				} | ||||
| 				map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 				map.put("checkmap", checkmap); | ||||
| 			} | ||||
| 		} 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("CUSTOM_ID", pd.get("CUSTOM_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<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); | ||||
| 						} else { | ||||
| 							checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 						} | ||||
| 					} | ||||
| 					map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 					map.put("checkmap", checkmap); | ||||
| 				} | ||||
| 			} | ||||
| 			//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("CUSTOM_ID", pd.get("CUSTOM_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<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); | ||||
| 						} else { | ||||
| 							checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 						} | ||||
| 					} | ||||
| 					map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 					map.put("checkmap", checkmap); | ||||
| 				} | ||||
| 			} | ||||
| 			//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("CUSTOM_ID", pd.get("CUSTOM_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<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); | ||||
| 						} else { | ||||
| 							checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 						} | ||||
| 					} | ||||
| 					map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 					map.put("checkmap", checkmap); | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
| 		} else if (cycle.equals("每月")) { | ||||
| 			PageData type = new PageData(); | ||||
| 			type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); | ||||
| 			type.put("IS_MONTH", 1); | ||||
| 			type.put("FINISHED", '0'); | ||||
| 			type.put("USER_ID", USER_ID); | ||||
| 			List<PageData> records = customCheckRecordService.listAllUnfinished(type); | ||||
| 			pd.put("checkCount", records == null ? 0 : records.size()); | ||||
| 			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<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); | ||||
| 					} else { | ||||
| 						checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 					} | ||||
| 				} | ||||
| 				map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 				map.put("checkmap", checkmap); | ||||
| 			} | ||||
| 		} else if (cycle.equals("每季")) { | ||||
| 			PageData type = new PageData(); | ||||
| 			type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); | ||||
| 			type.put("IS_QUARTER", 1); | ||||
| 			type.put("FINISHED", '0'); | ||||
| 			type.put("USER_ID", USER_ID); | ||||
| 			List<PageData> records = customCheckRecordService.listAllUnfinished(type); | ||||
| 			pd.put("checkCount", records == null ? 0 : records.size()); | ||||
| 			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<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); | ||||
| 					} else { | ||||
| 						checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 					} | ||||
| 				} | ||||
| 				map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 				map.put("checkmap", checkmap); | ||||
| 			} | ||||
| 		} else if (cycle.equals("半年")) { | ||||
| 			PageData type = new PageData(); | ||||
| 			type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); | ||||
| 			type.put("IS_HALFYEAR", 1); | ||||
| 			type.put("FINISHED", '0'); | ||||
| 			type.put("USER_ID", USER_ID); | ||||
| 			List<PageData> records = customCheckRecordService.listAllUnfinished(type); | ||||
| 			pd.put("checkCount", records == null ? 0 : records.size()); | ||||
| 			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<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); | ||||
| 					} else { | ||||
| 						checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 					} | ||||
| 				} | ||||
| 				map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 				map.put("checkmap", checkmap); | ||||
| 			} | ||||
| 		} else if (cycle.equals("每年")) { | ||||
| 			PageData type = new PageData(); | ||||
| 			type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); | ||||
| 			type.put("IS_YEAR", 1); | ||||
| 			type.put("FINISHED", '0'); | ||||
| 			type.put("USER_ID", USER_ID); | ||||
| 			List<PageData> records = customCheckRecordService.listAllUnfinished(type); | ||||
| 			pd.put("checkCount", records == null ? 0 : records.size()); | ||||
| 			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<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); | ||||
| 					} else { | ||||
| 						checkmap.put(item.getString("IDENTIFICATION_ID"), checkmap.get(item.getString("IDENTIFICATION_ID")) + 1); | ||||
| 					} | ||||
| 				} | ||||
| 				map.put("CHECKRECORD_ID", records.get(0).get("CHECKRECORD_ID")); | ||||
| 				map.put("checkmap", checkmap); | ||||
| 			} | ||||
| 		} | ||||
| 		map.put("result", errInfo); | ||||
| 		return map; | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | @ -0,0 +1,67 @@ | |||
| package com.zcloud.mapper.datasource.hiddenDangerCheckStandard; | ||||
| 
 | ||||
| import com.zcloud.entity.Page; | ||||
| import com.zcloud.entity.PageData; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:检查记录详情 | ||||
|  * 作者:luoxiaobao | ||||
|  * 时间:2021-01-04 | ||||
|  * 官网:www.zcloudchina.com | ||||
|  */ | ||||
| public interface CustomCheckRecordItemMapper { | ||||
| 
 | ||||
| 	/**新增 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	void save(PageData pd); | ||||
| 
 | ||||
| 	/**删除 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	void delete(PageData pd); | ||||
| 
 | ||||
| 	/**修改 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	void edit(PageData pd); | ||||
| 
 | ||||
| 	/**列表 | ||||
| 	 * @param page | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	List<PageData> datalistPage(Page page); | ||||
| 
 | ||||
| 	/**列表(全部) | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	List<PageData> listAll(PageData pd); | ||||
| 
 | ||||
| 	/**通过id获取数据 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	PageData findById(PageData pd); | ||||
| 
 | ||||
| 	/**批量删除 | ||||
| 	 * @param ArrayDATA_IDS | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	void deleteAll(String[] ArrayDATA_IDS); | ||||
| 
 | ||||
| 	List<PageData> listAllForMap(PageData pd); | ||||
| 
 | ||||
| 	/**修改状态 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	void editIsnormal(PageData pd); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
|  | @ -2,6 +2,8 @@ package com.zcloud.mapper.datasource.hiddenDangerCheckStandard; | |||
| 
 | ||||
| import com.zcloud.entity.PageData; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:清单管理-检查标准项目 | ||||
|  * 作者:luoxiaobao | ||||
|  | @ -15,5 +17,11 @@ public interface CustomItemMapper { | |||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	void save(PageData pd); | ||||
| 
 | ||||
| 	/**获取用户检查清单的检查项目 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	List<PageData> getCheckItem(PageData pd); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -227,5 +227,11 @@ public interface CustomMapper { | |||
|     List<PageData> findByCondition(PageData util); | ||||
| 
 | ||||
|     List<PageData> analysis(PageData util); | ||||
| 
 | ||||
| 	/**获取用户的检查清单 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	List<PageData> getMyCheckList(PageData pd); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -0,0 +1,67 @@ | |||
| package com.zcloud.service.hiddenDangerCheckStandard; | ||||
| 
 | ||||
| import com.zcloud.entity.Page; | ||||
| import com.zcloud.entity.PageData; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:检查记录详情 | ||||
|  * 作者:luoxiaobao | ||||
|  * 时间:2021-01-04 | ||||
|  * 官网:www.zcloudchina.com | ||||
|  */ | ||||
| public interface CustomCheckRecordItemService { | ||||
| 
 | ||||
| 	/**新增 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void save(PageData pd)throws Exception; | ||||
| 
 | ||||
| 	/**删除 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void delete(PageData pd)throws Exception; | ||||
| 
 | ||||
| 	/**修改 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void edit(PageData pd)throws Exception; | ||||
| 
 | ||||
| 	/**列表 | ||||
| 	 * @param page | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public List<PageData> list(Page page)throws Exception; | ||||
| 
 | ||||
| 	/**列表(全部) | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public List<PageData> listAll(PageData pd)throws Exception; | ||||
| 
 | ||||
| 	/**通过id获取数据 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public PageData findById(PageData pd)throws Exception; | ||||
| 
 | ||||
| 	/**批量删除 | ||||
| 	 * @param ArrayDATA_IDS | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | ||||
| 
 | ||||
| 	List<PageData> listAllForMap(PageData pd) throws Exception; | ||||
| 
 | ||||
| 	/**修改状态 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void editIsnormal(PageData pd)throws Exception; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
|  | @ -2,6 +2,8 @@ package com.zcloud.service.hiddenDangerCheckStandard; | |||
| 
 | ||||
| import com.zcloud.entity.PageData; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:清单管理-检查标准项目 | ||||
|  * 作者:luoxiaobao | ||||
|  | @ -17,5 +19,11 @@ public interface CustomItemService { | |||
| 	 */ | ||||
| 	void save(PageData pd)throws Exception; | ||||
| 
 | ||||
| 
 | ||||
| 	/**获取用户检查清单的检查项目 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	List<PageData> getCheckItem(PageData pd)throws Exception; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -54,11 +54,16 @@ public interface CustomService { | |||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void enable(PageData pd)throws Exception; | ||||
| 
 | ||||
| /**通过id获取数据 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public PageData findById(PageData pd)throws Exception; | ||||
| 	PageData findById(PageData pd)throws Exception; | ||||
| 
 | ||||
| 	/**获取用户的检查清单 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	List<PageData> getMyCheckList(PageData pd)throws Exception; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -0,0 +1,100 @@ | |||
| package com.zcloud.service.hiddenDangerCheckStandard.impl; | ||||
| 
 | ||||
| import com.zcloud.entity.Page; | ||||
| import com.zcloud.entity.PageData; | ||||
| import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomCheckRecordItemMapper; | ||||
| import com.zcloud.service.hiddenDangerCheckStandard.CustomCheckRecordItemService; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:检查记录详情 | ||||
|  * 作者:luoxiaobao | ||||
|  * 时间:2021-01-04 | ||||
|  * 官网:www.zcloudchina.com | ||||
|  */ | ||||
| @Service | ||||
| @Transactional //开启事物
 | ||||
| public class CustomCheckRecordItemServiceImpl implements CustomCheckRecordItemService { | ||||
| 
 | ||||
| 	@Autowired | ||||
| 	private CustomCheckRecordItemMapper customCheckRecordItemMapper; | ||||
| 
 | ||||
| 	/**新增 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void save(PageData pd)throws Exception{ | ||||
| 		customCheckRecordItemMapper.save(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**删除 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void delete(PageData pd)throws Exception{ | ||||
| 		customCheckRecordItemMapper.delete(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**修改 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void edit(PageData pd)throws Exception{ | ||||
| 		customCheckRecordItemMapper.edit(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**列表 | ||||
| 	 * @param page | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public List<PageData> list(Page page)throws Exception{ | ||||
| 		return customCheckRecordItemMapper.datalistPage(page); | ||||
| 	} | ||||
| 
 | ||||
| 	/**列表(全部) | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public List<PageData> listAll(PageData pd)throws Exception{ | ||||
| 		return customCheckRecordItemMapper.listAll(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**列表(全部) | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	@Override | ||||
| 	public List<PageData> listAllForMap(PageData pd)throws Exception{ | ||||
| 		return customCheckRecordItemMapper.listAllForMap(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**通过id获取数据 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public PageData findById(PageData pd)throws Exception{ | ||||
| 		return customCheckRecordItemMapper.findById(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**批量删除 | ||||
| 	 * @param ArrayDATA_IDS | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||||
| 		customCheckRecordItemMapper.deleteAll(ArrayDATA_IDS); | ||||
| 	} | ||||
| 
 | ||||
| 	/**改状态 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public void editIsnormal(PageData pd)throws Exception{ | ||||
| 		customCheckRecordItemMapper.editIsnormal(pd); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
|  | @ -7,6 +7,8 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * 说明:清单管理-检查标准项目 | ||||
|  * 作者:luoxiaobao | ||||
|  | @ -29,6 +31,11 @@ public class CustomItemServiceImpl implements CustomItemService { | |||
| 		customItemMapper.save(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	@Override | ||||
| 	public List<PageData> getCheckItem(PageData pd)throws Exception { | ||||
| 		return customItemMapper.getCheckItem(pd); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -87,6 +87,14 @@ public class CustomServiceImpl implements CustomService { | |||
| 	public PageData findById(PageData pd)throws Exception{ | ||||
| 		return customMapper.findById(pd); | ||||
| 	} | ||||
| 
 | ||||
| 	/**获取用户的检查清单 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
| 	 */ | ||||
| 	public List<PageData> getMyCheckList(PageData pd)throws Exception{ | ||||
| 		return customMapper.getMyCheckList(pd); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -0,0 +1,202 @@ | |||
| <?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.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomCheckRecordItemMapper"> | ||||
| 
 | ||||
| 	<!--表名 --> | ||||
| 	<sql id="tableName"> | ||||
| 		BUS_HIDDENDANGERCHECKSTANDARD_RECORDITEM | ||||
| 	</sql> | ||||
| 
 | ||||
| 	<!--数据字典表名 --> | ||||
| 	<sql id="dicTableName"> | ||||
| 		SYS_DICTIONARIES | ||||
| 	</sql> | ||||
| 
 | ||||
| 	<!-- 字段 --> | ||||
| 	<sql id="Field"> | ||||
| 		f.CHECKRECORD_ID, | ||||
| 		f.CUSTOM_ID, | ||||
| 		f.CUSTOM_ITEM_ID, | ||||
| 		f.CHECK_CATEGORY, | ||||
| 		f.CHECK_CATEGORY_NAME, | ||||
| 		f.CHECK_ITEM, | ||||
| 		f.CHECK_ITEM_NAME, | ||||
| 		f.CHECK_CONTENT, | ||||
| 		f.CHECK_STANDARD, | ||||
| 		f.REFERENCE_BASIS, | ||||
| 		f.ISNORMAL, | ||||
| 		f.CHECK_RESULT, | ||||
| 		f.COMMON_ITEM_SORT, | ||||
| 		f.LONGITUDE, | ||||
| 		f.LATITUDE, | ||||
| 		f.CORPINFO_ID, | ||||
| 		f.ISDELETE, | ||||
| 		f.CREATOR_ID, | ||||
| 		f.CREATOR_NAME, | ||||
| 		f.CREATE_TIME, | ||||
| 		f.RECORDITEM_ID | ||||
| 	</sql> | ||||
| 
 | ||||
| 	<!-- 字段用于新增 --> | ||||
| 	<sql id="Field2"> | ||||
| 		CHECKRECORD_ID, | ||||
| 		CUSTOM_ID, | ||||
| 		CUSTOM_ITEM_ID, | ||||
| 		CHECK_CATEGORY, | ||||
| 		CHECK_CATEGORY_NAME, | ||||
| 		CHECK_ITEM, | ||||
| 		CHECK_ITEM_NAME, | ||||
| 		CHECK_CONTENT, | ||||
| 		CHECK_STANDARD, | ||||
| 		REFERENCE_BASIS, | ||||
| 		ISNORMAL, | ||||
| 		CHECK_RESULT, | ||||
| 		COMMON_ITEM_SORT, | ||||
| 		LONGITUDE, | ||||
| 		LATITUDE, | ||||
| 		CORPINFO_ID, | ||||
| 		ISDELETE, | ||||
| 		CREATOR_ID, | ||||
| 		CREATOR_NAME, | ||||
| 		CREATE_TIME, | ||||
| 		RECORDITEM_ID | ||||
| 	</sql> | ||||
| 
 | ||||
| 	<!-- 字段值 --> | ||||
| 	<sql id="FieldValue"> | ||||
| 		#{CHECKRECORD_ID}, | ||||
| 		#{CUSTOM_ID}, | ||||
| 		#{CUSTOM_ITEM_ID}, | ||||
| 		#{CHECK_CATEGORY}, | ||||
| 		#{CHECK_CATEGORY_NAME}, | ||||
| 		#{CHECK_ITEM}, | ||||
| 		#{CHECK_ITEM_NAME}, | ||||
| 		#{CHECK_CONTENT}, | ||||
| 		#{CHECK_STANDARD}, | ||||
| 		#{REFERENCE_BASIS}, | ||||
| 		#{ISNORMAL}, | ||||
| 		#{CHECK_RESULT}, | ||||
| 		#{COMMON_ITEM_SORT}, | ||||
| 		#{LONGITUDE}, | ||||
| 		#{LATITUDE}, | ||||
| 		#{CORPINFO_ID}, | ||||
| 		#{ISDELETE}, | ||||
| 		#{CREATOR_ID}, | ||||
| 		#{CREATOR_NAME}, | ||||
| 		#{CREATE_TIME}, | ||||
| 		#{RECORDITEM_ID} | ||||
| 	</sql> | ||||
| 
 | ||||
| 	<!-- 新增--> | ||||
| 	<insert id="save" parameterType="pd"> | ||||
| 		insert into | ||||
| 	<include refid="tableName"></include> | ||||
| 		( | ||||
| 	<include refid="Field2"></include> | ||||
| 		) values ( | ||||
| 	<include refid="FieldValue"></include> | ||||
| 		) | ||||
| 	</insert> | ||||
| 
 | ||||
| 	<!-- 删除--> | ||||
| 	<delete id="delete" parameterType="pd"> | ||||
| 		update | ||||
| 		<include refid="tableName"></include> | ||||
| 		set | ||||
| 			ISDELETE = '1' | ||||
| 		where | ||||
| 			CHECKRECORD_ID = #{CHECKRECORD_ID} | ||||
| 	</delete> | ||||
| 
 | ||||
| 	<!-- 修改 --> | ||||
| 	<update id="edit" parameterType="pd"> | ||||
| 		update | ||||
| 		<include refid="tableName"></include> | ||||
| 		set | ||||
| 			ISNORMAL = #{ISNORMAL}, | ||||
| 			LONGITUDE=#{LONGITUDE}, | ||||
| 			LATITUDE=#{LATITUDE} | ||||
| 		where | ||||
| 			RECORDITEM_ID = #{RECORDITEM_ID} | ||||
| 	</update> | ||||
| 
 | ||||
| 	<!-- 通过ID获取数据 --> | ||||
| 	<select id="findById" parameterType="pd" resultType="pd"> | ||||
| 		select | ||||
| 		<include refid="Field"></include> | ||||
| 		from | ||||
| 		<include refid="tableName"></include> f | ||||
| 		where | ||||
| 			f.RECORDITEM_ID = #{RECORDITEM_ID} | ||||
| 	</select> | ||||
| 
 | ||||
| 	<!-- 列表 --> | ||||
| 	<select id="datalistPage" parameterType="page" resultType="pd"> | ||||
| 		select | ||||
| 		<include refid="Field"></include> | ||||
| 		from | ||||
| 		<include refid="tableName"></include> f | ||||
| 		where f.ISDELETE = '0' | ||||
| 		<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 --> | ||||
| 			and | ||||
| 				( | ||||
| 				<!--	根据需求自己加检索条件 | ||||
| 					字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') | ||||
| 					 or | ||||
| 					字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') | ||||
| 				--> | ||||
| 				) | ||||
| 		</if> | ||||
| 	</select> | ||||
| 
 | ||||
| 	<!-- 列表(全部) --> | ||||
| 	<select id="listAll" parameterType="pd" resultType="pd"> | ||||
| 		select | ||||
| 		<include refid="Field"></include>, | ||||
| 		(select h.HIDDEN_ID from BUS_HIDDEN h where h.RECORDITEM_ID=f.RECORDITEM_ID and h.CHECKRECORD_ID=f.CHECKRECORD_ID and h.ISDELETE= '0') as HIDDEN_ID, | ||||
| 		( select count(1) from bus_imgfiles i where i.FOREIGN_KEY = f.RECORDITEM_ID and i.TYPE = '14' ) AS IMGCOUNT, | ||||
| 		r.IDENTIFICATION_ID | ||||
| 		from | ||||
| 		<include refid="tableName"></include> f | ||||
| 		where f.CHECKRECORD_ID=#{CHECKRECORD_ID} | ||||
| 		ORDER BY f.COMMON_ITEM_SORT | ||||
| 	</select> | ||||
| 
 | ||||
| 	<!-- 列表(全部) --> | ||||
| 	<select id="listAllForMap" parameterType="pd" resultType="pd"> | ||||
| 		select | ||||
| 			f.CHECK_CONTENT, | ||||
| 			f.LONGITUDE, | ||||
| 			f.LATITUDE | ||||
| 		from | ||||
| 		<include refid="tableName"></include> f | ||||
| 		where f.CHECKRECORD_ID=#{CHECKRECORD_ID} | ||||
| 		group by f.CHECK_CONTENT, f.LONGITUDE, f.LATITUDE | ||||
| 	</select> | ||||
| 
 | ||||
| 	<!-- 批量删除 --> | ||||
| 	<delete id="deleteAll" parameterType="String"> | ||||
| 		update | ||||
| 		<include refid="tableName"></include> | ||||
| 		set | ||||
| 			ISDELETE = '1' | ||||
| 		where | ||||
| 			RECORDITEM_ID in | ||||
| 		<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")"> | ||||
|                  #{item} | ||||
| 		</foreach> | ||||
| 	</delete> | ||||
| 
 | ||||
| 	<!-- 修改状态 --> | ||||
| 	<update id="editIsnormal" parameterType="pd"> | ||||
| 		update | ||||
| 		<include refid="tableName"></include> | ||||
| 		set | ||||
| 			ISNORMAL = #{ISNORMAL} | ||||
| 		where | ||||
| 			CHECKRECORD_ID = #{CHECKRECORD_ID} | ||||
| 			AND CUSTOM_ID = #{CUSTOM_ID} | ||||
| 			AND CUSTOM_ITEM_ID = #{CUSTOM_ITEM_ID} | ||||
| 	</update> | ||||
| 
 | ||||
| </mapper> | ||||
|  | @ -894,9 +894,9 @@ | |||
| 			and | ||||
| 				f.CREATOR=#{USER_ID} | ||||
| 		</if> | ||||
| 		<if test="LISTMANAGER_ID != null and LISTMANAGER_ID != ''"><!-- 关键词检索 --> | ||||
| 		<if test="CUSTOM_ID != null and CUSTOM_ID != ''"><!-- 关键词检索 --> | ||||
| 			and | ||||
| 				f.LISTMANAGER_ID = #{LISTMANAGER_ID} | ||||
| 				f.CUSTOM_ID = #{CUSTOM_ID} | ||||
| 		</if> | ||||
| 		<if test="IS_DAY != null and IS_DAY != ''"><!-- 关键词检索 --> | ||||
| 			and | ||||
|  |  | |||
|  | @ -107,4 +107,24 @@ | |||
| 		) | ||||
| 	</insert> | ||||
| 
 | ||||
| 	<!-- 获取用户检查清单的检查项目 --> | ||||
| 	<select id="getCheckItem" parameterType="pd" resultType="pd"> | ||||
| 		select | ||||
| 			f.CUSTOM_ID, | ||||
| 			f.CHECK_ITEM, | ||||
| 			d.DICTIONARY_NAMES | ||||
| 		from | ||||
| 			<include refid="tableName"></include> f | ||||
| 			left join BUS_HIDDENDANGERCHECKSTANDARD_DICTIONARY d on d.DICTIONARY_ID = t.CHECK_ITEM | ||||
| 		where f.ISDELETE = '0' and d.ISDELETE = '0' | ||||
| 			<if test="CUSTOM_ID != null and CUSTOM_ID != ''"><!-- 关键词检索 --> | ||||
| 				and f.CUSTOM_ID = #{CUSTOM_ID} | ||||
| 			</if> | ||||
| 			<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> | ||||
| 				and f.CORPINFO_ID = #{CORPINFO_ID} | ||||
| 			</if> | ||||
| 		GROUP BY f.CHECK_ITEM | ||||
| 		ORDER BY d.DICTIONARY_SORT ASC | ||||
| 	</select> | ||||
| 
 | ||||
| </mapper> | ||||
|  |  | |||
|  | @ -315,4 +315,41 @@ | |||
| 		where | ||||
| 		f.CUSTOM_ID = #{CUSTOM_ID} | ||||
| 	</select> | ||||
| 
 | ||||
| 	<!-- 列表(全部) --> | ||||
| 	<select id="getMyCheckList" parameterType="pd" resultType="pd"> | ||||
| 		select | ||||
| 		f.CUSTOM_ID, | ||||
| 		f.CORPINFO_ID, | ||||
| 		f.NAME, | ||||
| 		t.NAME TYPENAME, | ||||
| 		p.NAME PERIODNAME, | ||||
| 		f.USER_ID | ||||
| 		u.NAME USER_NAME, | ||||
| 		f.START_DATE, | ||||
| 		f.END_DATE, | ||||
| 		f.BAO_BAO_TYPE, | ||||
| 		COUNT(bhci.CUSTOM_ITEM_ID) count, | ||||
| 		getStandardCheckedNum(f.CUSTOM_ID) checkCount | ||||
| 		from | ||||
| 		<include refid="tableName"></include> f | ||||
| 		left join sys_dictionaries t on f.TYPE = t.BIANMA | ||||
| 		left join sys_dictionaries p on f.PERIOD = p.BIANMA | ||||
| 		left join OA_DEPARTMENT d on d.DEPARTMENT_ID=f.DEPARTMENT_ID | ||||
| 		left join sys_user u on u.USER_ID = f.USER_ID | ||||
| 		left join bus_hiddendangercheckstandard_custom_item bhci on bhci.CUSTOM_ID = f.CUSTOM_ID and bhci.ISDELETE = '0' | ||||
| 		where | ||||
| 		f.ISDELETE = 0 | ||||
| 		and bhci.ISDELETE = 0 | ||||
| 		and f.COMMON_STATUS = 1 | ||||
| 		and f.CORPINFO_ID = #{CORPINFO_ID} | ||||
| 		<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 --> | ||||
| 			and | ||||
| 			( | ||||
| 			bhci.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') | ||||
| 			) | ||||
| 		</if> | ||||
| 		GROUP BY f.CUSTOM_ID | ||||
| 		ORDER BY f.COMMON_ITEM_SORT ASC | ||||
| 	</select> | ||||
| </mapper> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue