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); } }