From f2b48ce0cfdf9b68ecc7c9d84937d69500590f81 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 15 五月 2025 17:15:28 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop

---
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java |   40 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
index d999527..4e610b6 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -7,14 +7,11 @@
 import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto;
 import com.vincent.rsf.server.api.entity.dto.LocTypeDto;
 import com.vincent.rsf.server.api.controller.params.TaskInParam;
-import com.vincent.rsf.server.manager.enums.OrderType;
-import com.vincent.rsf.server.manager.enums.TaskStsType;
-import com.vincent.rsf.server.manager.enums.TaskType;
+import com.vincent.rsf.server.manager.enums.*;
 import com.vincent.rsf.server.api.service.WcsService;
 import com.vincent.rsf.server.api.utils.LocUtils;
 import com.vincent.rsf.server.api.utils.SlaveProperties;
 import com.vincent.rsf.server.manager.entity.*;
-import com.vincent.rsf.server.manager.enums.PakinIOStatus;
 import com.vincent.rsf.server.manager.service.*;
 import com.vincent.rsf.server.manager.service.impl.LocServiceImpl;
 import com.vincent.rsf.server.system.constant.SerialRuleCode;
@@ -52,6 +49,37 @@
     private TaskItemService taskItemService;
     @Autowired
     private WaitPakinItemService waitPakinItemService;
+    @Autowired
+    private BasStationService basStationService;
+
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void agvTaskPickUpComplete(TaskInParam param) {
+        Task task = taskService.getOne(new LambdaQueryWrapper<Task>()
+                .eq(Task::getBarcode, param.getBarcode())
+        );
+        if (null == task) {
+            throw new CoolException("鏈壘鍒颁换鍔′俊鎭�");
+        }
+//        if (!task.getTaskStatus().equals(TaskStsType.WCS_CONVEYOR_START.id)){
+//            throw new CoolException("浠诲姟鐘舵�佹湁璇�");
+//        }
+        BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
+                .eq(BasStation::getStationName, param.getSourceStaNo())
+        );
+        if (null == basStation) {
+            throw new CoolException("鏈壘鍒扮珯鐐逛俊鎭�");
+        }
+        task.setTaskStatus(TaskStsType.WCS_EXECUTE_OUT_TOTE_LOAD.id);
+        taskService.updateById(task);
+
+        basStation.setUseStatus(StaUseStatusType.TYPE_O.type);
+        basStation.setBarcode(null);
+        basStationService.updateById(basStation);
+
+
+    }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -88,6 +116,8 @@
         locNo.setWorkNo(ruleCode);
         return locNo;
     }
+
+
 
     /**
      * 楠岃瘉璁惧绔欑偣
@@ -186,7 +216,7 @@
             BeanUtils.copyProperties(item, taskItem);
 
             return taskItem.setTaskId(taskId)
-                    .setOrderType(OrderType.ORDER_RECEIPT.type)
+                    .setOrderType(OrderType.ORDER_IN.type)
                     .setSource(item.getId())
                     .setTrackCode(item.getTrackCode())
                     .setCreateBy(loginUserId)

--
Gitblit v1.9.1