增加停车场对接,增加http访问

This commit is contained in:
gaoben 2020-11-18 14:46:23 +08:00
parent b00f593c61
commit 1d52967819
17 changed files with 978 additions and 403 deletions

View File

@ -0,0 +1,31 @@
package net.shapelight.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.apache.catalina.connector.Connector;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
@Configuration
public class TomcatConfig {
// @Value("${server.http.port}")
// private int httpPort;
@Value("${http.port}")
private Integer port;
@Bean
public ServletWebServerFactory servletContainer() {
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
// 配置http
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.setPort(port);
tomcat.addAdditionalTomcatConnectors(connector); // 添加http
return tomcat;
}
}

View File

@ -9,6 +9,13 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.shapelight.common.utils.R;
import net.shapelight.modules.ten.entity.TenCarEntity;
import net.shapelight.modules.ten.entity.TenPackRecordEntity;
import net.shapelight.modules.ten.entity.TenRecordEntity;
import net.shapelight.modules.ten.service.TenCarService;
import net.shapelight.modules.ten.service.TenPackRecordService;
import net.shapelight.modules.ten.service.TenRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@ -22,24 +29,99 @@ import java.util.Map;
@Slf4j
public class CarOpenApi {
@Autowired
private TenCarService tenCarService;
@Autowired
private TenPackRecordService tenPackRecordService;
@PostMapping("/getMsg/{cellId}")
@ApiOperation(value = "获取Msg")
@ApiImplicitParams({
@ApiImplicitParam(name="sn",value = "设备SN",paramType = "query",dataType = "String",required = true),
@ApiImplicitParam(name = "sn", value = "设备SN", paramType = "query", dataType = "String", required = true),
})
public R getMsg(@PathVariable("cellId") Long cellId,@RequestParam Map<String, Object> params){
public R getMsg(@PathVariable("cellId") Long cellId, @RequestParam Map<String, Object> params) {
JSONObject msgJson = JSONObject.parseObject((String)params.get("Msg"));
switch ((Integer) msgJson.get("command")){
case 1://1-主动上传进出记录
break;
case 13://13-主动上传车辆信息
break;
case 19://19-主动上传本地修改车辆信息
break;
case 20://20-主动上传本地注销车辆信息
JSONObject msgJson = JSONObject.parseObject((String) params.get("Msg"));
int cmd = msgJson.getInteger("command");
/*
Msg='{"workstationid":1,
"message":"",
"VLP":"粤B66666",
"position":"0","method":"","username":"test",
"Ctypename":"月租车","model":"MAGOTAN","balance":"0.05",
"registertime":"2017-05-25","status":1,"vehiclename":"张三",
"parkid":1, "vehiclenumber":"1234567890123456789012",
"certificate":"12345678901234567","Vtypename":"小型车",
"result":0,"cardsn":"12","telephone":"13800000000",
"Vtype":1,"address":"深圳市龙华区民治街道","receivablefee":"0.00",
"password":"d41d8cd98f00b204e9800998ecf8427e","endtime":
"2017-06-24","command":13,"deposit":"0","mode":0,"color":"黑色","code":0,
"recordid":0,"Ctype":2,"starttime":"2017-05-25","actualfee":"0.00"}'
*/
if (cmd == 13 || cmd == 19 || cmd == 20) {
TenCarEntity car = new TenCarEntity();
car.setCellId(cellId);
car.setVlp(msgJson.getString("VLP"));
car.setVehicleName(msgJson.getString("vehiclename"));
car.setCertificate(msgJson.getString("certificate"));
car.setColor(msgJson.getString("color"));
car.setCTypeName(msgJson.getString("Ctypename"));
car.setVTypeName(msgJson.getString("Vtypename"));
car.setRegisterTime(msgJson.getDate("registertime"));
car.setStartTime(msgJson.getDate("starttime"));
car.setEndTime(msgJson.getDate("endtime"));
car.setParkName(msgJson.getString("parkname"));
car.setTelephone(msgJson.getString("telephone"));
tenCarService.saveOrUpdate(car);
}
/*
Msg= '{"outtime":"2017-04-19 23:21:45","workstationid":1,
VLP":"粤B12345"," username ":"test","method":"","Ctypename":"临时车","channeltype":0,
"operator":"管理员","inpicture1":"","direction":0,"password":"d41d8cd98f00b204e9800998ecf8427e",
"parkid":1,"inVLP":"","remainspace":100,"outchannel":2,"Vtypename":"小型车","cardsn":"116021386901",
"inchannelname":"停车场入口","outchannelname":"停车场入口","Vtype":1,"receivablefee":"5.00","command":1,
"outpicture":"","inchannel":1,"totalspace":100,"intime":"2017-04-19 23:21:45","mode":0,"code":1,
"recordid":70,"Ctype":3,"inpicture":"","actualfee":"5.00","consumefee":"0.00",
"consumetime":"2017-04-19 23:21:45","consumecode":"0","consumename":""} '
*/
else if (cmd == 1 || cmd == 2) { //识别记录
TenPackRecordEntity record = new TenPackRecordEntity();
}
record.setParkId(msgJson.getString("parkid"));
record.setRecordId(msgJson.getString("recordid"));
record.setCellId(cellId);
record.setVlp(msgJson.getString("VLP"));
record.setCTypeName(msgJson.getString("Ctypename"));
record.setVTypeName(msgJson.getString("Vtypename"));
record.setOperator(msgJson.getString("operator"));
record.setDirection(msgJson.getInteger("direction"));
if (cmd ==1) {
record.setInChannelName(msgJson.getString("inchannelname"));
record.setInTime(msgJson.getDate("intime"));
record.setInPicture(msgJson.getString("inpicture"));
record.setInPictureBase64(msgJson.getString("inpicturedata"));
record.setInPicturePlate(msgJson.getString("inpicture1"));
record.setInPicturePlateBase64(msgJson.getString("inpicturedata1"));
}
record.setOutChannelName(msgJson.getString("outchannelname"));
record.setOutTime(msgJson.getDate("outtime"));
record.setOutPicture(msgJson.getString("outpicture"));
record.setOutPictureBase64(msgJson.getString("outpicturedata"));
record.setOutPicturePlate(msgJson.getString("outpicture1"));
record.setOutPicturePlateBase64(msgJson.getString("outpicturedata1"));
record.setInVlp(msgJson.getString("inVLP"));
record.setParkName(msgJson.getString("parkname"));
record.setReceivableFee(msgJson.getString("receivablefee"));
record.setActualFee(msgJson.getString("actualfee"));
tenPackRecordService.saveOrUpdateByRecordId(record);
}
return R.ok();
}

View File

@ -315,6 +315,8 @@ public class DeviceController {
@ApiImplicitParam(name="recordFaceStr",value = "识别照片base64",paramType = "query",dataType = "String",required = true),
})
public R upRecord(@RequestBody TenRecordEntity record){
//log.error("识别记录:"+record.getDeviceSn()+"-"+record.getMemberId()+"-"+record.getRecordTime());
TenDeviceEntity dev = tenDeviceService.findBySn(record.getDeviceSn());
if (dev==null) {
return R.error("设备未绑定");

View File

@ -73,45 +73,45 @@ public class TenPackRecordController extends AbstractController {
/**
* 信息
*/
@GetMapping("/info/{recordId}/{cellId}")
@RequiresPermissions("ten:packrecord")
// @ApiOperation(value = "查询单个记录")
public R info(@PathVariable("recordId") Long recordId,@PathVariable("cellId") Long cellId){
TenPackRecordEntity tenPackRecord = tenPackRecordService.getById(recordId,cellId);
return R.ok().put("data", tenPackRecord);
}
// @GetMapping("/info/{recordId}/{cellId}")
// @RequiresPermissions("ten:packrecord")
//// @ApiOperation(value = "查询单个记录")
// public R info(@PathVariable("recordId") Long recordId,@PathVariable("cellId") Long cellId){
// TenPackRecordEntity tenPackRecord = tenPackRecordService.getById(recordId,cellId);
//
// return R.ok().put("data", tenPackRecord);
// }
/**
* 保存
*/
@PostMapping("/save")
@RequiresPermissions("ten:packrecord")
public R save(@RequestBody TenPackRecordEntity tenPackRecord){
tenPackRecordService.save(tenPackRecord);
return R.ok();
}
// @PostMapping("/save")
// @RequiresPermissions("ten:packrecord")
// public R save(@RequestBody TenPackRecordEntity tenPackRecord){
// tenPackRecordService.save(tenPackRecord);
//
// return R.ok();
// }
/**
* 修改
*/
@PostMapping("/update")
@RequiresPermissions("ten:packrecord")
public R update(@RequestBody TenPackRecordEntity tenPackRecord){
tenPackRecordService.updateById(tenPackRecord);
return R.ok();
}
// @PostMapping("/update")
// @RequiresPermissions("ten:packrecord")
// public R update(@RequestBody TenPackRecordEntity tenPackRecord){
// tenPackRecordService.updateById(tenPackRecord);
//
// return R.ok();
// }
/**
* 删除
*/
@PostMapping("/delete")
@RequiresPermissions("ten:packrecord")
public R delete(@RequestBody Long[] recordIds){
// tenPackRecordService.removeByIds(Arrays.asList(recordIds));
return R.ok();
}
// @PostMapping("/delete")
// @RequiresPermissions("ten:packrecord")
// public R delete(@RequestBody Long[] recordIds){
//// tenPackRecordService.removeByIds(Arrays.asList(recordIds));
// return R.ok();
// }
}

View File

@ -22,6 +22,7 @@ public interface TenCarDao {
// int logicDeleteById(@Param("carId")Long roomId,@Param("cellId")Long cellId);
int updateById(TenCarEntity entity);
TenCarEntity selectById(@Param("carId")Long id, @Param("cellId")Long cellId);
TenCarEntity selectByVlp(@Param("vlp")String vlp, @Param("cellId")Long cellId);
IPage<TenCarEntity> findPageAll(Page page, @Param("cellIds") List<Long> cellIds, @Param("params") Map params);
}

View File

@ -18,10 +18,10 @@ import java.util.Map;
public interface TenPackRecordDao {
int insert(TenPackRecordEntity tenPackRecordEntity);
int deleteById(@Param("recordId")Long id, @Param("cellId")Long cellId);
// int logicDeleteById(@Param("carId")Long roomId,@Param("cellId")Long cellId);
// int deleteById(@Param("recordId")Long id, @Param("cellId")Long cellId);
// int logicDeleteById(@Param("carId")Long roomId,@Param("cellId")Long cellId);
int updateById(TenPackRecordEntity entity);
TenPackRecordEntity selectById(@Param("recordId")Long id, @Param("cellId")Long cellId);
TenPackRecordEntity selectByRecordIdAndPackId(@Param("recordId")String recordId, @Param("parkId")String parkId,@Param("cellId")Long cellId);
IPage<TenPackRecordEntity> findPageAll(Page page, @Param("cellIds") List<Long> cellIds, @Param("params") Map params);
}

View File

@ -7,10 +7,103 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
//
///**
// * 车辆表
// *
// */
//@Data
////@TableName("ten_car")
//public class TenCarEntity implements Serializable {
// private static final long serialVersionUID = 1L;
//
// /**
// * id
// */
// @TableId
// @ApiModelProperty("ID")
// private Long carId;
// /**
// * 车牌号
// */
// @ApiModelProperty("车牌号")
// private String plate;
// /**
// * 关联人员
// */
// @ApiModelProperty("住户ID")
// @JsonSerialize(using = ToStringSerializer.class)
// private Long personId;
// /**
// * 联系电话
// */
// @ApiModelProperty("联系电话")
// private String linkMobile;
// /**
// * 品牌
// */
// @ApiModelProperty("品牌")
// private String brand;
// /**
// * 子品牌
// */
// @ApiModelProperty("子品牌")
// private String brandSub;
// /**
// * 停车类型1月租车2临时车
// */
// @ApiModelProperty("停车类型1月租车2临时车")
// private Integer parkType;
// /**
// * 备注
// */
// @ApiModelProperty("备注")
// private String remark;
// /**
// * 2蓝牌88新能源
// */
// @ApiModelProperty("2蓝牌88新能源")
// private Integer plateType;
// /**
// * 1蓝2白3黑4黄5其他6绿7绿黄
// */
// @ApiModelProperty("1蓝2白3黑4黄5其他6绿7绿黄")
// private Integer plateColor;
// /**
// * 5小型汽车7普通二轮摩托车9其他
// */
// @ApiModelProperty("5小型汽车7普通二轮摩托车9其他")
// private Integer carType;
// /**
// * 1白2灰3黄10黑
// */
// @ApiModelProperty("1白2灰3黄10黑")
// private Integer carColor;
// /**
// * 图片
// */
// @ApiModelProperty("图片")
// private String picture;
// /**
// * 小区id
// */
// @JsonSerialize(using = ToStringSerializer.class)
// @ApiModelProperty("小区id")
// private Long cellId;
//
// @TableField(exist=false)
// @ApiModelProperty("住户")
// private TenPersonEntity person;
//
//}
//
//
//
/**
* 车辆表
@ -31,63 +124,75 @@ public class TenCarEntity implements Serializable {
* 车牌号
*/
@ApiModelProperty("车牌号")
private String plate;
/**
* 关联人员
*/
@ApiModelProperty("住户ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long personId;
/**
* 联系电话
*/
@ApiModelProperty("联系电话")
private String linkMobile;
/**
* 品牌
*/
@ApiModelProperty("品牌")
private String brand;
/**
* 子品牌
*/
@ApiModelProperty("子品牌")
private String brandSub;
/**
* 停车类型1月租车2临时车
*/
@ApiModelProperty("停车类型1月租车2临时车")
private Integer parkType;
/**
* 备注
*/
@ApiModelProperty("备注")
private String remark;
/**
* 2蓝牌88新能源
*/
@ApiModelProperty("2蓝牌88新能源")
private Integer plateType;
/**
* 1蓝2白3黑4黄5其他6绿7绿黄
*/
@ApiModelProperty("1蓝2白3黑4黄5其他6绿7绿黄")
private Integer plateColor;
/**
* 5小型汽车7普通二轮摩托车9其他
*/
@ApiModelProperty("5小型汽车7普通二轮摩托车9其他")
private Integer carType;
/**
* 1白2灰3黄10黑
*/
@ApiModelProperty("1白2灰3黄10黑")
private Integer carColor;
private String vlp;
/**
* 图片
*/
@ApiModelProperty("图片")
private String picture;
/**
* 车辆类别
*/
@ApiModelProperty("车辆类别")
private String cTypeName;
/**
* 车辆类型
*/
@ApiModelProperty("车辆类型")
private String vTypeName;
/**
* 车主姓名
*/
@ApiModelProperty("车主姓名")
private String vehicleName;
/**
* 车主证件号
*/
@ApiModelProperty("车主证件号")
private String certificate;
/**
* 车主电话
*/
@ApiModelProperty("车主电话")
private String telephone;
/**
* 注册时间
*/
@ApiModelProperty("注册时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registerTime;
/**
* 注销时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("注销时间")
private Date refundTime;
/**
* 车辆颜色
*/
@ApiModelProperty("车辆颜色")
private String color;
/**
* 停车场名称
*/
@ApiModelProperty("停车场名称")
private String parkName;
/**
* 开始时间
*/
@ApiModelProperty("开始时间")
private Date startTime;
/**
* 结束时间
*/
@ApiModelProperty("结束时间")
private Date endTime;
/**
* 关联人员
*/
@ApiModelProperty("关联人员")
@JsonSerialize(using = ToStringSerializer.class)
private Long personId;
/**
* 小区id
*/
@ -99,4 +204,9 @@ public class TenCarEntity implements Serializable {
@ApiModelProperty("住户")
private TenPersonEntity person;
@ApiModelProperty("小区名称")
private String cellName;
}

View File

@ -1,16 +1,115 @@
package net.shapelight.modules.ten.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
///**
// * 停车记录表
// *
// */
//@Data
////@TableName("ten_pack_record")
//public class TenPackRecordEntity implements Serializable {
// private static final long serialVersionUID = 1L;
//
// /**
// * id
// */
// @TableId
// @ApiModelProperty("id")
// private Long recordId;
// /**
// * 工作人员id
// */
// @ApiModelProperty("工作人员id")
// private Integer workerId;
// /**
// * 车id
// */
// @ApiModelProperty("车id")
// private Long carId;
// /**
// * 入场车牌号
// */
// @ApiModelProperty("入场车牌号")
// private String inPlate;
// /**
// * 入场时间
// */
// @ApiModelProperty("入场时间")
// private Date inTime;
// /**
// * 入场闸机id
// */
// @ApiModelProperty("入场闸机id")
// private Long inGateId;
// /**
// * 入场照片
// */
// @ApiModelProperty("入场照片")
// private String inPicture;
// /**
// * 出场车牌号
// */
// @ApiModelProperty("出场车牌号")
// private String outPlate;
// /**
// * 出场时间
// */
// @ApiModelProperty("出场时间")
// private Date outTime;
// /**
// * 出场闸机id
// */
// @ApiModelProperty("出场闸机id")
// private Long outGateId;
// /**
// * 出场照片
// */
// @ApiModelProperty("出场照片")
// private String outPicture;
// /**
// * 收费时间
// */
// @ApiModelProperty("收费时间")
// private Date collectionTime;
// /**
// * 应收金额
// */
// @ApiModelProperty("应收金额(分)")
// private Integer receivableAmount;
// /**
// * 实收金额
// */
// @ApiModelProperty("实收金额(分)")
// private Integer collectAmount;
// /**
// * 备注
// */
// @ApiModelProperty("备注")
// private String mark;
// /**
// * 小区id
// */
// @JsonSerialize(using = ToStringSerializer.class)
// @ApiModelProperty("小区id")
// private Long cellId;
/**
* 停车记录表
*
@ -21,86 +120,128 @@ public class TenPackRecordEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
* 记录id
*/
@TableId
@ApiModelProperty("id")
private Long recordId;
@ApiModelProperty("记录id")
private String recordId;
/**
* 工作人员id
* 车厂编号
*/
@ApiModelProperty("工作人员id")
private Integer workerId;
@TableId
@ApiModelProperty("车厂")
private String parkId;
/**
* id
* 牌号
*/
@ApiModelProperty("id")
private Long carId;
@ApiModelProperty("牌号")
private String vlp;
/**
* 入场车牌号
* 车辆类型
*/
@ApiModelProperty("入场车牌号")
private String inPlate;
@ApiModelProperty("车辆类型")
private String vTypeName;
/**
* 入场时间
* 车辆类别
*/
@ApiModelProperty("入场时间")
private Date inTime;
@ApiModelProperty("车辆类别")
private String cTypeName;
/**
* 入场闸机id
* 停车场名称
*/
@ApiModelProperty("入场闸机id")
private Long inGateId;
@ApiModelProperty("停车场名称")
private String parkName;
/**
* 入场照片
* 0-进场1-出场
*/
@ApiModelProperty("入场照片")
@ApiModelProperty("0-进场1-出场")
private Integer direction;
/**
* 进场通道名称
*/
@ApiModelProperty("进场通道名称")
private String inChannelName;
/**
* 进场全景图
*/
@ApiModelProperty("进场全景图")
private String inPicture;
/**
* 出场车牌号
* 进场车牌图
*/
@ApiModelProperty("出场车牌号")
private String outPlate;
@ApiModelProperty("进场车牌图")
private String inPicturePlate;
/**
* 进场时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty("进场时间")
private Date inTime;
/**
* 出场通道名称
*/
@ApiModelProperty("出场通道名称")
private String outChannelName;
/**
* 出场全景图
*/
@ApiModelProperty("出场全景图")
private String outPicture;
/**
* 出场车牌图
*/
@ApiModelProperty("出场车牌图")
private String outPicturePlate;
/**
* 出场时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty("出场时间")
private Date outTime;
/**
* 出场闸机id
* 进场识别错误车牌
*/
@ApiModelProperty("出场闸机id")
private Long outGateId;
@ApiModelProperty("进场识别错误车牌")
private String inVlp;
/**
* 出场照片
* 应收
*/
@ApiModelProperty("出场照片")
private String outPicture;
@ApiModelProperty("应收")
private String receivableFee;
/**
* 收费时间
*
*/
@ApiModelProperty("收费时间")
private Date collectionTime;
@ApiModelProperty("")
private String actualFee;
/**
* 应收金额
* 操作员
*/
@ApiModelProperty("应收金额(分)")
private Integer receivableAmount;
/**
* 实收金额
*/
@ApiModelProperty("实收金额(分)")
private Integer collectAmount;
/**
* 备注
*/
@ApiModelProperty("备注")
private String mark;
@ApiModelProperty("操作员")
private String operator;
/**
* 小区id
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty("小区id")
@JsonSerialize(using = ToStringSerializer.class)
private Long cellId;
@TableField(exist = false)
private String inPictureBase64;
@TableField(exist = false)
private String inPicturePlateBase64;
@TableField(exist = false)
private String outPictureBase64;
@TableField(exist = false)
private String outPicturePlateBase64;
/**
* 小区名称
*/
@ApiModelProperty("小区名称")
private String cellName;
}

View File

@ -24,5 +24,8 @@ public interface TenCarService {
boolean updateById(TenCarEntity entity);
TenCarEntity getById(Long id,Long cellId);
TenCarEntity getByVlp(String vlp,Long cellId);
boolean saveOrUpdate(TenCarEntity entity);
}

View File

@ -16,15 +16,17 @@ public interface TenPackRecordService {
PageUtils queryPage(Map<String, Object> params);
boolean save(TenPackRecordEntity entity);
// boolean save(TenPackRecordEntity entity);
boolean removeById(Long roomId,Long cellId);
// boolean removeById(Long roomId,Long cellId);
//
// boolean removeByIdList(List<Map<String,String>> idList);
boolean removeByIdList(List<Map<String,String>> idList);
// boolean updateById(TenPackRecordEntity entity);
boolean updateById(TenPackRecordEntity entity);
// TenPackRecordEntity getById(Long id,Long cellId);
TenPackRecordEntity getById(Long id,Long cellId);
boolean saveOrUpdateByRecordId(TenPackRecordEntity entity);
}

View File

@ -76,6 +76,11 @@ public class TenCarServiceImpl implements TenCarService {
return tenCarDao.selectById(id,cellId);
}
@Override
public TenCarEntity getByVlp(String vlp, Long cellId) {
return tenCarDao.selectByVlp(vlp,cellId);
}
@Override
public PageUtils queryPage(Map<String, Object> params) {
List<Long> cellIds = new ArrayList<>();
@ -98,15 +103,26 @@ public class TenCarServiceImpl implements TenCarService {
pageParam.setSize(Long.parseLong((String)params.get("limit")));
// IPage<TenBuildEntity> page = tenBuildDao.findPageAll(pageParam,cellId);
IPage<TenCarEntity> page = tenCarDao.findPageAll(pageParam,cellIds,params);
// for(TenCarEntity car: page.getRecords()){
for(TenCarEntity car: page.getRecords()){
// if(car.getPersonId()!=null){
// TenPersonEntity person = tenPersonService.getById(car.getPersonId(),car.getCellId());
// car.setPerson(person);
// }
// }
car.setCellName(tenCellService.getCellName(car.getCellId().toString()));
}
return new PageUtils(page);
}
@Override
public boolean saveOrUpdate(TenCarEntity entity) {
TenCarEntity car = getByVlp(entity.getVlp(),entity.getCellId());
if (car ==null) {
this.save(entity);
}else{
entity.setCarId(car.getCarId());
this.updateById(entity);
}
return true;
}
}

View File

@ -1,24 +1,32 @@
package net.shapelight.modules.ten.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.minio.MinioClient;
import io.minio.PutObjectOptions;
import net.shapelight.common.config.GlobalValue;
import net.shapelight.common.config.MinioConfig;
import net.shapelight.common.utils.*;
import net.shapelight.modules.ten.entity.TenCellEntity;
import net.shapelight.modules.ten.service.TenCellService;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.shapelight.common.utils.PageUtils;
import net.shapelight.common.utils.Query;
import net.shapelight.modules.ten.dao.TenPackRecordDao;
import net.shapelight.modules.ten.entity.TenPackRecordEntity;
import net.shapelight.modules.ten.service.TenPackRecordService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Base64Utils;
@Service("tenPackRecordService")
@ -29,51 +37,153 @@ public class TenPackRecordServiceImpl implements TenPackRecordService {
private TenPackRecordDao tenPackRecordDao;
@Autowired
private TenCellService tenCellService;
@Autowired
private GlobalValue globalValue;
@Autowired
private MinioClient minioClient;
@Autowired
private MinioConfig minioConfig;
// @Override
// public boolean save(TenPackRecordEntity entity) {
// int flag = tenPackRecordDao.insert(entity);
// if(flag==1){
// return true;
// }
// return false;
// }
// @Override
// public boolean removeById(Long carId, Long cellId) {
// int flag = tenPackRecordDao.deleteById(carId, cellId);
// if(flag==1){
// return true;
// }
// return false;
// }
// @Override
// @Transactional(rollbackFor = Exception.class)
// public boolean removeByIdList(List<Map<String,String>> roomIdList) {
// for(Map<String,String> param: roomIdList){
// Long roomId = Long.parseLong(param.get("carId"));
// Long cellId = Long.parseLong(param.get("cellId"));
// tenPackRecordDao.deleteById(roomId, cellId);
// }
// return true;
// }
// @Override
// public boolean updateById(TenPackRecordEntity entity) {
// int flag = tenPackRecordDao.updateById(entity);
// if(flag==1){
// return true;
// }
// return false;
// }
// @Override
// public TenPackRecordEntity getById(Long id, Long cellId) {
// return tenPackRecordDao.selectById(id,cellId);
// }
@Override
public boolean save(TenPackRecordEntity entity) {
int flag = tenPackRecordDao.insert(entity);
if(flag==1){
return true;
public boolean saveOrUpdateByRecordId(TenPackRecordEntity vo) {
// String recordId = vo.getRecordId();
// String parkId = vo.getParkId();
//1. 进场全景图片
if(vo.getInPictureBase64()!=null && !vo.getInPictureBase64().isEmpty()){
String inPictureName = globalValue.getImagesDir() + "/" +
vo.getCellId().toString() + "/car/" + DateUtils.format(new Date(),DateUtils.DATE_PATTERN)+"/"+
vo.getInPicture();
try {
InputStream inputStream = new ByteArrayInputStream(Base64Utils.decodeFromString(vo.getInPictureBase64()));
PutObjectOptions putObjectOptions = new PutObjectOptions(inputStream.available(), -1);
putObjectOptions.setContentType("image/jpeg");
minioClient.putObject(
minioConfig.getBucketName(), inPictureName, inputStream, putObjectOptions);
inputStream.close();
vo.setInPicture(inPictureName);
} catch (Exception e) {
e.printStackTrace();
}
}
//2. 进场车牌图片
if(vo.getInPicturePlateBase64()!=null && !vo.getInPicturePlateBase64().isEmpty()){
String inPicturePlateName = globalValue.getImagesDir() + "/" +
vo.getCellId().toString() + "/car/" + DateUtils.format(new Date(),DateUtils.DATE_PATTERN)+"/"+
vo.getInPicturePlate();
try {
InputStream inputStream = new ByteArrayInputStream(Base64Utils.decodeFromString(vo.getInPicturePlateBase64()));
PutObjectOptions putObjectOptions = new PutObjectOptions(inputStream.available(), -1);
putObjectOptions.setContentType("image/jpeg");
minioClient.putObject(
minioConfig.getBucketName(), inPicturePlateName, inputStream, putObjectOptions);
inputStream.close();
vo.setInPicturePlate(inPicturePlateName);
} catch (Exception e) {
e.printStackTrace();
}
}
//3. 出场全景图片
if(vo.getOutPictureBase64()!=null && !vo.getOutPictureBase64().isEmpty()){
String outPictureName = globalValue.getImagesDir() + "/" +
vo.getCellId().toString() + "/car/" + DateUtils.format(new Date(),DateUtils.DATE_PATTERN)+"/"+
vo.getOutPicture();
try {
InputStream inputStream = new ByteArrayInputStream(Base64Utils.decodeFromString(vo.getOutPictureBase64()));
PutObjectOptions putObjectOptions = new PutObjectOptions(inputStream.available(), -1);
putObjectOptions.setContentType("image/jpeg");
minioClient.putObject(
minioConfig.getBucketName(), outPictureName, inputStream, putObjectOptions);
inputStream.close();
vo.setOutPicture(outPictureName);
} catch (Exception e) {
e.printStackTrace();
}
}
//4. 出场车牌图片
if(vo.getOutPicturePlateBase64()!=null && !vo.getOutPicturePlateBase64().isEmpty()){
String outPicturePlateName = globalValue.getImagesDir() + "/" +
vo.getCellId().toString() + "/car/" + DateUtils.format(new Date(),DateUtils.DATE_PATTERN)+"/"+
vo.getOutPicturePlate();
try {
InputStream inputStream = new ByteArrayInputStream(Base64Utils.decodeFromString(vo.getOutPicturePlateBase64()));
PutObjectOptions putObjectOptions = new PutObjectOptions(inputStream.available(), -1);
putObjectOptions.setContentType("image/jpeg");
minioClient.putObject(
minioConfig.getBucketName(), outPicturePlateName, inputStream, putObjectOptions);
inputStream.close();
vo.setOutPicturePlate(outPicturePlateName);
} catch (Exception e) {
e.printStackTrace();
}
}
TenPackRecordEntity entity = tenPackRecordDao.selectByRecordIdAndPackId(vo.getRecordId(),vo.getParkId(),vo.getCellId());
if(entity == null){
tenPackRecordDao.insert(vo);
}else{
tenPackRecordDao.updateById(vo);
}
return false;
}
@Override
public boolean removeById(Long carId, Long cellId) {
int flag = tenPackRecordDao.deleteById(carId, cellId);
if(flag==1){
return true;
}
return false;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean removeByIdList(List<Map<String,String>> roomIdList) {
for(Map<String,String> param: roomIdList){
Long roomId = Long.parseLong(param.get("carId"));
Long cellId = Long.parseLong(param.get("cellId"));
tenPackRecordDao.deleteById(roomId, cellId);
}
return true;
}
@Override
public boolean updateById(TenPackRecordEntity entity) {
int flag = tenPackRecordDao.updateById(entity);
if(flag==1){
return true;
}
return false;
}
@Override
public TenPackRecordEntity getById(Long id, Long cellId) {
return tenPackRecordDao.selectById(id,cellId);
}
@Override
public PageUtils queryPage(Map<String, Object> params) {
List<Long> cellIds = new ArrayList<>();
@ -96,6 +206,11 @@ public class TenPackRecordServiceImpl implements TenPackRecordService {
pageParam.setSize(Long.parseLong((String)params.get("limit")));
// IPage<TenBuildEntity> page = tenBuildDao.findPageAll(pageParam,cellId);
IPage<TenPackRecordEntity> page = tenPackRecordDao.findPageAll(pageParam,cellIds,params);
for(TenPackRecordEntity tenPackRecordEntity: page.getRecords()){
String cellName = tenCellService.getCellName(tenPackRecordEntity.getCellId().toString());
tenPackRecordEntity.setCellName(cellName);
}
return new PageUtils(page);
}

View File

@ -779,6 +779,9 @@ public class TenPersonServiceImpl implements TenPersonService {
@Override
@CacheEvict(value = "TenPerson", key = "#entity.personId+'-'+#entity.cellId")
public String updateById(TenPersonEntity entity) {
if(entity.getUsername()!=null && entity.getUsername().isEmpty()){
entity.setUsername(null);
}
TenPersonEntity oldPerson = tenPersonDao.selectById(entity.getPersonId(), entity.getCellId());
@ -967,15 +970,15 @@ public class TenPersonServiceImpl implements TenPersonService {
//现在也支持app登录
if (entity.getAppFlag() == Constant.APP_LOGIN_YES) {
//修改的跟原来的不一样需要重新验证用户名是否注册
if (!entity.getUsername().equals(oldPerson.getUsername())) {
//1.验证用户名
AppUserEntity appUser = appUserService.findByUsername(entity.getUsername());
if (appUser != null) {
return "用户名已经注册";
}
} else {
//修改app
}
// if (!entity.getUsername().equals(oldPerson.getUsername())) {
// //1.验证用户名
// AppUserEntity appUser = appUserService.findByUsername(entity.getUsername());
// if (appUser != null) {
// return "用户名已经注册";
// }
// } else {
// //修改app
// }
//修改的跟原来的不一样需要重新验证新的手机号是否注册
if (!entity.getMobile().equals(oldPerson.getMobile())) {
//2.验证手机号

View File

@ -8,6 +8,8 @@ server:
port: 8018
servlet:
context-path: /cell
http:
port: 8019
# ssl:
# key-store: classpath:4145009_c.shapelight.net.pfx
# key-store-password: 8n8bU823

View File

@ -6,18 +6,20 @@
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="net.shapelight.modules.ten.entity.TenCarEntity" id="tenCarMap">
<result property="carId" column="car_id"/>
<result property="plate" column="plate"/>
<result property="personId" column="person_id"/>
<result property="linkMobile" column="link_mobile"/>
<result property="brand" column="brand"/>
<result property="brandSub" column="brand_sub"/>
<result property="parkType" column="park_type"/>
<result property="remark" column="remark"/>
<result property="plateType" column="plate_type"/>
<result property="plateColor" column="plate_color"/>
<result property="carType" column="car_type"/>
<result property="carColor" column="car_color"/>
<result property="vlp" column="vlp"/>
<result property="picture" column="picture"/>
<result property="cTypeName" column="c_type_name"/>
<result property="vTypeName" column="v_type_name"/>
<result property="vehicleName" column="vehicle_name"/>
<result property="certificate" column="certificate"/>
<result property="telephone" column="telephone"/>
<result property="registerTime" column="register_time"/>
<result property="refundTime" column="refund_time"/>
<result property="color" column="color"/>
<result property="parkName" column="park_name"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="personId" column="person_id"/>
<result property="cellId" column="cell_id"/>
</resultMap>
@ -29,42 +31,48 @@
<if test="carId != null">
car_id,
</if>
<if test="plate != null">
plate,
</if>
<if test="personId != null">
person_id,
</if>
<if test="linkMobile != null">
link_mobile,
</if>
<if test="brand != null">
brand,
</if>
<if test="brandSub != null">
brand_sub,
</if>
<if test="parkType != null">
park_type,
</if>
<if test="remark != null">
remark,
</if>
<if test="plateType != null">
plate_type,
</if>
<if test="plateColor != null">
plate_color,
</if>
<if test="carType != null">
car_type,
</if>
<if test="carColor != null">
car_color,
<if test="vlp != null">
vlp,
</if>
<if test="picture != null">
picture,
</if>
<if test="cTypeName != null">
c_type_name,
</if>
<if test="vTypeName != null">
v_type_name,
</if>
<if test="vehicleName != null">
vehicle_name,
</if>
<if test="certificate != null">
certificate,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="registerTime != null">
register_time,
</if>
<if test="refundTime != null">
refund_time,
</if>
<if test="color != null">
color,
</if>
<if test="parkName != null">
park_name,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="personId != null">
person_id,
</if>
<if test="cellId != null">
cell_id,
</if>
@ -73,42 +81,48 @@
<if test="carId != null">
#{carId,jdbcType=BIGINT},
</if>
<if test="plate != null">
#{plate,jdbcType=VARCHAR},
</if>
<if test="personId != null">
#{personId,jdbcType=BIGINT},
</if>
<if test="linkMobile != null">
#{linkMobile,jdbcType=VARCHAR},
</if>
<if test="brand != null">
#{brand,jdbcType=VARCHAR},
</if>
<if test="brandSub != null">
#{brandSub,jdbcType=VARCHAR},
</if>
<if test="parkType != null">
#{parkType,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="plateType != null">
#{plateType,jdbcType=TINYINT},
</if>
<if test="plateColor != null">
#{plateColor,jdbcType=TINYINT},
</if>
<if test="carType != null">
#{carType,jdbcType=TINYINT},
</if>
<if test="carColor != null">
#{carColor,jdbcType=TINYINT},
<if test="vlp != null">
#{vlp,jdbcType=VARCHAR},
</if>
<if test="picture != null">
#{picture,jdbcType=VARCHAR},
</if>
<if test="cTypeName != null">
#{cTypeName,jdbcType=VARCHAR},
</if>
<if test="vTypeName != null">
#{vTypeName,jdbcType=VARCHAR},
</if>
<if test="vehicleName != null">
#{vehicleName,jdbcType=VARCHAR},
</if>
<if test="certificate != null">
#{certificate,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="registerTime != null">
#{registerTime,jdbcType=TIMESTAMP},
</if>
<if test="refundTime != null">
#{refundTime,jdbcType=TIMESTAMP},
</if>
<if test="color != null">
#{color,jdbcType=VARCHAR},
</if>
<if test="parkName != null">
#{parkName,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="personId != null">
#{personId,jdbcType=BIGINT},
</if>
<if test="cellId != null">
#{cellId,jdbcType=BIGINT},
</if>
@ -126,42 +140,48 @@
<if test="carId != null">
car_id = #{carId,jdbcType=BIGINT},
</if>
<if test="plate != null">
plate = #{plate,jdbcType=VARCHAR},
</if>
<if test="personId != null">
person_id = #{personId,jdbcType=BIGINT},
</if>
<if test="linkMobile != null">
link_mobile = #{linkMobile,jdbcType=VARCHAR},
</if>
<if test="brand != null">
brand = #{brand,jdbcType=VARCHAR},
</if>
<if test="brandSub != null">
brand_sub = #{brandSub,jdbcType=VARCHAR},
</if>
<if test="parkType != null">
park_type = #{parkType,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="plateType != null">
plate_type = #{plateType,jdbcType=TINYINT},
</if>
<if test="plateColor != null">
plate_color = #{plateColor,jdbcType=TINYINT},
</if>
<if test="carType != null">
car_type = #{carType,jdbcType=TINYINT},
</if>
<if test="carColor != null">
car_color = #{carColor,jdbcType=TINYINT},
<if test="vlp != null">
vlp = #{vlp,jdbcType=VARCHAR},
</if>
<if test="picture != null">
picture = #{picture,jdbcType=VARCHAR},
</if>
<if test="cTypeName != null">
c_type_name = #{cTypeName,jdbcType=VARCHAR},
</if>
<if test="vTypeName != null">
v_type_name = #{vTypeName,jdbcType=VARCHAR},
</if>
<if test="vehicleName != null">
vehicle_name = #{vehicleName,jdbcType=VARCHAR},
</if>
<if test="certificate != null">
certificate = #{certificate,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="registerTime != null">
register_time = #{registerTime,jdbcType=TIMESTAMP},
</if>
<if test="refundTime != null">
refund_time = #{refundTime,jdbcType=TIMESTAMP},
</if>
<if test="color != null">
color = #{color,jdbcType=VARCHAR},
</if>
<if test="parkName != null">
park_name = #{parkName,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="personId != null">
person_id = #{personId,jdbcType=BIGINT},
</if>
<if test="cellId != null">
cell_id = #{cellId,jdbcType=BIGINT},
</if>
@ -174,6 +194,11 @@
where car_id = #{carId,jdbcType=BIGINT}
</select>
<select id="selectByVlp" resultMap="tenCarMap">
select * from ten_car_${cellId}
where vlp = #{vlp}
</select>
<select id="findPageAll" resultMap="tenCarMap">
SELECT alias.* from (
<foreach collection="cellIds" item="item" index="index" separator="union all">
@ -181,8 +206,9 @@
</foreach>
) alias where 1 = 1
<if test="params.plate != null and params.plate!=''">
and plate like CONCAT('%', '${params.plate}', '%')
and vlp like CONCAT('%', '${params.plate}', '%')
</if>
order by alias.register_time desc
</select>

View File

@ -6,20 +6,24 @@
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="net.shapelight.modules.ten.entity.TenPackRecordEntity" id="tenPackRecordMap">
<result property="recordId" column="record_id"/>
<result property="workerId" column="worker_id"/>
<result property="carId" column="car_id"/>
<result property="inPlate" column="in_plate"/>
<result property="inTime" column="in_time"/>
<result property="inGateId" column="in_gate_id"/>
<result property="parkId" column="park_id"/>
<result property="vlp" column="vlp"/>
<result property="vTypeName" column="v_type_name"/>
<result property="cTypeName" column="c_type_name"/>
<result property="parkName" column="park_name"/>
<result property="direction" column="direction"/>
<result property="inChannelName" column="in_channel_name"/>
<result property="inPicture" column="in_picture"/>
<result property="outPlate" column="out_plate"/>
<result property="outTime" column="out_time"/>
<result property="outGateId" column="out_gate_id"/>
<result property="inPicturePlate" column="in_picture_plate"/>
<result property="inTime" column="in_time"/>
<result property="outChannelName" column="out_channel_name"/>
<result property="outPicture" column="out_picture"/>
<result property="collectionTime" column="collection_time"/>
<result property="receivableAmount" column="receivable_amount"/>
<result property="collectAmount" column="collect_amount"/>
<result property="mark" column="mark"/>
<result property="outPicturePlate" column="out_picture_plate"/>
<result property="outTime" column="out_time"/>
<result property="inVlp" column="in_vlp"/>
<result property="receivableFee" column="receivable_fee"/>
<result property="actualFee" column="actual_fee"/>
<result property="operator" column="operator"/>
<result property="cellId" column="cell_id"/>
</resultMap>
@ -31,47 +35,59 @@
<if test="recordId != null">
record_id,
</if>
<if test="workerId != null">
worker_id,
<if test="parkId != null">
park_id,
</if>
<if test="carId != null">
car_id,
<if test="vlp != null">
vlp,
</if>
<if test="inPlate != null">
in_plate,
<if test="vTypeName != null">
v_type_name,
</if>
<if test="inTime != null">
in_time,
<if test="cTypeName != null">
c_type_name,
</if>
<if test="inGateId != null">
in_gate_id,
<if test="parkName != null">
park_name,
</if>
<if test="direction != null">
direction,
</if>
<if test="inChannelName != null">
in_channel_name,
</if>
<if test="inPicture != null">
in_picture,
</if>
<if test="outPlate != null">
out_plate,
<if test="inPicturePlate != null">
in_picture_plate,
</if>
<if test="outTime != null">
out_time,
<if test="inTime != null">
in_time,
</if>
<if test="outGateId != null">
out_gate_id,
<if test="outChannelName != null">
out_channel_name,
</if>
<if test="outPicture != null">
out_picture,
</if>
<if test="collectionTime != null">
collection_time,
<if test="outPicturePlate != null">
out_picture_plate,
</if>
<if test="receivableAmount != null">
receivable_amount,
<if test="outTime != null">
out_time,
</if>
<if test="collectAmount != null">
collect_amount,
<if test="inVlp != null">
in_vlp,
</if>
<if test="mark != null">
mark,
<if test="receivableFee != null">
receivable_fee,
</if>
<if test="actualFee != null">
actual_fee,
</if>
<if test="operator != null">
operator,
</if>
<if test="cellId != null">
cell_id,
@ -79,49 +95,61 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">
#{recordId,jdbcType=BIGINT},
#{recordId,jdbcType=VARCHAR},
</if>
<if test="workerId != null">
#{workerId,jdbcType=INTEGER},
<if test="parkId != null">
#{parkId,jdbcType=VARCHAR},
</if>
<if test="carId != null">
#{carId,jdbcType=BIGINT},
<if test="vlp != null">
#{vlp,jdbcType=VARCHAR},
</if>
<if test="inPlate != null">
#{inPlate,jdbcType=VARCHAR},
<if test="vTypeName != null">
#{vTypeName,jdbcType=VARCHAR},
</if>
<if test="inTime != null">
#{inTime,jdbcType=TIMESTAMP},
<if test="cTypeName != null">
#{cTypeName,jdbcType=VARCHAR},
</if>
<if test="inGateId != null">
#{inGateId,jdbcType=BIGINT},
<if test="parkName != null">
#{parkName,jdbcType=VARCHAR},
</if>
<if test="direction != null">
#{direction,jdbcType=VARCHAR},
</if>
<if test="inChannelName != null">
#{inChannelName,jdbcType=VARCHAR},
</if>
<if test="inPicture != null">
#{inPicture,jdbcType=VARCHAR},
</if>
<if test="outPlate != null">
#{outPlate,jdbcType=VARCHAR},
<if test="inPicturePlate != null">
#{inPicturePlate,jdbcType=VARCHAR},
</if>
<if test="outTime != null">
#{outTime,jdbcType=TIMESTAMP},
<if test="inTime != null">
#{inTime,jdbcType=TIMESTAMP},
</if>
<if test="outGateId != null">
#{outGateId,jdbcType=BIGINT},
<if test="outChannelName != null">
#{outChannelName,jdbcType=VARCHAR},
</if>
<if test="outPicture != null">
#{outPicture,jdbcType=VARCHAR},
</if>
<if test="collectionTime != null">
#{collectionTime,jdbcType=TIMESTAMP},
<if test="outPicturePlate != null">
#{outPicturePlate,jdbcType=VARCHAR},
</if>
<if test="receivableAmount != null">
#{receivableAmount,jdbcType=INTEGER},
<if test="outTime != null">
#{outTime,jdbcType=TIMESTAMP},
</if>
<if test="collectAmount != null">
#{collectAmount,jdbcType=INTEGER},
<if test="inVlp != null">
#{inVlp,jdbcType=VARCHAR},
</if>
<if test="mark != null">
#{mark,jdbcType=VARCHAR},
<if test="receivableFee != null">
#{receivableFee,jdbcType=VARCHAR},
</if>
<if test="actualFee != null">
#{actualFee,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,jdbcType=VARCHAR},
</if>
<if test="cellId != null">
#{cellId,jdbcType=BIGINT},
@ -129,69 +157,81 @@
</trim>
</insert>
<delete id="deleteById" parameterType="java.lang.Long">
delete from ten_pack_record_${cellId}
where record_id = #{recordId,jdbcType=BIGINT}
</delete>
<!--<delete id="deleteById" parameterType="java.lang.Long">-->
<!--delete from ten_pack_record_${cellId}-->
<!--where record_id = #{recordId,jdbcType=VARCHAR}-->
<!--</delete>-->
<update id="updateById" parameterType="net.shapelight.modules.ten.entity.TenPackRecordEntity">
update ten_pack_record_${cellId}
<set>
<if test="recordId != null">
record_id = #{recordId,jdbcType=BIGINT},
record_id = #{recordId,jdbcType=VARCHAR},
</if>
<if test="workerId != null">
worker_id = #{workerId,jdbcType=INTEGER},
<if test="parkId != null">
park_id = #{parkId,jdbcType=VARCHAR},
</if>
<if test="carId != null">
car_id = #{carId,jdbcType=BIGINT},
<if test="vlp != null">
vlp = #{vlp,jdbcType=VARCHAR},
</if>
<if test="inPlate != null">
in_plate = #{inPlate,jdbcType=VARCHAR},
<if test="vTypeName != null">
v_type_name = #{vTypeName,jdbcType=VARCHAR},
</if>
<if test="inTime != null">
in_time = #{inTime,jdbcType=TIMESTAMP},
<if test="cTypeName != null">
c_type_name = #{cTypeName,jdbcType=VARCHAR},
</if>
<if test="inGateId != null">
in_gate_id = #{inGateId,jdbcType=BIGINT},
<if test="parkName != null">
park_name = #{parkName,jdbcType=VARCHAR},
</if>
<if test="direction != null">
direction = #{direction,jdbcType=VARCHAR},
</if>
<if test="inChannelName != null">
in_channel_name = #{inChannelName,jdbcType=VARCHAR},
</if>
<if test="inPicture != null">
in_picture = #{inPicture,jdbcType=VARCHAR},
</if>
<if test="outPlate != null">
out_plate = #{outPlate,jdbcType=VARCHAR},
<if test="inPicturePlate != null">
in_picture_plate = #{inPicturePlate,jdbcType=VARCHAR},
</if>
<if test="outTime != null">
out_time = #{outTime,jdbcType=TIMESTAMP},
<if test="inTime != null">
in_time = #{inTime,jdbcType=TIMESTAMP},
</if>
<if test="outGateId != null">
out_gate_id = #{outGateId,jdbcType=BIGINT},
<if test="outChannelName != null">
out_channel_name = #{outChannelName,jdbcType=VARCHAR},
</if>
<if test="outPicture != null">
out_picture = #{outPicture,jdbcType=VARCHAR},
</if>
<if test="collectionTime != null">
collection_time = #{collectionTime,jdbcType=TIMESTAMP},
<if test="outPicturePlate != null">
out_picture_plate = #{outPicturePlate,jdbcType=VARCHAR},
</if>
<if test="receivableAmount != null">
receivable_amount = #{receivableAmount,jdbcType=INTEGER},
<if test="outTime != null">
out_time = #{outTime,jdbcType=TIMESTAMP},
</if>
<if test="collectAmount != null">
collect_amount = #{collectAmount,jdbcType=INTEGER},
<if test="inVlp != null">
in_vlp = #{inVlp,jdbcType=VARCHAR},
</if>
<if test="mark != null">
mark = #{mark,jdbcType=VARCHAR},
<if test="receivableFee != null">
receivable_fee = #{receivableFee,jdbcType=VARCHAR},
</if>
<if test="actualFee != null">
actual_fee = #{actualFee,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=VARCHAR},
</if>
<if test="cellId != null">
cell_id = #{cellId,jdbcType=BIGINT},
</if>
</set>
where record_id = #{recordId,jdbcType=BIGINT}
where record_id = #{recordId,jdbcType=VARCHAR}
</update>
<select id="selectById" parameterType="java.lang.Long" resultMap="tenPackRecordMap">
<select id="selectByRecordIdAndPackId" resultMap="tenPackRecordMap">
select * from ten_pack_record_${cellId}
where record_id = #{recordId,jdbcType=BIGINT}
where record_id = #{recordId} and park_id = #{parkId}
</select>
<select id="findPageAll" resultMap="tenPackRecordMap">
@ -201,8 +241,9 @@
</foreach>
) alias where 1 = 1
<if test="params.plate != null and params.plate!=''">
and in_plate like CONCAT('%', '${params.plate}', '%')
and vlp like CONCAT('%', '${params.plate}', '%')
</if>
order by alias.in_time desc
</select>

View File

@ -506,7 +506,7 @@
<select id="findByName" resultType="net.shapelight.modules.ten.entity.TenPersonEntity">
select * from ten_person_${cellId}
where room_id = #{roomId} and delete_flag = 0
and name = #{name}
and name = #{name} and (person_type = 5000 or person_type = 5001 or person_type = 5002)
</select>
<select id="selectByCellId" resultMap="BaseResultMap">
@ -644,7 +644,7 @@
and last_update_time > #{lastUpdateTime}
</if>
order by last_update_time asc
limit 50
limit 100
</select>