From 07e1da5ea20d7b88affa6f533afc3eb97152b2eb Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Sat, 25 May 2024 10:18:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=92=8C=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E5=AF=BC=E5=87=BAbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DownloadController.java | 37 ++++++++++ .../controller/CheckingPointController.java | 5 +- .../service/CheckingPointService.java | 2 +- .../impl/CheckingPointServiceImpl.java | 19 +++++- .../mapper/QualityInspectionRecordMapper.java | 2 +- .../IQualityInspectionRecordService.java | 2 + .../QualityInspectionRecordServiceImpl.java | 68 +++++++++++++++++++ ...SecurityQualityInspectionRecordMapper.java | 2 +- 8 files changed, 131 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/DownloadController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/DownloadController.java index 6a3e4a19c..e4f4e13bd 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/DownloadController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/DownloadController.java @@ -382,6 +382,43 @@ public class DownloadController { qualityInspectionRecordService.exporExcelQualityInspectionRecord(response, map); } + @ApiOperation(value = "列表查询质量检查记录信息下载", notes = "列表查询质量检查记录信息下载", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), + @ApiImplicitParam(name = "regionId", value = "检查部位ID", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "status", value = "状态,1无需整改,2待整改,3待复查,4待核验,5合格,6不合格", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "recordStatus", value = "查询类型,1排查记录,2已闭合,3未闭合,4超期未关闭,5待整改,6待复查,7待核验", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "urgentLevel", value = "紧急程度,1一般,2严重,3紧要", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "level", value = "问题等级,1一级,2二级,3三级,4四级", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "changeId", value = "整改人", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "creatorId", value = "创建人", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "reviewId", value = "复查人", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "verifyManId", value = "核验人", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "inspectManId", value = "检查人", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"), + }) + @GetMapping(value = "/exportExcelXzSecurityQualityInspectionRecord") + public void exportExcelXzSecurityQualityInspectionRecord(HttpServletResponse response, String projectSn, String regionId, Integer status, Integer recordStatus, Integer urgentLevel, + Integer level, String changeId, String creatorId, String reviewId, String verifyManId, String inspectManId, + String inspectStartTime, String inspectEndTime) { + Map map = new HashMap<>(); + map.put("projectSn", projectSn); + map.put("regionId", regionId); + map.put("recordStatus", recordStatus); + map.put("urgentLevel", urgentLevel); + map.put("level", level); + map.put("changeId", changeId); + map.put("creatorId", creatorId); + map.put("verifyManId", verifyManId); + map.put("inspectManId", inspectManId); + map.put("reviewId", reviewId); + map.put("status", status); + map.put("inspectStartTime", inspectStartTime); + map.put("inspectEndTime", inspectEndTime); + qualityInspectionRecordService.exportExcelXzSecurityQualityInspectionRecord(response, map); + } + @ApiOperation(value = "隐患检查记录统计信息下载", notes = "隐患检查记录统计信息下载", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java b/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java index 8b1a0e3aa..edc889c1f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java +++ b/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java @@ -100,10 +100,11 @@ public class CheckingPointController { @ApiImplicitParam(name = "userId", value = "用户Id", paramType = "query", required = true, dataType = "String"), @ApiImplicitParam(name = "longitude", value = "经度", paramType = "query", required = true, dataType = "number"), @ApiImplicitParam(name = "latitude", value = "维度", paramType = "query", required = true, dataType = "number"), + @ApiImplicitParam(name = "xzCheckingRouteTaskId", value = "星纵-巡检路线的任务Id", paramType = "query", required = false, dataType = "String"), }) @GetMapping(value = "/checkLocation") - public Result checkLocation(Long id, Long userId, Double longitude, Double latitude) { - return Result.success(checkingPointService.checkLocation(id, userId, longitude, latitude)); + public Result checkLocation(Long id, Long userId, Double longitude, Double latitude, String xzCheckingRouteTaskId) { + return Result.success(checkingPointService.checkLocation(id, userId, longitude, latitude, xzCheckingRouteTaskId)); } @ApiOperation(value = "通过id查询巡检点", notes = "通过id查询巡检点", httpMethod = "GET") diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/service/CheckingPointService.java b/src/main/java/com/zhgd/xmgl/modules/checking/service/CheckingPointService.java index d8eef9371..2092eb034 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/service/CheckingPointService.java +++ b/src/main/java/com/zhgd/xmgl/modules/checking/service/CheckingPointService.java @@ -25,7 +25,7 @@ public interface CheckingPointService extends IService { * @param latitude 纬度 * @return */ - Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude); + Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude, String xzCheckingRouteTaskId); void add(CheckingPoint checkingPoint); diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/service/impl/CheckingPointServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/checking/service/impl/CheckingPointServiceImpl.java index a5caee670..9debd6e6a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/service/impl/CheckingPointServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/checking/service/impl/CheckingPointServiceImpl.java @@ -16,6 +16,7 @@ import com.zhgd.jeecg.common.execption.OpenPromptException; import com.zhgd.xmgl.modules.basicdata.service.INoticeService; import com.zhgd.xmgl.modules.checking.entity.CheckingPoint; import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo; +import com.zhgd.xmgl.modules.checking.entity.XzCheckingRouteTask; import com.zhgd.xmgl.modules.checking.entity.qo.ProjectSnQO; import com.zhgd.xmgl.modules.checking.mapper.CheckingPointInfoMapper; import com.zhgd.xmgl.modules.checking.mapper.CheckingPointMapper; @@ -48,6 +49,8 @@ public class CheckingPointServiceImpl extends ServiceImpl selectCheckingPointPage(ProjectSnQO projectSnQO) { @@ -60,7 +63,7 @@ public class CheckingPointServiceImpl extends ServiceImpl selectDangerInspectCountByItemTask(@Param("itemId") Long itemId); - List selectExportExcelQualityInspectionRecordList(Map map); + List selectExportExcelQualityInspectionRecordList(@Param("param") Map map); EntityMap getRectificationAndNoNum(@Param("projectSn") String projectSn); diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/service/IQualityInspectionRecordService.java b/src/main/java/com/zhgd/xmgl/modules/quality/service/IQualityInspectionRecordService.java index a97ff0c4c..ebf49e901 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/service/IQualityInspectionRecordService.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/service/IQualityInspectionRecordService.java @@ -51,6 +51,8 @@ public interface IQualityInspectionRecordService extends IService map); + void exportExcelXzSecurityQualityInspectionRecord(HttpServletResponse response, Map map); + EntityMap getRectificationAndNoNum(String projectSn); XzSecurityXzSecurityAllAndTodayDataVO getQualityAcceptanceAndRectificationNum(String projectSn); diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java index 0b574d7df..76c54a837 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java @@ -43,6 +43,7 @@ import com.zhgd.xmgl.modules.xz.entity.XzDeductScoreRecord; import com.zhgd.xmgl.modules.xz.mapper.XzDeductScoreRecordMapper; import com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto; import com.zhgd.xmgl.modules.xz.security.entity.vo.*; +import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper; import com.zhgd.xmgl.push.config.PushPayloads; import com.zhgd.xmgl.util.*; import org.apache.commons.collections.CollectionUtils; @@ -87,6 +88,8 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl map) { + try { + List list = xzSecurityQualityInspectionRecordMapper.selectExportExcelQualityInspectionRecordList(map); + for (EntityMap demo : list) { + Integer urgentLevel = MapUtils.getInteger(demo, "urgentLevel"); + if (urgentLevel != null) { + if (urgentLevel == 1) { + demo.put("urgentlevelname", "一般"); + } else if (urgentLevel == 2) { + demo.put("urgentlevelname", "严重"); + } else if (urgentLevel == 3) { + demo.put("urgentlevelname", "紧要"); + } else { + demo.put("urgentlevelname", ""); + } + } else { + demo.put("urgentlevelname", ""); + } + Integer level = MapUtils.getInteger(demo, "level"); + if (level != null) { + if (level == 1) { + demo.put("levelname", "一级"); + } else if (level == 2) { + demo.put("levelname", "二级"); + } else if (level == 3) { + demo.put("levelname", "三级"); + } else if (level == 4) { + demo.put("levelname", "四级"); + } else { + demo.put("levelname", ""); + } + } else { + demo.put("levelname", ""); + } + Integer status = MapUtils.getInteger(demo, "status"); + String statusName = ""; + if (status != null) { + if (status == 1) { + statusName = "无需整改"; + } else if (status == 2) { + statusName = "待整改"; + + } else if (status == 3) { + statusName = "待复查"; + } else if (status == 4) { + statusName = "待核验"; + } else if (status == 5) { + statusName = "合格"; + } else if (status == 6) { + statusName = "不合格"; + } + } + demo.put("statusname", statusName); + } + String[] heads = {"检查结果", "检查人", "检查时间", "检查部位", "问题描述", "补充说明", "整改要求", "问题等级", "紧急程度", "整改人", "整改时限", "复查人", "核验人"}; + String[] headsStr = {"statusname", "inspectManName", "inspectTime", "regionName", "dangerItemContent", "dangerDesc", "remark", "levelname", + "urgentlevelname", "changeName", "changeLimitTime", "reviewName", "verifyManName"}; + JxlExcelUtils.excelExport("安全检查列表", heads, headsStr, list, response); + + } catch (Exception e) { + log.error("error:", e); + } + } + @Override public EntityMap getRectificationAndNoNum(String projectSn) { return qualityInspectionRecordMapper.getRectificationAndNoNum(projectSn); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz.security/mapper/XzSecurityQualityInspectionRecordMapper.java b/src/main/java/com/zhgd/xmgl/modules/xz.security/mapper/XzSecurityQualityInspectionRecordMapper.java index 4a3407c74..9b89ea760 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz.security/mapper/XzSecurityQualityInspectionRecordMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz.security/mapper/XzSecurityQualityInspectionRecordMapper.java @@ -49,7 +49,7 @@ public interface XzSecurityQualityInspectionRecordMapper extends BaseMapper selectDangerInspectCountByItemTask(@Param("itemId") Long itemId); - List selectExportExcelQualityInspectionRecordList(Map map); + List selectExportExcelQualityInspectionRecordList(@Param("param") Map map); EntityMap getRectificationAndNoNum(@Param("projectSn") String projectSn);