Browse Source

新增匝道相关接口,新增字段 交通拥堵事件表(详细原因,地点描述,地点类型)车辆事故事件表(设施,匝道,地点),交通事故事件表(设施,匝道,地点),施工建设事件表(施工方式,匝道)

develop
王兴琳 9 months ago
parent
commit
720f610da4
  1. 43
      zc-business/src/main/java/com/zc/business/controller/DcRampController.java
  2. 6
      zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java
  3. 4
      zc-business/src/main/java/com/zc/business/domain/DcEventConstruction.java
  4. 8
      zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java
  5. 9
      zc-business/src/main/java/com/zc/business/domain/DcEventVehicleAccident.java
  6. 1
      zc-business/src/main/java/com/zc/business/domain/DcRamp.java
  7. 10
      zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml
  8. 17
      zc-business/src/main/resources/mapper/business/DcEventTrafficCongestionMapper.xml
  9. 16
      zc-business/src/main/resources/mapper/business/DcEventVehicleAccidentMapper.xml

43
zc-business/src/main/java/com/zc/business/controller/DcRampController.java

@ -5,6 +5,8 @@ import javax.servlet.http.HttpServletResponse;
import com.zc.business.domain.DcRamp;
import com.zc.business.service.IDcRampService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -29,6 +31,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi
* @date 2024-01-12
*/
@Api(value = "匝道信息",tags = {"匝道信息"})
@RestController
@RequestMapping("/system/ramp")
public class DcRampController extends BaseController
@ -39,18 +43,33 @@ public class DcRampController extends BaseController
/**
* 查询匝道信息列表
*/
@PreAuthorize("@ss.hasPermi('system:ramp:list')")
@ApiOperation("查询匝道信息列表")
//@PreAuthorize("@ss.hasPermi('system:ramp:list')")
@GetMapping("/list")
public TableDataInfo list(DcRamp dcRamp)
{
startPage();
List<DcRamp> list = dcRampService.selectDcRampList(dcRamp);
return getDataTable(list);
} /**
* 无分页查询匝道信息列表
*/
@ApiOperation("无分页查询匝道信息列表")
//@PreAuthorize("@ss.hasPermi('system:ramp:list')")
@GetMapping("/listAll")
public TableDataInfo listAll(DcRamp dcRamp)
{
List<DcRamp> list = dcRampService.selectDcRampList(dcRamp);
return getDataTable(list);
}
/**
* 根据设施类型 查询匝道信息列表
*/
// @PreAuthorize("@ss.hasPermi('system:ramp:list')")
@ApiOperation("根据设施类型 查询匝道信息列表")
// @PreAuthorize("@ss.hasPermi('system:ramp:list')")
@GetMapping("/listAll/{type}")
public TableDataInfo listAll(@PathVariable("type") Long type)
{
@ -61,7 +80,9 @@ public class DcRampController extends BaseController
/**
* 导出匝道信息列表
*/
@PreAuthorize("@ss.hasPermi('system:ramp:export')")
@ApiOperation("导出匝道信息列表")
// @PreAuthorize("@ss.hasPermi('system:ramp:export')")
@Log(title = "匝道信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcRamp dcRamp)
@ -74,7 +95,9 @@ public class DcRampController extends BaseController
/**
* 获取匝道信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:ramp:query')")
@ApiOperation("获取匝道信息详细信息")
// @PreAuthorize("@ss.hasPermi('system:ramp:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@ -84,7 +107,9 @@ public class DcRampController extends BaseController
/**
* 新增匝道信息
*/
@PreAuthorize("@ss.hasPermi('system:ramp:add')")
@ApiOperation("新增匝道信息")
// @PreAuthorize("@ss.hasPermi('system:ramp:add')")
@Log(title = "匝道信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcRamp dcRamp)
@ -95,7 +120,9 @@ public class DcRampController extends BaseController
/**
* 修改匝道信息
*/
@PreAuthorize("@ss.hasPermi('system:ramp:edit')")
@ApiOperation("修改匝道信息")
// @PreAuthorize("@ss.hasPermi('system:ramp:edit')")
@Log(title = "匝道信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcRamp dcRamp)
@ -106,7 +133,9 @@ public class DcRampController extends BaseController
/**
* 删除匝道信息
*/
@PreAuthorize("@ss.hasPermi('system:ramp:remove')")
@ApiOperation("删除匝道信息")
// @PreAuthorize("@ss.hasPermi('system:ramp:remove')")
@Log(title = "匝道信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)

6
zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java

@ -222,9 +222,13 @@ public class DcEventAccident extends BaseEntity {
* 设施关联
*/
@ApiModelProperty("设施关联")
private Integer facilityId;
@ApiModelProperty("匝道")
private Integer rampId;
@ApiModelProperty("地点")
private String location;
@ApiModelProperty("事件信息实体")
//事件信息表
@TableField(exist = false)

4
zc-business/src/main/java/com/zc/business/domain/DcEventConstruction.java

@ -94,6 +94,10 @@ public class DcEventConstruction extends BaseEntity
2-通行受阻 */
@ApiModelProperty("通行情况:1-通行正常 2-通行受阻")
private Long trafficCondition;
@ApiModelProperty("匝道")
private Long rampId;
@ApiModelProperty("施工方式")
private Long constructionMethod;
@ApiModelProperty("事件信息实体")
//事件信息表

8
zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java

@ -75,6 +75,14 @@ public class DcEventTrafficCongestion extends BaseEntity
@ApiModelProperty("地点(收费站):1-入口 2-出口 3-入口内广场 4--出口内广场5-外广场6-入口车道7-出口车道8-入口匝道9-出口匝道 ")
private Long location;
@ApiModelProperty("详细原因")
private Integer detailedReasons;
@ApiModelProperty("地点类型")
private Integer locationType;
@ApiModelProperty("地点描述")
private String locationDescription;
@ApiModelProperty("事件信息实体")
//事件信息表

9
zc-business/src/main/java/com/zc/business/domain/DcEventVehicleAccident.java

@ -114,6 +114,15 @@ public class DcEventVehicleAccident extends BaseEntity
/** 私密事件 */
@ApiModelProperty( "私密事件")
private Integer isPrivate;
@ApiModelProperty("设施关联")
private Integer facilityId;
@ApiModelProperty("匝道")
private Integer rampId;
@ApiModelProperty("地点")
private String location;
@ApiModelProperty("事件信息实体")
//事件信息表

1
zc-business/src/main/java/com/zc/business/domain/DcRamp.java

@ -48,6 +48,7 @@ public class DcRamp extends BaseEntity
@ApiModelProperty("匝道宽度(米)")
private Long widthMeters;
public void setId(Long id)
{
this.id = id;

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

@ -30,10 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fatalities" column="fatalities" />
<result property="isPrivate" column="is_private" />
<result property="facilityId" column="facility_id" />
<result property="rampId" column="ramp_id" />
<result property="location" column="location" />
</resultMap>
<sql id="selectDcEventAccidentVo">
select id, reporter_name, reporter_phone_number, accident_type, location_type, traffic_jam, weather_condition, impact_level, is_reverse_cargo, is_maintenance, police_contact, towing_service_contact, congestion_ahead, at_intersection, on_curve, spillage_item, vehicle_owner_phone, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private, facility_id from dc_event_accident
select id, reporter_name, reporter_phone_number, accident_type, location_type, traffic_jam, weather_condition, impact_level, is_reverse_cargo, is_maintenance, police_contact, towing_service_contact, congestion_ahead, at_intersection, on_curve, spillage_item, vehicle_owner_phone, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private, facility_id,location,ramp_id from dc_event_accident
</sql>
<select id="selectDcEventAccidentList" parameterType="DcEventAccident" resultMap="DcEventAccidentResult">
@ -101,6 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fatalities != null">fatalities,</if>
<if test="isPrivate != null">is_private,</if>
<if test="facilityId != null">facility_id,</if>
<if test="rampId != null">ramp_id,</if>
<if test="location != null">location,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -129,6 +133,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fatalities != null">#{fatalities},</if>
<if test="isPrivate != null">#{isPrivate},</if>
<if test="facilityId != null">#{facilityId},</if>
<if test="location != null">#{location},</if>
<if test="rampId != null">#{rampId},</if>
</trim>
</insert>
@ -160,6 +166,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fatalities != null">fatalities = #{fatalities},</if>
<if test="isPrivate != null">is_private = #{isPrivate},</if>
<if test="facilityId != null">facility_id = #{facilityId},</if>
<if test="rampId != null">ramp_id = #{rampId},</if>
<if test="location != null">location = #{location},</if>
</trim>
where id = #{id}
</update>

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

@ -12,6 +12,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="rampId" column="ramp_id" />
<result property="location" column="location" />
<result property="maxCongestionMileage" column="max_congestion_mileage" />
<result property="locationDescription" column="location_description" />
<result property="locationType" column="location_type" />
<result property="detailedReasons" column="detailed_reasons" />
<result property="dcFacility.facilityName" column="facility_name" />
<result property="dcFacility.facilityType" column="facility_type" />
@ -23,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcEventTrafficCongestionVo">
select id, congestion_mileage, congestion_cause, facility_id, ramp_id, location,max_congestion_mileage from dc_event_traffic_congestion
select location_type,location_description,detailed_reasons,id, congestion_mileage, congestion_cause, facility_id, ramp_id, location,max_congestion_mileage from dc_event_traffic_congestion
</sql>
<!-- -->
<sql id="selectDcEventTrafficCongestionVoById">
@ -35,6 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dc_event_traffic_congestion.location as location,
dc_event_traffic_congestion.ramp_id as ramp_id,
dc_event_traffic_congestion.max_congestion_mileage as max_congestion_mileage,
dc_event_traffic_congestion.location_type as location_type,
dc_event_traffic_congestion.location_description as location_description,
dc_event_traffic_congestion.detailed_reasons as detailed_reasons,
dc_facility.other_config as other_config,
dc_facility.remark as remark,
@ -72,6 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rampId != null">ramp_id,</if>
<if test="location != null">location,</if>
<if test="maxCongestionMileage != null">max_congestion_mileage,</if>
<if test="locationDescription != null">location_description,</if>
<if test="locationType != null">location_type,</if>
<if test="detailedReasons != null">detailed_reasons,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -81,6 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rampId != null">#{rampId},</if>
<if test="location != null">#{location},</if>
<if test="maxCongestionMileage != null">#{maxCongestionMileage},</if>
<if test="locationDescription != null">#{locationDescription},</if>
<if test="locationType != null">#{locationType},</if>
<if test="detailedReasons != null">#{detailedReasons},</if>
</trim>
</insert>
@ -93,6 +105,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rampId != null">ramp_id = #{rampId},</if>
<if test="location != null">location = #{location},</if>
<if test="maxCongestionMileage != null">max_congestion_mileage = #{maxCongestionMileage},</if>
<if test="locationDescription != null">location_description = #{locationDescription},</if>
<if test="locationType != null">location_type = #{locationType},</if>
<if test="detailedReasons != null">detailed_reasons = #{detailedReasons},</if>
</trim>
where id = #{id}
</update>

16
zc-business/src/main/resources/mapper/business/DcEventVehicleAccidentMapper.xml

@ -22,10 +22,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="seriousInjuries" column="serious_injuries" />
<result property="fatalities" column="fatalities" />
<result property="isPrivate" column="is_private" />
<result property="location" column="location" />
<result property="rampId" column="ramp_id" />
<result property="facilityId" column="facility_id" />
</resultMap>
<sql id="selectDcEventVehicleAccidentVo">
select id, reporter_name, reporter_phone_number, location_type, traffic_jam, weather_condition, congestion_ahead, at_intersection, on_curve, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private from dc_event_vehicle_accident
select location,ramp_id,facility_id, id, reporter_name, reporter_phone_number, location_type, traffic_jam, weather_condition, congestion_ahead, at_intersection, on_curve, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private from dc_event_vehicle_accident
</sql>
<select id="selectDcEventVehicleAccidentList" parameterType="DcEventVehicleAccident" resultMap="DcEventVehicleAccidentResult">
@ -75,6 +80,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="seriousInjuries != null">serious_injuries,</if>
<if test="fatalities != null">fatalities,</if>
<if test="isPrivate != null">is_private,</if>
<if test="location != null">location,</if>
<if test="rampId != null">ramp_id,</if>
<if test="facilityId != null">facility_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -94,6 +102,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="seriousInjuries != null">#{seriousInjuries},</if>
<if test="fatalities != null">#{fatalities},</if>
<if test="isPrivate != null">#{isPrivate},</if>
<if test="location != null">#{location},</if>
<if test="rampId != null">#{rampId},</if>
<if test="facilityId != null">#{facilityId},</if>
</trim>
</insert>
@ -116,6 +127,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="seriousInjuries != null">serious_injuries = #{seriousInjuries},</if>
<if test="fatalities != null">fatalities = #{fatalities},</if>
<if test="isPrivate != null">is_private = #{isPrivate},</if>
<if test="location != null">location = #{location},</if>
<if test="rampId != null">ramp_id = #{rampId},</if>
<if test="facilityId != null">facility_id = #{facilityId},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save