From afdea2e5bbba566629c2fb9f9c99e1a612834b14 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Wed, 27 Aug 2025 17:47:11 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhgd/xmgl/call/SmartJavaAIOcrCall.java | 8 +-- .../basicdata/controller/ApiController.java | 2 +- .../controller/SystemUserController.java | 2 + .../basicdata/mapper/xml/SystemUserMapper.xml | 18 +++++ .../ocr/controller/OcrBuildLogController.java | 2 +- .../controller/RiskListDetailController.java | 4 +- .../controller/RiskListLibraryController.java | 2 +- .../controller/RiskListPointController.java | 19 ++++-- .../controller/RiskListSourceController.java | 6 +- .../dto/RiskListSourceUnbuiltAddDto.java | 7 +- .../risk/entity/vo/RiskListPointVo.java | 7 ++ .../impl/RiskListPointServiceImpl.java | 36 ++++------ .../controller/DepartmentInfoController.java | 2 +- .../worker/controller/TeamInfoController.java | 14 ++-- .../WorkerAttendanceController.java | 2 +- ...DailyAttendanceStatisticsV2Controller.java | 16 ++--- .../mapper/xml/DepartmentInfoMapper.xml | 2 +- .../worker/mapper/xml/TeamInfoMapper.xml | 4 +- ...rityQualityInspectionRecordController.java | 2 +- ...ualityInspectionRecordDraftController.java | 6 +- ...tyQualityInspectionRecordSourceAddDto.java | 8 ++- ...rityQualityInspectionRecordDraftMapper.xml | 31 +++++++++ ...zSecurityQualityInspectionRecordMapper.xml | 4 +- .../XzSecurityDangerFieldServiceImpl.java | 2 + ...ityQualityInspectionRecordServiceImpl.java | 26 ++++--- ...curityQualityRectifyRecordServiceImpl.java | 10 ++- .../util/{Fileutils.java => FileUtils.java} | 67 ++++++++++++++++++- 27 files changed, 226 insertions(+), 83 deletions(-) rename src/main/java/com/zhgd/xmgl/util/{Fileutils.java => FileUtils.java} (71%) diff --git a/src/main/java/com/zhgd/xmgl/call/SmartJavaAIOcrCall.java b/src/main/java/com/zhgd/xmgl/call/SmartJavaAIOcrCall.java index f49503e04..cb1bec62a 100644 --- a/src/main/java/com/zhgd/xmgl/call/SmartJavaAIOcrCall.java +++ b/src/main/java/com/zhgd/xmgl/call/SmartJavaAIOcrCall.java @@ -14,7 +14,7 @@ import com.alibaba.fastjson.JSONObject; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.xmgl.call.api.OcrManufacturer; import com.zhgd.xmgl.modules.ocr.entity.OcrConfig; -import com.zhgd.xmgl.util.Fileutils; +import com.zhgd.xmgl.util.FileUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; @@ -63,8 +63,8 @@ public class SmartJavaAIOcrCall implements OcrManufacturer { recModelConfig.setRecModelEnum(CommonRecModelEnum.PP_OCR_V5_MOBILE_REC_MODEL); //指定识别模型位置,需要更改为自己的模型路径(下载地址请查看文档) // recModelConfig.setRecModelPath("/Users/xxx/Documents/develop/model/ocr/PP-OCRv5_mobile_rec_infer/PP-OCRv5_mobile_rec_infer.onnx"); - Fileutils.getExportTemplateFile("/models/ocr/dict.txt"); - recModelConfig.setRecModelPath(Fileutils.getExportTemplateFile("/models/ocr/PP-OCRv5_mobile_rec_infer.onnx").getAbsolutePath()); + FileUtils.getExportTemplateFile("/models/ocr/dict.txt"); + recModelConfig.setRecModelPath(FileUtils.getExportTemplateFile("/models/ocr/PP-OCRv5_mobile_rec_infer.onnx").getAbsolutePath()); recModelConfig.setDevice(device); recModelConfig.setTextDetModel(getDetectionModel()); return OcrModelFactory.getInstance().getRecModel(recModelConfig); @@ -81,7 +81,7 @@ public class SmartJavaAIOcrCall implements OcrManufacturer { config.setModelEnum(CommonDetModelEnum.PP_OCR_V5_MOBILE_DET_MODEL); //指定模型位置,需要更改为自己的模型路径(下载地址请查看文档) // config.setDetModelPath("/Users/xxx/Documents/develop/model/ocr/PP-OCRv5_mobile_det_infer/PP-OCRv5_mobile_det_infer.onnx"); - config.setDetModelPath(Fileutils.getExportTemplateFile("/models/ocr/PP-OCRv5_mobile_det_infer.onnx").getAbsolutePath()); + config.setDetModelPath(FileUtils.getExportTemplateFile("/models/ocr/PP-OCRv5_mobile_det_infer.onnx").getAbsolutePath()); config.setDevice(device); return OcrModelFactory.getInstance().getDetModel(config); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/ApiController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/ApiController.java index a536f13b5..c536319d2 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/ApiController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/ApiController.java @@ -163,7 +163,7 @@ public class ApiController { public Result> getFileList(@RequestBody Map map) { Result> result = new Result>(); try { - result.setResult(Fileutils.getFileNameList(path, MapUtils.getString(map, "startTime"), MapUtils.getString(map, "endTime"))); + result.setResult(FileUtils.getFileNameList(path, MapUtils.getString(map, "startTime"), MapUtils.getString(map, "endTime"))); result.setSuccess(true); } catch (Exception e) { log.error("error:", e); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java index 87ca4cc6b..60ac61403 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java @@ -173,6 +173,8 @@ public class SystemUserController { @ApiImplicitParam(name = "roleName", required = false, value = "角色名称", paramType = "body"), @ApiImplicitParam(name = "isSupervisingRoleName", required = false, value = "1监理角色名称的人", paramType = "body"), @ApiImplicitParam(name = "safeQualityRegionIdForDuty", required = false, value = "安全区域id(多个,分割)查责任人", paramType = "body"), + @ApiImplicitParam(name = "teamIdList", required = false, value = "班组idList", paramType = "body"), + @ApiImplicitParam(name = "departmentIdList", required = false, value = "部门idList", paramType = "body"), }) @PostMapping(value = "/getProjectChilderSystemUserList") public Result> getProjectChilderSystemUserList(@RequestBody Map map) { diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml index 91d423efc..770f8ff4e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml @@ -66,6 +66,24 @@ and t.sn = #{param.projectSn} and t.account_type = 6 + + and (1=0 + + or c1.id in + + #{item} + + + + or b1.id in + + #{item} + + + ) + and (b1.team_name like CONCAT(CONCAT('%', #{param.departmentTeamName}), '%') or c1.department_name like CONCAT(CONCAT('%', #{param.departmentTeamName}), '%')) diff --git a/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java b/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java index 85b8e5142..ae3bf21d8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java +++ b/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java @@ -237,7 +237,7 @@ public class OcrBuildLogController { map.put("updateTime", logVo.getUpdateTime()); map.put("projectSn", logVo.getProjectSn()); map.put("uploaderId", logVo.getUploaderId()); - String url = Fileutils.getExportTemplateFile("word/ocr施工日志导出模版.docx").getAbsolutePath(); + String url = FileUtils.getExportTemplateFile("word/ocr施工日志导出模版.docx").getAbsolutePath(); File wordFile = new File(wordDir, logVo.getConstructionAreaNames() + DateUtil.formatDate(logVo.getDate()) + ".docx"); EasyPoiUtil.exportNewLineWord(map, url, wordFile); EasyPoiUtil.wordToPdfExport(wordFile, new File(dir, logVo.getConstructionAreaNames() + DateUtil.formatDate(logVo.getDate()) + ".pdf").getAbsolutePath()); diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListDetailController.java b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListDetailController.java index 3095ee4fd..c0a6f57b3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListDetailController.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListDetailController.java @@ -23,7 +23,7 @@ import com.zhgd.xmgl.modules.risk.service.IRiskListDetailService; import com.zhgd.xmgl.modules.risk.service.IRiskListLibraryService; import com.zhgd.xmgl.modules.risk.service.IRiskListPotentialAccidentTypeService; import com.zhgd.xmgl.util.ExcelUtils; -import com.zhgd.xmgl.util.Fileutils; +import com.zhgd.xmgl.util.FileUtils; import com.zhgd.xmgl.util.MessageUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -365,7 +365,7 @@ public class RiskListDetailController { Map> root = new HashMap<>(4); root.put(0, firstSheetMap); putOtherSheets(sn, root); - templateUrl = Fileutils.getExportTemplateFile("excel/风险清单详情导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/风险清单详情导出模板.xlsx").getAbsolutePath(); // templateUrl = new File("C:\\Users\\Administrator\\IdeaProjects\\wisdomisite-with-flowjar\\tmp\\风险清单详情导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl, root.keySet().toArray(new Integer[]{})); Workbook workbook = ExcelExportUtil.exportExcel(root, params); diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListLibraryController.java b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListLibraryController.java index 000b5d5f8..e56253f8f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListLibraryController.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListLibraryController.java @@ -447,7 +447,7 @@ public class RiskListLibraryController { Map> root = new HashMap<>(4); root.put(0, firstSheetMap); putOtherSheets(sn, root); - templateUrl = Fileutils.getExportTemplateFile("excel/风险清单库导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/风险清单库导出模板.xlsx").getAbsolutePath(); // templateUrl = new File("C:\\Users\\Administrator\\IdeaProjects\\wisdomisite-with-flowjar\\tmp\\风险清单库导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl, root.keySet().toArray(new Integer[]{})); Workbook workbook = ExcelExportUtil.exportExcel(root, params); diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListPointController.java b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListPointController.java index 6b439bf99..4b8e922c9 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListPointController.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListPointController.java @@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.risk.controller; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; import cn.hutool.core.util.StrUtil; @@ -30,7 +31,7 @@ import com.zhgd.xmgl.modules.risk.service.IRiskListSourceService; import com.zhgd.xmgl.security.entity.UserInfo; import com.zhgd.xmgl.security.util.SecurityUtils; import com.zhgd.xmgl.util.ExcelUtils; -import com.zhgd.xmgl.util.Fileutils; +import com.zhgd.xmgl.util.FileUtils; import com.zhgd.xmgl.util.MapBuilder; import com.zhgd.xmgl.util.RefUtil; import io.swagger.annotations.Api; @@ -274,15 +275,23 @@ public class RiskListPointController { @ApiOperation(value = "风险点清单导出excel记录", notes = "风险点清单导出excel记录", httpMethod = "POST") @ApiImplicitParams({ - @ApiImplicitParam(name = "pointIds", value = "管控清单风险点ids(多个,分割)", paramType = "body", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pointIds", value = "管控清单风险点ids(多个,分割)", paramType = "body", required = false, dataType = "Integer"), }) @PostMapping(value = "/exportRiskPointXls") public void exportRiskPointXls(HttpServletResponse response, @RequestBody HashMap param) { String templateUrl = null; try { Map map = new HashMap<>(); - List points = riskListPointService.list(new LambdaQueryWrapper() - .in(RiskListPoint::getId, StrUtil.split(MapUtils.getString(param, "pointIds"), ","))); + List points; + String pointIds = MapUtils.getString(param, "pointIds"); + if (StrUtil.isNotBlank(pointIds)) { + points = riskListPointService.list(new LambdaQueryWrapper() + .in(RiskListPoint::getId, StrUtil.split(pointIds, ","))).stream().map(o -> BeanUtil.toBean(o, RiskListPointVo.class)).collect(Collectors.toList()); + } else { + param.put("pageNo", 1); + param.put("pageSize", -1); + points = riskListPointService.queryPageList(param).getRecords(); + } List> listMap = new ArrayList<>(); for (int i = 0; i < points.size(); i++) { Map objectMap = new HashMap<>(); @@ -294,7 +303,7 @@ public class RiskListPointController { listMap.add(objectMap); } map.put("listMap", listMap); - templateUrl = Fileutils.getExportTemplateFile("excel/风险点清单导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/风险点清单导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); Workbook workbook = ExcelExportUtil.exportExcel(params, map); //设置下拉 diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListSourceController.java b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListSourceController.java index 06b726a64..8fcbeea4c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListSourceController.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/controller/RiskListSourceController.java @@ -528,7 +528,7 @@ public class RiskListSourceController { } else { tempFileName = "静态危险源辨识清单导出模板.xlsx"; } - templateUrl = Fileutils.getExportTemplateFile("excel/" + tempFileName).getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/" + tempFileName).getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); Workbook workbook = ExcelExportUtil.exportExcel(params, map); //合并列 @@ -570,7 +570,7 @@ public class RiskListSourceController { listMap.add(objectMap); } map.put("listMap", listMap); - templateUrl = Fileutils.getExportTemplateFile("excel/危险源清单导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/危险源清单导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); Workbook workbook = ExcelExportUtil.exportExcel(params, map); ExcelUtils.downLoadExcel("危险源清单导出模板.xlsx", response, workbook); @@ -649,7 +649,7 @@ public class RiskListSourceController { listMap.add(objectMap); } map.put("listMap", listMap); - templateUrl = Fileutils.getExportTemplateFile("excel/隐患排查计划导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/隐患排查计划导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); Workbook workbook = ExcelExportUtil.exportExcel(params, map); //设置下拉 diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/entity/dto/RiskListSourceUnbuiltAddDto.java b/src/main/java/com/zhgd/xmgl/modules/risk/entity/dto/RiskListSourceUnbuiltAddDto.java index e17689bfb..0c0d1a36d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/entity/dto/RiskListSourceUnbuiltAddDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/entity/dto/RiskListSourceUnbuiltAddDto.java @@ -12,13 +12,14 @@ import java.util.List; @Data public class RiskListSourceUnbuiltAddDto extends RiskListSourceUnbuilt { /** - * 区域和风险点List + * 区域和风险点List(传这个或sourceIdList) */ + @ApiModelProperty("区域和风险点List(传这个或sourceIdList)") private List regionPointList; /** - * 危险源idList + * 危险源idList(传这个或regionPointList) */ - @ApiModelProperty("危险源idList") + @ApiModelProperty("危险源idList(传这个或regionPointList)") private List sourceIdList; @Data diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/entity/vo/RiskListPointVo.java b/src/main/java/com/zhgd/xmgl/modules/risk/entity/vo/RiskListPointVo.java index 626a4073a..0eac02fe1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/entity/vo/RiskListPointVo.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/entity/vo/RiskListPointVo.java @@ -4,6 +4,8 @@ import com.zhgd.xmgl.modules.risk.entity.RiskListPoint; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + @Data public class RiskListPointVo extends RiskListPoint { /** @@ -16,5 +18,10 @@ public class RiskListPointVo extends RiskListPoint { */ @ApiModelProperty(value = "我的待办的危险源数(未排查)") private java.lang.Integer hazardSourceNumberTodo; + /** + * 我的待办的危险源idList(未排查) + */ + @ApiModelProperty(value = "我的待办的危险源idList(未排查)") + private List hazardSourceNumberTodoIdList; } diff --git a/src/main/java/com/zhgd/xmgl/modules/risk/service/impl/RiskListPointServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/risk/service/impl/RiskListPointServiceImpl.java index d52513535..3d70e9b68 100644 --- a/src/main/java/com/zhgd/xmgl/modules/risk/service/impl/RiskListPointServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/risk/service/impl/RiskListPointServiceImpl.java @@ -27,10 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; /** @@ -115,26 +112,19 @@ public class RiskListPointServiceImpl extends ServiceImpl pointIdMap = sourceVos.stream().collect(Collectors.groupingBy(RiskListSource::getPointId)).entrySet().stream() - .map(m -> { - List voList = m.getValue(); - long count = voList.stream().filter(riskListSourceVo -> { - List areaIdList; - if (Objects.equals(isMySourceToDo, 1)) { - areaIdList = riskListSourceVo.getUnCheckAreaIdList(); - } else { - areaIdList = riskListSourceVo.getUnWorkableAreaIdList(); - } - return areaIdList.contains(regionIds); - }).count(); - Map rm = new HashMap<>(); - rm.put("pid", String.valueOf(m.getKey())); - rm.put("num", String.valueOf(count)); - return rm; - }).collect(Collectors.toMap(m -> MapUtils.getLong(m, "pid"), o -> MapUtils.getInteger(o, "num"), (o1, o2) -> o1)); + //pointId到我的待办风险源idList + Map> pointIdMap = sourceVos.stream().filter(sourceVo -> { + List areaIdList; + if (Objects.equals(isMySourceToDo, 1)) { + areaIdList = sourceVo.getUnCheckAreaIdList(); + } else { + areaIdList = sourceVo.getUnWorkableAreaIdList(); + } + return areaIdList.contains(regionIds); + }).collect(Collectors.groupingBy(RiskListSource::getPointId)); list = list.stream().filter(p -> pointIdMap.containsKey(p.getId())).peek(p -> { - p.setHazardSourceNumberTodo(pointIdMap.get(p.getId())); + p.setHazardSourceNumberTodo(Optional.ofNullable(pointIdMap.get(p.getId())).map(m -> m.size()).orElse(null)); + p.setHazardSourceNumberTodoIdList(Optional.ofNullable(pointIdMap.get(p.getId())).map(m -> m.stream().map(RiskListSource::getId).collect(Collectors.toList())).orElse(null)); }).collect(Collectors.toList()); } } diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/controller/DepartmentInfoController.java b/src/main/java/com/zhgd/xmgl/modules/worker/controller/DepartmentInfoController.java index d0a222851..23cf7300a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/controller/DepartmentInfoController.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/controller/DepartmentInfoController.java @@ -117,7 +117,7 @@ public class DepartmentInfoController { @ApiOperation(value = "列表查询劳务人员部门信息", notes = "列表查询劳务人员部门信息", httpMethod = "POST") @ApiImplicitParams({ - @ApiImplicitParam(name = "enterpriseId", value = "企业ID", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "enterpriseId", value = "企业ID(多个,分割)", paramType = "body", required = true, dataType = "String"), @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"), @ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "body", required = false, dataType = "String"), }) diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/controller/TeamInfoController.java b/src/main/java/com/zhgd/xmgl/modules/worker/controller/TeamInfoController.java index cce2c4e09..f8cf31553 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/controller/TeamInfoController.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/controller/TeamInfoController.java @@ -116,13 +116,13 @@ public class TeamInfoController { @ApiOperation(value = "列表查询劳务人员班组信息", notes = "列表查询劳务人员班组信息", httpMethod = "POST") @ApiImplicitParams({ - @ApiImplicitParam(name = "enterpriseId", value = "企业ID", paramType = "body", required = true, dataType = "String"), - @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"), - @ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "body", required = false, dataType = "String"), - @ApiImplicitParam(name = "isSpecial", value = "1是特殊工种,0不是", paramType = "body", required = false, dataType = "String"), - @ApiImplicitParam(name = "workerTypeId", value = "工种id", paramType = "body", required = false, dataType = "String"), - @ApiImplicitParam(name = "containEnterpriseId", value = "包含下级的单位id", paramType = "body", required = false, dataType = "String"), - }) + @ApiImplicitParam(name = "enterpriseId", value = "企业ID(多个,分割)", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "isSpecial", value = "1是特殊工种,0不是", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "workerTypeId", value = "工种id", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "containEnterpriseId", value = "包含下级的单位id", paramType = "body", required = false, dataType = "String"), + }) @PostMapping(value = "/getTeamInfoList") public Result> getTeamInfoList(@RequestBody Map map) { return Result.success(teamInfoService.getTeamInfoList(map)); diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerAttendanceController.java b/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerAttendanceController.java index 06f44e7dc..6e59be530 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerAttendanceController.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerAttendanceController.java @@ -601,7 +601,7 @@ public class WorkerAttendanceController { listMap.add(objectMap); } map.put("listMap", listMap); - templateUrl = Fileutils.getExportTemplateFile("excel/人员考勤记录导出.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/人员考勤记录导出.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); Workbook workbook = ExcelExportUtil.exportExcel(params, map); ExcelUtils.exportPicture(workbook, 0, imageBytesList, 1, 8, 1); diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerDailyAttendanceStatisticsV2Controller.java b/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerDailyAttendanceStatisticsV2Controller.java index c22bbcee8..71a690f85 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerDailyAttendanceStatisticsV2Controller.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerDailyAttendanceStatisticsV2Controller.java @@ -36,7 +36,7 @@ import com.zhgd.xmgl.modules.worker.service.impl.WorkerInfoServiceImpl; import com.zhgd.xmgl.security.util.SecurityUtils; import com.zhgd.xmgl.util.EasyPoiUtil; import com.zhgd.xmgl.util.ExcelUtils; -import com.zhgd.xmgl.util.Fileutils; +import com.zhgd.xmgl.util.FileUtils; import com.zhgd.xmgl.util.PathUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -410,7 +410,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { map.put("title", project.getProjectName() + "工时统计表(" + minDate + "~" + maxDate + ")"); map.put("listMap", listMap); map.put("date", "导出时间:" + DateUtil.format(new Date(), "yyyy年MM月dd日")); - templateUrl = Fileutils.getExportTemplateFile("excel/考勤工时统计表导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/考勤工时统计表导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); //开启横向遍历 开启横向遍历 开启横向遍历 params.setColForEach(true); @@ -473,7 +473,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { map.put("listMap", listMap); map.put("date", "导出时间:" + DateUtil.format(new Date(), "yyyy年MM月dd日")); - templateUrl = Fileutils.getExportTemplateFile("excel/考勤异常工时统计表导出模板.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/考勤异常工时统计表导出模板.xlsx").getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl); //开启横向遍历 开启横向遍历 开启横向遍历 params.setColForEach(true); @@ -748,7 +748,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { sheetMap.put("listMap", listMap); root.put(j++, sheetMap); } - templateUrl = Fileutils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); String outputTemplateFilePath = PathUtil.getBasePath() + "/temp/" + IdUtil.randomUUID() + ".xlsx"; EasyPoiUtil.cloneSheetMultipleTimes(templateUrl, outputTemplateFilePath, "1", dateTimes.size() - 1); TemplateExportParams params = new TemplateExportParams(outputTemplateFilePath, true); @@ -931,7 +931,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { for (int i = 11 + dateTimes.size(); i < 11 + 31; i++) { delColIndexes.add(i); } - templateUrl = Fileutils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); if (CollUtil.isNotEmpty(delColIndexes)) { ExcelUtils.removeColumns(templateUrl, 0, delColIndexes); } @@ -1046,7 +1046,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { sheetMap2.put("enterpriseName", enterpriseName); root.put(1, sheetMap2); sheetNames.add(enterpriseName + "考勤报表"); - templateUrl = Fileutils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl, true); params.setColForEach(true); params.setSheetName(sheetNames.toArray(new String[]{})); @@ -1100,7 +1100,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { sheetMap.put("totalAttendanceDay", vo.getTotalAttendanceDay()); sheetNames.add(vo.getWorkerName()); } - templateUrl = Fileutils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); String outputTemplateFilePath = PathUtil.getBasePath() + "/temp/" + IdUtil.randomUUID() + ".xlsx"; EasyPoiUtil.cloneSheetMultipleTimes(templateUrl, outputTemplateFilePath, "1", sheetNames.size() - 1); TemplateExportParams params = new TemplateExportParams(outputTemplateFilePath, true); @@ -1175,7 +1175,7 @@ public class WorkerDailyAttendanceStatisticsV2Controller { sheetMap.put("projectName", project.getProjectName()); root.put(0, sheetMap); sheetNames.add(project.getProjectName()); - templateUrl = Fileutils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/workerDailyAttendanceStatisticsV2/" + tempSheetName).getAbsolutePath(); TemplateExportParams params = new TemplateExportParams(templateUrl, true); params.setSheetName(sheetNames.toArray(new String[]{})); Workbook workbook = ExcelExportUtil.exportExcel(root, params); diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml index 68418876b..7128401b1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml @@ -20,7 +20,7 @@ and a.charge_person_name like CONCAT('%',#{chargePersonName},'%') - and a.enterprise_id=#{enterpriseId} + and FIND_IN_SET(a.enterprise_id,#{enterpriseId}) and FIND_IN_SET(a.enterprise_id,#{userEnterpriseId}) diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/TeamInfoMapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/TeamInfoMapper.xml index cc0699646..1db5be89e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/TeamInfoMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/TeamInfoMapper.xml @@ -11,7 +11,7 @@ join worker_type wt on wt.id=ti.worker_type_id WHERE wi.project_sn=#{projectSn} - and wi.enterprise_id=#{enterpriseId} + and FIND_IN_SET(wi.enterprise_id,#{enterpriseId}) and wt.is_special = #{isSpecial} @@ -36,7 +36,7 @@ and wt.id = #{workerTypeId} - and a.enterprise_id=#{enterpriseId} + and FIND_IN_SET(a.enterprise_id,#{enterpriseId}) and FIND_IN_SET(a.enterprise_id,#{userEnterpriseId}) diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java index 74ce0471b..c8b60ffb3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java @@ -711,7 +711,7 @@ public class XzSecurityQualityInspectionRecordController { listMap.add(objectMap); } map.put("listMap", listMap); - templateUrl = Fileutils.getExportTemplateFile("excel/潮州项目隐患统计汇总表.xlsx").getAbsolutePath(); + templateUrl = FileUtils.getExportTemplateFile("excel/潮州项目隐患统计汇总表.xlsx").getAbsolutePath(); root.put(0, map); TemplateExportParams params = new TemplateExportParams(templateUrl, true); Workbook workbook = ExcelExportUtil.exportExcel(root, params); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordDraftController.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordDraftController.java index 3b203c715..1d32a8331 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordDraftController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordDraftController.java @@ -53,7 +53,11 @@ public class XzSecurityQualityInspectionRecordDraftController { @ApiOperation(value = " 分页列表查询安全管理草稿信息", notes = "分页列表查询安全管理草稿信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), - @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer"), + @ApiImplicitParam(name = "reportWorkerIdList", value = "人员idList", paramType = "body", required = false, dataType = "Integer"), + @ApiImplicitParam(name = "reportDepartmentIdList", value = "部门idList", paramType = "body", required = false, dataType = "Integer"), + @ApiImplicitParam(name = "reportTeamIdList", value = "班组idList", paramType = "body", required = false, dataType = "Integer"), + @ApiImplicitParam(name = "reportEnterpriseIdList", value = "单位idList", paramType = "body", required = false, dataType = "Integer"), }) @PostMapping(value = "/page") public Result> queryPageList(@ApiIgnore @RequestBody Map param) { diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/dto/XzSecurityQualityInspectionRecordSourceAddDto.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/dto/XzSecurityQualityInspectionRecordSourceAddDto.java index 56a6388f2..6788d00e9 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/dto/XzSecurityQualityInspectionRecordSourceAddDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/dto/XzSecurityQualityInspectionRecordSourceAddDto.java @@ -1,5 +1,6 @@ package com.zhgd.xmgl.modules.xz.security.entity.dto; +import com.zhgd.xmgl.modules.risk.entity.dto.RiskListSourceUnbuiltAddDto; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,13 +13,14 @@ import java.util.List; @Data public class XzSecurityQualityInspectionRecordSourceAddDto extends XzSecurityQualityInspectionRecord { /** - * 区域和风险点List + * 区域和风险点List(传这个或sourceIdList) */ + @ApiModelProperty("区域和风险点List(传这个或sourceIdList)") private List regionPointList; /** - * 危险源idList + * 危险源idList(传这个或regionPointList) */ - @ApiModelProperty("危险源idList") + @ApiModelProperty("危险源idList(传这个或regionPointList)") private List sourceIdList; @Data diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordDraftMapper.xml b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordDraftMapper.xml index ebbc6fc56..3c5464726 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordDraftMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordDraftMapper.xml @@ -18,6 +18,37 @@ and t.project_sn = #{param.projectSn} + + and t.report_enterprise in + + #{item} + + + + and (1=0 + + or t.report_department_team_id in + + #{item} + + + + or t.report_department_team_id in + + #{item} + + + ) + + + and g.user_id in + + #{item} + + order by t.inspect_time desc )t ${ew.customSqlSegment} diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml index 405fdd9f1..7988cd877 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml @@ -1112,7 +1112,7 @@