From 213fcda9782829abb609e63d87a63964c38b98c6 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期一, 13 十一月 2023 14:54:57 +0800 Subject: [PATCH] 输送线启动入库 --- src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 40 +++++++++++++++++++++++++++------------- 1 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java index a616b3d..76a8c0f 100644 --- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java @@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.Cools; import com.core.exception.CoolException; -import com.zy.asrs.entity.AgvLocDetl; -import com.zy.asrs.entity.AgvWaitPakin; -import com.zy.asrs.entity.AgvWrkDetl; -import com.zy.asrs.entity.AgvWrkMast; +import com.zy.asrs.entity.*; import com.zy.asrs.service.*; import com.zy.asrs.task.AbstractHandler; import com.zy.asrs.task.core.ReturnT; @@ -25,23 +22,25 @@ public class AgvWrkMastHandler extends AbstractHandler<String> { @Autowired - AgvWrkMastService agvWrkMastService; + private AgvWrkMastService agvWrkMastService; @Autowired - AgvLocMastService agvLocMastService; + private AgvLocMastService agvLocMastService; @Autowired - AgvLocDetlService agvLocDetlService; + private AgvLocDetlService agvLocDetlService; @Autowired - AgvWrkMastLogService agvWrkMastLogService; + private AgvWrkMastLogService agvWrkMastLogService; @Autowired - AgvWrkDetlService agvWrkDetlService; + private AgvWrkDetlService agvWrkDetlService; @Autowired - AgvWrkDetlLogService agvWrkDetlLogService; + private AgvWrkDetlLogService agvWrkDetlLogService; @Autowired - AgvWaitPakinService agvWaitPakinService; + private AgvWaitPakinService agvWaitPakinService; @Autowired - AgvWaitPakinLogService agvWaitPakinLogService; + private AgvWaitPakinLogService agvWaitPakinLogService; @Autowired - OrderService orderService; + private OrderService orderService; + @Autowired + private AgvBasDevpService agvBasDevpService; @Transactional public ReturnT<String> completedPutWayWrk(AgvWrkMast agvWrkMast) { @@ -192,6 +191,21 @@ return FAIL; } + public ReturnT<String> dealWatiWrk(List<AgvWrkMast> agvWrkMastList) throws IOException { + + agvWrkMastList.forEach(agvWrkMast -> { + //瀵绘壘绌虹珯鐐逛綅缃� + AgvBasDevp agvBasDevp = agvBasDevpService.selectEmptyDevpByStation(agvWrkMast.getLocNo()); + if(!Cools.isEmpty(agvBasDevp)){ + agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvBasDevp.getDevNo(),"S",null); + agvWrkMast.setLocNo(agvBasDevp.getDevNo()); + agvWrkMastService.updateById(agvWrkMast); + } + }); + + return SUCCESS; + } + private String getOrderNoByWrkNo(int wrkNo){ AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectOne(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", wrkNo)); if(Cools.isEmpty(agvWrkDetl)){ -- Gitblit v1.9.1