Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
mengff 9 months ago
parent
commit
59e1001526
  1. 37
      zc-business/src/main/java/com/zc/business/domain/DcWarning.java
  2. 10
      zc-business/src/main/java/com/zc/business/utils/BoardContentUtils.java
  3. 6
      zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
  4. 2
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

37
zc-business/src/main/java/com/zc/business/domain/DcWarning.java

@ -96,11 +96,46 @@ public class DcWarning extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
private Date completeTime;
//月度参数
private String quarter;
//事件原因
@Excel(name = "事件原因")
private String eventCause;
//完结时间
@Excel(name = "完结时间")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
//操作员
private String userName;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Date getCompleteTime() {
return completeTime;
}
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
public String getEventCause() {
return eventCause;
}
public void setEventCause(String eventCause) {
this.eventCause = eventCause;
}
public String getQuarter() {
return quarter;
}

10
zc-business/src/main/java/com/zc/business/utils/BoardContentUtils.java

@ -204,12 +204,12 @@ public class BoardContentUtils {
icon = ImageIO.read(new File(templatePath + "/shoufei.png"));
g.drawImage(icon,70,2,33,40,null);
imgDTO = ImageDTO.createImageDTO("长清大学城收费站",new Color(255,255,0),new Font("Default", Font.BOLD, 20), 105, 2);
imgDTO = ImageDTO.createImageDTO("孝里收费站",new Color(255,255,0),new Font("Default", Font.BOLD, 20), 105, 2);
g.setColor(imgDTO.getColor()); //根据图片的背景设置水印颜色
g.setFont(imgDTO.getFont()); //设置字体
g.drawString(imgDTO.getText(), imgDTO.getX(), imgDTO.getY()); //画出水印
imgDTO = ImageDTO.createImageDTO("14.7KM 10分钟",new Color(255,255,0),new Font("Default", Font.BOLD, 20), 105, 22);
imgDTO = ImageDTO.createImageDTO("15.2KM 10分钟",new Color(255,255,0),new Font("Default", Font.BOLD, 20), 105, 22);
g.setColor(imgDTO.getColor()); //根据图片的背景设置水印颜色
g.setFont(imgDTO.getFont()); //设置字体
g.drawString(imgDTO.getText(), imgDTO.getX(), imgDTO.getY()); //画出水印
@ -230,7 +230,7 @@ public class BoardContentUtils {
g.setFont(imgDTO.getFont()); //设置字体
g.drawString(imgDTO.getText(), imgDTO.getX(), imgDTO.getY()); //画出水印
imgDTO = ImageDTO.createImageDTO("17.7KM 15分钟",new Color(255,255,0),new Font("Default", Font.BOLD, 20), 485, 22);
imgDTO = ImageDTO.createImageDTO("7.7KM 5分钟",new Color(255,255,0),new Font("Default", Font.BOLD, 20), 485, 22);
g.setColor(imgDTO.getColor()); //根据图片的背景设置水印颜色
g.setFont(imgDTO.getFont()); //设置字体
g.drawString(imgDTO.getText(), imgDTO.getX(), imgDTO.getY()); //画出水印
@ -313,10 +313,10 @@ public class BoardContentUtils {
// DcBoardImgLane boardImgLane = new DcBoardImgLane(BoardIconEnum.SPEED_LIMIT_120,BoardIconEnum.SPEED_LIMIT_120,BoardIconEnum.SPEED_LIMIT_100,BoardIconEnum.SPEED_LIMIT_80,BoardIconEnum.EMERGENCY_LANE);
// DcBoardImgLane boardImgLane = new DcBoardImgLane(BoardIconEnum.STRAIGHT_TRAVEL,BoardIconEnum.LEFT_DETOUR,BoardIconEnum.LANE_PROHIBITION,BoardIconEnum.RIGHT_DETOUR,BoardIconEnum.EMERGENCY_LANE);
DcBoardImgLane boardImgLane = new DcBoardImgLane(BoardIconEnum.LANE_PROHIBITION,BoardIconEnum.RIGHT_DETOUR,BoardIconEnum.STRAIGHT_TRAVEL,BoardIconEnum.STRAIGHT_TRAVEL,BoardIconEnum.EMERGENCY_LANE);
//车道通行场景
// BoardContentUtils.writeLaneImage(boardImgLane);
BoardContentUtils.writeLaneImage(boardImgLane);
//服务设施场景

6
zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml

@ -16,6 +16,7 @@
<select id="selectWarningById" resultType="com.zc.business.domain.DcWarning">
SELECT DISTINCT warning.`id`,warning.`stake_mark`, warning.`direction`,
warning.duration,
user.user_name,warning.event_cause,warning.end_time,
mark.longitude,mark.latitude,warning.lane,warning.vehicle_type vehicleType,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`,
@ -23,6 +24,7 @@
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`,
warning.`other_config` FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark and mark.direction=warning.direction
LEFT JOIN sys_user as user on user.user_id=warning.user_id
where warning.`id`=#{id}
</select>
<select id="selectPerceivedEventsList" resultType="com.zc.business.domain.DcWarning">
@ -40,8 +42,8 @@
<if test="warningSource != null and warningSource != ''"> and warning.warning_source = #{warningSource}</if>
<if test="direction != null and direction != ''"> and warning.direction = #{direction}</if>
<if test="stakeMark != null and stakeMark != ''"> and warning.stake_mark = #{stakeMark}</if>
<if test="startTime != null and endTime != null ">
and warning.warning_time between #{startTime} and #{endTime}</if>
<if test="startTime != null and completeTime != null ">
and warning.warning_time between #{startTime} and #{completeTime}</if>
</where>
order by warning.warning_time desc
</select>

2
zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="export" resultType="com.zc.business.domain.DcWarning">
SELECT warning.`id`,warning.`stake_mark`, warning.`direction`,
SELECT warning.`id`,warning.`stake_mark`, warning.`direction`,warning.end_time,warning.event_cause,
mark.longitude,mark.latitude,warning.lane,warning.vehicle_type,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`,

Loading…
Cancel
Save