소스 검색

Merge remote-tracking branch 'origin/master'

姜永辉 2 년 전
부모
커밋
9b4e016279
25개의 변경된 파일1658개의 추가작업 그리고 56개의 파일을 삭제
  1. 17 2
      src/main/java/com/dk/mdm/controller/ivt/InboundItemController.java
  2. 24 0
      src/main/java/com/dk/mdm/controller/mac/ReceiptController.java
  3. 11 0
      src/main/java/com/dk/mdm/controller/mst/CusFollowController.java
  4. 21 0
      src/main/java/com/dk/mdm/infrastructure/convert/mac/ReceiptConvert.java
  5. 8 0
      src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.java
  6. 14 0
      src/main/java/com/dk/mdm/mapper/mac/ReceiptMapper.java
  7. 231 0
      src/main/java/com/dk/mdm/mapper/mac/ReceiptMapper.xml
  8. 1 7
      src/main/java/com/dk/mdm/mapper/mac/TransferMapper.xml
  9. 18 5
      src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.xml
  10. 3 0
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.java
  11. 9 0
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml
  12. 292 0
      src/main/java/com/dk/mdm/model/pojo/mac/Receipt.java
  13. 0 8
      src/main/java/com/dk/mdm/model/pojo/mac/Transfer.java
  14. 292 0
      src/main/java/com/dk/mdm/model/query/mac/ReceiptQuery.java
  15. 0 8
      src/main/java/com/dk/mdm/model/query/mac/TransferQuery.java
  16. 292 0
      src/main/java/com/dk/mdm/model/response/mac/ReceiptResponse.java
  17. 0 8
      src/main/java/com/dk/mdm/model/response/mac/TransferResponse.java
  18. 13 0
      src/main/java/com/dk/mdm/model/response/mst/CusFollowResponse.java
  19. 292 0
      src/main/java/com/dk/mdm/model/vo/mac/ReceiptVO.java
  20. 0 8
      src/main/java/com/dk/mdm/model/vo/mac/TransferVO.java
  21. 5 1
      src/main/java/com/dk/mdm/model/vo/mst/CusFollowVO.java
  22. 14 0
      src/main/java/com/dk/mdm/service/ivt/InboundItemService.java
  23. 28 0
      src/main/java/com/dk/mdm/service/mac/ReceiptService.java
  24. 5 0
      src/main/java/com/dk/mdm/service/mac/TransferService.java
  25. 68 9
      src/main/java/com/dk/mdm/service/mst/CusFollowService.java

+ 17 - 2
src/main/java/com/dk/mdm/controller/ivt/InboundItemController.java

@@ -1,9 +1,12 @@
 package com.dk.mdm.controller.ivt;
 
+import com.dk.common.model.pojo.PageList;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.model.pojo.ivt.InboundItem;
 import com.dk.common.controller.BaseController;
 import com.dk.common.service.BaseService;
+import com.dk.mdm.model.query.ivt.InboundItemQuery;
+import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.vo.ivt.InboundItemVO;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import io.swagger.annotations.ApiOperation;
@@ -18,7 +21,7 @@ import com.dk.mdm.service.ivt.InboundItemService;
 
 @Api(tags = "入库明细API接口")
 @RestController
-@RequestMapping("/inboundItem")
+@RequestMapping("/ivt/inboundItem")
 public class InboundItemController{
 
     public BaseService<InboundItem> getService() {
@@ -28,7 +31,19 @@ public class InboundItemController{
     @Autowired
     private InboundItemService inboundItemService;
 
-
+    /**
+     * @desc   : 条件查询
+     * @author : 常皓宁
+     * @date   : 2024/3/13 14:35
+     */
+    @ApiOperation(
+            value = "分页、关联、条件查询",
+            notes = "分页、关联、条件查询"
+    )
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<InboundItemResponse>> selectByCond(@RequestBody InboundItemQuery inboundItemQuery) {
+        return inboundItemService.selectByCond(inboundItemQuery);
+    }
 
 
     /**

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

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mac;
+
+import com.dk.mdm.model.pojo.mac.Receipt;
+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.ReceiptService;
+
+@Api(tags = "收【退】款单API接口")
+@RestController
+@RequestMapping("/receipt")
+public class ReceiptController{
+
+    public BaseService<Receipt> getService() {
+        return receiptService;
+    }
+
+    @Autowired
+    private ReceiptService receiptService;
+
+}

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

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.mst.CusFollowService;
 
+import javax.validation.Valid;
 import java.util.List;
 
 @Api(tags = "客户跟进API接口")
@@ -78,4 +79,14 @@ public class CusFollowController{
         return cusFollowService.updateMeasure(cusFollowVO);
     }
 
+
+    @ApiOperation(
+            value = "编辑",
+            notes = "编辑"
+    )
+    @PostMapping("update")
+    public ResponseResultVO<?> update(@Valid @RequestBody CusFollowVO cusFollowVO) {
+        return cusFollowService.update(cusFollowVO);
+    }
+
 }

+ 21 - 0
src/main/java/com/dk/mdm/infrastructure/convert/mac/ReceiptConvert.java

@@ -0,0 +1,21 @@
+package com.dk.mdm.infrastructure.convert.mac;
+
+import com.dk.mdm.model.pojo.mac.Receipt;
+import com.dk.mdm.model.vo.mac.ReceiptVO;
+import org.mapstruct.Mapper;
+
+/**
+ * @author : 付斌
+ * @desc : Receipt转换类
+ * @date : 2024-03-14 9:45
+ */
+@Mapper(componentModel = "spring")
+public interface ReceiptConvert {
+
+    /**
+     * @desc : 转换vo为pojo
+     * @author : 付斌
+     * @date : 2024-02-28 15:26
+     */
+    Receipt convertToPo(ReceiptVO receiptVO);
+}

+ 8 - 0
src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.java

@@ -24,6 +24,14 @@ public interface InboundItemMapper extends BaseMapper<InboundItem>{
     List<InboundItemResponse> selectByCond(InboundItemQuery inboundItemQuery);
 
     /**
+     * @desc   : 条件查询个数 (采购入库用)
+     * @author : 常皓宁
+     * @date   : 2024/3/13 14:39
+     */
+    Long countByCond(InboundItemQuery inboundItemQuery);
+
+
+    /**
      * @desc   : 根据id查询
      * @date   : 2024/3/9 9:14
      * @author : 寇珊珊

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

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mac;
+
+import com.dk.mdm.model.pojo.mac.Receipt;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  收【退】款单 Mapper
+*/
+@Repository
+public interface ReceiptMapper extends BaseMapper<Receipt>{
+	
+}
+

+ 231 - 0
src/main/java/com/dk/mdm/mapper/mac/ReceiptMapper.xml

@@ -0,0 +1,231 @@
+<?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.ReceiptMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        receipt_id, receipt_no, receipt_date, receipt_type, order_id, cus_id, org_id, staff_id, receipt_mac, receipt_amt, receivable_id, waive_amt, handle_amt, residue_amt, remarks, annex_paths, make_staff, make_time, flg_valid, 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.mac.Receipt">
+        <id column="receipt_id" property="receiptId"/>
+                <result column="receipt_no" property="receiptNo"/>
+            <result column="receipt_date" property="receiptDate" typeHandler="TimestampTypeHandler"/>
+                <result column="receipt_type" property="receiptType"/>
+                <result column="order_id" property="orderId" typeHandler="UuidTypeHandler"/>
+                <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
+                <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+                <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+                <result column="receipt_mac" property="receiptMac" typeHandler="UuidTypeHandler"/>
+                <result column="receipt_amt" property="receiptAmt"/>
+                <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
+                <result column="waive_amt" property="waiveAmt"/>
+                <result column="handle_amt" property="handleAmt"/>
+                <result column="residue_amt" property="residueAmt"/>
+                <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"/>
+            <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="receiptNo != null and receiptNo != ''">
+                AND receipt_no = #{receiptNo}
+            </if>
+            <if test="receiptDate != null">
+                AND receipt_date = #{receiptDate}
+            </if>
+            <if test="receiptType != null and receiptType != ''">
+                AND receipt_type = #{receiptType}
+            </if>
+            <if test="orderId != null and orderId != ''">
+                AND order_id = #{orderId}
+            </if>
+            <if test="cusId != null and cusId != ''">
+                AND cus_id = #{cusId}
+            </if>
+            <if test="orgId != null and orgId != ''">
+                AND org_id = #{orgId}
+            </if>
+            <if test="staffId != null and staffId != ''">
+                AND staff_id = #{staffId}
+            </if>
+            <if test="receiptMac != null and receiptMac != ''">
+                AND receipt_mac = #{receiptMac}
+            </if>
+            <if test="receiptAmt != null">
+                AND receipt_amt = #{receiptAmt}
+            </if>
+            <if test="receivableId != null and receivableId != ''">
+                AND receivable_id = #{receivableId}
+            </if>
+            <if test="waiveAmt != null">
+                AND waive_amt = #{waiveAmt}
+            </if>
+            <if test="handleAmt != null">
+                AND handle_amt = #{handleAmt}
+            </if>
+            <if test="residueAmt != null">
+                AND residue_amt = #{residueAmt}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="annexPaths != null and annexPaths != ''">
+                AND annex_paths = #{annexPaths}
+            </if>
+            <if test="makeStaff != null and makeStaff != ''">
+                AND make_staff = #{makeStaff}
+            </if>
+            <if test="makeTime != null">
+                AND make_time = #{makeTime}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </if>
+            <if test="opCreateTime != null">
+                AND op_create_time = #{opCreateTime}
+            </if>
+            <if test="opCreateUserId != null and opCreateUserId != ''">
+                AND op_create_user_id = #{opCreateUserId}
+            </if>
+            <if test="opUpdateTime != null">
+                AND op_update_time = #{opUpdateTime}
+            </if>
+            <if test="opUpdateUserId != null and opUpdateUserId != ''">
+                AND op_update_user_id = #{opUpdateUserId}
+            </if>
+            <if test="opAppCode != null and opAppCode != ''">
+                AND op_app_code = #{opAppCode}
+            </if>
+            <if test="opTimestamp != null">
+                AND op_timestamp = #{opTimestamp}
+            </if>
+            <if test="opDbUser != null and opDbUser != ''">
+                AND op_db_user = #{opDbUser}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键receiptId批量操作 -->
+        WHERE receipt_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mac_receipt,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mac_receipt,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_mac_receipt
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mac_receipt的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        WHERE receipt_id = #{receiptId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mac_receipt的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        WHERE receipt_id = #{receiptId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mac_receipt的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_mac_receipt
+        (
+        <trim suffixOverrides=",">
+            receipt_no,
+            receipt_date,
+            receipt_type,
+            order_id,
+            cus_id,
+            org_id,
+            staff_id,
+            receipt_mac,
+            receipt_amt,
+            receivable_id,
+            waive_amt,
+            handle_amt,
+            residue_amt,
+            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.receiptNo},
+                #{item.receiptDate},
+                #{item.receiptType},
+                #{item.orderId}::uuid,
+                #{item.cusId}::uuid,
+                #{item.orgId}::uuid,
+                #{item.staffId}::uuid,
+                #{item.receiptMac}::uuid,
+                #{item.receiptAmt},
+                #{item.receivableId}::uuid,
+                #{item.waiveAmt},
+                #{item.handleAmt},
+                #{item.residueAmt},
+                #{item.remarks},
+                #{item.annexPaths},
+                #{item.makeStaff}::uuid,
+                #{item.makeTime},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 1 - 7
src/main/java/com/dk/mdm/mapper/mac/TransferMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        trf_id, trf_no, trf_date, trf_type, org_id, staff_id, trf_in_mac, trf_out_mac, trf_amount, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+        trf_id, trf_no, trf_date, org_id, staff_id, trf_in_mac, trf_out_mac, trf_amount, remarks, annex_paths, make_staff, make_time, flg_valid, 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>
 
     <!-- 通用查询映射结果 -->
@@ -13,7 +13,6 @@
         <id column="trf_id" property="trfId"/>
                 <result column="trf_no" property="trfNo"/>
             <result column="trf_date" property="trfDate" typeHandler="TimestampTypeHandler"/>
-                <result column="trf_type" property="trfType"/>
                 <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
                 <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
                 <result column="trf_in_mac" property="trfInMac" typeHandler="UuidTypeHandler"/>
@@ -43,9 +42,6 @@
             <if test="trfDate != null">
                 AND trf_date = #{trfDate}
             </if>
-            <if test="trfType != null">
-                AND trf_type = #{trfType}
-            </if>
             <if test="orgId != null and orgId != ''">
                 AND org_id = #{orgId}
             </if>
@@ -162,7 +158,6 @@
         <trim suffixOverrides=",">
             trf_no,
             trf_date,
-            trf_type,
             org_id,
             staff_id,
             trf_in_mac,
@@ -182,7 +177,6 @@
             <trim suffixOverrides=",">
                 #{item.trfNo},
                 #{item.trfDate},
-                #{item.trfType},
                 #{item.orgId}::uuid,
                 #{item.staffId}::uuid,
                 #{item.trfInMac}::uuid,

+ 18 - 5
src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.xml

@@ -64,6 +64,8 @@
         <result column="remarks" property="remarks"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="cp_id" property="cpId"/>
+        <result column="sale_status" property="saleStatus"/>
+        <result column="channel_id" property="channelId"/>
         <result column="cusName" property="cusName"/>
         <result column="orgName" property="orgName"/>
         <result column="staffName" property="staffName"/>
@@ -76,6 +78,8 @@
         <result column="address_full" property="addressFull"/>
         <result column="address_no" property="addressNo"/>
         <result column="address_name" property="addressName"/>
+        <result column="intention_name" property="intentionName"/>
+        <result column="stay_time_len_name" property="stayTimeLenName"/>
         <result column="address_area" property="addressArea" typeHandler="JsonTypeHandler"/>
         <result column="address_gcj02" property="addressGcj02" typeHandler="JsonTypeHandler"/>
 
@@ -244,22 +248,31 @@
     <select id="selectByCond" resultMap="BaseResultMapResponse">
         SELECT
         <include refid="Base_Column_List_Join"/>,
-        tmc.cus_name AS cus_name,
+        (CASE
+        WHEN tccf.follow_status = '跟进状态-接待' THEN '无联系人'
+        ELSE tmc.cus_name END ) AS cus_name,
         tmc.cus_phone AS cus_phone,
+        tmc.sale_status AS sale_status,
+        tmc.channel_id AS channel_id,
         tmc.address_full AS address_full,
         tmc.address_area AS address_area,
         tmc.address_gcj02 AS address_gcj02,
         tmc.address_name AS address_name,
         tmc.address_no AS address_no,
-        tmo.org_name  AS  "orgName",
-        tms.staff_name  AS  "staffName",
+        tmo.org_name AS "orgName",
+        tms.staff_name AS "staffName",
         tmc.follow_count AS follow_count,
-        tdk1.kind_name_i18n  ->> 'zh_CN' AS "follow_status_name"
+        tdk1.kind_name_i18n ->> 'zh_CN' AS "follow_status_name",
+        tdk2.kind_name_i18n ->> 'zh_CN' AS intention_name,
+        tdk3.kind_name_i18n ->> 'zh_CN' AS stay_time_len_name
+
         FROM dkic_b.t_crm_cus_follow tccf
         LEFT JOIN dkic_b.t_mst_customer tmc ON tmc.cus_id = tccf.cus_id
         LEFT JOIN dkic_b.t_mst_org tmo on tmo.org_id = tccf.follow_org
         LEFT JOIN dkic_b.t_mst_staff tms on tms.staff_id = tccf.follow_staff
-        LEFT JOIN  sys.t_data_kind tdk1  on tdk1.kind_code =  tccf.follow_status
+        LEFT JOIN sys.t_data_kind tdk1 on tdk1.kind_code = tccf.follow_status
+        LEFT JOIN sys.t_data_kind tdk2 on tdk2.kind_code = tccf.intention
+        LEFT JOIN sys.t_data_kind tdk3 on tdk3.kind_code = tccf.stay_time_len
         <include refid="Condition_Join"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}

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

@@ -36,5 +36,8 @@ public interface CustomerMapper extends BaseMapper<Customer>{
      */
     Object selectFollowStaffs(@Param("cusId") String cusId);
     CustomerResponse selectByIdRespone(@Param("cusId") String cusId);
+
+
+    int updateFollowStaffs(Customer customer);
 }
 

+ 9 - 0
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml

@@ -359,4 +359,13 @@
         WHERE cus_id = #{cusId}::uuid
     </select>
 
+
+
+    <!--    公海的客户需要把跟进人清空-->
+    <update id="updateFollowStaffs">
+        update dkic_b.t_mst_customer
+        set
+            follow_staffs = null
+        where cus_id = #{cusId}::uuid
+    </update>
 </mapper>

+ 292 - 0
src/main/java/com/dk/mdm/model/pojo/mac/Receipt.java

@@ -0,0 +1,292 @@
+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_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class Receipt extends PageInfo<Receipt> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @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 = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @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;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @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)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

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

@@ -66,14 +66,6 @@ public class Transfer extends PageInfo<Transfer> implements Serializable {
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 292 - 0
src/main/java/com/dk/mdm/model/query/mac/ReceiptQuery.java

@@ -0,0 +1,292 @@
+package com.dk.mdm.model.query.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.*;
+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.LocalDateTime;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class ReceiptQuery extends PageInfo<ReceiptQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @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 = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @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;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @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)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

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

@@ -69,14 +69,6 @@ public class TransferQuery extends PageInfo<TransferQuery> implements Serializab
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 292 - 0
src/main/java/com/dk/mdm/model/response/mac/ReceiptResponse.java

@@ -0,0 +1,292 @@
+package com.dk.mdm.model.response.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.*;
+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.LocalDateTime;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class ReceiptResponse extends PageInfo<ReceiptResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @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 = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @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;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @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)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

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

@@ -69,14 +69,6 @@ public class TransferResponse extends PageInfo<TransferResponse> implements Seri
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 13 - 0
src/main/java/com/dk/mdm/model/response/mst/CusFollowResponse.java

@@ -273,6 +273,19 @@ public class CusFollowResponse implements Serializable {
     private JSONObject addressGcj02;
 
 
+
+    @ApiModelProperty(value = "客户意向")
+    private String intentionName;
+
+    @ApiModelProperty(value = "留店时长")
+    private String stayTimeLenName;
+
+    private String saleStatus;
+
+
+    @ApiModelProperty(value = "销售渠道")
+    private String channelId;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 292 - 0
src/main/java/com/dk/mdm/model/vo/mac/ReceiptVO.java

@@ -0,0 +1,292 @@
+package com.dk.mdm.model.vo.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.*;
+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.LocalDateTime;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class ReceiptVO extends PageInfo<ReceiptVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @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 = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @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;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @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)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

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

@@ -69,14 +69,6 @@ public class TransferVO extends PageInfo<TransferVO> implements Serializable {
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 5 - 1
src/main/java/com/dk/mdm/model/vo/mst/CusFollowVO.java

@@ -336,10 +336,14 @@ public class CusFollowVO implements Serializable {
     private Boolean flgAgainMeasure;
 
 
-
+    private String saleStatus;
 
     private List<MeasureRoom> measureRoomList;
 
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    private String channelId;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 14 - 0
src/main/java/com/dk/mdm/service/ivt/InboundItemService.java

@@ -1,6 +1,8 @@
 package com.dk.mdm.service.ivt;
 
+import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.constant.Constant;
+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.ivt.InboundItemConvert;
@@ -9,6 +11,8 @@ import com.dk.mdm.model.pojo.ivt.InboundItem;
 import com.dk.mdm.mapper.ivt.InboundItemMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.ivt.InboundItemQuery;
+import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.vo.ivt.InboundItemVO;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import com.dk.mdm.service.common.CommonService;
@@ -36,6 +40,16 @@ public class InboundItemService extends BaseService<InboundItem> {
 	@Autowired
 	private CommonService commonService;
 
+	/**
+	 * @desc   : 条件查询 (采购入库用)
+	 * @author : 常皓宁
+	 * @date   : 2024/3/13 14:36
+	 */
+	@Pagination
+	public ResponseResultVO<PageList<InboundItemResponse>> selectByCond(InboundItemQuery inboundItemQuery) {
+		return super.mergeListWithCount(inboundItemQuery, inboundItemMapper.selectByCond(inboundItemQuery), inboundItemMapper.countByCond(inboundItemQuery));
+	}
+
 
 	/**
 	 * @desc : 新建入库单明细

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

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

+ 5 - 0
src/main/java/com/dk/mdm/service/mac/TransferService.java

@@ -13,6 +13,11 @@ import org.springframework.transaction.annotation.Transactional;
 public class TransferService extends BaseService<Transfer> {
 
 	@Override
+	public String getPrimaryKey() {
+		return "trf_id";
+	}
+
+	@Override
 	public BaseMapper<Transfer> getRepository() {
 		return transferMapper;
 	}

+ 68 - 9
src/main/java/com/dk/mdm/service/mst/CusFollowService.java

@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.*;
 
@@ -95,7 +96,7 @@ public class CusFollowService extends BaseService<CusFollow> {
     }
 
     public ResponseResultVO<List<CusFollowResponse>> selectByList(CusFollowQuery cusFollowQuery) {
-       return ResponseResultUtil.success(cusFollowMapper.selectByList(cusFollowQuery)) ;
+        return ResponseResultUtil.success(cusFollowMapper.selectByList(cusFollowQuery));
     }
 
     /**
@@ -252,9 +253,6 @@ public class CusFollowService extends BaseService<CusFollow> {
         }
 
 
-
-
-
         // 约量尺
         if (Constant.BasicDataConstant.FOLLOW_STATUS_3.getValue().equals(cusFollow.getFollowStatus())) {
             // 量尺状态:待量尺
@@ -332,10 +330,10 @@ public class CusFollowService extends BaseService<CusFollow> {
     @Transactional(
             rollbackFor = {Exception.class}
     )
-    public ResponseResultVO<?> updateMeasure(CusFollowVO cusFollowVO){
+    public ResponseResultVO<?> updateMeasure(CusFollowVO cusFollowVO) {
         CusFollow cusFollow = cusFollowConvert.convertToPo(cusFollowVO);
         //更新总单
-      //  int update = cusFollowMapper.updateMeasure(cusFollow);
+        //  int update = cusFollowMapper.updateMeasure(cusFollow);
         //更新客户信息
         Customer customer = new Customer();
         customer.setCusId(cusFollowVO.getCusId());
@@ -364,9 +362,9 @@ public class CusFollowService extends BaseService<CusFollow> {
         Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.RECEIPT.getName(), true);
         // 新建一条量尺记录
         MeasureReceipt measureReceipt = new MeasureReceipt();
-        if(cusFollowVO.getFlgAgainMeasure() != null ){
+        if (cusFollowVO.getFlgAgainMeasure() != null) {
             measureReceipt.setFlgAgainMeasure(cusFollowVO.getFlgAgainMeasure());
-        }else{
+        } else {
             measureReceipt.setFlgAgainMeasure(false);
         }
 
@@ -379,7 +377,7 @@ public class CusFollowService extends BaseService<CusFollow> {
         measureReceiptService.insert(measureReceipt);
 
         //     新建空间
-        if(cusFollowVO.getMeasureRoomList() != null && cusFollowVO.getMeasureRoomList().size()>0){
+        if (cusFollowVO.getMeasureRoomList() != null && cusFollowVO.getMeasureRoomList().size() > 0) {
             for (MeasureRoom measureRoom : cusFollowVO.getMeasureRoomList()) {
                 //设置ID
                 Map<String, Object> uniqueNoteCode1 = commonService.getUniqueNoteCode(Constant.docNameConstant.ROOM.getName(), true);
@@ -398,10 +396,71 @@ public class CusFollowService extends BaseService<CusFollow> {
         super.updateByUuid(cusFollow);
 
 
+        return ResponseResultUtil.success();
+    }
+
 
+    /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2024-03-13 17:03
+     */
+    @Transactional(rollbackFor = {Exception.class})
+    public ResponseResultVO<?> update(CusFollowVO cusFollowVO) {
+        CusFollow cusFollow = cusFollowConvert.convertToPo(cusFollowVO);
 
+        //编辑时更改客户意向要把对应客户也需要更改
+        if (cusFollowVO.getSaleStatus() != null && (cusFollowVO.getSaleStatus().equals(Constant.saleCustomerStatusConstant.SALE_STATUS_INTE.getName()) || cusFollowVO.getSaleStatus().equals(Constant.saleCustomerStatusConstant.SALE_STATUS_LOST.getName()))) {
+            //公海客户清空跟进人
+            if (cusFollowVO.getSaleStatus().equals(Constant.saleCustomerStatusConstant.SALE_STATUS_INTE.getName())) {
+                customerMapper.updateFollowStaffs(new Customer().setCusId(cusFollowVO.getCusId()));
+            }
 
 
+        }
+        if (cusFollowVO.getCusId() != null) {
+            Customer customer = new Customer();
+            customer.setCusId(cusFollowVO.getCusId());
+            customer.setAddressName(cusFollowVO.getAddressName());
+            customer.setAddressNo(cusFollowVO.getAddressNo());
+            customer.setCusPhone(cusFollowVO.getCusPhone());
+            customer.setCusName(cusFollowVO.getCusName());
+            customer.setOrgId(cusFollowVO.getFollowOrg());
+            customer.setAddressFull(cusFollowVO.getAddressFull());
+            customer.setAddressArea(cusFollowVO.getAddressArea());
+            customer.setSaleStatus(cusFollowVO.getSaleStatus());
+            customer.setAddressGcj02(cusFollowVO.getAddressGcj02());
+            //更新客户信息
+            customerService.updateByUuid(customer);
+        } else {
+            StaffEntity staff = authUtils.getStaff();
+            Customer customer = new Customer();
+            customer.setCusName(cusFollowVO.getCusName());
+            customer.setCusPhone(cusFollowVO.getCusPhone());
+            customer.setAddressName(cusFollowVO.getAddressName());
+            customer.setAddressNo(cusFollowVO.getAddressNo());
+            customer.setOrgId(cusFollowVO.getFollowOrg());
+            customer.setAddressFull(cusFollowVO.getAddressFull());
+            customer.setAddressArea(cusFollowVO.getAddressArea());
+            customer.setSaleStatus(cusFollowVO.getSaleStatus());
+            customer.setAddressGcj02(cusFollowVO.getAddressGcj02());
+            customer.setReportStaff(cusFollowVO.getFollowStaff());
+            customer.setReportTime(LocalDateTime.now());
+            customer.setCpId(staff.getCpId());
+            List<String> list = new ArrayList<>();
+            list.add(staff.getStaffId());
+            customer.setFollowStaffs(list);
+            customer.setSaleStatus("客成状态-潜客");
+            customer.setChannelId(cusFollowVO.getChannelId());
+            Map<String, Object> customerNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.CUSTOMER.getName(), true);
+            customer.setCusId(customerNoteCode.get("outId").toString());
+            //新建客户
+            customerMapper.insert(customer);
+            cusFollow.setCusId(customer.getCusId());
+        }
+        //更新总单
+        super.updateByUuid(cusFollow);
         return ResponseResultUtil.success();
+
     }
 }