diff --git a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java index b51af5f..7b97d5f 100644 --- a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java +++ b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java @@ -292,6 +292,7 @@ public class AppCustomHiddenController extends BaseController { pd.put("RISK_POSITION", item.get("POSITIONNAME")); pd.put("LEVEL", item.get("DNAME5")); } + pd.put("SOURCE", "3"); customHiddenService.save(pd); // 清除同检查记录合格图片 if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) { @@ -453,6 +454,7 @@ public class AppCustomHiddenController extends BaseController { } } } + pd.put("SOURCE", "3"); customHiddenService.save(pd); // 发送短信 if(Tools.notEmpty(pd.getString("CONFIRM_USER")) && !pd.getString("STATE").equals("0")){ diff --git a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomHiddenController.java b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomHiddenController.java index 367a5ca..4fa1629 100644 --- a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomHiddenController.java +++ b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomHiddenController.java @@ -45,475 +45,476 @@ import java.util.*; @RequestMapping("/customHidden") public class CustomHiddenController extends BaseController { - @Autowired - private CustomHiddenService customHiddenService; - @Autowired - private CustomHiddenUserService customHiddenUserService; // 隐患相关人员信息 - @Autowired - private ImgFilesService imgFilesService; - @Autowired - private UsersService usersService; - @Autowired - private DepartmentService departmentService; - @Autowired - private HiddenSchemeService hiddenSchemeService; - @Autowired - private CustomHiddenCheckService customHiddenCheckService; - @Autowired - private CorpInfoService corpinfoService; - @Autowired - private DictionariesService dictionariesService; - @Autowired - private CustomService customService; - @Autowired - private CustomCheckRecordItemService customCheckRecordItemService; - @Autowired - private SendMessageUtil sendMessageUtil; - @Autowired - private Smb smb; - @Autowired - private SafetyEnvironmentalService safetyenvironmentalService; - /** - * 新增 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/add") - // @RequiresPermissions("hidden:add") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单排查",instructionsType = "新增") - public Object add() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("HIDDEN_ID", this.get32UUID()); // 主键 - pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 发现人 - pd.put("HIDDENFINDDEPT", Jurisdiction.getDEPARTMENT_ID()); - pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 - pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 - pd.put("ISCONFIRM", "0"); // - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id - if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) { - if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) { - pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间 - pd.put("RECTIFICATIONOR", Jurisdiction.getUSER_ID()); // 整改人 - pd.put("RECTIFICATIONDEPT", Jurisdiction.getDEPARTMENT_ID()); - pd.put("STATE", "4"); - } else { - pd.put("STATE", "1"); + @Autowired + private CustomHiddenService customHiddenService; + @Autowired + private CustomHiddenUserService customHiddenUserService; // 隐患相关人员信息 + @Autowired + private ImgFilesService imgFilesService; + @Autowired + private UsersService usersService; + @Autowired + private DepartmentService departmentService; + @Autowired + private HiddenSchemeService hiddenSchemeService; + @Autowired + private CustomHiddenCheckService customHiddenCheckService; + @Autowired + private CorpInfoService corpinfoService; + @Autowired + private DictionariesService dictionariesService; + @Autowired + private CustomService customService; + @Autowired + private CustomCheckRecordItemService customCheckRecordItemService; + @Autowired + private SendMessageUtil sendMessageUtil; + @Autowired + private Smb smb; + @Autowired + private SafetyEnvironmentalService safetyenvironmentalService; - } - } - if (pd.get("SOURCE").equals("2")) { - pd.put("STATE", "0"); - } - customHiddenService.save(pd); - // 立即整改保存检查数据 - if("4".equals(pd.get("STATE").toString())) { - PageData hc = new PageData(); - hc.put("HIDDENCHECK_ID", this.get32UUID()); - hc.put("HIDDEN_ID", pd.get("HIDDEN_ID")); - hc.put("DEPARTMENT_ID", pd.get("HIDDENFINDDEPT")); - hc.put("USER_ID", pd.get("CREATOR")); - hc.put("STATUS", "1"); - hc.put("CHECK_TIME", pd.get("CREATTIME").toString().substring(0, 10)); - customHiddenCheckService.save(hc); - } + /** + * 新增 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/add") + // @RequiresPermissions("hidden:add") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单排查", instructionsType = "新增") + public Object add() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("HIDDEN_ID", this.get32UUID()); // 主键 + pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 发现人 + pd.put("HIDDENFINDDEPT", Jurisdiction.getDEPARTMENT_ID()); + pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 + pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 + pd.put("ISCONFIRM", "0"); // + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id + if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) { + if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) { + pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间 + pd.put("RECTIFICATIONOR", Jurisdiction.getUSER_ID()); // 整改人 + pd.put("RECTIFICATIONDEPT", Jurisdiction.getDEPARTMENT_ID()); + pd.put("STATE", "4"); + } else { + pd.put("STATE", "1"); - if(pd.get("STATE") != null && Tools.notEmpty(pd.get("STATE").toString()) && !"0".equals(pd.get("STATE").toString())) { - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("RECTIFICATIONOR"));// 收信人userid - mes.put("templateCode", "SMS_215820677");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + } + } + pd.put("STATE", "0"); + pd.put("SOURCE", "3"); + customHiddenService.save(pd); + // 立即整改保存检查数据 + if ("4".equals(pd.get("STATE").toString())) { + PageData hc = new PageData(); + hc.put("HIDDENCHECK_ID", this.get32UUID()); + hc.put("HIDDEN_ID", pd.get("HIDDEN_ID")); + hc.put("DEPARTMENT_ID", pd.get("HIDDENFINDDEPT")); + hc.put("USER_ID", pd.get("CREATOR")); + hc.put("STATUS", "1"); + hc.put("CHECK_TIME", pd.get("CREATTIME").toString().substring(0, 10)); + customHiddenCheckService.save(hc); + } - // 参数集合 - List paramsList = new ArrayList(); - // 第1个参数 - PageData params1 = new PageData(); - params1.put("name", "time");// 存入短信模板中的参数名称 - params1.put("value", pd.get("RECTIFICATIONDEADLINE"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + if (pd.get("STATE") != null && Tools.notEmpty(pd.get("STATE").toString()) && !"0".equals(pd.get("STATE").toString())) { + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("RECTIFICATIONOR"));// 收信人userid + mes.put("templateCode", "SMS_215820677");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - sendMessageUtil.sendMessages(mes, paramsList); - } + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "time");// 存入短信模板中的参数名称 + params1.put("value", pd.get("RECTIFICATIONDEADLINE"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - map.put("result", errInfo); - map.put("pd", pd); - return map; - } + sendMessageUtil.sendMessages(mes, paramsList); + } - /** - * 列表 - * - * @param page - * @throws Exception - */ - @RequestMapping(value = "/listForSafetyEnvironmental") - // @RequiresPermissions("hidden:list") - @ResponseBody - public Object listForSafetyEnvironmental(Page page) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - pd = Jurisdiction.getUserDataJurisdiction(pd); - page.setPd(pd); - List varList = customHiddenService.listForSafetyEnvironmental(page); // 列出Hidden列表 - varList = customHiddenUserService.getHiddebFind(varList); - for (PageData vector : varList) { - safetyenvironmentalService.departmentUtil(vector); - } - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } + map.put("result", errInfo); + map.put("pd", pd); + return map; + } - /** - * 新增 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/listAdd") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "新增其他隐患") - public Object listAdd() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("HIDDEN_ID", this.get32UUID()); // 主键 - pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 发现人 - pd.put("HIDDENFINDDEPT", Jurisdiction.getDEPARTMENT_ID()); - pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 - pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id - if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) { - if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) { - pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间 - pd.put("RECTIFICATIONOR", Jurisdiction.getUSER_ID()); // 整改人 - pd.put("RECTIFICATIONDEPT", Jurisdiction.getDEPARTMENT_ID()); - } else { + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/listForSafetyEnvironmental") + // @RequiresPermissions("hidden:list") + @ResponseBody + public Object listForSafetyEnvironmental(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd = Jurisdiction.getUserDataJurisdiction(pd); + page.setPd(pd); + List varList = customHiddenService.listForSafetyEnvironmental(page); // 列出Hidden列表 + varList = customHiddenUserService.getHiddebFind(varList); + for (PageData vector : varList) { + safetyenvironmentalService.departmentUtil(vector); + } + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - } - } - pd.put("ISCONFIRM", "0"); - customHiddenService.save(pd); - map.put("result", errInfo); - map.put("pd", pd); - return map; - } + /** + * 新增 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/listAdd") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "新增其他隐患") + public Object listAdd() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("HIDDEN_ID", this.get32UUID()); // 主键 + pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 发现人 + pd.put("HIDDENFINDDEPT", Jurisdiction.getDEPARTMENT_ID()); + pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 + pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id + if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) { + if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) { + pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间 + pd.put("RECTIFICATIONOR", Jurisdiction.getUSER_ID()); // 整改人 + pd.put("RECTIFICATIONDEPT", Jurisdiction.getDEPARTMENT_ID()); + } else { - public String getCode() { - String code = ""; - Random random = new Random(); - for (int i = 0; i < 6; i++) { + } + } + pd.put("ISCONFIRM", "0"); + pd.put("SOURCE", "3"); + customHiddenService.save(pd); + map.put("result", errInfo); + map.put("pd", pd); + return map; + } - int r = random.nextInt(10); // 每次随机出一个数字(0-9) + public String getCode() { + String code = ""; + Random random = new Random(); + for (int i = 0; i < 6; i++) { - code = code + r; // 把每次随机出的数字拼在一起 + int r = random.nextInt(10); // 每次随机出一个数字(0-9) - } - return code; - } + code = code + r; // 把每次随机出的数字拼在一起 - /** - * 删除 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/delete") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "删除") - public Object delete() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); + } + return code; + } - customHiddenService.delete(pd); - pd = customHiddenService.findById(pd); - if (pd.get("SOURCE") != null && Tools.notEmpty(pd.get("SOURCE").toString()) - && "2".equals(pd.get("SOURCE").toString())) { + /** + * 删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/delete") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单检查情况", instructionsType = "删除") + public Object delete() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); - PageData ri = new PageData(); - ri.put("ISNORMAL", "0"); - ri.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID")); - ri.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - ri.put("CUSTOM_ITEM_ID", pd.get("CUSTOM_ITEM_ID")); - customCheckRecordItemService.editIsnormal(ri); - } - map.put("result", errInfo); // 返回结果 - return map; - } + customHiddenService.delete(pd); + pd = customHiddenService.findById(pd); + if (pd.get("SOURCE") != null && Tools.notEmpty(pd.get("SOURCE").toString()) + && "2".equals(pd.get("SOURCE").toString())) { - /** - * 修改 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/edit") - // @RequiresPermissions("hidden:edit") - @ResponseBody - public Object edit() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - customHiddenService.editInfo(pd); - pd = customHiddenService.findById(pd); - map.put("pd", pd); - map.put("result", errInfo); - return map; - } + PageData ri = new PageData(); + ri.put("ISNORMAL", "0"); + ri.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID")); + ri.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + ri.put("CUSTOM_ITEM_ID", pd.get("CUSTOM_ITEM_ID")); + customCheckRecordItemService.editIsnormal(ri); + } + map.put("result", errInfo); // 返回结果 + return map; + } - /** - * 修改 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/editRec") - @ResponseBody - public Object editRec() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - customHiddenService.edit(pd); - pd = this.customHiddenService.findById(pd); - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("RECTIFICATIONOR"));// 收信人userid - mes.put("templateCode", "SMS_215820677");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/edit") + // @RequiresPermissions("hidden:edit") + @ResponseBody + public Object edit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + customHiddenService.editInfo(pd); + pd = customHiddenService.findById(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } - // 参数集合 - List paramsList = new ArrayList(); - // 第1个参数 - PageData params1 = new PageData(); - params1.put("name", "time");// 存入短信模板中的参数名称 - params1.put("value", pd.get("RECTIFICATIONDEADLINE"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editRec") + @ResponseBody + public Object editRec() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + customHiddenService.edit(pd); + pd = this.customHiddenService.findById(pd); + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("RECTIFICATIONOR"));// 收信人userid + mes.put("templateCode", "SMS_215820677");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - sendMessageUtil.sendMessages(mes, paramsList); + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "time");// 存入短信模板中的参数名称 + params1.put("value", pd.get("RECTIFICATIONDEADLINE"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - map.put("pd", pd); - map.put("result", errInfo); - return map; - } + sendMessageUtil.sendMessages(mes, paramsList); + + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + @RequestMapping(value = "/editHIDDENLEVEL") + @ResponseBody + public Object editHIDDENLEVEL() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + customHiddenService.editHIDDENLEVEL(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } - @RequestMapping(value = "/editHIDDENLEVEL") - @ResponseBody - public Object editHIDDENLEVEL() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - customHiddenService.editHIDDENLEVEL(pd); - map.put("pd", pd); - map.put("result", errInfo); - return map; - } - @RequestMapping(value = "/editISCONFIRM") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "重大隐患",instructionsType = "确认为重大隐患") - public Object editISCONFIRM() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("ISCONFIRM", '1'); - customHiddenService.editISCONFIRM(pd); - map.put("pd", pd); - map.put("result", errInfo); - return map; - } + @RequestMapping(value = "/editISCONFIRM") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "重大隐患", instructionsType = "确认为重大隐患") + public Object editISCONFIRM() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("ISCONFIRM", '1'); + customHiddenService.editISCONFIRM(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } - /** - * 整改 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/rectify") - @ResponseBody - @Transactional - @LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患整改",instructionsType = "整改") - public Object rectify(@RequestParam(value = "rectify_files", required = false) MultipartFile[] rectify_files, - @RequestParam(value = "scheme_files", required = false) MultipartFile[] scheme_files, - @RequestParam(value = "plan_files", required = false) MultipartFile[] plan_files) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData corpinfo = new PageData(); - corpinfo.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - corpinfo = corpinfoService.findById(corpinfo); - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // - customHiddenService.rectify(pd); - pd.put("HIDDENSCHEME_ID", this.get32UUID()); // 主键 - hiddenSchemeService.deleteHd(pd); - if (Tools.notEmpty(pd.get("HAVESCHEME").toString())) { - pd.put("CREATOR", Jurisdiction.getUSER_ID()); // - pd.put("CREATTIME", DateUtil.date2Str(new Date())); // - pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // - pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id + /** + * 整改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/rectify") + @ResponseBody + @Transactional + @LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "隐患整改", instructionsType = "整改") + public Object rectify(@RequestParam(value = "rectify_files", required = false) MultipartFile[] rectify_files, + @RequestParam(value = "scheme_files", required = false) MultipartFile[] scheme_files, + @RequestParam(value = "plan_files", required = false) MultipartFile[] plan_files) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData corpinfo = new PageData(); + corpinfo.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + corpinfo = corpinfoService.findById(corpinfo); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // + customHiddenService.rectify(pd); + pd.put("HIDDENSCHEME_ID", this.get32UUID()); // 主键 + hiddenSchemeService.deleteHd(pd); + if (Tools.notEmpty(pd.get("HAVESCHEME").toString())) { + pd.put("CREATOR", Jurisdiction.getUSER_ID()); // + pd.put("CREATTIME", DateUtil.date2Str(new Date())); // + pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // + pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id // if (null != file && !file.isEmpty()) { // String ffile = DateUtil.getDays(); // String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 // String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 // pd.put("FILEPATH", Const.FILEPATHFILE + ffile + "/" + fileName); // } - hiddenSchemeService.save(pd); - } + hiddenSchemeService.save(pd); + } - if (rectify_files != null && rectify_files.length > 0) { - for (int i = 0; i < rectify_files.length; i++) { - MultipartFile file = rectify_files[i]; + if (rectify_files != null && rectify_files.length > 0) { + for (int i = 0; i < rectify_files.length; i++) { + MultipartFile file = rectify_files[i]; // 保存文件 - String ffile = DateUtil.getDays(); - String fileName = ""; //执0行上传 + String ffile = DateUtil.getDays(); + String fileName = ""; //执0行上传 - if (null != file && !file.isEmpty()) { - fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - byte[] bytes = file.getBytes(); - smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile); - } - pd.put("IMGFILES_ID", this.get32UUID()); - pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName); - pd.put("TYPE", 4); - pd.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); - imgFilesService.save(pd); - } - } + if (null != file && !file.isEmpty()) { + fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + byte[] bytes = file.getBytes(); + smb.sshSftp(file, fileName, Const.FILEPATHYHTP + ffile); + } + pd.put("IMGFILES_ID", this.get32UUID()); + pd.put("FILEPATH", Const.FILEPATHYHTP + ffile + "/" + fileName); + pd.put("TYPE", 4); + pd.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); + imgFilesService.save(pd); + } + } - if ("1".equals(pd.get("HAVESCHEME")) && scheme_files != null && scheme_files.length > 0) { - for (int i = 0; i < scheme_files.length; i++) { - MultipartFile file = scheme_files[i]; + if ("1".equals(pd.get("HAVESCHEME")) && scheme_files != null && scheme_files.length > 0) { + for (int i = 0; i < scheme_files.length; i++) { + MultipartFile file = scheme_files[i]; // 保存文件 - String ffile = DateUtil.getDays(); - String fileName = ""; //执0行上传 + String ffile = DateUtil.getDays(); + String fileName = ""; //执0行上传 - if (null != file && !file.isEmpty()) { - fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - byte[] bytes = file.getBytes(); - smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile); - } - pd.put("IMGFILES_ID", this.get32UUID()); - pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName); - pd.put("TYPE", 8); - pd.put("FOREIGN_KEY", pd.get("HIDDENSCHEME_ID")); - imgFilesService.save(pd); - } - } + if (null != file && !file.isEmpty()) { + fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + byte[] bytes = file.getBytes(); + smb.sshSftp(file, fileName, Const.FILEPATHYHTP + ffile); + } + pd.put("IMGFILES_ID", this.get32UUID()); + pd.put("FILEPATH", Const.FILEPATHYHTP + ffile + "/" + fileName); + pd.put("TYPE", 8); + pd.put("FOREIGN_KEY", pd.get("HIDDENSCHEME_ID")); + imgFilesService.save(pd); + } + } - if ("1".equals(pd.get("HAVEPLAN")) && plan_files != null && plan_files.length > 0) { - for (int i = 0; i < plan_files.length; i++) { - MultipartFile file = plan_files[i]; + if ("1".equals(pd.get("HAVEPLAN")) && plan_files != null && plan_files.length > 0) { + for (int i = 0; i < plan_files.length; i++) { + MultipartFile file = plan_files[i]; // 保存文件 - String ffile = DateUtil.getDays(); - String fileName = ""; //执0行上传 + String ffile = DateUtil.getDays(); + String fileName = ""; //执0行上传 - if (null != file && !file.isEmpty()) { - fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - byte[] bytes = file.getBytes(); - smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile); - } - pd.put("IMGFILES_ID", this.get32UUID()); - pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName); - pd.put("TYPE", 22); - pd.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); - imgFilesService.save(pd); - } - } + if (null != file && !file.isEmpty()) { + fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + byte[] bytes = file.getBytes(); + smb.sshSftp(file, fileName, Const.FILEPATHYHTP + ffile); + } + pd.put("IMGFILES_ID", this.get32UUID()); + pd.put("FILEPATH", Const.FILEPATHYHTP + ffile + "/" + fileName); + pd.put("TYPE", 22); + pd.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); + imgFilesService.save(pd); + } + } - this.customHiddenCheckService.delete(pd); - PageData checkUser = new PageData(); - checkUser.put("HIDDENCHECK_ID", this.get32UUID()); // 主键 - checkUser.put("HIDDEN_ID", pd.get("HIDDEN_ID")); - checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT")); - checkUser.put("USER_ID", pd.get("CHECKOR")); - checkUser.put("STATUS", "0"); - customHiddenCheckService.save(checkUser); - if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) { - List list = (List) JSON.parse(pd.get("OTHER").toString()); - for (JSONObject json : list) { - if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null - && json.get("USER_ID") != "") { - PageData other = new PageData(); - other.put("HIDDENCHECK_ID", this.get32UUID()); // 主键 - other.put("HIDDEN_ID", pd.get("HIDDEN_ID")); - other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); - other.put("USER_ID", json.get("USER_ID")); - other.put("STATUS", "0"); - customHiddenCheckService.save(other); + this.customHiddenCheckService.delete(pd); + PageData checkUser = new PageData(); + checkUser.put("HIDDENCHECK_ID", this.get32UUID()); // 主键 + checkUser.put("HIDDEN_ID", pd.get("HIDDEN_ID")); + checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT")); + checkUser.put("USER_ID", pd.get("CHECKOR")); + checkUser.put("STATUS", "0"); + customHiddenCheckService.save(checkUser); + if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) { + List list = (List) JSON.parse(pd.get("OTHER").toString()); + for (JSONObject json : list) { + if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null + && json.get("USER_ID") != "") { + PageData other = new PageData(); + other.put("HIDDENCHECK_ID", this.get32UUID()); // 主键 + other.put("HIDDEN_ID", pd.get("HIDDEN_ID")); + other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); + other.put("USER_ID", json.get("USER_ID")); + other.put("STATUS", "0"); + customHiddenCheckService.save(other); - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", json.get("USER_ID"));// 收信人userid - mes.put("templateCode", "SMS_215800731");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", json.get("USER_ID"));// 收信人userid + mes.put("templateCode", "SMS_215800731");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - // 参数集合 - List paramsList = new ArrayList(); + // 参数集合 + List paramsList = new ArrayList(); - sendMessageUtil.sendMessages(mes, paramsList); + sendMessageUtil.sendMessages(mes, paramsList); - } - } - } + } + } + } - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("CHECKOR"));// 收信人userid - mes.put("templateCode", "SMS_215800731");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CHECKOR"));// 收信人userid + mes.put("templateCode", "SMS_215800731");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - // 参数集合 - List paramsList = new ArrayList(); + // 参数集合 + List paramsList = new ArrayList(); - sendMessageUtil.sendMessages(mes, paramsList); + sendMessageUtil.sendMessages(mes, paramsList); - // 给发现人发送短信,提示其进行复查,暂时先用发验证码代替 + // 给发现人发送短信,提示其进行复查,暂时先用发验证码代替 - map.put("result", errInfo); - map.put("HIDDENSCHEME_ID", pd.get("HIDDENSCHEME_ID")); - return map; - } + map.put("result", errInfo); + map.put("HIDDENSCHEME_ID", pd.get("HIDDENSCHEME_ID")); + return map; + } - /** - * 复查 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/review") - @ResponseBody - public Object review() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - customHiddenService.review(pd); - // 删除整改照片及方案 - if (pd.get("ISPASS") != null && Tools.notEmpty(pd.get("ISPASS").toString())) { - if ("0".equals(pd.get("ISPASS").toString())) { - PageData pic = new PageData(); + /** + * 复查 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/review") + @ResponseBody + public Object review() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + customHiddenService.review(pd); + // 删除整改照片及方案 + if (pd.get("ISPASS") != null && Tools.notEmpty(pd.get("ISPASS").toString())) { + if ("0".equals(pd.get("ISPASS").toString())) { + PageData pic = new PageData(); // List picList = new ArrayList(); // pic.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); // pic.put("TYPE", "4"); @@ -524,10 +525,10 @@ public class CustomHiddenController extends BaseController { // file.delete(); // } // } - imgFilesService.deleteList(pic); - List picsList = new ArrayList(); - pic.put("FOREIGN_KEY", pd.get("HIDDENSCHEME_ID")); - pic.put("TYPE", "8"); + imgFilesService.deleteList(pic); + List picsList = new ArrayList(); + pic.put("FOREIGN_KEY", pd.get("HIDDENSCHEME_ID")); + pic.put("TYPE", "8"); // picsList = imgFilesService.listAll(pic); // if (picsList != null && picsList.size() > 0) { // for (PageData deletePic : picsList) { @@ -535,8 +536,8 @@ public class CustomHiddenController extends BaseController { // file.delete(); // } // } - hiddenSchemeService.deleteHd(pd); - imgFilesService.deleteList(pic); + hiddenSchemeService.deleteHd(pd); + imgFilesService.deleteList(pic); // List planPicList = new ArrayList(); // pic.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); @@ -548,843 +549,843 @@ public class CustomHiddenController extends BaseController { // file.delete(); // } // } - imgFilesService.deleteList(pic); - } + imgFilesService.deleteList(pic); + } - } - map.put("result", errInfo); - return map; - } + } + map.put("result", errInfo); + return map; + } - /** - * 验收 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/check") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患验收",instructionsType = "验收") - public Object check() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - if (pd.get("ISQUALIFIED").equals("1")) { - pd.put("CHECKOR", Jurisdiction.getUSER_ID()); - PageData pd2 = customHiddenCheckService.findByHidden(pd); - pd.put("STATUS", 1); - pd.put("HIDDENCHECK_ID", pd2.get("HIDDENCHECK_ID")); - pd.put("DEPARTMENT_ID", pd2.get("DEPARTMENT_ID")); - pd.put("USER_ID", pd2.get("USER_ID")); - customHiddenCheckService.edit(pd); + /** + * 验收 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/check") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "隐患验收", instructionsType = "验收") + public Object check() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + if (pd.get("ISQUALIFIED").equals("1")) { + pd.put("CHECKOR", Jurisdiction.getUSER_ID()); + PageData pd2 = customHiddenCheckService.findByHidden(pd); + pd.put("STATUS", 1); + pd.put("HIDDENCHECK_ID", pd2.get("HIDDENCHECK_ID")); + pd.put("DEPARTMENT_ID", pd2.get("DEPARTMENT_ID")); + pd.put("USER_ID", pd2.get("USER_ID")); + customHiddenCheckService.edit(pd); - List checkList = customHiddenCheckService.listAll(pd); - for (PageData check : checkList) { - if (check.get("STATUS").toString().equals("0")) { - map.put("result", errInfo); - map.put("check", pd); - return map; - } - } - pd.put("CHECKTIME", DateUtil.date2Str(new Date())); - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); - customHiddenService.check(pd); + List checkList = customHiddenCheckService.listAll(pd); + for (PageData check : checkList) { + if (check.get("STATUS").toString().equals("0")) { + map.put("result", errInfo); + map.put("check", pd); + return map; + } + } + pd.put("CHECKTIME", DateUtil.date2Str(new Date())); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); + customHiddenService.check(pd); - } else { - PageData hidden = new PageData(); - hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID")); - hidden.put("STATE", 1); - hidden.put("BUHEGE", 1); - hidden.put("OPERATTIME", DateUtil.date2Str(new Date())); - customHiddenService.changeState(hidden); + } else { + PageData hidden = new PageData(); + hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID")); + hidden.put("STATE", 1); + hidden.put("BUHEGE", 1); + hidden.put("OPERATTIME", DateUtil.date2Str(new Date())); + customHiddenService.changeState(hidden); - hidden.put("FOREIGN_KEY",pd.get("HIDDEN_ID")); - hidden.put("TYPE",4); - List zgimgs = imgFilesService.listAll(hidden); - hidden.put("TYPE",5); - List ysimgs = imgFilesService.listAll(hidden); - hidden.put("TYPE",8); - List fsimgs = imgFilesService.listAll(hidden); - hidden.put("TYPE",22); - List jsimgs = imgFilesService.listAll(hidden); - List imgs = new ArrayList(); - imgs.addAll(zgimgs); - imgs.addAll(ysimgs); - imgs.addAll(fsimgs); - imgs.addAll(jsimgs); - for (PageData img : imgs) { - smb.deleteFile(img.getString("FILEPATH")); - imgFilesService.delete(img); - } - } - map.put("check", pd); - map.put("result", errInfo); - return map; - } + hidden.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); + hidden.put("TYPE", 4); + List zgimgs = imgFilesService.listAll(hidden); + hidden.put("TYPE", 5); + List ysimgs = imgFilesService.listAll(hidden); + hidden.put("TYPE", 8); + List fsimgs = imgFilesService.listAll(hidden); + hidden.put("TYPE", 22); + List jsimgs = imgFilesService.listAll(hidden); + List imgs = new ArrayList(); + imgs.addAll(zgimgs); + imgs.addAll(ysimgs); + imgs.addAll(fsimgs); + imgs.addAll(jsimgs); + for (PageData img : imgs) { + smb.deleteFile(img.getString("FILEPATH")); + imgFilesService.delete(img); + } + } + map.put("check", pd); + map.put("result", errInfo); + return map; + } - /** - * 列表 - * - * @param page - * @throws Exception - */ - @RequestMapping(value = "/list") - // @RequiresPermissions("hidden:list") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患整改",instructionsType = "列表") - public Object list(Page page) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/list") + // @RequiresPermissions("hidden:list") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "隐患整改", instructionsType = "列表") + public Object list(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); // String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID(); // String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID); // if(ids!=null && Tools.notEmpty(ids)) { // ids = ids.substring(0,ids.lastIndexOf(",")); // pd.put("DEPARTMENT_IDS", ids.split(",")); // } - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id - String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 - if (Tools.notEmpty(KEYWORDS)) - pd.put("KEYWORDS", KEYWORDS.trim()); - String CREATORNAME = pd.getString("CREATORNAME"); // 关键词检索条件 - if (Tools.notEmpty(CREATORNAME)) - pd.put("CREATORNAME", CREATORNAME.trim()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id + String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) + pd.put("KEYWORDS", KEYWORDS.trim()); + String CREATORNAME = pd.getString("CREATORNAME"); // 关键词检索条件 + if (Tools.notEmpty(CREATORNAME)) + pd.put("CREATORNAME", CREATORNAME.trim()); - String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件 - if (Tools.notEmpty(ISQUALIFIED)) - pd.put("ISQUALIFIED", ISQUALIFIED.trim()); - String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件 - if (Tools.notEmpty(HIDDENLEVELE)) - pd.put("HIDDENLEVELE", HIDDENLEVELE.trim()); - String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件 - if (Tools.notEmpty(STARTTIME)) - pd.put("STARTTIME", STARTTIME.trim()); - String STATE = pd.getString("STATE"); // 关键词检索条件 - if (Tools.notEmpty(STATE)) - pd.put("STATE", STATE.trim()); - String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件 - if (Tools.notEmpty(ENDTIME)) - pd.put("ENDTIME", ENDTIME + " 23:59:59"); - String DISPOSESTATE = pd.getString("DISPOSESTATE"); // 关键词检索条件 + String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件 + if (Tools.notEmpty(ISQUALIFIED)) + pd.put("ISQUALIFIED", ISQUALIFIED.trim()); + String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件 + if (Tools.notEmpty(HIDDENLEVELE)) + pd.put("HIDDENLEVELE", HIDDENLEVELE.trim()); + String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件 + if (Tools.notEmpty(STARTTIME)) + pd.put("STARTTIME", STARTTIME.trim()); + String STATE = pd.getString("STATE"); // 关键词检索条件 + if (Tools.notEmpty(STATE)) + pd.put("STATE", STATE.trim()); + String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件 + if (Tools.notEmpty(ENDTIME)) + pd.put("ENDTIME", ENDTIME + " 23:59:59"); + String DISPOSESTATE = pd.getString("DISPOSESTATE"); // 关键词检索条件 - String BISTATE = pd.getString("BISTATE"); // BI页跳转条件 - if (Tools.notEmpty(BISTATE)) - pd.put("BISTATE", BISTATE.trim()); - String IS_DAY = pd.getString("IS_DAY"); // BI页跳转条件 - if (Tools.notEmpty(IS_DAY)) - pd.put("IS_DAY", IS_DAY.trim()); - String IS_WEEK = pd.getString("IS_WEEK"); // BI页跳转条件 - if (Tools.notEmpty(IS_WEEK)) - pd.put("IS_WEEK", IS_WEEK.trim()); - String IS_XUN = pd.getString("IS_XUN"); // BI页跳转条件 - if (Tools.notEmpty(IS_XUN)) - pd.put("IS_XUN", IS_XUN.trim()); - String IS_MONTH = pd.getString("IS_MONTH"); // BI页跳转条件 - if (Tools.notEmpty(IS_MONTH)) - pd.put("IS_MONTH", IS_MONTH.trim()); - String IS_QUARTER = pd.getString("IS_QUARTER"); // BI页跳转条件 - if (Tools.notEmpty(IS_QUARTER)) - pd.put("IS_QUARTER", IS_QUARTER.trim()); - String IS_YEAR = pd.getString("IS_YEAR"); // BI页跳转条件 - if (Tools.notEmpty(IS_YEAR)) - pd.put("IS_YEAR", IS_YEAR.trim()); - if (Tools.notEmpty(DISPOSESTATE)) { - pd.put("DISPOSESTATE", DISPOSESTATE.trim()); - if("-1".equals(DISPOSESTATE.trim())) { - pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); - pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); - String DEPTIDS = pd.getString("DEPTIDS"); - if(Tools.notEmpty(DEPTIDS)) { - String DEPT_IDS[] = DEPTIDS.split(","); - pd.put("DEPT_IDS", DEPT_IDS); - } - pd.put("USER_ID",Jurisdiction.getUSER_ID()); - PageData cpd = new PageData(); - cpd = usersService.findById(pd); - pd.put("ISLEADER", cpd.getString("ISLEADER")); - if(cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")){ - String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID"); - String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID); - ids=pd.getString("DEPARTMENT_ID")+","+ids; //把自己部门插入进去 - if(ids!=null && Tools.notEmpty(ids)&& ids.lastIndexOf(",")>-1) { - ids = ids.substring(0,ids.lastIndexOf(",")); - pd.put("DEPARTMENT_IDS", ids.split(",")); - }else { - pd.put("DEPARTMENT_IDS", DEPARTMENT_ID); - } - } - } - pd.put("SELFUSERID", Jurisdiction.getUSER_ID()); - pd.put("USERDEPT", Jurisdiction.getDEPARTMENT_ID()); - } - pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); - if (Jurisdiction.getIS_MAIN().equals("0")) { - String IS_SELF = pd.getString("IS_SELF"); // 关键词检索条件 - if (IS_SELF != null && IS_SELF.equals("1")) - pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID()); - } - ; - // 旬 - if (pd.get("IS_XUN") != null && Tools.notEmpty(pd.get("IS_XUN").toString())) { - // 1-10 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) { - pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"); - pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"); - } - // 10-20 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) { - pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"); - pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"); - } - // 20-月底 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { - pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"); - pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59"); - } - } - // 季度 - if (pd.get("IS_QUARTER") != null && Tools.notEmpty(pd.get("IS_QUARTER").toString())) { - pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00"); - pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59"); - } - page.setPd(pd); + String BISTATE = pd.getString("BISTATE"); // BI页跳转条件 + if (Tools.notEmpty(BISTATE)) + pd.put("BISTATE", BISTATE.trim()); + String IS_DAY = pd.getString("IS_DAY"); // BI页跳转条件 + if (Tools.notEmpty(IS_DAY)) + pd.put("IS_DAY", IS_DAY.trim()); + String IS_WEEK = pd.getString("IS_WEEK"); // BI页跳转条件 + if (Tools.notEmpty(IS_WEEK)) + pd.put("IS_WEEK", IS_WEEK.trim()); + String IS_XUN = pd.getString("IS_XUN"); // BI页跳转条件 + if (Tools.notEmpty(IS_XUN)) + pd.put("IS_XUN", IS_XUN.trim()); + String IS_MONTH = pd.getString("IS_MONTH"); // BI页跳转条件 + if (Tools.notEmpty(IS_MONTH)) + pd.put("IS_MONTH", IS_MONTH.trim()); + String IS_QUARTER = pd.getString("IS_QUARTER"); // BI页跳转条件 + if (Tools.notEmpty(IS_QUARTER)) + pd.put("IS_QUARTER", IS_QUARTER.trim()); + String IS_YEAR = pd.getString("IS_YEAR"); // BI页跳转条件 + if (Tools.notEmpty(IS_YEAR)) + pd.put("IS_YEAR", IS_YEAR.trim()); + if (Tools.notEmpty(DISPOSESTATE)) { + pd.put("DISPOSESTATE", DISPOSESTATE.trim()); + if ("-1".equals(DISPOSESTATE.trim())) { + pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); + pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); + String DEPTIDS = pd.getString("DEPTIDS"); + if (Tools.notEmpty(DEPTIDS)) { + String DEPT_IDS[] = DEPTIDS.split(","); + pd.put("DEPT_IDS", DEPT_IDS); + } + pd.put("USER_ID", Jurisdiction.getUSER_ID()); + PageData cpd = new PageData(); + cpd = usersService.findById(pd); + pd.put("ISLEADER", cpd.getString("ISLEADER")); + if (cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")) { + String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID"); + String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID); + ids = pd.getString("DEPARTMENT_ID") + "," + ids; //把自己部门插入进去 + if (ids != null && Tools.notEmpty(ids) && ids.lastIndexOf(",") > -1) { + ids = ids.substring(0, ids.lastIndexOf(",")); + pd.put("DEPARTMENT_IDS", ids.split(",")); + } else { + pd.put("DEPARTMENT_IDS", DEPARTMENT_ID); + } + } + } + pd.put("SELFUSERID", Jurisdiction.getUSER_ID()); + pd.put("USERDEPT", Jurisdiction.getDEPARTMENT_ID()); + } + pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); + if (Jurisdiction.getIS_MAIN().equals("0")) { + String IS_SELF = pd.getString("IS_SELF"); // 关键词检索条件 + if (IS_SELF != null && IS_SELF.equals("1")) + pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID()); + } + ; + // 旬 + if (pd.get("IS_XUN") != null && Tools.notEmpty(pd.get("IS_XUN").toString())) { + // 1-10 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) { + pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"); + pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"); + } + // 10-20 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) { + pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"); + pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"); + } + // 20-月底 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { + pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"); + pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59"); + } + } + // 季度 + if (pd.get("IS_QUARTER") != null && Tools.notEmpty(pd.get("IS_QUARTER").toString())) { + pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00"); + pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59"); + } + page.setPd(pd); - List varList = customHiddenService.list(page); // 列出Hidden列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } + List varList = customHiddenService.list(page); // 列出Hidden列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /** - * 获取清单风险点 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/getOtherHidden") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "获取其他隐患信息列表") - public Object getOtherHidden() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("USER_ID", Jurisdiction.getUSER_ID()); - String USER_ID = pd.get("USER_ID").toString(); - pd.put("CUSTOM_ID", pd.get("ID")); - pd = customService.findById(pd); - if (pd.getString("TYPE").equals("listType0005")) { - if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"), - DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) { - PageData type = new PageData(); - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_XUN", 1);// 查询方法和旬一样,直接借用 - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - type.put("BEGINTIME", pd.getString("START_DATE") + " 00:00:00"); - type.put("ENDTIME", pd.getString("END_DATE") + " 23:59:59"); - List hiddenList = customHiddenService.getOtherHidden(type); - map.put("hiddenList", hiddenList); - } - map.put("result", errInfo); - return map; - } - String cycle = pd.getString("PERIODNAME"); - PageData type = new PageData(); - if (cycle.equals("每日")) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_DAY", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - } else if (cycle.equals("每周")) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_WEEK", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - } else if (cycle.equals("每旬")) { - // 1-10 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_XUN", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"); - type.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"); - } - // 10-20 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_XUN", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"); - type.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"); - } - // 20-月底 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_XUN", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"); - type.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59"); - } + /** + * 获取清单风险点 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/getOtherHidden") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "获取其他隐患信息列表") + public Object getOtherHidden() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("USER_ID", Jurisdiction.getUSER_ID()); + String USER_ID = pd.get("USER_ID").toString(); + pd.put("CUSTOM_ID", pd.get("ID")); + pd = customService.findById(pd); + if (pd.getString("TYPE").equals("listType0005")) { + if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"), + DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) { + PageData type = new PageData(); + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_XUN", 1);// 查询方法和旬一样,直接借用 + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + type.put("BEGINTIME", pd.getString("START_DATE") + " 00:00:00"); + type.put("ENDTIME", pd.getString("END_DATE") + " 23:59:59"); + List hiddenList = customHiddenService.getOtherHidden(type); + map.put("hiddenList", hiddenList); + } + map.put("result", errInfo); + return map; + } + String cycle = pd.getString("PERIODNAME"); + PageData type = new PageData(); + if (cycle.equals("每日")) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_DAY", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + } else if (cycle.equals("每周")) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_WEEK", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + } else if (cycle.equals("每旬")) { + // 1-10 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_XUN", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"); + type.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"); + } + // 10-20 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_XUN", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"); + type.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"); + } + // 20-月底 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_XUN", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + type.put("BEGINTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"); + type.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59"); + } - } else if (cycle.equals("每月")) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_MONTH", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - } else if (cycle.equals("每季")) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_QUARTER", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - } else if (cycle.equals("半年")) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_HALFYEAR", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - } else if (cycle.equals("每年")) { - type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); - type.put("IS_YEAR", 1); - type.put("STATE", "0"); - type.put("USER_ID", USER_ID); - } + } else if (cycle.equals("每月")) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_MONTH", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + } else if (cycle.equals("每季")) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_QUARTER", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + } else if (cycle.equals("半年")) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_HALFYEAR", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + } else if (cycle.equals("每年")) { + type.put("CUSTOM_ID", pd.get("CUSTOM_ID")); + type.put("IS_YEAR", 1); + type.put("STATE", "0"); + type.put("USER_ID", USER_ID); + } - List hiddenList = customHiddenService.getOtherHidden(type); - map.put("result", errInfo); - map.put("hiddenList", hiddenList); - return map; - } + List hiddenList = customHiddenService.getOtherHidden(type); + map.put("result", errInfo); + map.put("hiddenList", hiddenList); + return map; + } - /** - * 获取检查记录风险点 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/getCheckHidden") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查记录",instructionsType = "获取检查记录风险点") - public Object getCheckHidden() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - List hiddenList = customHiddenService.getOtherHidden(pd); - map.put("result", errInfo); - map.put("hiddenList", hiddenList); - return map; - } + /** + * 获取检查记录风险点 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/getCheckHidden") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单检查记录", instructionsType = "获取检查记录风险点") + public Object getCheckHidden() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List hiddenList = customHiddenService.getOtherHidden(pd); + map.put("result", errInfo); + map.put("hiddenList", hiddenList); + return map; + } - /** - * 去修改页面获取数据 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/goEdit") - // @RequiresPermissions("hidden:edit") - @ResponseBody - @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查记录",instructionsType = "查看隐患信息") - public Object goEdit() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd = customHiddenService.findById(pd); // 根据ID读取 - PageData pd2 = new PageData(); - pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID")); - pd2.put("TYPE", 3); - List hImgs = imgFilesService.listAll(pd2);// 隐患图片 - pd2.put("TYPE", 4); - List rImgs = imgFilesService.listAll(pd2);// 整改图片 - /* - * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 - */ // 查询整改方案 - PageData hs = hiddenSchemeService.findByHdId(pd); - List sImgs = new ArrayList(); + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goEdit") + // @RequiresPermissions("hidden:edit") + @ResponseBody + @LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单检查记录", instructionsType = "查看隐患信息") + public Object goEdit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = customHiddenService.findById(pd); // 根据ID读取 + PageData pd2 = new PageData(); + pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID")); + pd2.put("TYPE", 3); + List hImgs = imgFilesService.listAll(pd2);// 隐患图片 + pd2.put("TYPE", 4); + List rImgs = imgFilesService.listAll(pd2);// 整改图片 + /* + * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 + */ // 查询整改方案 + PageData hs = hiddenSchemeService.findByHdId(pd); + List sImgs = new ArrayList(); - if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) { - PageData pd3 = new PageData(); - pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID")); - pd3.put("TYPE", 8); - sImgs = imgFilesService.listAll(pd3);// 方案图片 - } + if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) { + PageData pd3 = new PageData(); + pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID")); + pd3.put("TYPE", 8); + sImgs = imgFilesService.listAll(pd3);// 方案图片 + } - List pImgs = new ArrayList(); - if("1".equals(pd.get("HAVEPLAN"))) { - PageData pd3 = new PageData(); - pd3.put("FOREIGN_KEY", hs.getString("HIDDEN_ID")); - pd3.put("TYPE",22); - pImgs = imgFilesService.listAll(pd3);//方案图片 - } + List pImgs = new ArrayList(); + if ("1".equals(pd.get("HAVEPLAN"))) { + PageData pd3 = new PageData(); + pd3.put("FOREIGN_KEY", hs.getString("HIDDEN_ID")); + pd3.put("TYPE", 22); + pImgs = imgFilesService.listAll(pd3);//方案图片 + } - List checkList = customHiddenCheckService.listAll(pd); - if (checkList != null && checkList.size() > 0) { - PageData pd3 = new PageData(); - pd3.put("TYPE", 5); - for (PageData check : checkList) { - pd3.put("FOREIGN_KEY", check.get("HIDDENCHECK_ID")); - check.put("cImgs", imgFilesService.listAll(pd3));// 验收图片 - } - } - map.put("pd", pd); - map.put("hs", hs); - map.put("hImgs", hImgs); - map.put("rImgs", rImgs); + List checkList = customHiddenCheckService.listAll(pd); + if (checkList != null && checkList.size() > 0) { + PageData pd3 = new PageData(); + pd3.put("TYPE", 5); + for (PageData check : checkList) { + pd3.put("FOREIGN_KEY", check.get("HIDDENCHECK_ID")); + check.put("cImgs", imgFilesService.listAll(pd3));// 验收图片 + } + } + map.put("pd", pd); + map.put("hs", hs); + map.put("hImgs", hImgs); + map.put("rImgs", rImgs); // map.put("cImgs", cImgs); - map.put("sImgs", sImgs); - map.put("pImgs", pImgs); - map.put("checkList", checkList); - // 获取部门下拉树 - List zdepartmentPdList = new ArrayList(); - PageData dept = new PageData(); - dept.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - dept = this.departmentService.findByCorpId(dept); - String ZDEPARTMENT_ID = dept.getString("DEPARTMENT_ID"); + map.put("sImgs", sImgs); + map.put("pImgs", pImgs); + map.put("checkList", checkList); + // 获取部门下拉树 + List zdepartmentPdList = new ArrayList(); + PageData dept = new PageData(); + dept.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + dept = this.departmentService.findByCorpId(dept); + String ZDEPARTMENT_ID = dept.getString("DEPARTMENT_ID"); - PageData node = new PageData(); - node.put("id", dept.get("DEPARTMENT_ID")); - node.put("parentId", dept.get("PARENT_ID")); - node.put("name", dept.get("NAME")); - node.put("icon", "../../../assets/images/user.gif"); - zdepartmentPdList.add(node); - JSONArray arr = JSONArray - .fromObject(departmentService.listAllDepartmentToSelect(ZDEPARTMENT_ID, zdepartmentPdList)); - map.put("zTreeNodes", (null == arr ? "" : "{\"treeNodes\":" + arr.toString() + "}")); + PageData node = new PageData(); + node.put("id", dept.get("DEPARTMENT_ID")); + node.put("parentId", dept.get("PARENT_ID")); + node.put("name", dept.get("NAME")); + node.put("icon", "../../../assets/images/user.gif"); + zdepartmentPdList.add(node); + JSONArray arr = JSONArray + .fromObject(departmentService.listAllDepartmentToSelect(ZDEPARTMENT_ID, zdepartmentPdList)); + map.put("zTreeNodes", (null == arr ? "" : "{\"treeNodes\":" + arr.toString() + "}")); - map.put("result", errInfo); - return map; - } + map.put("result", errInfo); + return map; + } - /** - * 首页统计 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/statistic") - @ResponseBody - public Object statistic() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");// 设置日期格式 - Date now = new Date(); - String endDay = sdf.format(now); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(now); - calendar.add(Calendar.DATE, -15); - String startDay = sdf.format(calendar.getTime()); - pd.put("START_DAY", startDay); - pd.put("END_DAY", endDay); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - pd.put("HIDDENLEVEL", "hiddenLevel0001");// 一般隐患 + /** + * 首页统计 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/statistic") + @ResponseBody + public Object statistic() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");// 设置日期格式 + Date now = new Date(); + String endDay = sdf.format(now); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(now); + calendar.add(Calendar.DATE, -15); + String startDay = sdf.format(calendar.getTime()); + pd.put("START_DAY", startDay); + pd.put("END_DAY", endDay); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("HIDDENLEVEL", "hiddenLevel0001");// 一般隐患 - if (pd.get("isBI") == null && Jurisdiction.getIS_MAIN().equals("0")) { - pd.put("USER_ID", Jurisdiction.getUSER_ID()); - } - List nhds = customHiddenService.hiddenStatisticsByDay(pd); - pd.put("HIDDENLEVEL", "hiddenLevel0002");// 重大隐患 - List zhds = customHiddenService.hiddenStatisticsByDay(pd); + if (pd.get("isBI") == null && Jurisdiction.getIS_MAIN().equals("0")) { + pd.put("USER_ID", Jurisdiction.getUSER_ID()); + } + List nhds = customHiddenService.hiddenStatisticsByDay(pd); + pd.put("HIDDENLEVEL", "hiddenLevel0002");// 重大隐患 + List zhds = customHiddenService.hiddenStatisticsByDay(pd); - List hdAll = customHiddenService.hiddenStatisticsAll(pd); - map.put("nhds", nhds); - map.put("zhds", zhds); - map.put("hdAll", hdAll); - map.put("result", errInfo); - return map; - } + List hdAll = customHiddenService.hiddenStatisticsAll(pd); + map.put("nhds", nhds); + map.put("zhds", zhds); + map.put("hdAll", hdAll); + map.put("result", errInfo); + return map; + } - /** - * 首页统计 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/getBICount") - @ResponseBody - public Object getBICount() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - // 旬 - if (pd.get("IS_XUN") != null && Tools.notEmpty(pd.get("IS_XUN").toString())) { - // 1-10 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) { - pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"); - pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"); - } - // 10-20 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) { - pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"); - pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"); - } - // 20-月底 - if (DateUtil.timeCalendar(new Date(), - DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), - DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { - pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"); - pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59"); - } - } - // 季度 - if (pd.get("IS_QUARTER") != null && Tools.notEmpty(pd.get("IS_QUARTER").toString())) { - pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00"); - pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59"); - } - List varList = customHiddenService.getBICount(pd); - if (varList != null && varList.size() > 0) { - map.put("total", varList.size()); - int checked = 0; - int uncheck = 0; - for (PageData hidden : varList) { - if (hidden.get("STATE").toString().equals("4")) { - checked++; - } else { - uncheck++; - } + /** + * 首页统计 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/getBICount") + @ResponseBody + public Object getBICount() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + // 旬 + if (pd.get("IS_XUN") != null && Tools.notEmpty(pd.get("IS_XUN").toString())) { + // 1-10 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) { + pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"); + pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"); + } + // 10-20 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) { + pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"); + pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"); + } + // 20-月底 + if (DateUtil.timeCalendar(new Date(), + DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), + DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) { + pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"); + pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59"); + } + } + // 季度 + if (pd.get("IS_QUARTER") != null && Tools.notEmpty(pd.get("IS_QUARTER").toString())) { + pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00"); + pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59"); + } + List varList = customHiddenService.getBICount(pd); + if (varList != null && varList.size() > 0) { + map.put("total", varList.size()); + int checked = 0; + int uncheck = 0; + for (PageData hidden : varList) { + if (hidden.get("STATE").toString().equals("4")) { + checked++; + } else { + uncheck++; + } - } - map.put("checked", checked); - map.put("uncheck", uncheck); - } else { - map.put("total", 0); - map.put("checked", 0); - map.put("uncheck", 0); - } + } + map.put("checked", checked); + map.put("uncheck", uncheck); + } else { + map.put("total", 0); + map.put("checked", 0); + map.put("uncheck", 0); + } - map.put("result", errInfo); - return map; - } + map.put("result", errInfo); + return map; + } - /** - * 批量删除 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/deleteAll") - // @RequiresPermissions("hidden:del") - @ResponseBody - public Object deleteAll() throws Exception { - Map map = new HashMap(); - 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(","); - customHiddenService.deleteAll(ArrayDATA_IDS); - errInfo = "success"; - } else { - errInfo = "error"; - } - map.put("result", errInfo); // 返回结果 - return map; - } + /** + * 批量删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/deleteAll") + // @RequiresPermissions("hidden:del") + @ResponseBody + public Object deleteAll() throws Exception { + Map map = new HashMap(); + 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(","); + customHiddenService.deleteAll(ArrayDATA_IDS); + errInfo = "success"; + } else { + errInfo = "error"; + } + map.put("result", errInfo); // 返回结果 + return map; + } - /** - * * @param - * - * @throws Exception - */ - @RequestMapping(value = "/listAll") - @ResponseBody - public Object listAll() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String DATA_IDS = pd.getString("ids"); - if (Tools.notEmpty(DATA_IDS)) { - String ArrayDATA_IDS[] = DATA_IDS.split(","); - pd.put("HIDDEN_IDS", ArrayDATA_IDS); - List varList = customHiddenService.listAll(pd); - errInfo = "success"; - map.put("varList", varList); - } else { - errInfo = "error"; - } - map.put("result", errInfo); // 返回结果 - return map; - } + /** + * * @param + * + * @throws Exception + */ + @RequestMapping(value = "/listAll") + @ResponseBody + public Object listAll() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("ids"); + if (Tools.notEmpty(DATA_IDS)) { + String ArrayDATA_IDS[] = DATA_IDS.split(","); + pd.put("HIDDEN_IDS", ArrayDATA_IDS); + List varList = customHiddenService.listAll(pd); + errInfo = "success"; + map.put("varList", varList); + } else { + errInfo = "error"; + } + map.put("result", errInfo); // 返回结果 + return map; + } - @RequestMapping(value = "/listAllToPrint") - @ResponseBody - public Object listAllToPrint() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String DATA_IDS = pd.getString("ids"); - if (Tools.notEmpty(DATA_IDS)) { - String ArrayDATA_IDS[] = DATA_IDS.split(","); - pd.put("HIDDEN_IDS", ArrayDATA_IDS); - List varList = customHiddenService.listAllToPrint(pd); - errInfo = "success"; - map.put("varList", varList); - } else { - errInfo = "error"; - } - map.put("result", errInfo); // 返回结果 - return map; - } + @RequestMapping(value = "/listAllToPrint") + @ResponseBody + public Object listAllToPrint() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("ids"); + if (Tools.notEmpty(DATA_IDS)) { + String ArrayDATA_IDS[] = DATA_IDS.split(","); + pd.put("HIDDEN_IDS", ArrayDATA_IDS); + List varList = customHiddenService.listAllToPrint(pd); + errInfo = "success"; + map.put("varList", varList); + } else { + errInfo = "error"; + } + map.put("result", errInfo); // 返回结果 + return map; + } - /** - * 导出到excel - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/excel2") - public ModelAndView exportExcel2() throws Exception { - ModelAndView mv = new ModelAndView(); - PageData pd = new PageData(); - pd = this.getPageData(); - Map sourceMap = new HashMap<>(); - sourceMap.put("1", "隐患快报"); - sourceMap.put("2", "隐患排查"); - sourceMap.put("3", "隐患排查"); - String dicParentId = "5e7cf8620ba54ad89719d0be62133c7a"; - List dicList = dictionariesService.listSubDictByParentId(dicParentId); - Map dicMap = new HashMap<>(); - for (Dictionaries pageData : dicList) { - dicMap.put(pageData.getBIANMA(), pageData.getNAME()); - } - Map stateMap = new HashMap<>(); - stateMap.put("-1", "已过期"); - stateMap.put("0", "未提交"); - stateMap.put("1", "未整改"); - stateMap.put("2", "已整改"); - stateMap.put("3", "已复查"); - stateMap.put("4", "已验收"); - Map rectifType = new HashMap<>(); - rectifType.put("1", "立即整改"); - rectifType.put("2", "限期整改"); - PageData corpIdPd = new PageData(); - corpIdPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());// CORPINFO_ID + /** + * 导出到excel + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/excel2") + public ModelAndView exportExcel2() throws Exception { + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + Map sourceMap = new HashMap<>(); + sourceMap.put("1", "隐患快报"); + sourceMap.put("2", "隐患排查"); + sourceMap.put("3", "隐患排查"); + String dicParentId = "5e7cf8620ba54ad89719d0be62133c7a"; + List dicList = dictionariesService.listSubDictByParentId(dicParentId); + Map dicMap = new HashMap<>(); + for (Dictionaries pageData : dicList) { + dicMap.put(pageData.getBIANMA(), pageData.getNAME()); + } + Map stateMap = new HashMap<>(); + stateMap.put("-1", "已过期"); + stateMap.put("0", "未提交"); + stateMap.put("1", "未整改"); + stateMap.put("2", "已整改"); + stateMap.put("3", "已复查"); + stateMap.put("4", "已验收"); + Map rectifType = new HashMap<>(); + rectifType.put("1", "立即整改"); + rectifType.put("2", "限期整改"); + PageData corpIdPd = new PageData(); + corpIdPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());// CORPINFO_ID - Map userMap = new HashMap<>(); - List userList = usersService.listAllUser(corpIdPd); - for (PageData pageData : userList) { - userMap.put(pageData.getString("USER_ID"), pageData.getString("NAME")); - } - Map deparMap = new HashMap<>(); - List deparList = departmentService.listAll(corpIdPd); - for (PageData pageData : deparList) { - deparMap.put(pageData.getString("DEPARTMENT_ID"), pageData.getString("NAME")); - } + Map userMap = new HashMap<>(); + List userList = usersService.listAllUser(corpIdPd); + for (PageData pageData : userList) { + userMap.put(pageData.getString("USER_ID"), pageData.getString("NAME")); + } + Map deparMap = new HashMap<>(); + List deparList = departmentService.listAll(corpIdPd); + for (PageData pageData : deparList) { + deparMap.put(pageData.getString("DEPARTMENT_ID"), pageData.getString("NAME")); + } - Map dataMap = new HashMap(); - List titles = new ArrayList(); - titles.add("隐患来源"); // 1 - titles.add("风险点(单元)"); // 2 - titles.add("辨识部位"); // 3 - titles.add("存在风险"); // 4 - titles.add("风险分级"); // 6 - titles.add("检查内容"); // 7 - titles.add("隐患级别"); // 16 - titles.add("隐患状态"); // 17= - titles.add("隐患描述"); // 8 - titles.add("隐患部位"); // 9 - titles.add("隐患发现部门"); // 9 ```````` - titles.add("发现人"); // 10 - titles.add("发现时间"); // 11 - titles.add("整改类型"); // 10 - titles.add("整改期限"); // 11 - titles.add("图片"); // 11 - dataMap.put("titles", titles); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id - List varOList = customHiddenService.listAll(pd); + Map dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("隐患来源"); // 1 + titles.add("风险点(单元)"); // 2 + titles.add("辨识部位"); // 3 + titles.add("存在风险"); // 4 + titles.add("风险分级"); // 6 + titles.add("检查内容"); // 7 + titles.add("隐患级别"); // 16 + titles.add("隐患状态"); // 17= + titles.add("隐患描述"); // 8 + titles.add("隐患部位"); // 9 + titles.add("隐患发现部门"); // 9 ```````` + titles.add("发现人"); // 10 + titles.add("发现时间"); // 11 + titles.add("整改类型"); // 10 + titles.add("整改期限"); // 11 + titles.add("图片"); // 11 + dataMap.put("titles", titles); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id + List varOList = customHiddenService.listAll(pd); - List varList = new ArrayList(); - for (int i = 0; i < varOList.size(); i++) { - PageData vpd = new PageData(); - vpd.put("var1", sourceMap.get(varOList.get(i).getString("SOURCE"))); // 1 - vpd.put("var2", varOList.get(i).getString("RISK_UNIT")); // 2 - vpd.put("var3", varOList.get(i).getString("IDENTIFICATION")); // 3 - vpd.put("var4", varOList.get(i).getString("RISK_DESCR")); // 4 - vpd.put("var5", varOList.get(i).getString("LEVEL")); // 6 - vpd.put("var6", varOList.get(i).getString("CHECK_CONTENT")); // 7 - vpd.put("var7", dicMap.get(varOList.get(i).getString("HIDDENLEVEL"))); // 16 - vpd.put("var8", stateMap.get(varOList.get(i).getString("STATE"))); // 17 - vpd.put("var9", varOList.get(i).getString("HIDDENDESCR")); // 8 - vpd.put("var10", varOList.get(i).getString("HIDDENPART")); // 9 - vpd.put("var11", deparMap.get(varOList.get(i).getString("HIDDENFINDDEPT"))); // 9```````````` - vpd.put("var12", userMap.get(varOList.get(i).getString("CREATOR"))); // 10 - vpd.put("var13", varOList.get(i).getString("CREATTIME")); // 11 - vpd.put("var14", rectifType.get(varOList.get(i).getString("RECTIFICATIONTYPE"))); // 10 - vpd.put("var15", varOList.get(i).getString("RECTIFICATIONDEADLINE")); // 11 - vpd.put("var16", varOList.get(i).getString("HIDDENFINDDEPT")); // 9```````````` - varList.add(vpd); - } - dataMap.put("varList", varList); - dataMap.put("imgIndex", "16"); + List varList = new ArrayList(); + for (int i = 0; i < varOList.size(); i++) { + PageData vpd = new PageData(); + vpd.put("var1", sourceMap.get(varOList.get(i).getString("SOURCE"))); // 1 + vpd.put("var2", varOList.get(i).getString("RISK_UNIT")); // 2 + vpd.put("var3", varOList.get(i).getString("IDENTIFICATION")); // 3 + vpd.put("var4", varOList.get(i).getString("RISK_DESCR")); // 4 + vpd.put("var5", varOList.get(i).getString("LEVEL")); // 6 + vpd.put("var6", varOList.get(i).getString("CHECK_CONTENT")); // 7 + vpd.put("var7", dicMap.get(varOList.get(i).getString("HIDDENLEVEL"))); // 16 + vpd.put("var8", stateMap.get(varOList.get(i).getString("STATE"))); // 17 + vpd.put("var9", varOList.get(i).getString("HIDDENDESCR")); // 8 + vpd.put("var10", varOList.get(i).getString("HIDDENPART")); // 9 + vpd.put("var11", deparMap.get(varOList.get(i).getString("HIDDENFINDDEPT"))); // 9```````````` + vpd.put("var12", userMap.get(varOList.get(i).getString("CREATOR"))); // 10 + vpd.put("var13", varOList.get(i).getString("CREATTIME")); // 11 + vpd.put("var14", rectifType.get(varOList.get(i).getString("RECTIFICATIONTYPE"))); // 10 + vpd.put("var15", varOList.get(i).getString("RECTIFICATIONDEADLINE")); // 11 + vpd.put("var16", varOList.get(i).getString("HIDDENFINDDEPT")); // 9```````````` + varList.add(vpd); + } + dataMap.put("varList", varList); + dataMap.put("imgIndex", "16"); - ObjectExcelView erv = new ObjectExcelView(); - ObjectExcelImgView erv2 = new ObjectExcelImgView(); - mv = new ModelAndView(erv2, dataMap); - return mv; - } + ObjectExcelView erv = new ObjectExcelView(); + ObjectExcelImgView erv2 = new ObjectExcelImgView(); + mv = new ModelAndView(erv2, dataMap); + return mv; + } - /** - * 导出到excel - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/excelOld") - public ModelAndView exportExcel() throws Exception { - ModelAndView mv = new ModelAndView(); - PageData pd = new PageData(); - pd = this.getPageData(); + /** + * 导出到excel + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/excelOld") + public ModelAndView exportExcel() throws Exception { + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); - String dicParentId = "5e7cf8620ba54ad89719d0be62133c7a"; - List dicList = dictionariesService.listSubDictByParentId(dicParentId);// 字典 - Map dicMap = new HashMap<>(); - for (Dictionaries pageData : dicList) { - dicMap.put(pageData.getBIANMA(), pageData.getNAME()); - } + String dicParentId = "5e7cf8620ba54ad89719d0be62133c7a"; + List dicList = dictionariesService.listSubDictByParentId(dicParentId);// 字典 + Map dicMap = new HashMap<>(); + for (Dictionaries pageData : dicList) { + dicMap.put(pageData.getBIANMA(), pageData.getNAME()); + } - PageData corpIdPd = new PageData(); - corpIdPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());// CORPINFO_ID - Map userMap = new HashMap<>();// 查看企业下的所有用户,根据用户id匹配信息 - List userList = usersService.listAllUser(corpIdPd); - for (PageData pageData : userList) { - userMap.put(pageData.getString("USER_ID"), pageData.getString("NAME")); - } - Map deparMap = new HashMap<>(); - List deparList = departmentService.listAll(corpIdPd);// 查看企业下的所有部门,根据部门id匹配信息 - for (PageData pageData : deparList) { - deparMap.put(pageData.getString("DEPARTMENT_ID"), pageData.getString("NAME")); - } + PageData corpIdPd = new PageData(); + corpIdPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());// CORPINFO_ID + Map userMap = new HashMap<>();// 查看企业下的所有用户,根据用户id匹配信息 + List userList = usersService.listAllUser(corpIdPd); + for (PageData pageData : userList) { + userMap.put(pageData.getString("USER_ID"), pageData.getString("NAME")); + } + Map deparMap = new HashMap<>(); + List deparList = departmentService.listAll(corpIdPd);// 查看企业下的所有部门,根据部门id匹配信息 + for (PageData pageData : deparList) { + deparMap.put(pageData.getString("DEPARTMENT_ID"), pageData.getString("NAME")); + } - Map sourceMap = new HashMap<>(); - sourceMap.put("1", "隐患快报"); - sourceMap.put("2", "隐患排查"); - sourceMap.put("3", "隐患排查"); - Map stateMap = new HashMap<>(); - stateMap.put("-1", "已过期"); - stateMap.put("0", "未提交"); - stateMap.put("1", "未整改"); - stateMap.put("2", "已整改"); - stateMap.put("3", "已复查"); - stateMap.put("4", "已验收"); - Map rectifType = new HashMap<>(); - rectifType.put("1", "立即整改"); - rectifType.put("2", "限期整改"); - Map haveschemeMap = new HashMap<>(); - haveschemeMap.put("0", "无"); - haveschemeMap.put("1", "有"); - Map ysStatusMap = new HashMap<>(); - ysStatusMap.put("0", "否"); - ysStatusMap.put("1", "是"); + Map sourceMap = new HashMap<>(); + sourceMap.put("1", "隐患快报"); + sourceMap.put("2", "隐患排查"); + sourceMap.put("3", "隐患排查"); + Map stateMap = new HashMap<>(); + stateMap.put("-1", "已过期"); + stateMap.put("0", "未提交"); + stateMap.put("1", "未整改"); + stateMap.put("2", "已整改"); + stateMap.put("3", "已复查"); + stateMap.put("4", "已验收"); + Map rectifType = new HashMap<>(); + rectifType.put("1", "立即整改"); + rectifType.put("2", "限期整改"); + Map haveschemeMap = new HashMap<>(); + haveschemeMap.put("0", "无"); + haveschemeMap.put("1", "有"); + Map ysStatusMap = new HashMap<>(); + ysStatusMap.put("0", "否"); + ysStatusMap.put("1", "是"); - Map dataMap = new HashMap();// 传给导出页面的数据 + Map dataMap = new HashMap();// 传给导出页面的数据 // List imgKeyId = new ArrayList<>();// 需要查询图片的id标识信息 - HashSet imgIds = new HashSet(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id - String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 - if (Tools.notEmpty(KEYWORDS)) { - pd.put("KEYWORDS", KEYWORDS.trim()); - } - String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件 - if (Tools.notEmpty(ISQUALIFIED)) { - pd.put("ISQUALIFIED", ISQUALIFIED.trim()); - } - String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件 - if (Tools.notEmpty(HIDDENLEVELE)) { - pd.put("HIDDENLEVELE", HIDDENLEVELE.trim()); - } - String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件 - if (Tools.notEmpty(STARTTIME)) { - pd.put("STARTTIME", STARTTIME.trim()); - } - String STATE = pd.getString("STATE"); // 关键词检索条件 - if (Tools.notEmpty(STATE)) { - pd.put("STATE", STATE.trim()); - } - String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件 - if (Tools.notEmpty(ENDTIME)) { - pd.put("ENDTIME", ENDTIME + " 23:59:59"); - } - String DISPOSESTATE = pd.getString("DISPOSESTATE"); // 关键词检索条件 - if (Tools.notEmpty(DISPOSESTATE)) { - pd.put("DISPOSESTATE", DISPOSESTATE.trim()); - pd.put("SELFUSERID", Jurisdiction.getUSER_ID()); - pd.put("USERDEPT", Jurisdiction.getDEPARTMENT_ID()); - } - String IS_SELF = pd.getString("IS_SELF"); // 关键词检索条件 - if (IS_SELF != null && IS_SELF.equals("1")) { - pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID()); - } - String DEPTIDS = pd.getString("DEPTIDS"); - if(Tools.notEmpty(DEPTIDS)) { - String DEPT_IDS[] = DEPTIDS.split(","); - pd.put("DEPT_IDS", DEPT_IDS); - } - // 查看隐患信息 - List varOList = customHiddenService.listAll(pd); - for (PageData pageData : varOList) { + HashSet imgIds = new HashSet(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id + String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) { + pd.put("KEYWORDS", KEYWORDS.trim()); + } + String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件 + if (Tools.notEmpty(ISQUALIFIED)) { + pd.put("ISQUALIFIED", ISQUALIFIED.trim()); + } + String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件 + if (Tools.notEmpty(HIDDENLEVELE)) { + pd.put("HIDDENLEVELE", HIDDENLEVELE.trim()); + } + String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件 + if (Tools.notEmpty(STARTTIME)) { + pd.put("STARTTIME", STARTTIME.trim()); + } + String STATE = pd.getString("STATE"); // 关键词检索条件 + if (Tools.notEmpty(STATE)) { + pd.put("STATE", STATE.trim()); + } + String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件 + if (Tools.notEmpty(ENDTIME)) { + pd.put("ENDTIME", ENDTIME + " 23:59:59"); + } + String DISPOSESTATE = pd.getString("DISPOSESTATE"); // 关键词检索条件 + if (Tools.notEmpty(DISPOSESTATE)) { + pd.put("DISPOSESTATE", DISPOSESTATE.trim()); + pd.put("SELFUSERID", Jurisdiction.getUSER_ID()); + pd.put("USERDEPT", Jurisdiction.getDEPARTMENT_ID()); + } + String IS_SELF = pd.getString("IS_SELF"); // 关键词检索条件 + if (IS_SELF != null && IS_SELF.equals("1")) { + pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID()); + } + String DEPTIDS = pd.getString("DEPTIDS"); + if (Tools.notEmpty(DEPTIDS)) { + String DEPT_IDS[] = DEPTIDS.split(","); + pd.put("DEPT_IDS", DEPT_IDS); + } + // 查看隐患信息 + List varOList = customHiddenService.listAll(pd); + for (PageData pageData : varOList) { // imgKeyId.add(pageData.getString("HIDDEN_ID")); - imgIds.add(pageData.getString("HIDDEN_ID")); - } + imgIds.add(pageData.getString("HIDDEN_ID")); + } - // 查询整改方案 - List schemeList = hiddenSchemeService.listExport(pd); - Map schemeMap = new HashMap<>(); - for (PageData pageData : schemeList) { - schemeMap.put(pageData.getString("HIDDEN_ID"), pageData); + // 查询整改方案 + List schemeList = hiddenSchemeService.listExport(pd); + Map schemeMap = new HashMap<>(); + for (PageData pageData : schemeList) { + schemeMap.put(pageData.getString("HIDDEN_ID"), pageData); // imgKeyId.add(pageData.getString("HIDDEN_ID")); // imgKeyId.add(pageData.getString("HIDDENSCHEME_ID")); - imgIds.add(pageData.getString("HIDDENSCHEME_ID")); - } - // 验收信息 - List checkList = customHiddenCheckService.listExport(pd); - Map> checkMap = new HashMap<>(); - Integer checkMaxCount = 1; - for (PageData pageData : checkList) { - Integer checkCount = 1; - List vaList = new ArrayList<>(); - if (checkMap.containsKey(pageData.get("HIDDEN_ID"))) { - vaList = checkMap.get(pageData.get("HIDDEN_ID")); - checkCount = vaList.size(); - if (checkMaxCount < checkCount) { - checkMaxCount = checkCount; - } - } - vaList.add(pageData); - checkMap.put(pageData.get("HIDDEN_ID").toString(), vaList); + imgIds.add(pageData.getString("HIDDENSCHEME_ID")); + } + // 验收信息 + List checkList = customHiddenCheckService.listExport(pd); + Map> checkMap = new HashMap<>(); + Integer checkMaxCount = 1; + for (PageData pageData : checkList) { + Integer checkCount = 1; + List vaList = new ArrayList<>(); + if (checkMap.containsKey(pageData.get("HIDDEN_ID"))) { + vaList = checkMap.get(pageData.get("HIDDEN_ID")); + checkCount = vaList.size(); + if (checkMaxCount < checkCount) { + checkMaxCount = checkCount; + } + } + vaList.add(pageData); + checkMap.put(pageData.get("HIDDEN_ID").toString(), vaList); // imgKeyId.add(pageData.getString("HIDDENCHECK_ID")); - imgIds.add(pageData.getString("HIDDENCHECK_ID")); - } + imgIds.add(pageData.getString("HIDDENCHECK_ID")); + } // String[] imgId = new String[imgKeyId.size()]; @@ -1396,525 +1397,526 @@ public class CustomHiddenController extends BaseController { // imgId[i] = imgid; // } // - List imgIdList = new ArrayList<>(); - for(String imgid:imgIds) { - imgIdList.add(imgid); - } - PageData imgpd2 = new PageData(); - String[] imgId =imgIdList.toArray(new String[imgIdList.size()]); - imgpd2.put("ArrayDATA_IDS", imgId); - List imgList = imgFilesService.listAllByIds(imgpd2); + List imgIdList = new ArrayList<>(); + for (String imgid : imgIds) { + imgIdList.add(imgid); + } + PageData imgpd2 = new PageData(); + String[] imgId = imgIdList.toArray(new String[imgIdList.size()]); + imgpd2.put("ArrayDATA_IDS", imgId); + List imgList = imgFilesService.listAllByIds(imgpd2); - Map imgCount = new HashMap<>(); - Integer imgTypeMaxCount1 = 1, imgTypeMaxCount2 = 1, imgTypeMaxCount3 = 1, imgTypeMaxCount4 = 1, - imgTypeMaxCount5 = 1, imgTypeMaxCount6 = 1, imgTypeMaxCount7 = 1, imgTypeMaxCount8 = 1; + Map imgCount = new HashMap<>(); + Integer imgTypeMaxCount1 = 1, imgTypeMaxCount2 = 1, imgTypeMaxCount3 = 1, imgTypeMaxCount4 = 1, + imgTypeMaxCount5 = 1, imgTypeMaxCount6 = 1, imgTypeMaxCount7 = 1, imgTypeMaxCount8 = 1; - Map> imgMap = new HashMap<>(); - for (int i = 0; i < imgList.size(); i++) { - if (Tools.isEmpty(imgList.get(i).get("TYPE"))) { - continue; - } - if (Tools.isEmpty(imgList.get(i).get("FOREIGN_KEY"))) { - continue; - } - List list = new ArrayList<>(); - String key = imgList.get(i).getString("FOREIGN_KEY") + ";" + imgList.get(i).get("TYPE"); - if (imgMap.containsKey(key)) { - list = imgMap.get(key); - } - list.add(imgList.get(i).getString("FILEPATH")); - imgMap.put(key, list); - String imgType = imgList.get(i).get("TYPE").toString(); - Integer count = 1; - if (imgCount.containsKey(key)) { - count = imgCount.get(key) + 1; - } - if ("1".equals(imgType)) { - if (imgTypeMaxCount1 < count) { - imgTypeMaxCount1 = count; - } - } - if ("2".equals(imgType)) { - if (imgTypeMaxCount2 < count) { - imgTypeMaxCount2 = count; - } - } - if ("3".equals(imgType)) { - if (imgTypeMaxCount3 < count) { - imgTypeMaxCount3 = count; - } - } - if ("4".equals(imgType)) { - if (imgTypeMaxCount4 < count) { - imgTypeMaxCount4 = count; - } - } - if ("5".equals(imgType)) { - if (imgTypeMaxCount5 < count) { - imgTypeMaxCount5 = count; - } - } - if ("6".equals(imgType)) { - if (imgTypeMaxCount6 < count) { - imgTypeMaxCount6 = count; - } - } - if ("7".equals(imgType)) { - if (imgTypeMaxCount7 < count) { - imgTypeMaxCount7 = count; - } - } - if ("8".equals(imgType)) { - if (imgTypeMaxCount8 < count) { - imgTypeMaxCount8 = count; - } - } - imgCount.put(key, count); - } - List varList = new ArrayList(); - for (PageData pageData : varOList) { - int count = 0; - PageData vpd = new PageData(); - String hidId = pageData.getString("HIDDEN_ID"); - vpd.put("var" + (1 + count), sourceMap.get(pageData.getString("SOURCE"))); - vpd.put("var" + (2 + count), pageData.getString("RISK_UNIT")); - vpd.put("var" + (3 + count), pageData.getString("IDENTIFICATION")); - vpd.put("var" + (4 + count), pageData.getString("RISK_DESCR")); - vpd.put("var" + (5 + count), pageData.getString("LEVEL")); - vpd.put("var" + (6 + count), pageData.getString("CHECK_CONTENT")); - vpd.put("var" + (7 + count), dicMap.get(pageData.getString("HIDDENLEVEL"))); - vpd.put("var" + (8 + count), stateMap.get(pageData.getString("STATE"))); - vpd.put("var" + (9 + count), pageData.getString("HIDDENDESCR")); - vpd.put("var" + (10 + count), pageData.getString("HIDDENPART")); - vpd.put("var" + (11 + count), deparMap.get(pageData.getString("HIDDENFINDDEPT"))); - vpd.put("var" + (12 + count), userMap.get(pageData.getString("CREATOR"))); - vpd.put("var" + (13 + count), pageData.getString("CREATTIME")); - vpd.put("var" + (14 + count), rectifType.get(pageData.getString("RECTIFICATIONTYPE"))); - vpd.put("var" + (15 + count), pageData.getString("RECTIFICATIONDEADLINE")); - List yhImg = imgMap.get(pageData.getString("HIDDEN_ID") + ";3"); - for (int i = 0; i < imgTypeMaxCount3; i++) { - if (null != yhImg) { - if (i < yhImg.size()) { - vpd.put("img" + (16 + i), yhImg.get(i)); - } else { - vpd.put("img" + (16 + i), ""); - } - } else { - vpd.put("img" + (16 + i), ""); - } + Map> imgMap = new HashMap<>(); + for (int i = 0; i < imgList.size(); i++) { + if (Tools.isEmpty(imgList.get(i).get("TYPE"))) { + continue; + } + if (Tools.isEmpty(imgList.get(i).get("FOREIGN_KEY"))) { + continue; + } + List list = new ArrayList<>(); + String key = imgList.get(i).getString("FOREIGN_KEY") + ";" + imgList.get(i).get("TYPE"); + if (imgMap.containsKey(key)) { + list = imgMap.get(key); + } + list.add(imgList.get(i).getString("FILEPATH")); + imgMap.put(key, list); + String imgType = imgList.get(i).get("TYPE").toString(); + Integer count = 1; + if (imgCount.containsKey(key)) { + count = imgCount.get(key) + 1; + } + if ("1".equals(imgType)) { + if (imgTypeMaxCount1 < count) { + imgTypeMaxCount1 = count; + } + } + if ("2".equals(imgType)) { + if (imgTypeMaxCount2 < count) { + imgTypeMaxCount2 = count; + } + } + if ("3".equals(imgType)) { + if (imgTypeMaxCount3 < count) { + imgTypeMaxCount3 = count; + } + } + if ("4".equals(imgType)) { + if (imgTypeMaxCount4 < count) { + imgTypeMaxCount4 = count; + } + } + if ("5".equals(imgType)) { + if (imgTypeMaxCount5 < count) { + imgTypeMaxCount5 = count; + } + } + if ("6".equals(imgType)) { + if (imgTypeMaxCount6 < count) { + imgTypeMaxCount6 = count; + } + } + if ("7".equals(imgType)) { + if (imgTypeMaxCount7 < count) { + imgTypeMaxCount7 = count; + } + } + if ("8".equals(imgType)) { + if (imgTypeMaxCount8 < count) { + imgTypeMaxCount8 = count; + } + } + imgCount.put(key, count); + } + List varList = new ArrayList(); + for (PageData pageData : varOList) { + int count = 0; + PageData vpd = new PageData(); + String hidId = pageData.getString("HIDDEN_ID"); + vpd.put("var" + (1 + count), sourceMap.get(pageData.getString("SOURCE"))); + vpd.put("var" + (2 + count), pageData.getString("RISK_UNIT")); + vpd.put("var" + (3 + count), pageData.getString("IDENTIFICATION")); + vpd.put("var" + (4 + count), pageData.getString("RISK_DESCR")); + vpd.put("var" + (5 + count), pageData.getString("LEVEL")); + vpd.put("var" + (6 + count), pageData.getString("CHECK_CONTENT")); + vpd.put("var" + (7 + count), dicMap.get(pageData.getString("HIDDENLEVEL"))); + vpd.put("var" + (8 + count), stateMap.get(pageData.getString("STATE"))); + vpd.put("var" + (9 + count), pageData.getString("HIDDENDESCR")); + vpd.put("var" + (10 + count), pageData.getString("HIDDENPART")); + vpd.put("var" + (11 + count), deparMap.get(pageData.getString("HIDDENFINDDEPT"))); + vpd.put("var" + (12 + count), userMap.get(pageData.getString("CREATOR"))); + vpd.put("var" + (13 + count), pageData.getString("CREATTIME")); + vpd.put("var" + (14 + count), rectifType.get(pageData.getString("RECTIFICATIONTYPE"))); + vpd.put("var" + (15 + count), pageData.getString("RECTIFICATIONDEADLINE")); + List yhImg = imgMap.get(pageData.getString("HIDDEN_ID") + ";3"); + for (int i = 0; i < imgTypeMaxCount3; i++) { + if (null != yhImg) { + if (i < yhImg.size()) { + vpd.put("img" + (16 + i), yhImg.get(i)); + } else { + vpd.put("img" + (16 + i), ""); + } + } else { + vpd.put("img" + (16 + i), ""); + } - } - count += imgTypeMaxCount3; - vpd.put("var" + (16 + count), pageData.getString("RECTIFYDESCR"));// 整改描述 - vpd.put("var" + (17 + count), deparMap.get(pageData.getString("RECTIFICATIONDEPT")));// 整改部门 - vpd.put("var" + (18 + count), userMap.get(pageData.getString("RECTIFICATIONOR")));// 整改人 - vpd.put("var" + (19 + count), pageData.getString("RECTIFICATIONTIME"));// 整改时间 - List zgImg = imgMap.get(hidId + ";4");// 整改后图片 - for (int i = 0; i < imgTypeMaxCount4; i++) { - if (null != zgImg) { - if (i < zgImg.size()) { - vpd.put("img" + (20 + count + i), zgImg.get(i)); - } else { - vpd.put("img" + (20 + count + i), ""); - } - } else { - vpd.put("img" + (20 + count + i), ""); - } + } + count += imgTypeMaxCount3; + vpd.put("var" + (16 + count), pageData.getString("RECTIFYDESCR"));// 整改描述 + vpd.put("var" + (17 + count), deparMap.get(pageData.getString("RECTIFICATIONDEPT")));// 整改部门 + vpd.put("var" + (18 + count), userMap.get(pageData.getString("RECTIFICATIONOR")));// 整改人 + vpd.put("var" + (19 + count), pageData.getString("RECTIFICATIONTIME"));// 整改时间 + List zgImg = imgMap.get(hidId + ";4");// 整改后图片 + for (int i = 0; i < imgTypeMaxCount4; i++) { + if (null != zgImg) { + if (i < zgImg.size()) { + vpd.put("img" + (20 + count + i), zgImg.get(i)); + } else { + vpd.put("img" + (20 + count + i), ""); + } + } else { + vpd.put("img" + (20 + count + i), ""); + } - } - count += imgTypeMaxCount4; - vpd.put("var" + (20 + count), haveschemeMap.get(pageData.getString("HAVESCHEME")));// 整改方案 - if (schemeMap.containsKey(hidId)) { - PageData schemePd = schemeMap.get(hidId); - if ("1".equals(pageData.getString("HAVESCHEME"))) { - vpd.put("var" + (21 + count), schemePd.getString("SCREENINGDATE"));// 排查日期 - vpd.put("var" + (22 + count), schemePd.getString("LISTNAME"));// 隐患清单 - vpd.put("var" + (23 + count), schemePd.getString("GOVERNSTANDARDS"));// 治理标准要求 - vpd.put("var" + (24 + count), schemePd.getString("GOVERNMETHOD"));// 治理方法 - vpd.put("var" + (25 + count), schemePd.getString("EXPENDITURE"));// 经费和物资的落实 - vpd.put("var" + (26 + count), schemePd.getString("PRINCIPAL"));// 负责治理人员 - vpd.put("var" + (27 + count), schemePd.getString("PROGRAMMING"));// 工时安排 - vpd.put("var" + (28 + count), schemePd.getString("TIMELIMITFOR"));// 时限要求 - vpd.put("var" + (29 + count), pageData.getString("FILEPATH"));// 应急预案附件 - vpd.put("var" + (30 + count), schemePd.getString("JOBREQUIREMENT"));// 工作要求 - vpd.put("var" + (31 + count), schemePd.getString("OTHERBUSINESS"));// 其他事项 - List ysImg = imgMap.get(schemePd.getString("HIDDENSCHEME_ID") + ";8"); - for (int i = 0; i < imgTypeMaxCount8; i++) { - if (null != ysImg) { - if (i < ysImg.size()) { - vpd.put("img" + (32 + count + i), ysImg.get(i));// 方案图片 - } else { - vpd.put("img" + (32 + count + i), ""); - } - } else { - vpd.put("img" + (32 + count + i), ""); - } - } + } + count += imgTypeMaxCount4; + vpd.put("var" + (20 + count), haveschemeMap.get(pageData.getString("HAVESCHEME")));// 整改方案 + if (schemeMap.containsKey(hidId)) { + PageData schemePd = schemeMap.get(hidId); + if ("1".equals(pageData.getString("HAVESCHEME"))) { + vpd.put("var" + (21 + count), schemePd.getString("SCREENINGDATE"));// 排查日期 + vpd.put("var" + (22 + count), schemePd.getString("LISTNAME"));// 隐患清单 + vpd.put("var" + (23 + count), schemePd.getString("GOVERNSTANDARDS"));// 治理标准要求 + vpd.put("var" + (24 + count), schemePd.getString("GOVERNMETHOD"));// 治理方法 + vpd.put("var" + (25 + count), schemePd.getString("EXPENDITURE"));// 经费和物资的落实 + vpd.put("var" + (26 + count), schemePd.getString("PRINCIPAL"));// 负责治理人员 + vpd.put("var" + (27 + count), schemePd.getString("PROGRAMMING"));// 工时安排 + vpd.put("var" + (28 + count), schemePd.getString("TIMELIMITFOR"));// 时限要求 + vpd.put("var" + (29 + count), pageData.getString("FILEPATH"));// 应急预案附件 + vpd.put("var" + (30 + count), schemePd.getString("JOBREQUIREMENT"));// 工作要求 + vpd.put("var" + (31 + count), schemePd.getString("OTHERBUSINESS"));// 其他事项 + List ysImg = imgMap.get(schemePd.getString("HIDDENSCHEME_ID") + ";8"); + for (int i = 0; i < imgTypeMaxCount8; i++) { + if (null != ysImg) { + if (i < ysImg.size()) { + vpd.put("img" + (32 + count + i), ysImg.get(i));// 方案图片 + } else { + vpd.put("img" + (32 + count + i), ""); + } + } else { + vpd.put("img" + (32 + count + i), ""); + } + } - } - count += imgTypeMaxCount8; - if (checkMap.containsKey(hidId)) { - List check = checkMap.get(hidId); - for (PageData pageData2 : check) { - vpd.put("var" + (32 + count), ysStatusMap.get(pageData2.getString("CHECKDESCR")));// 验收描述 - vpd.put("var" + (33 + count), pageData2.getString("STATUS"));// 是否合格 - vpd.put("var" + (34 + count), pageData2.getString("CHECKDEPTNAME"));// 验收部门 - vpd.put("var" + (35 + count), pageData2.getString("CHECKORNAME"));// 验收人 - vpd.put("var" + (36 + count), pageData2.getString("CHECK_TIME"));// 验收时间 + } + count += imgTypeMaxCount8; + if (checkMap.containsKey(hidId)) { + List check = checkMap.get(hidId); + for (PageData pageData2 : check) { + vpd.put("var" + (32 + count), ysStatusMap.get(pageData2.getString("CHECKDESCR")));// 验收描述 + vpd.put("var" + (33 + count), pageData2.getString("STATUS"));// 是否合格 + vpd.put("var" + (34 + count), pageData2.getString("CHECKDEPTNAME"));// 验收部门 + vpd.put("var" + (35 + count), pageData2.getString("CHECKORNAME"));// 验收人 + vpd.put("var" + (36 + count), pageData2.getString("CHECK_TIME"));// 验收时间 // vpd.put("var"+(37+count),pageData2.getString("HIDDENCHECK_ID"));//验收图片 - List ysImg = imgMap.get(pageData2.getString("HIDDENCHECK_ID") + ";5");// 整改后图片 - for (int i = 0; i < imgTypeMaxCount5; i++) { - if (null != ysImg) { - if (i < ysImg.size()) { - vpd.put("img" + (37 + count + i), ysImg.get(i)); - } else { - vpd.put("img" + (37 + count + i), ""); - } - } else { - vpd.put("img" + (37 + count + i), ""); - } + List ysImg = imgMap.get(pageData2.getString("HIDDENCHECK_ID") + ";5");// 整改后图片 + for (int i = 0; i < imgTypeMaxCount5; i++) { + if (null != ysImg) { + if (i < ysImg.size()) { + vpd.put("img" + (37 + count + i), ysImg.get(i)); + } else { + vpd.put("img" + (37 + count + i), ""); + } + } else { + vpd.put("img" + (37 + count + i), ""); + } - } - } + } + } - } - } + } + } - varList.add(vpd); - } + varList.add(vpd); + } - List titles = new ArrayList(); + List titles = new ArrayList(); - titles.add("隐患来源"); // 1 - titles.add("风险点(单元)"); // 2 - titles.add("辨识部位"); // 3 - titles.add("存在风险"); // 4 - titles.add("风险分级"); // 6 - titles.add("检查内容"); // 7 - titles.add("隐患级别"); // 16 - titles.add("隐患状态"); // 17= - titles.add("隐患描述"); // 8 - titles.add("隐患部位"); // 9 - titles.add("隐患发现部门"); // 9 ```````` - titles.add("发现人"); // 10 - titles.add("发现时间"); // 11 - titles.add("整改类型"); // 10 - titles.add("整改期限"); // 11 - for (int i = 0; i < imgTypeMaxCount3; i++) { - titles.add("隐患图片"); // 11 - } + titles.add("隐患来源"); // 1 + titles.add("风险点(单元)"); // 2 + titles.add("辨识部位"); // 3 + titles.add("存在风险"); // 4 + titles.add("风险分级"); // 6 + titles.add("检查内容"); // 7 + titles.add("隐患级别"); // 16 + titles.add("隐患状态"); // 17= + titles.add("隐患描述"); // 8 + titles.add("隐患部位"); // 9 + titles.add("隐患发现部门"); // 9 ```````` + titles.add("发现人"); // 10 + titles.add("发现时间"); // 11 + titles.add("整改类型"); // 10 + titles.add("整改期限"); // 11 + for (int i = 0; i < imgTypeMaxCount3; i++) { + titles.add("隐患图片"); // 11 + } - titles.add("整改描述"); - titles.add("整改部门"); - titles.add("整改人"); - titles.add("整改时间"); + titles.add("整改描述"); + titles.add("整改部门"); + titles.add("整改人"); + titles.add("整改时间"); - for (int i = 0; i < imgTypeMaxCount4; i++) { - titles.add("整改后图片"); // 11 - } + for (int i = 0; i < imgTypeMaxCount4; i++) { + titles.add("整改后图片"); // 11 + } - titles.add("整改方案"); - titles.add("排查日期"); - titles.add("隐患清单"); - titles.add("治理标准要求"); - titles.add("治理方法"); - titles.add("经费和物资的落实"); - titles.add("负责治理人员"); - titles.add("工时安排"); - titles.add("时限要求"); - titles.add("应急预案附件"); - titles.add("工作要求"); - titles.add("其他事项"); - for (int i = 0; i < imgTypeMaxCount8; i++) { - titles.add("方案图片"); // 11 - } - for (int i = 0; i < checkMaxCount; i++) { - titles.add("验收描述"); - titles.add("是否合格"); - titles.add("验收部门"); - titles.add("验收人"); - titles.add("验收时间"); + titles.add("整改方案"); + titles.add("排查日期"); + titles.add("隐患清单"); + titles.add("治理标准要求"); + titles.add("治理方法"); + titles.add("经费和物资的落实"); + titles.add("负责治理人员"); + titles.add("工时安排"); + titles.add("时限要求"); + titles.add("应急预案附件"); + titles.add("工作要求"); + titles.add("其他事项"); + for (int i = 0; i < imgTypeMaxCount8; i++) { + titles.add("方案图片"); // 11 + } + for (int i = 0; i < checkMaxCount; i++) { + titles.add("验收描述"); + titles.add("是否合格"); + titles.add("验收部门"); + titles.add("验收人"); + titles.add("验收时间"); - for (int j = 0; j < imgTypeMaxCount5; j++) { - titles.add("验收图片"); - } - } - dataMap.put("titles", titles); - dataMap.put("varList", varList); - HiddenExcelCompressImg erv2 = new HiddenExcelCompressImg(); - mv = new ModelAndView(erv2, dataMap); - return mv; - } + for (int j = 0; j < imgTypeMaxCount5; j++) { + titles.add("验收图片"); + } + } + dataMap.put("titles", titles); + dataMap.put("varList", varList); + HiddenExcelCompressImg erv2 = new HiddenExcelCompressImg(); + mv = new ModelAndView(erv2, dataMap); + return mv; + } - @RequestMapping(value = "/excel") - public void exportExcelPro(HttpServletResponse response) throws Exception{ - customHiddenService.createExcel(response,this.getPageData()); - } + @RequestMapping(value = "/excel") + public void exportExcelPro(HttpServletResponse response) throws Exception { + customHiddenService.createExcel(response, this.getPageData()); + } - /** - * app首页获取数量 - * - * @param page - * @throws Exception - */ - @RequestMapping(value = "/getCountByUserId") - @ResponseBody - @LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "首页",instructionsType = "首页获取数量") - public Object getCountByUserId(Page page) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - Map hidCount = new HashMap<>(); + /** + * app首页获取数量 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/getCountByUserId") + @ResponseBody + @LogAnno(menuType = "首页", menuServer = "首页", instructionsOperate = "首页", instructionsType = "首页获取数量") + public Object getCountByUserId(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + Map hidCount = new HashMap<>(); // String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID(); // String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID); // if(ids!=null && Tools.notEmpty(ids)) { // ids = ids.substring(0,ids.lastIndexOf(",")); // pd.put("DEPARTMENT_IDS", ids.split(",")); // } - pd.put("userId", Jurisdiction.getUSER_ID()); // 发现人 - Integer dzg = 0;// 待整改 1 - Integer ycq = 0;// 已超期 5 - Integer dfc = 0;// 待复查 2 - Integer yys = 0;// 已验收 4 - // STATE -- 隐患状态 0-未提交 1- 未整改 2-已整改 3-已复查 4-已验收 5-已过期 - if (Tools.notEmpty(pd.get("userId").toString())) { - if (Jurisdiction.getIS_MAIN().equals("0")) { - pd.put("SELFUSERID", pd.get("userId")); - } else if (Jurisdiction.getIS_MAIN().equals("1")) { - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - } + pd.put("userId", Jurisdiction.getUSER_ID()); // 发现人 + Integer dzg = 0;// 待整改 1 + Integer ycq = 0;// 已超期 5 + Integer dfc = 0;// 待复查 2 + Integer yys = 0;// 已验收 4 + // STATE -- 隐患状态 0-未提交 1- 未整改 2-已整改 3-已复查 4-已验收 5-已过期 + if (Tools.notEmpty(pd.get("userId").toString())) { + if (Jurisdiction.getIS_MAIN().equals("0")) { + pd.put("SELFUSERID", pd.get("userId")); + } else if (Jurisdiction.getIS_MAIN().equals("1")) { + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + } - List rectifiHid = customHiddenService.getCountByRectifiCationorId(pd); // 根据人员id获取整改隐患信息 state 1 5 - for (int i = 0; i < rectifiHid.size(); i++) { - PageData rec = rectifiHid.get(i); - if (null == rec.get("STATE")) { - continue; - } - if (rec.get("STATE").equals("1") || rec.get("STATE").equals("-1")) { - dzg++; - } - } - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); - pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); - pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); - List creatorHid = customHiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息 - for (int i = 0; i < creatorHid.size(); i++) { - PageData cre = creatorHid.get(i); - if (null == cre.get("STATE")) { - continue; - } - if (cre.get("STATE").equals("2")) { - dfc++; - } - if (cre.get("STATE").equals("4")) { - yys++; - } - if (cre.get("STATE").equals("-1")) { - ycq++; - } - } - } - hidCount.put("dzg", dzg); - hidCount.put("ycq", ycq); - hidCount.put("dfc", dfc); - hidCount.put("yys", yys); + List rectifiHid = customHiddenService.getCountByRectifiCationorId(pd); // 根据人员id获取整改隐患信息 state 1 5 + for (int i = 0; i < rectifiHid.size(); i++) { + PageData rec = rectifiHid.get(i); + if (null == rec.get("STATE")) { + continue; + } + if (rec.get("STATE").equals("1") || rec.get("STATE").equals("-1")) { + dzg++; + } + } + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); + pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); + pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); + List creatorHid = customHiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息 + for (int i = 0; i < creatorHid.size(); i++) { + PageData cre = creatorHid.get(i); + if (null == cre.get("STATE")) { + continue; + } + if (cre.get("STATE").equals("2")) { + dfc++; + } + if (cre.get("STATE").equals("4")) { + yys++; + } + if (cre.get("STATE").equals("-1")) { + ycq++; + } + } + } + hidCount.put("dzg", dzg); + hidCount.put("ycq", ycq); + hidCount.put("dfc", dfc); + hidCount.put("yys", yys); - map.put("hidCount", hidCount); - map.put("page", page); - map.put("result", errInfo); - return map; - } + map.put("hidCount", hidCount); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /** - * app首页获取数量 - * - * @param page - * @throws Exception - */ - @RequestMapping(value = "/getCountByCorpId") - @ResponseBody - public Object getCountByCorpId(Page page) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - Map hidCount = new HashMap<>(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - Integer dzg = 0;// 待整改 1 - Integer ycq = 0;// 已超期 5 - Integer dfc = 0;// 待复查 2 - Integer yys = 0;// 已验收 4 - // STATE -- 隐患状态 0-未提交 1- 未整改 2-已整改 3-已复查 4-已验收 5-已过期 - List rectifiHid = customHiddenService.getCountByRectifiCationorId(pd); // 根据人员id获取整改隐患信息 state 1 5 - for (int i = 0; i < rectifiHid.size(); i++) { - PageData rec = rectifiHid.get(i); - if (null == rec.get("STATE")) { - continue; - } - if (rec.get("STATE").equals("1")) { - dzg++; - } - if (rec.get("STATE").equals("5")) { - ycq++; - } - } - List creatorHid = customHiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息 - for (int i = 0; i < creatorHid.size(); i++) { - PageData cre = rectifiHid.get(i); - if (null == cre.get("STATE")) { - continue; - } - if (cre.get("STATE").equals("2")) { - dfc++; - } - if (cre.get("STATE").equals("4")) { - yys++; - } - } - hidCount.put("dzg", dzg); - hidCount.put("ycq", ycq); - hidCount.put("dfc", dfc); - hidCount.put("yys", yys); + /** + * app首页获取数量 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/getCountByCorpId") + @ResponseBody + public Object getCountByCorpId(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + Map hidCount = new HashMap<>(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + Integer dzg = 0;// 待整改 1 + Integer ycq = 0;// 已超期 5 + Integer dfc = 0;// 待复查 2 + Integer yys = 0;// 已验收 4 + // STATE -- 隐患状态 0-未提交 1- 未整改 2-已整改 3-已复查 4-已验收 5-已过期 + List rectifiHid = customHiddenService.getCountByRectifiCationorId(pd); // 根据人员id获取整改隐患信息 state 1 5 + for (int i = 0; i < rectifiHid.size(); i++) { + PageData rec = rectifiHid.get(i); + if (null == rec.get("STATE")) { + continue; + } + if (rec.get("STATE").equals("1")) { + dzg++; + } + if (rec.get("STATE").equals("5")) { + ycq++; + } + } + List creatorHid = customHiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息 + for (int i = 0; i < creatorHid.size(); i++) { + PageData cre = rectifiHid.get(i); + if (null == cre.get("STATE")) { + continue; + } + if (cre.get("STATE").equals("2")) { + dfc++; + } + if (cre.get("STATE").equals("4")) { + yys++; + } + } + hidCount.put("dzg", dzg); + hidCount.put("ycq", ycq); + hidCount.put("dfc", dfc); + hidCount.put("yys", yys); - map.put("hidCount", hidCount); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /** - * app首页获取数量 - * - * @param page - * @throws Exception - */ - @RequestMapping(value = "/getCountByHiddenType") - @ResponseBody - @LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "首页",instructionsType = "首页获取数量") - public Object getCountByHiddenType(Page page) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); - pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); - pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); - String DEPTIDS = pd.getString("DEPTIDS"); - if(Tools.notEmpty(DEPTIDS)) { - String DEPT_IDS[] = DEPTIDS.split(","); - pd.put("DEPT_IDS", DEPT_IDS); - } - List hiddList =customHiddenService.getCountByHiddenType(pd); + map.put("hidCount", hidCount); + map.put("page", page); + map.put("result", errInfo); + return map; + } - Map hiddMap = new HashedMap(); - for (PageData pageData:hiddList){ - if(Tools.isEmpty(pageData.get("HIDDENTYPE"))){ - hiddMap.put("hiddenType0006",pageData.get("count").toString()); - }else{ - hiddMap.put(pageData.get("HIDDENTYPE").toString(),pageData.get("count").toString()); - } - } - List dicList = dictionariesService.listSubDictByParentId("3babc15144444bdc8d763d0af2bdfff6"); - List valList = new ArrayList(); - Map valMap = new HashedMap(); - for (Dictionaries dictionaries:dicList){ - valMap = new HashedMap(); - if(hiddMap.containsKey(dictionaries.getBIANMA())){ - valMap.put("value",hiddMap.get(dictionaries.getBIANMA())); - }else{ - valMap.put("value","0"); - } - valMap.put("name",dictionaries.getNAME()); - valList.add(valMap); - } - map.put("hiddenTypeCount", valList); - map.put("result", errInfo); - return map; - } + /** + * app首页获取数量 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/getCountByHiddenType") + @ResponseBody + @LogAnno(menuType = "首页", menuServer = "首页", instructionsOperate = "首页", instructionsType = "首页获取数量") + public Object getCountByHiddenType(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); + pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); + pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); + String DEPTIDS = pd.getString("DEPTIDS"); + if (Tools.notEmpty(DEPTIDS)) { + String DEPT_IDS[] = DEPTIDS.split(","); + pd.put("DEPT_IDS", DEPT_IDS); + } + List hiddList = customHiddenService.getCountByHiddenType(pd); + + Map hiddMap = new HashedMap(); + for (PageData pageData : hiddList) { + if (Tools.isEmpty(pageData.get("HIDDENTYPE"))) { + hiddMap.put("hiddenType0006", pageData.get("count").toString()); + } else { + hiddMap.put(pageData.get("HIDDENTYPE").toString(), pageData.get("count").toString()); + } + } + List dicList = dictionariesService.listSubDictByParentId("3babc15144444bdc8d763d0af2bdfff6"); + List valList = new ArrayList(); + Map valMap = new HashedMap(); + for (Dictionaries dictionaries : dicList) { + valMap = new HashedMap(); + if (hiddMap.containsKey(dictionaries.getBIANMA())) { + valMap.put("value", hiddMap.get(dictionaries.getBIANMA())); + } else { + valMap.put("value", "0"); + } + valMap.put("name", dictionaries.getNAME()); + valList.add(valMap); + } + map.put("hiddenTypeCount", valList); + map.put("result", errInfo); + return map; + } - /** - * 首页统计 - * - * @param - * @throws Exception - */ - @RequestMapping(value = "/hiddenSta") - @ResponseBody - public Object hiddenSta() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - List dates = DateUtil.getHalfYearMonth(true); - Map dateMap = new HashMap<>(); - pd.put("TYPE", 1); - pd.put("TIME", dates.get(0)); - List allHidden = customHiddenService.getHiddenNum(pd); + /** + * 首页统计 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/hiddenSta") + @ResponseBody + public Object hiddenSta() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + List dates = DateUtil.getHalfYearMonth(true); + Map dateMap = new HashMap<>(); + pd.put("TYPE", 1); + pd.put("TIME", dates.get(0)); + List allHidden = customHiddenService.getHiddenNum(pd); - Map allMap = new HashMap<>(); - for(int i = 0; i < allHidden.size(); i++) { - allMap.put(allHidden.get(i).getString("TIME"), allHidden.get(i)); - } - pd.put("TYPE", 2); - List wzgHidden = customHiddenService.getHiddenNum(pd); - Map wzgMap = new HashMap<>(); - for(int i = 0; i < wzgHidden.size(); i++) { - wzgMap.put(wzgHidden.get(i).getString("TIME"), wzgHidden.get(i)); - } - pd.put("TYPE", 3); - List yzgHidden = customHiddenService.getHiddenNum(pd); - Map yzgMap = new HashMap<>(); - for(int i = 0; i < yzgHidden.size(); i++) { - yzgMap.put(yzgHidden.get(i).getString("TIME"), yzgHidden.get(i)); - } - pd.put("TYPE", 4); - List yysHidden = customHiddenService.getHiddenNum(pd); - Map yysMap = new HashMap<>(); - for(int i = 0; i < yysHidden.size(); i++) { - yysMap.put(yysHidden.get(i).getString("TIME"), yysHidden.get(i)); - } - List names = new ArrayList(); - List all = new ArrayList(); - List wzg = new ArrayList(); - List yzg = new ArrayList(); - List yys = new ArrayList(); - for(int i = 0; i < dates.size(); i++) { - names.add(dates.get(i).substring(dates.get(i).length()-2, dates.get(i).length())+"月"); - if(allMap.containsKey(dates.get(i))){ - PageData hidden = allMap.get(dates.get(i)); - all.add(hidden.get("NUMBER").toString()); - } else { - all.add("0"); - } - if(wzgMap.containsKey(dates.get(i))){ - PageData hidden = wzgMap.get(dates.get(i)); - wzg.add(hidden.get("NUMBER").toString()); - } else { - wzg.add("0"); - } - if(yzgMap.containsKey(dates.get(i))){ - PageData hidden = yzgMap.get(dates.get(i)); - yzg.add(hidden.get("NUMBER").toString()); - } else { - yzg.add("0"); - } - if(yysMap.containsKey(dates.get(i))){ - PageData hidden = yysMap.get(dates.get(i)); - yys.add(hidden.get("NUMBER").toString()); - } else { - yys.add("0"); - } - } - map.put("result", errInfo); - map.put("names", names); - map.put("all", all); - map.put("wzg", wzg); - map.put("yzg", yzg); - map.put("yys", yys); - return map; - } + Map allMap = new HashMap<>(); + for (int i = 0; i < allHidden.size(); i++) { + allMap.put(allHidden.get(i).getString("TIME"), allHidden.get(i)); + } + pd.put("TYPE", 2); + List wzgHidden = customHiddenService.getHiddenNum(pd); + Map wzgMap = new HashMap<>(); + for (int i = 0; i < wzgHidden.size(); i++) { + wzgMap.put(wzgHidden.get(i).getString("TIME"), wzgHidden.get(i)); + } + pd.put("TYPE", 3); + List yzgHidden = customHiddenService.getHiddenNum(pd); + Map yzgMap = new HashMap<>(); + for (int i = 0; i < yzgHidden.size(); i++) { + yzgMap.put(yzgHidden.get(i).getString("TIME"), yzgHidden.get(i)); + } + pd.put("TYPE", 4); + List yysHidden = customHiddenService.getHiddenNum(pd); + Map yysMap = new HashMap<>(); + for (int i = 0; i < yysHidden.size(); i++) { + yysMap.put(yysHidden.get(i).getString("TIME"), yysHidden.get(i)); + } + List names = new ArrayList(); + List all = new ArrayList(); + List wzg = new ArrayList(); + List yzg = new ArrayList(); + List yys = new ArrayList(); + for (int i = 0; i < dates.size(); i++) { + names.add(dates.get(i).substring(dates.get(i).length() - 2, dates.get(i).length()) + "月"); + if (allMap.containsKey(dates.get(i))) { + PageData hidden = allMap.get(dates.get(i)); + all.add(hidden.get("NUMBER").toString()); + } else { + all.add("0"); + } + if (wzgMap.containsKey(dates.get(i))) { + PageData hidden = wzgMap.get(dates.get(i)); + wzg.add(hidden.get("NUMBER").toString()); + } else { + wzg.add("0"); + } + if (yzgMap.containsKey(dates.get(i))) { + PageData hidden = yzgMap.get(dates.get(i)); + yzg.add(hidden.get("NUMBER").toString()); + } else { + yzg.add("0"); + } + if (yysMap.containsKey(dates.get(i))) { + PageData hidden = yysMap.get(dates.get(i)); + yys.add(hidden.get("NUMBER").toString()); + } else { + yys.add("0"); + } + } + map.put("result", errInfo); + map.put("names", names); + map.put("all", all); + map.put("wzg", wzg); + map.put("yzg", yzg); + map.put("yys", yys); + return map; + } }