luobang 2 anos atrás
pai
commit
3df87fbe66

+ 3 - 0
src/main/java/com/steerinfo/dil/mapper/QmsQueueListMapper.java

@@ -74,4 +74,7 @@ public interface QmsQueueListMapper extends IBaseMapper<QmsQueueList, BigDecimal
 
     @Update("update TMSTRUCK_ENFACTORY_RESULT  set GATEPOST_ID = #{gatepostId} where RESULT_TOTAL_ID = #{resultTotalId}")
     int udpateEnFactoryGatepostId(@Param("resultTotalId") BigDecimal resultTotalId, @Param("gatepostId") BigDecimal gatepostId);
+
+    int selectNodeQueueCount(Map<String, Object> mesMap);
+
 }

+ 7 - 0
src/main/java/com/steerinfo/dil/service/impl/QmsQueueListServiceImpl.java

@@ -345,6 +345,13 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
             }
             mesMap.put("jobName", jobName);
             if(mesMap.get("listId") != null){ //单拼
+                //如果是通过查询的,则需要去判断
+                if (DataChange.dataToBigDecimal(map.get("isQueryCapacity")).intValue() == 1) {
+                    int nodeQueueList = qmsQueueListMapper.selectNodeQueueCount(mesMap);
+                    if (nodeQueueList > 0) {
+                        continue;
+                    }
+                }
                 //更新排队链表
                 count += qmsQueueListMapper.updateListEnFactory(mesMap);
                 //更新进厂实绩

+ 1 - 1
src/main/resources/application-dev.yml

@@ -5,7 +5,7 @@ spring:
       username: dagang
       driver-class-name: oracle.jdbc.OracleDriver
   application:
-    name: dil-trick-queue-dev
+    name: dil-truck-queue-dev
 
 #feign设置
 openfeign:

+ 1 - 1
src/main/resources/application-prod.yml

@@ -5,7 +5,7 @@ spring:
       username: dil
       driver-class-name: oracle.jdbc.OracleDriver
   application:
-    name: dil-trick-queue-prod
+    name: dil-truck-queue-prod
 
 #feign设置
 openfeign:

+ 7 - 0
src/main/resources/com/steerinfo/dil/mapper/QmsQueueListMapper.xml

@@ -742,5 +742,12 @@
         from RMS_GATEPOST_RULES
         where GATEPOST_ID = 1 or GATEPOST_ID = 2
   </select>
+  <select id="selectNodeQueueCount" resultType="java.lang.Integer" parameterType="java.util.Map">
+    SELECT count(QQL1.LIST_ID) FROM QMS_QUEUE_LIST QQL1
+    WHERE QQL1.ENTRY_SURE_TIME IS NULL
+    AND QQL1.LIST_NODE_ORDER &lt;
+    (SELECT QQL.LIST_NODE_ORDER FROM QMS_QUEUE_LIST QQL
+    WHERE QQL.LIST_ID = #{listId})
+  </select>
 
 </mapper>

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

@@ -904,10 +904,10 @@
         </if>
         <if test="locationId != null">
             and QQL.GRID_ID = #{locationId}
-            ORDER BY QQL.IS_VIP DESC NULLS LAST ,"listNodeOrder",QQL.ENTRY_SURE_TIME DESC
+            ORDER BY QQL.ENTRY_SURE_TIME ASC NULLS FIRST,QQL.IS_VIP DESC NULLS LAST ,"listNodeOrder"
         </if>
         <if test="locationId == null">
-            ORDER BY QQL.IS_VIP DESC NULLS LAST ,"listNodeOrder",QQL.ENTRY_SURE_TIME DESC
+            ORDER BY QQL.ENTRY_SURE_TIME ASC NULLS FIRST,QQL.IS_VIP DESC NULLS LAST ,"listNodeOrder"
         </if>
         ) P0
 
@@ -968,7 +968,7 @@
 
 
     <select id="getQueueListByQueueUpSpelling" parameterType="map" resultType="java.util.LinkedHashMap">
-        SELECT * FROM (select QQR.RESULT_ID "resultId",
+        select QQR.RESULT_ID "resultId",
         QQR.RESULT_TOTAL_ID "resultTotalId",
         QQR.RESULT_START_TIME "resultStartTime",
         RC.CAPACITY_NUMBER "capacityNumber",
@@ -1029,11 +1029,11 @@
             </if>
             <if test="locationId != null">
                 and QQSL.SPELILING_NUM  = #{locationId}
-                ORDER BY QQSL.IS_VIP DESC NULLS LAST,"listNodeOrder",QQSL.ENTRY_SURE_TIME DESC
+                ORDER BY QQSL.ENTRY_SURE_TIME ASC NULLS FIRST ,QQSL.IS_VIP DESC NULLS LAST,"listNodeOrder"
             </if>
             <if test="locationId == null">
-                ORDER BY QQSL.IS_VIP DESC NULLS LAST,"listNodeOrder",QQSL.ENTRY_SURE_TIME DESC
-            </if>)
+                ORDER BY QQSL.ENTRY_SURE_TIME ASC NULLS FIRST ,QQSL.IS_VIP DESC NULLS LAST,"listNodeOrder"
+            </if>
     </select>
 
     <select id="getMaterialId" resultType="java.util.Map">