From a95b09833887454d4c7a7ec8bd556e5dce9793da Mon Sep 17 00:00:00 2001 From: wangpeng Date: Sun, 14 Jul 2024 12:27:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=BC=82=E5=B8=B8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/AppHiddenController.java | 164 ++++++++---------- 1 file changed, 75 insertions(+), 89 deletions(-) diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 77c88ff..2aedfd6 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -1526,96 +1526,82 @@ public class AppHiddenController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - - if(StringUtils.isNotEmpty(pd.getString("OPERATION_TYPE")) || StringUtils.equals(pd.getString("OPERATION_TYPE"), "1")) { - pd.put("RECORDITEM_ID", pd.getString("HIDDEN_ID")); - PageData pageData = customHiddenService.findByRecorditemId(pd); - PageData pd2 = new PageData(); - pd2.put("FOREIGN_KEY", pageData.getString("HIDDEN_ID")); - pd2.put("TYPE", 3); - List hImgs = imgFilesService.listAll(pd2);// 隐患图片 - map.put("hImgs", hImgs); - map.put("pd", pageData); - map.put("result", errInfo); - }else{ - pd = hiddenService.findById(pd); // 根据ID读取 - - if (StringUtils.isEmpty(pd.getString("CONFIRM_USER"))) { - pd.put("CONFIRM_USER", ""); - } - if (pd.getString("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); - List hImgs = imgFilesService.listAll(pd2);// 隐患图片 - pd2.put("TYPE", 4); - List rImgs = imgFilesService.listAll(pd2);// 整改图片 - pd2.put("TYPE", 22); - List pImgs = imgFilesService.listAll(pd2);// 计划图片 - pd2.put("TYPE", 50); - List yImgs = imgFilesService.listAll(pd2);// 安全环保检查验收图片 - /* - * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c - */ // 查询整改方案 - 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", pd.getString("HIDDEN_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 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));// 验收图片 - } - } - List hiddenExa = hiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息 - List repulsecause = hiddenExamineService.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 = hiddenUserService.listAll(pd);// 隐患相关人员信息 --隐患发现人 - map.put("pd", pd); - map.put("hs", hs); - map.put("hImgs", hImgs); - map.put("rImgs", rImgs); - map.put("pImgs", pImgs); - map.put("yImgs", yImgs); - map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"), "102"));// 隐患视频 -// map.put("cImgs", cImgs); - map.put("sImgs", sImgs); - map.put("hiddenFindPeople", hiddenFindPeople); // 隐患相关人员信息 - map.put("checkList", checkList); - map.put("repulsecause", repulsecause); - map.put("result", errInfo); + pd = hiddenService.findById(pd); // 根据ID读取 + if (pd.getString("CONFIRM_USER") == null) { + pd.put("CONFIRM_USER", ""); } + if (pd.getString("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); + List hImgs = imgFilesService.listAll(pd2);// 隐患图片 + pd2.put("TYPE", 4); + List rImgs = imgFilesService.listAll(pd2);// 整改图片 + pd2.put("TYPE", 22); + List pImgs = imgFilesService.listAll(pd2);// 计划图片 + pd2.put("TYPE", 50); + List yImgs = imgFilesService.listAll(pd2);// 安全环保检查验收图片 + /* + * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c + */ // 查询整改方案 + 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", pd.getString("HIDDEN_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 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));// 验收图片 + } + } + List hiddenExa = hiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息 + List repulsecause = hiddenExamineService.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 = hiddenUserService.listAll(pd);// 隐患相关人员信息 --隐患发现人 + map.put("pd", pd); + map.put("hs", hs); + map.put("hImgs", hImgs); + map.put("rImgs", rImgs); + map.put("pImgs", pImgs); + map.put("yImgs", yImgs); + map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"), "102"));// 隐患视频 +// map.put("cImgs", cImgs); + map.put("sImgs", sImgs); + map.put("hiddenFindPeople", hiddenFindPeople); // 隐患相关人员信息 + map.put("checkList", checkList); + map.put("repulsecause", repulsecause); + map.put("result", errInfo); return map; }