From 190230a07b0413f2e1317bae743c50bcef5f650c Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 28 六月 2025 17:35:21 +0800 Subject: [PATCH] no message --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java | 33 ++++++++++++++------------------- 1 files changed, 14 insertions(+), 19 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java index 1e9d0dc..b734f6c 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java @@ -1,16 +1,13 @@ package com.zy.asrs.wms.asrs.manage; import com.alibaba.fastjson.JSON; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.fasterxml.jackson.datatype.jsr310.DecimalUtils; import com.mysql.cj.util.StringUtils; import com.zy.asrs.framework.exception.CoolException; +import com.zy.asrs.wms.asrs.entity.*; import com.zy.asrs.wms.asrs.entity.dto.*; -import com.zy.asrs.wms.asrs.entity.dto.OrderOutMergeDto; import com.zy.asrs.wms.asrs.entity.enums.*; import com.zy.asrs.wms.asrs.entity.param.*; -import com.zy.asrs.wms.asrs.entity.*; import com.zy.asrs.wms.asrs.service.*; import com.zy.asrs.wms.utils.OrderUtils; import com.zy.asrs.wms.utils.OutUtils; @@ -23,11 +20,9 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; -import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * 鍑哄簱绠$悊 @@ -589,7 +584,7 @@ locDto.setWorkQty(detl.getWorkQty()); locDtos.add(locDto); //搴撲綅瀹為檯鍙敤鏁伴噺 - double surplusQty = detl.getAnfme() - detl.getWorkQty(); + Double surplusQty = Math.round((detl.getAnfme() - detl.getWorkQty()) * 10000) / 10000.0; if (surplusQty <= 0) { continue; } @@ -1053,11 +1048,11 @@ if (!flatOrders.isEmpty()) { //骞冲簱鍑哄簱 outStockByFlat(flatOrders, wave); - } - - if (!tucOrders.isEmpty()) { + } else if (!tucOrders.isEmpty()) { //CTU鍑哄簱 outStockByTUC(tucOrders, wave); + } else { + throw new CoolException("搴撳瓨涓嶈冻"); } } @@ -1438,15 +1433,15 @@ } CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderId, order.getId())); - if (cacheSite == null) { - throw new CoolException("缂撳瓨绔欎笉瀛樺湪"); - } - cacheSite.setSiteStatus(CacheSiteStatusType.O.id); - cacheSite.setOrderId(null); - cacheSite.setOrderNo(null); - cacheSite.setUpdateTime(new Date()); - if (!cacheSiteService.updateById(cacheSite)) { - throw new CoolException("缂撳瓨绔欐竻绌哄け璐�"); + if (cacheSite != null) { + cacheSite.setSiteStatus(CacheSiteStatusType.O.id); + cacheSite.setOrderId(null); + cacheSite.setOrderNo(null); + cacheSite.setBarcode(null); + cacheSite.setUpdateTime(new Date()); + if (!cacheSiteService.updateById(cacheSite)) { + throw new CoolException("缂撳瓨绔欐竻绌哄け璐�"); + } } } -- Gitblit v1.9.1