From 7b308f2c392274409af94836f0424ff839aec25f Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期二, 01 十一月 2022 14:41:01 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java index d8f9899..5da8620 100644 --- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java @@ -13,6 +13,8 @@ import com.zy.asrs.entity.param.MobileAdjustParam; import com.zy.asrs.entity.param.OpenOrderPakinParam; import com.zy.asrs.service.*; +import com.zy.asrs.task.core.ReturnT; +import com.zy.asrs.task.handler.WorkLogHandler; import com.zy.asrs.utils.MatUtils; import com.zy.common.constant.MesConstant; import com.zy.common.entity.Parameter; @@ -59,6 +61,8 @@ private SnowflakeIdWorker snowflakeIdWorker; @Autowired private ApiLogService apiLogService; + @Autowired + private WorkLogHandler workLogHandler; @Override @Transactional @@ -71,6 +75,16 @@ eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { throw new CoolException(param.getBarcode() + "鏁版嵁姝e湪杩涜鍏ュ簱"); } + + // todo: 涓嶄笅绾块噸鏂板叆搴� + WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode()); + if (wrkMast != null && wrkMast.getWrkSts() == 18) { + ReturnT<String> start = workLogHandler.start(wrkMast); + if (!start.isSuccess()) { + log.error("宸ヤ綔妗workNo={}]鍘嗗彶妗e鐞嗗け璐�", wrkMast.getWrkNo()); + } + } + Date now = new Date(); // 鏃犲崟缁勬墭 @@ -79,7 +93,7 @@ // 鐢熸垚鍏ュ簱閫氱煡妗� List<DetlDto> detlDtos = new ArrayList<>(); param.getCombMats().forEach(elem -> { - DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); + DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getMemo()); if (DetlDto.has(detlDtos, detlDto)) { DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); assert one != null; @@ -106,6 +120,8 @@ waitPakin.setAppeTime(now); waitPakin.setModiUser(userId); waitPakin.setModiTime(now); + waitPakin.setMemo(detlDto.getMemo()); + waitPakin.setFrozen(param.getFrozen()); // 鏄惁鍐荤粨 if (!waitPakinService.insert(waitPakin)) { throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�"); } @@ -400,4 +416,9 @@ } } + @Override + @Transactional + public void pikingToFull(String barcode) { + wrkMastService.selectByBarcode(barcode); + } } -- Gitblit v1.9.1