forked from integrated_whb/integrated_whb
				
			Merge remote-tracking branch 'origin/dev' into dev
						commit
						862461a376
					
				| 
						 | 
					@ -7,6 +7,7 @@ import com.zcloud.entity.Page;
 | 
				
			||||||
import com.zcloud.entity.PageData;
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
import com.zcloud.logs.LogAnno;
 | 
					import com.zcloud.logs.LogAnno;
 | 
				
			||||||
import com.zcloud.service.check.*;
 | 
					import com.zcloud.service.check.*;
 | 
				
			||||||
 | 
					import com.zcloud.service.hiddenDangerCheckStandard.CustomService;
 | 
				
			||||||
import com.zcloud.service.offduty.OffDutyService;
 | 
					import com.zcloud.service.offduty.OffDutyService;
 | 
				
			||||||
import com.zcloud.service.risk.IdentificationPartsService;
 | 
					import com.zcloud.service.risk.IdentificationPartsService;
 | 
				
			||||||
import com.zcloud.service.risk.RiskPointService;
 | 
					import com.zcloud.service.risk.RiskPointService;
 | 
				
			||||||
| 
						 | 
					@ -61,6 +62,9 @@ public class ListManagerController extends BaseController {
 | 
				
			||||||
	private UsersService usersService;
 | 
						private UsersService usersService;
 | 
				
			||||||
	@Autowired
 | 
						@Autowired
 | 
				
			||||||
	private OffDutyService offdutyService;
 | 
						private OffDutyService offdutyService;
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private CustomService customService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**新增
 | 
						/**新增
 | 
				
			||||||
	 * @param
 | 
						 * @param
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
| 
						 | 
					@ -941,7 +945,7 @@ public class ListManagerController extends BaseController {
 | 
				
			||||||
			}else {
 | 
								}else {
 | 
				
			||||||
				list.put("stateMy", "1");
 | 
									list.put("stateMy", "1");
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								list.put("List_type", "1");  //清单种类:风险管控清单
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		map.put("varList", varList);
 | 
							map.put("varList", varList);
 | 
				
			||||||
		map.put("page", page);
 | 
							map.put("page", page);
 | 
				
			||||||
| 
						 | 
					@ -1023,6 +1027,81 @@ public class ListManagerController extends BaseController {
 | 
				
			||||||
		return map;
 | 
							return map;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						@RequestMapping(value="/riskStandardRecordList")
 | 
				
			||||||
 | 
						@ResponseBody
 | 
				
			||||||
 | 
						@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "列表")
 | 
				
			||||||
 | 
						public Object riskStandardRecordList(Page page) throws Exception{
 | 
				
			||||||
 | 
							Map<String,Object> map = new HashMap<String,Object>();
 | 
				
			||||||
 | 
							String errInfo = "success";
 | 
				
			||||||
 | 
							PageData pd = new PageData();
 | 
				
			||||||
 | 
							PageData npd = new PageData();
 | 
				
			||||||
 | 
							pd = this.getPageData();
 | 
				
			||||||
 | 
							npd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());	//企业
 | 
				
			||||||
 | 
					//		pd.put("POST_ID", Jurisdiction.getPOST_ID());	//岗位
 | 
				
			||||||
 | 
							pd.put("USER_ID", Jurisdiction.getUSER_ID());
 | 
				
			||||||
 | 
							npd.put("ISMAIN", Jurisdiction.getIS_MAIN());
 | 
				
			||||||
 | 
							npd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
 | 
				
			||||||
 | 
							npd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
 | 
				
			||||||
 | 
							PageData cpd = new PageData();
 | 
				
			||||||
 | 
							cpd = usersService.findById(pd);
 | 
				
			||||||
 | 
							npd.put("ISLEADER", cpd.getString("ISLEADER"));
 | 
				
			||||||
 | 
							if(cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")){
 | 
				
			||||||
 | 
								String DEPARTMENT_ID = npd.getString("DEPARTMENT_ID");
 | 
				
			||||||
 | 
								String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
 | 
				
			||||||
 | 
								ids=npd.getString("DEPARTMENT_ID")+","+ids;   //把自己部门插入进去
 | 
				
			||||||
 | 
								if(ids!=null && Tools.notEmpty(ids)&& ids.lastIndexOf(",")>-1) {
 | 
				
			||||||
 | 
									ids = ids.substring(0,ids.lastIndexOf(","));
 | 
				
			||||||
 | 
									npd.put("DEPARTMENT_IDS", ids.split(","));
 | 
				
			||||||
 | 
								}else {
 | 
				
			||||||
 | 
									npd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}else {
 | 
				
			||||||
 | 
								if(npd.getString("ISMAIN").equals("0")){
 | 
				
			||||||
 | 
									npd.put("USER_ID",Jurisdiction.getUSER_ID());
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							String DEPTIDS = pd.getString("DEPTIDS");
 | 
				
			||||||
 | 
							if(Tools.notEmpty(DEPTIDS)) {
 | 
				
			||||||
 | 
								String DEPT_IDS[] = DEPTIDS.split(",");
 | 
				
			||||||
 | 
								npd.put("DEPT_IDS", DEPT_IDS);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							String KEYWORDS = pd.getString("KEYWORDS");						//关键词检索条件
 | 
				
			||||||
 | 
							if(Tools.notEmpty(KEYWORDS))npd.put("KEYWORDS", KEYWORDS.trim());
 | 
				
			||||||
 | 
							String STARTTIME = pd.getString("STARTTIME");						//关键词检索条件
 | 
				
			||||||
 | 
							if(Tools.notEmpty(STARTTIME))npd.put("STARTTIME", STARTTIME.trim() + " 00:00:00");
 | 
				
			||||||
 | 
							String ENDTIME = pd.getString("ENDTIME");						//关键词检索条件
 | 
				
			||||||
 | 
							if(Tools.notEmpty(ENDTIME))npd.put("ENDTIME", ENDTIME.trim() + " 23:59:59");
 | 
				
			||||||
 | 
							npd.put("ISDELETE",pd.getString("ISDELETE"));
 | 
				
			||||||
 | 
							npd.put("USERNAME",pd.getString("USERNAME"));
 | 
				
			||||||
 | 
							npd.put("STATUS",pd.getString("STATUS"));
 | 
				
			||||||
 | 
							npd.put("PERIOD",pd.getString("PERIOD"));
 | 
				
			||||||
 | 
							npd.put("OVERTIME",pd.getString("OVERTIME"));
 | 
				
			||||||
 | 
							npd.put("WORKSTATUS",pd.getString("WORKSTATUS"));
 | 
				
			||||||
 | 
							npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
 | 
				
			||||||
 | 
							npd.put("TYPE",pd.getString("TYPE"));
 | 
				
			||||||
 | 
							npd.put("HASHIDDEN",pd.getString("HASHIDDEN"));
 | 
				
			||||||
 | 
							npd.put("RISKCHECKLISTTYPE",pd.getString("RISKCHECKLISTTYPE"));
 | 
				
			||||||
 | 
							page.setPd(npd);
 | 
				
			||||||
 | 
							List<PageData>	varList = listmanagerService.riskStandardRecordList(page);	//列出ListManager列表
 | 
				
			||||||
 | 
							for (PageData list : varList) {
 | 
				
			||||||
 | 
								String userId= list.getString("USER_ID");
 | 
				
			||||||
 | 
								if(userId.equals(Jurisdiction.getUSER_ID())) {
 | 
				
			||||||
 | 
									list.put("stateMy", "0");
 | 
				
			||||||
 | 
								}else {
 | 
				
			||||||
 | 
									list.put("stateMy", "1");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							map.put("varList", varList);
 | 
				
			||||||
 | 
							map.put("page", page);
 | 
				
			||||||
 | 
							map.put("result", errInfo);
 | 
				
			||||||
 | 
							return map;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	 /**去修改页面获取数据
 | 
						 /**去修改页面获取数据
 | 
				
			||||||
	 * @param
 | 
						 * @param
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
| 
						 | 
					@ -1734,4 +1813,108 @@ public class ListManagerController extends BaseController {
 | 
				
			||||||
		map.put("result", errInfo);
 | 
							map.put("result", errInfo);
 | 
				
			||||||
		return map;
 | 
							return map;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**清单排查列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						@RequestMapping(value="/riskStandardCheckList")
 | 
				
			||||||
 | 
						@ResponseBody
 | 
				
			||||||
 | 
						@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单排查",instructionsType = "列表")
 | 
				
			||||||
 | 
						public Object riskStandardCheckList(Page page) throws Exception{
 | 
				
			||||||
 | 
							Map<String,Object> map = new HashMap<String,Object>();
 | 
				
			||||||
 | 
							String errInfo = "success";
 | 
				
			||||||
 | 
							PageData pd = new PageData();
 | 
				
			||||||
 | 
							pd = this.getPageData();
 | 
				
			||||||
 | 
							PageData isRest = this.getPageData();
 | 
				
			||||||
 | 
							isRest.put("ISREST", "1");
 | 
				
			||||||
 | 
							isRest.put("USER_ID", Jurisdiction.getUSER_ID());
 | 
				
			||||||
 | 
							isRest.put("CORPINFO_ID",  Jurisdiction.getCORPINFO_ID());
 | 
				
			||||||
 | 
							List<PageData> restList = offdutyService.listAll(isRest);
 | 
				
			||||||
 | 
							if(restList != null && restList.size() > 0) {
 | 
				
			||||||
 | 
								// 休假中
 | 
				
			||||||
 | 
								map.put("ISREST", "1");
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								// 正常工作
 | 
				
			||||||
 | 
								map.put("ISREST", "0");
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							PageData npd = new PageData();
 | 
				
			||||||
 | 
							npd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());	//企业
 | 
				
			||||||
 | 
					//		pd.put("POST_ID", Jurisdiction.getPOST_ID());	//岗位
 | 
				
			||||||
 | 
							pd.put("USER_ID", Jurisdiction.getUSER_ID());
 | 
				
			||||||
 | 
							String indexType = pd.getString("indexType");						//关键词检索条件
 | 
				
			||||||
 | 
							if(Tools.notEmpty(indexType))pd.put("indexType", indexType.trim());
 | 
				
			||||||
 | 
							if("1".equals(indexType)) {
 | 
				
			||||||
 | 
								npd.put("STATUS", "0");
 | 
				
			||||||
 | 
								String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
 | 
				
			||||||
 | 
								npd.put("DEPARTMENT_ID", DEPARTMENT_ID);
 | 
				
			||||||
 | 
							} else if("2".equals(indexType)) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								npd.put("STATUS", "1");
 | 
				
			||||||
 | 
								String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
 | 
				
			||||||
 | 
								npd.put("DEPARTMENT_ID", DEPARTMENT_ID);
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
 | 
				
			||||||
 | 
								String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
 | 
				
			||||||
 | 
								if(Jurisdiction.getIS_MAIN().equals("0")) {
 | 
				
			||||||
 | 
									if(ids!=null && Tools.notEmpty(ids) && ids.lastIndexOf(",")>-1 ) {
 | 
				
			||||||
 | 
										ids = ids.substring(0,ids.lastIndexOf(","));
 | 
				
			||||||
 | 
										npd.put("DEPARTMENT_IDS", ids.split(","));
 | 
				
			||||||
 | 
									}else {
 | 
				
			||||||
 | 
										npd.put("DEPARTMENT_ID", DEPARTMENT_ID);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							npd.put("orderUserId", Jurisdiction.getUSER_ID());
 | 
				
			||||||
 | 
							String KEYWORDS = pd.getString("KEYWORDS");						//关键词检索条件
 | 
				
			||||||
 | 
							if(Tools.notEmpty(KEYWORDS))npd.put("KEYWORDS", KEYWORDS.trim());
 | 
				
			||||||
 | 
							String USERNAME = pd.getString("USERNAME");						//关键词检索条件
 | 
				
			||||||
 | 
							if(Tools.notEmpty(USERNAME))npd.put("USERNAME", USERNAME.trim());
 | 
				
			||||||
 | 
							npd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
 | 
				
			||||||
 | 
							npd.put("ISMAIN", Jurisdiction.getIS_MAIN());
 | 
				
			||||||
 | 
							npd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
 | 
				
			||||||
 | 
							npd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
 | 
				
			||||||
 | 
							PageData cpd = new PageData();
 | 
				
			||||||
 | 
							cpd = usersService.findById(pd);
 | 
				
			||||||
 | 
							npd.put("ISLEADER", cpd.getString("ISLEADER"));
 | 
				
			||||||
 | 
							if(cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")){
 | 
				
			||||||
 | 
								String DEPARTMENT_ID = npd.getString("DEPARTMENT_ID");
 | 
				
			||||||
 | 
								String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
 | 
				
			||||||
 | 
								ids=npd.getString("DEPARTMENT_ID")+","+ids;   //把自己部门插入进去
 | 
				
			||||||
 | 
								if(ids!=null && Tools.notEmpty(ids)&& ids.lastIndexOf(",")>-1) {
 | 
				
			||||||
 | 
									ids = ids.substring(0,ids.lastIndexOf(","));
 | 
				
			||||||
 | 
									npd.put("DEPARTMENT_IDS", ids.split(","));
 | 
				
			||||||
 | 
								}else {
 | 
				
			||||||
 | 
									npd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}else{
 | 
				
			||||||
 | 
								if(npd.getString("ISMAIN").equals("0")){
 | 
				
			||||||
 | 
									npd.put("USER_ID",Jurisdiction.getUSER_ID());
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							String DEPTIDS = pd.getString("DEPTIDS");
 | 
				
			||||||
 | 
							if(Tools.notEmpty(DEPTIDS)) {
 | 
				
			||||||
 | 
								String DEPT_IDS[] = DEPTIDS.split(",");
 | 
				
			||||||
 | 
								npd.put("DEPT_IDS", DEPT_IDS);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							npd.put("PERIOD",pd.getString("PERIOD"));
 | 
				
			||||||
 | 
							npd.put("STATUS",pd.getString("STATUS"));
 | 
				
			||||||
 | 
							npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
 | 
				
			||||||
 | 
							page.setPd(npd);
 | 
				
			||||||
 | 
							List<PageData>	varList = listmanagerService.riskStandardCheckList(page);	//列出ListManager列表
 | 
				
			||||||
 | 
							for (PageData list : varList) {
 | 
				
			||||||
 | 
								String userId= list.getString("USER_ID");
 | 
				
			||||||
 | 
								if(userId.equals(Jurisdiction.getUSER_ID())) {
 | 
				
			||||||
 | 
									list.put("stateMy", "0");
 | 
				
			||||||
 | 
								}else {
 | 
				
			||||||
 | 
									list.put("stateMy", "1");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								list.put("List_type", "1");  //清单种类:风险管控清单
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							map.put("varList", varList);
 | 
				
			||||||
 | 
							map.put("page", page);
 | 
				
			||||||
 | 
							map.put("result", errInfo);
 | 
				
			||||||
 | 
							return map;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
					@ -1,5 +1,7 @@
 | 
				
			||||||
package com.zcloud.controller.hiddenDangerCheckStandard;
 | 
					package com.zcloud.controller.hiddenDangerCheckStandard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.alibaba.fastjson.JSON;
 | 
				
			||||||
 | 
					import com.alibaba.fastjson.JSONObject;
 | 
				
			||||||
import com.zcloud.controller.base.BaseController;
 | 
					import com.zcloud.controller.base.BaseController;
 | 
				
			||||||
import com.zcloud.entity.Page;
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
import com.zcloud.entity.PageData;
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
| 
						 | 
					@ -21,10 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
 | 
				
			||||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
					import org.springframework.web.bind.annotation.ResponseBody;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.*;
 | 
				
			||||||
import java.util.HashMap;
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
import java.util.Map;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 说明:清单管理-隐患排查清单
 | 
					 * 说明:清单管理-隐患排查清单
 | 
				
			||||||
| 
						 | 
					@ -36,202 +35,346 @@ import java.util.Map;
 | 
				
			||||||
@RequestMapping("/hiddenstandardCustom")
 | 
					@RequestMapping("/hiddenstandardCustom")
 | 
				
			||||||
public class CustomController extends BaseController {
 | 
					public class CustomController extends BaseController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private CustomService customService;
 | 
					    private CustomService customService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private CustomItemService customItemService;
 | 
					    private CustomItemService customItemService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private CustomDisableTimeService customDisableTimeService;
 | 
					    private CustomDisableTimeService customDisableTimeService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private DepartmentService departmentService;
 | 
					    private DepartmentService departmentService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private CustomCheckRecordService customCheckRecordService;
 | 
					    private CustomCheckRecordService customCheckRecordService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private RecordItemService recordItemService;
 | 
					    private RecordItemService recordItemService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private CustomStatisticsService customStatisticsService;
 | 
					    private CustomStatisticsService customStatisticsService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private IdentificationPartsService identificationPartsService;
 | 
					    private IdentificationPartsService identificationPartsService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private ListDisableTimeService listdisabletimeService;
 | 
					    private ListDisableTimeService listdisabletimeService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private CheckRouteService checkRouteService;
 | 
					    private CheckRouteService checkRouteService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private UsersService usersService;
 | 
					    private UsersService usersService;
 | 
				
			||||||
	@Autowired
 | 
					    @Autowired
 | 
				
			||||||
	private OffDutyService offdutyService;
 | 
					    private OffDutyService offdutyService;
 | 
				
			||||||
	/**新增
 | 
					 | 
				
			||||||
	 * @param
 | 
					 | 
				
			||||||
	 * @throws Exception
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	@RequestMapping(value="/add")
 | 
					 | 
				
			||||||
	@ResponseBody
 | 
					 | 
				
			||||||
	@Transactional
 | 
					 | 
				
			||||||
	@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "新增")
 | 
					 | 
				
			||||||
	public Object add() throws Exception{
 | 
					 | 
				
			||||||
		Map<String,Object> map = new HashMap<String,Object>();
 | 
					 | 
				
			||||||
		String errInfo = "success";
 | 
					 | 
				
			||||||
		PageData pd = new PageData();
 | 
					 | 
				
			||||||
		pd = this.getPageData();
 | 
					 | 
				
			||||||
		pd.put("CUSTOM_ID", this.get32UUID());
 | 
					 | 
				
			||||||
		Warden.initDate(pd);
 | 
					 | 
				
			||||||
		customService.save(pd);
 | 
					 | 
				
			||||||
		PageData itempd = new PageData();
 | 
					 | 
				
			||||||
		itempd.putAll(pd);
 | 
					 | 
				
			||||||
		itempd.put("CUSTOM_ITEM_ID", this.get32UUID());
 | 
					 | 
				
			||||||
		customItemService.save(itempd);
 | 
					 | 
				
			||||||
		map.put("result", errInfo);
 | 
					 | 
				
			||||||
		return map;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**列表
 | 
					    /**
 | 
				
			||||||
	 * @param page
 | 
					     * 新增
 | 
				
			||||||
	 * @throws Exception
 | 
					     *
 | 
				
			||||||
	 */
 | 
					     * @param
 | 
				
			||||||
	@RequestMapping(value="/list")
 | 
					     * @throws Exception
 | 
				
			||||||
	@ResponseBody
 | 
					     */
 | 
				
			||||||
	@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "列表")
 | 
					    @RequestMapping(value = "/add")
 | 
				
			||||||
	public Object list(Page page) throws Exception{
 | 
					    @ResponseBody
 | 
				
			||||||
		Map<String,Object> map = new HashMap<String,Object>();
 | 
					    @Transactional
 | 
				
			||||||
		String errInfo = "success";
 | 
					    @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "新增")
 | 
				
			||||||
		PageData pd = new PageData();
 | 
					    public Object add() throws Exception {
 | 
				
			||||||
		pd = this.getPageData();
 | 
					        Map<String, Object> map = new HashMap<String, Object>();
 | 
				
			||||||
		pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
 | 
					        String errInfo = "success";
 | 
				
			||||||
		String KEYWORDS = pd.getString("KEYWORDS");						//关键词检索条件
 | 
					        PageData pd = new PageData();
 | 
				
			||||||
		if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
 | 
					        pd = this.getPageData();
 | 
				
			||||||
		page.setPd(pd);
 | 
					        pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());    //企业
 | 
				
			||||||
		List<PageData>	varList = customService.list(page);
 | 
					        if (pd.getString("TYPE").equals("listType0006")) {
 | 
				
			||||||
		map.put("varList", varList);
 | 
					            pd.put("ISDELETE", "-99");
 | 
				
			||||||
		map.put("result", errInfo);
 | 
					        } else {
 | 
				
			||||||
		return map;
 | 
					            pd.put("ISDELETE", "0");    //是否删除
 | 
				
			||||||
	}
 | 
					        }
 | 
				
			||||||
 | 
					        pd.put("CREATOR", Jurisdiction.getUsername());    //添加人
 | 
				
			||||||
 | 
					        pd.put("CREATTIME", DateUtil.date2Str(new Date()));    //创建时间
 | 
				
			||||||
 | 
					        pd.put("OPERATOR", Jurisdiction.getUsername());    //修改人
 | 
				
			||||||
 | 
					        pd.put("OPERATTIME", DateUtil.date2Str(new Date()));    //修改时间
 | 
				
			||||||
 | 
					        String listPeriod = pd.getString("PERIOD");
 | 
				
			||||||
 | 
					        if (pd.get("USER_IDS") != null && Tools.notEmpty(pd.get("USER_IDS").toString())) {
 | 
				
			||||||
 | 
					            String[] userIds = pd.get("USER_IDS").toString().split(",");
 | 
				
			||||||
 | 
					            for (int i = 0; i < userIds.length; i++) {
 | 
				
			||||||
 | 
					                pd.put("CUSTOM_ID", this.get32UUID());    //主键
 | 
				
			||||||
 | 
					                pd.put("USER_ID", userIds[i]);
 | 
				
			||||||
 | 
					                if (pd.get("LISTITEM") != null && !pd.get("LISTITEM").equals("")) {
 | 
				
			||||||
 | 
					                    List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("LISTITEM").toString());
 | 
				
			||||||
 | 
					                    for (JSONObject json : list) {
 | 
				
			||||||
 | 
					                        PageData itme = new PageData();
 | 
				
			||||||
 | 
					                        itme.put("CUSTOM_ITEM_ID", this.get32UUID());    //主键
 | 
				
			||||||
 | 
					                        itme.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
 | 
					                        itme.put("CHECK_CATEGORY", json.get("CHECK_CATEGORY"));
 | 
				
			||||||
 | 
					                        itme.put("CHECK_ITEM", json.get("CHECK_ITEM"));
 | 
				
			||||||
 | 
					                        itme.put("CHECK_CONTENT", json.get("CHECK_CONTENT"));
 | 
				
			||||||
 | 
					                        itme.put("CHECK_STANDARD", json.get("CHECK_STANDARD"));
 | 
				
			||||||
 | 
					                        itme.put("REFERENCE_BASIS", json.get("REFERENCE_BASIS"));
 | 
				
			||||||
 | 
					                        itme.put("CHECK_QUALIFIED", json.get("CHECK_QUALIFIED"));
 | 
				
			||||||
 | 
					                        itme.put("CHECK_UNQUALIFIED", json.get("CHECK_UNQUALIFIED"));
 | 
				
			||||||
 | 
					                        itme.put("OPERATION_TYPE", json.get("OPERATION_TYPE"));
 | 
				
			||||||
 | 
					                        itme.put("COMMON_ITEM_SORT", Tools.notEmpty(json.get("COMMON_ITEM_SORT").toString())? json.get("COMMON_ITEM_SORT") : "");
 | 
				
			||||||
 | 
					                        itme.put("COMMON_ID", Tools.notEmpty(json.get("COMMON_ID").toString()) ? json.get("COMMON_ID") : "");
 | 
				
			||||||
 | 
					                        itme.put("COMMON_ITEM_ID", Tools.notEmpty(json.get("COMMON_ITEM_ID").toString()) ? json.get("COMMON_ITEM_ID") : "");
 | 
				
			||||||
 | 
					                        itme.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());    //企业
 | 
				
			||||||
 | 
					                        itme.put("ISDELETE", "0");    //是否删除
 | 
				
			||||||
 | 
					                        itme.put("CREATOR_ID", Jurisdiction.getUSER_ID());    //添加人id
 | 
				
			||||||
 | 
					                        itme.put("CREATOR_NAME", Jurisdiction.getUsername());    //添加人
 | 
				
			||||||
 | 
					                        itme.put("CREATE_TIME", DateUtil.date2Str(new Date()));    //创建时间
 | 
				
			||||||
 | 
					                        itme.put("OPERATOR_ID", Jurisdiction.getUSER_ID());    //修改人
 | 
				
			||||||
 | 
					                        itme.put("OPERATOR_NAME", Jurisdiction.getUsername());    //修改时间
 | 
				
			||||||
 | 
					                        itme.put("OPERATE_TIME", DateUtil.date2Str(new Date()));    //修改时间
 | 
				
			||||||
 | 
					                        itme.put("DELETEOR_ID", Jurisdiction.getUSER_ID());    //添加人id
 | 
				
			||||||
 | 
					                        itme.put("DELETEOR_NAME", Jurisdiction.getUsername());    //添加人
 | 
				
			||||||
 | 
					                        itme.put("DELETE_TIME", DateUtil.date2Str(new Date()));    //删除时间
 | 
				
			||||||
 | 
					                        customItemService.save(itme);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                pd.put("PERIOD", listPeriod);
 | 
				
			||||||
 | 
					                customService.save(pd);
 | 
				
			||||||
 | 
					                // 修改清单统计
 | 
				
			||||||
 | 
					                if (!pd.getString("TYPE").equals("listType0006")) {
 | 
				
			||||||
 | 
					                    if (pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
 | 
				
			||||||
 | 
					                        pd.put("CUSTOMSTATISTICS_ID", this.get32UUID());    //主键
 | 
				
			||||||
 | 
					                        if ("listType0005".equals(pd.get("TYPE").toString())) {
 | 
				
			||||||
 | 
					                            pd.put("STARTTIME", pd.get("START_DATE").toString() + " 00:00:00");
 | 
				
			||||||
 | 
					                            pd.put("ENDTIME", pd.get("END_DATE").toString() + " 23:59:59");
 | 
				
			||||||
 | 
					                            pd.put("PERIOD", null);
 | 
				
			||||||
 | 
					                            PageData statistics = customStatisticsService.findByCondition(pd);
 | 
				
			||||||
 | 
					                            if (statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
				
			||||||
 | 
					                                statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) + 2);
 | 
				
			||||||
 | 
					                                customStatisticsService.edit(statistics);
 | 
				
			||||||
 | 
					                            } else {
 | 
				
			||||||
 | 
					                                pd.put("NOTEXAMINEDNUM", 2);
 | 
				
			||||||
 | 
					                                customStatisticsService.save(pd);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        } else {
 | 
				
			||||||
 | 
					                            if (pd.get("PERIOD") != null && Tools.notEmpty(pd.get("PERIOD").toString())) {
 | 
				
			||||||
 | 
					                                String period = pd.get("PERIOD").toString();
 | 
				
			||||||
 | 
					                                switch (period) {
 | 
				
			||||||
 | 
					                                    case "checkPeriod0001"://每日
 | 
				
			||||||
 | 
					                                        pd.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
 | 
				
			||||||
 | 
					                                        pd.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
 | 
				
			||||||
 | 
					                                        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    case "checkPeriod0002"://每周
 | 
				
			||||||
 | 
					                                        pd.put("STARTTIME", DateUtil.getWeekStart());
 | 
				
			||||||
 | 
					                                        pd.put("ENDTIME", DateUtil.getWeekEnd());
 | 
				
			||||||
 | 
					                                        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    case "checkPeriod0003"://每旬
 | 
				
			||||||
 | 
					                                        String year = DateUtil.getYear().toString();
 | 
				
			||||||
 | 
					                                        String month = DateUtil.getMonth().toString();
 | 
				
			||||||
 | 
					                                        Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
 | 
				
			||||||
 | 
					                                        String startTime = year + "-" + month + "-";
 | 
				
			||||||
 | 
					                                        String endTime = year + "-" + month + "-";
 | 
				
			||||||
 | 
					                                        if (day <= 10) {
 | 
				
			||||||
 | 
					                                            startTime = startTime + "01 00:00:00";
 | 
				
			||||||
 | 
					                                            endTime = endTime + "10 23:59:59";
 | 
				
			||||||
 | 
					                                        } else if (day > 10 && day <= 20) {
 | 
				
			||||||
 | 
					                                            startTime = startTime + "11 00:00:00";
 | 
				
			||||||
 | 
					                                            endTime = endTime + "20 23:59:59";
 | 
				
			||||||
 | 
					                                        } else {
 | 
				
			||||||
 | 
					                                            startTime = startTime + "21 00:00:00";
 | 
				
			||||||
 | 
					                                            endTime = DateUtil.getMonthEndDay() + " 23:59:59";
 | 
				
			||||||
 | 
					                                        }
 | 
				
			||||||
 | 
					                                        pd.put("STARTTIME", startTime);
 | 
				
			||||||
 | 
					                                        pd.put("ENDTIME", endTime);
 | 
				
			||||||
 | 
					                                        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    case "checkPeriod0004"://每月
 | 
				
			||||||
 | 
					                                        pd.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
 | 
				
			||||||
 | 
					                                        pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
 | 
				
			||||||
 | 
					                                        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    case "checkPeriod0005"://每季
 | 
				
			||||||
 | 
					                                        pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
 | 
				
			||||||
 | 
					                                        pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
 | 
				
			||||||
 | 
					                                        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    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);
 | 
				
			||||||
 | 
					                            } else {
 | 
				
			||||||
 | 
					                                pd.put("NOTEXAMINEDNUM", 1);
 | 
				
			||||||
 | 
					                                customStatisticsService.save(pd);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        map.put("result", errInfo);
 | 
				
			||||||
 | 
					        return map;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 列表
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param page
 | 
				
			||||||
 | 
					     * @throws Exception
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @RequestMapping(value = "/list")
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "列表")
 | 
				
			||||||
 | 
					    public Object list(Page page) 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());
 | 
				
			||||||
 | 
					        String KEYWORDS = pd.getString("KEYWORDS");                        //关键词检索条件
 | 
				
			||||||
 | 
					        if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
 | 
				
			||||||
 | 
					        page.setPd(pd);
 | 
				
			||||||
 | 
					        List<PageData> varList = customService.list(page);
 | 
				
			||||||
 | 
					        map.put("varList", varList);
 | 
				
			||||||
 | 
					        map.put("result", errInfo);
 | 
				
			||||||
 | 
					        return map;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**禁用
 | 
					    /**
 | 
				
			||||||
	 * @param out
 | 
					     * 禁用
 | 
				
			||||||
	 * @throws Exception
 | 
					     *
 | 
				
			||||||
	 */
 | 
					     * @param out
 | 
				
			||||||
	@RequestMapping(value="/delete")
 | 
					     * @throws Exception
 | 
				
			||||||
	@ResponseBody
 | 
					     */
 | 
				
			||||||
	@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "禁用")
 | 
					    @RequestMapping(value = "/delete")
 | 
				
			||||||
	public Object delete() throws Exception{
 | 
					    @ResponseBody
 | 
				
			||||||
		Map<String,String> map = new HashMap<String,String>();
 | 
					    @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "禁用")
 | 
				
			||||||
		String errInfo = "success";
 | 
					    public Object delete() throws Exception {
 | 
				
			||||||
		PageData pd = new PageData();
 | 
					        Map<String, String> map = new HashMap<String, String>();
 | 
				
			||||||
		pd = this.getPageData();
 | 
					        String errInfo = "success";
 | 
				
			||||||
		pd.put("OPERATOR", Jurisdiction.getUsername());	//修改人
 | 
					        PageData pd = new PageData();
 | 
				
			||||||
		pd.put("OPERATTIME", DateUtil.date2Str(new Date()));	//修改时间
 | 
					        pd = this.getPageData();
 | 
				
			||||||
		customService.delete(pd);
 | 
					        pd.put("OPERATOR", Jurisdiction.getUsername());    //修改人
 | 
				
			||||||
		pd = customService.findById(pd);
 | 
					        pd.put("OPERATTIME", DateUtil.date2Str(new Date()));    //修改时间
 | 
				
			||||||
		// 记录清单禁用开始时间
 | 
					        customService.delete(pd);
 | 
				
			||||||
 | 
					        pd = customService.findById(pd);
 | 
				
			||||||
 | 
					        // 记录清单禁用开始时间
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		PageData disPd = new PageData();
 | 
					        PageData disPd = new PageData();
 | 
				
			||||||
		disPd = this.getPageData();
 | 
					        disPd = this.getPageData();
 | 
				
			||||||
		disPd.put("CUSTOMDISABLETIME_ID", this.get32UUID());	//主键
 | 
					        disPd.put("CUSTOMDISABLETIME_ID", this.get32UUID());    //主键
 | 
				
			||||||
		disPd.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
					        disPd.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
		disPd.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
 | 
					        disPd.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
 | 
				
			||||||
		disPd.put("STARTTIME", DateUtil.date2Str(new Date()));	//开始时间
 | 
					        disPd.put("STARTTIME", DateUtil.date2Str(new Date()));    //开始时间
 | 
				
			||||||
		disPd.put("ISDELETE", "0");	//是否删除 0 未删除  1已删除
 | 
					        disPd.put("ISDELETE", "0");    //是否删除 0 未删除  1已删除
 | 
				
			||||||
		disPd.put("OPERATOR", Jurisdiction.getUsername());	//操作人
 | 
					        disPd.put("OPERATOR", Jurisdiction.getUsername());    //操作人
 | 
				
			||||||
		disPd.put("OPERATTIME", DateUtil.date2Str(new Date()));	//操作时间
 | 
					        disPd.put("OPERATTIME", DateUtil.date2Str(new Date()));    //操作时间
 | 
				
			||||||
		disPd.put("CREATOR", Jurisdiction.getUsername());	//创建人
 | 
					        disPd.put("CREATOR", Jurisdiction.getUsername());    //创建人
 | 
				
			||||||
		disPd.put("CREATTIME", DateUtil.date2Str(new Date()));	//创建时间
 | 
					        disPd.put("CREATTIME", DateUtil.date2Str(new Date()));    //创建时间
 | 
				
			||||||
		customDisableTimeService.save(disPd);
 | 
					        customDisableTimeService.save(disPd);
 | 
				
			||||||
		// 修改清单统计
 | 
					        // 修改清单统计
 | 
				
			||||||
		if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
 | 
					        if (pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
 | 
				
			||||||
			if("listType0005".equals(pd.get("TYPE").toString())) {
 | 
					            if ("listType0005".equals(pd.get("TYPE").toString())) {
 | 
				
			||||||
				pd.put("CUSTOMSTATISTICS_ID", this.get32UUID());	//主键
 | 
					                pd.put("CUSTOMSTATISTICS_ID", this.get32UUID());    //主键
 | 
				
			||||||
				pd.put("STARTTIME", pd.get("START_DATE").toString()+" 00:00:00");
 | 
					                pd.put("STARTTIME", pd.get("START_DATE").toString() + " 00:00:00");
 | 
				
			||||||
				pd.put("ENDTIME", pd.get("END_DATE").toString()+" 23:59:59");
 | 
					                pd.put("ENDTIME", pd.get("END_DATE").toString() + " 23:59:59");
 | 
				
			||||||
				pd.put("PERIOD", null);
 | 
					                pd.put("PERIOD", null);
 | 
				
			||||||
				PageData statistics = customStatisticsService.findByCondition(pd);
 | 
					                PageData statistics = customStatisticsService.findByCondition(pd);
 | 
				
			||||||
				if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
 | 
					                if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
 | 
				
			||||||
					statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-2);
 | 
					                    statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
 | 
				
			||||||
					customStatisticsService.edit(statistics);
 | 
					                    customStatisticsService.edit(statistics);
 | 
				
			||||||
				}
 | 
					                }
 | 
				
			||||||
				pd.put("ISSTATISTICS", '0');
 | 
					                pd.put("ISSTATISTICS", '0');
 | 
				
			||||||
				// 本期已检查的不计入统计
 | 
					                // 本期已检查的不计入统计
 | 
				
			||||||
				customCheckRecordService.editStatistics(pd);
 | 
					                customCheckRecordService.editStatistics(pd);
 | 
				
			||||||
			} else {
 | 
					            } else {
 | 
				
			||||||
				if(pd.get("PERIOD") != null && Tools.notEmpty(pd.get("PERIOD").toString())) {
 | 
					                if (pd.get("PERIOD") != null && Tools.notEmpty(pd.get("PERIOD").toString())) {
 | 
				
			||||||
					String period = pd.get("PERIOD").toString();
 | 
					                    String period = pd.get("PERIOD").toString();
 | 
				
			||||||
					switch (period) {
 | 
					                    switch (period) {
 | 
				
			||||||
						case "checkPeriod0001"://每日
 | 
					                        case "checkPeriod0001"://每日
 | 
				
			||||||
							pd.put("STARTTIME", DateUtil.getDay()+" 00:00:00");
 | 
					                            pd.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
 | 
				
			||||||
							pd.put("ENDTIME", DateUtil.getDay()+" 23:59:59");
 | 
					                            pd.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						case "checkPeriod0002"://每周
 | 
					                        case "checkPeriod0002"://每周
 | 
				
			||||||
							pd.put("STARTTIME", DateUtil.getWeekStart());
 | 
					                            pd.put("STARTTIME", DateUtil.getWeekStart());
 | 
				
			||||||
							pd.put("ENDTIME", DateUtil.getWeekEnd());
 | 
					                            pd.put("ENDTIME", DateUtil.getWeekEnd());
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						case "checkPeriod0003"://每旬
 | 
					                        case "checkPeriod0003"://每旬
 | 
				
			||||||
							String year = DateUtil.getYear().toString();
 | 
					                            String year = DateUtil.getYear().toString();
 | 
				
			||||||
							String month = DateUtil.getMonth().toString();
 | 
					                            String month = DateUtil.getMonth().toString();
 | 
				
			||||||
							Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
 | 
					                            Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
 | 
				
			||||||
							String startTime = year + "-" + month + "-";
 | 
					                            String startTime = year + "-" + month + "-";
 | 
				
			||||||
							String endTime = year + "-" + month + "-";
 | 
					                            String endTime = year + "-" + month + "-";
 | 
				
			||||||
							if(day <= 10) {
 | 
					                            if (day <= 10) {
 | 
				
			||||||
								startTime = startTime+"01 00:00:00";
 | 
					                                startTime = startTime + "01 00:00:00";
 | 
				
			||||||
								endTime = endTime+"10 23:59:59";
 | 
					                                endTime = endTime + "10 23:59:59";
 | 
				
			||||||
							} else if(day > 10 && day <= 20) {
 | 
					                            } else if (day > 10 && day <= 20) {
 | 
				
			||||||
								startTime = startTime+"11 00:00:00";
 | 
					                                startTime = startTime + "11 00:00:00";
 | 
				
			||||||
								endTime = endTime+"20 23:59:59";
 | 
					                                endTime = endTime + "20 23:59:59";
 | 
				
			||||||
							} else {
 | 
					                            } else {
 | 
				
			||||||
								startTime = startTime+"21 00:00:00";
 | 
					                                startTime = startTime + "21 00:00:00";
 | 
				
			||||||
								endTime = DateUtil.getMonthEndDay()+" 23:59:59";
 | 
					                                endTime = DateUtil.getMonthEndDay() + " 23:59:59";
 | 
				
			||||||
							}
 | 
					                            }
 | 
				
			||||||
							pd.put("STARTTIME", startTime);
 | 
					                            pd.put("STARTTIME", startTime);
 | 
				
			||||||
							pd.put("ENDTIME", endTime);
 | 
					                            pd.put("ENDTIME", endTime);
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						case "checkPeriod0004"://每月
 | 
					                        case "checkPeriod0004"://每月
 | 
				
			||||||
							pd.put("STARTTIME", DateUtil.getMonthFirstDay()+" 00:00:00");
 | 
					                            pd.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
 | 
				
			||||||
							pd.put("ENDTIME", DateUtil.getMonthEndDay()+" 23:59:59");
 | 
					                            pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						case "checkPeriod0005"://每季
 | 
					                        case "checkPeriod0005"://每季
 | 
				
			||||||
							pd.put("STARTTIME", DateUtil.quarterStart()+" 00:00:00");
 | 
					                            pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
 | 
				
			||||||
							pd.put("ENDTIME", DateUtil.quarterEnd()+" 23:59:59");
 | 
					                            pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						case "checkPeriod0006"://每年
 | 
					                        case "checkPeriod0006"://每年
 | 
				
			||||||
							pd.put("STARTTIME", DateUtil.getCurrYearFirst()+" 00:00:00");
 | 
					                            pd.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
 | 
				
			||||||
							pd.put("ENDTIME", DateUtil.getCurrYearLast()+" 23:59:59");
 | 
					                            pd.put("ENDTIME", DateUtil.getCurrYearLast() + " 23:59:59");
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						case "checkPeriod0007"://半年
 | 
					                        case "checkPeriod0007"://半年
 | 
				
			||||||
							String byear = DateUtil.getYear().toString();
 | 
					                            String byear = DateUtil.getYear().toString();
 | 
				
			||||||
							Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
 | 
					                            Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
 | 
				
			||||||
							if(bmonth <= 6) {
 | 
					                            if (bmonth <= 6) {
 | 
				
			||||||
								pd.put("STARTTIME", byear+"-01-01 00:00:00");
 | 
					                                pd.put("STARTTIME", byear + "-01-01 00:00:00");
 | 
				
			||||||
								pd.put("ENDTIME", byear+"-06-30 23:59:59");
 | 
					                                pd.put("ENDTIME", byear + "-06-30 23:59:59");
 | 
				
			||||||
							} else if(bmonth > 6) {
 | 
					                            } else if (bmonth > 6) {
 | 
				
			||||||
								pd.put("STARTTIME", byear+"-07-01 00:00:00");
 | 
					                                pd.put("STARTTIME", byear + "-07-01 00:00:00");
 | 
				
			||||||
								pd.put("ENDTIME", byear+"-12-31 23:59:59");
 | 
					                                pd.put("ENDTIME", byear + "-12-31 23:59:59");
 | 
				
			||||||
							}
 | 
					                            }
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						default:
 | 
					                        default:
 | 
				
			||||||
							break;
 | 
					                            break;
 | 
				
			||||||
					}
 | 
					                    }
 | 
				
			||||||
				}
 | 
					                }
 | 
				
			||||||
				PageData statistics = customStatisticsService.findByCondition(pd);
 | 
					                PageData statistics = customStatisticsService.findByCondition(pd);
 | 
				
			||||||
				if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
 | 
					                if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
 | 
				
			||||||
					statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-1);
 | 
					                    statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
 | 
				
			||||||
					customStatisticsService.edit(statistics);
 | 
					                    customStatisticsService.edit(statistics);
 | 
				
			||||||
				}
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				pd.put("ISSTATISTICS", '0');
 | 
					                pd.put("ISSTATISTICS", '0');
 | 
				
			||||||
				// 本期已检查的不计入统计
 | 
					                // 本期已检查的不计入统计
 | 
				
			||||||
				customCheckRecordService.editStatistics(pd);
 | 
					                customCheckRecordService.editStatistics(pd);
 | 
				
			||||||
			}
 | 
					            }
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
		// 将本频率内已检查的记录,改为不计入
 | 
					        // 将本频率内已检查的记录,改为不计入
 | 
				
			||||||
		map.put("result", errInfo);				//返回结果
 | 
					        map.put("result", errInfo);                //返回结果
 | 
				
			||||||
		return map;
 | 
					        return map;
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//	/**列表
 | 
					//	/**列表
 | 
				
			||||||
| 
						 | 
					@ -411,205 +554,208 @@ public class CustomController extends BaseController {
 | 
				
			||||||
//		map.put("result", errInfo);
 | 
					//		map.put("result", errInfo);
 | 
				
			||||||
//		return map;
 | 
					//		return map;
 | 
				
			||||||
//	}
 | 
					//	}
 | 
				
			||||||
//
 | 
					
 | 
				
			||||||
//	 /**去修改页面获取数据
 | 
						 /**去修改页面获取数据
 | 
				
			||||||
//	 * @param
 | 
						 * @param
 | 
				
			||||||
//	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
//	 */
 | 
						 */
 | 
				
			||||||
//	@RequestMapping(value="/goEdit")
 | 
						@RequestMapping(value="/goEdit")
 | 
				
			||||||
//	@ResponseBody
 | 
						@ResponseBody
 | 
				
			||||||
//	@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "去修改页面获取数据")
 | 
						@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "去修改页面获取数据")
 | 
				
			||||||
//	public Object goEdit() throws Exception{
 | 
						public Object goEdit() throws Exception{
 | 
				
			||||||
//		Map<String,Object> map = new HashMap<String,Object>();
 | 
							Map<String,Object> map = new HashMap<String,Object>();
 | 
				
			||||||
//		String errInfo = "success";
 | 
							String errInfo = "success";
 | 
				
			||||||
//		PageData pd = new PageData();
 | 
							PageData pd = new PageData();
 | 
				
			||||||
//		pd = this.getPageData();
 | 
							pd = this.getPageData();
 | 
				
			||||||
//		String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
 | 
							String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
 | 
				
			||||||
//		if (Tools.notEmpty(KEYWORDS))
 | 
							if (Tools.notEmpty(KEYWORDS))
 | 
				
			||||||
//			pd.put("KEYWORDS", KEYWORDS.trim());
 | 
								pd.put("KEYWORDS", KEYWORDS.trim());
 | 
				
			||||||
//
 | 
					        pd.put("CUSTOM_ID", pd.get("ID"));
 | 
				
			||||||
//		System.out.println(pd.getString("KEYWORDS"));
 | 
							List<PageData>	varList = customItemService.listAll(pd);
 | 
				
			||||||
//		List<PageData>	varList = listcheckitemService.listAll(pd);
 | 
							pd = customService.findById(pd);	//根据ID读取
 | 
				
			||||||
//		pd = listmanagerService.findById(pd);	//根据ID读取
 | 
					
 | 
				
			||||||
//
 | 
							for (PageData item : varList) {
 | 
				
			||||||
//		for (PageData item : varList) {
 | 
								item.put("RECORDITEM_ID", this.get32UUID());	//主键
 | 
				
			||||||
//			item.put("RECORDITEM_ID", this.get32UUID());	//主键
 | 
							}
 | 
				
			||||||
//		}
 | 
					 | 
				
			||||||
//		List<PageData> ideList = identificationPartsService.listAllByList(pd);
 | 
					//		List<PageData> ideList = identificationPartsService.listAllByList(pd);
 | 
				
			||||||
//
 | 
					
 | 
				
			||||||
//		map.put("varList", varList);
 | 
							map.put("varList", varList);
 | 
				
			||||||
//		map.put("ideList", ideList);
 | 
					//		map.put("ideList", ideList);
 | 
				
			||||||
//		map.put("pd", pd);
 | 
							map.put("pd", pd);
 | 
				
			||||||
//		map.put("result", errInfo);
 | 
							map.put("result", errInfo);
 | 
				
			||||||
//		return map;
 | 
					 | 
				
			||||||
//	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	 /**批量删除
 | 
					 | 
				
			||||||
	 * @param
 | 
					 | 
				
			||||||
	 * @throws Exception
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	@RequestMapping(value="/deleteAll")
 | 
					 | 
				
			||||||
	@RequiresPermissions("listmanager:del")
 | 
					 | 
				
			||||||
	@ResponseBody
 | 
					 | 
				
			||||||
	@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "批量删除")
 | 
					 | 
				
			||||||
	public Object deleteAll() throws Exception{
 | 
					 | 
				
			||||||
		Map<String,Object> map = new HashMap<String,Object>();
 | 
					 | 
				
			||||||
		String errInfo = "success";
 | 
					 | 
				
			||||||
		PageData pd = new PageData();
 | 
					 | 
				
			||||||
		pd = this.getPageData();
 | 
					 | 
				
			||||||
		String DATA_IDS = pd.getString("DATA_IDS");
 | 
					 | 
				
			||||||
		if(Tools.notEmpty(DATA_IDS)){
 | 
					 | 
				
			||||||
			String ArrayDATA_IDS[] = DATA_IDS.split(",");
 | 
					 | 
				
			||||||
			for(int i = 0; i < ArrayDATA_IDS.length; i++) {
 | 
					 | 
				
			||||||
				PageData pd1 = new PageData();
 | 
					 | 
				
			||||||
				pd1.put("OPERATOR", Jurisdiction.getUsername());	//修改人
 | 
					 | 
				
			||||||
				pd1.put("OPERATTIME", DateUtil.date2Str(new Date()));	//修改时间
 | 
					 | 
				
			||||||
				pd1.put("CUSTOM_ID", ArrayDATA_IDS[i]);
 | 
					 | 
				
			||||||
				customService.remove(pd1);
 | 
					 | 
				
			||||||
				pd1 = customService.findById(pd1);
 | 
					 | 
				
			||||||
				if(pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
 | 
					 | 
				
			||||||
					if("listType0005".equals(pd1.get("TYPE").toString())) {
 | 
					 | 
				
			||||||
						pd1.put("CUSTOMSTATISTICS_ID", this.get32UUID());	//主键
 | 
					 | 
				
			||||||
						pd1.put("STARTTIME", pd1.get("START_DATE").toString()+" 00:00:00");
 | 
					 | 
				
			||||||
						pd1.put("ENDTIME", pd1.get("END_DATE").toString()+" 23:59:59");
 | 
					 | 
				
			||||||
						pd1.put("PERIOD", null);
 | 
					 | 
				
			||||||
						PageData statistics = customStatisticsService.findByCondition(pd1);
 | 
					 | 
				
			||||||
						if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
					 | 
				
			||||||
							statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-2);
 | 
					 | 
				
			||||||
							customStatisticsService.edit(statistics);
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
						pd1.put("ISSTATISTICS", '0');
 | 
					 | 
				
			||||||
						// 本期已检查的不计入统计
 | 
					 | 
				
			||||||
						customCheckRecordService.editStatistics(pd1);
 | 
					 | 
				
			||||||
					} else {
 | 
					 | 
				
			||||||
						if(pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
 | 
					 | 
				
			||||||
							String period = pd1.get("PERIOD").toString();
 | 
					 | 
				
			||||||
							switch (period) {
 | 
					 | 
				
			||||||
							case "checkPeriod0001"://每日
 | 
					 | 
				
			||||||
								pd1.put("STARTTIME", DateUtil.getDay()+" 00:00:00");
 | 
					 | 
				
			||||||
								pd1.put("ENDTIME", DateUtil.getDay()+" 23:59:59");
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							case "checkPeriod0002"://每周
 | 
					 | 
				
			||||||
								pd1.put("STARTTIME", DateUtil.getWeekStart());
 | 
					 | 
				
			||||||
								pd1.put("ENDTIME", DateUtil.getWeekEnd());
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							case "checkPeriod0003"://每旬
 | 
					 | 
				
			||||||
								String year = DateUtil.getYear().toString();
 | 
					 | 
				
			||||||
								String month = DateUtil.getMonth().toString();
 | 
					 | 
				
			||||||
								Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
 | 
					 | 
				
			||||||
								String startTime = year + "-" + month + "-";
 | 
					 | 
				
			||||||
								String endTime = year + "-" + month + "-";
 | 
					 | 
				
			||||||
								if(day <= 10) {
 | 
					 | 
				
			||||||
									startTime = startTime+"01 00:00:00";
 | 
					 | 
				
			||||||
									endTime = endTime+"10 23:59:59";
 | 
					 | 
				
			||||||
								} else if(day > 10 && day <= 20) {
 | 
					 | 
				
			||||||
									startTime = startTime+"11 00:00:00";
 | 
					 | 
				
			||||||
									endTime = endTime+"20 23:59:59";
 | 
					 | 
				
			||||||
								} else {
 | 
					 | 
				
			||||||
									startTime = startTime+"21 00:00:00";
 | 
					 | 
				
			||||||
									endTime = DateUtil.getMonthEndDay()+" 23:59:59";
 | 
					 | 
				
			||||||
								}
 | 
					 | 
				
			||||||
								pd1.put("STARTTIME", startTime);
 | 
					 | 
				
			||||||
								pd1.put("ENDTIME", endTime);
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							case "checkPeriod0004"://每月
 | 
					 | 
				
			||||||
								pd1.put("STARTTIME", DateUtil.getMonthFirstDay()+" 00:00:00");
 | 
					 | 
				
			||||||
								pd1.put("ENDTIME", DateUtil.getMonthEndDay()+" 23:59:59");
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							case "checkPeriod0005"://每季
 | 
					 | 
				
			||||||
								pd1.put("STARTTIME", DateUtil.quarterStart()+" 00:00:00");
 | 
					 | 
				
			||||||
								pd1.put("ENDTIME", DateUtil.quarterEnd()+" 23:59:59");
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							case "checkPeriod0006"://每年
 | 
					 | 
				
			||||||
								pd1.put("STARTTIME", DateUtil.getCurrYearFirst()+" 00:00:00");
 | 
					 | 
				
			||||||
								pd1.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) {
 | 
					 | 
				
			||||||
									pd1.put("STARTTIME", byear+"-01-01 00:00:00");
 | 
					 | 
				
			||||||
									pd1.put("ENDTIME", byear+"-06-30 23:59:59");
 | 
					 | 
				
			||||||
								} else if(bmonth > 6) {
 | 
					 | 
				
			||||||
									pd1.put("STARTTIME", byear+"-07-01 00:00:00");
 | 
					 | 
				
			||||||
									pd1.put("ENDTIME", byear+"-12-31 23:59:59");
 | 
					 | 
				
			||||||
								}
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							default:
 | 
					 | 
				
			||||||
								break;
 | 
					 | 
				
			||||||
							}
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
						PageData statistics = customStatisticsService.findByCondition(pd1);
 | 
					 | 
				
			||||||
						if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
					 | 
				
			||||||
							statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-1);
 | 
					 | 
				
			||||||
							customStatisticsService.edit(statistics);
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
						pd1.put("ISSTATISTICS", '0');
 | 
					 | 
				
			||||||
						// 本期已检查的不计入统计
 | 
					 | 
				
			||||||
						customCheckRecordService.editStatistics(pd1);
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			errInfo = "success";
 | 
					 | 
				
			||||||
		}else{
 | 
					 | 
				
			||||||
			errInfo = "error";
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		map.put("result", errInfo);				//返回结果
 | 
					 | 
				
			||||||
		return map;
 | 
							return map;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**批量删除
 | 
					    /**
 | 
				
			||||||
	 * @param
 | 
					     * 批量删除
 | 
				
			||||||
	 * @throws Exception
 | 
					     *
 | 
				
			||||||
	 */
 | 
					     * @param
 | 
				
			||||||
	@RequestMapping(value="/deleteAlltemp")
 | 
					     * @throws Exception
 | 
				
			||||||
	@ResponseBody
 | 
					     */
 | 
				
			||||||
	@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "批量删除")
 | 
					    @RequestMapping(value = "/deleteAll")
 | 
				
			||||||
	public Object deleteAlltemp() throws Exception{
 | 
					    @RequiresPermissions("listmanager:del")
 | 
				
			||||||
		Map<String,Object> map = new HashMap<String,Object>();
 | 
					    @ResponseBody
 | 
				
			||||||
		String errInfo = "success";
 | 
					    @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "批量删除")
 | 
				
			||||||
		PageData pd = new PageData();
 | 
					    public Object deleteAll() throws Exception {
 | 
				
			||||||
		pd = this.getPageData();
 | 
					        Map<String, Object> map = new HashMap<String, Object>();
 | 
				
			||||||
		String DATA_IDS = pd.getString("DATA_IDS");
 | 
					        String errInfo = "success";
 | 
				
			||||||
		if(Tools.notEmpty(DATA_IDS)){
 | 
					        PageData pd = new PageData();
 | 
				
			||||||
			String ArrayDATA_IDS[] = DATA_IDS.split(",");
 | 
					        pd = this.getPageData();
 | 
				
			||||||
			for(int i = 0; i < ArrayDATA_IDS.length; i++) {
 | 
					        String DATA_IDS = pd.getString("DATA_IDS");
 | 
				
			||||||
				PageData pd1 = new PageData();
 | 
					        if (Tools.notEmpty(DATA_IDS)) {
 | 
				
			||||||
				pd1.put("OPERATOR", Jurisdiction.getUsername());	//修改人
 | 
					            String ArrayDATA_IDS[] = DATA_IDS.split(",");
 | 
				
			||||||
				pd1.put("OPERATTIME", DateUtil.date2Str(new Date()));	//修改时间
 | 
					            for (int i = 0; i < ArrayDATA_IDS.length; i++) {
 | 
				
			||||||
				pd1.put("CUSTOM_ID", ArrayDATA_IDS[i]);
 | 
					                PageData pd1 = new PageData();
 | 
				
			||||||
				customService.deleted(pd1);
 | 
					                pd1.put("OPERATOR", Jurisdiction.getUsername());    //修改人
 | 
				
			||||||
				pd1 = customService.findById(pd1);
 | 
					                pd1.put("OPERATTIME", DateUtil.date2Str(new Date()));    //修改时间
 | 
				
			||||||
				if(pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
 | 
					                pd1.put("CUSTOM_ID", ArrayDATA_IDS[i]);
 | 
				
			||||||
					pd1.put("CUSTOMSTATISTICS_ID", this.get32UUID());	//主键
 | 
					                customService.remove(pd1);
 | 
				
			||||||
					pd1.put("STARTTIME", pd1.get("START_DATE").toString()+" 00:00:00");
 | 
					                pd1 = customService.findById(pd1);
 | 
				
			||||||
					pd1.put("ENDTIME", pd1.get("END_DATE").toString()+" 23:59:59");
 | 
					                if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
 | 
				
			||||||
					pd1.put("PERIOD", null);
 | 
					                    if ("listType0005".equals(pd1.get("TYPE").toString())) {
 | 
				
			||||||
					PageData statistics = customStatisticsService.findByCondition(pd1);
 | 
					                        pd1.put("CUSTOMSTATISTICS_ID", this.get32UUID());    //主键
 | 
				
			||||||
					if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
					                        pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
 | 
				
			||||||
						statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-1);
 | 
					                        pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
 | 
				
			||||||
						customStatisticsService.edit(statistics);
 | 
					                        pd1.put("PERIOD", null);
 | 
				
			||||||
					}
 | 
					                        PageData statistics = customStatisticsService.findByCondition(pd1);
 | 
				
			||||||
					pd1.put("ISSTATISTICS", '0');
 | 
					                        if (statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
				
			||||||
					// 本期已检查的不计入统计
 | 
					                            statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
 | 
				
			||||||
					customCheckRecordService.editStatistics(pd1);
 | 
					                            customStatisticsService.edit(statistics);
 | 
				
			||||||
				}
 | 
					                        }
 | 
				
			||||||
			}
 | 
					                        pd1.put("ISSTATISTICS", '0');
 | 
				
			||||||
			errInfo = "success";
 | 
					                        // 本期已检查的不计入统计
 | 
				
			||||||
		}else{
 | 
					                        customCheckRecordService.editStatistics(pd1);
 | 
				
			||||||
			errInfo = "error";
 | 
					                    } else {
 | 
				
			||||||
		}
 | 
					                        if (pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
 | 
				
			||||||
		map.put("result", errInfo);				//返回结果
 | 
					                            String period = pd1.get("PERIOD").toString();
 | 
				
			||||||
		return map;
 | 
					                            switch (period) {
 | 
				
			||||||
	}
 | 
					                                case "checkPeriod0001"://每日
 | 
				
			||||||
 | 
					                                    pd1.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
 | 
				
			||||||
 | 
					                                    pd1.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                case "checkPeriod0002"://每周
 | 
				
			||||||
 | 
					                                    pd1.put("STARTTIME", DateUtil.getWeekStart());
 | 
				
			||||||
 | 
					                                    pd1.put("ENDTIME", DateUtil.getWeekEnd());
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                case "checkPeriod0003"://每旬
 | 
				
			||||||
 | 
					                                    String year = DateUtil.getYear().toString();
 | 
				
			||||||
 | 
					                                    String month = DateUtil.getMonth().toString();
 | 
				
			||||||
 | 
					                                    Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
 | 
				
			||||||
 | 
					                                    String startTime = year + "-" + month + "-";
 | 
				
			||||||
 | 
					                                    String endTime = year + "-" + month + "-";
 | 
				
			||||||
 | 
					                                    if (day <= 10) {
 | 
				
			||||||
 | 
					                                        startTime = startTime + "01 00:00:00";
 | 
				
			||||||
 | 
					                                        endTime = endTime + "10 23:59:59";
 | 
				
			||||||
 | 
					                                    } else if (day > 10 && day <= 20) {
 | 
				
			||||||
 | 
					                                        startTime = startTime + "11 00:00:00";
 | 
				
			||||||
 | 
					                                        endTime = endTime + "20 23:59:59";
 | 
				
			||||||
 | 
					                                    } else {
 | 
				
			||||||
 | 
					                                        startTime = startTime + "21 00:00:00";
 | 
				
			||||||
 | 
					                                        endTime = DateUtil.getMonthEndDay() + " 23:59:59";
 | 
				
			||||||
 | 
					                                    }
 | 
				
			||||||
 | 
					                                    pd1.put("STARTTIME", startTime);
 | 
				
			||||||
 | 
					                                    pd1.put("ENDTIME", endTime);
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                case "checkPeriod0004"://每月
 | 
				
			||||||
 | 
					                                    pd1.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
 | 
				
			||||||
 | 
					                                    pd1.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                case "checkPeriod0005"://每季
 | 
				
			||||||
 | 
					                                    pd1.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
 | 
				
			||||||
 | 
					                                    pd1.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                case "checkPeriod0006"://每年
 | 
				
			||||||
 | 
					                                    pd1.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
 | 
				
			||||||
 | 
					                                    pd1.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) {
 | 
				
			||||||
 | 
					                                        pd1.put("STARTTIME", byear + "-01-01 00:00:00");
 | 
				
			||||||
 | 
					                                        pd1.put("ENDTIME", byear + "-06-30 23:59:59");
 | 
				
			||||||
 | 
					                                    } else if (bmonth > 6) {
 | 
				
			||||||
 | 
					                                        pd1.put("STARTTIME", byear + "-07-01 00:00:00");
 | 
				
			||||||
 | 
					                                        pd1.put("ENDTIME", byear + "-12-31 23:59:59");
 | 
				
			||||||
 | 
					                                    }
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                default:
 | 
				
			||||||
 | 
					                                    break;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                        PageData statistics = customStatisticsService.findByCondition(pd1);
 | 
				
			||||||
 | 
					                        if (statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
				
			||||||
 | 
					                            statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
 | 
				
			||||||
 | 
					                            customStatisticsService.edit(statistics);
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        pd1.put("ISSTATISTICS", '0');
 | 
				
			||||||
 | 
					                        // 本期已检查的不计入统计
 | 
				
			||||||
 | 
					                        customCheckRecordService.editStatistics(pd1);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            errInfo = "success";
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            errInfo = "error";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        map.put("result", errInfo);                //返回结果
 | 
				
			||||||
 | 
					        return map;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 批量删除
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param
 | 
				
			||||||
 | 
					     * @throws Exception
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @RequestMapping(value = "/deleteAlltemp")
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "批量删除")
 | 
				
			||||||
 | 
					    public Object deleteAlltemp() throws Exception {
 | 
				
			||||||
 | 
					        Map<String, Object> map = new HashMap<String, Object>();
 | 
				
			||||||
 | 
					        String errInfo = "success";
 | 
				
			||||||
 | 
					        PageData pd = new PageData();
 | 
				
			||||||
 | 
					        pd = this.getPageData();
 | 
				
			||||||
 | 
					        String DATA_IDS = pd.getString("DATA_IDS");
 | 
				
			||||||
 | 
					        if (Tools.notEmpty(DATA_IDS)) {
 | 
				
			||||||
 | 
					            String ArrayDATA_IDS[] = DATA_IDS.split(",");
 | 
				
			||||||
 | 
					            for (int i = 0; i < ArrayDATA_IDS.length; i++) {
 | 
				
			||||||
 | 
					                PageData pd1 = new PageData();
 | 
				
			||||||
 | 
					                pd1.put("OPERATOR", Jurisdiction.getUsername());    //修改人
 | 
				
			||||||
 | 
					                pd1.put("OPERATTIME", DateUtil.date2Str(new Date()));    //修改时间
 | 
				
			||||||
 | 
					                pd1.put("CUSTOM_ID", ArrayDATA_IDS[i]);
 | 
				
			||||||
 | 
					                customService.deleted(pd1);
 | 
				
			||||||
 | 
					                pd1 = customService.findById(pd1);
 | 
				
			||||||
 | 
					                if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
 | 
				
			||||||
 | 
					                    pd1.put("CUSTOMSTATISTICS_ID", this.get32UUID());    //主键
 | 
				
			||||||
 | 
					                    pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
 | 
				
			||||||
 | 
					                    pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
 | 
				
			||||||
 | 
					                    pd1.put("PERIOD", null);
 | 
				
			||||||
 | 
					                    PageData statistics = customStatisticsService.findByCondition(pd1);
 | 
				
			||||||
 | 
					                    if (statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
 | 
				
			||||||
 | 
					                        statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
 | 
				
			||||||
 | 
					                        customStatisticsService.edit(statistics);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    pd1.put("ISSTATISTICS", '0');
 | 
				
			||||||
 | 
					                    // 本期已检查的不计入统计
 | 
				
			||||||
 | 
					                    customCheckRecordService.editStatistics(pd1);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            errInfo = "success";
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            errInfo = "error";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        map.put("result", errInfo);                //返回结果
 | 
				
			||||||
 | 
					        return map;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
//	 /**导出到excel
 | 
					//	 /**导出到excel
 | 
				
			||||||
//	 * @param
 | 
					//	 * @param
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,6 +15,7 @@ import com.zcloud.service.hidden.HiddenCheckService;
 | 
				
			||||||
import com.zcloud.service.hidden.HiddenSchemeService;
 | 
					import com.zcloud.service.hidden.HiddenSchemeService;
 | 
				
			||||||
import com.zcloud.service.hidden.HiddenService;
 | 
					import com.zcloud.service.hidden.HiddenService;
 | 
				
			||||||
import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenService;
 | 
					import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenService;
 | 
				
			||||||
 | 
					import com.zcloud.service.hiddenDangerCheckStandard.CustomService;
 | 
				
			||||||
import com.zcloud.service.inspection.SafetyEnvironmentalService;
 | 
					import com.zcloud.service.inspection.SafetyEnvironmentalService;
 | 
				
			||||||
import com.zcloud.service.sms.SMSLogService;
 | 
					import com.zcloud.service.sms.SMSLogService;
 | 
				
			||||||
import com.zcloud.service.sms.SMSManagementService;
 | 
					import com.zcloud.service.sms.SMSManagementService;
 | 
				
			||||||
| 
						 | 
					@ -68,7 +69,7 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
	@Autowired
 | 
						@Autowired
 | 
				
			||||||
	private SMSLogService smSlogService;
 | 
						private SMSLogService smSlogService;
 | 
				
			||||||
	@Autowired
 | 
						@Autowired
 | 
				
			||||||
	private ListManagerService listmanagerService;
 | 
						private CustomService customService;
 | 
				
			||||||
	@Autowired
 | 
						@Autowired
 | 
				
			||||||
	private RecordItemService recordItemService;
 | 
						private RecordItemService recordItemService;
 | 
				
			||||||
	@Autowired
 | 
						@Autowired
 | 
				
			||||||
| 
						 | 
					@ -784,12 +785,13 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
		pd = this.getPageData();
 | 
							pd = this.getPageData();
 | 
				
			||||||
		pd.put("USER_ID", Jurisdiction.getUSER_ID());
 | 
							pd.put("USER_ID", Jurisdiction.getUSER_ID());
 | 
				
			||||||
		String USER_ID = pd.get("USER_ID").toString();
 | 
							String USER_ID = pd.get("USER_ID").toString();
 | 
				
			||||||
		pd = listmanagerService.findById(pd);
 | 
							pd.put("CUSTOM_ID", pd.get("ID"));
 | 
				
			||||||
 | 
							pd = customService.findById(pd);
 | 
				
			||||||
		if (pd.getString("TYPE").equals("listType0005")) {
 | 
							if (pd.getString("TYPE").equals("listType0005")) {
 | 
				
			||||||
			if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"),
 | 
								if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"),
 | 
				
			||||||
					DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) {
 | 
										DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) {
 | 
				
			||||||
				PageData type = new PageData();
 | 
									PageData type = new PageData();
 | 
				
			||||||
				type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
									type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
				type.put("IS_XUN", 1);// 查询方法和旬一样,直接借用
 | 
									type.put("IS_XUN", 1);// 查询方法和旬一样,直接借用
 | 
				
			||||||
				type.put("STATE", "0");
 | 
									type.put("STATE", "0");
 | 
				
			||||||
				type.put("USER_ID", USER_ID);
 | 
									type.put("USER_ID", USER_ID);
 | 
				
			||||||
| 
						 | 
					@ -804,12 +806,12 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
		String cycle = pd.getString("PERIODNAME");
 | 
							String cycle = pd.getString("PERIODNAME");
 | 
				
			||||||
		PageData type = new PageData();
 | 
							PageData type = new PageData();
 | 
				
			||||||
		if (cycle.equals("每日")) {
 | 
							if (cycle.equals("每日")) {
 | 
				
			||||||
			type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
								type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
			type.put("IS_DAY", 1);
 | 
								type.put("IS_DAY", 1);
 | 
				
			||||||
			type.put("STATE", "0");
 | 
								type.put("STATE", "0");
 | 
				
			||||||
			type.put("USER_ID", USER_ID);
 | 
								type.put("USER_ID", USER_ID);
 | 
				
			||||||
		} else if (cycle.equals("每周")) {
 | 
							} else if (cycle.equals("每周")) {
 | 
				
			||||||
			type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
								type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
			type.put("IS_WEEK", 1);
 | 
								type.put("IS_WEEK", 1);
 | 
				
			||||||
			type.put("STATE", "0");
 | 
								type.put("STATE", "0");
 | 
				
			||||||
			type.put("USER_ID", USER_ID);
 | 
								type.put("USER_ID", USER_ID);
 | 
				
			||||||
| 
						 | 
					@ -818,7 +820,7 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
			if (DateUtil.timeCalendar(new Date(),
 | 
								if (DateUtil.timeCalendar(new Date(),
 | 
				
			||||||
					DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"),
 | 
										DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"),
 | 
				
			||||||
					DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) {
 | 
										DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) {
 | 
				
			||||||
				type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
									type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
				type.put("IS_XUN", 1);
 | 
									type.put("IS_XUN", 1);
 | 
				
			||||||
				type.put("STATE", "0");
 | 
									type.put("STATE", "0");
 | 
				
			||||||
				type.put("USER_ID", USER_ID);
 | 
									type.put("USER_ID", USER_ID);
 | 
				
			||||||
| 
						 | 
					@ -829,7 +831,7 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
			if (DateUtil.timeCalendar(new Date(),
 | 
								if (DateUtil.timeCalendar(new Date(),
 | 
				
			||||||
					DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"),
 | 
										DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"),
 | 
				
			||||||
					DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) {
 | 
										DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) {
 | 
				
			||||||
				type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
									type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
				type.put("IS_XUN", 1);
 | 
									type.put("IS_XUN", 1);
 | 
				
			||||||
				type.put("STATE", "0");
 | 
									type.put("STATE", "0");
 | 
				
			||||||
				type.put("USER_ID", USER_ID);
 | 
									type.put("USER_ID", USER_ID);
 | 
				
			||||||
| 
						 | 
					@ -840,7 +842,7 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
			if (DateUtil.timeCalendar(new Date(),
 | 
								if (DateUtil.timeCalendar(new Date(),
 | 
				
			||||||
					DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"),
 | 
										DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"),
 | 
				
			||||||
					DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) {
 | 
										DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) {
 | 
				
			||||||
				type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
									type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
				type.put("IS_XUN", 1);
 | 
									type.put("IS_XUN", 1);
 | 
				
			||||||
				type.put("STATE", "0");
 | 
									type.put("STATE", "0");
 | 
				
			||||||
				type.put("USER_ID", USER_ID);
 | 
									type.put("USER_ID", USER_ID);
 | 
				
			||||||
| 
						 | 
					@ -849,22 +851,22 @@ public class CustomHiddenController extends BaseController {
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		} else if (cycle.equals("每月")) {
 | 
							} else if (cycle.equals("每月")) {
 | 
				
			||||||
			type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
								type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
			type.put("IS_MONTH", 1);
 | 
								type.put("IS_MONTH", 1);
 | 
				
			||||||
			type.put("STATE", "0");
 | 
								type.put("STATE", "0");
 | 
				
			||||||
			type.put("USER_ID", USER_ID);
 | 
								type.put("USER_ID", USER_ID);
 | 
				
			||||||
		} else if (cycle.equals("每季")) {
 | 
							} else if (cycle.equals("每季")) {
 | 
				
			||||||
			type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
								type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
			type.put("IS_QUARTER", 1);
 | 
								type.put("IS_QUARTER", 1);
 | 
				
			||||||
			type.put("STATE", "0");
 | 
								type.put("STATE", "0");
 | 
				
			||||||
			type.put("USER_ID", USER_ID);
 | 
								type.put("USER_ID", USER_ID);
 | 
				
			||||||
		} else if (cycle.equals("半年")) {
 | 
							} else if (cycle.equals("半年")) {
 | 
				
			||||||
			type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
								type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
			type.put("IS_HALFYEAR", 1);
 | 
								type.put("IS_HALFYEAR", 1);
 | 
				
			||||||
			type.put("STATE", "0");
 | 
								type.put("STATE", "0");
 | 
				
			||||||
			type.put("USER_ID", USER_ID);
 | 
								type.put("USER_ID", USER_ID);
 | 
				
			||||||
		} else if (cycle.equals("每年")) {
 | 
							} else if (cycle.equals("每年")) {
 | 
				
			||||||
			type.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID"));
 | 
								type.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
 | 
				
			||||||
			type.put("IS_YEAR", 1);
 | 
								type.put("IS_YEAR", 1);
 | 
				
			||||||
			type.put("STATE", "0");
 | 
								type.put("STATE", "0");
 | 
				
			||||||
			type.put("USER_ID", USER_ID);
 | 
								type.put("USER_ID", USER_ID);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,7 +103,7 @@ public interface ListManagerMapper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	List<PageData> recordlistPage(Page page);
 | 
						List<PageData> recordlistPage(Page page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						List<PageData> riskStandardRecordlistPage(Page page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**待检查清单数量
 | 
						/**待检查清单数量
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
| 
						 | 
					@ -186,6 +186,12 @@ public interface ListManagerMapper {
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	List<PageData> checklistPage(Page page);
 | 
						List<PageData> checklistPage(Page page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						List<PageData> riskStandardChecklistPage(Page page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**上期超期未检查的清单
 | 
						/**上期超期未检查的清单
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,78 @@
 | 
				
			||||||
 | 
					package com.zcloud.mapper.datasource.hiddenDangerCheckStandard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 说明:清单检查记录
 | 
				
			||||||
 | 
					 * 作者:luoxiaobao
 | 
				
			||||||
 | 
					 * 时间:2021-01-25
 | 
				
			||||||
 | 
					 * 官网:www.zcloudchina.com
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface CustomCheckUserMapper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**新增
 | 
				
			||||||
 | 
						 * @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 pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						PageData getCheckUser(PageData pd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param ArrayDATA_IDS
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						void deleteAll(String[] ArrayDATA_IDS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**查询人员检查数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						List<PageData> countCheByUser(PageData pd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**绩效得分
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						List<PageData> getDeptExamine(PageData pd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    List<PageData> getUserExamine(PageData pd);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
package com.zcloud.mapper.datasource.hiddenDangerCheckStandard;
 | 
					package com.zcloud.mapper.datasource.hiddenDangerCheckStandard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
import com.zcloud.entity.PageData;
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
| 
						 | 
					@ -23,5 +24,55 @@ public interface CustomItemMapper {
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	List<PageData> getCheckItem(PageData pd);
 | 
						List<PageData> getCheckItem(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);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						void deleteList(PageData pd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**获取隐患数据
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						PageData findHidden(PageData pd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,6 +87,12 @@ public interface ListManagerService {
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public List<PageData> checklistPage(Page page)throws Exception;
 | 
						public List<PageData> checklistPage(Page page)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> riskStandardCheckList(Page page)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**列表(全部)
 | 
						/**列表(全部)
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
| 
						 | 
					@ -117,6 +123,11 @@ public interface ListManagerService {
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public List<PageData> recordList(Page page)throws Exception;
 | 
						public List<PageData> recordList(Page page)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**部门清单列表
 | 
				
			||||||
 | 
						 * 	 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> riskStandardRecordList(Page page)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**待检查清单数量
 | 
						/**待检查清单数量
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -113,6 +113,14 @@ public class ListManagerServiceImpl implements ListManagerService {
 | 
				
			||||||
		return listmanagerMapper.checklistPage(page);
 | 
							return listmanagerMapper.checklistPage(page);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**清单检查分页
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> riskStandardCheckList(Page page)throws Exception{
 | 
				
			||||||
 | 
							return listmanagerMapper.riskStandardChecklistPage(page);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**查询部门清单
 | 
						/**查询部门清单
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
| 
						 | 
					@ -173,6 +181,14 @@ public class ListManagerServiceImpl implements ListManagerService {
 | 
				
			||||||
		return listmanagerMapper.recordlistPage(page);
 | 
							return listmanagerMapper.recordlistPage(page);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**部门清单列表
 | 
				
			||||||
 | 
						 * 	 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> riskStandardRecordList(Page page)throws Exception{
 | 
				
			||||||
 | 
							return listmanagerMapper.riskStandardRecordlistPage(page);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**待检查清单数量
 | 
						/**待检查清单数量
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,78 @@
 | 
				
			||||||
 | 
					package com.zcloud.service.hiddenDangerCheckStandard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 说明:清单检查记录
 | 
				
			||||||
 | 
					 * 作者:luoxiaobao
 | 
				
			||||||
 | 
					 * 时间:2021-01-25
 | 
				
			||||||
 | 
					 * 官网:www.zcloudchina.com
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface CustomCheckUserService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**新增
 | 
				
			||||||
 | 
						 * @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 pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public PageData getCheckUser(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param ArrayDATA_IDS
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**查询人员检查数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> countCheByUser(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**绩效得分
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> getDeptExamine(PageData pd)throws Exception;
 | 
				
			||||||
 | 
						public List<PageData> getUserExamine(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
package com.zcloud.service.hiddenDangerCheckStandard;
 | 
					package com.zcloud.service.hiddenDangerCheckStandard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
import com.zcloud.entity.PageData;
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
| 
						 | 
					@ -17,13 +18,61 @@ public interface CustomItemService {
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	void save(PageData 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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void deleteList(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**获取用户检查清单的检查项目
 | 
						/**获取用户检查清单的检查项目
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	List<PageData> getCheckItem(PageData pd)throws Exception;
 | 
						List<PageData> getCheckItem(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**获取隐患数据
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public PageData findHidden(PageData pd)throws Exception;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,38 +23,39 @@ public interface CustomService {
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public List<PageData> listAll(PageData pd)throws Exception;
 | 
						List<PageData> listAll(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**列表
 | 
						/**列表
 | 
				
			||||||
	 * @param page
 | 
						 * @param page
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public List<PageData> list(Page page)throws Exception;
 | 
						List<PageData> list(Page page)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**禁用
 | 
						/**禁用
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void delete(PageData pd)throws Exception;
 | 
						void delete(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**删除
 | 
						/**删除
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void remove(PageData pd)throws Exception;
 | 
						void remove(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**彻底删除
 | 
						/**彻底删除
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void deleted(PageData pd)throws Exception;
 | 
						void deleted(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**启用
 | 
						/**启用
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void enable(PageData pd)throws Exception;
 | 
						void enable(PageData pd)throws Exception;
 | 
				
			||||||
/**通过id获取数据
 | 
					
 | 
				
			||||||
 | 
						/**通过id获取数据
 | 
				
			||||||
	 * @param pd
 | 
						 * @param pd
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
| 
						 | 
					@ -65,5 +66,31 @@ public interface CustomService {
 | 
				
			||||||
	 * @throws Exception
 | 
						 * @throws Exception
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	List<PageData> getMyCheckList(PageData pd)throws Exception;
 | 
						List<PageData> getMyCheckList(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						List<PageData> checklistPage(Page page)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * 查询公司清单总数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public int getListCount(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * 查询公司检查过清单的总数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public int getWorkedListCount(PageData pd)throws Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**查询人员清单
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> getListByCorplistPage(Page page)throws Exception;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,109 @@
 | 
				
			||||||
 | 
					package com.zcloud.service.hiddenDangerCheckStandard.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
 | 
					import com.zcloud.mapper.datasource.check.CheckUserMapper;
 | 
				
			||||||
 | 
					import com.zcloud.service.hiddenDangerCheckStandard.CustomCheckUserService;
 | 
				
			||||||
 | 
					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-25
 | 
				
			||||||
 | 
					 * 官网:www.zcloudchina.com
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					@Transactional //开启事物
 | 
				
			||||||
 | 
					public class CustomCheckUserServiceImpl implements CustomCheckUserService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private CheckUserMapper checkuserMapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**新增
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void save(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							checkuserMapper.save(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**删除
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void delete(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							checkuserMapper.delete(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**修改
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void edit(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							checkuserMapper.edit(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> list(Page page)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.datalistPage(page);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表(全部)
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> listAll(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.listAll(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**通过id获取数据
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public PageData findById(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.findById(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**查看检查清单检查人
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public PageData getCheckUser(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.getCheckUser(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param ArrayDATA_IDS
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
 | 
				
			||||||
 | 
							checkuserMapper.deleteAll(ArrayDATA_IDS);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**查询人员检查数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> countCheByUser(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.countCheByUser(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**绩效得分
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> getDeptExamine(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.getDeptExamine(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						public List<PageData> getUserExamine(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return checkuserMapper.getUserExamine(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
package com.zcloud.service.hiddenDangerCheckStandard.impl;
 | 
					package com.zcloud.service.hiddenDangerCheckStandard.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zcloud.entity.Page;
 | 
				
			||||||
import com.zcloud.entity.PageData;
 | 
					import com.zcloud.entity.PageData;
 | 
				
			||||||
import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomItemMapper;
 | 
					import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomItemMapper;
 | 
				
			||||||
import com.zcloud.service.hiddenDangerCheckStandard.CustomItemService;
 | 
					import com.zcloud.service.hiddenDangerCheckStandard.CustomItemService;
 | 
				
			||||||
| 
						 | 
					@ -31,11 +32,74 @@ public class CustomItemServiceImpl implements CustomItemService {
 | 
				
			||||||
		customItemMapper.save(pd);
 | 
							customItemMapper.save(pd);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**删除
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void delete(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							customItemMapper.delete(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**修改
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void edit(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							customItemMapper.edit(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表
 | 
				
			||||||
 | 
						 * @param page
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> list(Page page)throws Exception{
 | 
				
			||||||
 | 
							return customItemMapper.datalistPage(page);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**列表(全部)
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> listAll(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return customItemMapper.listAll(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**通过id获取数据
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public PageData findById(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return customItemMapper.findById(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param ArrayDATA_IDS
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
 | 
				
			||||||
 | 
							customItemMapper.deleteAll(ArrayDATA_IDS);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**批量删除
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public void deleteList(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							customItemMapper.deleteList(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public List<PageData> getCheckItem(PageData pd)throws Exception {
 | 
						public List<PageData> getCheckItem(PageData pd)throws Exception {
 | 
				
			||||||
		return customItemMapper.getCheckItem(pd);
 | 
							return customItemMapper.getCheckItem(pd);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**获取隐患数据
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public PageData findHidden(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return customItemMapper.findHidden(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,6 +95,36 @@ public class CustomServiceImpl implements CustomService {
 | 
				
			||||||
	public List<PageData> getMyCheckList(PageData pd)throws Exception{
 | 
						public List<PageData> getMyCheckList(PageData pd)throws Exception{
 | 
				
			||||||
		return customMapper.getMyCheckList(pd);
 | 
							return customMapper.getMyCheckList(pd);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**清单检查分页
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @throws Exception
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public List<PageData> checklistPage(Page page)throws Exception{
 | 
				
			||||||
 | 
							return customMapper.checklistPage(page);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * 查询公司清单总数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public int getListCount(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return customMapper.getListCount(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * 查询公司检查过清单的总数
 | 
				
			||||||
 | 
						 * @param pd
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public int getWorkedListCount(PageData pd)throws Exception{
 | 
				
			||||||
 | 
							return customMapper.getWorkedListCount(pd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public List<PageData> getListByCorplistPage(Page page)throws Exception{
 | 
				
			||||||
 | 
							return customMapper.getListByCorplistPage(page);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -92,11 +92,6 @@ public class CustomStatisticsServiceImpl implements CustomStatisticsService {
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public PageData findByCondition(PageData pd) throws Exception {
 | 
						public PageData findByCondition(PageData pd) throws Exception {
 | 
				
			||||||
/*		PageData ls = new PageData();
 | 
					 | 
				
			||||||
		List<PageData> lsList = customStatisticsMapper.findByCondition(pd);
 | 
					 | 
				
			||||||
		if(lsList != null && lsList.size() > 0) {
 | 
					 | 
				
			||||||
			ls = lsList.get(0);
 | 
					 | 
				
			||||||
		}*/
 | 
					 | 
				
			||||||
		return customStatisticsMapper.findByCondition(pd);
 | 
							return customStatisticsMapper.findByCondition(pd);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1347,6 +1347,243 @@
 | 
				
			||||||
		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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 风险管控和检查标准清单检查分页 -->
 | 
				
			||||||
 | 
						<select id="riskStandardChecklistPage" parameterType="page" resultType="pd">
 | 
				
			||||||
 | 
						  (	select
 | 
				
			||||||
 | 
							f.LISTMANAGER_ID,
 | 
				
			||||||
 | 
							f.NAME,
 | 
				
			||||||
 | 
							f.DEPARTMENT_ID,
 | 
				
			||||||
 | 
							f.USER_ID,
 | 
				
			||||||
 | 
							f.OPERATTIME,
 | 
				
			||||||
 | 
							p.NAME PERIODNAME,
 | 
				
			||||||
 | 
							t.NAME TYPENAME,
 | 
				
			||||||
 | 
							d.NAME as DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							getFullName(d.DEPARTMENT_ID) as DEPARTMENT_NAME_ALL,
 | 
				
			||||||
 | 
							sp.NAME
 | 
				
			||||||
 | 
							AS POST_NAME,
 | 
				
			||||||
 | 
							u.NAME USER_NAME,
 | 
				
			||||||
 | 
							(select count(1) from BUS_LIST_CHECKITEM
 | 
				
			||||||
 | 
							ch where ch.LISTMANAGER_ID=f.LISTMANAGER_ID and ch.ISDELETE =0) as	count,
 | 
				
			||||||
 | 
							getCheckedNum(f.LISTMANAGER_ID) checkCount,
 | 
				
			||||||
 | 
							"1" as list_type
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							f
 | 
				
			||||||
 | 
							left join sys_dictionaries p on f.PERIOD = p.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries t on f.TYPE = t.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 SYS_POST sp on
 | 
				
			||||||
 | 
							sp.POST_ID=f.POST_ID
 | 
				
			||||||
 | 
							where f.ISDELETE = '0' and (f.TYPE != 'listType0005'
 | 
				
			||||||
 | 
							or (f.START_DATE <= DATE_FORMAT(NOW(),'%Y-%m-%d') and f.END_DATE
 | 
				
			||||||
 | 
							>= DATE_FORMAT(NOW(),'%Y-%m-%d') ))
 | 
				
			||||||
 | 
							<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{pd.CORPINFO_ID}
 | 
				
			||||||
 | 
							</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 != ''">
 | 
				
			||||||
 | 
								and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
 | 
				
			||||||
 | 
								and f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.PERIOD != null and pd.PERIOD != ''">
 | 
				
			||||||
 | 
								and f.PERIOD = #{pd.PERIOD}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="1"'>
 | 
				
			||||||
 | 
										AND getCheckedNum(f.LISTMANAGER_ID) > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="0"'>
 | 
				
			||||||
 | 
										AND getCheckedNum(f.LISTMANAGER_ID) = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.LISTINGLEVEL != null and pd.LISTINGLEVEL != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.LISTINGLEVEL == "1"'>
 | 
				
			||||||
 | 
										and d.LEVEL = ''
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
										and d.LEVEL = #{pd.LISTINGLEVEL}
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc )
 | 
				
			||||||
 | 
						  union
 | 
				
			||||||
 | 
							(select
 | 
				
			||||||
 | 
							f.CUSTOM_ID,
 | 
				
			||||||
 | 
							f.NAME,
 | 
				
			||||||
 | 
							f.DEPARTMENT_ID,
 | 
				
			||||||
 | 
							f.USER_ID,
 | 
				
			||||||
 | 
							f.OPERATTIME,
 | 
				
			||||||
 | 
							p.NAME PERIODNAME,
 | 
				
			||||||
 | 
							t.NAME TYPENAME,
 | 
				
			||||||
 | 
							d.NAME as DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							getFullName(d.DEPARTMENT_ID) as DEPARTMENT_NAME_ALL,
 | 
				
			||||||
 | 
							sp.NAME
 | 
				
			||||||
 | 
							AS POST_NAME,
 | 
				
			||||||
 | 
							u.NAME USER_NAME,
 | 
				
			||||||
 | 
							(select count(1) from bus_hiddendangercheckstandard_custom_item
 | 
				
			||||||
 | 
							ch where ch.CUSTOM_ID = f.CUSTOM_ID and ch.ISDELETE =0) as	count,
 | 
				
			||||||
 | 
							getStandardCheckedNum(f.CUSTOM_ID) checkCount,
 | 
				
			||||||
 | 
							 "2" as list_type
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							bus_hiddendangercheckstandard_custom
 | 
				
			||||||
 | 
							f
 | 
				
			||||||
 | 
							left join sys_dictionaries p on f.PERIOD = p.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries t on f.TYPE = t.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 SYS_POST sp on
 | 
				
			||||||
 | 
							sp.POST_ID=f.POST_ID
 | 
				
			||||||
 | 
							where f.ISDELETE = '0' and (f.TYPE != 'listType0005'
 | 
				
			||||||
 | 
							or (f.START_DATE <= DATE_FORMAT(NOW(),'%Y-%m-%d') and f.END_DATE
 | 
				
			||||||
 | 
							>= DATE_FORMAT(NOW(),'%Y-%m-%d') ))
 | 
				
			||||||
 | 
							<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{pd.CORPINFO_ID}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.USERNAME != null and pd.USERNAME != ''">
 | 
				
			||||||
 | 
								and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
 | 
				
			||||||
 | 
								and f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.PERIOD != null and pd.PERIOD != ''">
 | 
				
			||||||
 | 
								and f.PERIOD = #{pd.PERIOD}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="1"'>
 | 
				
			||||||
 | 
										AND getCheckedNum(f.LISTMANAGER_ID) > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="0"'>
 | 
				
			||||||
 | 
										AND getCheckedNum(f.LISTMANAGER_ID) = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.LISTINGLEVEL != null and pd.LISTINGLEVEL != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.LISTINGLEVEL == "1"'>
 | 
				
			||||||
 | 
										and d.LEVEL = ''
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
										and d.LEVEL = #{pd.LISTINGLEVEL}
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc )
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 列表(全部) -->
 | 
						<!-- 列表(全部) -->
 | 
				
			||||||
	<select id="listRecordAll" parameterType="pd" resultType="pd">
 | 
						<select id="listRecordAll" parameterType="pd" resultType="pd">
 | 
				
			||||||
		select * from (
 | 
							select * from (
 | 
				
			||||||
| 
						 | 
					@ -2110,4 +2347,689 @@
 | 
				
			||||||
		where
 | 
							where
 | 
				
			||||||
			LISTMANAGER_ID = #{LISTMANAGER_ID}
 | 
								LISTMANAGER_ID = #{LISTMANAGER_ID}
 | 
				
			||||||
	</update>
 | 
						</update>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 部门清单列表 -->
 | 
				
			||||||
 | 
						<select id="riskStandardRecordlistPage" parameterType="page" resultType="pd">
 | 
				
			||||||
 | 
						( select * from
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							f.LISTMANAGER_ID,
 | 
				
			||||||
 | 
							f.NAME,
 | 
				
			||||||
 | 
							f.OPERATTIME,
 | 
				
			||||||
 | 
							f.ISDELETE,
 | 
				
			||||||
 | 
							f.DEPARTMENT_ID,
 | 
				
			||||||
 | 
							f.POST_ID,
 | 
				
			||||||
 | 
							f.USER_ID,
 | 
				
			||||||
 | 
							"1" as list_type,
 | 
				
			||||||
 | 
							u.WORKSTATUS,
 | 
				
			||||||
 | 
							a.STARTTIME,
 | 
				
			||||||
 | 
							a.ENDTIME ,
 | 
				
			||||||
 | 
							p.NAME PERIODNAME,
 | 
				
			||||||
 | 
							t.NAME TYPENAME,
 | 
				
			||||||
 | 
							m.NAME SCREENTYPENAME,
 | 
				
			||||||
 | 
							d.NAME as DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							getFullName(d.DEPARTMENT_ID) as DEPARTMENT_NAME_ALL,
 | 
				
			||||||
 | 
							sp.NAME
 | 
				
			||||||
 | 
							AS POST_NAME,
 | 
				
			||||||
 | 
							u.NAME as USER_NAME,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							select count(1) from BUS_CHECKRECORD ch
 | 
				
			||||||
 | 
							where ch.LISTMANAGER_ID=f.LISTMANAGER_ID AND ch.type = '1'
 | 
				
			||||||
 | 
							and ch.FINISHED='1' and ch.ISDELETE =0
 | 
				
			||||||
 | 
							) as count ,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							count(1)
 | 
				
			||||||
 | 
							from BUS_CHECKRECORD ch
 | 
				
			||||||
 | 
							left join bus_hidden h on h.CHECKRECORD_ID = ch.CHECKRECORD_ID
 | 
				
			||||||
 | 
							where ch.LISTMANAGER_ID=f.LISTMANAGER_ID
 | 
				
			||||||
 | 
							and ch.FINISHED='1'
 | 
				
			||||||
 | 
							and ch.ISDELETE =0
 | 
				
			||||||
 | 
							and h.ISDELETE =0
 | 
				
			||||||
 | 
							and h.HIDDEN_ID is not null
 | 
				
			||||||
 | 
							) as hiddenCount,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							CASE
 | 
				
			||||||
 | 
							WHEN f.TYPE = 'listType0005' THEN
 | 
				
			||||||
 | 
							CONCAT( f.START_DATE, " 00:00:00" )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0001' THEN
 | 
				
			||||||
 | 
							(select sd.DAY_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0002' THEN
 | 
				
			||||||
 | 
							(select sd.WEEK_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0003' THEN
 | 
				
			||||||
 | 
							(select sd.XUN_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0004' THEN
 | 
				
			||||||
 | 
							(select sd.MONTH_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0005' THEN
 | 
				
			||||||
 | 
							(select sd.QUARTER_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0006' THEN
 | 
				
			||||||
 | 
							(select sd.YEAR_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0007' THEN
 | 
				
			||||||
 | 
							(select sd.HALFYEAR_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							END
 | 
				
			||||||
 | 
							) DATESTART,
 | 
				
			||||||
 | 
							bb.NAME AS TASK_TYPE_NAME,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							CASE
 | 
				
			||||||
 | 
							WHEN f.TYPE = 'listType0005' THEN
 | 
				
			||||||
 | 
							CONCAT( f.END_DATE, " 23:59:59" )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0001' THEN
 | 
				
			||||||
 | 
							(select sd.DAY_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0002' THEN
 | 
				
			||||||
 | 
							(select sd.WEEK_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0003' THEN
 | 
				
			||||||
 | 
							(select sd.XUN_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0004' THEN
 | 
				
			||||||
 | 
							(select sd.MONTH_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0005' THEN
 | 
				
			||||||
 | 
							(select sd.QUARTER_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0006' THEN
 | 
				
			||||||
 | 
							(select sd.YEAR_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0007' THEN
 | 
				
			||||||
 | 
							(select sd.HALFYEAR_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							END
 | 
				
			||||||
 | 
							) DATEEND,
 | 
				
			||||||
 | 
							getCheckedNum(f.LISTMANAGER_ID) checkCount,
 | 
				
			||||||
 | 
							(select count(1) from bus_checkrecord cc where cc.LISTMANAGER_ID = f.LISTMANAGER_ID  and cc.FINISHED ='1' and type ='2') overTimeCount
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							f
 | 
				
			||||||
 | 
							LEFT JOIN BUS_OFFDUTY a on f.USER_ID = a.USER_ID and a.isdelete = '0' and a.STARTTIME <= date_format(now(),'%Y-%m-%d') and a.ENDTIME >= date_format(now(),'%Y-%m-%d')
 | 
				
			||||||
 | 
							left join sys_dictionaries p on f.PERIOD = p.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries t on f.TYPE = t.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries m on f.SCREENTYPE = m.BIANMA
 | 
				
			||||||
 | 
							left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
 | 
				
			||||||
 | 
							LEFT JOIN sys_dictionaries bb ON f.TASK_TYPE = bb.DICTIONARIES_ID
 | 
				
			||||||
 | 
							left join
 | 
				
			||||||
 | 
							SYS_POST sp on sp.POST_ID=f.POST_ID
 | 
				
			||||||
 | 
							left join SYS_USER u on u.USER_ID = f.USER_ID
 | 
				
			||||||
 | 
							where f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.ISDELETE != '-99'
 | 
				
			||||||
 | 
							<if test="pd.RISKCHECKLISTTYPE != null and pd.RISKCHECKLISTTYPE != ''"><!-- 状态 -->
 | 
				
			||||||
 | 
								and f.SCREENTYPE = #{pd.RISKCHECKLISTTYPE}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.statusIds != null and pd.statusIds != ''">
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
								f.LISTMANAGER_ID in
 | 
				
			||||||
 | 
								<foreach item="item" index="index" collection="pd.statusIds"
 | 
				
			||||||
 | 
										 open="(" separator="," close=")">
 | 
				
			||||||
 | 
									'${item}'
 | 
				
			||||||
 | 
								</foreach>
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
								f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</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>
 | 
				
			||||||
 | 
														<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
															and f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
														</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>
 | 
				
			||||||
 | 
												<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
												</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>
 | 
				
			||||||
 | 
												<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
												</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.DEPT_ID != null and pd.DEPT_ID != ''">
 | 
				
			||||||
 | 
											and
 | 
				
			||||||
 | 
											f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
										</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 != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<if test="pd.ISDELETE != null and pd.ISDELETE != ''"><!-- 状态 -->
 | 
				
			||||||
 | 
								and f.ISDELETE = #{pd.ISDELETE}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="1"'>
 | 
				
			||||||
 | 
										AND getCheckedNum(f.LISTMANAGER_ID) > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="0"'>
 | 
				
			||||||
 | 
										AND getCheckedNum(f.LISTMANAGER_ID) = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.OVERTIME != null and pd.OVERTIME != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.OVERTIME=="1"'>
 | 
				
			||||||
 | 
										AND (select count(1) from bus_checkrecord cc where cc.LISTMANAGER_ID = f.LISTMANAGER_ID  and cc.FINISHED ='1' and type ='2') > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.OVERTIME=="0"'>
 | 
				
			||||||
 | 
										AND (select count(1) from bus_checkrecord cc where cc.LISTMANAGER_ID = f.LISTMANAGER_ID  and cc.FINISHED ='1' and type ='2') = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.PERIOD != null and pd.PERIOD != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and f.PERIOD = #{pd.PERIOD}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.TYPE != null and pd.TYPE != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and f.TYPE = #{pd.TYPE}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test='pd.WORKSTATUS == "0"'>
 | 
				
			||||||
 | 
								and (
 | 
				
			||||||
 | 
								(a.STARTTIME is null or a.ENDTIME is null)
 | 
				
			||||||
 | 
								or (to_days(a.STARTTIME) < to_days(NOW()) and to_days(a.ENDTIME) > to_days(NOW()))
 | 
				
			||||||
 | 
								AND u.WORKSTATUS != '2'
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test='pd.WORKSTATUS == "1"'>
 | 
				
			||||||
 | 
								and !(
 | 
				
			||||||
 | 
								(a.STARTTIME is null or a.ENDTIME is null)
 | 
				
			||||||
 | 
								or (to_days(a.STARTTIME) < to_days(NOW()) and to_days(a.ENDTIME) > to_days(NOW()))
 | 
				
			||||||
 | 
								or u.WORKSTATUS = '2'
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.LISTINGLEVEL != null and pd.LISTINGLEVEL != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.LISTINGLEVEL == "1"'>
 | 
				
			||||||
 | 
										and d.LEVEL = ''
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
										and d.LEVEL = #{pd.LISTINGLEVEL}
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="(pd.STARTTIME != null and pd.STARTTIME != '') or (pd.ENDTIME != null and pd.ENDTIME != '')"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when
 | 
				
			||||||
 | 
											test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
				
			||||||
 | 
										and f.LISTMANAGER_ID in
 | 
				
			||||||
 | 
										(
 | 
				
			||||||
 | 
										SELECT LISTMANAGER_ID
 | 
				
			||||||
 | 
										FROM BUS_CHECKRECORD
 | 
				
			||||||
 | 
										WHERE FINISHED = '1'
 | 
				
			||||||
 | 
										AND ISDELETE = 0
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') >= #{pd.STARTTIME}
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') <= #{pd.ENDTIME}
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test="pd.STARTTIME != null and pd.STARTTIME != ''">
 | 
				
			||||||
 | 
										and f.LISTMANAGER_ID in
 | 
				
			||||||
 | 
										(
 | 
				
			||||||
 | 
										SELECT LISTMANAGER_ID
 | 
				
			||||||
 | 
										FROM BUS_CHECKRECORD
 | 
				
			||||||
 | 
										WHERE FINISHED = '1'
 | 
				
			||||||
 | 
										AND ISDELETE = 0
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') >= #{pd.STARTTIME}
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test="pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
				
			||||||
 | 
										and f.LISTMANAGER_ID in
 | 
				
			||||||
 | 
										(
 | 
				
			||||||
 | 
										SELECT LISTMANAGER_ID
 | 
				
			||||||
 | 
										FROM BUS_CHECKRECORD
 | 
				
			||||||
 | 
										WHERE FINISHED = '1'
 | 
				
			||||||
 | 
										AND ISDELETE = 0
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') <= #{pd.ENDTIME}
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							) f
 | 
				
			||||||
 | 
							where 1= 1
 | 
				
			||||||
 | 
							<if test="pd.HASHIDDEN != null and pd.HASHIDDEN != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test="pd.HASHIDDEN == 0">
 | 
				
			||||||
 | 
										and f.hiddenCount = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test="pd.HASHIDDEN == 1">
 | 
				
			||||||
 | 
										and f.hiddenCount > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							group by f.LISTMANAGER_ID
 | 
				
			||||||
 | 
							order by field(f.ISDELETE,'0','1','2','-1')	,f.OPERATTIME desc )
 | 
				
			||||||
 | 
						union
 | 
				
			||||||
 | 
							(select * from
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							f.CUSTOM_ID,
 | 
				
			||||||
 | 
							f.NAME,
 | 
				
			||||||
 | 
							f.OPERATTIME,
 | 
				
			||||||
 | 
							f.ISDELETE,
 | 
				
			||||||
 | 
							f.DEPARTMENT_ID,
 | 
				
			||||||
 | 
							f.POST_ID,
 | 
				
			||||||
 | 
							f.USER_ID,
 | 
				
			||||||
 | 
							"2" as list_type,
 | 
				
			||||||
 | 
							u.WORKSTATUS,
 | 
				
			||||||
 | 
							a.STARTTIME,
 | 
				
			||||||
 | 
							a.ENDTIME ,
 | 
				
			||||||
 | 
							p.NAME PERIODNAME,
 | 
				
			||||||
 | 
							t.NAME TYPENAME,
 | 
				
			||||||
 | 
							m.NAME SCREENTYPENAME,
 | 
				
			||||||
 | 
							d.NAME as DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							getFullName(d.DEPARTMENT_ID) as DEPARTMENT_NAME_ALL,
 | 
				
			||||||
 | 
							sp.NAME
 | 
				
			||||||
 | 
							AS POST_NAME,
 | 
				
			||||||
 | 
							u.NAME as USER_NAME,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							select count(1) from bus_hiddendangercheckstandard_checkrecord ch
 | 
				
			||||||
 | 
							where ch.CUSTOM_ID=f.CUSTOM_ID AND ch.type = '1'
 | 
				
			||||||
 | 
							and ch.FINISHED='1' and ch.ISDELETE =0
 | 
				
			||||||
 | 
							) as count ,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							count(1)
 | 
				
			||||||
 | 
							from bus_hiddendangercheckstandard_checkrecord ch
 | 
				
			||||||
 | 
							left join bus_hiddendangercheckstandard_hidden h on h.CHECKRECORD_ID = ch.CHECKRECORD_ID
 | 
				
			||||||
 | 
							where ch.CUSTOM_ID=f.CUSTOM_ID
 | 
				
			||||||
 | 
							and ch.FINISHED='1'
 | 
				
			||||||
 | 
							and ch.ISDELETE =0
 | 
				
			||||||
 | 
							and h.ISDELETE =0
 | 
				
			||||||
 | 
							and h.HIDDEN_ID is not null
 | 
				
			||||||
 | 
							) as hiddenCount,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							CASE
 | 
				
			||||||
 | 
							WHEN f.TYPE = 'listType0005' THEN
 | 
				
			||||||
 | 
							CONCAT( f.START_DATE, " 00:00:00" )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0001' THEN
 | 
				
			||||||
 | 
							(select sd.DAY_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0002' THEN
 | 
				
			||||||
 | 
							(select sd.WEEK_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0003' THEN
 | 
				
			||||||
 | 
							(select sd.XUN_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0004' THEN
 | 
				
			||||||
 | 
							(select sd.MONTH_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0005' THEN
 | 
				
			||||||
 | 
							(select sd.QUARTER_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0006' THEN
 | 
				
			||||||
 | 
							(select sd.YEAR_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0007' THEN
 | 
				
			||||||
 | 
							(select sd.HALFYEAR_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							END
 | 
				
			||||||
 | 
							) DATESTART,
 | 
				
			||||||
 | 
							bb.NAME AS TASK_TYPE_NAME,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							CASE
 | 
				
			||||||
 | 
							WHEN f.TYPE = 'listType0005' THEN
 | 
				
			||||||
 | 
							CONCAT( f.END_DATE, " 23:59:59" )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0001' THEN
 | 
				
			||||||
 | 
							(select sd.DAY_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0002' THEN
 | 
				
			||||||
 | 
							(select sd.WEEK_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0003' THEN
 | 
				
			||||||
 | 
							(select sd.XUN_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0004' THEN
 | 
				
			||||||
 | 
							(select sd.MONTH_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0005' THEN
 | 
				
			||||||
 | 
							(select sd.QUARTER_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0006' THEN
 | 
				
			||||||
 | 
							(select sd.YEAR_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							WHEN f.PERIOD = 'checkPeriod0007' THEN
 | 
				
			||||||
 | 
							(select sd.HALFYEAR_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
 | 
				
			||||||
 | 
							END
 | 
				
			||||||
 | 
							) DATEEND,
 | 
				
			||||||
 | 
							getStandardCheckedNum(f.CUSTOM_ID) checkCount,
 | 
				
			||||||
 | 
							(select count(1) from bus_hiddendangercheckstandard_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID  and cc.FINISHED ='1' and type ='2') overTimeCount
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							bus_hiddendangercheckstandard_custom
 | 
				
			||||||
 | 
							f
 | 
				
			||||||
 | 
							LEFT JOIN BUS_OFFDUTY a on f.USER_ID = a.USER_ID and a.isdelete = '0' and a.STARTTIME <= date_format(now(),'%Y-%m-%d') and a.ENDTIME >= date_format(now(),'%Y-%m-%d')
 | 
				
			||||||
 | 
							left join sys_dictionaries p on f.PERIOD = p.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries t on f.TYPE = t.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries m on f.SCREENTYPE = m.BIANMA
 | 
				
			||||||
 | 
							left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
 | 
				
			||||||
 | 
							LEFT JOIN sys_dictionaries bb ON f.TASK_TYPE = bb.DICTIONARIES_ID
 | 
				
			||||||
 | 
							left join SYS_POST sp on sp.POST_ID=f.POST_ID
 | 
				
			||||||
 | 
							left join SYS_USER u on u.USER_ID = f.USER_ID
 | 
				
			||||||
 | 
							where f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.ISDELETE != '-99'
 | 
				
			||||||
 | 
							<if test="pd.statusIds != null and pd.statusIds != ''">
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
								f.CUSTOM_ID in
 | 
				
			||||||
 | 
								<foreach item="item" index="index" collection="pd.statusIds"
 | 
				
			||||||
 | 
										 open="(" separator="," close=")">
 | 
				
			||||||
 | 
									'${item}'
 | 
				
			||||||
 | 
								</foreach>
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
								f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</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>
 | 
				
			||||||
 | 
														<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
															and f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
														</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>
 | 
				
			||||||
 | 
												<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
												</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>
 | 
				
			||||||
 | 
												<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
												</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.DEPT_ID != null and pd.DEPT_ID != ''">
 | 
				
			||||||
 | 
											and
 | 
				
			||||||
 | 
											f.DEPARTMENT_ID = #{pd.DEPT_ID}
 | 
				
			||||||
 | 
										</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 != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<if test="pd.ISDELETE != null and pd.ISDELETE != ''"><!-- 状态 -->
 | 
				
			||||||
 | 
								and f.ISDELETE = #{pd.ISDELETE}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="1"'>
 | 
				
			||||||
 | 
										AND getStandardCheckedNum(f.CUSTOM_ID) > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="0"'>
 | 
				
			||||||
 | 
										AND getStandardCheckedNum(f.CUSTOM_ID) = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.OVERTIME != null and pd.OVERTIME != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.OVERTIME=="1"'>
 | 
				
			||||||
 | 
										AND (select count(1) from bus_hiddendangercheckstandard_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID  and cc.FINISHED ='1' and type ='2') > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.OVERTIME=="0"'>
 | 
				
			||||||
 | 
										AND (select count(1) from bus_hiddendangercheckstandard_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID  and cc.FINISHED ='1' and type ='2') = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.PERIOD != null and pd.PERIOD != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and f.PERIOD = #{pd.PERIOD}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.TYPE != null and pd.TYPE != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and f.TYPE = #{pd.TYPE}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test='pd.WORKSTATUS == "0"'>
 | 
				
			||||||
 | 
								and (
 | 
				
			||||||
 | 
								(a.STARTTIME is null or a.ENDTIME is null)
 | 
				
			||||||
 | 
								or (to_days(a.STARTTIME) < to_days(NOW()) and to_days(a.ENDTIME) > to_days(NOW()))
 | 
				
			||||||
 | 
								AND u.WORKSTATUS != '2'
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test='pd.WORKSTATUS == "1"'>
 | 
				
			||||||
 | 
								and !(
 | 
				
			||||||
 | 
								(a.STARTTIME is null or a.ENDTIME is null)
 | 
				
			||||||
 | 
								or (to_days(a.STARTTIME) < to_days(NOW()) and to_days(a.ENDTIME) > to_days(NOW()))
 | 
				
			||||||
 | 
								or u.WORKSTATUS = '2'
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.LISTINGLEVEL != null and pd.LISTINGLEVEL != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.LISTINGLEVEL == "1"'>
 | 
				
			||||||
 | 
										and d.LEVEL = ''
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
										and d.LEVEL = #{pd.LISTINGLEVEL}
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="(pd.STARTTIME != null and pd.STARTTIME != '') or (pd.ENDTIME != null and pd.ENDTIME != '')"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when
 | 
				
			||||||
 | 
											test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
				
			||||||
 | 
										and f.CUSTOM_ID in
 | 
				
			||||||
 | 
										(
 | 
				
			||||||
 | 
										SELECT CUSTOM_ID
 | 
				
			||||||
 | 
										FROM bus_hiddendangercheckstandard_checkrecord
 | 
				
			||||||
 | 
										WHERE FINISHED = '1'
 | 
				
			||||||
 | 
										AND ISDELETE = 0
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') >= #{pd.STARTTIME}
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') <= #{pd.ENDTIME}
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test="pd.STARTTIME != null and pd.STARTTIME != ''">
 | 
				
			||||||
 | 
										and f.CUSTOM_ID in
 | 
				
			||||||
 | 
										(
 | 
				
			||||||
 | 
										SELECT CUSTOM_ID
 | 
				
			||||||
 | 
										FROM bus_hiddendangercheckstandard_checkrecord
 | 
				
			||||||
 | 
										WHERE FINISHED = '1'
 | 
				
			||||||
 | 
										AND ISDELETE = 0
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') >= #{pd.STARTTIME}
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test="pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
				
			||||||
 | 
										and f.LISTMANAGER_ID in
 | 
				
			||||||
 | 
										(
 | 
				
			||||||
 | 
										SELECT CUSTOM_ID
 | 
				
			||||||
 | 
										FROM bus_hiddendangercheckstandard_checkrecord
 | 
				
			||||||
 | 
										WHERE FINISHED = '1'
 | 
				
			||||||
 | 
										AND ISDELETE = 0
 | 
				
			||||||
 | 
										and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') <= #{pd.ENDTIME}
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							) f
 | 
				
			||||||
 | 
							where 1= 1
 | 
				
			||||||
 | 
							<if test="pd.HASHIDDEN != null and pd.HASHIDDEN != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test="pd.HASHIDDEN == 0">
 | 
				
			||||||
 | 
										and f.hiddenCount = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test="pd.HASHIDDEN == 1">
 | 
				
			||||||
 | 
										and f.hiddenCount > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							group by f.CUSTOM_ID
 | 
				
			||||||
 | 
							order by field(f.ISDELETE,'0','1','2','-1')	,f.OPERATTIME desc )
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
</mapper>
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,14 +36,14 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 字段用于新增 -->
 | 
						<!-- 字段用于新增 -->
 | 
				
			||||||
	<sql id="Field2">
 | 
						<sql id="Field2">
 | 
				
			||||||
		LISTMANAGER_ID,
 | 
							CUSTOM_ID,
 | 
				
			||||||
		LIST_NAME,
 | 
					 | 
				
			||||||
		CORPINFO_ID,
 | 
							CORPINFO_ID,
 | 
				
			||||||
		CREATOR,
 | 
							CREATOR,
 | 
				
			||||||
		CREATTIME,
 | 
							CREATTIME,
 | 
				
			||||||
		OPERATOR,
 | 
							OPERATOR,
 | 
				
			||||||
		OPERATTIME,
 | 
							OPERATTIME,
 | 
				
			||||||
		ISDELETE,
 | 
							ISDELETE,
 | 
				
			||||||
 | 
							CHECK_USERS,
 | 
				
			||||||
		LONGITUDE,
 | 
							LONGITUDE,
 | 
				
			||||||
		LATITUDE,
 | 
							LATITUDE,
 | 
				
			||||||
		CHECKRECORD_ID,
 | 
							CHECKRECORD_ID,
 | 
				
			||||||
| 
						 | 
					@ -54,19 +54,20 @@
 | 
				
			||||||
		TYPE,
 | 
							TYPE,
 | 
				
			||||||
		PERIODSTART,
 | 
							PERIODSTART,
 | 
				
			||||||
		PERIODEND,
 | 
							PERIODEND,
 | 
				
			||||||
		ISSTATISTICS
 | 
							ISSTATISTICS,
 | 
				
			||||||
 | 
							IMEI
 | 
				
			||||||
	</sql>
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 字段值 -->
 | 
						<!-- 字段值 -->
 | 
				
			||||||
	<sql id="FieldValue">
 | 
						<sql id="FieldValue">
 | 
				
			||||||
		#{LISTMANAGER_ID},
 | 
							#{CUSTOM_ID},
 | 
				
			||||||
		#{LIST_NAME},
 | 
					 | 
				
			||||||
		#{CORPINFO_ID},
 | 
							#{CORPINFO_ID},
 | 
				
			||||||
		#{CREATOR},
 | 
							#{CREATOR},
 | 
				
			||||||
		#{CREATTIME},
 | 
							#{CREATTIME},
 | 
				
			||||||
		#{OPERATOR},
 | 
							#{OPERATOR},
 | 
				
			||||||
		#{OPERATTIME},
 | 
							#{OPERATTIME},
 | 
				
			||||||
		#{ISDELETE},
 | 
							#{ISDELETE},
 | 
				
			||||||
 | 
							#{CHECK_USERS},
 | 
				
			||||||
		#{LONGITUDE},
 | 
							#{LONGITUDE},
 | 
				
			||||||
		#{LATITUDE},
 | 
							#{LATITUDE},
 | 
				
			||||||
		#{CHECKRECORD_ID},
 | 
							#{CHECKRECORD_ID},
 | 
				
			||||||
| 
						 | 
					@ -77,7 +78,8 @@
 | 
				
			||||||
		#{TYPE},
 | 
							#{TYPE},
 | 
				
			||||||
		#{PERIODSTART},
 | 
							#{PERIODSTART},
 | 
				
			||||||
		#{PERIODEND},
 | 
							#{PERIODEND},
 | 
				
			||||||
		#{ISSTATISTICS}
 | 
							#{ISSTATISTICS},
 | 
				
			||||||
 | 
							#{IMEI}
 | 
				
			||||||
	</sql>
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 新增-->
 | 
						<!-- 新增-->
 | 
				
			||||||
| 
						 | 
					@ -134,7 +136,7 @@
 | 
				
			||||||
		l.END_DATE
 | 
							l.END_DATE
 | 
				
			||||||
		from
 | 
							from
 | 
				
			||||||
		<include refid="tableName"></include> f
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
		left join BUS_LISTMANAGER l on f.LISTMANAGER_ID = l.LISTMANAGER_ID
 | 
							left join bus_hiddendangercheckstandard_custom l on f.CUSTOM_ID = l.CUSTOM_ID
 | 
				
			||||||
		left join sys_dictionaries p on l.PERIOD = p.BIANMA
 | 
							left join sys_dictionaries p on l.PERIOD = p.BIANMA
 | 
				
			||||||
		left join sys_dictionaries t on l.TYPE = t.BIANMA
 | 
							left join sys_dictionaries t on l.TYPE = t.BIANMA
 | 
				
			||||||
		left join sys_dictionaries s on l.SCREENTYPE = s.BIANMA
 | 
							left join sys_dictionaries s on l.SCREENTYPE = s.BIANMA
 | 
				
			||||||
| 
						 | 
					@ -143,16 +145,11 @@
 | 
				
			||||||
		where
 | 
							where
 | 
				
			||||||
			f.CHECKRECORD_ID = #{CHECKRECORD_ID}
 | 
								f.CHECKRECORD_ID = #{CHECKRECORD_ID}
 | 
				
			||||||
	</select>
 | 
						</select>
 | 
				
			||||||
	<!-- 通过清单ID获取风险点数据 -->
 | 
					 | 
				
			||||||
	<select id="findRiskPointByLId" parameterType="pd" resultType="pd">
 | 
					 | 
				
			||||||
		select * from bus_riskpoint t where t.RISKPOINT_ID in (select RISKPOINT_ID from bus_list_checkitem where LISTMANAGER_ID=#{LISTMANAGER_ID})
 | 
					 | 
				
			||||||
	</select>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 列表 -->
 | 
						<!-- 列表 -->
 | 
				
			||||||
	<select id="appdatalist" parameterType="pd" resultType="pd">
 | 
						<select id="appdatalist" parameterType="pd" resultType="pd">
 | 
				
			||||||
		select
 | 
							select
 | 
				
			||||||
			f.LISTMANAGER_ID,
 | 
								f.CUSTOM_ID,
 | 
				
			||||||
			f.LIST_NAME,
 | 
					 | 
				
			||||||
			f.CORPINFO_ID,
 | 
								f.CORPINFO_ID,
 | 
				
			||||||
			f.CREATOR,
 | 
								f.CREATOR,
 | 
				
			||||||
			f.CREATTIME,
 | 
								f.CREATTIME,
 | 
				
			||||||
| 
						 | 
					@ -170,11 +167,11 @@
 | 
				
			||||||
			f.PERIODEND DATEEND,
 | 
								f.PERIODEND DATEEND,
 | 
				
			||||||
			u.NAME AS USER_NAME,
 | 
								u.NAME AS USER_NAME,
 | 
				
			||||||
			su.NAME AS PRINCIPALNAME,
 | 
								su.NAME AS PRINCIPALNAME,
 | 
				
			||||||
			(select group_concat(IFNULL(bh.USER_NAME,chr.NAME)) from BUS_CHECKUSER bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.CHECKRECORD_ID=f.CHECKRECORD_ID) CHECK_USERS
 | 
								(select group_concat(IFNULL(bh.USER_NAME,chr.NAME)) from bus_hiddendangercheckstandard_checkuser bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.CHECKRECORD_ID=f.CHECKRECORD_ID) CHECK_USERS
 | 
				
			||||||
		from
 | 
							from
 | 
				
			||||||
		<include refid="tableName"></include> f
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
		left join SYS_USER u on u.USERNAME=f.CREATOR
 | 
							left join SYS_USER u on u.USERNAME=f.CREATOR
 | 
				
			||||||
		LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
 | 
							LEFT JOIN bus_hiddendangercheckstandard_custom l ON l.CUSTOM_ID = f.CUSTOM_ID
 | 
				
			||||||
		LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
 | 
							LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
 | 
				
			||||||
		where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID} and f.FINISHED='1'
 | 
							where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID} and f.FINISHED='1'
 | 
				
			||||||
		<if test="KEYWORDS != null and KEYWORDS != ''">
 | 
							<if test="KEYWORDS != null and KEYWORDS != ''">
 | 
				
			||||||
| 
						 | 
					@ -183,10 +180,10 @@
 | 
				
			||||||
					f.LIST_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
 | 
										f.LIST_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
 | 
				
			||||||
				)
 | 
									)
 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<if test="LISTMANAGER_ID != null and LISTMANAGER_ID != ''">
 | 
							<if test="CUSTOM_ID != null and CUSTOM_ID != ''">
 | 
				
			||||||
			and
 | 
								and
 | 
				
			||||||
				(
 | 
									(
 | 
				
			||||||
					f.LISTMANAGER_ID = #{LISTMANAGER_ID}
 | 
										f.CUSTOM_ID = #{CUSTOM_ID}
 | 
				
			||||||
				)
 | 
									)
 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<if test="STARTTIME != null and STARTTIME != ''">
 | 
							<if test="STARTTIME != null and STARTTIME != ''">
 | 
				
			||||||
| 
						 | 
					@ -211,8 +208,7 @@
 | 
				
			||||||
	<select id="datalistPage" parameterType="page" resultType="pd">
 | 
						<select id="datalistPage" parameterType="page" resultType="pd">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		select
 | 
							select
 | 
				
			||||||
			f.LISTMANAGER_ID,
 | 
								f.CUSTOM_ID,
 | 
				
			||||||
			f.LIST_NAME,
 | 
					 | 
				
			||||||
			f.CORPINFO_ID,
 | 
								f.CORPINFO_ID,
 | 
				
			||||||
			f.CREATOR,
 | 
								f.CREATOR,
 | 
				
			||||||
			f.CREATTIME,
 | 
								f.CREATTIME,
 | 
				
			||||||
| 
						 | 
					@ -230,11 +226,11 @@
 | 
				
			||||||
			f.PERIODEND DATEEND,
 | 
								f.PERIODEND DATEEND,
 | 
				
			||||||
			u.NAME AS USER_NAME,
 | 
								u.NAME AS USER_NAME,
 | 
				
			||||||
			su.NAME AS PRINCIPALNAME,
 | 
								su.NAME AS PRINCIPALNAME,
 | 
				
			||||||
			(select group_concat(IFNULL(bh.USER_NAME,chr.NAME)) from BUS_CHECKUSER bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.CHECKRECORD_ID=f.CHECKRECORD_ID) CHECK_USERS
 | 
								(select group_concat(IFNULL(bh.USER_NAME,chr.NAME)) from bus_hiddendangercheckstandard_checkuser bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.CHECKRECORD_ID=f.CHECKRECORD_ID) CHECK_USERS
 | 
				
			||||||
		from
 | 
							from
 | 
				
			||||||
		<include refid="tableName"></include> f
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
		left join SYS_USER u on u.USERNAME=f.CREATOR
 | 
							left join SYS_USER u on u.USERNAME=f.CREATOR
 | 
				
			||||||
		LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
 | 
							LEFT JOIN bus_hiddendangercheckstandard_custom l ON l.CUSTOM_ID = f.CUSTOM_ID
 | 
				
			||||||
		LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
 | 
							LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
 | 
				
			||||||
		where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.FINISHED='1'
 | 
							where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.FINISHED='1'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -244,10 +240,10 @@
 | 
				
			||||||
					f.LIST_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
										f.LIST_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
				
			||||||
				)
 | 
									)
 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<if test="pd.LISTMANAGER_ID != null and pd.LISTMANAGER_ID != ''">
 | 
							<if test="pd.CUSTOM_ID != null and pd.CUSTOM_ID != ''">
 | 
				
			||||||
			and
 | 
								and
 | 
				
			||||||
				(
 | 
									(
 | 
				
			||||||
					f.LISTMANAGER_ID = #{pd.LISTMANAGER_ID}
 | 
										f.CUSTOM_ID = #{CUSTOM_ID}
 | 
				
			||||||
				)
 | 
									)
 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
 | 
							<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
 | 
				
			||||||
| 
						 | 
					@ -256,12 +252,6 @@
 | 
				
			||||||
					l.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
 | 
										l.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
 | 
				
			||||||
				)
 | 
									)
 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<!-- <if test="pd.STARTTIME != null and pd.STARTTIME != ''">
 | 
					 | 
				
			||||||
			and DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d %H:%i:%s') >= CONCAT(#{pd.STARTTIME},':00')
 | 
					 | 
				
			||||||
		</if>
 | 
					 | 
				
			||||||
		<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
					 | 
				
			||||||
			and DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d %H:%i:%s') <= CONCAT(#{pd.ENDTIME},':59')
 | 
					 | 
				
			||||||
		</if> -->
 | 
					 | 
				
			||||||
		<choose>
 | 
							<choose>
 | 
				
			||||||
			<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
								<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
 | 
				
			||||||
				and DATE_FORMAT(CONCAT(#{pd.STARTTIME},' 00:00:00'),'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(f.CREATTIME,'%Y-%m-%d %H:%i:%s')
 | 
									and DATE_FORMAT(CONCAT(#{pd.STARTTIME},' 00:00:00'),'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(f.CREATTIME,'%Y-%m-%d %H:%i:%s')
 | 
				
			||||||
| 
						 | 
					@ -278,14 +268,6 @@
 | 
				
			||||||
		</choose>
 | 
							</choose>
 | 
				
			||||||
		<if test="pd.TYPE != null and pd.TYPE != ''">
 | 
							<if test="pd.TYPE != null and pd.TYPE != ''">
 | 
				
			||||||
			and f.TYPE= #{pd.TYPE}
 | 
								and f.TYPE= #{pd.TYPE}
 | 
				
			||||||
			<!-- <choose>
 | 
					 | 
				
			||||||
				<when test='pd.TYPE=="1"'>
 | 
					 | 
				
			||||||
					order by IFNULL( f.CHECK_TIME, f.PERIODEND ) desc
 | 
					 | 
				
			||||||
				</when>
 | 
					 | 
				
			||||||
				<when test='pd.TYPE=="2"'>
 | 
					 | 
				
			||||||
					order by IFNULL( f.CHECK_TIME, f.PERIODEND ) desc
 | 
					 | 
				
			||||||
				</when>
 | 
					 | 
				
			||||||
			</choose> -->
 | 
					 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<choose>
 | 
							<choose>
 | 
				
			||||||
			<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
 | 
								<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
 | 
				
			||||||
| 
						 | 
					@ -830,6 +812,9 @@
 | 
				
			||||||
		from
 | 
							from
 | 
				
			||||||
		<include refid="tableName"></include> f
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
		where 1=1 and  f.ISDELETE =0
 | 
							where 1=1 and  f.ISDELETE =0
 | 
				
			||||||
 | 
							<if test="CUSTOM_ID != null and CUSTOM_ID != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
							  and f.CUSTOM_ID = #{CUSTOM_ID}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
		<if test="FINISHED != null and FINISHED != ''"><!-- 关键词检索 -->
 | 
							<if test="FINISHED != null and FINISHED != ''"><!-- 关键词检索 -->
 | 
				
			||||||
			and
 | 
								and
 | 
				
			||||||
				f.FINISHED=#{FINISHED}
 | 
									f.FINISHED=#{FINISHED}
 | 
				
			||||||
| 
						 | 
					@ -838,10 +823,6 @@
 | 
				
			||||||
			and
 | 
								and
 | 
				
			||||||
				f.CREATOR=#{USER_ID}
 | 
									f.CREATOR=#{USER_ID}
 | 
				
			||||||
		</if>
 | 
							</if>
 | 
				
			||||||
		<if test="LISTMANAGER_ID != null and LISTMANAGER_ID != ''"><!-- 关键词检索 -->
 | 
					 | 
				
			||||||
			and
 | 
					 | 
				
			||||||
				f.LISTMANAGER_ID = #{LISTMANAGER_ID}
 | 
					 | 
				
			||||||
		</if>
 | 
					 | 
				
			||||||
		<if test="IS_DAY != null and IS_DAY != ''"><!-- 关键词检索 -->
 | 
							<if test="IS_DAY != null and IS_DAY != ''"><!-- 关键词检索 -->
 | 
				
			||||||
			and
 | 
								and
 | 
				
			||||||
				TO_DAYS(f.CHECK_TIME) = TO_DAYS(NOW())
 | 
									TO_DAYS(f.CHECK_TIME) = TO_DAYS(NOW())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,248 @@
 | 
				
			||||||
 | 
					<?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.CustomCheckUserMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!--表名 -->
 | 
				
			||||||
 | 
						<sql id="tableName">
 | 
				
			||||||
 | 
							bus_hiddendangercheckstandard_checkuser
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!--数据字典表名 -->
 | 
				
			||||||
 | 
						<sql id="dicTableName">
 | 
				
			||||||
 | 
							SYS_DICTIONARIES
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 字段 -->
 | 
				
			||||||
 | 
						<sql id="Field">
 | 
				
			||||||
 | 
							f.CHECKRECORD_ID,
 | 
				
			||||||
 | 
							f.DEPARTMENT_ID,
 | 
				
			||||||
 | 
							f.USER_ID,
 | 
				
			||||||
 | 
							f.CHECKUSER_ID,
 | 
				
			||||||
 | 
							f.DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							f.USER_NAME
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 字段用于新增 -->
 | 
				
			||||||
 | 
						<sql id="Field2">
 | 
				
			||||||
 | 
							CHECKRECORD_ID,
 | 
				
			||||||
 | 
							DEPARTMENT_ID,
 | 
				
			||||||
 | 
							USER_ID,
 | 
				
			||||||
 | 
							CHECKUSER_ID,
 | 
				
			||||||
 | 
							DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							USER_NAME
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 字段值 -->
 | 
				
			||||||
 | 
						<sql id="FieldValue">
 | 
				
			||||||
 | 
							#{CHECKRECORD_ID},
 | 
				
			||||||
 | 
							#{DEPARTMENT_ID},
 | 
				
			||||||
 | 
							#{USER_ID},
 | 
				
			||||||
 | 
							#{CHECKUSER_ID},
 | 
				
			||||||
 | 
							#{DEPARTMENT_NAME},
 | 
				
			||||||
 | 
							#{USER_NAME}
 | 
				
			||||||
 | 
						</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">
 | 
				
			||||||
 | 
							delete from
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								CHECKRECORD_ID = #{CHECKRECORD_ID}
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 修改 -->
 | 
				
			||||||
 | 
						<update id="edit" parameterType="pd">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
								CHECKRECORD_ID = #{CHECKRECORD_ID},
 | 
				
			||||||
 | 
								DEPARTMENT_ID = #{DEPARTMENT_ID},
 | 
				
			||||||
 | 
								USER_ID = #{USER_ID},
 | 
				
			||||||
 | 
								CHECKUSER_ID = CHECKUSER_ID
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								CHECKUSER_ID = #{CHECKUSER_ID}
 | 
				
			||||||
 | 
						</update>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 通过ID获取数据 -->
 | 
				
			||||||
 | 
						<select id="findById" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							<include refid="Field"></include>
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								f.CHECKUSER_ID = #{CHECKUSER_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>
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 批量删除 -->
 | 
				
			||||||
 | 
						<delete id="deleteAll" parameterType="String">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
								ISDELETE = '1'
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								CHECKUSER_ID in
 | 
				
			||||||
 | 
							<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
					                 #{item}
 | 
				
			||||||
 | 
							</foreach>
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 查询人员检查数 -->
 | 
				
			||||||
 | 
						<select id="countCheByUser" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								c.USER_ID,
 | 
				
			||||||
 | 
								count( c.CHECKUSER_ID ) NUM
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								bus_checkuser c
 | 
				
			||||||
 | 
								LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								cr.isdelete = '0'
 | 
				
			||||||
 | 
								AND cr.FINISHED = '1'
 | 
				
			||||||
 | 
								AND cr.ISSTATISTICS = '1'
 | 
				
			||||||
 | 
								AND c.user_id IS NOT NULL
 | 
				
			||||||
 | 
								AND c.user_id != ''
 | 
				
			||||||
 | 
								AND cr.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								cr.CHECK_TIME BETWEEN CONCAT(#{STARTTIME},' 00:00:00') and CONCAT(#{ENDTIME},' 23:59:59')
 | 
				
			||||||
 | 
							GROUP BY
 | 
				
			||||||
 | 
								c.user_id
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 查看检查清单检查人 -->
 | 
				
			||||||
 | 
						<select id="getCheckUser" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								GROUP_CONCAT(DISTINCT IFNULL(F.USER_NAME, U.NAME)) USERS
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								BUS_CHECKUSER F
 | 
				
			||||||
 | 
								LEFT JOIN SYS_USER U ON U.USER_ID = F.USER_ID
 | 
				
			||||||
 | 
								WHERE U.NAME IS NOT NULL
 | 
				
			||||||
 | 
								AND U.NAME != ''
 | 
				
			||||||
 | 
								AND F.CHECKRECORD_ID = #{CHECKRECORD_ID}
 | 
				
			||||||
 | 
							GROUP BY
 | 
				
			||||||
 | 
								F.CHECKRECORD_ID
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 绩效得分 -->
 | 
				
			||||||
 | 
						<select id="getDeptExamine" parameterType="pd" resultType="pd" >
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								d.DEPARTMENT_ID,
 | 
				
			||||||
 | 
								ifnull(sta.NUM,0) as sta_count,
 | 
				
			||||||
 | 
								ifnull(che.NUM,0)  as check_count
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								OA_DEPARTMENT d
 | 
				
			||||||
 | 
							left JOIN (
 | 
				
			||||||
 | 
								SELECT
 | 
				
			||||||
 | 
									sum(f.NOTEXAMINEDNUM) NUM,
 | 
				
			||||||
 | 
									u.DEPARTMENT_ID
 | 
				
			||||||
 | 
								FROM
 | 
				
			||||||
 | 
									bus_list_statistics f
 | 
				
			||||||
 | 
								LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
 | 
				
			||||||
 | 
								WHERE
 | 
				
			||||||
 | 
									(
 | 
				
			||||||
 | 
										f.STARTTIME BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
										or
 | 
				
			||||||
 | 
										f.ENDTIME  BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
										or
 | 
				
			||||||
 | 
										(f.STARTTIME <= #{STARTTIME} and f.ENDTIME >= #{ENDTIME})
 | 
				
			||||||
 | 
									)
 | 
				
			||||||
 | 
								group by u.DEPARTMENT_ID
 | 
				
			||||||
 | 
							) sta on sta.DEPARTMENT_ID=d.DEPARTMENT_ID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							LEFT JOIN (
 | 
				
			||||||
 | 
								SELECT
 | 
				
			||||||
 | 
									count( distinct cr.LISTMANAGER_ID ) NUM,
 | 
				
			||||||
 | 
									c.DEPARTMENT_ID
 | 
				
			||||||
 | 
								FROM
 | 
				
			||||||
 | 
									bus_checkuser c
 | 
				
			||||||
 | 
									LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID
 | 
				
			||||||
 | 
								WHERE
 | 
				
			||||||
 | 
									cr.isdelete = '0'
 | 
				
			||||||
 | 
									AND cr.FINISHED = '1'
 | 
				
			||||||
 | 
									AND cr.ISSTATISTICS = '1'
 | 
				
			||||||
 | 
									AND cr.CHECK_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
									group by c.DEPARTMENT_ID
 | 
				
			||||||
 | 
							) che on che.DEPARTMENT_ID = d.DEPARTMENT_ID
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								d.ISDELETE = 0
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<select id="getUserExamine" parameterType="pd" resultType="pd" >
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								u.USER_ID,
 | 
				
			||||||
 | 
								ifnull(sta.NUM,0) as sta_count,
 | 
				
			||||||
 | 
								ifnull(che.NUM,0)  as check_count
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								SYS_USER u
 | 
				
			||||||
 | 
							left JOIN (
 | 
				
			||||||
 | 
								SELECT
 | 
				
			||||||
 | 
									sum(f.NOTEXAMINEDNUM) NUM,
 | 
				
			||||||
 | 
									f.USER_ID
 | 
				
			||||||
 | 
								FROM
 | 
				
			||||||
 | 
									bus_list_statistics f
 | 
				
			||||||
 | 
								WHERE
 | 
				
			||||||
 | 
									(
 | 
				
			||||||
 | 
										f.STARTTIME BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
										or
 | 
				
			||||||
 | 
										f.ENDTIME  BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
										or
 | 
				
			||||||
 | 
										(f.STARTTIME <= #{STARTTIME} and f.ENDTIME >= #{ENDTIME})
 | 
				
			||||||
 | 
									)
 | 
				
			||||||
 | 
								group by f.USER_ID
 | 
				
			||||||
 | 
							) sta on sta.USER_ID=u.USER_ID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							LEFT JOIN (
 | 
				
			||||||
 | 
								SELECT
 | 
				
			||||||
 | 
									count( distinct cr.LISTMANAGER_ID ) NUM,
 | 
				
			||||||
 | 
									c.USER_ID
 | 
				
			||||||
 | 
								FROM
 | 
				
			||||||
 | 
									bus_checkuser c
 | 
				
			||||||
 | 
									LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID
 | 
				
			||||||
 | 
								WHERE
 | 
				
			||||||
 | 
									cr.isdelete = '0'
 | 
				
			||||||
 | 
									AND cr.FINISHED = '1'
 | 
				
			||||||
 | 
									AND cr.ISSTATISTICS = '1'
 | 
				
			||||||
 | 
									AND cr.CHECK_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
									group by c.USER_ID
 | 
				
			||||||
 | 
							) che on che.USER_ID = u.USER_ID
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								u.ISDELETE = 0
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					@ -1288,7 +1288,7 @@
 | 
				
			||||||
       SELECT
 | 
					       SELECT
 | 
				
			||||||
			<include refid="Field"></include>
 | 
								<include refid="Field"></include>
 | 
				
			||||||
		FROM
 | 
							FROM
 | 
				
			||||||
			BUS_HIDDEN f
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
		WHERE f.ISDELETE = '0'
 | 
							WHERE f.ISDELETE = '0'
 | 
				
			||||||
		and f.SOURCE = '3'
 | 
							and f.SOURCE = '3'
 | 
				
			||||||
		<if test="STATE != null and STATE != ''"><!-- 关键词检索 -->
 | 
							<if test="STATE != null and STATE != ''"><!-- 关键词检索 -->
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,7 +37,8 @@
 | 
				
			||||||
		f.OPERATE_TIME,
 | 
							f.OPERATE_TIME,
 | 
				
			||||||
		f.DELETEOR_ID,
 | 
							f.DELETEOR_ID,
 | 
				
			||||||
		f.DELETEOR_NAME,
 | 
							f.DELETEOR_NAME,
 | 
				
			||||||
		f.DELETE_TIME
 | 
							f.DELETE_TIME,
 | 
				
			||||||
 | 
							f.BAO_BAO_NUM
 | 
				
			||||||
	</sql>
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 字段用于新增 -->
 | 
						<!-- 字段用于新增 -->
 | 
				
			||||||
| 
						 | 
					@ -65,7 +66,7 @@
 | 
				
			||||||
		DELETEOR_ID,
 | 
							DELETEOR_ID,
 | 
				
			||||||
		DELETEOR_NAME,
 | 
							DELETEOR_NAME,
 | 
				
			||||||
		DELETE_TIME,
 | 
							DELETE_TIME,
 | 
				
			||||||
		COMMON_ITEM_ID
 | 
							BAO_BAO_NUM
 | 
				
			||||||
	</sql>
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 字段值 -->
 | 
						<!-- 字段值 -->
 | 
				
			||||||
| 
						 | 
					@ -93,7 +94,7 @@
 | 
				
			||||||
		#{DELETEOR_ID},
 | 
							#{DELETEOR_ID},
 | 
				
			||||||
		#{DELETEOR_NAME},
 | 
							#{DELETEOR_NAME},
 | 
				
			||||||
		#{DELETE_TIME},
 | 
							#{DELETE_TIME},
 | 
				
			||||||
		#{COMMON_ITEM_ID}
 | 
							#{BAO_BAO_NUM}
 | 
				
			||||||
	</sql>
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 新增 -->
 | 
						<!-- 新增 -->
 | 
				
			||||||
| 
						 | 
					@ -106,6 +107,126 @@
 | 
				
			||||||
		<include refid="FieldValue"></include>
 | 
							<include refid="FieldValue"></include>
 | 
				
			||||||
		)
 | 
							)
 | 
				
			||||||
	</insert>
 | 
						</insert>
 | 
				
			||||||
 | 
						<!-- 删除-->
 | 
				
			||||||
 | 
						<delete id="delete" parameterType="pd">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
							ISDELETE = '1'
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOM_ITEM_ID = #{CUSTOM_ITEM_ID}
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 修改 -->
 | 
				
			||||||
 | 
						<update id="edit" parameterType="pd">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
							CHECK_CATEGORY = #{CHECK_CATEGORY},
 | 
				
			||||||
 | 
							CHECK_ITEM = #{CHECK_ITEM},
 | 
				
			||||||
 | 
							CHECK_CONTENT = #{CHECK_CONTENT},
 | 
				
			||||||
 | 
							CHECK_STANDARD = #{CHECK_STANDARD},
 | 
				
			||||||
 | 
							REFERENCE_BASIS = #{REFERENCE_BASIS},
 | 
				
			||||||
 | 
							CHECK_QUALIFIED = #{CHECK_QUALIFIED},
 | 
				
			||||||
 | 
							CHECK_UNQUALIFIED = #{CHECK_UNQUALIFIED},
 | 
				
			||||||
 | 
							OPERATION_TYPE = #{OPERATION_TYPE},
 | 
				
			||||||
 | 
							BAO_BAO_NUM = #{BAO_BAO_NUM},
 | 
				
			||||||
 | 
							LISTCHECKITEM_ID = LISTCHECKITEM_ID
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOM_ITEM_ID = #{CUSTOM_ITEM_ID}
 | 
				
			||||||
 | 
						</update>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 通过ID获取数据 -->
 | 
				
			||||||
 | 
						<select id="findById" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							<include refid="Field"></include>,
 | 
				
			||||||
 | 
							bhd1.DICTIONARY_NAME as CHECK_CATEGORY_NAME,
 | 
				
			||||||
 | 
							bhd2.DICTIONARY_NAME as CHECK_ITEM_NAME
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							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.CUSTOM_ITEM_ID = #{CUSTOM_ITEM_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>,
 | 
				
			||||||
 | 
							d.NAME as DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							u.NAME USER_NAME,
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
							COUNT(h.HIDDEN_ID)
 | 
				
			||||||
 | 
							FROM bus_hiddendangercheckstandard_hidden h
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
							h.CUSTOM_ITEM_ID = f.CUSTOM_ITEM_ID
 | 
				
			||||||
 | 
							AND h.CUSTOM_ID = f.CUSTOM_ID
 | 
				
			||||||
 | 
							AND h.ISDELETE = '0' and h.SOURCE = '2'
 | 
				
			||||||
 | 
							AND h.STATE NOT IN ('4','0')
 | 
				
			||||||
 | 
							) as HASHIDDEN,
 | 
				
			||||||
 | 
							bl.TASK_TYPE,
 | 
				
			||||||
 | 
							blsd.NAME as TASK_TYPE_NAME,
 | 
				
			||||||
 | 
							blsd.BZ as TASK_TYPE_NUM,
 | 
				
			||||||
 | 
							bhd1.DICTIONARY_NAME as CHECK_CATEGORY_NAME,
 | 
				
			||||||
 | 
							bhd2.DICTIONARY_NAME as CHECK_ITEM_NAME
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							left join bus_hiddendangercheckstandard_custom bl on bl.CUSTOM_ID = f.CUSTOM_ID
 | 
				
			||||||
 | 
							left join sys_dictionaries blsd on blsd.DICTIONARIES_ID = bl.TASK_TYPE
 | 
				
			||||||
 | 
							left join OA_DEPARTMENT d on d.DEPARTMENT_ID = bl.DEPARTMENT_ID
 | 
				
			||||||
 | 
							left join sys_user u on u.USER_ID = bl.USER_ID
 | 
				
			||||||
 | 
							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 != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and f.CUSTOM_ID = #{CUSTOM_ID}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 批量删除 -->
 | 
				
			||||||
 | 
						<delete id="deleteList" parameterType="pd">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
							ISDELETE = '1',
 | 
				
			||||||
 | 
							OPERATOR = #{OPERATOR},
 | 
				
			||||||
 | 
							OPERATTIME = #{OPERATTIME}
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOM_ID = #{CUSTOM_ID}
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
						<!-- 批量删除 -->
 | 
				
			||||||
 | 
						<delete id="deleteAll" parameterType="String">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
							ISDELETE = '1'
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOM_ITEM_ID in
 | 
				
			||||||
 | 
							<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
								#{item}
 | 
				
			||||||
 | 
							</foreach>
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<!-- 获取用户检查清单的检查项目 -->
 | 
						<!-- 获取用户检查清单的检查项目 -->
 | 
				
			||||||
	<select id="getCheckItem" parameterType="pd" resultType="pd">
 | 
						<select id="getCheckItem" parameterType="pd" resultType="pd">
 | 
				
			||||||
| 
						 | 
					@ -126,5 +247,15 @@
 | 
				
			||||||
		GROUP BY f.CHECK_ITEM
 | 
							GROUP BY f.CHECK_ITEM
 | 
				
			||||||
		ORDER BY d.DICTIONARY_SORT ASC
 | 
							ORDER BY d.DICTIONARY_SORT ASC
 | 
				
			||||||
	</select>
 | 
						</select>
 | 
				
			||||||
 | 
						<!-- 查询未对接数据 -->
 | 
				
			||||||
 | 
						<select id="findHidden" parameterType="pd" resultType="pd" >
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								h.HIDDEN_ID
 | 
				
			||||||
 | 
							FROM bus_hiddendangercheckstandard_hidden h
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								h.CUSTOM_ITEM_ID = #{CUSTOM_ITEM_ID}
 | 
				
			||||||
 | 
							  AND h.CUSTOM_ID = #{CUSTOM_ID}
 | 
				
			||||||
 | 
							  AND h.ISDELETE = '0' and h.SOURCE = '2'
 | 
				
			||||||
 | 
							  AND h.STATE NOT IN ('4','0') limit 1
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
</mapper>
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -352,4 +352,232 @@
 | 
				
			||||||
		GROUP BY f.CUSTOM_ID
 | 
							GROUP BY f.CUSTOM_ID
 | 
				
			||||||
		ORDER BY f.COMMON_ITEM_SORT ASC
 | 
							ORDER BY f.COMMON_ITEM_SORT ASC
 | 
				
			||||||
	</select>
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 清单检查分页 -->
 | 
				
			||||||
 | 
						<select id="checklistPage" parameterType="page" resultType="pd">
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							<include refid="Field"></include>
 | 
				
			||||||
 | 
							,
 | 
				
			||||||
 | 
							p.NAME PERIODNAME,
 | 
				
			||||||
 | 
							t.NAME TYPENAME,
 | 
				
			||||||
 | 
							d.NAME as DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							getFullName(d.DEPARTMENT_ID) as DEPARTMENT_NAME_ALL,
 | 
				
			||||||
 | 
							sp.NAME
 | 
				
			||||||
 | 
							AS POST_NAME,
 | 
				
			||||||
 | 
							u.NAME USER_NAME,
 | 
				
			||||||
 | 
							(select count(1) from bus_hiddendangercheckstandard_custom_item
 | 
				
			||||||
 | 
							ch where ch.CUSTOM_ID = f.CUSTOM_ID and ch.ISDELETE =0) as	count,
 | 
				
			||||||
 | 
							getStandardCheckedNum(f.CUSTOM_ID) checkCount
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							f
 | 
				
			||||||
 | 
							left join sys_dictionaries p on f.PERIOD = p.BIANMA
 | 
				
			||||||
 | 
							left join sys_dictionaries t on f.TYPE = t.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 SYS_POST sp on
 | 
				
			||||||
 | 
							sp.POST_ID=f.POST_ID
 | 
				
			||||||
 | 
							where f.ISDELETE = '0' and (f.TYPE != 'listType0005'
 | 
				
			||||||
 | 
							or (f.START_DATE <= DATE_FORMAT(NOW(),'%Y-%m-%d') and f.END_DATE
 | 
				
			||||||
 | 
							>= DATE_FORMAT(NOW(),'%Y-%m-%d') ))
 | 
				
			||||||
 | 
							<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{pd.CORPINFO_ID}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.USERNAME != null and pd.USERNAME != ''">
 | 
				
			||||||
 | 
								and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
 | 
				
			||||||
 | 
								and f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.PERIOD != null and pd.PERIOD != ''">
 | 
				
			||||||
 | 
								and f.PERIOD = #{pd.PERIOD}
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="1"'>
 | 
				
			||||||
 | 
										AND getStandardCheckedNum(f.LISTMANAGER_ID) > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='pd.STATUS=="0"'>
 | 
				
			||||||
 | 
										AND getStandardCheckedNum(f.LISTMANAGER_ID) = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="pd.LISTINGLEVEL != null and pd.LISTINGLEVEL != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='pd.LISTINGLEVEL == "1"'>
 | 
				
			||||||
 | 
										and d.LEVEL = ''
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<otherwise>
 | 
				
			||||||
 | 
										and d.LEVEL = #{pd.LISTINGLEVEL}
 | 
				
			||||||
 | 
									</otherwise>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 查询公司清单总数 -->
 | 
				
			||||||
 | 
						<select id="getListCount" parameterType="pd" resultType="int" >
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								count( 1 )
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								bus_hiddendangercheckstandard_custom
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
							  and ISDELETE  = '0'
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 查询公司检查过清单的总数 -->
 | 
				
			||||||
 | 
						<select id="getWorkedListCount" parameterType="pd" resultType="int" >
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								count( 1 )
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
									SELECT
 | 
				
			||||||
 | 
										count( s.CUSTOM_ID )
 | 
				
			||||||
 | 
									FROM
 | 
				
			||||||
 | 
					                    bus_hiddendangercheckstandard_custom s
 | 
				
			||||||
 | 
											LEFT JOIN bus_hiddendangercheckstandard_checkrecord f ON f.CUSTOM_ID = s.CUSTOM_ID
 | 
				
			||||||
 | 
									WHERE
 | 
				
			||||||
 | 
										s.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
									  AND f.FINISHED = '1'
 | 
				
			||||||
 | 
									  AND f.isdelete = '0'
 | 
				
			||||||
 | 
									  AND s.isdelete = '0'
 | 
				
			||||||
 | 
									  AND f.TYPE = '1'
 | 
				
			||||||
 | 
									  AND f.CHECKRECORD_ID IS NOT NULL
 | 
				
			||||||
 | 
									GROUP BY
 | 
				
			||||||
 | 
										s.CUSTOM_ID
 | 
				
			||||||
 | 
								) q
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!--查询人员清单 -->
 | 
				
			||||||
 | 
						<select id="getListByCorplistPage" parameterType="page" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
							f.CUSTOM_ID,
 | 
				
			||||||
 | 
							f.NAME,
 | 
				
			||||||
 | 
							f.CREATTIME,
 | 
				
			||||||
 | 
							p.NAME AS PERIOD_NAME,
 | 
				
			||||||
 | 
							t.NAME AS TYPE_NAME,
 | 
				
			||||||
 | 
							u.NAME  USER_NAME,
 | 
				
			||||||
 | 
							getFullName(d.DEPARTMENT_ID)  DEPARTMENT_NAME,
 | 
				
			||||||
 | 
							po.NAME  POST_NAME
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
							bus_listmanager f
 | 
				
			||||||
 | 
							left join sys_dictionaries p on p.BIANMA = f.PERIOD
 | 
				
			||||||
 | 
							left join sys_dictionaries t on t.BIANMA = f.TYPE
 | 
				
			||||||
 | 
							left join sys_user u on u.USER_ID = f.USER_ID
 | 
				
			||||||
 | 
							left join oa_department d on u.DEPARTMENT_ID = d.DEPARTMENT_ID
 | 
				
			||||||
 | 
							left join sys_post po on u.POST_ID = po.POST_ID
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
							f.ISDELETE = '0'
 | 
				
			||||||
 | 
							and f.CORPINFO_ID = #{pd.CORPINFO_ID}
 | 
				
			||||||
 | 
							<if test="pd.USERNAME != null and pd.USERNAME != ''">
 | 
				
			||||||
 | 
								and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
 | 
				
			||||||
 | 
							</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
 | 
				
			||||||
 | 
										d.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
 | 
				
			||||||
 | 
															d.DEPARTMENT_ID in
 | 
				
			||||||
 | 
															<foreach item="item" index="index"
 | 
				
			||||||
 | 
																	 collection="pd.DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
																'${item}'
 | 
				
			||||||
 | 
															</foreach>
 | 
				
			||||||
 | 
														</when>
 | 
				
			||||||
 | 
														<otherwise>
 | 
				
			||||||
 | 
															and
 | 
				
			||||||
 | 
															((d.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 (
 | 
				
			||||||
 | 
															d.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 != ''">
 | 
				
			||||||
 | 
													or f.USER_ID = #{pd.USER_ID}
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													d.DEPARTMENT_ID in
 | 
				
			||||||
 | 
													<foreach item="item" index="index"
 | 
				
			||||||
 | 
															 collection="pd.DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
														'${item}'
 | 
				
			||||||
 | 
													</foreach>
 | 
				
			||||||
 | 
												</when>
 | 
				
			||||||
 | 
												<otherwise>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													d.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})
 | 
				
			||||||
 | 
												</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
 | 
				
			||||||
 | 
													d.DEPARTMENT_ID in
 | 
				
			||||||
 | 
													<foreach item="item" index="index"
 | 
				
			||||||
 | 
															 collection="pd.DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
														'${item}'
 | 
				
			||||||
 | 
													</foreach>
 | 
				
			||||||
 | 
												</when>
 | 
				
			||||||
 | 
												<otherwise>
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													d.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 d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
 | 
				
			||||||
 | 
											and f.USER_ID = #{pd.USER_ID}
 | 
				
			||||||
 | 
										</when>
 | 
				
			||||||
 | 
										<otherwise>
 | 
				
			||||||
 | 
										</otherwise>
 | 
				
			||||||
 | 
									</choose>
 | 
				
			||||||
 | 
								</otherwise>
 | 
				
			||||||
 | 
							</choose>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ORDER BY d.DEP_ORDER,po.POST_ID,f.USER_ID,f.PERIOD
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
</mapper>
 | 
					</mapper>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,477 @@
 | 
				
			||||||
 | 
					<?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.CustomStatisticsMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!--表名 -->
 | 
				
			||||||
 | 
						<sql id="tableName">
 | 
				
			||||||
 | 
							bus_hiddendangercheckstandard_statistics
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!--数据字典表名 -->
 | 
				
			||||||
 | 
						<sql id="dicTableName">
 | 
				
			||||||
 | 
							SYS_DICTIONARIES
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 字段 -->
 | 
				
			||||||
 | 
						<sql id="Field">
 | 
				
			||||||
 | 
							f.STARTTIME,
 | 
				
			||||||
 | 
							f.ENDTIME,
 | 
				
			||||||
 | 
							f.NOTEXAMINEDNUM,
 | 
				
			||||||
 | 
							f.TYPE,
 | 
				
			||||||
 | 
							f.PERIOD,
 | 
				
			||||||
 | 
							f.CORPINFO_ID,
 | 
				
			||||||
 | 
							f.CUSTOMSTATISTICS_ID,
 | 
				
			||||||
 | 
							f.CREATOR,
 | 
				
			||||||
 | 
							f.CREATTIME,
 | 
				
			||||||
 | 
							f.OPERATOR,
 | 
				
			||||||
 | 
							f.OPERATTIME,
 | 
				
			||||||
 | 
							f.USER_ID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 字段用于新增 -->
 | 
				
			||||||
 | 
						<sql id="Field2">
 | 
				
			||||||
 | 
							STARTTIME,
 | 
				
			||||||
 | 
							ENDTIME,
 | 
				
			||||||
 | 
							NOTEXAMINEDNUM,
 | 
				
			||||||
 | 
							TYPE,
 | 
				
			||||||
 | 
							PERIOD,
 | 
				
			||||||
 | 
							CORPINFO_ID,
 | 
				
			||||||
 | 
							CUSTOMSTATISTICS_ID,
 | 
				
			||||||
 | 
							CREATOR,
 | 
				
			||||||
 | 
							CREATTIME,
 | 
				
			||||||
 | 
							OPERATOR,
 | 
				
			||||||
 | 
							OPERATTIME,
 | 
				
			||||||
 | 
							USER_ID
 | 
				
			||||||
 | 
						</sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 字段值 -->
 | 
				
			||||||
 | 
						<sql id="FieldValue">
 | 
				
			||||||
 | 
							#{STARTTIME},
 | 
				
			||||||
 | 
							#{ENDTIME},
 | 
				
			||||||
 | 
							#{NOTEXAMINEDNUM},
 | 
				
			||||||
 | 
							#{TYPE},
 | 
				
			||||||
 | 
							#{PERIOD},
 | 
				
			||||||
 | 
							#{CORPINFO_ID},
 | 
				
			||||||
 | 
							#{CUSTOMSTATISTICS_ID},
 | 
				
			||||||
 | 
							#{CREATOR},
 | 
				
			||||||
 | 
							#{CREATTIME},
 | 
				
			||||||
 | 
							#{OPERATOR},
 | 
				
			||||||
 | 
							#{OPERATTIME},
 | 
				
			||||||
 | 
							#{USER_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
 | 
				
			||||||
 | 
								LISTSTATISTICS_ID = #{LISTSTATISTICS_ID}
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 物理删除-->
 | 
				
			||||||
 | 
						<delete id="deletewl" parameterType="pd">
 | 
				
			||||||
 | 
							delete from
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOMSTATISTICS_ID = #{CUSTOMSTATISTICS_ID}
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
						<!-- 修改 -->
 | 
				
			||||||
 | 
						<update id="edit" parameterType="pd">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
								NOTEXAMINEDNUM = #{NOTEXAMINEDNUM},
 | 
				
			||||||
 | 
								OPERATTIME = #{OPERATTIME},
 | 
				
			||||||
 | 
							CUSTOMSTATISTICS_ID = CUSTOMSTATISTICS_ID
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOMSTATISTICS_ID = #{CUSTOMSTATISTICS_ID}
 | 
				
			||||||
 | 
						</update>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 通过ID获取数据 -->
 | 
				
			||||||
 | 
						<select id="findById" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							<include refid="Field"></include>
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								f.CUSTOMSTATISTICS_ID = #{CUSTOMSTATISTICS_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>
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 批量删除 -->
 | 
				
			||||||
 | 
						<delete id="deleteAll" parameterType="String">
 | 
				
			||||||
 | 
							update
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
							set
 | 
				
			||||||
 | 
								ISDELETE = '1'
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							CUSTOMSTATISTICS_ID in
 | 
				
			||||||
 | 
							<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
					                 #{item}
 | 
				
			||||||
 | 
							</foreach>
 | 
				
			||||||
 | 
						</delete>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 通过ID获取数据 -->
 | 
				
			||||||
 | 
						<select id="findByCondition" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							<include refid="Field"></include>
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
								f.STARTTIME = #{STARTTIME}
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.ENDTIME = #{ENDTIME}
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.TYPE = #{TYPE}
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.USER_ID = #{USER_ID}
 | 
				
			||||||
 | 
								<if test="PERIOD != null and PERIOD != ''">
 | 
				
			||||||
 | 
									and
 | 
				
			||||||
 | 
									f.PERIOD = #{PERIOD}
 | 
				
			||||||
 | 
								</if>
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 获取统计分母 -->
 | 
				
			||||||
 | 
						<select id="getCountList" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							select
 | 
				
			||||||
 | 
							<include refid="Field"></include>
 | 
				
			||||||
 | 
							from
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							where
 | 
				
			||||||
 | 
							f.CORPINFO_ID = #{CORPINFO_ID} and f.TYPE != 'listType0006'
 | 
				
			||||||
 | 
							and
 | 
				
			||||||
 | 
							(
 | 
				
			||||||
 | 
								f.STARTTIME BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
								or
 | 
				
			||||||
 | 
								f.ENDTIME  BETWEEN #{STARTTIME} and #{ENDTIME}
 | 
				
			||||||
 | 
								or
 | 
				
			||||||
 | 
								(f.STARTTIME <= #{STARTTIME} and f.ENDTIME >= #{ENDTIME})
 | 
				
			||||||
 | 
							)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!-- 获取统计分母 -->
 | 
				
			||||||
 | 
						<select id="getTimeAstrict" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
						select
 | 
				
			||||||
 | 
						max(DATE_FORMAT(ENDTIME, '%Y-%m-%d' )) MAXTIME,min(DATE_FORMAT(STARTTIME, '%Y-%m-%d' )) MINTIME
 | 
				
			||||||
 | 
						from
 | 
				
			||||||
 | 
							<include refid="tableName"></include>
 | 
				
			||||||
 | 
						where
 | 
				
			||||||
 | 
						CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<!--人员应处理清单数 -->
 | 
				
			||||||
 | 
						<select id="countStaByUser" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								sum(f.NOTEXAMINEDNUM) NUM,
 | 
				
			||||||
 | 
								f.USER_ID
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
								and f.USER_ID is not null
 | 
				
			||||||
 | 
								AND f.USER_ID != ''
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
									f.STARTTIME BETWEEN CONCAT(#{STARTTIME},' 00:00:00') and CONCAT(#{ENDTIME},' 23:59:59')
 | 
				
			||||||
 | 
								   	or
 | 
				
			||||||
 | 
									f.ENDTIME  BETWEEN CONCAT(#{STARTTIME},' 00:00:00') and CONCAT(#{ENDTIME},' 23:59:59')
 | 
				
			||||||
 | 
								   	or
 | 
				
			||||||
 | 
									(f.STARTTIME <= CONCAT(#{STARTTIME},' 00:00:00') and f.ENDTIME >= CONCAT(#{ENDTIME},' 23:59:59'))
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							GROUP BY
 | 
				
			||||||
 | 
								f.USER_ID
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
						<!--人员应处理清单数 -->
 | 
				
			||||||
 | 
						<select id="countSta" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								sum(f.NOTEXAMINEDNUM) NUM,
 | 
				
			||||||
 | 
								f.USER_ID
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
								and f.USER_ID is not null
 | 
				
			||||||
 | 
								AND f.USER_ID != ''
 | 
				
			||||||
 | 
								<if test="STARTTIME != null and STARTTIME != '' and ENDTIME != null and ENDTIME != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
									and CONCAT(#{STARTTIME}," 00:00:00") <= f.STARTTIME
 | 
				
			||||||
 | 
									and CONCAT(#{ENDTIME}," 23:59:59") >= f.ENDTIME
 | 
				
			||||||
 | 
								</if>
 | 
				
			||||||
 | 
							GROUP BY
 | 
				
			||||||
 | 
								f.USER_ID
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<select id="checkSituation" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT a.* FROM (
 | 
				
			||||||
 | 
								SELECT
 | 
				
			||||||
 | 
									u.USER_ID,
 | 
				
			||||||
 | 
									d.NAME DEPARTMENTNAME,
 | 
				
			||||||
 | 
									getFullName(d.DEPARTMENT_ID) DEPARTMENTNAME_ALL,
 | 
				
			||||||
 | 
									d.DEPARTMENT_ID,
 | 
				
			||||||
 | 
									p.NAME POSTNAME,
 | 
				
			||||||
 | 
									u.NAME USERNAME,
 | 
				
			||||||
 | 
									(
 | 
				
			||||||
 | 
										SELECT
 | 
				
			||||||
 | 
											COUNT( distinct bcr.CUSTOM_ID )
 | 
				
			||||||
 | 
										FROM
 | 
				
			||||||
 | 
											bus_hiddendangercheckstandard_checkrecord bcr
 | 
				
			||||||
 | 
											LEFT JOIN bus_hiddendangercheckstandard_checkuser bcu ON bcu.CHECKRECORD_ID = bcr.CHECKRECORD_ID
 | 
				
			||||||
 | 
										WHERE
 | 
				
			||||||
 | 
											bcu.USER_ID = u.USER_ID
 | 
				
			||||||
 | 
											AND bcr.FINISHED = '1'
 | 
				
			||||||
 | 
											AND bcr.ISSTATISTICS = '1'
 | 
				
			||||||
 | 
											AND bcr.TYPE = '1'
 | 
				
			||||||
 | 
											AND bcr.ISDELETE = '0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										<if test="STARTTIME != null and STARTTIME != '' and ENDTIME != null and ENDTIME != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
											and
 | 
				
			||||||
 | 
												DATE_FORMAT(bcr.CHECK_TIME,"%Y-%m-%d %H:%i:%S")
 | 
				
			||||||
 | 
												BETWEEN CONCAT(#{STARTTIME}," 00:00:00") and CONCAT(#{ENDTIME}," 23:59:59")
 | 
				
			||||||
 | 
										</if>
 | 
				
			||||||
 | 
									) INSPECTEDNUM,
 | 
				
			||||||
 | 
								IFNULL(fl.count,0) ISLOGIN
 | 
				
			||||||
 | 
								FROM
 | 
				
			||||||
 | 
									SYS_USER u
 | 
				
			||||||
 | 
									LEFT JOIN OA_DEPARTMENT d ON d.DEPARTMENT_ID = u.DEPARTMENT_ID
 | 
				
			||||||
 | 
									LEFT JOIN SYS_POST p ON p.POST_ID = u.POST_ID
 | 
				
			||||||
 | 
									LEFT JOIN (SELECT COUNT( 1 ) count,l.USER_ID FROM SYS_FHLOG l WHERE TO_DAYS( l.CZTIME ) = TO_DAYS(now()) GROUP BY l.USER_ID) fl ON fl.USER_ID = u.USER_ID
 | 
				
			||||||
 | 
								WHERE
 | 
				
			||||||
 | 
									u.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
									AND u.USER_ID IS NOT NULL
 | 
				
			||||||
 | 
									AND u.ISDELETE = '0'
 | 
				
			||||||
 | 
								GROUP BY
 | 
				
			||||||
 | 
									u.USER_ID
 | 
				
			||||||
 | 
									) a
 | 
				
			||||||
 | 
							WHERE 1 = 1
 | 
				
			||||||
 | 
							<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								and a.USERNAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<if test="DEPT_IDS != null and DEPT_IDS != ''">
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
								<foreach item="item" index="index"
 | 
				
			||||||
 | 
										 collection="DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
									'${item}'
 | 
				
			||||||
 | 
								</foreach>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							<choose>
 | 
				
			||||||
 | 
								<when test='ISMAIN != null and ISMAIN != "" and ISMAIN == "1"'>
 | 
				
			||||||
 | 
									<if test="DEPT_IDS != null and DEPT_IDS != ''">
 | 
				
			||||||
 | 
						                and
 | 
				
			||||||
 | 
										a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
										<foreach item="item" index="index"
 | 
				
			||||||
 | 
											collection="DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
											'${item}'
 | 
				
			||||||
 | 
										</foreach>
 | 
				
			||||||
 | 
						            </if>
 | 
				
			||||||
 | 
								</when>
 | 
				
			||||||
 | 
								<otherwise>
 | 
				
			||||||
 | 
									<choose>
 | 
				
			||||||
 | 
							            <when test='ISSUPERVISE != null and ISSUPERVISE != "" and ISSUPERVISE == "1"'>
 | 
				
			||||||
 | 
											<choose>
 | 
				
			||||||
 | 
												<when test='ISLEADER != null and ISLEADER != "" and ISLEADER == "1"'>
 | 
				
			||||||
 | 
													<choose>
 | 
				
			||||||
 | 
														<when test="DEPT_IDS != null and DEPT_IDS != ''">
 | 
				
			||||||
 | 
															and
 | 
				
			||||||
 | 
															a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
															<foreach item="item" index="index"
 | 
				
			||||||
 | 
																	 collection="DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
																'${item}'
 | 
				
			||||||
 | 
															</foreach>
 | 
				
			||||||
 | 
														</when>
 | 
				
			||||||
 | 
														<otherwise>
 | 
				
			||||||
 | 
															and
 | 
				
			||||||
 | 
															((a.DEPARTMENT_ID in (
 | 
				
			||||||
 | 
															select
 | 
				
			||||||
 | 
															SUB_DEPARTMENT_ID
 | 
				
			||||||
 | 
															from
 | 
				
			||||||
 | 
															oa_supervision_department osd
 | 
				
			||||||
 | 
															where
 | 
				
			||||||
 | 
															osd.SUP_DEPARTMENT_ID = #{DEPARTMENT_ID}
 | 
				
			||||||
 | 
															and osd.ISDELETE = '0'
 | 
				
			||||||
 | 
															and osd.CORPINFO_ID  = #{CORPINFO_ID}
 | 
				
			||||||
 | 
															)) or (
 | 
				
			||||||
 | 
															a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
															<foreach item="item" index="index"
 | 
				
			||||||
 | 
																	 collection="DEPARTMENT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
																'${item}'
 | 
				
			||||||
 | 
															</foreach>
 | 
				
			||||||
 | 
															))
 | 
				
			||||||
 | 
														</otherwise>
 | 
				
			||||||
 | 
													</choose>
 | 
				
			||||||
 | 
												</when>
 | 
				
			||||||
 | 
												<when test="DEPT_IDS != null and DEPT_IDS != ''">
 | 
				
			||||||
 | 
													or a.USER_ID = #{USER_ID}
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
													<foreach item="item" index="index"
 | 
				
			||||||
 | 
															 collection="DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
														'${item}'
 | 
				
			||||||
 | 
													</foreach>
 | 
				
			||||||
 | 
												</when>
 | 
				
			||||||
 | 
												<otherwise>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													a.DEPARTMENT_ID in (
 | 
				
			||||||
 | 
													select
 | 
				
			||||||
 | 
													SUB_DEPARTMENT_ID
 | 
				
			||||||
 | 
													from
 | 
				
			||||||
 | 
													oa_supervision_department osd
 | 
				
			||||||
 | 
													where
 | 
				
			||||||
 | 
													osd.SUP_DEPARTMENT_ID = #{DEPARTMENT_ID}
 | 
				
			||||||
 | 
													and osd.ISDELETE = '0'
 | 
				
			||||||
 | 
													and osd.CORPINFO_ID  = #{CORPINFO_ID})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
												</otherwise>
 | 
				
			||||||
 | 
											</choose>
 | 
				
			||||||
 | 
										</when>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										<when test='ISLEADER != null and ISLEADER != "" and ISLEADER == "1"'>
 | 
				
			||||||
 | 
											<choose>
 | 
				
			||||||
 | 
												<when test="DEPT_IDS != null and DEPT_IDS != ''">
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
													<foreach item="item" index="index"
 | 
				
			||||||
 | 
															 collection="DEPT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
														'${item}'
 | 
				
			||||||
 | 
													</foreach>
 | 
				
			||||||
 | 
												</when>
 | 
				
			||||||
 | 
												<otherwise>
 | 
				
			||||||
 | 
													and
 | 
				
			||||||
 | 
													a.DEPARTMENT_ID in
 | 
				
			||||||
 | 
													<foreach item="item" index="index"
 | 
				
			||||||
 | 
															 collection="DEPARTMENT_IDS" open="(" separator="," close=")">
 | 
				
			||||||
 | 
														'${item}'
 | 
				
			||||||
 | 
													</foreach>
 | 
				
			||||||
 | 
												</otherwise>
 | 
				
			||||||
 | 
											</choose>
 | 
				
			||||||
 | 
										</when>
 | 
				
			||||||
 | 
							            <when test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
 | 
				
			||||||
 | 
											and a.USER_ID = #{USER_ID}
 | 
				
			||||||
 | 
							                and a.DEPARTMENT_ID=#{DEPARTMENT_ID}
 | 
				
			||||||
 | 
							            </when>
 | 
				
			||||||
 | 
							            <otherwise>
 | 
				
			||||||
 | 
							            </otherwise>
 | 
				
			||||||
 | 
							        </choose>
 | 
				
			||||||
 | 
								</otherwise>
 | 
				
			||||||
 | 
							</choose>
 | 
				
			||||||
 | 
						<!-- 	<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">关键词检索
 | 
				
			||||||
 | 
								and a.DEPARTMENT_ID = #{DEPARTMENT_ID}
 | 
				
			||||||
 | 
							</if> -->
 | 
				
			||||||
 | 
							<if test="STATE != null and STATE != ''"><!-- 关键词检索 -->
 | 
				
			||||||
 | 
								<choose>
 | 
				
			||||||
 | 
									<when test='STATE=="1"'>
 | 
				
			||||||
 | 
										and a.ISLOGIN > 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
									<when test='STATE=="2"'>
 | 
				
			||||||
 | 
										and a.ISLOGIN = 0
 | 
				
			||||||
 | 
									</when>
 | 
				
			||||||
 | 
								</choose>
 | 
				
			||||||
 | 
							</if>
 | 
				
			||||||
 | 
							order by convert(a.DEPARTMENTNAME using gbk) asc;
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
						<!--人员应处理清单个数(节假日清单数算1) -->
 | 
				
			||||||
 | 
						<select id="countListStaByUser" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								CAST( sum(  f.NOTEXAMINEDNUM ) AS SIGNED ) NUM,
 | 
				
			||||||
 | 
								f.USER_ID
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
							<include refid="tableName"></include> f
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								f.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
								and f.USER_ID is not null
 | 
				
			||||||
 | 
								AND f.USER_ID != ''
 | 
				
			||||||
 | 
								and
 | 
				
			||||||
 | 
								(
 | 
				
			||||||
 | 
									f.STARTTIME BETWEEN CONCAT(#{STARTTIME},' 00:00:00') and CONCAT(#{ENDTIME},' 23:59:59')
 | 
				
			||||||
 | 
									or
 | 
				
			||||||
 | 
									f.ENDTIME  BETWEEN CONCAT(#{STARTTIME},' 00:00:00') and CONCAT(#{ENDTIME},' 23:59:59')
 | 
				
			||||||
 | 
									or
 | 
				
			||||||
 | 
									(f.STARTTIME <= CONCAT(#{STARTTIME},' 00:00:00') and f.ENDTIME >= CONCAT(#{ENDTIME},' 23:59:59'))
 | 
				
			||||||
 | 
								)
 | 
				
			||||||
 | 
							GROUP BY
 | 
				
			||||||
 | 
								f.USER_ID
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
						<!--人员应处理清单数(各周期) -->
 | 
				
			||||||
 | 
						<select id="countByPeriodUser" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							SELECT
 | 
				
			||||||
 | 
								l.USER_ID,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0001' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD1,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0002' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD2,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0003' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD3,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0004' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD4,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0005' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD5,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0006' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD6,
 | 
				
			||||||
 | 
								IFNULL( SUM( CASE l.PERIOD WHEN 'checkPeriod0007' THEN l.NOTEXAMINEDNUM END ), 0 ) ALLPERIOD7
 | 
				
			||||||
 | 
							FROM
 | 
				
			||||||
 | 
								BUS_LIST_STATISTICS l
 | 
				
			||||||
 | 
							WHERE
 | 
				
			||||||
 | 
								l.CORPINFO_ID = #{CORPINFO_ID}
 | 
				
			||||||
 | 
								AND l.USER_ID IS NOT NULL
 | 
				
			||||||
 | 
								AND l.TYPE != 'listType0005'
 | 
				
			||||||
 | 
								AND DATE_FORMAT(#{TIME},"%Y-%m-%d %H:%i:%S") BETWEEN l.STARTTIME AND l.ENDTIME
 | 
				
			||||||
 | 
							GROUP BY
 | 
				
			||||||
 | 
								l.USER_ID
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<select id="listAllForPlan" parameterType="pd" resultType="pd">
 | 
				
			||||||
 | 
							select f.*,d.LEVEL level_bianma
 | 
				
			||||||
 | 
							from <include refid="tableName"></include> 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>
 | 
				
			||||||
 | 
						</select>
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue