Commit a29fb7cb by 杨林龙

添加围栏,无在店统计和警情标准接口

1 parent c4f8f7e6
...@@ -33,48 +33,37 @@ public final class Constants { ...@@ -33,48 +33,37 @@ public final class Constants {
* 投保的公司 GL:新人保保单2020 本地处理 * 投保的公司 GL:新人保保单2020 本地处理
*/ */
public final static String INSURANCE_COMPANY_GL = "GL"; public final static String INSURANCE_COMPANY_GL = "GL";
public static String PICC_SUCC = "0";
public final static String[] parsePatterns = new String[]{"yyyy-MM-dd", "yyyy/MM/dd"}; public final static String[] parsePatterns = new String[]{"yyyy-MM-dd", "yyyy/MM/dd"};
// 特约长度 // 特约长度
public final static int SPE_BR_LEN = 166; public final static int SPE_BR_LEN = 166;
/** /**
* 保单的状态 0 等待投保 * 保单的状态 0 等待投保
*/ */
public static final int INSURANCE_WAIT_SEND_STATUS = 0; public static final int INSURANCE_WAIT_SEND_STATUS = 0;
/** /**
* 保单的状态 1 投保成功 * 保单的状态 1 投保成功
*/ */
public static final int INSURANCE_SUCCESS_SEND_STATUS = 1; public static final int INSURANCE_SUCCESS_SEND_STATUS = 1;
/** /**
* 保单的状态 2 投保失败 * 保单的状态 2 投保失败
*/ */
public static final int INSURANCE_FAIL_SEND_STATUS = 2; public static final int INSURANCE_FAIL_SEND_STATUS = 2;
/** /**
* 保单的状态 3 退保 * 保单的状态 3 退保
*/ */
public static final int INSURANCE_CANCEL_SEND_STATUS = 3; public static final int INSURANCE_CANCEL_SEND_STATUS = 3;
/** /**
* 保单的状态 4 草稿 * 保单的状态 4 草稿
*/ */
public static final int INSURANCE_DRAFT_STATUS = 4; public static final int INSURANCE_DRAFT_STATUS = 4;
/** /**
* 保单的状态 5 待激活 * 保单的状态 5 待激活
*/ */
public static final int INSURANCE_WAIT_ACTIVE_STATUS = 5; public static final int INSURANCE_WAIT_ACTIVE_STATUS = 5;
/** /**
* 保单的状态 6 删除 * 保单的状态 6 删除
*/ */
public static final int INSURANCE_DELETE_STATUS = 6; public static final int INSURANCE_DELETE_STATUS = 6;
public static String PICC_SUCC = "0";
} }
package cn.com.glsx.stdinterface.modules.controller; package cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.dto.ChannelRiskDto;
import cn.com.glsx.stdinterface.modules.model.ChannelRiskData;
import cn.com.glsx.stdinterface.modules.service.ChannelRiskService; import cn.com.glsx.stdinterface.modules.service.ChannelRiskService;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* 渠道风险Controller * 渠道风险Controller
*/ */
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping(value = "/channelrisk")
@Api(value = "风控数据", tags = {"风控数据"})
public class ChannelRiskController { public class ChannelRiskController {
private final static String MODULE = "渠道风险";
@Autowired @Autowired
private ChannelRiskService channelRiskService; private ChannelRiskService channelRiskService;
@GetMapping(value = "/selectbyworkstandsn")
@SysLog(module = MODULE, value = "根据车架号和sn查询风控数据", action = OperateType.QUERY)
@ApiOperation(value = "根据车架号和sn查询风控数据")
public R selectByWorkStandSn(@RequestParam(value = "workorderNo") String workorderNo, @RequestParam(value = "vin") String vin, @RequestParam(value = "sn") String sn) {
List<ChannelRiskDto> existDataList = channelRiskService.selectByWorkStandSn(workorderNo, vin, sn);
return R.ok().data(existDataList);
}
@PostMapping(value = "/insertchannelriskdata")
@SysLog(module = MODULE, value = "插入风控数据", action = OperateType.ADD)
@ApiOperation(value = "插入风控数据")
public R insertChannelRiskData(@RequestBody ChannelRiskDto newData) {
ChannelRiskData channelRiskData = new ChannelRiskData();
BeanUtils.copyProperties(newData, channelRiskData);
channelRiskService.insertChannelRiskData(channelRiskData);
return R.ok();
}
@PostMapping(value = "/updatechannelriskdata")
@SysLog(module = MODULE, value = "修改更新风控数据", action = OperateType.EDIT)
@ApiOperation(value = "修改更新风控数据")
public R updateChannelRiskData(@RequestBody ChannelRiskDto newData) {
ChannelRiskData channelRiskData = new ChannelRiskData();
BeanUtils.copyProperties(newData, channelRiskData);
channelRiskService.updateChannelRiskData(channelRiskData);
return R.ok();
}
} }
package cn.com.glsx.stdinterface.modules.controller; package cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.dto.ElectricInStoreDto;
import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive;
import cn.com.glsx.stdinterface.modules.service.ElectricInStoreService; import cn.com.glsx.stdinterface.modules.service.ElectricInStoreService;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* 不在店统计Controller * 不在店统计Controller
*/ */
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping(value = "/electricinstore")
@Api(value = "不在店数据", tags = {"不在店数据"})
public class ElectricInStoreController { public class ElectricInStoreController {
private final static String MODULE = "不在店统计";
@Autowired @Autowired
private ElectricInStoreService electricInStoreService; private ElectricInStoreService electricInStoreService;
@GetMapping(value = "/getelectricinstore")
@SysLog(module = MODULE, value = "查询是否有相同的不在店数据", action = OperateType.QUERY)
@ApiOperation(value = "查询是否有相同的不在店数据")
public R getElectricInStore(@RequestParam Integer fenceId, @RequestParam String sn, @RequestParam String gpsTime) {
List<ElectricInStoreDto> electricInStoreList = electricInStoreService.getElectricInStore(fenceId, sn, gpsTime);
return R.ok().data(electricInStoreList);
}
@PostMapping(value = "/insertelectricinstore")
@SysLog(module = MODULE, value = "插入不在店的数据", action = OperateType.ADD)
@ApiOperation(value = "插入不在店的数据")
public R insertElectricInStore(@RequestBody ElectricInStoreDto newElectricInStore) {
ElectricInStoreDrive electricInStoreDrive = new ElectricInStoreDrive();
BeanUtils.copyProperties(newElectricInStore, electricInStoreDrive);
electricInStoreService.insertElectricInStore(electricInStoreDrive);
return R.ok();
}
} }
package cn.com.glsx.stdinterface.modules.controller; package cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.dto.ElectricFenceDto;
import cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive;
import cn.com.glsx.stdinterface.modules.service.FenceDriverService; import cn.com.glsx.stdinterface.modules.service.FenceDriverService;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
...@@ -11,10 +21,30 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -11,10 +21,30 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping(value = "/fencedriver")
@Api(value = "围栏试驾信息", tags = {"围栏试驾信息"})
public class FenceDriverController { public class FenceDriverController {
private final static String MODULE = "围栏试驾信息";
@Autowired @Autowired
private FenceDriverService fenceDriverService; private FenceDriverService fenceDriverService;
@GetMapping(value = "/getfencedrive")
@SysLog(module = MODULE, value = "查询围栏试驾信息", action = OperateType.QUERY)
@ApiOperation(value = "查询围栏试驾信息")
public R getFenceDrive(@RequestParam Integer fenceId, @RequestParam String sn, @RequestParam String journeyTime) {
List<ElectricFenceDto> electricFenceDriveList = fenceDriverService.getFenceDrive(fenceId, sn, journeyTime);
return R.ok().data(electricFenceDriveList);
}
@PostMapping(value = "/insertfencedrive")
@SysLog(module = MODULE, value = "插入围栏试驾信息", action = OperateType.ADD)
@ApiOperation(value = "插入围栏试驾信息")
public R insertFenceDrive(@RequestBody ElectricFenceDto newfenceDrive) {
ElectricFenceDrive electricFenceDrive = new ElectricFenceDrive();
BeanUtils.copyProperties(newfenceDrive, electricFenceDrive);
fenceDriverService.insertFenceDrive(electricFenceDrive);
return R.ok();
}
} }
...@@ -4,6 +4,8 @@ import cn.com.glsx.stdinterface.dto.StatisticsDriveDto; ...@@ -4,6 +4,8 @@ import cn.com.glsx.stdinterface.dto.StatisticsDriveDto;
import cn.com.glsx.stdinterface.modules.service.StatisticsDriveService; import cn.com.glsx.stdinterface.modules.service.StatisticsDriveService;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.core.web.R; import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -21,11 +23,13 @@ import java.util.List; ...@@ -21,11 +23,13 @@ import java.util.List;
@RequestMapping(value = "/statisticsdrive") @RequestMapping(value = "/statisticsdrive")
@Api(value = "试驾统计数据", tags = {"试驾统计数据"}) @Api(value = "试驾统计数据", tags = {"试驾统计数据"})
public class StatisticsDriveController { public class StatisticsDriveController {
private final static String MODULE = "试驾数据统计";
@Autowired @Autowired
private StatisticsDriveService statisticsDriveService; private StatisticsDriveService statisticsDriveService;
@GetMapping(value = "/drivedatalist") @GetMapping(value = "/drivedatalist")
@SysLog(module = MODULE, value = "查询试驾统计数据", action = OperateType.QUERY)
@ApiOperation(value = "查询试驾统计数据") @ApiOperation(value = "查询试驾统计数据")
public R statisticsDriveDataEveryDay() { public R statisticsDriveDataEveryDay() {
log.info("开始查询试驾统计数据"); log.info("开始查询试驾统计数据");
...@@ -43,6 +47,7 @@ public class StatisticsDriveController { ...@@ -43,6 +47,7 @@ public class StatisticsDriveController {
} }
@PostMapping(value = "/insertstatisticsdrivelist") @PostMapping(value = "/insertstatisticsdrivelist")
@SysLog(module = MODULE, value = "保存试驾统计数据", action = OperateType.ADD)
@ApiOperation(value = "保存试驾统计数据") @ApiOperation(value = "保存试驾统计数据")
public R insertStatisticsDriveList(@RequestBody List<StatisticsDriveDto> statisticsDriveDtoList) { public R insertStatisticsDriveList(@RequestBody List<StatisticsDriveDto> statisticsDriveDtoList) {
log.info("开始保存试驾统计数据,数据集合的大小为===" + statisticsDriveDtoList.size()); log.info("开始保存试驾统计数据,数据集合的大小为===" + statisticsDriveDtoList.size());
......
package cn.com.glsx.stdinterface.modules.mapper; package cn.com.glsx.stdinterface.modules.mapper;
import cn.com.glsx.stdinterface.dto.ChannelRiskDto;
import cn.com.glsx.stdinterface.modules.model.ChannelRiskData; import cn.com.glsx.stdinterface.modules.model.ChannelRiskData;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper; import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
...@@ -14,4 +13,6 @@ import java.util.List; ...@@ -14,4 +13,6 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface ChannelRiskDataMapper extends CommonBaseMapper<ChannelRiskData> { public interface ChannelRiskDataMapper extends CommonBaseMapper<ChannelRiskData> {
//工单+设备号+车架号唯一
List<ChannelRiskDto> selectByWorkStandSn(@Param(value = "workorderNo") String workorderNo, @Param(value = "vin") String vin, @Param(value = "sn") String sn);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.stdinterface.modules.mapper; package cn.com.glsx.stdinterface.modules.mapper;
import cn.com.glsx.stdinterface.dto.ElectricFenceDto;
import cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive; import cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive;
import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper; import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap; import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* @Desc:试驾围栏Mapper * @Desc:试驾围栏Mapper
* @Author huangxc * @Author huangxc
...@@ -14,4 +18,6 @@ import org.apache.ibatis.annotations.Select; ...@@ -14,4 +18,6 @@ import org.apache.ibatis.annotations.Select;
*/ */
@Mapper @Mapper
public interface ElectricFenceDriveMapper extends CommonBaseMapper<ElectricFenceDrive> { public interface ElectricFenceDriveMapper extends CommonBaseMapper<ElectricFenceDrive> {
List<ElectricFenceDto> getFenceDrive(@Param("fenceId") Integer fenceId, @Param("sn") String sn, @Param("journeyTime") String journeyTime);
} }
package cn.com.glsx.stdinterface.modules.mapper; package cn.com.glsx.stdinterface.modules.mapper;
import cn.com.glsx.stdinterface.dto.ElectricInStoreDto;
import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive; import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper; import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @Entity generator.domain.TElectricInshopDrive * @Entity generator.domain.TElectricInshopDrive
*/ */
@Mapper @Mapper
public interface ElectricInStoreMapper extends CommonBaseMapper<ElectricInStoreDrive> { public interface ElectricInStoreMapper extends CommonBaseMapper<ElectricInStoreDrive> {
ElectricInStoreDrive getElectricInStore(@Param("electricInStoreDrive") ElectricInStoreDrive electricInStoreDrive); List<ElectricInStoreDto> getElectricInStore(@Param("fenceId") Integer fenceId, @Param("sn") String sn, @Param("gpsTime") String gpsTime);
} }
package cn.com.glsx.stdinterface.modules.model; package cn.com.glsx.stdinterface.modules.model;
import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -9,9 +11,11 @@ import java.util.Date; ...@@ -9,9 +11,11 @@ import java.util.Date;
* @Author huangxc * @Author huangxc
* @Date 2021/4/19 * @Date 2021/4/19
*/ */
@Data
@Table(name = "t_electric_fence_drive") @Table(name = "t_electric_fence_drive")
public class ElectricFenceDrive implements Serializable { public class ElectricFenceDrive implements Serializable {
private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "id", unique = true, nullable = false) @Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "SELECT LAST_INSERT_ID()") @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "SELECT LAST_INSERT_ID()")
...@@ -20,201 +24,33 @@ public class ElectricFenceDrive implements Serializable { ...@@ -20,201 +24,33 @@ public class ElectricFenceDrive implements Serializable {
* 设备号 * 设备号
*/ */
private String sn; private String sn;
/** /**
* 外键:电子围栏表主键 * 外键:电子围栏表主键
*/ */
@Column(name = "fence_id") @Column(name = "fence_id")
private Integer fenceId; private Integer fenceId;
/** /**
* 业务渠道标识,旧e盾:11 新E盾:12 * 业务渠道标识,旧e盾:11 新E盾:12
*/ */
@Column(name = "sve_system_id") @Column(name = "sve_system_id")
private Integer sveSystemId; private Integer sveSystemId;
/** /**
* 行程开始时间 * 行程开始时间
*/ */
@Column(name = "journey_time") @Column(name = "journey_time")
private Date journeyTime; private Date journeyTime;
/** /**
* 重合度(百分百),如值为20,即为20% * 重合度(百分百),如值为20,即为20%
*/ */
private Integer percent; private Integer percent;
/** /**
* 创建时间 * 创建时间
*/ */
@Column(name = "created_time") @Column(name = "created_time")
private Date createTime; private Date createTime;
/** /**
* 更新时间 * 更新时间
*/ */
@Column(name = "updated_time") @Column(name = "updated_time")
private Date updateTime; private Date updateTime;
private static final long serialVersionUID = 1L;
/**
* @return id
*/
public Integer getId() {
return id;
}
/**
* @param id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取外键:电子围栏表主键
*
* @return fence_id - 外键:电子围栏表主键
*/
public Integer getFenceId() {
return fenceId;
}
/**
* 设置外键:电子围栏表主键
*
* @param fenceId 外键:电子围栏表主键
*/
public void setFenceId(Integer fenceId) {
this.fenceId = fenceId;
}
/**
* 获取业务渠道标识,旧e盾:11 新E盾:12
*
* @return sve_system_id - 业务渠道标识,旧e盾:11 新E盾:12
*/
public Integer getSveSystemId() {
return sveSystemId;
}
/**
* 设置业务渠道标识,旧e盾:11 新E盾:12
*
* @param sveSystemId 业务渠道标识,旧e盾:11 新E盾:12
*/
public void setSveSystemId(Integer sveSystemId) {
this.sveSystemId = sveSystemId;
}
/**
* 获取行程开始时间
*
* @return journey_time - 行程开始时间
*/
public Date getJourneyTime() {
return journeyTime;
}
/**
* 设置行程开始时间
*
* @param journeyTime 行程开始时间
*/
public void setJourneyTime(Date journeyTime) {
this.journeyTime = journeyTime;
}
/**
* 获取重合度(百分百),如值为20,即为20%
*
* @return percent - 重合度(百分百),如值为20,即为20%
*/
public Integer getPercent() {
return percent;
}
/**
* 设置重合度(百分百),如值为20,即为20%
*
* @param percent 重合度(百分百),如值为20,即为20%
*/
public void setPercent(Integer percent) {
this.percent = percent;
}
/**
* 获取创建时间
*
* @return create_time - 创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间
*
* @param createTime 创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取更新时间
*
* @return update_time - 更新时间
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* 设置更新时间
*
* @param updateTime 更新时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", sn=").append(sn);
sb.append(", fenceId=").append(fenceId);
sb.append(", sveSystemId=").append(sveSystemId);
sb.append(", journeyTime=").append(journeyTime);
sb.append(", percent=").append(percent);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} }
...@@ -14,6 +14,7 @@ import java.util.Date; ...@@ -14,6 +14,7 @@ import java.util.Date;
@Table(name = "t_electric_instore_drive") @Table(name = "t_electric_instore_drive")
@Data @Data
public class ElectricInStoreDrive implements Serializable { public class ElectricInStoreDrive implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* id * id
*/ */
...@@ -21,53 +22,43 @@ public class ElectricInStoreDrive implements Serializable { ...@@ -21,53 +22,43 @@ public class ElectricInStoreDrive implements Serializable {
@Column(name = "id", unique = true, nullable = false) @Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "SELECT LAST_INSERT_ID()") @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "SELECT LAST_INSERT_ID()")
private Integer id; private Integer id;
/** /**
* 设备号 * 设备号
*/ */
private String sn; private String sn;
/** /**
* 外键:电子围栏表主键 * 外键:电子围栏表主键
*/ */
@Column(name = "fence_id") @Column(name = "fence_id")
private Integer fenceId; private Integer fenceId;
/** /**
* 业务渠道标识,默认为 13 * 业务渠道标识,默认为 13
*/ */
@Column(name = "sve_system_id") @Column(name = "sve_system_id")
private Integer sveSystemId; private Integer sveSystemId;
/** /**
* 0 表示不在, 1表示在新疆 * 0 表示不在, 1表示在新疆
*/ */
@Column(name = "position_state") @Column(name = "position_state")
private Integer positionState; private Integer positionState;
/** /**
* 0:工作时间有进出门店 1:工作时间一直在门店内 2:工作时间内一直在门店外 * 0:工作时间有进出门店 1:工作时间一直在门店内 2:工作时间内一直在门店外
*/ */
@Column(name = "gps_state") @Column(name = "gps_state")
private Integer gpsState; private Integer gpsState;
/** /**
* 行程开始时间 * 行程开始时间
*/ */
@Column(name = "gps_time") @Column(name = "gps_time")
private Date gpsTime; private Date gpsTime;
/** /**
* 创建时间 * 创建时间
*/ */
@Column(name = "created_time") @Column(name = "created_time")
private Date createdTime; private Date createdTime;
/** /**
* 更新时间 * 更新时间
*/ */
@Column(name = "updated_time") @Column(name = "updated_time")
private Date updatedTime; private Date updatedTime;
private static final long serialVersionUID = 1L;
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.stdinterface.modules.service; package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.dto.ChannelRiskDto;
import cn.com.glsx.stdinterface.modules.mapper.ChannelRiskDataMapper; import cn.com.glsx.stdinterface.modules.mapper.ChannelRiskDataMapper;
import cn.com.glsx.stdinterface.modules.model.ChannelRiskData;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 渠道风险serviceImpl * 渠道风险serviceImpl
*/ */
...@@ -16,4 +20,15 @@ public class ChannelRiskService { ...@@ -16,4 +20,15 @@ public class ChannelRiskService {
private ChannelRiskDataMapper channelRiskDataMapper; private ChannelRiskDataMapper channelRiskDataMapper;
public List<ChannelRiskDto> selectByWorkStandSn(String workorderNo, String vin, String sn) {
return channelRiskDataMapper.selectByWorkStandSn(workorderNo, vin, sn);
}
public void insertChannelRiskData(ChannelRiskData newData) {
channelRiskDataMapper.insert(newData);
}
public void updateChannelRiskData(ChannelRiskData newData) {
channelRiskDataMapper.updateByPrimaryKey(newData);
}
} }
package cn.com.glsx.stdinterface.modules.service; package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.dto.ElectricInStoreDto;
import cn.com.glsx.stdinterface.modules.mapper.ElectricInStoreMapper; import cn.com.glsx.stdinterface.modules.mapper.ElectricInStoreMapper;
import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive; import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/** /**
* 不在店统计Service * 不在店统计Service
*/ */
...@@ -14,7 +18,12 @@ public class ElectricInStoreService { ...@@ -14,7 +18,12 @@ public class ElectricInStoreService {
@Autowired @Autowired
private ElectricInStoreMapper electricInStoreMapper; private ElectricInStoreMapper electricInStoreMapper;
ElectricInStoreDrive getElectricInStore(ElectricInStoreDrive electricInStoreDrive) { public List<ElectricInStoreDto> getElectricInStore(Integer fenceId, String sn, String gpsTime) {
return electricInStoreMapper.getElectricInStore(electricInStoreDrive); return electricInStoreMapper.getElectricInStore(fenceId, sn, gpsTime);
}
public void insertElectricInStore(ElectricInStoreDrive electricInStoreDrive) {
electricInStoreDrive.setCreatedTime(new Date());
electricInStoreMapper.insert(electricInStoreDrive);
} }
} }
package cn.com.glsx.stdinterface.modules.service; package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.dto.ElectricFenceDto;
import cn.com.glsx.stdinterface.modules.mapper.ElectricFenceDriveMapper; import cn.com.glsx.stdinterface.modules.mapper.ElectricFenceDriveMapper;
import cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive;
import cn.com.glsx.stdinterface.modules.model.ElectricInStoreDrive;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/** /**
* 围栏试驾信息Service * 围栏试驾信息Service
...@@ -15,5 +21,13 @@ public class FenceDriverService { ...@@ -15,5 +21,13 @@ public class FenceDriverService {
private ElectricFenceDriveMapper electricFenceDriveMapper; private ElectricFenceDriveMapper electricFenceDriveMapper;
public List<ElectricFenceDto> getFenceDrive(Integer fenceId, String sn, String journeyTime) {
return electricFenceDriveMapper.getFenceDrive(fenceId, sn, journeyTime);
}
public void insertFenceDrive(ElectricFenceDrive fenceDrive) {
fenceDrive.setCreateTime(new Date());
electricFenceDriveMapper.insert(fenceDrive);
}
} }
...@@ -24,6 +24,90 @@ public class FileUtil { ...@@ -24,6 +24,90 @@ public class FileUtil {
private static final SimpleDateFormat FMT = new SimpleDateFormat("yyMMdd"); private static final SimpleDateFormat FMT = new SimpleDateFormat("yyMMdd");
/** /**
* 判断文件是否存在
*/
public static boolean existFile(String sPath) {
boolean flag = false;
File file = new File(sPath);
// 路径为文件且不为空
if (file.isFile() && file.exists()) {
flag = true;
}
return flag;
}
/**
* 删除单个文件
*
* @param sPath 被删除文件的文件名
* @return 单个文件删除成功返回true,否则返回false
* @author lidh@didihu.com.cn on 20171024
*/
public static boolean deleteFile(String sPath) {
boolean flag = false;
File file = new File(sPath);
// 路径为文件且不为空则进行删除
if (file.isFile() && file.exists()) {
file.delete();
flag = true;
} else {
System.out.println("文件不存在或路径为空");
}
return flag;
}
public static String byte2file(byte[] data, String imagePath, String imageName) {
if (data == null || "".equals(imageName) || "".equals(imagePath)) {
return null;
}
String path = imagePath + "/" + imageName;
System.out.println("save paht :" + path);
FileOutputStream imageOutput = null;
File dir = new File(imagePath);
if (!dir.exists() && !dir.isDirectory()) {//判断文件目录是否存在
dir.mkdirs();
}
try {
imageOutput = new FileOutputStream(new File(path));
imageOutput.write(data, 0, data.length);
imageOutput.flush();
} catch (Exception ex) {
path = null;
ex.printStackTrace();
} finally {
if (imageOutput != null) {
try {
imageOutput.close();
} catch (IOException e) {
path = null;
e.printStackTrace();
}
}
}
return path;
}
public static byte[] getBytes(String filePath) {
byte[] buffer = null;
try {
File file = new File(filePath);
FileInputStream fis = new FileInputStream(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream(1000);
byte[] b = new byte[1000];
int n;
while ((n = fis.read(b)) != -1) {
bos.write(b, 0, n);
}
fis.close();
bos.close();
buffer = bos.toByteArray();
} catch (IOException e) {
e.printStackTrace();
}
return buffer;
}
/**
* 下载excel模版 * 下载excel模版
* *
* @param response * @param response
...@@ -109,91 +193,6 @@ public class FileUtil { ...@@ -109,91 +193,6 @@ public class FileUtil {
return file.getInputStream(); return file.getInputStream();
} }
/**
* 判断文件是否存在
*/
public static boolean existFile(String sPath) {
boolean flag = false;
File file = new File(sPath);
// 路径为文件且不为空
if (file.isFile() && file.exists()) {
flag = true;
}
return flag;
}
/**
* 删除单个文件
*
* @param sPath 被删除文件的文件名
* @return 单个文件删除成功返回true,否则返回false
* @author lidh@didihu.com.cn on 20171024
*/
public static boolean deleteFile(String sPath) {
boolean flag = false;
File file = new File(sPath);
// 路径为文件且不为空则进行删除
if (file.isFile() && file.exists()) {
file.delete();
flag = true;
} else {
System.out.println("文件不存在或路径为空");
}
return flag;
}
public static String byte2file(byte[] data, String imagePath, String imageName) {
if (data == null || "".equals(imageName) || "".equals(imagePath)) {
return null;
}
String path = imagePath + "/" + imageName;
System.out.println("save paht :" + path);
FileOutputStream imageOutput = null;
File dir = new File(imagePath);
if (!dir.exists() && !dir.isDirectory()) {//判断文件目录是否存在
dir.mkdirs();
}
try {
imageOutput = new FileOutputStream(new File(path));
imageOutput.write(data, 0, data.length);
imageOutput.flush();
} catch (Exception ex) {
path = null;
ex.printStackTrace();
} finally {
if (imageOutput != null) {
try {
imageOutput.close();
} catch (IOException e) {
path = null;
e.printStackTrace();
}
}
}
return path;
}
public static byte[] getBytes(String filePath) {
byte[] buffer = null;
try {
File file = new File(filePath);
FileInputStream fis = new FileInputStream(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream(1000);
byte[] b = new byte[1000];
int n;
while ((n = fis.read(b)) != -1) {
bos.write(b, 0, n);
}
fis.close();
bos.close();
buffer = bos.toByteArray();
} catch (IOException e) {
e.printStackTrace();
}
return buffer;
}
public String upload(InputStream fis, String savePath) throws IOException { public String upload(InputStream fis, String savePath) throws IOException {
StringBuilder tempFileName = new StringBuilder("pdf"); StringBuilder tempFileName = new StringBuilder("pdf");
tempFileName.append("-"); tempFileName.append("-");
......
...@@ -54,14 +54,12 @@ import java.util.*; ...@@ -54,14 +54,12 @@ import java.util.*;
@Slf4j @Slf4j
public class HttpUtils { public class HttpUtils {
final static int CONNECTION_TIMEOUT = 10000; // 设置请求超时 10 秒钟 根据业务调整
final static int SOCKET_TIMEOUT = 180000; // 数据传输时间 3 分钟
final static int SEARCH_CONNECTION_TIMEOUT = 500; // 连接不够用的时候等待超时时间,不设置默认等于 CONNECTION_TIMEOUT
public final static ContentType XML_UTF8 = ContentType.create("text/xml", "utf-8"); public final static ContentType XML_UTF8 = ContentType.create("text/xml", "utf-8");
public final static ContentType XML_GBK = ContentType.create("text/xml", "gbk"); public final static ContentType XML_GBK = ContentType.create("text/xml", "gbk");
public final static ContentType JSON_UTF8 = ContentType.create("application/json", "utf-8"); public final static ContentType JSON_UTF8 = ContentType.create("application/json", "utf-8");
final static int CONNECTION_TIMEOUT = 10000; // 设置请求超时 10 秒钟 根据业务调整
final static int SOCKET_TIMEOUT = 180000; // 数据传输时间 3 分钟
final static int SEARCH_CONNECTION_TIMEOUT = 500; // 连接不够用的时候等待超时时间,不设置默认等于 CONNECTION_TIMEOUT
static PoolingHttpClientConnectionManager httpClientConnectionManager = null; static PoolingHttpClientConnectionManager httpClientConnectionManager = null;
static { static {
......
...@@ -6,7 +6,9 @@ server.servlet.context-path=/stdinterface ...@@ -6,7 +6,9 @@ server.servlet.context-path=/stdinterface
#\u65E5\u5FD7\u8DEF\u5F84\uFF08logback-spring.xml\u8BFB\u53D6\uFF0C\u4E0D\u8981\u52A0\u5165\u914D\u7F6E\u4E2D\u5FC3\uFF09 #\u65E5\u5FD7\u8DEF\u5F84\uFF08logback-spring.xml\u8BFB\u53D6\uFF0C\u4E0D\u8981\u52A0\u5165\u914D\u7F6E\u4E2D\u5FC3\uFF09
logging.path=/data/java_log/jetty/${spring.application.name}/${spring.application.name}.log logging.path=/data/java_log/jetty/${spring.application.name}/${spring.application.name}.log
#nacos\u914D\u7F6E\u4E2D\u5FC3 #nacos\u914D\u7F6E\u4E2D\u5FC3
spring.cloud.nacos.config.server-addr=192.168.0.63:8848 spring.cloud.nacos.config.server-addr=192.168.3.206:8848
#\u8054\u8C03\u6D4B\u8BD5\u7684\u65F6\u5019\u4F7F\u7528
#spring.cloud.nacos.config.server-addr=192.168.0.63:8848
#nacos\u914D\u7F6Eid\uFF0C\u5B8C\u6574dataId=${spring.cloud.nacos.config.prefix}-${spring.profiles.active}.${file-extension\uFF08\u7531\u65B0\u589E\u914D\u7F6E\u65F6\u9009\u7684\u6587\u4EF6\u7C7B\u578B\u51B3\u5B9A\uFF09} #nacos\u914D\u7F6Eid\uFF0C\u5B8C\u6574dataId=${spring.cloud.nacos.config.prefix}-${spring.profiles.active}.${file-extension\uFF08\u7531\u65B0\u589E\u914D\u7F6E\u65F6\u9009\u7684\u6587\u4EF6\u7C7B\u578B\u51B3\u5B9A\uFF09}
#\u793A\u4F8B\uFF1Ahttp://192.168.0.63:8848/nacos/v1/cs/configs?dataId=glsx-rest-admin.properties&group=DEV_GROUP #\u793A\u4F8B\uFF1Ahttp://192.168.0.63:8848/nacos/v1/cs/configs?dataId=glsx-rest-admin.properties&group=DEV_GROUP
spring.cloud.nacos.config.group=NESHIELD_DEV_GROUP spring.cloud.nacos.config.group=NESHIELD_DEV_GROUP
...@@ -24,3 +26,5 @@ spring.cloud.nacos.config.shared-configs[0].refresh=true ...@@ -24,3 +26,5 @@ spring.cloud.nacos.config.shared-configs[0].refresh=true
spring.cloud.nacos.config.shared-configs[1].group=NESHIELD_DEV_GROUP spring.cloud.nacos.config.shared-configs[1].group=NESHIELD_DEV_GROUP
spring.cloud.nacos.config.shared-configs[1].data-id=glsx-ne-shield-share-dev.properties spring.cloud.nacos.config.shared-configs[1].data-id=glsx-ne-shield-share-dev.properties
spring.cloud.nacos.config.shared-configs[1].refresh=true spring.cloud.nacos.config.shared-configs[1].refresh=true
spring.main.allow-bean-definition-overriding=true
\ No newline at end of file \ No newline at end of file
...@@ -5,30 +5,60 @@ ...@@ -5,30 +5,60 @@
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="workorder_no" jdbcType="VARCHAR" property="workorderNo" /> <result column="workorder_no" jdbcType="VARCHAR" property="workorderNo"/>
<result column="owner_name" jdbcType="VARCHAR" property="ownerName" /> <result column="owner_name" jdbcType="VARCHAR" property="ownerName"/>
<result column="vin" jdbcType="VARCHAR" property="vin" /> <result column="vin" jdbcType="VARCHAR" property="vin"/>
<result column="sn" jdbcType="VARCHAR" property="sn" /> <result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="active_date" jdbcType="TIMESTAMP" property="activeDate" /> <result column="active_date" jdbcType="TIMESTAMP" property="activeDate"/>
<result column="dev_type" jdbcType="INTEGER" property="devType" /> <result column="dev_type" jdbcType="INTEGER" property="devType"/>
<result column="gps_time" jdbcType="TIMESTAMP" property="gpsTime" /> <result column="gps_time" jdbcType="TIMESTAMP" property="gpsTime"/>
<result column="lng" jdbcType="DOUBLE" property="lng" /> <result column="lng" jdbcType="DOUBLE" property="lng"/>
<result column="lat" jdbcType="DOUBLE" property="lat" /> <result column="lat" jdbcType="DOUBLE" property="lat"/>
<result column="prov" jdbcType="VARCHAR" property="prov" /> <result column="prov" jdbcType="VARCHAR" property="prov"/>
<result column="city" jdbcType="VARCHAR" property="city" /> <result column="city" jdbcType="VARCHAR" property="city"/>
<result column="zone" jdbcType="VARCHAR" property="zone" /> <result column="zone" jdbcType="VARCHAR" property="zone"/>
<result column="address" jdbcType="VARCHAR" property="address" /> <result column="address" jdbcType="VARCHAR" property="address"/>
<result column="shop_name" jdbcType="VARCHAR" property="shopName" /> <result column="shop_name" jdbcType="VARCHAR" property="shopName"/>
<result column="labels" jdbcType="VARCHAR" property="labels" /> <result column="labels" jdbcType="VARCHAR" property="labels"/>
<result column="type" jdbcType="TINYINT" property="type" /> <result column="type" jdbcType="TINYINT" property="type"/>
<result column="radius" jdbcType="INTEGER" property="radius" /> <result column="radius" jdbcType="INTEGER" property="radius"/>
<result column="district" jdbcType="VARCHAR" property="district" /> <result column="district" jdbcType="VARCHAR" property="district"/>
<result column="street" jdbcType="VARCHAR" property="street" /> <result column="street" jdbcType="VARCHAR" property="street"/>
<result column="street_number" jdbcType="VARCHAR" property="streetNumber" /> <result column="street_number" jdbcType="VARCHAR" property="streetNumber"/>
<result column="center_lat" jdbcType="DOUBLE" property="centerLat" /> <result column="center_lat" jdbcType="DOUBLE" property="centerLat"/>
<result column="center_lng" jdbcType="DOUBLE" property="centerLng" /> <result column="center_lng" jdbcType="DOUBLE" property="centerLng"/>
</resultMap> </resultMap>
<resultMap id="ChannelRiskMap" type="cn.com.glsx.stdinterface.dto.ChannelRiskDto">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="workorder_no" jdbcType="VARCHAR" property="workorderNo"/>
<result column="owner_name" jdbcType="VARCHAR" property="ownerName"/>
<result column="vin" jdbcType="VARCHAR" property="vin"/>
<result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="active_date" jdbcType="TIMESTAMP" property="activeDate"/>
<result column="dev_type" jdbcType="INTEGER" property="devType"/>
<result column="gps_time" jdbcType="TIMESTAMP" property="gpsTime"/>
<result column="lng" jdbcType="DOUBLE" property="lng"/>
<result column="lat" jdbcType="DOUBLE" property="lat"/>
<result column="prov" jdbcType="VARCHAR" property="prov"/>
<result column="city" jdbcType="VARCHAR" property="city"/>
<result column="zone" jdbcType="VARCHAR" property="zone"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="shop_name" jdbcType="VARCHAR" property="shopName"/>
<result column="labels" jdbcType="VARCHAR" property="labels"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="radius" jdbcType="INTEGER" property="radius"/>
<result column="district" jdbcType="VARCHAR" property="district"/>
<result column="street" jdbcType="VARCHAR" property="street"/>
<result column="street_number" jdbcType="VARCHAR" property="streetNumber"/>
<result column="center_lat" jdbcType="DOUBLE" property="centerLat"/>
<result column="center_lng" jdbcType="DOUBLE" property="centerLng"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
...@@ -37,4 +67,8 @@ ...@@ -37,4 +67,8 @@
prov, city, `zone`, address, shop_name, labels, `type`, radius, district, street, prov, city, `zone`, address, shop_name, labels, `type`, radius, district, street,
street_number, center_lat, center_lng street_number, center_lat, center_lng
</sql> </sql>
<select id="selectByWorkStandSn" resultMap="ChannelRiskMap">
SELECT * FROM t_channel_risk_data WHERE workorder_no=#{workorderNo} AND vin=#{vin} AND sn=#{sn}
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -5,19 +5,40 @@ ...@@ -5,19 +5,40 @@
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="sn" jdbcType="VARCHAR" property="sn" /> <result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="fence_id" jdbcType="INTEGER" property="fenceId" /> <result column="fence_id" jdbcType="INTEGER" property="fenceId"/>
<result column="sve_system_id" jdbcType="INTEGER" property="sveSystemId" /> <result column="sve_system_id" jdbcType="INTEGER" property="sveSystemId"/>
<result column="journey_time" jdbcType="TIMESTAMP" property="journeyTime" /> <result column="journey_time" jdbcType="TIMESTAMP" property="journeyTime"/>
<result column="percent" jdbcType="INTEGER" property="percent" /> <result column="percent" jdbcType="INTEGER" property="percent"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="created_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="updated_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List">
<resultMap id="FenceDriveMap" type="cn.com.glsx.stdinterface.dto.ElectricFenceDto">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
id, sn, fence_id, sve_system_id, journey_time, `percent`, create_time, update_time <id column="id" jdbcType="INTEGER" property="id"/>
<result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="fence_id" jdbcType="INTEGER" property="fenceId"/>
<result column="sve_system_id" jdbcType="INTEGER" property="sveSystemId"/>
<result column="journey_time" jdbcType="TIMESTAMP" property="journeyTime"/>
<result column="percent" jdbcType="INTEGER" property="percent"/>
<result column="created_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="updated_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generatedd
-->
id, sn, fence_id, sve_system_id, journey_time, `percent`, created_time, updated_time
</sql> </sql>
<select id="getFenceDrive" resultMap="FenceDriveMap">
SELECT
*
FROM t_electric_fence_drive
where fence_id=#{fenceId} and sn=#{sn} and journey_time=#{journeyTime}
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -16,18 +16,30 @@ ...@@ -16,18 +16,30 @@
<result property="updatedTime" column="updated_time" jdbcType="TIMESTAMP"/> <result property="updatedTime" column="updated_time" jdbcType="TIMESTAMP"/>
</resultMap> </resultMap>
<resultMap id="ElectricInStoreMap" type="cn.com.glsx.stdinterface.dto.ElectricInStoreDto">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="sn" column="sn" jdbcType="VARCHAR"/>
<result property="fenceId" column="fence_id" jdbcType="INTEGER"/>
<result property="sveSystemId" column="sve_system_id" jdbcType="INTEGER"/>
<result property="positionState" column="position_state" jdbcType="TINYINT"/>
<result property="gpsState" column="gps_state" jdbcType="TINYINT"/>
<result property="gpsTime" column="gps_time" jdbcType="TIMESTAMP"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="updatedTime" column="updated_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,sn,fence_id, id,sn,fence_id,
sve_system_id,position_state,gps_state, sve_system_id,position_state,gps_state,
gps_time,created_time,updated_time gps_time,created_time,updated_time
</sql> </sql>
<select id="getElectricInStore" resultMap="BaseResultMap"> <select id="getElectricInStore" resultMap="ElectricInStoreMap">
select * select *
from t_electric_instore_drive teid from t_electric_instore_drive teid
where teid.fence_id=#{electricInStoreDrive.fenceId} where teid.fence_id=#{fenceId}
and teid.sn=#{electricInStoreDrive.sn} and teid.sn=#{sn}
and teid.gps_state=0 and teid.gps_state=0
and teid.gps_time=#{electricInStoreDrive.gpsTime} and teid.gps_time=#{gpsTime}
</select> </select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!