From 5859e4e6b1d237bdd8a9bc00d153325cc0f288e6 Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期三, 10 七月 2024 08:28:30 +0800 Subject: [PATCH] 日志打印 --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index 7289f95..e836478 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -22,14 +22,15 @@ import com.zy.core.model.Task; import com.zy.core.model.protocol.StaProtocol; import com.zy.core.properties.SlaveProperties; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.*; +@Slf4j @Service public class OpenServiceImpl implements OpenService { @@ -94,25 +95,33 @@ taskWrk.setIoPri(param.getTaskPriority());//浼樺厛绾� taskWrk.setBarcode(param.getBarcode());//鏉$爜 taskWrk.setCrnNo(param.getCrn()); + String stats = ""; + String wcsLocNo = ""; if(param.getIoType() == 1){ taskWrk.setWrkSts(1); if (!Cools.isEmpty(param.getTargetPoint())) { taskWrk.setTargetPoint(Utils.getWcsLocNo(param.getTargetPoint()));//缁堢偣 + wcsLocNo = taskWrk.getTargetPoint(); taskWrk.setOriginTargetPoint(param.getTargetPoint()); + stats = "S"; } } else if (param.getIoType() == 2) { taskWrk.setWrkSts(11); if (!Cools.isEmpty(param.getStartPoint())) { taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//璧风偣 + wcsLocNo = taskWrk.getStartPoint(); taskWrk.setOriginStartPoint(param.getStartPoint()); + stats = "R"; } taskWrk.setTargetPoint(param.getTargetPoint()); }else if (param.getIoType() == 3){ taskWrk.setWrkSts(11); if (!Cools.isEmpty(param.getStartPoint())) { taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//璧风偣 + wcsLocNo = taskWrk.getStartPoint(); taskWrk.setOriginStartPoint(param.getStartPoint()); + stats = "R"; } } @@ -121,6 +130,11 @@ if (!Cools.isEmpty(param.getMemo())) { taskWrk.setMemo(param.getMemo());//澶囨敞 } + + // 鏇存柊搴撲綅鐘舵�� + LocMast locMast = locMastService.selectByLocNo(wcsLocNo); + locMast.setLocSts(stats); + locMastService.updateById(locMast); if (!taskWrkService.insert(taskWrk)) { return R.error("鍒涘缓浠诲姟澶辫触"); @@ -140,6 +154,11 @@ list = getInEnableRoadway2(); } + if (Cools.isEmpty(list)){ + log.warn("鏃犲彲鍏ュ贩閬擄紝璇风◢鍚庡啀璇�"); + return R.error("鏃犲彲鍏ュ贩閬�"); + } + //TaskWrk taskWrk = taskWrkService.selectByTaskNo(param.getTaskNo()); toWmsDTO.setWarehouseId("1688469798893297665"); -- Gitblit v1.9.1