From c152e96d408f8792b8582440955df930999f5481 Mon Sep 17 00:00:00 2001
From: 邱宇豪 <qyh123230312>
Date: 星期三, 20 九月 2023 09:38:25 +0800
Subject: [PATCH] 单位工程管理

---
 hd/pipe/engineeringManage/src/main/resources/mapping/SysSegmentMapper.xml |   63 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/hd/pipe/engineeringManage/src/main/resources/mapping/SysSegmentMapper.xml b/hd/pipe/engineeringManage/src/main/resources/mapping/SysSegmentMapper.xml
index 70eb53c..32aad2c 100644
--- a/hd/pipe/engineeringManage/src/main/resources/mapping/SysSegmentMapper.xml
+++ b/hd/pipe/engineeringManage/src/main/resources/mapping/SysSegmentMapper.xml
@@ -14,6 +14,11 @@
     <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" >
@@ -44,6 +49,21 @@
       <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">
@@ -67,6 +87,21 @@
       <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" >
@@ -108,10 +143,18 @@
          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>
@@ -132,6 +175,11 @@
          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
@@ -178,6 +226,21 @@
       <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>

--
Gitblit v1.9.3