luobang 2 年之前
父节点
当前提交
fcb87202f1

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/QmsQueueResultMapper.java

@@ -212,4 +212,8 @@ public interface QmsQueueResultMapper extends IBaseMapper<QmsQueueResult, BigDec
 
     int getCarNumber();
 
+    int updateTotalResultStatus(BigDecimal resultTotalId);
+
+    int updateTotalResultTime(BigDecimal resultTotalId);
+
 }

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

@@ -129,6 +129,8 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
                 }
                 //return 0;
             }
+            //更新总实绩表
+            qmsQueueResultMapper.updateTotalResultStatus(DataChange.dataToBigDecimal(mesMap.get("resultTotalId")));
             return addListResult(mesMap, calculateGatepost());
         }else {
             //多拼进入排队队列
@@ -140,6 +142,7 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
                 }
                 //return 0;
             }
+            qmsQueueResultMapper.updateTotalResultStatus(DataChange.dataToBigDecimal(mesMap.get("resultTotalId")));
             return addSpellingListResult(mesMap, calculateGatepost());
         }
     }
@@ -382,6 +385,8 @@ public class QmsQueueListServiceImpl implements IQmsQueueListService {
             }
             //更新排队实绩,将放行时间保存
             count += qmsQueueResultMapper.updateQmsResult(DataChange.dataToBigDecimal(mesMap.get("resultTotalId")));
+            //更新总实绩,将放行时间放到总实绩表
+            count += qmsQueueResultMapper.updateTotalResultTime(DataChange.dataToBigDecimal(mesMap.get("resultTotalId")));
             //更新物资子表 每个物资的装货点ID
             mesMap.replace("id",DataChange.dataToBigDecimal(mesMap.get("id")));
             qmsQueueSpellingListMapper.updateOOMLoadWarehouse(mesMap);

+ 5 - 0
src/main/java/com/steerinfo/dil/service/impl/QueueInterfaceServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.openapi.sdk.service.DataExchangeService;
 import com.steerinfo.dil.mapper.QueueInterfaceMapper;
 import org.apache.poi.util.StringUtil;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -175,6 +176,10 @@ public class QueueInterfaceServiceImpl {
 
     }
 
+
+
+
+
     /**
      * 删除车辆订阅接口
      * @Author TXF

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

@@ -2522,4 +2522,16 @@
         and ASOM.SALE_DATE_OF_RECEIPT  > sysdate
         and ASOM.SALE_DATE_OF_RECEIPT - 1 &lt; sysdate)
     </select>
+    <update id="updateTotalResultStatus" parameterType="java.math.BigDecimal">
+        UPDATE TMSTRUCK_TOTAL_RESULT TTR
+        SET TTR.ORDER_STATUS = '排队中',
+            TTR.QUEUE_START_TIME = sysdate
+        WHERE TTR.RESULT_TOTAL_ID = #{resultTotalId}
+    </update>
+    <update id="updateTotalResultTime" parameterType="java.math.BigDecimal">
+        UPDATE TMSTRUCK_TOTAL_RESULT TTR
+        SET TTR.ORDER_STATUS = '排队中',
+            TTR.QUEUE_ALLOW_TIME = sysdate
+        WHERE TTR.RESULT_TOTAL_ID = #{resultTotalId}
+    </update>
 </mapper>