diff --git a/src/main/java/com/zhgd/mybatis/DataScopeHandler.java b/src/main/java/com/zhgd/mybatis/DataScopeHandler.java index 11dc373bc..e2db65b09 100644 --- a/src/main/java/com/zhgd/mybatis/DataScopeHandler.java +++ b/src/main/java/com/zhgd/mybatis/DataScopeHandler.java @@ -135,7 +135,6 @@ public class DataScopeHandler implements DataPermissionHandler { tables.put("exam_train_record", "enterprise_id"); tables.put("exam_course_record", "enterprise_id"); tables.put("xz_worker_safe_watch_alarm", "enterprise_id"); - tables.put("dangerous_engineering_record", "responsibility_company_id"); tables.put("project_fine_record", "enterprise_id"); tables.put("car_info", "enterprise_id"); tables.put("enterprise_info", "id"); @@ -273,7 +272,9 @@ public class DataScopeHandler implements DataPermissionHandler { tables.put("pipeline_welding_record", new MapBuilder().put(DEVICE_COLUMN, "device_unit_id").put(PROJECT_COLUMN, "project_group_id").build()); tables.put("pouring_order_ledger", new MapBuilder().put(DEVICE_COLUMN, "device").put(PROJECT_COLUMN, "project_group_id").build()); tables.put("quality_problem", new MapBuilder().put(DEVICE_COLUMN, "device_id").put(PROJECT_COLUMN, "project_group_id").build()); - tables.put("xz_security_quality_inspection_record\n", new MapBuilder().put(DEVICE_COLUMN, "device_unit_id").put(PROJECT_COLUMN, "project_group_id").build()); + tables.put("xz_security_quality_inspection_record", new MapBuilder().put(DEVICE_COLUMN, "device_unit_id").put(PROJECT_COLUMN, "project_group_id").build()); + tables.put("green_construction_scheme", new MapBuilder().put(DEVICE_COLUMN, "device_unit").put(PROJECT_COLUMN, "project_group").build()); + tables.put("dangerous_engineering_record", new MapBuilder().put(DEVICE_COLUMN, "device_unit").put(PROJECT_COLUMN, "project_group").build()); return tables; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionPlanLedgerController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionPlanLedgerController.java index 10b9c92a0..fb6d9836f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionPlanLedgerController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionPlanLedgerController.java @@ -164,7 +164,7 @@ public class ConstructionPlanLedgerController { if (CollUtil.isEmpty(list)) { return Result.ok(); } - String foldName = "ConstructionPlanLedgerDownloadPicInfo/" + IdUtil.simpleUUID(); + String foldName = "temp/" + IdUtil.simpleUUID(); File foldFile = new File(PathUtil.getBasePath() + "/" + foldName); if (!foldFile.exists()) { foldFile.mkdirs(); diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/GreenConstructionSchemeController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/GreenConstructionSchemeController.java index 6685209d1..db22128fa 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/GreenConstructionSchemeController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/GreenConstructionSchemeController.java @@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.*; /** * @Title: Controller - * @Description: 绿色施工方案管理修改为危大工程清单 + * @Description: 危大工程清单 * @author: pds * @date: 2024-08-24 * @version: V1.0 @@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/xmgl/greenConstructionScheme") @Slf4j -@Api(tags = "绿色施工方案管理相关Api") +@Api(tags = "危大工程清单相关Api") public class GreenConstructionSchemeController { @Autowired private IGreenConstructionSchemeService greenConstructionSchemeService; @@ -42,8 +42,8 @@ public class GreenConstructionSchemeController { * 分页列表查询 * @return */ - @OperLog(operModul = "绿色施工方案管理管理", operType = "分页查询", operDesc = "分页列表查询绿色施工方案管理信息") - @ApiOperation(value = "分页列表查询绿色施工方案管理信息", notes = "分页列表查询绿色施工方案管理信息", httpMethod="GET") + @OperLog(operModul = "危大工程清单管理", operType = "分页查询", operDesc = "分页列表查询危大工程清单信息") + @ApiOperation(value = "分页列表查询危大工程清单信息", notes = "分页列表查询危大工程清单信息", httpMethod="GET") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), @@ -57,8 +57,8 @@ public class GreenConstructionSchemeController { * 列表查询 * @return */ - @OperLog(operModul = "绿色施工方案管理管理", operType = "列表查询", operDesc = "列表查询绿色施工方案管理信息") - @ApiOperation(value = "列表查询绿色施工方案管理信息", notes = "列表查询绿色施工方案管理信息", httpMethod="GET") + @OperLog(operModul = "危大工程清单管理", operType = "列表查询", operDesc = "列表查询危大工程清单信息") + @ApiOperation(value = "列表查询危大工程清单信息", notes = "列表查询危大工程清单信息", httpMethod="GET") @GetMapping(value = "/list") public Result> queryList(@ApiIgnore @RequestParam HashMap param) { return Result.success(greenConstructionSchemeService.queryList(param)); @@ -69,8 +69,8 @@ public class GreenConstructionSchemeController { * @param greenConstructionScheme * @return */ - @OperLog(operModul = "绿色施工方案管理管理", operType = "添加", operDesc = "添加绿色施工方案管理信息") - @ApiOperation(value = "添加绿色施工方案管理信息", notes = "添加绿色施工方案管理信息" , httpMethod="POST") + @OperLog(operModul = "危大工程清单管理", operType = "添加", operDesc = "添加危大工程清单信息") + @ApiOperation(value = "添加危大工程清单信息", notes = "添加危大工程清单信息" , httpMethod="POST") @PostMapping(value = "/add") public Result add(@RequestBody @Validate GreenConstructionScheme greenConstructionScheme) { greenConstructionSchemeService.add(greenConstructionScheme); @@ -82,8 +82,8 @@ public class GreenConstructionSchemeController { * @param greenConstructionScheme * @return */ - @OperLog(operModul = "绿色施工方案管理管理", operType = "编辑", operDesc = "编辑绿色施工方案管理信息") - @ApiOperation(value = "编辑绿色施工方案管理信息", notes = "编辑绿色施工方案管理信息" , httpMethod="POST") + @OperLog(operModul = "危大工程清单管理", operType = "编辑", operDesc = "编辑危大工程清单信息") + @ApiOperation(value = "编辑危大工程清单信息", notes = "编辑危大工程清单信息" , httpMethod="POST") @PostMapping(value = "/edit") public Result edit(@RequestBody GreenConstructionScheme greenConstructionScheme) { greenConstructionSchemeService.edit(greenConstructionScheme); @@ -94,9 +94,9 @@ public class GreenConstructionSchemeController { * 通过id删除 * @return */ - @OperLog(operModul = "绿色施工方案管理管理", operType = "删除", operDesc = "删除绿色施工方案管理信息") - @ApiOperation(value = "删除绿色施工方案管理信息", notes = "删除绿色施工方案管理信息" , httpMethod="POST") - @ApiImplicitParam(name = "id", value = "绿色施工方案管理ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @OperLog(operModul = "危大工程清单管理", operType = "删除", operDesc = "删除危大工程清单信息") + @ApiOperation(value = "删除危大工程清单信息", notes = "删除危大工程清单信息" , httpMethod="POST") + @ApiImplicitParam(name = "id", value = "危大工程清单ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") @PostMapping(value = "/delete") public Result delete(@ApiIgnore @RequestBody HashMap map) { greenConstructionSchemeService.delete(MapUtils.getString(map, "id")); @@ -108,9 +108,9 @@ public class GreenConstructionSchemeController { * @param id * @return */ - @OperLog(operModul = "绿色施工方案管理管理", operType = "通过id查询", operDesc = "通过id查询绿色施工方案管理信息") - @ApiOperation(value = "通过id查询绿色施工方案管理信息", notes = "通过id查询绿色施工方案管理信息" , httpMethod="GET") - @ApiImplicitParam(name = "id", value = "绿色施工方案管理ID", paramType = "query", required = true, dataType = "Integer") + @OperLog(operModul = "危大工程清单管理", operType = "通过id查询", operDesc = "通过id查询危大工程清单信息") + @ApiOperation(value = "通过id查询危大工程清单信息", notes = "通过id查询危大工程清单信息" , httpMethod="GET") + @ApiImplicitParam(name = "id", value = "危大工程清单ID", paramType = "query", required = true, dataType = "Integer") @GetMapping(value = "/queryById") public Result queryById(@RequestParam(name="id",required=true) String id) { return Result.success(greenConstructionSchemeService.queryById(id)); diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/GreenConstructionSchemeMapper.java b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/GreenConstructionSchemeMapper.java index 6ee8b9f19..7bfee312c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/GreenConstructionSchemeMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/GreenConstructionSchemeMapper.java @@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * @Description: 绿色施工方案管理 + * @Description: 危大工程清单 * @author: pds * @date: 2024-08-24 * @version: V1.0 diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java index d5889df0b..b75699341 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java @@ -52,6 +52,7 @@ public class PlanRecordController { @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "recordIds", value = "计划编制ids(多个,分割)", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "projectType", value = "1项目里程碑2装置里程碑", paramType = "query", required = false, dataType = "String"), }) @GetMapping(value = "/page") public Result> queryPageList(@ApiIgnore @RequestParam HashMap param) { @@ -175,6 +176,7 @@ public class PlanRecordController { @ApiOperation(value = "查询项目里程碑", notes = "查询项目里程碑", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"), + @ApiImplicitParam(name = "childCategoryId", value = "查询子集分类码id(包含自身)", paramType = "query", required = true, dataType = "String"), }) @GetMapping(value = "/getProjectMilestone") public Result> getProjectMilestone(@RequestParam HashMap param) { diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanRecordMapper.xml index 84220b6eb..98b2d5cc0 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanRecordMapper.xml @@ -8,6 +8,12 @@ ,su.real_name as charger_name from plan_record t left join system_user su on su.user_id=t.charger_id + where 1=1 + + and t.id in (select distinct pcc.record_id from plan_choose_category pcc + join plan_work_category pwc on pcc.category_id = pwc.id + where pcc.project_sn = #{param.projectSn} and pwc.project_type = #{param.projectType}) + )t ${ew.customSqlSegment} diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanWorkCategoryMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanWorkCategoryMapper.xml index f85f7243a..462483fd1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanWorkCategoryMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/mapper/xml/PlanWorkCategoryMapper.xml @@ -6,6 +6,10 @@ select * from ( select t.* from plan_work_category t + where 1=1 + + and (find_in_set(#{param.childCategoryId}, t.ancestors) or t.id=#{param.childCategoryId}) + )t ${ew.customSqlSegment} diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java index 24c4be79c..52a0264fd 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java @@ -472,6 +472,7 @@ public class PlanRecordServiceImpl extends ServiceImpl getProjectMilestone(HashMap param) { HashMap rtMap = new HashMap<>(); String projectSn = MapUtils.getString(param, "projectSn"); + Long childCategoryId = MapUtils.getLong(param, "childCategoryId"); List categories = planWorkCategoryService.queryList(param); Map> cidMap = planChooseCategoryService.queryList(param).stream().collect(Collectors.groupingBy(PlanChooseCategory::getCategoryId)); List records = planRecordService.list(new LambdaQueryWrapper().eq(PlanRecord::getProjectSn, projectSn)); diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IGreenConstructionSchemeService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IGreenConstructionSchemeService.java index 21c9865f6..fd1ee22e4 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IGreenConstructionSchemeService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IGreenConstructionSchemeService.java @@ -7,45 +7,45 @@ import java.util.HashMap; import java.util.List; /** - * @Description: 绿色施工方案管理 + * @Description: 危大工程清单 * @author: pds * @date: 2024-08-24 * @version: V1.0 */ public interface IGreenConstructionSchemeService extends IService { /** - * 分页列表查询绿色施工方案管理信息 + * 分页列表查询危大工程清单信息 * @param param 参数map * @return */ IPage queryPageList(HashMap param); /** - * 列表查询绿色施工方案管理信息 + * 列表查询危大工程清单信息 * @param param 参数map * @return */ List queryList(HashMap param); /** - * 添加绿色施工方案管理信息 - * @param greenConstructionScheme 绿色施工方案管理 + * 添加危大工程清单信息 + * @param greenConstructionScheme 危大工程清单 * @return */ void add(GreenConstructionScheme greenConstructionScheme); /** - * 编辑绿色施工方案管理信息 - * @param greenConstructionScheme 绿色施工方案管理 + * 编辑危大工程清单信息 + * @param greenConstructionScheme 危大工程清单 * @return */ void edit(GreenConstructionScheme greenConstructionScheme); /** - * 根据id删除绿色施工方案管理信息 - * @param id 绿色施工方案管理的id + * 根据id删除危大工程清单信息 + * @param id 危大工程清单的id * @return */ void delete(String id); /** - * 根据id查询绿色施工方案管理信息 - * @param id 绿色施工方案管理的id + * 根据id查询危大工程清单信息 + * @param id 危大工程清单的id * @return */ GreenConstructionScheme queryById(String id); diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/GreenConstructionSchemeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/GreenConstructionSchemeServiceImpl.java index 947889e7f..b4f38d52d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/GreenConstructionSchemeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/GreenConstructionSchemeServiceImpl.java @@ -17,7 +17,7 @@ import com.zhgd.xmgl.util.RefUtil; import org.springframework.beans.factory.annotation.Autowired; /** - * @Description: 绿色施工方案管理 + * @Description: 危大工程清单 * @author: pds * @date: 2024-08-24 * @version: V1.0 diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/DangerousEngineeringRecord.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/DangerousEngineeringRecord.java index 8bda2e5ea..3c15702cb 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/DangerousEngineeringRecord.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/DangerousEngineeringRecord.java @@ -141,7 +141,47 @@ public class DangerousEngineeringRecord implements Serializable { @ApiModelProperty(value = "监控点编号(多个,分割)") private String videoItemIds; - @TableField(exist = false) + @ApiModelProperty(value="装置") + private java.lang.Long deviceUnit ; + /** + * 项目组 + */ + @ApiModelProperty(value = "项目组") + private java.lang.Long projectGroup; + /** + * 监理单位 + */ + @ApiModelProperty(value = "监理单位") + private java.lang.Long supervisingUnit; + /** + * EPC承包商 + */ + @ApiModelProperty(value = "EPC承包商") + private java.lang.Long epcContractor; + /** + * 施工单位 + */ + @ApiModelProperty(value = "施工单位") + private java.lang.Long constructionUnit; + + @TableField(exist = false) + @ApiModelProperty(value = "装置名称") + private java.lang.String deviceUnitName; + @TableField(exist = false) + @ApiModelProperty(value = "项目组名称") + private java.lang.String projectGroupName; + @TableField(exist = false) + @ApiModelProperty(value = "监理单位名称") + private java.lang.String supervisingUnitName; + @TableField(exist = false) + @ApiModelProperty(value = "EPC承包商名称") + private java.lang.String epcContractorName; + @TableField(exist = false) + @ApiModelProperty(value = "施工单位名称") + private java.lang.String constructionUnitName; + + + @TableField(exist = false) @ApiModelProperty(value = "类别描述列表") private List typeDescribeList; diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/DangerousEngineeringRecordMapper.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/DangerousEngineeringRecordMapper.java index 9f8221096..0a453f00e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/DangerousEngineeringRecordMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/DangerousEngineeringRecordMapper.java @@ -20,7 +20,7 @@ import java.util.Map; * @version: V1.0 */ @Mapper -//@DataScope(includeTable = "dangerous_engineering_record") +@DataScope(includeTable = "dangerous_engineering_record") public interface DangerousEngineeringRecordMapper extends BaseMapper { /** * 分页列表查询现场危大工程信息 diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/DangerousEngineeringRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/DangerousEngineeringRecordMapper.xml index ca9082a4e..cdd6161d6 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/DangerousEngineeringRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/DangerousEngineeringRecordMapper.xml @@ -18,6 +18,11 @@ now() >= if(LENGTH(t.plan_end_time) = 10, CONCAT(DATE_FORMAT(t.plan_end_time, '%Y-%m-%d'), ' 23:59:59'), t.plan_end_time), 1, 0) as isOverdue + ,du.device_unit_name as device_unit_name + ,pg.project_group_name as project_group_name + ,ei1.enterprise_name as supervising_unit_name + ,ei2.enterprise_name as epc_contractor_name + ,ei3.enterprise_name as construction_unit_name from dangerous_engineering_record t LEFT JOIN (SELECT engineering_id, COUNT(1) hidden_danger_num from xz_security_quality_inspection_record @@ -31,6 +36,11 @@ AND `status` in (2, 3, 4) AND type = 1 GROUP BY engineering_id) tp ON t.id = tp.engineering_id + left join device_unit du on du.id = t.device_unit + left join project_group pg on pg.id=t.project_group + left join enterprise_info ei1 on ei1.id=t.supervising_unit + left join enterprise_info ei2 on ei2.id=t.epc_contractor + left join enterprise_info ei3 on ei3.id=t.construction_unit WHERE 1 = 1 and t.construction_state = #{param.constructionState} diff --git a/src/main/java/com/zhgd/xmgl/util/MinioUtils.java b/src/main/java/com/zhgd/xmgl/util/MinioUtils.java index 5ec625ecd..253014977 100644 --- a/src/main/java/com/zhgd/xmgl/util/MinioUtils.java +++ b/src/main/java/com/zhgd/xmgl/util/MinioUtils.java @@ -267,7 +267,7 @@ public class MinioUtils { } FileInfo fileInfo = fileStorageService.of(PathUtil.getBasePath() + "/" + path) .setPlatform(Cts.MINIO_1) //使用指定的存储平台 - .setPath(savePath != null ? savePath + "/" : null) + .setPath(savePath != null ? savePath + "/" : "") .upload(); String filename = fileInfo.getFilename(); if (StrUtil.isNotBlank(fileInfo.getPath())) { @@ -294,7 +294,7 @@ public class MinioUtils { } FileInfo fileInfo = fileStorageService.of(PathUtil.getBasePath() + "/" + path) .setPlatform(Cts.MINIO_1) //使用指定的存储平台 - .setPath(savePath != null ? savePath + "/" : null) + .setPath(savePath != null ? savePath + "/" : "") .setSaveFilename(fileName) .upload(); } diff --git a/src/main/resources/excel/work/土建工程质量模板.docx b/src/main/resources/excel/work/土建工程质量模板.docx index dcb843503..36544fa03 100644 --- a/src/main/resources/excel/work/土建工程质量模板.docx +++ b/src/main/resources/excel/work/土建工程质量模板.docx @@ -61,7 +61,7 @@ {{a14}} {{b14}} 监理见证人 -{{supervisingWitnessUserName}} + {{supervisingWitnessUserName}} {{a15}} {{b15}} 委托方电话