Commit 348ddbea authored by 耿迪迪's avatar 耿迪迪

安检记录查询

parent 44315ceb
......@@ -48,6 +48,12 @@ public class TGasUserInfoController extends BaseController
return getDataTable(list);
}
@GetMapping("/gasUserInfoList")
public AjaxResult gasUserInfoList(TGasUserInfo tGasUserInfo){
List<TGasUserInfo> list = tGasUserInfoService.selectTGasUserInfoList(tGasUserInfo);
return AjaxResult.success(list);
}
/**
* 导出燃气用户列表
*/
......
package com.zehong.web.controller.gasBottleTrack;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TSafeCheckRecord;
import com.zehong.system.service.ITSafeCheckRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 安检记录Controller
*
* @author zehong
* @date 2023-08-21
*/
@RestController
@RequestMapping("/safe/record")
public class TSafeCheckRecordController extends BaseController
{
@Autowired
private ITSafeCheckRecordService tSafeCheckRecordService;
/**
* 查询安检记录列表
*/
@PreAuthorize("@ss.hasPermi('safe:record:list')")
@GetMapping("/list")
public TableDataInfo list(TSafeCheckRecord tSafeCheckRecord)
{
startPage();
List<TSafeCheckRecord> list = tSafeCheckRecordService.selectTSafeCheckRecordList(tSafeCheckRecord);
return getDataTable(list);
}
/**
* 导出安检记录列表
*/
@PreAuthorize("@ss.hasPermi('safe:record:export')")
@Log(title = "安检记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSafeCheckRecord tSafeCheckRecord)
{
List<TSafeCheckRecord> list = tSafeCheckRecordService.selectTSafeCheckRecordList(tSafeCheckRecord);
ExcelUtil<TSafeCheckRecord> util = new ExcelUtil<TSafeCheckRecord>(TSafeCheckRecord.class);
return util.exportExcel(list, "安检记录数据");
}
/**
* 获取安检记录详细信息
*/
@PreAuthorize("@ss.hasPermi('safe:record:query')")
@GetMapping(value = "/{safeCheckId}")
public AjaxResult getInfo(@PathVariable("safeCheckId") Long safeCheckId)
{
return AjaxResult.success(tSafeCheckRecordService.selectTSafeCheckRecordById(safeCheckId));
}
/**
* 新增安检记录
*/
@PreAuthorize("@ss.hasPermi('safe:record:add')")
@Log(title = "安检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSafeCheckRecord tSafeCheckRecord)
{
return toAjax(tSafeCheckRecordService.insertTSafeCheckRecord(tSafeCheckRecord));
}
/**
* 修改安检记录
*/
@PreAuthorize("@ss.hasPermi('safe:record:edit')")
@Log(title = "安检记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSafeCheckRecord tSafeCheckRecord)
{
return toAjax(tSafeCheckRecordService.updateTSafeCheckRecord(tSafeCheckRecord));
}
/**
* 删除安检记录
*/
@PreAuthorize("@ss.hasPermi('safe:record:remove')")
@Log(title = "安检记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{safeCheckIds}")
public AjaxResult remove(@PathVariable Long[] safeCheckIds)
{
return toAjax(tSafeCheckRecordService.deleteTSafeCheckRecordByIds(safeCheckIds));
}
}
......@@ -68,8 +68,9 @@ public class TGasBottleTrackRecord extends BaseEntity
/** 删除状态:0.否 1.是 */
private String isDel;
private String messageInfo;
public void setTrackRecordId(Long trackRecordId)
public void setTrackRecordId(Long trackRecordId)
{
this.trackRecordId = trackRecordId;
}
......@@ -194,6 +195,13 @@ public class TGasBottleTrackRecord extends BaseEntity
this.stationName = stationName;
}
public String getMessageInfo() {
return messageInfo;
}
public void setMessageInfo(String messageInfo) {
this.messageInfo = messageInfo;
}
@Override
public String toString() {
......
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 安检记录对象 t_safe_check_record
*
* @author zehong
* @date 2023-08-21
*/
public class TSafeCheckRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 安检主键 */
private Long safeCheckId;
/** 储配站主键 */
private Long stationId;
@Excel(name = "储配站")
private String stationName;
@Excel(name = "用户名称")
private String gasUserName;
@Excel(name = "用户类型:0.居民 1.非居民")
private String gasUserType;
@Excel(name = "联系方式")
private String telNum;
/** 用户主键 */
private Long gasUserId;
/** 安检时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date safeCheckDate;
/** 安检人 */
private Long safeCheckPerson;
@Excel(name = "安检人员")
private String safeCheckPersonName;
/** 气瓶数量 */
//@Excel(name = "气瓶数量")
private Integer bottleNum;
/** 入户状态:0.正常入户 1.拒绝安检 */
@Excel(name = "入户状态:0.正常入户 1.拒绝安检")
private String checkInStatus;
@Excel(name = "用户地址")
private String gasUserAddress;
/** 燃气灶具检查情况:0.合格 1.无3C认证 2.无熄火保护装置 */
//@Excel(name = "燃气灶具检查情况:0.合格 1.无3C认证 2.无熄火保护装置")
private String stoveCheckStatus;
/** 燃气灶具检查情况 */
// @Excel(name = "燃气灶具检查情况")
private String stoveCheckPic;
/** 连接软管检查情况:0.合格 1.普通橡胶软管 2.三通连接软管 3.长度超过两米且未使用硬质钢管链接 4.穿越墙体、门窗顶棚和地面 */
//@Excel(name = "连接软管检查情况:0.合格 1.普通橡胶软管 2.三通连接软管 3.长度超过两米且未使用硬质钢管链接 4.穿越墙体、门窗顶棚和地面")
private String hoseCheckStatus;
/** 连接软管检查情况 */
//@Excel(name = "连接软管检查情况")
private String hoseCheckPic;
/** 减压阀检查情况:0.合格 1.可调节 2.五自闭功能 */
// @Excel(name = "减压阀检查情况:0.合格 1.可调节 2.五自闭功能")
private String valveCheckStatus;
/** 减压阀检查情况 */
//@Excel(name = "减压阀检查情况")
private String valveCheckPic;
/** 液化气钢瓶检查情况:0.合格 1.部分有码且可追溯 2.有码但不可追溯 3.钢瓶无码 */
//@Excel(name = "液化气钢瓶检查情况:0.合格 1.部分有码且可追溯 2.有码但不可追溯 3.钢瓶无码")
private String bottleCheckStatus;
/** 液化气钢瓶检查情况 */
//@Excel(name = "液化气钢瓶检查情况")
private String bottleCheckPic;
/** 报警器加电磁切断阀检查情况:0.合格 1.有但未使用 2.有但未实现联动 3.无 4.非液化气专用报警器 5.安装位置大于0.3米 */
//@Excel(name = "报警器加电磁切断阀检查情况:0.合格 1.有但未使用 2.有但未实现联动 3.无 4.非液化气专用报警器 5.安装位置大于0.3米")
private String alarmCheckStatus;
/** 报警器加电磁切断阀检查情况 */
//@Excel(name = "报警器加电磁切断阀检查情况")
private String alarmCheckPic;
/** 用气场所检查情况:0.合格 1.高层建筑(裙房) 2.地下(半地下)室 3.车库或半地下车库 4.通风不良的场所 5.50公斤钢瓶超过两只或15公斤钢瓶超过七只未设置独立的气瓶间 */
//@Excel(name = "用气场所检查情况:0.合格 1.高层建筑", readConverterExp = "裙=房")
private String placeCheckStatus;
/** 用气场所检查情况 */
// @Excel(name = "用气场所检查情况")
private String placeCheckPic;
/** 安检人员签名 */
// @Excel(name = "安检人员签名")
private String checkPersonSign;
/** 用户签字 */
//@Excel(name = "用户签字")
private String gasUserSign;
/** 删除状态:0.否 1.是 */
private String isDel;
private Date safeCheckBeginTime;
private Date safeCheckEndTime;
public void setSafeCheckId(Long safeCheckId)
{
this.safeCheckId = safeCheckId;
}
public Long getSafeCheckId()
{
return safeCheckId;
}
public void setStationId(Long stationId)
{
this.stationId = stationId;
}
public Long getStationId()
{
return stationId;
}
public void setGasUserId(Long gasUserId)
{
this.gasUserId = gasUserId;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getGasUserName() {
return gasUserName;
}
public void setGasUserName(String gasUserName) {
this.gasUserName = gasUserName;
}
public String getGasUserType() {
return gasUserType;
}
public void setGasUserType(String gasUserType) {
this.gasUserType = gasUserType;
}
public String getTelNum() {
return telNum;
}
public void setTelNum(String telNum) {
this.telNum = telNum;
}
public String getGasUserAddress() {
return gasUserAddress;
}
public void setGasUserAddress(String gasUserAddress) {
this.gasUserAddress = gasUserAddress;
}
public Long getGasUserId()
{
return gasUserId;
}
public void setSafeCheckDate(Date safeCheckDate)
{
this.safeCheckDate = safeCheckDate;
}
public Date getSafeCheckDate()
{
return safeCheckDate;
}
public void setSafeCheckPerson(Long safeCheckPerson)
{
this.safeCheckPerson = safeCheckPerson;
}
public Long getSafeCheckPerson()
{
return safeCheckPerson;
}
public void setBottleNum(Integer bottleNum)
{
this.bottleNum = bottleNum;
}
public String getSafeCheckPersonName() {
return safeCheckPersonName;
}
public void setSafeCheckPersonName(String safeCheckPersonName) {
this.safeCheckPersonName = safeCheckPersonName;
}
public Integer getBottleNum()
{
return bottleNum;
}
public void setCheckInStatus(String checkInStatus)
{
this.checkInStatus = checkInStatus;
}
public String getCheckInStatus()
{
return checkInStatus;
}
public void setStoveCheckStatus(String stoveCheckStatus)
{
this.stoveCheckStatus = stoveCheckStatus;
}
public String getStoveCheckStatus()
{
return stoveCheckStatus;
}
public void setStoveCheckPic(String stoveCheckPic)
{
this.stoveCheckPic = stoveCheckPic;
}
public String getStoveCheckPic()
{
return stoveCheckPic;
}
public void setHoseCheckStatus(String hoseCheckStatus)
{
this.hoseCheckStatus = hoseCheckStatus;
}
public String getHoseCheckStatus()
{
return hoseCheckStatus;
}
public void setHoseCheckPic(String hoseCheckPic)
{
this.hoseCheckPic = hoseCheckPic;
}
public String getHoseCheckPic()
{
return hoseCheckPic;
}
public void setValveCheckStatus(String valveCheckStatus)
{
this.valveCheckStatus = valveCheckStatus;
}
public String getValveCheckStatus()
{
return valveCheckStatus;
}
public void setValveCheckPic(String valveCheckPic)
{
this.valveCheckPic = valveCheckPic;
}
public String getValveCheckPic()
{
return valveCheckPic;
}
public void setBottleCheckStatus(String bottleCheckStatus)
{
this.bottleCheckStatus = bottleCheckStatus;
}
public String getBottleCheckStatus()
{
return bottleCheckStatus;
}
public void setBottleCheckPic(String bottleCheckPic)
{
this.bottleCheckPic = bottleCheckPic;
}
public String getBottleCheckPic()
{
return bottleCheckPic;
}
public void setAlarmCheckStatus(String alarmCheckStatus)
{
this.alarmCheckStatus = alarmCheckStatus;
}
public String getAlarmCheckStatus()
{
return alarmCheckStatus;
}
public void setAlarmCheckPic(String alarmCheckPic)
{
this.alarmCheckPic = alarmCheckPic;
}
public String getAlarmCheckPic()
{
return alarmCheckPic;
}
public void setPlaceCheckStatus(String placeCheckStatus)
{
this.placeCheckStatus = placeCheckStatus;
}
public String getPlaceCheckStatus()
{
return placeCheckStatus;
}
public void setPlaceCheckPic(String placeCheckPic)
{
this.placeCheckPic = placeCheckPic;
}
public String getPlaceCheckPic()
{
return placeCheckPic;
}
public void setCheckPersonSign(String checkPersonSign)
{
this.checkPersonSign = checkPersonSign;
}
public String getCheckPersonSign()
{
return checkPersonSign;
}
public void setGasUserSign(String gasUserSign)
{
this.gasUserSign = gasUserSign;
}
public String getGasUserSign()
{
return gasUserSign;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public Date getSafeCheckBeginTime() {
return safeCheckBeginTime;
}
public void setSafeCheckBeginTime(Date safeCheckBeginTime) {
this.safeCheckBeginTime = safeCheckBeginTime;
}
public Date getSafeCheckEndTime() {
return safeCheckEndTime;
}
public void setSafeCheckEndTime(Date safeCheckEndTime) {
this.safeCheckEndTime = safeCheckEndTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("safeCheckId", getSafeCheckId())
.append("stationId", getStationId())
.append("gasUserId", getGasUserId())
.append("safeCheckDate", getSafeCheckDate())
.append("safeCheckPerson", getSafeCheckPerson())
.append("bottleNum", getBottleNum())
.append("checkInStatus", getCheckInStatus())
.append("stoveCheckStatus", getStoveCheckStatus())
.append("stoveCheckPic", getStoveCheckPic())
.append("hoseCheckStatus", getHoseCheckStatus())
.append("hoseCheckPic", getHoseCheckPic())
.append("valveCheckStatus", getValveCheckStatus())
.append("valveCheckPic", getValveCheckPic())
.append("bottleCheckStatus", getBottleCheckStatus())
.append("bottleCheckPic", getBottleCheckPic())
.append("alarmCheckStatus", getAlarmCheckStatus())
.append("alarmCheckPic", getAlarmCheckPic())
.append("placeCheckStatus", getPlaceCheckStatus())
.append("placeCheckPic", getPlaceCheckPic())
.append("checkPersonSign", getCheckPersonSign())
.append("gasUserSign", getGasUserSign())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TSafeCheckRecord;
/**
* 安检记录Mapper接口
*
* @author zehong
* @date 2023-08-21
*/
public interface TSafeCheckRecordMapper
{
/**
* 查询安检记录
*
* @param safeCheckId 安检记录ID
* @return 安检记录
*/
public TSafeCheckRecord selectTSafeCheckRecordById(Long safeCheckId);
/**
* 查询安检记录列表
*
* @param tSafeCheckRecord 安检记录
* @return 安检记录集合
*/
public List<TSafeCheckRecord> selectTSafeCheckRecordList(TSafeCheckRecord tSafeCheckRecord);
/**
* 新增安检记录
*
* @param tSafeCheckRecord 安检记录
* @return 结果
*/
public int insertTSafeCheckRecord(TSafeCheckRecord tSafeCheckRecord);
/**
* 修改安检记录
*
* @param tSafeCheckRecord 安检记录
* @return 结果
*/
public int updateTSafeCheckRecord(TSafeCheckRecord tSafeCheckRecord);
/**
* 删除安检记录
*
* @param safeCheckId 安检记录ID
* @return 结果
*/
public int deleteTSafeCheckRecordById(Long safeCheckId);
/**
* 批量删除安检记录
*
* @param safeCheckIds 需要删除的数据ID
* @return 结果
*/
public int deleteTSafeCheckRecordByIds(Long[] safeCheckIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TSafeCheckRecord;
/**
* 安检记录Service接口
*
* @author zehong
* @date 2023-08-21
*/
public interface ITSafeCheckRecordService
{
/**
* 查询安检记录
*
* @param safeCheckId 安检记录ID
* @return 安检记录
*/
public TSafeCheckRecord selectTSafeCheckRecordById(Long safeCheckId);
/**
* 查询安检记录列表
*
* @param tSafeCheckRecord 安检记录
* @return 安检记录集合
*/
public List<TSafeCheckRecord> selectTSafeCheckRecordList(TSafeCheckRecord tSafeCheckRecord);
/**
* 新增安检记录
*
* @param tSafeCheckRecord 安检记录
* @return 结果
*/
public int insertTSafeCheckRecord(TSafeCheckRecord tSafeCheckRecord);
/**
* 修改安检记录
*
* @param tSafeCheckRecord 安检记录
* @return 结果
*/
public int updateTSafeCheckRecord(TSafeCheckRecord tSafeCheckRecord);
/**
* 批量删除安检记录
*
* @param safeCheckIds 需要删除的安检记录ID
* @return 结果
*/
public int deleteTSafeCheckRecordByIds(Long[] safeCheckIds);
/**
* 删除安检记录信息
*
* @param safeCheckId 安检记录ID
* @return 结果
*/
public int deleteTSafeCheckRecordById(Long safeCheckId);
}
......@@ -2,12 +2,16 @@ package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TAirChargeRecord;
import com.zehong.system.mapper.TAirChargeRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TGasBottleTrackRecordMapper;
import com.zehong.system.domain.TGasBottleTrackRecord;
import com.zehong.system.service.ITGasBottleTrackRecordService;
import javax.annotation.Resource;
/**
* 气瓶追溯Service业务层处理
*
......@@ -20,6 +24,9 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
@Autowired
private TGasBottleTrackRecordMapper tGasBottleTrackRecordMapper;
@Resource
private TAirChargeRecordMapper tAirChargeRecordMapper;
/**
* 查询气瓶追溯
*
......@@ -41,7 +48,28 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
@Override
public List<TGasBottleTrackRecord> selectTGasBottleTrackRecordList(TGasBottleTrackRecord tGasBottleTrackRecord)
{
return tGasBottleTrackRecordMapper.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
List<TGasBottleTrackRecord> records = tGasBottleTrackRecordMapper.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
records.stream().forEach(item ->{
StringBuilder massage = new StringBuilder("");
if("0".equals(item.getProcessesName())){
TAirChargeRecord charge = tAirChargeRecordMapper.selectTAirChargeRecordById(item.getProcessesRelationId());
massage.append("由【 "+ charge.getStationName() +" 】")
.append("从业人员【 " + charge.getChargeOperatorName() + " 】,")
.append("给编号【 " + charge.getBottleCode() + " 】气瓶充气成功");
}
if("1".equals(item.getProcessesName())){
massage.append("由【 "+ item.getStationName() +" 】")
.append("配送人员"+ item.getOperatorName() +" 联系电话")
.append("配送气瓶到客户【】")
.append("联系电话");
}
if("2".equals(item.getProcessesName())){
massage.append("由从业人员【 " + item.getOperatorName() + " 】")
.append("回收编号【 "+ item.getBottleCode() +" 】气瓶");
}
item.setMessageInfo(massage.toString());
});
return records;
}
/**
......
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSafeCheckRecordMapper;
import com.zehong.system.domain.TSafeCheckRecord;
import com.zehong.system.service.ITSafeCheckRecordService;
/**
* 安检记录Service业务层处理
*
* @author zehong
* @date 2023-08-21
*/
@Service
public class TSafeCheckRecordServiceImpl implements ITSafeCheckRecordService
{
@Autowired
private TSafeCheckRecordMapper tSafeCheckRecordMapper;
/**
* 查询安检记录
*
* @param safeCheckId 安检记录ID
* @return 安检记录
*/
@Override
public TSafeCheckRecord selectTSafeCheckRecordById(Long safeCheckId)
{
return tSafeCheckRecordMapper.selectTSafeCheckRecordById(safeCheckId);
}
/**
* 查询安检记录列表
*
* @param tSafeCheckRecord 安检记录
* @return 安检记录
*/
@Override
public List<TSafeCheckRecord> selectTSafeCheckRecordList(TSafeCheckRecord tSafeCheckRecord)
{
return tSafeCheckRecordMapper.selectTSafeCheckRecordList(tSafeCheckRecord);
}
/**
* 新增安检记录
*
* @param tSafeCheckRecord 安检记录
* @return 结果
*/
@Override
public int insertTSafeCheckRecord(TSafeCheckRecord tSafeCheckRecord)
{
tSafeCheckRecord.setCreateTime(DateUtils.getNowDate());
return tSafeCheckRecordMapper.insertTSafeCheckRecord(tSafeCheckRecord);
}
/**
* 修改安检记录
*
* @param tSafeCheckRecord 安检记录
* @return 结果
*/
@Override
public int updateTSafeCheckRecord(TSafeCheckRecord tSafeCheckRecord)
{
tSafeCheckRecord.setUpdateTime(DateUtils.getNowDate());
return tSafeCheckRecordMapper.updateTSafeCheckRecord(tSafeCheckRecord);
}
/**
* 批量删除安检记录
*
* @param safeCheckIds 需要删除的安检记录ID
* @return 结果
*/
@Override
public int deleteTSafeCheckRecordByIds(Long[] safeCheckIds)
{
return tSafeCheckRecordMapper.deleteTSafeCheckRecordByIds(safeCheckIds);
}
/**
* 删除安检记录信息
*
* @param safeCheckId 安检记录ID
* @return 结果
*/
@Override
public int deleteTSafeCheckRecordById(Long safeCheckId)
{
return tSafeCheckRecordMapper.deleteTSafeCheckRecordById(safeCheckId);
}
}
<?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.zehong.system.mapper.TSafeCheckRecordMapper">
<resultMap type="TSafeCheckRecord" id="TSafeCheckRecordResult">
<result property="safeCheckId" column="safe_check_id" />
<result property="stationId" column="station_id" />
<result property="gasUserId" column="gas_user_id" />
<result property="safeCheckDate" column="safe_check_date" />
<result property="safeCheckPerson" column="safe_check_person" />
<result property="bottleNum" column="bottle_num" />
<result property="checkInStatus" column="check_in_status" />
<result property="stoveCheckStatus" column="stove_check_status" />
<result property="stoveCheckPic" column="stove_check_pic" />
<result property="hoseCheckStatus" column="hose_check_status" />
<result property="hoseCheckPic" column="hose_check_pic" />
<result property="valveCheckStatus" column="valve_check_status" />
<result property="valveCheckPic" column="valve_check_pic" />
<result property="bottleCheckStatus" column="bottle_check_status" />
<result property="bottleCheckPic" column="bottle_check_pic" />
<result property="alarmCheckStatus" column="alarm_check_status" />
<result property="alarmCheckPic" column="alarm_check_pic" />
<result property="placeCheckStatus" column="place_check_status" />
<result property="placeCheckPic" column="place_check_pic" />
<result property="checkPersonSign" column="check_person_sign" />
<result property="gasUserSign" column="gas_user_sign" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
<result property="stationName" column="station_name"/>
<result property="gasUserName" column="gas_user_name"/>
<result property="gasUserType" column="gas_user_type"/>
<result property="telNum" column="tel_num"/>
<result property="gasUserAddress" column="gas_user_address"/>
<result property="safeCheckPersonName" column="safe_check_person_name"/>
</resultMap>
<sql id="selectTSafeCheckRecordVo">
SELECT
record.safe_check_id,
record.station_id,
record.gas_user_id,
record.safe_check_date,
record.safe_check_person,
record.bottle_num,
record.check_in_status,
record.stove_check_status,
record.stove_check_pic,
record.hose_check_status,
record.hose_check_pic,
record.valve_check_status,
record.valve_check_pic,
record.bottle_check_status,
record.bottle_check_pic,
record.alarm_check_status,
record.alarm_check_pic,
record.place_check_status,
record.place_check_pic,
record.check_person_sign,
record.gas_user_sign,
record.create_time,
record.update_time,
record.is_del,
record.remark,
station.station_name,
us.gas_user_name,
us.gas_user_type,
us.tel_num,
us.gas_user_address,
p.name as safe_check_person_name
FROM
t_safe_check_record record
LEFT JOIN t_gas_storage_station_info station ON station.station_id = record.station_id
LEFT JOIN t_gas_user_info us ON us.gas_user_id = record.gas_user_id
LEFT JOIN t_practitioner_info p ON p.practitioner_id = record.safe_check_person
</sql>
<select id="selectTSafeCheckRecordList" parameterType="TSafeCheckRecord" resultMap="TSafeCheckRecordResult">
<include refid="selectTSafeCheckRecordVo"/>
<where>
<if test="stationId != null "> and record.station_id = #{stationId}</if>
<if test="gasUserId != null "> and record.gas_user_id = #{gasUserId}</if>
<if test="safeCheckDate != null "> and record.safe_check_date = #{safeCheckDate}</if>
<if test="safeCheckPerson != null "> and record.safe_check_person = #{safeCheckPerson}</if>
<if test="bottleNum != null "> and record.bottle_num = #{bottleNum}</if>
<if test="checkInStatus != null and checkInStatus != ''"> and record.check_in_status = #{checkInStatus}</if>
<if test="stoveCheckStatus != null and stoveCheckStatus != ''"> and record.stove_check_status = #{stoveCheckStatus}</if>
<if test="stoveCheckPic != null and stoveCheckPic != ''"> and record.stove_check_pic = #{stoveCheckPic}</if>
<if test="hoseCheckStatus != null and hoseCheckStatus != ''"> and record.hose_check_status = #{hoseCheckStatus}</if>
<if test="hoseCheckPic != null and hoseCheckPic != ''"> and record.hose_check_pic = #{hoseCheckPic}</if>
<if test="valveCheckStatus != null and valveCheckStatus != ''"> and record.valve_check_status = #{valveCheckStatus}</if>
<if test="valveCheckPic != null and valveCheckPic != ''"> and record.valve_check_pic = #{valveCheckPic}</if>
<if test="bottleCheckStatus != null and bottleCheckStatus != ''"> and record.bottle_check_status = #{bottleCheckStatus}</if>
<if test="bottleCheckPic != null and bottleCheckPic != ''"> and record.bottle_check_pic = #{bottleCheckPic}</if>
<if test="alarmCheckStatus != null and alarmCheckStatus != ''"> and record.alarm_check_status = #{alarmCheckStatus}</if>
<if test="alarmCheckPic != null and alarmCheckPic != ''"> and record.alarm_check_pic = #{alarmCheckPic}</if>
<if test="placeCheckStatus != null and placeCheckStatus != ''"> and record.place_check_status = #{placeCheckStatus}</if>
<if test="placeCheckPic != null and placeCheckPic != ''"> and record.place_check_pic = #{placeCheckPic}</if>
<if test="checkPersonSign != null and checkPersonSign != ''"> and record.check_person_sign = #{checkPersonSign}</if>
<if test="gasUserSign != null and gasUserSign != ''"> and record.gas_user_sign = #{gasUserSign}</if>
<if test="isDel != null and isDel != ''"> and record.is_del = #{isDel}</if>
<if test="gasUserType != null and gasUserType != ''"> and us.gas_user_type = #{gasUserType}</if>
<if test="safeCheckBeginTime != null and safeCheckEndTime != null">and record.safe_check_date between #{safeCheckBeginTime} and #{safeCheckEndTime} </if>
</where>
</select>
<select id="selectTSafeCheckRecordById" parameterType="Long" resultMap="TSafeCheckRecordResult">
<include refid="selectTSafeCheckRecordVo"/>
where record.safe_check_id = #{safeCheckId}
</select>
<insert id="insertTSafeCheckRecord" parameterType="TSafeCheckRecord" useGeneratedKeys="true" keyProperty="safeCheckId">
insert into t_safe_check_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stationId != null">station_id,</if>
<if test="gasUserId != null">gas_user_id,</if>
<if test="safeCheckDate != null">safe_check_date,</if>
<if test="safeCheckPerson != null">safe_check_person,</if>
<if test="bottleNum != null">bottle_num,</if>
<if test="checkInStatus != null">check_in_status,</if>
<if test="stoveCheckStatus != null">stove_check_status,</if>
<if test="stoveCheckPic != null">stove_check_pic,</if>
<if test="hoseCheckStatus != null">hose_check_status,</if>
<if test="hoseCheckPic != null">hose_check_pic,</if>
<if test="valveCheckStatus != null">valve_check_status,</if>
<if test="valveCheckPic != null">valve_check_pic,</if>
<if test="bottleCheckStatus != null">bottle_check_status,</if>
<if test="bottleCheckPic != null">bottle_check_pic,</if>
<if test="alarmCheckStatus != null">alarm_check_status,</if>
<if test="alarmCheckPic != null">alarm_check_pic,</if>
<if test="placeCheckStatus != null">place_check_status,</if>
<if test="placeCheckPic != null">place_check_pic,</if>
<if test="checkPersonSign != null">check_person_sign,</if>
<if test="gasUserSign != null">gas_user_sign,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stationId != null">#{stationId},</if>
<if test="gasUserId != null">#{gasUserId},</if>
<if test="safeCheckDate != null">#{safeCheckDate},</if>
<if test="safeCheckPerson != null">#{safeCheckPerson},</if>
<if test="bottleNum != null">#{bottleNum},</if>
<if test="checkInStatus != null">#{checkInStatus},</if>
<if test="stoveCheckStatus != null">#{stoveCheckStatus},</if>
<if test="stoveCheckPic != null">#{stoveCheckPic},</if>
<if test="hoseCheckStatus != null">#{hoseCheckStatus},</if>
<if test="hoseCheckPic != null">#{hoseCheckPic},</if>
<if test="valveCheckStatus != null">#{valveCheckStatus},</if>
<if test="valveCheckPic != null">#{valveCheckPic},</if>
<if test="bottleCheckStatus != null">#{bottleCheckStatus},</if>
<if test="bottleCheckPic != null">#{bottleCheckPic},</if>
<if test="alarmCheckStatus != null">#{alarmCheckStatus},</if>
<if test="alarmCheckPic != null">#{alarmCheckPic},</if>
<if test="placeCheckStatus != null">#{placeCheckStatus},</if>
<if test="placeCheckPic != null">#{placeCheckPic},</if>
<if test="checkPersonSign != null">#{checkPersonSign},</if>
<if test="gasUserSign != null">#{gasUserSign},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTSafeCheckRecord" parameterType="TSafeCheckRecord">
update t_safe_check_record
<trim prefix="SET" suffixOverrides=",">
<if test="stationId != null">station_id = #{stationId},</if>
<if test="gasUserId != null">gas_user_id = #{gasUserId},</if>
<if test="safeCheckDate != null">safe_check_date = #{safeCheckDate},</if>
<if test="safeCheckPerson != null">safe_check_person = #{safeCheckPerson},</if>
<if test="bottleNum != null">bottle_num = #{bottleNum},</if>
<if test="checkInStatus != null">check_in_status = #{checkInStatus},</if>
<if test="stoveCheckStatus != null">stove_check_status = #{stoveCheckStatus},</if>
<if test="stoveCheckPic != null">stove_check_pic = #{stoveCheckPic},</if>
<if test="hoseCheckStatus != null">hose_check_status = #{hoseCheckStatus},</if>
<if test="hoseCheckPic != null">hose_check_pic = #{hoseCheckPic},</if>
<if test="valveCheckStatus != null">valve_check_status = #{valveCheckStatus},</if>
<if test="valveCheckPic != null">valve_check_pic = #{valveCheckPic},</if>
<if test="bottleCheckStatus != null">bottle_check_status = #{bottleCheckStatus},</if>
<if test="bottleCheckPic != null">bottle_check_pic = #{bottleCheckPic},</if>
<if test="alarmCheckStatus != null">alarm_check_status = #{alarmCheckStatus},</if>
<if test="alarmCheckPic != null">alarm_check_pic = #{alarmCheckPic},</if>
<if test="placeCheckStatus != null">place_check_status = #{placeCheckStatus},</if>
<if test="placeCheckPic != null">place_check_pic = #{placeCheckPic},</if>
<if test="checkPersonSign != null">check_person_sign = #{checkPersonSign},</if>
<if test="gasUserSign != null">gas_user_sign = #{gasUserSign},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where safe_check_id = #{safeCheckId}
</update>
<delete id="deleteTSafeCheckRecordById" parameterType="Long">
delete from t_safe_check_record where safe_check_id = #{safeCheckId}
</delete>
<delete id="deleteTSafeCheckRecordByIds" parameterType="String">
delete from t_safe_check_record where safe_check_id in
<foreach item="safeCheckId" collection="array" open="(" separator="," close=")">
#{safeCheckId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment