Commit 11f5d1f9 authored by duanruiming's avatar duanruiming

[update] 优化持久层

parent 19a822bf
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<module>wj-databus</module> <module>wj-databus</module>
<module>wj-identity</module> <module>wj-identity</module>
<module>wj-portal</module> <module>wj-portal</module>
<module>signal-communication-service</module> <module>signal-utc-dt-service</module>
</modules> </modules>
<!-- 依赖版本 --> <!-- 依赖版本 -->
......
package net.wanji.com.pojo.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/**
* @author Kent HAN
* @date 2022/11/15 9:57
*/
@Data
@ApiModel(value = "CrossInfoDTO", description = "查询信号路口基础信息输入参数")
public class CrossInfoDTO {
@ApiModelProperty(value = "厂商代码 HK")
@NotBlank
@Pattern(regexp = "^[A-Z]*$", message = "厂商代码只能包含大写英文字母")
String manufacturerCode;
}
package net.wanji.com.pojo.dto;
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.Pattern;
import java.util.List;
/**
* @author Kent HAN
* @date 2022/11/18 17:15
*/
@Data
@ApiModel(value = "CrossSchedulesDTO", description = "查询时间表数据输入参数")
public class CrossSchedulesDTO {
@ApiModelProperty(value = "厂商代码 HK")
@NotBlank
@Pattern(regexp = "^[A-Z]*$", message = "厂商代码只能包含大写英文字母")
String manufacturerCode;
@ApiModelProperty(value = "路口列表")
@NotEmpty
List<String> crossIdList;
}
package net.wanji.com.pojo.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
* @author Kent HAN
* @date 2022/11/15 9:57
*/
@Data
@ApiModel(value = "PlanSectionDTO", description = "查询计划数据-计划信息、时段信息输入参数")
public class PlanSectionDTO {
@ApiModelProperty(value = "路口ID")
@Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossId;
@ApiModelProperty(value = "计划号,-1代表所有")
@NotNull(message = "最小为-1,查所有")
@Min(value = -1, message = "最小为-1,查所有")
private Integer planNo;
}
package net.wanji.com.pojo.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Pattern;
/**
* @author Kent HAN
* @date 2022/11/16 13:23
*/
@Data
@ApiModel(value = "SchemePhaseLightsDTO", description = "查询方案数据-方案信息、相位信息、灯组信息输入参数")
public class SchemePhaseLightsDTO {
@ApiModelProperty(value = "路口ID")
@Pattern(regexp = "^[A-Za-z0-9]{11}$", message = "路口编号只能包含英文、数字,必须11个字符")
private String crossId;
}
package net.wanji.com.pojo.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.com.pojo.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.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/18 13:20
*/
@Data
public class CrossLightsPO {
/** 灯组ID */
@ApiModelProperty(value = "灯组ID",notes = "")
private Integer id ;
/** 灯组号 */
@ApiModelProperty(value = "灯组号",notes = "")
private String lightsNo ;
/** 灯组名称 */
@ApiModelProperty(value = "灯组名称",notes = "")
private String name ;
/** 灯组类型:1箭头;2圆饼,3行人 */
@ApiModelProperty(value = "灯组类型:1箭头2圆饼3行人",notes = "")
private Integer type ;
/** 灯组方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北 */
@ApiModelProperty(value = "灯组方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北",notes = "")
private Integer 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 Integer turn ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 行人进出口:1进口;2出口,3进出口 */
@ApiModelProperty(value = "行人进出口:1进口2出口3进出口",notes = "")
private Integer inOutType ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/18 14:32
*/
@Data
public class CrossPhaseLightsPO {
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Integer id ;
/** 灯组ID */
@ApiModelProperty(name = "灯组ID",notes = "")
private Integer lightsId ;
/** 相位ID */
@ApiModelProperty(name = "相位ID",notes = "")
private Integer phaseId ;
/** 路口ID */
@ApiModelProperty(name = "路口ID",notes = "")
private String crossId ;
/** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(name = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/18 8:49
*/
@Data
public class CrossPhasePO {
/** 相位ID */
@ApiModelProperty(value = "相位ID",notes = "")
private Integer id ;
/** 相位号 */
@ApiModelProperty(value = "相位号",notes = "")
private String phaseNo;
/** 相位名称 */
@ApiModelProperty(value = "相位名称",notes = "")
private String name ;
/** 相位序号 */
@ApiModelProperty(value = "相位序号",notes = "")
private Integer sort ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 方案ID */
@ApiModelProperty(value = "方案ID",notes = "")
private Integer planId ;
/** 环号 */
@ApiModelProperty(value = "环号",notes = "")
private Integer ringNo ;
/** 控制模式:1定周期;2绿灯;3黄灯;4红灯;5关灯;6绿闪;7黄闪;8红闪 */
@ApiModelProperty(value = "控制模式:1定周期;2绿灯;3黄灯;4红灯;5关灯;6绿闪;7黄闪;8红闪",notes = "")
private Integer controlMode ;
/** 相位时间 */
@ApiModelProperty(value = "相位时间",notes = "")
private Integer phaseTime ;
/** 绿灯时间 */
@ApiModelProperty(value = "绿灯时间",notes = "")
private Integer greenTime ;
/** 绿闪时间 */
@ApiModelProperty(value = "绿闪时间",notes = "")
private Integer greenFlashTime ;
/** 行闪时间 */
@ApiModelProperty(value = "行闪时间",notes = "")
private Integer pedFlashTime ;
/** 黄灯时间 */
@ApiModelProperty(value = "黄灯时间",notes = "")
private Integer yellowTime ;
/** 红灯时间 */
@ApiModelProperty(value = "红灯时间",notes = "")
private Integer redTime ;
/** 最小绿灯时间 */
@ApiModelProperty(value = "最小绿灯时间",notes = "")
private Integer minGreenTime ;
/** 最大绿灯时间 */
@ApiModelProperty(value = "最大绿灯时间",notes = "")
private Integer maxGreenTime ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/18 15:52
*/
@Data
public class CrossPlanPO {
/** 计划ID */
@ApiModelProperty(value = "计划ID",notes = "")
private Integer id ;
/** 计划号 */
@ApiModelProperty(value = "计划号",notes = "")
private String planNo ;
/** 计划名称 */
@ApiModelProperty(value = "计划名称",notes = "")
private String name ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/18 18:37
*/
@Data
public class CrossSchedulesPO {
/** 日期ID */
@ApiModelProperty(value = "日期ID",notes = "")
private Integer id ;
/** 日期编号 */
@ApiModelProperty(value = "日期编号",notes = "")
private Integer scheduleNo ;
/** 日期名称 */
@ApiModelProperty(value = "日期名称",notes = "")
private String name ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 计划ID */
@ApiModelProperty(value = "计划ID",notes = "")
private Integer planId ;
/** 星期:1周一;2周二,3周三,4周四,5周五,6周六,7周日,0特殊日期 */
@ApiModelProperty(value = "星期:1周一",notes = "2周二,3周三,4周四,5周五,6周六,7周日,0特殊日期")
private Integer week ;
/** 特殊日期 */
@ApiModelProperty(value = "特殊日期",notes = "")
private Date specialDate ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/16 16:09
*/
@Data
public class CrossSchemePO {
/** 方案ID */
@ApiModelProperty(value = "方案ID",notes = "")
private Integer id ;
/** 方案号 */
@ApiModelProperty(value = "方案号",notes = "")
private String schemeNo;
/** 方案名称 */
@ApiModelProperty(value = "方案名称",notes = "")
private String name ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 周期 */
@ApiModelProperty(value = "周期",notes = "")
private Integer cycle ;
/** 协调相位ID */
@ApiModelProperty(value = "协调相位ID",notes = "")
private Integer coordPhase ;
/** 相位差 */
@ApiModelProperty(value = "相位差",notes = "")
private Integer offset ;
/** 数据来源:1信号机;2平台 */
@ApiModelProperty(value = "数据来源:1信号机;2平台",notes = "")
private Integer source ;
/** 删除标识:1删除;0未删除 */
@ApiModelProperty(value = "删除标识:1删除;0未删除",notes = "")
private Integer isDeleted ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/18 16:14
*/
@Data
public class CrossSectionPO {
/** 时段ID */
@ApiModelProperty(value = "时段ID",notes = "")
private Integer id ;
/** 时段号 */
@ApiModelProperty(value = "时段号",notes = "")
private String sectionNo ;
/** 开始时间 */
@ApiModelProperty(value = "开始时间",notes = "")
private String startTime ;
/** 结束时间 */
@ApiModelProperty(value = "结束时间",notes = "")
private String endTime ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 计划ID */
@ApiModelProperty(value = "计划ID",notes = "")
private Integer planId ;
/** 控制模式:1定周期;2绿波协调;3黄闪;4全红;5关灯;6单点自适应;7全感应;8半感应;9 */
@ApiModelProperty(value = "控制模式:1定周期;2绿波协调;3黄闪;4全红;5关灯;6单点自适应;7全感应;8半感应;9",notes = "")
private Integer controlMode ;
/** 方案ID */
@ApiModelProperty(value = "方案ID",notes = "")
private Integer scemeId ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/15 13:41
*/
@Data
public class ManufacturerApiInfoPO {
/** 接口ID */
@ApiModelProperty(value = "接口ID",notes = "")
private Integer id ;
/** 接口代码 */
@ApiModelProperty(value = "接口代码",notes = "")
private String code ;
/** 接口名称 */
@ApiModelProperty(value = "接口名称",notes = "")
private String name ;
/** 接口类型:1、静态;2、动态;3、控制 */
@ApiModelProperty(value = "接口类型:1、静态;2、动态;3、控制",notes = "")
private Integer type ;
/** 请求方式:GET、POST */
@ApiModelProperty(value = "请求方式:GET、POST",notes = "")
private String method ;
/** 接口地址 */
@ApiModelProperty(value = "接口地址",notes = "")
private String address ;
/** 厂商ID */
@ApiModelProperty(value = "厂商ID",notes = "")
private Integer manufacturerId ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/15 16:47
*/
@Data
@ApiModel(value = "ManufacturerInfoPO", description = "查询厂商列表返回值")
public class ManufacturerInfoPO {
/** 厂商ID */
@ApiModelProperty(value = "厂商ID",notes = "")
private Integer id ;
/** 厂商代码 */
@ApiModelProperty(value = "厂商代码",notes = "")
private String code ;
/** 厂商名称 */
@ApiModelProperty(value = "厂商名称",notes = "")
private String name ;
/** 厂商简称 */
@ApiModelProperty(value = "厂商简称",notes = "")
private String nickName ;
/** 平台地址 */
@ApiModelProperty(value = "平台地址",notes = "")
private String address ;
/** 维护单位 */
@ApiModelProperty(value = "维护单位",notes = "")
private String maintenanceUnit ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "")
private Date gmtModified ;
}
package net.wanji.com.pojo.po;
import lombok.Data;
import java.util.HashMap;
@Data
public class SignalLampStatus {
//信号机编号
private String signalId;
//运行模式
private Integer runmodel;
//方案号
private String planId;
//周期
private Integer cycleLen;
//当前步
private Integer stepNo;
//周期剩余时长
private Integer cycleCountDown;
//相位号
private String phaseId;
//当前步已走时间
private Integer stepGoneTime;
//方向灯组状态
private HashMap<String, HashMap<String, String>> dirLampGroupMap;
//存放当前方案每个相位的时长
HashMap<String, Integer> phaseMap;
//记录灯态变更时间
Long updateTime = Long.valueOf(0);
/**
* 信号机厂商编号
*/
private String signalType;
/**
* 当前步长
*/
private Integer stepLen;
/**
* 当前步剩余时长
*/
private Integer stepSurplusTime;
/**
* 相位内步号
*/
private Integer stepNum;
}
\ No newline at end of file
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "SignalRunring", description = "信号机运行环数实体")
public class SignalRunring {
//绿灯1
@ApiModelProperty(value = "绿灯1时长")
private Integer oneTime;
//绿灯2
@ApiModelProperty(value = "绿灯2时长")
private Integer twoTime;
//绿灯3
@ApiModelProperty(value = "绿灯3时长")
private Integer threeTime;
//黄灯4
@ApiModelProperty(value = "黄灯4时长")
private Integer fourTime;
//红灯5
@ApiModelProperty(value = "红灯5时长")
private Integer fiveTime;
//环号
@ApiModelProperty(value = "环号")
private String runringNo;
//当前相位编号
@ApiModelProperty(value = "当前相位编号")
private String phaseId;
//相位时长
@ApiModelProperty(value = "相位时长")
private Integer phaseLen;
//相位剩余时长
@ApiModelProperty(value = "相位剩余时长")
private Integer phaseLeft;
//当前步号
@ApiModelProperty(value = "当前步号")
private Integer stepNo;
//当前步类型
@ApiModelProperty(value = "当前步类型")
private Integer stepType;
//当前步长
@ApiModelProperty(value = "当前步长")
private Integer stepLen;
//当前步剩余时间
@ApiModelProperty(value = "当前步剩余时间")
private Integer stepLeft;
//下一相位id
@ApiModelProperty(value = "下一相位id")
private String nextPhaseId;
//相位顺序号
@ApiModelProperty(value = "相位顺序号")
private Integer phaseOrderId;
//当前灯色
@ApiModelProperty(value = "当前灯色")
private Integer lampStatus;
//当前说明
// 11 灭灯
// 21 红灯
// 22 黄灯
// 23 绿灯
// 31 红黄
@ApiModelProperty(value = "当前灯色")
private String lampStatusName;
}
\ No newline at end of file
package net.wanji.com.pojo.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/11/21 11:18
*/
@Data
public class SignalStatusLogPO {
/** 日志ID */
@ApiModelProperty(value = "日志ID",notes = "")
private Integer id ;
/** 路口ID */
@ApiModelProperty(value = "路口ID",notes = "")
private String crossId ;
/** 信号机ID */
@ApiModelProperty(value = "信号机ID",notes = "")
@NotBlank(message = "信号机ID不能为空")
@Pattern(regexp = "^[\\w\\-]{1,50}$", message = "信号机ID只能包含英文、数字、下划线和中横线,1~50个字符")
private String signalId ;
// @Pattern(regexp = "^[\\u4E00-\\u9FA5\\w\\-]{0,20}$", messsage="信号机名称只能包含中文、英文、数字、下划线和中横线,0~20个字符")
/** 信号状态:0离线;1在线 */
@ApiModelProperty(value = "信号状态:0离线;1在线",notes = "")
private Integer status ;
/** 故障类型:0正常;1检测器故障;2时钟故障;3电源故障;4驱动模块故障;5信号灯故障;6箱门开启;7方案错误;8绿冲突;9红全熄;10行人红熄; */
@ApiModelProperty(value = "故障类型:0正常;1检测器故障;2时钟故障;3电源故障;4驱动模块故障;5信号灯故障;6箱门开启;7方案错误;8绿冲突;9红全熄;10行人红熄;",notes = "")
private Integer faultType ;
/** 控制类型:1时间表;2全红;3黄闪;4锁定;5中心优化;6MEC优化;7现场手动 */
@ApiModelProperty(value = "控制类型:1时间表;2全红;3黄闪;4锁定;5中心优化;6MEC优化;7现场手动",notes = "")
private Integer controlType ;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "")
private Date gmtCreate ;
}
package net.wanji.com.pojo.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.com.pojo.vo;
import lombok.Data;
import lombok.ToString;
@Data
@ToString
public class CrossLanesVo {
/** 通道号 */
private Integer channelNo;
/** 车道号 */
private Integer laneNo;
/** 方向 */
private Integer direction;
/** 转向 */
private Integer turn;
/** 灯组类型 */
private Integer lampGroupType;
}
\ No newline at end of file
package net.wanji.com.pojo.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.com.pojo.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.com.pojo.vo;
import lombok.Data;
import net.wanji.com.pojo.po.CrossPlanPO;
import net.wanji.com.pojo.po.CrossSectionPO;
import java.util.List;
/**
* @author Kent HAN
* @date 2022/12/1 14:07
*/
@Data
public class PlanSectionVO {
private List<CrossPlanPO> crossPlanPOList;
private List<CrossSectionPO> crossSectionPOList;
}
package net.wanji.com.pojo.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.com.pojo.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.com.pojo.vo;
import lombok.Data;
import net.wanji.com.pojo.po.CrossLightsPO;
import net.wanji.com.pojo.po.CrossPhaseLightsPO;
import net.wanji.com.pojo.po.CrossPhasePO;
import net.wanji.com.pojo.po.CrossSchemePO;
import java.util.List;
/**
* @author Kent HAN
* @date 2022/12/1 11:23
*/
@Data
public class SchemePhaseLightsVO {
private List<CrossSchemePO> crossSchemeList;
private List<CrossPhasePO> crossPhaseList;
private List<CrossLightsPO> crossLightsList;
private List<CrossPhaseLightsPO> crossPhaseLightsPOList;
}
package net.wanji.com.pojo.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.com.service.protocol.impl;
import net.wanji.com.pojo.po.CrossInfoPO;
import net.wanji.com.service.protocol.ProtocolConversionService;
/**
* @author duanruiming
* @date 2023/05/08 15:38
*/
public class DTProtocolConversionServiceImpl implements ProtocolConversionService {
@Override
public String protocolConvert(CrossInfoPO crossInfo) {
return null;
}
}
<?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.com.mapper.ManufacturerInfoMapper">
<resultMap type="net.wanji.com.pojo.po.ManufacturerInfoPO" id="BaseResultMap">
<result property="id" column="id"/>
<result property="code" column="code"/>
<result property="name" column="name"/>
<result property="nickName" column="nick_name"/>
<result property="address" column="address"/>
<result property="maintenanceUnit" column="maintenance_unit"/>
<result property="gmtCreate" column="gmt_create"/>
<result property="gmtModified" column="gmt_modified"/>
</resultMap>
<insert id="insertOne">
insert into t_manufacturer_info(code, name, nick_name, address, maintenance_unit)
values (#{code}, #{name}, #{nickName}, #{address}, #{maintenanceUnit})
</insert>
<update id="updateOne">
update t_manufacturer_info
<set>
<if test="code != null and code != ''">
code = #{code},
</if>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="nickName != null and nickName != ''">
nick_name = #{nickName},
</if>
<if test="address != null and address != ''">
address = #{address},
</if>
<if test="maintenanceUnit != null and maintenanceUnit != ''">
maintenance_unit = #{maintenanceUnit},
</if>
</set>
where id = #{id}
</update>
<delete id="deleteBatch">
delete from t_manufacturer_info
where id in
<foreach collection="ids" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</delete>
<select id="selectByCode" resultMap="BaseResultMap">
select id,
code,
name,
nick_name,
address,
maintenance_unit,
gmt_create,
gmt_modified
from t_manufacturer_info
where code = #{code}
</select>
<select id="selectById" resultMap="BaseResultMap">
select id,
code,
name,
nick_name,
address,
maintenance_unit,
gmt_create,
gmt_modified
from t_manufacturer_info
where id = #{manufacturerId}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id,
code,
name,
nick_name,
address,
maintenance_unit,
gmt_create,
gmt_modified
from t_manufacturer_info
</select>
<select id="selectByOptionalPartialName" resultMap="BaseResultMap">
select id,code,name,nick_name,address,maintenance_unit,gmt_create,gmt_modified
from t_manufacturer_info
<where>
<if test="name != null and name != ''">
AND name LIKE CONCAT('%',#{name},'%')
</if>
</where>
order by id
</select>
<select id="selectIdByNick" resultType="java.lang.Integer">
select id
from t_manufacturer_info
where nick_name = #{manufacturerNick}
</select>
<select id="selectNickById" resultType="java.lang.String">
select nick_name
from t_manufacturer_info
where id = #{manufacturerId}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.com.mapper.TCrossInfoMapper">
<resultMap type="net.wanji.com.pojo.po.CrossInfoPO" id="BaseResultMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="code" column="code"/>
<result property="manufacturerId" column="manufacturer_id"/>
<result property="ip" column="ip"/>
<result property="port" column="port"/>
<result property="location" column="location"/>
<result property="version" column="version"/>
<result property="model" column="model"/>
<result property="installTime" column="install_time"/>
<result property="gmtCreate" column="gmt_create"/>
<result property="gmtModified" column="gmt_modified"/>
</resultMap>
<!-- 批量新增数据 -->
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into t_cross_info(id,name,code,manufacturer_id,ip,port,location,version,model,install_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.id},#{entity.name},#{entity.code},#{entity.manufacturerId},#{entity.ip},#{entity.port},#{entity.location},#{entity.version},#{entity.model},#{entity.installTime})
</foreach>
</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>
<update id="updateOne">
update t_cross_info
<set>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="code != null and code != ''">
code = #{code},
</if>
<if test="manufacturerId != null and manufacturerId != ''">
manufacturer_id = #{manufacturerId},
</if>
<if test="ip != null and ip != ''">
ip = #{ip},
</if>
<if test="port != null and port != ''">
port = #{port},
</if>
<if test="location != null and location != ''">
location = #{location},
</if>
<if test="version != null and version != ''">
version = #{version},
</if>
<if test="model != null and model != ''">
model = #{model},
</if>
<if test="installTime != null">
install_time = #{installTime},
</if>
</set>
where id = #{id}
</update>
<update id="updateOneByCodeAndManufacturerId">
update t_cross_info
<set>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="code != null and code != ''">
code = #{code},
</if>
<if test="manufacturerId != null and manufacturerId != ''">
manufacturer_id = #{manufacturerId},
</if>
<if test="ip != null and ip != ''">
ip = #{ip},
</if>
<if test="port != null and port != ''">
port = #{port},
</if>
<if test="location != null and location != ''">
location = #{location},
</if>
<if test="version != null and version != ''">
version = #{version},
</if>
<if test="model != null and model != ''">
model = #{model},
</if>
<if test="installTime != null">
install_time = #{installTime},
</if>
</set>
where code = #{code} and manufacturer_id = #{manufacturerId}
</update>
<delete id="deleteBatch">
delete from t_cross_info
where id in
<foreach collection="ids" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</delete>
<delete id="deleteById">
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
from t_cross_info
where id = #{key}
</select>
<select id="selectCrossCodesByIds" resultType="java.lang.String">
select code
from t_cross_info
where id in
<foreach collection="entities" item="entity" separator="," open="(" close=")">
#{entity}
</foreach>
</select>
<select id="selectIdByCodeAndManufacturerId" resultType="java.lang.String">
select id
from t_cross_info
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
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
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
from t_cross_info
</select>
<select id="selectByOptionals" resultMap="BaseResultMap">
select id,name,code,manufacturer_id,ip,port,location,version,model,install_time,gmt_create,gmt_modified
from t_cross_info
<where>
<if test="crossName != null and crossName != ''">
AND name LIKE CONCAT('%',#{crossName},'%')
</if>
<if test="manufacturerId != null and manufacturerId != 0">
AND manufacturer_id = #{manufacturerId}
</if>
</where>
</select>
</mapper>
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