Commit 07d8275f authored by 吴卿华's avatar 吴卿华

车辆管理

parent 77f0e548
......@@ -6,10 +6,11 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.AirChargeOperatorStatistics;
import com.zehong.system.domain.AirChargeStationStatistics;
import com.zehong.system.domain.TGasUserInfo;
import com.zehong.system.domain.*;
import com.zehong.system.domain.vo.AirChargeStatisticsVo;
import com.zehong.system.service.ITGasBottleInfoService;
import com.zehong.system.service.ITGasBottleTrackRecordService;
import com.zehong.system.service.ITTaskRecordService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -24,7 +25,6 @@ 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;
......@@ -43,6 +43,16 @@ public class TAirChargeRecordController extends BaseController
@Autowired
private ITAirChargeRecordService tAirChargeRecordService;
@Autowired
private ITGasBottleInfoService tGasBottleInfoService;
@Autowired
private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
@Autowired
private ITTaskRecordService tTaskRecordService;
/**
* 查询充装记录列表
*/
......@@ -109,11 +119,46 @@ public class TAirChargeRecordController extends BaseController
*/
@PostMapping("/addAirChargeRecord")
public AjaxResult addAirChargeRecord(@RequestBody TAirChargeRecord tAirChargeRecord) throws ParseException {
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = fmt.parse(tAirChargeRecord.getChargeDates());
tAirChargeRecord.setChargeDate(date);
return toAjax(tAirChargeRecordService.insertTAirChargeRecord(tAirChargeRecord));
TGasBottleInfo tGasBottleInfo=new TGasBottleInfo();
tGasBottleInfo.setBottleId(tAirChargeRecord.getBottleId());
//修改气瓶状态为满瓶
tGasBottleInfo.setEmptyType("1");
//修改气瓶信息
tGasBottleInfoService.updateTGasBottleInfo(tGasBottleInfo);
// DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date date = fmt.parse(tAirChargeRecord.getChargeDates());
tAirChargeRecord.setChargeDate(new Date());
//气瓶追溯信息添加
TGasBottleTrackRecord tGasBottleTrackRecord=new TGasBottleTrackRecord();
//储配站主键
tGasBottleTrackRecord.setStationId(tAirChargeRecord.getStationId());
//储配站
tGasBottleTrackRecord.setStationName(tAirChargeRecord.getStationName());
//气瓶主键
tGasBottleTrackRecord.setBottleId(tAirChargeRecord.getBottleId());
//气瓶条码
tGasBottleTrackRecord.setBottleCode(tAirChargeRecord.getBottleCode());
//工序 气瓶充装
tGasBottleTrackRecord.setProcessesName("0");
//充装人员
tGasBottleTrackRecord.setOperator(tAirChargeRecord.getChargeOperator());
tGasBottleTrackRecord.setOperateDate(new Date());
//充装表信息添加
tAirChargeRecordService.insertTAirChargeRecord(tAirChargeRecord);
//气瓶追溯表信息添加
tGasBottleTrackRecord.setProcessesRelationId(tAirChargeRecord.getChargeRecordId());
//设置任务记录信息
TTaskRecord tTaskRecord=new TTaskRecord();
//操作人id
tTaskRecord.setOperator(tAirChargeRecord.getChargeOperator());
//工序
tTaskRecord.setProcessesName("0");
tTaskRecord.setCreateTime(new Date());
tTaskRecord.setProcessesRelationId(tAirChargeRecord.getChargeRecordId());
//任务记录表信息添加
tTaskRecordService.insertTTaskRecord(tTaskRecord);
return toAjax( tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord));
}
/**
......
......@@ -84,6 +84,18 @@ public class TGasBottleInfoController extends BaseController
}
@GetMapping("/getInfn")
public AjaxResult getInfn(String bottleId)
{
/**
* 查询气瓶详细信息
*/
TGasBottleInfo inf = tGasBottleInfoService.getInfn(bottleId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasBottleInfo", inf);
return ajax;
}
/**
* 新增气瓶信息
*/
......@@ -92,6 +104,15 @@ public class TGasBottleInfoController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody TGasBottleInfo tGasBottleInfo)
{
TGasBottleInfo tGasBottleInfo1=new TGasBottleInfo();
tGasBottleInfo1.setBottleCode(tGasBottleInfo.getBottleCode());
/**
* 查询气瓶详细信息
*/
List<TGasBottleInfo> list = tGasBottleInfoService.selectTGasBottleInfoList(tGasBottleInfo1);
if (list.size()>=1){
return null;
}
return toAjax(tGasBottleInfoService.insertTGasBottleInfo(tGasBottleInfo));
}
......
......@@ -7,7 +7,10 @@ import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.domain.TSafeCheckRecord;
import com.zehong.system.domain.TTaskRecord;
import com.zehong.system.service.ITGasBottleInfoService;
import com.zehong.system.service.ITTaskRecordService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -34,12 +37,43 @@ public class TGasBottleTrackRecordController extends BaseController
private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
@Autowired
private ITGasBottleInfoService tGasBottleInfoService;
@Autowired
private ITTaskRecordService tTaskRecordService;
/**
* 查询气瓶追溯列表
*/
@PreAuthorize("@ss.hasPermi('track:record:list')")
@PostMapping("/list")
public TableDataInfo list(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord)
@RequestMapping("/list")
public TableDataInfo list(TGasBottleTrackRecord tGasBottleTrackRecord)
{
startPage();
List<TGasBottleTrackRecord> list = tGasBottleTrackRecordService.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
return getDataTable(list);
}
/**
* 微信小程序 获取回收记录详细信息
* @param trackRecordId
* @return
*/
@GetMapping("/selectGet")
public AjaxResult selectGetInfo(Long trackRecordId){
TGasBottleTrackRecord tGasBottleTrackRecord = tGasBottleTrackRecordService.selectTGasBottleTrackRecordById(trackRecordId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasBottleTrackRecord", tGasBottleTrackRecord);
return ajax;
}
/**
* 微信小程序 气瓶追溯信息查询
* @param tGasBottleTrackRecord
* @return
*/
@GetMapping("/gasCylinderTraceability")
public TableDataInfo gasCylinderTraceability(TGasBottleTrackRecord tGasBottleTrackRecord)
{
startPage();
List<TGasBottleTrackRecord> list = tGasBottleTrackRecordService.selectTGasBottleTrackRecordList(tGasBottleTrackRecord);
......@@ -94,19 +128,37 @@ public class TGasBottleTrackRecordController extends BaseController
* @return
*/
@PostMapping("/addTGasBottleTrackRecord")
public AjaxResult addTGasBottleTrackRecord(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord) throws ParseException {
public int addTGasBottleTrackRecord(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord) throws ParseException {
TGasBottleInfo tGasBottleInfo1 = tGasBottleInfoService.selectTGasBottleInfoById(tGasBottleTrackRecord.getBottleId());
if ("0".equals(tGasBottleInfo1.getCurrentStatus())){
return 0;
}
//修改气瓶状态
TGasBottleInfo tGasBottleInfo=new TGasBottleInfo();
tGasBottleInfo.setBottleId(tGasBottleTrackRecord.getBottleId());
//设置气瓶为离站状态
tGasBottleInfo.setCurrentStatus("1");
//设置气瓶为在站状态
tGasBottleInfo.setCurrentStatus("0");
//设置气瓶为空瓶状态
tGasBottleInfo.setEmptyType("0");
tGasBottleInfoService.updateTGasBottleInfo(tGasBottleInfo);
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = fmt.parse(tGasBottleTrackRecord.getOperateDates());
tGasBottleTrackRecord.setOperateDate(date);
return toAjax(tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord));
// DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date date = fmt.parse(tGasBottleTrackRecord.getOperateDates());
//气瓶追溯信息添加
tGasBottleTrackRecord.setOperateDate(new Date());
tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord);
//设置任务记录信息
TTaskRecord tTaskRecord=new TTaskRecord();
//操作人id
tTaskRecord.setOperator(Long.valueOf(tGasBottleTrackRecord.getOperator()));
//工序
tTaskRecord.setProcessesName("3");
tTaskRecord.setCreateTime(new Date());
tTaskRecord.setProcessesRelationId(tGasBottleTrackRecord.getTrackRecordId());
//任务记录表信息添加
tTaskRecordService.insertTTaskRecord(tTaskRecord);
return 1;
}
......
package com.zehong.web.controller.gasBottleTrack;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.domain.TGasUserInfolins;
import com.zehong.system.domain.*;
import com.zehong.system.service.ITTaskRecordService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -19,7 +20,6 @@ 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.TGasUserInfo;
import com.zehong.system.service.ITGasUserInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
......@@ -38,6 +38,8 @@ public class TGasUserInfoController extends BaseController
@Autowired
private ITGasUserInfoService tGasUserInfoService;
@Autowired
private ITTaskRecordService tTaskRecordService;
/**
* 查询燃气用户列表
*/
......@@ -50,6 +52,19 @@ public class TGasUserInfoController extends BaseController
return getDataTable(list);
}
/**
* 微信小程序 获取燃气用户详细信息
* @param gasUserId
* @return
*/
@GetMapping("/selectGet")
public AjaxResult selectGetInfo(Long gasUserId){
TGasUserInfo tGasUserInfo = tGasUserInfoService.selectTGasUserInfoById(gasUserId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasUserInfo", tGasUserInfo);
return ajax;
}
@GetMapping("/gasUserInfoList")
public AjaxResult gasUserInfoList(TGasUserInfo tGasUserInfo){
List<TGasUserInfo> list = tGasUserInfoService.selectTGasUserInfoList(tGasUserInfo);
......@@ -79,6 +94,14 @@ public class TGasUserInfoController extends BaseController
return AjaxResult.success(tGasUserInfoService.selectTGasUserInfoById(gasUserId));
}
@PostMapping("/getUser")
public AjaxResult getUser(@RequestBody TGasUserInfo tGasUserInfo)
{
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasUserInfon", tGasUserInfoService.selectTGasUserInfoById(tGasUserInfo.getGasUserId()));
return ajax;
}
/**
* 微信小程序下拉信息查询
......@@ -133,10 +156,30 @@ public class TGasUserInfoController extends BaseController
*/
@PostMapping("/addUserInfo")
public AjaxResult addUserInfo(@RequestBody TGasUserInfo tGasUserInfo){
return toAjax(tGasUserInfoService.insertTGasUserInfo(tGasUserInfo));
tGasUserInfoService.insertTGasUserInfo(tGasUserInfo);
//设置任务记录信息
TTaskRecord tTaskRecord=new TTaskRecord();
//操作人id
tTaskRecord.setOperator(Long.valueOf(tGasUserInfo.getOperator()));
//工序
tTaskRecord.setProcessesName("5");
tTaskRecord.setCreateTime(new Date());
tTaskRecord.setProcessesRelationId(tGasUserInfo.getGasUserId());
//任务记录表信息添加
return toAjax(tTaskRecordService.insertTTaskRecord(tTaskRecord));
}
/**
* 微信小程序修改燃气用户
* @param tGasUserInfo
* @return
*/
@PostMapping("/updateUserInfo")
public AjaxResult updateUserInfo(@RequestBody TGasUserInfo tGasUserInfo)
{
return toAjax(tGasUserInfoService.updateTGasUserInfo(tGasUserInfo));
}
/**
......@@ -150,6 +193,7 @@ public class TGasUserInfoController extends BaseController
return toAjax(tGasUserInfoService.updateTGasUserInfo(tGasUserInfo));
}
/**
* 删除燃气用户
*/
......
......@@ -92,6 +92,8 @@ public class TPractitionerInfoController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody TPractitionerInfo tPractitionerInfo)
{
//设置密码加密
tPractitionerInfo.setPassword(SecurityUtils.encryptPassword(tPractitionerInfo.getPassword()));
return toAjax(tPractitionerInfoService.insertTPractitionerInfo(tPractitionerInfo));
}
......@@ -103,6 +105,8 @@ public class TPractitionerInfoController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody TPractitionerInfo tPractitionerInfo)
{
//设置密码加密
tPractitionerInfo.setPassword(SecurityUtils.encryptPassword(tPractitionerInfo.getPassword()));
return toAjax(tPractitionerInfoService.updateTPractitionerInfo(tPractitionerInfo));
}
......
......@@ -6,8 +6,10 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.domain.*;
import com.zehong.system.service.ITGasBottleInfoService;
import com.zehong.system.service.ITGasUserInfoService;
import com.zehong.system.service.ITTaskRecordService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -23,7 +25,6 @@ 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;
......@@ -41,8 +42,10 @@ public class TSafeCheckRecordController extends BaseController
@Autowired
private ITSafeCheckRecordService tSafeCheckRecordService;
@Autowired
private ITGasUserInfoService tGasUserInfoService;
@Autowired
private ITTaskRecordService tTaskRecordService;
/**
* 查询安检记录列表
*/
......@@ -78,6 +81,19 @@ public class TSafeCheckRecordController extends BaseController
return AjaxResult.success(tSafeCheckRecordService.selectTSafeCheckRecordById(safeCheckId));
}
/**
* 微信小程序 获取安检记录详细信息
* @param safeCheckId
* @return
*/
@GetMapping("/selectGet")
public AjaxResult selectGetInfo(Long safeCheckId){
TSafeCheckRecord tSafeCheckRecord = tSafeCheckRecordService.selectTSafeCheckRecordById(safeCheckId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tAirChargeRecord", tSafeCheckRecord);
return ajax;
}
/**
* 新增安检记录
*/
......@@ -94,12 +110,35 @@ public class TSafeCheckRecordController extends BaseController
*/
@PostMapping("/addInfo")
public AjaxResult addInfo(@RequestBody TSafeCheckRecord tSafeCheckRecord) throws ParseException {
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = fmt.parse(tSafeCheckRecord.getSafeCheckDates());
tSafeCheckRecord.setSafeCheckDate(date);
return toAjax(tSafeCheckRecordService.insertTSafeCheckRecord(tSafeCheckRecord));
// DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date date = fmt.parse(tSafeCheckRecord.getSafeCheckDates());
//设置安检时间
tSafeCheckRecord.setSafeCheckDate(new Date());
//查询用户信息
TGasUserInfo tGasUserInfo1 = tGasUserInfoService.selectTGasUserInfoById(tSafeCheckRecord.getGasUserId());
//设置燃气用户末次配送时间
TGasUserInfo tGasUserInfo=new TGasUserInfo();
tGasUserInfo.setGasUserId(tSafeCheckRecord.getGasUserId());
tGasUserInfo.setLastDeliveryDate(new Date());
//累计次数+1
tGasUserInfo.setTotalCheckNum(tGasUserInfo1.getTotalCheckNum()+1);
tGasUserInfoService.updateTGasUserInfo(tGasUserInfo);
//设置任务记录信息
TTaskRecord tTaskRecord=new TTaskRecord();
//操作人id
tTaskRecord.setOperator(Long.valueOf(tSafeCheckRecord.getSafeCheckPerson()));
//安检记录添加
tSafeCheckRecordService.insertTSafeCheckRecord(tSafeCheckRecord);
//工序
tTaskRecord.setProcessesName("2");
tTaskRecord.setCreateTime(new Date());
tTaskRecord.setProcessesRelationId(tSafeCheckRecord.getSafeCheckId());
//任务记录表信息添加
// tTaskRecordService.insertTTaskRecord(tTaskRecord);
return toAjax( tTaskRecordService.insertTTaskRecord(tTaskRecord));
}
......
package com.zehong.web.controller.system;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.*;
import com.zehong.system.service.*;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -15,8 +19,6 @@ 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.TDeliveryRecord;
import com.zehong.system.service.ITDeliveryRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
......@@ -33,6 +35,16 @@ public class TDeliveryRecordController extends BaseController
@Autowired
private ITDeliveryRecordService tDeliveryRecordService;
@Autowired
private ITGasBottleInfoService tGasBottleInfoService;
@Autowired
private ITGasUserInfoService tGasUserInfoService;
@Autowired
private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
@Autowired
private ITTaskRecordService tTaskRecordService;
/**
* 查询配送记录列表
*/
......@@ -68,6 +80,23 @@ public class TDeliveryRecordController extends BaseController
return AjaxResult.success(tDeliveryRecordService.selectTDeliveryRecordById(deliveryRecordId));
}
/**
* 微信小程序获取配送记录详细信息
* @param deliveryRecordId
* @return
*/
@GetMapping("/getInfos")
public AjaxResult getInfos(Long deliveryRecordId)
{
TDeliveryRecord tDeliveryRecord = tDeliveryRecordService.selectTDeliveryRecordById(deliveryRecordId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tAirChargeRecord", tDeliveryRecord);
return ajax;
}
/**
* 新增配送记录
*/
......@@ -85,9 +114,64 @@ public class TDeliveryRecordController extends BaseController
* @return
*/
@PostMapping("/addRecord")
public AjaxResult addRecord(@RequestBody TDeliveryRecord tDeliveryRecord)
public int addRecord(@RequestBody TDeliveryRecord tDeliveryRecord)
{
return toAjax(tDeliveryRecordService.insertTDeliveryRecord(tDeliveryRecord));
TGasBottleInfo tGasBottleInfo1 = tGasBottleInfoService.selectTGasBottleInfoById(tDeliveryRecord.getBottleId());
if ("1".equals(tGasBottleInfo1.getCurrentStatus())){
return 1;
}
if ("0".equals(tGasBottleInfo1.getEmptyType())){
return 2;
}
TGasBottleInfo tGasBottleInfo=new TGasBottleInfo();
tGasBottleInfo.setBottleId(tDeliveryRecord.getBottleId());
//修改气瓶状态为离站状态
tGasBottleInfo.setCurrentStatus("1");
//修改气瓶信息
tGasBottleInfoService.updateTGasBottleInfo(tGasBottleInfo);
//设置配送时间
tDeliveryRecord.setDeliveryDate(new Date());
//设置燃气用户末次配送时间
TGasUserInfo tGasUserInfo=new TGasUserInfo();
tGasUserInfo.setGasUserId(tDeliveryRecord.getGasUserId());
tGasUserInfo.setLastDeliveryDate(new Date());
tGasUserInfoService.updateTGasUserInfo(tGasUserInfo);
//气瓶追溯信息添加
TGasBottleTrackRecord tGasBottleTrackRecord=new TGasBottleTrackRecord();
//储配站主键
tGasBottleTrackRecord.setStationId(tDeliveryRecord.getStationId());
//储配站
tGasBottleTrackRecord.setStationName(tDeliveryRecord.getStationName());
//气瓶主键
tGasBottleTrackRecord.setBottleId(tDeliveryRecord.getBottleId());
//气瓶条码
tGasBottleTrackRecord.setBottleCode(tDeliveryRecord.getBottleCode());
//工序 气瓶配送
tGasBottleTrackRecord.setProcessesName("1");
//配送人员
tGasBottleTrackRecord.setSender(tDeliveryRecord.getDeliveryPerson());
tGasBottleTrackRecord.setOperator(Long.valueOf(tDeliveryRecord.getDeliveryPerson()));
//接收人员
tGasBottleTrackRecord.setRecipient(String.valueOf(tDeliveryRecord.getGasUserId()));
tGasBottleTrackRecord.setOperateDate(new Date());
tDeliveryRecordService.insertTDeliveryRecord(tDeliveryRecord);
tGasBottleTrackRecord.setOperatorName(tDeliveryRecord.getDeliveryPersonName());
//气瓶追溯表信息添加
tGasBottleTrackRecord.setProcessesRelationId(tDeliveryRecord.getDeliveryRecordId());
tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord);
//设置任务记录信息
TTaskRecord tTaskRecord=new TTaskRecord();
//操作人id
tTaskRecord.setOperator(Long.valueOf(tDeliveryRecord.getDeliveryPerson()));
//工序
tTaskRecord.setProcessesName("1");
tTaskRecord.setCreateTime(new Date());
tTaskRecord.setProcessesRelationId(tDeliveryRecord.getDeliveryRecordId());
//任务记录表信息添加
tTaskRecordService.insertTTaskRecord(tTaskRecord);
return 0;
}
......
package com.zehong.web.controller.system;
import java.util.List;
import com.zehong.system.domain.*;
import com.zehong.system.service.*;
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.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 任务记录Controller
*
* @author zehong
* @date 2023-11-06
*/
@RestController
@RequestMapping("/system/records")
public class TTaskRecordController extends BaseController
{
@Autowired
private ITTaskRecordService tTaskRecordService;
@Autowired
private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
@Autowired
private ITGasUserInfoService tGasUserInfoService;
@Autowired
private ITDeliveryRecordService tDeliveryRecordService;
@Autowired
private ITAirChargeRecordService tAirChargeRecordService;
@Autowired
private ITSafeCheckRecordService tSafeCheckRecordService;
@Autowired
private ITVehicleUseRecordService tVehicleUseRecordService;
/**
* 查询任务记录列表
*/
@GetMapping("/list")
public TableDataInfo list(TTaskRecord tTaskRecord)
{
startPage();
List<TTaskRecord> list = tTaskRecordService.selectTTaskRecordList(tTaskRecord);
for (int i=0;i<list.size();i++){
//查询气瓶信息条码
if ("3".equals(list.get(i).getProcessesName())){
TGasBottleTrackRecord tGasBottleTrackRecord = tGasBottleTrackRecordService.selectTGasBottleTrackRecordById(list.get(i).getProcessesRelationId());
if (tGasBottleTrackRecord!=null) {
list.get(i).setBottleCode(tGasBottleTrackRecord.getBottleCode());
}
}else if ("5".equals(list.get(i).getProcessesName())){
TGasUserInfo tGasUserInfo = tGasUserInfoService.selectTGasUserInfoById(list.get(i).getProcessesRelationId());
if (tGasUserInfo!=null) {
list.get(i).setGasUserName(tGasUserInfo.getGasUserName());
}
}else if ("1".equals(list.get(i).getProcessesName())){
TDeliveryRecord tDeliveryRecord = tDeliveryRecordService.selectTDeliveryRecordById(list.get(i).getProcessesRelationId());
if (tDeliveryRecord!=null) {
list.get(i).setGasUserName(tDeliveryRecord.getGasUserName());
}
}else if ("0".equals(list.get(i).getProcessesName())){
TAirChargeRecord tAirChargeRecord = tAirChargeRecordService.selectTAirChargeRecordById(list.get(i).getProcessesRelationId());
if (tAirChargeRecord!=null) {
list.get(i).setBottleCode(tAirChargeRecord.getBottleCode());
}
} else if ("2".equals(list.get(i).getProcessesName())){
TSafeCheckRecord tSafeCheckRecord = tSafeCheckRecordService.selectTSafeCheckRecordById(list.get(i).getProcessesRelationId());
if (tSafeCheckRecord!=null) {
list.get(i).setGasUserName(tSafeCheckRecord.getGasUserName());
}
}else if ("4".equals(list.get(i).getProcessesName())){
TVehicleUseRecord tVehicleUseRecord = tVehicleUseRecordService.selectTVehicleUseRecordById(list.get(i).getProcessesRelationId());
if (tVehicleUseRecord!=null){
list.get(i).setVehicleCode(tVehicleUseRecord.getVehicleCode());
}
}
}
return getDataTable(list);
}
/**
* 导出任务记录列表
*/
@Log(title = "任务记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTaskRecord tTaskRecord)
{
List<TTaskRecord> list = tTaskRecordService.selectTTaskRecordList(tTaskRecord);
ExcelUtil<TTaskRecord> util = new ExcelUtil<TTaskRecord>(TTaskRecord.class);
return util.exportExcel(list, "任务记录数据");
}
/**
* 获取任务记录详细信息
*/
@GetMapping(value = "/{taskRecordId}")
public AjaxResult getInfo(@PathVariable("taskRecordId") Long taskRecordId)
{
return AjaxResult.success(tTaskRecordService.selectTTaskRecordById(taskRecordId));
}
/**
* 新增任务记录
*/
@Log(title = "任务记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTaskRecord tTaskRecord)
{
return toAjax(tTaskRecordService.insertTTaskRecord(tTaskRecord));
}
/**
* 修改任务记录
*/
@Log(title = "任务记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTaskRecord tTaskRecord)
{
return toAjax(tTaskRecordService.updateTTaskRecord(tTaskRecord));
}
/**
* 删除任务记录
*/
@Log(title = "任务记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{taskRecordIds}")
public AjaxResult remove(@PathVariable Long[] taskRecordIds)
{
return toAjax(tTaskRecordService.deleteTTaskRecordByIds(taskRecordIds));
}
}
......@@ -9,6 +9,11 @@ import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.TGasBottleTrackRecord;
import com.zehong.system.domain.TTaskRecord;
import com.zehong.system.domain.TVehicleInfo;
import com.zehong.system.service.ITTaskRecordService;
import com.zehong.system.service.ITVehicleInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -42,6 +47,13 @@ public class TVehicleUseRecordController extends BaseController
private ITVehicleUseRecordService tVehicleUseRecordService;
@Autowired
private TokenService tokenService;
@Autowired
private ITVehicleInfoService tVehicleInfoService;
@Autowired
private ITTaskRecordService tTaskRecordService;
/**
* 查询车辆使用记录列表
*/
......@@ -54,6 +66,20 @@ public class TVehicleUseRecordController extends BaseController
return getDataTable(list);
}
/**
* 微信小程序 获车辆使用记录详细信息
* @param vehicleUseRecordId
* @return
*/
@GetMapping("/selectGet")
public AjaxResult selectGetInfo(Long vehicleUseRecordId){
TVehicleUseRecord tVehicleUseRecord = tVehicleUseRecordService.selectTVehicleUseRecordById(vehicleUseRecordId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasBottleTrackRecord", tVehicleUseRecord);
return ajax;
}
/**
* 导出车辆使用记录列表
*/
......@@ -98,15 +124,47 @@ public class TVehicleUseRecordController extends BaseController
*/
@PostMapping("/addtVehicleUseRecord")
public AjaxResult addtVehicleUseRecord(@RequestBody TVehicleUseRecord tVehicleUseRecord) throws ParseException {
// LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
// Long userId = loginUser.getUser().getUserId();
// tVehicleUseRecord.setVehicleUserId(userId);
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date VehicleUseDateTime = fmt.parse(tVehicleUseRecord.getVehicleUseDateTime());
Date parse = fmt.parse(tVehicleUseRecord.getVehicleReturnDateTime());
tVehicleUseRecord.setVehicleUseDate(VehicleUseDateTime);
tVehicleUseRecord.setVehicleReturnDate(parse);
return toAjax(tVehicleUseRecordService.insertTVehicleUseRecord(tVehicleUseRecord));
//修改车辆信息 使用状态和使用人
TVehicleInfo tVehicleInfo=new TVehicleInfo();
tVehicleInfo.setVehicleId(tVehicleUseRecord.getVehicleId());
//设置使用人id
tVehicleInfo.setVehicleUserId(tVehicleUseRecord.getVehicleUserId());
//设置使用人姓名
tVehicleInfo.setName(tVehicleUseRecord.getName());
//设置使用状态
tVehicleInfo.setOnState(tVehicleUseRecord.getOnState());
//修改车辆管理信息表
tVehicleInfoService.updateTVehicleInfo(tVehicleInfo);
tVehicleUseRecordService.insertTVehicleUseRecord(tVehicleUseRecord);
//设置任务记录信息
TTaskRecord tTaskRecord=new TTaskRecord();
//操作人id
tTaskRecord.setOperator(Long.valueOf(tVehicleUseRecord.getVehicleUserId()));
//工序
tTaskRecord.setProcessesName("4");
tTaskRecord.setCreateTime(new Date());
tTaskRecord.setProcessesRelationId(tVehicleUseRecord.getVehicleUseRecordId());
//任务记录表信息添加
return toAjax(tTaskRecordService.insertTTaskRecord(tTaskRecord));
}
/**
* 微信小程序 归还车辆接口
*/
@PostMapping("/returningVehicle")
public AjaxResult returningVehicle(@RequestBody TVehicleUseRecord tVehicleUseRecord) throws ParseException {
//修改车辆信息 使用状态和使用人
TVehicleInfo tVehicleInfo=new TVehicleInfo();
tVehicleInfo.setVehicleId(tVehicleUseRecord.getVehicleId());
//设置使用人id
tVehicleInfo.setVehicleUserId(tVehicleUseRecord.getVehicleUserId());
//设置使用人姓名
tVehicleInfo.setName(tVehicleUseRecord.getName());
//设置使用状态
tVehicleInfo.setOnState(tVehicleUseRecord.getOnState());
//修改车辆管理信息表
return toAjax(tVehicleInfoService.updateTVehicleInfo(tVehicleInfo));
}
/**
......
......@@ -6,8 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://36.138.180.129:3306/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#url: jdbc:mysql://36.148.23.59:3306/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://27.128.233.145:33060/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: gas_progress_db
password: RMtiC6YCzdLxeJJL
# 从库数据源
......@@ -59,13 +58,13 @@ spring:
# redis 配置
redis:
# 地址
host: 127.0.0.1
host: 27.128.233.145
# 端口,默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password:
password: 1qaz2wsx3edc
# 连接超时时间
timeout: 10s
lettuce:
......@@ -91,8 +90,8 @@ zehong:
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /home/zehong/uploadPath)
profile: D:/zehong/uploadPath
profile: /home/zehong/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
\ No newline at end of file
captchaType: math
......@@ -13,9 +13,9 @@ spring:
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
......@@ -35,7 +35,7 @@ spring:
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
webStatFilter:
enabled: true
statViewServlet:
enabled: true
......@@ -58,13 +58,13 @@ spring:
# redis 配置
redis:
# 地址
host: localhost
host: 27.128.233.145
# 端口,默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password:
password: 1qaz2wsx3edc
# 连接超时时间
timeout: 10s
lettuce:
......@@ -94,4 +94,4 @@ zehong:
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
\ No newline at end of file
captchaType: math
......@@ -6,17 +6,23 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://36.138.180.82:3309/gas_progress_db_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://121.29.1.158:33060/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://61.240.140.163:3309/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://36.138.180.82:3309/gas_progress_db_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://36.138.180.129:3306/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://121.29.1.158:33060/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#url: jdbc:mysql://36.148.23.59:3306/gas_progress_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: zhkj_db_n
password: Fwn4B8nALmLtNh2y
username: gas_progress_db
password: RMtiC6YCzdLxeJJL
# username: ps_ranqi
# password: zehong@123
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
......@@ -36,7 +42,7 @@ spring:
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
webStatFilter:
enabled: true
statViewServlet:
enabled: true
......@@ -59,11 +65,14 @@ spring:
# redis 配置
redis:
# 地址
host: 36.138.180.82
host: 36.138.180.129
# host: 27.128.233.145
# host: 61.240.140.163
# 端口,默认为6379
port: 63798
# port: 6380
port: 6379
# 数据库索引
database: 6
database: 0
# 密码
password: 1qaz2wsx3edc
# 连接超时时间
......@@ -91,8 +100,9 @@ zehong:
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /home/zehong/uploadPath)
profile: D:/zehong/uploadPath
profile: /home/zehong/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
\ No newline at end of file
captchaType: math
......@@ -25,8 +25,8 @@ spring:
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: dev
profiles:
active: test
# 文件上传
servlet:
multipart:
......@@ -48,7 +48,7 @@ token:
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
# MyBatis配置
mybatis:
# 搜索指定包别名
......@@ -59,11 +59,11 @@ mybatis:
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
params: count=countSql
# Swagger配置
swagger:
......@@ -73,10 +73,10 @@ swagger:
pathMapping: /dev-api
# 防止XSS攻击
xss:
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
\ No newline at end of file
urlPatterns: /system/*,/monitor/*,/tool/*
......@@ -32,6 +32,9 @@ public class TDeliveryRecord extends BaseEntity
@Excel(name = "配送人员")
private String deliveryPerson;
/*配送人员名称*/
private String deliveryPersonName;
/** 车辆代码 */
@Excel(name = "车辆代码")
private String vehicleCode;
......@@ -45,7 +48,7 @@ public class TDeliveryRecord extends BaseEntity
private String deliveryAddress;
/** 配送时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "配送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date deliveryDate;
......@@ -58,6 +61,7 @@ public class TDeliveryRecord extends BaseEntity
*/
private String stationName;
/**
* 气瓶条码
*/
......@@ -83,6 +87,13 @@ public class TDeliveryRecord extends BaseEntity
*/
private String gasUserType;
public String getDeliveryPersonName() {
return deliveryPersonName;
}
public void setDeliveryPersonName(String deliveryPersonName) {
this.deliveryPersonName = deliveryPersonName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
......@@ -224,7 +235,8 @@ public class TDeliveryRecord extends BaseEntity
"deliveryRecordId=" + deliveryRecordId +
", stationId=" + stationId +
", bottleId=" + bottleId +
", deliveryPerson=" + deliveryPerson +
", deliveryPerson='" + deliveryPerson + '\'' +
", deliveryPersonName='" + deliveryPersonName + '\'' +
", vehicleCode='" + vehicleCode + '\'' +
", gasUserId=" + gasUserId +
", deliveryAddress='" + deliveryAddress + '\'' +
......
......@@ -71,6 +71,26 @@ public class TGasBottleTrackRecord extends BaseEntity
private String messageInfo;
private String name;
private String gasUserName;
public String getGasUserName() {
return gasUserName;
}
public void setGasUserName(String gasUserName) {
this.gasUserName = gasUserName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
......
......@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 燃气用户对象 t_gas_user_info
*
*
* @author zehong
* @date 2023-08-17
*/
......@@ -60,102 +60,116 @@ public class TGasUserInfo extends BaseEntity
/** 删除状态:0.否 1.是 */
private String isDel;
public void setGasUserId(Long gasUserId)
private String operator;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public void setGasUserId(Long gasUserId)
{
this.gasUserId = gasUserId;
}
public Long getGasUserId()
public Long getGasUserId()
{
return gasUserId;
}
public void setGasUserName(String gasUserName)
public void setGasUserName(String gasUserName)
{
this.gasUserName = gasUserName;
}
public String getGasUserName()
public String getGasUserName()
{
return gasUserName;
}
public void setGasUserCode(String gasUserCode)
public void setGasUserCode(String gasUserCode)
{
this.gasUserCode = gasUserCode;
}
public String getGasUserCode()
public String getGasUserCode()
{
return gasUserCode;
}
public void setGasUserType(String gasUserType)
public void setGasUserType(String gasUserType)
{
this.gasUserType = gasUserType;
}
public String getGasUserType()
public String getGasUserType()
{
return gasUserType;
}
public void setTelNum(String telNum)
public void setTelNum(String telNum)
{
this.telNum = telNum;
}
public String getTelNum()
public String getTelNum()
{
return telNum;
}
public void setGasUserStatus(String gasUserStatus)
public void setGasUserStatus(String gasUserStatus)
{
this.gasUserStatus = gasUserStatus;
}
public String getGasUserStatus()
public String getGasUserStatus()
{
return gasUserStatus;
}
public void setGasUserAddress(String gasUserAddress)
public void setGasUserAddress(String gasUserAddress)
{
this.gasUserAddress = gasUserAddress;
}
public String getGasUserAddress()
public String getGasUserAddress()
{
return gasUserAddress;
}
public void setLastDeliveryDate(Date lastDeliveryDate)
public void setLastDeliveryDate(Date lastDeliveryDate)
{
this.lastDeliveryDate = lastDeliveryDate;
}
public Date getLastDeliveryDate()
public Date getLastDeliveryDate()
{
return lastDeliveryDate;
}
public void setGasUserCheckStatus(String gasUserCheckStatus)
public void setGasUserCheckStatus(String gasUserCheckStatus)
{
this.gasUserCheckStatus = gasUserCheckStatus;
}
public String getGasUserCheckStatus()
public String getGasUserCheckStatus()
{
return gasUserCheckStatus;
}
public void setTotalCheckNum(Integer totalCheckNum)
public void setTotalCheckNum(Integer totalCheckNum)
{
this.totalCheckNum = totalCheckNum;
}
public Integer getTotalCheckNum()
public Integer getTotalCheckNum()
{
return totalCheckNum;
}
public void setIsDel(String isDel)
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
public String getIsDel()
{
return isDel;
}
......
......@@ -21,7 +21,6 @@ public class TSafeCheckRecord extends BaseEntity
private Long safeCheckId;
/** 储配站主键 */
private Long stationId;
@Excel(name = "储配站")
......@@ -36,7 +35,6 @@ public class TSafeCheckRecord extends BaseEntity
@Excel(name = "联系方式")
private String telNum;
/** 用户主键 */
private Long gasUserId;
......
package com.zehong.system.domain;
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_task_record
*
* @author zehong
* @date 2023-11-06
*/
public class TTaskRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long taskRecordId;
/** 操作人id */
@Excel(name = "操作人id")
private Long operator;
/** 关联主键 对应到每一个表中 */
@Excel(name = "关联主键 对应到每一个表中")
private Long processesRelationId;
/** 工序 0气瓶充装 1气瓶配送 2入户安检 3气瓶回收 4扫码用车 5用户录入 */
@Excel(name = "工序 0气瓶充装 1气瓶配送 2入户安检 3气瓶回收 4扫码用车 5用户录入")
private String processesName;
/** 是否删除 0未删除 1删除 */
@Excel(name = "是否删除 0未删除 1删除")
private String isDel;
/**
* 气瓶编号
*/
private String bottleCode;
/**
* 用户名称
*/
private String gasUserName;
/**
* 车辆编号
*/
private String vehicleCode;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getBottleCode() {
return bottleCode;
}
public void setBottleCode(String bottleCode) {
this.bottleCode = bottleCode;
}
public String getGasUserName() {
return gasUserName;
}
public void setGasUserName(String gasUserName) {
this.gasUserName = gasUserName;
}
public String getVehicleCode() {
return vehicleCode;
}
public void setVehicleCode(String vehicleCode) {
this.vehicleCode = vehicleCode;
}
public void setTaskRecordId(Long taskRecordId)
{
this.taskRecordId = taskRecordId;
}
public Long getTaskRecordId()
{
return taskRecordId;
}
public void setOperator(Long operator)
{
this.operator = operator;
}
public Long getOperator()
{
return operator;
}
public void setProcessesRelationId(Long processesRelationId)
{
this.processesRelationId = processesRelationId;
}
public Long getProcessesRelationId()
{
return processesRelationId;
}
public void setProcessesName(String processesName)
{
this.processesName = processesName;
}
public String getProcessesName()
{
return processesName;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
@Override
public String toString() {
return "TTaskRecord{" +
"taskRecordId=" + taskRecordId +
", operator=" + operator +
", processesRelationId=" + processesRelationId +
", processesName='" + processesName + '\'' +
", isDel='" + isDel + '\'' +
", bottleCode='" + bottleCode + '\'' +
", gasUserName='" + gasUserName + '\'' +
", vehicleCode='" + vehicleCode + '\'' +
'}';
}
}
......@@ -74,17 +74,82 @@ public class TVehicleInfo extends BaseEntity
@Excel(name = "备注")
private String remarks;
/**
* 使用状态 0未使用 1使用中
*/
private String onState;
/**
* 储配站名称
*/
private String siteStationName;
/** 车辆使用人 */
private Long vehicleUserId;
/**
* 使用人姓名
*/
private String name;
/**
* 储配站id
*/
private Long stationId;
/**
* 储配站名称
*/
private String stationName;
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public Long getStationId() {
return stationId;
}
public void setStationId(Long stationId) {
this.stationId = stationId;
}
public Long getVehicleUserId() {
return vehicleUserId;
}
public void setVehicleUserId(Long vehicleUserId) {
this.vehicleUserId = vehicleUserId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
private BigDecimal longitude;
private BigDecimal latitude;
private String beyondEnterpriseName;
public String getOnState() {
return onState;
}
public void setOnState(String onState) {
this.onState = onState;
}
public String getCarNumber() {
return carNumber;
}
......@@ -264,7 +329,12 @@ public class TVehicleInfo extends BaseEntity
", phone='" + phone + '\'' +
", isDel='" + isDel + '\'' +
", remarks='" + remarks + '\'' +
", onState='" + onState + '\'' +
", siteStationName='" + siteStationName + '\'' +
", vehicleUserId=" + vehicleUserId +
", name='" + name + '\'' +
", stationId=" + stationId +
", stationName='" + stationName + '\'' +
", longitude=" + longitude +
", latitude=" + latitude +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
......
......@@ -52,14 +52,12 @@ public class TVehicleUseRecord extends BaseEntity
private Long vehicleUserId;
/** 使用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date vehicleUseDate;
@Excel(name = "使用时间")
private String vehicleUseDate;
/** 归还时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date vehicleReturnDate;
@Excel(name = "归还时间")
private String vehicleReturnDate;
/**使用时间*/
private String vehicleUseDateTime;
......@@ -70,6 +68,20 @@ public class TVehicleUseRecord extends BaseEntity
@Excel(name = "删除状态:0.否 1.是")
private String isDel;
/**
* 使用状态 0未使用 1使用中
*/
private String onState;
public String getOnState() {
return onState;
}
public void setOnState(String onState) {
this.onState = onState;
}
public String getVehicleUseDateTime() {
return vehicleUseDateTime;
}
......@@ -158,24 +170,23 @@ public class TVehicleUseRecord extends BaseEntity
{
return vehicleUserId;
}
public void setVehicleUseDate(Date vehicleUseDate)
{
this.vehicleUseDate = vehicleUseDate;
}
public Date getVehicleUseDate()
{
public String getVehicleUseDate() {
return vehicleUseDate;
}
public void setVehicleReturnDate(Date vehicleReturnDate)
{
this.vehicleReturnDate = vehicleReturnDate;
public void setVehicleUseDate(String vehicleUseDate) {
this.vehicleUseDate = vehicleUseDate;
}
public Date getVehicleReturnDate()
{
public String getVehicleReturnDate() {
return vehicleReturnDate;
}
public void setVehicleReturnDate(String vehicleReturnDate) {
this.vehicleReturnDate = vehicleReturnDate;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
......@@ -199,7 +210,10 @@ public class TVehicleUseRecord extends BaseEntity
", vehicleUserId=" + vehicleUserId +
", vehicleUseDate=" + vehicleUseDate +
", vehicleReturnDate=" + vehicleReturnDate +
", vehicleUseDateTime='" + vehicleUseDateTime + '\'' +
", vehicleReturnDateTime='" + vehicleReturnDateTime + '\'' +
", isDel='" + isDel + '\'' +
", onState='" + onState + '\'' +
'}';
}
}
......@@ -74,4 +74,6 @@ public interface TGasBottleInfoMapper
* @return
*/
TGasBottleInfo getInf(String bottleId);
TGasBottleInfo getInfn(String bottleId);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TTaskRecord;
/**
* 任务记录Mapper接口
*
* @author zehong
* @date 2023-11-06
*/
public interface TTaskRecordMapper
{
/**
* 查询任务记录
*
* @param taskRecordId 任务记录ID
* @return 任务记录
*/
public TTaskRecord selectTTaskRecordById(Long taskRecordId);
/**
* 查询任务记录列表
*
* @param tTaskRecord 任务记录
* @return 任务记录集合
*/
public List<TTaskRecord> selectTTaskRecordList(TTaskRecord tTaskRecord);
/**
* 新增任务记录
*
* @param tTaskRecord 任务记录
* @return 结果
*/
public int insertTTaskRecord(TTaskRecord tTaskRecord);
/**
* 修改任务记录
*
* @param tTaskRecord 任务记录
* @return 结果
*/
public int updateTTaskRecord(TTaskRecord tTaskRecord);
/**
* 删除任务记录
*
* @param taskRecordId 任务记录ID
* @return 结果
*/
public int deleteTTaskRecordById(Long taskRecordId);
/**
* 批量删除任务记录
*
* @param taskRecordIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTaskRecordByIds(Long[] taskRecordIds);
}
......@@ -81,4 +81,6 @@ public interface ITGasBottleInfoService
* @param bottleId
*/
TGasBottleInfo getInf(String bottleId);
TGasBottleInfo getInfn(String bottleId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TTaskRecord;
/**
* 任务记录Service接口
*
* @author zehong
* @date 2023-11-06
*/
public interface ITTaskRecordService
{
/**
* 查询任务记录
*
* @param taskRecordId 任务记录ID
* @return 任务记录
*/
public TTaskRecord selectTTaskRecordById(Long taskRecordId);
/**
* 查询任务记录列表
*
* @param tTaskRecord 任务记录
* @return 任务记录集合
*/
public List<TTaskRecord> selectTTaskRecordList(TTaskRecord tTaskRecord);
/**
* 新增任务记录
*
* @param tTaskRecord 任务记录
* @return 结果
*/
public int insertTTaskRecord(TTaskRecord tTaskRecord);
/**
* 修改任务记录
*
* @param tTaskRecord 任务记录
* @return 结果
*/
public int updateTTaskRecord(TTaskRecord tTaskRecord);
/**
* 批量删除任务记录
*
* @param taskRecordIds 需要删除的任务记录ID
* @return 结果
*/
public int deleteTTaskRecordByIds(Long[] taskRecordIds);
/**
* 删除任务记录信息
*
* @param taskRecordId 任务记录ID
* @return 结果
*/
public int deleteTTaskRecordById(Long taskRecordId);
}
......@@ -195,4 +195,9 @@ public class TGasBottleInfoServiceImpl implements ITGasBottleInfoService
public TGasBottleInfo getInf(String bottleId) {
return tGasBottleInfoMapper.getInf(bottleId);
}
@Override
public TGasBottleInfo getInfn(String bottleId) {
return tGasBottleInfoMapper.getInfn(bottleId);
}
}
......@@ -14,12 +14,12 @@ import javax.annotation.Resource;
/**
* 气瓶追溯Service业务层处理
*
*
* @author zehong
* @date 2023-08-18
*/
@Service
public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordService
public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordService
{
@Autowired
private TGasBottleTrackRecordMapper tGasBottleTrackRecordMapper;
......@@ -29,7 +29,7 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
/**
* 查询气瓶追溯
*
*
* @param trackRecordId 气瓶追溯ID
* @return 气瓶追溯
*/
......@@ -41,7 +41,7 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
/**
* 查询气瓶追溯列表
*
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 气瓶追溯
*/
......@@ -53,28 +53,31 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
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() + " 】气瓶充气成功");
massage.append("由【"+ charge.getStationName() +"储配站 】")
.append("从业人员: " + charge.getChargeOperatorName() + "")
.append("给编号" + charge.getBottleCode() + "气瓶充气成功");
}
if("1".equals(item.getProcessesName())){
massage.append("由【 "+ item.getStationName() +" 】")
.append("配送人员"+ item.getOperatorName() +" 联系电话")
.append("配送气瓶到客户【】")
.append("联系电话");
massage.append("由【"+ item.getStationName() +"储配站 】")
.append("配送人员: "+ item.getName())
.append("配送气瓶到客户"+item.getGasUserName());
}
if("2".equals(item.getProcessesName())){
massage.append("由从业人员【 " + item.getOperatorName() + " 】")
.append("回收编号【 "+ item.getBottleCode() +" 】气瓶");
massage.append("由【"+ item.getStationName() +"储配站 】")
.append("从业人员:" + item.getName())
.append("回收编号 "+ item.getBottleCode() +" 气瓶");
}
item.setMessageInfo(massage.toString());
});
return records;
}
/**
* 新增气瓶追溯
*
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
......@@ -87,7 +90,7 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
/**
* 修改气瓶追溯
*
*
* @param tGasBottleTrackRecord 气瓶追溯
* @return 结果
*/
......@@ -100,7 +103,7 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
/**
* 批量删除气瓶追溯
*
*
* @param trackRecordIds 需要删除的气瓶追溯ID
* @return 结果
*/
......@@ -112,7 +115,7 @@ public class TGasBottleTrackRecordServiceImpl implements ITGasBottleTrackRecordS
/**
* 删除气瓶追溯信息
*
*
* @param trackRecordId 气瓶追溯ID
* @return 结果
*/
......
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.TTaskRecordMapper;
import com.zehong.system.domain.TTaskRecord;
import com.zehong.system.service.ITTaskRecordService;
/**
* 任务记录Service业务层处理
*
* @author zehong
* @date 2023-11-06
*/
@Service
public class TTaskRecordServiceImpl implements ITTaskRecordService
{
@Autowired
private TTaskRecordMapper tTaskRecordMapper;
/**
* 查询任务记录
*
* @param taskRecordId 任务记录ID
* @return 任务记录
*/
@Override
public TTaskRecord selectTTaskRecordById(Long taskRecordId)
{
return tTaskRecordMapper.selectTTaskRecordById(taskRecordId);
}
/**
* 查询任务记录列表
*
* @param tTaskRecord 任务记录
* @return 任务记录
*/
@Override
public List<TTaskRecord> selectTTaskRecordList(TTaskRecord tTaskRecord)
{
return tTaskRecordMapper.selectTTaskRecordList(tTaskRecord);
}
/**
* 新增任务记录
*
* @param tTaskRecord 任务记录
* @return 结果
*/
@Override
public int insertTTaskRecord(TTaskRecord tTaskRecord)
{
tTaskRecord.setCreateTime(DateUtils.getNowDate());
return tTaskRecordMapper.insertTTaskRecord(tTaskRecord);
}
/**
* 修改任务记录
*
* @param tTaskRecord 任务记录
* @return 结果
*/
@Override
public int updateTTaskRecord(TTaskRecord tTaskRecord)
{
return tTaskRecordMapper.updateTTaskRecord(tTaskRecord);
}
/**
* 批量删除任务记录
*
* @param taskRecordIds 需要删除的任务记录ID
* @return 结果
*/
@Override
public int deleteTTaskRecordByIds(Long[] taskRecordIds)
{
return tTaskRecordMapper.deleteTTaskRecordByIds(taskRecordIds);
}
/**
* 删除任务记录信息
*
* @param taskRecordId 任务记录ID
* @return 结果
*/
@Override
public int deleteTTaskRecordById(Long taskRecordId)
{
return tTaskRecordMapper.deleteTTaskRecordById(taskRecordId);
}
}
......@@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bottleCode != null">and bottle.bottle_code like concat('%', #{bottleCode}, '%')</if>
<if test="stationName != null">and station.station_name like concat('%', #{stationName}, '%')</if>
</where>
order by charge.charge_record_id desc
</select>
<select id="selectTAirChargeRecordById" parameterType="Long" resultMap="TAirChargeRecordResult">
......
......@@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deliveryAddress != null and deliveryAddress != ''"> and a.delivery_address = #{deliveryAddress}</if>
<if test="deliveryDate != null "> and a.delivery_date = #{deliveryDate}</if>
</where>
order by a.delivery_record_id desc
</select>
<select id="selectTDeliveryRecordById" parameterType="Long" resultMap="TDeliveryRecordResult">
......
......@@ -101,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="emptyType != null and emptyType != ''"> and bottle.empty_type = #{emptyType}</if>
<if test="isDel != null and isDel != ''"> and bottle.is_del = #{isDel}</if>
</where>
order by bottle.bottle_id desc
</select>
<select id="selectTGasBottleInfoById" parameterType="Long" resultMap="TGasBottleInfoResult">
......@@ -244,6 +245,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--查询气瓶详细信息-->
<select id="getInf" resultMap="TGasBottleInfoResult" parameterType="java.lang.String">
<include refid="selectTGasBottleInfoVo"/>
where bottle.bottle_id = #{bottleId}
</select>
<select id="getInfn" resultMap="TGasBottleInfoResult" parameterType="java.lang.String">
<include refid="selectTGasBottleInfoVo"/>
where bottle.bottle_code = #{bottleId}
</select>
......
......@@ -3,7 +3,7 @@
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" />
......@@ -22,10 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="bottleCode" column="bottle_code" />
<result property="bottleCapacity" column="bottle_capacity" />
<result property="operatorName" column="operator_name"/>
<result property="name" column="name"/>
<result property="gasUserName" column="gas_user_name"/>
</resultMap>
<sql id="selectTGasBottleTrackRecordVo">
SELECT
SELECT
record.track_record_id,
record.station_id,
record.bottle_id,
......@@ -42,16 +44,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
station.station_name,
bottle.bottle_code,
bottle.bottle_capacity,
practitioner.name,
userinfo.gas_user_name,
(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
LEFT JOIN t_practitioner_info practitioner ON record.operator=practitioner.practitioner_id
LEFT JOIN t_gas_user_info userinfo ON userinfo.gas_user_id=record.recipient
</sql>
<select id="selectTGasBottleTrackRecordList" parameterType="TGasBottleTrackRecord" resultMap="TGasBottleTrackRecordResult">
<include refid="selectTGasBottleTrackRecordVo"/>
<where>
<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>
......@@ -65,12 +71,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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=",">
......@@ -127,9 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTGasBottleTrackRecordByIds" parameterType="String">
delete from t_gas_bottle_track_record where track_record_id in
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
</mapper>
......@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TGasStorageStationInfoMapper">
<resultMap type="TGasStorageStationInfo" id="TGasStorageStationInfoResult">
<result property="stationId" column="station_id" />
<result property="stationName" column="station_name" />
......@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTGasStorageStationInfoList" parameterType="TGasStorageStationInfo" resultMap="TGasStorageStationInfoResult">
<include refid="selectTGasStorageStationInfoVo"/>
<where>
<where>
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
<if test="director != null and director != ''"> and director = #{director}</if>
......@@ -44,13 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and create_time BETWEEN #{createBeginTime} AND #{createEndTime}
</if>
</where>
order by create_time desc
</select>
<select id="selectTGasStorageStationInfoById" parameterType="Long" resultMap="TGasStorageStationInfoResult">
<include refid="selectTGasStorageStationInfoVo"/>
where station_id = #{stationId}
</select>
<insert id="insertTGasStorageStationInfo" parameterType="TGasStorageStationInfo" useGeneratedKeys="true" keyProperty="stationId">
insert into t_gas_storage_station_info
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -113,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTGasStorageStationInfoByIds" parameterType="String">
delete from t_gas_storage_station_info where station_id in
delete from t_gas_storage_station_info where station_id in
<foreach item="stationId" collection="array" open="(" separator="," close=")">
#{stationId}
</foreach>
......@@ -133,4 +134,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</where>
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalCheckNum != null "> and total_check_num = #{totalCheckNum}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
order by gas_user_id desc
</select>
<select id="selectTGasUserInfoById" parameterType="Long" resultMap="TGasUserInfoResult">
......
......@@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="password != null and password != ''"> and info.password = #{password}</if>
<if test="isDel != null and isDel != ''"> and info.is_del = #{isDel}</if>
</where>
order by info.practitioner_id desc
</select>
<select id="selectTPractitionerInfoById" parameterType="Long" resultMap="TPractitionerInfoResult">
......
......@@ -3,7 +3,7 @@
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" />
......@@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTSafeCheckRecordList" parameterType="TSafeCheckRecord" resultMap="TSafeCheckRecordResult">
<include refid="selectTSafeCheckRecordVo"/>
<where>
<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>
......@@ -105,13 +105,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
order by record.safe_check_id desc
</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=",">
......@@ -204,9 +205,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTSafeCheckRecordByIds" parameterType="String">
delete from t_safe_check_record where safe_check_id in
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
</mapper>
<?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.TTaskRecordMapper">
<resultMap type="TTaskRecord" id="TTaskRecordResult">
<result property="taskRecordId" column="task_record_id" />
<result property="operator" column="operator" />
<result property="processesRelationId" column="processes_relation_id" />
<result property="processesName" column="processes_name" />
<result property="createTime" column="create_time" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTTaskRecordVo">
select task_record_id, operator, processes_relation_id, processes_name, create_time, is_del from t_task_record
</sql>
<select id="selectTTaskRecordList" parameterType="TTaskRecord" resultMap="TTaskRecordResult">
<include refid="selectTTaskRecordVo"/>
<where>
<if test="operator != null "> and operator = #{operator}</if>
<if test="processesRelationId != null "> and processes_relation_id = #{processesRelationId}</if>
<if test="processesName != null and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
order by task_record_id desc
</select>
<select id="selectTTaskRecordById" parameterType="Long" resultMap="TTaskRecordResult">
<include refid="selectTTaskRecordVo"/>
where task_record_id = #{taskRecordId}
</select>
<insert id="insertTTaskRecord" parameterType="TTaskRecord" useGeneratedKeys="true" keyProperty="taskRecordId">
insert into t_task_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="operator != null">operator,</if>
<if test="processesRelationId != null">processes_relation_id,</if>
<if test="processesName != null">processes_name,</if>
<if test="createTime != null">create_time,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="operator != null">#{operator},</if>
<if test="processesRelationId != null">#{processesRelationId},</if>
<if test="processesName != null">#{processesName},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
<update id="updateTTaskRecord" parameterType="TTaskRecord">
update t_task_record
<trim prefix="SET" suffixOverrides=",">
<if test="operator != null">operator = #{operator},</if>
<if test="processesRelationId != null">processes_relation_id = #{processesRelationId},</if>
<if test="processesName != null">processes_name = #{processesName},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where task_record_id = #{taskRecordId}
</update>
<delete id="deleteTTaskRecordById" parameterType="Long">
delete from t_task_record where task_record_id = #{taskRecordId}
</delete>
<delete id="deleteTTaskRecordByIds" parameterType="String">
delete from t_task_record where task_record_id in
<foreach item="taskRecordId" collection="array" open="(" separator="," close=")">
#{taskRecordId}
</foreach>
</delete>
</mapper>
......@@ -21,17 +21,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="beyondEnterpriseName" column="enterprise_name" />
<result property="siteStationName" column="site_station_name" />
<result property="carNumber" column="car_number" />
<result property="onState" column="on_state" />
<result property="vehicleUserId" column="vehicle_uiser_id" />
<result property="stationId" column="stationId" />
<result property="stationName" column="station_name" />
</resultMap>
<sql id="selectTVehicleInfoVo">
select vehicle_id, car_number,car_num, brand_model, vehicle_type, vehicle_load, vehicle_size, vehicle_limt, vehicle_inspect, beyond_enterprise_id, person_liable, phone, is_del, remarks from t_vehicle_info
select vehicle_id, car_number,car_num, brand_model, vehicle_type, vehicle_load, vehicle_size, vehicle_limt, vehicle_inspect, beyond_enterprise_id, person_liable, phone, is_del,on_state, remarks from t_vehicle_info
</sql>
<select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult">
select a.*,b.enterprise_name,c.site_station_name
select a.*,b.enterprise_name,c.site_station_name,d.station_name
from t_vehicle_info a
left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
left join t_site_station_info c on c.site_station_id=a.station_id
left join t_gas_storage_station_info d on d.station_id=a.stationId
<where>
<if test="carNum != null and carNum != ''"> and car_num like concat('%', #{carNum}, '%') </if>
<if test="brandModel != null and brandModel != ''"> and a.brand_model = #{brandModel}</if>
......@@ -50,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTVehicleInfoById" parameterType="Long" resultMap="TVehicleInfoResult">
select a.*,b.enterprise_name
select a.*,b.enterprise_name
from t_vehicle_info a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where vehicle_id = #{vehicleId}
</select>
......@@ -71,6 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phone != null">phone,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
<if test="onState != null">on_state,</if>
<if test="stationId != null">stationId,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carNumber != null">#{carNumber},</if>
......@@ -86,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phone != null">#{phone},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
<if test="onState != null">#{onState},</if>
<if test="stationId != null">#{stationId},</if>
</trim>
</insert>
......@@ -105,6 +115,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phone != null">phone = #{phone},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="onState != null">on_state =#{onState},</if>
<if test="onState != null">on_state =#{onState},</if>
<if test="name != null">name =#{name},</if>
<if test="vehicleUserId != null">vehicle_uiser_id =#{vehicleUserId},</if>
<if test="stationId != null">stationId = #{stationId},</if>
</trim>
where vehicle_id = #{vehicleId}
</update>
......
......@@ -28,11 +28,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTVehicleUseRecordList" parameterType="TVehicleUseRecord" resultMap="TVehicleUseRecordResult">
select a.vehicle_use_record_id, a.station_id, a.vehicle_id, a.vehicle_user_id, a.vehicle_use_date, a.vehicle_return_date, a.create_time, a.update_time, a.is_del, a.remark,
b.station_name,c.vehicle_code,c.car_num,d.nick_name
b.station_name,c.car_number,c.car_num,d.name as nick_name
from t_vehicle_use_record a
left join t_gas_storage_station_info b on a.station_id=b.station_id
left join t_vehicle_info c on a.vehicle_id=c.vehicle_id
left join sys_user d on a.vehicle_user_id=d.user_id
left join t_practitioner_info d on a.vehicle_user_id=d.practitioner_id
<where>
<if test="stationId != null "> and a.station_id = #{stationId}</if>
<if test="vehicleId != null "> and a.vehicle_id = #{vehicleId}</if>
......@@ -45,8 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTVehicleUseRecordById" parameterType="Long" resultMap="TVehicleUseRecordResult">
<include refid="selectTVehicleUseRecordVo"/>
where vehicle_use_record_id = #{vehicleUseRecordId}
select a.vehicle_use_record_id, a.station_id, a.vehicle_id, a.vehicle_user_id, a.vehicle_use_date, a.vehicle_return_date, a.create_time, a.update_time, a.is_del, a.remark,
b.station_name,c.car_number as vehicle_code,c.car_num,d.name as nick_name
from t_vehicle_use_record a
left join t_vehicle_info c on a.vehicle_id=c.vehicle_id
left join t_gas_storage_station_info b on c.stationId=b.station_id
left join t_practitioner_info d on a.vehicle_user_id=d.practitioner_id
where a.vehicle_use_record_id = #{vehicleUseRecordId}
</select>
<insert id="insertTVehicleUseRecord" parameterType="TVehicleUseRecord" useGeneratedKeys="true" keyProperty="vehicleUseRecordId">
......
......@@ -26,7 +26,7 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development',
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false,
// webpack-dev-server 相关配置
// webpack-dev-server 相关配置 npm
devServer: {
host: '0.0.0.0',
port: port,
......@@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.2.14:8903/gassafety`,
target: `http://222.223.203.154:8092/gassafety`,
target: `http://127.0.0.1:8905/gassafety`,
//target: `http://27.128.233.145:8905/gassafety`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
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