Browse Source

数据库字段修改

develop
lau572 1 year ago
parent
commit
bc1b8479f1
  1. 10
      zc-business/src/main/java/com/zc/business/domain/DcBoardReleaseLog.java
  2. 2
      zc-business/src/main/java/com/zc/business/domain/DcDevice.java
  3. 12
      zc-business/src/main/java/com/zc/business/domain/DcEventHistory.java
  4. 2
      zc-business/src/main/java/com/zc/business/domain/DcEventMap.java
  5. 2
      zc-business/src/main/java/com/zc/business/domain/DcFacility.java
  6. 12
      zc-business/src/main/java/com/zc/business/domain/DcOrganization.java
  7. 12
      zc-business/src/main/java/com/zc/business/domain/DcWarning.java
  8. 2
      zc-business/src/main/java/com/zc/business/mapper/DcPerceivedEventsWarningMapper.java
  9. 6
      zc-business/src/main/java/com/zc/business/service/impl/DcDeviceServiceImpl.java
  10. 4
      zc-business/src/main/java/com/zc/business/service/impl/DcFacilityServiceImpl.java
  11. 4
      zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml
  12. 10
      zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml
  13. 2
      zc-business/src/main/resources/mapper/business/DcEventConstructionMapper.xml
  14. 12
      zc-business/src/main/resources/mapper/business/DcEventHistoryMapper.xml
  15. 10
      zc-business/src/main/resources/mapper/business/DcEventMapper.xml
  16. 2
      zc-business/src/main/resources/mapper/business/DcEventServiceAreaMapper.xml
  17. 2
      zc-business/src/main/resources/mapper/business/DcEventTrafficCongestionMapper.xml
  18. 2
      zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml
  19. 10
      zc-business/src/main/resources/mapper/business/DcOrganizationMapper.xml
  20. 32
      zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
  21. 2
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

10
zc-business/src/main/java/com/zc/business/domain/DcBoardReleaseLog.java

@ -37,7 +37,7 @@ public class DcBoardReleaseLog extends BaseEntity
/** 桩号 */ /** 桩号 */
@Excel(name = "桩号") @Excel(name = "桩号")
@ApiModelProperty(value="桩号") @ApiModelProperty(value="桩号")
private String stakeMarkId; private String stakeMark;
/** 方向1-上行,2-中,3-下行 */ /** 方向1-上行,2-中,3-下行 */
@Excel(name = "方向1-上行,2-中,3-下行") @Excel(name = "方向1-上行,2-中,3-下行")
@ -118,12 +118,12 @@ public class DcBoardReleaseLog extends BaseEntity
return deviceName; return deviceName;
} }
public String getStakeMarkId() { public String getStakeMark() {
return stakeMarkId; return stakeMark;
} }
public void setStakeMarkId(String stakeMarkId) { public void setStakeMark(String stakeMark) {
this.stakeMarkId = stakeMarkId; this.stakeMark = stakeMark;
} }
public String getDirection() { public String getDirection() {

2
zc-business/src/main/java/com/zc/business/domain/DcDevice.java

@ -22,7 +22,7 @@ public class DcDevice {
@ApiModelProperty("产品ID") @ApiModelProperty("产品ID")
private Long productId; private Long productId;
@ApiModelProperty("桩号") @ApiModelProperty("桩号")
private String stakeMarkId; private String stakeMark;
@ApiModelProperty("方向1-上行(菏泽方向),2-中,3-下行(济南方向)") @ApiModelProperty("方向1-上行(菏泽方向),2-中,3-下行(济南方向)")
private String direction; private String direction;
@ApiModelProperty("设备名称") @ApiModelProperty("设备名称")

12
zc-business/src/main/java/com/zc/business/domain/DcEventHistory.java

@ -28,7 +28,7 @@ public class DcEventHistory extends BaseEntity
/** $column.columnComment */ /** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String stakeMarkId; private String stakeMark;
/** 1- /** 1-
2- 2-
@ -127,14 +127,14 @@ public class DcEventHistory extends BaseEntity
{ {
return groupId; return groupId;
} }
public void setStakeMarkId(String stakeMarkId) public void setStakeMark(String stakeMark)
{ {
this.stakeMarkId = stakeMarkId; this.stakeMark = stakeMark;
} }
public String getStakeMarkId() public String getStakeMark()
{ {
return stakeMarkId; return stakeMark;
} }
public void setDirection(String direction) public void setDirection(String direction)
{ {
@ -286,7 +286,7 @@ public class DcEventHistory extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("groupId", getGroupId()) .append("groupId", getGroupId())
.append("stakeMarkId", getStakeMarkId()) .append("stakeMark", getStakeMark())
.append("direction", getDirection()) .append("direction", getDirection())
.append("roadId", getRoadId()) .append("roadId", getRoadId())
.append("startTime", getStartTime()) .append("startTime", getStartTime())

2
zc-business/src/main/java/com/zc/business/domain/DcEventMap.java

@ -48,7 +48,7 @@ public class DcEventMap {
@ApiModelProperty("机构地址") @ApiModelProperty("机构地址")
private String organizationAddress; private String organizationAddress;
@ApiModelProperty("机构所在桩号") @ApiModelProperty("机构所在桩号")
private String dcOrganizationStakeMarkId; private String dcOrganizationStakeMark;
@ApiModelProperty("车牌号") @ApiModelProperty("车牌号")
private String vehiclePlate; private String vehiclePlate;
@ApiModelProperty("车辆类型") @ApiModelProperty("车辆类型")

2
zc-business/src/main/java/com/zc/business/domain/DcFacility.java

@ -18,7 +18,7 @@ public class DcFacility {
@ApiModelProperty("ID") @ApiModelProperty("ID")
private Long id; private Long id;
@ApiModelProperty("桩号") @ApiModelProperty("桩号")
private String stakeMarkId; private String stakeMark;
@ApiModelProperty("方向") @ApiModelProperty("方向")
private String direction; private String direction;
@ApiModelProperty("道路标识") @ApiModelProperty("道路标识")

12
zc-business/src/main/java/com/zc/business/domain/DcOrganization.java

@ -39,7 +39,7 @@ public class DcOrganization extends TreeEntity
/** 桩号 */ /** 桩号 */
@ApiModelProperty("桩号") @ApiModelProperty("桩号")
@Excel(name = "桩号") @Excel(name = "桩号")
private String stakeMarkId; private String stakeMark;
/** 救援单位 */ /** 救援单位 */
@ApiModelProperty("救援单位") @ApiModelProperty("救援单位")
@ -119,14 +119,14 @@ public class DcOrganization extends TreeEntity
{ {
return organizationAddress; return organizationAddress;
} }
public void setStakeMarkId(String stakeMarkId) public void setStakeMark(String stakeMark)
{ {
this.stakeMarkId = stakeMarkId; this.stakeMark = stakeMark;
} }
public String getStakeMarkId() public String getStakeMark()
{ {
return stakeMarkId; return stakeMark;
} }
public void setRescueUnit(String rescueUnit) public void setRescueUnit(String rescueUnit)
{ {
@ -155,7 +155,7 @@ public class DcOrganization extends TreeEntity
.append("organizationType", getOrganizationType()) .append("organizationType", getOrganizationType())
.append("organizationName", getOrganizationName()) .append("organizationName", getOrganizationName())
.append("organizationAddress", getOrganizationAddress()) .append("organizationAddress", getOrganizationAddress())
.append("stakeMarkId", getStakeMarkId()) .append("stakeMark", getStakeMark())
.append("rescueUnit", getRescueUnit()) .append("rescueUnit", getRescueUnit())
.append("description", getDescription()) .append("description", getDescription())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

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

@ -23,7 +23,7 @@ public class DcWarning extends BaseEntity
/** 所在桩号 */ /** 所在桩号 */
@Excel(name = "所在桩号") @Excel(name = "所在桩号")
private String stakeMarkId; private String stakeMark;
/** 方向 /** 方向
1-上行 1-上行
@ -179,14 +179,14 @@ public class DcWarning extends BaseEntity
{ {
return id; return id;
} }
public void setStakeMarkId(String stakeMarkId) public void setStakeMark(String stakeMark)
{ {
this.stakeMarkId = stakeMarkId; this.stakeMark = stakeMark;
} }
public String getStakeMarkId() public String getStakeMark()
{ {
return stakeMarkId; return stakeMark;
} }
public void setDirection(String direction) public void setDirection(String direction)
{ {
@ -292,7 +292,7 @@ public class DcWarning extends BaseEntity
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("stakeMarkId", getStakeMarkId()) .append("stakeMark", getStakeMark())
.append("direction", getDirection()) .append("direction", getDirection())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("warningState", getWarningState()) .append("warningState", getWarningState())

2
zc-business/src/main/java/com/zc/business/mapper/DcPerceivedEventsWarningMapper.java

@ -56,7 +56,7 @@ public interface DcPerceivedEventsWarningMapper {
//查询某个路段下的全部桩号 //查询某个路段下的全部桩号
List<HashMap<String,Object>> selectSectionMark(DcWarning dcWarning); List<HashMap<String,Object>> selectSectionMark(DcWarning dcWarning);
//根据桩号查询条数 //根据桩号查询条数
String selectSectionNumber(@Param("stakeMarkId") String markId,@Param("direction") String direction); String selectSectionNumber(@Param("stakeMark") String markId,@Param("direction") String direction);
//预警事件,事件列表 查询状态为上报的感知事件 //预警事件,事件列表 查询状态为上报的感知事件
List<HashMap<String,Object>> selectWarningEscalation(DcWarning dcWarning); List<HashMap<String,Object>> selectWarningEscalation(DcWarning dcWarning);
//修改感知事件信息 //修改感知事件信息

6
zc-business/src/main/java/com/zc/business/service/impl/DcDeviceServiceImpl.java

@ -61,8 +61,8 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i
} }
// 木桩 // 木桩
if (StringUtils.hasText(dcDevice.getStakeMarkId())) { if (StringUtils.hasText(dcDevice.getStakeMark())) {
queryWrapper.eq(DcDevice::getStakeMarkId, dcDevice.getStakeMarkId()); queryWrapper.eq(DcDevice::getStakeMark, dcDevice.getStakeMark());
} }
// 设备名称 // 设备名称
@ -281,7 +281,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i
public DcStakeMark exampleQueryTheAssociatedPileNumber(DcDevice dcDevice) { public DcStakeMark exampleQueryTheAssociatedPileNumber(DcDevice dcDevice) {
DcStakeMark dcStakeMark = new DcStakeMark(); DcStakeMark dcStakeMark = new DcStakeMark();
dcStakeMark.setDirection(dcDevice.getDirection()); dcStakeMark.setDirection(dcDevice.getDirection());
dcStakeMark.setId(dcDevice.getStakeMarkId()); dcStakeMark.setId(dcDevice.getStakeMark());
List<DcStakeMark> dcStakeMarks = dcStakeMarkService.listStakeMark(dcStakeMark); List<DcStakeMark> dcStakeMarks = dcStakeMarkService.listStakeMark(dcStakeMark);
if (dcStakeMarks.size() == 1) { if (dcStakeMarks.size() == 1) {
return dcStakeMarks.get(0); return dcStakeMarks.get(0);

4
zc-business/src/main/java/com/zc/business/service/impl/DcFacilityServiceImpl.java

@ -34,8 +34,8 @@ public class DcFacilityServiceImpl extends ServiceImpl<DcFacilityMapper, DcFacil
} }
// 木桩 // 木桩
if (StringUtils.hasText(dcFacility.getStakeMarkId())) { if (StringUtils.hasText(dcFacility.getStakeMark())) {
queryWrapper.eq(DcFacility::getStakeMarkId, dcFacility.getStakeMarkId()); queryWrapper.eq(DcFacility::getStakeMark, dcFacility.getStakeMark());
} }
// 方向 // 方向

4
zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml

@ -17,12 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="releaseUserId" column="release_user_id" /> <result property="releaseUserId" column="release_user_id" />
<result property="platform" column="platform" /> <result property="platform" column="platform" />
<result property="releaseIp" column="release_ip" /> <result property="releaseIp" column="release_ip" />
<result property="stakeMarkId" column="stake_mark_id" /> <result property="stakeMark" column="stake_mark" />
<result property="direction" column="direction" /> <result property="direction" column="direction" />
</resultMap> </resultMap>
<sql id="selectDcBoardReleaseLogVo"> <sql id="selectDcBoardReleaseLogVo">
select t1.id, t1.device_id, t2.device_name,t2.stake_mark_id, t2.direction,t1.release_content, t1.release_status, select t1.id, t1.device_id, t2.device_name,t2.stake_mark, t2.direction,t1.release_content, t1.release_status,
t1.release_time,t1.release_dept_name,t1.release_dept_id,t1.release_user_name,t1.release_user_id,t1.platform,release_ip t1.release_time,t1.release_dept_name,t1.release_dept_id,t1.release_user_name,t1.release_user_id,t1.platform,release_ip
from dc_board_release_log t1 from dc_board_release_log t1
left join dc_device t2 on t1.device_id = t2.iot_device_id left join dc_device t2 on t1.device_id = t2.iot_device_id

10
zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml

@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="iotDeviceId" column="iot_device_id"/> <result property="iotDeviceId" column="iot_device_id"/>
<result property="groupId" column="group_id"/> <result property="groupId" column="group_id"/>
<result property="productId" column="product_id"/> <result property="productId" column="product_id"/>
<result property="stakeMarkId" column="stake_mark_id"/> <result property="stakeMark" column="stake_mark"/>
<result property="direction" column="direction"/> <result property="direction" column="direction"/>
<result property="deviceName" column="device_name"/> <result property="deviceName" column="device_name"/>
<result property="deviceCode" column="device_code"/> <result property="deviceCode" column="device_code"/>
@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
iot_device_id, iot_device_id,
group_id, group_id,
product_id, product_id,
stake_mark_id, stake_mark,
direction, direction,
device_name, device_name,
device_code, device_code,
@ -60,17 +60,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcDeviceList" parameterType="dcDevice" resultMap="DcDevice"> <select id="selectDcDeviceList" parameterType="dcDevice" resultMap="DcDevice">
select t1.id, t1.iot_device_id, t1.group_id, t1.product_id, t1.stake_mark_id, t1.direction, t1.device_name, t1.device_code, t1.device_type, select t1.id, t1.iot_device_id, t1.group_id, t1.product_id, t1.stake_mark, t1.direction, t1.device_name, t1.device_code, t1.device_type,
t1.installation_Date,t1.production_date,t1.durable_years,t1.installation_site,t1.use_state,t1.device_state,t1.other_config,t1.remark,t1.create_time,t1.update_time, t1.installation_Date,t1.production_date,t1.durable_years,t1.installation_site,t1.use_state,t1.device_state,t1.other_config,t1.remark,t1.create_time,t1.update_time,
t2.longitude,t2.latitude t2.longitude,t2.latitude
from dc_device t1 from dc_device t1
left join dc_stake_mark t2 on t1.stake_mark_id = t2.id and t1.direction = t2.direction left join dc_stake_mark t2 on t1.stake_mark = t2.id and t1.direction = t2.direction
<where> <where>
<if test="id != null and id != ''">and t1.id = #{id}</if> <if test="id != null and id != ''">and t1.id = #{id}</if>
<if test="iotDeviceId != null and iotDeviceId != ''">and t1.iot_device_id = #{iotDeviceId}</if> <if test="iotDeviceId != null and iotDeviceId != ''">and t1.iot_device_id = #{iotDeviceId}</if>
<if test="groupId != null and groupId != ''">and t1.group_id = #{groupId}</if> <if test="groupId != null and groupId != ''">and t1.group_id = #{groupId}</if>
<if test="productId != null and productId != ''">and t1.product_id = #{productId}</if> <if test="productId != null and productId != ''">and t1.product_id = #{productId}</if>
<if test="stakeMarkId != null and stakeMarkId != ''">and t1.stake_mark_id = #{stakeMarkId}</if> <if test="stakeMark != null and stakeMark != ''">and t1.stake_mark = #{stakeMark}</if>
<if test="direction != null and direction != ''">and t1.direction = #{direction}</if> <if test="direction != null and direction != ''">and t1.direction = #{direction}</if>
<if test="deviceName != null and deviceName != ''">and t1.device_name like concat('%', #{deviceName}, '%')</if> <if test="deviceName != null and deviceName != ''">and t1.device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceCode != null and deviceCode != ''">and t1.device_code = #{deviceCode}</if> <if test="deviceCode != null and deviceCode != ''">and t1.device_code = #{deviceCode}</if>

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

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dcFacility.facilityName" column="facility_name" /> <result property="dcFacility.facilityName" column="facility_name" />
<result property="dcFacility.facilityType" column="facility_type" /> <result property="dcFacility.facilityType" column="facility_type" />
<result property="dcFacility.direction" column="direction" /> <result property="dcFacility.direction" column="direction" />
<result property="dcFacility.stakeMarkId" column="stake_mark" /> <result property="dcFacility.stakeMark" column="stake_mark" />
<result property="dcFacility.remark" column="remark" /> <result property="dcFacility.remark" column="remark" />
<result property="dcFacility.otherConfig" column="other_config" /> <result property="dcFacility.otherConfig" column="other_config" />
</resultMap> </resultMap>

12
zc-business/src/main/resources/mapper/business/DcEventHistoryMapper.xml

@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.zc.business.domain.DcEventHistory" id="DcEventHistoryResult"> <resultMap type="com.zc.business.domain.DcEventHistory" id="DcEventHistoryResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="groupId" column="group_id" /> <result property="groupId" column="group_id" />
<result property="stakeMarkId" column="stake_mark_id" /> <result property="stakeMark" column="stake_mark" />
<result property="direction" column="direction" /> <result property="direction" column="direction" />
<result property="roadId" column="road_id" /> <result property="roadId" column="road_id" />
<result property="startTime" column="start_time" /> <result property="startTime" column="start_time" />
@ -30,14 +30,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDcEventHistoryVo"> <sql id="selectDcEventHistoryVo">
select id, group_id, stake_mark_id, direction, road_id, start_time, end_time, event_level, event_category, event_type, event_subclass, event_cause, impact_level, description, handling_person, handling_result, other_config, event_source, event_nature, remark, create_time, update_time from dc_event_history select id, group_id, stake_mark, direction, road_id, start_time, end_time, event_level, event_category, event_type, event_subclass, event_cause, impact_level, description, handling_person, handling_result, other_config, event_source, event_nature, remark, create_time, update_time from dc_event_history
</sql> </sql>
<select id="selectDcEventHistoryList" parameterType="DcEventHistory" resultMap="DcEventHistoryResult"> <select id="selectDcEventHistoryList" parameterType="DcEventHistory" resultMap="DcEventHistoryResult">
<include refid="selectDcEventHistoryVo"/> <include refid="selectDcEventHistoryVo"/>
<where> <where>
<if test="groupId != null "> and group_id = #{groupId}</if> <if test="groupId != null "> and group_id = #{groupId}</if>
<if test="stakeMarkId != null and stakeMarkId != ''"> and stake_mark_id = #{stakeMarkId}</if> <if test="stakeMark != null and stakeMark != ''"> and stake_mark = #{stakeMark}</if>
<if test="direction != null and direction != ''"> and direction = #{direction}</if> <if test="direction != null and direction != ''"> and direction = #{direction}</if>
<if test="roadId != null "> and road_id = #{roadId}</if> <if test="roadId != null "> and road_id = #{roadId}</if>
<if test="startTime != null "> and start_time = #{startTime}</if> <if test="startTime != null "> and start_time = #{startTime}</if>
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="groupId != null">group_id,</if> <if test="groupId != null">group_id,</if>
<if test="stakeMarkId != null and stakeMarkId != ''">stake_mark_id,</if> <if test="stakeMark != null and stakeMark != ''">stake_mark,</if>
<if test="direction != null and direction != ''">direction,</if> <if test="direction != null and direction != ''">direction,</if>
<if test="roadId != null">road_id,</if> <if test="roadId != null">road_id,</if>
<if test="startTime != null">start_time,</if> <if test="startTime != null">start_time,</if>
@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="groupId != null">#{groupId},</if> <if test="groupId != null">#{groupId},</if>
<if test="stakeMarkId != null and stakeMarkId != ''">#{stakeMarkId},</if> <if test="stakeMark != null and stakeMark != ''">#{stakeMark},</if>
<if test="direction != null and direction != ''">#{direction},</if> <if test="direction != null and direction != ''">#{direction},</if>
<if test="roadId != null">#{roadId},</if> <if test="roadId != null">#{roadId},</if>
<if test="startTime != null">#{startTime},</if> <if test="startTime != null">#{startTime},</if>
@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update dc_event_history update dc_event_history
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="groupId != null">group_id = #{groupId},</if> <if test="groupId != null">group_id = #{groupId},</if>
<if test="stakeMarkId != null and stakeMarkId != ''">stake_mark_id = #{stakeMarkId},</if> <if test="stakeMark != null and stakeMark != ''">stake_mark = #{stakeMark},</if>
<if test="direction != null and direction != ''">direction = #{direction},</if> <if test="direction != null and direction != ''">direction = #{direction},</if>
<if test="roadId != null">road_id = #{roadId},</if> <if test="roadId != null">road_id = #{roadId},</if>
<if test="startTime != null">start_time = #{startTime},</if> <if test="startTime != null">start_time = #{startTime},</if>

10
zc-business/src/main/resources/mapper/business/DcEventMapper.xml

@ -107,7 +107,7 @@
<result property="dcEventMap.organizationType" column="organization_type"/> <result property="dcEventMap.organizationType" column="organization_type"/>
<result property="dcEventMap.organizationName" column="organization_name"/> <result property="dcEventMap.organizationName" column="organization_name"/>
<result property="dcEventMap.organizationAddress" column="organization_address"/> <result property="dcEventMap.organizationAddress" column="organization_address"/>
<result property="dcEventMap.dcOrganizationStakeMarkId" column="dc_organization_stake_mark_id"/> <result property="dcEventMap.dcOrganizationStakeMark" column="dc_organization_stake_mark"/>
<result property="dcEventMap.dcOrganizationDescription" column="dc_organization_description"/> <result property="dcEventMap.dcOrganizationDescription" column="dc_organization_description"/>
<result property="dcEventMap.vehiclePlate" column="vehicle_plate"/> <result property="dcEventMap.vehiclePlate" column="vehicle_plate"/>
<result property="dcEventMap.vehicleType" column="vehicle_type"/> <result property="dcEventMap.vehicleType" column="vehicle_type"/>
@ -264,7 +264,7 @@
dc_organization.organization_type, dc_organization.organization_type,
dc_organization.organization_name, dc_organization.organization_name,
dc_organization.organization_address, dc_organization.organization_address,
dc_organization.stake_mark_id AS dc_organization_stake_mark_id, dc_organization.stake_mark AS dc_organization_stake_mark,
dc_organization.rescue_unit, dc_organization.rescue_unit,
dc_organization.description AS dc_organization_description, dc_organization.description AS dc_organization_description,
dc_vehicles.vehicle_plate, dc_vehicles.vehicle_plate,
@ -424,11 +424,11 @@
FROM dc_event FROM dc_event
LEFT JOIN dc_event_type ON dc_event_type.event_type = dc_event.event_type LEFT JOIN dc_event_type ON dc_event_type.event_type = dc_event.event_type
LEFT JOIN dc_stake_mark on dc_stake_mark.stake_mark = dc_event.stake_mark LEFT JOIN dc_stake_mark on dc_stake_mark.stake_mark = dc_event.stake_mark and dc_stake_mark.direction = dc_event.description
LEFT JOIN dc_road_section on dc_stake_marks.section_id = dc_road_section.id LEFT JOIN dc_road_section on dc_stake_mark.section_id = dc_road_section.id
LEFT JOIN dc_road on dc_road_section.road_id = dc_road.id LEFT JOIN dc_road on dc_road_section.road_id = dc_road.id
-- &#45;&#45; 关联机构表 -- &#45;&#45; 关联机构表
LEFT JOIN dc_organization ON dc_stake_marks.stake_mark = dc_organization.stake_mark LEFT JOIN dc_organization ON dc_stake_mark.stake_mark = dc_organization.stake_mark
where dc_event.id = #{id} where dc_event.id = #{id}

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

@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dcFacility.facilityName" column="facility_name" /> <result property="dcFacility.facilityName" column="facility_name" />
<result property="dcFacility.facilityType" column="facility_type" /> <result property="dcFacility.facilityType" column="facility_type" />
<result property="dcFacility.direction" column="direction" /> <result property="dcFacility.direction" column="direction" />
<result property="dcFacility.stakeMarkId" column="stake_mark" /> <result property="dcFacility.stakeMark" column="stake_mark" />
<result property="dcFacility.remark" column="remark" /> <result property="dcFacility.remark" column="remark" />
<result property="dcFacility.otherConfig" column="other_config" /> <result property="dcFacility.otherConfig" column="other_config" />
</resultMap> </resultMap>

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

@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dcFacility.facilityName" column="facility_name" /> <result property="dcFacility.facilityName" column="facility_name" />
<result property="dcFacility.facilityType" column="facility_type" /> <result property="dcFacility.facilityType" column="facility_type" />
<result property="dcFacility.direction" column="direction" /> <result property="dcFacility.direction" column="direction" />
<result property="dcFacility.stakeMarkId" column="stake_mark" /> <result property="dcFacility.stakeMark" column="stake_mark" />
<result property="dcFacility.remark" column="remark" /> <result property="dcFacility.remark" column="remark" />
<result property="dcFacility.otherConfig" column="other_config" /> <result property="dcFacility.otherConfig" column="other_config" />

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

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dcFacility.facilityName" column="facility_name" /> <result property="dcFacility.facilityName" column="facility_name" />
<result property="dcFacility.facilityType" column="facility_type" /> <result property="dcFacility.facilityType" column="facility_type" />
<result property="dcFacility.direction" column="direction" /> <result property="dcFacility.direction" column="direction" />
<result property="dcFacility.stakeMarkId" column="stake_mark" /> <result property="dcFacility.stakeMark" column="stake_mark" />
<result property="dcFacility.remark" column="remark" /> <result property="dcFacility.remark" column="remark" />
<result property="dcFacility.otherConfig" column="other_config" /> <result property="dcFacility.otherConfig" column="other_config" />

10
zc-business/src/main/resources/mapper/business/DcOrganizationMapper.xml

@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="organizationType" column="organization_type" /> <result property="organizationType" column="organization_type" />
<result property="organizationName" column="organization_name" /> <result property="organizationName" column="organization_name" />
<result property="organizationAddress" column="organization_address" /> <result property="organizationAddress" column="organization_address" />
<result property="stakeMarkId" column="stake_mark_id" /> <result property="stakeMark" column="stake_mark" />
<result property="rescueUnit" column="rescue_unit" /> <result property="rescueUnit" column="rescue_unit" />
<result property="description" column="description" /> <result property="description" column="description" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectDcOrganizationVo"> <sql id="selectDcOrganizationVo">
select id,direction, parent_id, select id,direction, parent_id,
organization_type, organization_name, organization_type, organization_name,
organization_address, stake_mark_id, organization_address, stake_mark,
rescue_unit, description, create_time, rescue_unit, description, create_time,
update_time from dc_organization update_time from dc_organization
</sql> </sql>
@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="organizationType != null">organization_type,</if> <if test="organizationType != null">organization_type,</if>
<if test="organizationName != null and organizationName != ''">organization_name,</if> <if test="organizationName != null and organizationName != ''">organization_name,</if>
<if test="organizationAddress != null">organization_address,</if> <if test="organizationAddress != null">organization_address,</if>
<if test="stakeMarkId != null">stake_mark_id,</if> <if test="stakeMark != null">stake_mark,</if>
<if test="rescueUnit != null">rescue_unit,</if> <if test="rescueUnit != null">rescue_unit,</if>
<if test="description != null">`description`,</if> <if test="description != null">`description`,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="organizationType != null">#{organizationType},</if> <if test="organizationType != null">#{organizationType},</if>
<if test="organizationName != null and organizationName != ''">#{organizationName},</if> <if test="organizationName != null and organizationName != ''">#{organizationName},</if>
<if test="organizationAddress != null">#{organizationAddress},</if> <if test="organizationAddress != null">#{organizationAddress},</if>
<if test="stakeMarkId != null">#{stakeMarkId},</if> <if test="stakeMark != null">#{stakeMark},</if>
<if test="rescueUnit != null">#{rescueUnit},</if> <if test="rescueUnit != null">#{rescueUnit},</if>
<if test="description != null">#{description},</if> <if test="description != null">#{description},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="organizationType != null">organization_type = #{organizationType},</if> <if test="organizationType != null">organization_type = #{organizationType},</if>
<if test="organizationName != null and organizationName != ''">organization_name = #{organizationName},</if> <if test="organizationName != null and organizationName != ''">organization_name = #{organizationName},</if>
<if test="organizationAddress != null">organization_address = #{organizationAddress},</if> <if test="organizationAddress != null">organization_address = #{organizationAddress},</if>
<if test="stakeMarkId != null">stake_mark_id = #{stakeMarkId},</if> <if test="stakeMark != null">stake_mark = #{stakeMark},</if>
<if test="rescueUnit != null">rescue_unit = #{rescueUnit},</if> <if test="rescueUnit != null">rescue_unit = #{rescueUnit},</if>
<if test="description != null">description = #{description},</if> <if test="description != null">description = #{description},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>

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

@ -15,14 +15,14 @@
</select> </select>
<select id="selectPerceivedEventsList" resultType="com.zc.business.domain.DcWarning"> <select id="selectPerceivedEventsList" resultType="com.zc.business.domain.DcWarning">
SELECT warning.`id`,warning.`stake_mark_id`, warning.`direction`, SELECT warning.`id`,warning.`stake_mark`, warning.`direction`,
mark.longitude,mark.latitude,warning.lane, mark.longitude,mark.latitude,warning.lane,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`, warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`, warning.`user_id`, warning.`warning_source`,warning.`warning_level`,
warning.`remark`, warning.`create_time`,warning.`update_time`, warning.`remark`, warning.`create_time`,warning.`update_time`,
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`,
warning.`other_config` FROM dc_warning AS warning warning.`other_config` FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON mark.id=warning.stake_mark_id LEFT JOIN dc_stake_mark AS mark ON mark.id=warning.stake_mark
<where> <where>
<if test="warningType != null and warningType != ''"> and warning_type = #{warningType}</if> <if test="warningType != null and warningType != ''"> and warning_type = #{warningType}</if>
<if test="warningSubclass != null and warningSubclass != ''"> and warning_subclass = #{warningSubclass}</if> <if test="warningSubclass != null and warningSubclass != ''"> and warning_subclass = #{warningSubclass}</if>
@ -30,7 +30,7 @@
</select> </select>
<select id="selectSectionPerceivedEventsList" resultType="hashmap"> <select id="selectSectionPerceivedEventsList" resultType="hashmap">
SELECT COUNT(1) as number,section.section_name sectionName FROM dc_warning AS warning SELECT COUNT(1) as number,section.section_name sectionName FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
LEFT JOIN dc_road_section AS section ON mark.section_id=section.id LEFT JOIN dc_road_section AS section ON mark.section_id=section.id
where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d')
group by section.section_name group by section.section_name
@ -38,7 +38,7 @@
</select> </select>
<select id="selectSectionPerceivedNumber" resultType="java.util.HashMap"> <select id="selectSectionPerceivedNumber" resultType="java.util.HashMap">
SELECT COUNT(1) as number,section.section_name sectionName FROM dc_warning AS warning SELECT COUNT(1) as number,section.section_name sectionName FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
LEFT JOIN dc_road_section AS section ON mark.section_id=section.id LEFT JOIN dc_road_section AS section ON mark.section_id=section.id
where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d')
group by section.section_name group by section.section_name
@ -76,7 +76,7 @@
<select id="selectWarningTrendDay" resultType="java.util.HashMap"> <select id="selectWarningTrendDay" resultType="java.util.HashMap">
SELECT DATE_FORMAT(warning.create_time, '%Y-%m-%d %H') AS time, COUNT(*) AS number SELECT DATE_FORMAT(warning.create_time, '%Y-%m-%d %H') AS time, COUNT(*) AS number
FROM dc_warning AS warning FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
WHERE DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') WHERE DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d')
AND warning.direction=#{direction} AND warning.direction=#{direction}
AND mark.`section_id`=#{sectionId} AND mark.`section_id`=#{sectionId}
@ -85,7 +85,7 @@
<select id="selectWarningTrendMonth" resultType="java.util.HashMap"> <select id="selectWarningTrendMonth" resultType="java.util.HashMap">
SELECT DATE(warning.create_time) AS DAY, COUNT(*) AS number SELECT DATE(warning.create_time) AS DAY, COUNT(*) AS number
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
WHERE DATE_FORMAT(warning.create_time,'%Y-%m') =DATE_FORMAT(#{createTime},'%Y-%m') WHERE DATE_FORMAT(warning.create_time,'%Y-%m') =DATE_FORMAT(#{createTime},'%Y-%m')
AND warning.direction=#{direction} AND warning.direction=#{direction}
and mark.`section_id`=#{sectionId} and mark.`section_id`=#{sectionId}
@ -103,7 +103,7 @@
MONTH(warning.create_time) AS MONTH, MONTH(warning.create_time) AS MONTH,
COUNT(*) AS number COUNT(*) AS number
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
WHERE YEAR(warning.create_time) =DATE_FORMAT(#{createTime},'%Y') WHERE YEAR(warning.create_time) =DATE_FORMAT(#{createTime},'%Y')
AND warning.direction=#{direction} AND warning.direction=#{direction}
and mark.`section_id`=#{sectionId} and mark.`section_id`=#{sectionId}
@ -114,14 +114,14 @@
<select id="selectWarningTrendYear" resultType="java.util.HashMap"> <select id="selectWarningTrendYear" resultType="java.util.HashMap">
SELECT YEAR(warning.create_time) AS YEAR, COUNT(*) AS number SELECT YEAR(warning.create_time) AS YEAR, COUNT(*) AS number
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
where mark.`section_id`=#{sectionId} AND warning.direction=#{direction} where mark.`section_id`=#{sectionId} AND warning.direction=#{direction}
GROUP BY YEAR GROUP BY YEAR
</select> </select>
<select id="selectWarningSectionTypeDay" resultType="java.util.HashMap"> <select id="selectWarningSectionTypeDay" resultType="java.util.HashMap">
SELECT warning.warning_type warningType,COUNT(*) AS number SELECT warning.warning_type warningType,COUNT(*) AS number
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark as mark on warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark as mark on warning.stake_mark=mark.id
where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d')
AND warning.direction=#{direction} AND warning.direction=#{direction}
and mark.`section_id`=#{sectionId} and mark.`section_id`=#{sectionId}
@ -131,7 +131,7 @@
<select id="selectWarningSectionTypeMonth" resultType="java.util.HashMap"> <select id="selectWarningSectionTypeMonth" resultType="java.util.HashMap">
SELECT warning.warning_type warningType,COUNT(*) AS number SELECT warning.warning_type warningType,COUNT(*) AS number
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark as mark on warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark as mark on warning.stake_mark=mark.id
where DATE_FORMAT(warning.create_time,'%Y-%m') =DATE_FORMAT(#{createTime},'%Y-%m') where DATE_FORMAT(warning.create_time,'%Y-%m') =DATE_FORMAT(#{createTime},'%Y-%m')
AND warning.direction=#{direction} AND warning.direction=#{direction}
and mark.`section_id`=#{sectionId} and mark.`section_id`=#{sectionId}
@ -149,7 +149,7 @@
warning.warning_type warningType, warning.warning_type warningType,
COUNT(*) AS number COUNT(*) AS number
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
WHERE YEAR(warning.create_time) =DATE_FORMAT(#{createTime},'%Y') WHERE YEAR(warning.create_time) =DATE_FORMAT(#{createTime},'%Y')
AND warning.direction=#{direction} AND warning.direction=#{direction}
and mark.`section_id`=#{sectionId} and mark.`section_id`=#{sectionId}
@ -160,7 +160,7 @@
SELECT warning.warning_type warningType, COUNT(*) AS number, SELECT warning.warning_type warningType, COUNT(*) AS number,
DATE_FORMAT(warning.create_time, '%Y') as createTime DATE_FORMAT(warning.create_time, '%Y') as createTime
FROM dc_warning as warning FROM dc_warning as warning
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark=mark.id
where mark.`section_id`=#{sectionId} AND warning.direction=#{direction} where mark.`section_id`=#{sectionId} AND warning.direction=#{direction}
GROUP BY warningType GROUP BY warningType
</select> </select>
@ -169,14 +169,14 @@
SELECT id FROM dc_stake_mark AS mark WHERE mark.section_id=#{sectionId} SELECT id FROM dc_stake_mark AS mark WHERE mark.section_id=#{sectionId}
</select> </select>
<select id="selectSectionNumber" resultType="java.lang.String"> <select id="selectSectionNumber" resultType="java.lang.String">
select count(1) from dc_warning where stake_mark_id=#{stakeMarkId} AND warning.direction=#{direction} select count(1) from dc_warning where stake_mark=#{stakeMark} AND warning.direction=#{direction}
</select> </select>
<select id="selectWarningEscalation" resultType="java.util.HashMap"> <select id="selectWarningEscalation" resultType="java.util.HashMap">
select org.organization_name,warning.warning_type,warning.warning_subclass, select org.organization_name,warning.warning_type,warning.warning_subclass,
warning_title,warning.warning_state,warning. warning_title,warning.warning_state,warning.
warning_source,DATE_FORMAT(warning.create_time,'%Y-%m-%d %H:%m:%s') createTime from dc_warning as warning warning_source,DATE_FORMAT(warning.create_time,'%Y-%m-%d %H:%m:%s') createTime from dc_warning as warning
LEFT JOIN dc_stake_mark as mark on warning.stake_mark_id=mark.id LEFT JOIN dc_stake_mark as mark on warning.stake_mark=mark.id
LEFT JOIN dc_organization as org on mark.id=org.stake_mark_id AND mark.direction=org.direction LEFT JOIN dc_organization as org on mark.id=org.stake_mark AND mark.direction=org.direction
<where> <where>
<if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if> <if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if>
</where> </where>
@ -185,7 +185,7 @@
<update id="updateWarning"> <update id="updateWarning">
update dc_warning update dc_warning
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="stakeMarkId != null and stakeMarkId != ''">stake_mark_id = #{stakeMarkId},</if> <if test="stakeMark != null and stakeMark != ''">stake_mark = #{stakeMark},</if>
<if test="direction != null">direction = #{direction},</if> <if test="direction != null">direction = #{direction},</if>
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="warningState != null">warning_state = #{warningState},</if> <if test="warningState != null">warning_state = #{warningState},</if>

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

@ -23,7 +23,7 @@
<select id="getEventListByType" resultType="java.util.Map" parameterType="String"> <select id="getEventListByType" resultType="java.util.Map" parameterType="String">
select t1.id,t1.stake_mark stakeMark,t1.direction, t2.longitude,t2.latitude select t1.id,t1.stake_mark stakeMark,t1.direction, t2.longitude,t2.latitude
from dc_event t1 left join dc_stake_mark t2 on t1.stake_mark = t2.id and t1.direction = t2.direction from dc_event t1 left join dc_stake_mark t2 on t1.stake_mark = t2.stake_mark and t1.direction = t2.direction
where t1.event_type = #{eventType} and t1.event_state != '2' where t1.event_type = #{eventType} and t1.event_state != '2'
</select> </select>

Loading…
Cancel
Save