Quellcode durchsuchen

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

changhaoning vor 2 Jahren
Ursprung
Commit
f19fba0331
52 geänderte Dateien mit 4595 neuen und 619 gelöschten Zeilen
  1. 24 0
      src/main/java/com/dk/mdm/controller/mst/CustomerController.java
  2. 37 31
      src/main/java/com/dk/mdm/controller/mst/DictionaryDataController.java
  3. 13 0
      src/main/java/com/dk/mdm/controller/mst/MoneyAccountController.java
  4. 86 0
      src/main/java/com/dk/mdm/controller/mst/SaleChannelController.java
  5. 85 0
      src/main/java/com/dk/mdm/controller/mst/WarehouseController.java
  6. 0 20
      src/main/java/com/dk/mdm/infrastructure/convert/core/DictionaryDataConvert.java
  7. 10 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/DictionaryDataConvert.java
  8. 11 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/SaleChannelConvert.java
  9. 10 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/WarehouseConvert.java
  10. 5 1
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml
  11. 0 38
      src/main/java/com/dk/mdm/mapper/core/DictionaryDataMapper.java
  12. 0 137
      src/main/java/com/dk/mdm/mapper/core/DictionaryDataMapper.xml
  13. 14 0
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.java
  14. 273 0
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml
  15. 38 0
      src/main/java/com/dk/mdm/mapper/mst/DictionaryDataMapper.java
  16. 194 0
      src/main/java/com/dk/mdm/mapper/mst/DictionaryDataMapper.xml
  17. 10 2
      src/main/java/com/dk/mdm/mapper/mst/MoneyAccountMapper.java
  18. 25 96
      src/main/java/com/dk/mdm/mapper/mst/MoneyAccountMapper.xml
  19. 38 0
      src/main/java/com/dk/mdm/mapper/mst/SaleChannelMapper.java
  20. 176 0
      src/main/java/com/dk/mdm/mapper/mst/SaleChannelMapper.xml
  21. 40 0
      src/main/java/com/dk/mdm/mapper/mst/WarehouseMapper.java
  22. 192 0
      src/main/java/com/dk/mdm/mapper/mst/WarehouseMapper.xml
  23. 1 0
      src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.xml
  24. 1 0
      src/main/java/com/dk/mdm/mapper/sale/OrderMapper.xml
  25. 348 0
      src/main/java/com/dk/mdm/model/pojo/mst/Customer.java
  26. 26 37
      src/main/java/com/dk/mdm/model/pojo/mst/DictionaryData.java
  27. 2 2
      src/main/java/com/dk/mdm/model/pojo/mst/MoneyAccount.java
  28. 181 0
      src/main/java/com/dk/mdm/model/pojo/mst/SaleChannel.java
  29. 197 0
      src/main/java/com/dk/mdm/model/pojo/mst/Warehouse.java
  30. 1 1
      src/main/java/com/dk/mdm/model/pojo/sale/Order.java
  31. 353 0
      src/main/java/com/dk/mdm/model/query/mst/CustomerQuery.java
  32. 26 37
      src/main/java/com/dk/mdm/model/query/mst/DictionaryDataQuery.java
  33. 20 0
      src/main/java/com/dk/mdm/model/query/mst/MoneyAccountQuery.java
  34. 183 0
      src/main/java/com/dk/mdm/model/query/mst/SaleChannelQuery.java
  35. 56 61
      src/main/java/com/dk/mdm/model/query/mst/WarehouseQuery.java
  36. 353 0
      src/main/java/com/dk/mdm/model/response/mst/CustomerResponse.java
  37. 114 0
      src/main/java/com/dk/mdm/model/response/mst/DictionaryDataResponse.java
  38. 9 0
      src/main/java/com/dk/mdm/model/response/mst/MoneyAccountResponse.java
  39. 110 0
      src/main/java/com/dk/mdm/model/response/mst/SaleChannelResponse.java
  40. 126 0
      src/main/java/com/dk/mdm/model/response/mst/WarehouseResponse.java
  41. 353 0
      src/main/java/com/dk/mdm/model/vo/mst/CustomerVO.java
  42. 26 37
      src/main/java/com/dk/mdm/model/vo/mst/DictionaryDataVO.java
  43. 183 0
      src/main/java/com/dk/mdm/model/vo/mst/SaleChannelVO.java
  44. 199 0
      src/main/java/com/dk/mdm/model/vo/mst/WarehouseVO.java
  45. 14 1
      src/main/java/com/dk/mdm/model/vo/sale/OrderVO.java
  46. 0 104
      src/main/java/com/dk/mdm/service/core/DictionaryDataService.java
  47. 23 0
      src/main/java/com/dk/mdm/service/mst/CustomerService.java
  48. 109 0
      src/main/java/com/dk/mdm/service/mst/DictionaryDataService.java
  49. 23 1
      src/main/java/com/dk/mdm/service/mst/MoneyAccountService.java
  50. 111 0
      src/main/java/com/dk/mdm/service/mst/SaleChannelService.java
  51. 109 0
      src/main/java/com/dk/mdm/service/mst/WarehouseService.java
  52. 57 13
      src/main/java/com/dk/mdm/service/sale/OrderService.java

+ 24 - 0
src/main/java/com/dk/mdm/controller/mst/CustomerController.java

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.mdm.model.pojo.mst.Customer;
+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.mst.CustomerService;
+
+@Api(tags = "客户资料API接口")
+@RestController
+@RequestMapping("/mst/customer")
+public class CustomerController{
+
+    public BaseService<Customer> getService() {
+        return customerService;
+    }
+
+    @Autowired
+    private CustomerService customerService;
+
+}

+ 37 - 31
src/main/java/com/dk/mdm/controller/core/DictionaryDataController.java → src/main/java/com/dk/mdm/controller/mst/DictionaryDataController.java

@@ -1,21 +1,21 @@
-package com.dk.mdm.controller.core;
+package com.dk.mdm.controller.mst;
 
 import com.dk.common.model.pojo.PageList;
 import com.dk.common.response.ResponseResultVO;
-import com.dk.mdm.model.pojo.core.DictionaryData;
+import com.dk.mdm.model.pojo.mst.DictionaryData;
 import com.dk.common.service.BaseService;
-import com.dk.mdm.model.query.core.DictionaryDataQuery;
-import com.dk.mdm.model.response.core.DictionaryDataResponse;
-import com.dk.mdm.model.vo.core.DictionaryDataVO;
+import com.dk.mdm.model.query.mst.DictionaryDataQuery;
+import com.dk.mdm.model.response.mst.DictionaryDataResponse;
+import com.dk.mdm.model.vo.mst.DictionaryDataVO;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import io.swagger.annotations.Api;
-import com.dk.mdm.service.core.DictionaryDataService;
+import com.dk.mdm.service.mst.DictionaryDataService;
 
 @Api(tags = "数据字典API接口")
 @RestController
-@RequestMapping("/core/dictionaryData")
+@RequestMapping("/mst/dictionaryData")
 public class DictionaryDataController{
 
     public BaseService<DictionaryData> getService() {
@@ -25,60 +25,66 @@ public class DictionaryDataController{
     @Autowired
     private DictionaryDataService dictionaryDataService;
 
-    
+
+
 
     /**
-     * @desc   : 条件查询
-     * @author : 常皓宁
-     * @date   : 2023/2/7 10:14
+     * @desc : 条件查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
      */
-    @ApiOperation( value = "分页、关联、条件查询", notes = "分页、关联、条件查询" )
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
     @PostMapping({"list_by"})
-    public ResponseResultVO<PageList<DictionaryDataResponse>> selectByCond(@RequestBody DictionaryDataQuery dictionaryDataQuery){
+    public ResponseResultVO<PageList<DictionaryDataResponse>> selectByCond(@RequestBody DictionaryDataQuery dictionaryDataQuery) {
         return dictionaryDataService.selectByCond(dictionaryDataQuery);
     }
 
+
     /**
-     * @desc   : 新建数据字典
-     * @author : 常皓宁
-     * @date   : 2023/2/7 11:15
+     * @desc : 新建
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
      */
-    @ApiOperation( value = "新建窑车", notes = "新建窑车 " )
+    @ApiOperation(value = "新建", notes = "新建")
     @PostMapping({"insert"})
-    public ResponseResultVO<?> insert(@RequestBody DictionaryDataVO dictionaryDataVO){
+    public ResponseResultVO<?> insert(@RequestBody DictionaryDataVO dictionaryDataVO) {
         return dictionaryDataService.insert(dictionaryDataVO);
     }
 
+
+
+
     /**
-     * @desc   : 编辑数据字典
-     * @author : 常皓宁
-     * @date   : 2023/2/7 11:30
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
      */
-    @ApiOperation( value = "编辑数据字典", notes = "编辑数据字典 " )
+    @ApiOperation( value = "编辑", notes = "编辑" )
     @PostMapping({"update"})
-    public ResponseResultVO<?> update(@RequestBody DictionaryDataVO dictionaryDataVO){
+    public ResponseResultVO<?> update(@RequestBody DictionaryDataVO dictionaryDataVO) {
         return dictionaryDataService.update(dictionaryDataVO);
     }
 
+
+
     /**
      * @desc : 停用
-     * @author : 常皓宁
-     * @date : 2023/1/9 13:40
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
      */
-    @ApiOperation(value = "停用" , notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable String id){
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
         return this.getService().disable(id);
     }
 
     /**
      * @desc : 启用
-     * @author : 常皓宁
-     * @date : 2023/1/9 13:40
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
      */
-    @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable String id){
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
         return this.getService().enable(id);
     }
+
 }

+ 13 - 0
src/main/java/com/dk/mdm/controller/mst/MoneyAccountController.java

@@ -37,6 +37,17 @@ public class MoneyAccountController{
     }
 
     /**
+     * @desc   : 通过ID查询
+     * @author : songy
+     * @date   : 2024/3/1 16:01
+     */
+    @PostMapping({"/{id}"})
+    public ResponseResultVO selectById(@PathVariable String id) {
+        return moneyAccountService.selectById(id);
+    }
+
+
+    /**
      * @desc : 新建资金账户
      * @author : songy
      * @date : 2023/2/29 10:48
@@ -58,6 +69,8 @@ public class MoneyAccountController{
         return moneyAccountService.update(moneyAccountVO);
     }
 
+
+
     /**
      * @desc : 停用
      * @author : songy

+ 86 - 0
src/main/java/com/dk/mdm/controller/mst/SaleChannelController.java

@@ -0,0 +1,86 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.mst.SaleChannel;
+import com.dk.common.service.BaseService;
+import com.dk.mdm.model.query.mst.SaleChannelQuery;
+import com.dk.mdm.model.response.mst.WarehouseResponse;
+import com.dk.mdm.model.vo.mst.SaleChannelVO;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.SaleChannelService;
+
+@Api(tags = "销售渠道API接口")
+@RestController
+@RequestMapping("/mst/saleChannel")
+public class SaleChannelController{
+
+    public BaseService<SaleChannel> getService() {
+        return saleChannelService;
+    }
+
+    @Autowired
+    private SaleChannelService saleChannelService;
+
+
+
+    /**
+     * @desc : 条件查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<WarehouseResponse>> selectByCond(@RequestBody SaleChannelQuery saleChannelQuery) {
+        return saleChannelService.selectByCond(saleChannelQuery);
+    }
+
+    /**
+     * @desc : 新建
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation(value = "新建", notes = "新建")
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody SaleChannelVO saleChannelVO) {
+        return saleChannelService.insert(saleChannelVO);
+    }
+
+
+    /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "编辑", notes = "编辑" )
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody SaleChannelVO saleChannelVO) {
+        return saleChannelService.update(saleChannelVO);
+    }
+
+
+
+    /**
+     * @desc : 停用
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("disable/{id}")
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
+        return this.getService().disable(id);
+    }
+
+    /**
+     * @desc : 启用
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("enable/{id}")
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
+        return this.getService().enable(id);
+    }
+
+}

+ 85 - 0
src/main/java/com/dk/mdm/controller/mst/WarehouseController.java

@@ -0,0 +1,85 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.mst.Warehouse;
+import com.dk.common.service.BaseService;
+import com.dk.mdm.model.query.mst.WarehouseQuery;
+import com.dk.mdm.model.response.mst.WarehouseResponse;
+import com.dk.mdm.model.vo.mst.WarehouseVO;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.WarehouseService;
+
+@Api(tags = "仓库档案API接口")
+@RestController
+@RequestMapping("/mst/warehouse")
+public class WarehouseController{
+
+    public BaseService<Warehouse> getService() {
+        return warehouseService;
+    }
+
+    @Autowired
+    private WarehouseService warehouseService;
+
+
+    /**
+     * @desc : 条件查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<WarehouseResponse>> selectByCond(@RequestBody WarehouseQuery warehouseQuery) {
+        return warehouseService.selectByCond(warehouseQuery);
+    }
+
+    /**
+     * @desc : 新建
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation(value = "新建", notes = "新建")
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody WarehouseVO warehouseVO) {
+        return warehouseService.insert(warehouseVO);
+    }
+
+
+    /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "编辑", notes = "编辑" )
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody WarehouseVO warehouseVO) {
+        return warehouseService.update(warehouseVO);
+    }
+
+
+
+    /**
+     * @desc : 停用
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("disable/{id}")
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
+        return this.getService().disable(id);
+    }
+
+    /**
+     * @desc : 启用
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("enable/{id}")
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
+        return this.getService().enable(id);
+    }
+
+}

+ 0 - 20
src/main/java/com/dk/mdm/infrastructure/convert/core/DictionaryDataConvert.java

@@ -1,20 +0,0 @@
-package com.dk.mdm.infrastructure.convert.core;
-
-import com.dk.mdm.model.pojo.core.DictionaryData;
-import com.dk.mdm.model.vo.core.DictionaryDataVO;
-import org.mapstruct.Mapper;
-
-/**
- * @desc   : DictionaryData转换类
- * @author : 常皓宁
- * @date   : 2023/2/7 11:26
- */
-@Mapper(componentModel = "spring")
-public interface DictionaryDataConvert {
-    /**
-     * @desc   : 转换vo为pojo
-     * @author : 常皓宁
-     * @date   : 2023/2/7 11:27
-     */
-    DictionaryData converToPo(DictionaryDataVO dictionaryDataVO);
-}

+ 10 - 0
src/main/java/com/dk/mdm/infrastructure/convert/mst/DictionaryDataConvert.java

@@ -0,0 +1,10 @@
+package com.dk.mdm.infrastructure.convert.mst;
+
+import com.dk.mdm.model.pojo.mst.DictionaryData;
+import com.dk.mdm.model.vo.mst.DictionaryDataVO;
+import org.mapstruct.Mapper;
+
+@Mapper(componentModel = "spring")
+public interface DictionaryDataConvert {
+    DictionaryData convertToPo(DictionaryDataVO dictionaryDataVO);
+}

+ 11 - 0
src/main/java/com/dk/mdm/infrastructure/convert/mst/SaleChannelConvert.java

@@ -0,0 +1,11 @@
+package com.dk.mdm.infrastructure.convert.mst;
+
+import com.dk.mdm.model.pojo.mst.SaleChannel;
+import com.dk.mdm.model.vo.mst.SaleChannelVO;
+import org.mapstruct.Mapper;
+
+@Mapper(componentModel = "spring")
+public interface SaleChannelConvert {
+
+    SaleChannel convertToPo(SaleChannelVO saleChannelVO);
+}

+ 10 - 0
src/main/java/com/dk/mdm/infrastructure/convert/mst/WarehouseConvert.java

@@ -0,0 +1,10 @@
+package com.dk.mdm.infrastructure.convert.mst;
+
+import com.dk.mdm.model.pojo.mst.Warehouse;
+import com.dk.mdm.model.vo.mst.WarehouseVO;
+import org.mapstruct.Mapper;
+
+@Mapper(componentModel = "spring")
+public interface WarehouseConvert {
+    Warehouse convertToPo(WarehouseVO warehouseVo);
+}

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

@@ -2805,6 +2805,7 @@
                  left join dkic_b.t_mst_goods_series as tmgseries on tmgs.series_id = tmgseries.series_id
                  left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
         where tmgs.flg_valid
+          and tmgs.cp_id = #{cpId}
         <if test="skuCode != null">
             AND tmgs.sku_code = #{skuCode}
         </if>
@@ -2819,6 +2820,7 @@
         count(1)
         from dkic_b.t_mst_goods_sku as tmgs
         where tmgs.flg_valid
+          and tmgs.cp_id = #{cpId}
         <if test="skuCode != null">
             AND tmgs.sku_code = #{skuCode}
         </if>
@@ -2827,7 +2829,7 @@
         </if>
     </select>
 
-    <!-- 获取商品 -->
+    <!-- 获取客户 -->
     <select id="getCustomer" resultType="java.util.Map">
         select tmc.cus_id             as "cusId",
                tmc.cus_code           as "cusCode",
@@ -2865,6 +2867,7 @@
                  inner join dkic_b.t_mst_sale_channel tmsc on tmc.channel_id = tmsc.channel_id
                  left join dkic_b.t_mst_dictionary_data tmdd on tmc.cus_from = tmdd.data_id
         where tmc.flg_valid
+          and tmc.cp_id = #{cpId}
         <if test="skuCode != null">
             AND tmc.cus_code = #{cusCode}
         </if>
@@ -2879,6 +2882,7 @@
         count(1)
         from dkic_b.t_mst_customer as tmc
         where tmc.flg_valid
+          and tmc.cp_id = #{cpId}
         <if test="skuCode != null">
             AND tmc.cus_code = #{cusCode}
         </if>

+ 0 - 38
src/main/java/com/dk/mdm/mapper/core/DictionaryDataMapper.java

@@ -1,38 +0,0 @@
-package com.dk.mdm.mapper.core;
-
-import com.dk.mdm.model.pojo.core.DictionaryData;
-import com.dk.mdm.model.query.core.DictionaryDataQuery;
-import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.response.core.DictionaryDataResponse;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
-*  数据字典 Mapper
-*/
-@Repository
-public interface DictionaryDataMapper extends BaseMapper<DictionaryData>{
-
-    /**
-     * @desc   : 条件查询
-     * @author : 常皓宁
-     * @date   : 2023/2/7 10:18
-     */
-    List<DictionaryDataResponse> selectByCond(DictionaryDataQuery dictionaryDataQuery);
-
-    /**
-     * @desc   : 根据条件进行查询(数量)
-     * @author : 常皓宁
-     * @date   : 2023/2/7 10:27
-     */
-    Long countByCond(DictionaryDataQuery dictionaryDataQuery);
-
-    /**
-     * @desc   : 判断字典项目是否重复
-     * @author : 常皓宁
-     * @date   : 2023/2/10 8:44
-     */
-    Long selectByCode(DictionaryData dictionaryData);
-}
-

+ 0 - 137
src/main/java/com/dk/mdm/mapper/core/DictionaryDataMapper.xml

@@ -1,137 +0,0 @@
-<?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.core.DictionaryDataMapper">
-
-    <!-- 通用设置 -->
-    <!-- 通用查询列 -->
-    <sql id="Base_Column_List">
-        tdd
-        .
-        data_id
-        , tdd.data_value, tdd.display_no, tdd.remarks, tdd.flg_valid, tdd.fty_id, tdd.op_create_time, tdd.op_create_user_id,
-        tdd.op_update_time, tdd.op_update_user_id, tdd.op_app_code, tdd.op_timestamp, tdd.op_db_user, tdd.sys_code, tdd.sys_desc,
-        tdd.flg_sys,tdd.data_code
-    </sql>
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.core.DictionaryData">
-        <id column="data_id" property="dataId"/>
-        <result column="dict_code" property="dictCode"/>
-        <result column="data_value" property="dataValue"/>
-        <result column="data_code" property="dataCode"/>
-        <result column="display_no" property="displayNo"/>
-        <result column="remarks" property="remarks"/>
-        <result column="flg_valid" property="flgValid"/>
-        <result column="fty_id" property="ftyId"/>
-        <result column="op_create_time" property="opCreateTime"
-                typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
-        <result column="op_create_user_id" property="opCreateUserId"/>
-        <result column="op_update_time" property="opUpdateTime"
-                typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
-        <result column="op_update_user_id" property="opUpdateUserId"/>
-        <result column="op_app_code" property="opAppCode"/>
-        <result column="op_timestamp" property="opTimestamp"
-                typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
-        <result column="op_db_user" property="opDbUser"/>
-        <result column="sys_code" property="sysCode"/>
-        <result column="sys_desc" property="sysDesc"/>
-        <result column="flg_sys" property="flgSys"/>
-    </resultMap>
-
-    <!-- 通用条件列 -->
-    <sql id="Condition">
-        <where>
-            <if test="dictCode != null and dictCode != ''">
-                AND tdd.dict_code = #{dictCode}
-            </if>
-            <if test="dataValue != null and dataValue != ''">
-                AND position(#{dataValue} in tdd.data_value) > 0
-            </if>
-            <if test="displayNo != null">
-                AND tdd.display_no = #{displayNo}
-            </if>
-            <if test="remarks != null and remarks != ''">
-                AND tdd.remarks = #{remarks}
-            </if>
-            <if test="flgValid != null">
-                AND tdd.flg_valid = #{flgValid}
-            </if>
-            <if test="ftyId != null">
-                AND (tdd.fty_id = 0 OR tdd.fty_id = #{ftyId})
-            </if>
-            <if test="opCreateTime != null">
-                AND tdd.op_create_time = #{opCreateTime}
-            </if>
-            <if test="opCreateUserId != null">
-                AND tdd.op_create_user_id = #{opCreateUserId}
-            </if>
-            <if test="opUpdateTime != null">
-                AND tdd.op_update_time = #{opUpdateTime}
-            </if>
-            <if test="opUpdateUserId != null">
-                AND tdd.op_update_user_id = #{opUpdateUserId}
-            </if>
-            <if test="opAppCode != null and opAppCode != ''">
-                AND tdd.op_app_code = #{opAppCode}
-            </if>
-            <if test="opTimestamp != null">
-                AND tdd.op_timestamp = #{opTimestamp}
-            </if>
-            <if test="opDbUser != null and opDbUser != ''">
-                AND tdd.op_db_user = #{opDbUser}
-            </if>
-            <if test="sysCode != null and sysCode != ''">
-                AND tdd.sys_code = #{sysCode}
-            </if>
-            <if test="sysDesc != null and sysDesc != ''">
-                AND tdd.sys_desc = #{sysDesc}
-            </if>
-            <if test="flgSys != null">
-                AND tdd.flg_sys = #{flgSys}
-            </if>
-            <if test="flgValidList != null and flgValidList.size()>0">
-                AND tdd.flg_valid =
-                any(#{flgValidList, typeHandler=BooleanListTypeHandler})
-            </if>
-        </where>
-    </sql>
-
-    <!-- 查询表core.t_dictionary_data,(条件查询+分页)列表 -->
-    <select id="selectByCond" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        ,sys.f_get_name_i18n_lang(tdi.dict_name_i18n,#{i18n}) as "dict_Code"
-        FROM core.t_dictionary_data as tdd
-        left join sys.t_dictionary_item as tdi
-        on tdd.dict_code = tdi.dict_code
-        <include refid="Condition"/>
-        order by tdd.flg_valid desc, tdd.display_no
-        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
-            limit #{end} offset #{start}
-        </if>
-    </select>
-
-    <!-- 查询表core.t_dictionary_data,(条件查询)个数 -->
-    <select id="countByCond" resultType="Long">
-        SELECT
-        count(1)
-        FROM core.t_dictionary_data as tdd
-        left join sys.t_dictionary_item as tdi
-        on tdd.dict_code = tdi.dict_code
-        <include refid="Condition"/>
-    </select>
-
-    <!--判断字典项目是否重复-->
-    <select id="selectByCode" resultType="Long">
-        select count(1)
-        from core.t_dictionary_data
-        where #{dataValue} = data_value
-        AND (fty_id = 0 OR fty_id = #{ftyId})
-        <if test="dictCode != null">
-            and dict_code = #{dictCode}
-        </if>
-        <if test="dataId != null and dataId != 0">
-            and data_id != #{dataId}
-        </if>
-    </select>
-</mapper>

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

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.Customer;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  客户资料 Mapper
+*/
+@Repository
+public interface CustomerMapper extends BaseMapper<Customer>{
+	
+}
+

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

@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mst.CustomerMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        cus_id, cus_code, cus_name, cus_phone, address_area, address_name, address_no, address_gcj02, address_full, contact_name, contact_phone, cus_from, channel_id, org_id, staff_id, report_staff, report_time, sale_status, remarks, follow_staffs, last_follow_staff, last_follow_id, last_follow_status, last_follow_time, follow_count, 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.mst.Customer">
+        <id column="cus_id" property="cusId"/>
+                <result column="cus_code" property="cusCode"/>
+                <result column="cus_name" property="cusName"/>
+                <result column="cus_phone" property="cusPhone"/>
+                <result column="address_area" property="addressArea" typeHandler="JsonTypeHandler"/>
+                <result column="address_name" property="addressName"/>
+                <result column="address_no" property="addressNo"/>
+                <result column="address_gcj02" property="addressGcj02" typeHandler="JsonTypeHandler"/>
+                <result column="address_full" property="addressFull"/>
+                <result column="contact_name" property="contactName"/>
+                <result column="contact_phone" property="contactPhone"/>
+                <result column="cus_from" property="cusFrom" typeHandler="UuidTypeHandler"/>
+                <result column="channel_id" property="channelId" typeHandler="UuidTypeHandler"/>
+                <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+                <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+                <result column="report_staff" property="reportStaff" typeHandler="UuidTypeHandler"/>
+            <result column="report_time" property="reportTime" typeHandler="TimestampTypeHandler"/>
+                <result column="sale_status" property="saleStatus"/>
+                <result column="remarks" property="remarks"/>
+                <result column="follow_staffs" property="followStaffs" typeHandler="UuidListTypeHandler"/>
+                <result column="last_follow_staff" property="lastFollowStaff" typeHandler="UuidTypeHandler"/>
+                <result column="last_follow_id" property="lastFollowId" typeHandler="UuidTypeHandler"/>
+                <result column="last_follow_status" property="lastFollowStatus"/>
+            <result column="last_follow_time" property="lastFollowTime" typeHandler="TimestampTypeHandler"/>
+                <result column="follow_count" property="followCount"/>
+                <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="cusCode != null and cusCode != ''">
+                AND cus_code = #{cusCode}
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND cus_name = #{cusName}
+            </if>
+            <if test="cusPhone != null and cusPhone != ''">
+                AND cus_phone = #{cusPhone}
+            </if>
+            <if test="addressArea != null and addressArea != ''">
+                AND address_area = #{addressArea}
+            </if>
+            <if test="addressName != null and addressName != ''">
+                AND address_name = #{addressName}
+            </if>
+            <if test="addressNo != null and addressNo != ''">
+                AND address_no = #{addressNo}
+            </if>
+            <if test="addressGcj02 != null and addressGcj02 != ''">
+                AND address_gcj02 = #{addressGcj02}
+            </if>
+            <if test="addressFull != null and addressFull != ''">
+                AND address_full = #{addressFull}
+            </if>
+            <if test="contactName != null and contactName != ''">
+                AND contact_name = #{contactName}
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND contact_phone = #{contactPhone}
+            </if>
+            <if test="cusFrom != null and cusFrom != ''">
+                AND cus_from = #{cusFrom}
+            </if>
+            <if test="channelId != null and channelId != ''">
+                AND channel_id = #{channelId}
+            </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="reportStaff != null and reportStaff != ''">
+                AND report_staff = #{reportStaff}
+            </if>
+            <if test="reportTime != null">
+                AND report_time = #{reportTime}
+            </if>
+            <if test="saleStatus != null and saleStatus != ''">
+                AND sale_status = #{saleStatus}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="followStaffs != null and followStaffs != ''">
+                AND follow_staffs = #{followStaffs}
+            </if>
+            <if test="lastFollowStaff != null and lastFollowStaff != ''">
+                AND last_follow_staff = #{lastFollowStaff}
+            </if>
+            <if test="lastFollowId != null and lastFollowId != ''">
+                AND last_follow_id = #{lastFollowId}
+            </if>
+            <if test="lastFollowStatus != null and lastFollowStatus != ''">
+                AND last_follow_status = #{lastFollowStatus}
+            </if>
+            <if test="lastFollowTime != null">
+                AND last_follow_time = #{lastFollowTime}
+            </if>
+            <if test="followCount != null">
+                AND follow_count = #{followCount}
+            </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">
+        <!-- 根据主键cusId批量操作 -->
+        WHERE cus_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_customer,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_customer,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_mst_customer
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_customer的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        WHERE cus_id = #{cusId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_customer的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        WHERE cus_id = #{cusId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_customer的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_mst_customer
+        (
+        <trim suffixOverrides=",">
+            cus_code,
+            cus_name,
+            cus_phone,
+            address_area,
+            address_name,
+            address_no,
+            address_gcj02,
+            address_full,
+            contact_name,
+            contact_phone,
+            cus_from,
+            channel_id,
+            org_id,
+            staff_id,
+            report_staff,
+            report_time,
+            sale_status,
+            remarks,
+            follow_staffs,
+            last_follow_staff,
+            last_follow_id,
+            last_follow_status,
+            last_follow_time,
+            follow_count,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.cusCode},
+                #{item.cusName},
+                #{item.cusPhone},
+                #{item.addressArea},
+                #{item.addressName},
+                #{item.addressNo},
+                #{item.addressGcj02},
+                #{item.addressFull},
+                #{item.contactName},
+                #{item.contactPhone},
+                #{item.cusFrom}::uuid,
+                #{item.channelId}::uuid,
+                #{item.orgId}::uuid,
+                #{item.staffId}::uuid,
+                #{item.reportStaff}::uuid,
+                #{item.reportTime},
+                #{item.saleStatus},
+                #{item.remarks},
+                #{item.followStaffs},
+                #{item.lastFollowStaff}::uuid,
+                #{item.lastFollowId}::uuid,
+                #{item.lastFollowStatus},
+                #{item.lastFollowTime},
+                #{item.followCount},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 38 - 0
src/main/java/com/dk/mdm/mapper/mst/DictionaryDataMapper.java

@@ -0,0 +1,38 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.DictionaryData;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.DictionaryDataQuery;
+import com.dk.mdm.model.query.mst.GoodsBrandQuery;
+import com.dk.mdm.model.response.mst.DictionaryDataResponse;
+import com.dk.mdm.model.response.mst.GoodsBrandResponse;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+*  数据字典 Mapper
+*/
+@Repository
+public interface DictionaryDataMapper extends BaseMapper<DictionaryData>{
+    /**
+     * @desc   : 根据条件进行查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    List<DictionaryDataResponse> selectByCond(DictionaryDataQuery dictionaryDataQuery);
+
+    /**
+     * @desc   : 根据条件进行查询(数量)
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Long countByCond(DictionaryDataQuery dictionaryDataQuery);
+    /**
+     * @desc   : 查询排序
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Integer selectDisplayNo(DictionaryDataQuery dictionaryDataQuery);
+}
+

+ 194 - 0
src/main/java/com/dk/mdm/mapper/mst/DictionaryDataMapper.xml

@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mst.DictionaryDataMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        data_id, dict_code, data_value, display_no, remarks, 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, sys_code, data_code, flg_default
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.DictionaryData">
+        <id column="data_id" property="dataId"/>
+                <result column="dict_code" property="dictCode"/>
+                <result column="data_value" property="dataValue"/>
+                <result column="display_no" property="displayNo"/>
+                <result column="remarks" property="remarks"/>
+                <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"/>
+                <result column="sys_code" property="sysCode"/>
+                <result column="data_code" property="dataCode"/>
+                <result column="flg_default" property="flgDefault"/>
+    </resultMap>
+
+    <sql id="Base_Column_List_Response">
+        data_id, dict_code, data_value, display_no, remarks, flg_valid, cp_id, data_code, flg_default
+    </sql>
+
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mst.DictionaryDataResponse">
+        <id column="data_id" property="dataId"/>
+        <result column="dict_code" property="dictCode"/>
+        <result column="data_value" property="dataValue"/>
+        <result column="display_no" property="displayNo"/>
+        <result column="remarks" property="remarks"/>
+        <result column="flg_valid" property="flgValid"/>
+        <result column="cp_id" property="cpId"/>
+        <result column="data_code" property="dataCode"/>
+        <result column="flg_default" property="flgDefault"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="dictCode != null and dictCode != ''">
+                AND dict_code = #{dictCode}
+            </if>
+            <if test="dataValue != null and dataValue != ''">
+                AND data_value = #{dataValue}
+            </if>
+            <if test="displayNo != null">
+                AND display_no = #{displayNo}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </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>
+            <if test="sysCode != null and sysCode != ''">
+                AND sys_code = #{sysCode}
+            </if>
+            <if test="dataCode != null and dataCode != ''">
+                AND data_code = #{dataCode}
+            </if>
+            <if test="flgDefault != null">
+                AND flg_default = #{flgDefault}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键dataId批量操作 -->
+        WHERE data_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_dictionary_data,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
+        SELECT
+        <include refid="Base_Column_List_Response"/>
+        FROM dkic_b.t_mst_dictionary_data
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_dictionary_data,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM dkic_b.t_mst_dictionary_data
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_dictionary_data的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_dictionary_data
+        WHERE data_id = #{dataId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_dictionary_data的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_dictionary_data
+        WHERE data_id = #{dataId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_dictionary_data的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_dictionary_data
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into dkic_b.t_mst_dictionary_data
+        (
+        <trim suffixOverrides=",">
+            dict_code,
+            data_value,
+            display_no,
+            remarks,
+            cp_id,
+            op_app_code,
+            sys_code,
+            data_code,
+            flg_default,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.dictCode},
+                #{item.dataValue},
+                #{item.displayNo},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+                #{item.sysCode},
+                #{item.dataCode},
+                #{item.flgDefault},
+            </trim>
+            )
+        </foreach>
+    </insert>
+
+
+    <select id="selectDisplayNo" resultType="Integer">
+        SELECT MAX(display_no) + 1  FROM dkic_b.t_mst_dictionary_data
+        <include refid="Condition"/>
+    </select>
+
+</mapper>

+ 10 - 2
src/main/java/com/dk/mdm/mapper/mst/MoneyAccountMapper.java

@@ -2,6 +2,7 @@ package com.dk.mdm.mapper.mst;
 
 import com.dk.mdm.model.pojo.mst.MoneyAccount;
 import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.GoodsBrandQuery;
 import com.dk.mdm.model.query.mst.MoneyAccountQuery;
 import com.dk.mdm.model.response.mst.MoneyAccountResponse;
 import org.springframework.stereotype.Repository;
@@ -16,15 +17,22 @@ public interface MoneyAccountMapper extends BaseMapper<MoneyAccount>{
     /**
      * @desc   : 根据条件进行查询
      * @author : songy
-     * @date   : 2023/1/9 10:42
+     * @date   : 2024/3/1 10:42
      */
     List<MoneyAccountResponse> selectByCond(MoneyAccountQuery moneyAccountQuery);
 
     /**
      * @desc   : 根据条件进行查询(数量)
      * @author : songy
-     * @date   : 2023/1/9 10:42
+     * @date   : 2024/3/1 10:42
      */
     Long countByCond(MoneyAccountQuery moneyAccountQuery);
+
+   /**
+    * @desc   : 查询
+    * @author : songy
+    * @date   : 2024/3/2 16:19
+    */
+    Integer selectDisplayNo(MoneyAccountQuery moneyAccountQuery);
 }
 

+ 25 - 96
src/main/java/com/dk/mdm/mapper/mst/MoneyAccountMapper.xml

@@ -9,7 +9,7 @@
     </sql>
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.MoneyAccount">
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.response.mst.MoneyAccountResponse">
         <id column="mac_id" property="macId"/>
                 <result column="mac_code" property="macCode"/>
                 <result column="mac_name" property="macName"/>
@@ -34,55 +34,37 @@
     <sql id="Condition">
         <where>
             <if test="macCode != null and macCode != ''">
-                AND mac_code = #{macCode}
+                AND ma.mac_code = #{macCode}
             </if>
             <if test="macName != null and macName != ''">
-                AND mac_name = #{macName}
-            </if>
-            <if test="macType != null and macType != ''">
-                AND mac_type = #{macType}
-            </if>
-            <if test="balance != null">
-                AND balance = #{balance}
-            </if>
-            <if test="displayNo != null">
-                AND display_no = #{displayNo}
-            </if>
-            <if test="flgDefault != null">
-                AND flg_default = #{flgDefault}
-            </if>
-            <if test="macReceiptCode != null and macReceiptCode != ''">
-                AND mac_receipt_code = #{macReceiptCode}
+                AND ma.mac_name = #{macName}
             </if>
             <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
-            </if>
-            <if test="flgValid != null">
-                AND flg_valid = #{flgValid}
+                AND ma.remarks = #{remarks}
             </if>
             <if test="cpId != null">
-                AND cp_id = #{cpId}
+                AND ma.cp_id = #{cpId}
             </if>
             <if test="opCreateTime != null">
-                AND op_create_time = #{opCreateTime}
+                AND ma.op_create_time = #{opCreateTime}
             </if>
             <if test="opCreateUserId != null and opCreateUserId != ''">
-                AND op_create_user_id = #{opCreateUserId}
+                AND ma.op_create_user_id = #{opCreateUserId}
             </if>
             <if test="opUpdateTime != null">
-                AND op_update_time = #{opUpdateTime}
+                AND ma.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}
+                AND ma.op_update_user_id = #{opUpdateUserId}
             </if>
             <if test="opTimestamp != null">
-                AND op_timestamp = #{opTimestamp}
+                AND ma.op_timestamp = #{opTimestamp}
             </if>
-            <if test="opDbUser != null and opDbUser != ''">
-                AND op_db_user = #{opDbUser}
+            <if test="flgValidList != null and flgValidList.size>0">
+                AND ma.flg_valid  =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
+            </if>
+            <if test="macTypeList != null and macTypeList.size() > 0">
+                AND ma.mac_Type  =any(#{macTypeList, typeHandler=UuidListTypeHandler})
             </if>
         </where>
     </sql>
@@ -97,9 +79,12 @@
 
     <!-- 查询表t_mst_money_account,(条件查询+分页)列表 -->
     <select id="selectByCond" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_mst_money_account
+        SELECT ma.mac_Type,ma.mac_code,ma.mac_name,ma.remarks
+             ,ma.cp_id,ma.flg_valid
+             ,dd.data_value AS "macTypeName"
+             ,ma.mac_id,ma.balance,ma.display_no
+        FROM dkic_b.t_mst_money_account ma
+        left join dkic_b.t_mst_dictionary_data dd on ma.mac_type=dd.data_id
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -110,68 +95,12 @@
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM t_mst_money_account
+        FROM dkic_b.t_mst_money_account ma
         <include refid="Condition"/>
     </select>
 
-    <!-- 根据主键查询表t_mst_money_account的一行数据 -->
-    <select id="selectById" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_mst_money_account
-        WHERE mac_id = #{macId}::uuid
+    <select id="selectDisplayNo" resultType="Integer">
+        SELECT MAX(display_no) + 1  FROM dkic_b.t_mst_money_account ma
+         WHERE ma.cp_id = #{cpId}
     </select>
-
-    <!-- 根据主键锁定表t_mst_money_account的一行数据 -->
-    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_mst_money_account
-        WHERE mac_id = #{macId}
-        for update
-    </select>
-
-    <!-- 根据主键锁定表t_mst_money_account的多行数据 -->
-    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_mst_money_account
-        <include refid="idsForeach"/>
-        for update
-    </select>
-
-    <insert id="insertBatch">
-        insert into t_mst_money_account
-        (
-        <trim suffixOverrides=",">
-            mac_code,
-            mac_name,
-            mac_type,
-            balance,
-            display_no,
-            flg_default,
-            mac_receipt_code,
-            remarks,
-            cp_id,
-            op_app_code,
-        </trim>
-        )
-        values
-        <foreach collection="list" index="index" item="item" separator=",">
-            (
-            <trim suffixOverrides=",">
-                #{item.macCode},
-                #{item.macName},
-                #{item.macType}::uuid,
-                #{item.balance},
-                #{item.displayNo},
-                #{item.flgDefault},
-                #{item.macReceiptCode},
-                #{item.remarks},
-                #{item.cpId},
-                #{item.opAppCode},
-            </trim>
-            )
-        </foreach>
-    </insert>
 </mapper>

+ 38 - 0
src/main/java/com/dk/mdm/mapper/mst/SaleChannelMapper.java

@@ -0,0 +1,38 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.SaleChannel;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.SaleChannelQuery;
+import com.dk.mdm.model.response.mst.SaleChannelResponse;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 销售渠道 Mapper
+ */
+@Repository
+public interface SaleChannelMapper extends BaseMapper<SaleChannel> {
+    /**
+     * @desc : 根据条件进行查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    List<SaleChannelResponse> selectByCond(SaleChannelQuery saleChannelQuery);
+
+    /**
+     * @desc : 根据条件进行查询(数量)
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Long countByCond(SaleChannelQuery saleChannelQuery);
+
+
+    /**
+     * @desc : 查询排序
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Integer selectDisplayNo(SaleChannelQuery saleChannelQuery);
+}
+

+ 176 - 0
src/main/java/com/dk/mdm/mapper/mst/SaleChannelMapper.xml

@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mst.SaleChannelMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        channel_id, channel_code, channel_name, sys_code, display_no, remarks, 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.mst.SaleChannel">
+        <id column="channel_id" property="channelId"/>
+                <result column="channel_code" property="channelCode"/>
+                <result column="channel_name" property="channelName"/>
+                <result column="sys_code" property="sysCode"/>
+                <result column="display_no" property="displayNo"/>
+                <result column="remarks" property="remarks"/>
+                <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>
+
+
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mst.SaleChannelResponse">
+        <id column="channel_id" property="channelId"/>
+        <result column="channel_code" property="channelCode"/>
+        <result column="channel_name" property="channelName"/>
+        <result column="sys_code" property="sysCode"/>
+        <result column="display_no" property="displayNo"/>
+        <result column="remarks" property="remarks"/>
+        <result column="flg_valid" property="flgValid"/>
+        <result column="cp_id" property="cpId"/>
+
+    </resultMap>
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="channelCode != null and channelCode != ''">
+                AND channel_code = #{channelCode}
+            </if>
+            <if test="channelName != null and channelName != ''">
+                AND channel_name = #{channelName}
+            </if>
+            <if test="sysCode != null and sysCode != ''">
+                AND sys_code = #{sysCode}
+            </if>
+            <if test="displayNo != null">
+                AND display_no = #{displayNo}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </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">
+        <!-- 根据主键channelId批量操作 -->
+        WHERE channel_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_sale_channel,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_sale_channel
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_sale_channel,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM dkic_b.t_mst_sale_channel
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_sale_channel的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_sale_channel
+        WHERE channel_id = #{channelId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_sale_channel的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_sale_channel
+        WHERE channel_id = #{channelId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_sale_channel的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_sale_channel
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into dkic_b.t_mst_sale_channel
+        (
+        <trim suffixOverrides=",">
+            channel_code,
+            channel_name,
+            sys_code,
+            display_no,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.channelCode},
+                #{item.channelName},
+                #{item.sysCode},
+                #{item.displayNo},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+
+    <select id="selectDisplayNo" resultType="Integer">
+        SELECT MAX(display_no) + 1  FROM dkic_b.t_mst_sale_channel
+        <include refid="Condition"/>
+    </select>
+</mapper>

+ 40 - 0
src/main/java/com/dk/mdm/mapper/mst/WarehouseMapper.java

@@ -0,0 +1,40 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.Warehouse;
+import com.dk.common.mapper.BaseMapper;
+
+import com.dk.mdm.model.query.mst.WarehouseQuery;
+
+import com.dk.mdm.model.response.mst.WarehouseResponse;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+*  仓库档案 Mapper
+*/
+@Repository
+public interface WarehouseMapper extends BaseMapper<Warehouse>{
+    /**
+     * @desc   : 根据条件进行查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    List<WarehouseResponse> selectByCond(WarehouseQuery warehouseQuery);
+
+    /**
+     * @desc   : 根据条件进行查询(数量)
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Long countByCond(WarehouseQuery warehouseQuery);
+
+
+    /**
+     * @desc   : 查询排序
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Integer selectDisplayNo(WarehouseQuery warehouseQuery);
+}
+

+ 192 - 0
src/main/java/com/dk/mdm/mapper/mst/WarehouseMapper.xml

@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mst.WarehouseMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        wh_id, wh_code, wh_name, display_no, flg_default, supervisor, contact_phone, remarks, 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.mst.Warehouse">
+        <id column="wh_id" property="whId"/>
+                <result column="wh_code" property="whCode"/>
+                <result column="wh_name" property="whName"/>
+                <result column="display_no" property="displayNo"/>
+                <result column="flg_default" property="flgDefault"/>
+                <result column="supervisor" property="supervisor"/>
+                <result column="contact_phone" property="contactPhone"/>
+                <result column="remarks" property="remarks"/>
+                <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>
+
+
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mst.WarehouseResponse">
+        <id column="wh_id" property="whId"/>
+        <result column="wh_code" property="whCode"/>
+        <result column="wh_name" property="whName"/>
+        <result column="display_no" property="displayNo"/>
+        <result column="flg_default" property="flgDefault"/>
+        <result column="supervisor" property="supervisor"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="remarks" property="remarks"/>
+        <result column="flg_valid" property="flgValid"/>
+        <result column="cp_id" property="cpId"/>
+
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="whCode != null and whCode != ''">
+                AND wh_code = #{whCode}
+            </if>
+            <if test="whName != null and whName != ''">
+                AND wh_name = #{whName}
+            </if>
+            <if test="displayNo != null">
+                AND display_no = #{displayNo}
+            </if>
+            <if test="flgDefault != null">
+                AND flg_default = #{flgDefault}
+            </if>
+            <if test="supervisor != null and supervisor != ''">
+                AND supervisor = #{supervisor}
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND contact_phone = #{contactPhone}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </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">
+        <!-- 根据主键whId批量操作 -->
+        WHERE wh_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_warehouse,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_warehouse
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_warehouse,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM dkic_b.t_mst_warehouse
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_warehouse的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_warehouse
+        WHERE wh_id = #{whId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_warehouse的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_warehouse
+        WHERE wh_id = #{whId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_warehouse的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM dkic_b.t_mst_warehouse
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into dkic_b.t_mst_warehouse
+        (
+        <trim suffixOverrides=",">
+            wh_code,
+            wh_name,
+            display_no,
+            flg_default,
+            supervisor,
+            contact_phone,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.whCode},
+                #{item.whName},
+                #{item.displayNo},
+                #{item.flgDefault},
+                #{item.supervisor},
+                #{item.contactPhone},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+
+
+    <select id="selectDisplayNo" resultType="Integer">
+        SELECT MAX(display_no) + 1  FROM dkic_b.t_mst_warehouse
+        <include refid="Condition"/>
+    </select>
+</mapper>

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

@@ -141,6 +141,7 @@
         FROM dkic_b.t_psi_order_item as tpoi
                  inner join dkic_b.t_mst_goods_sku tmgs on tpoi.sku_id = tmgs.sku_id
         <include refid="Condition"/>
+        order by tpoi.item_index
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>

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

@@ -248,6 +248,7 @@
                  left join sys.t_data_kind as tdk2 on tpo.order_status = tdk2.kind_code
                  left join sys.t_data_kind as tdk3 on tpo.out_status = tdk3.kind_code
         <include refid="Condition"/>
+        order by tpo.make_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>

+ 348 - 0
src/main/java/com/dk/mdm/model/pojo/mst/Customer.java

@@ -0,0 +1,348 @@
+package com.dk.mdm.model.pojo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class Customer extends PageInfo<Customer> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+//    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @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 reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 26 - 37
src/main/java/com/dk/mdm/model/pojo/core/DictionaryData.java → src/main/java/com/dk/mdm/model/pojo/mst/DictionaryData.java

@@ -1,11 +1,11 @@
-package com.dk.mdm.model.pojo.core;
+package com.dk.mdm.model.pojo.mst;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.*;
 import java.io.Serializable;
 
 import com.dk.common.infrastructure.annotaiton.ExportTitle;
-import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.*;
 import com.dk.common.model.pojo.PageInfo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
@@ -15,7 +15,9 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
 
+import java.util.List;
 import java.time.LocalDateTime;
 
 /**
@@ -27,8 +29,8 @@ import java.time.LocalDateTime;
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @ExportTitle("数据字典")
-@TableName(value = "t_dictionary_data", schema =  "core",autoResultMap = true)
-@ApiModel(value="实体类:数据字典", description="表名:t_dictionary_data")
+@TableName(value = "t_mst_dictionary_data", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:数据字典", description="表名:t_mst_dictionary_data")
 public class DictionaryData extends PageInfo<DictionaryData> implements Serializable {
 
     /*
@@ -38,9 +40,9 @@ public class DictionaryData extends PageInfo<DictionaryData> implements Serializ
     /**
      * 数据ID
      */
-    @TableId(value = "data_id", type = IdType.AUTO)
     @ApiModelProperty(value = "数据ID")
-    private Integer dataId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String dataId;
 
 
     /**
@@ -58,19 +60,12 @@ public class DictionaryData extends PageInfo<DictionaryData> implements Serializ
     @ApiModelProperty(value = "字典数据")
     private String dataValue;
 
-    /**
-     * 外部编号
-     */
-    @Excel(name = "外部编号")
-    @ApiModelProperty(value = "外部编号")
-    private String dataCode;
-
 
     /**
-     * 显示顺序
+     * 显示顺序 (【1 ~ 46655】)
      */
-    @Excel(name = "显示顺序")
-    @ApiModelProperty(value = "显示顺序")
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
     private Integer displayNo;
 
 
@@ -91,11 +86,11 @@ public class DictionaryData extends PageInfo<DictionaryData> implements Serializ
 
 
     /**
-     * 工厂ID
+     * 企业ID
      */
-    @Excel(name = "工厂ID")
-    @ApiModelProperty(value = "工厂ID")
-    private Integer ftyId;
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
 
 
     /**
@@ -113,7 +108,8 @@ public class DictionaryData extends PageInfo<DictionaryData> implements Serializ
      */
     @Excel(name = "创建用户 (触发器自动处理)")
     @ApiModelProperty(value = "创建用户 (触发器自动处理)")
-    private Long opCreateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
 
 
     /**
@@ -131,7 +127,8 @@ public class DictionaryData extends PageInfo<DictionaryData> implements Serializ
      */
     @Excel(name = "修改用户 (触发器自动处理)")
     @ApiModelProperty(value = "修改用户 (触发器自动处理)")
-    private Long opUpdateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
 
 
     /**
@@ -161,27 +158,19 @@ public class DictionaryData extends PageInfo<DictionaryData> implements Serializ
 
 
     /**
-     * 系统代码(页面不显示)
+     * 系统代码 (页面不显示)
      */
-    @Excel(name = "系统代码(页面不显示)")
-    @ApiModelProperty(value = "系统代码(页面不显示)")
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
     private String sysCode;
 
 
-    /**
-     * 系统备注(页面不显示)
-     */
-    @Excel(name = "系统备注(页面不显示)")
-    @ApiModelProperty(value = "系统备注(页面不显示)")
-    private String sysDesc;
+    @ApiModelProperty(value = "")
+    private String dataCode;
 
 
-    /**
-     * 系统字典标识(系统字典时,用户不能编辑)
-     */
-    @Excel(name = "系统字典标识(系统字典时,用户不能编辑)")
-    @ApiModelProperty(value = "系统字典标识(系统字典时,用户不能编辑)")
-    private Boolean flgSys;
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
 
 
     /*

+ 2 - 2
src/main/java/com/dk/mdm/model/pojo/mst/MoneyAccount.java

@@ -41,7 +41,7 @@ public class MoneyAccount extends PageInfo<MoneyAccount> implements Serializable
     /**
      * 资金账户ID
      */
-    @TableId(value = "mac_id", type = IdType.AUTO)
+//    @TableId(value = "mac_id", type = IdType.AUTO)
     @ApiModelProperty(value = "资金账户ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String macId;
@@ -71,7 +71,6 @@ public class MoneyAccount extends PageInfo<MoneyAccount> implements Serializable
     @TableField(typeHandler = UuidTypeHandler.class)
     private String macType;
 
-
     /**
      * 账户余额
      */
@@ -120,6 +119,7 @@ public class MoneyAccount extends PageInfo<MoneyAccount> implements Serializable
     private Boolean flgValid;
 
 
+
     /**
      * 企业ID
      */

+ 181 - 0
src/main/java/com/dk/mdm/model/pojo/mst/SaleChannel.java

@@ -0,0 +1,181 @@
+package com.dk.mdm.model.pojo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  销售渠道
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售渠道")
+@TableName(value = "t_mst_sale_channel", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:销售渠道", description="表名:t_mst_sale_channel")
+public class SaleChannel extends PageInfo<SaleChannel> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 渠道ID
+     */
+    @ApiModelProperty(value = "渠道ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 渠道编号
+     */
+    @Excel(name = "渠道编号")
+    @ApiModelProperty(value = "渠道编号")
+    private String channelCode;
+
+
+    /**
+     * 渠道名称
+     */
+    @Excel(name = "渠道名称")
+    @ApiModelProperty(value = "渠道名称")
+    private String channelName;
+
+
+    /**
+     * 系统代码
+     */
+    @Excel(name = "系统代码")
+    @ApiModelProperty(value = "系统代码")
+    private String sysCode;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 197 - 0
src/main/java/com/dk/mdm/model/pojo/mst/Warehouse.java

@@ -0,0 +1,197 @@
+package com.dk.mdm.model.pojo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  仓库档案
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("仓库档案")
+@TableName(value = "t_mst_warehouse", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:仓库档案", description="表名:t_mst_warehouse")
+public class Warehouse extends PageInfo<Warehouse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 仓库ID
+     */
+    @ApiModelProperty(value = "仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whId;
+
+
+    /**
+     * 仓库编号
+     */
+    @Excel(name = "仓库编号")
+    @ApiModelProperty(value = "仓库编号")
+    private String whCode;
+
+
+    /**
+     * 仓库名称
+     */
+    @Excel(name = "仓库名称")
+    @ApiModelProperty(value = "仓库名称")
+    private String whName;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 默认值
+     */
+    @Excel(name = "默认值")
+    @ApiModelProperty(value = "默认值")
+    private Boolean flgDefault;
+
+
+    /**
+     * 仓库主管
+     */
+    @Excel(name = "仓库主管")
+    @ApiModelProperty(value = "仓库主管")
+    private String supervisor;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 1 - 1
src/main/java/com/dk/mdm/model/pojo/sale/Order.java

@@ -41,7 +41,7 @@ public class Order extends PageInfo<Order> implements Serializable {
     /**
      * 销售订单ID
      */
-    @TableId(value = "order_id", type = IdType.AUTO)
+    //@TableId(value = "order_id", type = IdType.AUTO)
     @ApiModelProperty(value = "销售订单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String orderId;

+ 353 - 0
src/main/java/com/dk/mdm/model/query/mst/CustomerQuery.java

@@ -0,0 +1,353 @@
+package com.dk.mdm.model.query.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+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.UuidListTypeHandler;
+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.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class CustomerQuery extends PageInfo<CustomerQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+//    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @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 reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 26 - 37
src/main/java/com/dk/mdm/model/vo/core/DictionaryDataVO.java → src/main/java/com/dk/mdm/model/query/mst/DictionaryDataQuery.java

@@ -1,4 +1,4 @@
-package com.dk.mdm.model.vo.core;
+package com.dk.mdm.model.query.mst;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.dk.common.infrastructure.annotaiton.ExportTitle;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -19,6 +20,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+
 /**
  *  数据字典
  */
@@ -28,9 +30,9 @@ import java.time.LocalDateTime;
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @ExportTitle("数据字典")
-@TableName(value = "t_dictionary_data",autoResultMap = true)
-@ApiModel(value="实体类:数据字典", description="表名:t_dictionary_data")
-public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Serializable {
+@TableName(value = "t_mst_dictionary_data", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:数据字典", description="表名:t_mst_dictionary_data")
+public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implements Serializable {
 
     /*
      * 数据库字段
@@ -41,7 +43,8 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
      */
     @TableId(value = "data_id", type = IdType.AUTO)
     @ApiModelProperty(value = "数据ID")
-    private Integer dataId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String dataId;
 
 
     /**
@@ -59,19 +62,12 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
     @ApiModelProperty(value = "字典数据")
     private String dataValue;
 
-    /**
-     * 外部编号
-     */
-    @Excel(name = "外部编号")
-    @ApiModelProperty(value = "外部编号")
-    private String dataCode;
-
 
     /**
-     * 显示顺序
+     * 显示顺序 (【1 ~ 46655】)
      */
-    @Excel(name = "显示顺序")
-    @ApiModelProperty(value = "显示顺序")
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
     private Integer displayNo;
 
 
@@ -92,11 +88,11 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
 
 
     /**
-     * 工厂ID
+     * 企业ID
      */
-    @Excel(name = "工厂ID")
-    @ApiModelProperty(value = "工厂ID")
-    private Integer ftyId;
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
 
 
     /**
@@ -114,7 +110,8 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
      */
     @Excel(name = "创建用户 (触发器自动处理)")
     @ApiModelProperty(value = "创建用户 (触发器自动处理)")
-    private Long opCreateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
 
 
     /**
@@ -132,7 +129,8 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
      */
     @Excel(name = "修改用户 (触发器自动处理)")
     @ApiModelProperty(value = "修改用户 (触发器自动处理)")
-    private Long opUpdateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
 
 
     /**
@@ -162,27 +160,19 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
 
 
     /**
-     * 系统代码(页面不显示)
+     * 系统代码 (页面不显示)
      */
-    @Excel(name = "系统代码(页面不显示)")
-    @ApiModelProperty(value = "系统代码(页面不显示)")
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
     private String sysCode;
 
 
-    /**
-     * 系统备注(页面不显示)
-     */
-    @Excel(name = "系统备注(页面不显示)")
-    @ApiModelProperty(value = "系统备注(页面不显示)")
-    private String sysDesc;
+    @ApiModelProperty(value = "")
+    private String dataCode;
 
 
-    /**
-     * 系统字典标识(系统字典时,用户不能编辑)
-     */
-    @Excel(name = "系统字典标识(系统字典时,用户不能编辑)")
-    @ApiModelProperty(value = "系统字典标识(系统字典时,用户不能编辑)")
-    private Boolean flgSys;
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
 
 
     /*
@@ -199,4 +189,3 @@ public class DictionaryDataVO extends PageInfo<DictionaryDataVO> implements Seri
     private static final long serialVersionUID = 1L;
 
 }
-

+ 20 - 0
src/main/java/com/dk/mdm/model/query/mst/MoneyAccountQuery.java

@@ -21,6 +21,7 @@ import lombok.experimental.Accessors;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  *  资金账户
@@ -193,6 +194,25 @@ public class MoneyAccountQuery extends PageInfo<MoneyAccountQuery> implements Se
     private String opDbUser;
 
 
+    /**
+     * @desc   : 有效标识List
+     * @author : songy
+     * @date   : 2024/3/2 9:31
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private List<Boolean> flgValidList;
+
+
+    /**
+     * @desc   : 账户类别list
+     * @author : songy
+     * @date   : 2024/3/2 9:27
+     */
+    @Excel(name = "账户类别 (【数据字典】)")
+    @ApiModelProperty(value = "账户类别 (【数据字典】)")
+    private List<String> macTypeList;
+
     /*
      * 相关属性
      * @TableField(exist = false)

+ 183 - 0
src/main/java/com/dk/mdm/model/query/mst/SaleChannelQuery.java

@@ -0,0 +1,183 @@
+package com.dk.mdm.model.query.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import 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.time.LocalDateTime;
+
+/**
+ *  销售渠道
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售渠道")
+@TableName(value = "t_mst_sale_channel", autoResultMap = true)
+@ApiModel(value="实体类:销售渠道", description="表名:t_mst_sale_channel")
+public class SaleChannelQuery extends PageInfo<SaleChannelQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 渠道ID
+     */
+    @TableId(value = "channel_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "渠道ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 渠道编号
+     */
+    @Excel(name = "渠道编号")
+    @ApiModelProperty(value = "渠道编号")
+    private String channelCode;
+
+
+    /**
+     * 渠道名称
+     */
+    @Excel(name = "渠道名称")
+    @ApiModelProperty(value = "渠道名称")
+    private String channelName;
+
+
+    /**
+     * 系统代码
+     */
+    @Excel(name = "系统代码")
+    @ApiModelProperty(value = "系统代码")
+    private String sysCode;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 56 - 61
src/main/java/com/dk/mdm/model/query/core/DictionaryDataQuery.java → src/main/java/com/dk/mdm/model/query/mst/WarehouseQuery.java

@@ -1,4 +1,4 @@
-package com.dk.mdm.model.query.core;
+package com.dk.mdm.model.query.mst;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.dk.common.infrastructure.annotaiton.ExportTitle;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -19,57 +20,82 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
-import java.util.List;
+
 /**
- *  数据字典
+ *  仓库档案
  */
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
-@ExportTitle("数据字典")
-@TableName(value = "t_dictionary_data", autoResultMap = true)
-@ApiModel(value="实体类:数据字典", description="表名:t_dictionary_data")
-public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implements Serializable {
+@ExportTitle("仓库档案")
+@TableName(value = "t_mst_warehouse", autoResultMap = true)
+@ApiModel(value="实体类:仓库档案", description="表名:t_mst_warehouse")
+public class WarehouseQuery extends PageInfo<WarehouseQuery> implements Serializable {
 
     /*
      * 数据库字段
      */
 
     /**
-     * 数据ID
+     * 仓库ID
      */
-    @TableId(value = "data_id", type = IdType.AUTO)
-    @ApiModelProperty(value = "数据ID")
-    private Integer dataId;
+    @TableId(value = "wh_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whId;
 
 
     /**
-     * 字典项目
+     * 仓库编号
      */
-    @Excel(name = "字典项目")
-    @ApiModelProperty(value = "字典项目")
-    private String dictCode;
+    @Excel(name = "仓库编号")
+    @ApiModelProperty(value = "仓库编号")
+    private String whCode;
 
 
     /**
-     * 字典数据
+     * 仓库名称
      */
-    @Excel(name = "字典数据")
-    @ApiModelProperty(value = "字典数据")
-    private String dataValue;
+    @Excel(name = "仓库名称")
+    @ApiModelProperty(value = "仓库名称")
+    private String whName;
 
 
     /**
-     * 显示顺序
+     * 显示顺序 (【1 ~ 46655】)
      */
-    @Excel(name = "显示顺序")
-    @ApiModelProperty(value = "显示顺序")
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
     private Integer displayNo;
 
 
     /**
+     * 默认值
+     */
+    @Excel(name = "默认值")
+    @ApiModelProperty(value = "默认值")
+    private Boolean flgDefault;
+
+
+    /**
+     * 仓库主管
+     */
+    @Excel(name = "仓库主管")
+    @ApiModelProperty(value = "仓库主管")
+    private String supervisor;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
      * 备注
      */
     @Excel(name = "备注")
@@ -86,11 +112,11 @@ public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implement
 
 
     /**
-     * 工厂ID
+     * 企业ID
      */
-    @Excel(name = "工厂ID")
-    @ApiModelProperty(value = "工厂ID")
-    private Integer ftyId;
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
 
 
     /**
@@ -108,7 +134,8 @@ public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implement
      */
     @Excel(name = "创建用户 (触发器自动处理)")
     @ApiModelProperty(value = "创建用户 (触发器自动处理)")
-    private Long opCreateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
 
 
     /**
@@ -126,7 +153,8 @@ public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implement
      */
     @Excel(name = "修改用户 (触发器自动处理)")
     @ApiModelProperty(value = "修改用户 (触发器自动处理)")
-    private Long opUpdateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
 
 
     /**
@@ -155,38 +183,6 @@ public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implement
     private String opDbUser;
 
 
-    /**
-     * 系统代码(页面不显示)
-     */
-    @Excel(name = "系统代码(页面不显示)")
-    @ApiModelProperty(value = "系统代码(页面不显示)")
-    private String sysCode;
-
-
-    /**
-     * 系统备注(页面不显示)
-     */
-    @Excel(name = "系统备注(页面不显示)")
-    @ApiModelProperty(value = "系统备注(页面不显示)")
-    private String sysDesc;
-
-
-    /**
-     * 系统字典标识(系统字典时,用户不能编辑)
-     */
-    @Excel(name = "系统字典标识(系统字典时,用户不能编辑)")
-    @ApiModelProperty(value = "系统字典标识(系统字典时,用户不能编辑)")
-    private Boolean flgSys;
-
-    /**
-     * @desc   : 有效标识list
-     * @author : 周兴
-     * @date   : 2023/1/4 17:55
-     */
-    @TableField(exist = false)
-    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
-    private List<Boolean> flgValidList;
-
     /*
      * 相关属性
      * @TableField(exist = false)
@@ -201,4 +197,3 @@ public class DictionaryDataQuery extends PageInfo<DictionaryDataQuery> implement
     private static final long serialVersionUID = 1L;
 
 }
-

+ 353 - 0
src/main/java/com/dk/mdm/model/response/mst/CustomerResponse.java

@@ -0,0 +1,353 @@
+package com.dk.mdm.model.response.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+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.UuidListTypeHandler;
+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.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class CustomerResponse extends PageInfo<CustomerResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+//    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @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 reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 114 - 0
src/main/java/com/dk/mdm/model/response/mst/DictionaryDataResponse.java

@@ -0,0 +1,114 @@
+package com.dk.mdm.model.response.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import 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.time.LocalDateTime;
+
+/**
+ *  数据字典
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("数据字典")
+@TableName(value = "t_mst_dictionary_data", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:数据字典", description="表名:t_mst_dictionary_data")
+public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 数据ID
+     */
+    @TableId(value = "data_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "数据ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String dataId;
+
+
+    /**
+     * 字典项目
+     */
+    @Excel(name = "字典项目")
+    @ApiModelProperty(value = "字典项目")
+    private String dictCode;
+
+
+    /**
+     * 字典数据
+     */
+    @Excel(name = "字典数据")
+    @ApiModelProperty(value = "字典数据")
+    private String dataValue;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
+    private String sysCode;
+
+
+    @ApiModelProperty(value = "")
+    private String dataCode;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 9 - 0
src/main/java/com/dk/mdm/model/response/mst/MoneyAccountResponse.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.StringListTypeHandler;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
@@ -21,6 +22,7 @@ import lombok.experimental.Accessors;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  *  资金账户
@@ -72,6 +74,13 @@ public class MoneyAccountResponse extends PageInfo<MoneyAccountResponse> impleme
     @TableField(typeHandler = UuidTypeHandler.class)
     private String macType;
 
+    /**
+     * 账户类别名称 (【数据字典】)
+     */
+    @Excel(name = "账户类别 (【数据字典】)")
+    @ApiModelProperty(value = "账户类别 (【数据字典】)")
+    private String macTypeName;
+
 
     /**
      * 账户余额

+ 110 - 0
src/main/java/com/dk/mdm/model/response/mst/SaleChannelResponse.java

@@ -0,0 +1,110 @@
+package com.dk.mdm.model.response.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import 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.time.LocalDateTime;
+
+/**
+ *  销售渠道
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@ExportTitle("销售渠道")
+@TableName(value = "t_mst_sale_channel", autoResultMap = true)
+@ApiModel(value="实体类:销售渠道", description="表名:t_mst_sale_channel")
+public class SaleChannelResponse implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 渠道ID
+     */
+    @TableId(value = "channel_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "渠道ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 渠道编号
+     */
+    @Excel(name = "渠道编号")
+    @ApiModelProperty(value = "渠道编号")
+    private String channelCode;
+
+
+    /**
+     * 渠道名称
+     */
+    @Excel(name = "渠道名称")
+    @ApiModelProperty(value = "渠道名称")
+    private String channelName;
+
+
+    /**
+     * 系统代码
+     */
+    @Excel(name = "系统代码")
+    @ApiModelProperty(value = "系统代码")
+    private String sysCode;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 126 - 0
src/main/java/com/dk/mdm/model/response/mst/WarehouseResponse.java

@@ -0,0 +1,126 @@
+package com.dk.mdm.model.response.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import 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.time.LocalDateTime;
+
+/**
+ *  仓库档案
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@ExportTitle("仓库档案")
+@TableName(value = "t_mst_warehouse", autoResultMap = true)
+@ApiModel(value="实体类:仓库档案", description="表名:t_mst_warehouse")
+public class WarehouseResponse  implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 仓库ID
+     */
+    @TableId(value = "wh_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whId;
+
+
+    /**
+     * 仓库编号
+     */
+    @Excel(name = "仓库编号")
+    @ApiModelProperty(value = "仓库编号")
+    private String whCode;
+
+
+    /**
+     * 仓库名称
+     */
+    @Excel(name = "仓库名称")
+    @ApiModelProperty(value = "仓库名称")
+    private String whName;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 默认值
+     */
+    @Excel(name = "默认值")
+    @ApiModelProperty(value = "默认值")
+    private Boolean flgDefault;
+
+
+    /**
+     * 仓库主管
+     */
+    @Excel(name = "仓库主管")
+    @ApiModelProperty(value = "仓库主管")
+    private String supervisor;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 353 - 0
src/main/java/com/dk/mdm/model/vo/mst/CustomerVO.java

@@ -0,0 +1,353 @@
+package com.dk.mdm.model.vo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+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.UuidListTypeHandler;
+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.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class CustomerVO extends PageInfo<CustomerVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+//    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @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 reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private List<String> followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 26 - 37
src/main/java/com/dk/mdm/model/response/core/DictionaryDataResponse.java → src/main/java/com/dk/mdm/model/vo/mst/DictionaryDataVO.java

@@ -1,4 +1,4 @@
-package com.dk.mdm.model.response.core;
+package com.dk.mdm.model.vo.mst;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.dk.common.infrastructure.annotaiton.ExportTitle;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -19,18 +20,18 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+
 /**
  *  数据字典
  */
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
-@EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @ExportTitle("数据字典")
-@TableName(value = "t_dictionary_data",autoResultMap = true)
-@ApiModel(value="实体类:数据字典", description="表名:t_dictionary_data")
-public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> implements Serializable {
+@TableName(value = "t_mst_dictionary_data", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:数据字典", description="表名:t_mst_dictionary_data")
+public class DictionaryDataVO  implements Serializable {
 
     /*
      * 数据库字段
@@ -41,7 +42,8 @@ public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> imp
      */
     @TableId(value = "data_id", type = IdType.AUTO)
     @ApiModelProperty(value = "数据ID")
-    private Integer dataId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String dataId;
 
 
     /**
@@ -59,19 +61,12 @@ public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> imp
     @ApiModelProperty(value = "字典数据")
     private String dataValue;
 
-    /**
-     * 外部编号
-     */
-    @Excel(name = "外部编号")
-    @ApiModelProperty(value = "外部编号")
-    private String dataCode;
-
 
     /**
-     * 显示顺序
+     * 显示顺序 (【1 ~ 46655】)
      */
-    @Excel(name = "显示顺序")
-    @ApiModelProperty(value = "显示顺序")
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
     private Integer displayNo;
 
 
@@ -92,11 +87,11 @@ public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> imp
 
 
     /**
-     * 工厂ID
+     * 企业ID
      */
-    @Excel(name = "工厂ID")
-    @ApiModelProperty(value = "工厂ID")
-    private Integer ftyId;
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
 
 
     /**
@@ -114,7 +109,8 @@ public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> imp
      */
     @Excel(name = "创建用户 (触发器自动处理)")
     @ApiModelProperty(value = "创建用户 (触发器自动处理)")
-    private Long opCreateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
 
 
     /**
@@ -132,7 +128,8 @@ public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> imp
      */
     @Excel(name = "修改用户 (触发器自动处理)")
     @ApiModelProperty(value = "修改用户 (触发器自动处理)")
-    private Long opUpdateUserId;
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
 
 
     /**
@@ -162,27 +159,19 @@ public class DictionaryDataResponse extends PageInfo<DictionaryDataResponse> imp
 
 
     /**
-     * 系统代码(页面不显示)
+     * 系统代码 (页面不显示)
      */
-    @Excel(name = "系统代码(页面不显示)")
-    @ApiModelProperty(value = "系统代码(页面不显示)")
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
     private String sysCode;
 
 
-    /**
-     * 系统备注(页面不显示)
-     */
-    @Excel(name = "系统备注(页面不显示)")
-    @ApiModelProperty(value = "系统备注(页面不显示)")
-    private String sysDesc;
+    @ApiModelProperty(value = "")
+    private String dataCode;
 
 
-    /**
-     * 系统字典标识(系统字典时,用户不能编辑)
-     */
-    @Excel(name = "系统字典标识(系统字典时,用户不能编辑)")
-    @ApiModelProperty(value = "系统字典标识(系统字典时,用户不能编辑)")
-    private Boolean flgSys;
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
 
 
     /*

+ 183 - 0
src/main/java/com/dk/mdm/model/vo/mst/SaleChannelVO.java

@@ -0,0 +1,183 @@
+package com.dk.mdm.model.vo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import 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.time.LocalDateTime;
+
+/**
+ *  销售渠道
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售渠道")
+@TableName(value = "t_mst_sale_channel", autoResultMap = true)
+@ApiModel(value="实体类:销售渠道", description="表名:t_mst_sale_channel")
+public class SaleChannelVO extends PageInfo<SaleChannelVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 渠道ID
+     */
+    @TableId(value = "channel_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "渠道ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 渠道编号
+     */
+    @Excel(name = "渠道编号")
+    @ApiModelProperty(value = "渠道编号")
+    private String channelCode;
+
+
+    /**
+     * 渠道名称
+     */
+    @Excel(name = "渠道名称")
+    @ApiModelProperty(value = "渠道名称")
+    private String channelName;
+
+
+    /**
+     * 系统代码
+     */
+    @Excel(name = "系统代码")
+    @ApiModelProperty(value = "系统代码")
+    private String sysCode;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 199 - 0
src/main/java/com/dk/mdm/model/vo/mst/WarehouseVO.java

@@ -0,0 +1,199 @@
+package com.dk.mdm.model.vo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import 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.time.LocalDateTime;
+
+/**
+ *  仓库档案
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("仓库档案")
+@TableName(value = "t_mst_warehouse", autoResultMap = true)
+@ApiModel(value="实体类:仓库档案", description="表名:t_mst_warehouse")
+public class WarehouseVO extends PageInfo<WarehouseVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 仓库ID
+     */
+    @TableId(value = "wh_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whId;
+
+
+    /**
+     * 仓库编号
+     */
+    @Excel(name = "仓库编号")
+    @ApiModelProperty(value = "仓库编号")
+    private String whCode;
+
+
+    /**
+     * 仓库名称
+     */
+    @Excel(name = "仓库名称")
+    @ApiModelProperty(value = "仓库名称")
+    private String whName;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 默认值
+     */
+    @Excel(name = "默认值")
+    @ApiModelProperty(value = "默认值")
+    private Boolean flgDefault;
+
+
+    /**
+     * 仓库主管
+     */
+    @Excel(name = "仓库主管")
+    @ApiModelProperty(value = "仓库主管")
+    private String supervisor;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @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;
+
+}

+ 14 - 1
src/main/java/com/dk/mdm/model/vo/sale/OrderVO.java

@@ -46,7 +46,7 @@ public class OrderVO extends PageInfo<OrderVO> implements Serializable {
     /**
      * 销售订单ID
      */
-    @TableId(value = "order_id", type = IdType.AUTO)
+    //@TableId(value = "order_id", type = IdType.AUTO)
     @ApiModelProperty(value = "销售订单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String orderId;
@@ -409,6 +409,19 @@ public class OrderVO extends PageInfo<OrderVO> implements Serializable {
 
     @ApiModelProperty(value = "订单明细")
     private List<OrderItemVO> orderItemList;
+
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    private String cusFrom;
+
     /*
      * 相关属性
      * @TableField(exist = false)

+ 0 - 104
src/main/java/com/dk/mdm/service/core/DictionaryDataService.java

@@ -1,104 +0,0 @@
-package com.dk.mdm.service.core;
-
-import com.dk.common.infrastructure.annotaiton.Pagination;
-import com.dk.common.mapper.BaseMapper;
-import com.dk.common.model.pojo.PageList;
-import com.dk.common.response.ResponseResultVO;
-import com.dk.common.service.BaseService;
-import com.dk.mdm.infrastructure.convert.core.DictionaryDataConvert;
-import com.dk.mdm.mapper.core.DictionaryDataMapper;
-import com.dk.mdm.model.pojo.core.DictionaryData;
-import com.dk.mdm.model.query.core.DictionaryDataQuery;
-import com.dk.mdm.model.response.core.DictionaryDataResponse;
-import com.dk.mdm.model.vo.core.DictionaryDataVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.RequestBody;
-
-@Service
-@Transactional
-public class DictionaryDataService extends BaseService<DictionaryData> {
-
-	@Override
-	public BaseMapper<DictionaryData> getRepository() {
-		return dictionaryDataMapper;
-	}
-
-	@Autowired
-	private DictionaryDataMapper dictionaryDataMapper;
-
-	@Autowired
-	private DictionaryDataConvert dictionaryDataConvert;
-
-	/**
-	 * @desc   : 重写主键
-	 * @author : 常皓宁
-	 * @date   : 2023/2/7 10:17
-	 */
-	@Override
-	public String getPrimaryKey(){
-		return "data_id";
-	}
-
-	/**
-	 * @desc   : 条件查询
-	 * @author : 常皓宁
-	 * @date   : 2023/2/7 10:16
-	 */
-	@Pagination
-	public ResponseResultVO<PageList<DictionaryDataResponse>> selectByCond(@RequestBody DictionaryDataQuery dictionaryDataQuery){
-		return super.mergeListWithCount(dictionaryDataQuery,dictionaryDataMapper.selectByCond(dictionaryDataQuery),dictionaryDataMapper.countByCond(dictionaryDataQuery));
-	}
-
-	/**
-	 * @desc   : 保存方法
-	 * @author : 常皓宁
-	 * @date   : 2023/2/7 11:21
-	 */
-	@Transactional(
-			rollbackFor = {Exception.class}
-	)
-	public ResponseResultVO<?> insert(DictionaryDataVO dictionaryDataVO){
-		// 转化实体
-		DictionaryData dictionaryData = dictionaryDataConvert.converToPo(dictionaryDataVO);
-//		// 共用字典数据不能更改
-//		if(dictionaryData.getFtyId() == 0){
-//			return ResponseResultUtil.error(ErrorCodeEnum.DICTIONARY_DATA_NOT_UPDATE.getCode(),
-//					ErrorCodeEnum.DICTIONARY_DATA_NOT_UPDATE.getMessage());
-//		}
-//		// 判断字典项目是否重复
-//		Long count = dictionaryDataMapper.selectByCode(dictionaryData);
-//		if(count > 0){
-//			return ResponseResultUtil.error(ErrorCodeEnum.DATA_VALUE_EXISTS.getCode(),
-//					ErrorCodeEnum.DATA_VALUE_EXISTS.getMessage());
-//		}
-		return super.insert(dictionaryData);
-	}
-
-	/**
-	 * @desc   : 编辑方法
-	 * @author : 常皓宁
-	 * @date   : 2023/2/7 11:21
-	 */
-	@Transactional(
-			rollbackFor = {Exception.class}
-	)
-	public ResponseResultVO<?> update(DictionaryDataVO dictionaryDataVO){
-		// 转化实体
-		DictionaryData dictionaryData = dictionaryDataConvert.converToPo(dictionaryDataVO);
-//		// 共用字典数据不能更改
-//		if(dictionaryData.getFtyId() == 0){
-//			return ResponseResultUtil.error(ErrorCodeEnum.DICTIONARY_DATA_NOT_UPDATE.getCode(),
-//					ErrorCodeEnum.DICTIONARY_DATA_NOT_UPDATE.getMessage());
-//		}
-//		// 判断字典项目是否重复
-//		Long count = dictionaryDataMapper.selectByCode(dictionaryData);
-//		if(count > 0){
-//			return ResponseResultUtil.error(ErrorCodeEnum.DATA_VALUE_EXISTS.getCode(),
-//					ErrorCodeEnum.DATA_VALUE_EXISTS.getMessage());
-//		}
-		return super.update(dictionaryData);
-	}
-
-}

+ 23 - 0
src/main/java/com/dk/mdm/service/mst/CustomerService.java

@@ -0,0 +1,23 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.mdm.model.pojo.mst.Customer;
+import com.dk.mdm.mapper.mst.CustomerMapper;
+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 CustomerService extends BaseService<Customer> {
+
+	@Override
+	public BaseMapper<Customer> getRepository() {
+		return customerMapper;
+	}
+
+	@Autowired
+	private CustomerMapper customerMapper;
+
+}

+ 109 - 0
src/main/java/com/dk/mdm/service/mst/DictionaryDataService.java

@@ -0,0 +1,109 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.common.infrastructure.annotaiton.Pagination;
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.infrastructure.convert.mst.DictionaryDataConvert;
+import com.dk.mdm.model.pojo.mst.DictionaryData;
+import com.dk.mdm.mapper.mst.DictionaryDataMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.DictionaryDataQuery;
+import com.dk.mdm.model.response.mst.DictionaryDataResponse;
+import com.dk.mdm.model.vo.mst.DictionaryDataVO;
+import com.dk.mdm.service.common.CommonService;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Map;
+
+@Service
+@Transactional
+public class DictionaryDataService extends BaseService<DictionaryData> {
+
+	@Override
+	public BaseMapper<DictionaryData> getRepository() {
+		return dictionaryDataMapper;
+	}
+
+	@Autowired
+	private DictionaryDataMapper dictionaryDataMapper;
+
+	@Autowired
+	private CommonService commonService;
+
+	@Autowired
+	private DictionaryDataConvert dictionaryDataConvert;
+
+
+	/**
+	 * @desc : 重写主键
+	 * @author : 于继渤
+	 * @date : 2024/2/29 20:29
+	 */
+	@Override
+	public String getPrimaryKey() {
+		return "data_id";
+	}
+
+
+	/**
+	 * @desc : 查询
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Pagination
+	public ResponseResultVO<PageList<DictionaryDataResponse>> selectByCond(DictionaryDataQuery dictionaryDataQuery) {
+		return super.mergeListWithCount(dictionaryDataQuery, dictionaryDataMapper.selectByCond(dictionaryDataQuery),
+				dictionaryDataMapper.countByCond(dictionaryDataQuery));
+	}
+
+
+
+	/**
+	 * @desc : 新建
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> insert(DictionaryDataVO dictionaryDataVO) {
+		//实体转换
+		DictionaryData dictionaryData = dictionaryDataConvert.convertToPo(dictionaryDataVO);
+
+		Integer displayNo = dictionaryDataMapper.selectDisplayNo(new DictionaryDataQuery());
+		if (displayNo != null) {
+			//插入序号
+			dictionaryData.setDisplayNo(displayNo);
+		} else {
+			dictionaryData.setDisplayNo(0);
+		}
+		//设置编码
+		Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(dictionaryDataVO.getDictCode(), true);
+		dictionaryData.setDataId(uniqueNoteCode.get("outId").toString());
+		dictionaryData.setDataCode(uniqueNoteCode.get("outNote").toString());
+		//新建
+		dictionaryDataMapper.insert(dictionaryData);
+		return ResponseResultUtil.success();
+	}
+
+
+
+	/**
+	 * @desc : 编辑
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> update(DictionaryDataVO dictionaryDataVO) {
+		DictionaryData dictionaryData = dictionaryDataConvert.convertToPo(dictionaryDataVO);
+		super.updateByUuid(dictionaryData);
+		return ResponseResultUtil.success();
+	}
+
+}

+ 23 - 1
src/main/java/com/dk/mdm/service/mst/MoneyAccountService.java

@@ -2,7 +2,9 @@ package com.dk.mdm.service.mst;
 
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 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.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.infrastructure.convert.mst.MoneyAccountConvert;
@@ -11,14 +13,19 @@ import com.dk.mdm.mapper.mst.MoneyAccountMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
 import com.dk.mdm.model.pojo.mst.Staff;
+import com.dk.mdm.model.query.mst.GoodsBrandQuery;
 import com.dk.mdm.model.query.mst.MoneyAccountQuery;
 import com.dk.mdm.model.response.mst.MoneyAccountResponse;
 import com.dk.mdm.model.vo.mst.MoneyAccountVO;
 import com.dk.mdm.model.vo.mst.StaffVO;
+import com.dk.mdm.service.common.CommonService;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 
+import java.util.Map;
 import java.util.UUID;
 
 @Service
@@ -36,6 +43,9 @@ public class MoneyAccountService extends BaseService<MoneyAccount> {
 	@Autowired
 	private MoneyAccountConvert moneyAccountConvert;
 
+	@Autowired
+	private CommonService commonService;
+
 	/**
 	 * @desc   : 重写主键
 	 * @author : songy
@@ -58,6 +68,7 @@ public class MoneyAccountService extends BaseService<MoneyAccount> {
 				moneyAccountMapper.countByCond(moneyAccountQuery));
 	}
 
+
 	/**
 	 * @desc : 保存方法
 	 * @author : songy
@@ -69,7 +80,17 @@ public class MoneyAccountService extends BaseService<MoneyAccount> {
 	public ResponseResultVO<?> insert(MoneyAccountVO moneyAccountVO) {
 		// 转化实体
 		MoneyAccount moneyAccount = moneyAccountConvert.convertToPo(moneyAccountVO);
-
+		Integer displayNo = moneyAccountMapper.selectDisplayNo(new MoneyAccountQuery());
+		if (displayNo != null) {
+			//插入序号
+			moneyAccount.setDisplayNo(displayNo);
+		} else {
+			moneyAccount.setDisplayNo(0);
+		}
+		// 获取编码和主键UuId
+		Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.MONEYACCOUNT.getName(),true);
+		moneyAccount.setMacId(codeMap.get("outId").toString());
+		moneyAccount.setMacCode(codeMap.get("outNote").toString());
 		return super.insert(moneyAccount);
 	}
 
@@ -87,4 +108,5 @@ public class MoneyAccountService extends BaseService<MoneyAccount> {
 		return ResponseResultUtil.success(super.update(moneyAccount, new UpdateWrapper<MoneyAccount>().lambda().eq(MoneyAccount::getMacId,
 				UUID.fromString(moneyAccount.getMacId()))));
 	}
+
 }

+ 111 - 0
src/main/java/com/dk/mdm/service/mst/SaleChannelService.java

@@ -0,0 +1,111 @@
+package com.dk.mdm.service.mst;
+
+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.mst.SaleChannelConvert;
+import com.dk.mdm.model.pojo.mst.SaleChannel;
+import com.dk.mdm.mapper.mst.SaleChannelMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.SaleChannelQuery;
+import com.dk.mdm.model.response.mst.WarehouseResponse;
+import com.dk.mdm.model.vo.mst.SaleChannelVO;
+import com.dk.mdm.service.common.CommonService;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Map;
+
+@Service
+@Transactional
+public class SaleChannelService extends BaseService<SaleChannel> {
+
+	@Override
+	public BaseMapper<SaleChannel> getRepository() {
+		return saleChannelMapper;
+	}
+
+	@Autowired
+	private SaleChannelMapper saleChannelMapper;
+
+	@Autowired
+	private CommonService commonService;
+
+
+	@Autowired
+	private SaleChannelConvert saleChannelConvert;
+
+	/**
+	 * @desc : 重写主键
+	 * @author : 于继渤
+	 * @date : 2024/2/29 20:29
+	 */
+	@Override
+	public String getPrimaryKey() {
+		return "channel_id";
+	}
+
+
+	/**
+	 * @desc : 查询
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Pagination
+	public ResponseResultVO<PageList<WarehouseResponse>> selectByCond(SaleChannelQuery saleChannelQuery) {
+		return super.mergeListWithCount(saleChannelQuery, saleChannelMapper.selectByCond(saleChannelQuery),
+				saleChannelMapper.countByCond(saleChannelQuery));
+	}
+
+
+
+	/**
+	 * @desc : 新建
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> insert(SaleChannelVO saleChannelVO) {
+		//实体转换
+		SaleChannel saleChannel = saleChannelConvert.convertToPo(saleChannelVO);
+
+		Integer displayNo = saleChannelMapper.selectDisplayNo(new SaleChannelQuery());
+		if (displayNo != null) {
+			//插入序号
+			saleChannel.setDisplayNo(displayNo);
+		} else {
+			saleChannel.setDisplayNo(0);
+		}
+		//设置编码
+		Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.SALECHANNEL.getName(), true);
+		saleChannel.setChannelId(uniqueNoteCode.get("outId").toString());
+		saleChannel.setChannelCode(uniqueNoteCode.get("outNote").toString());
+		//新建
+		saleChannelMapper.insert(saleChannel);
+
+		return ResponseResultUtil.success();
+	}
+
+
+
+	/**
+	 * @desc : 编辑
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> update(SaleChannelVO saleChannelVO) {
+		SaleChannel saleChannel = saleChannelConvert.convertToPo(saleChannelVO);
+		super.updateByUuid(saleChannel);
+		return ResponseResultUtil.success();
+	}
+
+}

+ 109 - 0
src/main/java/com/dk/mdm/service/mst/WarehouseService.java

@@ -0,0 +1,109 @@
+package com.dk.mdm.service.mst;
+
+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.mst.WarehouseConvert;
+import com.dk.mdm.model.pojo.mst.Warehouse;
+import com.dk.mdm.mapper.mst.WarehouseMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.WarehouseQuery;
+import com.dk.mdm.model.response.mst.WarehouseResponse;
+import com.dk.mdm.model.vo.mst.WarehouseVO;
+import com.dk.mdm.service.common.CommonService;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+
+import java.util.Map;
+
+@Service
+@Transactional
+public class WarehouseService extends BaseService<Warehouse> {
+
+	@Override
+	public BaseMapper<Warehouse> getRepository() {
+		return warehouseMapper;
+	}
+
+	@Autowired
+	private WarehouseMapper warehouseMapper;
+
+	@Autowired
+	private CommonService commonService;
+
+	@Autowired
+	private WarehouseConvert warehouseConvert;
+
+	/**
+	 * @desc : 重写主键
+	 * @author : 于继渤
+	 * @date : 2024/2/29 20:29
+	 */
+	@Override
+	public String getPrimaryKey() {
+		return "wh_id";
+	}
+
+
+	/**
+	 * @desc : 查询
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Pagination
+	public ResponseResultVO<PageList<WarehouseResponse>> selectByCond(WarehouseQuery warehouseQuery) {
+		return super.mergeListWithCount(warehouseQuery, warehouseMapper.selectByCond(warehouseQuery),
+				warehouseMapper.countByCond(warehouseQuery));
+	}
+
+
+
+	/**
+	 * @desc : 新建
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> insert(WarehouseVO warehouseVO) {
+		//实体转换
+		Warehouse warehouse = warehouseConvert.convertToPo(warehouseVO);
+		Integer displayNo = warehouseMapper.selectDisplayNo(new WarehouseQuery());
+		if (displayNo != null) {
+			//插入序号
+			warehouse.setDisplayNo(displayNo);
+		} else {
+			warehouse.setDisplayNo(0);
+		}
+		//设置编码
+		Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.WAREHOUSE.getName(), true);
+		warehouse.setWhId(uniqueNoteCode.get("outId").toString());
+		warehouse.setWhCode(uniqueNoteCode.get("outNote").toString());
+		//新建
+		warehouseMapper.insert(warehouse);
+
+		return ResponseResultUtil.success();
+	}
+
+
+
+	/**
+	 * @desc : 编辑
+	 * @author : 于继渤
+	 * @date : 2023/1/5 9:39
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> update(WarehouseVO warehouseVO) {
+		Warehouse warehouse = warehouseConvert.convertToPo(warehouseVO);
+		super.updateByUuid(warehouse);
+		return ResponseResultUtil.success();
+	}
+}

+ 57 - 13
src/main/java/com/dk/mdm/service/sale/OrderService.java

@@ -1,16 +1,21 @@
 package com.dk.mdm.service.sale;
 
 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.sale.OrderConvert;
 import com.dk.mdm.infrastructure.convert.sale.OrderItemConvert;
 import com.dk.mdm.mapper.common.CommonMapper;
+import com.dk.mdm.mapper.mst.CustomerMapper;
 import com.dk.mdm.mapper.sale.OrderItemMapper;
 import com.dk.mdm.mapper.sale.OrderMapper;
+import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.model.pojo.sale.Order;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
@@ -21,14 +26,12 @@ import com.dk.mdm.model.response.sale.OrderItemResponse;
 import com.dk.mdm.model.response.sale.OrderResponse;
 import com.dk.mdm.model.vo.sale.OrderItemVO;
 import com.dk.mdm.model.vo.sale.OrderVO;
+import com.dk.mdm.service.common.CommonService;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 @Service
 @Transactional
@@ -62,7 +65,10 @@ public class OrderService extends BaseService<Order> {
     private OrderItemMapper orderItemMapper;
 
     @Autowired
-    private CommonMapper commonMapper;
+    private CommonService commonService;
+
+    @Autowired
+    private CustomerMapper customerMapper;
 
     /**
      * @desc : 条件查询
@@ -102,19 +108,57 @@ public class OrderService extends BaseService<Order> {
             rollbackFor = {Exception.class}
     )
     public ResponseResultVO<?> insertOrder(OrderVO orderVO) {
+
+        // 如果没有客户id,要新建
+        if (orderVO.getCusId() == null) {
+            List<Customer> listCustomer = customerMapper.selectByCond(new Customer().setCpId(orderVO.getCpId()).setCusPhone(orderVO.getCusPhone()));
+            // 如果客户电话已存在
+            if (listCustomer.size() > 0) {
+                throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISEXISTS_CUSPHONE.getMessage());
+            }
+            // 创建客户
+            Customer customer = new Customer();
+            customer.setCusCode(orderVO.getCusCode());
+            // 获取编码和主键UuId
+            Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.CUSTOMER.getName(), true);
+            customer.setCusId(codeMap.get("outId").toString());
+            customer.setCusCode(codeMap.get("outNote").toString());
+            customer.setCusName(orderVO.getCusName());
+            customer.setCusPhone(orderVO.getCusPhone());
+            customer.setAddressArea(orderVO.getAddressArea());
+            customer.setAddressName(orderVO.getAddressName());
+            customer.setAddressNo(orderVO.getAddressNo());
+            customer.setAddressGcj02(orderVO.getAddressGcj02());
+            customer.setAddressFull(orderVO.getAddressFull());
+            customer.setContactName(orderVO.getContactName());
+            customer.setContactPhone(orderVO.getContactPhone());
+            customer.setCusFrom(orderVO.getCusFrom());
+            customer.setChannelId(orderVO.getSalesChannel());
+            customer.setOrgId(orderVO.getOrgId());
+            customer.setStaffId(orderVO.getStaffId());
+            customer.setReportStaff(orderVO.getMakeStaff());
+            customer.setSaleStatus("销售状态-成交");
+            customer.setCpId(orderVO.getCpId());
+            customerMapper.insert(customer);
+            orderVO.setCusId(customer.getCusId());
+        }
+
+        // 获取单号
+        Map<String , Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.ORDER.getName(),false);
+        orderVO.setOrderId(codeMap.get("outId").toString());
+        orderVO.setOrderNo(codeMap.get("outNote").toString());
+        orderVO.setOrderType(Constant.DocumentType.ORDER_CHASE.getName());
         // 转化实体
         Order order = orderConvert.convertToPo(orderVO);
-        order.setOrderNo(UUID.randomUUID().toString());
-        order.setOrderType(Constant.DocumentType.ORDER_CHASE.getName());
         // 订单总单保存
         super.insert(order);
 
-        // 更新单号
-        Order updateOrder = new Order();
-        updateOrder.setOrderNo(commonMapper.getDocNo(order.getCpId(), order.getOrderId(), Constant.DocumentType.ORDER_CHASE.getName()));
-        updateOrder.setOrderId(order.getOrderId());
-        super.update(updateOrder,new UpdateWrapper<Order>().lambda().eq(Order::getOrderId,
-                UUID.fromString(updateOrder.getOrderId())));
+//        // 更新单号
+//        Order updateOrder = new Order();
+//        updateOrder.setOrderNo(commonMapper.getDocNo(order.getCpId(), order.getOrderId(), Constant.DocumentType.ORDER_CHASE.getName()));
+//        updateOrder.setOrderId(order.getOrderId());
+//        super.update(updateOrder,new UpdateWrapper<Order>().lambda().eq(Order::getOrderId,
+//                UUID.fromString(updateOrder.getOrderId())));
 
         // 订单明细保存
         if (orderVO.getOrderItemList() != null && orderVO.getOrderItemList().size() > 0) {