diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java index b0c8389..39bf673 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java @@ -487,7 +487,7 @@ public class AppSafetyEnvironmentalController extends BaseController { } // 2、整理特殊数据 // 2、1检查人将检查状态 - if ("2,3,4".contains(safety.getString("order"))) { + if ("1,2,3,4".contains(safety.getString("order"))) { List inspectors = inspectorService.listAll(condition); nodes.stream() .filter(n -> "1".equals(n.getOrder())) diff --git a/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java b/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java index 0cb2006..8afc65b 100644 --- a/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java +++ b/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java @@ -148,7 +148,7 @@ public class AppEightWorkController extends BaseController { ReturnMap returnMap = new ReturnMap(); PageData pd = new PageData(); pd = this.getPageData(); - JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999); + JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999,0); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); diff --git a/src/main/java/com/zcloud/controller/hidden/HiddenController.java b/src/main/java/com/zcloud/controller/hidden/HiddenController.java index 826e2e7..80fc098 100644 --- a/src/main/java/com/zcloud/controller/hidden/HiddenController.java +++ b/src/main/java/com/zcloud/controller/hidden/HiddenController.java @@ -1969,6 +1969,9 @@ public class HiddenController extends BaseController { if ("-2".equals(pd.getString("HIDDEN_STATUS"))) { pd.put("ISCONFIRM", "0"); // pd.put("CONFIRM_TIME", DateUtil.date2Str(new Date())); + pd.put("CONFIRM_USER", Jurisdiction.getUSER_ID()); + pd.put("STATE","1"); + pd.put("RECTIFICATIONTYPE","2"); if (list.size() == 0) { inspection.put("INSPECTION_STATUS", "5"); // 指派完成 } else { diff --git a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java index 454fc5a..b909250 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java @@ -132,6 +132,7 @@ public class AppKeyprojectCheckController extends BaseController { hidden.put("RECTIFYDESCR", json.getString("RECTIFYDESCR")); //整改描述 hidden.put("RECTIFICATIONDEPT", json.getString("RECTIFICATIONDEPT")); //整改部门 hidden.put("RECTIFICATIONOR", json.getString("RECTIFICATIONOR")); //整改人 + hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPE_NAME")); //整改人 hidden.put("CREATOR", pd.getString("CREATOR")); //发现人(隐患责任人) hidden.put("SOURCE", json.getString("SOURCE")); //隐患来源 hidden.put("STATE", "1"); //隐患状态 100-安全环保检查暂存的隐患(流程完转0) diff --git a/src/main/java/com/zcloud/controller/positioning/MapSettingController.java b/src/main/java/com/zcloud/controller/positioning/MapSettingController.java index 875cf28..7cdf619 100644 --- a/src/main/java/com/zcloud/controller/positioning/MapSettingController.java +++ b/src/main/java/com/zcloud/controller/positioning/MapSettingController.java @@ -35,7 +35,7 @@ public class MapSettingController extends BaseController { PageData pageData = this.getPageData(); ReturnMap returnMap = new ReturnMap(); JSONObject body = PLSUtil.getLayerList( - Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("KEYWORDS")); + Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("str")); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); returnMap.put("varList", list); @@ -130,7 +130,9 @@ public class MapSettingController extends BaseController { @ResponseBody public ReturnMap getFenceList() throws Exception { PageData pageData = this.getPageData(); - return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("KEYWORDS"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")))); + return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), + Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), + Integer.parseInt(pageData.getString("type")))); } diff --git a/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java b/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java index ed4f4d3..3915bc4 100644 --- a/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java +++ b/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java @@ -97,12 +97,14 @@ public class PositAlarmController extends BaseController { */ @RequestMapping(value = "/otherRegion/list") @ResponseBody - public ReturnMap otherRegionList() throws Exception { + public ReturnMap otherRegionList(Page page) throws Exception { PageData pageData = this.getPageData(); ReturnMap returnMap = new ReturnMap(); - JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("KEYWORDS"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount"))); + JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")),Integer.parseInt(pageData.getString("type"))); if (body != null) { returnMap.putAll(body); + page.setTotalResult(body.getIntValue("total")); + returnMap.put("page", page); } return returnMap; } @@ -253,12 +255,14 @@ public class PositAlarmController extends BaseController { */ @RequestMapping(value = "/electronicFence/list") @ResponseBody - public ReturnMap electronicFenceList() throws Exception { + public ReturnMap electronicFenceList(Page page) throws Exception { PageData pageData = this.getPageData(); ReturnMap returnMap = new ReturnMap(); JSONObject body = PLSUtil.GeneralList("/region/electronicFence/list", pageData); if (body != null) { returnMap.putAll(body); + page.setTotalResult(body.getIntValue("total")); + returnMap.put("page", page); } return returnMap; } @@ -337,6 +341,7 @@ public class PositAlarmController extends BaseController { JSONArray regions = JSONObject.parseArray(pageData.getString("regions")); JSONArray regId1 = JSONObject.parseArray(pageData.getString("regId1")); JSONArray doubles = JSONObject.parseArray(pageData.getString("doubles")); + JSONArray regGatherId = JSONObject.parseArray(pageData.getString("regGatherId")); pageData.put("eleType", list); pageData.put("eleDept", eleDept); pageData.put("eleCrossed", eleCrossed); @@ -344,6 +349,7 @@ public class PositAlarmController extends BaseController { pageData.put("regId", regId); pageData.put("regId1", regId1); pageData.put("doubles", doubles); + pageData.put("regGatherId", regGatherId); ReturnMap returnMap = new ReturnMap(); JSONObject body = PLSUtil.GeneralPost("/region/electronicFence/", pageData, Jurisdiction.getCORPINFO_ID()); @@ -390,4 +396,82 @@ public class PositAlarmController extends BaseController { } return returnMap; } + + + /* + * 聚集告警记录 + * */ + + @RequestMapping(value = "/getAlarmRecordList") + @ResponseBody + public ReturnMap getAlarmRecordList(Page page) throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + // /old/gatherAlarms/regAlarmGatherList?pageNum=1&pageSize=10&status=1 + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/regAlarmGatherList", pageData); + if (body != null) { + returnMap.putAll(body); + page.setTotalResult(body.getIntValue("total")); + returnMap.put("page", page); + } + return returnMap; + } + + /* 聚集概览 */ + /** + * @Description: 聚集告警趋势统计 + * @Author: dearLin + * @Date: 2024/2/26/026 9:20 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: com.zcloud.util.ReturnMap + */ + @RequestMapping(value = "/aggregateAlarmTrends") + @ResponseBody + public ReturnMap aggregateAlarmTrends() throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + // /old/gatherAlarms/aggregateAlarmTrends?type=2&time=2023-12-18 + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateAlarmTrends", pageData); + if (body != null) { + returnMap.putAll(body); + } + return returnMap; + } + /** + * @Description: 根据告警区域进行聚集数据统计 + * @Author: dearLin + * @Date: 2024/2/26/026 9:20 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: com.zcloud.util.ReturnMap + */ + @RequestMapping(value = "/aggregateDataStatisticsByGroup") + @ResponseBody + public ReturnMap aggregateDataStatisticsByGroup() throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateDataStatisticsByGroup", pageData); + if (body != null) { + returnMap.putAll(body); + } + return returnMap; + } + + /** + * @Description: 根据告警等级进行聚集数据统计 + * @Author: dearLin + * @Date: 2024/2/26/026 9:20 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: com.zcloud.util.ReturnMap + */ + @RequestMapping(value = "/aggregateDataStatistics") + @ResponseBody + public ReturnMap aggregateDataStatistics() throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateDataStatistics", pageData); + if (body != null) { + returnMap.putAll(body); + } + return returnMap; + } } diff --git a/src/main/java/com/zcloud/controller/positioning/UserCardController.java b/src/main/java/com/zcloud/controller/positioning/UserCardController.java index 79f1aa6..5784cf8 100644 --- a/src/main/java/com/zcloud/controller/positioning/UserCardController.java +++ b/src/main/java/com/zcloud/controller/positioning/UserCardController.java @@ -36,7 +36,7 @@ public class UserCardController extends BaseController { ReturnMap returnMap = new ReturnMap(); page.setPd(pageData); JSONObject body = PLSUtil.getUserCardDataList( - Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("KEYWORDS")); + Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("str")); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); returnMap.put("varList", list); diff --git a/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java b/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java index b4cfbd5..f21c815 100644 --- a/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java +++ b/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java @@ -237,7 +237,7 @@ public class IdentificationPartsController extends BaseController { PageData pageData = this.getPageData(); String KEYWORDS = (String) pageData.getOrDefault("KEYWORDS", ""); - JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount"))); + JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount")),0); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); diff --git a/src/main/java/com/zcloud/controller/system/AppImgFilesController.java b/src/main/java/com/zcloud/controller/system/AppImgFilesController.java index 7ece195..b1ff3f6 100644 --- a/src/main/java/com/zcloud/controller/system/AppImgFilesController.java +++ b/src/main/java/com/zcloud/controller/system/AppImgFilesController.java @@ -53,12 +53,21 @@ public class AppImgFilesController extends BaseController { Map map = new HashMap(); String errInfo = "success"; if (files != null && files.length > 0) { + for (int i = 0; i < files.length; i++) { + String suffixName = files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); + if (!"json".equals(suffixName) && !"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) { + errInfo = "fail"; + map.put("result", errInfo); + map.put("msg", "文件格式不正确!"); + return map; + } + } for (int i = 0; i < files.length; i++) { MultipartFile file = files[i]; // 保存文件 File tempFile = new File(file.getOriginalFilename()); FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); - if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("3")) {//四色图改为json文件,不用判断类型 + if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("3") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型 map.put("result", "failed"); map.put("exception", "上传图片格式不正确,请重新上传"); return map; @@ -79,7 +88,7 @@ public class AppImgFilesController extends BaseController { String ffile = DateUtil.getDays(); // String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 // String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd.put("IMGFILES_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java b/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java index 24abed2..56226f3 100644 --- a/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java +++ b/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java @@ -51,7 +51,11 @@ public class Node { case "2": break; case "3": - this.text = this.text + "
被检查人:" + information.getString("INSPECTED_SITEUSER_NAME") + "
(" + information.getString("INSPECTED_SITEUSER_SIGN_TIME") + ")"; + if (StringUtils.isNotBlank(information.getString("INSPECTED_SITEUSER_SIGN_TIME"))) { + this.text = this.text + "
被检查人:" + information.getString("INSPECTED_SITEUSER_NAME") + "
(" + information.getString("INSPECTED_SITEUSER_SIGN_TIME") + ")"; + } else { + this.text = this.text + "
被检查人:" + information.getString("INSPECTED_SITEUSER_NAME"); + } break; case "4": break; diff --git a/src/main/java/com/zcloud/util/PLSUtil.java b/src/main/java/com/zcloud/util/PLSUtil.java index c2071ad..a911be9 100644 --- a/src/main/java/com/zcloud/util/PLSUtil.java +++ b/src/main/java/com/zcloud/util/PLSUtil.java @@ -302,11 +302,11 @@ public class PLSUtil { * @Param: [java.lang.String, java.lang.Integer, java.lang.Integer] [keywords, currentPage, showCount] * @Return: com.alibaba.fastjson.JSONObject */ - public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords, Integer currentPage, Integer showCount) throws Exception { + public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords, Integer currentPage, Integer showCount,Integer type) throws Exception { HttpHeaders headers = new HttpHeaders(); String url = "/region/region/list?pageNum=" + currentPage + - "&pageSize=" + showCount + "&type=0" + + "&pageSize=" + showCount + "&type=" +type+ "&str="; if (Tools.notEmpty(keywords)) url += keywords; headers.set("Authorization", getToken(CORPINFO_ID)); diff --git a/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml b/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml index 7a0f7b1..71072c1 100644 --- a/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml +++ b/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml @@ -1610,8 +1610,8 @@ SELECT t.*, - COUNT(distinct p.SAFETY_MEETING_ID) ALL_SIGNATURES, + (select count(*) from safety_meeting_people m where m.SAFETY_MEETING_ID = t.SAFETY_MEETING_ID and m.ISDELETE = 0) ALL_SIGNATURES, COUNT(distinct p.FEED_BACK) SIGNATURES, GROUP_CONCAT( distinct i.FILEPATH ) imgs FROM @@ -96,8 +96,8 @@ LEFT JOIN bus_imgfiles i ON t.SAFETY_MEETING_ID = i.FOREIGN_KEY LEFT JOIN safety_meeting_people p ON t.SAFETY_MEETING_ID = p.SAFETY_MEETING_ID and p.ISDELETE = 0 where t.ISDELETE = '0' and t.CORPINFO_ID = #{pd.CORPINFO_ID} - - and t.SAFETY_MEETING_TITLE like '%${pd.SAFETY_MEETING_TITLE}%' + + and t.SAFETY_MEETING_TITLE like '%${pd.KEYWORDS}%' GROUP BY t.SAFETY_MEETING_ID diff --git a/src/main/resources/mybatis/datasource/specialoperation/PersonnelManagementMapper.xml b/src/main/resources/mybatis/datasource/specialoperation/PersonnelManagementMapper.xml index 7747fb3..8c9df27 100644 --- a/src/main/resources/mybatis/datasource/specialoperation/PersonnelManagementMapper.xml +++ b/src/main/resources/mybatis/datasource/specialoperation/PersonnelManagementMapper.xml @@ -189,9 +189,9 @@ left join sys_dictionaries o on o.DICTIONARIES_ID = f.OPERATIONITEM left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID left join bus_units r on r.UNITS_ID = f.UNITS_ID - LEFT JOIN sys_user u on f.CREATOR = u.USERNAME + LEFT JOIN sys_user u on f.CREATOR = u.USERNAME and u.ISDELETE = '0' LEFT JOIN bus_corp_info c on u.CORPINFO_ID = c.CORPINFO_ID - where f.ISDELETE = '0' + where f.ISDELETE = '0' and u.ISDELETE = '0' and ( @@ -266,10 +266,12 @@