Commit 4d2ffb85 authored by 吴卿华's avatar 吴卿华

Merge remote-tracking branch 'origin/master'

parents 2cdbd121 348ddbea
package com.zehong.web.controller.gasBottleTrack;
import java.util.List;
import com.zehong.system.domain.TGasUserInfo;
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.TAirChargeRecord;
import com.zehong.system.service.ITAirChargeRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 充装记录Controller
*
* @author zehong
* @date 2023-08-21
*/
@RestController
@RequestMapping("/charge/record")
public class TAirChargeRecordController extends BaseController
{
@Autowired
private ITAirChargeRecordService tAirChargeRecordService;
/**
* 查询充装记录列表
*/
@PreAuthorize("@ss.hasPermi('charge:record:list')")
@GetMapping("/list")
public TableDataInfo list(TAirChargeRecord tAirChargeRecord)
{
startPage();
List<TAirChargeRecord> list = tAirChargeRecordService.selectTAirChargeRecordList(tAirChargeRecord);
return getDataTable(list);
}
/**
* 导出充装记录列表
*/
@PreAuthorize("@ss.hasPermi('charge:record:export')")
@Log(title = "充装记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TAirChargeRecord tAirChargeRecord)
{
List<TAirChargeRecord> list = tAirChargeRecordService.selectTAirChargeRecordList(tAirChargeRecord);
ExcelUtil<TAirChargeRecord> util = new ExcelUtil<TAirChargeRecord>(TAirChargeRecord.class);
return util.exportExcel(list, "充装记录数据");
}
/**
* 获取充装记录详细信息
*/
@PreAuthorize("@ss.hasPermi('charge:record:query')")
@GetMapping(value = "/{chargeRecordId}")
public AjaxResult getInfo(@PathVariable("chargeRecordId") Long chargeRecordId)
{
return AjaxResult.success(tAirChargeRecordService.selectTAirChargeRecordById(chargeRecordId));
}
/**
* 新增充装记录
*/
@PreAuthorize("@ss.hasPermi('system:record:add')")
@Log(title = "充装记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TAirChargeRecord tAirChargeRecord)
{
return toAjax(tAirChargeRecordService.insertTAirChargeRecord(tAirChargeRecord));
}
/**
* 修改充装记录
*/
@PreAuthorize("@ss.hasPermi('charge:record:edit')")
@Log(title = "充装记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TAirChargeRecord tAirChargeRecord)
{
return toAjax(tAirChargeRecordService.updateTAirChargeRecord(tAirChargeRecord));
}
/**
* 删除充装记录
*/
@PreAuthorize("@ss.hasPermi('charge:record:remove')")
@Log(title = "充装记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{chargeRecordIds}")
public AjaxResult remove(@PathVariable Long[] chargeRecordIds)
{
return toAjax(tAirChargeRecordService.deleteTAirChargeRecordByIds(chargeRecordIds));
}
/**
* 充装记录导入
* @param file
* @param updateSupport
* @return
* @throws Exception
*/
@PreAuthorize("@ss.hasPermi('charge:record:import')")
@Log(title = "充装记录导入", businessType = BusinessType.IMPORT)
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<TAirChargeRecord> util = new ExcelUtil<>(TAirChargeRecord.class);
List<TAirChargeRecord> airChargeRecordList = util.importExcel(file.getInputStream());
String message = tAirChargeRecordService.importAirChargeRecordInfo(airChargeRecordList, updateSupport);
return AjaxResult.success(message);
}
@GetMapping("/importTemplate")
public AjaxResult importTemplate(){
ExcelUtil<TAirChargeRecord> util = new ExcelUtil<>(TAirChargeRecord.class);
return util.importTemplateExcel("充装记录数据");
}
}
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.*;
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.TGasBottleTrackRecord;
import com.zehong.system.service.ITGasBottleTrackRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 气瓶追溯Controller
*
* @author zehong
* @date 2023-08-18
*/
@RestController
@RequestMapping("/track/record")
public class TGasBottleTrackRecordController extends BaseController
{
@Autowired
private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
/**
* 查询气瓶追溯列表
*/
@PreAuthorize("@ss.hasPermi('track:record:list')")
@PostMapping("/list")
public TableDataInfo list(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord)
{
startPage();
List<TGasBottleTrackRecord> list = tGasBottleTrackRecordService.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
return getDataTable(list);
}
@PostMapping("/bottleTrackRecordList")
public AjaxResult bottleTrackRecordList(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord)
{
List<TGasBottleTrackRecord> list = tGasBottleTrackRecordService.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
return AjaxResult.success(list);
}
/**
* 导出气瓶追溯列表
*/
@PreAuthorize("@ss.hasPermi('track:record:export')")
@Log(title = "气瓶追溯", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public AjaxResult export(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord)
{
List<TGasBottleTrackRecord> list = tGasBottleTrackRecordService.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
ExcelUtil<TGasBottleTrackRecord> util = new ExcelUtil<TGasBottleTrackRecord>(TGasBottleTrackRecord.class);
return util.exportExcel(list, "气瓶追溯数据");
}
/**
* 获取气瓶追溯详细信息
*/
@PreAuthorize("@ss.hasPermi('track:record:query')")
@GetMapping(value = "/{trackRecordId}")
public AjaxResult getInfo(@PathVariable("trackRecordId") Long trackRecordId)
{
return AjaxResult.success(tGasBottleTrackRecordService.selectTGasBottleTrackRecordById(trackRecordId));
}
/**
* 新增气瓶追溯
*/
@PreAuthorize("@ss.hasPermi('track:record:add')")
@Log(title = "气瓶追溯", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord)
{
return toAjax(tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord));
}
/**
* 修改气瓶追溯
*/
@PreAuthorize("@ss.hasPermi('track:record:edit')")
@Log(title = "气瓶追溯", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord)
{
return toAjax(tGasBottleTrackRecordService.updateTGasBottleTrackRecord(tGasBottleTrackRecord));
}
/**
* 删除气瓶追溯
*/
@PreAuthorize("@ss.hasPermi('track:record:remove')")
@Log(title = "气瓶追溯", businessType = BusinessType.DELETE)
@DeleteMapping("/{trackRecordIds}")
public AjaxResult remove(@PathVariable Long[] trackRecordIds)
{
return toAjax(tGasBottleTrackRecordService.deleteTGasBottleTrackRecordByIds(trackRecordIds));
}
}
...@@ -48,6 +48,12 @@ public class TGasUserInfoController extends BaseController ...@@ -48,6 +48,12 @@ public class TGasUserInfoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/gasUserInfoList")
public AjaxResult gasUserInfoList(TGasUserInfo tGasUserInfo){
List<TGasUserInfo> list = tGasUserInfoService.selectTGasUserInfoList(tGasUserInfo);
return AjaxResult.success(list);
}
/** /**
* 导出燃气用户列表 * 导出燃气用户列表
*/ */
......
...@@ -48,6 +48,13 @@ public class TPractitionerInfoController extends BaseController ...@@ -48,6 +48,13 @@ public class TPractitionerInfoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/practitionerInfoList")
public AjaxResult practitionerInfoList(TPractitionerInfo tPractitionerInfo)
{
List<TPractitionerInfo> list = tPractitionerInfoService.selectTPractitionerInfoList(tPractitionerInfo);
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));
}
}
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_air_charge_record
*
* @author zehong
* @date 2023-08-21
*/
public class TAirChargeRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 充装主键 */
private Long chargeRecordId;
/** 储配站主键 */
private Long stationId;
@Excel(name = "储配站")
private String stationName;
@Excel(name = "气瓶条码")
private String bottleCode;
private String bottleCapacity;
private String bottleStatus;
@Excel(name = "充装人员")
private String chargeOperatorName;
/** 气瓶主键 */
private Long bottleId;
/** 充装人员 */
private Long chargeOperator;
/** 充装量 */
@Excel(name = "充装量")
private String chargeMeasure;
/** 充装时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "充装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date chargeDate;
/** 删除状态:0.否 1.是 */
private String isDel;
private Date chargeBeginTime;
private Date chargeEndTime;
public void setChargeRecordId(Long chargeRecordId)
{
this.chargeRecordId = chargeRecordId;
}
public Long getChargeRecordId()
{
return chargeRecordId;
}
public void setStationId(Long stationId)
{
this.stationId = stationId;
}
public Long getStationId()
{
return stationId;
}
public void setBottleId(Long bottleId)
{
this.bottleId = bottleId;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getBottleCode() {
return bottleCode;
}
public void setBottleCode(String bottleCode) {
this.bottleCode = bottleCode;
}
public String getBottleCapacity() {
return bottleCapacity;
}
public void setBottleCapacity(String bottleCapacity) {
this.bottleCapacity = bottleCapacity;
}
public String getBottleStatus() {
return bottleStatus;
}
public void setBottleStatus(String bottleStatus) {
this.bottleStatus = bottleStatus;
}
public String getChargeOperatorName() {
return chargeOperatorName;
}
public void setChargeOperatorName(String chargeOperatorName) {
this.chargeOperatorName = chargeOperatorName;
}
public Long getBottleId()
{
return bottleId;
}
public void setChargeOperator(Long chargeOperator)
{
this.chargeOperator = chargeOperator;
}
public Long getChargeOperator()
{
return chargeOperator;
}
public void setChargeMeasure(String chargeMeasure)
{
this.chargeMeasure = chargeMeasure;
}
public String getChargeMeasure()
{
return chargeMeasure;
}
public void setChargeDate(Date chargeDate)
{
this.chargeDate = chargeDate;
}
public Date getChargeDate()
{
return chargeDate;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public Date getChargeBeginTime() {
return chargeBeginTime;
}
public void setChargeBeginTime(Date chargeBeginTime) {
this.chargeBeginTime = chargeBeginTime;
}
public Date getChargeEndTime() {
return chargeEndTime;
}
public void setChargeEndTime(Date chargeEndTime) {
this.chargeEndTime = chargeEndTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("chargeRecordId", getChargeRecordId())
.append("stationId", getStationId())
.append("bottleId", getBottleId())
.append("chargeOperator", getChargeOperator())
.append("chargeMeasure", getChargeMeasure())
.append("chargeDate", getChargeDate())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remark", getRemark())
.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_gas_bottle_track_record
*
* @author zehong
* @date 2023-08-18
*/
public class TGasBottleTrackRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 追溯主键 */
private Long trackRecordId;
/** 储配站主键 */
private Long stationId;
/**储配站*/
@Excel(name="储配站")
private String stationName;
/** 气瓶主键 */
private Long bottleId;
/**气瓶编号*/
@Excel(name = "气瓶条码")
private String bottleCode;
/**规格*/
@Excel(name = "气瓶规格/L")
private String bottleCapacity;
/** 工序名称:0.气瓶充装 1.气瓶配送 2.气瓶回收 */
@Excel(name = "工序名称:0.气瓶充装 1.气瓶配送 2.气瓶回收")
private String processesName;
/** 工序关联主键用于查看 */
private Long processesRelationId;
/** 操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date operateDate;
/** 操作人 */
private Long operator;
@Excel(name = "操作人")
private String operatorName;
/** 发送方 */
@Excel(name = "发送方")
private String sender;
/** 接收方 */
@Excel(name = "接收方")
private String recipient;
/** 删除状态:0.否 1.是 */
private String isDel;
private String messageInfo;
public void setTrackRecordId(Long trackRecordId)
{
this.trackRecordId = trackRecordId;
}
public Long getTrackRecordId()
{
return trackRecordId;
}
public void setStationId(Long stationId)
{
this.stationId = stationId;
}
public Long getStationId()
{
return stationId;
}
public void setBottleId(Long bottleId)
{
this.bottleId = bottleId;
}
public Long getBottleId()
{
return bottleId;
}
public String getBottleCode() {
return bottleCode;
}
public void setBottleCode(String bottleCode) {
this.bottleCode = bottleCode;
}
public String getBottleCapacity() {
return bottleCapacity;
}
public void setBottleCapacity(String bottleCapacity) {
this.bottleCapacity = bottleCapacity;
}
public void setProcessesName(String processesName)
{
this.processesName = processesName;
}
public String getProcessesName()
{
return processesName;
}
public void setProcessesRelationId(Long processesRelationId)
{
this.processesRelationId = processesRelationId;
}
public Long getProcessesRelationId()
{
return processesRelationId;
}
public void setOperateDate(Date operateDate)
{
this.operateDate = operateDate;
}
public Date getOperateDate()
{
return operateDate;
}
public void setOperator(Long operator)
{
this.operator = operator;
}
public Long getOperator()
{
return operator;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public void setSender(String sender)
{
this.sender = sender;
}
public String getSender()
{
return sender;
}
public void setRecipient(String recipient)
{
this.recipient = recipient;
}
public String getRecipient()
{
return recipient;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getMessageInfo() {
return messageInfo;
}
public void setMessageInfo(String messageInfo) {
this.messageInfo = messageInfo;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("trackRecordId", getTrackRecordId())
.append("stationId", getStationId())
.append("bottleId", getBottleId())
.append("processesName", getProcessesName())
.append("processesRelationId", getProcessesRelationId())
.append("operateDate", getOperateDate())
.append("operator", getOperator())
.append("sender", getSender())
.append("recipient", getRecipient())
.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.TAirChargeRecord;
/**
* 充装记录Mapper接口
*
* @author zehong
* @date 2023-08-21
*/
public interface TAirChargeRecordMapper
{
/**
* 查询充装记录
*
* @param chargeRecordId 充装记录ID
* @return 充装记录
*/
public TAirChargeRecord selectTAirChargeRecordById(Long chargeRecordId);
/**
* 查询充装记录列表
*
* @param tAirChargeRecord 充装记录
* @return 充装记录集合
*/
public List<TAirChargeRecord> selectTAirChargeRecordList(TAirChargeRecord tAirChargeRecord);
/**
* 新增充装记录
*
* @param tAirChargeRecord 充装记录
* @return 结果
*/
public int insertTAirChargeRecord(TAirChargeRecord tAirChargeRecord);
/**
* 修改充装记录
*
* @param tAirChargeRecord 充装记录
* @return 结果
*/
public int updateTAirChargeRecord(TAirChargeRecord tAirChargeRecord);
/**
* 删除充装记录
*
* @param chargeRecordId 充装记录ID
* @return 结果
*/
public int deleteTAirChargeRecordById(Long chargeRecordId);
/**
* 批量删除充装记录
*
* @param chargeRecordIds 需要删除的数据ID
* @return 结果
*/
public int deleteTAirChargeRecordByIds(Long[] chargeRecordIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TGasBottleTrackRecord;
/**
* 气瓶追溯Mapper接口
*
* @author zehong
* @date 2023-08-18
*/
public interface TGasBottleTrackRecordMapper
{
/**
* 查询气瓶追溯
*
* @param trackRecordId 气瓶追溯ID
* @return 气瓶追溯
*/
public TGasBottleTrackRecord selectTGasBottleTrackRecordById(Long trackRecordId);
/**
* 查询气瓶追溯列表
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 气瓶追溯集合
*/
public List<TGasBottleTrackRecord> selectTGasBottleTrackRecordList(TGasBottleTrackRecord tGasBottleTrackRecord);
/**
* 新增气瓶追溯
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
public int insertTGasBottleTrackRecord(TGasBottleTrackRecord tGasBottleTrackRecord);
/**
* 修改气瓶追溯
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
public int updateTGasBottleTrackRecord(TGasBottleTrackRecord tGasBottleTrackRecord);
/**
* 删除气瓶追溯
*
* @param trackRecordId 气瓶追溯ID
* @return 结果
*/
public int deleteTGasBottleTrackRecordById(Long trackRecordId);
/**
* 批量删除气瓶追溯
*
* @param trackRecordIds 需要删除的数据ID
* @return 结果
*/
public int deleteTGasBottleTrackRecordByIds(Long[] trackRecordIds);
}
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.TAirChargeRecord;
/**
* 充装记录Service接口
*
* @author zehong
* @date 2023-08-21
*/
public interface ITAirChargeRecordService
{
/**
* 查询充装记录
*
* @param chargeRecordId 充装记录ID
* @return 充装记录
*/
public TAirChargeRecord selectTAirChargeRecordById(Long chargeRecordId);
/**
* 查询充装记录列表
*
* @param tAirChargeRecord 充装记录
* @return 充装记录集合
*/
public List<TAirChargeRecord> selectTAirChargeRecordList(TAirChargeRecord tAirChargeRecord);
/**
* 新增充装记录
*
* @param tAirChargeRecord 充装记录
* @return 结果
*/
public int insertTAirChargeRecord(TAirChargeRecord tAirChargeRecord);
/**
* 修改充装记录
*
* @param tAirChargeRecord 充装记录
* @return 结果
*/
public int updateTAirChargeRecord(TAirChargeRecord tAirChargeRecord);
/**
* 批量删除充装记录
*
* @param chargeRecordIds 需要删除的充装记录ID
* @return 结果
*/
public int deleteTAirChargeRecordByIds(Long[] chargeRecordIds);
/**
* 删除充装记录信息
*
* @param chargeRecordId 充装记录ID
* @return 结果
*/
public int deleteTAirChargeRecordById(Long chargeRecordId);
/**
* 充装记录导入
* @param airChargeRecordList 充装记录实体
* @param isUpdateSupport 是否更新
* @return
*/
String importAirChargeRecordInfo(List<TAirChargeRecord> airChargeRecordList, boolean isUpdateSupport);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TGasBottleTrackRecord;
/**
* 气瓶追溯Service接口
*
* @author zehong
* @date 2023-08-18
*/
public interface ITGasBottleTrackRecordService
{
/**
* 查询气瓶追溯
*
* @param trackRecordId 气瓶追溯ID
* @return 气瓶追溯
*/
public TGasBottleTrackRecord selectTGasBottleTrackRecordById(Long trackRecordId);
/**
* 查询气瓶追溯列表
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 气瓶追溯集合
*/
public List<TGasBottleTrackRecord> selectTGasBottleTrackRecordList(TGasBottleTrackRecord tGasBottleTrackRecord);
/**
* 新增气瓶追溯
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
public int insertTGasBottleTrackRecord(TGasBottleTrackRecord tGasBottleTrackRecord);
/**
* 修改气瓶追溯
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
public int updateTGasBottleTrackRecord(TGasBottleTrackRecord tGasBottleTrackRecord);
/**
* 批量删除气瓶追溯
*
* @param trackRecordIds 需要删除的气瓶追溯ID
* @return 结果
*/
public int deleteTGasBottleTrackRecordByIds(Long[] trackRecordIds);
/**
* 删除气瓶追溯信息
*
* @param trackRecordId 气瓶追溯ID
* @return 结果
*/
public int deleteTGasBottleTrackRecordById(Long trackRecordId);
}
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);
}
package com.zehong.system.service.impl;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TAirChargeRecord;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.domain.TGasStorageStationInfo;
import com.zehong.system.domain.TPractitionerInfo;
import com.zehong.system.mapper.TAirChargeRecordMapper;
import com.zehong.system.mapper.TGasBottleInfoMapper;
import com.zehong.system.mapper.TGasStorageStationInfoMapper;
import com.zehong.system.mapper.TPractitionerInfoMapper;
import com.zehong.system.service.ITAirChargeRecordService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.List;
/**
* 充装记录Service业务层处理
*
* @author zehong
* @date 2023-08-21
*/
@Service
public class TAirChargeRecordServiceImpl implements ITAirChargeRecordService
{
private static final Logger log = LoggerFactory.getLogger(TAirChargeRecordServiceImpl.class);
@Autowired
private TAirChargeRecordMapper tAirChargeRecordMapper;
@Resource
private TGasStorageStationInfoMapper tGasStorageStationInfoMapper;
@Resource
private TGasBottleInfoMapper tGasBottleInfoMapper;
@Resource
private TPractitionerInfoMapper tPractitionerInfoMapper;
/**
* 查询充装记录
*
* @param chargeRecordId 充装记录ID
* @return 充装记录
*/
@Override
public TAirChargeRecord selectTAirChargeRecordById(Long chargeRecordId)
{
return tAirChargeRecordMapper.selectTAirChargeRecordById(chargeRecordId);
}
/**
* 查询充装记录列表
*
* @param tAirChargeRecord 充装记录
* @return 充装记录
*/
@Override
public List<TAirChargeRecord> selectTAirChargeRecordList(TAirChargeRecord tAirChargeRecord)
{
return tAirChargeRecordMapper.selectTAirChargeRecordList(tAirChargeRecord);
}
/**
* 新增充装记录
*
* @param tAirChargeRecord 充装记录
* @return 结果
*/
@Override
public int insertTAirChargeRecord(TAirChargeRecord tAirChargeRecord)
{
tAirChargeRecord.setCreateTime(DateUtils.getNowDate());
return tAirChargeRecordMapper.insertTAirChargeRecord(tAirChargeRecord);
}
/**
* 修改充装记录
*
* @param tAirChargeRecord 充装记录
* @return 结果
*/
@Override
public int updateTAirChargeRecord(TAirChargeRecord tAirChargeRecord)
{
tAirChargeRecord.setUpdateTime(DateUtils.getNowDate());
return tAirChargeRecordMapper.updateTAirChargeRecord(tAirChargeRecord);
}
/**
* 批量删除充装记录
*
* @param chargeRecordIds 需要删除的充装记录ID
* @return 结果
*/
@Override
public int deleteTAirChargeRecordByIds(Long[] chargeRecordIds)
{
return tAirChargeRecordMapper.deleteTAirChargeRecordByIds(chargeRecordIds);
}
/**
* 删除充装记录信息
*
* @param chargeRecordId 充装记录ID
* @return 结果
*/
@Override
public int deleteTAirChargeRecordById(Long chargeRecordId)
{
return tAirChargeRecordMapper.deleteTAirChargeRecordById(chargeRecordId);
}
/**
* 充装记录导入
* @param airChargeRecordList 充装记录实体
* @param isUpdateSupport 是否更新
* @return
*/
@Override
public String importAirChargeRecordInfo(List<TAirChargeRecord> airChargeRecordList, boolean isUpdateSupport){
if (StringUtils.isNull(airChargeRecordList) || airChargeRecordList.size() == 0){
throw new CustomException("导入数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (TAirChargeRecord tAirChargeRecord : airChargeRecordList){
try {
//查询储配站信息
TGasStorageStationInfo queryGasStorageStationInfo = new TGasStorageStationInfo();
queryGasStorageStationInfo.setStationName(tAirChargeRecord.getStationName());
//储配站
List<TGasStorageStationInfo> gasStorageStationInfo = tGasStorageStationInfoMapper.selectTGasStorageStationInfoList(queryGasStorageStationInfo);
if(CollectionUtils.isEmpty(gasStorageStationInfo)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、气瓶条码 " + tAirChargeRecord.getBottleCode() +"、储配站" + tAirChargeRecord.getStationName() + " 不存在请创建或导入");
continue;
}
//气瓶
TGasBottleInfo tGasBottleInfo = new TGasBottleInfo();
tGasBottleInfo.setBottleCode(tAirChargeRecord.getBottleCode());
List<TGasBottleInfo> gasBottleInfoList = tGasBottleInfoMapper.selectTGasBottleInfoList(tGasBottleInfo);
if(CollectionUtils.isEmpty(gasBottleInfoList)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、气瓶条码 " + tAirChargeRecord.getBottleCode() + " 不存在请创建");
continue;
}
//从业人员
TPractitionerInfo query = new TPractitionerInfo();
query.setName(tAirChargeRecord.getChargeOperatorName());
List<TPractitionerInfo> queryPractitionerInfo = tPractitionerInfoMapper.selectTPractitionerInfoList(query);
if(CollectionUtils.isEmpty(queryPractitionerInfo)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、从业人员 " + tAirChargeRecord.getChargeOperatorName() + " 不存在请创建");
continue;
}
tAirChargeRecord.setStationId(gasStorageStationInfo.get(0).getStationId());
tAirChargeRecord.setBottleId(gasBottleInfoList.get(0).getBottleId());
tAirChargeRecord.setChargeOperator(queryPractitionerInfo.get(0).getPractitionerId());
this.insertTAirChargeRecord(tAirChargeRecord);
successNum++;
successMsg.append("<br/>" + successNum + "、气瓶条码为 " + tAirChargeRecord.getBottleCode() + " 充装记录导入成功");
}
catch (Exception e)
{
failureNum++;
String msg = "<br/>" + failureNum + "、气瓶条码为 " + tAirChargeRecord.getBottleCode() + " 充装记录导入失败:";
failureMsg.append(msg + e.getMessage());
log.error(msg, e);
}
}
if (failureNum > 0)
{
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new CustomException(failureMsg.toString());
}
else
{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
}
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业务层处理
*
* @author zehong
* @date 2023-08-18
*/
@Service
public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordService
{
@Autowired
private TGasBottleTrackRecordMapper tGasBottleTrackRecordMapper;
@Resource
private TAirChargeRecordMapper tAirChargeRecordMapper;
/**
* 查询气瓶追溯
*
* @param trackRecordId 气瓶追溯ID
* @return 气瓶追溯
*/
@Override
public TGasBottleTrackRecord selectTGasBottleTrackRecordById(Long trackRecordId)
{
return tGasBottleTrackRecordMapper.selectTGasBottleTrackRecordById(trackRecordId);
}
/**
* 查询气瓶追溯列表
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 气瓶追溯
*/
@Override
public List<TGasBottleTrackRecord> selectTGasBottleTrackRecordList(TGasBottleTrackRecord 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;
}
/**
* 新增气瓶追溯
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
@Override
public int insertTGasBottleTrackRecord(TGasBottleTrackRecord tGasBottleTrackRecord)
{
tGasBottleTrackRecord.setCreateTime(DateUtils.getNowDate());
return tGasBottleTrackRecordMapper.insertTGasBottleTrackRecord(tGasBottleTrackRecord);
}
/**
* 修改气瓶追溯
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
@Override
public int updateTGasBottleTrackRecord(TGasBottleTrackRecord tGasBottleTrackRecord)
{
tGasBottleTrackRecord.setUpdateTime(DateUtils.getNowDate());
return tGasBottleTrackRecordMapper.updateTGasBottleTrackRecord(tGasBottleTrackRecord);
}
/**
* 批量删除气瓶追溯
*
* @param trackRecordIds 需要删除的气瓶追溯ID
* @return 结果
*/
@Override
public int deleteTGasBottleTrackRecordByIds(Long[] trackRecordIds)
{
return tGasBottleTrackRecordMapper.deleteTGasBottleTrackRecordByIds(trackRecordIds);
}
/**
* 删除气瓶追溯信息
*
* @param trackRecordId 气瓶追溯ID
* @return 结果
*/
@Override
public int deleteTGasBottleTrackRecordById(Long trackRecordId)
{
return tGasBottleTrackRecordMapper.deleteTGasBottleTrackRecordById(trackRecordId);
}
}
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.TAirChargeRecordMapper">
<resultMap type="TAirChargeRecord" id="TAirChargeRecordResult">
<result property="chargeRecordId" column="charge_record_id" />
<result property="stationId" column="station_id" />
<result property="bottleId" column="bottle_id" />
<result property="chargeOperator" column="charge_operator" />
<result property="chargeMeasure" column="charge_measure" />
<result property="chargeDate" column="charge_date" />
<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="bottleCode" column="bottle_code"/>
<result property="bottleCapacity" column="bottle_capacity"/>
<result property="bottleStatus" column="bottle_status"/>
<result property="chargeOperatorName" column="charge_operator_name"/>
</resultMap>
<sql id="selectTAirChargeRecordVo">
SELECT
charge.charge_record_id,
charge.station_id,
charge.bottle_id,
charge.charge_operator,
charge.charge_measure,
charge.charge_date,
charge.create_time,
charge.update_time,
charge.is_del,
charge.remark,
station.station_name,
bottle.bottle_code,
bottle.bottle_capacity,
bottle.bottle_status,
pr.name AS charge_operator_name
FROM
t_air_charge_record charge
LEFT JOIN t_gas_storage_station_info station ON station.station_id = charge.station_id
LEFT JOIN t_gas_bottle_info bottle ON bottle.bottle_id = charge.bottle_id
LEFT JOIN t_practitioner_info pr ON pr.practitioner_id = charge.charge_operator
</sql>
<select id="selectTAirChargeRecordList" parameterType="TAirChargeRecord" resultMap="TAirChargeRecordResult">
<include refid="selectTAirChargeRecordVo"/>
<where>
<if test="stationId != null "> and charge.station_id = #{stationId}</if>
<if test="bottleId != null "> and charge.bottle_id = #{bottleId}</if>
<if test="chargeOperator != null "> and charge.charge_operator = #{chargeOperator}</if>
<if test="chargeMeasure != null and chargeMeasure != ''"> and charge.charge_measure = #{chargeMeasure}</if>
<if test="chargeDate != null "> and charge.charge_date = #{chargeDate}</if>
<if test="isDel != null and isDel != ''"> and charge.is_del = #{isDel}</if>
<if test="chargeBeginTime != null and chargeEndTime != null">and charge.charge_date BETWEEN #{chargeBeginTime} and #{chargeEndTime}</if>
<if test="bottleCode != null">and bottle.bottle_code like concat('%', #{bottleCode}, '%')</if>
</where>
</select>
<select id="selectTAirChargeRecordById" parameterType="Long" resultMap="TAirChargeRecordResult">
<include refid="selectTAirChargeRecordVo"/>
where charge.charge_record_id = #{chargeRecordId}
</select>
<insert id="insertTAirChargeRecord" parameterType="TAirChargeRecord" useGeneratedKeys="true" keyProperty="chargeRecordId">
insert into t_air_charge_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stationId != null">station_id,</if>
<if test="bottleId != null">bottle_id,</if>
<if test="chargeOperator != null">charge_operator,</if>
<if test="chargeMeasure != null">charge_measure,</if>
<if test="chargeDate != null">charge_date,</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="bottleId != null">#{bottleId},</if>
<if test="chargeOperator != null">#{chargeOperator},</if>
<if test="chargeMeasure != null">#{chargeMeasure},</if>
<if test="chargeDate != null">#{chargeDate},</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="updateTAirChargeRecord" parameterType="TAirChargeRecord">
update t_air_charge_record
<trim prefix="SET" suffixOverrides=",">
<if test="stationId != null">station_id = #{stationId},</if>
<if test="bottleId != null">bottle_id = #{bottleId},</if>
<if test="chargeOperator != null">charge_operator = #{chargeOperator},</if>
<if test="chargeMeasure != null">charge_measure = #{chargeMeasure},</if>
<if test="chargeDate != null">charge_date = #{chargeDate},</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 charge_record_id = #{chargeRecordId}
</update>
<delete id="deleteTAirChargeRecordById" parameterType="Long">
delete from t_air_charge_record where charge_record_id = #{chargeRecordId}
</delete>
<delete id="deleteTAirChargeRecordByIds" parameterType="String">
delete from t_air_charge_record where charge_record_id in
<foreach item="chargeRecordId" collection="array" open="(" separator="," close=")">
#{chargeRecordId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TGasBottleTrackRecordMapper">
<resultMap type="TGasBottleTrackRecord" id="TGasBottleTrackRecordResult">
<result property="trackRecordId" column="track_record_id" />
<result property="stationId" column="station_id" />
<result property="bottleId" column="bottle_id" />
<result property="processesName" column="processes_name" />
<result property="processesRelationId" column="processes_relation_id" />
<result property="operateDate" column="operate_date" />
<result property="operator" column="operator" />
<result property="sender" column="sender" />
<result property="recipient" column="recipient" />
<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="bottleCode" column="bottle_code" />
<result property="bottleCapacity" column="bottle_capacity" />
<result property="operatorName" column="operator_name"/>
</resultMap>
<sql id="selectTGasBottleTrackRecordVo">
SELECT
record.track_record_id,
record.station_id,
record.bottle_id,
record.processes_name,
record.processes_relation_id,
record.operate_date,
record.operator,
record.sender,
recipient,
record.create_time,
record.update_time,
record.is_del,
record.remark,
station.station_name,
bottle.bottle_code,
bottle.bottle_capacity,
(select us.gas_user_name from t_gas_user_info us where us.gas_user_id = record.operator) as operator_name
FROM
t_gas_bottle_track_record record
LEFT JOIN t_gas_storage_station_info station ON station.station_id = record.station_id
LEFT JOIN t_gas_bottle_info bottle ON bottle.bottle_id = record.bottle_id
</sql>
<select id="selectTGasBottleTrackRecordList" parameterType="TGasBottleTrackRecord" resultMap="TGasBottleTrackRecordResult">
<include refid="selectTGasBottleTrackRecordVo"/>
<where>
<if test="stationId != null "> and record.station_id = #{stationId}</if>
<if test="bottleId != null "> and record.bottle_id = #{bottleId}</if>
<if test="processesName != null and processesName != ''"> and record.processes_name like concat('%', #{processesName}, '%')</if>
<if test="processesRelationId != null "> and record.processes_relation_id = #{processesRelationId}</if>
<if test="operateDate != null "> and record.operate_date = #{operateDate}</if>
<if test="operator != null "> and record.operator = #{operator}</if>
<if test="sender != null and sender != ''"> and record.sender = #{sender}</if>
<if test="recipient != null and recipient != ''"> and record.recipient = #{recipient}</if>
<if test="isDel != null and isDel != ''"> and record.is_del = #{isDel}</if>
<if test="bottleCode != null"> and bottle.bottle_code like concat('%', #{ bottleCode }, '%')</if>
</where>
ORDER BY record.operate_date DESC
</select>
<select id="selectTGasBottleTrackRecordById" parameterType="Long" resultMap="TGasBottleTrackRecordResult">
<include refid="selectTGasBottleTrackRecordVo"/>
where record.track_record_id = #{trackRecordId}
</select>
<insert id="insertTGasBottleTrackRecord" parameterType="TGasBottleTrackRecord" useGeneratedKeys="true" keyProperty="trackRecordId">
insert into t_gas_bottle_track_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stationId != null">station_id,</if>
<if test="bottleId != null">bottle_id,</if>
<if test="processesName != null">processes_name,</if>
<if test="processesRelationId != null">processes_relation_id,</if>
<if test="operateDate != null">operate_date,</if>
<if test="operator != null">operator,</if>
<if test="sender != null">sender,</if>
<if test="recipient != null">recipient,</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="bottleId != null">#{bottleId},</if>
<if test="processesName != null">#{processesName},</if>
<if test="processesRelationId != null">#{processesRelationId},</if>
<if test="operateDate != null">#{operateDate},</if>
<if test="operator != null">#{operator},</if>
<if test="sender != null">#{sender},</if>
<if test="recipient != null">#{recipient},</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="updateTGasBottleTrackRecord" parameterType="TGasBottleTrackRecord">
update t_gas_bottle_track_record
<trim prefix="SET" suffixOverrides=",">
<if test="stationId != null">station_id = #{stationId},</if>
<if test="bottleId != null">bottle_id = #{bottleId},</if>
<if test="processesName != null">processes_name = #{processesName},</if>
<if test="processesRelationId != null">processes_relation_id = #{processesRelationId},</if>
<if test="operateDate != null">operate_date = #{operateDate},</if>
<if test="operator != null">operator = #{operator},</if>
<if test="sender != null">sender = #{sender},</if>
<if test="recipient != null">recipient = #{recipient},</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 track_record_id = #{trackRecordId}
</update>
<delete id="deleteTGasBottleTrackRecordById" parameterType="Long">
delete from t_gas_bottle_track_record where track_record_id = #{trackRecordId}
</delete>
<delete id="deleteTGasBottleTrackRecordByIds" parameterType="String">
delete from t_gas_bottle_track_record where track_record_id in
<foreach item="trackRecordId" collection="array" open="(" separator="," close=")">
#{trackRecordId}
</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