Commit 53feba75 authored by duanruiming's avatar duanruiming

[update] 实体类日期优化,新增字段优化

parent 3ae72e4c
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -25,8 +26,10 @@ public class BaseCrossPlanPO { ...@@ -25,8 +26,10 @@ public class BaseCrossPlanPO {
private String crossId ; private String crossId ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "") @ApiModelProperty(value = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "") @ApiModelProperty(value = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -43,9 +44,11 @@ public class BaseCrossSchemePO { ...@@ -43,9 +44,11 @@ public class BaseCrossSchemePO {
private Integer status = 0 ; private Integer status = 0 ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "") @ApiModelProperty(name = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(name = "修改时间",notes = "") @ApiModelProperty(name = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
@Override @Override
......
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -25,8 +26,10 @@ public class CrossPhaseLightsPO { ...@@ -25,8 +26,10 @@ public class CrossPhaseLightsPO {
private String crossId ; private String crossId ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "") @ApiModelProperty(name = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(name = "修改时间",notes = "") @ApiModelProperty(name = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -76,8 +77,10 @@ public class CrossPhasePO { ...@@ -76,8 +77,10 @@ public class CrossPhasePO {
private Integer maxGreenTime= 0 ; private Integer maxGreenTime= 0 ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "") @ApiModelProperty(name = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(name = "修改时间",notes = "") @ApiModelProperty(name = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -34,8 +35,10 @@ public class CrossSchedulesPO { ...@@ -34,8 +35,10 @@ public class CrossSchedulesPO {
private Date specialDate ; private Date specialDate ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "") @ApiModelProperty(value = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "") @ApiModelProperty(value = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -36,8 +37,10 @@ public class CrossSectionPO { ...@@ -36,8 +37,10 @@ public class CrossSectionPO {
private Integer schemeId; private Integer schemeId;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "") @ApiModelProperty(value = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "") @ApiModelProperty(value = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
package net.wanji.databus.po; package net.wanji.databus.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -38,8 +39,10 @@ public class BaseCrossLightsPO { ...@@ -38,8 +39,10 @@ public class BaseCrossLightsPO {
private Integer inOutType ; private Integer inOutType ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "") @ApiModelProperty(name = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(name = "修改时间",notes = "") @ApiModelProperty(name = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
package net.wanji.databus.po;
import lombok.Data;
import net.wanji.databus.dao.entity.*;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* @author duanruiming
* @date 2024/01/22 9:32
*/
@Data
public class SaveToUtcPO implements Serializable {
@NotEmpty
private List<BaseCrossLightsPO> lightsPOS;
@NotEmpty
private List<CrossPhasePO> phasePOS;
@NotEmpty
private List<CrossPhaseLightsPO> phaseLightsPOS;
@NotEmpty
private List<BaseCrossPlanPO> planPOS;
@NotEmpty
private List<BaseCrossSchemePO> schemePOS;
@NotEmpty
private List<CrossSectionPO> sectionPOS;
@NotEmpty
private List<CrossSchedulesPO> schedulesPOS;
}
...@@ -58,18 +58,15 @@ ...@@ -58,18 +58,15 @@
</select> </select>
<!-- 查询调度基础信息列表 --> <!-- 查询调度基础信息列表 -->
<select id="listCrossSchedulesInfo" parameterType="String" resultMap="BaseResultMap"> <select id="listCrossSchedulesInfo" parameterType="String" resultType="net.wanji.databus.dao.entity.CrossSchedulesPO">
select select schedule_no,name,s.cross_id,p.plan_id, p.week, p.special_date
id from t_base_cross_schedules s
,plan_no left join t_base_cross_schedules_plan p on s.cross_id = p.cross_id and s.id = p.schedules_id
,name <where>
,cross_id
from
t_base_cross_plan
where 1=1
<if test="crossId != null and crossId != ''"> <if test="crossId != null and crossId != ''">
and cross_id = #{crossId} and s.cross_id = #{crossId}
</if> </if>
</where>
</select> </select>
<resultMap type="net.wanji.databus.dao.entity.BaseCrossSchedulesPlanPO" id="CrossSchedulesPlanPO"> <resultMap type="net.wanji.databus.dao.entity.BaseCrossSchedulesPlanPO" id="CrossSchedulesPlanPO">
......
...@@ -9,22 +9,31 @@ ...@@ -9,22 +9,31 @@
<result property="crossId" column="cross_id"/> <result property="crossId" column="cross_id"/>
<result property="planId" column="plan_id"/> <result property="planId" column="plan_id"/>
<result property="ringNo" column="ring_no"/> <result property="ringNo" column="ring_no"/>
<result property="groupNo" column="group_no"/>
<result property="phaseType" column="phase_type"/>
<result property="controlMode" column="control_mode"/> <result property="controlMode" column="control_mode"/>
<result property="phaseTime" column="phase_time"/> <result property="phaseTime" column="phase_time"/>
<result property="greenTime" column="green_time"/> <result property="greenTime" column="green_time"/>
<result property="greenFlashTime" column="green_flash_time"/> <result property="greenFlashTime" column="green_flash_time"/>
<result property="pedFlashTime" column="ped_flash_time"/> <result property="pedFlashTime" column="ped_flash_time"/>
<result property="yellowTime" column="yellow_time"/> <result property="yellowTime" column="yellow_time"/>
<result property="yellowFlashTime" column="yellow_flash_time"/>
<result property="redTime" column="red_time"/> <result property="redTime" column="red_time"/>
<result property="redFlashTime" column="red_flash_time"/>
<result property="minGreenTime" column="min_green_time"/> <result property="minGreenTime" column="min_green_time"/>
<result property="maxGreenTime" column="max_green_time"/> <result property="maxGreenTime" column="max_green_time"/>
<result property="gmtCreate" column="gmt_create"/> <result property="gmtCreate" column="gmt_create"/>
<result property="gmtModified" column="gmt_modified"/> <result property="gmtModified" column="gmt_modified"/>
</resultMap> </resultMap>
<sql id="baseColumn">
id,phase_no,name,sort,cross_id,plan_id,ring_no,group_no,phast_type,control_mode,phase_time,green_time,
green_flash_time,yellow_flash_time,ped_flash_time,yellow_time,yellow_flash_time,red_time,red_flash_time,min_green_time,max_green_time
</sql>
<insert id="insertOne" keyProperty="id" useGeneratedKeys="true"> <insert id="insertOne" keyProperty="id" useGeneratedKeys="true">
insert into t_cross_phase(phase_no,name,sort,cross_id,plan_id,ring_no,control_mode,phase_time,green_time,green_flash_time,ped_flash_time,yellow_time,red_time,min_green_time,max_green_time) insert into t_cross_phase(phase_no,name,sort,cross_id,plan_id,ring_no,group_no,phase_type,control_mode,phase_time,green_time,green_flash_time,ped_flash_time,yellow_time,yellow_flash_time,red_time,red_flash_time,min_green_time,max_green_time)
values (#{phaseNo},#{name},#{sort},#{crossId},#{planId},#{ringNo},#{controlMode},#{phaseTime},#{greenTime},#{greenFlashTime},#{pedFlashTime},#{yellowTime},#{redTime},#{minGreenTime},#{maxGreenTime}) values (#{phaseNo},#{name},#{sort},#{crossId},#{planId},#{ringNo},#{groupNo},#{phaseType},#{controlMode},#{phaseTime},#{greenTime},#{greenFlashTime},#{pedFlashTime},#{yellowTime},#{yellowFlashTime},#{redTime},#{redFlashTime},#{minGreenTime},#{maxGreenTime})
</insert> </insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
...@@ -55,11 +64,6 @@ ...@@ -55,11 +64,6 @@
where cross_id = #{crossId} where cross_id = #{crossId}
</delete> </delete>
<sql id="baseColumn">
id,phase_no,name,sort,cross_id,plan_id,ring_no,control_mode,phase_time,green_time,
green_flash_time,ped_flash_time,yellow_time,red_time,min_green_time,max_green_time
</sql>
<select id="selectByCrossIdAndPlanId" resultMap="BaseResultMap"> <select id="selectByCrossIdAndPlanId" resultMap="BaseResultMap">
select select
<include refid="baseColumn"/> <include refid="baseColumn"/>
......
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