Commit cae3e7c3 authored by zhuangzhuang's avatar zhuangzhuang

6.28-修改结束线路继续发送数据的bug

parent b99db0ec
package com.example.tdl.domain.vo;
public class TypeVo {
private String type;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
...@@ -37,4 +37,6 @@ public interface GatewayMapper { ...@@ -37,4 +37,6 @@ public interface GatewayMapper {
List<GatewayOnLineVo> getByWarehouseNo(@Param("warehouseNo") String warehouseNo); List<GatewayOnLineVo> getByWarehouseNo(@Param("warehouseNo") String warehouseNo);
List<TypeVo> getGatewayType(@Param("companyNo") String companyNo);
} }
...@@ -220,20 +220,19 @@ public class MqttListener implements MqttCallback { ...@@ -220,20 +220,19 @@ public class MqttListener implements MqttCallback {
if(configVo == null){ if(configVo == null){
return 0;//休眠 return 0;//休眠
} }
if(StringUtils.isEmpty(configVo.getMessage())) {//未绑定tdl CheckInVo checkInVo = new Gson().fromJson(message,CheckInVo.class);
if(configVo.getUntie() && StringUtils.isEmpty(configVo.getMessage()) ){
return 2;//解绑
}
if(StringUtils.isEmpty(configVo.getMessage()) && configVo.getUntie() == false){
return 0;//休眠 return 0;//休眠
} }
CheckInVo checkInVo = new Gson().fromJson(message,CheckInVo.class); JsonObject returnData = new JsonParser().parse(message).getAsJsonObject();
ConfigCMDVo configCMDVo = new Gson().fromJson(configVo.getMessage(),ConfigCMDVo.class); ConfigCMDVo configCMDVo = new Gson().fromJson(configVo.getMessage(),ConfigCMDVo.class);
if(configCMDVo == null){ if(configCMDVo == null){
return 0;//休眠 return 0;//休眠
} }
if(configVo.getUntie() && StringUtils.isEmpty(configVo.getMessage()) ){
return 2;//解绑
}
JsonObject returnData = new JsonParser().parse(message).getAsJsonObject();
if(returnData.has("tempL") if(returnData.has("tempL")
&&returnData.has("tempL")
&&returnData.has("tempH") &&returnData.has("tempH")
&&returnData.has("humiL") &&returnData.has("humiL")
&&returnData.has("humiH") &&returnData.has("humiH")
......
...@@ -72,4 +72,7 @@ public class GatewayService { ...@@ -72,4 +72,7 @@ public class GatewayService {
} }
public List<TypeVo> getGatewayType(String companyNo){
return gatewayMapper.getGatewayType(companyNo);
}
} }
...@@ -66,6 +66,7 @@ public class RedisService { ...@@ -66,6 +66,7 @@ public class RedisService {
} }
public Object getHash(String key, Object mapKey) { public Object getHash(String key, Object mapKey) {
Object result = null; Object result = null;
try { try {
HashOperations<Serializable, Object, Object> hash = redisTemplate.opsForHash(); HashOperations<Serializable, Object, Object> hash = redisTemplate.opsForHash();
......
...@@ -9,8 +9,8 @@ public class UserTokenRedisService extends RedisService { ...@@ -9,8 +9,8 @@ public class UserTokenRedisService extends RedisService {
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings({ "unchecked", "rawtypes" })
@Autowired @Autowired
public UserTokenRedisService(RedisTemplate realRedisTemplate) { public UserTokenRedisService(RedisTemplate userTokenTemplate) {
super(realRedisTemplate); super(userTokenTemplate);
} }
} }
...@@ -293,11 +293,11 @@ public class CircuitController { ...@@ -293,11 +293,11 @@ public class CircuitController {
" tdlsn:TDLSN序列号" + " tdlsn:TDLSN序列号" +
" batteryVoltage:电池电压}," + " batteryVoltage:电池电压}," +
" list:{" + " list:{" +
" city:城市;" + " city:城市;" +
" time:到达时间/发车时间;" + " time:到达时间/发车时间;" +
" last:运行时长;" + " last:运行时长;" +
" alarmCount:报警数;" + " alarmCount:报警数;" +
" type:1--出发时间;2--目的时间}," + " type:1--出发时间;2--目的时间}," +
" alarmLogList:{" + " alarmLogList:{" +
" transportationNo:运输编号;" + " transportationNo:运输编号;" +
" TDLSN:tag序列号;" + " TDLSN:tag序列号;" +
...@@ -933,7 +933,7 @@ public class CircuitController { ...@@ -933,7 +933,7 @@ public class CircuitController {
map.put("TDLSNVar",TDLSNVar); map.put("TDLSNVar",TDLSNVar);
map.put("alarmTypeVar",alarmTypeVar); map.put("alarmTypeVar",alarmTypeVar);
map.put("TDLCounts",addCircuitVo.getTdlAlarmList()== null ? 0 : addCircuitVo.getTdlAlarmList().size()); map.put("TDLCounts",addCircuitVo.getTdlAlarmList()== null ? 0 : addCircuitVo.getTdlAlarmList().size());
map.put("message",gson.toJson(configCMDVo)); map.put("message",configCMDVo == null ? "" :gson.toJson(configCMDVo));
map.put("flag",false); map.put("flag",false);
map.put("untie",false); map.put("untie",false);
circuitService.addCircuit(map); circuitService.addCircuit(map);
...@@ -1002,7 +1002,7 @@ public class CircuitController { ...@@ -1002,7 +1002,7 @@ public class CircuitController {
return gson.toJson(fb); return gson.toJson(fb);
} }
//判断当前车牌是否已存在 //判断当前车牌是否已存在
if(carService.getByCarNo(user.getCompanyNo(),addCircuitVo.getCargoNo()) == null){ if(carService.getByCarNo(user.getCompanyNo(),addCircuitVo.getPlateNo()) == null){
fb.setCode(0); fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"nonexistentTruck")); fb.setMessage(i18n.getMessage(request,"nonexistentTruck"));
return gson.toJson(fb); return gson.toJson(fb);
...@@ -1236,23 +1236,26 @@ public class CircuitController { ...@@ -1236,23 +1236,26 @@ public class CircuitController {
fb.setCode(0); fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"notBound")); fb.setMessage(i18n.getMessage(request,"notBound"));
return gson.toJson(fb); return gson.toJson(fb);
}
ConfigCMDVo config = gson.fromJson(configVo.getMessage(),ConfigCMDVo.class);
Boolean untie = false;
if(tdl.equals(tdlLogVo.getTDLSN())){
configCMDVo =null;
untie = true;
}else{ }else{
ConfigCMDVo config = gson.fromJson(configVo.getMessage(),ConfigCMDVo.class); devList.removeAll(dev);
if(tdl.equals(tdlLogVo.getTDLSN())){ configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l);
configCMDVo = new ConfigCMDVo();
}else{
devList.removeAll(dev);
configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l);
}
} }
Map<Object,Object> map=new HashMap<>(); Map<Object,Object> map=new HashMap<>();
map.put("transportationNo",updateCircuitVo.getTransportationNo()); map.put("transportationNo",updateCircuitVo.getTransportationNo());
map.put("gSN",tdlLogVo.getgSN()); map.put("gSN",tdlLogVo.getgSN());
map.put("gType",tdlLogVo.getgType()); map.put("gType",tdlLogVo.getgType());
map.put("startCity",resultCircuitVo.getStartCity()); map.put("startCity",resultCircuitVo.getStartCity());
map.put("endCity",resultCircuitVo.getEndCity()); map.put("endCity",resultCircuitVo.getEndCity());
map.put("message",gson.toJson(configCMDVo)); map.put("message",configCMDVo == null ? "" : gson.toJson(configCMDVo));
map.put("endTime",updateCircuitVo.getEndTime()); map.put("endTime",updateCircuitVo.getEndTime());
map.put("untie",untie);
circuitService.endCircuit(map); circuitService.endCircuit(map);
Map<Object,Object> msg=new HashMap<>(); Map<Object,Object> msg=new HashMap<>();
msg.put("msg",map.get("msg")); msg.put("msg",map.get("msg"));
...@@ -1518,7 +1521,7 @@ public class CircuitController { ...@@ -1518,7 +1521,7 @@ public class CircuitController {
@ApiOperation(value = "判断线路是否已经绑定了tdl和gateway",notes = "判断线路是否已经绑定了tdl和gateway" + @ApiOperation(value = "判断线路是否已经绑定了tdl和gateway",notes = "判断线路是否已经绑定了tdl和gateway" +
"transportationNo:运输编号" + "transportationNo:运输编号" +
"返回值:" + "返回值:" +
"binding:false未绑定/true绑定了") "binding:false未绑定/true绑定了")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"), @ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
@ApiImplicitParam(paramType="header", name = "AccountLanguage", value = "language", required = false, dataType = "String"), @ApiImplicitParam(paramType="header", name = "AccountLanguage", value = "language", required = false, dataType = "String"),
...@@ -1551,6 +1554,8 @@ public class CircuitController { ...@@ -1551,6 +1554,8 @@ public class CircuitController {
return gson.toJson(bindVo); return gson.toJson(bindVo);
} }
//生成运输编号 //生成运输编号
public String getTransportNo(String transportation,String transportationType){ public String getTransportNo(String transportation,String transportationType){
String transportationNo=""; String transportationNo="";
...@@ -1580,6 +1585,8 @@ public class CircuitController { ...@@ -1580,6 +1585,8 @@ public class CircuitController {
return transportationNo; return transportationNo;
} }
//两个时间戳之间相差多少 //两个时间戳之间相差多少
public String getMistiming(Long startTime,Long arrivalTime){ public String getMistiming(Long startTime,Long arrivalTime){
long nd = 1000 * 24 * 60 * 60; long nd = 1000 * 24 * 60 * 60;
......
...@@ -98,6 +98,21 @@ public class EquipmentBindingController { ...@@ -98,6 +98,21 @@ public class EquipmentBindingController {
fb.setMessage("使用场景不能为空"); fb.setMessage("使用场景不能为空");
return gson.toJson(fb); return gson.toJson(fb);
} }
if(bindingVo.getMode() == 1){
if(StringUtils.isEmpty(bindingVo.getTransportationNo())){
fb.setCode(0);
fb.setMessage("运输编号不能为空");
return gson.toJson(fb);
}
bindingVo.setWarehouseNo("");
}else if(bindingVo.getMode() == 2){
if(StringUtils.isEmpty(bindingVo.getWarehouseNo())){
fb.setCode(0);
fb.setMessage("仓库编号不能为空");
return gson.toJson(fb);
}
bindingVo.setTransportationNo("");
}
if(StringUtils.isEmpty(bindingVo.getType())){ if(StringUtils.isEmpty(bindingVo.getType())){
bindingVo.setType(gatewayService.getBySN(bindingVo.getgSN(),user.getCompanyNo())); bindingVo.setType(gatewayService.getBySN(bindingVo.getgSN(),user.getCompanyNo()));
} }
...@@ -120,11 +135,11 @@ public class EquipmentBindingController { ...@@ -120,11 +135,11 @@ public class EquipmentBindingController {
fb.setMessage("该TDL已经被使用"); fb.setMessage("该TDL已经被使用");
return gson.toJson(fb); return gson.toJson(fb);
} }
if(StringUtils.isEmpty(bindingVo.getTransportationNo()) && !StringUtils.isEmpty(bindingVo.getWarehouseNo())){ // if(StringUtils.isEmpty(bindingVo.getTransportationNo()) && !StringUtils.isEmpty(bindingVo.getWarehouseNo())){
bindingVo.setTransportationNo(""); // bindingVo.setTransportationNo("");
}else if(StringUtils.isEmpty(bindingVo.getWarehouseNo()) && !StringUtils.isEmpty(bindingVo.getTransportationNo())){ // }else if(StringUtils.isEmpty(bindingVo.getWarehouseNo()) && !StringUtils.isEmpty(bindingVo.getTransportationNo())){
bindingVo.setWarehouseNo(""); // bindingVo.setWarehouseNo("");
} // }
Integer gpsPeriod = null; Integer gpsPeriod = null;
Integer gprsPeriod = null; Integer gprsPeriod = null;
if(bindingVo.getMode() == 2){ if(bindingVo.getMode() == 2){
...@@ -211,17 +226,19 @@ public class EquipmentBindingController { ...@@ -211,17 +226,19 @@ public class EquipmentBindingController {
ConfigVo configVo =configService.getConfig(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType()); ConfigVo configVo =configService.getConfig(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType());
ConfigCMDVo config = gson.fromJson(configVo.getMessage(),ConfigCMDVo.class); ConfigCMDVo config = gson.fromJson(configVo.getMessage(),ConfigCMDVo.class);
ConfigCMDVo configCMDVo ; ConfigCMDVo configCMDVo ;
Boolean boo = false;
if(devList.size()>1){ if(devList.size()>1){
devList.remove("TDL-"+TDLSN); devList.remove("TDL-"+TDLSN);
configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l); configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l);
}else{ }else{
configCMDVo = new ConfigCMDVo(); configCMDVo = null;
boo = true;
} }
Map<Object,Object> map=new HashMap<>(); Map<Object,Object> map=new HashMap<>();
map.put("gSN",resultTDLDeviceVo.getGatewaySN()); map.put("gSN",resultTDLDeviceVo.getGatewaySN());
map.put("gType",resultTDLDeviceVo.getGatewayType()); map.put("gType",resultTDLDeviceVo.getGatewayType());
map.put("message",gson.toJson(configCMDVo)); map.put("message",configCMDVo == null ? "": gson.toJson(configCMDVo));
map.put("untie",false); map.put("untie",boo);
map.put("TDLSN",TDLSN); map.put("TDLSN",TDLSN);
map.put("endTime",System.currentTimeMillis()); map.put("endTime",System.currentTimeMillis());
configService.updateConfig(map); configService.updateConfig(map);
...@@ -276,10 +293,12 @@ public class EquipmentBindingController { ...@@ -276,10 +293,12 @@ public class EquipmentBindingController {
fb.setMessage("该网关不属于该仓库"); fb.setMessage("该网关不属于该仓库");
return gson.toJson(fb); return gson.toJson(fb);
} }
//获取网关编号
String type = gatewayService.getBySN(addWarehouseGatewayVo.getgSN(),user.getCompanyNo());
Map<Object,Object> map=new HashMap<>(); Map<Object,Object> map=new HashMap<>();
map.put("warehouseNo",addWarehouseGatewayVo.getWarehouseNo()); map.put("warehouseNo",addWarehouseGatewayVo.getWarehouseNo());
map.put("gSN",addWarehouseGatewayVo.getgSN()); map.put("gSN",addWarehouseGatewayVo.getgSN());
map.put("gType","WTD93LG"); map.put("gType",type);
map.put("endTime",System.currentTimeMillis()); map.put("endTime",System.currentTimeMillis());
warehouseService.untieGateway(map); warehouseService.untieGateway(map);
Map<Object,Object> msg=new HashMap<>(); Map<Object,Object> msg=new HashMap<>();
......
...@@ -479,4 +479,20 @@ public class GatewayController { ...@@ -479,4 +479,20 @@ public class GatewayController {
} }
//获取设备类型
@ApiOperation(value = "分配网关",notes = "分配网关,传值说明:" +
" SN:需要分配的网关序列号," +
" type:需要分配的网关类型," +
" companyNo:分配的公司编号。")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value = "/getGatewayType",method = RequestMethod.GET)
public Object getGatewayType(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
return gatewayService.getGatewayType(user.getCompanyNo());
}
} }
...@@ -111,17 +111,19 @@ public class HomePageController { ...@@ -111,17 +111,19 @@ public class HomePageController {
//获取近几天的线路信息 //获取近几天的线路信息
dataVo.setOnRoute(circuitService.getOnRoute(user.getCompanyNo()));//在途数量 dataVo.setOnRoute(circuitService.getOnRoute(user.getCompanyNo()));//在途数量
Integer delay = circuitService.getDelayCount(System.currentTimeMillis(),time,user.getCompanyNo()); Integer delay = circuitService.getDelayCount(System.currentTimeMillis(),time,user.getCompanyNo());
dataVo.setDelay(delay);//延误数量
dataVo.setAlarmed( alarmLogServcie.getCount(time,user.getCompanyNo()));//报警数量 dataVo.setAlarmed( alarmLogServcie.getCount(time,user.getCompanyNo()));//报警数量
dataVo.setBump(alarmLogServcie.getBumpCount(time,user.getCompanyNo())); //获取颠簸数量 dataVo.setBump(alarmLogServcie.getBumpCount(time,user.getCompanyNo())); //获取颠簸数量
// dataVo.setAlarmLogVoList(alarmLogServcie.getAlarmLog(time,user.getCompanyNo()));//报警列表 // dataVo.setAlarmLogVoList(alarmLogServcie.getAlarmLog(time,user.getCompanyNo()));//报警列表
dataVo.setWarehouseVoList(warehouseService.getAll(user.getCompanyNo())); dataVo.setWarehouseVoList(warehouseService.getAll(user.getCompanyNo()));
List<HistogramData> list = alarmLogServcie.getByCount(time,user.getCompanyNo());//获取报警柱状图 List<HistogramData> list = alarmLogServcie.getByCount(time,user.getCompanyNo());//获取报警柱状图
list.add(new HistogramData("5",delay));
//获取所有的仓库数据 //获取所有的仓库数据
for(int j = 0,length = list.size();j<length;j++){ for(int j = 0,length = list.size();j<length;j++){
if(list.get(j).getClassify().equals("5")){ if(list.get(j).getClassify().equals("5")){
Integer count = list.get(j).getCount() +delay; Integer count = list.get(j).getCount() +delay;
list.get(j).setCount(count); list.get(j).setCount(count);
dataVo.setDelay(list.get(j).getCount());//延误数量
} }
} }
//获取设备的当前位置 //获取设备的当前位置
...@@ -152,12 +154,7 @@ public class HomePageController { ...@@ -152,12 +154,7 @@ public class HomePageController {
circuitList.add(circuitVo); circuitList.add(circuitVo);
}else { }else {
Long startTime = circuitVos.get(i).getStartTime() * 1000000l; Long startTime = circuitVos.get(i).getStartTime() * 1000000l;
String sql = ""; String sql = "SELECT \"lng\",\"lat\" FROM \"tdl_policy\".\"" + device + "\" where time >= " + startTime + " ORDER BY time desc limit 1";
if (circuitVos.get(i).getEndTime() == null || circuitVos.get(i).getEndTime() == 0) {
sql = "SELECT \"lng\",\"lat\" FROM \"tdl_policy\".\"" + device + "\"where \"lng\"!=0 and \"lat\"!=0 and time >= " + startTime + " ORDER BY time desc limit 1";
} else {
sql = "SELECT \"lng\",\"lat\" FROM \"tdl_policy\".\"" + device + "\"where \"lng\"!=0 and \"lat\"!=0 and time >= " + startTime + " and time<= " + circuitVos.get(i).getEndTime() * 1000000l + " ORDER BY time desc limit 1";
}
QueryResult queryResult = influxDBTemplate.query(new Query(sql, database)); QueryResult queryResult = influxDBTemplate.query(new Query(sql, database));
if (queryResult.getResults().get(0).getSeries() != null) { if (queryResult.getResults().get(0).getSeries() != null) {
circuitVo.setTime(parseTime(queryResult.getResults().get(0).getSeries().get(0).getValues().get(0).get(0).toString())); circuitVo.setTime(parseTime(queryResult.getResults().get(0).getSeries().get(0).getValues().get(0).get(0).toString()));
......
...@@ -173,21 +173,19 @@ public class TDLDeviceController { ...@@ -173,21 +173,19 @@ public class TDLDeviceController {
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"), @ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
}) })
@RequestMapping(value="/delTDLDevice",method = RequestMethod.POST) @RequestMapping(value="/delTDLDevice",method = RequestMethod.POST)
public Object delTDLDevice(@RequestBody String TDLSN,HttpServletRequest request){ public Object delTDLDevice(@RequestBody TdlSNVo tdlSNVo,HttpServletRequest request){
JSONObject jsonObject=JSON.parseObject(TDLSN); if (StringUtils.isEmpty(tdlSNVo.getTDLSN())){
TDLSN=(String)jsonObject.get("TDLSN");
if (StringUtils.isEmpty(TDLSN)){
fb.setCode(0); fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"TDLSN")); fb.setMessage(i18n.getMessage(request,"TDLSN"));
return gson.toJson(fb); return gson.toJson(fb);
} }
Object[] o={TDLSN}; Object[] o={tdlSNVo.getTDLSN()};
if (tdlDeviceService.getByTDLSN(TDLSN).getUseScene()!=0){ if (tdlDeviceService.getByTDLSN(tdlSNVo.getTDLSN()).getUseScene()!=0){
fb.setCode(0); fb.setCode(0);
fb.setMessage(i18n.getMessage(request,o,"tdlUsed")); fb.setMessage(i18n.getMessage(request,o,"tdlUsed"));
return gson.toJson(fb); return gson.toJson(fb);
} }
int a = tdlDeviceService.delTDLDevice(TDLSN); int a = tdlDeviceService.delTDLDevice(tdlSNVo.getTDLSN());
if (a>0){ if (a>0){
fb.setCode(1); fb.setCode(1);
fb.setMessage(i18n.getMessage(request,"deleteTDLSuccess")); fb.setMessage(i18n.getMessage(request,"deleteTDLSuccess"));
......
...@@ -185,6 +185,7 @@ ...@@ -185,6 +185,7 @@
#{endCity,mode=IN,jdbcType=VARCHAR}, #{endCity,mode=IN,jdbcType=VARCHAR},
#{message,mode=IN,jdbcType=VARCHAR}, #{message,mode=IN,jdbcType=VARCHAR},
#{endTime,mode=IN,jdbcType=BIGINT}, #{endTime,mode=IN,jdbcType=BIGINT},
#{untie,mode=IN,jdbcType=INTEGER},
#{msg,mode=OUT,jdbcType=VARCHAR} #{msg,mode=OUT,jdbcType=VARCHAR}
) )
} }
...@@ -266,6 +267,7 @@ ...@@ -266,6 +267,7 @@
</select> </select>
<!--总数量--> <!--总数量-->
<select id="getCount" resultType="java.lang.Integer"> <select id="getCount" resultType="java.lang.Integer">
select count(id) from circuit select count(id) from circuit
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<if test="companyNo!='TM201803298320'"> <if test="companyNo!='TM201803298320'">
and companyNo=#{companyNo,jdbcType=VARCHAR} and companyNo=#{companyNo,jdbcType=VARCHAR}
</if> </if>
limit 1
</select> </select>
<insert id="addGateway" parameterType="java.util.Map" statementType="CALLABLE"> <insert id="addGateway" parameterType="java.util.Map" statementType="CALLABLE">
...@@ -124,6 +125,14 @@ ...@@ -124,6 +125,14 @@
and ISNULL(endTime) and ISNULL(endTime)
</select> </select>
<select id="getGatewayType" parameterType="String" resultType="com.example.tdl.domain.vo.TypeVo">
SELECT DISTINCT type
from gateway g INNER JOIN company c on g.company_id=c.id
<if test="companyNo!='TM201803298320'">
WHERE companyNo=#{companyNo,jdbcType=VARCHAR}
</if>
</select>
<!-- <insert id="addGateway" parameterType="com.example.tdl.domain.vo.AddGatewayVo"> <!-- <insert id="addGateway" parameterType="com.example.tdl.domain.vo.AddGatewayVo">
INSERT into gateway VALUES ( INSERT into gateway VALUES (
......
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