From 4ed09be8e23b555ee43dfc471020cb4619da20a0 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期一, 20 十月 2025 17:00:28 +0800
Subject: [PATCH] 月台自动叫号处理问题

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java |   36 +++++++++++++++++++++++++++++++++---
 1 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 20303e5..be65e03 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -2581,6 +2581,7 @@
 
     @Override
     public void autoPlatformCallCar(WmsService wmsService){
+        log.error("瀹氭椂鑷姩鍒嗛厤鏈堝彴 - 鏈堝彴寮�濮嬭嚜鍔ㄥ垎閰嶅垎閰嶄换鍔★細{}"+DateUtil.getCurrDateTime());
         //鏌ヨ褰撳墠寮�鍚殑鏈堝彴鏁版嵁
         List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda().eq(PlatformGroup::getStatus,Constants.ZERO)
                 .eq(PlatformGroup::getIsdeleted,Constants.ZERO).eq(PlatformGroup::getAutoCall,Constants.ONE)
@@ -2630,7 +2631,7 @@
                 }
             }
             for (Platform platform:platforms) {
-
+                log.error("瀹氭椂鑷姩鍒嗛厤鏈堝彴 - 鏈堝彴寮�濮嬭嚜鍔ㄥ垎閰嶅垎閰嶄换鍔★細{}"+JSONObject.toJSONString(platform));
                 //鏈堝彴 鍙彿鍏ュ洯鏁伴噺
                 Integer workingNum = platform.getWorkingNum();
                 //鏌ヨ褰撳墠鏈堝彴鏄惁瀛樺湪鏈堝彴鍙彿鏁版嵁 濡傛灉澶т簬绛変簬鍙彨鍙锋暟閲� 鍒欒烦杩�
@@ -2663,6 +2664,7 @@
                 }
                 for (int i = 0; i < workingNum - workNum ; i++) {
                     PlatformJob platformJob  = this.getAutoCallJob(platformJobList,platform,isDefaul,platformGroup);
+                    log.error("瀹氭椂鑷姩鍒嗛厤鏈堝彴 - 鏈堝彴鑷姩鍒嗛厤鍒嗛厤浠诲姟锛歿}"+JSONObject.toJSONString(platformJob));
                     if(Objects.isNull(platformJob)){
                         continue;
                     }
@@ -2797,6 +2799,7 @@
      * @return
      */
     public PlatformJob getAutoCallJob(List<PlatformJob> platformJobList, Platform platform,Boolean isDefaul,PlatformGroup platformGroup){
+        log.error("瀹氭椂鑷姩鍒嗛厤鏈堝彴 - 鏈堝彴鑷姩鍒嗛厤浠诲姟锛歿}"+DateUtil.getCurrDateTime());
         if(isDefaul){
             //鏈堝彴涓嬪彧鏈変竴绫绘湀鍙� 鐩存帴杩斿洖绗竴涓换鍔�
             return platformJobList.get(Constants.ZERO);
@@ -2852,7 +2855,7 @@
                     }
                 }else{
                     //鐗╂祦杞﹂绾︾殑浠诲姟 鐩存帴鍒嗛厤 鏁f墭鐩樻湀鍙�
-                    if(Constants.equalsInteger(platform.getType(),Constants.TWO)){
+                    if(Constants.equalsInteger(platform.getType(),Constants.ONE)){
                         return platformJob;
                     }
                 }
@@ -2870,7 +2873,7 @@
                     if(Objects.isNull(platformWmsJob)){
                         continue;
                     }
-                    SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.IN_REPERTOTY_CODE);
+                    SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.IN_REPERTOTY_CODE);
                     if(Objects.nonNull(systemDictData)){
                         //鍒ゆ柇鏀剧疆浣嶇疆
                         if(platformWmsDetailMapper.selectCount(new QueryWrapper<PlatformWmsDetail>().lambda().eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)
@@ -2896,4 +2899,31 @@
         return null;
     }
 
+
+    @Override
+    public void jobUrge(Integer jobId,LoginUserInfo loginUserInfo){
+        if(Objects.isNull(jobId)){
+            throw new BusinessException(ResponseStatus.BAD_REQUEST);
+        }
+        PlatformJob platformJob = platformJobMapper.selectById(jobId);
+        if(Objects.isNull(platformJob)){
+            throw new BusinessException(ResponseStatus.DATA_EMPTY);
+        }
+        if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())
+                        || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())
+                || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.TRANSFERING.getKey()))){
+            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝鐘舵�佸凡娴佽浆");
+        }
+
+        platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda()
+                .set(PlatformJob::getUrgeUser,loginUserInfo.getId())
+                .set(PlatformJob::getUrgeTime,DateUtil.getCurrDateTime())
+                .set(PlatformJob::getEditDate,DateUtil.getCurrDateTime())
+                .eq(PlatformJob::getId,platformJob.getId())
+        );
+    }
+
+
+
+
 }

--
Gitblit v1.9.3