فهرست منبع

Merge remote-tracking branch 'origin/master'

zhangxiaomu 1 سال پیش
والد
کامیت
4eb75fa76a

+ 3 - 3
src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.xml

@@ -557,7 +557,7 @@
         tpii.non_std_code,
         tpii.into_status,
       --   sys.f_remove_zero(tpii.into_qty - tpii.return_qty)  AS can_return_qty,
-        sys.f_remove_zero(COALESCE(tpsii.into_qty, 0) - COALESCE(tpsii.return_qty, 0) + tpii.intoing_qty + tpii.into_qty) as can_return_qty,
+        -sys.f_remove_zero ( COALESCE ( tpsii.into_qty, 0 )  + tpii.intoing_qty) AS can_return_qty,
         sys.f_remove_zero(tpii.intoing_qty + tpii.into_qty)               as intoing_qty,
         sys.f_remove_zero(tpii.intoing_amt + tpii.into_amt)   as intoing_amt,
         sys.f_remove_zero ( tpii.into_qty ) AS into_qty,
@@ -569,7 +569,7 @@
         tpii.cost_price,
         tpii.cost_amt,
         sys.f_remove_zero ( tpii.out_qty ) AS out_qty,
-        sys.f_remove_zero ( tpii.inv_qty ) AS inv_qty,
+        sys.f_remove_zero ( tpi.inv_qty ) AS inv_qty,
         tpii.flg_valid,
         tpii.cp_id,
         tpii.s_into_id,
@@ -1143,7 +1143,7 @@
                 AND tpii.into_id = #{intoId}::uuid
             </if>
             <if test="fromId != null and fromId != ''">
-                AND tpoi.from_id = #{fromId}::uuid
+                AND tpii.from_id = #{fromId}::uuid
             </if>
         </where>
     </select>

+ 181 - 3
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -208,6 +208,7 @@
         <result column="pack_box_text" property="packBoxText"/>
         <result column="can_return_qty" property="canReturnQty"/>
         <result column="price_into" property="priceInto"/>
+        <result column="sku_spec" property="skuSpec"/>
 
     </resultMap>
 
@@ -310,6 +311,7 @@
             <if test="intoStatus != null and intoStatus != ''">
                  AND tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
             </if>
+
             <if test="skuModel != null and skuModel!='' ">
                 and exists (select 1 from dkic_b.t_psi_inbound_item tpii
                 left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpii.sku_id
@@ -681,7 +683,7 @@
         tmgb.short_name AS  list_short_name,
         tmgs.sku_images AS  list_sku_images,
         tmgs.price_standard AS list_price_std,
-
+        tmgs.sku_spec          as "list_sku_spec",
         i.inv_id  as list_inv_id,
         i.wh_id as list_wh_id,
         i.inv_qty    as list_inv_qty,
@@ -1197,7 +1199,95 @@
         else true end as "paymentFlag"
         FROM dkic_b.t_psi_inbound tpi
         <include refid="Join_Table_Return"/>
-        <include refid="Condition"/>
+        <where>
+                <if test="intoNo != null and intoNo != ''">
+                    AND tpi.into_no LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
+                </if>
+                <if test="intoType != null and intoType != ''">
+                    AND tpi.into_type LIKE concat('%',my_ex.likequery(#{intoType}),'%')
+                </if>
+                <if test="intoTypes != null and intoTypes.size()>0">
+                    AND tpi.into_type =any(#{intoTypes,typeHandler=StringListTypeHandler})
+                </if>
+                <if test="intoReasonList != null and intoReasonList.size()>0">
+                    AND tpi.into_reason =any(#{intoReasonList,typeHandler=UuidListTypeHandler})
+                </if>
+                <if test="searchText !=null and searchText != ''">
+                    AND (
+                    tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    )
+                </if>
+                <if test="staffIds != null and staffIds.size()>0">
+                    AND t.staff_id = any(#{staffIds, typeHandler=uuidListTypeHandler})
+                </if>
+                <if test="orgIds != null and orgIds.size()>0">
+                    AND t.org_id = any(#{orgIds, typeHandler=uuidListTypeHandler})
+                </if>
+                <if test="fromId != null and fromId != ''">
+                    AND tpi.from_id = #{fromId}::uuid
+                </if>
+                <if test="fromNo != null and fromNo != ''">
+                    AND tpi.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+                </if>
+                <if test="orgId != null and orgId != ''">
+                    AND tpi.org_id = #{orgId}::uuid
+                </if>
+                <if test="orgName != null and orgName != ''">
+                    AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+                </if>
+                <if test="supName != null and supName != ''">
+                    AND tmp.sup_name LIKE concat('%',my_ex.likequery(#{supName}),'%')
+                </if>
+                <if test="staffName != null and staffName != ''">
+                    AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
+                </if>
+                <if test="whName != null and whName != ''">
+                    AND tmw.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
+                </if>
+                <if test="staffId != null and staffId != ''">
+                    AND tpi.staff_id = #{staffId}::uuid
+                </if>
+
+                <if test="supId != null and supId != ''">
+                    AND tpi.sup_id = #{supId}::uuid
+                </if>
+                <if test="makeStaff != null and makeStaff != ''">
+                    AND tpi.make_staff = #{makeStaff}
+                </if>
+                <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
+                    AND  tpi.flg_valid = true
+                </if>
+                <if test="makeTime != null">
+                    AND tpi.make_time = #{makeTime}
+                </if>
+                <if test="receivableId != null and receivableId != ''">
+                    AND tpi.receivable_id = #{receivableId}
+                </if>
+                <if test="flgValid != null">
+                    AND tpi.flg_valid = #{flgValid}
+                </if>
+                <if test="cpId != null">
+                    AND tpi.cp_id = #{cpId}
+                </if>
+                <if test="intoDateStart != null and intoDateEnd != null">
+                    AND tpi.into_date &gt;= #{intoDateStart}::timestamp with time zone
+                    AND tpi.into_date &lt; #{intoDateEnd}::timestamp with time zone + interval '1 day'
+                </if>
+                <if test="makeTimeStart != null and makeTimeEnd != null">
+                    AND tpi.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                    AND tpi.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+                </if>
+                <if test="intoStatusList != null and intoStatusList.size()>0">
+                    AND tpi.into_status =
+                    any(#{intoStatusList, typeHandler= StringListTypeHandler})
+                </if>
+                <if test="intoStatus != null and intoStatus != ''">
+                    AND tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
+                </if>
+        </where>
         ORDER BY tpi.op_create_time DESC
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -1209,7 +1299,95 @@
         count(1)
         FROM dkic_b.t_psi_inbound tpi
         <include refid="Join_Table_Return"/>
-        <include refid="Condition"/>
+        <where>
+            <if test="intoNo != null and intoNo != ''">
+                AND tpi.into_no LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
+            </if>
+            <if test="intoType != null and intoType != ''">
+                AND tpi.into_type LIKE concat('%',my_ex.likequery(#{intoType}),'%')
+            </if>
+            <if test="intoTypes != null and intoTypes.size()>0">
+                AND tpi.into_type =any(#{intoTypes,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="intoReasonList != null and intoReasonList.size()>0">
+                AND tpi.into_reason =any(#{intoReasonList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
+            <if test="staffIds != null and staffIds.size()>0">
+                AND t.staff_id = any(#{staffIds, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="orgIds != null and orgIds.size()>0">
+                AND t.org_id = any(#{orgIds, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="fromId != null and fromId != ''">
+                AND tpi.from_id = #{fromId}::uuid
+            </if>
+            <if test="fromNo != null and fromNo != ''">
+                AND tpi.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+            </if>
+            <if test="orgId != null and orgId != ''">
+                AND tpi.org_id = #{orgId}::uuid
+            </if>
+            <if test="orgName != null and orgName != ''">
+                AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+            </if>
+            <if test="supName != null and supName != ''">
+                AND tmp.sup_name LIKE concat('%',my_ex.likequery(#{supName}),'%')
+            </if>
+            <if test="staffName != null and staffName != ''">
+                AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
+            </if>
+            <if test="whName != null and whName != ''">
+                AND tmw.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
+            </if>
+            <if test="staffId != null and staffId != ''">
+                AND tpi.staff_id = #{staffId}::uuid
+            </if>
+
+            <if test="supId != null and supId != ''">
+                AND tpi.sup_id = #{supId}::uuid
+            </if>
+            <if test="makeStaff != null and makeStaff != ''">
+                AND tpi.make_staff = #{makeStaff}
+            </if>
+            <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
+                AND  tpi.flg_valid = true
+            </if>
+            <if test="makeTime != null">
+                AND tpi.make_time = #{makeTime}
+            </if>
+            <if test="receivableId != null and receivableId != ''">
+                AND tpi.receivable_id = #{receivableId}
+            </if>
+            <if test="flgValid != null">
+                AND tpi.flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND tpi.cp_id = #{cpId}
+            </if>
+            <if test="intoDateStart != null and intoDateEnd != null">
+                AND tpi.into_date &gt;= #{intoDateStart}::timestamp with time zone
+                AND tpi.into_date &lt; #{intoDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND tpi.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND tpi.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="intoStatusList != null and intoStatusList.size()>0">
+                AND tpi.into_status =
+                any(#{intoStatusList, typeHandler= StringListTypeHandler})
+            </if>
+            <if test="intoStatus != null and intoStatus != ''">
+                AND tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
+            </if>
+        </where>
     </select>
     <!--    查看来源单据,总单加明细  采购退货用-->
     <select id="selectInboundReturnById" resultMap="BaseResultMapInboundReturnResponse">

+ 2 - 2
src/main/java/com/dk/mdm/model/query/ivt/InboundQuery.java

@@ -243,8 +243,8 @@ public class InboundQuery extends PageInfo<InboundQuery>{
     @ApiModelProperty(value = "出库状态 (【系统字典】)")
     private String outStatus;
 
-
-
+    @ApiModelProperty(value = "查询作废标识")
+    private Boolean viewVoidedDocuments;
 
     private static final long serialVersionUID = 1L;
 

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

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

+ 8 - 8
src/main/java/com/dk/mdm/service/ivt/InboundReturnService.java

@@ -193,8 +193,8 @@ public class InboundReturnService extends BaseService<Inbound> {
             if (sInboundResponse != null) {
                 inboundMapper.updateAmount(new Inbound()
                         .setIntoId(sInboundResponse.getIntoId())
-                        .setReturnQty(sInboundResponse.getReturnQty().subtract(inboundReturnResponse.getIntoQty().abs()).add(inboundVO.getIntoQty().abs()))
-                        .setReturnAmt(sInboundResponse.getReturnAmt().subtract(inboundReturnResponse.getIntoAmt().abs()).add(inboundVO.getIntoAmt().abs())));
+                        .setReturnQty(sInboundResponse.getReturnQty().subtract(inboundReturnResponse.getIntoQty().abs()).add(inboundVO.getIntoingQty().abs()))
+                        .setReturnAmt(sInboundResponse.getReturnAmt().subtract(inboundReturnResponse.getIntoAmt().abs()).add(inboundVO.getIntoingAmt().abs())));
             }
             //反写上游采购单退货数量金额
             if (sInboundResponse.getFromId() != null) {
@@ -203,8 +203,8 @@ public class InboundReturnService extends BaseService<Inbound> {
                 purchaseMapper.updateAmount(
                         new Purchase()
                                 .setPurId(purchaseResponse.getPurId())
-                                .setReturnQty(sInboundResponse.getReturnQty().subtract(inboundReturnResponse.getIntoQty().abs()).add(inboundVO.getIntoQty().abs()))
-                                .setReturnAmt(sInboundResponse.getReturnAmt().subtract(inboundReturnResponse.getIntoAmt().abs()).add(inboundVO.getIntoAmt().abs())));
+                                .setReturnQty(sInboundResponse.getReturnQty().subtract(inboundReturnResponse.getIntoQty().abs()).add(inboundVO.getIntoingQty().abs()))
+                                .setReturnAmt(sInboundResponse.getReturnAmt().subtract(inboundReturnResponse.getIntoAmt().abs()).add(inboundVO.getIntoingAmt().abs())));
             }
         }
 
@@ -220,8 +220,8 @@ public class InboundReturnService extends BaseService<Inbound> {
                         //修改入库单明细 已入库退货数量/金额
                         inboundItemMapper.updateAmount(new InboundItem()
                                 .setItemId(inboundItemReturnResponse.getItemId())
-                                .setReturnQty(inboundItemReturnResponse.getReturnQty().subtract(inboundItem.getIntoQty().abs()).add(inboundItemVO.getIntoQty().abs()))
-                                .setReturnAmt(inboundItemReturnResponse.getReturnAmt().subtract(inboundItem.getIntoAmt().abs()).add(inboundItemVO.getIntoAmt().abs())));
+                                .setReturnQty(inboundItemReturnResponse.getReturnQty().subtract(inboundItem.getIntoQty().abs()).add(inboundItemVO.getIntoingQty().abs()))
+                                .setReturnAmt(inboundItemReturnResponse.getReturnAmt().subtract(inboundItem.getIntoAmt().abs()).add(inboundItemVO.getIntoingAmt().abs())));
                     }
 
                 }
@@ -232,8 +232,8 @@ public class InboundReturnService extends BaseService<Inbound> {
                     purchaseItemMapper.updateAmount(
                             new PurchaseItem()
                                     .setItemId(purchaseItemResponse.getItemId())
-                                    .setReturnQty(purchaseItemResponse.getReturnQty().subtract(inboundItem.getIntoQty().abs()).add(inboundItemVO.getIntoQty().abs()))
-                                    .setReturnAmt(purchaseItemResponse.getReturnAmt().subtract(inboundItem.getIntoAmt().abs()).add(inboundItemVO.getIntoAmt().abs())));
+                                    .setReturnQty(purchaseItemResponse.getReturnQty().subtract(inboundItem.getIntoQty().abs()).add(inboundItemVO.getIntoingQty().abs()))
+                                    .setReturnAmt(purchaseItemResponse.getReturnAmt().subtract(inboundItem.getIntoAmt().abs()).add(inboundItemVO.getIntoingAmt().abs())));
                 }
             }
         }

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

+ 5 - 12
src/main/java/com/dk/mdm/service/ivt/inbound/InboundPurchaseReturnService.java

@@ -145,10 +145,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
             //入库中
             inboundVO.setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName());
         }
-        //退货数量
-        inboundVO.setReturnQty(inboundVO.getIntoingQty());
-        //退货金额
-        inboundVO.setReturnAmt(inboundVO.getIntoingAmt());
+
         //入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
         if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
             inboundVO
@@ -220,7 +217,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
         if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
             Map<String, Object> invMap = new HashMap<>();
             invMap.put("intoDetail", inboundVO.getItemList());
-            inventoryService.operatingInventoryInformation(map);
+            inventoryService.operatingInventoryInformation(invMap);
         }
         //endregion
 
@@ -234,6 +231,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
      */
     @Transactional(rollbackFor = {Exception.class})
     public ResponseResultVO<?> purchaseReturnInboundUpdate(InboundVO inboundVO) {
+
         //region 小编辑
         if (!inboundVO.getLimitEdit()) {
             Inbound inbound = new Inbound();
@@ -257,6 +255,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
             }
         }
         //endregion
+
         //region 大编辑
         else {
             //region 根据id查询 此条入库单的数据还未更改前的数据
@@ -275,13 +274,6 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
                 List<InboundItemVO> itemList = inboundVO.getItemList();
                 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查询
                     InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
 
@@ -464,6 +456,7 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
             //endregion
         }
         //endregion
+
         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 将库存需要的参数赋值
                         inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
                         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
 
                         //region  编辑明细  赋值 赋值明细  防止作废的单据查不到明细 故注掉下面代码

+ 15 - 13
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);
         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
@@ -1857,8 +1859,8 @@ public class InventoryService extends BaseService<Inventory> {
         InboundResponse inboundResponse = inboundMapper.selectMessageByOtherQuery(new InboundQuery().setIntoId(inOutRecordVOList.get(0).getBiznisId()));
         Inbound inbound = new Inbound();
         inbound.setIntoId(inboundResponse.getIntoId());
-        inbound.setIntoQty(sumOutQty.abs());
-        inbound.setIntoAmt(sumOutAmt.abs());
+        inbound.setIntoQty(sumOutQty);
+        inbound.setIntoAmt(sumOutAmt);
         inboundMapper.update(inbound,
                 new UpdateWrapper<Inbound>().lambda()
                         .eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
@@ -1875,13 +1877,13 @@ public class InventoryService extends BaseService<Inventory> {
             //出库数量 todo 2024年7月12日09:47:55 这里在入库的时候会反写, 不要反写, 后续如果不需要再删除
 //            inboundItem.setOutQty(inOutRecordVO.getIntoQty().abs());
             //已入库数量
-            inboundItem.setIntoQty(inOutRecordVO.getIntoQty().abs());
+            inboundItem.setIntoQty(inOutRecordVO.getIntoQty());
             //已入库金额
-            inboundItem.setIntoAmt(inOutRecordVO.getIntoAmt().abs());
+            inboundItem.setIntoAmt(inOutRecordVO.getIntoAmt());
             //成本单价
-            inboundItem.setCostPrice(inOutRecordVO.getCostPrice().abs());
+            inboundItem.setCostPrice(inOutRecordVO.getCostPrice());
             //成本金额
-            inboundItem.setCostAmt(inOutRecordVO.getIntoAmt().abs());
+            inboundItem.setCostAmt(inOutRecordVO.getIntoAmt());
             //库存id
             inboundItem.setInvId(inOutRecordVO.getInvId());
             //库存数量 =  已入库数量-出库数量 -已入库退货数量