盲板抽堵安全
This commit is contained in:
parent
3eeac352ff
commit
5caab68eb2
@ -0,0 +1,120 @@
|
||||
package com.zhgd.xmgl.modules.xz.aaa.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.aaa.entity.XzBlindPlatePlugSafe;
|
||||
import com.zhgd.xmgl.modules.xz.aaa.service.IXzBlindPlatePlugSafeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 星纵-盲板抽堵安全
|
||||
* @author: pds
|
||||
* @date: 2024-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/xzBlindPlatePlugSafe")
|
||||
@Slf4j
|
||||
@Api(tags = "星纵-盲板抽堵安全相关Api")
|
||||
public class XzBlindPlatePlugSafeController {
|
||||
@Autowired
|
||||
private IXzBlindPlatePlugSafeService xzBlindPlatePlugSafeService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@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<XzBlindPlatePlugSafe>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(xzBlindPlatePlugSafeService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询星纵-盲板抽堵安全信息", notes = "列表查询星纵-盲板抽堵安全信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<XzBlindPlatePlugSafe>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(xzBlindPlatePlugSafeService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param xzBlindPlatePlugSafe
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加星纵-盲板抽堵安全信息", notes = "添加星纵-盲板抽堵安全信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<XzBlindPlatePlugSafe> add(@RequestBody @Validate XzBlindPlatePlugSafe xzBlindPlatePlugSafe) {
|
||||
xzBlindPlatePlugSafeService.add(xzBlindPlatePlugSafe);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param xzBlindPlatePlugSafe
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑星纵-盲板抽堵安全信息", notes = "编辑星纵-盲板抽堵安全信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<XzBlindPlatePlugSafe> edit(@RequestBody XzBlindPlatePlugSafe xzBlindPlatePlugSafe) {
|
||||
xzBlindPlatePlugSafeService.edit(xzBlindPlatePlugSafe);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除星纵-盲板抽堵安全信息", notes = "删除星纵-盲板抽堵安全信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "星纵-盲板抽堵安全ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<XzBlindPlatePlugSafe> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
xzBlindPlatePlugSafeService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询星纵-盲板抽堵安全信息", notes = "通过id查询星纵-盲板抽堵安全信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "星纵-盲板抽堵安全ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<XzBlindPlatePlugSafe> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(xzBlindPlatePlugSafeService.queryById(id));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,220 @@
|
||||
package com.zhgd.xmgl.modules.xz.aaa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.modules.xz.special.entity.XzGasAnalyze;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 星纵-盲板抽堵安全
|
||||
* @author: pds
|
||||
* @date: 2024-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("xz_blind_plate_plug_safe")
|
||||
@ApiModel(value = "XzBlindPlatePlugSafe实体类", description = "XzBlindPlatePlugSafe")
|
||||
public class XzBlindPlatePlugSafe implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 作业申请单位
|
||||
*/
|
||||
@Excel(name = "作业申请单位", width = 15)
|
||||
@ApiModelProperty(value = "作业申请单位")
|
||||
private Long jobApplicationUnit;
|
||||
/**
|
||||
* 作业申请时间
|
||||
*/
|
||||
@Excel(name = "作业申请时间", width = 20, format = "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 = "作业申请时间")
|
||||
private java.util.Date jobApplicationTime;
|
||||
/**
|
||||
* 实际作业开始时间
|
||||
*/
|
||||
@Excel(name = "实际作业开始时间", width = 20, format = "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 = "实际作业开始时间")
|
||||
private java.util.Date actualJobBeginTime;
|
||||
|
||||
/**
|
||||
* 作业人
|
||||
*/
|
||||
@Excel(name = "作业人", width = 15)
|
||||
@ApiModelProperty(value = "作业人")
|
||||
private Long jobPerson;
|
||||
|
||||
/**
|
||||
* 作业单位
|
||||
*/
|
||||
@Excel(name = "作业单位", width = 15)
|
||||
@ApiModelProperty(value = "作业单位")
|
||||
private Long operatingUnit;
|
||||
/**
|
||||
* 作业负责人
|
||||
*/
|
||||
@Excel(name = "作业负责人", width = 15)
|
||||
@ApiModelProperty(value = "作业负责人")
|
||||
private Long assignmentPersonInCharge;
|
||||
/**
|
||||
* 安全交底人
|
||||
*/
|
||||
@Excel(name = "安全交底人", width = 15)
|
||||
@ApiModelProperty(value = "安全交底人")
|
||||
private Long safetyInformant;
|
||||
/**
|
||||
* 接受交底人
|
||||
*/
|
||||
@Excel(name = "接受交底人", width = 15)
|
||||
@ApiModelProperty(value = "接受交底人")
|
||||
private Long acceptTheInformant;
|
||||
/**
|
||||
* 监护人
|
||||
*/
|
||||
@Excel(name = "监护人", width = 15)
|
||||
@ApiModelProperty(value = "监护人")
|
||||
private Long guardian;
|
||||
/**
|
||||
* 风险辨识结果
|
||||
*/
|
||||
@Excel(name = "风险辨识结果", width = 15)
|
||||
@ApiModelProperty(value = "风险辨识结果")
|
||||
private String riskIdentificationResult;
|
||||
/**
|
||||
* 作业类别
|
||||
*/
|
||||
@Excel(name = "作业类别", width = 15)
|
||||
@ApiModelProperty(value = "作业类别")
|
||||
private String jobType;
|
||||
/**
|
||||
* 盲板位置图
|
||||
*/
|
||||
@Excel(name = "盲板位置图", width = 15)
|
||||
@ApiModelProperty(value = "盲板位置图")
|
||||
private String blindPlatePic;
|
||||
/**
|
||||
* 盲板编号
|
||||
*/
|
||||
@Excel(name = "盲板编号", width = 15)
|
||||
@ApiModelProperty(value = "盲板编号")
|
||||
private String blindPlateNo;
|
||||
|
||||
|
||||
/**
|
||||
* 安全作业票编号
|
||||
*/
|
||||
@Excel(name = "安全作业票编号", width = 15)
|
||||
@ApiModelProperty(value = "安全作业票编号")
|
||||
private String safetyWorkTicketCode;
|
||||
/**
|
||||
* 关联的其他特殊作业
|
||||
*/
|
||||
@Excel(name = "关联的其他特殊作业", width = 15)
|
||||
@ApiModelProperty(value = "关联的其他特殊作业")
|
||||
private String otherRelatedSpecialTask;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@Excel(name = "所属项目SN", width = 15)
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private String projectSn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
@ApiModelProperty(value = "安全措施")
|
||||
private String safeMeasure;
|
||||
@ApiModelProperty(value = "作业票编号")
|
||||
private String workTicketCode;
|
||||
@ApiModelProperty(value = "最终验收状态1进行中2已闭合")
|
||||
private Integer finalAcceptanceStatus;
|
||||
|
||||
/**
|
||||
* 作业申请单位名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "作业申请单位名称", width = 15)
|
||||
@ApiModelProperty(value = "作业申请单位名称")
|
||||
private String jobApplicationUnitName;
|
||||
/**
|
||||
* 作业单位名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "作业单位名称", width = 15)
|
||||
@ApiModelProperty(value = "作业单位名称")
|
||||
private String operatingUnitName;
|
||||
|
||||
/**
|
||||
* 作业负责人名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "作业负责人名称", width = 15)
|
||||
@ApiModelProperty(value = "作业负责人名称")
|
||||
private String assignmentPersonInChargeName;
|
||||
|
||||
/**
|
||||
* 作业人名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "作业人名称", width = 15)
|
||||
@ApiModelProperty(value = "作业人名称")
|
||||
private Long jobPersonName;
|
||||
|
||||
/**
|
||||
* 监护人名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "监护人名称", width = 15)
|
||||
@ApiModelProperty(value = "监护人名称")
|
||||
private String guardianName;
|
||||
|
||||
/**
|
||||
* 安全交底人名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "安全交底人名称", width = 15)
|
||||
@ApiModelProperty(value = "安全交底人名称")
|
||||
private String safetyInformantName;
|
||||
/**
|
||||
* 接受交底人名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "接受交底人名称", width = 15)
|
||||
@ApiModelProperty(value = "接受交底人名称")
|
||||
private String acceptTheInformantName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "安全隐患总数")
|
||||
private Integer hiddenDangerNum;
|
||||
|
||||
|
||||
//@TableField(exist = false)
|
||||
//@ApiModelProperty(value = "星纵-气体分析列表")
|
||||
//private List<XzGasAnalyze> xzGasAnalyzeList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.zhgd.xmgl.modules.xz.aaa.mapper;
|
||||
|
||||
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 com.zhgd.xmgl.modules.xz.aaa.entity.XzBlindPlatePlugSafe;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 星纵-盲板抽堵安全
|
||||
* @author: pds
|
||||
* @date: 2024-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface XzBlindPlatePlugSafeMapper extends BaseMapper<XzBlindPlatePlugSafe> {
|
||||
|
||||
IPage<XzBlindPlatePlugSafe> queryList(Page<XzBlindPlatePlugSafe> page, @Param(Constants.WRAPPER) QueryWrapper<XzBlindPlatePlugSafe> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
List<XzBlindPlatePlugSafe> queryList(@Param(Constants.WRAPPER) QueryWrapper<XzBlindPlatePlugSafe> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
XzBlindPlatePlugSafe queryById(@Param("param") Map<String, Object> param);
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
<?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.aaa.mapper.XzBlindPlatePlugSafeMapper">
|
||||
<sql id="column">
|
||||
t.*,
|
||||
ei1.enterprise_name as jobApplicationUnitName,
|
||||
ei2.enterprise_name as operatingUnitName,
|
||||
su.real_name as assignmentPersonInChargeName,
|
||||
wi1.worker_name as jobPersonName,
|
||||
wi2.worker_name as safetyInformantName,
|
||||
wi3.worker_name as acceptTheInformantName,
|
||||
wi4.worker_name as guardianName,
|
||||
IFNULL(tp.hidden_danger_num, 0) hidden_danger_num
|
||||
</sql>
|
||||
<sql id="selectTable">
|
||||
select
|
||||
<include refid="column"/>
|
||||
from xz_limit_space_safe t
|
||||
left join enterprise_info ei1 on t.job_application_unit = ei1.id
|
||||
left join enterprise_info ei2 on t.operating_unit = ei2.id
|
||||
left join system_user su on su.user_id=t.assignment_person_in_charge
|
||||
left join worker_info wi1 on t.job_person = wi1.id
|
||||
left join worker_info wi2 on t.safety_informant = wi2.id
|
||||
left join worker_info wi3 on t.accept_the_informant = wi3.id
|
||||
left join worker_info wi4 on t.guardian = wi4.id
|
||||
LEFT JOIN (SELECT engineering_id, COUNT(1) hidden_danger_num
|
||||
from xz_security_quality_inspection_record
|
||||
WHERE 1 = 1
|
||||
<if test="param.projectSn != null and param.projectSn != ''">
|
||||
and project_sn = #{param.projectSn}
|
||||
</if>
|
||||
<if test="param.engineeringId != null and param.engineeringId != ''">
|
||||
and enterprise_id = #{param.engineeringId}
|
||||
</if>
|
||||
AND `status` in (2, 3, 4)
|
||||
AND type = 1
|
||||
GROUP BY engineering_id) tp ON t.id = tp.engineering_id
|
||||
</sql>
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.xz.aaa.entity.XzBlindPlatePlugSafe">
|
||||
<include refid="selectTable">
|
||||
</include>
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.xz.aaa.entity.XzBlindPlatePlugSafe">
|
||||
<include refid="selectTable">
|
||||
</include>
|
||||
where t.id = #{param.id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,31 @@
|
||||
package com.zhgd.xmgl.modules.xz.aaa.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.xz.aaa.entity.XzBlindPlatePlugSafe;
|
||||
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-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IXzBlindPlatePlugSafeService extends IService<XzBlindPlatePlugSafe> {
|
||||
|
||||
IPage<XzBlindPlatePlugSafe> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<XzBlindPlatePlugSafe> queryList(HashMap<String, Object> paramMap);
|
||||
|
||||
void add(XzBlindPlatePlugSafe xzBlindPlatePlugSafe);
|
||||
|
||||
void edit(XzBlindPlatePlugSafe xzBlindPlatePlugSafe);
|
||||
|
||||
void delete(String id);
|
||||
|
||||
XzBlindPlatePlugSafe queryById(String id);
|
||||
|
||||
void finish(Long engineeringId);
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.zhgd.xmgl.modules.xz.aaa.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.xz.aaa.entity.XzBlindPlatePlugSafe;
|
||||
import com.zhgd.xmgl.modules.xz.aaa.mapper.XzBlindPlatePlugSafeMapper;
|
||||
import com.zhgd.xmgl.modules.xz.aaa.service.IXzBlindPlatePlugSafeService;
|
||||
import com.zhgd.xmgl.modules.xz.special.entity.XzGasAnalyze;
|
||||
import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 星纵-盲板抽堵安全
|
||||
* @author: pds
|
||||
* @date: 2024-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class XzBlindPlatePlugSafeServiceImpl extends ServiceImpl<XzBlindPlatePlugSafeMapper, XzBlindPlatePlugSafe> implements IXzBlindPlatePlugSafeService {
|
||||
@Autowired
|
||||
private XzBlindPlatePlugSafeMapper xzSpecialOperationFireSafetyMapper;
|
||||
@Autowired
|
||||
private XzGasAnalyzeMapper xzGasAnalyzeMapper;
|
||||
|
||||
@Override
|
||||
public IPage<XzBlindPlatePlugSafe> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<XzBlindPlatePlugSafe> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<XzBlindPlatePlugSafe> page = PageUtil.getPage(paramMap);
|
||||
IPage<XzBlindPlatePlugSafe> pageList = baseMapper.queryList(page, queryWrapper, paramMap);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XzBlindPlatePlugSafe> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<XzBlindPlatePlugSafe> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(baseMapper.queryList(queryWrapper, paramMap));
|
||||
}
|
||||
|
||||
private QueryWrapper<XzBlindPlatePlugSafe> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
String alias = "t.";
|
||||
QueryWrapper<XzBlindPlatePlugSafe> queryWrapper = QueryGenerator.initPageQueryWrapper(XzBlindPlatePlugSafe.class, paramMap, alias);
|
||||
String firemanName = MapUtils.getString(paramMap, "firemanName");
|
||||
if (StrUtil.isNotBlank(firemanName)) {
|
||||
queryWrapper.like("wi1.worker_name", firemanName);
|
||||
}
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(XzBlindPlatePlugSafe::getJobApplicationTime));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<XzBlindPlatePlugSafe> dealList(List<XzBlindPlatePlugSafe> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(XzBlindPlatePlugSafe xzBlindPlatePlugSafe) {
|
||||
xzBlindPlatePlugSafe.setId(null);
|
||||
baseMapper.insert(xzBlindPlatePlugSafe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(XzBlindPlatePlugSafe xzBlindPlatePlugSafe) {
|
||||
XzBlindPlatePlugSafe oldXzBlindPlatePlugSafe = baseMapper.selectById(xzBlindPlatePlugSafe.getId());
|
||||
if (oldXzBlindPlatePlugSafe == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(xzBlindPlatePlugSafe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
XzBlindPlatePlugSafe xzBlindPlatePlugSafe = baseMapper.selectById(id);
|
||||
if (xzBlindPlatePlugSafe == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XzBlindPlatePlugSafe queryById(String id) {
|
||||
XzBlindPlatePlugSafe safety = baseMapper.queryById(new MapBuilder<String, Object>().put("id", id).build());
|
||||
if (safety == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
//List<XzGasAnalyze> xzGasAnalyzes = xzGasAnalyzeMapper.selectList(new LambdaQueryWrapper<XzGasAnalyze>()
|
||||
// .eq(XzGasAnalyze::getXzBlindPlatePlugSafeId, id));
|
||||
//safety.setXzGasAnalyzeList(xzGasAnalyzes);
|
||||
return safety;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish(Long engineeringId) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<XzBlindPlatePlugSafe>()
|
||||
.eq(XzBlindPlatePlugSafe::getId, engineeringId)
|
||||
.set(XzBlindPlatePlugSafe::getFinalAcceptanceStatus, 2)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user