diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 04443d6..644aa97 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -152,7 +152,8 @@ public class AppHiddenController extends BaseController { if (null == che.get("STATE")) { continue; } - if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2 +// if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2 + if (che.get("STATE").equals("3")) { dys++; } } @@ -257,6 +258,68 @@ public class AppHiddenController extends BaseController { return map; } + + /** + * 新增 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/riskListCheckAdd") // /add + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "风险清单检查",instructionsOperate = "隐患",instructionsType = "新增") + public Object riskListCheckAdd() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("HIDDEN_ID", this.get32UUID()); // 主键 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 + pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除 + pd.put("ISCONFIRM", "0"); // + 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", pd.get("CREATOR")); // 整改人 + pd.put("RECTIFICATIONDEPT", pd.get("HIDDENFINDDEPT")); +// pd.put("STATE", "4"); + } else { +// pd.put("STATE", "1"); + } + } + if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) { + PageData item = new PageData(); + item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID")); + item = this.listcheckitemService.findById(item); + pd.put("RISK_UNIT", item.get("RISKUNITNAME")); + pd.put("IDENTIFICATION", item.get("PARTSNAME")); + pd.put("RISK_DESCR", item.get("RISK_DESCR")); + pd.put("RISK_POSITION", item.get("POSITIONNAME")); + pd.put("LEVEL", item.get("DNAME5")); + } + hiddenService.save(pd); + // 清除同检查记录合格图片 + if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) { + imgFilesService.delete(pd); + PageData img = new PageData(); + img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID")); + img.put("TYPE", "14"); +// List imgs = imgFilesService.listAll(img); //根据ID读取 +// if(imgs != null && imgs.size() > 0) { +// for(PageData i: imgs) { +// File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH")); +// file.delete(); +// imgFilesService.delete(i); +// } +// } + + } + map.put("result", errInfo); + map.put("pd", pd); + return map; + } + /** * 新增 * @@ -636,6 +699,26 @@ public class AppHiddenController extends BaseController { return map; } + + /** + * 删除 + * + * @param out + * @throws Exception + */ + @RequestMapping(value = "/riskListCheckHiddenDelete") // /delete + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "隐患",instructionsOperate = "隐患",instructionsType = "删除") + public Object riskListCheckHiddenDelete() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + hiddenService.delete(pd); + map.put("result", errInfo); // 返回结果 + return map; + } + /** * 删除 * @@ -770,6 +853,26 @@ public class AppHiddenController extends BaseController { return map; } + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/riskListCheckEdit") // /edit + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "风险清单检查",instructionsOperate = "隐患",instructionsType = "修改") + public Object riskListCheckEdit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + hiddenService.editInfo(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + /** * 修改 * @@ -1040,6 +1143,70 @@ public class AppHiddenController extends BaseController { return map; } + /** + * 验收 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/riskListCheckInspection") // /check + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "隐患",instructionsOperate = "隐患",instructionsType = "验收") + public Object riskListCheckInspection() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + if (pd.get("ISQUALIFIED").equals("1")) { + PageData pd2 = this.hiddenCheckService.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")); + hiddenCheckService.edit(pd); + + List checkList = hiddenCheckService.listAll(pd); + for (PageData check : checkList) { + if (check.get("STATUS").toString().equals("0")) { + map.put("result", errInfo); + map.put("check", pd); + return map; + } + } + hiddenService.check(pd); + + } else { + PageData hidden = new PageData(); + hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID")); + hidden.put("STATE", 1); + hidden.put("BUHEGE", 1); + + hiddenService.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; + } + /** * 验收 * @@ -1190,6 +1357,69 @@ public class AppHiddenController extends BaseController { return map; } + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goRiskListCheckEdit") // /goEdit + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "风险清单检查隐患",instructionsOperate = "隐患",instructionsType = "去修改页面获取数据") + public Object goRiskListCheckEdit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = hiddenService.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);// 方案图片 + } + + 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 = hiddenCheckService.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("sImgs", sImgs); + map.put("pImgs", pImgs); + map.put("checkList", checkList); + + map.put("result", errInfo); + return map; + } + /** * 去修改页面获取数据 * diff --git a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java index d66e22a..b51af5f 100644 --- a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java +++ b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/AppCustomHiddenController.java @@ -78,7 +78,7 @@ public class AppCustomHiddenController extends BaseController { @Autowired private CorpInfoService corpinfoService; @Autowired - private ListManagerService listmanagerService; + private CustomService customService; //@Autowired //private CheckRecordService checkrecordService; @@ -229,7 +229,7 @@ public class AppCustomHiddenController extends BaseController { // } int wjcNum = 0; int yjcNum = 0; - List varList = listmanagerService.listAll(pd);// 列出ListManager列表 + List varList = customService.listAll(pd);// 列出ListManager列表 for (PageData list : varList) { String cycle = list.getString("PERIODNAME"); if (list.getString("TYPE").equals("listType0005")) { @@ -266,102 +266,47 @@ public class AppCustomHiddenController extends BaseController { Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); - PageData mes = new PageData(); pd = this.getPageData(); pd.put("HIDDEN_ID", this.get32UUID()); // 主键 pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间 - pd.put("CREATOR", pd.get("CREATOR")); // 发现时间 + 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", pd.get("CREATOR")); // 整改人 pd.put("RECTIFICATIONDEPT", pd.get("HIDDENFINDDEPT")); +// pd.put("STATE", "4"); + } else { +// pd.put("STATE", "1"); } } -// if (pd.get("CUSTOM_ITEM_ID") != null && Tools.notEmpty(pd.get("CUSTOM_ITEM_ID").toString())) { -// PageData item = new PageData(); -// item.put("CUSTOM_ITEM_ID", pd.get("CUSTOM_ITEM_ID")); -// item = customItemService.findById(item); -// pd.put("RISK_UNIT", item.get("RISKUNITNAME")); -// pd.put("IDENTIFICATION", item.get("PARTSNAME")); -// pd.put("RISK_DESCR", item.get("RISK_DESCR")); -// pd.put("RISK_POSITION", item.get("POSITIONNAME")); -// pd.put("LEVEL", item.get("DNAME5")); -// } - List list = (List) JSON.parse(pd.get("other").toString()); // 隐患发现人 - for (JSONObject json : list){ - PageData hiddenconUserAdd = new PageData(); - hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID()); - hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID")); - hiddenconUserAdd.put("USER_ID",json.get("USER_ID")); - hiddenconUserAdd.put("TYPE","1"); - hiddenconUserAdd.put("IS_MAIN","0"); - customHiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人 + if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) { + PageData item = new PageData(); + item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID")); + item = this.customItemService.findById(item); + pd.put("RISK_UNIT", item.get("RISKUNITNAME")); + pd.put("IDENTIFICATION", item.get("PARTSNAME")); + pd.put("RISK_DESCR", item.get("RISK_DESCR")); + pd.put("RISK_POSITION", item.get("POSITIONNAME")); + pd.put("LEVEL", item.get("DNAME5")); } - if(pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")){//判断是否是重大隐患 - PageData userpd = new PageData(); - userpd.put("USER_ID",pd.getString("CREATOR")); - userpd.put("DEPARTMENT_ID",usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID - if(departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")){//判断部门级别是不是班组 - userpd.put("DEPARTMENT_ID",departmentService.findById(userpd).getString("DEPARTMENT_ID")); - if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))){//判断部门是否有负责人 - map.put("msg", "所在部门未维护部门负责人"); - return map; - }else { - userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN")); - pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID - mes.put("RECEIVER_ID",usersService.findById(userpd).getString("USER_ID")); // 如果是较大或重大隐患在这里给站内信接收人赋值 - } - }else{ - if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人 - map.put("msg", "所在部门未维护部门负责人"); - return map; - }{ - userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN")); - userpd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); - if (Tools.isEmpty(usersService.findById(userpd))) { - map.put("msg", "所在部门未维护部门负责人"); - return map; - }else{ - pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID - } - } - } - - } - PageData before = new PageData();// 添加隐患初始信息 - before.put("TYPE","0"); - before.put("STATE","2"); - before.put("HIDDEN_ID",pd.get("HIDDEN_ID")); - before.put("spare1",pd.getString("HIDDENLEVEL")); - before.put("spare2",pd.getString("RECTIFICATIONOR")); - before.put("spare3",pd.getString("RECTIFICATIONDEADLINE")); - before.put("spare4",pd.getString("RECTIFICATIONDEPT")); - before.put("CREATOR", pd.getString("loginUserId")); - before.put("OPERATOR",pd.getString("loginUserId")); - customHiddenExamineService.saveApp(before); customHiddenService.save(pd); - if(!pd.getString("STATE").equals("0")){ - messageService.sendMessageByParameter("HIDDEN_MAIL_001","友情提示:有一条隐患需要确认",pd.getString("CORPINFO_ID"),pd.getString("CONFIRM_USER"),pd.getString("HIDDEN_ID"), - pd.getString("HIDDENDESCR"),"隐患确认","确认","",""); - } // 清除同检查记录合格图片 if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) { imgFilesService.delete(pd); PageData img = new PageData(); img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID")); img.put("TYPE", "14"); - List imgs = imgFilesService.listAll(img); //根据ID读取 - if(imgs != null && imgs.size() > 0) { - for(PageData i: imgs) { - File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH")); - file.delete(); - imgFilesService.delete(i); - } - } +// List imgs = imgFilesService.listAll(img); //根据ID读取 +// if(imgs != null && imgs.size() > 0) { +// for(PageData i: imgs) { +// File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH")); +// file.delete(); +// imgFilesService.delete(i); +// } +// } } map.put("result", errInfo); @@ -642,21 +587,11 @@ public class AppCustomHiddenController extends BaseController { @RequestMapping(value = "/delete") @ResponseBody public Object delete() throws Exception { - // 获取IP - HttpServletRequest request = this.getRequest(); - String ip = ""; - if (request.getHeader("x-forwarded-for") == null) { - ip = request.getRemoteAddr(); - }else{ - ip = request.getHeader("x-forwarded-for"); - } Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); customHiddenService.delete(pd); - FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:"+pd.getString("HIDDEN_ID"),ip); //记录日志 用户ID 隐患id 时间 - applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"1")); map.put("result", errInfo); // 返回结果 return map; } @@ -675,7 +610,7 @@ public class AppCustomHiddenController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); String USER_ID = pd.getString("USER_ID"); - pd = listmanagerService.findById(pd); + 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"))) { @@ -780,25 +715,7 @@ public class AppCustomHiddenController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - - customHiddenUserService.delete(pd); //删除隐患相关人员 -- 隐患发现人 - if(pd.getString("STATE").equals("16")){//如果状态等于16进入此方法肯定是提交过来的,赋值给待确认 - pd.put("STATE","-2"); - if(Tools.notEmpty(pd.getString("POSITIONDESC"))){customHiddenService.editInformation(pd);} - customHiddenService.editstate(pd); - } customHiddenService.editInfo(pd); - - List list = (List) JSON.parse(pd.get("other").toString()); // 隐患发现人 - for (JSONObject json : list){ - PageData hiddenconUserAdd = new PageData(); - hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID()); - hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID")); - hiddenconUserAdd.put("USER_ID",json.get("USER_ID")); - hiddenconUserAdd.put("TYPE","1"); - hiddenconUserAdd.put("IS_MAIN","0"); - customHiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人 - } map.put("pd", pd); map.put("result", errInfo); return map; @@ -1050,77 +967,51 @@ public class AppCustomHiddenController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - if (pd.get("ISQUALIFIED").equals("1")) { //验收合格 - List pd2 = (List) this.customHiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息 - if(pd2.size()>0){ - for(PageData checklist: pd2){ - pd.put("STATUS", 1); - pd.put("HIDDENCHECK_ID", checklist.get("HIDDENCHECK_ID")); - pd.put("DEPARTMENT_ID", checklist.get("DEPARTMENT_ID")); - pd.put("USER_ID", checklist.get("USER_ID")); - customHiddenCheckService.edit(pd); - } - } + if (pd.get("ISQUALIFIED").equals("1")) { + 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")) { -// break; -// } -// } List checkList = customHiddenCheckService.listAll(pd); for (PageData check : checkList) { if (check.get("STATUS").toString().equals("0")) { map.put("result", errInfo); - map.put("code","1000"); - map.put("errorMessage","此次检查还有未合格项,不能验收"); map.put("check", pd); return map; } } - if(Tools.isEmpty(pd.getString("CHECKTIME")) && Tools.notEmpty(pd.getString("CHECK_TIME"))){//用于手机端传验收时间,存隐患表20220920 - pd.put("CHECKTIME",pd.getString("CHECK_TIME")); - } customHiddenService.check(pd); - if (Tools.notEmpty(pd.getString("INSPECTION_ID"))) { //安全环保检查验收 - pd.put("ACCEPTSTEP", 6); - List list = customHiddenService.listOtherNotAccept(pd); - PageData inspection = new PageData(); - if (list.size() == 0) { - inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID")); - inspection.put("OPERATOR", pd.getString("CHECKOR")); - inspection.put("OPERATTIME", DateUtil.date2Str(new Date())); - inspection.put("INSPECTION_STATUS", "6"); // 已验收 - safetyenvironmentalService.editStatus(inspection); - } - inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID")); - inspection.put("OPERATOR", pd.getString("CHECKOR")); - inspection.put("HIDDEN_vector",pd.getString("HIDDEN_ID")); - noticeUtil.SE_ThreeStepUtil(inspection); - } - // 隐患验收清理点检处的状态 - applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"0")); + } else { - PageData pd2 = new PageData(); //验收打回 - pd2.put("FOREIGN_KEY", pd.get("HIDDEN_ID")); - pd2.put("TYPE", "4"); - List zgImgs = imgFilesService.listAll(pd2); - for (PageData pageData : zgImgs) { + PageData hidden = new PageData(); + hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID")); + hidden.put("STATE", 1); + hidden.put("BUHEGE", 1); - imgFilesService.delete(pageData); - if(Tools.notEmpty(pageData.getString("FILEPATH"))) { - smb.deleteFile(pageData.getString("FILEPATH")); - } + 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); } - /** 删除所有验收人数据。**/ - hiddenCheckApiService.deleteByHiddenId(pd.getString("HIDDEN_ID")); - /** 验收打回 **/ - hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID")); - /** 记录打回 **/ - hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"),pd.getString("CONTENT"),pd.getString("CHECKOR")); } - hiddenMailService.apphiddneCheckAdopt(pd); map.put("check", pd); map.put("result", errInfo); return map; @@ -1201,14 +1092,6 @@ public class AppCustomHiddenController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); pd = customHiddenService.findById(pd); // 根据ID读取 - if(pd.get("CONFIRM_USER")!=null || pd.getString("CONFIRM_USER").equals("undefined")){ - pd.put("USER_ID",pd.getString("CONFIRM_USER")); - PageData user = usersService.findById(pd); - if(user!=null){ - pd.put("confirmDeptId",user.getString("DEPARTMENT_ID")); - pd.put("conUserId",pd.getString("CONFIRM_USER")); - } - } PageData pd2 = new PageData(); pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID")); pd2.put("TYPE", 3); @@ -1216,23 +1099,24 @@ public class AppCustomHiddenController extends BaseController { pd2.put("TYPE", 4); List rImgs = imgFilesService.listAll(pd2);// 整改图片 /* - * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c + * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 */ // 查询整改方案 PageData hs = customHiddenSchemeService.findByHdId(pd); List sImgs = new ArrayList(); if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) { PageData pd3 = new PageData(); - pd3.put("FOREIGN_KEY", pd.getString("HIDDEN_ID")); + pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID")); pd3.put("TYPE", 8); sImgs = imgFilesService.listAll(pd3);// 方案图片 + } - - PageData pd31 = new PageData(); - pd31.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID")); - pd31.put("TYPE", 8); - List sImgs2 = imgFilesService.listAll(pd31);// 方案图片 - sImgs.addAll(sImgs2); + 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); @@ -1244,28 +1128,14 @@ public class AppCustomHiddenController extends BaseController { check.put("cImgs", imgFilesService.listAll(pd3));// 验收图片 } } - List hiddenExa = customHiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息 - List repulsecause = customHiddenExamineService.findByHiddenId(pd);//确认人打回信息 - for (PageData pageData :hiddenExa){ - if("0".equals(pageData.getString("TYPE"))){ - pd.put("editUserName",pageData.get("editUserName")); - pd.put("editDeptName",pageData.get("editDeptName")); - pd.put("editLevelName",pageData.get("editLevelName")); - pd.put("editRectificationDeadline",pageData.get("spare3")); - } - } - map.put("hiddenExa", hiddenExa); // //特殊审批信息 - List hiddenFindPeople = customHiddenUserService.listAll(pd);// 隐患相关人员信息 --隐患发现人 map.put("pd", pd); map.put("hs", hs); map.put("hImgs", hImgs); map.put("rImgs", rImgs); - map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"),"102"));// 隐患视频 -// map.put("cImgs", cImgs); map.put("sImgs", sImgs); - map.put("hiddenFindPeople", hiddenFindPeople); // 隐患相关人员信息 + map.put("pImgs", pImgs); map.put("checkList", checkList); - map.put("repulsecause",repulsecause); + map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/controller/system/LoginController.java b/src/main/java/com/zcloud/controller/system/LoginController.java index f194aab..bc442a2 100644 --- a/src/main/java/com/zcloud/controller/system/LoginController.java +++ b/src/main/java/com/zcloud/controller/system/LoginController.java @@ -341,4 +341,8 @@ public class LoginController extends BaseController { session.removeAttribute(Const.SESSION_RNUMBERS); session.removeAttribute(Const.SKIN); } + + public static void main(String[] args) { + System.out.println(new SimpleHash("SHA-1", "18700000001", "666666").toString()); + } } diff --git a/src/main/java/com/zcloud/controller/system/MainController.java b/src/main/java/com/zcloud/controller/system/MainController.java index a1b47db..f6368ae 100644 --- a/src/main/java/com/zcloud/controller/system/MainController.java +++ b/src/main/java/com/zcloud/controller/system/MainController.java @@ -179,12 +179,12 @@ public class MainController extends BaseController { for (int i = 0; i < size; i++) { Boolean b1 = RightsHelper.testRights(roleRights, menuList.get(i).getROUTE_ID()); menuList.get(i).setHasMenu(b1); //赋予主职角色菜单权限 - if (!b1 && isRoot){ - menuList.remove(i); - i--; - size--; - continue; - } +// if (!b1 && isRoot){ +// menuList.remove(i); +// i--; +// size--; +// continue; +// } if (!b1 && null != arrayRoleRights) { for (int n = 0; n < arrayRoleRights.size(); n++) { if (RightsHelper.testRights(arrayRoleRights.get(n), menuList.get(i).getROUTE_ID())) { diff --git a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml index e04c6af..c7cbf6b 100644 --- a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml @@ -3449,7 +3449,7 @@ left join lv on f.HIDDENLEVEL = lv.BIANMA - left join BUS_HIDDENCHECK bhc on bhc.HIDDEN_ID = f.HIDDEN_ID and bhc.USER_ID = #{pd.SELFUSERID} + left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bhc on bhc.HIDDEN_ID = f.HIDDEN_ID and bhc.USER_ID = #{pd.SELFUSERID} where f.ISDELETE = '0' and f.STATE != '0' @@ -3536,7 +3536,7 @@ and ( select count(1) - from BUS_HIDDENCHECK bh + from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh where bh.HIDDEN_ID=f.HIDDEN_ID and bh.USER_ID=#{pd.SELFUSERID} @@ -3564,7 +3564,7 @@ or f.CREATOR = #{pd.SELFUSERID} or ( select count(1) - from BUS_HIDDENCHECK bh + from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh where bh.HIDDEN_ID=f.HIDDEN_ID and bh.USER_ID=#{pd.SELFUSERID} @@ -3724,9 +3724,6 @@ - - - and f.RECTIFICATIONDEPT = #{pd.RECTIFICATIONDEPT} diff --git a/src/main/resources/mybatis/datasource/hiddenDangerCheckStandard/CustomMapper.xml b/src/main/resources/mybatis/datasource/hiddenDangerCheckStandard/CustomMapper.xml index 8cb4d3a..ca9ad55 100644 --- a/src/main/resources/mybatis/datasource/hiddenDangerCheckStandard/CustomMapper.xml +++ b/src/main/resources/mybatis/datasource/hiddenDangerCheckStandard/CustomMapper.xml @@ -880,10 +880,98 @@ left join sys_user u on u.USER_ID = f.USER_ID left join bus_hiddendangercheckstandard_custom_item bhci on bhci.CUSTOM_ID = f.CUSTOM_ID and bhci.ISDELETE = '0' where f.ISDELETE = 0 + and (f.TYPE != 'listType0005' + or (f.START_DATE <= DATE_FORMAT(NOW(),'%Y-%m-%d') and f.END_DATE + >= DATE_FORMAT(NOW(),'%Y-%m-%d') )) and f.CORPINFO_ID = #{CORPINFO_ID} and bhci.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + + + + + and + ((f.DEPARTMENT_ID in ( + select + SUB_DEPARTMENT_ID + from + oa_supervision_department osd + where + osd.SUP_DEPARTMENT_ID = #{SUP_DEPARTMENT_ID} + and osd.ISDELETE = '0' + and osd.CORPINFO_ID = #{CORPINFO_ID} + )) or ( + f.DEPARTMENT_ID in + + '${item}' + + )) + + + and + (f.DEPARTMENT_ID in ( + select + SUB_DEPARTMENT_ID + from + oa_supervision_department osd + where + osd.SUP_DEPARTMENT_ID = #{SUP_DEPARTMENT_ID} + and osd.ISDELETE = '0' + and osd.CORPINFO_ID = #{CORPINFO_ID} + ) or f.USER_ID = #{USER_ID}) + + + + + + and + f.DEPARTMENT_ID in + + '${item}' + + + + and + f.DEPARTMENT_ID = #{DEPARTMENT_ID} + and f.USER_ID = #{USER_ID} + + + + + + and f.DEPARTMENT_ID = #{SUB_DEPARTMENT_IDS} + + + and u.NAME LIKE CONCAT(CONCAT('%', #{USERNAME}),'%') + + + and f.NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + + + + + AND getCheckedNum(f.LISTMANAGER_ID) > 0 + + + AND getCheckedNum(f.LISTMANAGER_ID) = 0 + + + + + + + + + and d.LEVEL = '' + + + and d.LEVEL = #{LISTINGLEVEL} + + + GROUP BY f.CUSTOM_ID ORDER BY f.OPERATTIME DESC