Browse Source

听运广的

luobang 2 years ago
parent
commit
6951f0b117

+ 4 - 4
pom.xml

@@ -105,13 +105,13 @@
                 <artifactId>generator-maven-plugin</artifactId>
                 <version>3.0</version>
                 <configuration>
-                    <connUrl>jdbc:oracle:thin:@192.168.1.51:1521:steerinfo</connUrl>
-                    <user>dilusr</user>
-                    <password>stinf#0420</password>
+                    <connUrl>jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri</connUrl>
+                    <user>dil</user>
+                    <password>Dil123789</password>
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>[table-name]</param><!--运力-->
+                        <param>WMSH_OUTBOUND_RESULT</param><!--运力-->
                     </tables>
                 </configuration>
                 <executions>

+ 18 - 3
src/main/java/com/steerinfo/dil/model/WmshInboundResult.java

@@ -10,7 +10,7 @@ import java.util.Date;
 @ApiModel(value="原料港存库入库作业")
 public class WmshInboundResult implements IBasePO<BigDecimal> {
     /**
-     * 主键ID(RESULT_ID,DECIMAL,38)
+     * 主键ID(RESULT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="主键ID",required=true)
     private BigDecimal resultId;
@@ -22,7 +22,7 @@ public class WmshInboundResult implements IBasePO<BigDecimal> {
     private String resultNumber;
 
     /**
-     * 港口ID(PORT_ID,DECIMAL,38)
+     * 港口ID(PORT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="港口ID",required=false)
     private BigDecimal portId;
@@ -64,7 +64,7 @@ public class WmshInboundResult implements IBasePO<BigDecimal> {
     private String insertUpdateRemark;
 
     /**
-     * 批次ID(BATCH_ID,DECIMAL,38)
+     * 批次ID(BATCH_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="批次ID",required=false)
     private BigDecimal batchId;
@@ -75,6 +75,12 @@ public class WmshInboundResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="逻辑删除:0:正常 1:删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 作业时间(WORK_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="作业时间",required=false)
+    private Date workTime;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -175,6 +181,14 @@ public class WmshInboundResult implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public Date getWorkTime() {
+        return workTime;
+    }
+
+    public void setWorkTime(Date workTime) {
+        this.workTime = workTime;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -192,6 +206,7 @@ public class WmshInboundResult implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", batchId=").append(batchId);
         sb.append(", deleted=").append(deleted);
+        sb.append(", workTime=").append(workTime);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 18 - 3
src/main/java/com/steerinfo/dil/model/WmshOutboundResult.java

@@ -10,7 +10,7 @@ import java.util.Date;
 @ApiModel(value="原料港存库出库作业")
 public class WmshOutboundResult implements IBasePO<BigDecimal> {
     /**
-     * 主键ID(RESULT_ID,DECIMAL,38)
+     * 主键ID(RESULT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="主键ID",required=true)
     private BigDecimal resultId;
@@ -22,7 +22,7 @@ public class WmshOutboundResult implements IBasePO<BigDecimal> {
     private String resultNumber;
 
     /**
-     * 港口ID(HARBOR_ID,DECIMAL,38)
+     * 港口ID(HARBOR_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="港口ID",required=false)
     private BigDecimal harborId;
@@ -70,11 +70,17 @@ public class WmshOutboundResult implements IBasePO<BigDecimal> {
     private String insertUpdateRemark;
 
     /**
-     * 批次ID(BATCH_ID,DECIMAL,38)
+     * 批次ID(BATCH_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="批次ID",required=false)
     private BigDecimal batchId;
 
+    /**
+     * 作业时间(WORK_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="作业时间",required=false)
+    private Date workTime;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -175,6 +181,14 @@ public class WmshOutboundResult implements IBasePO<BigDecimal> {
         this.batchId = batchId;
     }
 
+    public Date getWorkTime() {
+        return workTime;
+    }
+
+    public void setWorkTime(Date workTime) {
+        this.workTime = workTime;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -192,6 +206,7 @@ public class WmshOutboundResult implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", batchId=").append(batchId);
+        sb.append(", workTime=").append(workTime);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 10 - 0
src/main/java/com/steerinfo/dil/service/impl/WmshGridMaterialServiceImpl.java

@@ -145,6 +145,16 @@ public class WmshGridMaterialServiceImpl implements IWmshGridMaterialService {
         wmshOutboundResult.setBatchId(DataChange.dataToBigDecimal(map.get("batchId")));
         BigDecimal portId = DataChange.dataToBigDecimal(map.get("portId"));
         wmshOutboundResult.setHarborId(portId);
+        //并按照装船时间作为下游港口出库作业时间
+        if (map.get("resultLoadShipDate") != null) {
+            long resultLoadShipDate =(long) map.get("resultLoadShipDate");
+            wmshOutboundResult.setWorkTime(new Date(resultLoadShipDate));
+        }
+        //按照出库时间作为万州港出库作业时间
+        if (map.get("resultLoadingDate") != null) {
+            long resultLoadingDate =(long) map.get("resultLoadingDate");
+            wmshOutboundResult.setWorkTime(new Date(resultLoadingDate));
+        }
         i = wmshOutboundResultMapper.insertSelective(wmshOutboundResult);
         return id.intValue();
     }

+ 10 - 0
src/main/java/com/steerinfo/dil/service/impl/WmshInboundResultServiceImpl.java

@@ -56,6 +56,16 @@ public class WmshInboundResultServiceImpl implements IWmshInboundResultService {
         }else{
             wmshInboundResult.setInsertUsername("system");
         }
+        //提货委托按照委托时间作为下游港口入库作业时间
+        if( map.get("attorneyTime") != null ) {
+            long attorneyTime =(long) map.get("attorneyTime");
+            wmshInboundResult.setWorkTime(new Date(attorneyTime));
+        }
+        //卸船专业开始时间作为万州港入库作业时间
+        if (map.get("resultStartTime") != null) {
+            long resultStartTime = (long) map.get("resultStartTime");
+            wmshInboundResult.setWorkTime(new Date(resultStartTime));
+        }
         wmshInboundResult.setDeleted(new BigDecimal(0)); //状态 0 正常
         return wmshInboundResultMapper.insertSelective(wmshInboundResult);
     }

+ 10 - 0
src/main/java/com/steerinfo/dil/service/impl/WmshOutboundResultServiceImpl.java

@@ -69,6 +69,16 @@ public class WmshOutboundResultServiceImpl implements IWmshOutboundResultService
         wmshOutboundResult.setHarborId(DataChange.dataToBigDecimal(map.get("portId")));
         wmshOutboundResult.setResultClearing((String)(map.get("isClean")));
         wmshOutboundResult.setInsertTime(new Date());
+        //并按照装船时间作为下游港口出库作业时间
+        if (map.get("resultLoadShipDate") != null) {
+            long resultLoadShipDate =(long) map.get("resultLoadShipDate");
+            wmshOutboundResult.setWorkTime(new Date(resultLoadShipDate));
+        }
+        //按照出库时间作为万州港出库作业时间
+        if (map.get("resultLoadingDate") != null) {
+            long resultLoadingDate =(long) map.get("resultLoadingDate");
+            wmshOutboundResult.setWorkTime(new Date(resultLoadingDate));
+        }
         wmshOutboundResultMapper.insertSelective(wmshOutboundResult);
         return  id;
     }

+ 38 - 10
src/main/resources/com/steerinfo/dil/mapper/WmshInboundResultMapper.xml

@@ -13,15 +13,16 @@
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="WORK_TIME" jdbcType="TIMESTAMP" property="workTime" />
   </resultMap>
   <sql id="columns">
-    RESULT_ID, RESULT_NUMBER, PORT_ID, RESULT_MATERIAL_NUMBER, INSERT_USERNAME, INSERT_TIME, 
-    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, BATCH_ID, DELETED
+    RESULT_ID, RESULT_NUMBER, PORT_ID, RESULT_MATERIAL_NUMBER, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, BATCH_ID, DELETED, WORK_TIME
   </sql>
   <sql id="columns_alias">
-    t.RESULT_ID, t.RESULT_NUMBER, t.PORT_ID, t.RESULT_MATERIAL_NUMBER, t.INSERT_USERNAME, 
-    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.BATCH_ID, 
-    t.DELETED
+    t.RESULT_ID, t.RESULT_NUMBER, t.PORT_ID, t.RESULT_MATERIAL_NUMBER, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.BATCH_ID,
+    t.DELETED, t.WORK_TIME
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM WMSH_INBOUND_RESULT
@@ -64,6 +65,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="workTime != null">
+        and TO_CHAR(WORK_TIME,'yyyy-MM-dd') = #{workTime}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -101,6 +105,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="workTime != null">
+        and TO_CHAR(WORK_TIME,'yyyy-MM-dd') = #{workTime}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -140,16 +147,21 @@
     <if test="deleted != null">
       or DELETED = #{deleted}
     </if>
+    <if test="workTime != null">
+      or TO_CHAR(WORK_TIME,'yyyy-MM-dd') = '#{workTime}'
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.WmshInboundResult">
     insert into WMSH_INBOUND_RESULT (RESULT_ID, RESULT_NUMBER, PORT_ID,
                                      RESULT_MATERIAL_NUMBER, INSERT_USERNAME, INSERT_TIME,
                                      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
-                                     BATCH_ID, DELETED)
+                                     BATCH_ID, DELETED, WORK_TIME
+    )
     values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{portId,jdbcType=DECIMAL},
             #{resultMaterialNumber,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
             #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
-            #{batchId,jdbcType=DECIMAL}, #{deleted,jdbcType=DECIMAL})
+            #{batchId,jdbcType=DECIMAL}, #{deleted,jdbcType=DECIMAL}, #{workTime,jdbcType=TIMESTAMP}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmshInboundResult">
     insert into WMSH_INBOUND_RESULT
@@ -187,6 +199,9 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="workTime != null">
+        WORK_TIME,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="resultId != null">
@@ -222,6 +237,9 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="workTime != null">
+        #{workTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmshInboundResult">
@@ -235,7 +253,8 @@
         UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
         INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
         BATCH_ID = #{batchId,jdbcType=DECIMAL},
-        DELETED = #{deleted,jdbcType=DECIMAL}
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        WORK_TIME = #{workTime,jdbcType=TIMESTAMP}
     where RESULT_ID = #{resultId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmshInboundResult">
@@ -271,6 +290,9 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="workTime != null">
+        WORK_TIME = #{workTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where RESULT_ID = #{resultId,jdbcType=DECIMAL}
   </update>
@@ -293,7 +315,7 @@
     INSERT_USERNAME, INSERT_TIME,
     UPDATE_USERNAME, UPDATE_TIME,
     INSERT_UPDATE_REMARK, BATCH_ID,
-    DELETED)
+    DELETED, WORK_TIME)
     ( <foreach collection="list" item="item" separator="union all">
     select
     #{item.resultId,jdbcType=DECIMAL},
@@ -301,7 +323,7 @@
     #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
     #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
     #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.batchId,jdbcType=DECIMAL},
-    #{item.deleted,jdbcType=DECIMAL} from dual
+    #{item.deleted,jdbcType=DECIMAL}, #{item.workTime,jdbcType=TIMESTAMP} from dual
   </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -351,6 +373,10 @@
     <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
     </foreach>
+    ,WORK_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.workTime,jdbcType=TIMESTAMP}
+    </foreach>
     where RESULT_ID in
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
       #{item.resultId,jdbcType=DECIMAL}
@@ -365,6 +391,8 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
 
   <!--   排序 -->
   <sql id="orderBy">

+ 57 - 27
src/main/resources/com/steerinfo/dil/mapper/WmshOutboundResultMapper.xml

@@ -13,20 +13,22 @@
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+    <result column="WORK_TIME" jdbcType="TIMESTAMP" property="workTime" />
   </resultMap>
   <sql id="columns">
     RESULT_ID, RESULT_NUMBER, HARBOR_ID, RESULT_TONNAGE, RESULT_CLEARING, INSERT_USERNAME,
-    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, BATCH_ID
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, BATCH_ID, WORK_TIME
   </sql>
   <sql id="columns_alias">
     t.RESULT_ID, t.RESULT_NUMBER, t.HARBOR_ID, t.RESULT_TONNAGE, t.RESULT_CLEARING, t.INSERT_USERNAME,
-    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.BATCH_ID
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.BATCH_ID,
+    t.WORK_TIME
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM WMSH_OUTBOUND_RESULT
+    SELECT <include refid="columns" /> FROM WMSH_OUTBOUND_RESULT
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM WMSH_OUTBOUND_RESULT t
+    SELECT <include refid="columns_alias" /> FROM WMSH_OUTBOUND_RESULT t
   </sql>
   <sql id="where">
     <where>
@@ -63,6 +65,9 @@
       <if test="batchId != null">
         and BATCH_ID = #{batchId}
       </if>
+      <if test="workTime != null">
+        and TO_CHAR(WORK_TIME,'yyyy-MM-dd') = #{workTime}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -100,6 +105,9 @@
       <if test="batchId != null">
         and BATCH_ID = #{batchId}
       </if>
+      <if test="workTime != null">
+        and TO_CHAR(WORK_TIME,'yyyy-MM-dd') = #{workTime}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -139,16 +147,21 @@
     <if test="batchId != null">
       or BATCH_ID = #{batchId}
     </if>
+    <if test="workTime != null">
+      or TO_CHAR(WORK_TIME,'yyyy-MM-dd') = '#{workTime}'
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
     insert into WMSH_OUTBOUND_RESULT (RESULT_ID, RESULT_NUMBER, HARBOR_ID,
                                       RESULT_TONNAGE, RESULT_CLEARING, INSERT_USERNAME,
                                       INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-                                      INSERT_UPDATE_REMARK, BATCH_ID)
+                                      INSERT_UPDATE_REMARK, BATCH_ID, WORK_TIME
+    )
     values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{harborId,jdbcType=DECIMAL},
             #{resultTonnage,jdbcType=DECIMAL}, #{resultClearing,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
             #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-            #{insertUpdateRemark,jdbcType=VARCHAR}, #{batchId,jdbcType=DECIMAL})
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{batchId,jdbcType=DECIMAL}, #{workTime,jdbcType=TIMESTAMP}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
     insert into WMSH_OUTBOUND_RESULT
@@ -186,6 +199,9 @@
       <if test="batchId != null">
         BATCH_ID,
       </if>
+      <if test="workTime != null">
+        WORK_TIME,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="resultId != null">
@@ -221,6 +237,9 @@
       <if test="batchId != null">
         #{batchId,jdbcType=DECIMAL},
       </if>
+      <if test="workTime != null">
+        #{workTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
@@ -234,7 +253,8 @@
         UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
         UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
         INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-        BATCH_ID = #{batchId,jdbcType=DECIMAL}
+        BATCH_ID = #{batchId,jdbcType=DECIMAL},
+        WORK_TIME = #{workTime,jdbcType=TIMESTAMP}
     where RESULT_ID = #{resultId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmshOutboundResult">
@@ -270,20 +290,23 @@
       <if test="batchId != null">
         BATCH_ID = #{batchId,jdbcType=DECIMAL},
       </if>
+      <if test="workTime != null">
+        WORK_TIME = #{workTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where RESULT_ID = #{resultId,jdbcType=DECIMAL}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where RESULT_ID = #{resultId,jdbcType=DECIMAL}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into WMSH_OUTBOUND_RESULT
@@ -292,7 +315,7 @@
     RESULT_CLEARING, INSERT_USERNAME,
     INSERT_TIME, UPDATE_USERNAME,
     UPDATE_TIME, INSERT_UPDATE_REMARK,
-    BATCH_ID)
+    BATCH_ID, WORK_TIME)
     ( <foreach collection="list" item="item" separator="union all">
     select
     #{item.resultId,jdbcType=DECIMAL},
@@ -300,69 +323,76 @@
     #{item.resultClearing,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
     #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
     #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
-    #{item.batchId,jdbcType=DECIMAL} from dual
+    #{item.batchId,jdbcType=DECIMAL}, #{item.workTime,jdbcType=TIMESTAMP} from dual
   </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
     update WMSH_OUTBOUND_RESULT
     set
     RESULT_ID=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
     </foreach>
     ,RESULT_NUMBER=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
     </foreach>
     ,HARBOR_ID=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.harborId,jdbcType=DECIMAL}
     </foreach>
     ,RESULT_TONNAGE=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTonnage,jdbcType=DECIMAL}
     </foreach>
     ,RESULT_CLEARING=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClearing,jdbcType=VARCHAR}
     </foreach>
     ,INSERT_USERNAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
     </foreach>
     ,INSERT_TIME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
     </foreach>
     ,UPDATE_USERNAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
     </foreach>
     ,UPDATE_TIME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
     </foreach>
     ,INSERT_UPDATE_REMARK=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
     </foreach>
     ,BATCH_ID=
-    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
     </foreach>
+    ,WORK_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.workTime,jdbcType=TIMESTAMP}
+    </foreach>
     where RESULT_ID in
-    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
       #{item.resultId,jdbcType=DECIMAL}
     </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from WMSH_OUTBOUND_RESULT
     where RESULT_ID in
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!--   排序 -->
   <sql id="orderBy">