Commit e63dbd8b authored by duanruiming's avatar duanruiming

[update] 优化持久层

parent 6cd45b92
package net.wanji.utc.common.baseentity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Kent HAN
* @date 2022/11/15 10:14
*/
@Data
@ApiModel(value = "BaseCrossInfo", description = "查询信号路口基础信息输出参数")
public class BaseCrossInfo {
@ApiModelProperty(value = "信号机ID")
private String code;
@ApiModelProperty(value = "路口ID")
private String crossId;
@ApiModelProperty(value = "厂商代码")
private String manufacturerCode;
}
package net.wanji.utc.common.commonentity;
import lombok.Data;
import net.wanji.databus.po.ManufacturerApiInfoPO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.common.exception.NoSuchApiException;
import net.wanji.utc.po.ManufacturerApiInfoPO;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
......
package net.wanji.utc.common.constant;
import net.wanji.utc.po.ManufacturerApiInfoPO;
import net.wanji.utc.vo.CrossLanesVo;
import net.wanji.databus.po.ManufacturerApiInfoPO;
import net.wanji.databus.vo.CrossLanesVo;
import org.springframework.stereotype.Component;
import java.sql.Connection;
......
......@@ -114,7 +114,7 @@ public class RedisConfig extends CachingConfigurerSupport {
@Bean
public Jedis jedis() {
Jedis jedis = new Jedis("172.17.0.1", 6379);
Jedis jedis = new Jedis("10.102.1.182", 6379);
jedis.auth("Wanji300552");
return jedis;
}
......
......@@ -8,8 +8,8 @@ import lombok.extern.slf4j.Slf4j;
import net.wanji.common.annotation.aspect.AspectLog;
import net.wanji.common.enums.BaseEnum;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.vo.*;
import net.wanji.utc.service.control.ControlCommandStrategyService;
import net.wanji.utc.vo.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......
......@@ -8,10 +8,10 @@ import io.swagger.annotations.ApiResponses;
import net.wanji.common.annotation.aspect.AspectLog;
import net.wanji.common.enums.BaseEnum;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.po.ManufacturerApiInfoPO;
import net.wanji.utc.dto.systemadmin.DeleteByIntegerIdListDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerApiInfoInsertOrUpdateDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerApiInfoListDTO;
import net.wanji.utc.po.ManufacturerApiInfoPO;
import net.wanji.utc.service.systemadmin.ManufacturerApiInfoService;
import net.wanji.utc.vo.systemadmin.ManufacturerApiInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -8,10 +8,10 @@ import io.swagger.annotations.ApiResponses;
import net.wanji.common.annotation.aspect.AspectLog;
import net.wanji.common.enums.BaseEnum;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.dto.systemadmin.DeleteByIntegerIdListDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerInsertOrUpdateDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerListDTO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.service.systemadmin.ManufacturerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
......
......@@ -13,9 +13,9 @@ import lombok.RequiredArgsConstructor;
import net.wanji.common.annotation.aspect.AspectLog;
import net.wanji.common.enums.BaseEnum;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.service.runninginfo.SignalStatusService;
import net.wanji.utc.vo.LightsStatusVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......
......@@ -8,14 +8,14 @@ import net.wanji.common.annotation.aspect.AspectLog;
import net.wanji.common.enums.BaseEnum;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.dao.entity.CrossSchedulesPO;
import net.wanji.utc.dto.CrossInfoDTO;
import net.wanji.utc.dto.CrossSchedulesDTO;
import net.wanji.utc.dto.PlanSectionDTO;
import net.wanji.utc.dto.SchemePhaseLightsDTO;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.databus.dto.CrossInfoDTO;
import net.wanji.databus.dto.CrossSchedulesDTO;
import net.wanji.databus.dto.PlanSectionDTO;
import net.wanji.databus.dto.SchemePhaseLightsDTO;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.vo.PlanSectionVO;
import net.wanji.databus.vo.SchemePhaseLightsVO;
import net.wanji.utc.service.staticinfo.StaticInfoService;
import net.wanji.utc.vo.PlanSectionVO;
import net.wanji.utc.vo.SchemePhaseLightsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......
package net.wanji.utc.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Kent HAN
* @date 2022/11/15 9:57
*/
@Data
@ApiModel(value = "TelesemeCodeDTO", description = "信号机编号")
public class TelesemeCodeDTO {
@ApiModelProperty(value = "信号机编号")
String telesemeCode;
}
package net.wanji.utc.mapper;
import net.wanji.utc.po.CrossInfoPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author Kent HAN
* @date 2022/11/15 14:57
*/
public interface CrossInfoMapper {
CrossInfoPO selectByPrimaryKey(@Param("key") String key);
void insertBatch(@Param("entities") List<CrossInfoPO> crossInfoPOList);
List<String> selectCrossCodesByIds(@Param("entities") List<String> crossIdList);
String selectIdByCodeAndManufacturerId(@Param("crossCode") String crossCode,
@Param("manufacturerId")Integer manufacturerId);
List<CrossInfoPO> selectByManufacturerId(@Param("manufacturerId") Integer manufacturerId);
List<CrossInfoPO> selectByOptionals(@Param("crossName") String crossName,
@Param("manufacturerId") Integer manufacturerId);
void insertOne(CrossInfoPO crossInfoPO);
void updateOne(CrossInfoPO crossInfoPO);
void deleteBatch(@Param("ids") List<String> ids);
void updateOneByCodeAndManufacturerId(CrossInfoPO crossInfoPO);
void deleteById(String id);
}
package net.wanji.utc.mapper;
import net.wanji.utc.po.ManufacturerInfoPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author Kent HAN
* @date 2022/11/15 16:48
*/
public interface ManufacturerInfoMapper {
ManufacturerInfoPO selectByCode(@Param("code") String code);
ManufacturerInfoPO selectById(@Param("manufacturerId") Integer manufacturerId);
List<ManufacturerInfoPO> selectAll();
List<ManufacturerInfoPO> selectByOptionalPartialName(@Param("name") String name);
void insertOne(ManufacturerInfoPO manufacturerInfoPO);
void updateOne(ManufacturerInfoPO manufacturerInfoPO);
void deleteBatch(@Param("ids") List<Integer> ids);
Integer selectIdByNick(@Param("manufacturerNick") String manufacturerNick);
String selectNickById(@Param("manufacturerId") Integer manufacturerId);
}
package net.wanji.utc.po;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/15 10:48
*/
@Data
@JsonIgnoreProperties(value = {"gmtCreate", "gmtModified"})
public class CrossInfoPO {
@ApiModelProperty(value = "路口ID",notes = "")
private String id ;
/** 路口名称 */
@ApiModelProperty(value = "路口名称",notes = "")
private String name ;
/** 信号机编号 */
@ApiModelProperty(value = "信号机编号",notes = "")
private String code ;
/** 厂商ID */
@ApiModelProperty(value = "厂商ID",notes = "")
private Integer manufacturerId ;
/** 信号机IP */
@ApiModelProperty(value = "信号机IP",notes = "")
private String ip ;
/** 信号机端口 */
@ApiModelProperty(value = "信号机端口",notes = "")
private Integer port ;
/** 经纬度 */
@ApiModelProperty(value = "经纬度",notes = "")
private String location ;
/** 版本号 */
@ApiModelProperty(value = "版本号",notes = "")
private String version ;
/** 型号 */
@ApiModelProperty(value = "型号",notes = "")
private String model ;
/** 安装时间 */
@ApiModelProperty(value = "安装时间",notes = "")
private Date installTime ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.utc.service.control;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.vo.*;
import net.wanji.utc.po.hk.request.DelBaseConfigPO;
import net.wanji.utc.service.rpc.RpcService;
import net.wanji.utc.vo.*;
/**
* 控制指令 service
......
package net.wanji.utc.service.control;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.utc.vo.*;
import net.wanji.databus.vo.*;
/**
* @author duanruiming
......
......@@ -4,17 +4,15 @@ import lombok.RequiredArgsConstructor;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.dao.entity.*;
import net.wanji.databus.dao.mapper.*;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.databus.vo.*;
import net.wanji.utc.common.typeenum.BasicEnum;
import net.wanji.utc.common.typeenum.DateStyle;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.request.DelBaseConfigPO;
import net.wanji.utc.service.control.ControlCommandService;
import net.wanji.utc.service.control.ControlCommandStrategyService;
import net.wanji.utc.util.StringUtils;
import net.wanji.utc.vo.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
......@@ -9,8 +9,12 @@ import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.extern.slf4j.Slf4j;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.dao.entity.CrossPhasePO;
import net.wanji.databus.dao.mapper.CrossInfoMapper;
import net.wanji.databus.dao.mapper.CrossPhaseMapper;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.databus.vo.*;
import net.wanji.utc.common.exception.ControlException;
import net.wanji.utc.common.typeenum.BasicEnum;
import net.wanji.utc.common.typeenum.CrossLightsDirEnum;
......@@ -18,10 +22,6 @@ import net.wanji.utc.common.typeenum.CrossLightsTurnEnum;
import net.wanji.utc.dto.hk.DownloadPlanSpandsDTO;
import net.wanji.utc.dto.hk.DownloadScheduleDTO;
import net.wanji.utc.dto.hk.DownloadTimeSpandsDTO;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.request.DelBaseConfigPO;
import net.wanji.utc.po.hk.response.HKResponse;
import net.wanji.utc.service.control.ControlCommandService;
......@@ -30,7 +30,6 @@ import net.wanji.utc.service.runninginfo.impl.HkLightsStatusServiceImpl;
import net.wanji.utc.util.FieldUtil;
import net.wanji.utc.util.PathUtil;
import net.wanji.utc.util.StringUtils;
import net.wanji.utc.vo.*;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......
......@@ -3,11 +3,11 @@ package net.wanji.utc.service.control.impl;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.vo.*;
import net.wanji.utc.po.hk.request.DelBaseConfigPO;
import net.wanji.utc.service.control.ControlCommandService;
import net.wanji.utc.util.HttpRestUtil;
import net.wanji.utc.util.StringUtils;
import net.wanji.utc.vo.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......
package net.wanji.utc.service.runninginfo;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.utc.vo.LightsStatusVO;
import net.wanji.databus.vo.BaseCrossInfo;
import net.wanji.databus.vo.LightsStatusVO;
import java.util.List;
......
package net.wanji.utc.service.runninginfo;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.BaseCrossInfo;
import java.util.List;
......
package net.wanji.utc.service.runninginfo;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.utc.vo.LightsStatusVO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.LightsStatusVO;
import java.util.List;
......
package net.wanji.utc.service.runninginfo;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.service.rpc.RpcService;
import net.wanji.utc.vo.LightsStatusVO;
import java.util.List;
......
......@@ -8,20 +8,20 @@ import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.wanji.databus.dao.mapper.BaseCrossLightsMapper;
import net.wanji.databus.dao.mapper.CrossInfoMapper;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.BaseCrossLightsPO;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.databus.vo.BaseCrossInfo;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.request.HKRequest;
import net.wanji.utc.po.hk.request.RealTimeStateInfoQueryPO;
import net.wanji.utc.po.hk.response.*;
import net.wanji.utc.service.runninginfo.HkLightsStatusService;
import net.wanji.utc.util.PathUtil;
import net.wanji.utc.util.StringUtils;
import net.wanji.utc.vo.LightsStatusVO;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......
......@@ -7,15 +7,15 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.BaseCrossInfo;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.common.constant.RedisKeyConst;
import net.wanji.utc.common.typeenum.HkControlModeEnum;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.utc.service.runninginfo.HkRunningStatusService;
import net.wanji.utc.util.PathUtil;
import net.wanji.utc.util.RedisUtil;
import net.wanji.utc.vo.LightsStatusVO;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
......
......@@ -2,23 +2,23 @@ package net.wanji.utc.service.runninginfo.impl;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.databus.dao.mapper.CrossInfoMapper;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.dao.mapper.SignalStatusLogMapper;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.BaseCrossInfo;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.common.constant.RedisKeyConst;
import net.wanji.utc.common.typeenum.BasicEnum;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.mapper.SignalStatusLogMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.utc.service.runninginfo.HkLightsStatusService;
import net.wanji.utc.service.runninginfo.HkRunningStatusService;
import net.wanji.utc.service.runninginfo.SignalStatusService;
import net.wanji.utc.service.runninginfo.WanJiCommonRunningStatusService;
import net.wanji.utc.util.ListUtil;
import net.wanji.utc.util.RedisUtil;
import net.wanji.utc.vo.LightsStatusVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
......@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.service.runninginfo.WanJiCommonRunningStatusService;
import net.wanji.utc.util.HttpRestUtil;
import net.wanji.utc.vo.LightsStatusVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......
package net.wanji.utc.service.staticinfo;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.databus.po.CrossInfoPO;
import java.util.List;
......
package net.wanji.utc.service.staticinfo;
import net.wanji.databus.vo.DetailCrossInfoVO;
import net.wanji.utc.common.genericentity.ManufacturerRes;
import net.wanji.utc.vo.DetailCrossInfoVO;
/**
* @author Kent HAN
......
package net.wanji.utc.service.staticinfo;
import net.wanji.databus.dao.entity.CrossSchedulesPO;
import net.wanji.utc.dto.CrossInfoDTO;
import net.wanji.utc.dto.CrossSchedulesDTO;
import net.wanji.utc.dto.PlanSectionDTO;
import net.wanji.utc.dto.SchemePhaseLightsDTO;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.vo.PlanSectionVO;
import net.wanji.utc.vo.SchemePhaseLightsVO;
import net.wanji.databus.dto.CrossInfoDTO;
import net.wanji.databus.dto.CrossSchedulesDTO;
import net.wanji.databus.dto.PlanSectionDTO;
import net.wanji.databus.dto.SchemePhaseLightsDTO;
import net.wanji.databus.po.CrossInfoPO;
import java.util.List;
......@@ -21,11 +19,11 @@ public interface StaticInfoService {
void crossSchedules(CrossSchedulesDTO crossSchedulesDTO) throws Exception;
SchemePhaseLightsVO buildSchemePhaseLightsResponse(SchemePhaseLightsDTO schemePhaseLightsDTO);
net.wanji.databus.vo.SchemePhaseLightsVO buildSchemePhaseLightsResponse(SchemePhaseLightsDTO schemePhaseLightsDTO);
PlanSectionVO buildPlanSectionResponse(String crossId);
net.wanji.databus.vo.PlanSectionVO buildPlanSectionResponse(String crossId);
PlanSectionVO buildPlanSectionResponse(String crossId, Integer planNo);
net.wanji.databus.vo.PlanSectionVO buildPlanSectionResponse(String crossId, Integer planNo);
List<CrossSchedulesPO> buildCrossSchedulesResponse(List<String> crossIdList);
}
package net.wanji.utc.service.staticinfo;
import net.wanji.databus.dao.entity.CrossSchedulesPO;
import net.wanji.databus.vo.PlanSectionVO;
import net.wanji.databus.vo.SchemePhaseLightsVO;
import net.wanji.utc.common.Result;
import net.wanji.utc.service.rpc.RpcService;
import net.wanji.utc.vo.PlanSectionVO;
import net.wanji.utc.vo.SchemePhaseLightsVO;
import java.util.List;
......
......@@ -8,11 +8,11 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.common.typeenum.BasicEnum;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.service.staticinfo.HkCrossInfoService;
import net.wanji.utc.util.PathUtil;
import org.springframework.stereotype.Service;
......
......@@ -8,13 +8,13 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.RequiredArgsConstructor;
import net.wanji.databus.dao.entity.CrossSchedulesPO;
import net.wanji.databus.dao.mapper.CrossInfoMapper;
import net.wanji.databus.dao.mapper.CrossPlanMapper;
import net.wanji.databus.dao.mapper.CrossSchedulesMapper;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.common.typeenum.BasicEnum;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.response.DatePO;
import net.wanji.utc.po.hk.response.HKResponse;
import net.wanji.utc.po.hk.response.ScheduleResponseListPO;
......
......@@ -2,12 +2,12 @@ package net.wanji.utc.service.staticinfo.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import net.wanji.databus.vo.DetailCrossInfoVO;
import net.wanji.utc.common.commonentity.HttpRequest;
import net.wanji.utc.common.genericentity.ManufacturerRes;
import net.wanji.utc.service.staticinfo.OthersStaticInfoService;
import net.wanji.utc.util.HttpRestUtil;
import net.wanji.utc.util.StringUtils;
import net.wanji.utc.vo.DetailCrossInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Service;
......
......@@ -3,18 +3,14 @@ package net.wanji.utc.service.staticinfo.impl;
import lombok.RequiredArgsConstructor;
import net.wanji.databus.dao.entity.*;
import net.wanji.databus.dao.mapper.*;
import net.wanji.databus.dto.CrossInfoDTO;
import net.wanji.databus.dto.CrossSchedulesDTO;
import net.wanji.databus.dto.PlanSectionDTO;
import net.wanji.databus.dto.SchemePhaseLightsDTO;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.common.typeenum.BasicEnum;
import net.wanji.utc.dto.CrossInfoDTO;
import net.wanji.utc.dto.CrossSchedulesDTO;
import net.wanji.utc.dto.PlanSectionDTO;
import net.wanji.utc.dto.SchemePhaseLightsDTO;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.service.staticinfo.*;
import net.wanji.utc.vo.PlanSectionVO;
import net.wanji.utc.vo.SchemePhaseLightsVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
......@@ -47,9 +43,9 @@ public class StaticInfoServiceImpl implements StaticInfoService {
@Override
@Transactional
public List<CrossInfoPO> crossBasicInfo(CrossInfoDTO crossInfoDTO) throws Exception {
public List<CrossInfoPO> crossBasicInfo(CrossInfoDTO crossInfoVO) throws Exception {
List<CrossInfoPO> crossInfoPOList = new ArrayList<>();
if (Objects.equals(BasicEnum.ManufacturerEnum.HK.getCode(), crossInfoDTO.getManufacturerCode())) {
if (Objects.equals(BasicEnum.ManufacturerEnum.HK.getCode(), crossInfoVO.getManufacturerCode())) {
crossInfoPOList = hkCrossInfoService.hkCrossBasicInfo();
} else {
// todo 其他厂商
......@@ -71,7 +67,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
crossInfoMapper.insertOne(crossInfoPO);
}
}
String manufacturerCode = crossInfoDTO.getManufacturerCode();
String manufacturerCode = crossInfoVO.getManufacturerCode();
ManufacturerInfoPO manufacturerInfoPO = manufacturerInfoMapper.selectByCode(manufacturerCode);
Integer manufacturerId = manufacturerInfoPO.getId();
crossInfoPOList = crossInfoMapper.selectByManufacturerId(manufacturerId);
......@@ -144,7 +140,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
}
@Override
public SchemePhaseLightsVO buildSchemePhaseLightsResponse(SchemePhaseLightsDTO schemePhaseLightsDTO) {
public net.wanji.databus.vo.SchemePhaseLightsVO buildSchemePhaseLightsResponse(SchemePhaseLightsDTO schemePhaseLightsDTO) {
String crossId = schemePhaseLightsDTO.getCrossId();
List<CrossSchemePO> crossSchemePOList = crossSchemeMapper.selectByCrossId(crossId);
List<CrossPhasePO> crossPhasePOList = crossPhaseMapper.selectByCrossId(crossId);
......@@ -152,7 +148,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
List<CrossPhaseLightsPO> crossPhaseLightsPOList = crossPhaseLightsMapper.selectByCrossId(crossId);
SchemePhaseLightsVO schemePhaseLightsVO = new SchemePhaseLightsVO();
net.wanji.databus.vo.SchemePhaseLightsVO schemePhaseLightsVO = new net.wanji.databus.vo.SchemePhaseLightsVO();
schemePhaseLightsVO.setCrossSchemeList(crossSchemePOList);
schemePhaseLightsVO.setCrossPhaseList(crossPhasePOList);
schemePhaseLightsVO.setCrossLightsList(crossLightsPOList);
......@@ -162,11 +158,11 @@ public class StaticInfoServiceImpl implements StaticInfoService {
}
@Override
public PlanSectionVO buildPlanSectionResponse(String crossId) {
public net.wanji.databus.vo.PlanSectionVO buildPlanSectionResponse(String crossId) {
List<CrossPlanPO> crossPlanPOList = crossPlanMapper.selectByCrossId(crossId);
List<CrossSectionPO> crossSectionPOList = crossSectionMapper.selectByCrossId(crossId);
PlanSectionVO planSectionVO = new PlanSectionVO();
net.wanji.databus.vo.PlanSectionVO planSectionVO = new net.wanji.databus.vo.PlanSectionVO();
planSectionVO.setCrossPlanPOList(crossPlanPOList);
planSectionVO.setCrossSectionPOList(crossSectionPOList);
......@@ -174,12 +170,12 @@ public class StaticInfoServiceImpl implements StaticInfoService {
}
@Override
public PlanSectionVO buildPlanSectionResponse(String crossId, Integer planNo) {
public net.wanji.databus.vo.PlanSectionVO buildPlanSectionResponse(String crossId, Integer planNo) {
List<CrossPlanPO> crossPlanPOList = crossPlanMapper.selectByCrossIdAndPlanNo(crossId, planNo);
Integer planId = crossPlanMapper.selectIdByNo(crossId, planNo);
List<CrossSectionPO> crossSectionPOList = crossSectionMapper.selectByCrossIdAndPlanId(crossId, planId);
PlanSectionVO planSectionVO = new PlanSectionVO();
net.wanji.databus.vo.PlanSectionVO planSectionVO = new net.wanji.databus.vo.PlanSectionVO();
planSectionVO.setCrossPlanPOList(crossPlanPOList);
planSectionVO.setCrossSectionPOList(crossSectionPOList);
......
......@@ -6,11 +6,11 @@ import lombok.extern.slf4j.Slf4j;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.dao.entity.*;
import net.wanji.databus.dao.mapper.*;
import net.wanji.databus.vo.PlanSectionVO;
import net.wanji.databus.vo.SchemePhaseLightsVO;
import net.wanji.utc.common.Result;
import net.wanji.utc.service.staticinfo.WanJiCommonStaticInfoService;
import net.wanji.utc.util.HttpRestUtil;
import net.wanji.utc.vo.PlanSectionVO;
import net.wanji.utc.vo.SchemePhaseLightsVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......
package net.wanji.utc.service.systemadmin;
import com.github.pagehelper.PageInfo;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.dto.systemadmin.DeleteByIntegerIdListDTO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.dto.systemadmin.ManufacturerInsertOrUpdateDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerListDTO;
......
......@@ -3,15 +3,15 @@ package net.wanji.utc.service.systemadmin.impl;
import cn.hutool.core.date.DateUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import net.wanji.databus.dao.mapper.CrossInfoMapper;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.CrossInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.common.exception.IpPortException;
import net.wanji.utc.common.exception.PortFormatException;
import net.wanji.utc.dto.systemadmin.CrossInfoInsertOrUpdateDTO;
import net.wanji.utc.dto.systemadmin.CrossInfoListDTO;
import net.wanji.utc.dto.systemadmin.DeleteByStringIdListDTO;
import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.service.systemadmin.CrossInfoService;
import net.wanji.utc.util.PageUtils;
import net.wanji.utc.vo.systemadmin.CrossInfoListVO;
......
......@@ -2,15 +2,15 @@ package net.wanji.utc.service.systemadmin.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import net.wanji.databus.dao.mapper.ManufacturerApiInfoMapper;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.ManufacturerApiInfoPO;
import net.wanji.utc.common.typeenum.ManufacturerApiInfoTypeEnum;
import net.wanji.utc.dto.systemadmin.DeleteByIntegerIdListDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerApiInfoInsertOrUpdateDTO;
import net.wanji.utc.mapper.ManufacturerApiInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.ManufacturerApiInfoPO;
import net.wanji.utc.dto.systemadmin.ManufacturerApiInfoListDTO;
import net.wanji.utc.service.systemadmin.ManufacturerApiInfoService;
import net.wanji.utc.util.PageUtils;
import net.wanji.utc.dto.systemadmin.DeleteByIntegerIdListDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerApiInfoListDTO;
import net.wanji.utc.vo.systemadmin.ManufacturerApiInfoVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -2,12 +2,12 @@ package net.wanji.utc.service.systemadmin.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.dto.systemadmin.DeleteByIntegerIdListDTO;
import net.wanji.utc.dto.systemadmin.ManufacturerInsertOrUpdateDTO;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.service.systemadmin.ManufacturerService;
import net.wanji.utc.dto.systemadmin.ManufacturerListDTO;
import net.wanji.utc.service.systemadmin.ManufacturerService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......
package net.wanji.utc.task;
import lombok.extern.slf4j.Slf4j;
import net.wanji.databus.dao.mapper.ManufacturerApiInfoMapper;
import net.wanji.databus.dao.mapper.ManufacturerInfoMapper;
import net.wanji.databus.po.ManufacturerApiInfoPO;
import net.wanji.databus.po.ManufacturerInfoPO;
import net.wanji.utc.common.constant.Constants;
import net.wanji.utc.mapper.ManufacturerApiInfoMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.ManufacturerApiInfoPO;
import net.wanji.utc.po.ManufacturerInfoPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.Scheduled;
......
......@@ -3,10 +3,10 @@ package net.wanji.utc.task;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.extern.slf4j.Slf4j;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.databus.po.SignalStatusLogPO;
import net.wanji.databus.vo.LightsStatusVO;
import net.wanji.utc.service.runninginfo.HkLightsStatusService;
import net.wanji.utc.service.runninginfo.SignalStatusService;
import net.wanji.utc.vo.LightsStatusVO;
import net.wanji.utc.websocket.RealTimeDataWebSocket;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.util.List;
/**
* 控制指令VO
*
* @author wuxiaokai
* @date 2022/11/15 15:05:57
*/
@Data
@ApiModel(value = "ControlCommandVO", description = "相位锁定实体类")
public class ControlCommandVO {
@ApiModelProperty(value = "路口编号", notes = "路口编号")
@NotBlank(message = "路口编号不可为空")
@Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossCode;
@ApiModelProperty(value = "1是;0否")
@NotNull(message = "控制类型不可为空,1是;0否")
@Max(value = 1, message = "控制类型:1是;0否")
@Min(value = 0, message = "控制类型:1是;0否")
private Integer command;
@ApiModelProperty(value = "持续时间", notes = "持续时间, 可为空,默认999")
private Integer duration;
@ApiModelProperty(value = "锁定相位列表", notes = "锁定相位列表, 可为空")
private List<Integer> phaseList;
}
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author duanruiming
* @date 2023/04/11 9:26
*/
@Data
@ApiModel(value = "delBaseConfigVO", description = "信号机删除命令实体")
public class DelBaseConfigVO {
@ApiModelProperty(value = "路口编号")
@NotBlank
private String crossId;
@ApiModelProperty(value = "参数类型:4-相位、5-方案、6-计划、7-日期")
@NotNull
private Integer type;
@ApiModelProperty(value = "需要删除对应配置的id列表")
@NotEmpty
private List<Integer> ids;
}
package net.wanji.utc.vo;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.utc.common.commonentity.Direction;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
public class DetailCrossInfoVO extends BaseCrossInfo {
//路口名称
private String crossName;
//路口类型,2行人过街 3 丁字口 4 十字口 5 五岔口 6 六岔口
private String crossType;
private String ip;
private Integer port;
// 版本号
private String version;
// 型号
private String model ;
// 安装时间
private Date installTime;
//经度
private Double lon;
//纬度
private Double lat;
//路口进口方向对象列表
private List<Direction> directions;
}
\ No newline at end of file
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
import net.wanji.utc.entity.SignalRunring;
import java.util.List;
import java.util.Map;
/**
* @author Kent HAN
* @date 2022/11/21 14:04
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class LightsStatusVO extends BaseCrossInfo {
//运行模式
@ApiModelProperty(value = "运行模式 `2=手动锁定当前相位`,`3=手动全红`,`4=手动黄闪`,`5=手动关灯`," +
"`6=全红闪控制`,`7=全黄控制`,`8=正常按计划运行`,`9=手动步进控制`,`10=自动步进控制`,`11=恢复时间表`,`255=临时控制方案`")
private String runMode;
//控制模式
@ApiModelProperty(value = "控制模式")
private String controlMode;
//相位方案号
@ApiModelProperty(value = "相位方案号")
private String phasePlanId;
//相位配时方案
@ApiModelProperty(value = "相位配时方案")
private String timePlanId;
//方案开始时间
@ApiModelProperty(value = "方案开始时间")
private String planStartTime;
//方案运行时间
@ApiModelProperty(value = "方案运行时间")
private Integer runTime;
//相位周期剩余时长
@ApiModelProperty(value = "相位周期剩余时长")
private Integer cycleCountDown;
@ApiModelProperty(value = "相位周期剩余时长")
private Integer cyclePhaseCountDown;
//相位周期时长
@ApiModelProperty(value = "相位周期时长")
private Integer cycleLen;
//运行环数组
private List<SignalRunring> runrings;
//相位编号
@ApiModelProperty(value = "当前相位号")
private String phaseId;
//方案编号
@ApiModelProperty(value = "当前方案号")
private String planId;
//灯组状态
@ApiModelProperty(value = "灯组状态")
private Map<String,Object> dirLampGroupMap;
//相位对象:key:相位编号,value:绿灯时长
@ApiModelProperty(value = "相位对象:key相位编号,value绿灯时长")
private Map<String,Object> phaseMap;
public void setCycleCountDown(Integer cycleCountDown) {
if (null == cycleCountDown) {
this.cycleCountDown = -1;
} else {
this.cycleCountDown = cycleCountDown;
}
}
public Integer getCycleCountDown() {
if (null == cycleCountDown) {
return -1;
}
return cycleCountDown;
}
}
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;
/**
* 下发相位参数VO
*
* @author wuxiaokai
* @date 2022/12/9 11:08:51
*/
@Setter
@Getter
@ApiModel(value = "下发相位参数输入参数", description = "下发相位参数输入参数")
public class PhaseTimingSendVO {
@ApiModelProperty(value = "路口编号", notes = "路口编号")
@NotBlank(message = "路口编号不可为空")
@Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossCode;
@ApiModelProperty(value = "需要下发的相位列表", notes = "需要下发的相位列表")
@NotEmpty(message = "相位列表不可为空")
private List<Phase> phaseList;
/**
* 相位
*/
@Setter
@Getter
public static class Phase {
/**
* 相位号
*/
@ApiModelProperty(value = "相位号", notes = "相位号")
private Integer phaseNo;
/**
* 相位描述
*/
@ApiModelProperty(value = "相位描述", notes = "相位描述")
private String desc;
/**
* 黄灯
*/
@ApiModelProperty(value = "黄灯", notes = "黄灯")
private Integer yellow;
/**
* 全红
*/
@ApiModelProperty(value = "全红", notes = "全红")
private Integer allred;
/**
* 绿闪
*/
@ApiModelProperty(value = "绿闪", notes = "绿闪")
private String greenFlash;
/**
* 红闪
*/
@ApiModelProperty(value = "红闪", notes = "红闪")
private String redFlash;
/**
* 最小绿
*/
@ApiModelProperty(value = "最小绿", notes = "最小绿")
private String minGreen;
/**
* 最大绿
*/
@ApiModelProperty(value = "最大绿", notes = "最大绿")
private String maxGreen;
/**
* 相位关联的车道列表
*/
@ApiModelProperty(value = "相位关联的车道列表", notes = "相位关联的车道列表")
private List<Lane> lanes;
@Setter
@Getter
public static class Lane {
/**
* 车道号
*/
@ApiModelProperty(value = "车道号", notes = "车道号")
private Integer laneNo;
/**
* 方向
*/
@ApiModelProperty(value = "方向", notes = "方向")
private Integer direction;
/**
* 转向
*/
@ApiModelProperty(value = "转向", notes = "转向")
private Integer turn;
}
}
}
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;
/**
* 信号机计划下发VO
*
* @author wuxiaokai
* @date 2022/11/24 15:55:08
*/
@Setter
@Getter
@ApiModel(value = "信号机计划下发输入参数", description = "信号机计划下发输入参数")
public class PlanSendVO {
@ApiModelProperty(value = "路口编号", notes = "路口编号")
@NotBlank(message = "路口编号不可为空")
@Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossCode;
@ApiModelProperty(value = "计划列表", notes = "计划列表")
@NotEmpty(message = "计划列表不可为空")
private List<Plan> planList;
@Setter
@Getter
public static class Plan {
/**
* 计划号
*/
@ApiModelProperty(value = "计划号", notes = "计划号")
private String planNo;
/**
* 计划描述
*/
@ApiModelProperty(value = "计划描述", notes = "计划描述")
private String planDescribe;
/**
* 时段列表
*/
@ApiModelProperty(value = "时段列表", notes = "时段列表")
private List<Section> sectionList;
@Setter
@Getter
public static class Section {
/**
* 时段号
*/
@ApiModelProperty(value = "时段号", notes = "时段号")
private String sectionNo;
/**
* 开始时间
*/
@ApiModelProperty(value = "开始时间", notes = "开始时间")
private String beginTime;
/**
* 结束时间
*/
@ApiModelProperty(value = "结束时间", notes = "结束时间")
private String endTime;
/**
* 控制模式:1定周期;2绿灯;3黄灯;4红灯;5关灯;6绿闪;7黄闪;8红闪
*/
@ApiModelProperty(value = "控制模式:1定周期;2绿灯;3黄灯;4红灯;5关灯;6绿闪;7黄闪;8红闪", notes = "")
private String controlMode;
/**
* 方案号
*/
@ApiModelProperty(value = "方案号", notes = "")
private String patternNo;
}
}
}
package net.wanji.utc.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.wanji.utc.common.baseentity.BaseCrossInfo;
/**
* @author Kent HAN
* @date 2022/11/21 9:44
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class RunningStatusVO extends BaseCrossInfo {
// 信号状态:0离线;1在线
private Integer status;
// 故障类型:0正常;1检测器故障;2时钟故障;3电源故障;4驱动模块故障;5信号灯故障;6箱门开启;7方案错误;8绿冲突;9红全熄;10行人红熄
private Integer faultType;
// 控制模式:1时间表;2全红;3黄闪;4锁定;5中心优化;6MEC优化;7现场手动
private Integer controlType;
}
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;
/**
* 时间表下发VO
*
* @author wuxiaokai
* @date 2022/11/23 14:11:09
*/
@Setter
@Getter
@ApiModel(value = "信号机时间表下发输入参数", description = "信号机时间表下发输入参数")
public class ScheduleSendVO {
@ApiModelProperty(value = "路口编号", notes = "路口编号")
@NotBlank(message = "路口编号不可为空")
@Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossCode;
@ApiModelProperty(value = "时间表", notes = "时间表")
@NotEmpty(message = "时间表不可为空")
private List<Schedule> schedules;
@Setter
@Getter
public static class Schedule {
/**
* 调度号
*/
private String scheduleNo;
/**
* 星期列表
*/
@ApiModelProperty(value = "星期列表", notes = "星期列表")
private List<Week> weeks;
/**
* 特殊日期列表
*/
@ApiModelProperty(value = "特殊日期列表", notes = "特殊日期列表")
private List<SpecialDay> specialDays;
@Setter
@Getter
public static class Week {
@ApiModelProperty(value = "星期", notes = "星期")
private Integer weekNum;
@ApiModelProperty(value = "计划号", notes = "计划号")
private Integer planNo;
}
@Setter
@Getter
public static class SpecialDay {
/**
* 日期 2019-05-01
*/
@ApiModelProperty(value = "日期", notes = "日期")
private String dateStr;
/**
* 计划号
*/
@ApiModelProperty(value = "计划号", notes = "计划号")
private Integer planNo;
}
}
}
package net.wanji.utc.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 信号机方案下发VO
*
* @author wuxiaokai
* @date 2022/12/6 16:14:27
*/
@Setter
@Getter
@ApiModel(value = "信号机方案下发输入参数", description = "信号机方案下发输入参数")
public class SchemeSendVO {
@ApiModelProperty(value = "路口编号", notes = "路口编号")
@NotBlank(message = "路口编号不可为空")
@javax.validation.constraints.Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossCode;
@ApiModelProperty(value = "方案列表", notes = "方案列表")
@NotEmpty(message = "方案列表不可为空")
private List<Pattern> patternList;
/**
* 方案
*/
@Setter
@Getter
public static class Pattern {
/**
* 方案号
*/
@ApiModelProperty(value = "方案号", notes = "")
private String patternNo;
/**
* 方案名称
*/
@ApiModelProperty(value = "方案名称", notes = "")
private String patternName;
/**
* 方案周期
*/
@ApiModelProperty(value = "方案周期", notes = "")
private String cycle;
/**
* 协调相位号
*/
@ApiModelProperty(value = "协调相位号", notes = "")
private String coordPhase;
/**
* 协调相位差
*/
@ApiModelProperty(value = "协调相位差", notes = "协调相位差")
private String offset;
@ApiModelProperty(value = "环列表", notes = "环列表")
private List<Ring> rings;
@Setter
@Getter
public static class Ring {
@ApiModelProperty(value = "环号", notes = "环号")
private String ringNo;
@ApiModelProperty(value = "相位列表", notes = "相位列表")
private List<Phase> phaseList;
/**
* 相位
*/
@Setter
@Getter
public static class Phase {
/**
* 相位号
*/
@ApiModelProperty(value = "相位号", notes = "")
private String phaseNo;
/**
* 相位名称
*/
@ApiModelProperty(value = "相位名称", notes = "")
private String phaseName;
/**
* 相位序号
*/
@ApiModelProperty(value = "相位序号", notes = "")
private String sort;
/**
* 控制模式:1定周期;2绿灯;3黄灯;4红灯;5关灯;6绿闪;7黄闪;8红闪
*/
@ApiModelProperty(value = "控制模式:1定周期;2绿灯;3黄灯;4红灯;5关灯;6绿闪;7黄闪;8红闪", notes = "")
private String controlMode;
/**
* 最小绿灯时间
*/
@ApiModelProperty(value = "最小绿灯时间", notes = "")
private String minGreenTime;
/**
* 最大绿灯时间
*/
@ApiModelProperty(value = "最大绿灯时间", notes = "")
private String maxGreenTime;
/**
* 相位时间
*/
@ApiModelProperty(value = "相位时间", notes = "")
private String phaseTime;
/**
* 绿灯时间
*/
@ApiModelProperty(value = "绿灯时间", notes = "")
private String greenTime;
/**
* 绿闪时间
*/
@ApiModelProperty(value = "绿闪时间", notes = "")
private String greenFlashTime;
/**
* 行闪时间
*/
@ApiModelProperty(value = "行闪时间", notes = "")
private String pedFlashTime;
/**
* 黄灯时间
*/
@ApiModelProperty(value = "黄灯时间", notes = "")
private String yellowTime;
/**
* 红灯时间
*/
@ApiModelProperty(value = "红灯时间", notes = "")
private String redTime;
}
//@Setter
//@Getter
//public static class Lights {
//
// /**
// * 灯组号
// */
// @ApiModelProperty(value = "灯组号", notes = "")
// private String lightsNo;
// /**
// * 灯组名称
// */
// @ApiModelProperty(value = "灯组名称", notes = "")
// private String name;
// /**
// * 灯组类型:1箭头;2圆饼,3行人
// */
// @ApiModelProperty(value = "灯组类型:1箭头2圆饼3行人", notes = "")
// private String type;
// /**
// * 灯组方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北
// */
// @ApiModelProperty(value = "灯组方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北", notes = "")
// private String dir;
// /**
// * 灯组转向:1左转;2右转;3直行;4左掉头;5直左;6直右;7右掉头;8向左合流;9向右合流;10左转加掉头;11右转加掉头;12直行加左掉头;13直行加右掉头;14左转右转;15左直右;16左转右转加掉头;17左直掉头;18左直右掉头;20行人
// */
// @ApiModelProperty(value = "灯组转向:1左转;2右转;3直行;4左掉头;5直左;6直右;7右掉头;8向左合流;9向右合流;10左转加掉头;11右转加掉头;12直行加左掉头;13直行加右掉头;14左转右转;15左直右;16左转右转加掉头;17左直掉头;18左直右掉头;20行人", notes = "")
// private String turn;
// /**
// * 行人进出口:1进口;2出口,3进出口
// */
// @ApiModelProperty(value = "行人进出口:1进口2出口,3进出口", notes = "")
// private String inOutType;
//}
}
}
}
package net.wanji.utc.mapper;
package net.wanji.databus.dao.mapper;
import net.wanji.utc.po.ManufacturerApiInfoPO;
import net.wanji.databus.po.ManufacturerApiInfoPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
package net.wanji.utc.mapper;
package net.wanji.databus.dao.mapper;
import net.wanji.utc.po.SignalStatusLogPO;
import net.wanji.databus.po.SignalStatusLogPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
package net.wanji.utc.dto;
package net.wanji.databus.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package net.wanji.utc.dto;
package net.wanji.databus.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package net.wanji.utc.dto;
package net.wanji.databus.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package net.wanji.utc.dto;
package net.wanji.databus.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package net.wanji.utc.po;
package net.wanji.databus.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
package net.wanji.utc.po;
package net.wanji.databus.po;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package net.wanji.utc.po;
package net.wanji.databus.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
package net.wanji.utc.vo;
package net.wanji.databus.vo;
import lombok.Data;
import lombok.ToString;
......
package net.wanji.utc.vo;
package net.wanji.databus.vo;
import lombok.Data;
import net.wanji.databus.dao.entity.CrossPlanPO;
......
package net.wanji.utc.vo;
package net.wanji.databus.vo;
import lombok.Data;
import net.wanji.databus.dao.entity.CrossLightsPO;
......
package net.wanji.utc.entity;
package net.wanji.databus.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.utc.mapper.CrossInfoMapper">
<resultMap type="net.wanji.utc.po.CrossInfoPO" id="BaseResultMap">
<mapper namespace="net.wanji.databus.dao.mapper.CrossInfoMapper">
<resultMap type="net.wanji.databus.po.CrossInfoPO" id="BaseResultMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="code" column="code"/>
......@@ -26,8 +26,9 @@
</insert>
<insert id="insertOne">
insert into t_cross_info(id, name,code,manufacturer_id,ip,port,location,version,model,install_time)
values (#{id},#{name},#{code},#{manufacturerId},#{ip},#{port},#{location},#{version},#{model},#{installTime})
insert into t_cross_info(id, name, code, manufacturer_id, ip, port, location, version, model, install_time)
values (#{id}, #{name}, #{code}, #{manufacturerId}, #{ip}, #{port}, #{location}, #{version}, #{model},
#{installTime})
</insert>
<update id="updateOne">
......@@ -107,13 +108,24 @@
</delete>
<delete id="deleteById">
delete from t_cross_info
delete
from t_cross_info
where id = #{id}
</delete>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select
id,name,code,manufacturer_id,ip,port,location,version,model,install_time,gmt_create,gmt_modified
select id,
name,
code,
manufacturer_id,
ip,
port,
location,
version,
model,
install_time,
gmt_create,
gmt_modified
from t_cross_info
where id = #{key}
</select>
......@@ -130,24 +142,57 @@
<select id="selectIdByCodeAndManufacturerId" resultType="java.lang.String">
select id
from t_cross_info
where code = #{crossCode} and manufacturer_id = #{manufacturerId}
where code = #{crossCode}
and manufacturer_id = #{manufacturerId}
</select>
<select id="selectByCode" resultMap="BaseResultMap">
select
id,name,code,manufacturer_id,ip,port,location,version,model,install_time,gmt_create,gmt_modified
select id,
name,
code,
manufacturer_id,
ip,
port,
location,
version,
model,
install_time,
gmt_create,
gmt_modified
from t_cross_info
where code = #{code}
</select>
<select id="selectByManufacturerId" resultMap="BaseResultMap">
select id,name,code,manufacturer_id,ip,port,location,version,model,install_time,gmt_create,gmt_modified
select id,
name,
code,
manufacturer_id,
ip,
port,
location,
version,
model,
install_time,
gmt_create,
gmt_modified
from t_cross_info
where manufacturer_id = #{manufacturerId}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id,name,code,manufacturer_id,ip,port,location,version,model,install_time,gmt_create,gmt_modified
select id,
name,
code,
manufacturer_id,
ip,
port,
location,
version,
model,
install_time,
gmt_create,
gmt_modified
from t_cross_info
</select>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.utc.mapper.ManufacturerApiInfoMapper">
<resultMap type="net.wanji.utc.po.ManufacturerApiInfoPO" id="BaseResultMap">
<mapper namespace="net.wanji.databus.dao.mapper.ManufacturerApiInfoMapper">
<resultMap type="net.wanji.databus.po.ManufacturerApiInfoPO" id="BaseResultMap">
<result property="id" column="id"/>
<result property="code" column="code"/>
<result property="name" column="name"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.utc.mapper.ManufacturerInfoMapper">
<resultMap type="net.wanji.utc.po.ManufacturerInfoPO" id="BaseResultMap">
<mapper namespace="net.wanji.databus.dao.mapper.ManufacturerInfoMapper">
<resultMap type="net.wanji.databus.po.ManufacturerInfoPO" id="BaseResultMap">
<result property="id" column="id"/>
<result property="code" column="code"/>
<result property="name" column="name"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.utc.mapper.SignalStatusLogMapper">
<resultMap type="net.wanji.utc.po.SignalStatusLogPO" id="BaseResultMap">
<mapper namespace="net.wanji.databus.dao.mapper.SignalStatusLogMapper">
<resultMap type="net.wanji.databus.po.SignalStatusLogPO" id="BaseResultMap">
<result property="id" column="id" />
<result property="signalId" column="signal_id"/>
<result property="status" column="status"/>
......
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