Quellcode durchsuchen

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss-server-mdm

zhoux vor 1 Jahr
Ursprung
Commit
88f7d55d0e
23 geänderte Dateien mit 249 neuen und 122 gelöschten Zeilen
  1. 11 0
      src/main/java/com/dk/mdm/controller/mst/StaffController.java
  2. 1 1
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.java
  3. 1 1
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml
  4. 13 2
      src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.xml
  5. 1 1
      src/main/java/com/dk/mdm/mapper/ivt/InventoryMapper.xml
  6. 2 1
      src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.xml
  7. 42 21
      src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.xml
  8. 9 2
      src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.xml
  9. 1 3
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml
  10. 13 0
      src/main/java/com/dk/mdm/mapper/mst/StaffMapper.java
  11. 11 0
      src/main/java/com/dk/mdm/mapper/mst/StaffMapper.xml
  12. 55 44
      src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml
  13. 1 1
      src/main/java/com/dk/mdm/mapper/sale/OrderMapper.xml
  14. 3 0
      src/main/java/com/dk/mdm/model/query/mac/RecPayQuery.java
  15. 3 0
      src/main/java/com/dk/mdm/model/response/mac/RecPayResponse.java
  16. 4 4
      src/main/java/com/dk/mdm/service/ivt/inbound/InboundPurchaseService.java
  17. 26 1
      src/main/java/com/dk/mdm/service/ivt/inventory/InventoryService.java
  18. 13 25
      src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleOrderService.java
  19. 1 1
      src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleReturnService.java
  20. 4 3
      src/main/java/com/dk/mdm/service/mac/PaymentService.java
  21. 7 6
      src/main/java/com/dk/mdm/service/mac/ReceiptService.java
  22. 21 1
      src/main/java/com/dk/mdm/service/mst/StaffService.java
  23. 6 4
      src/main/java/com/dk/mdm/service/sale/OrderService.java

+ 11 - 0
src/main/java/com/dk/mdm/controller/mst/StaffController.java

@@ -268,4 +268,15 @@ public class StaffController {
     public ResponseResultVO<?> deleteGhostStaff(@RequestBody StaffVO staffVO) {
         return staffService.deleteGhostStaff(staffVO);
     }
+
+    /**
+     * @desc   : 更新负责人标识
+     * @author : 刘尧
+     * @date   : 2024/6/21 16:24
+     */
+    @ApiOperation(value = "更新负责人标识", notes = "更新负责人标识")
+    @PostMapping({"update_flgInit"})
+    public ResponseResultVO updateFlgInit(@RequestBody Map<String, Object> params){
+        return staffService.updateFlgInit(params);
+    }
 }

+ 1 - 1
src/main/java/com/dk/mdm/mapper/common/CommonMapper.java

@@ -557,7 +557,7 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
     Long getGoodsForIntoCountByPage(Map param);
 
     /**
-     * @desc :  销售分析-我的 门店助手的 销售金额 收款金额 库存成本
+     * @desc :  销售分析-我的 门店助手的 销售金额 收款金额 库存成本--根据制单员权限
      * @date : 2024/4/20 11:21
      * @author : 姜永辉
      */

+ 1 - 1
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -1937,7 +1937,7 @@
 
     <!-- 销售分析-我的 门店助手的 销售金额 收款金额 库存成本 -->
     <select id="getHomeOrderRecCost" resultType="java.util.Map">
-        select dkic_b.f_get_home_order_rec_cost(#{cpId},#{dateBegin}::date,#{dateEnd}::date)
+        select dkic_b.f_get_home_order_rec_cost(#{cpId},#{dateBegin}::date,#{dateEnd}::date,#{staffId}::uuid)
     </select>
 
     <!--查询用户授权数-->

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

@@ -589,8 +589,19 @@
         <include refid="Base_Column_List_Response"/>
         ,tpid.into_no as "intoNo"
         ,tmgs.sku_code  as "skuCode"
-        ,tmgs.sku_model as "skuModel"
-        ,tmgs.sku_name  as "skuName"
+
+        ,case when tmgs.sku_model is null then tpii.sku_model
+        when tmgs.sku_model is not null then tmgs.sku_model
+        else null end as "skuModel"
+        ,case when tmgs.sku_name is null then tpii.sku_name
+        when tmgs.sku_name is not null then tmgs.sku_name
+        else null end as "skuName"
+
+
+--         ,tmgs.sku_model as "skuModel"
+--         ,tmgs.sku_name  as "skuName"
+--         ,tpii.sku_model as "skuModel"
+--         ,tpii.sku_name  as "skuName"
         ,tmgs.sku_spec  as "skuSpec"
         ,tmgb.brand_name  as "brandName"
         ,tmgb.short_name  as "shortName"

+ 1 - 1
src/main/java/com/dk/mdm/mapper/ivt/InventoryMapper.xml

@@ -301,7 +301,7 @@
             <if test="nonStdCode != null and nonStdCode != ''">
                 AND tpi.non_std_code = #{nonStdCode}
             </if>
-            <if test="nonStdCode == null and nonStdCode == ''">
+            <if test="nonStdCode == null or nonStdCode == ''">
                 AND tpi.non_std_code = '-'
             </if>
         </where>

+ 2 - 1
src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.xml

@@ -620,6 +620,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
                t.s_order_item_id,
                t.item_index,
                t.sku_id,
+               t.from_id,
                tmgs.sku_images,
                tmgb.brand_name,
                tmgb.short_name,
@@ -627,7 +628,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
                case when t.sku_id is null then t.sku_model  else  tmgs.sku_model end                 as "skuModel",
                case when t.sku_id is null then t.sku_name  else  tmgs.sku_name end                   as "skuName",
                sys.f_remove_zero(COALESCE(tpobi.out_qty, 0))                                                            as "outboundOutQty",
-               sys.f_remove_zero(t.out_qty - t.return_qty)                   as "canReturnQty",
+               sys.f_remove_zero(t.out_qty - t.outing_qty- t.return_qty)                   as "canReturnQty",
                t.inv_id,
                tpi.wh_id,
                sys.f_remove_zero(tpi.inv_qty)                                                                           as "invQty",

+ 42 - 21
src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.xml

@@ -178,27 +178,48 @@
 
     <!--查询应收和收款汇总(根据制单员权限)-->
     <select id="getReceivableAccountSum" resultType="Map">
-        SELECT SUM
-        ( CASE WHEN tmai.acc_item_type = '账款类型-应收' THEN tmai.amt_should ELSE 0 END ) AS receivable,
-        SUM ( CASE WHEN tmai.acc_item_type = '账款类型-收款' THEN tmai.amt_rec ELSE 0 END ) AS receipt
-        FROM
-        dkic_b.t_mac_account_item tmai
-        WHERE
-        tmai.flg_valid
-        AND tmai.cp_id = #{cpId}
-        AND (
-        tmai.make_staff = #{staffId}::uuid
-        OR EXISTS ( SELECT 1 FROM dkic_b.t_mst_staff_purview tmsp WHERE tmsp.staff_id = tmai.make_staff AND
-        tmsp.purview_code = 'PU10000003' )
-        )
-        <!--开始日期-->
-        <if test="accDateStart != null">
-            AND tmai.acc_date &gt;= #{accDateStart,typeHandler=TimestampTypeHandler}
-        </if>
-        <!--截止日期-->
-        <if test="accDateEnd != null">
-            AND tmai.acc_date &lt;= #{accDateEnd,typeHandler=TimestampTypeHandler}
-        </if>
+        select
+
+            (SELECT SUM ( tpo.fact_amt) AS receivable
+            FROM
+            dkic_b.t_psi_order tpo
+            WHERE
+            tpo.flg_valid
+            AND tpo.cp_id = #{cpId}
+            AND (
+            tpo.make_staff = #{staffId}::uuid
+            OR EXISTS ( SELECT 1 FROM dkic_b.t_mst_staff_purview tmsp WHERE tmsp.staff_id = tpo.make_staff AND
+            tmsp.purview_code = 'PU10000003' )
+            )
+            <!--开始日期-->
+            <if test="accDateStart != null">
+                AND tpo.make_time &gt;= #{accDateStart,typeHandler=TimestampTypeHandler}
+            </if>
+            <!--截止日期-->
+            <if test="accDateEnd != null">
+                AND tpo.make_time &lt;= #{accDateEnd,typeHandler=TimestampTypeHandler}
+            </if>
+            ),
+            (SELECT SUM ( tmrp.sum_amt_rec) AS receipt
+            FROM   dkic_b.t_mac_rec_pay tmrp
+            WHERE
+                 tmrp.flg_valid
+            AND tmrp.cp_id = #{cpId}
+            AND (
+            tmrp.make_staff = #{staffId}::uuid
+            OR EXISTS ( SELECT 1 FROM dkic_b.t_mst_staff_purview tmsp WHERE tmsp.staff_id = tmrp.make_staff AND
+            tmsp.purview_code = 'PU10000003' )
+            )
+            <!--开始日期-->
+            <if test="accDateStart != null">
+                AND tmrp.acc_date &gt;= #{accDateStart,typeHandler=TimestampTypeHandler}
+            </if>
+            <!--截止日期-->
+            <if test="accDateEnd != null">
+                AND tmrp.acc_date &lt;= #{accDateEnd,typeHandler=TimestampTypeHandler}
+            </if>
+            )
+
     </select>
 
     <!-- 查询应收账款明细 -->

+ 9 - 2
src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.xml

@@ -70,6 +70,7 @@
             <result column="receipt_residue" property="receiptResidue"/>
             <result column="payable_residue" property="payableResidue"/>
             <result column="payment_residue" property="paymentResidue"/>
+            <result column="macNames" property="macNames"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -194,6 +195,10 @@
         <if test="orgName != null and orgName != ''">
             AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
         </if>
+
+        <if test="sumAmtReceivableHandleFlag != null and sumAmtReceivableHandleFlag == true">
+            AND t.sum_amt_receivable_handle > 0
+        </if>
     </sql>
 
     <sql id="idsForeach">
@@ -241,7 +246,8 @@
                t.flg_valid,
                t.cp_id,
                 tma.receivable_residue,
-                tma.receipt_residue
+                tma.receipt_residue,
+                 concat (tmma.mac_name ) AS "macNames"
         from dkic_b.t_mac_rec_pay as t
                  left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.object_id
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
@@ -249,7 +255,8 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                   LEFT JOIN  dkic_b.t_mac_account tma  on tma.object_id = t.object_id and tma.object_type in ('对象类型-客户')
-
+                 left  join   dkic_b.t_mac_rec_pay_item  rpi  on  rpi.rp_id = t.rp_id
+                 left  join   dkic_b.t_mst_money_account tmma  on  tmma.mac_id = rpi.mac_id
         where t.rp_type in ('收付款类型-收款', '收付款类型-退收款')
         <include refid="Condition"/>
 

+ 1 - 3
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml

@@ -278,8 +278,6 @@
         tms.staff_name AS "staffName",
         tms2.staff_name AS "reportStaffName",
         tdk.kind_name_i18n ->> #{i18n} AS "saleStatusName",
-        -- tccfs.follow_staff as follow_staff,
-        -- tms1.staff_name as follow_staff_name
         (SELECT COUNT(1) FROM dkic_b.t_psi_order tpo WHERE tpo.cus_id = tmc.cus_id AND tpo.cp_id = tmc.cp_id AND
         tpo.flg_valid) AS "orderQuantity",
         (SELECT sum(tpo.fact_amt) FROM dkic_b.t_psi_order tpo WHERE tpo.cus_id = tmc.cus_id AND tpo.cp_id = tmc.cp_id
@@ -289,7 +287,7 @@
         (SELECT COUNT(1) FROM dkic_b.t_psi_outbound tpob WHERE tpob.cus_id = tmc.cus_id AND tpob.cp_id = tmc.cp_id AND
         tpob.flg_valid AND tpob.out_type = '出库类型-销售出库' AND tpob.out_status = '出库状态-已出库') AS
         "outboundQuantity",
-        (SELECT sum(tpob.out_amt) FROM dkic_b.t_psi_outbound tpob WHERE tpob.cus_id = tmc.cus_id AND tpob.cp_id =
+        (SELECT sum(tpob.fact_amt) FROM dkic_b.t_psi_outbound tpob WHERE tpob.cus_id = tmc.cus_id AND tpob.cp_id =
         tmc.cp_id AND tpob.flg_valid AND tpob.out_type = '出库类型-销售出库' AND tpob.out_status = '出库状态-已出库') AS
         "outboundAmount",
 

+ 13 - 0
src/main/java/com/dk/mdm/mapper/mst/StaffMapper.java

@@ -67,5 +67,18 @@ public interface StaffMapper extends BaseMapper<Staff>{
      */
     int deleteGhostStaff(StaffQuery staffQuery);
 
+    /**
+     * @desc : 通过商户号注销当前负责人
+     * @author : 刘尧
+     * @date : 2024/6/21 10:21
+     */
+    boolean updateFlgInit(Map<String, Object> params);
+
+    /**
+     * @desc : 通过用户id更新负责人
+     * @author : 刘尧
+     * @date : 2024/6/21 10:43
+     */
+    boolean updateFlgInitById(String owner);
 }
 

+ 11 - 0
src/main/java/com/dk/mdm/mapper/mst/StaffMapper.xml

@@ -257,4 +257,15 @@
           and cp_id = #{cpId}
           and flg_ghost = true
     </delete>
+
+    <!--根据商户号注销当前商户的负责人-->
+    <update id="updateFlgInit">
+        UPDATE dkic_b.t_mst_staff SET flg_init = false
+        WHERE cp_id = #{cpId}
+    </update>
+    <!--通过用户id更新负责人-->
+    <update id="updateFlgInitById">
+        UPDATE dkic_b.t_mst_staff SET flg_init = true
+        WHERE staff_id = #{userId}::uuid
+    </update>
 </mapper>

+ 55 - 44
src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml

@@ -357,10 +357,10 @@
                 any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
             </if>
             <if test="skuName != null and skuName != ''">
-                AND tmgs.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
+                AND tpoi.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
             </if>
             <if test="skuModel != null and skuModel != ''">
-                AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
+                AND tpoi.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
             </if>
             <if test="brandName != null and brandName != ''">
                 AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
@@ -444,10 +444,10 @@
                 any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
             </if>
             <if test="skuName != null and skuName != ''">
-                AND tmgs.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
+                AND tpii.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
             </if>
             <if test="skuModel != null and skuModel != ''">
-                AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
+                AND tpii.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
             </if>
             <if test="brandName != null and brandName != ''">
                 AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
@@ -1073,6 +1073,9 @@
         ,concat(sys.f_remove_zero(tpoi.out_qty),tmgu.unit_name) as "outQtyPiece"
         ,sys.f_remove_zero(tpoi.out_qty) as "outQty"
         ,tpoi.out_amt as "outAmt"
+        ,tpoi.fact_amt as "factAmt"
+        ,tpoi.disc_amt as "discAmt"
+        ,tpoi.discount as "discount"
         ,sys.f_remove_zero(tpoi.return_qty) as "returnQty"
         ,tpoi.return_amt as "returnAmt"
         ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
@@ -1124,8 +1127,8 @@
         ,tpi.into_date as "outDate"
         ,tpi.remarks
         ,makestaff.staff_name as "makeStaffName"
-        ,tmgs.sku_name as "skuName"
-        ,tmgs.sku_model as "skuModel"
+        ,tpii.sku_name as "skuName"
+        ,tpii.sku_model as "skuModel"
         ,tmgs.sku_spec as "skuSpec"
         ,tpii.non_std_code as "nonStdCode"
         ,tmgb.short_name as "shortName"
@@ -1139,6 +1142,9 @@
         ,concat(sys.f_remove_zero(abs(tpii.into_qty)),tmgu.unit_name) as "outQtyPiece"
         ,sys.f_remove_zero(tpii.into_qty) as "outQty"
         ,tpii.into_amt as "outAmt"
+        ,tpii.into_amt+tpii.intoing_amt as "factAmt"
+        ,0.00 as "discAmt"
+        ,0.00 as "discount"
         ,sys.f_remove_zero(tpii.return_qty) as "returnQty"
         ,tpii.return_amt as "returnAmt"
         ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,abs(tpii.intoing_box),abs(tpii.intoing_piece)) as "outingBoxPiece"
@@ -1514,8 +1520,8 @@
             t.item_index AS "itemIndex",
             t.sku_id AS "skuId",
             tmgs.sku_code  as "skuCode",
-            tmgs.sku_model as "skuModel",
-            tmgs.sku_name  as "skuName",
+            t.sku_model as "skuModel",
+            t.sku_name  as "skuName",
             tmgb.brand_name AS "brandName",
             t.item_qty AS "itemQty",
             sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "outStatusName",
@@ -1546,11 +1552,11 @@
         dkic_b.f_box_piece ( tmgus.unit_name, tmgu.unit_name, T.BOX, T.piece ) AS "boxPiece"
         FROM dkic_b.t_psi_order_item as t
         inner join dkic_b.t_psi_order tpo on tpo.order_id = t.order_id
-        inner join dkic_b.t_mst_goods_sku tmgs on t.sku_id = tmgs.sku_id
+        left join dkic_b.t_mst_goods_sku tmgs on t.sku_id = tmgs.sku_id
         left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = t.wh_id
         left join dkic_b.t_mst_customer tmc on tmc.cus_id = tpo.cus_id
         LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
-        left join sys.t_data_kind as tdk3 on tpo.out_status = tdk3.kind_code
+        left join sys.t_data_kind as tdk3 on t.out_status = tdk3.kind_code
         LEFT JOIN dkic_b.t_mst_unit AS tmgu ON tmgs.unit_id = tmgu.unit_id
         LEFT JOIN dkic_b.t_mst_unit AS tmgus ON tmgs.sub_unit_id = tmgus.unit_id
         <include refid="ConditionSaleItem"/>
@@ -1627,10 +1633,10 @@
                 AND tpo.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
             </if>
             <if test="skuName != null and skuName != ''">
-                AND tmgs.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
+                AND t.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
             </if>
             <if test="skuModel != null and skuModel != ''">
-                AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
+                AND t.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
             </if>
             <if test="brandName != null and brandName != ''">
                 AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
@@ -3066,6 +3072,9 @@
     </select>
 
     <!--region 销售利润-->
+    <!--
+    2024-06-24 11:25 成本和销售额都从出库明细中取
+    -->
 
     <select id="getSaleProfit" resultType="java.util.Map">
         select
@@ -3075,16 +3084,15 @@
         from (
         select
         <include refid="getSaleProfitInOutBound"/>
-        from dkic_b.t_psi_in_out_record tpr
+        from dkic_b.t_psi_outbound_item tpoi
         <if test="orgIds!=null and orgIds.size()>0">
-            left join dkic_b.t_psi_inbound tpi on tpi.into_id = biznis_id
-            left join dkic_b.t_psi_outbound tpo on tpo.out_id = biznis_id
+            left join dkic_b.t_psi_outbound tpo on tpo.out_id = tpoi.out_id
         </if>
         <include refid="getSaleProfitCond"/>
+        <include refid="getSaleProfitDateCond"/>
         <if test="orgIds!=null and orgIds.size()>0">
             and (
-            (tpo.org_id = any(#{orgIds, typeHandler=UuidListTypeHanlder}) and tpi.org_id is null)
-            or (tpi.org_id = any(#{orgIds, typeHandler=UuidListTypeHanlder}) and tpo.org_id is null)
+            tpo.org_id = any(#{orgIds, typeHandler=com.dk.common.infrastructure.handler.UuidListTypeHandler})
             )
         </if>
         ) t
@@ -3096,28 +3104,28 @@
         <include refid="getSaleProfitRate"/>
         from (select
         <if test="byDate==null or (byDate!=null and byDate=='false')">
-            to_char(acc_date, 'yyyy-mm') acc_date,
+            to_char(tpoi.op_create_time, 'yyyy-mm') acc_date,
         </if>
         <if test="byDate!=null and byDate=='true'">
-            to_char(acc_date, 'mm-dd') acc_date,
+            to_char(tpoi.op_create_time, 'mm-dd') acc_date,
         </if>
         <include refid="getSaleProfitInOutBound"/>
-        from dkic_b.t_psi_in_out_record tpr
-        where tpr.cp_id = #{cpId}
-        AND tpr.op_create_time >= now() - interval
+        from dkic_b.t_psi_outbound_item tpoi
+        <include refid="getSaleProfitCond"/>
+        AND tpoi.op_create_time >= now() - interval
         <if test="byDate==null or (byDate!=null and byDate=='false')">
             '1 year'
         </if>
         <if test="byDate!=null and byDate=='true'">
             '1 month'
         </if>
-        AND tpr.op_create_time &lt; now()
+        AND tpoi.op_create_time &lt; now()
         group by
         <if test="byDate==null or (byDate!=null and byDate=='false')">
-            to_char(acc_date, 'yyyy-mm')
+            to_char(tpoi.op_create_time, 'yyyy-mm')
         </if>
         <if test="byDate!=null and byDate=='true'">
-            to_char(acc_date, 'mm-dd')
+            to_char(tpoi.op_create_time, 'mm-dd')
         </if>
         ) t
         order by t.acc_date
@@ -3129,13 +3137,13 @@
         select t.org_id,
         t.outbound - t.inbound "profit",
         <include refid="getSaleProfitRate"/>
-        from (select coalesce(tpi.org_id, tpo.org_id) org_id,
+        from (select tpo.org_id org_id,
         <include refid="getSaleProfitInOutBound"/>
-        from dkic_b.t_psi_in_out_record tpr
-        left join dkic_b.t_psi_inbound tpi on tpi.into_id = biznis_id
-        left join dkic_b.t_psi_outbound tpo on tpo.out_id = biznis_id
+        from dkic_b.t_psi_outbound_item tpoi
+        left join dkic_b.t_psi_outbound tpo on tpo.out_id = tpoi.out_id
         <include refid="getSaleProfitCond"/>
-        group by coalesce(tpi.org_id, tpo.org_id)) t
+        <include refid="getSaleProfitDateCond"/>
+        group by tpo.org_id) t
         ) tt
         left join dkic_b.t_mst_org tmo on tmo.org_id = tt.org_id
         <include refid="getSaleProfitLimit"/>
@@ -3147,34 +3155,34 @@
         select t.staff_id,
         t.outbound - t.inbound "profit",
         <include refid="getSaleProfitRate"/>
-        from (select coalesce(tpi.staff_id, tpo.staff_id) staff_id,
+        from (select tpo.staff_id staff_id,
         <include refid="getSaleProfitInOutBound"/>
-        from dkic_b.t_psi_in_out_record tpr
-        left join dkic_b.t_psi_inbound tpi on tpi.into_id = biznis_id
-        left join dkic_b.t_psi_outbound tpo on tpo.out_id = biznis_id
+        from dkic_b.t_psi_outbound_item tpoi
+        left join dkic_b.t_psi_outbound tpo on tpo.out_id = tpoi.out_id
         <include refid="getSaleProfitCond"/>
+        <include refid="getSaleProfitDateCond"/>
         <if test="orgIds!=null and orgIds.size()>0">
             and (
-            (tpo.org_id = any(#{orgIds, typeHandler=UuidListTypeHanlder}) and tpi.org_id is null)
-            or (tpi.org_id = any(#{orgIds, typeHandler=UuidListTypeHanlder}) and tpo.org_id is null)
+            tpo.org_id = any(#{orgIds, typeHandler=com.dk.common.infrastructure.handler.UuidListTypeHandler})
             )
         </if>
-        group by coalesce(tpi.staff_id, tpo.staff_id)) t
+        group by tpo.staff_id) t
         ) tt
         left join dkic_b.t_mst_staff tms on tms.staff_id = tt.staff_id
         <include refid="getSaleProfitLimit"/>
     </select>
 
     <select id="getSaleProfitGroupBySku" resultType="java.util.Map">
-        select tmgs.sku_name "skuName", tt.profit, tt."profitRate"
+        select tmgs.sku_model || coalesce('(' || tmgs.sku_name || ')', '') "skuName", tt.profit, tt."profitRate"
         from (
         select t.sku_id,
         t.outbound - t.inbound "profit",
         <include refid="getSaleProfitRate"/>
         from (select sku_id sku_id,
         <include refid="getSaleProfitInOutBound"/>
-        from dkic_b.t_psi_in_out_record tpr
+        from dkic_b.t_psi_outbound_item tpoi
         <include refid="getSaleProfitCond"/>
+        <include refid="getSaleProfitDateCond"/>
         group by sku_id) t
         ) tt
         left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tt.sku_id
@@ -3182,15 +3190,18 @@
     </select>
 
     <sql id="getSaleProfitInOutBound">
-        SUM(case biznis_type when 't_psi_outbound' then abs(tpr.into_amt) else 0 end) outbound,
-        SUM(case biznis_type when 't_psi_inbound' then abs(tpr.into_amt) else 0 end) inbound
+        sum(tpoi.fact_amt - tpoi.return_amt) outbound,
+        sum(tpoi.cost_amt) inbound
     </sql>
 
     <sql id="getSaleProfitCond">
-        where tpr.cp_id = #{cpId}
+        where tpoi.cp_id = #{cpId} and tpoi.out_status = '出库状态-已出库' and tpoi.sku_id is not null
+    </sql>
+
+    <sql id="getSaleProfitDateCond">
         <if test="makeTimeStart != null and makeTimeEnd != null">
-            AND tpr.op_create_time &gt;= #{makeTimeStart}::timestamp with time zone
-            AND tpr.op_create_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            AND tpoi.op_create_time &gt;= #{makeTimeStart}::timestamp with time zone
+            AND tpoi.op_create_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
         </if>
     </sql>
 

+ 1 - 1
src/main/java/com/dk/mdm/mapper/sale/OrderMapper.xml

@@ -278,7 +278,7 @@
         t.delivery_date,
         sys.f_remove_zero(t.sum_quantity) as sum_quantity,
         t.sum_standard,
-        t.sum_amount, t.sale_discount,
+        t.sum_amount, t.sale_discount,T.fact_amt,
         t.order_status, t.out_status,
         sys.f_remove_zero(t.outing_qty) as  outing_qty, t.outing_amt, sys.f_remove_zero(t.out_qty) as  out_qty,
         t.out_amt, sys.f_remove_zero(t.return_qty) as  return_qty, t.return_amt,

+ 3 - 0
src/main/java/com/dk/mdm/model/query/mac/RecPayQuery.java

@@ -293,6 +293,9 @@ public class RecPayQuery extends PageInfo<RecPayQuery> implements Serializable {
 
     private List<String> rpTypeList;
 
+    @ApiModelProperty(value = "已核销查询标识")
+    private Boolean sumAmtReceivableHandleFlag;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 3 - 0
src/main/java/com/dk/mdm/model/response/mac/RecPayResponse.java

@@ -312,6 +312,9 @@ public class RecPayResponse extends PageInfo<RecPayResponse> implements Serializ
     @ApiModelProperty(value = "资金账户编码")
     private String macCode;
 
+    @ApiModelProperty(value = "账户名称")
+    private String macNames;
+
     private static final long serialVersionUID = 1L;
 
 }

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

@@ -1270,8 +1270,8 @@ public class InboundPurchaseService extends BaseService<Inbound> {
     public String setIntoStatus(BigDecimal intoingQty, BigDecimal intoQty, BigDecimal sumQty) {
         //入库状态
         String intoStatus = null;
-        //入库中+已入库 小于 总数
-        if (intoingQty.add(intoQty).compareTo(sumQty) < 0) {
+        //入库中+已入库 小于 总数 并且  入库中数量 等于订单总数量
+        if (intoingQty.compareTo(sumQty) <= 0 && intoingQty.add(intoQty).compareTo(sumQty) <= 0) {
             //入库中
             intoStatus = Constant.IntoStatus.RUKUZHONG.getName();
         }
@@ -1280,8 +1280,8 @@ public class InboundPurchaseService extends BaseService<Inbound> {
             //待入库
             intoStatus = Constant.IntoStatus.DAIRUKU.getName();
         }
-        //入库中+已入库 等于 总数
-        else if (intoingQty.add(intoQty).compareTo(sumQty) == 0) {
+        //入库中+已入库 等于 总数 并且 入库中数量 小于等于订单总数量
+        else if (intoingQty.compareTo(sumQty) < 0 && intoingQty.add(intoQty).compareTo(sumQty) == 0) {
             //已入库
             intoStatus = Constant.IntoStatus.YIRUKU.getName();
         }

+ 26 - 1
src/main/java/com/dk/mdm/service/ivt/inventory/InventoryService.java

@@ -18,9 +18,12 @@ import com.dk.mdm.infrastructure.convert.ivt.InOutRecordConvert;
 import com.dk.mdm.infrastructure.convert.ivt.InventoryConvert;
 import com.dk.mdm.mapper.common.CommonMapper;
 import com.dk.mdm.mapper.ivt.*;
+import com.dk.mdm.mapper.mst.GoodsSkuMapper;
 import com.dk.mdm.model.pojo.ivt.*;
 import com.dk.mdm.model.query.ivt.*;
+import com.dk.mdm.model.query.mst.GoodsSkuQuery;
 import com.dk.mdm.model.response.ivt.*;
+import com.dk.mdm.model.response.mst.GoodsSkuResponse;
 import com.dk.mdm.model.vo.ivt.InOutRecordVO;
 import com.dk.mdm.model.vo.ivt.InventoryBatchVO;
 import com.dk.mdm.model.vo.ivt.InventoryVO;
@@ -84,6 +87,10 @@ public class InventoryService extends BaseService<Inventory> {
     @Autowired
     private CommonMapper commonMapper;
 
+
+    @Autowired
+    private GoodsSkuMapper goodsSkuMapper;
+
     /**
      * @desc   : 重写主键
      * @author : 宋扬
@@ -1115,11 +1122,29 @@ public class InventoryService extends BaseService<Inventory> {
                     //存货批次明细ID
                     inOutRecordVO.setBatchId(inventoryBatchResponse.getBatchId());
                     this.insertOutboundItemCost(inOutRecordVO);
+                    //region  反写本次办理出库的 出库成本金额和成本单价
+                    OutboundItem outboundItem = new OutboundItem();
+                    outboundItem.setItemId(inOutRecordVO.getBiznisItemId());
+                    outboundItem.setCostAmt(inOutRecordVO.getIntoAmt());
+                    outboundItem.setCostPrice(inOutRecordVO.getIntoAmt().divide(inOutRecordVO.getIntoQty(),2,BigDecimal.ROUND_HALF_UP));
+                    outboundItemMapper.update(outboundItem,
+                            new UpdateWrapper<OutboundItem>().lambda()
+                                    .eq(OutboundItem::getItemId, UUID.fromString(outboundItem.getItemId()))
+                    );
+                    //endregion
                 }
                 //endregion
             }
         } else {
-            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.CAN_OUTBOUND_QUANTITY_INSUFFICIENT.getMessage());
+            if(inOutRecordVO.getSkuId()!=null){
+                List<GoodsSkuResponse> goodsSkuResponses = goodsSkuMapper.selectByCond(new GoodsSkuQuery().setSkuId(inOutRecordVO.getSkuId()));
+                if(goodsSkuResponses!=null && goodsSkuResponses.size()>0){
+                    //提示具体型号不足
+                    throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(),goodsSkuResponses.get(0).getSkuModel()+ ErrorCodeEnum.CAN_OUTBOUND_QUANTITY_INSUFFICIENT.getMessage());
+                }
+            }else{
+                throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.CAN_OUTBOUND_QUANTITY_INSUFFICIENT.getMessage());
+            }
         }
         //endregion
         return inOutRecordVO;

+ 13 - 25
src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleOrderService.java

@@ -17,38 +17,30 @@ import com.dk.mdm.infrastructure.convert.ivt.OutboundConvert;
 import com.dk.mdm.infrastructure.convert.ivt.OutboundItemConvert;
 import com.dk.mdm.mapper.common.CommonMapper;
 import com.dk.mdm.mapper.ivt.*;
-import com.dk.mdm.mapper.mst.CustomerMapper;
-import com.dk.mdm.mapper.sale.MultiOwnerMapper;
 import com.dk.mdm.mapper.sale.OrderItemMapper;
 import com.dk.mdm.mapper.sale.OrderMapper;
 import com.dk.mdm.model.pojo.ivt.Inbound;
 import com.dk.mdm.model.pojo.ivt.InboundItem;
 import com.dk.mdm.model.pojo.ivt.Outbound;
 import com.dk.mdm.model.pojo.ivt.OutboundItem;
-import com.dk.mdm.model.pojo.mst.Customer;
-import com.dk.mdm.model.pojo.pur.Purchase;
-import com.dk.mdm.model.pojo.pur.PurchaseItem;
-import com.dk.mdm.model.pojo.sale.MultiOwner;
 import com.dk.mdm.model.pojo.sale.Order;
 import com.dk.mdm.model.pojo.sale.OrderItem;
 import com.dk.mdm.model.query.ivt.InventoryQuery;
 import com.dk.mdm.model.query.ivt.OutboundItemQuery;
 import com.dk.mdm.model.query.ivt.OutboundQuery;
-import com.dk.mdm.model.query.sale.OrderQuery;
 import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.response.ivt.InventoryResponse;
 import com.dk.mdm.model.response.ivt.OutboundItemResponse;
 import com.dk.mdm.model.response.ivt.OutboundResponse;
-import com.dk.mdm.model.response.pur.PurchaseItemResponse;
-import com.dk.mdm.model.response.pur.PurchaseResponse;
 import com.dk.mdm.model.response.sale.OrderItemResponse;
 import com.dk.mdm.model.response.sale.OrderResponse;
-import com.dk.mdm.model.vo.ivt.*;
-import com.dk.mdm.model.vo.mac.RecPayVO;
+import com.dk.mdm.model.vo.ivt.InboundItemVO;
+import com.dk.mdm.model.vo.ivt.InboundVO;
+import com.dk.mdm.model.vo.ivt.OutboundItemVO;
+import com.dk.mdm.model.vo.ivt.OutboundVO;
 import com.dk.mdm.service.common.CommonService;
 import com.dk.mdm.service.ivt.inventory.InventoryService;
 import com.dk.mdm.service.mac.AccountService;
-import com.dk.mdm.service.mac.ReceiptService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -122,9 +114,6 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
     private InboundItemConvert inboundItemConvert;
 
     @Autowired
-    private ReceiptService receiptService;
-
-    @Autowired
     private InventoryMapper inventoryMapper;
 
 
@@ -1068,7 +1057,6 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
                                 orderResponse.getOutQty(), orderResponse.getSumQuantity());
                         order.setOutStatus(outStatus);
                     }
-                    //出库状态
                     //修改
                     int countRow = orderMapper.updateById(order);
                     //数量超出
@@ -1796,21 +1784,21 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
      */
     @Transactional(rollbackFor = {Exception.class})
     public String setOutStatus(BigDecimal intoingQty, BigDecimal intoQty, BigDecimal sumQty) {
-        //库状态
+        //库状态
         String outStatus = null;
-        //入库中+已入库 小于 总数
-        if (intoingQty.add(intoQty).compareTo(sumQty) < 0) {
-            //库中
+        //出库中+已出库 小于 总数   或者 出库中数量小于等于订单总数量
+        if (intoingQty.compareTo(sumQty) <= 0 && intoingQty.add(intoQty).compareTo(sumQty) <= 0   ) {
+            //库中
             outStatus = Constant.OutStatus.CHUKUZHONG.getName();
         }
-        //已入库数量=0 入库中数量=0
+        //已出库数量=0 出库中数量=0
         else if (intoQty.compareTo(BigDecimal.ZERO) == 0 && intoingQty.compareTo(BigDecimal.ZERO) == 0) {
-            //待
+            //待
             outStatus = Constant.OutStatus.DAICHUKU.getName();
         }
-        //入库中+已入库 等于 总数
-        else if (intoingQty.add(intoQty).compareTo(sumQty) == 0) {
-            //已
+        //出库中+已出库 等于 总数  并且 出库中数量小于等于订单总数量
+        else if (intoingQty.compareTo(sumQty) < 0 && intoingQty.add(intoQty).compareTo(sumQty) == 0) {
+            //已
             outStatus = Constant.OutStatus.YICHUKU.getName();
         }
         return outStatus;

+ 1 - 1
src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleReturnService.java

@@ -303,7 +303,7 @@ public class OutboundSaleReturnService extends BaseService<Outbound> {
         //退款的时候 判断资金账户金额是否充足
         BigDecimal result = accountResponse.getReceipt().add(outboundVO.getSumAmtRec());//getSumAmtRec 退款是负值 所以相加
         if (result.compareTo(BigDecimal.ZERO) < 0) {
-            return ResponseResultUtil.error(ResponseCodeEnum.NOT_LESS_THAN_ZERO);
+            return ResponseResultUtil.error(ResponseCodeEnum.NOT_LESS_RECEIPT_ZERO);
         }
         //新建退货出库
         saleReturnOutboundInsert(outboundVO);

+ 4 - 3
src/main/java/com/dk/mdm/service/mac/PaymentService.java

@@ -314,9 +314,10 @@ public class PaymentService extends BaseService<RecPay> {
         if (!recPayForUpdate.getFlgValid()) {
             throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISFLGVALID_FALSE.getMessage());
         }
-        if(recPayForUpdate.getBiznisId() != null){
-            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
-        }
+        // 240624 问完付斌后
+//        if(recPayForUpdate.getBiznisId() != null){
+//            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
+//        }
         // 如果所在月份已结账,则不能作废 todo
 
         // 查出并锁定所有应付核销明细

+ 7 - 6
src/main/java/com/dk/mdm/service/mac/ReceiptService.java

@@ -368,9 +368,9 @@ public class ReceiptService extends BaseService<RecPay> {
         if (!recPayForUpdate.getFlgValid()) {
             throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISFLGVALID_FALSE.getMessage());
         }
-        if(recPayForUpdate.getBiznisId() != null){
-            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
-        }
+//        if(recPayForUpdate.getBiznisId() != null){
+//            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
+//        }
 
         // 将之前的明细全部删除
         List<RecPayItem> recPayItemOriginalList = recPayItemMapper.selectByZIdForUpdate(recPayVO.getRpId());
@@ -609,9 +609,10 @@ public class ReceiptService extends BaseService<RecPay> {
         if (!recPayForUpdate.getFlgValid()) {
             throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISFLGVALID_FALSE.getMessage());
         }
-        if(recPayForUpdate.getBiznisId() != null){
-            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
-        }
+        // 240624 问完付斌后
+//        if(recPayForUpdate.getBiznisId() != null){
+//            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
+//        }
         // 如果所在月份已结账,则不能作废 todo
 
         // 查出并锁定所有应收核销明细

+ 21 - 1
src/main/java/com/dk/mdm/service/mst/StaffService.java

@@ -165,6 +165,7 @@ public class StaffService extends BaseService<Staff> {
         StaffQuery staffQuery = new StaffQuery();
         staffQuery.setStaffPhone(staff.getStaffPhone());
         staffQuery.setCpId(cpId);
+        staffQuery.setFlgValid(true);
         staff.setCpId(cpId);
         List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
         if (staffResponses != null && staffResponses.size() > 0) {
@@ -282,6 +283,7 @@ public class StaffService extends BaseService<Staff> {
         StaffQuery staffQuery = new StaffQuery();
         staffQuery.setCpId(staff.getCpId());
         staffQuery.setStaffPhone(staff.getStaffPhone());
+        staffQuery.setFlgValid(true);
         List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
         if (staffResponses != null && staffResponses.size() > 0) {
             return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_PHONE_EXIST);
@@ -535,7 +537,9 @@ public class StaffService extends BaseService<Staff> {
                     gc.setOpCreateUserId(staffId);
                     listG.add(gc);
                 };
-                goodsCategoryMapper.insertBatch(listG);
+                if(listG != null && listG.size() > 0){
+                    goodsCategoryMapper.insertBatch(listG);
+                }
             }
             //执行函数
             goodsCategoryMapper.resetLevelGoodsCategory(new GoodsCategoryQuery());
@@ -575,6 +579,7 @@ public class StaffService extends BaseService<Staff> {
         StaffQuery staffQuery = new StaffQuery();
         staffQuery.setCpId(staff.getCpId());
         staffQuery.setStaffPhone(staff.getStaffPhone());
+        staffQuery.setFlgValid(true);
         List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
         if (staffResponses != null && staffResponses.size() > 0) {
             return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_PHONE_EXIST);
@@ -616,6 +621,7 @@ public class StaffService extends BaseService<Staff> {
         StaffQuery staffQuery = new StaffQuery();
         staffQuery.setStaffPhone(staff.getStaffPhone());
         staffQuery.setCpId(cpId);
+        staffQuery.setFlgValid(true);
         List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
         if (staffResponses != null && staffResponses.size() > 0 && !staffVO.getStaffId().equals(staffResponses.get(0).getStaffId())) {
             return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_PHONE_EXIST);
@@ -929,4 +935,18 @@ public class StaffService extends BaseService<Staff> {
             return ResponseResultUtil.error(-200,"绑定员工不存在");
         }
     }
+
+    /**
+     * @desc   : 更新负责人标识
+     * @author : 刘尧
+     * @date   : 2024/6/21 16:24
+     */
+    public ResponseResultVO updateFlgInit(Map<String, Object> params) {
+        boolean updateBool = staffMapper.updateFlgInit(params);
+        if (updateBool){
+            updateBool = staffMapper.updateFlgInitById(String.valueOf(params.get("owner")));
+            return ResponseResultUtil.success(updateBool);
+        }
+        return ResponseResultUtil.error();
+    }
 }

+ 6 - 4
src/main/java/com/dk/mdm/service/sale/OrderService.java

@@ -452,7 +452,7 @@ public class OrderService extends BaseService<Order> {
             for (OrderItemVO orderItemVO : orderVO.getItemList()) {
                 orderItemVO.setOutingQty(orderItemVO.getItemQty());
                 orderItemVO.setOutingAmt(orderItemVO.getItemAmt());
-                orderItemVO.setPriceOut(orderItemVO.getPriceSale());
+                orderItemVO.setPriceOut(orderItemVO.getFactPrice());
                 orderItemVO.setFromId(orderVO.getOrderId());
                 orderItemVO.setFromItemId(orderItemVO.getItemId());
             }
@@ -490,9 +490,11 @@ public class OrderService extends BaseService<Order> {
             throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISFLGVALID_FALSE.getMessage());
         }
         // 如果全部出库了
-        if (orderForUpdate.getSumQuantity().compareTo(orderForUpdate.getOutQty()) == 0) {
-            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ORDER_IS_OUT.getMessage());
-        }
+        //标:之前沟通允许大编辑,目前订单开单已出库的单子进行编辑是不允许操作的(请确定一下,到底系统设计是否允许大编辑?)
+        //bug 6933可查
+//        if (orderForUpdate.getSumQuantity().compareTo(orderForUpdate.getOutQty()) == 0) {
+//            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ORDER_IS_OUT.getMessage());
+//        }
 
         // 明细实体(避免并发,需要再查一遍)
         OrderItem orderItemForUpdate;