Jelajahi Sumber

添加插队

txf 3 tahun lalu
induk
melakukan
307b483ba3

+ 2 - 1
pom.xml

@@ -116,7 +116,8 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>QMS_QUEUE_RESULT</param><!--运力-->
+                        <param>QMS_QUEUE_LIST</param><!--运力-->
+                        <param>QMS_QUEUE_SPELLING_LIST</param><!--运力-->
                     </tables>
                 </configuration>
                 <executions>

+ 2 - 2
src/main/java/com/steerinfo/dil/controller/QmsQueueListController.java

@@ -63,9 +63,9 @@ public class QmsQueueListController extends BaseRESTfulController {
         return success(i);
     }
 
-    @ApiOperation(value="排队插队-->修改排队链表顺序号为最小")
+    @ApiOperation(value="排队插队-->添加插队VIP标识")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行、插队原因", required = false, dataType = "Map"),
+            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
     })
     @PostMapping("/queueCutInLine")
     public RESTfulResult queueCutInLine(@RequestBody(required=false) Map<String, Object> mapValue){

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

@@ -81,6 +81,12 @@ public class QmsQueueList implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="进厂确认时间",required=false)
     private Date entrySureTime;
 
+    /**
+     * 钢材科VIP:仅针对当前排队(IS_VIP,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="钢材科VIP:仅针对当前排队",required=false)
+    private Date isVip;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -189,6 +195,14 @@ public class QmsQueueList implements IBasePO<BigDecimal> {
         this.entrySureTime = entrySureTime;
     }
 
+    public Date getIsVip() {
+        return isVip;
+    }
+
+    public void setIsVip(Date isVip) {
+        this.isVip = isVip;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -207,6 +221,7 @@ public class QmsQueueList implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", queueResultId=").append(queueResultId);
         sb.append(", entrySureTime=").append(entrySureTime);
+        sb.append(", isVip=").append(isVip);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

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

@@ -69,6 +69,12 @@ public class QmsQueueSpellingList implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="逻辑删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 钢材插队VIP: 针对单次排队(IS_VIP,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="钢材插队VIP: 针对单次排队",required=false)
+    private Date isVip;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -161,6 +167,14 @@ public class QmsQueueSpellingList implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public Date getIsVip() {
+        return isVip;
+    }
+
+    public void setIsVip(Date isVip) {
+        this.isVip = isVip;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -177,6 +191,7 @@ public class QmsQueueSpellingList implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", updateUsername=").append(updateUsername);
         sb.append(", deleted=").append(deleted);
+        sb.append(", isVip=").append(isVip);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 54 - 23
src/main/java/com/steerinfo/dil/service/impl/QmsQueueListServiceImpl.java

@@ -243,33 +243,35 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
      * @return
      */
     @Override
+    @Transactional
     public int queueCutInLine(Map<String, Object> map) {
-        //通过实绩Id查出关联的链表Id
-        map.putAll(qmsQueueListMapper.getQueueResultByOrderNumber(map));
-        //获取链表Id
-        BigDecimal listId = DataChange.dataToBigDecimal(map.get("listId"));
-        QmsQueueList qmsQueueList = new QmsQueueList();
-        //设置链表排队顺序号 为 最小的那个 -1
-        //获取排队顺序号最小值
-        BigDecimal gridId = qmsQueueListMapper.getGridIdByListId(listId);
-        //通过网格Id匹配当前列表中最小的顺序号
-        map.putAll(qmsQueueListMapper.getQueueNumAndMin(gridId));
-        //计算插队后顺序号
-        int listNodeOrder = DataChange.dataToBigDecimal(map.get("listNodeOrder")).intValue() - 1;
-        qmsQueueList.setListId(listId);
-        qmsQueueList.setListNodeOrder(new BigDecimal(listNodeOrder));
-        qmsQueueList.setUpdateTime(new Date());
-        qmsQueueList.setUpdateUsername("admin");
-        int i = qmsQueueListMapper.updateByPrimaryKeySelective(qmsQueueList);
-        //更新排队实绩
+        List<Map<String, Object>> mapList = (List<Map<String, Object>>) map.get("mapList");
         QmsQueueResult qmsQueueResult = new QmsQueueResult();
-        qmsQueueResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
-        qmsQueueResult.setResultInsertTime(new Date());
-        qmsQueueResult.setResultInsertReason((String)map.get("resultInsertReason"));
-        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
-        return i + i1;
+        int count = 0;
+        for (Map<String, Object> mesMap : mapList) {
+            if(mesMap.get("listId") != null){
+                //单拼
+                QmsQueueList qmsQueueList = new QmsQueueList();
+                qmsQueueList.setId(DataChange.dataToBigDecimal(mesMap.get("listId")));
+                qmsQueueList.setIsVip(new Date());
+                qmsQueueListMapper.updateByPrimaryKeySelective(qmsQueueList);
+            }else{
+                //多拼
+                QmsQueueSpellingList qmsQueueSpellingList = new QmsQueueSpellingList();
+                qmsQueueSpellingList.setId(DataChange.dataToBigDecimal(mesMap.get("spellingResultId")));
+                qmsQueueSpellingList.setIsVip(new Date());
+                qmsQueueSpellingListMapper.updateByPrimaryKeySelective(qmsQueueSpellingList);
+            }
+            //更新排队实绩
+            qmsQueueResult.setId(DataChange.dataToBigDecimal(mesMap.get("resultId")));
+            qmsQueueResult.setResultInsertTime(new Date());
+            qmsQueueResult.setResultInsertReason("销售公司");
+            count += qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+        }
+        return count;
     }
 
+
     /**
      * 进厂排队结束 PDA 形式
      * 运输订单号
@@ -370,6 +372,35 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
         return qmsQueueResultMapper.getQueueListByQueueUpSpelling(map);
     }
 
+
+//    @Override
+//    public int queueCutInLine(Map<String, Object> map) {
+//        //通过实绩Id查出关联的链表Id
+//        map.putAll(qmsQueueListMapper.getQueueResultByOrderNumber(map));
+//        //获取链表Id
+//        BigDecimal listId = DataChange.dataToBigDecimal(map.get("listId"));
+//        QmsQueueList qmsQueueList = new QmsQueueList();
+//        //设置链表排队顺序号 为 最小的那个 -1
+//        //获取排队顺序号最小值
+//        BigDecimal gridId = qmsQueueListMapper.getGridIdByListId(listId);
+//        //通过网格Id匹配当前列表中最小的顺序号
+//        map.putAll(qmsQueueListMapper.getQueueNumAndMin(gridId));
+//        //计算插队后顺序号
+//        int listNodeOrder = DataChange.dataToBigDecimal(map.get("listNodeOrder")).intValue() - 1;
+//        qmsQueueList.setListId(listId);
+//        qmsQueueList.setListNodeOrder(new BigDecimal(listNodeOrder));
+//        qmsQueueList.setUpdateTime(new Date());
+//        qmsQueueList.setUpdateUsername("admin");
+//        int i = qmsQueueListMapper.updateByPrimaryKeySelective(qmsQueueList);
+//        //更新排队实绩
+//        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+//        qmsQueueResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
+//        qmsQueueResult.setResultInsertTime(new Date());
+//        qmsQueueResult.setResultInsertReason((String)map.get("resultInsertReason"));
+//        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+//        return i + i1;
+//    }
+
     /**
      * 排队转移
      * 参数:实绩Id、门岗名称||门岗ID 或者 月台名称||月台ID、转移原因

+ 34 - 11
src/main/resources/com/steerinfo/dil/mapper/QmsQueueListMapper.xml

@@ -14,15 +14,17 @@
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="QUEUE_RESULT_ID" jdbcType="DECIMAL" property="queueResultId" />
     <result column="ENTRY_SURE_TIME" jdbcType="TIMESTAMP" property="entrySureTime" />
+    <result column="IS_VIP" jdbcType="TIMESTAMP" property="isVip" />
   </resultMap>
   <sql id="columns">
     LIST_ID, GRID_ID, CAPACITY_ID, LIST_NODE_ORDER, DELETED, INSERT_USERNAME, INSERT_TIME, 
-    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, QUEUE_RESULT_ID, ENTRY_SURE_TIME
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, QUEUE_RESULT_ID, ENTRY_SURE_TIME, 
+    IS_VIP
   </sql>
   <sql id="columns_alias">
     t.LIST_ID, t.GRID_ID, t.CAPACITY_ID, t.LIST_NODE_ORDER, t.DELETED, t.INSERT_USERNAME, 
     t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.QUEUE_RESULT_ID, 
-    t.ENTRY_SURE_TIME
+    t.ENTRY_SURE_TIME, t.IS_VIP
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM QMS_QUEUE_LIST
@@ -68,6 +70,9 @@
       <if test="entrySureTime != null">
         and TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = #{entrySureTime}
       </if>
+      <if test="isVip != null">
+        and TO_CHAR(IS_VIP,'yyyy-MM-dd') = #{isVip}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -108,6 +113,9 @@
       <if test="entrySureTime != null">
         and TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = #{entrySureTime}
       </if>
+      <if test="isVip != null">
+        and TO_CHAR(IS_VIP,'yyyy-MM-dd') = #{isVip}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -150,18 +158,21 @@
     <if test="entrySureTime != null">
       or TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = '#{entrySureTime}'
     </if>
+    <if test="isVip != null">
+      or TO_CHAR(IS_VIP,'yyyy-MM-dd') = '#{isVip}'
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.QmsQueueList">
     insert into QMS_QUEUE_LIST (LIST_ID, GRID_ID, CAPACITY_ID,
                                 LIST_NODE_ORDER, DELETED, INSERT_USERNAME,
                                 INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-                                INSERT_UPDATE_REMARK, QUEUE_RESULT_ID, ENTRY_SURE_TIME
-    )
+                                INSERT_UPDATE_REMARK, QUEUE_RESULT_ID, ENTRY_SURE_TIME,
+                                IS_VIP)
     values (#{listId,jdbcType=DECIMAL}, #{gridId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL},
             #{listNodeOrder,jdbcType=DECIMAL}, #{deleted,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
             #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-            #{insertUpdateRemark,jdbcType=VARCHAR}, #{queueResultId,jdbcType=DECIMAL}, #{entrySureTime,jdbcType=TIMESTAMP}
-           )
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{queueResultId,jdbcType=DECIMAL}, #{entrySureTime,jdbcType=TIMESTAMP},
+            #{isVip,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.QmsQueueList">
     insert into QMS_QUEUE_LIST
@@ -202,6 +213,9 @@
       <if test="entrySureTime != null">
         ENTRY_SURE_TIME,
       </if>
+      <if test="isVip != null">
+        IS_VIP,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="listId != null">
@@ -240,6 +254,9 @@
       <if test="entrySureTime != null">
         #{entrySureTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="isVip != null">
+        #{isVip,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.QmsQueueList">
@@ -254,7 +271,8 @@
         UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
         INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
         QUEUE_RESULT_ID = #{queueResultId,jdbcType=DECIMAL},
-        ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP}
+        ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP},
+        IS_VIP = #{isVip,jdbcType=TIMESTAMP}
     where LIST_ID = #{listId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueList">
@@ -293,6 +311,9 @@
       <if test="entrySureTime != null">
         ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="isVip != null">
+        IS_VIP = #{isVip,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where LIST_ID = #{listId,jdbcType=DECIMAL}
   </update>
@@ -315,7 +336,7 @@
     DELETED, INSERT_USERNAME, INSERT_TIME,
     UPDATE_USERNAME, UPDATE_TIME,
     INSERT_UPDATE_REMARK, QUEUE_RESULT_ID,
-    ENTRY_SURE_TIME)
+    ENTRY_SURE_TIME, IS_VIP)
     ( <foreach collection="list" item="item" separator="union all">
     select
     #{item.listId,jdbcType=DECIMAL},
@@ -323,7 +344,7 @@
     #{item.deleted,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
     #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
     #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.queueResultId,jdbcType=DECIMAL},
-    #{item.entrySureTime,jdbcType=TIMESTAMP} from dual
+    #{item.entrySureTime,jdbcType=TIMESTAMP}, #{item.isVip,jdbcType=TIMESTAMP} from dual
   </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -377,6 +398,10 @@
     <foreach close="end" collection="list" index="index" item="item" open="case LIST_ID" separator=" ">
       when #{item.listId,jdbcType=DECIMAL} then #{item.entrySureTime,jdbcType=TIMESTAMP}
     </foreach>
+    ,IS_VIP=
+    <foreach close="end" collection="list" index="index" item="item" open="case LIST_ID" separator=" ">
+      when #{item.listId,jdbcType=DECIMAL} then #{item.isVip,jdbcType=TIMESTAMP}
+    </foreach>
     where LIST_ID in
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
       #{item.listId,jdbcType=DECIMAL}
@@ -392,8 +417,6 @@
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
 
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!--   排序 -->
   <sql id="orderBy">
     <if test="orderField != null and orderField != ''">

+ 5 - 4
src/main/resources/com/steerinfo/dil/mapper/QmsQueueResultMapper.xml

@@ -890,11 +890,11 @@
             </if>
             <if test="locationId != null">
                 and QQL.GRID_ID = #{locationId}
-                ORDER BY QQL.ENTRY_SURE_TIME DESC, "listNodeOrder"
+                ORDER BY QQL.IS_VIP, QQL.ENTRY_SURE_TIME DESC, "listNodeOrder"
             </if>
         </where>
         <if test="locationId == null">
-            ORDER BY QQL.ENTRY_SURE_TIME DESC, "materialName" DESC, "listNodeOrder"
+            ORDER BY QQL.IS_VIP, QQL.ENTRY_SURE_TIME DESC, "materialName" DESC, "listNodeOrder"
         </if>
     </select>
 
@@ -957,11 +957,11 @@
             </if>
             <if test="locationId != null">
                 and QQSL.SPELILING_NUM  = #{locationId}
-                ORDER BY QQSL.ENTRY_SURE_TIME DESC,  "listNodeOrder"
+                ORDER BY QQSL.IS_VIP, QQSL.ENTRY_SURE_TIME DESC,  "listNodeOrder"
             </if>
         </where>
         <if test="locationId == null">
-            order by QQSL.ENTRY_SURE_TIME DESC, QQSL.SPELILING_NUM DESC, "listNodeOrder"
+            order by QQSL.IS_VIP, QQSL.ENTRY_SURE_TIME DESC, QQSL.SPELILING_NUM DESC, "listNodeOrder"
         </if>
     </select>
 
@@ -2140,6 +2140,7 @@
                QQR.RESULT_START_TIME  "resultStartTime",
                QQR.IS_SPELLING        "isSpelling",
                QQR.RESULT_CANCEL_TIME "resultCancelTime",
+               QQR.RESULT_INSERT_TIME   "resultInsertTime",
                QQR.LIST_ID            "listId",
                RG.GATEPOST_NAME       "gatepostName",
                (case

+ 137 - 112
src/main/resources/com/steerinfo/dil/mapper/QmsQueueSpellingListMapper.xml

@@ -12,14 +12,15 @@
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="UPDATE_USERNAME" jdbcType="TIMESTAMP" property="updateUsername" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="IS_VIP" jdbcType="TIMESTAMP" property="isVip" />
   </resultMap>
   <sql id="columns">
     SPELLING_RESULT_ID, QUEUE_RESULT_ID, SPELILING_NUM, SPELLING_SURE_TIME, ENTRY_SURE_TIME, 
-    INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, DELETED
+    INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, DELETED, IS_VIP
   </sql>
   <sql id="columns_alias">
     t.SPELLING_RESULT_ID, t.QUEUE_RESULT_ID, t.SPELILING_NUM, t.SPELLING_SURE_TIME, t.ENTRY_SURE_TIME, 
-    t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED
+    t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.IS_VIP
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM QMS_QUEUE_SPELLING_LIST
@@ -28,7 +29,7 @@
     SELECT <include refid="columns_alias" /> FROM QMS_QUEUE_SPELLING_LIST t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="spellingResultId != null">
         and SPELLING_RESULT_ID = #{spellingResultId}
       </if>
@@ -59,10 +60,13 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="isVip != null">
+        and TO_CHAR(IS_VIP,'yyyy-MM-dd') = #{isVip}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="spellingResultId != null">
         and SPELLING_RESULT_ID = #{spellingResultId}
       </if>
@@ -93,6 +97,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="isVip != null">
+        and TO_CHAR(IS_VIP,'yyyy-MM-dd') = #{isVip}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -101,44 +108,49 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from QMS_QUEUE_SPELLING_LIST
-    where 1!=1 
-      <if test="queueResultId != null">
-        or QUEUE_RESULT_ID = #{queueResultId}
-      </if>
-      <if test="spelilingNum != null">
-        or SPELILING_NUM = #{spelilingNum}
-      </if>
-      <if test="spellingSureTime != null">
-        or TO_CHAR(SPELLING_SURE_TIME,'yyyy-MM-dd') = '#{spellingSureTime}'
-      </if>
-      <if test="entrySureTime != null">
-        or TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = '#{entrySureTime}'
-      </if>
-      <if test="insertTime != null">
-        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        or INSERT_USERNAME = #{insertUsername}
-      </if>
-      <if test="updateTime != null">
-        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
-      </if>
-      <if test="updateUsername != null">
-        or TO_CHAR(UPDATE_USERNAME,'yyyy-MM-dd') = '#{updateUsername}'
-      </if>
-      <if test="deleted != null">
-        or DELETED = #{deleted}
-      </if>
+    where 1!=1
+    <if test="queueResultId != null">
+      or QUEUE_RESULT_ID = #{queueResultId}
+    </if>
+    <if test="spelilingNum != null">
+      or SPELILING_NUM = #{spelilingNum}
+    </if>
+    <if test="spellingSureTime != null">
+      or TO_CHAR(SPELLING_SURE_TIME,'yyyy-MM-dd') = '#{spellingSureTime}'
+    </if>
+    <if test="entrySureTime != null">
+      or TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = '#{entrySureTime}'
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="updateUsername != null">
+      or TO_CHAR(UPDATE_USERNAME,'yyyy-MM-dd') = '#{updateUsername}'
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="isVip != null">
+      or TO_CHAR(IS_VIP,'yyyy-MM-dd') = '#{isVip}'
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
-    insert into QMS_QUEUE_SPELLING_LIST (SPELLING_RESULT_ID, QUEUE_RESULT_ID, 
-      SPELILING_NUM, SPELLING_SURE_TIME, ENTRY_SURE_TIME, 
-      INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, 
-      UPDATE_USERNAME, DELETED)
-    values (#{spellingResultId,jdbcType=DECIMAL}, #{queueResultId,jdbcType=DECIMAL}, 
-      #{spelilingNum,jdbcType=DECIMAL}, #{spellingSureTime,jdbcType=TIMESTAMP}, #{entrySureTime,jdbcType=TIMESTAMP}, 
-      #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
-      #{updateUsername,jdbcType=TIMESTAMP}, #{deleted,jdbcType=DECIMAL})
+    insert into QMS_QUEUE_SPELLING_LIST (SPELLING_RESULT_ID, QUEUE_RESULT_ID,
+                                         SPELILING_NUM, SPELLING_SURE_TIME, ENTRY_SURE_TIME,
+                                         INSERT_TIME, INSERT_USERNAME, UPDATE_TIME,
+                                         UPDATE_USERNAME, DELETED, IS_VIP
+    )
+    values (#{spellingResultId,jdbcType=DECIMAL}, #{queueResultId,jdbcType=DECIMAL},
+            #{spelilingNum,jdbcType=DECIMAL}, #{spellingSureTime,jdbcType=TIMESTAMP}, #{entrySureTime,jdbcType=TIMESTAMP},
+            #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{updateUsername,jdbcType=TIMESTAMP}, #{deleted,jdbcType=DECIMAL}, #{isVip,jdbcType=TIMESTAMP}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
     insert into QMS_QUEUE_SPELLING_LIST
@@ -173,6 +185,9 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="isVip != null">
+        IS_VIP,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="spellingResultId != null">
@@ -205,19 +220,23 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="isVip != null">
+        #{isVip,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
     update QMS_QUEUE_SPELLING_LIST
     set QUEUE_RESULT_ID = #{queueResultId,jdbcType=DECIMAL},
-      SPELILING_NUM = #{spelilingNum,jdbcType=DECIMAL},
-      SPELLING_SURE_TIME = #{spellingSureTime,jdbcType=TIMESTAMP},
-      ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP},
-      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      UPDATE_USERNAME = #{updateUsername,jdbcType=TIMESTAMP},
-      DELETED = #{deleted,jdbcType=DECIMAL}
+        SPELILING_NUM = #{spelilingNum,jdbcType=DECIMAL},
+        SPELLING_SURE_TIME = #{spellingSureTime,jdbcType=TIMESTAMP},
+        ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=TIMESTAMP},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        IS_VIP = #{isVip,jdbcType=TIMESTAMP}
     where SPELLING_RESULT_ID = #{spellingResultId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
@@ -250,6 +269,9 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="isVip != null">
+        IS_VIP = #{isVip,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where SPELLING_RESULT_ID = #{spellingResultId,jdbcType=DECIMAL}
   </update>
@@ -266,79 +288,82 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into QMS_QUEUE_SPELLING_LIST 
-      (SPELLING_RESULT_ID, 
-      QUEUE_RESULT_ID, SPELILING_NUM, 
-      SPELLING_SURE_TIME, ENTRY_SURE_TIME, 
-      INSERT_TIME, INSERT_USERNAME, 
-      UPDATE_TIME, UPDATE_USERNAME, 
-      DELETED)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.spellingResultId,jdbcType=DECIMAL}, 
-      #{item.queueResultId,jdbcType=DECIMAL}, #{item.spelilingNum,jdbcType=DECIMAL}, 
-      #{item.spellingSureTime,jdbcType=TIMESTAMP}, #{item.entrySureTime,jdbcType=TIMESTAMP}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=TIMESTAMP}, 
-      #{item.deleted,jdbcType=DECIMAL} from dual  
-   </foreach> )
+    insert into QMS_QUEUE_SPELLING_LIST
+    (SPELLING_RESULT_ID,
+    QUEUE_RESULT_ID, SPELILING_NUM,
+    SPELLING_SURE_TIME, ENTRY_SURE_TIME,
+    INSERT_TIME, INSERT_USERNAME,
+    UPDATE_TIME, UPDATE_USERNAME,
+    DELETED, IS_VIP)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.spellingResultId,jdbcType=DECIMAL},
+    #{item.queueResultId,jdbcType=DECIMAL}, #{item.spelilingNum,jdbcType=DECIMAL},
+    #{item.spellingSureTime,jdbcType=TIMESTAMP}, #{item.entrySureTime,jdbcType=TIMESTAMP},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=TIMESTAMP},
+    #{item.deleted,jdbcType=DECIMAL}, #{item.isVip,jdbcType=TIMESTAMP} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update QMS_QUEUE_SPELLING_LIST
-     set
-       SPELLING_RESULT_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spellingResultId,jdbcType=DECIMAL}
-       </foreach>
-       ,QUEUE_RESULT_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.queueResultId,jdbcType=DECIMAL}
-       </foreach>
-       ,SPELILING_NUM=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spelilingNum,jdbcType=DECIMAL}
-       </foreach>
-       ,SPELLING_SURE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spellingSureTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,ENTRY_SURE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.entrySureTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=TIMESTAMP}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
-          when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-     where SPELLING_RESULT_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.spellingResultId,jdbcType=DECIMAL}
-     </foreach> 
+    update QMS_QUEUE_SPELLING_LIST
+    set
+    SPELLING_RESULT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spellingResultId,jdbcType=DECIMAL}
+    </foreach>
+    ,QUEUE_RESULT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.queueResultId,jdbcType=DECIMAL}
+    </foreach>
+    ,SPELILING_NUM=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spelilingNum,jdbcType=DECIMAL}
+    </foreach>
+    ,SPELLING_SURE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spellingSureTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,ENTRY_SURE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.entrySureTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=TIMESTAMP}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,IS_VIP=
+    <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
+      when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.isVip,jdbcType=TIMESTAMP}
+    </foreach>
+    where SPELLING_RESULT_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.spellingResultId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from QMS_QUEUE_SPELLING_LIST
-    where SPELLING_RESULT_ID in 
+    where SPELLING_RESULT_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
-
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->