工程质量监督月报和bug修复
This commit is contained in:
parent
b44db0b369
commit
292762ec8f
@ -37,7 +37,7 @@ import java.util.Map;
|
||||
@Api(tags = "主要工程量完成情况详情表相关Api")
|
||||
public class MainProjectCompleteDetailController {
|
||||
@Autowired
|
||||
private IMainProjectCompleteDetailService mainProjectCompleteDetail1Service;
|
||||
private IMainProjectCompleteDetailService mainProjectCompleteDetailService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@ -52,7 +52,7 @@ public class MainProjectCompleteDetailController {
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<MainProjectCompleteDetailVo>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mainProjectCompleteDetail1Service.queryPageList(param));
|
||||
return Result.success(mainProjectCompleteDetailService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@ public class MainProjectCompleteDetailController {
|
||||
@ApiOperation(value = "列表查询主要工程量完成情况详情表信息", notes = "列表查询主要工程量完成情况详情表信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<MainProjectCompleteDetailVo>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mainProjectCompleteDetail1Service.queryList(param));
|
||||
return Result.success(mainProjectCompleteDetailService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,17 +77,16 @@ public class MainProjectCompleteDetailController {
|
||||
@ApiOperation(value = "添加主要工程量完成情况详情表信息", notes = "添加主要工程量完成情况详情表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result add(@RequestBody @Validate MainProjectCompleteDetailVo mainProjectCompleteDetail) {
|
||||
mainProjectCompleteDetail1Service.add(mainProjectCompleteDetail);
|
||||
mainProjectCompleteDetailService.add(mainProjectCompleteDetail);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@OperLog(operModul = "主要工程量完成情况详情表管理", operType = "添加", operDesc = "工作流添加主要工程量完成情况详情表信息")
|
||||
@ApiOperation(value = "工作流添加主要工程量完成情况详情表信息", notes = "工作流添加主要工程量完成情况详情表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/flow/add")
|
||||
public Result add(@RequestBody @Validate Map<String, Object> map) {
|
||||
public Result addFromFlow(@RequestBody @Validate Map<String, Object> map) {
|
||||
log.info("工作流添加主要工程量完成情况详情表信息:{}", JSON.toJSONString(map));
|
||||
MainProjectCompleteDetailVo vo = new MainProjectCompleteDetailVo();
|
||||
mainProjectCompleteDetail1Service.edit(vo);
|
||||
mainProjectCompleteDetailService.addFromFlow(map);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ -101,7 +100,7 @@ public class MainProjectCompleteDetailController {
|
||||
@ApiOperation(value = "编辑主要工程量完成情况详情表信息", notes = "编辑主要工程量完成情况详情表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result edit(@RequestBody MainProjectCompleteDetailVo mainProjectCompleteDetail) {
|
||||
mainProjectCompleteDetail1Service.edit(mainProjectCompleteDetail);
|
||||
mainProjectCompleteDetailService.edit(mainProjectCompleteDetail);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ -115,7 +114,7 @@ public class MainProjectCompleteDetailController {
|
||||
@ApiImplicitParam(name = "id", value = "主要工程量完成情况详情表ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
mainProjectCompleteDetail1Service.delete(MapUtils.getString(map, "id"));
|
||||
mainProjectCompleteDetailService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ -130,7 +129,7 @@ public class MainProjectCompleteDetailController {
|
||||
@ApiImplicitParam(name = "id", value = "主要工程量完成情况详情表ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<MainProjectCompleteDetailVo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(mainProjectCompleteDetail1Service.queryById(id));
|
||||
return Result.success(mainProjectCompleteDetailService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "主要工程量完成情况详情表管理", operType = "分页查询", operDesc = "树形分页列表查询主要工程量完成情况详情表信息")
|
||||
@ -141,18 +140,19 @@ public class MainProjectCompleteDetailController {
|
||||
})
|
||||
@GetMapping(value = "/tree/page")
|
||||
public Result<IPage<MainProjectCompleteDetailVo>> queryTreePage(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mainProjectCompleteDetail1Service.queryTreePage(param));
|
||||
return Result.success(mainProjectCompleteDetailService.queryTreePage(param));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出excel记录", notes = "导出excel记录", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "deviceUnitIds", value = "装置ids(多个,分割)", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "mainProjectCompletePeriodId", value = "主要工程量完成情况时间段id", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "levelType", value = "时间级别:1月2周", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/exportXls")
|
||||
public void exportXls(HttpServletRequest request, HttpServletResponse response, @RequestBody HashMap<String, Object> param) {
|
||||
mainProjectCompleteDetail1Service.exportXls(request, response, param);
|
||||
mainProjectCompleteDetailService.exportXls(request, response, param);
|
||||
}
|
||||
|
||||
@OperLog(operModul = "主要工程量完成情况详情表管理", operType = "", operDesc = "计划总览")
|
||||
@ -163,6 +163,20 @@ public class MainProjectCompleteDetailController {
|
||||
})
|
||||
@GetMapping(value = "/projectOverview")
|
||||
public Result<List<MainProjectCompleteDetailVo>> projectOverview(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mainProjectCompleteDetail1Service.projectOverview(param));
|
||||
return Result.success(mainProjectCompleteDetailService.projectOverview(param));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "主要工程量完成情况详情表管理", operType = "", operDesc = "计划总览导出excel记录")
|
||||
@ApiOperation(value = "计划总览导出excel记录", notes = "计划总览导出excel记录", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "deviceUnitIds", value = "装置ids(多个,分割)", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/projectOverviewExportXls")
|
||||
public Result<List<MainProjectCompleteDetailVo>> projectOverviewExportXls(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,144 @@
|
||||
package com.zhgd.xmgl.modules.baotou.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectSupervisionMonthlyReport;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IProjectSupervisionMonthlyReportService;
|
||||
import com.zhgd.xmgl.util.FlowUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 工程质量监督月报
|
||||
* @author: pds
|
||||
* @date: 2024-09-29
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/projectSupervisionMonthlyReport")
|
||||
@Slf4j
|
||||
@Api(tags = "工程质量监督月报相关Api")
|
||||
public class ProjectSupervisionMonthlyReportController {
|
||||
@Autowired
|
||||
private IProjectSupervisionMonthlyReportService projectSupervisionMonthlyReportService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@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"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<ProjectSupervisionMonthlyReport>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(projectSupervisionMonthlyReportService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "工程质量监督月报管理", operType = "列表查询", operDesc = "列表查询工程质量监督月报信息")
|
||||
@ApiOperation(value = "列表查询工程质量监督月报信息", notes = "列表查询工程质量监督月报信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectSupervisionMonthlyReport>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(projectSupervisionMonthlyReportService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectSupervisionMonthlyReport
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "工程质量监督月报管理", operType = "添加", operDesc = "添加工程质量监督月报信息")
|
||||
@ApiOperation(value = "添加工程质量监督月报信息", notes = "添加工程质量监督月报信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<ProjectSupervisionMonthlyReport> add(@RequestBody @Validate ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport) {
|
||||
projectSupervisionMonthlyReportService.add(projectSupervisionMonthlyReport);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@OperLog(operModul = "工程质量监督月报管理", operType = "添加", operDesc = "工作流添加工程质量监督月报信息")
|
||||
@ApiOperation(value = "工作流添加工程质量监督月报信息", notes = "工作流添加工程质量监督月报信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/flow/add")
|
||||
public Result<ProjectSupervisionMonthlyReport> addFromFlow(@RequestBody @Validate Map<String, Object> map) {
|
||||
log.info("工作流添加工程质量监督月报信息:{}", JSON.toJSONString(map));
|
||||
String number = FlowUtil.getString(map, "number");
|
||||
String attachment = FlowUtil.getJSONString(map, "attachment");
|
||||
String projectSn = FlowUtil.getString(map, "projectSn");
|
||||
Date time = FlowUtil.getDate(map, "time");
|
||||
ProjectSupervisionMonthlyReport report = new ProjectSupervisionMonthlyReport();
|
||||
report.setNumber(number);
|
||||
report.setAttachment(attachment);
|
||||
report.setTime(time);
|
||||
report.setProjectSn(projectSn);
|
||||
projectSupervisionMonthlyReportService.add(report);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectSupervisionMonthlyReport
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "工程质量监督月报管理", operType = "编辑", operDesc = "编辑工程质量监督月报信息")
|
||||
@ApiOperation(value = "编辑工程质量监督月报信息", notes = "编辑工程质量监督月报信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<ProjectSupervisionMonthlyReport> edit(@RequestBody ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport) {
|
||||
projectSupervisionMonthlyReportService.edit(projectSupervisionMonthlyReport);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<ProjectSupervisionMonthlyReport> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
projectSupervisionMonthlyReportService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @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")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ProjectSupervisionMonthlyReport> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(projectSupervisionMonthlyReportService.queryById(id));
|
||||
}
|
||||
|
||||
}
|
||||
@ -77,9 +77,16 @@ public class ProjectScheduleDeviceUnit implements Serializable {
|
||||
@Excel(name = "祖级列表", width = 15)
|
||||
@ApiModelProperty(value = "祖级列表")
|
||||
private String ancestors;
|
||||
|
||||
/**
|
||||
* 项目组绑定的装置单位ids
|
||||
*/
|
||||
@ApiModelProperty(value = "项目组绑定的装置单位ids")
|
||||
private java.lang.String bindDeviceUnitIds;
|
||||
@TableField(exist = false)
|
||||
private List<ProjectScheduleDeviceUnit> children;
|
||||
@TableField(exist = false)
|
||||
private List<ProjectSchedule> schedules;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value="项目组绑定的装置单位名称s")
|
||||
private java.lang.String bindDeviceUnitNames ;
|
||||
}
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
package com.zhgd.xmgl.modules.baotou.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* @Description: 工程质量监督月报
|
||||
* @author: pds
|
||||
* @date: 2024-09-29
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_supervision_monthly_report")
|
||||
@ApiModel(value="ProjectSupervisionMonthlyReport实体类",description="ProjectSupervisionMonthlyReport")
|
||||
public class ProjectSupervisionMonthlyReport implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private java.lang.Long id ;
|
||||
/**期数*/
|
||||
@ApiModelProperty(value="期数")
|
||||
private java.lang.String number ;
|
||||
/**附件*/
|
||||
@ApiModelProperty(value="附件")
|
||||
private java.lang.String attachment ;
|
||||
/**时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value="时间")
|
||||
private java.util.Date time ;
|
||||
/**项目sn*/
|
||||
@ApiModelProperty(value="项目sn")
|
||||
private java.lang.String projectSn ;
|
||||
/**创建时间 yyyy-MM-dd HH:mm:ss*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value="创建时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createDate ;
|
||||
/**更新时间 yyyy-MM-dd HH:mm:ss*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value="更新时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateDate ;
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.zhgd.xmgl.modules.baotou.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectSupervisionMonthlyReport;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 工程质量监督月报
|
||||
* @author: pds
|
||||
* @date: 2024-09-29
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProjectSupervisionMonthlyReportMapper extends BaseMapper<ProjectSupervisionMonthlyReport> {
|
||||
|
||||
/**
|
||||
* 分页列表查询工程质量监督月报信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<ProjectSupervisionMonthlyReport> queryList(Page<ProjectSupervisionMonthlyReport> page, @Param(Constants.WRAPPER) QueryWrapper<ProjectSupervisionMonthlyReport> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询工程质量监督月报信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ProjectSupervisionMonthlyReport> queryList(@Param(Constants.WRAPPER) QueryWrapper<ProjectSupervisionMonthlyReport> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询工程质量监督月报信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProjectSupervisionMonthlyReport queryById(String id);
|
||||
}
|
||||
@ -7,13 +7,15 @@
|
||||
group_concat(distinct pg.project_group_name) as project_group_name,
|
||||
group_concat(distinct ei.enterprise_name) as epc_contractor_name,
|
||||
group_concat(distinct ei3.enterprise_name) as construction_unit_name,
|
||||
group_concat(distinct pgu.supervising_unit_id) as supervising_unit_ids
|
||||
group_concat(distinct pgu.supervising_unit_id) as supervising_unit_ids,
|
||||
group_concat(distinct ei4.enterprise_name) as supervising_unit_name
|
||||
from
|
||||
device_unit t
|
||||
join project_group pg on find_in_set(pg.id,t.project_group_ids)
|
||||
left join project_group_unit pgu on pg.id = pgu.project_group_id
|
||||
left join enterprise_info ei on find_in_set(ei.id,t.epc_contractor_ids)
|
||||
left join enterprise_info ei3 on find_in_set(ei3.id,t.construction_unit_ids)
|
||||
left join enterprise_info ei4 on find_in_set(ei4.id,pgu.supervising_unit_id)
|
||||
${ew.customSqlSegment}
|
||||
group by t.id
|
||||
order by t.create_date desc
|
||||
|
||||
@ -4,19 +4,24 @@
|
||||
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectScheduleDeviceUnit">
|
||||
select * from (
|
||||
select t.*
|
||||
select t.*,
|
||||
group_concat(distinct du.device_unit_name) as bind_device_unit_names
|
||||
from project_schedule_device_unit t
|
||||
left join device_unit du on find_in_set(du.id,t.bind_device_unit_ids)
|
||||
where 1=1
|
||||
<if test="param.hasAll != '1'.toString() ">
|
||||
and t.device_unit_name != '全部装置'
|
||||
</if>
|
||||
group by t.id
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectScheduleDeviceUnit">
|
||||
select * from (
|
||||
select t.*
|
||||
select t.*,
|
||||
group_concat(distinct du.device_unit_name) as bind_device_unit_names
|
||||
from project_schedule_device_unit t
|
||||
left join device_unit du on find_in_set(du.id,t.bind_device_unit_ids)
|
||||
)t
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.mapper.ProjectSupervisionMonthlyReportMapper">
|
||||
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectSupervisionMonthlyReport">
|
||||
select * from (
|
||||
select t.*
|
||||
from project_supervision_monthly_report t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectSupervisionMonthlyReport">
|
||||
select * from (
|
||||
select t.*
|
||||
from project_supervision_monthly_report t
|
||||
)t
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,13 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IWorkerAccessRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IWorkerAccessRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -1,9 +1,9 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityDangerItemRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityDangerItemRecordService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -1,11 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityDangerItemRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityDangerTypeRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityDangerItemRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityDangerTypeRecordService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -1,11 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskItemRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityInspectTaskItemRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -1,12 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityInspectTaskRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -1,20 +1,22 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gexin.fastjson.JSON;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringRecordService;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
|
||||
import com.zhgd.xmgl.modules.video.service.IAiAnalyseHardWareAlarmRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
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.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -518,4 +520,13 @@ public class XzSecurityQualityInspectionRecordController {
|
||||
return Result.success(qualityInspectionRecordService.querySpecialPage(map));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "安全检查记录", operType = "", operDesc = "工作流添加安全检查记录")
|
||||
@ApiOperation(value = "工作流添加安全检查记录", notes = "工作流添加安全检查记录", httpMethod = "POST")
|
||||
@PostMapping(value = "/flow/add")
|
||||
public Result addFromFlow(@RequestBody Map<String, Object> map) {
|
||||
log.info("工作流添加安全检查记录:{}", JSON.toJSONString(map));
|
||||
qualityInspectionRecordService.addFromFlow(map);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,9 +1,9 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.controller;
|
||||
package com.zhgd.xmgl.modules.baotou.security.controller;
|
||||
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityRectifyRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityRectifyRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -55,10 +55,10 @@ public class XzSecurityQualityInspectionRecord implements Serializable {
|
||||
@ApiModelProperty(value = "补充说明")
|
||||
private String dangerDesc;
|
||||
/**
|
||||
* 问题描述
|
||||
* 问题分类描述
|
||||
*/
|
||||
@Excel(name = "问题描述", width = 15)
|
||||
@ApiModelProperty(value = "问题描述")
|
||||
@Excel(name = "问题分类描述", width = 15)
|
||||
@ApiModelProperty(value = "问题分类描述")
|
||||
private String dangerItemContent;
|
||||
/**
|
||||
* 问题子项ID
|
||||
@ -93,10 +93,10 @@ public class XzSecurityQualityInspectionRecord implements Serializable {
|
||||
@ApiModelProperty(value = "紧急程度,1一般,2严重,3紧要")
|
||||
private String urgentLevel;
|
||||
/**
|
||||
* 状态,2待整改,3待复查,4待核验,5合格,6已撤回
|
||||
* 状态,2待整改,3整改中,5合格
|
||||
*/
|
||||
@Excel(name = "状态,2待整改,3待复查,4待核验,5合格,6已撤回", width = 15)
|
||||
@ApiModelProperty(value = "状态,2待整改,3待复查,4待核验,5合格,6已撤回")
|
||||
@Excel(name = "状态,2待整改,3整改中,5合格", width = 15)
|
||||
@ApiModelProperty(value = "状态,2待整改,3整改中,5合格")
|
||||
private java.lang.Integer status;
|
||||
/**
|
||||
* 通知人
|
||||
@ -246,6 +246,46 @@ public class XzSecurityQualityInspectionRecord implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "1危大2动火3受限空间4盲板抽堵5高出6吊装7临时用电8动土9断路")
|
||||
private Integer type;
|
||||
/**
|
||||
* 合同模式:1EPC;2E+P+C
|
||||
*/
|
||||
@ApiModelProperty("合同模式:1EPC;2E+P+C")
|
||||
private Integer contractModel;
|
||||
/**
|
||||
* 装置id
|
||||
*/
|
||||
@ApiModelProperty("装置id")
|
||||
private Long deviceUnitId;
|
||||
/**
|
||||
* 项目组管理id
|
||||
*/
|
||||
@ApiModelProperty("项目组管理id")
|
||||
private Long projectGroupId;
|
||||
/**
|
||||
* 监理单位id
|
||||
*/
|
||||
@ApiModelProperty("监理单位id")
|
||||
private Long supervisingUnitId;
|
||||
/**
|
||||
* EPC承包商id
|
||||
*/
|
||||
@ApiModelProperty("EPC承包商id")
|
||||
private Long epcContractorId;
|
||||
/**
|
||||
* 施工承包商id
|
||||
*/
|
||||
@ApiModelProperty("施工承包商id")
|
||||
private Long constructionContractorId;
|
||||
/**
|
||||
* 安全类型:1检查问题;2隐患问题
|
||||
*/
|
||||
@ApiModelProperty("安全类型:1检查问题;2隐患问题")
|
||||
private Integer securityType;
|
||||
/**
|
||||
* 安全隐患情况表述
|
||||
*/
|
||||
@ApiModelProperty("安全隐患情况表述")
|
||||
private String securityRiskStatement;
|
||||
|
||||
/**
|
||||
* 分部工程名称
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.dto;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,6 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,7 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.entity.vo;
|
||||
package com.zhgd.xmgl.modules.baotou.security.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.enums.BaseEnum;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.enums.BaseEnum;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.enums.BaseEnum;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.enums.BaseEnum;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.enums.BaseEnum;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.enums;
|
||||
package com.zhgd.xmgl.modules.baotou.security.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.enums.BaseEnum;
|
||||
@ -1,6 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.WorkerAccessRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzMilestone;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzMilestone;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -1,7 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@ -1,8 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.DataScope;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -6,9 +6,9 @@ import com.zhgd.annotation.DataScope;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorOneVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.mapper;
|
||||
package com.zhgd.xmgl.modules.baotou.security.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.WorkerAccessRecordMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.WorkerAccessRecordMapper">
|
||||
</mapper>
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzMilestoneMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzMilestoneMapper">
|
||||
</mapper>
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerItemRecordMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerItemRecordMapper">
|
||||
<select id="selectDangerItemRecordList"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord">
|
||||
SELECT IFNULL(b.record_status,0) record_status,a.*
|
||||
from xz_security_danger_item_record a LEFT JOIN
|
||||
(SELECT * FROM xz_security_project_danger_type_disable WHERE project_sn=#{projectSn} and type=2) b ON
|
||||
@ -17,7 +17,7 @@
|
||||
ORDER BY a.order_sort
|
||||
</select>
|
||||
<select id="selectCompanyDangerItemRecordList"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord">
|
||||
SELECT a.*
|
||||
from xz_security_danger_item_record a
|
||||
WHERE a.danger_type_id=#{dangerTypeId}
|
||||
@ -27,7 +27,7 @@
|
||||
ORDER BY a.order_sort
|
||||
</select>
|
||||
<select id="selectProjectDangerItemList"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord">
|
||||
SELECT a.*,
|
||||
IFNULL(b.record_status, 0) record_status
|
||||
from xz_security_danger_item_record a
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerTypeRecordMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerTypeRecordMapper">
|
||||
<delete id="deleteRecordById">
|
||||
delete dtr,dtr2,dir
|
||||
from xz_security_danger_type_record as dtr
|
||||
@ -94,7 +94,7 @@
|
||||
and sn = #{sn};
|
||||
</update>
|
||||
|
||||
<select id="getTopTypes" resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord">
|
||||
<select id="getTopTypes" resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord">
|
||||
select *,CASE code
|
||||
WHEN '01' THEN 1
|
||||
WHEN '02' THEN 2
|
||||
@ -123,7 +123,7 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getTypeRecordList" resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord">
|
||||
<select id="getTypeRecordList" resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord">
|
||||
select *
|
||||
from xz_security_danger_type_record
|
||||
where code in
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityInspectTaskItemRecordMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityInspectTaskItemRecordMapper">
|
||||
<select id="selectInspectTaskItemRecordPage" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.*,b.task_name,b.sn,b.start_time,b.end_time,b.frequency_num,b.frequency_type,b.report_type,
|
||||
b.inspect_remark,b.inspect_user,b.id as record_id
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityInspectTaskRecordMapper">
|
||||
<select id="selectInspectTaskRecordPage" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityInspectTaskRecordVo">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityInspectTaskRecordMapper">
|
||||
<select id="selectInspectTaskRecordPage" resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityInspectTaskRecordVo">
|
||||
SELECT a.*,b.inspect_type_name,d.real_name create_user_name
|
||||
from xz_security_inspect_task_record a
|
||||
LEFT JOIN inspect_type b ON a.inspect_type_id=b.id
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityProjectDangerTypeDisableMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityProjectDangerTypeDisableMapper">
|
||||
</mapper>
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityQualityInspectionRecordMapper">
|
||||
<sql id="whereCondition">
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_type_id = #{param.dangerInfoId}
|
||||
@ -218,7 +218,7 @@
|
||||
) tp
|
||||
</sql>
|
||||
<select id="selectQualityInspectionRecordById"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||
SELECT a.*,
|
||||
b.enterprise_name,
|
||||
c.full_name,
|
||||
@ -248,7 +248,7 @@
|
||||
WHERE a.id = #{id}
|
||||
</select>
|
||||
<select id="selectQualityInspectionRecordPage"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||
SELECT t.*,
|
||||
b.enterprise_name,
|
||||
c.full_name,
|
||||
@ -423,7 +423,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectQualityInspectionRecordPageTotal"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo">
|
||||
<include refid="selectTotal">
|
||||
</include>
|
||||
</select>
|
||||
@ -535,7 +535,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getQualityAcceptanceAndRectificationNum"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityXzSecurityAllAndTodayDataVO">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityXzSecurityAllAndTodayDataVO">
|
||||
select
|
||||
<!-- 所有 -->
|
||||
COUNT(1) allTotal,
|
||||
@ -551,7 +551,7 @@
|
||||
WHERE a.project_sn = #{projectSn}
|
||||
</select>
|
||||
<select id="getQualityAcceptanceAndRectificationNumThisWeek"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityXzSecurityAllAndThisWeekDataVO">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityXzSecurityAllAndThisWeekDataVO">
|
||||
select
|
||||
<!-- 所有 -->
|
||||
COUNT(1) allTotal,
|
||||
@ -567,7 +567,7 @@
|
||||
WHERE a.project_sn = #{projectSn}
|
||||
</select>
|
||||
|
||||
<select id="getAllAndWeekData" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityAllAndWeekDataVO">
|
||||
<select id="getAllAndWeekData" resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityAllAndWeekDataVO">
|
||||
select
|
||||
<!-- 所有 -->
|
||||
COUNT(1) allTotal,
|
||||
@ -585,8 +585,8 @@
|
||||
WHERE a.project_sn = #{projectSn}
|
||||
</select>
|
||||
<select id="getDepartmentRectifiedRank"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityDepartmentRectifiedRankVo"
|
||||
parameterType="com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityDepartmentRectifiedRankVo"
|
||||
parameterType="com.zhgd.xmgl.modules.baotou.security.entity.dto.XzSecurityDepartmentRectifiedRankDto">
|
||||
SELECT di.department_name,
|
||||
count(qir.id) AS rectified_number
|
||||
FROM department_info di
|
||||
@ -643,7 +643,7 @@
|
||||
order by y desc
|
||||
</select>
|
||||
|
||||
<select id="statsByChangeId" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.StatsByChangeIdVo">
|
||||
<select id="statsByChangeId" resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.StatsByChangeIdVo">
|
||||
select t.*,
|
||||
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100,
|
||||
2) rectifiedNumRatio,
|
||||
@ -675,7 +675,7 @@
|
||||
group by enumType
|
||||
</select>
|
||||
|
||||
<select id="statsByInspectManVo" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.StatsByInspectManVo">
|
||||
<select id="statsByInspectManVo" resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.StatsByInspectManVo">
|
||||
select t.*,
|
||||
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100,2) as rectifiedNumRatio,
|
||||
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNumTimely, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2) as
|
||||
@ -696,7 +696,7 @@
|
||||
order by rectifiedNum desc) t
|
||||
</select>
|
||||
|
||||
<select id="statsByEnterprise" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.StatsByEnterpriseVo">
|
||||
<select id="statsByEnterprise" resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.StatsByEnterpriseVo">
|
||||
select t.*,
|
||||
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100,
|
||||
2) rectifiedNumRatio,
|
||||
@ -729,7 +729,7 @@
|
||||
</select>
|
||||
|
||||
<select id="riskChart"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo">
|
||||
select
|
||||
ifnull(round((t2.dangerNum-t1.dangerNum)/t1.dangerNum*100,2),'-') as monthlyBasis,
|
||||
t2.*
|
||||
@ -744,7 +744,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getWorkerSafeWatchTimeOutList"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord">
|
||||
SELECT r.*,
|
||||
timestampdiff(MINUTE, ifnull(x.rectify_time, r.inspect_time), now()) as safeWatchAlarmExceedMinute
|
||||
FROM xz_security_quality_inspection_record as r
|
||||
@ -761,7 +761,7 @@
|
||||
</select>
|
||||
|
||||
<select id="querySpecialPage"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||
select t.*
|
||||
from
|
||||
(
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityRectifyRecordMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityQualityRectifyRecordMapper">
|
||||
<select id="selectRectifyRecordList"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityRectifyRecord">
|
||||
resultType="com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityRectifyRecord">
|
||||
select a.*,b.real_name create_user_name
|
||||
from xz_security_quality_rectify_record a
|
||||
LEFT JOIN system_user b ON a.create_user=b.user_id
|
||||
@ -1,8 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.WorkerAccessRecord;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -1,8 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzMilestone;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzMilestone;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -1,7 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -1,8 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
@ -1,9 +1,9 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@ -6,9 +6,9 @@ import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
@ -312,4 +312,6 @@ public interface IXzSecurityQualityInspectionRecordService extends IService<XzSe
|
||||
* @return
|
||||
*/
|
||||
Page<XzSecurityQualityInspectionRecordVo> querySpecialPage(Map<String, Object> map);
|
||||
|
||||
void addFromFlow(Map<String, Object> map);
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityRectifyRecord;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
@ -1,9 +1,9 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.WorkerAccessRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IWorkerAccessRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.WorkerAccessRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.WorkerAccessRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IWorkerAccessRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -1,11 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzMilestone;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzMilestoneMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzMilestoneService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzMilestone;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzMilestoneMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzMilestoneService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -1,16 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityProjectDangerTypeDisableMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerTypeRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityDangerItemRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityProjectDangerTypeDisableMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerTypeRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityDangerItemRecordService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -6,14 +6,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityDangerTypeRecordLevelEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerTypeRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityProjectDangerTypeDisableMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityDangerTypeRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerTypeRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityDangerTypeRecordLevelEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerTypeRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityProjectDangerTypeDisableMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityDangerTypeRecordService;
|
||||
import com.zhgd.xmgl.util.CodeUtils;
|
||||
import com.zhgd.xmgl.util.ExcelUtils;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -8,13 +8,13 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.service.IHiddenDangerInspectRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityInspectTaskItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityInspectTaskRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskItemRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityInspectTaskItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityInspectTaskRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityInspectTaskItemRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
@ -11,15 +11,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.service.IHiddenDangerInspectRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityInspectTaskRecordFrequencyTypeEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityInspectTaskItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityInspectTaskRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityInspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityInspectTaskRecordVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityInspectTaskRecordFrequencyTypeEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityInspectTaskItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityInspectTaskRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityInspectTaskRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.util.DateUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -1,8 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityProjectDangerTypeDisableMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityProjectDangerTypeDisableService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityProjectDangerTypeDisable;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityProjectDangerTypeDisableMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityProjectDangerTypeDisableService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
@ -21,6 +21,8 @@ import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||
import com.zhgd.xmgl.call.SanjiangDataCall;
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import com.zhgd.xmgl.enums.ParamEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.*;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Notice;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
|
||||
@ -50,17 +52,15 @@ import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent;
|
||||
import com.zhgd.xmgl.modules.xz.enums.XzDangerousEngineeringAcceptanceTypeEnum;
|
||||
import com.zhgd.xmgl.modules.xz.mapper.XzDeductScoreRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.mapper.XzTaskProgressContentMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.*;
|
||||
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.enums.XzSecurityQualityInspectionRecordRecordTypeEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityQualityInspectionRecordStatusEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityRectifyRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskItemRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityInspectionRecordRecordTypeEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityInspectionRecordStatusEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityQualityInspectionRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityQualityRectifyRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityInspectTaskItemRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityInspectTaskRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.service.IXzWorkerSafeWatchConfigService;
|
||||
import com.zhgd.xmgl.modules.xz.special.service.CountApiService;
|
||||
import com.zhgd.xmgl.push.config.PushPayloads;
|
||||
@ -950,6 +950,85 @@ public class XzSecurityQualityInspectionRecordServiceImpl extends ServiceImpl<Xz
|
||||
return baseMapper.querySpecialPage(map, PageUtil.getPage(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFromFlow(Map<String, Object> map) {
|
||||
Long dangerItemId = FlowUtil.getPullDownLong(map, "dangerItemId");
|
||||
Long dangerTypeId = FlowUtil.getPullDownLong(map, "dangerTypeId");
|
||||
Long creatorId = FlowUtil.getPullDownLong(map, "creatorId");
|
||||
Long changeId = FlowUtil.getPullDownLong(map, "changeId");
|
||||
Long reviewId = FlowUtil.getPullDownLong(map, "reviewId");
|
||||
Long verifyManId = FlowUtil.getPullDownLong(map, "verifyManId");
|
||||
Long inspectManId = FlowUtil.getPullDownLong(map, "inspectManId");
|
||||
Long taskId = FlowUtil.getPullDownLong(map, "taskId");
|
||||
Long itemId = FlowUtil.getPullDownLong(map, "itemId");
|
||||
Long subsectionId = FlowUtil.getPullDownLong(map, "subsectionId");
|
||||
Long subentryId = FlowUtil.getPullDownLong(map, "subentryId");
|
||||
Long deviceUnitId = FlowUtil.getPullDownLong(map, "deviceUnitId");
|
||||
Long projectGroupId = FlowUtil.getPullDownLong(map, "projectGroupId");
|
||||
Long supervisingUnitId = FlowUtil.getPullDownLong(map, "supervisingUnitId");
|
||||
Long epcContractorId = FlowUtil.getPullDownLong(map, "epcContractorId");
|
||||
Long constructionContractorId = FlowUtil.getPullDownLong(map, "constructionContractorId");
|
||||
String regionName = FlowUtil.getString(map, "regionName");
|
||||
String remark = FlowUtil.getString(map, "remark");
|
||||
String dangerDesc = FlowUtil.getString(map, "dangerDesc");
|
||||
String dangerItemContent = FlowUtil.getString(map, "dangerItemContent");
|
||||
String urgentLevel = FlowUtil.getString(map, "urgentLevel");
|
||||
String notifyPerson = FlowUtil.getString(map, "notifyPerson");
|
||||
String createTime = FlowUtil.getString(map, "createTime");
|
||||
String changeLimitTime = FlowUtil.getString(map, "changeLimitTime");
|
||||
String inspectTime = FlowUtil.getString(map, "inspectTime");
|
||||
String enterpriseSn = FlowUtil.getString(map, "enterpriseSn");
|
||||
String imageUrl = FlowUtil.getString(map, "imageUrl");
|
||||
String fileUrl = FlowUtil.getString(map, "fileUrl");
|
||||
String completeTime = FlowUtil.getString(map, "completeTime");
|
||||
String projectSn = FlowUtil.getString(map, "projectSn");
|
||||
String floor = FlowUtil.getString(map, "floor");
|
||||
String addedDescription = FlowUtil.getString(map, "addedDescription");
|
||||
String securityRiskStatement = FlowUtil.getString(map, "securityRiskStatement");
|
||||
Integer level = FlowUtil.getPullDownInteger(map, "level");
|
||||
Integer recordType = FlowUtil.getPullDownInteger(map, "recordType");
|
||||
Integer isDele = FlowUtil.getPullDownInteger(map, "isDele");
|
||||
Integer contractModel = FlowUtil.getPullDownInteger(map, "contractModel");
|
||||
Integer securityType = FlowUtil.getPullDownInteger(map, "securityType");
|
||||
XzSecurityQualityInspectionRecord record = new XzSecurityQualityInspectionRecord();
|
||||
record.setRegionName(regionName);
|
||||
record.setRemark(remark);
|
||||
record.setDangerDesc(dangerDesc);
|
||||
record.setDangerItemContent(dangerItemContent);
|
||||
record.setDangerItemId(dangerItemId);
|
||||
record.setDangerTypeId(dangerTypeId);
|
||||
record.setLevel(level);
|
||||
record.setUrgentLevel(urgentLevel);
|
||||
record.setStatus(2);
|
||||
record.setNotifyPerson(notifyPerson);
|
||||
record.setCreatorId(creatorId);
|
||||
record.setCreateTime(createTime);
|
||||
record.setChangeId(changeId);
|
||||
record.setChangeLimitTime(changeLimitTime);
|
||||
record.setReviewId(reviewId);
|
||||
record.setVerifyManId(verifyManId);
|
||||
record.setInspectManId(inspectManId);
|
||||
record.setInspectTime(inspectTime);
|
||||
record.setRecordType(recordType);
|
||||
record.setEnterpriseSn(enterpriseSn);
|
||||
record.setImageUrl(imageUrl);
|
||||
record.setFileUrl(fileUrl);
|
||||
record.setCompleteTime(completeTime);
|
||||
record.setProjectSn(projectSn);
|
||||
// record.setTaskId(taskId);
|
||||
// record.setItemId(itemId);
|
||||
record.setAddedDescription(addedDescription);
|
||||
record.setContractModel(contractModel);
|
||||
record.setDeviceUnitId(deviceUnitId);
|
||||
record.setProjectGroupId(projectGroupId);
|
||||
record.setSupervisingUnitId(supervisingUnitId);
|
||||
record.setEpcContractorId(epcContractorId);
|
||||
record.setConstructionContractorId(constructionContractorId);
|
||||
record.setSecurityType(securityType);
|
||||
record.setSecurityRiskStatement(securityRiskStatement);
|
||||
baseMapper.insert(record);
|
||||
}
|
||||
|
||||
private void recoverScore(XzSecurityQualityInspectionRecord hiddenDangerInspectRecord) {
|
||||
if (hiddenDangerInspectRecord.getRecordType() == null || Objects.equals(hiddenDangerInspectRecord.getRecordType(), XzSecurityQualityInspectionRecordRecordTypeEnum.RECORD.getValue())) {
|
||||
return;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhgd.xmgl.modules.xz.security.service.impl;
|
||||
package com.zhgd.xmgl.modules.baotou.security.service.impl;
|
||||
|
||||
import cn.afterturn.easypoi.entity.ImageEntity;
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
@ -27,17 +27,17 @@ import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||
import com.zhgd.xmgl.modules.xz.entity.XzDeductScoreRecord;
|
||||
import com.zhgd.xmgl.modules.xz.mapper.XzDeductScoreRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityRecordVo;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityQualityRectifyRecordStatusEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityQualityRectifyRecordTypeEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityRectifyRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityRectifyRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityDangerItemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityRectifyRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityRecordVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityRectifyRecordStatusEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityRectifyRecordTypeEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityDangerItemRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityQualityInspectionRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.mapper.XzSecurityQualityRectifyRecordMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityRectifyRecordService;
|
||||
import com.zhgd.xmgl.push.config.PushPayloads;
|
||||
import com.zhgd.xmgl.util.TimeUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 主要工程量完成情况详情表
|
||||
@ -59,4 +60,7 @@ public interface IMainProjectCompleteDetailService extends IService<MainProjectC
|
||||
void exportXls(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> param);
|
||||
|
||||
List<MainProjectCompleteDetailVo> projectOverview(HashMap<String, Object> param);
|
||||
|
||||
void addFromFlow(Map<String, Object> map);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectSupervisionMonthlyReport;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 工程质量监督月报
|
||||
* @author: pds
|
||||
* @date: 2024-09-29
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IProjectSupervisionMonthlyReportService extends IService<ProjectSupervisionMonthlyReport> {
|
||||
/**
|
||||
* 分页列表查询工程质量监督月报信息
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<ProjectSupervisionMonthlyReport> queryPageList(HashMap<String, Object> param);
|
||||
/**
|
||||
* 列表查询工程质量监督月报信息
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<ProjectSupervisionMonthlyReport> queryList(HashMap<String, Object> param);
|
||||
/**
|
||||
* 添加工程质量监督月报信息
|
||||
* @param projectSupervisionMonthlyReport 工程质量监督月报
|
||||
* @return
|
||||
*/
|
||||
void add(ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport);
|
||||
/**
|
||||
* 编辑工程质量监督月报信息
|
||||
* @param projectSupervisionMonthlyReport 工程质量监督月报
|
||||
* @return
|
||||
*/
|
||||
void edit(ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport);
|
||||
/**
|
||||
* 根据id删除工程质量监督月报信息
|
||||
* @param id 工程质量监督月报的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
/**
|
||||
* 根据id查询工程质量监督月报信息
|
||||
* @param id 工程质量监督月报的id
|
||||
* @return
|
||||
*/
|
||||
ProjectSupervisionMonthlyReport queryById(String id);
|
||||
|
||||
}
|
||||
@ -84,6 +84,7 @@ public class DeviceMasterScheduleYearServiceImpl extends ServiceImpl<DeviceMaste
|
||||
detail.setYearId(year.getId());
|
||||
detail.setYear(year1);
|
||||
detail.setMonth(i);
|
||||
detail.setDeviceUnitId(year.getDeviceUnitId());
|
||||
// detail.setCurrentPlan("");
|
||||
// detail.setCurrentActual("");
|
||||
// detail.setCumulativePlan("");
|
||||
|
||||
@ -5,8 +5,8 @@ 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.io.FileUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@ -24,7 +24,6 @@ import com.zhgd.xmgl.modules.baotou.service.*;
|
||||
import com.zhgd.xmgl.util.*;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -82,23 +81,23 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
private List<MainProjectCompleteDetailVo> dealList(List<MainProjectCompleteDetailVo> list, HashMap<String, Object> param) {
|
||||
Integer levelType = MapUtils.getInteger(param, "levelType");
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
List<MainProjectCompleteDetailVo> alls = baseMapper.queryAllList(param);
|
||||
for (MainProjectCompleteDetailVo vo : list) {
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
vo.setCumulativeCompletedQuantityThisMonth(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear()) && Objects.equals(o.getMonth(), vo.getMonth())).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
vo.setCumulativeCompletedQuantityThisYear(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear())).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
} else {
|
||||
vo.setCumulativeCompletedQuantityThisYear(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear())).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
vo.setCumulativeCompletedQuantity(alls.stream().filter(o -> NumberUtils.gt(o.getYear() + "", vo.getYear() + "") && (Objects.equals(o.getYear(), vo.getYear()) && NumberUtils.gt(o.getMonth() + "", vo.getMonth() + ""))).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
} else {
|
||||
vo.setCumulativeCompletedQuantity(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear())).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
vo.setCumulativeArrival(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear()) && Objects.equals(o.getMonth(), vo.getMonth())).map(MainProjectCompleteDetail::getDeliveryThisPeriod).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
// List<MainProjectCompleteDetailVo> alls = baseMapper.queryAllList(param);
|
||||
// for (MainProjectCompleteDetailVo vo : list) {
|
||||
// if (Objects.equals(levelType, 2)) {
|
||||
// vo.setCumulativeCompletedQuantityThisMonth(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear()) && Objects.equals(o.getMonth(), vo.getMonth())).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// }
|
||||
// if (Objects.equals(levelType, 2)) {
|
||||
// vo.setCumulativeCompletedQuantityThisYear(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear())).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// } else {
|
||||
// vo.setCumulativeCompletedQuantityThisYear(alls.stream().filter(o -> Objects.equals(o.getYear(), vo.getYear())).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// }
|
||||
// if (Objects.equals(levelType, 2)) {
|
||||
// vo.setCumulativeCompletedQuantity(alls.stream().filter(o -> NumberUtil.compare(o.getYear(), vo.getYear()) < 0 || (Objects.equals(o.getYear(), vo.getYear()) && NumberUtil.compare(o.getMonth(), vo.getMonth()) < 0)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// } else {
|
||||
// vo.setCumulativeCompletedQuantity(alls.stream().filter(o -> NumberUtil.compare(o.getYear(), vo.getYear()) < 0 || (Objects.equals(o.getYear(), vo.getYear()) && NumberUtil.compare(o.getMonth(), vo.getMonth()) < 0)).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// }
|
||||
// vo.setCumulativeArrival(alls.stream().filter(o -> NumberUtil.compare(o.getYear(), vo.getYear()) < 0 || (Objects.equals(o.getYear(), vo.getYear()) && NumberUtil.compare(o.getMonth(), vo.getMonth()) < 0)).map(MainProjectCompleteDetail::getDeliveryThisPeriod).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// }
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@ -129,26 +128,27 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(vo);
|
||||
|
||||
MainProjectCompleteName name = new MainProjectCompleteName();
|
||||
BeanUtil.copyProperties(vo, name);
|
||||
name.setId(old.getMainProjectCompleteNameId());
|
||||
mainProjectCompleteNameService.edit(name);
|
||||
|
||||
MainProjectCompleteTotal total = new MainProjectCompleteTotal();
|
||||
BeanUtil.copyProperties(vo, total);
|
||||
mainProjectCompleteTotalService.saveObj(total);
|
||||
} else {
|
||||
add(vo);
|
||||
baseMapper.insert(vo);
|
||||
}
|
||||
|
||||
MainProjectCompleteName oldName = mainProjectCompleteNameService.getById(vo.getMainProjectCompleteNameId());
|
||||
MainProjectCompleteName name = new MainProjectCompleteName();
|
||||
BeanUtil.copyProperties(vo, name);
|
||||
if (oldName != null) {
|
||||
name.setId(oldName.getId());
|
||||
mainProjectCompleteNameService.edit(name);
|
||||
} else {
|
||||
mainProjectCompleteNameService.add(name);
|
||||
}
|
||||
|
||||
MainProjectCompleteTotal total = new MainProjectCompleteTotal();
|
||||
BeanUtil.copyProperties(vo, total);
|
||||
mainProjectCompleteTotalService.saveObj(total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
MainProjectCompleteDetail mainProjectCompleteDetail = baseMapper.selectById(id);
|
||||
if (mainProjectCompleteDetail == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@ -169,7 +169,9 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
String deviceUnitId = MapUtils.getString(param, "deviceUnitId");
|
||||
String mainProjectCompleteNameId = MapUtils.getString(param, "mainProjectCompleteNameId");
|
||||
String mainProjectCompletePeriodId = MapUtils.getString(param, "mainProjectCompletePeriodId");
|
||||
List<MainProjectCompleteDetailVo> alls = baseMapper.queryAllList(param);
|
||||
HashMap<String, Object> p1 = ObjectUtil.cloneByStream(param);
|
||||
p1.put("mainProjectCompletePeriodId", null);
|
||||
List<MainProjectCompleteDetailVo> alls = baseMapper.queryAllList(p1);
|
||||
List<MainProjectCompleteName> nameList = mainProjectCompleteNameService.list(new LambdaQueryWrapper<MainProjectCompleteName>()
|
||||
.eq(MainProjectCompleteName::getProjectSn, projectSn)
|
||||
.eq(StrUtil.isNotBlank(projectQuantityName), MainProjectCompleteName::getProjectQuantityName, projectQuantityName)
|
||||
@ -179,18 +181,22 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
.eq(MainProjectCompleteTotal::getDeviceUnitId, deviceUnitId));
|
||||
Integer year = -1;
|
||||
Integer month = -1;
|
||||
Integer whichWeek = -1;
|
||||
if (period != null) {
|
||||
year = period.getYear();
|
||||
month = period.getMonth();
|
||||
whichWeek = period.getWhichWeek();
|
||||
}
|
||||
Integer finalYear = year;
|
||||
Integer finalMonth = month;
|
||||
Integer finalWhichWeek = whichWeek;
|
||||
List<MainProjectCompleteDetailVo> list = new ArrayList<>();
|
||||
for (MainProjectCompleteName name : nameList) {
|
||||
MainProjectCompleteDetailVo vo = new MainProjectCompleteDetailVo();
|
||||
BeanUtil.copyProperties(name, vo);
|
||||
vo.setMainProjectCompleteNameId(vo.getId());
|
||||
Optional<MainProjectCompleteDetailVo> op = alls.stream().filter(o -> Objects.equals(o.getMainProjectCompleteNameId(), vo.getMainProjectCompleteNameId()) && Objects.equals(o.getMainProjectCompletePeriodId(), period.getId())).findFirst();
|
||||
List<MainProjectCompleteDetailVo> filterAlls = alls.stream().filter(o -> Objects.equals(o.getMainProjectCompleteNameId(), vo.getMainProjectCompleteNameId())).collect(Collectors.toList());
|
||||
Optional<MainProjectCompleteDetailVo> op = filterAlls.stream().filter(o -> Objects.equals(o.getMainProjectCompletePeriodId(), period.getId())).findFirst();
|
||||
if (op.isPresent()) {
|
||||
BeanUtil.copyProperties(op.get(), vo);
|
||||
} else {
|
||||
@ -201,19 +207,23 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
vo.setTotalDesignQuantity(op1.get().getTotalDesignQuantity());
|
||||
}
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
vo.setCumulativeCompletedQuantityThisMonth(alls.stream().filter(o -> Objects.equals(o.getYear(), finalYear) && Objects.equals(o.getMonth(), finalMonth)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
vo.setCumulativeCompletedQuantityThisMonth(filterAlls.stream().filter(o -> Objects.equals(o.getYear(), finalYear) && Objects.equals(o.getMonth(), finalMonth) && isLessOrEqual(o, finalYear, finalMonth, finalWhichWeek)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
vo.setCumulativeCompletedQuantityThisYear(alls.stream().filter(o -> Objects.equals(o.getYear(), finalYear)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
} else {
|
||||
vo.setCumulativeCompletedQuantityThisYear(alls.stream().filter(o -> Objects.equals(o.getYear(), finalYear)).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
vo.setCumulativeCompletedQuantity(alls.stream().filter(o -> NumberUtils.gt(o.getYear() + "", finalYear + "") && (Objects.equals(o.getYear(), finalYear) && NumberUtils.gt(o.getMonth() + "", finalMonth + ""))).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
} else {
|
||||
vo.setCumulativeCompletedQuantity(alls.stream().filter(o -> Objects.equals(o.getYear(), finalYear)).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
}
|
||||
vo.setCumulativeArrival(alls.stream().filter(o -> Objects.equals(o.getYear(), finalYear) && Objects.equals(o.getMonth(), finalMonth)).map(MainProjectCompleteDetail::getDeliveryThisPeriod).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
vo.setCumulativeCompletedQuantityThisYear(filterAlls.stream().filter(o -> Objects.equals(o.getYear(), finalYear) && isLessOrEqual(o, finalYear, finalMonth, finalWhichWeek)).map(mainProjectCompleteDetailVo -> {
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisWeek();
|
||||
} else {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisMonth();
|
||||
}
|
||||
}).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
vo.setCumulativeCompletedQuantity(filterAlls.stream().filter(o -> isLessOrEqual(o, finalYear, finalMonth, finalWhichWeek)).map(mainProjectCompleteDetailVo -> {
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisWeek();
|
||||
} else {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisMonth();
|
||||
}
|
||||
}).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
vo.setCumulativeArrival(filterAlls.stream().filter(o -> isLessOrEqual(o, finalYear, finalMonth, finalWhichWeek)).map(MainProjectCompleteDetail::getDeliveryThisPeriod).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
list.add(vo);
|
||||
}
|
||||
int pageNo = Integer.parseInt(param.getOrDefault("pageNo", 1).toString());
|
||||
@ -231,15 +241,20 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
return p;
|
||||
}
|
||||
|
||||
private boolean isLessOrEqual(MainProjectCompleteDetailVo o, Integer finalYear, Integer finalMonth, Integer finalWhichWeek) {
|
||||
return NumberUtil.isLessOrEqual(NumberUtil.add(o.getYear() * 1000, o.getMonth() * 10, o.getWhichWeek()), NumberUtil.add(finalYear * 1000, finalMonth * 10, finalWhichWeek));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportXls(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> param) {
|
||||
String deviceUnitIds = MapUtils.getString(param, "deviceUnitIds");
|
||||
String projectSn = MapUtils.getString(param, "projectSn");
|
||||
String mainProjectCompletePeriodId = MapUtils.getString(param, "mainProjectCompletePeriodId");
|
||||
Integer levelType = MapUtils.getInteger(param, "levelType");
|
||||
if (StrUtil.isBlank(deviceUnitIds) || StrUtil.isBlank(mainProjectCompletePeriodId) || levelType == null) {
|
||||
throw new OpenAlertException("deviceUnitIds和mainProjectCompletePeriodId和levelType不能为空");
|
||||
if (StrUtil.isBlank(projectSn) || StrUtil.isBlank(deviceUnitIds) || StrUtil.isBlank(mainProjectCompletePeriodId) || levelType == null) {
|
||||
throw new OpenAlertException("projectSn、deviceUnitIds、mainProjectCompletePeriodId、levelType不能为空");
|
||||
}
|
||||
MainProjectCompletePeriod completePeriod = mainProjectCompletePeriodService.getById(mainProjectCompletePeriodId);
|
||||
MainProjectCompletePeriod completePeriod = mainProjectCompletePeriodService.queryById(mainProjectCompletePeriodId);
|
||||
List<MainProjectCompletePeriod> periodList = mainProjectCompletePeriodService.list(new LambdaQueryWrapper<MainProjectCompletePeriod>()
|
||||
.eq(MainProjectCompletePeriod::getLevelType, levelType)
|
||||
.eq(MainProjectCompletePeriod::getYear, completePeriod.getYear())
|
||||
@ -247,11 +262,11 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
.eq(levelType == 2, MainProjectCompletePeriod::getWhichWeek, completePeriod.getWhichWeek())
|
||||
.in(MainProjectCompletePeriod::getDeviceUnitId, StrUtil.split(deviceUnitIds, ","))
|
||||
);
|
||||
List<MainProjectCompleteDetailVo> detailVos = baseMapper.queryAllList(param);
|
||||
param.put("mainProjectCompletePeriodId", null);
|
||||
List<MainProjectCompleteDetailVo> allDetailVos = baseMapper.queryAllList(param);
|
||||
HashMap<String, Object> p1 = ObjectUtil.cloneByStream(param);
|
||||
p1.put("mainProjectCompletePeriodId", null);
|
||||
List<MainProjectCompleteDetailVo> allDetailVos = baseMapper.queryAllList(p1);
|
||||
List<MainProjectCompleteName> nameList = mainProjectCompleteNameService.list(new LambdaQueryWrapper<MainProjectCompleteName>()
|
||||
.eq(MainProjectCompleteName::getProjectSn, periodList.get(0).getProjectSn()));
|
||||
.eq(MainProjectCompleteName::getProjectSn, projectSn));
|
||||
List<MainProjectCompleteName> treeNames = BeanUtil.copyToList(ListUtils.listToTree(JSONArray.parseArray(JSON.toJSONString(nameList)), "id", "parentId", "children"), MainProjectCompleteName.class);
|
||||
List<MainProjectCompleteTotal> totalList = mainProjectCompleteTotalService.list(new LambdaQueryWrapper<MainProjectCompleteTotal>()
|
||||
.in(MainProjectCompleteTotal::getDeviceUnitId, StrUtil.split(deviceUnitIds, ",")));
|
||||
@ -265,51 +280,24 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
LinkedHashMap<String, Object> map = new LinkedHashMap<>();
|
||||
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||
Integer i = 0;
|
||||
this.setMapByListTree(treeNames, listMap, detailVos, allDetailVos, totalList, period, i, levelType);
|
||||
DeviceUnit deviceUnit = unitList.stream().filter(o -> Objects.equals(o.getId(), period.getDeviceUnitId())).findFirst().get();
|
||||
String name = deviceUnit.getDeviceUnitName();
|
||||
this.setMapByListTree(treeNames, listMap, allDetailVos, totalList, period, i, levelType);
|
||||
map.put("listMap", listMap);
|
||||
map.put(SHEET_NAME, unitList.stream().filter(o -> Objects.equals(o.getId(), period.getDeviceUnitId())).findFirst().get().getDeviceUnitName());
|
||||
map.put("subTitle", StrUtil.format("装置/单元工程:{} 截止日期:XXX年XX月XX日 项目建设{}次:{} 填报单位: XXX单位", name, Objects.equals(levelType, 1) ? "月" : "周", period.getYear() + "-" + period.getMonth() + this.getWeekName(period)));
|
||||
map.put(SHEET_NAME, name);
|
||||
sheetList.add(map);
|
||||
}
|
||||
//汇总
|
||||
int i = 0;
|
||||
HashMap<String, Object> totalMap = new HashMap<>();
|
||||
List<Map<String, Object>> totalListMap = new ArrayList<>();
|
||||
totalMap.put("listMap", totalListMap);
|
||||
totalMap.put(SHEET_NAME, "汇总表");
|
||||
for (MainProjectCompleteName name : nameList) {
|
||||
BigDecimal totalDesignQuantity = new BigDecimal("0");
|
||||
BigDecimal completedQuantityThisMonth = new BigDecimal("0");
|
||||
BigDecimal cumulativeCompletedQuantityThisYear = new BigDecimal("0");
|
||||
BigDecimal cumulativeCompletedQuantity = new BigDecimal("0");
|
||||
BigDecimal deliveryThisPeriod = new BigDecimal("0");
|
||||
BigDecimal cumulativeArrival = new BigDecimal("0");
|
||||
Map<String, Object> mp = new HashMap<>();
|
||||
mp.put("projectQuantityName", name.getProjectQuantityName());
|
||||
if (Objects.equals(name.getLevel(), 1)) {
|
||||
mp.put("number", ++i);
|
||||
} else {
|
||||
mp.put("number", null);
|
||||
}
|
||||
for (Map<String, Object> map : sheetList) {
|
||||
List<Map<String, Object>> listMap = (List<Map<String, Object>>) map.get("listMap");
|
||||
Map<String, Object> m = listMap.stream().filter(o -> Objects.equals(o.get("mainProjectCompleteNameId"), name.getId())).findFirst().get();
|
||||
totalDesignQuantity = NumberUtil.add(totalDesignQuantity, Convert.toBigDecimal(m.get("totalDesignQuantity")));
|
||||
completedQuantityThisMonth = NumberUtil.add(completedQuantityThisMonth, Convert.toBigDecimal(m.get("completedQuantityThisMonth")));
|
||||
cumulativeCompletedQuantityThisYear = NumberUtil.add(cumulativeCompletedQuantityThisYear, Convert.toBigDecimal(m.get("cumulativeCompletedQuantityThisYear")));
|
||||
cumulativeCompletedQuantity = NumberUtil.add(cumulativeCompletedQuantity, Convert.toBigDecimal(m.get("cumulativeCompletedQuantity")));
|
||||
deliveryThisPeriod = NumberUtil.add(deliveryThisPeriod, Convert.toBigDecimal(m.get("deliveryThisPeriod")));
|
||||
cumulativeArrival = NumberUtil.add(cumulativeArrival, Convert.toBigDecimal(m.get("cumulativeArrival")));
|
||||
}
|
||||
mp.put("totalDesignQuantity", totalDesignQuantity);
|
||||
mp.put("completedQuantityThisMonth", completedQuantityThisMonth);
|
||||
mp.put("cumulativeCompletedQuantityThisYear", cumulativeCompletedQuantityThisYear);
|
||||
mp.put("cumulativeCompletedQuantity", cumulativeCompletedQuantity);
|
||||
mp.put("deliveryThisPeriod", deliveryThisPeriod);
|
||||
mp.put("cumulativeArrival", cumulativeArrival);
|
||||
}
|
||||
HashMap<String, Object> totalMap = getTotalMap(levelType, periodList, nameList, sheetList);
|
||||
sheetList.add(0, totalMap);
|
||||
File out = FileUtil.file("C:\\Users\\GUO\\Desktop\\mm.xlsx");
|
||||
// File out = Fileutils.getExportExcelTemplateFile("excel/焊接记录导出模版.xlsx");
|
||||
// File out = FileUtil.file("C:\\Users\\Administrator\\Desktop\\mm.xlsx");
|
||||
File out;
|
||||
if (levelType == 1) {
|
||||
out = Fileutils.getExportExcelTemplateFile("excel/主要工程量完成情况记录月计划导出模板.xlsx");
|
||||
} else {
|
||||
out = Fileutils.getExportExcelTemplateFile("excel/主要工程量完成情况记录周计划导出模板.xlsx");
|
||||
}
|
||||
TemplateExportParams params = new TemplateExportParams(out.getAbsolutePath());
|
||||
Workbook workbook = ExcelExportUtil.exportExcelClone(realMap, params);
|
||||
ExcelUtils.downLoadExcel("主要工程量完成情况记录.xlsx", response, workbook);
|
||||
@ -319,60 +307,201 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
}
|
||||
}
|
||||
|
||||
private HashMap<String, Object> getTotalMap(Integer levelType, List<MainProjectCompletePeriod> periodList, List<MainProjectCompleteName> nameList, List<Map<String, Object>> sheetList) {
|
||||
int i = 0;
|
||||
List<Map<String, Object>> totalListMap = new ArrayList<>();
|
||||
HashMap<String, Object> totalMap = new HashMap<>();
|
||||
totalMap.put("listMap", totalListMap);
|
||||
MainProjectCompletePeriod period = periodList.get(0);
|
||||
totalMap.put("subTitle", StrUtil.format("装置/单元工程:全部装置 截止日期:XXX年XX月XX日 项目建设{}次:{} 填报单位: XXX单位", Objects.equals(levelType, 1) ? "月" : "周", period.getYear() + "-" + period.getMonth() + this.getWeekName(period)));
|
||||
totalMap.put(SHEET_NAME, "汇总表");
|
||||
List<Map<String, Object>> oneListMap = (List<Map<String, Object>>) sheetList.get(0).get("listMap");
|
||||
for (int j = 0; j < oneListMap.size(); j++) {
|
||||
BigDecimal totalDesignQuantity = new BigDecimal("0");
|
||||
BigDecimal completedQuantityThisWeek = new BigDecimal("0");
|
||||
BigDecimal completedQuantityThisMonth = new BigDecimal("0");
|
||||
BigDecimal cumulativeCompletedQuantityThisYear = new BigDecimal("0");
|
||||
BigDecimal cumulativeCompletedQuantity = new BigDecimal("0");
|
||||
BigDecimal deliveryThisPeriod = new BigDecimal("0");
|
||||
BigDecimal cumulativeArrival = new BigDecimal("0");
|
||||
Map<String, Object> mp = new HashMap<>();
|
||||
Map<String, Object> value = oneListMap.get(j);
|
||||
mp.put("projectQuantityName", value.get("projectQuantityName"));
|
||||
mp.put("number", value.get("number"));
|
||||
for (Map<String, Object> map : sheetList) {
|
||||
List<Map<String, Object>> listMap = (List<Map<String, Object>>) map.get("listMap");
|
||||
Map<String, Object> m = listMap.get(j);
|
||||
totalDesignQuantity = NumberUtil.add(totalDesignQuantity, Convert.toBigDecimal(m.get("totalDesignQuantity")));
|
||||
completedQuantityThisWeek = NumberUtil.add(completedQuantityThisWeek, Convert.toBigDecimal(m.get("completedQuantityThisWeek")));
|
||||
completedQuantityThisMonth = NumberUtil.add(completedQuantityThisMonth, Convert.toBigDecimal(m.get("completedQuantityThisMonth")));
|
||||
cumulativeCompletedQuantityThisYear = NumberUtil.add(cumulativeCompletedQuantityThisYear, Convert.toBigDecimal(m.get("cumulativeCompletedQuantityThisYear")));
|
||||
cumulativeCompletedQuantity = NumberUtil.add(cumulativeCompletedQuantity, Convert.toBigDecimal(m.get("cumulativeCompletedQuantity")));
|
||||
deliveryThisPeriod = NumberUtil.add(deliveryThisPeriod, Convert.toBigDecimal(m.get("deliveryThisPeriod")));
|
||||
cumulativeArrival = NumberUtil.add(cumulativeArrival, Convert.toBigDecimal(m.get("cumulativeArrival")));
|
||||
}
|
||||
mp.put("totalDesignQuantity", totalDesignQuantity);
|
||||
mp.put("completedQuantityThisWeek", completedQuantityThisWeek);
|
||||
mp.put("completedQuantityThisMonth", completedQuantityThisMonth);
|
||||
mp.put("cumulativeCompletedQuantityThisYear", cumulativeCompletedQuantityThisYear);
|
||||
mp.put("cumulativeCompletedQuantity", cumulativeCompletedQuantity);
|
||||
mp.put("deliveryThisPeriod", deliveryThisPeriod);
|
||||
mp.put("cumulativeArrival", cumulativeArrival);
|
||||
totalListMap.add(mp);
|
||||
}
|
||||
return totalMap;
|
||||
}
|
||||
|
||||
private String getWeekName(MainProjectCompletePeriod period) {
|
||||
if (period.getLevelType().equals(2)) {
|
||||
Integer whichWeek = period.getWhichWeek();
|
||||
String name = "";
|
||||
switch (whichWeek) {
|
||||
case 1:
|
||||
name = "一";
|
||||
break;
|
||||
case 2:
|
||||
name = "二";
|
||||
break;
|
||||
case 3:
|
||||
name = "三";
|
||||
break;
|
||||
case 4:
|
||||
name = "四";
|
||||
break;
|
||||
}
|
||||
return "第" + name + "周";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MainProjectCompleteDetailVo> projectOverview(HashMap<String, Object> param) {
|
||||
String projectSn = MapUtils.getString(param, "projectSn");
|
||||
String deviceUnitId = MapUtils.getString(param, "deviceUnitId");
|
||||
List<MainProjectCompleteDetailVo> treeNames = getNameVos(projectSn);
|
||||
param.put("levelType", 1);
|
||||
List<MainProjectCompleteTotal> totalList = mainProjectCompleteTotalService.list(new LambdaQueryWrapper<MainProjectCompleteTotal>()
|
||||
.eq(MainProjectCompleteTotal::getProjectSn, projectSn)
|
||||
.eq(StrUtil.isNotBlank(deviceUnitId), MainProjectCompleteTotal::getDeviceUnitId, deviceUnitId)
|
||||
);
|
||||
List<MainProjectCompleteDetailVo> detailList = mainProjectCompleteDetailMapper.queryAllList(param);
|
||||
addChildrenList(treeNames, detailList);
|
||||
List<MainProjectCompletePeriod> periodList = mainProjectCompletePeriodService.list(new LambdaQueryWrapper<MainProjectCompletePeriod>()
|
||||
.eq(MainProjectCompletePeriod::getProjectSn, projectSn)
|
||||
.eq(MainProjectCompletePeriod::getLevelType, 1)
|
||||
.eq(StrUtil.isNotBlank(deviceUnitId), MainProjectCompletePeriod::getDeviceUnitId, deviceUnitId)
|
||||
);
|
||||
List<Integer> overviewYears = periodList.stream().map(MainProjectCompletePeriod::getYear).distinct().sorted(Integer::compareTo).collect(Collectors.toList());
|
||||
addChildrenList(treeNames, detailList, totalList, overviewYears);
|
||||
return treeNames;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addFromFlow(Map<String, Object> map) {
|
||||
Long deviceUnitId = FlowUtil.getPullDownLong(map, "deviceUnitId");
|
||||
Long mainProjectCompleteNameId = FlowUtil.getPullDownLong(map, "mainProjectCompleteNameId");
|
||||
String yearMonth = FlowUtil.getString(map, "yearMonth");
|
||||
Integer year = Convert.toInt(yearMonth.split("-")[0]);
|
||||
Integer month = Convert.toInt(yearMonth.split("-")[1]);
|
||||
Integer whichWeek = FlowUtil.getPullDownInteger(map, "whichWeek");
|
||||
Integer levelType = MapUtils.getInteger(map, "levelType");
|
||||
BigDecimal completedQuantityThisMonth = Convert.toBigDecimal(FlowUtil.getString(map, "completedQuantityThisMonth"));
|
||||
BigDecimal completedQuantityThisWeek = Convert.toBigDecimal(FlowUtil.getString(map, "completedQuantityThisWeek"));
|
||||
BigDecimal deliveryThisPeriod = Convert.toBigDecimal(FlowUtil.getString(map, "deliveryThisPeriod"));
|
||||
String projectSn = FlowUtil.getString(map, "projectSn");
|
||||
MainProjectCompleteDetailVo vo = new MainProjectCompleteDetailVo();
|
||||
vo.setDeviceUnitId(deviceUnitId);
|
||||
vo.setMainProjectCompleteNameId(mainProjectCompleteNameId);
|
||||
vo.setYear(year);
|
||||
vo.setMonth(month);
|
||||
vo.setWhichWeek(whichWeek);
|
||||
vo.setLevelType(levelType);
|
||||
vo.setCompletedQuantityThisMonth(completedQuantityThisMonth);
|
||||
vo.setCompletedQuantityThisWeek(completedQuantityThisWeek);
|
||||
vo.setDeliveryThisPeriod(deliveryThisPeriod);
|
||||
vo.setProjectSn(projectSn);
|
||||
|
||||
MainProjectCompletePeriod period = mainProjectCompletePeriodService.getOne(new LambdaQueryWrapper<MainProjectCompletePeriod>()
|
||||
.eq(MainProjectCompletePeriod::getProjectSn, projectSn)
|
||||
.eq(MainProjectCompletePeriod::getDeviceUnitId, deviceUnitId)
|
||||
.eq(MainProjectCompletePeriod::getYear, year)
|
||||
.eq(MainProjectCompletePeriod::getMonth, month)
|
||||
.eq(MainProjectCompletePeriod::getLevelType, levelType)
|
||||
.eq(Objects.equals(levelType, 2), MainProjectCompletePeriod::getWhichWeek, whichWeek)
|
||||
);
|
||||
if (period == null) {
|
||||
period = new MainProjectCompletePeriod();
|
||||
period.setDeviceUnitId(deviceUnitId);
|
||||
period.setYear(year);
|
||||
period.setMonth(month);
|
||||
period.setWhichWeek(whichWeek);
|
||||
period.setLevelType(levelType);
|
||||
period.setProjectSn(projectSn);
|
||||
mainProjectCompletePeriodService.save(period);
|
||||
}
|
||||
vo.setMainProjectCompletePeriodId(period.getId());
|
||||
|
||||
MainProjectCompleteDetail old = baseMapper.selectOne(new LambdaQueryWrapper<MainProjectCompleteDetail>()
|
||||
.eq(MainProjectCompleteDetail::getProjectSn, projectSn)
|
||||
.eq(MainProjectCompleteDetail::getMainProjectCompleteNameId, mainProjectCompleteNameId)
|
||||
.eq(MainProjectCompleteDetail::getMainProjectCompletePeriodId, period.getId())
|
||||
.eq(MainProjectCompleteDetail::getDeviceUnitId, deviceUnitId)
|
||||
);
|
||||
if (old != null) {
|
||||
vo.setId(old.getId());
|
||||
baseMapper.updateById(vo);
|
||||
} else {
|
||||
baseMapper.insert(vo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private List<MainProjectCompleteDetailVo> getNameVos(String projectSn) {
|
||||
List<MainProjectCompleteName> nameList = mainProjectCompleteNameService.list(new LambdaQueryWrapper<MainProjectCompleteName>()
|
||||
.eq(MainProjectCompleteName::getProjectSn, projectSn));
|
||||
JSONArray ja = ListUtils.listToTree(JSONArray.parseArray(JSON.toJSONString(nameList)), "id", "parentId", "children");
|
||||
List<MainProjectCompleteDetailVo> treeNames = new ArrayList<>();
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
List<MainProjectCompleteDetailVo> vos = new ArrayList<>();
|
||||
for (MainProjectCompleteName name : nameList) {
|
||||
MainProjectCompleteDetailVo vo = new MainProjectCompleteDetailVo();
|
||||
BeanUtil.copyProperties(ja.getJSONObject(i), vo);
|
||||
BeanUtil.copyProperties(name, vo);
|
||||
vo.setMainProjectCompleteNameId(vo.getId());
|
||||
treeNames.add(vo);
|
||||
vo.setId(null);
|
||||
vos.add(vo);
|
||||
}
|
||||
return treeNames;
|
||||
return BeanUtil.copyToList(ListUtils.listToTree(JSONArray.parseArray(JSON.toJSONString(vos)), "mainProjectCompleteNameId", "parentId", "children"), MainProjectCompleteDetailVo.class);
|
||||
}
|
||||
|
||||
private void addChildrenList(List<MainProjectCompleteDetailVo> treeNames, List<MainProjectCompleteDetailVo> detailList) {
|
||||
private void addChildrenList(List<MainProjectCompleteDetailVo> treeNames, List<MainProjectCompleteDetailVo> detailList, List<MainProjectCompleteTotal> totalList, List<Integer> overviewYears) {
|
||||
for (MainProjectCompleteDetailVo name : treeNames) {
|
||||
List<MainProjectCompleteDetailVo> nameDetails = detailList.stream().filter(o -> Objects.equals(o.getMainProjectCompleteNameId(), name.getMainProjectCompleteNameId())).collect(Collectors.toList());
|
||||
Map<Integer, List<MainProjectCompleteDetailVo>> yearMap = nameDetails.stream().sorted(Comparator.comparing(MainProjectCompleteDetailVo::getYear)).collect(Collectors.groupingBy(MainProjectCompleteDetailVo::getYear));
|
||||
ArrayList<LinkedHashMap<String, Object>> overviewList = new ArrayList<>();
|
||||
for (Map.Entry<Integer, List<MainProjectCompleteDetailVo>> entry : yearMap.entrySet()) {
|
||||
Integer thisYear = entry.getKey();
|
||||
List<MainProjectCompleteDetailVo> ds = entry.getValue();
|
||||
List<LinkedHashMap<String, Object>> overviewList = new ArrayList<>();
|
||||
for (Integer thisYear : overviewYears) {
|
||||
List<MainProjectCompleteDetailVo> thisYears = nameDetails.stream().filter(o -> Objects.equals(o.getYear(), thisYear)).collect(Collectors.toList());
|
||||
LinkedHashMap<String, Object> map = new LinkedHashMap<>();
|
||||
List<MainProjectCompleteDetailVo> thisYears = ds.stream().filter(o -> Objects.equals(o.getYear(), thisYear)).collect(Collectors.toList());
|
||||
map.put(thisYear + "年累积完成量", thisYears.stream().map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
Map<Integer, List<MainProjectCompleteDetailVo>> monthMap = thisYears.stream().sorted(Comparator.comparing(MainProjectCompleteDetailVo::getMonth)).collect(Collectors.groupingBy(MainProjectCompleteDetailVo::getMonth));
|
||||
map.put("yearName", thisYear + "年累积完成量");
|
||||
map.put("yearValue", thisYears.stream().map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
ArrayList<LinkedHashMap<String, Object>> months = new ArrayList<>();
|
||||
for (Map.Entry<Integer, List<MainProjectCompleteDetailVo>> monthEntry : monthMap.entrySet()) {
|
||||
for (int month = 1; month <= 12; month++) {
|
||||
LinkedHashMap<String, Object> m = new LinkedHashMap<>();
|
||||
m.put("name", monthEntry.getKey());
|
||||
m.put("value", monthEntry.getValue().stream().map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
m.put("name", month);
|
||||
int finalMonth = month;
|
||||
List<MainProjectCompleteDetailVo> list = thisYears.stream().filter(o -> Objects.equals(o.getMonth(), finalMonth)).collect(Collectors.toList());
|
||||
m.put("value", list.stream().map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
months.add(m);
|
||||
}
|
||||
map.put("monthList", months);
|
||||
overviewList.add(map);
|
||||
}
|
||||
name.setOverviewList(overviewList);
|
||||
addChildrenList(name.getChildren(), detailList);
|
||||
BigDecimal totalDesignQuantity = totalList.stream().filter(o -> Objects.equals(name.getMainProjectCompleteNameId(), o.getMainProjectCompleteNameId())).map(MainProjectCompleteTotal::getTotalDesignQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
name.setTotalDesignQuantity(totalDesignQuantity);
|
||||
BigDecimal cumulativeCompletedQuantity = nameDetails.stream().map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
name.setCumulativeCompletedQuantity(cumulativeCompletedQuantity);
|
||||
addChildrenList(name.getChildren(), detailList, totalList, overviewYears);
|
||||
}
|
||||
}
|
||||
|
||||
private void setMapByListTree(List<MainProjectCompleteName> treeNames, List<Map<String, Object>> listMap, List<MainProjectCompleteDetailVo> detailVos, List<MainProjectCompleteDetailVo> allDetailVos, List<MainProjectCompleteTotal> totalList, MainProjectCompletePeriod period, Integer i, Integer levelType) {
|
||||
private void setMapByListTree(List<MainProjectCompleteName> treeNames, List<Map<String, Object>> listMap, List<MainProjectCompleteDetailVo> alls, List<MainProjectCompleteTotal> totalList, MainProjectCompletePeriod period, Integer i, Integer levelType) {
|
||||
for (MainProjectCompleteName name : treeNames) {
|
||||
BigDecimal cumulativeCompletedQuantityThisYear = null;
|
||||
BigDecimal cumulativeCompletedQuantity = null;
|
||||
@ -380,50 +509,63 @@ public class MainProjectCompleteDetailServiceImpl extends ServiceImpl<MainProjec
|
||||
BigDecimal totalDesignQuantity = null;
|
||||
BigDecimal completedQuantityThisMonth = null;
|
||||
BigDecimal deliveryThisPeriod = null;
|
||||
BigDecimal completedQuantityThisWeek = null;
|
||||
Integer year = period.getYear();
|
||||
Integer month = period.getMonth();
|
||||
Optional<MainProjectCompleteDetailVo> op = detailVos.stream().filter(o -> Objects.equals(o.getMainProjectCompleteNameId(), name.getId()) && Objects.equals(o.getDeviceUnitId(), period.getDeviceUnitId())).findFirst();
|
||||
Integer whichWeek = period.getWhichWeek();
|
||||
MainProjectCompleteDetailVo vo = new MainProjectCompleteDetailVo();
|
||||
BeanUtil.copyProperties(name, vo);
|
||||
vo.setMainProjectCompleteNameId(vo.getId());
|
||||
List<MainProjectCompleteDetailVo> filterAlls = alls.stream().filter(o -> Objects.equals(o.getMainProjectCompleteNameId(), vo.getMainProjectCompleteNameId())).collect(Collectors.toList());
|
||||
Optional<MainProjectCompleteDetailVo> op = filterAlls.stream().filter(o -> Objects.equals(o.getMainProjectCompletePeriodId(), period.getId())).findFirst();
|
||||
if (op.isPresent()) {
|
||||
MainProjectCompleteDetailVo vo = op.get();
|
||||
BeanUtil.copyProperties(op.get(), vo);
|
||||
completedQuantityThisMonth = vo.getCompletedQuantityThisMonth();
|
||||
deliveryThisPeriod = vo.getDeliveryThisPeriod();
|
||||
completedQuantityThisWeek = vo.getCompletedQuantityThisWeek();
|
||||
} else {
|
||||
vo.setId(null);
|
||||
}
|
||||
Optional<MainProjectCompleteTotal> op1 = totalList.stream().filter(o -> Objects.equals(o.getMainProjectCompleteNameId(), name.getId()) && Objects.equals(o.getDeviceUnitId(), period.getDeviceUnitId())).findFirst();
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
completedQuantityThisMonth = filterAlls.stream().filter(o -> Objects.equals(o.getYear(), year) && Objects.equals(o.getMonth(), month) && isLessOrEqual(o, year, month, whichWeek)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
Optional<MainProjectCompleteTotal> op1 = totalList.stream().filter(o -> Objects.equals(o.getDeviceUnitId(), period.getDeviceUnitId()) && Objects.equals(o.getMainProjectCompleteNameId(), vo.getMainProjectCompleteNameId())).findFirst();
|
||||
if (op1.isPresent()) {
|
||||
totalDesignQuantity = op1.get().getTotalDesignQuantity();
|
||||
}
|
||||
// if (Objects.equals(levelType, 2)) {
|
||||
// vo.setCumulativeCompletedQuantityThisMonth(alls.stream().filter(o -> Objects.equals(o.getYear(), year) && Objects.equals(o.getMonth(), month)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
// }
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
cumulativeCompletedQuantityThisYear = allDetailVos.stream().filter(o -> Objects.equals(o.getYear(), year)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
} else {
|
||||
cumulativeCompletedQuantityThisYear = allDetailVos.stream().filter(o -> Objects.equals(o.getYear(), year)).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
cumulativeCompletedQuantity = allDetailVos.stream().filter(o -> NumberUtil.compare(o.getYear(), year) < 0 && (Objects.equals(o.getYear(), year) && NumberUtil.compare(o.getMonth(), month) < 0)).map(MainProjectCompleteDetail::getCompletedQuantityThisWeek).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
} else {
|
||||
cumulativeCompletedQuantity = allDetailVos.stream().filter(o -> NumberUtil.compare(o.getYear(), year) < 0 && (Objects.equals(o.getYear(), year) && NumberUtil.compare(o.getMonth(), month) < 0)).map(MainProjectCompleteDetail::getCompletedQuantityThisMonth).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
cumulativeArrival = allDetailVos.stream().filter(o -> Objects.equals(o.getYear(), year) && Objects.equals(o.getMonth(), month)).map(MainProjectCompleteDetail::getDeliveryThisPeriod).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
cumulativeCompletedQuantityThisYear = filterAlls.stream().filter(o -> Objects.equals(period.getDeviceUnitId(), o.getDeviceUnitId()) && Objects.equals(o.getYear(), year) && isLessOrEqual(o, year, month, whichWeek)).map(mainProjectCompleteDetailVo -> {
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisWeek();
|
||||
} else {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisMonth();
|
||||
}
|
||||
}).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
cumulativeCompletedQuantity = filterAlls.stream().filter(o -> Objects.equals(period.getDeviceUnitId(), o.getDeviceUnitId()) && Objects.equals(o.getMainProjectCompletePeriodId(), period.getId()) && isLessOrEqual(o, year, month, whichWeek)).map(mainProjectCompleteDetailVo -> {
|
||||
if (Objects.equals(levelType, 2)) {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisWeek();
|
||||
} else {
|
||||
return mainProjectCompleteDetailVo.getCompletedQuantityThisMonth();
|
||||
}
|
||||
}).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
cumulativeArrival = filterAlls.stream().filter(o -> Objects.equals(period.getDeviceUnitId(), o.getDeviceUnitId()) && isLessOrEqual(o, year, month, whichWeek)).map(MainProjectCompleteDetail::getDeliveryThisPeriod).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
Map<String, Object> mp = new HashMap<>();
|
||||
if (Objects.equals(name.getLevel(), 1)) {
|
||||
if (Objects.equals(vo.getLevel(), 1)) {
|
||||
mp.put("number", ++i);
|
||||
} else {
|
||||
mp.put("number", null);
|
||||
}
|
||||
mp.put("projectQuantityName", name.getProjectQuantityName());
|
||||
mp.put("projectQuantityName", vo.getProjectQuantityName());
|
||||
mp.put("totalDesignQuantity", totalDesignQuantity);
|
||||
mp.put("completedQuantityThisWeek", completedQuantityThisWeek);
|
||||
mp.put("completedQuantityThisMonth", completedQuantityThisMonth);
|
||||
mp.put("cumulativeCompletedQuantityThisYear", cumulativeCompletedQuantityThisYear);
|
||||
mp.put("cumulativeCompletedQuantity", cumulativeCompletedQuantity);
|
||||
mp.put("deliveryThisPeriod", deliveryThisPeriod);
|
||||
mp.put("cumulativeArrival", cumulativeArrival);
|
||||
mp.put("mainProjectCompleteNameId", name.getId());
|
||||
mp.put("level", name.getLevel());
|
||||
mp.put("mainProjectCompleteNameId", vo.getMainProjectCompleteNameId());
|
||||
mp.put("level", vo.getLevel());
|
||||
listMap.add(mp);
|
||||
setMapByListTree(name.getChildren(), listMap, detailVos, allDetailVos, totalList, period, i, levelType);
|
||||
setMapByListTree(name.getChildren(), listMap, alls, totalList, period, i, levelType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,37 +1,38 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.MainProjectCompletePeriod;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.MainProjectCompletePeriodMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IMainProjectCompletePeriodService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.MainProjectCompletePeriod;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.MainProjectCompletePeriodMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IMainProjectCompletePeriodService;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 主要工程量完成情况时间段
|
||||
* @author: pds
|
||||
* @date: 2024-09-26
|
||||
* @date: 2024-09-26
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class MainProjectCompletePeriodServiceImpl extends ServiceImpl<MainProjectCompletePeriodMapper, MainProjectCompletePeriod> implements IMainProjectCompletePeriodService {
|
||||
@Autowired
|
||||
private MainProjectCompletePeriodMapper mainProjectCompletePeriodMapper;
|
||||
|
||||
@Override
|
||||
public IPage<MainProjectCompletePeriod> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MainProjectCompletePeriod> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<MainProjectCompletePeriod> page = PageUtil.getPage(param);
|
||||
IPage<MainProjectCompletePeriod> pageList = baseMapper.queryList(page, queryWrapper,param);
|
||||
IPage<MainProjectCompletePeriod> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
@ -39,12 +40,12 @@ public class MainProjectCompletePeriodServiceImpl extends ServiceImpl<MainProjec
|
||||
@Override
|
||||
public List<MainProjectCompletePeriod> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MainProjectCompletePeriod> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper,param));
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<MainProjectCompletePeriod> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<MainProjectCompletePeriod> queryWrapper = QueryGenerator.initPageQueryWrapper(MainProjectCompletePeriod.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(MainProjectCompletePeriod::getId));
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(MainProjectCompletePeriod::getYear), RefUtil.fieldNameUlc(MainProjectCompletePeriod::getMonth), RefUtil.fieldNameUlc(MainProjectCompletePeriod::getWhichWeek));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
@ -61,7 +62,7 @@ public class MainProjectCompletePeriodServiceImpl extends ServiceImpl<MainProjec
|
||||
@Override
|
||||
public void edit(MainProjectCompletePeriod mainProjectCompletePeriod) {
|
||||
MainProjectCompletePeriod oldMainProjectCompletePeriod = baseMapper.selectById(mainProjectCompletePeriod.getId());
|
||||
if(oldMainProjectCompletePeriod==null) {
|
||||
if (oldMainProjectCompletePeriod == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(mainProjectCompletePeriod);
|
||||
@ -70,7 +71,7 @@ public class MainProjectCompletePeriodServiceImpl extends ServiceImpl<MainProjec
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
MainProjectCompletePeriod mainProjectCompletePeriod = baseMapper.selectById(id);
|
||||
if(mainProjectCompletePeriod==null) {
|
||||
if (mainProjectCompletePeriod == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectSupervisionMonthlyReport;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.ProjectSupervisionMonthlyReportMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IProjectSupervisionMonthlyReportService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 工程质量监督月报
|
||||
* @author: pds
|
||||
* @date: 2024-09-29
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProjectSupervisionMonthlyReportServiceImpl extends ServiceImpl<ProjectSupervisionMonthlyReportMapper, ProjectSupervisionMonthlyReport> implements IProjectSupervisionMonthlyReportService {
|
||||
@Autowired
|
||||
private ProjectSupervisionMonthlyReportMapper projectSupervisionMonthlyReportMapper;
|
||||
@Override
|
||||
public IPage<ProjectSupervisionMonthlyReport> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<ProjectSupervisionMonthlyReport> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<ProjectSupervisionMonthlyReport> page = PageUtil.getPage(param);
|
||||
IPage<ProjectSupervisionMonthlyReport> pageList = baseMapper.queryList(page, queryWrapper,param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectSupervisionMonthlyReport> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<ProjectSupervisionMonthlyReport> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper,param));
|
||||
}
|
||||
|
||||
private QueryWrapper<ProjectSupervisionMonthlyReport> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<ProjectSupervisionMonthlyReport> queryWrapper = QueryGenerator.initPageQueryWrapper(ProjectSupervisionMonthlyReport.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(ProjectSupervisionMonthlyReport::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<ProjectSupervisionMonthlyReport> dealList(List<ProjectSupervisionMonthlyReport> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport) {
|
||||
projectSupervisionMonthlyReport.setId(null);
|
||||
baseMapper.insert(projectSupervisionMonthlyReport);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport) {
|
||||
ProjectSupervisionMonthlyReport oldProjectSupervisionMonthlyReport = baseMapper.selectById(projectSupervisionMonthlyReport.getId());
|
||||
if(oldProjectSupervisionMonthlyReport==null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(projectSupervisionMonthlyReport);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
ProjectSupervisionMonthlyReport projectSupervisionMonthlyReport = baseMapper.selectById(id);
|
||||
if(projectSupervisionMonthlyReport==null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectSupervisionMonthlyReport queryById(String id) {
|
||||
ProjectSupervisionMonthlyReport entity = baseMapper.queryById(id);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
||||
@ -23,7 +23,7 @@ import com.zhgd.xmgl.modules.video.mapper.VideoAlarmMapper;
|
||||
import com.zhgd.xmgl.modules.water.mapper.WaterMeterMapper;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerAttendanceMapper;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo;
|
||||
import com.zhgd.xmgl.util.DateUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@ -55,9 +55,9 @@ import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService;
|
||||
import com.zhgd.xmgl.modules.worker.service.impl.WorkerInfoServiceImpl;
|
||||
import com.zhgd.xmgl.modules.xz.entity.XzRegistry;
|
||||
import com.zhgd.xmgl.modules.xz.mapper.XzRegistryMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityQualityInspectionRecordStatusEnum;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityInspectionRecordStatusEnum;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.service.impl.XzRegistryServiceImpl;
|
||||
import com.zhgd.xmgl.security.JwtTokenProvider;
|
||||
import com.zhgd.xmgl.security.entity.UserInfo;
|
||||
|
||||
@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.GetStatScoreVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.GetStatScoreVo;
|
||||
import com.zhgd.xmgl.modules.xz.special.entity.vo.CountSpecialByFinalStatusVo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ -26,9 +26,9 @@ import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationS
|
||||
import com.zhgd.xmgl.modules.dangerous.service.IHiddenDangerInspectRecordService;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
|
||||
import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.GetStatScoreVo;
|
||||
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.GetStatScoreVo;
|
||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService;
|
||||
import com.zhgd.xmgl.modules.xz.special.entity.vo.CountSpecialByFinalStatusVo;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.inspection.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.inspection.entity.InspectTaskRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@ -20,9 +20,6 @@ import com.zhgd.xmgl.modules.inspection.mapper.InspectTaskRecordMapper;
|
||||
import com.zhgd.xmgl.modules.inspection.service.IInspectTaskRecordService;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.service.IQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityInspectTaskItemRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.enums.XzSecurityInspectTaskRecordFrequencyTypeEnum;
|
||||
import com.zhgd.xmgl.util.DateUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@ -1,20 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.quality.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringRecordService;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.entity.dto.DepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.quality.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.quality.service.IQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.modules.video.service.IAiAnalyseHardWareAlarmRecordService;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.*;
|
||||
import com.zhgd.xmgl.modules.baotou.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -27,8 +23,6 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user