隐患信息查看异常修复

dev
wangpeng 2024-07-14 12:27:00 +08:00
parent 141ada59bc
commit a95b098338
1 changed files with 75 additions and 89 deletions

View File

@ -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<PageData> 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<PageData> hImgs = imgFilesService.listAll(pd2);// 隐患图片
pd2.put("TYPE", 4);
List<PageData> rImgs = imgFilesService.listAll(pd2);// 整改图片
pd2.put("TYPE", 22);
List<PageData> pImgs = imgFilesService.listAll(pd2);// 计划图片
pd2.put("TYPE", 50);
List<PageData> yImgs = imgFilesService.listAll(pd2);// 安全环保检查验收图片
/*
* pd2.put("TYPE",5); List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c
*/ // 查询整改方案
PageData hs = hiddenSchemeService.findByHdId(pd);
List<PageData> sImgs = new ArrayList<PageData>();
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<PageData> sImgs2 = imgFilesService.listAll(pd31);// 方案图片
sImgs.addAll(sImgs2);
}
List<PageData> 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<PageData> hiddenExa = hiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息
List<PageData> 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<PageData> 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<PageData> hImgs = imgFilesService.listAll(pd2);// 隐患图片
pd2.put("TYPE", 4);
List<PageData> rImgs = imgFilesService.listAll(pd2);// 整改图片
pd2.put("TYPE", 22);
List<PageData> pImgs = imgFilesService.listAll(pd2);// 计划图片
pd2.put("TYPE", 50);
List<PageData> yImgs = imgFilesService.listAll(pd2);// 安全环保检查验收图片
/*
* pd2.put("TYPE",5); List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c
*/ // 查询整改方案
PageData hs = hiddenSchemeService.findByHdId(pd);
List<PageData> sImgs = new ArrayList<PageData>();
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<PageData> sImgs2 = imgFilesService.listAll(pd31);// 方案图片
sImgs.addAll(sImgs2);
}
List<PageData> 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<PageData> hiddenExa = hiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息
List<PageData> 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<PageData> 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;
}