From 39a3f827b5d878c6f648057b841db4002672d374 Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Wed, 22 May 2024 13:57:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E5=90=88=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eam/dal/mysql/inventorywarning/InventoryWarningMapper.java | 3 ++- .../module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java | 2 +- .../service/itemoutlocation/ItemOutLocationServiceImpl.java | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/inventorywarning/InventoryWarningMapper.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/inventorywarning/InventoryWarningMapper.java index 35d30ce..82f8610 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/inventorywarning/InventoryWarningMapper.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/inventorywarning/InventoryWarningMapper.java @@ -42,7 +42,8 @@ public interface InventoryWarningMapper extends BaseMapperX .eqIfPresent(InventoryWarningDO::getExtraProperties, reqVO.getExtraProperties()) .eqIfPresent(InventoryWarningDO::getConcurrencyStamp, reqVO.getConcurrencyStamp()) .eqIfPresent(InventoryWarningDO::getSiteId, reqVO.getSiteId()) - .orderByDesc(InventoryWarningDO::getId)); + .orderByAsc(InventoryWarningDO::getProcureStatus) + .orderByDesc(InventoryWarningDO::getCreateTime)); } default List selectList(InventoryWarningExportReqVO reqVO) { diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java index 62e0c81..2347901 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java @@ -193,7 +193,7 @@ public interface ItemAccountsMapper extends BaseMapperX { TransactionDO transactionDO8 = new TransactionDO(); transactionDO8.setQty(qtyNew); transactionDO8.setType(outLocation.getType()); - transactionDO8.setInventoryAction(TransactionEnum.INOUT.getCode()); + transactionDO8.setInventoryAction(TransactionEnum.OUTOUT.getCode()); list.add(transactionDO8); } } else {//非领用出库 diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/itemoutlocation/ItemOutLocationServiceImpl.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/itemoutlocation/ItemOutLocationServiceImpl.java index be17199..2093e9f 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/itemoutlocation/ItemOutLocationServiceImpl.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/itemoutlocation/ItemOutLocationServiceImpl.java @@ -32,6 +32,7 @@ import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -126,6 +127,7 @@ public class ItemOutLocationServiceImpl implements ItemOutLocationService { inventoryWarningDOQueryWrapper.ne("procure_status", ProcureStatusEnum.YESPURCHASED.getCode()); List inventoryWarningDOList = inventoryWarningMapper.selectList(inventoryWarningDOQueryWrapper); if(inventoryWarningDOList.isEmpty()){ + inventoryWarningDO.setCreateTime(LocalDateTime.now()); result = inventoryWarningMapper.insert(inventoryWarningDO); } }