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

安检记录查询

parent 44315ceb
...@@ -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);
}
/** /**
* 导出燃气用户列表 * 导出燃气用户列表
*/ */
......
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 ...@@ -68,8 +68,9 @@ public class TGasBottleTrackRecord extends BaseEntity
/** 删除状态:0.否 1.是 */ /** 删除状态:0.否 1.是 */
private String isDel; private String isDel;
private String messageInfo;
public void setTrackRecordId(Long trackRecordId) public void setTrackRecordId(Long trackRecordId)
{ {
this.trackRecordId = trackRecordId; this.trackRecordId = trackRecordId;
} }
...@@ -194,6 +195,13 @@ public class TGasBottleTrackRecord extends BaseEntity ...@@ -194,6 +195,13 @@ public class TGasBottleTrackRecord extends BaseEntity
this.stationName = stationName; this.stationName = stationName;
} }
public String getMessageInfo() {
return messageInfo;
}
public void setMessageInfo(String messageInfo) {
this.messageInfo = messageInfo;
}
@Override @Override
public String toString() { public String 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; ...@@ -2,12 +2,16 @@ package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import com.zehong.common.utils.DateUtils; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TGasBottleTrackRecordMapper; import com.zehong.system.mapper.TGasBottleTrackRecordMapper;
import com.zehong.system.domain.TGasBottleTrackRecord; import com.zehong.system.domain.TGasBottleTrackRecord;
import com.zehong.system.service.ITGasBottleTrackRecordService; import com.zehong.system.service.ITGasBottleTrackRecordService;
import javax.annotation.Resource;
/** /**
* 气瓶追溯Service业务层处理 * 气瓶追溯Service业务层处理
* *
...@@ -20,6 +24,9 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS ...@@ -20,6 +24,9 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
@Autowired @Autowired
private TGasBottleTrackRecordMapper tGasBottleTrackRecordMapper; private TGasBottleTrackRecordMapper tGasBottleTrackRecordMapper;
@Resource
private TAirChargeRecordMapper tAirChargeRecordMapper;
/** /**
* 查询气瓶追溯 * 查询气瓶追溯
* *
...@@ -41,7 +48,28 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS ...@@ -41,7 +48,28 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
@Override @Override
public List<TGasBottleTrackRecord> selectTGasBottleTrackRecordList(TGasBottleTrackRecord tGasBottleTrackRecord) 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);
}
}
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