Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

姜永辉 vor 2 Jahren
Ursprung
Commit
a18931b476
23 geänderte Dateien mit 1748 neuen und 34 gelöschten Zeilen
  1. 24 0
      src/main/java/com/dk/mdm/controller/mac/OtherPayableController.java
  2. 24 0
      src/main/java/com/dk/mdm/controller/mac/OtherPayableItemController.java
  3. 21 0
      src/main/java/com/dk/mdm/controller/mac/OtherReceivableController.java
  4. 14 0
      src/main/java/com/dk/mdm/mapper/mac/OtherPayableItemMapper.java
  5. 143 0
      src/main/java/com/dk/mdm/mapper/mac/OtherPayableItemMapper.xml
  6. 14 0
      src/main/java/com/dk/mdm/mapper/mac/OtherPayableMapper.java
  7. 193 0
      src/main/java/com/dk/mdm/mapper/mac/OtherPayableMapper.xml
  8. 7 0
      src/main/java/com/dk/mdm/mapper/mac/OtherReceivableItemMapper.java
  9. 15 0
      src/main/java/com/dk/mdm/mapper/mac/OtherReceivableItemMapper.xml
  10. 7 0
      src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.java
  11. 31 5
      src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.xml
  12. 175 0
      src/main/java/com/dk/mdm/model/pojo/mac/OtherPayable.java
  13. 110 0
      src/main/java/com/dk/mdm/model/pojo/mac/OtherPayableItem.java
  14. 105 0
      src/main/java/com/dk/mdm/model/query/mac/OtherPayableItemQuery.java
  15. 177 0
      src/main/java/com/dk/mdm/model/query/mac/OtherPayableQuery.java
  16. 105 0
      src/main/java/com/dk/mdm/model/response/mac/OtherPayableItemResponse.java
  17. 177 0
      src/main/java/com/dk/mdm/model/response/mac/OtherPayableResponse.java
  18. 105 0
      src/main/java/com/dk/mdm/model/vo/mac/OtherPayableItemVO.java
  19. 177 0
      src/main/java/com/dk/mdm/model/vo/mac/OtherPayableVO.java
  20. 28 0
      src/main/java/com/dk/mdm/service/mac/OtherPayableItemService.java
  21. 28 0
      src/main/java/com/dk/mdm/service/mac/OtherPayableService.java
  22. 67 28
      src/main/java/com/dk/mdm/service/mac/OtherReceivableService.java
  23. 1 1
      src/main/java/com/dk/mdm/service/mac/RecPayService.java

+ 24 - 0
src/main/java/com/dk/mdm/controller/mac/OtherPayableController.java

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mac;
+
+import com.dk.mdm.model.pojo.mac.OtherPayable;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mac.OtherPayableService;
+
+@Api(tags = "其他支出单API接口")
+@RestController
+@RequestMapping("/otherPayable")
+public class OtherPayableController{
+
+    public BaseService<OtherPayable> getService() {
+        return otherPayableService;
+    }
+
+    @Autowired
+    private OtherPayableService otherPayableService;
+
+}

+ 24 - 0
src/main/java/com/dk/mdm/controller/mac/OtherPayableItemController.java

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mac;
+
+import com.dk.mdm.model.pojo.mac.OtherPayableItem;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mac.OtherPayableItemService;
+
+@Api(tags = "其他支出明细API接口")
+@RestController
+@RequestMapping("/otherPayableItem")
+public class OtherPayableItemController{
+
+    public BaseService<OtherPayableItem> getService() {
+        return otherPayableItemService;
+    }
+
+    @Autowired
+    private OtherPayableItemService otherPayableItemService;
+
+}

+ 21 - 0
src/main/java/com/dk/mdm/controller/mac/OtherReceivableController.java

@@ -70,4 +70,25 @@ public class OtherReceivableController{
         return otherReceivableService.update(otherReceivableVO);
     }
 
+    /**
+     * @desc :查询其它收入明细(明细附件)
+     * @author : 付斌
+     * @date : 2024-02-28 13:24
+     */
+    @PostMapping({"get_other_receivable_for_update/{id}"})
+    public ResponseResultVO<?> getOtherReceivableForUpdate(@PathVariable String id) {
+        return otherReceivableService.getOtherReceivableForUpdate(id);
+    }
+
+    /**
+     * @desc : 作废
+     * @author : 付斌
+     * @date : 2024-03-08 16:36
+     */
+    @ApiOperation(value = "作废", notes = "作废")
+    @PostMapping({"invalid/{id}"})
+    public ResponseResultVO<?> invalid(@PathVariable String id) {
+        return otherReceivableService.invalid(id);
+    }
+
 }

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

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mac;
+
+import com.dk.mdm.model.pojo.mac.OtherPayableItem;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  其他支出明细 Mapper
+*/
+@Repository
+public interface OtherPayableItemMapper extends BaseMapper<OtherPayableItem>{
+	
+}
+

+ 143 - 0
src/main/java/com/dk/mdm/mapper/mac/OtherPayableItemMapper.xml

@@ -0,0 +1,143 @@
+<?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.mac.OtherPayableItemMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        item_id, payable_id, payable_type, qty_outlay, amt_outlay, remarks, flg_valid, cp_id
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mac.OtherPayableItem">
+        <id column="item_id" property="itemId"/>
+            <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
+            <result column="payable_type" property="payableType" typeHandler="UuidTypeHandler"/>
+            <result column="qty_outlay" property="qtyOutlay"/>
+            <result column="amt_outlay" property="amtOutlay"/>
+            <result column="remarks" property="remarks"/>
+            <result column="flg_valid" property="flgValid"/>
+            <result column="cp_id" property="cpId"/>
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mac.OtherPayableItemResponse">
+        <id column="item_id" property="itemId"/>
+            <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
+            <result column="payable_type" property="payableType" typeHandler="UuidTypeHandler"/>
+            <result column="qty_outlay" property="qtyOutlay"/>
+            <result column="amt_outlay" property="amtOutlay"/>
+            <result column="remarks" property="remarks"/>
+            <result column="flg_valid" property="flgValid"/>
+            <result column="cp_id" property="cpId"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="payableId != null and payableId != ''">
+                AND t.payable_id = #{payableId}
+            </if>
+            <if test="payableType != null and payableType != ''">
+                AND t.payable_type = #{payableType}
+            </if>
+            <if test="qtyOutlay != null">
+                AND t.qty_outlay = #{qtyOutlay}
+            </if>
+            <if test="amtOutlay != null">
+                AND t.amt_outlay = #{amtOutlay}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND t.remarks = #{remarks}
+            </if>
+            <if test="flgValid != null">
+                AND t.flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键itemId批量操作 -->
+        WHERE item_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mac_other_payable_item,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable_item as t
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mac_other_payable_item,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM dkic_b.t_mac_other_payable_item as t
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mac_other_payable_item的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMapResponse">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable_item
+        WHERE item_id = #{itemId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mac_other_payable_item的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable_item
+        WHERE item_id = #{id}::uuid
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mac_other_payable_item的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable_item
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into dkic_b.t_mac_other_payable_item
+        (
+        <trim suffixOverrides=",">
+            payable_id,
+            payable_type,
+            qty_outlay,
+            amt_outlay,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.payableId}::uuid,
+                #{item.payableType}::uuid,
+                #{item.qtyOutlay},
+                #{item.amtOutlay},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

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

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mac;
+
+import com.dk.mdm.model.pojo.mac.OtherPayable;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  其他支出单 Mapper
+*/
+@Repository
+public interface OtherPayableMapper extends BaseMapper<OtherPayable>{
+	
+}
+

+ 193 - 0
src/main/java/com/dk/mdm/mapper/mac/OtherPayableMapper.xml

@@ -0,0 +1,193 @@
+<?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.mac.OtherPayableMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <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
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mac.OtherPayable">
+        <id column="payable_id" property="payableId"/>
+            <result column="payable_no" property="payableNo"/>
+            <result column="object_type" property="objectType"/>
+            <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
+            <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+            <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+            <result column="sum_amt_payable" property="sumAmtPayable"/>
+            <result column="acc_item_id" property="accItemId" typeHandler="UuidTypeHandler"/>
+            <result column="acc_date" property="accDate" typeHandler="TimestampTypeHandler"/>
+            <result column="remarks" property="remarks"/>
+            <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
+            <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
+            <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
+            <result column="flg_valid" property="flgValid"/>
+            <result column="cp_id" property="cpId"/>
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mac.OtherPayableResponse">
+        <id column="payable_id" property="payableId"/>
+            <result column="payable_no" property="payableNo"/>
+            <result column="object_type" property="objectType"/>
+            <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
+            <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+            <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+            <result column="sum_amt_payable" property="sumAmtPayable"/>
+            <result column="acc_item_id" property="accItemId" typeHandler="UuidTypeHandler"/>
+            <result column="acc_date" property="accDate" typeHandler="TimestampTypeHandler"/>
+            <result column="remarks" property="remarks"/>
+            <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
+            <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
+            <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
+            <result column="flg_valid" property="flgValid"/>
+            <result column="cp_id" property="cpId"/>
+    </resultMap>
+
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="payableNo != null and payableNo != ''">
+                AND t.payable_no = #{payableNo}
+            </if>
+            <if test="objectType != null and objectType != ''">
+                AND t.object_type = #{objectType}
+            </if>
+            <if test="objectId != null and objectId != ''">
+                AND t.object_id = #{objectId}
+            </if>
+            <if test="orgId != null and orgId != ''">
+                AND t.org_id = #{orgId}
+            </if>
+            <if test="staffId != null and staffId != ''">
+                AND t.staff_id = #{staffId}
+            </if>
+            <if test="sumAmtPayable != null">
+                AND t.sum_amt_payable = #{sumAmtPayable}
+            </if>
+            <if test="accItemId != null and accItemId != ''">
+                AND t.acc_item_id = #{accItemId}
+            </if>
+            <if test="accDate != null">
+                AND t.acc_date = #{accDate}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND t.remarks = #{remarks}
+            </if>
+            <if test="annexPaths != null and annexPaths != ''">
+                AND t.annex_paths = #{annexPaths}
+            </if>
+            <if test="makeStaff != null and makeStaff != ''">
+                AND t.make_staff = #{makeStaff}
+            </if>
+            <if test="makeTime != null">
+                AND t.make_time = #{makeTime}
+            </if>
+            <if test="flgValid != null">
+                AND t.flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键payableId批量操作 -->
+        WHERE payable_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mac_other_payable,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable as t
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mac_other_payable,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM dkic_b.t_mac_other_payable as t
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mac_other_payable的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable
+        WHERE payable_id = #{payableId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mac_other_payable的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable
+        WHERE payable_id = #{id}::uuid
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mac_other_payable的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_payable
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into dkic_b.t_mac_other_payable
+        (
+        <trim suffixOverrides=",">
+            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,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.payableNo},
+                #{item.objectType},
+                #{item.objectId}::uuid,
+                #{item.orgId}::uuid,
+                #{item.staffId}::uuid,
+                #{item.sumAmtPayable},
+                #{item.accItemId}::uuid,
+                #{item.accDate},
+                #{item.remarks},
+                #{item.annexPaths},
+                #{item.makeStaff}::uuid,
+                #{item.makeTime},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 7 - 0
src/main/java/com/dk/mdm/mapper/mac/OtherReceivableItemMapper.java

@@ -19,5 +19,12 @@ public interface OtherReceivableItemMapper extends BaseMapper<OtherReceivableIte
      * @date : 2024-02-28 10:18
      */
     List<OtherReceivableItemResponse> selectByCond(OtherReceivableItemQuery otherReceivableQuery);
+
+    /**
+     * @desc : 根据条件进行查询
+     * @author : 付斌
+     * @date : 2024-02-28 10:18
+     */
+    List<OtherReceivableItem> selectByZIdForUpdate(String id);
 }
 

+ 15 - 0
src/main/java/com/dk/mdm/mapper/mac/OtherReceivableItemMapper.xml

@@ -102,6 +102,15 @@
         WHERE item_id = #{itemId}::uuid
     </select>
 
+    <!-- 根据主表主键锁定表t_psi_outbound_item的多行数据 -->
+    <select id="selectByZIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mac_other_receivable_item
+        WHERE receivable_id = #{id}::uuid
+        for update
+    </select>
+
     <!-- 根据主键锁定表t_mac_other_receivable_item的一行数据 -->
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
@@ -146,4 +155,10 @@
             )
         </foreach>
     </insert>
+
+    <delete id="deleteById">
+        DELETE
+        FROM dkic_b.t_mac_other_receivable_item
+        WHERE item_id = #{id}::uuid;
+    </delete>
 </mapper>

+ 7 - 0
src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.java

@@ -26,5 +26,12 @@ public interface OtherReceivableMapper extends BaseMapper<OtherReceivable>{
      * @date   : 2024-02-28 10:19
      */
     Long countByCond(OtherReceivableQuery otherReceivableQuery);
+
+    /**
+     * @desc   : 根据Id进行查询
+     * @author : 付斌
+     * @date   : 2024-03-03 9:25
+     */
+    OtherReceivableResponse selectById(String id);
 }
 

+ 31 - 5
src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.xml

@@ -175,11 +175,37 @@
     </select>
 
     <!-- 根据主键查询表t_mac_other_receivable的一行数据 -->
-    <select id="selectById" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM dkic_b.t_mac_other_receivable
-        WHERE receivable_id = #{receivableId}::uuid
+    <select id="selectById" resultMap="BaseResultMapResponse">
+        SELECT t.receivable_id,
+               t.receivable_no,
+               t.object_type,
+               sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "objectTypeName",
+               t.object_id,
+               tmc.cus_code         as "cusCode",
+               tmc.cus_name         as "cusName",
+               tmc.cus_phone        as "cusPhone",
+               t.org_id,
+               tmo.org_name         as "orgName",
+               t.staff_id,
+               tms.staff_name       as "staffName",
+               t.sum_amt_receivable,
+               t.acc_item_id,
+               t.acc_date,
+               t.remarks,
+               t.annex_paths,
+               t.make_staff,
+               makestaff.staff_name as "makeStaffName",
+               t.make_time,
+               t.flg_valid,
+               t.cp_id
+        FROM dkic_b.t_mac_other_receivable as t
+                 left join dkic_b.t_mst_customer tmc
+                           on tmc.cus_id = t.object_id and t.object_type in ('对象类型-客户')
+                 left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_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 sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+        WHERE receivable_id = #{id}::uuid
     </select>
 
     <!-- 根据主键锁定表t_mac_other_receivable的一行数据 -->

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

@@ -0,0 +1,175 @@
+package com.dk.mdm.model.pojo.mac;
+
+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.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  其他支出单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出单")
+@TableName(value = "t_mac_other_payable", autoResultMap = true)
+@ApiModel(value="实体类:其他支出单", description="表名:t_mac_other_payable")
+public class OtherPayable extends PageInfo<OtherPayable> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 其它支出单ID
+     */
+//    @TableId(value = "payable_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 其它支出单号
+     */
+    @Excel(name = "其它支出单号")
+    @ApiModelProperty(value = "其它支出单号")
+    private String payableNo;
+
+
+    /**
+     * 对象类型 (【系统字典】客户、供应商)
+     */
+    @Excel(name = "对象类型 (【系统字典】客户、供应商)")
+    @ApiModelProperty(value = "对象类型 (【系统字典】客户、供应商)")
+    private String objectType;
+
+
+    /**
+     * 账务对象ID (账务对象)
+     */
+    @Excel(name = "账务对象ID (账务对象)")
+    @ApiModelProperty(value = "账务对象ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String objectId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 合计应付
+     */
+    @Excel(name = "合计应付")
+    @ApiModelProperty(value = "合计应付")
+    private BigDecimal sumAmtPayable;
+
+
+    /**
+     * 账务明细ID
+     */
+    @Excel(name = "账务明细ID")
+    @ApiModelProperty(value = "账务明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String accItemId;
+
+
+    /**
+     * 账务日期 (账务日期)
+     */
+    @Excel(name = "账务日期 (账务日期)")
+    @ApiModelProperty(value = "账务日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate accDate;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 110 - 0
src/main/java/com/dk/mdm/model/pojo/mac/OtherPayableItem.java

@@ -0,0 +1,110 @@
+package com.dk.mdm.model.pojo.mac;
+
+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.math.BigDecimal;
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  其他支出明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出明细")
+@TableName(value = "t_mac_other_payable_item", autoResultMap = true)
+@ApiModel(value="实体类:其他支出明细", description="表名:t_mac_other_payable_item")
+public class OtherPayableItem extends PageInfo<OtherPayableItem> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 其它支出单ID
+     */
+    @Excel(name = "其它支出单ID")
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 支出类别 (【数据字典】)
+     */
+    @Excel(name = "支出类别 (【数据字典】)")
+    @ApiModelProperty(value = "支出类别 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableType;
+
+
+    /**
+     * 支出数量
+     */
+    @Excel(name = "支出数量")
+    @ApiModelProperty(value = "支出数量")
+    private BigDecimal qtyOutlay;
+
+
+    /**
+     * 支出金额
+     */
+    @Excel(name = "支出金额")
+    @ApiModelProperty(value = "支出金额")
+    private BigDecimal amtOutlay;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 105 - 0
src/main/java/com/dk/mdm/model/query/mac/OtherPayableItemQuery.java

@@ -0,0 +1,105 @@
+package com.dk.mdm.model.query.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *  其他支出明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出明细")
+@TableName(value = "t_mac_other_payable_item", autoResultMap = true)
+@ApiModel(value="实体类:其他支出明细", description="表名:t_mac_other_payable_item")
+public class OtherPayableItemQuery extends PageInfo<OtherPayableItemQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 其它支出单ID
+     */
+    @Excel(name = "其它支出单ID")
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 支出类别 (【数据字典】)
+     */
+    @Excel(name = "支出类别 (【数据字典】)")
+    @ApiModelProperty(value = "支出类别 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableType;
+
+
+    /**
+     * 支出数量
+     */
+    @Excel(name = "支出数量")
+    @ApiModelProperty(value = "支出数量")
+    private BigDecimal qtyOutlay;
+
+
+    /**
+     * 支出金额
+     */
+    @Excel(name = "支出金额")
+    @ApiModelProperty(value = "支出金额")
+    private BigDecimal amtOutlay;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

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

@@ -0,0 +1,177 @@
+package com.dk.mdm.model.query.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ *  其他支出单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出单")
+@TableName(value = "t_mac_other_payable", autoResultMap = true)
+@ApiModel(value="实体类:其他支出单", description="表名:t_mac_other_payable")
+public class OtherPayableQuery extends PageInfo<OtherPayableQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 其它支出单ID
+     */
+//    @TableId(value = "payable_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 其它支出单号
+     */
+    @Excel(name = "其它支出单号")
+    @ApiModelProperty(value = "其它支出单号")
+    private String payableNo;
+
+
+    /**
+     * 对象类型 (【系统字典】客户、供应商)
+     */
+    @Excel(name = "对象类型 (【系统字典】客户、供应商)")
+    @ApiModelProperty(value = "对象类型 (【系统字典】客户、供应商)")
+    private String objectType;
+
+
+    /**
+     * 账务对象ID (账务对象)
+     */
+    @Excel(name = "账务对象ID (账务对象)")
+    @ApiModelProperty(value = "账务对象ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String objectId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 合计应付
+     */
+    @Excel(name = "合计应付")
+    @ApiModelProperty(value = "合计应付")
+    private BigDecimal sumAmtPayable;
+
+
+    /**
+     * 账务明细ID
+     */
+    @Excel(name = "账务明细ID")
+    @ApiModelProperty(value = "账务明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String accItemId;
+
+
+    /**
+     * 账务日期 (账务日期)
+     */
+    @Excel(name = "账务日期 (账务日期)")
+    @ApiModelProperty(value = "账务日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate accDate;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 105 - 0
src/main/java/com/dk/mdm/model/response/mac/OtherPayableItemResponse.java

@@ -0,0 +1,105 @@
+package com.dk.mdm.model.response.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *  其他支出明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出明细")
+@TableName(value = "t_mac_other_payable_item", autoResultMap = true)
+@ApiModel(value="实体类:其他支出明细", description="表名:t_mac_other_payable_item")
+public class OtherPayableItemResponse extends PageInfo<OtherPayableItemResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 其它支出单ID
+     */
+    @Excel(name = "其它支出单ID")
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 支出类别 (【数据字典】)
+     */
+    @Excel(name = "支出类别 (【数据字典】)")
+    @ApiModelProperty(value = "支出类别 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableType;
+
+
+    /**
+     * 支出数量
+     */
+    @Excel(name = "支出数量")
+    @ApiModelProperty(value = "支出数量")
+    private BigDecimal qtyOutlay;
+
+
+    /**
+     * 支出金额
+     */
+    @Excel(name = "支出金额")
+    @ApiModelProperty(value = "支出金额")
+    private BigDecimal amtOutlay;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

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

@@ -0,0 +1,177 @@
+package com.dk.mdm.model.response.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ *  其他支出单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出单")
+@TableName(value = "t_mac_other_payable", autoResultMap = true)
+@ApiModel(value="实体类:其他支出单", description="表名:t_mac_other_payable")
+public class OtherPayableResponse extends PageInfo<OtherPayableResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 其它支出单ID
+     */
+//    @TableId(value = "payable_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 其它支出单号
+     */
+    @Excel(name = "其它支出单号")
+    @ApiModelProperty(value = "其它支出单号")
+    private String payableNo;
+
+
+    /**
+     * 对象类型 (【系统字典】客户、供应商)
+     */
+    @Excel(name = "对象类型 (【系统字典】客户、供应商)")
+    @ApiModelProperty(value = "对象类型 (【系统字典】客户、供应商)")
+    private String objectType;
+
+
+    /**
+     * 账务对象ID (账务对象)
+     */
+    @Excel(name = "账务对象ID (账务对象)")
+    @ApiModelProperty(value = "账务对象ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String objectId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 合计应付
+     */
+    @Excel(name = "合计应付")
+    @ApiModelProperty(value = "合计应付")
+    private BigDecimal sumAmtPayable;
+
+
+    /**
+     * 账务明细ID
+     */
+    @Excel(name = "账务明细ID")
+    @ApiModelProperty(value = "账务明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String accItemId;
+
+
+    /**
+     * 账务日期 (账务日期)
+     */
+    @Excel(name = "账务日期 (账务日期)")
+    @ApiModelProperty(value = "账务日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate accDate;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 105 - 0
src/main/java/com/dk/mdm/model/vo/mac/OtherPayableItemVO.java

@@ -0,0 +1,105 @@
+package com.dk.mdm.model.vo.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *  其他支出明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出明细")
+@TableName(value = "t_mac_other_payable_item", autoResultMap = true)
+@ApiModel(value="实体类:其他支出明细", description="表名:t_mac_other_payable_item")
+public class OtherPayableItemVO extends PageInfo<OtherPayableItemVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 其它支出单ID
+     */
+    @Excel(name = "其它支出单ID")
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 支出类别 (【数据字典】)
+     */
+    @Excel(name = "支出类别 (【数据字典】)")
+    @ApiModelProperty(value = "支出类别 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableType;
+
+
+    /**
+     * 支出数量
+     */
+    @Excel(name = "支出数量")
+    @ApiModelProperty(value = "支出数量")
+    private BigDecimal qtyOutlay;
+
+
+    /**
+     * 支出金额
+     */
+    @Excel(name = "支出金额")
+    @ApiModelProperty(value = "支出金额")
+    private BigDecimal amtOutlay;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

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

@@ -0,0 +1,177 @@
+package com.dk.mdm.model.vo.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ *  其他支出单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("其他支出单")
+@TableName(value = "t_mac_other_payable", autoResultMap = true)
+@ApiModel(value="实体类:其他支出单", description="表名:t_mac_other_payable")
+public class OtherPayableVO extends PageInfo<OtherPayableVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 其它支出单ID
+     */
+//    @TableId(value = "payable_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "其它支出单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String payableId;
+
+
+    /**
+     * 其它支出单号
+     */
+    @Excel(name = "其它支出单号")
+    @ApiModelProperty(value = "其它支出单号")
+    private String payableNo;
+
+
+    /**
+     * 对象类型 (【系统字典】客户、供应商)
+     */
+    @Excel(name = "对象类型 (【系统字典】客户、供应商)")
+    @ApiModelProperty(value = "对象类型 (【系统字典】客户、供应商)")
+    private String objectType;
+
+
+    /**
+     * 账务对象ID (账务对象)
+     */
+    @Excel(name = "账务对象ID (账务对象)")
+    @ApiModelProperty(value = "账务对象ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String objectId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 合计应付
+     */
+    @Excel(name = "合计应付")
+    @ApiModelProperty(value = "合计应付")
+    private BigDecimal sumAmtPayable;
+
+
+    /**
+     * 账务明细ID
+     */
+    @Excel(name = "账务明细ID")
+    @ApiModelProperty(value = "账务明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String accItemId;
+
+
+    /**
+     * 账务日期 (账务日期)
+     */
+    @Excel(name = "账务日期 (账务日期)")
+    @ApiModelProperty(value = "账务日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate accDate;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 28 - 0
src/main/java/com/dk/mdm/service/mac/OtherPayableItemService.java

@@ -0,0 +1,28 @@
+package com.dk.mdm.service.mac;
+
+import com.dk.mdm.model.pojo.mac.OtherPayableItem;
+import com.dk.mdm.mapper.mac.OtherPayableItemMapper;
+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 OtherPayableItemService extends BaseService<OtherPayableItem> {
+
+	@Override
+	public String getPrimaryKey() {
+		return "item_id";
+	}
+
+	@Override
+	public BaseMapper<OtherPayableItem> getRepository() {
+		return otherPayableItemMapper;
+	}
+
+	@Autowired
+	private OtherPayableItemMapper otherPayableItemMapper;
+
+}

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

@@ -0,0 +1,28 @@
+package com.dk.mdm.service.mac;
+
+import com.dk.mdm.model.pojo.mac.OtherPayable;
+import com.dk.mdm.mapper.mac.OtherPayableMapper;
+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 OtherPayableService extends BaseService<OtherPayable> {
+
+	@Override
+	public String getPrimaryKey() {
+		return "payable_id";
+	}
+
+	@Override
+	public BaseMapper<OtherPayable> getRepository() {
+		return otherPayableMapper;
+	}
+
+	@Autowired
+	private OtherPayableMapper otherPayableMapper;
+
+}

+ 67 - 28
src/main/java/com/dk/mdm/service/mac/OtherReceivableService.java

@@ -1,9 +1,12 @@
 package com.dk.mdm.service.mac;
 
 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.mac.OtherReceivableConvert;
@@ -25,7 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
-import java.util.stream.Collectors;
 
 @Service
 @Transactional
@@ -74,7 +76,7 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
 	}
 
 	/**
-	 * @desc : 查询订单明细(货物、收款、附件)
+	 * @desc : 查询明细(货物、收款、附件)
 	 * @author : 付斌
 	 * @date : 2024-02-28 13:25
 	 */
@@ -105,10 +107,10 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
 				.setObjectType(Constant.ObjectType.CUS.getName());
 		// 转化实体
 		OtherReceivable otherReceivable = otherReceivableConvert.convertToPo(otherReceivableVO);
-		// 订单总单保存
+		// 总单保存
 		super.insert(otherReceivable);
 
-		// 订单明细保存
+		// 明细保存
 		if (otherReceivableVO.getItemList() != null && otherReceivableVO.getItemList().size() > 0) {
 			for (OtherReceivableItemVO otherReceivableItemVO : otherReceivableVO.getItemList()) {
 				OtherReceivableItem otherReceivableItem = otherReceivableItemConvert.convertToPo(otherReceivableItemVO);
@@ -117,6 +119,7 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
 			}
 		}
 
+		// 应收记账
 		accountService.accReceivable(otherReceivable.getReceivableId(),"t_mac_other_receivable");
 		return ResponseResultUtil.success();
 	}
@@ -130,35 +133,71 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
 			rollbackFor = {Exception.class}
 	)
 	public ResponseResultVO<?> update(OtherReceivableVO otherReceivableVO) {
-		// 明细实体(避免并发,需要再查一遍)
-		OtherReceivableItem otherReceivableItemForUpdate;
-		// 转化实体
+
+		// 先更新收款单总表,否则id又更错了
 		OtherReceivable otherReceivable = otherReceivableConvert.convertToPo(otherReceivableVO);
-		//删除的
-		List<OtherReceivableItemVO> deleteOtherReceivableItemVOList = otherReceivableVO.getDeleteItemList().stream().filter(it -> it.getItemId() != null).collect(Collectors.toList());
-		if (deleteOtherReceivableItemVOList.size() > 0) {
-			for (OtherReceivableItemVO otherReceivableItemVO : deleteOtherReceivableItemVOList) {
-				otherReceivableItemMapper.deleteById(otherReceivableItemVO.getItemId());
-			}
-		}
-		// 新增的
-		List<OtherReceivableItemVO> insertOtherReceivableItemVOList = otherReceivableVO.getItemList().stream().filter(it -> it.getItemId() == null).collect(Collectors.toList());
-		for (OtherReceivableItemVO otherReceivableItemVO : insertOtherReceivableItemVOList) {
-			OtherReceivableItem otherReceivableItem = otherReceivableItemConvert.convertToPo(otherReceivableItemVO);
-			otherReceivableItem.setReceivableId(otherReceivable.getReceivableId()).setCpId(otherReceivable.getCpId());
-			otherReceivableItemMapper.insert(otherReceivableItem);
+		super.update(otherReceivable, new UpdateWrapper<OtherReceivable>().lambda().eq(OtherReceivable::getReceivableId,
+				UUID.fromString(otherReceivable.getReceivableId())));
+
+		// 应收反记账
+		accountService.reverseReceivable(otherReceivableVO.getReceivableId(),"t_mac_other_receivable");
+
+		// 将之前的明细全部删除
+		List<OtherReceivableItem> otherReceivableItemOriginalList = otherReceivableItemMapper.selectByZIdForUpdate(otherReceivableVO.getReceivableId());
+		for (OtherReceivableItem otherReceivableItem : otherReceivableItemOriginalList) {
+			otherReceivableItemMapper.deleteById(otherReceivableItem.getItemId());
 		}
-		// 编辑的
-		List<OtherReceivableItemVO> editOtherReceivableItemVOList = otherReceivableVO.getItemList().stream().filter(it -> it.getItemId() != null).collect(Collectors.toList());
-		for (OtherReceivableItemVO otherReceivableItemVO : editOtherReceivableItemVOList) {
-			otherReceivableItemForUpdate = otherReceivableItemMapper.selectByIdForUpdate(otherReceivableItemVO.getItemId());
-			OtherReceivableItem otherReceivableItem = otherReceivableItemConvert.convertToPo(otherReceivableItemVO);
-			otherReceivableItemService.updateByUuid(otherReceivableItem);
+
+		// 明细保存
+		if (otherReceivableVO.getItemList() != null && otherReceivableVO.getItemList().size() > 0) {
+			for (OtherReceivableItemVO otherReceivableItemVO : otherReceivableVO.getItemList()) {
+				OtherReceivableItem otherReceivableItem = otherReceivableItemConvert.convertToPo(otherReceivableItemVO);
+				otherReceivableItem.setItemId(null).setReceivableId(otherReceivableVO.getReceivableId()).setCpId(otherReceivableVO.getCpId());
+				otherReceivableItemMapper.insert(otherReceivableItem);
+			}
 		}
 
+		// 应收记账
+		accountService.accReceivable(otherReceivableVO.getReceivableId(),"t_mac_other_receivable");
+		return ResponseResultUtil.success();
+	}
 
-		return ResponseResultUtil.success(super.update(otherReceivable, new UpdateWrapper<OtherReceivable>().lambda().eq(OtherReceivable::getReceivableId,
-				UUID.fromString(otherReceivable.getReceivableId()))));
+	/**
+	 * @desc : 获取信息(编辑用)
+	 * @author : 付斌
+	 * @date : 2024-03-02 17:27
+	 */
+	public ResponseResultVO<?> getOtherReceivableForUpdate(String id) {
+		Map<String, Object> dataInfo = new HashMap<>();
+		OtherReceivableResponse otherReceivableResponse = otherReceivableMapper.selectById(id);
+		dataInfo.put("data", otherReceivableResponse);
+
+		// 商品明细
+		List<OtherReceivableItemResponse> otherReceivableItemResponse = otherReceivableItemMapper.selectByCond(new OtherReceivableItemQuery().setReceivableId(id));
+		dataInfo.put("dataItem", otherReceivableItemResponse);
+		return ResponseResultUtil.success(dataInfo);
 	}
 
+	/**
+	 * @desc : 作废
+	 * @author : 付斌
+	 * @date : 2024-03-08 16:38
+	 */
+	public ResponseResultVO<?> invalid(String id) {
+		OtherReceivable otherReceivableForUpdate = otherReceivableMapper.selectByIdForUpdate(id);
+		// 并发校验
+		if (!otherReceivableForUpdate.getFlgValid()) {
+			throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISFLGVALID_FALSE.getMessage());
+		}
+		// 如果所在月份已结账,则不能作废 todo
+
+		// 应收反记账
+		accountService.reverseReceivable(id,"t_mac_other_receivable");
+
+		// 作废
+		OtherReceivable otherReceivableUpdate = new OtherReceivable();
+		otherReceivableUpdate.setFlgValid(false).setReceivableId(id);
+		super.updateByUuid(otherReceivableUpdate);
+		return ResponseResultUtil.success();
+	}
 }

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

@@ -301,7 +301,7 @@ public class RecPayService extends BaseService<RecPay> {
         // 新增明细
         for (RecPayItemVO recPayItemVO : recPayVO.getItemList()) {
             RecPayItem recPayItem = recPayItemConvert.convertToPo(recPayItemVO);
-            recPayItem.setRpId(recPayVO.getRpId()).setCpId(recPayVO.getCpId());
+            recPayItem.setItemId(null).setRpId(recPayVO.getRpId()).setCpId(recPayVO.getCpId());
             recPayItemMapper.insert(recPayItem);
 
             // 插入账款明细