From 23f3f9bcc1de0b486f898426e6a997d76520db8f Mon Sep 17 00:00:00 2001 From: dearLin <1261008090@qq.com> Date: Tue, 16 Jul 2024 17:56:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=20=E6=9C=BA=E8=AE=BE?= =?UTF-8?q?=E9=83=A8=20=20=E4=B8=9A=E5=8A=A1=E9=83=A8=20=20=E7=BB=BC?= =?UTF-8?q?=E5=90=88=E5=8A=9E=E5=85=AC=E5=AE=A4=20=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1=E7=9A=84?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../hiddenApi/HiddenApiController.java | 565 ++--- .../controller/system/UsersController.java | 2 - .../service/bus/impl/HiddenServiceImpl.java | 1879 +++++++++-------- .../resources/application-master.properties | 93 +- .../resources/application-prod.properties | 132 -- .../resources/application-test.properties | 120 -- src/main/resources/application.properties | 2 +- 8 files changed, 1371 insertions(+), 1424 deletions(-) delete mode 100644 src/main/resources/application-prod.properties delete mode 100644 src/main/resources/application-test.properties diff --git a/pom.xml b/pom.xml index 69424592..99391023 100644 --- a/pom.xml +++ b/pom.xml @@ -268,7 +268,7 @@ com.alibaba druid - 1.1.12 + 1.1.13 com.alibaba diff --git a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java index 6188c3a9..35167dbd 100644 --- a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java +++ b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java @@ -158,8 +158,7 @@ public class HiddenApiController extends BaseController { * 隐患图片 ,隐患视频 自己通过上传附件上传,暂时不处理 */ /** 缺少必填参数:RISK_UNIT IDENTIFICATION RISK_POSITION 暂存 */ - String serl = "SOURCE,HIDDENDESCR,DISCOVERYTIME,RECTIFICATIONTYPE,HIDDENLEVEL," + - "HIDDENTYPE,ISRELEVANT"; + String serl = "SOURCE,HIDDENDESCR,DISCOVERYTIME,RECTIFICATIONTYPE,HIDDENLEVEL," + "HIDDENTYPE,ISRELEVANT"; if ("2".equals(pd.getString("SOURCE")) || "6".equals(pd.getString("SOURCE"))) {//如果是清单检查,需要填入其他必填项 // serl +=",RISK_UNIT,IDENTIFICATION,RISK_DESCR,RISK_POSITION,LEVEL,CHECK_CONTENT"; @@ -192,15 +191,15 @@ public class HiddenApiController extends BaseController { /** 处理 隐患 部位的方法 .如果用户填入的隐患部位是输入的 */ if ("value".equals(pd.getString("hiddenPartType"))) { PageData hiddenRegion = hiddenRegionService.saveHidden(pd.getString("HIDDENPART")); - pd.put("saveHidden",JSON.toJSONString(hiddenRegion)); + pd.put("saveHidden", JSON.toJSONString(hiddenRegion)); pd.put("HIDDENPART", hiddenRegion.getString("HIDDENREGION_ID")); } /** 隐患的主要负责人 一条隐患 多个隐患发现人 ,把多个信息填入这个张表中 */ PageData saveRectificationo = hiddenUserApiService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1", Jurisdiction.getUSER_ID()); - pd.put("saveRectificationo",JSON.toJSONString(saveRectificationo)); + pd.put("saveRectificationo", JSON.toJSONString(saveRectificationo)); /** 初始化隐患确认信息 记录隐患发现人的隐患等级等信息 */ PageData saveConfirm = hiddenExamineApiService.saveConfirm(pd, "0"); - pd.put("saveConfirm",JSON.toJSONString(saveConfirm)); + pd.put("saveConfirm", JSON.toJSONString(saveConfirm)); /* 隐患的立即整改 填入整改信息,其他的信息是一样的 */ if ("1".equals(pd.getString("RECTIFICATIONTYPE"))) { pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间 @@ -222,7 +221,7 @@ public class HiddenApiController extends BaseController { pd.put("CONFIRM_USER", longinfoUserDept.getString("HEADMAN"));//通过名字查询用户获取出ID } } - pd.put("saveApi",JSON.toJSONString(pd)); + pd.put("saveApi", JSON.toJSONString(pd)); hiddenApiService.saveApi(pd); /* 发送隐患的通知公告 */ Map notRepr = new HashMap<>(); @@ -233,8 +232,7 @@ public class HiddenApiController extends BaseController { notRepr.put("params2", "隐患确认");// } notRepr.put("params3", "确认");// - messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", Jurisdiction.getCORPINFO_ID(), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"), - pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", ""); + messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", Jurisdiction.getCORPINFO_ID(), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"), pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", ""); /** * 可以为空的 * POSITIONDESC 隐患位置描述 @@ -250,7 +248,7 @@ public class HiddenApiController extends BaseController { */ map.put("result", errInfo); map.put("pd", pd); - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -372,8 +370,6 @@ public class HiddenApiController extends BaseController { } - - map.put("hImgs", imgMapListAll.get("3"));// 隐患图片 map.put("rImgs", imgMapListAll.get("4"));// 整改图片 map.put("fcImgs", imgMapListAll.get("50"));// 安全环保检查验收图片 @@ -438,8 +434,7 @@ public class HiddenApiController extends BaseController { code = hiddenApiService.goEmis(pd); return ResultCodeConstant.resMap(code); //隐患走到这就完成了 } - if ("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL")) || - "1".equals(hidden.get("RECTIFICATIONTYPE").toString())) { + if ("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL")) || "1".equals(hidden.get("RECTIFICATIONTYPE").toString())) { // 如果是忽略隐患 或者是立即整改 pd.put("STATE", "4"); // 隐患状态修改成整改完成 @@ -459,25 +454,21 @@ public class HiddenApiController extends BaseController { } else { pd.put("STATE", "1"); } - // 4 2 无整改人 - hidden.put("HIDDENLEVEL",HIDDENLEVEL); - hidden.put("RECTIFICATIONOR",RECTIFICATIONOR); - hidden.put("RECTIFICATIONDEADLINE",RECTIFICATIONDEADLINE); - hidden.put("RECTIFICATIONDEPT",RECTIFICATIONDEPT); + // 4 2 无整改人 + hidden.put("HIDDENLEVEL", HIDDENLEVEL); + hidden.put("RECTIFICATIONOR", RECTIFICATIONOR); + hidden.put("RECTIFICATIONDEADLINE", RECTIFICATIONDEADLINE); + hidden.put("RECTIFICATIONDEPT", RECTIFICATIONDEPT); PageData pageData = hiddenExamineApiService.saveConfirm(hidden, "4"); //添加隐患处理流程 pd.put("pageData", JSON.toJSONString(pageData)); PageData confirm = hiddenApiService.confirmHidden(pd); //确认 pd.put("confirm", JSON.toJSONString(confirm)); if (Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")) { - messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改", - hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), - hidden.getString("HIDDENDESCR"), "隐患整改", "整改", "", ""); + messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "隐患整改", "整改", "", ""); } else if ("1".equals(hidden.getString("RECTIFICATIONTYPE"))) { - messageService.sendMessageByParameter("HIDDEN_MAIL_003", "友情提示:有一条隐患已验收", - hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), - hidden.getString("HIDDENDESCR"), "通过", "整改", "", ""); + messageService.sendMessageByParameter("HIDDEN_MAIL_003", "友情提示:有一条隐患已验收", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "通过", "整改", "", ""); } - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return ResultCodeConstant.resMap(code, map); } @@ -519,14 +510,12 @@ public class HiddenApiController extends BaseController { before.put("OPERATTIME", DateUtil.date2Str(new Date())); before.put("REPULSE_CAUSE", pd.getString("REJECTOPINION")); before = hiddenExamineApiService.save(before); - pd.put("before",JSON.toJSONString(before)); + pd.put("before", JSON.toJSONString(before)); List hiddenUserList = hiddenUserApiService.getListByHiddenId(pd.getString("HIDDEN_ID")); for (PageData pageData : hiddenUserList) { - messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患被打回", - Jurisdiction.getCORPINFO_ID(), pageData.getString("USER_ID"), pd.getString("HIDDEN_ID"), - pd.getString("HIDDENDESCR"), "上报", "查看", "", ""); + messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患被打回", Jurisdiction.getCORPINFO_ID(), pageData.getString("USER_ID"), pd.getString("HIDDEN_ID"), pd.getString("HIDDENDESCR"), "上报", "查看", "", ""); } - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return ResultCodeConstant.resMap(code, map); } @@ -573,8 +562,7 @@ public class HiddenApiController extends BaseController { } PageData hidden = hiddenApiService.findById(pd); //获取隐患信息 /** 整改,修改隐患信息 **/ - int hiddenupdateSate = hiddenApiService.rectify(pd.getString("HIDDEN_ID"), pd.getString("RECTIFYDESCR"), - pd.getString("RECTIFICATIONTIME"), pd.getString("HAVESCHEME"), pd.getString("INVESTMENT_FUNDS")); + int hiddenupdateSate = hiddenApiService.rectify(pd.getString("HIDDEN_ID"), pd.getString("RECTIFYDESCR"), pd.getString("RECTIFICATIONTIME"), pd.getString("HAVESCHEME"), pd.getString("INVESTMENT_FUNDS")); map.put("hiddenupdateSate", hiddenupdateSate); if ("1".equals(pd.getString("HAVESCHEME"))) { //如果有整改方案 添加上整改方案 pd.put("HIDDENSCHEME_ID", this.get32UUID()); @@ -589,7 +577,7 @@ public class HiddenApiController extends BaseController { } /** 隐患验收信息 **/ PageData hiddenCheck = hiddenCheckApiService.saveHiddenCheck(pd.getString("CHECKOR"), pd.getString("CHECKDEPT"), pd.getString("OTHER"), pd.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR")); - pd.put("hiddenCheck",JSON.toJSONString(hiddenCheck)); + pd.put("hiddenCheck", JSON.toJSONString(hiddenCheck)); /** 隐患延时申请的要通过 **/ PageData exam = hiddenExamineApiService.saveRectify(pd.getString("HIDDEN_ID")); //添加隐患整改记录 pd.put("exam", JSON.toJSONString(exam)); @@ -600,7 +588,7 @@ public class HiddenApiController extends BaseController { } } map.put("hiddenCheckState", hiddenCheck.get("retint")); - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return ResultCodeConstant.resMap(code, map); } @@ -614,8 +602,7 @@ public class HiddenApiController extends BaseController { @RequiresPermissions("hidden:list") @ResponseBody @DockAnnotation(isAdd = true) - public Object - unableRectify() throws Exception { + public Object unableRectify() throws Exception { Map map = new HashMap(); Integer code = 000000; PageData pd = new PageData(); @@ -647,10 +634,8 @@ public class HiddenApiController extends BaseController { examine.put("OPERATOR", Jurisdiction.getUSER_ID()); examine.put("OPERATTIME", DateUtil.date2Str(new Date())); examine = hiddenExamineApiService.save(examine); - pd.put("examine",JSON.toJSONString(examine)); - messageService.sendMessageByParameter("HIDDEN_MAIL_005", "友情提示:有一条隐患需要特殊审核", - hidden.getString("CORPINFO_ID"), hidden.getString("CONFIRM_USER"), hidden.getString("HIDDEN_ID"), - hidden.getString("HIDDENDESCR"), "特殊处置审核", "审核", "", ""); + pd.put("examine", JSON.toJSONString(examine)); + messageService.sendMessageByParameter("HIDDEN_MAIL_005", "友情提示:有一条隐患需要特殊审核", hidden.getString("CORPINFO_ID"), hidden.getString("CONFIRM_USER"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "特殊处置审核", "审核", "", ""); map.put("msg", "隐患特殊处理申请成功。请通知隐患确认人进行特殊处理确认操作!"); /** 暂时没有整理 **/ @@ -671,7 +656,7 @@ public class HiddenApiController extends BaseController { inspection.put("HIDDEN_vector", pd.getString("HIDDEN_ID")); noticeUtil.SE_ThreeStepUtil(inspection); } - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return ResultCodeConstant.resMap(code, map); } @@ -723,12 +708,10 @@ public class HiddenApiController extends BaseController { examine.put("DISPOSAL_FILE", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); } examine = hiddenExamineApiService.save(examine); - pd.put("examine",JSON.toJSONString(examine)); - messageService.sendMessageByParameter("HIDDEN_MAIL_007", "友情提示:有一条隐患需要延期审核", - hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), - hidden.getString("HIDDENDESCR"), "延期审核", "审核", "", ""); + pd.put("examine", JSON.toJSONString(examine)); + messageService.sendMessageByParameter("HIDDEN_MAIL_007", "友情提示:有一条隐患需要延期审核", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "延期审核", "审核", "", ""); map.put("msg", "隐患延期申成功。请通知隐患确认人进行延期确认操作!"); - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return ResultCodeConstant.resMap(code, map); } @@ -777,7 +760,7 @@ public class HiddenApiController extends BaseController { if (Jurisdiction.getUSER_ID().equals(pageData.getString("USER_ID"))) { check = pageData; PageData exampd = hiddenCheckApiService.checkHidden(pd.getString("HIDDEN_ID"), pageData.getString("HIDDENCHECK_ID"), pd.getString("CHECKDESCR"), pd.getString("CHECK_TIME"), Jurisdiction.getDEPARTMENT_ID(), Jurisdiction.getUSER_ID()); - hiddenCheckMap.put("exampd"+count, JSON.toJSONString(exampd)); + hiddenCheckMap.put("exampd" + count, JSON.toJSONString(exampd)); count++; checkCount++; //本次的++ } @@ -829,14 +812,12 @@ public class HiddenApiController extends BaseController { hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID")); /** 记录打回 **/ PageData exam = hiddenExamineApiService.saveRepulseCheck(pd.getString("HIDDEN_ID"), pd.getString("CONTENT")); - pd.put("exam",JSON.toJSONString(exam)); + pd.put("exam", JSON.toJSONString(exam)); /** 给隐患整改人发送站内信**/ - messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患被打回", - hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), - hidden.getString("HIDDENDESCR"), "整改", "重新整改", "", ""); + messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患被打回", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "整改", "重新整改", "", ""); } map.put("check", check); - map.put("dockData",JSON.toJSONString(pd)); + map.put("dockData", JSON.toJSONString(pd)); return ResultCodeConstant.resMap(code, map); } @@ -856,26 +837,26 @@ public class HiddenApiController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); // 增加隐患整改部门查询 开始 - if(StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))){ - String url ="department_list.html?DEPARTMENT_ID="; + if (StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))) { + String url = "department_list.html?DEPARTMENT_ID="; List departments = departmentService.listAllDepartment(pd.getString("RECTIFICATIONDEPT"), url); List departmentIds = new ArrayList<>(); departmentIds.add(pd.getString("RECTIFICATIONDEPT")); - for(Department department:departments){ + for (Department department : departments) { departmentIds.add(department.getDEPARTMENT_ID()); } - pd.put("departmentIds",departmentIds); + pd.put("departmentIds", departmentIds); } // 增加发现整改部门查询 开始 - if(StringUtils.isNotBlank(pd.getString("creatorUserDept"))){ - String url ="department_list.html?DEPARTMENT_ID="; + if (StringUtils.isNotBlank(pd.getString("creatorUserDept"))) { + String url = "department_list.html?DEPARTMENT_ID="; List departments = departmentService.listAllDepartment(pd.getString("creatorUserDept"), url); List departmentIds = new ArrayList<>(); departmentIds.add(pd.getString("creatorUserDept")); - for(Department department:departments){ + for (Department department : departments) { departmentIds.add(department.getDEPARTMENT_ID()); } - pd.put("creatorUserDepts",departmentIds); + pd.put("creatorUserDepts", departmentIds); } // 增加隐患发现部门查询 结束 @@ -959,141 +940,145 @@ public class HiddenApiController extends BaseController { return map; } - /**导出某一个选中项到excel + /** + * 导出某一个选中项到excel + * * @param * @throws Exception */ - @RequestMapping(value="/excelSummary") + @RequestMapping(value = "/excelSummary") // @RequiresPermissions("toExcel") - public ModelAndView excelSummary() throws Exception{ + public ModelAndView excelSummary() throws Exception { ModelAndView mv = new ModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); - Map dataMap = new HashMap(); + Map dataMap = new HashMap(); List titles = new ArrayList(); - titles.add("月份"); //1 - titles.add("数量(公司)"); //2 - titles.add("已完成(公司)"); //3 - titles.add("完成率(公司)"); //4 - titles.add("数量(装船部)"); //5 - titles.add("已完成(装船部)"); //6 - titles.add("完成率(装船部)"); //7 - titles.add("数量(卸车部)"); //8 - titles.add("已完成(卸车部)"); //9 - titles.add("完成率(卸车部)"); //10 - titles.add("数量(生产保障部)"); //11 - titles.add("已完成(生产保障部)"); //12 - titles.add("完成率(生产保障部)"); //13 - titles.add("数量(其他部)"); //14 - titles.add("已完成(其他部)"); //15 - titles.add("完成率(其他部)"); //16 + titles.add("月份"); //1 + titles.add("数量(公司)"); //2 + titles.add("已完成(公司)"); //3 + titles.add("完成率(公司)"); //4 + titles.add("数量(装船部)"); //5 + titles.add("已完成(装船部)"); //6 + titles.add("完成率(装船部)"); //7 + titles.add("数量(卸车部)"); //8 + titles.add("已完成(卸车部)"); //9 + titles.add("完成率(卸车部)"); //10 + titles.add("数量(生产保障部)"); //11 + titles.add("已完成(生产保障部)"); //12 + titles.add("完成率(生产保障部)"); //13 + titles.add("数量(其他部)"); //14 + titles.add("已完成(其他部)"); //15 + titles.add("完成率(其他部)"); //16 dataMap.put("titles", titles); List dataList = hiddenApiService.goSummaryTable(pd); List varOList = hiddenApiService.dealData(dataList); ArrayList varList = new ArrayList<>(); - for(int i=0;i dataMap = new HashMap(); + Map dataMap = new HashMap(); List titles = new ArrayList(); - titles.add("序号"); //1 - titles.add("隐患类型"); //2 - titles.add("等级"); //3 - titles.add("隐患位置"); //4 - titles.add("隐患简要情况"); //5 - titles.add("整改治理措施"); //6 - titles.add("发现隐患日期"); //7 - titles.add("整改完成时限"); //8 - titles.add("整改责任部门"); //9 - titles.add("整改责任人"); //10 - titles.add("整改督办人"); //11 - titles.add("投入资金(元)"); //12 - titles.add("复查时间"); //13 - titles.add("复查人"); //14 - titles.add("检查人员"); //15 + titles.add("序号"); //1 + titles.add("隐患类型"); //2 + titles.add("等级"); //3 + titles.add("隐患位置"); //4 + titles.add("隐患简要情况"); //5 + titles.add("整改治理措施"); //6 + titles.add("发现隐患日期"); //7 + titles.add("整改完成时限"); //8 + titles.add("整改责任部门"); //9 + titles.add("整改责任人"); //10 + titles.add("整改督办人"); //11 + titles.add("投入资金(元)"); //12 + titles.add("复查时间"); //13 + titles.add("复查人"); //14 + titles.add("检查人员"); //15 dataMap.put("titles", titles); // 增加隐患整改部门查询 开始 - if(StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))){ - String url ="department_list.html?DEPARTMENT_ID="; + if (StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))) { + String url = "department_list.html?DEPARTMENT_ID="; List departments = departmentService.listAllDepartment(pd.getString("RECTIFICATIONDEPT"), url); List departmentIds = new ArrayList<>(); departmentIds.add(pd.getString("RECTIFICATIONDEPT")); - for(Department department:departments){ + for (Department department : departments) { departmentIds.add(department.getDEPARTMENT_ID()); } - pd.put("departmentIds",departmentIds); + pd.put("departmentIds", departmentIds); } // 增加发现整改部门查询 开始 - if(StringUtils.isNotBlank(pd.getString("creatorUserDept"))){ - String url ="department_list.html?DEPARTMENT_ID="; + if (StringUtils.isNotBlank(pd.getString("creatorUserDept"))) { + String url = "department_list.html?DEPARTMENT_ID="; List departments = departmentService.listAllDepartment(pd.getString("creatorUserDept"), url); List departmentIds = new ArrayList<>(); departmentIds.add(pd.getString("creatorUserDept")); - for(Department department:departments){ + for (Department department : departments) { departmentIds.add(department.getDEPARTMENT_ID()); } - pd.put("creatorUserDepts",departmentIds); + pd.put("creatorUserDepts", departmentIds); } List varOList = hiddenApiService.listForExcel(pd); List varList = new ArrayList(); - for(int i=0;i imgKeyId = new ArrayList<>();// 需要查询图片的id标识信息 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 - if (Tools.notEmpty(KEYWORDS)) - pd.put("KEYWORDS", KEYWORDS.trim()); + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件 - if (Tools.notEmpty(ISQUALIFIED)) - pd.put("ISQUALIFIED", ISQUALIFIED.trim()); + if (Tools.notEmpty(ISQUALIFIED)) pd.put("ISQUALIFIED", ISQUALIFIED.trim()); String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件 - if (Tools.notEmpty(HIDDENLEVELE)) - pd.put("HIDDENLEVELE", HIDDENLEVELE.trim()); + if (Tools.notEmpty(HIDDENLEVELE)) pd.put("HIDDENLEVELE", HIDDENLEVELE.trim()); String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件 - if (Tools.notEmpty(STARTTIME)) - pd.put("STARTTIME", STARTTIME.trim()); + if (Tools.notEmpty(STARTTIME)) pd.put("STARTTIME", STARTTIME.trim()); String STATE = pd.getString("STATE"); // 关键词检索条件 - if (Tools.notEmpty(STATE)) - pd.put("STATE", STATE.trim()); + 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"); + 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()); @@ -1206,8 +1185,7 @@ public class HiddenApiController extends BaseController { 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()); + if (IS_SELF != null && IS_SELF.equals("1")) pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID()); // 查看隐患信息 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); if (!Jurisdiction.getIS_MAIN().equals("1")) { //主账号 @@ -1255,8 +1233,7 @@ public class HiddenApiController extends BaseController { 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; + 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++) { @@ -1485,39 +1462,59 @@ public class HiddenApiController extends BaseController { /** * 查询隐患统计表 + * * @param response * @return * @throws Exception */ @RequestMapping(value = "/getCountSelect") @ResponseBody - public Object getCountSelect(HttpServletResponse response) throws Exception { + public Object getCountSelect(HttpServletResponse response) throws Exception { PageData pd = new PageData(); pd = this.getPageData(); //这里进入开始获取数据阶段 首先拿到所有部门数据 - String url ="department_list.html?DEPARTMENT_ID="; + String url = "department_list.html?DEPARTMENT_ID="; List departments = departmentService.listAllDepartment(Jurisdiction.getCORPINFO_ID(), url); //装船部 zcb id集合 89f3d30c4031432da53b75bed442ced8 List zcbdepartmentIds = new ArrayList<>(); //保障部 bzb id集合 fcae9cc13a354be699d85d6aea3b3450 - List bzbdepartmentIds = new ArrayList<>(); + List bzbdepartmentIds = new ArrayList<>(); //卸车部 xcb id集合 aad337cf728b4cc2b63e210caf4e185f - List xcbdepartmentIds = new ArrayList<>(); + List xcbdepartmentIds = new ArrayList<>(); + + //0716 新加 机设部298b9a63ea704485913c5185545b4c66 + List mechanicalDepartmentIds = new ArrayList<>(); + // 业务部599d9bfcf6c44cb0bc553b1b766aebc5 + List businessDepartmentIds = new ArrayList<>(); + // 综合办公室31e47797873d4dd3abdbeb0d99a1f138 + List generalOfficeDepartmentIds = new ArrayList<>(); + + //安监部 ajb id集合 4c4b7bc93e3347978f5a3e1f0c4a0b56 - List ajbdepartmentIds = new ArrayList<>(); + List ajbdepartmentIds = new ArrayList<>(); //开始处理数据 扔进对应结合中 - for(Department department:departments){ - if(StringUtils.equals("89f3d30c4031432da53b75bed442ced8",department.getDEPARTMENT_ID())){ - zcbdepartmentIds = getIdsList(department,zcbdepartmentIds); + for (Department department : departments) { + if (StringUtils.equals("89f3d30c4031432da53b75bed442ced8", department.getDEPARTMENT_ID())) { + zcbdepartmentIds = getIdsList(department, zcbdepartmentIds); } - if(StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450",department.getDEPARTMENT_ID())){ - bzbdepartmentIds = getIdsList(department,bzbdepartmentIds); + if (StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450", department.getDEPARTMENT_ID())) { + bzbdepartmentIds = getIdsList(department, bzbdepartmentIds); } - if(StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f",department.getDEPARTMENT_ID())){ - xcbdepartmentIds = getIdsList(department,xcbdepartmentIds); + if (StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f", department.getDEPARTMENT_ID())) { + xcbdepartmentIds = getIdsList(department, xcbdepartmentIds); } - if(StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56",department.getDEPARTMENT_ID())){ - ajbdepartmentIds = getIdsList(department,ajbdepartmentIds); + if (StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56", department.getDEPARTMENT_ID())) { + ajbdepartmentIds = getIdsList(department, ajbdepartmentIds); + } + //0716 新加 机设部 业务部 综合办公室 + if (StringUtils.equals("599d9bfcf6c44cb0bc553b1b766aebc5", department.getDEPARTMENT_ID())) { + businessDepartmentIds = getIdsList(department, ajbdepartmentIds); + } + if (StringUtils.equals("31e47797873d4dd3abdbeb0d99a1f138", department.getDEPARTMENT_ID())) { + generalOfficeDepartmentIds = getIdsList(department, ajbdepartmentIds); + } + if (StringUtils.equals("298b9a63ea704485913c5185545b4c66", department.getDEPARTMENT_ID())) { + generalOfficeDepartmentIds = getIdsList(department, ajbdepartmentIds); } } //处理日期 类型 年 季度 月 @@ -1527,34 +1524,34 @@ public class HiddenApiController extends BaseController { String startTime = ""; String endTime = ""; //年 - if(StringUtils.equals("1",type)){ - startTime = year+"-01-01 00:00:00"; - endTime = year+"-12-31 23:59:59"; + if (StringUtils.equals("1", type)) { + startTime = year + "-01-01 00:00:00"; + endTime = year + "-12-31 23:59:59"; } //季度 - if(StringUtils.equals("2",type)){ - switch (num){ - case "1" : - startTime = year+"-01-01 00:00:00"; - endTime = year+"-03-31 23:59:59"; + if (StringUtils.equals("2", type)) { + switch (num) { + case "1": + startTime = year + "-01-01 00:00:00"; + endTime = year + "-03-31 23:59:59"; break; - case "2" : - startTime = year+"-04-01 00:00:00"; - endTime = year+"-06-30 23:59:59"; + case "2": + startTime = year + "-04-01 00:00:00"; + endTime = year + "-06-30 23:59:59"; break; - case "3" : - startTime = year+"-07-01 00:00:00"; - endTime = year+"-09-30 23:59:59"; + case "3": + startTime = year + "-07-01 00:00:00"; + endTime = year + "-09-30 23:59:59"; break; - case "4" : - startTime = year+"-10-01 00:00:00"; - endTime = year+"-12-31 23:59:59"; + case "4": + startTime = year + "-10-01 00:00:00"; + endTime = year + "-12-31 23:59:59"; break; } } //月 - if(StringUtils.equals("3",type)){ - startTime = year+"-01 00:00:00"; + if (StringUtils.equals("3", type)) { + startTime = year + "-01 00:00:00"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); // 解析字符串为LocalDateTime LocalDateTime dateTime = LocalDateTime.parse(startTime, formatter); @@ -1566,76 +1563,81 @@ public class HiddenApiController extends BaseController { DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); // 格式化ZonedDateTime对象为仅包含日期的字符串 String formattedDate = dateFormatter.format(zonedDateTime); - endTime = formattedDate+" 23:59:59"; + endTime = formattedDate + " 23:59:59"; } //前置搜索条件处理完毕 - pd.put("zcbdepartmentIds",zcbdepartmentIds); - pd.put("bzbdepartmentIds",bzbdepartmentIds); - pd.put("xcbdepartmentIds",xcbdepartmentIds); - pd.put("ajbdepartmentIds",ajbdepartmentIds); - pd.put("startTime",startTime); - pd.put("endTime",endTime); + pd.put("zcbdepartmentIds", zcbdepartmentIds); + pd.put("bzbdepartmentIds", bzbdepartmentIds); + pd.put("xcbdepartmentIds", xcbdepartmentIds); + pd.put("ajbdepartmentIds", ajbdepartmentIds); + + pd.put("mechanicalDepartmentIds", mechanicalDepartmentIds); + pd.put("businessDepartmentIds", businessDepartmentIds); + pd.put("generalOfficeDepartmentIds", generalOfficeDepartmentIds); + pd.put("startTime", startTime); + pd.put("endTime", endTime); //这里获取数据 获取指定日期范围内和指定部门集合创建的隐患总数 - Map map = hiddenService.getExcelMap(pd); + Map map = hiddenService.getExcelMap(pd); //年 - if(StringUtils.equals("1",type)){ - map.put("type","统计年度:"); - map.put("num",year+"年"); + if (StringUtils.equals("1", type)) { + map.put("type", "统计年度:"); + map.put("num", year + "年"); } //季度 - if(StringUtils.equals("2",type)){ - map.put("type","统计季度:"); - map.put("num",year+"年第"+num+"季度"); + if (StringUtils.equals("2", type)) { + map.put("type", "统计季度:"); + map.put("num", year + "年第" + num + "季度"); } //月 - if(StringUtils.equals("3",type)){ + if (StringUtils.equals("3", type)) { String[] month = year.split("-"); - map.put("type","统计月度:"); - map.put("num",month[0]+"年第"+month[1]+"月"); + map.put("type", "统计月度:"); + map.put("num", month[0] + "年第" + month[1] + "月"); } SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日"); - String date =sdf.format(new Date()); - map.put("date","填表日期:"+date); - map.put("weidu",map.get("type").toString()+map.get("num").toString()); + String date = sdf.format(new Date()); + map.put("date", "填表日期:" + date); + map.put("weidu", map.get("type").toString() + map.get("num").toString()); Map Returnmap = new HashMap(); Returnmap.put("result", "success"); - Returnmap.put("pd",map); + Returnmap.put("pd", map); return Returnmap; } /** * 导出隐患统计表 + * * @param response * @throws Exception */ @RequestMapping(value = "/getCountExcel") - public void exportExcels(HttpServletResponse response) throws Exception { + public void exportExcels(HttpServletResponse response) throws Exception { PageData pd = new PageData(); pd = this.getPageData(); //这里进入开始获取数据阶段 首先拿到所有部门数据 - String url ="department_list.html?DEPARTMENT_ID="; + String url = "department_list.html?DEPARTMENT_ID="; List departments = departmentService.listAllDepartment(Jurisdiction.getCORPINFO_ID(), url); //装船部 zcb id集合 89f3d30c4031432da53b75bed442ced8 List zcbdepartmentIds = new ArrayList<>(); //保障部 bzb id集合 fcae9cc13a354be699d85d6aea3b3450 - List bzbdepartmentIds = new ArrayList<>(); + List bzbdepartmentIds = new ArrayList<>(); //卸车部 xcb id集合 aad337cf728b4cc2b63e210caf4e185f - List xcbdepartmentIds = new ArrayList<>(); + List xcbdepartmentIds = new ArrayList<>(); //安监部 ajb id集合 4c4b7bc93e3347978f5a3e1f0c4a0b56 - List ajbdepartmentIds = new ArrayList<>(); + List ajbdepartmentIds = new ArrayList<>(); //开始处理数据 扔进对应结合中 - for(Department department:departments){ - if(StringUtils.equals("89f3d30c4031432da53b75bed442ced8",department.getDEPARTMENT_ID())){ - zcbdepartmentIds = getIdsList(department,zcbdepartmentIds); + for (Department department : departments) { + if (StringUtils.equals("89f3d30c4031432da53b75bed442ced8", department.getDEPARTMENT_ID())) { + zcbdepartmentIds = getIdsList(department, zcbdepartmentIds); } - if(StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450",department.getDEPARTMENT_ID())){ - bzbdepartmentIds = getIdsList(department,bzbdepartmentIds); + if (StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450", department.getDEPARTMENT_ID())) { + bzbdepartmentIds = getIdsList(department, bzbdepartmentIds); } - if(StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f",department.getDEPARTMENT_ID())){ - xcbdepartmentIds = getIdsList(department,xcbdepartmentIds); + if (StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f", department.getDEPARTMENT_ID())) { + xcbdepartmentIds = getIdsList(department, xcbdepartmentIds); } - if(StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56",department.getDEPARTMENT_ID())){ - ajbdepartmentIds = getIdsList(department,ajbdepartmentIds); + if (StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56", department.getDEPARTMENT_ID())) { + ajbdepartmentIds = getIdsList(department, ajbdepartmentIds); } } //处理日期 类型 年 季度 月 @@ -1645,34 +1647,34 @@ public class HiddenApiController extends BaseController { String startTime = ""; String endTime = ""; //年 - if(StringUtils.equals("1",type)){ - startTime = year+"-01-01 00:00:00"; - endTime = year+"-12-31 23:59:59"; + if (StringUtils.equals("1", type)) { + startTime = year + "-01-01 00:00:00"; + endTime = year + "-12-31 23:59:59"; } //季度 - if(StringUtils.equals("2",type)){ - switch (num){ - case "1" : - startTime = year+"-01-01 00:00:00"; - endTime = year+"-03-31 23:59:59"; + if (StringUtils.equals("2", type)) { + switch (num) { + case "1": + startTime = year + "-01-01 00:00:00"; + endTime = year + "-03-31 23:59:59"; break; - case "2" : - startTime = year+"-04-01 00:00:00"; - endTime = year+"-06-30 23:59:59"; + case "2": + startTime = year + "-04-01 00:00:00"; + endTime = year + "-06-30 23:59:59"; break; - case "3" : - startTime = year+"-07-01 00:00:00"; - endTime = year+"-09-30 23:59:59"; + case "3": + startTime = year + "-07-01 00:00:00"; + endTime = year + "-09-30 23:59:59"; break; - case "4" : - startTime = year+"-10-01 00:00:00"; - endTime = year+"-12-31 23:59:59"; + case "4": + startTime = year + "-10-01 00:00:00"; + endTime = year + "-12-31 23:59:59"; break; } } //月 - if(StringUtils.equals("3",type)){ - startTime = year+"-01 00:00:00"; + if (StringUtils.equals("3", type)) { + startTime = year + "-01 00:00:00"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); // 解析字符串为LocalDateTime LocalDateTime dateTime = LocalDateTime.parse(startTime, formatter); @@ -1684,43 +1686,42 @@ public class HiddenApiController extends BaseController { DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); // 格式化ZonedDateTime对象为仅包含日期的字符串 String formattedDate = dateFormatter.format(zonedDateTime); - endTime = formattedDate+" 23:59:59"; + endTime = formattedDate + " 23:59:59"; } //前置搜索条件处理完毕 - pd.put("zcbdepartmentIds",zcbdepartmentIds); - pd.put("bzbdepartmentIds",bzbdepartmentIds); - pd.put("xcbdepartmentIds",xcbdepartmentIds); - pd.put("ajbdepartmentIds",ajbdepartmentIds); - pd.put("startTime",startTime); - pd.put("endTime",endTime); + pd.put("zcbdepartmentIds", zcbdepartmentIds); + pd.put("bzbdepartmentIds", bzbdepartmentIds); + pd.put("xcbdepartmentIds", xcbdepartmentIds); + pd.put("ajbdepartmentIds", ajbdepartmentIds); + pd.put("startTime", startTime); + pd.put("endTime", endTime); //这里获取数据 获取指定日期范围内和指定部门集合创建的隐患总数 - Map map = hiddenService.getExcelMap(pd); + Map map = hiddenService.getExcelMap(pd); //年 - if(StringUtils.equals("1",type)){ - map.put("type","统计年度:"); - map.put("num",year+"年"); + if (StringUtils.equals("1", type)) { + map.put("type", "统计年度:"); + map.put("num", year + "年"); } //季度 - if(StringUtils.equals("2",type)){ - map.put("type","统计季度:"); - map.put("num",year+"年第"+num+"季度"); + if (StringUtils.equals("2", type)) { + map.put("type", "统计季度:"); + map.put("num", year + "年第" + num + "季度"); } //月 - if(StringUtils.equals("3",type)){ + if (StringUtils.equals("3", type)) { String[] month = year.split("-"); - map.put("type","统计月度:"); - map.put("num",month[0]+"年第"+month[1]+"月"); + map.put("type", "统计月度:"); + map.put("num", month[0] + "年第" + month[1] + "月"); } SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日"); - String date =sdf.format(new Date()); - map.put("date","填表日期:"+date); + String date = sdf.format(new Date()); + map.put("date", "填表日期:" + date); //开始执行模板填充数据 String excelFilePath = hiddenCountExcel; // 替换为你的Excel文件路径 //正则 String regex = "\\{\\{.*?\\}\\}"; Pattern pattern = Pattern.compile(regex); - try (FileInputStream inputStream = new FileInputStream(new File(excelFilePath)); - Workbook workbook = new XSSFWorkbook(inputStream)) { + try (FileInputStream inputStream = new FileInputStream(new File(excelFilePath)); Workbook workbook = new XSSFWorkbook(inputStream)) { Sheet sheet = workbook.getSheetAt(0); // 获取第一个工作表 for (Row row : sheet) { for (Cell cell : row) { @@ -1743,12 +1744,12 @@ public class HiddenApiController extends BaseController { } } - public List getIdsList(Department department,List ids){ + public List getIdsList(Department department, List ids) { ids.add(department.getDEPARTMENT_ID()); - for(Department dept :department.getSubDepartment() ){ - if(dept.getSubDepartment().size()>0){ - getIdsList(dept,ids); - }else { + for (Department dept : department.getSubDepartment()) { + if (dept.getSubDepartment().size() > 0) { + getIdsList(dept, ids); + } else { ids.add(dept.getDEPARTMENT_ID()); } } @@ -1770,21 +1771,21 @@ public class HiddenApiController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - if (pd.get("YEAR").equals("")){ + if (pd.get("YEAR").equals("")) { String year = DateUtil.getYear(); - pd.put("YEAR",year); + pd.put("YEAR", year); } List dataList = hiddenApiService.goSummaryTable(pd); List dataTypeList = hiddenApiService.goSummaryTypeTable(pd); List varList = hiddenApiService.dealData(dataList); List varTypeList = hiddenApiService.dealData(dataTypeList); - for(PageData pdDate:varList){ - for(PageData pdTypeDate:varTypeList){ - if(pdDate.getString("MONTH").equals(pdTypeDate.getString("MONTH"))){ - pdDate.put("wdbaqztCount",pdTypeDate.getString("wdbaqztCount")); - pdDate.put("gldqxCount",pdTypeDate.getString("gldqxCount")); - pdDate.put("hjdbaqysCount",pdTypeDate.getString("hjdbaqysCount")); - pdDate.put("rdbaqysCount",pdTypeDate.getString("rdbaqysCount")); + for (PageData pdDate : varList) { + for (PageData pdTypeDate : varTypeList) { + if (pdDate.getString("MONTH").equals(pdTypeDate.getString("MONTH"))) { + pdDate.put("wdbaqztCount", pdTypeDate.getString("wdbaqztCount")); + pdDate.put("gldqxCount", pdTypeDate.getString("gldqxCount")); + pdDate.put("hjdbaqysCount", pdTypeDate.getString("hjdbaqysCount")); + pdDate.put("rdbaqysCount", pdTypeDate.getString("rdbaqysCount")); } } } diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index 5e5ceeec..73e79772 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -36,8 +36,6 @@ import com.zcloud.entity.PageData; import com.zcloud.entity.system.Role; import net.sf.json.JSONArray; -import sun.security.krb5.internal.PAData; -import sun.util.logging.resources.logging; /** * 说明:系统用户处理类 diff --git a/src/main/java/com/zcloud/service/bus/impl/HiddenServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/HiddenServiceImpl.java index acedb7da..c0774071 100644 --- a/src/main/java/com/zcloud/service/bus/impl/HiddenServiceImpl.java +++ b/src/main/java/com/zcloud/service/bus/impl/HiddenServiceImpl.java @@ -31,927 +31,1090 @@ import java.util.stream.Collectors; */ @Service @Transactional //开启事物 -public class HiddenServiceImpl implements HiddenService{ +public class HiddenServiceImpl implements HiddenService { - @Resource - private HiddenMapper hiddenMapper; - @Resource - private HiddenExamineMapper hiddenexamineMapper; - @Autowired - private ImgFilesService imgFilesService; - @Autowired - private UsersService usersService; - @Autowired - private HiddenRegionService hiddenRegionService; // 隐患区域维护 - /**新增 - * @param pd - * @throws Exception - */ - public void save(PageData pd)throws Exception{ - hiddenMapper.save(pd); - } + @Resource + private HiddenMapper hiddenMapper; + @Resource + private HiddenExamineMapper hiddenexamineMapper; + @Autowired + private ImgFilesService imgFilesService; + @Autowired + private UsersService usersService; + @Autowired + private HiddenRegionService hiddenRegionService; // 隐患区域维护 - /**删除 - * @param pd - * @throws Exception - */ - public void delete(PageData pd)throws Exception{ - hiddenMapper.delete(pd); - } + /** + * 新增 + * + * @param pd + * @throws Exception + */ + public void save(PageData pd) throws Exception { + hiddenMapper.save(pd); + } - /**修改 - * @param pd - * @throws Exception - */ - public void edit(PageData pd)throws Exception{ - hiddenMapper.edit(pd); - } + /** + * 删除 + * + * @param pd + * @throws Exception + */ + public void delete(PageData pd) throws Exception { + hiddenMapper.delete(pd); + } - /**修改信息 - * @param pd - * @throws Exception - */ - public void editInfo(PageData pd)throws Exception{ - hiddenMapper.editInfo(pd); - } + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void edit(PageData pd) throws Exception { + hiddenMapper.edit(pd); + } - /**修改位置描述信息 - * @param pd - * @throws Exception - */ - public void editInformation(PageData pd)throws Exception{ - hiddenMapper.editInformation(pd); - } + /** + * 修改信息 + * + * @param pd + * @throws Exception + */ + public void editInfo(PageData pd) throws Exception { + hiddenMapper.editInfo(pd); + } - /**修改安全环保检查隐患信息 - * @param pd - * @throws Exception - */ - public void editSafetyInfo(PageData pd)throws Exception{ - hiddenMapper.editSafetyInfo(pd); - } + /** + * 修改位置描述信息 + * + * @param pd + * @throws Exception + */ + public void editInformation(PageData pd) throws Exception { + hiddenMapper.editInformation(pd); + } - public void editISCONFIRM(PageData pd)throws Exception{ - hiddenMapper.editISCONFIRM(pd); - } - public void editHIDDENLEVEL(PageData pd)throws Exception{ - hiddenMapper.editHIDDENLEVEL(pd); - } + /** + * 修改安全环保检查隐患信息 + * + * @param pd + * @throws Exception + */ + public void editSafetyInfo(PageData pd) throws Exception { + hiddenMapper.editSafetyInfo(pd); + } - /**提交隐患 - * @param ArrayDATA_IDS - * @throws Exception - */ - public void submit(PageData pd)throws Exception{ - hiddenMapper.submit(pd); - } + public void editISCONFIRM(PageData pd) throws Exception { + hiddenMapper.editISCONFIRM(pd); + } - /**修改 - * @param pd - * @throws Exception - */ - public void changeState(PageData pd)throws Exception{ - hiddenMapper.changeState(pd); - } + public void editHIDDENLEVEL(PageData pd) throws Exception { + hiddenMapper.editHIDDENLEVEL(pd); + } - /**定时修改过期隐患 - * @param pd - * @throws Exception - */ - public void editDeadline(PageData pd)throws Exception{ - hiddenMapper.editDeadline(pd); - } + /** + * 提交隐患 + * + * @param ArrayDATA_IDS + * @throws Exception + */ + public void submit(PageData pd) throws Exception { + hiddenMapper.submit(pd); + } - /**修改延期隐患为未整改 - * @param pd - * @throws Exception - */ - public void editDeferredDeadline(PageData pd)throws Exception{ - hiddenMapper.editDeferredDeadline(pd); - } + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void changeState(PageData pd) throws Exception { + hiddenMapper.changeState(pd); + } - /**验收 - * @param pd - * @throws Exception - */ - public void check(PageData pd)throws Exception{ - hiddenMapper.check(pd); - } + /** + * 定时修改过期隐患 + * + * @param pd + * @throws Exception + */ + public void editDeadline(PageData pd) throws Exception { + hiddenMapper.editDeadline(pd); + } - /**安全环保检查验收 - * @param pd - * @throws Exception - */ - public void finalcheck(PageData pd)throws Exception{ - hiddenMapper.finalcheck(pd); - } + /** + * 修改延期隐患为未整改 + * + * @param pd + * @throws Exception + */ + public void editDeferredDeadline(PageData pd) throws Exception { + hiddenMapper.editDeferredDeadline(pd); + } - /**复查 - * @param pd - * @throws Exception - */ - public void review(PageData pd)throws Exception{ - hiddenMapper.review(pd); - } + /** + * 验收 + * + * @param pd + * @throws Exception + */ + public void check(PageData pd) throws Exception { + hiddenMapper.check(pd); + } - /**整改 - * @param pd - * @throws Exception - */ - public void rectify(PageData pd)throws Exception{ - hiddenMapper.rectify(pd); - } + /** + * 安全环保检查验收 + * + * @param pd + * @throws Exception + */ + public void finalcheck(PageData pd) throws Exception { + hiddenMapper.finalcheck(pd); + } - /**列表 - * @param page - * @throws Exception - */ - public List list(Page page)throws Exception{ - return hiddenMapper.datalistPage(page); - } + /** + * 复查 + * + * @param pd + * @throws Exception + */ + public void review(PageData pd) throws Exception { + hiddenMapper.review(pd); + } - /**列表(全部) - * @param pd - * @throws Exception - */ - public List listAll(PageData pd)throws Exception{ - return hiddenMapper.listAll(pd); - } - /**列表(全部,打印使用) - * @param pd - * @throws Exception - */ - public List listAllToPrint(PageData pd)throws Exception{ - return hiddenMapper.listAllToPrint(pd); - } - public List listHiddenAll(PageData pd)throws Exception{ - return hiddenMapper.listHiddenAll(pd); - } + /** + * 整改 + * + * @param pd + * @throws Exception + */ + public void rectify(PageData pd) throws Exception { + hiddenMapper.rectify(pd); + } - /**通过id获取数据 - * @param pd - * @throws Exception - */ - public PageData findById(PageData pd)throws Exception{ - return hiddenMapper.findById(pd); - } - /**通过id获取数据 - * @param pd - * @throws Exception - */ - public PageData findByEmisId(PageData pd)throws Exception{ - return hiddenMapper.findByEmisId(pd); - } - /**批量删除 - * @param ArrayDATA_IDS - * @throws Exception - */ - public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ - hiddenMapper.deleteAll(ArrayDATA_IDS); - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + public List list(Page page) throws Exception { + return hiddenMapper.datalistPage(page); + } - @Override - public void deleteArray(PageData pd) throws Exception { - hiddenMapper.deleteArray(pd); - } + /** + * 列表(全部) + * + * @param pd + * @throws Exception + */ + public List listAll(PageData pd) throws Exception { + return hiddenMapper.listAll(pd); + } - /**批量修改 - * @param ArrayDATA_IDS - * @throws Exception - */ - public void updateAll(PageData hiddens)throws Exception{ - hiddenMapper.updateAll(hiddens); - } + /** + * 列表(全部,打印使用) + * + * @param pd + * @throws Exception + */ + public List listAllToPrint(PageData pd) throws Exception { + return hiddenMapper.listAllToPrint(pd); + } - /**按日统计 - * @param ArrayDATA_IDS - * @throws Exception - */ - public List hiddenStatisticsByDay(PageData pd)throws Exception{ - return hiddenMapper.hiddenStatisticsByDay(pd); - } + public List listHiddenAll(PageData pd) throws Exception { + return hiddenMapper.listHiddenAll(pd); + } - /**总数统计 - * @param ArrayDATA_IDS - * @throws Exception - */ - public List hiddenStatisticsAll(PageData pd)throws Exception{ - return hiddenMapper.hiddenStatisticsAll(pd); - } - /** - *app首页 根据用户ID获取发现隐患信息 - * @param pd CREATOR - * @return - * @throws Exception - */ - public List getCountByCreatorId(PageData pd) throws Exception{ - return hiddenMapper.getCountByCreatorId(pd); - } - /** - * app首页 根据用户ID获取整改隐患信息 - * @param pd CREATOR - * @return - * @throws Exception - */ - public List getCountByRectifiCationorId(PageData pd) throws Exception{ - return hiddenMapper.getCountByRectifiCationorId(pd); - } + /** + * 通过id获取数据 + * + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd) throws Exception { + return hiddenMapper.findById(pd); + } - /** - * app首页根据用户ID获取待验收隐患 - * @param pd - * @return - * @throws Exception - */ - public List getCountByCheckorId(PageData pd) throws Exception{ - return hiddenMapper.getCountByCheckorId(pd); - } + /** + * 通过id获取数据 + * + * @param pd + * @throws Exception + */ + public PageData findByEmisId(PageData pd) throws Exception { + return hiddenMapper.findByEmisId(pd); + } - /** - * app应用页面根据用户ID获取待确认隐患 - * @param pd - * @return - * @throws Exception - */ - public List getCountByConfirmId(PageData pd) throws Exception{ - return hiddenMapper.getCountByConfirmId(pd); - } + /** + * 批量删除 + * + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS) throws Exception { + hiddenMapper.deleteAll(ArrayDATA_IDS); + } - /** - * app应用页面根据用户ID获取特殊处置隐患 - * @param pd - * @return - * @throws Exception - */ - public List getCountSpecialByhId(PageData pd) throws Exception{ - return hiddenMapper.getCountSpecialByhId(pd); - } + @Override + public void deleteArray(PageData pd) throws Exception { + hiddenMapper.deleteArray(pd); + } - /** - *根据企业ID获取驾驶舱隐患统计信息 - * @return - * @throws Exception - */ - public List getBICount(PageData pd) throws Exception{ - return hiddenMapper.getBICount(pd); - } + /** + * 批量修改 + * + * @param ArrayDATA_IDS + * @throws Exception + */ + public void updateAll(PageData hiddens) throws Exception { + hiddenMapper.updateAll(hiddens); + } - /** - * 清单其他隐患 - * @return - * @throws Exception - */ - @Override - public List getOtherHidden(PageData pd) throws Exception { - return hiddenMapper.getOtherHidden(pd); - } + /** + * 按日统计 + * + * @param ArrayDATA_IDS + * @throws Exception + */ + public List hiddenStatisticsByDay(PageData pd) throws Exception { + return hiddenMapper.hiddenStatisticsByDay(pd); + } - /** - * 提交清单(其他)隐患 - */ - @Override - public void submitList(PageData pd) throws Exception { - hiddenMapper.submitList(pd); - } + /** + * 总数统计 + * + * @param ArrayDATA_IDS + * @throws Exception + */ + public List hiddenStatisticsAll(PageData pd) throws Exception { + return hiddenMapper.hiddenStatisticsAll(pd); + } + + /** + * app首页 根据用户ID获取发现隐患信息 + * + * @param pd CREATOR + * @return + * @throws Exception + */ + public List getCountByCreatorId(PageData pd) throws Exception { + return hiddenMapper.getCountByCreatorId(pd); + } + + /** + * app首页 根据用户ID获取整改隐患信息 + * + * @param pd CREATOR + * @return + * @throws Exception + */ + public List getCountByRectifiCationorId(PageData pd) throws Exception { + return hiddenMapper.getCountByRectifiCationorId(pd); + } + + /** + * app首页根据用户ID获取待验收隐患 + * + * @param pd + * @return + * @throws Exception + */ + public List getCountByCheckorId(PageData pd) throws Exception { + return hiddenMapper.getCountByCheckorId(pd); + } + + /** + * app应用页面根据用户ID获取待确认隐患 + * + * @param pd + * @return + * @throws Exception + */ + public List getCountByConfirmId(PageData pd) throws Exception { + return hiddenMapper.getCountByConfirmId(pd); + } + + /** + * app应用页面根据用户ID获取特殊处置隐患 + * + * @param pd + * @return + * @throws Exception + */ + public List getCountSpecialByhId(PageData pd) throws Exception { + return hiddenMapper.getCountSpecialByhId(pd); + } + + /** + * 根据企业ID获取驾驶舱隐患统计信息 + * + * @return + * @throws Exception + */ + public List getBICount(PageData pd) throws Exception { + return hiddenMapper.getBICount(pd); + } + + /** + * 清单其他隐患 + * + * @return + * @throws Exception + */ + @Override + public List getOtherHidden(PageData pd) throws Exception { + return hiddenMapper.getOtherHidden(pd); + } + + /** + * 提交清单(其他)隐患 + */ + @Override + public void submitList(PageData pd) throws Exception { + hiddenMapper.submitList(pd); + } - public List getCountByHiddenType(PageData pd) throws Exception{ - return hiddenMapper.getCountByHiddenType(pd); - } - /**按日统计 - * @param ArrayDATA_IDS - * @throws Exception - */ - public List getHiddenNum(PageData pd)throws Exception{ - return hiddenMapper.getHiddenNum(pd); - } - /** - * 确认隐患,修改隐患状态 - * @param pd - * @throws Exception - */ - public void confirmHidden (PageData pd) throws Exception{ - hiddenMapper.confirmHidden(pd); - } - /** - * 修改隐患信息,隐患级别 ,整改负责人 , 整改期限 - * @param pd - * @throws Exception - */ - public void confirmUpdate(PageData pd) throws Exception{ - hiddenMapper.confirmUpdate(pd); - } + public List getCountByHiddenType(PageData pd) throws Exception { + return hiddenMapper.getCountByHiddenType(pd); + } - /** - * 修改隐患状态,进入隐患特殊处理审核 - */ - public void updteStateBySpecialExamine(PageData pageData)throws Exception{ - PageData pd = new PageData(); - pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID()); - 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("TYPE","1"); - pd.put("STATE","-1"); - pd.put("EXAMINE",pageData.get("EXAMINE")); // 无法整改原因 - pd.put("HIDDEN_ID",pageData.get("HIDDEN_ID"));// 隐患id - hiddenexamineMapper.save(pd); + /** + * 按日统计 + * + * @param ArrayDATA_IDS + * @throws Exception + */ + public List getHiddenNum(PageData pd) throws Exception { + return hiddenMapper.getHiddenNum(pd); + } - this.updateStateByHidden("7",pageData.get("HIDDEN_ID").toString()); //修改隐患状态 - } - /** - * 隐患列表 -- 港务局 - * @param page - * @return - * @throws Exception - */ - public List listGwj(Page page) throws Exception{ - return hiddenMapper.listGwjdatalistPage(page); - } + /** + * 确认隐患,修改隐患状态 + * + * @param pd + * @throws Exception + */ + public void confirmHidden(PageData pd) throws Exception { + hiddenMapper.confirmHidden(pd); + } - /** - * 忽略隐患列表 -- 港务局 - * @param page - * @return - * @throws Exception - */ - public List listIgnore(Page page) throws Exception{ - return hiddenMapper.listIgnoredatalistPage(page); - } + /** + * 修改隐患信息,隐患级别 ,整改负责人 , 整改期限 + * + * @param pd + * @throws Exception + */ + public void confirmUpdate(PageData pd) throws Exception { + hiddenMapper.confirmUpdate(pd); + } - /** - * 重大隐患列表 -- 港务局 - * @param page - * @return - * @throws Exception - */ - public List majorlist(Page page) throws Exception{ - return hiddenMapper.majordatalistPage(page); - } + /** + * 修改隐患状态,进入隐患特殊处理审核 + */ + public void updteStateBySpecialExamine(PageData pageData) throws Exception { + PageData pd = new PageData(); + pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID()); + 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("TYPE", "1"); + pd.put("STATE", "-1"); + pd.put("EXAMINE", pageData.get("EXAMINE")); // 无法整改原因 + pd.put("HIDDEN_ID", pageData.get("HIDDEN_ID"));// 隐患id + hiddenexamineMapper.save(pd); - /** - * 修改隐患整改期限 - * @param pd - * @throws Exception - */ - public void updateHiddenRectificationDeadline (PageData hiddenExa) throws Exception{ - PageData updatePd = new PageData(); - updatePd.put("RECTIFICATIONDEADLINE",hiddenExa.get("DELAY_TIME")); // - updatePd.put("HIDDEN_ID",hiddenExa.get("HIDDEN_ID")); - hiddenMapper.updateRectificationDeadline(updatePd); - } + this.updateStateByHidden("7", pageData.get("HIDDEN_ID").toString()); //修改隐患状态 + } - @Override - public List statisticsGroupMonthByState(PageData pd) throws Exception { - return hiddenMapper.statisticsGroupMonthByState(pd); - } + /** + * 隐患列表 -- 港务局 + * + * @param page + * @return + * @throws Exception + */ + public List listGwj(Page page) throws Exception { + return hiddenMapper.listGwjdatalistPage(page); + } - public void updateStateByHidden(String type,String hiddenId) throws Exception{ - PageData pd = new PageData(); - pd.put("STATE",type); - pd.put("HIDDEN_ID",hiddenId); - hiddenMapper.updateStateByHidden(pd); - } + /** + * 忽略隐患列表 -- 港务局 + * + * @param page + * @return + * @throws Exception + */ + public List listIgnore(Page page) throws Exception { + return hiddenMapper.listIgnoredatalistPage(page); + } - /** - * 修改隐患整改人 - * @param userId - * @param deptId - * @throws Exception - */ - public void updateRectificationUserId (String userId,String deptId ,String hiddenId ,String rectificationDeadline) throws Exception{ - PageData pd = new PageData(); - pd.put("RECTIFICATIONOR",userId); - pd.put("RECTIFICATIONDEPT",deptId); - pd.put("HIDDEN_ID",hiddenId); - pd.put("STATE",1); - pd.put("RECTIFICATIONDEADLINE",rectificationDeadline); - hiddenMapper.updateRectificationUserId(pd); - } + /** + * 重大隐患列表 -- 港务局 + * + * @param page + * @return + * @throws Exception + */ + public List majorlist(Page page) throws Exception { + return hiddenMapper.majordatalistPage(page); + } - @Override - public PageData statisticsHiddenByState(PageData pd) throws Exception { - return hiddenMapper.statisticsHiddenByState(pd); - } + /** + * 修改隐患整改期限 + * + * @param pd + * @throws Exception + */ + public void updateHiddenRectificationDeadline(PageData hiddenExa) throws Exception { + PageData updatePd = new PageData(); + updatePd.put("RECTIFICATIONDEADLINE", hiddenExa.get("DELAY_TIME")); // + updatePd.put("HIDDEN_ID", hiddenExa.get("HIDDEN_ID")); + hiddenMapper.updateRectificationDeadline(updatePd); + } - @Override - public List statisticsGroupLevelByRegion(PageData pd) throws Exception { - return hiddenMapper.statisticsGroupLevelByRegion(pd); - } + @Override + public List statisticsGroupMonthByState(PageData pd) throws Exception { + return hiddenMapper.statisticsGroupMonthByState(pd); + } - @Override - public List statisticsGroupTypeByLevel(PageData pd) throws Exception { - return hiddenMapper.statisticsGroupTypeByLevel(pd); - } + public void updateStateByHidden(String type, String hiddenId) throws Exception { + PageData pd = new PageData(); + pd.put("STATE", type); + pd.put("HIDDEN_ID", hiddenId); + hiddenMapper.updateStateByHidden(pd); + } - @Override - public List statisticsGroupType2(PageData pd) throws Exception { - return hiddenMapper.statisticsGroupType2(pd); - } + /** + * 修改隐患整改人 + * + * @param userId + * @param deptId + * @throws Exception + */ + public void updateRectificationUserId(String userId, String deptId, String hiddenId, String rectificationDeadline) throws Exception { + PageData pd = new PageData(); + pd.put("RECTIFICATIONOR", userId); + pd.put("RECTIFICATIONDEPT", deptId); + pd.put("HIDDEN_ID", hiddenId); + pd.put("STATE", 1); + pd.put("RECTIFICATIONDEADLINE", rectificationDeadline); + hiddenMapper.updateRectificationUserId(pd); + } - @Override - public List findHiddenSourceChartData(PageData pd) throws Exception { - return hiddenMapper.findHiddenSourceChartData(pd); - } + @Override + public PageData statisticsHiddenByState(PageData pd) throws Exception { + return hiddenMapper.statisticsHiddenByState(pd); + } - @Override - public List listAllHiddenLocation(PageData pd) throws Exception { - return hiddenMapper.listAllHiddenLocation(pd); - } + @Override + public List statisticsGroupLevelByRegion(PageData pd) throws Exception { + return hiddenMapper.statisticsGroupLevelByRegion(pd); + } - @Override - public void editstate(PageData hiddenExa) { - hiddenMapper.editstate(hiddenExa); - } + @Override + public List statisticsGroupTypeByLevel(PageData pd) throws Exception { + return hiddenMapper.statisticsGroupTypeByLevel(pd); + } - /** - * 重大隐患核实列表 -- 港务局 - * @param page - * @return - * @throws Exception - */ - public List verifylist(Page page) throws Exception{ - return hiddenMapper.verifydatalistPage(page); - } + @Override + public List statisticsGroupType2(PageData pd) throws Exception { + return hiddenMapper.statisticsGroupType2(pd); + } - /** - * 重大隐患列表 -- 港务局 - * @param page - * @return - * @throws Exception - */ - public List majormanage(Page page) throws Exception{ - return hiddenMapper.majormanagelistPage(page); - } + @Override + public List findHiddenSourceChartData(PageData pd) throws Exception { + return hiddenMapper.findHiddenSourceChartData(pd); + } - @Override - public List listAllInspection(PageData pd) throws Exception { - List hiddenList = hiddenMapper.listAllInspection(pd); - for (PageData hd : hiddenList) { - PageData pd2 = new PageData(); - pd2.put("FOREIGN_KEY",hd.getString("HIDDEN_ID")); - pd2.put("TYPE",3); //隐患图片 - hd.put("hiddenImgs", imgFilesService.listAll(pd2)); - pd2.put("TYPE",102); //隐患视频 - hd.put("hiddenVideos", imgFilesService.listAll(pd2));//整改图片 - } - return hiddenList; - } + @Override + public List listAllHiddenLocation(PageData pd) throws Exception { + return hiddenMapper.listAllHiddenLocation(pd); + } - @Override - public void editStateInspection(PageData pd) throws Exception { - hiddenMapper.editStateInspection(pd); - } + @Override + public void editstate(PageData hiddenExa) { + hiddenMapper.editstate(hiddenExa); + } - @Override - public List listForSafetyEnvironmental(Page page) throws Exception { - return hiddenMapper.hiddenInspectionlistPage(page); - } + /** + * 重大隐患核实列表 -- 港务局 + * + * @param page + * @return + * @throws Exception + */ + public List verifylist(Page page) throws Exception { + return hiddenMapper.verifydatalistPage(page); + } - @Override - public void assign(PageData pd) throws Exception { - hiddenMapper.assign(pd); - } + /** + * 重大隐患列表 -- 港务局 + * + * @param page + * @return + * @throws Exception + */ + public List majormanage(Page page) throws Exception { + return hiddenMapper.majormanagelistPage(page); + } - @Override - public List listOtherNotAssign(PageData pd) throws Exception { - return hiddenMapper.listOtherNotAssign(pd); - } + @Override + public List listAllInspection(PageData pd) throws Exception { + List hiddenList = hiddenMapper.listAllInspection(pd); + for (PageData hd : hiddenList) { + PageData pd2 = new PageData(); + pd2.put("FOREIGN_KEY", hd.getString("HIDDEN_ID")); + pd2.put("TYPE", 3); //隐患图片 + hd.put("hiddenImgs", imgFilesService.listAll(pd2)); + pd2.put("TYPE", 102); //隐患视频 + hd.put("hiddenVideos", imgFilesService.listAll(pd2));//整改图片 + } + return hiddenList; + } - @Override - public List listOtherNotAccept(PageData pd) throws Exception { - return hiddenMapper.listOtherNotAccept(pd); - } - @Override - public List listOtherNotAccept4pc(PageData pd) throws Exception { - return hiddenMapper.listOtherNotAccept4pc(pd); - } - /** - * 获取检查记录的隐患 - * @param pd - * @return - * @throws Exception - */ - @Override - public List checkRecordList(PageData pd) throws Exception { - return hiddenMapper.checkRecordList(pd); - } + @Override + public void editStateInspection(PageData pd) throws Exception { + hiddenMapper.editStateInspection(pd); + } - /** - * 通过安全检查ID获取隐患 - * @param pd - * @return - * @throws Exception - */ - @Override - public List findByInspectionId(PageData pd) throws Exception { - return hiddenMapper.findByInspectionId(pd); - } + @Override + public List listForSafetyEnvironmental(Page page) throws Exception { + return hiddenMapper.hiddenInspectionlistPage(page); + } - @Override - public void deleteByKey(PageData pd) throws Exception { - hiddenMapper.deleteByKey(pd); - } + @Override + public void assign(PageData pd) throws Exception { + hiddenMapper.assign(pd); + } - @Override - public List findByKey(PageData condition) throws Exception { - return hiddenMapper.findByKey(condition); - } - @Override - public List findByQue(PageData condition) throws Exception { - return hiddenMapper.findByQue(condition); - } - @Override - public List findByTs(PageData condition) throws Exception { - return hiddenMapper.findByTs(condition); - } - @Override - public List findByYin(PageData condition) throws Exception { - return hiddenMapper.findByYin(condition); - } - @Override - public List statisticsHiddenCountByLevel(PageData pd) throws Exception { - return hiddenMapper.statisticsHiddenCountByLevel(pd); - } + @Override + public List listOtherNotAssign(PageData pd) throws Exception { + return hiddenMapper.listOtherNotAssign(pd); + } - /**列表 - * @param page - * @throws Exception - */ - public List getListForTianzhang(Page page)throws Exception{ - return hiddenMapper.getListForTianzhangdatalistPage(page); - } - /**列表 - * @param page - * @throws Exception - */ - public List getListForemis(Page page)throws Exception{ - return hiddenMapper.getListForemisdatalistPage(page); - } - public void saveForEmis(String hiddenId,String resXML)throws Exception{ - PageData pd = new PageData(); - pd.put("HIDDEN_ID",hiddenId); - pd.put("resXML",resXML); - hiddenMapper.saveForEmis(pd); - } - /**删除 - * @param - * @throws Exception - */ - public void deleteForEmis(String hiddenId)throws Exception{ - PageData pd = new PageData(); - pd.put("HIDDEN_ID",hiddenId); - hiddenMapper.deleteForEmis(pd); - } - public String goEmis (PageData pd) throws Exception{ - String result = ""; - // 1.整理数据 - PageData hiddenPd = this.findById(pd); /** 确认之前,记录现在的隐患信息 */ - // 隐患确认人 - PageData dianjianUserPd = new PageData(); - dianjianUserPd.put("USER_ID",hiddenPd.getString("CONFIRM_USER")); - PageData dianjianUser = usersService.findByIdForEmis(dianjianUserPd); - if(Tools.isEmpty(dianjianUser)){ - return "未找到隐患确认人!"; - } + @Override + public List listOtherNotAccept(PageData pd) throws Exception { + return hiddenMapper.listOtherNotAccept(pd); + } - if(Tools.isEmpty(dianjianUser.get("DJBM"))){ - result += "隐患确认人部门没有维护对接编码!"; - } - if(Tools.isEmpty(dianjianUser.get("JCR"))){ - result += "隐患确认人没有维护对接编码!"; - } - PageData hiddenRegion= hiddenRegionService.findById(hiddenPd.getString("CORPINFO_ID"),hiddenPd.getString("HIDDENPART")); - PageData hiddenRegionPar = new PageData(); - if(null != hiddenRegion){ - if(!hiddenRegion.getString("PARENT_ID").equals("0")){ - hiddenRegionPar = hiddenRegionService.findById(hiddenPd.getString("CORPINFO_ID"),hiddenRegion.getString("PARENT_ID")); - if(!"0".equals(hiddenRegionPar.getString("PARENT_ID"))){ - return "隐患区域等级维护错误!"; - } + @Override + public List listOtherNotAccept4pc(PageData pd) throws Exception { + return hiddenMapper.listOtherNotAccept4pc(pd); + } + + /** + * 获取检查记录的隐患 + * + * @param pd + * @return + * @throws Exception + */ + @Override + public List checkRecordList(PageData pd) throws Exception { + return hiddenMapper.checkRecordList(pd); + } + + /** + * 通过安全检查ID获取隐患 + * + * @param pd + * @return + * @throws Exception + */ + @Override + public List findByInspectionId(PageData pd) throws Exception { + return hiddenMapper.findByInspectionId(pd); + } + + @Override + public void deleteByKey(PageData pd) throws Exception { + hiddenMapper.deleteByKey(pd); + } + + @Override + public List findByKey(PageData condition) throws Exception { + return hiddenMapper.findByKey(condition); + } + + @Override + public List findByQue(PageData condition) throws Exception { + return hiddenMapper.findByQue(condition); + } + + @Override + public List findByTs(PageData condition) throws Exception { + return hiddenMapper.findByTs(condition); + } + + @Override + public List findByYin(PageData condition) throws Exception { + return hiddenMapper.findByYin(condition); + } + + @Override + public List statisticsHiddenCountByLevel(PageData pd) throws Exception { + return hiddenMapper.statisticsHiddenCountByLevel(pd); + } + + /** + * 列表 + * + * @param page + * @throws Exception + */ + public List getListForTianzhang(Page page) throws Exception { + return hiddenMapper.getListForTianzhangdatalistPage(page); + } + + /** + * 列表 + * + * @param page + * @throws Exception + */ + public List getListForemis(Page page) throws Exception { + return hiddenMapper.getListForemisdatalistPage(page); + } + + public void saveForEmis(String hiddenId, String resXML) throws Exception { + PageData pd = new PageData(); + pd.put("HIDDEN_ID", hiddenId); + pd.put("resXML", resXML); + hiddenMapper.saveForEmis(pd); + } + + /** + * 删除 + * + * @param + * @throws Exception + */ + public void deleteForEmis(String hiddenId) throws Exception { + PageData pd = new PageData(); + pd.put("HIDDEN_ID", hiddenId); + hiddenMapper.deleteForEmis(pd); + } + + public String goEmis(PageData pd) throws Exception { + String result = ""; + // 1.整理数据 + PageData hiddenPd = this.findById(pd); /** 确认之前,记录现在的隐患信息 */ + // 隐患确认人 + PageData dianjianUserPd = new PageData(); + dianjianUserPd.put("USER_ID", hiddenPd.getString("CONFIRM_USER")); + PageData dianjianUser = usersService.findByIdForEmis(dianjianUserPd); + if (Tools.isEmpty(dianjianUser)) { + return "未找到隐患确认人!"; + } + + if (Tools.isEmpty(dianjianUser.get("DJBM"))) { + result += "隐患确认人部门没有维护对接编码!"; + } + if (Tools.isEmpty(dianjianUser.get("JCR"))) { + result += "隐患确认人没有维护对接编码!"; + } + PageData hiddenRegion = hiddenRegionService.findById(hiddenPd.getString("CORPINFO_ID"), hiddenPd.getString("HIDDENPART")); + PageData hiddenRegionPar = new PageData(); + if (null != hiddenRegion) { + if (!hiddenRegion.getString("PARENT_ID").equals("0")) { + hiddenRegionPar = hiddenRegionService.findById(hiddenPd.getString("CORPINFO_ID"), hiddenRegion.getString("PARENT_ID")); + if (!"0".equals(hiddenRegionPar.getString("PARENT_ID"))) { + return "隐患区域等级维护错误!"; + } + } + } else { + return "隐患区域等级维护错误!"; + } + + List imgList = imgFilesService.getListByKeyAndType(hiddenPd.getString("HIDDEN_ID"), "3"); + String imgStr = ""; + for (PageData pageData : imgList) { + imgStr += "192.168.192.201/file" + pageData.getString("FILEPATH") + ";"; + } + if (result != "") { + return result; + } + String DJSJ = DateUtil.date2Str(new Date()); // 点检时间 + String BC = ""; // 班次,自动算 + String DJBM = dianjianUser.get("DJBM").toString(); // 点检部门t_b_bm + String DJBC = pd.getString("DJBC"); // 点检班次 + String JCR = dianjianUser.get("JCR").toString(); // 检查人 + String JCLX = pd.getString("JCLX"); // 检查类型t_b_jclx--fid + String SBDL = hiddenRegionPar.getString("SBDL"); // 设备大类t_b_sbdlxx--sbdlxxdm + String SBMC = hiddenRegion.getString("SBMC"); + ; // 设备名称t_b_shebeixx--shebeidm + String DJWT = hiddenPd.getString("HIDDENDESCR"); // 点检问题 + String CJR = dianjianUser.get("JCR").toString(); // 创建人 + String CJSJ = DateUtil.date2Str(new Date()); // 创建时间 + String GZFL = pd.getString("GZFL"); // 故障分类 t_b_kclx + String SBZJGID = ""; // 子机构v_b_bujian_zjg + String BUJIANID = ""; // 部件v_b_bujian_bj + String PICTURE = imgStr; // 图片 + + StringBuffer strUrl = new StringBuffer(); + strUrl.append("strDjsj=" + DJSJ); + strUrl.append("&strBc=" + ""); + strUrl.append("&strDjbm=" + DJBM); + strUrl.append("&strDjbc=" + DJBC); + strUrl.append("&strJcr=" + JCR); + strUrl.append("&strJclx=" + JCLX); + strUrl.append("&strSbdl=" + SBDL); + strUrl.append("&strSbmc=" + SBMC); + strUrl.append("&strDjwt=" + DJWT); + strUrl.append("&strCjr=" + CJR); + strUrl.append("&strCjsj=" + CJSJ); + strUrl.append("&strGzfl=" + GZFL); + strUrl.append("&strSbzjgId=" + SBZJGID); + strUrl.append("&strBuJianId=" + BUJIANID); + strUrl.append("&strPicture=" + PICTURE); + String resXML = HttpEmisDuijieUtil.sendPostNoAccept(strUrl.toString()); + StringBuffer strUrl2 = new StringBuffer(); + strUrl2.append("djsj:" + DJSJ); + strUrl2.append(",bc:" + ""); + strUrl2.append(",djbm:" + DJBM); + strUrl2.append(",djbc:" + DJBC); + strUrl2.append(",jcr:" + JCR); + strUrl2.append(",jclx:" + JCLX); + strUrl2.append(",sbdl:" + SBDL); + strUrl2.append(",sbmc:" + SBMC); + strUrl2.append(",djwt:" + DJWT); + strUrl2.append(",cjr:" + CJR); + strUrl2.append(",cjsj:" + CJSJ); + strUrl2.append(",gzfl:" + GZFL); + strUrl2.append(",sbzjgID:" + SBZJGID); + strUrl2.append(",bujianid:" + BUJIANID); + strUrl2.append(",pic:" + PICTURE); + if (strUrl2.toString().equals(resXML)) { + /** + * 成功 + * 1.删除现在的隐患内容 + * 2.存储这次的隐患内容 + */ + this.saveForEmis(hiddenPd.getString("HIDDEN_ID"), resXML); + this.deleteForEmis(hiddenPd.getString("HIDDEN_ID")); + return "success"; + } else { + //失败 + return resXML; + } + } + + public void updateGoConfirm(PageData hiddens) throws Exception { + hiddenMapper.updateGoConfirm(hiddens); + } + + @Override + public List findBySource(Integer sourceNumber) { + return hiddenMapper.findBySource(sourceNumber); + } + + @Override + public Map getExcelMap(PageData pageData) { + Map map = new HashMap<>(); + //部门自查数据 + List zcPageDataList = hiddenMapper.getExcelZc(pageData); + //stream分组 + Map> groupByTypeList = zcPageDataList.stream().collect(Collectors.groupingBy(item -> item.getString("type"))); + //mechanicalDepartmentIds + //businessDepartmentIds + //generalOfficeDepartmentIds + // ---------------------- + // 综合办公室 + List generalOffice = groupByTypeList.get("generalOffice"); + if (!Tools.isEmpty(generalOffice)) { + map.put("generalOfficeZcZs", generalOffice.size()); //总数 + List zcbZcWc = generalOffice.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = generalOffice.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(zcbZcWc)) { + map.put("generalOfficeZcZg", zcbZcWc.size()); + map.put("generalOfficeZcWwcZg", generalOffice.size() - zcbZcWc.size()); + BigDecimal result = new BigDecimal(zcbZcWc.size()).divide(new BigDecimal(generalOffice.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("generalOfficeZcZgl", result.intValue() + "%"); //整改率 + } else { + map.put("generalOfficeZcZg", "0"); + map.put("generalOfficeWwcZg", zcbZcWc.size()); + map.put("generalOfficeZcZgl", "0%"); //整改率 } - }else{ - return "隐患区域等级维护错误!"; + map.put("generalOfficeZcZgZj", zijin); //资金 + } else { + map.put("generalOfficeZcZs", "0"); //总数 + map.put("generalOfficeZcZg", "0"); //整改数 + map.put("generalOfficeZcWwcZg", "0"); //整改未完成数 + map.put("generalOfficeZcZgl", "0%"); //整改率 + map.put("generalOfficeZcZgZj", "0"); //资金 } + // 业务部 + List business = groupByTypeList.get("business"); + if (!Tools.isEmpty(business)) { + map.put("businessZcZs", business.size()); //总数 + List zcbZcWc = business.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = business.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(zcbZcWc)) { + map.put("businessZcZg", zcbZcWc.size()); + map.put("businessZcWwcZg", business.size() - zcbZcWc.size()); + BigDecimal result = new BigDecimal(zcbZcWc.size()).divide(new BigDecimal(business.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("businessZcZgl", result.intValue() + "%"); //整改率 + } else { + map.put("businessZcZg", "0"); + map.put("businessWwcZg", zcbZcWc.size()); + map.put("businessZcZgl", "0%"); //整改率 + } + map.put("businessZcZgZj", zijin); //资金 + } else { + map.put("businessZcZs", "0"); //总数 + map.put("businessZcZg", "0"); //整改数 + map.put("businessZcWwcZg", "0"); //整改未完成数 + map.put("businessZcZgl", "0%"); //整改率 + map.put("businessZcZgZj", "0"); //资金 + } + //机设部自查数据 + List mechanical = groupByTypeList.get("mechanical"); + if (!Tools.isEmpty(mechanical)) { + map.put("mechanicalZcZs", mechanical.size()); //总数 + List zcbZcWc = mechanical.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = mechanical.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(zcbZcWc)) { + map.put("mechanicalZcZg", zcbZcWc.size()); + map.put("mechanicalZcWwcZg", mechanical.size() - zcbZcWc.size()); + BigDecimal result = new BigDecimal(zcbZcWc.size()).divide(new BigDecimal(mechanical.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("mechanicalZcZgl", result.intValue() + "%"); //整改率 + } else { + map.put("mechanicalZcZg", "0"); + map.put("mechanicalZcWwcZg", zcbZcWc.size()); + map.put("mechanicalZcZgl", "0%"); //整改率 + } + map.put("mechanicalZcZgZj", zijin); //资金 + } else { + map.put("mechanicalZcZs", "0"); //总数 + map.put("mechanicalZcZg", "0"); //整改数 + map.put("mechanicalZcWwcZg", "0"); //整改未完成数 + map.put("mechanicalZcZgl", "0%"); //整改率 + map.put("mechanicalZcZgZj", "0"); //资金 + } - List imgList = imgFilesService.getListByKeyAndType(hiddenPd.getString("HIDDEN_ID"),"3"); - String imgStr = ""; - for (PageData pageData:imgList){ - imgStr += "192.168.192.201/file" + pageData.getString("FILEPATH")+";"; - } - if (result != ""){ - return result; - } - String DJSJ = DateUtil.date2Str(new Date()); // 点检时间 - String BC = ""; // 班次,自动算 - String DJBM = dianjianUser.get("DJBM").toString(); // 点检部门t_b_bm - String DJBC = pd.getString("DJBC"); // 点检班次 - String JCR = dianjianUser.get("JCR").toString(); // 检查人 - String JCLX = pd.getString("JCLX"); // 检查类型t_b_jclx--fid - String SBDL = hiddenRegionPar.getString("SBDL"); // 设备大类t_b_sbdlxx--sbdlxxdm - String SBMC = hiddenRegion.getString("SBMC");; // 设备名称t_b_shebeixx--shebeidm - String DJWT = hiddenPd.getString("HIDDENDESCR"); // 点检问题 - String CJR = dianjianUser.get("JCR").toString(); // 创建人 - String CJSJ = DateUtil.date2Str(new Date()); // 创建时间 - String GZFL = pd.getString("GZFL"); // 故障分类 t_b_kclx - String SBZJGID = ""; // 子机构v_b_bujian_zjg - String BUJIANID = ""; // 部件v_b_bujian_bj - String PICTURE = imgStr; // 图片 - StringBuffer strUrl = new StringBuffer(); - strUrl.append("strDjsj=" + DJSJ); - strUrl.append("&strBc=" + ""); - strUrl.append("&strDjbm=" + DJBM); - strUrl.append("&strDjbc=" + DJBC); - strUrl.append("&strJcr=" + JCR); - strUrl.append("&strJclx=" + JCLX); - strUrl.append("&strSbdl=" + SBDL); - strUrl.append("&strSbmc=" + SBMC); - strUrl.append("&strDjwt=" + DJWT); - strUrl.append("&strCjr=" + CJR); - strUrl.append("&strCjsj=" + CJSJ); - strUrl.append("&strGzfl=" + GZFL); - strUrl.append("&strSbzjgId=" + SBZJGID); - strUrl.append("&strBuJianId=" + BUJIANID); - strUrl.append("&strPicture=" + PICTURE); - String resXML = HttpEmisDuijieUtil.sendPostNoAccept(strUrl.toString()); - StringBuffer strUrl2 = new StringBuffer(); - strUrl2.append("djsj:" + DJSJ); - strUrl2.append(",bc:" + ""); - strUrl2.append(",djbm:" + DJBM); - strUrl2.append(",djbc:" + DJBC); - strUrl2.append(",jcr:" + JCR); - strUrl2.append(",jclx:" + JCLX); - strUrl2.append(",sbdl:" + SBDL); - strUrl2.append(",sbmc:" + SBMC); - strUrl2.append(",djwt:" + DJWT); - strUrl2.append(",cjr:" + CJR); - strUrl2.append(",cjsj:" + CJSJ); - strUrl2.append(",gzfl:" + GZFL); - strUrl2.append(",sbzjgID:" + SBZJGID); - strUrl2.append(",bujianid:" + BUJIANID); - strUrl2.append(",pic:" + PICTURE); - if(strUrl2.toString().equals(resXML)){ - /** - * 成功 - * 1.删除现在的隐患内容 - * 2.存储这次的隐患内容 - */ - this.saveForEmis(hiddenPd.getString("HIDDEN_ID"),resXML); - this.deleteForEmis(hiddenPd.getString("HIDDEN_ID")); - return "success"; - }else{ - //失败 - return resXML; - } - } - public void updateGoConfirm(PageData hiddens)throws Exception{ - hiddenMapper.updateGoConfirm(hiddens); - } + // ---------------------- + //装船部自查数据 + List zcbZc = groupByTypeList.get("zcbzc"); + if (!Tools.isEmpty(zcbZc)) { + map.put("zcbZcZs", zcbZc.size()); //总数 + List zcbZcWc = zcbZc.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = zcbZc.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(zcbZcWc)) { + map.put("zcbZcZg", zcbZcWc.size()); + map.put("zcbZcWwcZg", zcbZc.size() - zcbZcWc.size()); + BigDecimal result = new BigDecimal(zcbZcWc.size()).divide(new BigDecimal(zcbZc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("zcbZcZgl", result.intValue() + "%"); //整改率 + } else { + map.put("zcbZcZg", "0"); + map.put("zcbZcWwcZg", zcbZcWc.size()); + map.put("zcbZcZgl", "0%"); //整改率 + } + map.put("zcbZcZgZj", zijin); //资金 + } else { + map.put("zcbZcZs", "0"); //总数 + map.put("zcbZcZg", "0"); //整改数 + map.put("zcbZcWwcZg", "0"); //整改未完成数 + map.put("zcbZcZgl", "0%"); //整改率 + map.put("zcbZcZgZj", "0"); //资金 + } + //卸车部自查数据 + List xcbZc = groupByTypeList.get("xcbzc"); + if (!Tools.isEmpty(xcbZc)) { + map.put("xcbZcZs", xcbZc.size()); //总数 + List xcbZcWc = xcbZc.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = xcbZc.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(xcbZcWc)) { + map.put("xcbZcZg", xcbZcWc.size()); + map.put("xcbZcWwcZg", xcbZc.size() - xcbZcWc.size()); + BigDecimal result = new BigDecimal(xcbZcWc.size()).divide(new BigDecimal(xcbZc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("xcbZcZgl", result.intValue() + "%"); //整改率 + } else { + map.put("xcbZcZg", "0"); + map.put("xcbZcWwcZg", xcbZcWc.size()); + map.put("xcbZcZgl", "0%"); //整改率 + } + map.put("xcbZcZgZj", zijin); //资金 + } else { + map.put("xcbZcZs", "0"); //总数 + map.put("xcbZcZg", "0"); //整改数 + map.put("xcbZcWwcZg", "0"); //整改未完成数 + map.put("xcbZcZgl", "0%"); //整改率 + map.put("xcbZcZgZj", "0"); //资金 + } + //保障部自查数据 + List bzbZc = groupByTypeList.get("bzbzc"); + if (!Tools.isEmpty(bzbZc)) { + map.put("bzbZcZs", bzbZc.size()); //总数 + List bzbZcWc = bzbZc.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = bzbZc.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(bzbZcWc)) { + map.put("bzbZcZg", bzbZcWc.size()); + map.put("bzbZcWwcZg", bzbZc.size() - bzbZcWc.size()); + BigDecimal result = new BigDecimal(bzbZcWc.size()).divide(new BigDecimal(bzbZc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("bzbZcZgl", result.intValue() + "%"); //整改率 + } else { + map.put("bzbZcZg", "0"); + map.put("bzbZcWwcZg", bzbZcWc.size()); + map.put("bzbZcZgl", "0%"); //整改率 + } + map.put("bzbZcZgZj", zijin); //资金 + } else { + map.put("bzbZcZs", "0"); //总数 + map.put("bzbZcZg", "0"); //整改数 + map.put("bzbZcWwcZg", "0"); //整改未完成数 + map.put("bzbZcZgl", "0%"); //整改率 + map.put("bzbZcZgZj", "0"); //资金 + } + //公司查数据 + List gscPageDataList = hiddenMapper.getExcelGsc(pageData); + //stream分组 + Map> groupByTypeGscList = gscPageDataList.stream().collect(Collectors.groupingBy(item -> item.getString("type"))); + //装船部公司查数据 + List zcbGsc = groupByTypeGscList.get("zcbgsc"); + if (!Tools.isEmpty(zcbGsc)) { + map.put("zcbGscZs", zcbGsc.size()); //总数 + List zcbGscWc = zcbGsc.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = zcbGsc.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(zcbGscWc)) { + map.put("zcbGscZg", zcbGscWc.size()); + map.put("zcbGscWwcZg", zcbGsc.size() - zcbGscWc.size()); + BigDecimal result = new BigDecimal(zcbGscWc.size()).divide(new BigDecimal(zcbGsc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("zcbGscZgl", result.intValue() + "%"); //整改率 + } else { + map.put("zcbGscZg", "0"); + map.put("zcbGscWwcZg", zcbGscWc.size()); + map.put("zcbGscZgl", "0%"); //整改率 + } + map.put("zcbGscZgZj", zijin); //资金 + } else { + map.put("zcbGscZs", "0"); //总数 + map.put("zcbGscZg", "0"); //整改数 + map.put("zcbGscWwcZg", "0"); //整改未完成数 + map.put("zcbGscZgl", "0%"); //整改率 + map.put("zcbGscZgZj", "0"); //资金 + } + //卸车部自查数据 + List xcbGsc = groupByTypeGscList.get("xcbgsc"); + if (!Tools.isEmpty(xcbGsc)) { + map.put("xcbGscZs", xcbGsc.size()); //总数 + List xcbGscWc = xcbGsc.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = xcbGsc.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(xcbGscWc)) { + map.put("xcbGscZg", xcbGscWc.size()); + map.put("xcbGscWwcZg", xcbGsc.size() - xcbGscWc.size()); + BigDecimal result = new BigDecimal(xcbGscWc.size()).divide(new BigDecimal(xcbGsc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("xcbGscZgl", result.intValue() + "%"); //整改率 + } else { + map.put("xcbGscZg", "0"); + map.put("xcbGscWwcZg", xcbGscWc.size()); + map.put("xcbGscZgl", "0%"); //整改率 + } + map.put("xcbGscZgZj", zijin); //资金 + } else { + map.put("xcbGscZs", "0"); //总数 + map.put("xcbGscZg", "0"); //整改数 + map.put("xcbGscWwcZg", "0"); //整改未完成数 + map.put("xcbGscZgl", "0%"); //整改率 + map.put("xcbGscZgZj", "0"); //资金 + } + //保障部自查数据 + List bzbGsc = groupByTypeGscList.get("bzbgsc"); + if (!Tools.isEmpty(bzbGsc)) { + map.put("bzbGscZs", bzbGsc.size()); //总数 + List bzbGscWc = bzbGsc.stream().filter(item -> StringUtils.equals("4", item.getString("STATE"))).collect(Collectors.toList()); + int zijin = bzbGsc.stream().filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")).mapToInt(item -> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); + if (!Tools.isEmpty(bzbGscWc)) { + map.put("bzbGscZg", bzbGscWc.size()); + map.put("bzbGscWwcZg", bzbGsc.size() - bzbGscWc.size()); + BigDecimal result = new BigDecimal(bzbGscWc.size()).divide(new BigDecimal(bzbGsc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("bzbGscZgl", result.intValue() + "%"); //整改率 + } else { + map.put("bzbGscZg", "0"); + map.put("bzbGscWwcZg", bzbGscWc.size()); + map.put("bzbGscZgl", "0%"); //整改率 + } + map.put("bzbGscZgZj", zijin); //资金 + } else { + map.put("bzbGscZs", "0"); //总数 + map.put("bzbGscZg", "0"); //整改数 + map.put("bzbGscWwcZg", "0"); //整改未完成数 + map.put("bzbGscZgl", "0%"); //整改率 + map.put("bzbGscZgZj", "0"); //资金 + } + // 处理汇总数据 + //装船部合计 + int zcbHjZs = Integer.parseInt(map.get("zcbZcZs").toString()) + Integer.parseInt(map.get("zcbGscZs").toString()); + map.put("zcbHjZs", zcbHjZs); //总数 + int zcbHjZg = Integer.parseInt(map.get("zcbZcZg").toString()) + Integer.parseInt(map.get("zcbGscZg").toString()); + map.put("zcbHjZg", zcbHjZg); //整改数 + map.put("zcbHjWwcZg", zcbHjZs - zcbHjZg); //整改未完成数 + if (BigDecimal.ZERO.compareTo(new BigDecimal(zcbHjZs)) < 0 && BigDecimal.ZERO.compareTo(new BigDecimal(zcbHjZg)) < 0) { + BigDecimal zcbResult = new BigDecimal(zcbHjZg).divide(new BigDecimal(zcbHjZs), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("zcbHjZgl", zcbResult.intValue() + "%"); //整改率 + } else { + map.put("zcbHjZgl", "0%"); //整改率 + } + int zcbHjZgZj = Integer.parseInt(map.get("zcbZcZgZj").toString()) + Integer.parseInt(map.get("zcbGscZgZj").toString()); + map.put("zcbHjZgZj", zcbHjZgZj); //资金 + //卸车部合计 + int xcbHjZs = Integer.parseInt(map.get("xcbZcZs").toString()) + Integer.parseInt(map.get("xcbGscZs").toString()); + map.put("xcbHjZs", xcbHjZs); //总数 + int xcbHjZg = Integer.parseInt(map.get("xcbZcZg").toString()) + Integer.parseInt(map.get("xcbGscZg").toString()); + map.put("xcbHjZg", xcbHjZg); //整改数 + map.put("xcbHjWwcZg", xcbHjZs - xcbHjZg); //整改未完成数 + if (BigDecimal.ZERO.compareTo(new BigDecimal(xcbHjZg)) < 0 && BigDecimal.ZERO.compareTo(new BigDecimal(xcbHjZs)) < 0) { + BigDecimal xcbResult = new BigDecimal(xcbHjZg).divide(new BigDecimal(xcbHjZs), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("xcbHjZgl", xcbResult.intValue() + "%"); //整改率 + } else { + map.put("xcbHjZgl", "0%"); //整改率 + } + int xcbHjZgZj = Integer.parseInt(map.get("xcbZcZgZj").toString()) + Integer.parseInt(map.get("xcbGscZgZj").toString()); + map.put("xcbHjZgZj", xcbHjZgZj); //资金 + //保障部合计 + int bzbHjZs = Integer.parseInt(map.get("bzbZcZs").toString()) + Integer.parseInt(map.get("bzbGscZs").toString()); + map.put("bzbHjZs", bzbHjZs); //总数 + int bzbHjZg = Integer.parseInt(map.get("bzbZcZg").toString()) + Integer.parseInt(map.get("bzbGscZg").toString()); + map.put("bzbHjZg", bzbHjZg); //整改数 + map.put("bzbHjWwcZg", bzbHjZs - bzbHjZg); //整改未完成数 + if (BigDecimal.ZERO.compareTo(new BigDecimal(bzbHjZg)) < 0 && BigDecimal.ZERO.compareTo(new BigDecimal(bzbHjZs)) < 0) { + BigDecimal bzbResult = new BigDecimal(bzbHjZg).divide(new BigDecimal(bzbHjZs), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + map.put("bzbHjZgl", bzbResult.intValue() + "%"); //整改率 + } else { + map.put("bzbHjZgl", "0%"); //整改率 + } + int bzbHjZgZj = Integer.parseInt(map.get("bzbZcZgZj").toString()) + Integer.parseInt(map.get("bzbGscZgZj").toString()); + map.put("bzbHjZgZj", bzbHjZgZj); //资金 - @Override - public List findBySource(Integer sourceNumber) { - return hiddenMapper.findBySource(sourceNumber); - } + //安监部合计 + int ajbHjZs = Integer.parseInt(map.get("zcbGscZs").toString()) + Integer.parseInt(map.get("xcbGscZs").toString()) + Integer.parseInt(map.get("bzbGscZs").toString()); + int ajbHjZg = Integer.parseInt(map.get("zcbGscZg").toString()) + Integer.parseInt(map.get("xcbGscZg").toString()) + Integer.parseInt(map.get("bzbGscZg").toString()); + map.put("ajbHjZs", "本月共检查出安全隐患" + ajbHjZs + "项,已完成整改" + ajbHjZg + "项"); + //装船 + map.put("ajbZcbGsc", "装船部公司检查" + map.get("zcbGscZs").toString() + "项,已完成" + map.get("zcbGscZg").toString() + "项"); + map.put("ajbZcbZc", "自查" + map.get("zcbZcZs").toString() + "项,已完成" + map.get("zcbZcZg").toString() + "项"); + //卸车 + map.put("ajbXcbGsc", "卸车部公司检查" + map.get("xcbGscZs").toString() + "项,已完成" + map.get("xcbGscZg").toString() + "项"); + map.put("ajbXcbZc", "自查" + map.get("xcbZcZs").toString() + "项,已完成" + map.get("xcbZcZg").toString() + "项"); + //保障 + map.put("ajbBzbGsc", "保障部公司检查" + map.get("bzbGscZs").toString() + "项,已完成" + map.get("bzbGscZg").toString() + "项"); + map.put("ajbBzbZc", "自查" + map.get("bzbZcZs").toString() + "项,已完成" + map.get("bzbZcZg").toString() + "项"); + //各部门合计 + int allBuMenZs = Integer.parseInt(map.get("zcbZcZs").toString()) + Integer.parseInt(map.get("xcbZcZs").toString()) + Integer.parseInt(map.get("bzbZcZs").toString()); + int allBuMenHjZg = Integer.parseInt(map.get("zcbZcZg").toString()) + Integer.parseInt(map.get("xcbZcZg").toString()) + Integer.parseInt(map.get("bzbZcZg").toString()); + map.put("ajbHjZsTable", ajbHjZs); + map.put("ajbHjZgTable", ajbHjZg); + map.put("allBuMenZs", allBuMenZs); + map.put("allBuMenHjZg", allBuMenHjZg); + return map; + } - @Override - public Map getExcelMap(PageData pageData) { - Map map = new HashMap<>(); - //部门自查数据 - List zcPageDataList = hiddenMapper.getExcelZc(pageData); - //stream分组 - Map> groupByTypeList = zcPageDataList.stream().collect(Collectors.groupingBy(item->item.getString("type"))); - //装船部自查数据 - List zcbZc = groupByTypeList.get("zcbzc"); - if(!Tools.isEmpty(zcbZc)){ - map.put("zcbZcZs",zcbZc.size()); //总数 - List zcbZcWc = zcbZc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList()); - int zijin = zcbZc.stream() - .filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")) - .mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); - if(!Tools.isEmpty(zcbZcWc)){ - map.put("zcbZcZg",zcbZcWc.size()); - map.put("zcbZcWwcZg",zcbZc.size()-zcbZcWc.size()); - BigDecimal result = new BigDecimal(zcbZcWc.size()).divide(new BigDecimal(zcbZc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("zcbZcZgl",result.intValue()+"%"); //整改率 - }else { - map.put("zcbZcZg","0"); - map.put("zcbZcWwcZg",zcbZcWc.size()); - map.put("zcbZcZgl","0%"); //整改率 - } - map.put("zcbZcZgZj",zijin); //资金 - }else { - map.put("zcbZcZs","0"); //总数 - map.put("zcbZcZg","0"); //整改数 - map.put("zcbZcWwcZg","0"); //整改未完成数 - map.put("zcbZcZgl","0%"); //整改率 - map.put("zcbZcZgZj","0"); //资金 - } - //卸车部自查数据 - List xcbZc = groupByTypeList.get("xcbzc"); - if(!Tools.isEmpty(xcbZc)){ - map.put("xcbZcZs",xcbZc.size()); //总数 - List xcbZcWc = xcbZc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList()); - int zijin = xcbZc.stream() - .filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")) - .mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); - if(!Tools.isEmpty(xcbZcWc)){ - map.put("xcbZcZg",xcbZcWc.size()); - map.put("xcbZcWwcZg",xcbZc.size()-xcbZcWc.size()); - BigDecimal result = new BigDecimal(xcbZcWc.size()).divide(new BigDecimal(xcbZc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("xcbZcZgl",result.intValue()+"%"); //整改率 - }else { - map.put("xcbZcZg","0"); - map.put("xcbZcWwcZg",xcbZcWc.size()); - map.put("xcbZcZgl","0%"); //整改率 - } - map.put("xcbZcZgZj",zijin); //资金 - }else { - map.put("xcbZcZs","0"); //总数 - map.put("xcbZcZg","0"); //整改数 - map.put("xcbZcWwcZg","0"); //整改未完成数 - map.put("xcbZcZgl","0%"); //整改率 - map.put("xcbZcZgZj","0"); //资金 - } - //保障部自查数据 - List bzbZc = groupByTypeList.get("bzbzc"); - if(!Tools.isEmpty(bzbZc)){ - map.put("bzbZcZs",bzbZc.size()); //总数 - List bzbZcWc = bzbZc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList()); - int zijin = bzbZc.stream() - .filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")) - .mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); - if(!Tools.isEmpty(bzbZcWc)){ - map.put("bzbZcZg",bzbZcWc.size()); - map.put("bzbZcWwcZg",bzbZc.size()-bzbZcWc.size()); - BigDecimal result = new BigDecimal(bzbZcWc.size()).divide(new BigDecimal(bzbZc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("bzbZcZgl",result.intValue()+"%"); //整改率 - }else { - map.put("bzbZcZg","0"); - map.put("bzbZcWwcZg",bzbZcWc.size()); - map.put("bzbZcZgl","0%"); //整改率 - } - map.put("bzbZcZgZj",zijin); //资金 - }else { - map.put("bzbZcZs","0"); //总数 - map.put("bzbZcZg","0"); //整改数 - map.put("bzbZcWwcZg","0"); //整改未完成数 - map.put("bzbZcZgl","0%"); //整改率 - map.put("bzbZcZgZj","0"); //资金 - } - //公司查数据 - List gscPageDataList = hiddenMapper.getExcelGsc(pageData); - //stream分组 - Map> groupByTypeGscList = gscPageDataList.stream().collect(Collectors.groupingBy(item->item.getString("type"))); - //装船部公司查数据 - List zcbGsc = groupByTypeGscList.get("zcbgsc"); - if(!Tools.isEmpty(zcbGsc)){ - map.put("zcbGscZs",zcbGsc.size()); //总数 - List zcbGscWc = zcbGsc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList()); - int zijin = zcbGsc.stream() - .filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")) - .mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); - if(!Tools.isEmpty(zcbGscWc)){ - map.put("zcbGscZg",zcbGscWc.size()); - map.put("zcbGscWwcZg",zcbGsc.size()-zcbGscWc.size()); - BigDecimal result = new BigDecimal(zcbGscWc.size()).divide(new BigDecimal(zcbGsc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("zcbGscZgl",result.intValue()+"%"); //整改率 - }else { - map.put("zcbGscZg","0"); - map.put("zcbGscWwcZg",zcbGscWc.size()); - map.put("zcbGscZgl","0%"); //整改率 - } - map.put("zcbGscZgZj",zijin); //资金 - }else { - map.put("zcbGscZs","0"); //总数 - map.put("zcbGscZg","0"); //整改数 - map.put("zcbGscWwcZg","0"); //整改未完成数 - map.put("zcbGscZgl","0%"); //整改率 - map.put("zcbGscZgZj","0"); //资金 - } - //卸车部自查数据 - List xcbGsc = groupByTypeGscList.get("xcbgsc"); - if(!Tools.isEmpty(xcbGsc)){ - map.put("xcbGscZs",xcbGsc.size()); //总数 - List xcbGscWc = xcbGsc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList()); - int zijin = xcbGsc.stream() - .filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")) - .mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); - if(!Tools.isEmpty(xcbGscWc)){ - map.put("xcbGscZg",xcbGscWc.size()); - map.put("xcbGscWwcZg",xcbGsc.size()-xcbGscWc.size()); - BigDecimal result = new BigDecimal(xcbGscWc.size()).divide(new BigDecimal(xcbGsc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("xcbGscZgl",result.intValue()+"%"); //整改率 - }else { - map.put("xcbGscZg","0"); - map.put("xcbGscWwcZg",xcbGscWc.size()); - map.put("xcbGscZgl","0%"); //整改率 - } - map.put("xcbGscZgZj",zijin); //资金 - }else { - map.put("xcbGscZs","0"); //总数 - map.put("xcbGscZg","0"); //整改数 - map.put("xcbGscWwcZg","0"); //整改未完成数 - map.put("xcbGscZgl","0%"); //整改率 - map.put("xcbGscZgZj","0"); //资金 - } - //保障部自查数据 - List bzbGsc = groupByTypeGscList.get("bzbgsc"); - if(!Tools.isEmpty(bzbGsc)){ - map.put("bzbGscZs",bzbGsc.size()); //总数 - List bzbGscWc = bzbGsc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList()); - int zijin = bzbGsc.stream() - .filter(item -> item.getString("INVESTMENT_FUNDS").matches("\\d+")) - .mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum(); - if(!Tools.isEmpty(bzbGscWc)){ - map.put("bzbGscZg",bzbGscWc.size()); - map.put("bzbGscWwcZg",bzbGsc.size()-bzbGscWc.size()); - BigDecimal result = new BigDecimal(bzbGscWc.size()).divide(new BigDecimal(bzbGsc.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("bzbGscZgl",result.intValue()+"%"); //整改率 - }else { - map.put("bzbGscZg","0"); - map.put("bzbGscWwcZg",bzbGscWc.size()); - map.put("bzbGscZgl","0%"); //整改率 - } - map.put("bzbGscZgZj",zijin); //资金 - }else { - map.put("bzbGscZs","0"); //总数 - map.put("bzbGscZg","0"); //整改数 - map.put("bzbGscWwcZg","0"); //整改未完成数 - map.put("bzbGscZgl","0%"); //整改率 - map.put("bzbGscZgZj","0"); //资金 - } - // 处理汇总数据 - //装船部合计 - int zcbHjZs = Integer.parseInt(map.get("zcbZcZs").toString())+Integer.parseInt(map.get("zcbGscZs").toString()); - map.put("zcbHjZs",zcbHjZs); //总数 - int zcbHjZg = Integer.parseInt(map.get("zcbZcZg").toString())+Integer.parseInt(map.get("zcbGscZg").toString()); - map.put("zcbHjZg",zcbHjZg); //整改数 - map.put("zcbHjWwcZg",zcbHjZs-zcbHjZg); //整改未完成数 - if(BigDecimal.ZERO.compareTo(new BigDecimal(zcbHjZs))<0 && BigDecimal.ZERO.compareTo(new BigDecimal(zcbHjZg))<0){ - BigDecimal zcbResult = new BigDecimal(zcbHjZg).divide(new BigDecimal(zcbHjZs), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("zcbHjZgl",zcbResult.intValue()+"%"); //整改率 - }else { - map.put("zcbHjZgl","0%"); //整改率 - } - int zcbHjZgZj = Integer.parseInt(map.get("zcbZcZgZj").toString())+Integer.parseInt(map.get("zcbGscZgZj").toString()); - map.put("zcbHjZgZj",zcbHjZgZj); //资金 - //卸车部合计 - int xcbHjZs = Integer.parseInt(map.get("xcbZcZs").toString())+Integer.parseInt(map.get("xcbGscZs").toString()); - map.put("xcbHjZs",xcbHjZs); //总数 - int xcbHjZg = Integer.parseInt(map.get("xcbZcZg").toString())+Integer.parseInt(map.get("xcbGscZg").toString()); - map.put("xcbHjZg",xcbHjZg); //整改数 - map.put("xcbHjWwcZg",xcbHjZs-xcbHjZg); //整改未完成数 - if(BigDecimal.ZERO.compareTo(new BigDecimal(xcbHjZg))<0 && BigDecimal.ZERO.compareTo(new BigDecimal(xcbHjZs))<0){ - BigDecimal xcbResult = new BigDecimal(xcbHjZg).divide(new BigDecimal(xcbHjZs), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("xcbHjZgl",xcbResult.intValue()+"%"); //整改率 - }else { - map.put("xcbHjZgl","0%"); //整改率 - } - int xcbHjZgZj = Integer.parseInt(map.get("xcbZcZgZj").toString())+Integer.parseInt(map.get("xcbGscZgZj").toString()); - map.put("xcbHjZgZj",xcbHjZgZj); //资金 - //保障部合计 - int bzbHjZs = Integer.parseInt(map.get("bzbZcZs").toString())+Integer.parseInt(map.get("bzbGscZs").toString()); - map.put("bzbHjZs",bzbHjZs); //总数 - int bzbHjZg = Integer.parseInt(map.get("bzbZcZg").toString())+Integer.parseInt(map.get("bzbGscZg").toString()); - map.put("bzbHjZg",bzbHjZg); //整改数 - map.put("bzbHjWwcZg",bzbHjZs-bzbHjZg); //整改未完成数 - if(BigDecimal.ZERO.compareTo(new BigDecimal(bzbHjZg))<0 && BigDecimal.ZERO.compareTo(new BigDecimal(bzbHjZs))<0){ - BigDecimal bzbResult = new BigDecimal(bzbHjZg).divide(new BigDecimal(bzbHjZs), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - map.put("bzbHjZgl",bzbResult.intValue()+"%"); //整改率 - }else { - map.put("bzbHjZgl","0%"); //整改率 - } - int bzbHjZgZj = Integer.parseInt(map.get("bzbZcZgZj").toString())+Integer.parseInt(map.get("bzbGscZgZj").toString()); - map.put("bzbHjZgZj",bzbHjZgZj); //资金 - - //安监部合计 - int ajbHjZs = Integer.parseInt(map.get("zcbGscZs").toString())+Integer.parseInt(map.get("xcbGscZs").toString())+Integer.parseInt(map.get("bzbGscZs").toString()); - int ajbHjZg = Integer.parseInt(map.get("zcbGscZg").toString())+Integer.parseInt(map.get("xcbGscZg").toString())+Integer.parseInt(map.get("bzbGscZg").toString()); - map.put("ajbHjZs","本月共检查出安全隐患"+ajbHjZs+"项,已完成整改"+ajbHjZg+"项"); - //装船 - map.put("ajbZcbGsc","装船部公司检查"+map.get("zcbGscZs").toString()+"项,已完成"+map.get("zcbGscZg").toString()+"项"); - map.put("ajbZcbZc","自查"+map.get("zcbZcZs").toString()+"项,已完成"+map.get("zcbZcZg").toString()+"项"); - //卸车 - map.put("ajbXcbGsc","卸车部公司检查"+map.get("xcbGscZs").toString()+"项,已完成"+map.get("xcbGscZg").toString()+"项"); - map.put("ajbXcbZc","自查"+map.get("xcbZcZs").toString()+"项,已完成"+map.get("xcbZcZg").toString()+"项"); - //保障 - map.put("ajbBzbGsc","保障部公司检查"+map.get("bzbGscZs").toString()+"项,已完成"+map.get("bzbGscZg").toString()+"项"); - map.put("ajbBzbZc","自查"+map.get("bzbZcZs").toString()+"项,已完成"+map.get("bzbZcZg").toString()+"项"); - //各部门合计 - int allBuMenZs = Integer.parseInt(map.get("zcbZcZs").toString())+Integer.parseInt(map.get("xcbZcZs").toString())+Integer.parseInt(map.get("bzbZcZs").toString()); - int allBuMenHjZg = Integer.parseInt(map.get("zcbZcZg").toString())+Integer.parseInt(map.get("xcbZcZg").toString())+Integer.parseInt(map.get("bzbZcZg").toString()); - map.put("ajbHjZsTable",ajbHjZs); - map.put("ajbHjZgTable",ajbHjZg); - map.put("allBuMenZs",allBuMenZs); - map.put("allBuMenHjZg",allBuMenHjZg); - return map; - } - - @Override - public PageData findForBi(PageData pageData) { - return hiddenMapper.findForBi(pageData); - } + @Override + public PageData findForBi(PageData pageData) { + return hiddenMapper.findForBi(pageData); + } } diff --git a/src/main/resources/application-master.properties b/src/main/resources/application-master.properties index 3aaeed88..47240c6c 100644 --- a/src/main/resources/application-master.properties +++ b/src/main/resources/application-master.properties @@ -1,12 +1,19 @@ datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver -datasource.no1.url=jdbc:mysql://172.16.130.92:3306/qa-czks-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 +datasource.no1.url=jdbc:mysql://172.16.11.147:33068/qa-cmt-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 datasource.no1.username=root -datasource.no1.password=Zcloud@888888 +datasource.no1.password=Mysql@zcloud88888 datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver -datasource.no2.url=jdbc:mysql://172.16.130.92:3306/qa-czks-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 +datasource.no2.url=jdbc:mysql://172.16.11.147:33068/qa-cmt-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 datasource.no2.username=root -datasource.no2.password=Zcloud@888888 +datasource.no2.password=Mysql@zcloud88888 + + + +datasource.no3.driver-class-name: oracle.jdbc.driver.OracleDriver +datasource.no3.url=jdbc:oracle:thin:@172.16.11.75:1521:orcl +datasource.no3.username=jkqask +datasource.no3.password=Qask@1115 #druid??? spring.datasource.type: com.alibaba.druid.pool.DruidDataSource #????? @@ -49,19 +56,30 @@ spring.http.encoding.force=true spring.http.encoding.enabled=true # ??springboot????banner spring.main.banner-mode=off +#jar???????? +#web.upload-path=h:/ +#web.front-path=h:/ +#spring.resources.static-locations=file:${web.upload-path},file:${web.front-path} -#???????????? -preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/ -qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/ +#preventionxgf.api.url=http://192.168.0.79:8088 +# +#qa-regulatory-gwj.api.url=http://192.168.0.79:8008 -smb.host=39.101.130.96 -smb.port=22 +preventionxgf.api.url=http://192.168.0.79:8088/ +qa-regulatory-gwj.api.url=http://192.168.0.79:8092/ +# tongbu地址 +tongbu.api.url=http://192.168.192.201:8971/qa-prevention-gwj-tongbu/ + + +#????? +smb.host=172.16.11.146 +smb.port=18822 smb.user=root -smb.password=Zcloud@zcloud88888 -smb.basePath=/mnt/wwag/file/ +smb.password=Sysadmin@m2q@XXB +smb.basePath=/mnt/web/file/ -#mq??????????? -rocketmq.name-server=172.16.130.91:9876 +#Mq\u914D\u7F6E +rocketmq.name-server=172.16.11.146:9876 rocketmq.producer.group=libmiddle rocketmq.producer.send-message-timeout=300000 rocketmq.producer.compress-message-body-threshold=4096 @@ -69,29 +87,48 @@ rocketmq.producer.max-message-size=4194304 rocketmq.producer.retry-times-when-send-failed=3 rocketmq.producer.retry-next-server=true rocketmq.producer.retry-times-when-send-async-failed=3 -## topic ???? - +## topic \u524D\u7F00 mq.topic.info=info mq.topic.eightWork=eightWork mq.group.info=scheduled_tasks mq.group.eightWork=scheduled_tasks_eightWork -# topic ???? mq.topic.docking=docking mq.topic.dockingPicture=dockingPicture mq.group.docking=scheduled_tasks_docking -#???? ?????? -perLoc.url=http://172.16.130.86/gateway-service -perLoc.userName=qaaqadmin -perLoc.pwd=Cfd2023@ +# \u4EBA\u5458\u5BF9\u63A5 +perLoc.url=http://172.16.11.145:8888 +# \u6E2F\u80A1\u4F01\u4E1A\u7AEF-app\u767B\u5F55\u9ED8\u8BA4 \u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740\uFF08\u66F9\u7164\u70AD\u4E0D\u7528\uFF09 +corp.default.pic-path=https://qgqy.qhdsafety.com/file/ +# \u6E2F\u80A1\u4F01\u4E1A\u7AEF-app\u767B\u5F55\u9ED8\u8BA4 \u540E\u53F0\u5730\u5740\u5730\u5740\uFF08\u66F9\u7164\u70AD\u4E0D\u7528\uFF09 +corp.default.back-end-path=https://qgqy.qhdsafety.com/ +# \u672C\u670D\u52A1\u56FE\u7247\u5730\u5740 +http.file.url=http://172.16.11.146:8991/file/ +# \u672C\u670D\u52A1\u56FE\u7247\u5730\u5740 +baseimgpath =http://10.30.20.146:8991/file/ -#????? ?????? -corp.default.pic-path=https://qgqy.qhdsafety.com/ -corp.default.back-end-path=https://qgqy.qhdsafety.com/file/ - -#?????? -http.file.url=http://172.16.130.91:9004/file/ -#?????? -baseimgpath =http://172.16.130.91:9004/file/ cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd +# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 +spring.redis.database=0 +# Redis\u670D\u52A1\u5668\u5730\u5740 +spring.redis.host=172.16.11.146 +# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 +spring.redis.port=63799 +# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 +spring.redis.password=redis@zcloud88888 +# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 +spring.redis.jedis.pool.max-active=20 +# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 +spring.redis.jedis.pool.max-wait=-1 +# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 +spring.redis.jedis.pool.max-idle=10 +# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 +spring.redis.jedis.pool.min-idle=0 +# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 +spring.redis.timeout=1000 + + + +# 隐患统计导出模板 +hidden.count.excel=/mnt/web/excelFile/hiddenCountExcel.xlsx \ No newline at end of file diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties deleted file mode 100644 index 9209c85b..00000000 --- a/src/main/resources/application-prod.properties +++ /dev/null @@ -1,132 +0,0 @@ - - -datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver -datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 -datasource.no1.username=root -datasource.no1.password=Mysql@zcloud88888 -datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver -datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 -datasource.no2.username=root -datasource.no2.password=Mysql@zcloud88888 - - -datasource.no3.driver-class-name: oracle.jdbc.driver.OracleDriver -datasource.no3.url=jdbc:oracle:thin:@172.16.11.75:1521:orcl -datasource.no3.username=jkqask -datasource.no3.password=Qask@1115 -#druid??? -spring.datasource.type: com.alibaba.druid.pool.DruidDataSource -#????? -spring.datasource.maxActive: 20 -#????? -spring.datasource.initialSize: 1 -#?????????? -spring.datasource.maxWait: 60000 -#??PSCache?????????PSCache??? -spring.datasource.poolPreparedStatements: true -spring.datasource.maxPoolPreparedStatementPerConnectionSize: 20 -#??connectionProperties?????mergeSql????SQL?? -#connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 -spring.datasource.minIdle: 1 -spring.datasource.timeBetweenEvictionRunsMillis: 60000 -spring.datasource.minEvictableIdleTimeMillis: 300000 -spring.datasource.validationQuery: select 1 from dual -spring.datasource.testWhileIdle: true -spring.datasource.testOnBorrow: false -spring.datasource.testOnReturn: false -#?????????filters????????sql?????,'wall'????? -filters: stat, wall, log4j - -#???????? -spring.cache.ehcache.cofnig=ehcache.xml - -#?????,?????sql?? -logging.level.com.zcloud.mapper=debug - -#???????? -spring.servlet.multipart.max-file-size=500MB -spring.servlet.multipart.max-request-size=500MB - -#activiti???? -spring.activiti.check-process-definitions=false - -#?? -spring.http.encoding.charset=UTF-8 -spring.http.encoding.force=true -spring.http.encoding.enabled=true -# ??springboot????banner -spring.main.banner-mode=off -#jar???????? -#web.upload-path=h:/ -#web.front-path=h:/ -#spring.resources.static-locations=file:${web.upload-path},file:${web.front-path} - -#preventionxgf.api.url=http://192.168.0.79:8088 -# -#qa-regulatory-gwj.api.url=http://192.168.0.79:8008 - -preventionxgf.api.url=http://192.168.0.79:8088/ -qa-regulatory-gwj.api.url=http://192.168.0.79:8092/ - - -#???????????? -baseimgpath = https://qgqy.qhdsafety.com/ - -#????? -smb.host=39.103.224.166 -smb.port=22 -smb.user=root -smb.password=Zcloud@zcloud88888 -smb.basePath=/mnt/qgfile/file/ -# \u6CA7\u5DDE\u77FF\u77F3\u7528\u6237\u6807\u8BC6 - -#Mq\u914D\u7F6E -rocketmq.consumer.group2=edu-admin-edit -rocketmq.consumer.group1=edu-admin-add -#rocketmq.name-server=10.0.140.141:9876 -#rocketmq.name-server=192.168.0.70:9876 -rocketmq.name-server=192.168.151.57:9876 -rocketmq.producer.group=libmiddle -rocketmq.producer.send-message-timeout=3000 -rocketmq.producer.compress-message-body-threshold=4096 -rocketmq.producer.max-message-size=4194304 -rocketmq.producer.retry-times-when-send-failed=3 -rocketmq.producer.retry-next-server=true -rocketmq.producer.retry-times-when-send-async-failed=3 -## topic \u524D\u7F00 - -mq.topic.info=info -mq.topic.eightWork=eightWork -mq.group.info=scheduled_tasks -mq.group.eightWork=scheduled_tasks_eightWork - -corp.default.pic-path=https://qgqy.qhdsafety.com/file/ -corp.default.back-end-path=http://192.168.151.57:8092/ -#\u5BF9\u63A5\u4EBA\u5458\u5B9A\u4F4D -perLoc.url=http://192.168.210.32:8084 -perLoc.userName=qaaqadmin -perLoc.pwd=Cfd2023@ -#\u6570\u636E\u540C\u6B65 -mq.topic.docking=docking -mq.group.docking=scheduled_tasks_docking - -cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd -# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 -spring.redis.database=0 -# Redis\u670D\u52A1\u5668\u5730\u5740 -spring.redis.host=127.0.0.1 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 -spring.redis.port=6379 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 -spring.redis.password= -# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.jedis.pool.max-active=20 -# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.jedis.pool.max-wait=-1 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.jedis.pool.max-idle=10 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.jedis.pool.min-idle=0 -# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 -spring.redis.timeout=1000 - diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties deleted file mode 100644 index d0a0a8e4..00000000 --- a/src/main/resources/application-test.properties +++ /dev/null @@ -1,120 +0,0 @@ -datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver -datasource.no1.url=jdbc:mysql://172.16.130.92:3306/qa-czks-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 -datasource.no1.username=root -datasource.no1.password=Zcloud@888888 -datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver -datasource.no2.url=jdbc:mysql://172.16.130.92:3306/qa-czks-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 -datasource.no2.username=root -datasource.no2.password=Zcloud@888888 - -datasource.no3.driver-class-name: oracle.jdbc.driver.OracleDriver -datasource.no3.url=jdbc:oracle:thin:@172.16.11.75:1521:orcl -datasource.no3.username=jkqask -datasource.no3.password=Qask@1115 -#druid??? -spring.datasource.type: com.alibaba.druid.pool.DruidDataSource -#????? -spring.datasource.maxActive: 20 -#????? -spring.datasource.initialSize: 1 -#?????????? -spring.datasource.maxWait: 60000 -#??PSCache?????????PSCache??? -spring.datasource.poolPreparedStatements: true -spring.datasource.maxPoolPreparedStatementPerConnectionSize: 20 -#??connectionProperties?????mergeSql????SQL?? -#connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 -spring.datasource.minIdle: 1 -spring.datasource.timeBetweenEvictionRunsMillis: 60000 -spring.datasource.minEvictableIdleTimeMillis: 300000 -spring.datasource.validationQuery: select 1 from dual -spring.datasource.testWhileIdle: true -spring.datasource.testOnBorrow: false -spring.datasource.testOnReturn: false -#?????????filters????????sql?????,'wall'????? -filters: stat, wall, log4j - -#???????? -spring.cache.ehcache.cofnig=ehcache.xml - -#?????,?????sql?? -logging.level.com.zcloud.mapper=debug - -#???????? -spring.servlet.multipart.max-file-size=500MB -spring.servlet.multipart.max-request-size=500MB - -#activiti???? -spring.activiti.check-process-definitions=false - -#?? -spring.http.encoding.charset=UTF-8 -spring.http.encoding.force=true -spring.http.encoding.enabled=true -# ??springboot????banner -spring.main.banner-mode=off - -#???????????? -preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/ -qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/ - -smb.host=39.101.130.96 -smb.port=22 -smb.user=root -smb.password=Zcloud@zcloud88888 -smb.basePath=/mnt/wwag/file/ - -#mq??????????? -rocketmq.name-server=172.16.130.91:9876 -rocketmq.producer.group=libmiddle -rocketmq.producer.send-message-timeout=300000 -rocketmq.producer.compress-message-body-threshold=4096 -rocketmq.producer.max-message-size=4194304 -rocketmq.producer.retry-times-when-send-failed=3 -rocketmq.producer.retry-next-server=true -rocketmq.producer.retry-times-when-send-async-failed=3 -## topic ???? - -mq.topic.info=info -mq.topic.eightWork=eightWork -mq.group.info=scheduled_tasks -mq.group.eightWork=scheduled_tasks_eightWork - -# topic ???? -mq.topic.docking=docking -mq.topic.dockingPicture=dockingPicture -mq.group.docking=scheduled_tasks_docking - -#???? ?????? -perLoc.url=http://172.16.130.86/gateway-service -perLoc.userName=qaaqadmin -perLoc.pwd=Cfd2023@ - -#????? ?????? -corp.default.pic-path=https://qgqy.qhdsafety.com/ -corp.default.back-end-path=https://qgqy.qhdsafety.com/file/ - -#?????? -http.file.url=http://172.16.130.91:9004/file/ -#?????? -baseimgpath =http://172.16.130.91:9004/file/ -cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd -# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 -spring.redis.database=0 -# Redis\u670D\u52A1\u5668\u5730\u5740 -spring.redis.host=127.0.0.1 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 -spring.redis.port=6379 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 -spring.redis.password= -# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.jedis.pool.max-active=20 -# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.jedis.pool.max-wait=-1 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.jedis.pool.max-idle=10 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.jedis.pool.min-idle=0 -# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 -spring.redis.timeout=1000 - diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 983576b9..82d282bd 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.application.name=qa-prevention-cmt server.port=8091 -spring.profiles.active= @spring.profiles.active@ +spring.profiles.active= master