| | |
| | | <result column="shield_enp" jdbcType="VARCHAR" property="shieldEnp" /> |
| | | <result column="station" jdbcType="VARCHAR" property="station" /> |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
| | | <result column="mileage" jdbcType="VARCHAR" property="mileage" /> |
| | | <result column="unit_project_name" jdbcType="VARCHAR" property="unitProjectName" /> |
| | | <result column="start_time" jdbcType="DATE" property="startTime" /> |
| | | <result column="end_time" jdbcType="DATE" property="endTime" /> |
| | | <result column="duration" jdbcType="VARCHAR" property="duration" /> |
| | | </resultMap> |
| | | |
| | | <select id="segmentNameByOne" parameterType="java.lang.String" resultType="java.lang.String" > |
| | |
| | | <if test="createTime != null"> |
| | | create_time, |
| | | </if> |
| | | <if test="mileage != null"> |
| | | mileage, |
| | | </if> |
| | | <if test="unitProjectName != null"> |
| | | unit_project_name, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time, |
| | | </if> |
| | | <if test="endTime != null"> |
| | | end_time, |
| | | </if> |
| | | <if test="duration != null"> |
| | | duration, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="segmentId != null"> |
| | |
| | | <if test="createTime != null"> |
| | | #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="mileage != null"> |
| | | #{mileage,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="unitProjectName != null"> |
| | | #{unitProjectName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | #{startTime,jdbcType=DATE}, |
| | | </if> |
| | | <if test="endTime != null"> |
| | | #{endTime,jdbcType=DATE}, |
| | | </if> |
| | | <if test="duration != null"> |
| | | #{duration,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <insert id="segmentNeedInsert" > |
| | |
| | | ss.shield_enp as shieldEnp, |
| | | ss.station as station, |
| | | ss.create_time as createTime, |
| | | ss.mileage as mileage, |
| | | ss.unit_project_name as unitProjectName, |
| | | ss.start_time as startTime, |
| | | ss.end_time as endTime, |
| | | ss.duration as duration, |
| | | sp.pro_name as proName,spu.real_name as realName from sys_segment ss |
| | | left join sys_project sp on ss.pro_id=sp.pro_id |
| | | left join sys_plat_user spu on ss.segment_admin=spu.user_id |
| | | where ss.is_use=1 |
| | | <if test="unitProjectName!=null and unitProjectName!='' "> |
| | | and ss.unit_project_name like concat('%',#{unitProjectName},'%') |
| | | </if> |
| | | <if test="segmentName!=null and segmentName!='' "> |
| | | and ss.segment_name like concat('%',#{segmentName},'%') |
| | | </if> |
| | |
| | | ss.shield_enp as shieldEnp, |
| | | ss.station as station, |
| | | ss.create_time as createTime, |
| | | ss.mileage as mileage, |
| | | ss.unit_project_name as unitProjectName, |
| | | ss.start_time as startTime, |
| | | ss.end_time as endTime, |
| | | ss.duration as duration, |
| | | sp.pro_name,spu.real_name from sys_segment ss |
| | | left join sys_project sp on ss.pro_id=sp.pro_id |
| | | left join sys_plat_user spu on ss.segment_admin=spu.user_id |
| | |
| | | <if test="createTime != null"> |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="mileage != null"> |
| | | mileage = #{mileage,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="unitProjectName != null"> |
| | | unit_project_name = #{unitProjectName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time = #{startTime,jdbcType=DATE}, |
| | | </if> |
| | | <if test="endTime != null"> |
| | | end_time = #{endTime,jdbcType=DATE}, |
| | | </if> |
| | | <if test="duration != null"> |
| | | duration = #{duration,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where segment_id = #{segmentId,jdbcType=VARCHAR} |
| | | </update> |