Commit 53feba75 authored by duanruiming's avatar duanruiming

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

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