ソースを参照

'新增实绩'

txf 3 年 前
コミット
5e9188c4e7

+ 4 - 0
pom.xml

@@ -147,7 +147,11 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
+                        <param>TMSTRUCK_ENFACTORY_RESULT</param>
                         <param>TMSTRUCK_LOAD_RESULT</param>
+                        <param>TMSTRUCK_LEAVE_FACTORY_RESULT</param>
+                        <param>TMSTRUCK_UNLOAD_RESULT</param>
+                        <param>TMSTRUCK_WEIGHT_RESULT</param>
                     </tables>
                 </configuration>
                 <executions>

+ 16 - 1
src/main/java/com/steerinfo/dil/model/TmstruckEnfactoryResult.java

@@ -24,7 +24,7 @@ public class TmstruckEnfactoryResult implements IBasePO<BigDecimal> {
     /**
      * 进门门岗ID(GATEPOST_ID,DECIMAL,0)
      */
-    @ApiModelProperty(value="进门门岗ID",required=true)
+    @ApiModelProperty(value="进门门岗ID",required=false)
     private BigDecimal gatepostId;
 
     /**
@@ -87,6 +87,12 @@ public class TmstruckEnfactoryResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="废除时间",required=false)
     private Date deleteTime;
 
+    /**
+     * 路段顺序号(SEGMEN_SQE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="路段顺序号",required=false)
+    private BigDecimal segmenSqe;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -203,6 +209,14 @@ public class TmstruckEnfactoryResult implements IBasePO<BigDecimal> {
         this.deleteTime = deleteTime;
     }
 
+    public BigDecimal getSegmenSqe() {
+        return segmenSqe;
+    }
+
+    public void setSegmenSqe(BigDecimal segmenSqe) {
+        this.segmenSqe = segmenSqe;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -222,6 +236,7 @@ public class TmstruckEnfactoryResult implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleteUsername=").append(deleteUsername);
         sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", segmenSqe=").append(segmenSqe);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 16 - 1
src/main/java/com/steerinfo/dil/model/TmstruckLeaveFactoryResult.java

@@ -24,7 +24,7 @@ public class TmstruckLeaveFactoryResult implements IBasePO<BigDecimal> {
     /**
      * 出门门岗ID(GATEPOST_ID,DECIMAL,38)
      */
-    @ApiModelProperty(value="出门门岗ID",required=true)
+    @ApiModelProperty(value="出门门岗ID",required=false)
     private BigDecimal gatepostId;
 
     /**
@@ -81,6 +81,12 @@ public class TmstruckLeaveFactoryResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="废除时间",required=false)
     private Date deleteTime;
 
+    /**
+     * 路段顺序号(SEGMENT_SQE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="路段顺序号",required=false)
+    private BigDecimal segmentSqe;
+
     /**
      * 车厢抓拍图片(RESULT_TRUCK_SNAPSHOT_PICTURE,BLOB,4000)
      */
@@ -195,6 +201,14 @@ public class TmstruckLeaveFactoryResult implements IBasePO<BigDecimal> {
         this.deleteTime = deleteTime;
     }
 
+    public BigDecimal getSegmentSqe() {
+        return segmentSqe;
+    }
+
+    public void setSegmentSqe(BigDecimal segmentSqe) {
+        this.segmentSqe = segmentSqe;
+    }
+
     public byte[] getResultTruckSnapshotPicture() {
         return resultTruckSnapshotPicture;
     }
@@ -221,6 +235,7 @@ public class TmstruckLeaveFactoryResult implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleteUsername=").append(deleteUsername);
         sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", segmentSqe=").append(segmentSqe);
         sb.append(", resultTruckSnapshotPicture=").append(resultTruckSnapshotPicture);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");

+ 15 - 0
src/main/java/com/steerinfo/dil/model/TmstruckLoadResult.java

@@ -135,6 +135,12 @@ public class TmstruckLoadResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="是否需要质检(0 :不需要   1:需要)",required=false)
     private BigDecimal isdeduct;
 
+    /**
+     * 路段顺序号(SEGMENT_SQE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="路段顺序号",required=false)
+    private BigDecimal segmentSqe;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -315,6 +321,14 @@ public class TmstruckLoadResult implements IBasePO<BigDecimal> {
         this.isdeduct = isdeduct;
     }
 
+    public BigDecimal getSegmentSqe() {
+        return segmentSqe;
+    }
+
+    public void setSegmentSqe(BigDecimal segmentSqe) {
+        this.segmentSqe = segmentSqe;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -342,6 +356,7 @@ public class TmstruckLoadResult implements IBasePO<BigDecimal> {
         sb.append(", materialId=").append(materialId);
         sb.append(", loadingSequence=").append(loadingSequence);
         sb.append(", isdeduct=").append(isdeduct);
+        sb.append(", segmentSqe=").append(segmentSqe);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 21 - 6
src/main/java/com/steerinfo/dil/model/TmstruckUnloadResult.java

@@ -46,10 +46,10 @@ public class TmstruckUnloadResult implements IBasePO<BigDecimal> {
     private BigDecimal resultDuration;
 
     /**
-     * 卸货状态:0:拒绝;1:同意(UNLOAD_STATUS,DECIMAL,0)
+     * 卸货状态:拒绝;同意(UNLOAD_STATUS,VARCHAR,5)
      */
-    @ApiModelProperty(value="卸货状态:0:拒绝;1:同意",required=false)
-    private BigDecimal unloadStatus;
+    @ApiModelProperty(value="卸货状态:拒绝;同意",required=false)
+    private String unloadStatus;
 
     /**
      * 记录创建人(INSERT_USERNAME,VARCHAR,20)
@@ -99,6 +99,12 @@ public class TmstruckUnloadResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="卸货点(连原料仓库)",required=false)
     private BigDecimal resultUnloadPlaceId;
 
+    /**
+     * 路段顺序号(SEGMENT_SQE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="路段顺序号",required=false)
+    private BigDecimal segmentSqe;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -159,12 +165,12 @@ public class TmstruckUnloadResult implements IBasePO<BigDecimal> {
         this.resultDuration = resultDuration;
     }
 
-    public BigDecimal getUnloadStatus() {
+    public String getUnloadStatus() {
         return unloadStatus;
     }
 
-    public void setUnloadStatus(BigDecimal unloadStatus) {
-        this.unloadStatus = unloadStatus;
+    public void setUnloadStatus(String unloadStatus) {
+        this.unloadStatus = unloadStatus == null ? null : unloadStatus.trim();
     }
 
     public String getInsertUsername() {
@@ -231,6 +237,14 @@ public class TmstruckUnloadResult implements IBasePO<BigDecimal> {
         this.resultUnloadPlaceId = resultUnloadPlaceId;
     }
 
+    public BigDecimal getSegmentSqe() {
+        return segmentSqe;
+    }
+
+    public void setSegmentSqe(BigDecimal segmentSqe) {
+        this.segmentSqe = segmentSqe;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -252,6 +266,7 @@ public class TmstruckUnloadResult implements IBasePO<BigDecimal> {
         sb.append(", deleteName=").append(deleteName);
         sb.append(", deleteTime=").append(deleteTime);
         sb.append(", resultUnloadPlaceId=").append(resultUnloadPlaceId);
+        sb.append(", segmentSqe=").append(segmentSqe);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 16 - 1
src/main/java/com/steerinfo/dil/model/TmstruckWeightResult.java

@@ -22,7 +22,7 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
     private BigDecimal resultTotalId;
 
     /**
-     * 磅单号(RESULT_POUND_NO,VARCHAR,20)
+     * 磅单号(RESULT_POUND_NO,VARCHAR,100)
      */
     @ApiModelProperty(value="磅单号",required=false)
     private String resultPoundNo;
@@ -129,6 +129,12 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="是否完成扣水扣杂(0:否,1:是)",required=false)
     private BigDecimal isquality;
 
+    /**
+     * 路段顺序号(SEGMENT_SQE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="路段顺序号",required=false)
+    private BigDecimal segmentSqe;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -301,6 +307,14 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
         this.isquality = isquality;
     }
 
+    public BigDecimal getSegmentSqe() {
+        return segmentSqe;
+    }
+
+    public void setSegmentSqe(BigDecimal segmentSqe) {
+        this.segmentSqe = segmentSqe;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -327,6 +341,7 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
         sb.append(", materialId=").append(materialId);
         sb.append(", isdeduct=").append(isdeduct);
         sb.append(", isquality=").append(isquality);
+        sb.append(", segmentSqe=").append(segmentSqe);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 2 - 4
src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java

@@ -1,12 +1,8 @@
 package com.steerinfo.dil.service.impl;
 
-import com.steerinfo.dil.mapper.RulesMapper;
 import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
-import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
 import com.steerinfo.dil.model.TmstruckEnfactoryResult;
-import com.steerinfo.dil.model.TmstruckWeightResult;
 import com.steerinfo.dil.service.ITmstruckEnfactoryResultService;
-import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -68,6 +64,8 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
         }
         //添加实绩总表Id
         tmstruckEnfactoryResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        // 添加路段顺序号
+        tmstruckEnfactoryResult.setSegmenSqe(DataChange.dataToBigDecimal(map.get("segmentSqe")));
         return tmstruckEnfactoryResultMapper.insertSelective(tmstruckEnfactoryResult);
     }
 

+ 2 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java

@@ -74,6 +74,8 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
         tmstruckLeaveFactoryResult.setId(tmstruckLeaveFactoryResultMapper.selectMaxId());
         //添加总实绩ID
         tmstruckLeaveFactoryResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        //添加路段顺序号
+        tmstruckLeaveFactoryResult.setSegmentSqe(DataChange.dataToBigDecimal(map.get("segmentSqe")));
         //添加门岗ID 出厂门岗为线路的终点
 //        tmstruckLeaveFactoryResult.setGatepostId(DataChange.dataToBigDecimal(map.get("lineEndNodeId")));
         return tmstruckLeaveFactoryResultMapper.insertSelective(tmstruckLeaveFactoryResult);

+ 2 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java

@@ -150,6 +150,8 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
         tmstruckLoadResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
         //添加总实绩ID
         tmstruckLoadResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        // 添加路段顺序号
+        tmstruckLoadResult.setSegmentSqe(DataChange.dataToBigDecimal(map.get("segmentSqe")));
         return tmstruckLoadResultMapper.insertSelective(tmstruckLoadResult);
     }
 

+ 3 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java

@@ -73,6 +73,8 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
         tmstruckUnloadResult.setId(maxId);
         //插入实绩总表ID
         tmstruckUnloadResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        // 添加路段顺序号
+        tmstruckUnloadResult.setSegmentSqe(DataChange.dataToBigDecimal(map.get("segmentSqe")));
         //插入卸货点 通过总实绩ID查询卸货点
         tmstruckUnloadResult.setResultUnloadPlaceId(tmstruckUnloadResultMapper.getUnloadPointId(map));
         //新增卸车实绩
@@ -183,7 +185,7 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
         //获得卸货时间
         tmstruckUnloadResult.setResultStartTime(new Date());
         //扫码后确认卸货所以卸货状态码为  1 同意
-        tmstruckUnloadResult.setUnloadStatus(new BigDecimal(1));
+        tmstruckUnloadResult.setUnloadStatus("同意");
         tmstruckUnloadResult.setInsertTime(new Date());
         tmstruckUnloadResult.setInsertUsername("admin");
         //新增卸车实绩内容

+ 2 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -144,6 +144,8 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         tmstruckWeightResult.setIsdeduct(DataChange.dataToBigDecimal(map.get("isdeduct")));
         // 添加物资Id (销售、内转到异地库)
         tmstruckWeightResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
+        // 添加路段顺序号
+        tmstruckWeightResult.setSegmentSqe(DataChange.dataToBigDecimal(map.get("segmentSqe")));
         return tmstruckWeightResultMapper.insertSelective(tmstruckWeightResult);
     }
 

+ 63 - 45
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -2,39 +2,36 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckEnfactoryResult">
-        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
-        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
-        <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId"/>
-        <result column="RESULT_ENTRY_MODE" jdbcType="VARCHAR" property="resultEntryMode"/>
-        <result column="RESULT_ENTRY_GATE_TIME" jdbcType="TIMESTAMP" property="resultEntryGateTime"/>
-        <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername"/>
-        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+        <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId" />
+        <result column="RESULT_ENTRY_MODE" jdbcType="VARCHAR" property="resultEntryMode" />
+        <result column="RESULT_ENTRY_GATE_TIME" jdbcType="TIMESTAMP" property="resultEntryGateTime" />
+        <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername" />
+        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+        <result column="SEGMEN_SQE" jdbcType="DECIMAL" property="segmenSqe" />
     </resultMap>
     <sql id="columns">
         RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, RESULT_ENTRY_MODE, RESULT_ENTRY_GATE_TIME,
-    RESULT_MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
-    DELETE_USERNAME, DELETE_TIME
+    RESULT_MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETE_USERNAME, DELETE_TIME, SEGMEN_SQE
     </sql>
     <sql id="columns_alias">
         t.RESULT_ID, t.RESULT_TOTAL_ID, t.GATEPOST_ID, t.RESULT_ENTRY_MODE, t.RESULT_ENTRY_GATE_TIME,
-    t.RESULT_MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
-    t.INSERT_UPDATE_REMARK, t.DELETE_USERNAME, t.DELETE_TIME
+    t.RESULT_MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
+    t.INSERT_UPDATE_REMARK, t.DELETE_USERNAME, t.DELETE_TIME, t.SEGMEN_SQE
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM TMSTRUCK_ENFACTORY_RESULT
+        SELECT <include refid="columns"/> FROM TMSTRUCK_ENFACTORY_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM TMSTRUCK_ENFACTORY_RESULT t
+        SELECT <include refid="columns_alias"/> FROM TMSTRUCK_ENFACTORY_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -77,6 +74,9 @@
             <if test="deleteTime != null">
                 and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
             </if>
+            <if test="segmenSqe != null">
+                and SEGMEN_SQE = #{segmenSqe}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -120,11 +120,13 @@
             <if test="deleteTime != null">
                 and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
             </if>
+            <if test="segmenSqe != null">
+                and SEGMEN_SQE = #{segmenSqe}
+            </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
-        delete
-        from TMSTRUCK_ENFACTORY_RESULT
+        delete from TMSTRUCK_ENFACTORY_RESULT
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -166,19 +168,23 @@
         <if test="deleteTime != null">
             or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
         </if>
+        <if test="segmenSqe != null">
+            or SEGMEN_SQE = #{segmenSqe}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
         insert into TMSTRUCK_ENFACTORY_RESULT (RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID,
                                                RESULT_ENTRY_MODE, RESULT_ENTRY_GATE_TIME,
                                                RESULT_MEMO, INSERT_USERNAME, INSERT_TIME,
                                                UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
-                                               DELETE_USERNAME, DELETE_TIME)
+                                               DELETE_USERNAME, DELETE_TIME, SEGMEN_SQE
+        )
         values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL},
                 #{resultEntryMode,jdbcType=VARCHAR}, #{resultEntryGateTime,jdbcType=TIMESTAMP},
                 #{resultMemo,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
-                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR},
-                #{deleteUsername,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP})
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleteUsername,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{segmenSqe,jdbcType=DECIMAL}
+               )
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
         insert into TMSTRUCK_ENFACTORY_RESULT
@@ -222,6 +228,9 @@
             <if test="deleteTime != null">
                 DELETE_TIME,
             </if>
+            <if test="segmenSqe != null">
+                SEGMEN_SQE,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="resultId != null">
@@ -263,22 +272,26 @@
             <if test="deleteTime != null">
                 #{deleteTime,jdbcType=TIMESTAMP},
             </if>
+            <if test="segmenSqe != null">
+                #{segmenSqe,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
         update TMSTRUCK_ENFACTORY_RESULT
-        set RESULT_TOTAL_ID        = #{resultTotalId,jdbcType=DECIMAL},
-            GATEPOST_ID            = #{gatepostId,jdbcType=DECIMAL},
-            RESULT_ENTRY_MODE      = #{resultEntryMode,jdbcType=VARCHAR},
+        set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
+            RESULT_ENTRY_MODE = #{resultEntryMode,jdbcType=VARCHAR},
             RESULT_ENTRY_GATE_TIME = #{resultEntryGateTime,jdbcType=TIMESTAMP},
-            RESULT_MEMO            = #{resultMemo,jdbcType=VARCHAR},
-            INSERT_USERNAME        = #{insertUsername,jdbcType=VARCHAR},
-            INSERT_TIME            = #{insertTime,jdbcType=TIMESTAMP},
-            UPDATE_USERNAME        = #{updateUsername,jdbcType=VARCHAR},
-            UPDATE_TIME            = #{updateTime,jdbcType=TIMESTAMP},
-            INSERT_UPDATE_REMARK   = #{insertUpdateRemark,jdbcType=VARCHAR},
-            DELETE_USERNAME        = #{deleteUsername,jdbcType=VARCHAR},
-            DELETE_TIME            = #{deleteTime,jdbcType=TIMESTAMP}
+            RESULT_MEMO = #{resultMemo,jdbcType=VARCHAR},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
+            DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+            SEGMEN_SQE = #{segmenSqe,jdbcType=DECIMAL}
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
@@ -320,6 +333,9 @@
             <if test="deleteTime != null">
                 DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
             </if>
+            <if test="segmenSqe != null">
+                SEGMEN_SQE = #{segmenSqe,jdbcType=DECIMAL},
+            </if>
         </set>
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
@@ -343,17 +359,16 @@
         INSERT_USERNAME, INSERT_TIME,
         UPDATE_USERNAME, UPDATE_TIME,
         INSERT_UPDATE_REMARK, DELETE_USERNAME,
-        DELETE_TIME)
+        DELETE_TIME, SEGMEN_SQE)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.resultId,jdbcType=DECIMAL},
-        #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL},
-        #{item.resultEntryMode,jdbcType=VARCHAR},
+        #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL}, #{item.resultEntryMode,jdbcType=VARCHAR},
         #{item.resultEntryGateTime,jdbcType=TIMESTAMP}, #{item.resultMemo,jdbcType=VARCHAR},
         #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
         #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
         #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteUsername,jdbcType=VARCHAR},
-        #{item.deleteTime,jdbcType=TIMESTAMP} from dual
+        #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.segmenSqe,jdbcType=DECIMAL} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
@@ -411,6 +426,10 @@
         <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
         </foreach>
+        ,SEGMEN_SQE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.segmenSqe,jdbcType=DECIMAL}
+        </foreach>
         where RESULT_ID in
         <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
             #{item.resultId,jdbcType=DECIMAL}
@@ -425,7 +444,6 @@
     </delete>
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
     <!--  按照进厂时间进行排序 -->
     <sql id="orderByEnterTime">
         <if test="orderField != null and orderField != ''">

+ 66 - 49
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -2,39 +2,36 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
-        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
-        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
-        <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId"/>
-        <result column="RESULT_OUT_MODE" jdbcType="VARCHAR" property="resultOutMode"/>
-        <result column="RESULT_OUT_GATE_TIME" jdbcType="TIMESTAMP" property="resultOutGateTime"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername"/>
-        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
-        <result column="RESULT_TRUCK_SNAPSHOT_PICTURE" jdbcType="BLOB" property="resultTruckSnapshotPicture"/>
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+        <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId" />
+        <result column="RESULT_OUT_MODE" jdbcType="VARCHAR" property="resultOutMode" />
+        <result column="RESULT_OUT_GATE_TIME" jdbcType="TIMESTAMP" property="resultOutGateTime" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername" />
+        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+        <result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
+        <result column="RESULT_TRUCK_SNAPSHOT_PICTURE" jdbcType="BLOB" property="resultTruckSnapshotPicture" />
     </resultMap>
     <sql id="columns">
         RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, RESULT_OUT_MODE, RESULT_OUT_GATE_TIME, INSERT_USERNAME,
-    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_USERNAME, 
-    DELETE_TIME, RESULT_TRUCK_SNAPSHOT_PICTURE
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_USERNAME,
+    DELETE_TIME, SEGMENT_SQE, RESULT_TRUCK_SNAPSHOT_PICTURE
     </sql>
     <sql id="columns_alias">
         t.RESULT_ID, t.RESULT_TOTAL_ID, t.GATEPOST_ID, t.RESULT_OUT_MODE, t.RESULT_OUT_GATE_TIME,
-    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
-    t.DELETE_USERNAME, t.DELETE_TIME, t.RESULT_TRUCK_SNAPSHOT_PICTURE
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
+    t.DELETE_USERNAME, t.DELETE_TIME, t.SEGMENT_SQE, t.RESULT_TRUCK_SNAPSHOT_PICTURE
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM TMSTRUCK_LEAVE_FACTORY_RESULT
+        SELECT <include refid="columns"/> FROM TMSTRUCK_LEAVE_FACTORY_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM TMSTRUCK_LEAVE_FACTORY_RESULT t
+        SELECT <include refid="columns_alias"/> FROM TMSTRUCK_LEAVE_FACTORY_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -74,6 +71,9 @@
             <if test="deleteTime != null">
                 and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
             <if test="resultTruckSnapshotPicture != null">
                 and RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
             </if>
@@ -117,14 +117,16 @@
             <if test="deleteTime != null">
                 and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
             <if test="resultTruckSnapshotPicture != null">
                 and RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
             </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-        delete
-        from TMSTRUCK_LEAVE_FACTORY_RESULT
+        delete from TMSTRUCK_LEAVE_FACTORY_RESULT
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -163,6 +165,9 @@
         <if test="deleteTime != null">
             or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
         </if>
+        <if test="segmentSqe != null">
+            or SEGMENT_SQE = #{segmentSqe}
+        </if>
         <if test="resultTruckSnapshotPicture != null">
             or RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
         </if>
@@ -172,14 +177,12 @@
                                                    RESULT_OUT_MODE, RESULT_OUT_GATE_TIME, INSERT_USERNAME,
                                                    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
                                                    INSERT_UPDATE_REMARK, DELETE_USERNAME, DELETE_TIME,
-                                                   RESULT_TRUCK_SNAPSHOT_PICTURE)
+                                                   SEGMENT_SQE, RESULT_TRUCK_SNAPSHOT_PICTURE)
         values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL},
-                #{resultOutMode,jdbcType=VARCHAR}, #{resultOutGateTime,jdbcType=TIMESTAMP},
-                #{insertUsername,jdbcType=VARCHAR},
+                #{resultOutMode,jdbcType=VARCHAR}, #{resultOutGateTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR},
                 #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleteUsername,jdbcType=VARCHAR},
-                #{deleteTime,jdbcType=TIMESTAMP},
-                #{resultTruckSnapshotPicture,jdbcType=BLOB})
+                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleteUsername,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP},
+                #{segmentSqe,jdbcType=DECIMAL}, #{resultTruckSnapshotPicture,jdbcType=BLOB})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
         insert into TMSTRUCK_LEAVE_FACTORY_RESULT
@@ -220,6 +223,9 @@
             <if test="deleteTime != null">
                 DELETE_TIME,
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE,
+            </if>
             <if test="resultTruckSnapshotPicture != null">
                 RESULT_TRUCK_SNAPSHOT_PICTURE,
             </if>
@@ -261,6 +267,9 @@
             <if test="deleteTime != null">
                 #{deleteTime,jdbcType=TIMESTAMP},
             </if>
+            <if test="segmentSqe != null">
+                #{segmentSqe,jdbcType=DECIMAL},
+            </if>
             <if test="resultTruckSnapshotPicture != null">
                 #{resultTruckSnapshotPicture,jdbcType=BLOB},
             </if>
@@ -268,17 +277,18 @@
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
         update TMSTRUCK_LEAVE_FACTORY_RESULT
-        set RESULT_TOTAL_ID               = #{resultTotalId,jdbcType=DECIMAL},
-            GATEPOST_ID                   = #{gatepostId,jdbcType=DECIMAL},
-            RESULT_OUT_MODE               = #{resultOutMode,jdbcType=VARCHAR},
-            RESULT_OUT_GATE_TIME          = #{resultOutGateTime,jdbcType=TIMESTAMP},
-            INSERT_USERNAME               = #{insertUsername,jdbcType=VARCHAR},
-            INSERT_TIME                   = #{insertTime,jdbcType=TIMESTAMP},
-            UPDATE_USERNAME               = #{updateUsername,jdbcType=VARCHAR},
-            UPDATE_TIME                   = #{updateTime,jdbcType=TIMESTAMP},
-            INSERT_UPDATE_REMARK          = #{insertUpdateRemark,jdbcType=VARCHAR},
-            DELETE_USERNAME               = #{deleteUsername,jdbcType=VARCHAR},
-            DELETE_TIME                   = #{deleteTime,jdbcType=TIMESTAMP},
+        set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
+            RESULT_OUT_MODE = #{resultOutMode,jdbcType=VARCHAR},
+            RESULT_OUT_GATE_TIME = #{resultOutGateTime,jdbcType=TIMESTAMP},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
+            DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+            SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
             RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture,jdbcType=BLOB}
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
@@ -318,6 +328,9 @@
             <if test="deleteTime != null">
                 DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
+            </if>
             <if test="resultTruckSnapshotPicture != null">
                 RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture,jdbcType=BLOB},
             </if>
@@ -328,11 +341,11 @@
         <include refid="select"/>
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </select>
-    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="ResultMapWithBLOBs">
         <include refid="select"/>
         <include refid="where"/>
     </select>
-    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="ResultMapWithBLOBs">
         <include refid="select"/>
         <include refid="whereLike"/>
     </select>
@@ -344,17 +357,18 @@
         INSERT_TIME, UPDATE_USERNAME,
         UPDATE_TIME, INSERT_UPDATE_REMARK,
         DELETE_USERNAME, DELETE_TIME,
-        RESULT_TRUCK_SNAPSHOT_PICTURE)
+        SEGMENT_SQE, RESULT_TRUCK_SNAPSHOT_PICTURE
+        )
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.resultId,jdbcType=DECIMAL},
-        #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL},
-        #{item.resultOutMode,jdbcType=VARCHAR},
+        #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL}, #{item.resultOutMode,jdbcType=VARCHAR},
         #{item.resultOutGateTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
         #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
         #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
         #{item.deleteUsername,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP},
-        #{item.resultTruckSnapshotPicture,jdbcType=BLOB} from dual
+        #{item.segmentSqe,jdbcType=DECIMAL}, #{item.resultTruckSnapshotPicture,jdbcType=BLOB}
+        from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
@@ -408,6 +422,10 @@
         <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
         </foreach>
+        ,SEGMENT_SQE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.segmentSqe,jdbcType=DECIMAL}
+        </foreach>
         ,RESULT_TRUCK_SNAPSHOT_PICTURE=
         <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTruckSnapshotPicture,jdbcType=BLOB}
@@ -426,7 +444,6 @@
     </delete>
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
     <sql id="orderByOutTime">
         <if test="orderField != null and orderField != ''">
             order by "${orderField}"

+ 68 - 44
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -23,25 +23,26 @@
         <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
         <result column="LOADING_SEQUENCE" jdbcType="DECIMAL" property="loadingSequence" />
         <result column="ISDEDUCT" jdbcType="DECIMAL" property="isdeduct" />
+        <result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
     </resultMap>
     <sql id="columns">
-        RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME, RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION, 
-    LOAD_STANDARD_TIME_ID, LOADER_ID, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME, INSERT_USERNAME, 
-    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE, 
-    LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE, ISDEDUCT
+        RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME, RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION,
+    LOAD_STANDARD_TIME_ID, LOADER_ID, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
+    LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE, ISDEDUCT, SEGMENT_SQE
     </sql>
     <sql id="columns_alias">
-        t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_LOAD_START_TIME, t.RESULT_LOAD_END_TIME, 
-    t.RESULT_LOAD_DURATION, t.LOAD_STANDARD_TIME_ID, t.LOADER_ID, t.RESULT_ISCLEAR, t.DELETE_NAME, 
-    t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
-    t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_MEASURED_TONNAGE, t.LOADING_ID, t.MATERIAL_ID, 
-    t.LOADING_SEQUENCE, t.ISDEDUCT
+        t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_LOAD_START_TIME, t.RESULT_LOAD_END_TIME,
+    t.RESULT_LOAD_DURATION, t.LOAD_STANDARD_TIME_ID, t.LOADER_ID, t.RESULT_ISCLEAR, t.DELETE_NAME,
+    t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
+    t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_MEASURED_TONNAGE, t.LOADING_ID, t.MATERIAL_ID,
+    t.LOADING_SEQUENCE, t.ISDEDUCT, t.SEGMENT_SQE
     </sql>
     <sql id="select">
-        SELECT <include refid="columns" /> FROM TMSTRUCK_LOAD_RESULT
+        SELECT <include refid="columns"/> FROM TMSTRUCK_LOAD_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT <include refid="columns_alias" /> FROM TMSTRUCK_LOAD_RESULT t
+        SELECT <include refid="columns_alias"/> FROM TMSTRUCK_LOAD_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -108,6 +109,9 @@
             <if test="isdeduct != null">
                 and ISDEDUCT = #{isdeduct}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -175,6 +179,9 @@
             <if test="isdeduct != null">
                 and ISDEDUCT = #{isdeduct}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -244,6 +251,9 @@
         <if test="isdeduct != null">
             or ISDEDUCT = #{isdeduct}
         </if>
+        <if test="segmentSqe != null">
+            or SEGMENT_SQE = #{segmentSqe}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
         insert into TMSTRUCK_LOAD_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME,
@@ -253,7 +263,7 @@
                                           INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
                                           INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
                                           LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE,
-                                          ISDEDUCT)
+                                          ISDEDUCT, SEGMENT_SQE)
         values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultLoadStartTime,jdbcType=TIMESTAMP},
                 #{resultLoadEndTime,jdbcType=TIMESTAMP}, #{resultLoadDuration,jdbcType=DECIMAL},
                 #{loadStandardTimeId,jdbcType=DECIMAL}, #{loaderId,jdbcType=DECIMAL}, #{resultIsclear,jdbcType=VARCHAR},
@@ -261,7 +271,7 @@
                 #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
                 #{insertUpdateRemark,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL}, #{resultMeasuredTonnage,jdbcType=DECIMAL},
                 #{loadingId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{loadingSequence,jdbcType=DECIMAL},
-                #{isdeduct,jdbcType=DECIMAL})
+                #{isdeduct,jdbcType=DECIMAL}, #{segmentSqe,jdbcType=DECIMAL})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
         insert into TMSTRUCK_LOAD_RESULT
@@ -329,6 +339,9 @@
             <if test="isdeduct != null">
                 ISDEDUCT,
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="resultId != null">
@@ -394,6 +407,9 @@
             <if test="isdeduct != null">
                 #{isdeduct,jdbcType=DECIMAL},
             </if>
+            <if test="segmentSqe != null">
+                #{segmentSqe,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
@@ -417,7 +433,8 @@
             LOADING_ID = #{loadingId,jdbcType=DECIMAL},
             MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
             LOADING_SEQUENCE = #{loadingSequence,jdbcType=DECIMAL},
-            ISDEDUCT = #{isdeduct,jdbcType=DECIMAL}
+            ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
+            SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL}
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
@@ -483,20 +500,23 @@
             <if test="isdeduct != null">
                 ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
+            </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 TMSTRUCK_LOAD_RESULT
@@ -509,7 +529,7 @@
         UPDATE_USERNAME, UPDATE_TIME,
         INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
         LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE,
-        ISDEDUCT)
+        ISDEDUCT, SEGMENT_SQE)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.resultId,jdbcType=DECIMAL},
@@ -521,105 +541,109 @@
         #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
         #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL}, #{item.resultMeasuredTonnage,jdbcType=DECIMAL},
         #{item.loadingId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.loadingSequence,jdbcType=DECIMAL},
-        #{item.isdeduct,jdbcType=DECIMAL} from dual
+        #{item.isdeduct,jdbcType=DECIMAL}, #{item.segmentSqe,jdbcType=DECIMAL} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
         update TMSTRUCK_LOAD_RESULT
         set
         RESULT_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TOTAL_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_LOAD_START_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadStartTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_LOAD_END_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadEndTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_LOAD_DURATION=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadDuration,jdbcType=DECIMAL}
         </foreach>
         ,LOAD_STANDARD_TIME_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.loadStandardTimeId,jdbcType=DECIMAL}
         </foreach>
         ,LOADER_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.loaderId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_ISCLEAR=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_NAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,STATUS=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_MEASURED_TONNAGE=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMeasuredTonnage,jdbcType=DECIMAL}
         </foreach>
         ,LOADING_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.loadingId,jdbcType=DECIMAL}
         </foreach>
         ,MATERIAL_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
         </foreach>
         ,LOADING_SEQUENCE=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.loadingSequence,jdbcType=DECIMAL}
         </foreach>
         ,ISDEDUCT=
-        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.isdeduct,jdbcType=DECIMAL}
         </foreach>
+        ,SEGMENT_SQE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.segmentSqe,jdbcType=DECIMAL}
+        </foreach>
         where RESULT_ID in
-        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
             #{item.resultId,jdbcType=DECIMAL}
         </foreach>
     </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from TMSTRUCK_LOAD_RESULT
         where RESULT_ID in
-        <foreach close=")" collection="list" item="id" open="(" separator=",">
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
             #{id}
         </foreach>
     </delete>

+ 80 - 62
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -2,41 +2,39 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.TmstruckUnloadResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckUnloadResult">
-        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
-        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
-        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
-        <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime"/>
-        <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime"/>
-        <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration"/>
-        <result column="UNLOAD_STATUS" jdbcType="DECIMAL" property="unloadStatus"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
-        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
-        <result column="RESULT_UNLOAD_PLACE_ID" jdbcType="DECIMAL" property="resultUnloadPlaceId"/>
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber" />
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+        <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime" />
+        <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime" />
+        <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration" />
+        <result column="UNLOAD_STATUS" jdbcType="VARCHAR" property="unloadStatus" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
+        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+        <result column="RESULT_UNLOAD_PLACE_ID" jdbcType="DECIMAL" property="resultUnloadPlaceId" />
+        <result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
     </resultMap>
     <sql id="columns">
         RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID, RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
-    UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
-    DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID
+    UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID, SEGMENT_SQE
     </sql>
     <sql id="columns_alias">
         t.RESULT_ID, t.RESULT_NUMBER, t.RESULT_TOTAL_ID, t.RESULT_START_TIME, t.RESULT_END_TIME,
-    t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID
+    t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID,
+    t.SEGMENT_SQE
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM TMSTRUCK_UNLOAD_RESULT
+        SELECT <include refid="columns"/> FROM TMSTRUCK_UNLOAD_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM TMSTRUCK_UNLOAD_RESULT t
+        SELECT <include refid="columns_alias"/> FROM TMSTRUCK_UNLOAD_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -58,7 +56,7 @@
             <if test="resultDuration != null">
                 and RESULT_DURATION = #{resultDuration}
             </if>
-            <if test="unloadStatus != null">
+            <if test="unloadStatus != null and unloadStatus != ''">
                 and UNLOAD_STATUS = #{unloadStatus}
             </if>
             <if test="insertUsername != null and insertUsername != ''">
@@ -85,6 +83,9 @@
             <if test="resultUnloadPlaceId != null">
                 and RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -107,8 +108,8 @@
             <if test="resultDuration != null">
                 and RESULT_DURATION = #{resultDuration}
             </if>
-            <if test="unloadStatus != null">
-                and UNLOAD_STATUS = #{unloadStatus}
+            <if test="unloadStatus != null and unloadStatus != ''">
+                and UNLOAD_STATUS LIKE '%${unloadStatus}%'
             </if>
             <if test="insertUsername != null and insertUsername != ''">
                 and INSERT_USERNAME LIKE '%${insertUsername}%'
@@ -134,11 +135,13 @@
             <if test="resultUnloadPlaceId != null">
                 and RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
-        delete
-        from TMSTRUCK_UNLOAD_RESULT
+        delete from TMSTRUCK_UNLOAD_RESULT
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -159,7 +162,7 @@
         <if test="resultDuration != null">
             or RESULT_DURATION = #{resultDuration}
         </if>
-        <if test="unloadStatus != null">
+        <if test="unloadStatus != null and unloadStatus != ''">
             or UNLOAD_STATUS = #{unloadStatus}
         </if>
         <if test="insertUsername != null and insertUsername != ''">
@@ -186,21 +189,23 @@
         <if test="resultUnloadPlaceId != null">
             or RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
         </if>
+        <if test="segmentSqe != null">
+            or SEGMENT_SQE = #{segmentSqe}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
         insert into TMSTRUCK_UNLOAD_RESULT (RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID,
                                             RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
                                             UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME,
                                             UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
-                                            DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID)
+                                            DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID,
+                                            SEGMENT_SQE)
         values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{resultTotalId,jdbcType=DECIMAL},
-                #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP},
-                #{resultDuration,jdbcType=DECIMAL},
-                #{unloadStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
-                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR},
-                #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP},
-                #{resultUnloadPlaceId,jdbcType=DECIMAL})
+                #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP}, #{resultDuration,jdbcType=DECIMAL},
+                #{unloadStatus,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{resultUnloadPlaceId,jdbcType=DECIMAL},
+                #{segmentSqe,jdbcType=DECIMAL})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
         insert into TMSTRUCK_UNLOAD_RESULT
@@ -250,6 +255,9 @@
             <if test="resultUnloadPlaceId != null">
                 RESULT_UNLOAD_PLACE_ID,
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="resultId != null">
@@ -271,7 +279,7 @@
                 #{resultDuration,jdbcType=DECIMAL},
             </if>
             <if test="unloadStatus != null">
-                #{unloadStatus,jdbcType=DECIMAL},
+                #{unloadStatus,jdbcType=VARCHAR},
             </if>
             <if test="insertUsername != null">
                 #{insertUsername,jdbcType=VARCHAR},
@@ -297,24 +305,28 @@
             <if test="resultUnloadPlaceId != null">
                 #{resultUnloadPlaceId,jdbcType=DECIMAL},
             </if>
+            <if test="segmentSqe != null">
+                #{segmentSqe,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
         update TMSTRUCK_UNLOAD_RESULT
-        set RESULT_NUMBER          = #{resultNumber,jdbcType=VARCHAR},
-            RESULT_TOTAL_ID        = #{resultTotalId,jdbcType=DECIMAL},
-            RESULT_START_TIME      = #{resultStartTime,jdbcType=TIMESTAMP},
-            RESULT_END_TIME        = #{resultEndTime,jdbcType=TIMESTAMP},
-            RESULT_DURATION        = #{resultDuration,jdbcType=DECIMAL},
-            UNLOAD_STATUS          = #{unloadStatus,jdbcType=DECIMAL},
-            INSERT_USERNAME        = #{insertUsername,jdbcType=VARCHAR},
-            INSERT_TIME            = #{insertTime,jdbcType=TIMESTAMP},
-            UPDATE_USERNAME        = #{updateUsername,jdbcType=VARCHAR},
-            UPDATE_TIME            = #{updateTime,jdbcType=TIMESTAMP},
-            INSERT_UPDATE_REMARK   = #{insertUpdateRemark,jdbcType=VARCHAR},
-            DELETE_NAME            = #{deleteName,jdbcType=VARCHAR},
-            DELETE_TIME            = #{deleteTime,jdbcType=TIMESTAMP},
-            RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL}
+        set RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
+            RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
+            RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
+            RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
+            UNLOAD_STATUS = #{unloadStatus,jdbcType=VARCHAR},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+            DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+            RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL},
+            SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL}
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
@@ -336,7 +348,7 @@
                 RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
             </if>
             <if test="unloadStatus != null">
-                UNLOAD_STATUS = #{unloadStatus,jdbcType=DECIMAL},
+                UNLOAD_STATUS = #{unloadStatus,jdbcType=VARCHAR},
             </if>
             <if test="insertUsername != null">
                 INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
@@ -362,6 +374,9 @@
             <if test="resultUnloadPlaceId != null">
                 RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL},
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
+            </if>
         </set>
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
@@ -386,19 +401,19 @@
         INSERT_USERNAME, INSERT_TIME,
         UPDATE_USERNAME, UPDATE_TIME,
         INSERT_UPDATE_REMARK, DELETE_NAME,
-        DELETE_TIME, RESULT_UNLOAD_PLACE_ID
-        )
+        DELETE_TIME, RESULT_UNLOAD_PLACE_ID,
+        SEGMENT_SQE)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.resultId,jdbcType=DECIMAL},
         #{item.resultNumber,jdbcType=VARCHAR}, #{item.resultTotalId,jdbcType=DECIMAL},
         #{item.resultStartTime,jdbcType=TIMESTAMP}, #{item.resultEndTime,jdbcType=TIMESTAMP},
-        #{item.resultDuration,jdbcType=DECIMAL}, #{item.unloadStatus,jdbcType=DECIMAL},
+        #{item.resultDuration,jdbcType=DECIMAL}, #{item.unloadStatus,jdbcType=VARCHAR},
         #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
         #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
         #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
-        #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultUnloadPlaceId,jdbcType=DECIMAL}
-        from dual
+        #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultUnloadPlaceId,jdbcType=DECIMAL},
+        #{item.segmentSqe,jdbcType=DECIMAL} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
@@ -430,7 +445,7 @@
         </foreach>
         ,UNLOAD_STATUS=
         <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
-            when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadStatus,jdbcType=DECIMAL}
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadStatus,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_USERNAME=
         <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
@@ -464,6 +479,10 @@
         <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultUnloadPlaceId,jdbcType=DECIMAL}
         </foreach>
+        ,SEGMENT_SQE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.segmentSqe,jdbcType=DECIMAL}
+        </foreach>
         where RESULT_ID in
         <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
             #{item.resultId,jdbcType=DECIMAL}
@@ -478,7 +497,6 @@
     </delete>
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
     <!--  排序 -->
     <sql id="orderBy">
         <if test="orderField != null and orderField != ''">

+ 69 - 44
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -22,25 +22,26 @@
         <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
         <result column="ISDEDUCT" jdbcType="DECIMAL" property="isdeduct" />
         <result column="ISQUALITY" jdbcType="DECIMAL" property="isquality" />
+        <result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
     </resultMap>
     <sql id="columns">
-        WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID, RESULT_POUND_NO, RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME, 
-    RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT, INSERT_USERNAME, 
-    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_NAME, DELETE_TIME, 
-    RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT, ISQUALITY
+        WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID, RESULT_POUND_NO, RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME,
+    RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_NAME, DELETE_TIME,
+    RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT, ISQUALITY, SEGMENT_SQE
     </sql>
     <sql id="columns_alias">
-        t.WEIGHT_TASK_RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_POUND_NO, t.RESULT_GROSS_WEIGHT, 
-    t.RESULT_GROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT, t.RESULT_TARE_WEIGHT_TIME, t.RESULT_NET_WEIGHT, 
-    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
-    t.DELETE_NAME, t.DELETE_TIME, t.RESULT_GROSS_PLACE_ID, t.RESULT_TARE_PLACE_ID, t.MATERIAL_ID, 
-    t.ISDEDUCT, t.ISQUALITY
+        t.WEIGHT_TASK_RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_POUND_NO, t.RESULT_GROSS_WEIGHT,
+    t.RESULT_GROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT, t.RESULT_TARE_WEIGHT_TIME, t.RESULT_NET_WEIGHT,
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
+    t.DELETE_NAME, t.DELETE_TIME, t.RESULT_GROSS_PLACE_ID, t.RESULT_TARE_PLACE_ID, t.MATERIAL_ID,
+    t.ISDEDUCT, t.ISQUALITY, t.SEGMENT_SQE
     </sql>
     <sql id="select">
-        SELECT <include refid="columns" /> FROM TMSTRUCK_WEIGHT_RESULT
+        SELECT <include refid="columns"/> FROM TMSTRUCK_WEIGHT_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT <include refid="columns_alias" /> FROM TMSTRUCK_WEIGHT_RESULT t
+        SELECT <include refid="columns_alias"/> FROM TMSTRUCK_WEIGHT_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -104,6 +105,9 @@
             <if test="isquality != null">
                 and ISQUALITY = #{isquality}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -168,6 +172,9 @@
             <if test="isquality != null">
                 and ISQUALITY = #{isquality}
             </if>
+            <if test="segmentSqe != null">
+                and SEGMENT_SQE = #{segmentSqe}
+            </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
@@ -234,6 +241,9 @@
         <if test="isquality != null">
             or ISQUALITY = #{isquality}
         </if>
+        <if test="segmentSqe != null">
+            or SEGMENT_SQE = #{segmentSqe}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
         insert into TMSTRUCK_WEIGHT_RESULT (WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID,
@@ -243,7 +253,7 @@
                                             UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
                                             DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
                                             RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT,
-                                            ISQUALITY)
+                                            ISQUALITY, SEGMENT_SQE)
         values (#{weightTaskResultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL},
                 #{resultPoundNo,jdbcType=VARCHAR}, #{resultGrossWeight,jdbcType=DECIMAL}, #{resultGrossWeightTime,jdbcType=TIMESTAMP},
                 #{resultTareWeight,jdbcType=DECIMAL}, #{resultTareWeightTime,jdbcType=TIMESTAMP},
@@ -251,7 +261,7 @@
                 #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
                 #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{resultGrossPlaceId,jdbcType=DECIMAL},
                 #{resultTarePlaceId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{isdeduct,jdbcType=DECIMAL},
-                #{isquality,jdbcType=DECIMAL})
+                #{isquality,jdbcType=DECIMAL}, #{segmentSqe,jdbcType=DECIMAL})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
         insert into TMSTRUCK_WEIGHT_RESULT
@@ -316,6 +326,9 @@
             <if test="isquality != null">
                 ISQUALITY,
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="weightTaskResultId != null">
@@ -378,6 +391,9 @@
             <if test="isquality != null">
                 #{isquality,jdbcType=DECIMAL},
             </if>
+            <if test="segmentSqe != null">
+                #{segmentSqe,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
@@ -400,7 +416,8 @@
             RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL},
             MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
             ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
-            ISQUALITY = #{isquality,jdbcType=DECIMAL}
+            ISQUALITY = #{isquality,jdbcType=DECIMAL},
+            SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL}
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
@@ -463,20 +480,23 @@
             <if test="isquality != null">
                 ISQUALITY = #{isquality,jdbcType=DECIMAL},
             </if>
+            <if test="segmentSqe != null">
+                SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
+            </if>
         </set>
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
     </update>
     <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
-        <include refid="select" />
+        <include refid="select"/>
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,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 TMSTRUCK_WEIGHT_RESULT
@@ -489,7 +509,8 @@
         UPDATE_TIME, INSERT_UPDATE_REMARK,
         DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
         RESULT_TARE_PLACE_ID, MATERIAL_ID,
-        ISDEDUCT, ISQUALITY)
+        ISDEDUCT, ISQUALITY, SEGMENT_SQE
+        )
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.weightTaskResultId,jdbcType=DECIMAL},
@@ -501,107 +522,111 @@
         #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
         #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultGrossPlaceId,jdbcType=DECIMAL},
         #{item.resultTarePlaceId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL},
-        #{item.isdeduct,jdbcType=DECIMAL}, #{item.isquality,jdbcType=DECIMAL} from dual
+        #{item.isdeduct,jdbcType=DECIMAL}, #{item.isquality,jdbcType=DECIMAL}, #{item.segmentSqe,jdbcType=DECIMAL}
+        from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
         update TMSTRUCK_WEIGHT_RESULT
         set
         WEIGHT_TASK_RESULT_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.weightTaskResultId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TOTAL_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_POUND_NO=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultPoundNo,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_GROSS_WEIGHT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeight,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_GROSS_WEIGHT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeightTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_TARE_WEIGHT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeight,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TARE_WEIGHT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeightTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_NET_WEIGHT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultNetWeight,jdbcType=DECIMAL}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_NAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_GROSS_PLACE_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossPlaceId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TARE_PLACE_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTarePlaceId,jdbcType=DECIMAL}
         </foreach>
         ,MATERIAL_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
         </foreach>
         ,ISDEDUCT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.isdeduct,jdbcType=DECIMAL}
         </foreach>
         ,ISQUALITY=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.isquality,jdbcType=DECIMAL}
         </foreach>
+        ,SEGMENT_SQE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
+            when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.segmentSqe,jdbcType=DECIMAL}
+        </foreach>
         where WEIGHT_TASK_RESULT_ID in
-        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
             #{item.weightTaskResultId,jdbcType=DECIMAL}
         </foreach>
     </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from TMSTRUCK_WEIGHT_RESULT
         where WEIGHT_TASK_RESULT_ID in
-        <foreach close=")" collection="list" item="id" open="(" separator=",">
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
             #{id}
         </foreach>
     </delete>
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
     <!--  进行排序 -->
     <sql id="orderBy">
         <if test="orderField != null and orderField != ''">