瀏覽代碼

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

koushanshan 2 年之前
父節點
當前提交
2bd2fc1ec5
共有 41 個文件被更改,包括 1439 次插入64 次删除
  1. 19 1
      src/main/java/com/dk/mdm/controller/common/CommonController.java
  2. 12 4
      src/main/java/com/dk/mdm/controller/ivt/TransferController.java
  3. 11 0
      src/main/java/com/dk/mdm/controller/ivt/outBound/OutboundSaleOrderController.java
  4. 95 0
      src/main/java/com/dk/mdm/controller/mst/PrintLayoutController.java
  5. 8 0
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.java
  6. 89 8
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml
  7. 1 1
      src/main/java/com/dk/mdm/mapper/ivt/InventoryMapper.xml
  8. 7 0
      src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.java
  9. 36 2
      src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.xml
  10. 14 0
      src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.java
  11. 18 0
      src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.xml
  12. 11 2
      src/main/java/com/dk/mdm/mapper/mac/OtherPayableMapper.xml
  13. 10 1
      src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.xml
  14. 2 9
      src/main/java/com/dk/mdm/mapper/mst/GoodsSkuMapper.xml
  15. 14 0
      src/main/java/com/dk/mdm/mapper/mst/PrintLayoutMapper.java
  16. 142 0
      src/main/java/com/dk/mdm/mapper/mst/PrintLayoutMapper.xml
  17. 2 0
      src/main/java/com/dk/mdm/mapper/mst/SupplierMapper.java
  18. 429 2
      src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml
  19. 2 0
      src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.xml
  20. 10 0
      src/main/java/com/dk/mdm/mapper/sale/OrderMapper.xml
  21. 8 0
      src/main/java/com/dk/mdm/model/pojo/mac/OtherPayable.java
  22. 8 0
      src/main/java/com/dk/mdm/model/pojo/mac/OtherReceivable.java
  23. 190 0
      src/main/java/com/dk/mdm/model/pojo/mst/PrintLayout.java
  24. 1 0
      src/main/java/com/dk/mdm/model/pojo/mst/Supplier.java
  25. 8 0
      src/main/java/com/dk/mdm/model/query/mac/OtherPayableQuery.java
  26. 8 0
      src/main/java/com/dk/mdm/model/query/mac/OtherReceivableQuery.java
  27. 13 0
      src/main/java/com/dk/mdm/model/query/sale/OrderQuery.java
  28. 8 0
      src/main/java/com/dk/mdm/model/response/mac/OtherPayableResponse.java
  29. 8 0
      src/main/java/com/dk/mdm/model/response/mac/OtherReceivableResponse.java
  30. 6 1
      src/main/java/com/dk/mdm/model/response/mst/SpplierResponse.java
  31. 5 1
      src/main/java/com/dk/mdm/model/response/sale/OrderItemResponse.java
  32. 8 0
      src/main/java/com/dk/mdm/model/vo/mac/OtherPayableVO.java
  33. 8 0
      src/main/java/com/dk/mdm/model/vo/mac/OtherReceivableVO.java
  34. 15 0
      src/main/java/com/dk/mdm/model/vo/mst/SupplierVo.java
  35. 18 0
      src/main/java/com/dk/mdm/service/common/CommonService.java
  36. 36 6
      src/main/java/com/dk/mdm/service/ivt/TransferService.java
  37. 26 8
      src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleOrderService.java
  38. 45 1
      src/main/java/com/dk/mdm/service/mac/AccountService.java
  39. 11 11
      src/main/java/com/dk/mdm/service/mac/OtherPayableService.java
  40. 28 0
      src/main/java/com/dk/mdm/service/mst/PrintLayoutService.java
  41. 49 6
      src/main/java/com/dk/mdm/service/mst/SupplierService.java

+ 19 - 1
src/main/java/com/dk/mdm/controller/common/CommonController.java

@@ -447,7 +447,16 @@ public class CommonController extends BaseController<Map<String, Object>> {
     public ResponseResultVO<List<Map<String, Object>>> getGoodsCategoryNoPage(@RequestBody Map<String, Object> param) {
         return commonService.getGoodsCategoryNoPage(param);
     }
-
+    /**
+     * @desc :  商品种类查询
+     * @author : 王英杰
+     * @date : 2024/2/26 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"get_goods_category_tree"})
+    public ResponseResultVO<List<Map<String, Object>>> getGoodsCategoryTree(@RequestBody Map<String, Object> param) {
+        return commonService.getGoodsCategoryTree(param);
+    }
 
     /**
      * @desc :  计量单位查询
@@ -715,6 +724,15 @@ public class CommonController extends BaseController<Map<String, Object>> {
         return commonService.getInventoryByList(param);
     }
 
+    @ApiOperation(
+            value = "查询标签打印项目",
+            notes = "查询标签打印项目"
+    )
+    @PostMapping("get_label_print_item")
+    public ResponseResultVO<List<Map<String, Object>>> getLabelPrintItem(@RequestBody Map<String, Object> param) {
+        return commonService.getLabelPrintItem(param);
+    }
+
     /**
      * @desc   : 获取组织仓库
      * @author : 付斌

+ 12 - 4
src/main/java/com/dk/mdm/controller/ivt/TransferController.java

@@ -9,11 +9,8 @@ import com.dk.mdm.model.response.ivt.TransferResponse;
 import com.dk.mdm.model.vo.ivt.CheckVO;
 import com.dk.mdm.model.vo.ivt.TransferVO;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RestController;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.ivt.TransferService;
 
@@ -50,4 +47,15 @@ public class TransferController{
     public ResponseResultVO<?> insert(@RequestBody TransferVO transferVO) {
         return transferService.insert(transferVO);
     }
+
+    /**
+     * @desc   : 作废
+     * @author : 宋扬
+     * @date   : 2024/4/15 16:27
+     */
+    @ApiOperation(value = "作废", notes = "作废")
+    @PostMapping({"invalid/{id}"})
+    public ResponseResultVO<?> invalid(@PathVariable String id) {
+        return transferService.invalid(id);
+    }
 }

+ 11 - 0
src/main/java/com/dk/mdm/controller/ivt/outBound/OutboundSaleOrderController.java

@@ -135,6 +135,17 @@ public class OutboundSaleOrderController {
     }
 
     /**
+     * @desc : 获取销售出库信息(编辑用,适用于直接新建的出库单)
+     * @author : 付斌
+     * @date : 2024-03-03 9:28
+     */
+    @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
+    @PostMapping({"get_outbound_together_for_update/{id}"})
+    public ResponseResultVO<?> getOutboundTogetherForUpdate(@PathVariable String id) {
+        return outboundSaleOrderService.getOutboundTogetherForUpdate(id);
+    }
+
+    /**
      * @desc : 获取销售出库信息(新建退货用)
      * @author : 付斌
      * @date : 2024-03-03 9:28

+ 95 - 0
src/main/java/com/dk/mdm/controller/mst/PrintLayoutController.java

@@ -0,0 +1,95 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.common.infrastructure.constant.Constant;
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.mst.PrintLayout;
+import com.dk.common.service.BaseService;
+import com.dk.mdm.service.common.CommonService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.PrintLayoutService;
+
+@Api(tags = "打印模版API接口")
+@RestController
+@RequestMapping("/mst/printLayout")
+public class PrintLayoutController{
+
+    public BaseService<PrintLayout> getService() {
+        return printLayoutService;
+    }
+
+    @Autowired
+    private PrintLayoutService printLayoutService;
+
+    @Autowired
+    private CommonService commonService;
+
+
+    /**
+     * @desc   : 条件查询
+     * @author : 张潇木
+     * @date   : 2024/4/9 9:02
+     */
+    @ApiOperation( value = "分页、关联、条件查询", notes = "分页、关联、条件查询" )
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<PrintLayout>> selectByCond(@RequestBody PrintLayout printLayout) {
+        return printLayoutService.selectByCond(printLayout);
+    }
+
+    /**
+     * @desc : 新建
+     * @author : 张潇木
+     * @date   : 2024/4/9 9:02
+     */
+    @ApiOperation( value = "新建", notes = "新建" )
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody PrintLayout printLayout) {
+        printLayout.setDisplayNo(commonService.getMaxDisplayNo(Constant.DisplayNoTable.PRINT_LAYOUT));
+        return this.getService().insert(printLayout);
+    }
+
+    /**
+     * @desc : 编辑
+     * @author : 张潇木
+     * @date   : 2024/4/9 9:02
+     */
+    @ApiOperation( value = "编辑", notes = "编辑" )
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody PrintLayout printLayout) {
+        return this.getService().updateByUuid(printLayout);
+    }
+
+    /**
+     * @desc   : 明细查询
+     * @author : 张潇木
+     * @date   : 2024/4/9 9:02
+     */
+    @PostMapping({"/{id}"})
+    public ResponseResultVO<?> selectById(@PathVariable String id) {
+        return this.getService().selectById(id);
+    }
+
+
+    /**
+     * @desc    : 停用
+     * @author : 张潇木
+     * @date   : 2024/4/9 9:02
+     */
+    @PostMapping("disable/{id}")
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
+        return this.getService().disable(id);
+    }
+
+    /**
+     * @desc    : 启用
+     * @author : 张潇木
+     * @date   : 2024/4/9 9:02
+     */
+    @PostMapping("enable/{id}")
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
+        return this.getService().enable(id);
+    }
+}

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

@@ -285,6 +285,12 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
      * @date : 2024/3/1 9:21
      */
     List<Map<String, Object>> getGoodsBrand(Map param);
+    /**
+     * @desc : 获取商品品牌 树形查询
+     * @author : 王英杰
+     * @date : 2024/3/1 9:21
+     */
+    List<Map<String, Object>> getGoodsCategoryTree(Map param);
 
     /**
      * @desc : 获取商品品牌数量
@@ -508,6 +514,8 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
     List<Map<String, Object>> getPurviewType(Map param);
     List<Map<String, Object>> getInventoryByList(Map param);
 
+    List<Map<String,Object>> getLabelPrintItem(Map param);
+
     /**
      * @desc   : 获取组织仓库
      * @author : 付斌

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

@@ -116,15 +116,17 @@
     <!--获取单据-->
     <select id="getDoc" resultType="java.util.Map">
         SELECT
-        tsd.doc_code AS "docCode",
-        sys.f_get_name_i18n_lang ( tsd.doc_name_i18n, #{i18n}) AS "docName"
+        tsd.doc_name AS "docName"
         FROM
-        sys.t_s_doc tsd
-        WHERE
-        tsd.flg_valid
-        <if test="flgApproval!=null">
-            and tsd.flg_approval = #{flgApproval}
-        </if>
+        sys.t_doc tsd
+        <where>
+            <if test="flgApproval!=null">
+                and tsd.flg_approval = #{flgApproval}
+            </if>
+            <if test="flgPrint!=null">
+                and tsd.flg_print = #{flgPrint}
+            </if>
+        </where>
     </select>
 
     <!-- 获取数据种类 -->
@@ -713,6 +715,67 @@
         </if>
     </select>
 
+    <!--    查询商品种类-->
+    <select id="getGoodsCategoryTree" resultType="java.util.Map">
+        SELECT
+        T.cat_id AS "catId",
+        T.cat_code AS "catCode",
+        T.cat_name AS "catName",
+        T.parent_id AS "parentId",
+        T.flg_valid AS "flgValid"
+        FROM
+        (--当前数据
+        SELECT
+        tmgc.cat_id,
+        tmgc.cat_code,
+        tmgc.cat_name,
+        tmgc.parent_id,
+        tmgc.flg_valid
+        FROM
+        dkic_b.t_mst_goods_category tmgc
+        <where>
+            <if test="searchText !=null">
+                AND ( tmgc.cat_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
+                or tmgc.remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
+            </if>
+            <if test="cpId != null">
+                AND tmgc.cp_id = #{cpId}
+            </if>
+        </where>
+        UNION ALL--父级
+        SELECT
+        tmgcp.cat_id,
+        tmgcp.cat_code,
+        tmgcp.cat_name,
+        tmgcp.parent_id,
+        tmgcp.flg_valid
+        FROM
+        dkic_b.t_mst_goods_category tmgc
+        LEFT JOIN dkic_b.t_mst_goods_category tmgcp ON tmgc.cat_id = ANY ( tmgcp.level_lower )
+        <where>
+            <if test="searchText !=null">
+                AND ( tmgc.cat_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
+                or tmgc.remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
+            </if>
+            <if test="cpId != null">
+                AND tmgc.cp_id = #{cpId}
+            </if>
+        </where>
+        ) T
+        WHERE T.cat_id IS NOT NULL
+        GROUP BY
+        T.cat_id,
+        T.cat_code,
+        T.cat_name,
+        T.parent_id,
+        T.flg_valid
+
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+
+    </select>
+
     <!-- 查询表t_mst_goods_brand,(条件查询)个数 -->
     <select id="countGoodsBrand" resultType="Long">
         SELECT
@@ -1643,6 +1706,24 @@
             </if>
         </foreach>
     </select>
+    <!--  查询标签打印项目  -->
+    <select id="getLabelPrintItem" resultType="java.util.Map">
+        select
+        item_code as "itemCode",
+        sys.f_get_name_i18n(item_name_i18n,#{i18n}) as "itemName",
+        doc_name as "docName",
+        item_type as "itemType",
+        item_style as "itemStyle",
+        item_sample as "itemSample",
+        data_key as "dataKey",
+        remarks as "remarks"
+        from sys.t_label_print_item
+        where flg_valid
+        <if test="docName">
+            and doc_name = #{docName}
+        </if>
+        order by display_no
+    </select>
 
     <!--获取组织仓库-->
     <select id="getOrgWh" resultType="java.util.Map">

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

@@ -66,7 +66,7 @@
     <sql id="Condition">
         <where>
             <if test="whId != null and whId != ''">
-                AND tpi.wh_id = #{whId}
+                AND tpi.wh_id = #{whId}::UUID
             </if>
             <if test="skuId != null and skuId != ''">
                 AND tpi.sku_id = #{skuId}

+ 7 - 0
src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.java

@@ -46,6 +46,13 @@ public interface OutboundItemMapper extends BaseMapper<OutboundItem>{
     List<OutboundItemResponse> selectByCondForOutEdit(String id);
 
     /**
+     * @desc   : 根据条件进行查询(编辑用,适用于直接新建的出库单)
+     * @author : 付斌
+     * @date   : 2024-03-12 9:36
+     */
+    List<OutboundItemResponse> selectByCondForOutEditTogether(String id);
+
+    /**
      * @desc   : 获取出库信息(新建退货用)
      * @author : 付斌
      * @date   : 2024-03-28 14:43

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

@@ -356,10 +356,42 @@
         order by t.item_index
     </select>
 
+    <!-- 根据条件进行查询(编辑用,适用于直接新建的出库单) -->
+    <select id="selectByCondForOutEditTogether" resultMap="BaseResultMapResponse">
+        SELECT t.item_id,
+               t.out_id,
+               t.from_item_id,
+               t.from_id,
+               t.item_index,
+               t.sku_id,
+               tmgs.sku_code            as "skuCode",
+               tmgs.sku_model           as "skuModel",
+               tmgs.sku_name            as "skuName",
+               t.price_out,
+               t.outing_qty + t.out_qty as outing_qty,
+               t.outing_amt + t.out_amt as outing_amt,
+               t.out_qty,
+               t.out_amt,
+               t.non_std_code,
+               t.remarks,
+               t.inv_id,
+               tpi.wh_id                as "whId",
+               tpi.inv_qty              as "invQty",
+               tpi.usable_qty           as "usableQty",
+               tmw.wh_name              as "whName"
+        FROM dkic_b.t_psi_outbound_item as t
+                 left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = t.sku_id
+                 left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = t.inv_id
+                 left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
+        where t.flg_valid
+          and t.out_id = #{id}::uuid
+        order by t.item_index
+    </select>
+
     <!-- 获取出库信息(新建退货用) -->
     <select id="selectByCondForReturn" resultMap="BaseResultMapResponse">
-        SELECT t.out_id                                   as "sOutId",
-               t.item_id                                  as "sOutItemId",
+        SELECT t.out_id                                   as s_out_id,
+               t.item_id                                  as s_out_item_id,
                t.sku_id,
                tmgs.sku_code                              as "skuCode",
                tmgs.sku_model                             as "skuModel",
@@ -369,6 +401,8 @@
                - (t.out_qty - t.return_qty)               as outing_qty,
                t.price_out,
                - t.price_out * (t.out_qty - t.return_qty) as outing_amt,
+               0                                          as out_qty,
+               0                                          as out_amt,
                t.inv_id,
                t.non_std_code,
                t.remarks

+ 14 - 0
src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.java

@@ -42,6 +42,20 @@ public interface AccountItemMapper extends BaseMapper<AccountItem>{
     Map<String, Object> getSumAmtRecPay(String id);
 
     /**
+     * @desc   : 查询订单未出库金额
+     * @author : 付斌
+     * @date   : 2024-03-09 11:36
+     */
+    Map<String, Object> getSumAmtOrder(String id);
+
+    /**
+     * @desc   : 查询采购未入库金额
+     * @author : 付斌
+     * @date   : 2024-03-09 11:36
+     */
+    Map<String, Object> getSumAmtPur(String id);
+
+    /**
      * @desc   : 查询应收收款总额(制单员权限)
      * @author : 周兴
      * @date   : 2024-04-03 11:36

+ 18 - 0
src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.xml

@@ -376,6 +376,24 @@
           and tmai.object_id = #{id}::uuid
     </select>
 
+    <!-- 查询订单未出库金额  -->
+    <select id="getSumAmtOrder" resultType="java.util.Map">
+        SELECT COALESCE(sum(tpo.sum_amount - tpo.out_amt), 0) as "sumAmtOrder"
+        FROM dkic_b.t_psi_order as tpo
+        where tpo.flg_valid
+          and tpo.out_status in('出库状态-出库中','出库状态-待出库')
+          and tpo.cus_id = #{id}::uuid
+    </select>
+
+    <!-- 查询采购未入库金额  -->
+    <select id="getSumAmtPur" resultType="java.util.Map">
+        SELECT COALESCE(sum(tpp.sum_amount - tpp.into_amt), 0) as "sumAmtPur"
+        FROM dkic_b.t_psi_purchase as tpp
+        where tpp.flg_valid
+          and tpp.into_status in('入库状态-待入库','入库状态-入库中')
+          and tpp.sup_id = #{id}::uuid
+    </select>
+
     <delete id="deleteById">
         DELETE
         FROM dkic_b.t_mac_account_item

+ 11 - 2
src/main/java/com/dk/mdm/mapper/mac/OtherPayableMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        payable_id, payable_no, object_type, object_id, org_id, staff_id, sum_amt_payable, acc_item_id, acc_date, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id
+        payable_id, payable_no, object_type, business_type, object_id, org_id, staff_id, sum_amt_payable, acc_item_id, acc_date, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -13,6 +13,7 @@
         <id column="payable_id" property="payableId"/>
             <result column="payable_no" property="payableNo"/>
             <result column="object_type" property="objectType"/>
+            <result column="business_type" property="businessType"/>
             <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
             <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
             <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
@@ -32,6 +33,7 @@
         <id column="payable_id" property="payableId"/>
             <result column="payable_no" property="payableNo"/>
             <result column="object_type" property="objectType"/>
+            <result column="business_type" property="businessType"/>
             <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
             <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
             <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
@@ -56,8 +58,11 @@
             <if test="objectType != null and objectType != ''">
                 AND t.object_type = #{objectType}
             </if>
+            <if test="businessType != null and businessType != ''">
+                AND t.business_type = #{businessType}
+            </if>
             <if test="objectId != null and objectId != ''">
-                AND t.object_id = #{objectId}
+                AND t.object_id = #{objectId}::uuid
             </if>
             <if test="orgId != null and orgId != ''">
                 AND t.org_id = #{orgId}
@@ -122,6 +127,7 @@
         SELECT t.payable_id,
                t.payable_no,
                t.object_type,
+               t.business_type,
                sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "objectTypeName",
                t.object_id,
                supplier.sup_code    as "supCode",
@@ -171,6 +177,7 @@
         SELECT t.payable_id,
                t.payable_no,
                t.object_type,
+               t.business_type,
                sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "objectTypeName",
                t.object_id,
                supplier.sup_code    as "supCode",
@@ -223,6 +230,7 @@
         <trim suffixOverrides=",">
             payable_no,
             object_type,
+            business_type,
             object_id,
             org_id,
             staff_id,
@@ -243,6 +251,7 @@
             <trim suffixOverrides=",">
                 #{item.payableNo},
                 #{item.objectType},
+                #{item.businessType},
                 #{item.objectId}::uuid,
                 #{item.orgId}::uuid,
                 #{item.staffId}::uuid,

+ 10 - 1
src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        receivable_id, receivable_no, object_type, object_id, org_id, staff_id, sum_amt_receivable, acc_item_id, acc_date, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id
+        receivable_id, receivable_no, object_type, business_type, object_id, org_id, staff_id, sum_amt_receivable, acc_item_id, acc_date, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -13,6 +13,7 @@
         <id column="receivable_id" property="receivableId"/>
             <result column="receivable_no" property="receivableNo"/>
             <result column="object_type" property="objectType"/>
+            <result column="business_type" property="businessType"/>
             <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
             <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
             <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
@@ -32,6 +33,7 @@
         <id column="receivable_id" property="receivableId"/>
             <result column="receivable_no" property="receivableNo"/>
             <result column="object_type" property="objectType"/>
+            <result column="business_type" property="businessType"/>
             <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
             <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
             <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
@@ -56,6 +58,9 @@
             <if test="objectType != null and objectType != ''">
                 AND t.object_type = #{objectType}
             </if>
+            <if test="businessType != null and businessType != ''">
+                AND t.business_type = #{businessType}
+            </if>
             <if test="objectId != null and objectId != ''">
                 AND t.object_id = #{objectId}
             </if>
@@ -125,6 +130,7 @@
         SELECT t.receivable_id,
                t.receivable_no,
                t.object_type,
+               t.business_type,
                sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "objectTypeName",
                t.object_id,
                tmc.cus_code         as "cusCode",
@@ -177,6 +183,7 @@
         SELECT t.receivable_id,
                t.receivable_no,
                t.object_type,
+               t.business_type,
                sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "objectTypeName",
                t.object_id,
                tmc.cus_id         as "cusId",
@@ -231,6 +238,7 @@
         <trim suffixOverrides=",">
             receivable_no,
             object_type,
+            business_type,
             object_id,
             org_id,
             staff_id,
@@ -250,6 +258,7 @@
             <trim suffixOverrides=",">
                 #{item.receivableNo},
                 #{item.objectType},
+                #{item.businessType},
                 #{item.objectId}::uuid,
                 #{item.orgId}::uuid,
                 #{item.staffId}::uuid,

+ 2 - 9
src/main/java/com/dk/mdm/mapper/mst/GoodsSkuMapper.xml

@@ -139,7 +139,7 @@
                 )
             </if>
             <if test="searchText !=null">
-                AND ( tmgs.sku_name LIKE concat('%', #{searchText}, '%')
+                AND tmgs.sku_name LIKE concat('%', #{searchText}, '%')
             </if>
         </where>
     </sql>
@@ -163,14 +163,7 @@
         LEFT JOIN dkic_b.t_mst_goods_series tmgsr ON tmgsr.series_id = tmgs.series_id
         LEFT JOIN dkic_b.t_psi_inventory tpi ON tpi.sku_id = tmgs.sku_id
         <include refid="Condition"/>
-        ORDER BY CASE
-        WHEN #{sort}  = 2 THEN tpi.usable_qty
-        ELSE NULL
-        END ASC,
-        CASE
-        WHEN #{sort} != 2 THEN tpi.usable_qty
-        ELSE NULL
-        END DESC
+        order by  tmgs.op_create_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>

+ 14 - 0
src/main/java/com/dk/mdm/mapper/mst/PrintLayoutMapper.java

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.PrintLayout;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  打印模版 Mapper
+*/
+@Repository
+public interface PrintLayoutMapper extends BaseMapper<PrintLayout>{
+	
+}
+

+ 142 - 0
src/main/java/com/dk/mdm/mapper/mst/PrintLayoutMapper.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mst.PrintLayoutMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        layout_id, layout_name, layout_data, doc_name, display_no, flg_valid, remarks, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.PrintLayout">
+        <id column="layout_id" property="layoutId"/>
+                <result column="layout_name" property="layoutName"/>
+                <result column="layout_data" property="layoutData" typeHandler="JsonTypeHandler"/>
+                <result column="doc_name" property="docName"/>
+                <result column="display_no" property="displayNo"/>
+                <result column="flg_valid" property="flgValid"/>
+                <result column="remarks" property="remarks"/>
+                <result column="cp_id" property="cpId"/>
+            <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
+            <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
+                <result column="op_app_code" property="opAppCode"/>
+            <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
+                <result column="op_db_user" property="opDbUser"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="layoutName != null and layoutName != ''">
+                AND layout_name = #{layoutName}
+            </if>
+            <if test="layoutData != null and layoutData != ''">
+                AND layout_data = #{layoutData}
+            </if>
+            <if test="docName != null and docName != ''">
+                AND doc_name = #{docName}
+            </if>
+            <if test="displayNo != null">
+                AND display_no = #{displayNo}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </if>
+            <if test="flgValidList != null and flgValidList.size()>0">
+                AND flg_valid = any(#{flgValidList, typeHandler=BooleanListTypeHandler})
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键layoutId批量操作 -->
+        WHERE layout_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_print_layout,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_print_layout
+        <include refid="Condition"/>
+        order by display_no
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_print_layout,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_mst_print_layout
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_print_layout的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_print_layout
+        WHERE layout_id = #{layoutId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_print_layout的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_print_layout
+        WHERE layout_id = #{layoutId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_print_layout的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_print_layout
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_mst_print_layout
+        (
+        <trim suffixOverrides=",">
+            layout_name,
+            layout_data,
+            doc_name,
+            display_no,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.layoutName},
+                #{item.layoutData},
+                #{item.docName},
+                #{item.displayNo},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 2 - 0
src/main/java/com/dk/mdm/mapper/mst/SupplierMapper.java

@@ -35,6 +35,8 @@ public interface SupplierMapper extends BaseMapper<Supplier>{
         * @date   : 2024/2/29 17:49
         */
     int insertSupplierBrand(Supplier supplierVo);
+
+
     /**
      * @desc   : 保存供应商品牌
      * @author : 王英杰

+ 429 - 2
src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml

@@ -219,6 +219,10 @@
             <if test="skuModel != null and skuModel != ''">
                 AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
             </if>
+            <if test="whList != null  and whList.size()>0">
+                AND toi.wh_id =
+                any(#{whList,typeHandler=UuidListTypeHandler})
+            </if>
         </where>
     </sql>
 
@@ -269,6 +273,226 @@
         </where>
     </sql>
 
+    <!-- 出库明细报表明细条件列 -->
+    <sql id="Condition_OutboundDetailReport">
+        <where>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+            <if test="outNo != null and outNo != ''">
+                AND t.out_no LIKE concat('%',my_ex.likequery(#{outNo}),'%')
+            </if>
+            <if test="supIdlist != null and supIdlist.size()>0">
+                AND t.sup_id = any(#{supIdlist,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND t.contact_phone LIKE concat('%',my_ex.likequery(#{contactPhone}),'%')
+            </if>
+            <if test="outTypeList != null and outTypeList.size()>0">
+                AND t.out_type =any(#{outTypeList,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="fromNo != null and fromNo != ''">
+                AND t.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
+            </if>
+            <if test="orgIdList != null and orgIdList.size() > 0">
+                AND t.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="staffIdList != null and staffIdList.size() > 0">
+                AND t.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="outStatusList != null and outStatusList.size() > 0">
+                AND t.out_status  =any(#{outStatusList, typeHandler=StringListTypeHandler})
+            </if>
+            <if test="outDateStart != null and outDateEnd != null">
+                AND t.out_date &gt;= #{outDateStart}::timestamp with time zone
+                AND t.out_date &lt; #{outDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="goodsSeriesList != null  and goodsSeriesList.size()>0">
+                AND tmgs.series_id =
+                any(#{goodsSeriesList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="goodsCategoryList != null  and goodsCategoryList.size()>0">
+                AND tmgs.category_id =
+                any(#{goodsCategoryList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="goodsBrandList != null  and goodsBrandList.size()>0">
+                AND tmgs.brand_id =
+                any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="skuName != null and skuName != ''">
+                AND tmgs.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}) , '%')
+            </if>
+            <if test="whList != null  and whList.size()>0">
+                AND tpi.wh_id =
+                any(#{whList,typeHandler=UuidListTypeHandler})
+            </if>
+        </where>
+    </sql>
+
+    <!-- 出库明细报表主表条件列 -->
+    <sql id="Condition_OutboundReport">
+        <where>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+            <if test="outNo != null and outNo != ''">
+                AND t.out_no LIKE concat('%',my_ex.likequery(#{outNo}),'%')
+            </if>
+            <if test="supIdlist != null and supIdlist.size()>0">
+                AND t.sup_id = any(#{supIdlist,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND t.contact_phone LIKE concat('%',my_ex.likequery(#{contactPhone}),'%')
+            </if>
+            <if test="outTypeList != null and outTypeList.size()>0">
+                AND t.out_type =any(#{outTypeList,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="fromNo != null and fromNo != ''">
+                AND t.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
+            </if>
+            <if test="orgIdList != null and orgIdList.size() > 0">
+                AND t.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="staffIdList != null and staffIdList.size() > 0">
+                AND t.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="outStatusList != null and outStatusList.size() > 0">
+                AND t.out_status  =any(#{outStatusList, typeHandler=StringListTypeHandler})
+            </if>
+            <if test="outDateStart != null and outDateEnd != null">
+                AND t.out_date &gt;= #{outDateStart}::timestamp with time zone
+                AND t.out_date &lt; #{outDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+        </where>
+    </sql>
+
+    <!-- 入库明细报表明细条件列 -->
+    <sql id="Condition_IntoboundDetailReport">
+        <where>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+            <if test="outNo != null and outNo != ''">
+                AND t.out_no LIKE concat('%',my_ex.likequery(#{outNo}),'%')
+            </if>
+            <if test="supIdlist != null and supIdlist.size()>0">
+                AND t.sup_id = any(#{supIdlist,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND t.contact_phone LIKE concat('%',my_ex.likequery(#{contactPhone}),'%')
+            </if>
+            <if test="outTypeList != null and outTypeList.size()>0">
+                AND t.out_type =any(#{outTypeList,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="fromNo != null and fromNo != ''">
+                AND t.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
+            </if>
+            <if test="orgIdList != null and orgIdList.size() > 0">
+                AND t.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="staffIdList != null and staffIdList.size() > 0">
+                AND t.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="outStatusList != null and outStatusList.size() > 0">
+                AND t.out_status  =any(#{outStatusList, typeHandler=StringListTypeHandler})
+            </if>
+            <if test="outDateStart != null and outDateEnd != null">
+                AND t.out_date &gt;= #{outDateStart}::timestamp with time zone
+                AND t.out_date &lt; #{outDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="goodsSeriesList != null  and goodsSeriesList.size()>0">
+                AND tmgs.series_id =
+                any(#{goodsSeriesList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="goodsCategoryList != null  and goodsCategoryList.size()>0">
+                AND tmgs.category_id =
+                any(#{goodsCategoryList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="goodsBrandList != null  and goodsBrandList.size()>0">
+                AND tmgs.brand_id =
+                any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="skuName != null and skuName != ''">
+                AND tmgs.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}) , '%')
+            </if>
+            <if test="whList != null  and whList.size()>0">
+                AND tpi.wh_id =
+                any(#{whList,typeHandler=UuidListTypeHandler})
+            </if>
+        </where>
+    </sql>
+
+    <!-- 入库明细报表主表条件列 -->
+    <sql id="Condition_IntoboundReport">
+        <where>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+            <if test="outNo != null and outNo != ''">
+                AND t.out_no LIKE concat('%',my_ex.likequery(#{outNo}),'%')
+            </if>
+            <if test="supIdlist != null and supIdlist.size()>0">
+                AND t.sup_id = any(#{supIdlist,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND t.contact_phone LIKE concat('%',my_ex.likequery(#{contactPhone}),'%')
+            </if>
+            <if test="outTypeList != null and outTypeList.size()>0">
+                AND t.out_type =any(#{outTypeList,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="fromNo != null and fromNo != ''">
+                AND t.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
+            </if>
+            <if test="orgIdList != null and orgIdList.size() > 0">
+                AND t.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="staffIdList != null and staffIdList.size() > 0">
+                AND t.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="outStatusList != null and outStatusList.size() > 0">
+                AND t.out_status  =any(#{outStatusList, typeHandler=StringListTypeHandler})
+            </if>
+            <if test="outDateStart != null and outDateEnd != null">
+                AND t.out_date &gt;= #{outDateStart}::timestamp with time zone
+                AND t.out_date &lt; #{outDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+        </where>
+    </sql>
+
     <!-- 采购明细报表主表 -->
     <select id="getPurReport" resultType="java.util.Map">
         select
@@ -285,8 +509,8 @@
         ,tpp.intoing_amt as "intoingAmtSum"
         ,tpp.into_qty as "intoQtySum"
         ,tpp.into_amt as "intoAmtSum"
-        ,tpp.return_qty as "returnQtySum"
-        ,tpp.return_amt as "returnAmtSum"
+        ,tpp.return_qty as "returnInQtySum"
+        ,tpp.return_amt as "returnInAmtSum"
         ,tpp.amt_payable as "amtPayable"
         ,tpp.amt_residue as "amtResidue"
         ,tpp.remarks
@@ -477,5 +701,208 @@
         </if>
     </select>
 
+    <!-- 出库明细报表主表 -->
+    <select id="getOutboundReport" resultType="java.util.Map">
+        SELECT
+        t.out_no                                           as "outNo",
+        t.from_no                                            as "fromNo",
+        tmo.org_name                                        as "orgName",
+        tms.staff_name                                      as "staffName",
+        tmc.cus_name                                        as "cusName",
+        tmc.cus_phone                                        as "cusPhone",
+        tmc.cus_from                                        as "cusFrom",
+        tmc.contact_phone                                   as "contactPhone",
+        tmc.address_full                                     as "addressFull",
+        tmdd.data_value                                      as cus_from_name,
+        tmp.sup_name                                         as "supplierName",
+        sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n})   as "outStatusName",
+        sys.f_get_name_i18n(tdktype.kind_name_i18n, #{i18n}) as  "outTypeName",
+        t.outing_qty                                        as "outingQtySum",
+        t.outing_amt                                        as "outingAmtSum",
+        t.out_qty                                          as "outQtySum",
+        t.out_amt                                           as "outAmtSum",
+        t.return_qty                                        as "returnOutQtySum",
+        t.return_amt                                        as "returnOutAmtSum",
+        t.out_date                                         as "outDate",
+        t.remarks,
+        makestaff.staff_name                                as "makeStaffName"
+        FROM dkic_b.t_psi_outbound as t
+        left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+        Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
+        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_mst_customer tmc on tmc.cus_id = t.cus_id
+        left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
+        left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.out_status
+        LEFT JOIN sys.t_data_kind tdktype   ON tdktype.kind_code = t.out_type
+        <include refid="Condition_OutboundReport"/>
+        order by  t.op_create_time desc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 出库明细报表明细 -->
+    <select id="getOutboundDetailReport" resultType="java.util.Map">
+        select
+        t.out_no                                           as "outNo"
+        ,t.from_no                                            as "fromNo"
+        ,tmo.org_name                                        as "orgName"
+        ,tms.staff_name                                      as "staffName"
+        ,tmc.cus_name                                        as "cusName"
+        ,tmc.cus_phone                                        as "cusPhone"
+        ,tmc.cus_from                                        as "cusFrom"
+        ,tmc.contact_phone                                   as "contactPhone"
+        ,tmc.address_full                                     as "addressFull"
+        ,tmdd.data_value                                      as cus_from_name
+        ,tmp.sup_name                                         as "supplierName"
+        ,sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n})   as "outStatusName"
+        ,sys.f_get_name_i18n(tdktype.kind_name_i18n, #{i18n}) as  "outTypeName"
+        ,t.outing_qty                                        as "outingQtySum"
+        ,t.outing_amt                                        as "outingAmtSum"
+        ,t.out_qty                                          as "outQtySum"
+        ,t.out_amt                                           as "outAmtSum"
+        ,t.return_qty                                        as "returnOutQtySum"
+        ,t.return_amt                                        as "returnOutAmtSum"
+        ,t.out_date                                         as "outDate"
+        ,t.remarks
+        ,makestaff.staff_name                                as "makeStaffName"
+        ,tmgs.sku_name                                      as "skuName"
+        ,tmgs.sku_model                                 as "skuModel"
+        ,tpi.non_std_code                               as "nonStdCode"
+        ,tmgb.short_name                                as "shortName"
+        ,tmgc.cat_name                                as "catName"
+        ,series.series_name                                as "whName"
+        ,tmw.wh_name                                    as "seriesName"
+        ,tpoi.outing_qty                                as "outingQty"
+        ,tpoi.outing_amt                                as "outingAmt"
+        ,tpoi.out_qty                                as "outQty"
+        ,tpoi.out_amt                                as "outAmt"
+        ,tpoi.return_qty                                as "returnQty"
+        ,tpoi.return_amt                                as "returnAmt"
+        FROM dkic_b.t_psi_outbound as t
+        left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+        Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
+        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_mst_customer tmc on tmc.cus_id = t.cus_id
+        left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
+        left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.out_status
+        left join sys.t_data_kind tdktype   ON tdktype.kind_code = t.out_type
+        left join dkic_b.t_psi_outbound_item as tpoi on tpoi.out_id = t.out_id
+        left join dkic_b.t_mst_goods_sku as tmgs on tmgs.sku_id = tpoi.sku_id
+        left join dkic_b.t_mst_goods_brand as tmgb on tmgb.brand_id = tmgs.brand_id
+        left join dkic_b.t_mst_goods_category as tmgc on tmgc.cat_id = tmgs.category_id
+        left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
+        left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
+        left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
+        <include refid="Condition_OutboundDetailReport"/>
+        order by  tpoi.op_create_time desc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 入库明细报表主表 -->
+    <select id="getInboundlReport" resultType="java.util.Map">
+        SELECT
+        t.into_no                                           as "intoNo",
+        t.from_no                                            as "fromNo",
+        tmo.org_name                                        as "orgName",
+        tms.staff_name                                      as "staffName",
+        tmc.cus_name                                        as "cusName",
+        tmc.cus_phone                                        as "cusPhone",
+        tmc.cus_from                                        as "cusFrom",
+        tmc.contact_phone                                   as "contactPhone",
+        tmc.address_full                                     as "addressFull",
+        tmdd.data_value                                      as cus_from_name,
+        tmp.sup_name                                         as "supplierName",
+        sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n})   as "intoStatusName",
+        sys.f_get_name_i18n(tdktype.kind_name_i18n, #{i18n}) as  "intoTypeName",
+        t.intoing_qty                                        as "intoingQtySum",
+        t.intoing_amt                                        as "intoingAmtSum",
+        t.into_qty                                          as "intoQtySum",
+        t.into_amt                                           as "intoAmtSum",
+        t.return_qty                                        as "returnintoQtySum",
+        t.return_amt                                        as "returnintoAmtSum",
+        t.into_date                                         as "intoDate",
+        tmw.wh_name                                        as "whName",
+        t.remarks,
+        makestaff.staff_name                                as "makeStaffName"
+        FROM dkic_b.t_psi_inbound as t
+        left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+        Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
+        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_mst_customer tmc on tmc.cus_id = t.cus_id
+        left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
+        left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.into_status
+        left join sys.t_data_kind tdktype   ON tdktype.kind_code = t.into_type
+        left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = t.wh_id
+        <include refid="Condition_IntoboundReport"/>
+        order by  t.op_create_time desc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 入库明细报表明细 -->
+    <select id="getInboundDetailReport" resultType="java.util.Map">
+        select
+        t.into_no                                           as "intoNo"
+        ,t.from_no                                            as "fromNo"
+        ,tmo.org_name                                        as "orgName"
+        ,tms.staff_name                                      as "staffName"
+        ,tmc.cus_name                                        as "cusName"
+        ,tmc.cus_phone                                        as "cusPhone"
+        ,tmc.cus_from                                        as "cusFrom"
+        ,tmc.contact_phone                                   as "contactPhone"
+        ,tmc.address_full                                     as "addressFull"
+        ,tmdd.data_value                                      as cus_from_name
+        ,tmp.sup_name                                         as "supplierName"
+        ,sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n})   as "intoStatusName"
+        ,sys.f_get_name_i18n(tdktype.kind_name_i18n, #{i18n}) as  "intoTypeName"
+        ,t.intoing_qty                                        as "intoingQtySum"
+        ,t.intoing_amt                                        as "intoingAmtSum"
+        ,t.into_qty                                          as "intoQtySum"
+        ,t.into_amt                                           as "intoAmtSum"
+        ,t.return_qty                                        as "returnInQtySum"
+        ,t.return_amt                                        as "returnInAmtSum"
+        ,t.into_date                                         as "intoDate"
+        ,t.remarks
+        ,makestaff.staff_name                               as "makeStaffName"
+        ,tmgs.sku_name                                      as "skuName"
+        ,tmgs.sku_model                                     as "skuModel"
+        ,tpi.non_std_code                                   as "nonStdCode"
+        ,tmgb.short_name                                    as "shortName"
+        ,tmgc.cat_name                                      as "catName"
+        ,series.series_name                                 as "seriesName"
+        ,tpoi.intoing_qty                                    as "intoingQty"
+        ,tpoi.intoing_amt                                    as "intoingAmt"
+        ,tpoi.into_qty                                       as "intoQty"
+        ,tpoi.into_amt                                       as "intoAmt"
+        ,tpoi.return_qty                                    as "returnQty"
+        ,tpoi.return_amt                                    as "returnAmt"
+        FROM dkic_b.t_psi_inbound as t
+        left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+        Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
+        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_mst_customer tmc on tmc.cus_id = t.cus_id
+        left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
+        left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.into_status
+        LEFT JOIN sys.t_data_kind tdktype   ON tdktype.kind_code = t.into_type
+        left join dkic_b.t_psi_inbound_item as tpoi on tpoi.into_id = t.into_id
+        left join dkic_b.t_mst_goods_sku as tmgs on tmgs.sku_id = tpoi.sku_id
+        left join dkic_b.t_mst_goods_brand as tmgb on tmgb.brand_id = tmgs.brand_id
+        left join dkic_b.t_mst_goods_category as tmgc on tmgc.cat_id = tmgs.category_id
+        left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
+        left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
+        <include refid="Condition_IntoboundDetailReport"/>
+        order by  tpoi.op_create_time desc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
 
 </mapper>

+ 2 - 0
src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.xml

@@ -331,6 +331,8 @@
                t.price_sale                                         as "priceOut",
                - t.price_sale * (tpobi.out_qty - tpobi.return_qty)  as outing_amt,
                tpobi.inv_id                                         as "invId",
+               0                                                    as out_qty,
+               0                                                    as out_amt,
                t.non_std_code,
                tpobi.remarks
         FROM dkic_b.t_psi_outbound_item as tpobi

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

@@ -412,6 +412,16 @@
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND t.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </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="createtimeStart != null and createtimeEnd != null">
+                AND t.op_create_time &gt;= #{createtimeStart}::timestamp with time zone
+                AND t.op_create_time &lt; #{createtimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
             <if test="searchText !=null">
                 AND (  t.order_no LIKE concat('%', my_ex.likequery(#{searchText}), '%')
                 OR   t.contact_phone LIKE concat('%', my_ex.likequery(#{searchText}), '%')

+ 8 - 0
src/main/java/com/dk/mdm/model/pojo/mac/OtherPayable.java

@@ -66,6 +66,14 @@ public class OtherPayable extends PageInfo<OtherPayable> implements Serializable
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 8 - 0
src/main/java/com/dk/mdm/model/pojo/mac/OtherReceivable.java

@@ -65,6 +65,14 @@ public class OtherReceivable extends PageInfo<OtherReceivable> implements Serial
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 190 - 0
src/main/java/com/dk/mdm/model/pojo/mst/PrintLayout.java

@@ -0,0 +1,190 @@
+package com.dk.mdm.model.pojo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  打印模版
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("打印模版")
+@TableName(value = "t_mst_print_layout", autoResultMap = true)
+@ApiModel(value="实体类:打印模版", description="表名:t_mst_print_layout")
+public class PrintLayout extends PageInfo<PrintLayout> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 模版ID
+     */
+    @TableId(value = "layout_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "模版ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String layoutId;
+
+
+    /**
+     * 模板名称
+     */
+    @Excel(name = "模板名称")
+    @ApiModelProperty(value = "模板名称")
+    private String layoutName;
+
+
+    /**
+     * 模板数据
+     */
+    @Excel(name = "模板数据")
+    @ApiModelProperty(value = "模板数据")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject layoutData;
+
+
+    /**
+     * 业务单据
+     */
+    @Excel(name = "业务单据")
+    @ApiModelProperty(value = "业务单据")
+    private String docName;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 有效标识
+     */
+    @Excel(name = "有效标识")
+    @ApiModelProperty(value = "有效标识")
+    private Boolean flgValid;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+    /**
+     * 有效标识list
+     */
+    @TableField(exist = false)
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private List<Boolean> flgValidList;
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 0
src/main/java/com/dk/mdm/model/pojo/mst/Supplier.java

@@ -17,6 +17,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.alibaba.fastjson.JSONObject;
 
+import java.math.BigDecimal;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;

+ 8 - 0
src/main/java/com/dk/mdm/model/query/mac/OtherPayableQuery.java

@@ -68,6 +68,14 @@ public class OtherPayableQuery extends PageInfo<OtherPayableQuery> implements Se
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 8 - 0
src/main/java/com/dk/mdm/model/query/mac/OtherReceivableQuery.java

@@ -68,6 +68,14 @@ public class OtherReceivableQuery extends PageInfo<OtherReceivableQuery> impleme
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 13 - 0
src/main/java/com/dk/mdm/model/query/sale/OrderQuery.java

@@ -379,6 +379,19 @@ public class OrderQuery extends PageInfo<OrderQuery> implements Serializable {
     @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
     private List<Boolean> flgValidList;
 
+    private List<String> staffIds;
+
+    private List<String> orgIds;
+
+
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate createtimeStart;
+
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate createtimeEnd;
+
     private String searchText;
     private static final long serialVersionUID = 1L;
 

+ 8 - 0
src/main/java/com/dk/mdm/model/response/mac/OtherPayableResponse.java

@@ -67,6 +67,14 @@ public class OtherPayableResponse extends PageInfo<OtherPayableResponse> impleme
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 8 - 0
src/main/java/com/dk/mdm/model/response/mac/OtherReceivableResponse.java

@@ -74,6 +74,14 @@ public class OtherReceivableResponse extends PageInfo<OtherReceivableResponse> i
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 6 - 1
src/main/java/com/dk/mdm/model/response/mst/SpplierResponse.java

@@ -50,7 +50,12 @@ public class SpplierResponse extends PageInfo<SpplierResponse> implements Serial
     @TableField(typeHandler = UuidTypeHandler.class)
     private String supId;
 
-
+    /**
+     * 合计应付
+     */
+    @Excel(name = "合计应付")
+    @ApiModelProperty(value = "合计应付")
+    private BigDecimal sumAmtPayable;
     /**
      * 供应商编号
      */

+ 5 - 1
src/main/java/com/dk/mdm/model/response/sale/OrderItemResponse.java

@@ -9,7 +9,7 @@ import com.dk.common.infrastructure.annotaiton.ExportTitle;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
@@ -262,15 +262,19 @@ public class OrderItemResponse extends PageInfo<OrderItemResponse> implements Se
     private BigDecimal canReturnQty;
 
     @ApiModelProperty(value = "源出库单ID")
+    @JsonProperty("sOutId")
     private String sOutId;
 
     @ApiModelProperty(value = "源出库单明细ID")
+    @JsonProperty("sOutItemId")
     private String sOutItemId;
 
     @ApiModelProperty(value = "源销售订单ID")
+    @JsonProperty("sOrderId")
     private String sOrderId;
 
     @ApiModelProperty(value = "源销售明细ID")
+    @JsonProperty("sOrderItemId")
     private String sOrderItemId;
 
     /**

+ 8 - 0
src/main/java/com/dk/mdm/model/vo/mac/OtherPayableVO.java

@@ -68,6 +68,14 @@ public class OtherPayableVO extends PageInfo<OtherPayableVO> implements Serializ
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 8 - 0
src/main/java/com/dk/mdm/model/vo/mac/OtherReceivableVO.java

@@ -68,6 +68,14 @@ public class OtherReceivableVO extends PageInfo<OtherReceivableVO> implements Se
 
 
     /**
+     * 是否为业务单据 (0:期初 1:业务)
+     */
+    @Excel(name = "是否为业务单据 (0:期初 1:业务)")
+    @ApiModelProperty(value = "是否为业务单据 (0:期初 1:业务)")
+    private Integer businessType;
+
+
+    /**
      * 账务对象ID (账务对象)
      */
     @Excel(name = "账务对象ID (账务对象)")

+ 15 - 0
src/main/java/com/dk/mdm/model/vo/mst/SupplierVo.java

@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.alibaba.fastjson.JSONObject;
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.time.LocalDateTime;
 
@@ -46,6 +47,13 @@ public class SupplierVo extends PageInfo<SupplierVo> implements Serializable {
     @ApiModelProperty(value = "供应商ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String supId;
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
 
 
     /**
@@ -145,6 +153,13 @@ public class SupplierVo extends PageInfo<SupplierVo> implements Serializable {
     @ApiModelProperty(value = "商品品牌")
     private String brandId;
 
+    /**
+     * 初始金额
+     */
+    @Excel(name = "初始金额")
+    @ApiModelProperty(value = "初始金额")
+    private BigDecimal startAmount;
+
     @TableField(exist = false)
     @ApiModelProperty(value = "剩余应收付")
     private String sumResidue;

+ 18 - 0
src/main/java/com/dk/mdm/service/common/CommonService.java

@@ -673,7 +673,16 @@ public class CommonService extends BaseService<Map<String, Object>> {
     public ResponseResultVO<List<Map<String, Object>>> getGoodsCategoryNoPage(Map<String, Object> param) {
         List<Map<String, Object>> list = commonMapper.getGoodsCategory(param);
         return ResponseResultUtil.success(list);
+    }    /**
+     * @desc :  商品种类查询  树形
+     * @author : 王英杰
+     * @date : 2024/2/26 10:36
+     */
+    public ResponseResultVO<List<Map<String, Object>>> getGoodsCategoryTree(Map<String, Object> param) {
+        List<Map<String, Object>> list = commonMapper.getGoodsCategoryTree(param);
+        return ResponseResultUtil.success(list);
     }
+
     /**
      * @desc : 获取页面数据源集合 (小程序用)
      * @author : 于继渤
@@ -713,6 +722,10 @@ public class CommonService extends BaseService<Map<String, Object>> {
         if (dataSourceCode.equals("org")) {
             list = commonMapper.getOrg(map);
         }
+        //品牌
+        if (dataSourceCode.equals("brand")) {
+            list = commonMapper.getGoodsBrand(map);
+        }
         //员工
         if (dataSourceCode.equals("staff")) {
             list = commonMapper.getStaff(map);
@@ -958,4 +971,9 @@ public class CommonService extends BaseService<Map<String, Object>> {
         List<Map<String, Object>> list = commonMapper.getOrgWh(param);
         return ResponseResultUtil.success(list);
     }
+
+    public ResponseResultVO<List<Map<String, Object>>> getLabelPrintItem(Map<String, Object> param) {
+        return ResponseResultUtil.success(commonMapper.getLabelPrintItem(param));
+    }
+
 }

+ 36 - 6
src/main/java/com/dk/mdm/service/ivt/TransferService.java

@@ -1,8 +1,12 @@
 package com.dk.mdm.service.ivt;
 
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.dk.common.exception.BaseBusinessException;
 import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.constant.Constant;
+import com.dk.common.infrastructure.enums.ErrorCodeEnum;
 import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.infrastructure.convert.ivt.TransferConvert;
@@ -16,6 +20,9 @@ import com.dk.mdm.mapper.ivt.TransferMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
 import com.dk.mdm.model.pojo.ivt.TransferItem;
+import com.dk.mdm.model.pojo.mac.RecPay;
+import com.dk.mdm.model.pojo.mac.RecPayItem;
+import com.dk.mdm.model.pojo.sale.Order;
 import com.dk.mdm.model.query.ivt.TransferQuery;
 import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.response.ivt.TransferResponse;
@@ -134,8 +141,8 @@ public class TransferService extends BaseService<Transfer> {
 				BigDecimal transferQtySum = transferVO.getItemList().stream().map(TransferItemVO::getTransferQty).reduce(BigDecimal.ZERO, BigDecimal::add)
 						.setScale(6, BigDecimal.ROUND_HALF_UP);
 				// 计算总入库金额
-				BigDecimal intoingAmtSum = transferVO.getItemList().stream().map(TransferItemVO::getIntoingAmt).reduce(BigDecimal.ZERO, BigDecimal::add)
-						.setScale(6, BigDecimal.ROUND_HALF_UP);
+				/*BigDecimal intoingAmtSum = transferVO.getItemList().stream().map(TransferItemVO::getIntoingAmt).reduce(BigDecimal.ZERO, BigDecimal::add)
+						.setScale(6, BigDecimal.ROUND_HALF_UP);*/
 				// 获取入库表实体
 				InboundVO inboundVO = new InboundVO();
 				List<InboundItem> inboundItemList=new ArrayList<>();
@@ -149,7 +156,7 @@ public class TransferService extends BaseService<Transfer> {
 							.setMakeStaff(transferVO.getMakeStaff()).setIntoingQty(transferQtySum)
 							.setFromId(transfer.getTransferId()).setFromNo(transfer.getTransferNo())
 							.setMakeTime(LocalDateTime.now()).setIntoDate(LocalDate.now()).setWhId(transferVO.getWhId())
-							.setFlgAutoHandle(true).setIntoingAmt(intoingAmtSum)
+							.setFlgAutoHandle(true).setIntoingAmt(BigDecimal.ZERO)
 							.setIntoType(Constant.IntoType.REMOVE.getName());
 					// 赋值出库实体
 					outboundVO.setOrgId(transferVO.getOrgId()).setStaffId(transferVO.getStaffId())
@@ -162,7 +169,7 @@ public class TransferService extends BaseService<Transfer> {
 						// 赋值入库明细实体
 						InboundItem inboundItem=new InboundItem();
 						inboundItem.setIntoingQty(transferItemVO.getTransferQty()).setFromId(transfer.getTransferId())
-								.setIntoingAmt(transferItemVO.getIntoingAmt()).setPriceInto(transferItemVO.getPriceInto())
+								.setIntoingAmt(BigDecimal.ZERO).setPriceInto(BigDecimal.ZERO).setIntoId(transferItemVO.getInvId())
 								.setWhId(transferItemVO.getWhId()).setSkuId(transferItemVO.getSkuId())
 								.setNonStdCode(transferItemVO.getONonStdCode()).setItemIndex(transferItemVO.getItemIndex());
 						inboundItemList.add(inboundItem);
@@ -213,7 +220,7 @@ public class TransferService extends BaseService<Transfer> {
 							.setMakeStaff(transferVO.getMakeStaff()).setIntoingQty(transferQtySum)
 							.setFromId(transfer.getTransferId()).setFromNo(transfer.getTransferNo())
 							.setMakeTime(LocalDateTime.now()).setIntoDate(LocalDate.now()).setWhId(transferVO.getOWhId())
-							.setFlgAutoHandle(true).setIntoingAmt(intoingAmtSum)
+							.setFlgAutoHandle(true).setIntoingAmt(BigDecimal.ZERO)
 							.setIntoStatus(Constant.InventoryDocCode.MOVE.getTableName());
 					// 赋值出库实体
 					outboundVO.setOrgId(transferVO.getOrgId()).setStaffId(transferVO.getStaffId())
@@ -226,7 +233,7 @@ public class TransferService extends BaseService<Transfer> {
 						// 赋值入库明细实体
 						InboundItem inboundItem=new InboundItem();
 						inboundItem.setIntoingQty(transferItemVO.getTransferQty()).setFromId(transfer.getTransferId())
-								.setIntoingAmt(transferItemVO.getIntoingAmt()).setPriceInto(transferItemVO.getPriceInto())
+								.setIntoingAmt(BigDecimal.ZERO).setPriceInto(BigDecimal.ZERO).setIntoId(transferItemVO.getInvId())
 								.setWhId(transferItemVO.getOWhId()).setSkuId(transferItemVO.getSkuId())
 								.setNonStdCode(transferItemVO.getNonStdCode()).setItemIndex(transferItemVO.getItemIndex());
 						inboundItemList.add(inboundItem);
@@ -279,4 +286,27 @@ public class TransferService extends BaseService<Transfer> {
 
 	}
 
+	/**
+	 * @desc   : 作废
+	 * @author : 宋扬
+	 * @date   : 2024/4/15 16:28
+	 */
+	public ResponseResultVO<?> invalid(String id) {
+		Transfer transferForUpdate = transferMapper.selectByIdForUpdate(id);
+		// 并发校验
+		if (!transferForUpdate.getFlgValid()) {
+			throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISFLGVALID_FALSE.getMessage());
+		}
+
+		// 作废
+		Transfer transferUpdate = new Transfer();
+		transferUpdate.setFlgValid(false).setTransferId(id);
+		super.updateByUuid(transferUpdate);
+
+		// 调用入库作废接口
+
+		// 调用出库作废接口
+
+		return ResponseResultUtil.success();
+	}
 }

+ 26 - 8
src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleOrderService.java

@@ -1309,6 +1309,22 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
     }
 
     /**
+     * @desc : 获取销售出库信息(编辑用,适用于直接新建的出库单)
+     * @author : 付斌
+     * @date : 2024-03-02 17:27
+     */
+    public ResponseResultVO<?> getOutboundTogetherForUpdate(String id) {
+        Map<String, Object> dataInfo = new HashMap<>();
+        OutboundResponse outboundResponse = outboundMapper.selectById(id);
+        dataInfo.put("data", outboundResponse);
+
+        // 商品明细
+        List<OutboundItemResponse> outboundItemResponseList = outboundItemMapper.selectByCondForOutEditTogether(id);
+        dataInfo.put("dataItem", outboundItemResponseList);
+        return ResponseResultUtil.success(dataInfo);
+    }
+
+    /**
      * @desc : 获取出库信息(新建退货用)
      * @author : 付斌
      * @date : 2024-03-02 17:27
@@ -1317,14 +1333,16 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
         OutboundResponse outboundResponse = outboundMapper.selectByIdForReturn(id);
         List<OutboundItemResponse> outboundItemList = outboundItemMapper.selectByCondForReturn(new OutboundItemQuery().setOutId(id));
 
-        // 求和
-        OutboundItemResponse sumEntity = outboundItemList.stream().reduce((x, y) -> {
-            OutboundItemResponse item = new OutboundItemResponse();
-            item.setOutingQty(x.getOutingQty().add(y.getOutingQty()));
-            item.setOutingAmt(x.getOutingAmt().add(y.getOutingAmt()));
-            return item;
-        }).get();
-        outboundResponse.setOutingQty(sumEntity.getOutingQty()).setOutingAmt(sumEntity.getOutingAmt());
+        if(outboundItemList != null && outboundItemList.size() > 0){
+            // 求和
+            OutboundItemResponse sumEntity = outboundItemList.stream().reduce((x, y) -> {
+                OutboundItemResponse item = new OutboundItemResponse();
+                item.setOutingQty(x.getOutingQty().add(y.getOutingQty()));
+                item.setOutingAmt(x.getOutingAmt().add(y.getOutingAmt()));
+                return item;
+            }).get();
+            outboundResponse.setOutingQty(sumEntity.getOutingQty()).setOutingAmt(sumEntity.getOutingAmt());
+        }
 
         Map<String, Object> dataInfo = new HashMap<>();
         dataInfo.put("data", outboundResponse);

+ 45 - 1
src/main/java/com/dk/mdm/service/mac/AccountService.java

@@ -232,6 +232,50 @@ public class AccountService extends BaseService<Account> {
     }
 
     /**
+     * @desc : 更新合同资产
+     * @author : 付斌
+     * @date : 2024-03-22 11:08
+     */
+    public void updateContractAssets(String objectId) {
+        if(objectId == null){
+            return;
+        }
+        // 更新账款总表上的总应收账款和总剩余应收
+        Account accountForUpdate = getCusAccountForUpdate(objectId);
+
+        // 查询订单出库金额
+        Map<String, Object> mapSumAmtOrder = accountItemMapper.getSumAmtOrder(objectId);
+        BigDecimal sumAmtOrder = new BigDecimal(mapSumAmtOrder.get("sumAmtOrder").toString());
+
+        // 更新账款总表上的收款总额和可用金额
+        Account accountUpdate = new Account();
+        accountUpdate.setContractAssets(sumAmtOrder).setObjectId(accountForUpdate.getObjectId());
+        super.updateByUuid(accountUpdate);
+    }
+
+    /**
+     * @desc : 更新采购暂估
+     * @author : 付斌
+     * @date : 2024-03-22 11:08
+     */
+    public void updatePurEstimate(String objectId) {
+        if(objectId == null){
+            return;
+        }
+        // 更新账款总表上的总应收账款和总剩余应收
+        Account accountForUpdate = getSupAccountForUpdate(objectId);
+
+        // 查询订单出库金额
+        Map<String, Object> mapSumAmtPur = accountItemMapper.getSumAmtPur(objectId);
+        BigDecimal sumAmtPur = new BigDecimal(mapSumAmtPur.get("sumAmtPur").toString());
+
+        // 更新账款总表上的收款总额和可用金额
+        Account accountUpdate = new Account();
+        accountUpdate.setPurEstimate(sumAmtPur).setObjectId(accountForUpdate.getObjectId());
+        super.updateByUuid(accountUpdate);
+    }
+
+    /**
      * @desc : 应收记账
      * @author : 付斌
      * @date : 2024-03-22 11:08
@@ -513,7 +557,7 @@ public class AccountService extends BaseService<Account> {
 
     /**
      * @desc : 获取应收,收款汇总(制单员权限)
-     * @author : 
+     * @author : 
      * @date : 2024-04-03 16:32
      */
     public ResponseResultVO<?> getReceivableAccountSum(AccountItemQuery accountItemQuery){

+ 11 - 11
src/main/java/com/dk/mdm/service/mac/OtherPayableService.java

@@ -111,17 +111,6 @@ public class OtherPayableService extends BaseService<OtherPayable> {
     private OtherPayableItemConvert otherPayableItemConvert;
 
     /**
-     * @desc : 条件查询
-     * @author : 付斌
-     * @date : 2023/1/9 10:40
-     */
-    @Pagination
-    public ResponseResultVO<PageList<OtherPayableResponse>> selectByCond(OtherPayableQuery otherPayableQuery) {
-        return super.mergeListWithCount(otherPayableQuery, otherPayableMapper.selectByCond(otherPayableQuery),
-                otherPayableMapper.countByCond(otherPayableQuery));
-    }
-
-    /**
      * @desc : 查询明细(货物、付款、附件)
      * @author : 付斌
      * @date : 2024-02-28 13:25
@@ -138,6 +127,17 @@ public class OtherPayableService extends BaseService<OtherPayable> {
     }
 
     /**
+     * @desc : 条件查询
+     * @author : 付斌
+     * @date : 2023/1/9 10:40
+     */
+    @Pagination
+    public ResponseResultVO<PageList<OtherPayableResponse>> selectByCond(OtherPayableQuery otherPayableQuery) {
+        return super.mergeListWithCount(otherPayableQuery, otherPayableMapper.selectByCond(otherPayableQuery),
+                otherPayableMapper.countByCond(otherPayableQuery));
+    }
+
+    /**
      * @desc : 新建方法
      * @author : 付斌
      * @date : 2023/1/9 10:49

+ 28 - 0
src/main/java/com/dk/mdm/service/mst/PrintLayoutService.java

@@ -0,0 +1,28 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.mdm.model.pojo.mst.PrintLayout;
+import com.dk.mdm.mapper.mst.PrintLayoutMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class PrintLayoutService extends BaseService<PrintLayout> {
+
+	@Override
+	public String getPrimaryKey() {
+		return "layout_id";
+	}
+
+	@Override
+	public BaseMapper<PrintLayout> getRepository() {
+		return printLayoutMapper;
+	}
+
+	@Autowired
+	private PrintLayoutMapper printLayoutMapper;
+
+}

+ 49 - 6
src/main/java/com/dk/mdm/service/mst/SupplierService.java

@@ -6,18 +6,30 @@ import com.dk.common.model.pojo.PageList;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.infrastructure.convert.mst.SupplierConvert;
+import com.dk.mdm.mapper.mac.OtherPayableMapper;
 import com.dk.mdm.model.pojo.mst.Supplier;
 import com.dk.mdm.mapper.mst.SupplierMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mac.MacTransferItemQuery;
+import com.dk.mdm.model.query.mac.OtherPayableQuery;
 import com.dk.mdm.model.query.mst.SupplierQuery;
+import com.dk.mdm.model.response.mac.MacTransferItemResponse;
+import com.dk.mdm.model.response.mac.MacTransferResponse;
+import com.dk.mdm.model.response.mac.OtherPayableResponse;
+import com.dk.mdm.model.response.mst.SpplierResponse;
+import com.dk.mdm.model.vo.mac.OtherPayableItemVO;
+import com.dk.mdm.model.vo.mac.OtherPayableVO;
 import com.dk.mdm.model.vo.mst.SupplierVo;
 import com.dk.mdm.service.common.CommonService;
+import com.dk.mdm.service.mac.OtherPayableService;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -46,6 +58,11 @@ public class SupplierService extends BaseService<Supplier> {
     private SupplierConvert supplierConvert;
     @Autowired
     private CommonService commonService;
+
+    @Autowired
+    private OtherPayableService otherPayableService;
+    @Autowired
+    private OtherPayableMapper otherPayableMapper;
     /**
      * @desc : 条件查询
      * @author : 王英杰
@@ -53,7 +70,22 @@ public class SupplierService extends BaseService<Supplier> {
      */
     @Pagination
     public ResponseResultVO<PageList<Supplier>> selectByCond(SupplierQuery supplierQuery) {
-        return super.mergeListWithCount(supplierQuery, supplierMapper.selectByCond(supplierQuery),
+        List<SpplierResponse> list = new ArrayList<>();
+        list = supplierMapper.selectByCond(supplierQuery);
+
+
+
+        for(int i =0;i<list.size();i++){ //显示明细第一条的 内容
+            list.get(i).getSupId();
+            // 转账明细
+            List<OtherPayableResponse> itemList = otherPayableMapper.selectByCond(new OtherPayableQuery().setObjectId(list.get(i).getSupId()).setBusinessType(0));
+            if(itemList.size()>0){
+                list.get(i).setSumAmtPayable(itemList.get(0).getSumAmtPayable());
+            }
+        }
+
+
+        return super.mergeListWithCount(supplierQuery,list ,
                 supplierMapper.countByCond(supplierQuery));
     }
     /**
@@ -74,7 +106,7 @@ public class SupplierService extends BaseService<Supplier> {
         // 转化实体
         Supplier supplier = supplierConvert.convertToPo(supplierVo);
 
-        try {
+
             Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.SUPPLIER.getName(), true);
 
             supplier.setSupId(codeMap.get("outId").toString());
@@ -94,12 +126,23 @@ public class SupplierService extends BaseService<Supplier> {
                  }
                 supplierMapper.insertSupplierBrandtBatch(Supplierlst); // 向供应商品牌表插入数据
             }
+
+             if(supplierVo.getStartAmount()!=null && supplierVo.getStartAmount().compareTo(BigDecimal.ZERO) > 0) { //说明有起始欠款  需要插入其他支出
+                 //先组装明细
+                 List<OtherPayableItemVO> itemList = new ArrayList<>();
+                 OtherPayableItemVO otherPayableItemVO = new OtherPayableItemVO();
+                 otherPayableItemVO.setPayableType("10112024-0415-0000-0000-0000300dd508");
+                 otherPayableItemVO.setAmtPayable(supplierVo.getStartAmount());
+                 itemList.add(otherPayableItemVO);
+                 //调用 新建其他支出
+                 OtherPayableVO otherPayableVO = new OtherPayableVO().setBusinessType(0).setObjectId(supplier.getSupId())
+                         .setSumAmtPayable(supplierVo .getStartAmount()).setStaffId(supplier.getStaffId())
+                         .setOrgId(supplier.getOrgId()).setAccDate(LocalDate.now()).setMakeStaff(supplierVo
+                                 .getMakeStaff()).setItemList(itemList).setSumAmtPay(BigDecimal.ZERO);
+                 otherPayableService.insert(otherPayableVO);
+             }
             return ResponseResultUtil.success();
-        } catch (Exception e) {
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); // 手动回滚事务
 
-            return ResponseResultUtil.error("保存失败");
-        }
 
     }
     /**