You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							147 lines
						
					
					
						
							9.1 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							147 lines
						
					
					
						
							9.1 KiB
						
					
					
				| <?xml version="1.0" encoding="UTF-8" ?> | |
| <!DOCTYPE mapper | |
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| <mapper namespace="com.zc.business.mapper.DcEventConstructionMapper"> | |
|      | |
|     <resultMap type="com.zc.business.domain.DcEventConstruction" id="DcEventConstructionResult"> | |
|         <result property="id"    column="id"    /> | |
|         <result property="controlMode"    column="control_mode"    /> | |
|         <result property="locationType"    column="location_type"    /> | |
|         <result property="specialPlaceDescription"    column="special_place_description"    /> | |
|         <result property="specialConstruction"    column="special_construction"    /> | |
|         <result property="otherConstructionName"    column="other_construction_name"    /> | |
|         <result property="constructionMeasurement"    column="construction_measurement"    /> | |
|         <result property="facilityId"    column="facility_id"    /> | |
|         <result property="exitsInlets"    column="exits_inlets"    /> | |
|         <result property="laneOccupancy"    column="lane_occupancy"    /> | |
|         <result property="trafficCondition"    column="traffic_condition"    /> | |
|         <result property="endStakeMark"    column="end_stake_mark"    /> | |
|         <result property="localRoadName"    column="local_road_name"    /> | |
|         <result property="location"    column="location"    /> | |
| 
 | |
|         <result property="dcFacility.facilityName"    column="facility_name"    /> | |
|         <result property="dcFacility.facilityType"    column="facility_type"    /> | |
|         <result property="dcFacility.direction"    column="direction"    /> | |
|         <result property="dcFacility.stakeMark"    column="stake_mark"    /> | |
|         <result property="dcFacility.remark"    column="remark"    /> | |
|         <result property="dcFacility.otherConfig"    column="other_config"    /> | |
|     </resultMap> | |
| 
 | |
|     <sql id="selectDcEventConstructionVo"> | |
|         select location,local_road_name,end_stake_mark,id, control_mode, location_type, special_place_description, special_construction, other_construction_name, construction_measurement, facility_id, exits_inlets, lane_occupancy, traffic_condition from dc_event_construction | |
|     </sql> | |
|     <sql id="selectDcEventConstructionVoById"> | |
|         SELECT | |
|             dc_event_construction.id as id, | |
|             dc_event_construction.control_mode as control_mode, | |
|             dc_event_construction.location_type as location_type, | |
|             dc_event_construction.special_place_description as special_place_description, | |
|             dc_event_construction.special_construction as special_construction, | |
|             dc_event_construction.other_construction_name as other_construction_name, | |
|             dc_event_construction.construction_measurement as construction_measurement, | |
|             dc_event_construction.facility_id as facility_id, | |
|             dc_event_construction.exits_inlets as exits_inlets, | |
|             dc_event_construction.lane_occupancy as lane_occupancy, | |
|             dc_event_construction.traffic_condition as traffic_condition, | |
|             dc_event_construction.local_road_name as local_road_name, | |
|             dc_event_construction.end_stake_mark as end_stake_mark, | |
|             dc_event_construction.location as location, | |
|             dc_facility.other_config as other_config, | |
|             dc_facility.remark as remark, | |
|             dc_facility.stake_mark as stake_mark, | |
|             dc_facility.facility_type as facility_type, | |
|             dc_facility.facility_name as facility_name, | |
|             dc_facility.direction as direction | |
| 
 | |
|         FROM dc_event_construction    </sql> | |
| 
 | |
|     <select id="selectDcEventConstructionList" parameterType="DcEventConstruction" resultMap="DcEventConstructionResult"> | |
|         <include refid="selectDcEventConstructionVo"/> | |
|         <where>   | |
|             <if test="controlMode != null "> and control_mode = #{controlMode}</if> | |
|             <if test="locationType != null "> and location_type = #{locationType}</if> | |
|             <if test="specialPlaceDescription != null  and specialPlaceDescription != ''"> and special_place_description = #{specialPlaceDescription}</if> | |
|             <if test="specialConstruction != null "> and special_construction = #{specialConstruction}</if> | |
|             <if test="otherConstructionName != null  and otherConstructionName != ''"> and other_construction_name like concat('%', #{otherConstructionName}, '%')</if> | |
|             <if test="constructionMeasurement != null "> and construction_measurement = #{constructionMeasurement}</if> | |
|             <if test="facilityId != null "> and facility_id = #{facilityId}</if> | |
|             <if test="exitsInlets != null "> and exits_inlets = #{exitsInlets}</if> | |
|             <if test="laneOccupancy != null  and laneOccupancy != ''"> and lane_occupancy = #{laneOccupancy}</if> | |
|             <if test="trafficCondition != null "> and traffic_condition = #{trafficCondition}</if> | |
|         </where> | |
|     </select> | |
|      | |
|     <select id="selectDcEventConstructionById" parameterType="String" resultMap="DcEventConstructionResult"> | |
|         <include refid="selectDcEventConstructionVoById"/> | |
|         LEFT JOIN dc_facility ON dc_event_construction.facility_id = dc_facility.id | |
|         where dc_event_construction.id = #{id} | |
|     </select> | |
|          | |
|     <insert id="insertDcEventConstruction" parameterType="DcEventConstruction"> | |
|         insert into dc_event_construction | |
|         <trim prefix="(" suffix=")" suffixOverrides=","> | |
|             <if test="id != null">id,</if> | |
|             <if test="controlMode != null">control_mode,</if> | |
|             <if test="locationType != null">location_type,</if> | |
|             <if test="specialPlaceDescription != null">special_place_description,</if> | |
|             <if test="specialConstruction != null">special_construction,</if> | |
|             <if test="otherConstructionName != null">other_construction_name,</if> | |
|             <if test="constructionMeasurement != null">construction_measurement,</if> | |
|             <if test="facilityId != null">facility_id,</if> | |
|             <if test="exitsInlets != null">exits_inlets,</if> | |
|             <if test="laneOccupancy != null">lane_occupancy,</if> | |
|             <if test="trafficCondition != null">traffic_condition,</if> | |
|             <if test="endStakeMark != null">end_stake_mark,</if> | |
|             <if test="localRoadName != null">local_road_name,</if> | |
|             <if test="location != null">location,</if> | |
|          </trim> | |
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | |
|             <if test="id != null">#{id},</if> | |
|             <if test="controlMode != null">#{controlMode},</if> | |
|             <if test="locationType != null">#{locationType},</if> | |
|             <if test="specialPlaceDescription != null">#{specialPlaceDescription},</if> | |
|             <if test="specialConstruction != null">#{specialConstruction},</if> | |
|             <if test="otherConstructionName != null">#{otherConstructionName},</if> | |
|             <if test="constructionMeasurement != null">#{constructionMeasurement},</if> | |
|             <if test="facilityId != null">#{facilityId},</if> | |
|             <if test="exitsInlets != null">#{exitsInlets},</if> | |
|             <if test="laneOccupancy != null">#{laneOccupancy},</if> | |
|             <if test="trafficCondition != null">#{trafficCondition},</if> | |
|             <if test="endStakeMark != null">#{endStakeMark},</if> | |
|             <if test="localRoadName != null">#{localRoadName},</if> | |
|             <if test="location != null">#{location},</if> | |
|          </trim> | |
|     </insert> | |
| 
 | |
|     <update id="updateDcEventConstruction" parameterType="DcEventConstruction"> | |
|         update dc_event_construction | |
|         <trim prefix="SET" suffixOverrides=","> | |
|             <if test="controlMode != null">control_mode = #{controlMode},</if> | |
|             <if test="locationType != null">location_type = #{locationType},</if> | |
|             <if test="specialPlaceDescription != null">special_place_description = #{specialPlaceDescription},</if> | |
|             <if test="specialConstruction != null">special_construction = #{specialConstruction},</if> | |
|             <if test="otherConstructionName != null">other_construction_name = #{otherConstructionName},</if> | |
|             <if test="constructionMeasurement != null">construction_measurement = #{constructionMeasurement},</if> | |
|             <if test="facilityId != null">facility_id = #{facilityId},</if> | |
|             <if test="exitsInlets != null">exits_inlets = #{exitsInlets},</if> | |
|             <if test="laneOccupancy != null">lane_occupancy = #{laneOccupancy},</if> | |
|             <if test="trafficCondition != null">traffic_condition = #{trafficCondition},</if> | |
|             <if test="endStakeMark != null">end_stake_mark = #{endStakeMark},</if> | |
|             <if test="localRoadName != null">local_road_name = #{localRoadName},</if> | |
|             <if test="location != null">location = #{location},</if> | |
|         </trim> | |
|         where id = #{id} | |
|     </update> | |
| 
 | |
|     <delete id="deleteDcEventConstructionById" parameterType="String"> | |
|         delete from dc_event_construction where id = #{id} | |
|     </delete> | |
| 
 | |
|     <delete id="deleteDcEventConstructionByIds" parameterType="String"> | |
|         delete from dc_event_construction where id in  | |
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | |
|             #{id} | |
|         </foreach> | |
|     </delete> | |
| </mapper> |