Răsfoiți Sursa

采购订单一键作废
采购退货新建

koushanshan 1 an în urmă
părinte
comite
a4e83ed127

+ 3 - 0
src/main/java/com/dk/mdm/model/response/ivt/InboundItemResponse.java

@@ -529,6 +529,9 @@ public class InboundItemResponse  {
 
 
     private BigDecimal canReturnQty;
     private BigDecimal canReturnQty;
 
 
+    @ApiModelProperty(value = "其他入库编辑传给库存标识,true:库存为0时改为无效,false:库位为0时不用动")
+    private  Boolean  updateOtherIntoInvFlag;
+
 
 
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;

+ 9 - 2
src/main/java/com/dk/mdm/service/ivt/inbound/InboundOtherService.java

@@ -261,6 +261,7 @@ public class InboundOtherService extends BaseService<Inbound> {
      */
      */
     @Transactional(rollbackFor = {Exception.class})
     @Transactional(rollbackFor = {Exception.class})
     public ResponseResultVO<?> otherInboundUpdate(InboundVO inboundVO) {
     public ResponseResultVO<?> otherInboundUpdate(InboundVO inboundVO) {
+
         //region 小编辑
         //region 小编辑
         if (!inboundVO.getLimitEdit()) {
         if (!inboundVO.getLimitEdit()) {
             Inbound inbound = new Inbound();
             Inbound inbound = new Inbound();
@@ -282,6 +283,7 @@ public class InboundOtherService extends BaseService<Inbound> {
             }
             }
         }
         }
         //endregion
         //endregion
+
         //region 大编辑
         //region 大编辑
         else {
         else {
             //region 明细数量金额  求和
             //region 明细数量金额  求和
@@ -309,7 +311,8 @@ public class InboundOtherService extends BaseService<Inbound> {
                         inboundItemVO.setIntoQty(inboundItemVO.getIntoingQty());
                         inboundItemVO.setIntoQty(inboundItemVO.getIntoingQty());
                         inboundItemVO.setIntoAmt(inboundItemVO.getIntoingAmt());
                         inboundItemVO.setIntoAmt(inboundItemVO.getIntoingAmt());
                         inboundItemVO.setAddOrEditFlag(false);
                         inboundItemVO.setAddOrEditFlag(false);
-                        inboundItemVO.setUpdateOtherIntoInvFlag(true);
+                        //todo 2024年7月17日15:06:51 在查询的地方处理了
+//                        inboundItemVO.setUpdateOtherIntoInvFlag(true);
                         //endregion
                         //endregion
 
 
                         InboundItem inboundItem = new InboundItem();
                         InboundItem inboundItem = new InboundItem();
@@ -361,7 +364,8 @@ public class InboundOtherService extends BaseService<Inbound> {
                         //region 将库存需要的参数赋值
                         //region 将库存需要的参数赋值
                         inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
                         inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
                         inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
                         inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
-                        inboundItemVO.setUpdateOtherIntoInvFlag(true);
+                        //todo 2024年7月17日15:06:51 在查询的地方处理了
+//                        inboundItemVO.setUpdateOtherIntoInvFlag(true);
                         //endregion
                         //endregion
 
 
                         if (inboundItemVO.getItemId() != null) {
                         if (inboundItemVO.getItemId() != null) {
@@ -469,6 +473,7 @@ public class InboundOtherService extends BaseService<Inbound> {
 
 
         }
         }
         //endregion
         //endregion
+
         return ResponseResultUtil.success(inboundVO);
         return ResponseResultUtil.success(inboundVO);
     }
     }
 
 
@@ -738,6 +743,8 @@ public class InboundOtherService extends BaseService<Inbound> {
             inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
             inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
             inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
             inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
             inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
             inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
+            //endregion
+
             //region
             //region
             InboundItem inboundItem = new InboundItem();
             InboundItem inboundItem = new InboundItem();
             inboundItem
             inboundItem

+ 4 - 8
src/main/java/com/dk/mdm/service/ivt/inbound/InboundPurchaseReturnService.java

@@ -217,7 +217,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
         if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
         if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
             Map<String, Object> invMap = new HashMap<>();
             Map<String, Object> invMap = new HashMap<>();
             invMap.put("intoDetail", inboundVO.getItemList());
             invMap.put("intoDetail", inboundVO.getItemList());
-            inventoryService.operatingInventoryInformation(map);
+            inventoryService.operatingInventoryInformation(invMap);
         }
         }
         //endregion
         //endregion
 
 
@@ -231,6 +231,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
      */
      */
     @Transactional(rollbackFor = {Exception.class})
     @Transactional(rollbackFor = {Exception.class})
     public ResponseResultVO<?> purchaseReturnInboundUpdate(InboundVO inboundVO) {
     public ResponseResultVO<?> purchaseReturnInboundUpdate(InboundVO inboundVO) {
+
         //region 小编辑
         //region 小编辑
         if (!inboundVO.getLimitEdit()) {
         if (!inboundVO.getLimitEdit()) {
             Inbound inbound = new Inbound();
             Inbound inbound = new Inbound();
@@ -254,6 +255,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
             }
             }
         }
         }
         //endregion
         //endregion
+
         //region 大编辑
         //region 大编辑
         else {
         else {
             //region 根据id查询 此条入库单的数据还未更改前的数据
             //region 根据id查询 此条入库单的数据还未更改前的数据
@@ -272,13 +274,6 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
                 List<InboundItemVO> itemList = inboundVO.getItemList();
                 List<InboundItemVO> itemList = inboundVO.getItemList();
                 for (InboundItemVO inboundItemVO : itemList) {
                 for (InboundItemVO inboundItemVO : itemList) {
 
 
-                    //region  不能新建
-//                    if (inboundItemVO.getSPurItemId() == null) {
-//                        throw new BaseBusinessException(ErrorCodeEnum.ITEMS_THAT_ARE_NOT_AVAILABLE_HANDLE.getCode(),
-//                                ErrorCodeEnum.ITEMS_THAT_ARE_NOT_AVAILABLE_HANDLE.getMessage());
-//                    }
-                    //endregion
-
                     //根据id查询
                     //根据id查询
                     InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
                     InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
 
 
@@ -461,6 +456,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
             //endregion
             //endregion
         }
         }
         //endregion
         //endregion
+
         return ResponseResultUtil.success(inboundVO);
         return ResponseResultUtil.success(inboundVO);
     }
     }
 
 

+ 2 - 2
src/main/java/com/dk/mdm/service/ivt/inbound/InboundPurchaseService.java

@@ -1665,8 +1665,8 @@ public class InboundPurchaseService extends BaseService<Inbound> {
                         //region 将库存需要的参数赋值
                         //region 将库存需要的参数赋值
                         inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
                         inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
                         inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.PURCHASE_ORDER.getValue());
                         inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.PURCHASE_ORDER.getValue());
-                        inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
-                        inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
+                        inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty());
+                        inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt());
                         //endregion
                         //endregion
 
 
                         //region  编辑明细  赋值 赋值明细  防止作废的单据查不到明细 故注掉下面代码
                         //region  编辑明细  赋值 赋值明细  防止作废的单据查不到明细 故注掉下面代码

+ 9 - 7
src/main/java/com/dk/mdm/service/ivt/inventory/InventoryService.java

@@ -1395,13 +1395,15 @@ public class InventoryService extends BaseService<Inventory> {
                 costAmt.divide(inventory.getInvQty(), BigDecimal.ROUND_HALF_UP) : BigDecimal.ZERO);
                 costAmt.divide(inventory.getInvQty(), BigDecimal.ROUND_HALF_UP) : BigDecimal.ZERO);
         inventoryMapper.updateAmtAndQty(inventory);
         inventoryMapper.updateAmtAndQty(inventory);
 
 
-        //region 采购入库 并且 其他入库编辑传给库存标识 为true 查询库存修改完是否为0,如果为0 将库存制成无效
-        if (Constant.InventoryDocCode.OTHER_INBOUND.getValue().equals(inOutRecordVO.getInventoryDocCode()) && inOutRecordVO.getUpdateOtherIntoInvFlag() != null && inOutRecordVO.getUpdateOtherIntoInvFlag()) {
-            InventoryResponse inventoryDel = inventoryMapper.selectById(inventory.getInvId());
-            if (inventoryDel.getInvQty().compareTo(BigDecimal.ZERO) == 0) {
-                inventoryMapper.updateFlgValid(new InventoryVO().setInvId(inventory.getInvId()));
-            }
-        }
+        //todo  2024年7月17日15:23:01  这里周哥在查询的地方过滤了  不用置为无效了
+        //region 其他入库 并且 编辑传给库存标识 为true 查询库存修改完是否为0,如果为0 将库存制成无效
+//        if (Constant.InventoryDocCode.OTHER_INBOUND.getValue().equals(inOutRecordVO.getInventoryDocCode())
+//                && inOutRecordVO.getUpdateOtherIntoInvFlag() != null && inOutRecordVO.getUpdateOtherIntoInvFlag()) {
+//            InventoryResponse inventoryDel = inventoryMapper.selectById(inventory.getInvId());
+//            if (inventoryDel.getInvQty().compareTo(BigDecimal.ZERO) == 0) {
+//                inventoryMapper.updateFlgValid(new InventoryVO().setInvId(inventory.getInvId()));
+//            }
+//        }
         //endregion
         //endregion
 
 
         //endregion
         //endregion