Browse Source

麻柳新厂厂外库功能

xiaosonghong 4 weeks ago
parent
commit
9e0610702c

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

@@ -133,7 +133,7 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
         if(materialNum == 1){
             //单拼进入链表
             //判断单拼链表中是否有已存在此辆车正在排队
-            if(qmsQueueListMapper.existsCapacity(mesMap.get("capacityId")) != null){
+            if(qmsQueueListMapper.existsCapacity(mesMap.get("capacityId")) > 0){
                 try {
                     qmsQueueListMapper.deleteListByCapacityId(DataChange.dataToBigDecimal(mesMap.get("capacityId")));
                 } catch (Exception e) {
@@ -146,7 +146,7 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
             return addListResult(mesMap, calculateGatepost());
         }else {
             //多拼进入排队队列
-            if(qmsQueueSpellingListMapper.existsCapacity(mesMap.get("capacityId")) != null){
+            if(qmsQueueSpellingListMapper.existsCapacity(mesMap.get("capacityId")) > 0){
                 try {
                     qmsQueueSpellingListMapper.deleteSpellingList(DataChange.dataToBigDecimal(mesMap.get("capacityId")));
                 } catch (Exception e) {

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

@@ -635,7 +635,7 @@
     </select>
 
   <select id="existsCapacity" resultType="java.lang.Integer">
-        select QQL.LIST_ID from QMS_QUEUE_LIST QQL where CAPACITY_ID = #{capacityId}
+        select count(QQL.LIST_ID) as resultCounts from QMS_QUEUE_LIST QQL where CAPACITY_ID = #{capacityId}
   </select>
 
 

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

@@ -923,6 +923,14 @@
         <if test="oYeFlag != null">
             AND TTR.ORDER_STATUS = '排队中'
             AND ASO.SALE_TYPE = 50
+            <choose>
+                <when test="businessType != null and businessType != ''">
+                    AND ASO.business_type = #{businessType}
+                </when>
+                <otherwise>
+                    AND ASO.business_type IS NULL
+                </otherwise>
+            </choose>
         </if>
         <if test="oYeFlag == null">
             AND RM.MATERIAL_ID||'' NOT IN (SELECT DISTINCT SPECTIONS_MODEL FROM QMS_MODEL_UNROOLED)
@@ -1074,6 +1082,14 @@
         <if test="oYeFlag != null">
             AND TTR.ORDER_STATUS = '排队中'
             AND ASO.SALE_TYPE = 50
+            <choose>
+                <when test="businessType != null and businessType != ''">
+                    AND ASO.business_type = #{businessType}
+                </when>
+                <otherwise>
+                    AND ASO.business_type IS NULL
+                </otherwise>
+            </choose>
         </if>
         <if test="inboundWarehouse != null and inboundWarehouse != ''">
             and RW.WAREHOUSE_NAME = #{inboundWarehouse}
@@ -1191,6 +1207,14 @@
         <if test="oYeFlag != null">
             AND TTR.ORDER_STATUS = '排队中'
             AND ASO.SALE_TYPE = 50
+            <choose>
+                <when test="businessType != null and businessType != ''">
+                    AND ASO.business_type = #{businessType}
+                </when>
+                <otherwise>
+                    AND ASO.business_type IS NULL
+                </otherwise>
+            </choose>
         </if>
         and QQSL.SPELILING_NUM = 2
         <if test="oYeFlag == null">

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

@@ -382,7 +382,7 @@
   </update>
 
   <select id="existsCapacity" resultType="java.lang.Integer">
-    select QQSL.SPELLING_RESULT_ID
+    select count(QQSL.SPELLING_RESULT_ID) as resultCounts
     from QMS_QUEUE_SPELLING_LIST QQSL
     left join QMS_QUEUE_RESULT QQR on QQSL.QUEUE_RESULT_ID = QQR.RESULT_ID
     where QQR.CAPACITY_ID = #{capacityId}