changhaoning 2 лет назад
Родитель
Сommit
9a66bfabf5
28 измененных файлов с 3393 добавлено и 130 удалено
  1. 98 0
      src/main/java/com/dk/mdm/controller/mst/SaleChannelController.java
  2. 83 0
      src/main/java/com/dk/mdm/controller/mst/UnitController.java
  3. 93 24
      src/main/java/com/dk/mdm/controller/sys/DictionaryItemController.java
  4. 10 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/DictionaryDataConvert.java
  5. 11 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/SaleChannelConvert.java
  6. 10 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/UnitConvert.java
  7. 40 0
      src/main/java/com/dk/mdm/mapper/mst/SaleChannelMapper.java
  8. 195 0
      src/main/java/com/dk/mdm/mapper/mst/SaleChannelMapper.xml
  9. 32 0
      src/main/java/com/dk/mdm/mapper/mst/UnitMapper.java
  10. 171 0
      src/main/java/com/dk/mdm/mapper/mst/UnitMapper.xml
  11. 31 2
      src/main/java/com/dk/mdm/mapper/sys/DictionaryItemMapper.java
  12. 148 65
      src/main/java/com/dk/mdm/mapper/sys/DictionaryItemMapper.xml
  13. 182 0
      src/main/java/com/dk/mdm/model/pojo/mst/SaleChannel.java
  14. 182 0
      src/main/java/com/dk/mdm/model/pojo/mst/Unit.java
  15. 188 0
      src/main/java/com/dk/mdm/model/pojo/sys/DictionaryData.java
  16. 185 0
      src/main/java/com/dk/mdm/model/query/mst/SaleChannelQuery.java
  17. 183 0
      src/main/java/com/dk/mdm/model/query/mst/UnitQuery.java
  18. 195 0
      src/main/java/com/dk/mdm/model/query/sys/DictionaryDataQuery.java
  19. 110 0
      src/main/java/com/dk/mdm/model/response/mst/SaleChannelResponse.java
  20. 183 0
      src/main/java/com/dk/mdm/model/response/mst/UnitResponse.java
  21. 111 0
      src/main/java/com/dk/mdm/model/response/sys/DictionaryDataResponse.java
  22. 193 0
      src/main/java/com/dk/mdm/model/vo/mst/DictionaryDataVO.java
  23. 185 0
      src/main/java/com/dk/mdm/model/vo/mst/SaleChannelVO.java
  24. 183 0
      src/main/java/com/dk/mdm/model/vo/mst/UnitVO.java
  25. 15 15
      src/main/java/com/dk/mdm/service/common/CommonService.java
  26. 119 0
      src/main/java/com/dk/mdm/service/mst/SaleChannelService.java
  27. 103 0
      src/main/java/com/dk/mdm/service/mst/UnitService.java
  28. 154 24
      src/main/java/com/dk/mdm/service/sys/DictionaryItemService.java

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

@@ -0,0 +1,98 @@
+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.SaleChannelResponse;
+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<SaleChannelResponse>> 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);
+    }
+
+
+    /**
+     * @desc : 批量编辑序号
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @ApiOperation( value = "批量编辑序号", notes = "批量编辑序号" )
+    @PostMapping({"update_batch_sale_channel_display_no"})
+    public ResponseResultVO<?> updateBatchSaleChannelDisplayNo(@RequestBody SaleChannelVO saleChannelVO) {
+        return saleChannelService.updateBatchSaleChannelDisplayNo(saleChannelVO);
+    }
+
+}

+ 83 - 0
src/main/java/com/dk/mdm/controller/mst/UnitController.java

@@ -0,0 +1,83 @@
+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.Unit;
+import com.dk.common.service.BaseService;
+import com.dk.mdm.model.query.mst.UnitQuery;
+import com.dk.mdm.model.response.mst.UnitResponse;
+import com.dk.mdm.model.vo.mst.UnitVO;
+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.UnitService;
+
+@Api(tags = "计量单位API接口")
+@RestController
+@RequestMapping("/mst/unit")
+public class UnitController{
+
+    public BaseService<Unit> getService() {
+        return unitService;
+    }
+
+    @Autowired
+    private UnitService unitService;
+
+    /**
+     * @desc : 条件查询
+     * @author : 常皓宁
+     * @date : 2024/2/26 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<UnitResponse>> selectByCond(@RequestBody UnitQuery UnitQuery) {
+        return unitService.selectByCond(UnitQuery);
+    }
+
+
+    /**
+     * @desc : 新建
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation(value = "新建", notes = "新建")
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody UnitVO unitVO) {
+        return unitService.insert(unitVO);
+    }
+
+
+
+
+    /**
+     * @desc : 编辑
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "编辑", notes = "编辑" )
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody UnitVO unitVO) {
+        return unitService.update(unitVO);
+    }
+    /**
+     * @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);
+    }
+}

+ 93 - 24
src/main/java/com/dk/mdm/controller/sys/DictionaryItemController.java

@@ -1,40 +1,109 @@
 package com.dk.mdm.controller.sys;
 
-import com.dk.common.controller.BaseController;
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.sys.DictionaryData;
 import com.dk.common.service.BaseService;
-import com.dk.mdm.model.pojo.sys.DictionaryItem;
+import com.dk.mdm.model.query.sys.DictionaryDataQuery;
+import com.dk.mdm.model.response.sys.DictionaryDataResponse;
+import com.dk.mdm.model.vo.mst.DictionaryDataVO;
 import com.dk.mdm.service.sys.DictionaryItemService;
-import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author : 姜宏超
- * @desc : 数据字典项目API接口
- * @date : 2022/5/14 13:08
- */
+import io.swagger.annotations.Api;
+
 @Api(tags = "数据字典API接口")
 @RestController
-@RequestMapping("/sys/dictionary_item")
-public class DictionaryItemController extends BaseController<DictionaryItem> {
+@RequestMapping("/sys/dictionaryData")
+public class DictionaryItemController {
+
+    public BaseService<DictionaryData> getService() {
+        return dictionaryItemService;
+    }
+
+    @Autowired
+    private DictionaryItemService dictionaryItemService;
+
+
+
 
     /**
-     * @desc : 返回service对象
-     * @author : 姜宏超
-     * @date : 2022/5/14 13:08
+     * @desc : 条件查询
+     * @author : 常皓宁
+     * @date : 2024/2/26 10:36
      */
-    @Override
-    public BaseService<DictionaryItem> getService() {
-        return dictionaryItemService;
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<DictionaryDataResponse>> selectByCond(@RequestBody DictionaryDataQuery dictionaryDataQuery) {
+        return dictionaryItemService.selectByCond(dictionaryDataQuery);
     }
 
+
     /**
-     * @desc : 注入数据字典service
-     * @author : 姜宏超
-     * @date : 2022/5/14 13:08
+     * @desc : 新建
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
      */
-    @Autowired
-    private DictionaryItemService dictionaryItemService;
+    @ApiOperation(value = "新建", notes = "新建")
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody DictionaryDataVO dictionaryDataVO) {
+        return dictionaryItemService.insert(dictionaryDataVO);
+    }
 
+
+
+
+    /**
+     * @desc : 编辑
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "编辑", notes = "编辑" )
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody DictionaryDataVO dictionaryDataVO) {
+        return dictionaryItemService.update(dictionaryDataVO);
+    }
+
+
+
+    /**
+     * @desc : 停用
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("disable/{id}")
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
+        return dictionaryItemService.disable(id);
+    }
+
+    @PostMapping("count_by_cond_money_account/{id}")
+    public ResponseResultVO<Long> countByCondMoneyAccount(@PathVariable String id) {
+        return dictionaryItemService.countByCondMoneyAccount(id);
+    }
+
+
+    /**
+     * @desc : 启用
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("enable/{id}")
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
+        return dictionaryItemService.enable(id);
+    }
+
+
+
+
+    /**
+     * @desc : 批量编辑序号
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @ApiOperation( value = "批量编辑序号", notes = "批量编辑序号" )
+    @PostMapping({"update_batch_dictionary_data_display_no"})
+    public ResponseResultVO<?> updateBatchDictionaryDataDisplayNo(@RequestBody DictionaryDataVO dictionaryDataVO) {
+        return dictionaryItemService.updateBatchDictionaryDataDisplayNo(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.sys.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/UnitConvert.java

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

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

@@ -0,0 +1,40 @@
+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;
+import java.util.Map;
+
+/**
+ * 销售渠道 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 :  2023/1/4 9:39
+     */
+    Integer updateBatchSaleChannelDisplayNo(List<Map<String,Object>> dataIds);
+}
+

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

@@ -0,0 +1,195 @@
+<?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 LIKE concat('%',my_ex.likequery(#{channelCode}),'%')
+            </if>
+            <if test="channelName != null and channelName != ''">
+                AND channel_name LIKE concat('%',my_ex.likequery(#{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>
+            <if test="flgValidList != null and flgValidList.size()>0">
+                AND flg_valid =
+                any(#{flgValidList, typeHandler=BooleanListTypeHandler})
+            </if>
+
+            <if  test="searchText != null">
+                AND (channel_name  like concat('%', my_ex.likequery(#{searchText}) , '%')
+                OR  channel_code  like concat('%', my_ex.likequery(#{searchText}) , '%')
+                OR  remarks like concat('%', my_ex.likequery(#{searchText}) , '%')
+                )
+            </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"/>
+        order by display_no
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_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>
+
+
+
+
+    <update id="updateBatchSaleChannelDisplayNo">
+        <foreach collection="list" index="index" item="item" separator=";">
+            UPDATE dkic_b.t_mst_sale_channel
+            SET
+            display_no = #{item.displayNo}
+            WHERE channel_id = #{item.id}::uuid
+        </foreach>
+    </update>
+</mapper>

+ 32 - 0
src/main/java/com/dk/mdm/mapper/mst/UnitMapper.java

@@ -0,0 +1,32 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.Unit;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.UnitQuery;
+import com.dk.mdm.model.response.mst.UnitResponse;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ *  计量单位 Mapper
+ */
+@Repository
+public interface UnitMapper extends BaseMapper<Unit>{
+    /**
+     * @desc   : 根据条件进行查询
+     * @author : 常皓宁
+     * @date : 2024/2/26 10:36
+     */
+    List<UnitResponse> selectByCond(UnitQuery UnitQuery);
+
+    /**
+     * @desc   : 根据条件进行查询(数量)
+     * @author : 常皓宁
+     * @date : 2024/2/26 10:36
+     */
+    Long countByCond(UnitQuery UnitQuery);
+
+
+}
+

+ 171 - 0
src/main/java/com/dk/mdm/mapper/mst/UnitMapper.xml

@@ -0,0 +1,171 @@
+<?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.UnitMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        unit_id, unit_code, unit_name, decimal_places, 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.Unit">
+        <id column="unit_id" property="unitId"/>
+        <result column="unit_code" property="unitCode"/>
+        <result column="unit_name" property="unitName"/>
+        <result column="decimal_places" property="decimalPlaces"/>
+        <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>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="unitCode != null and unitCode != ''">
+                AND unit_code LIKE concat('%',my_ex.likequery(#{unitCode}),'%')
+            </if>
+            <if test="unitName != null and unitName != ''">
+                AND unit_name LIKE concat('%',my_ex.likequery(#{unitName}),'%')
+            </if>
+            <if test="decimalPlaces != null">
+                AND decimal_places = #{decimalPlaces}
+            </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="searchText != null">
+                AND (unit_code  like concat('%', my_ex.likequery(#{searchText}) , '%')
+                OR  unit_name  like concat('%', my_ex.likequery(#{searchText}) , '%')
+                OR  remarks like concat('%', my_ex.likequery(#{searchText}) , '%')
+                )
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键unitId批量操作 -->
+        WHERE unit_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_unit,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM  dkic_b.t_mst_unit
+        <include refid="Condition"/>
+        order by display_no asc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_unit,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM  dkic_b.t_mst_unit
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_unit的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM  dkic_b.t_mst_unit
+        WHERE unit_id = #{unitId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_unit的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM  dkic_b.t_mst_unit
+        WHERE unit_id = #{unitId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_unit的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM  dkic_b.t_mst_unit
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into  dkic_b.t_mst_unit
+        (
+        <trim suffixOverrides=",">
+            unit_code,
+            unit_name,
+            decimal_places,
+            display_no,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.unitCode},
+                #{item.unitName},
+                #{item.decimalPlaces},
+                #{item.displayNo},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+
+
+
+
+</mapper>

+ 31 - 2
src/main/java/com/dk/mdm/mapper/sys/DictionaryItemMapper.java

@@ -1,16 +1,45 @@
 package com.dk.mdm.mapper.sys;
 
 import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.pojo.sys.DictionaryItem;
+import com.dk.mdm.model.pojo.sys.DictionaryData;
+import com.dk.mdm.model.query.sys.DictionaryDataQuery;
+import com.dk.mdm.model.response.sys.DictionaryDataResponse;
 import org.springframework.stereotype.Repository;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author : 姜宏超
  * @desc : mapper接口
  * @date : 2022/5/14 13:10
  */
 @Repository
-public interface DictionaryItemMapper extends BaseMapper<DictionaryItem> {
+public interface DictionaryItemMapper 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);
+
+    Long countByCondMoneyAccount(String id);
+
+    /**
+     * @desc : 批量编辑序号
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    Integer updateBatchDictionaryDataDisplayNo(List<Map<String,Object>> dataIds);
+    Integer updateFlgDefault(DictionaryDataQuery dictionaryDataQuery);
 
 }
 
+

+ 148 - 65
src/main/java/com/dk/mdm/mapper/sys/DictionaryItemMapper.xml

@@ -5,141 +5,224 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        item_code,
-       sys.f_get_name_i18n_lang(item_name_i18n,#{i18n}) as title,
-       item_type,
-       parent_code,
-       display_no,
-       level_no,
-       level_code,
-       sys_ids,
-       flg_valid,
-       remarks
+        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.sys.DictionaryItem">
-        <id column="item_code" property="itemCode"/>
-        <result column="item_name_i18n" property="itemNameI18n"
-                typeHandler="JsonTypeHandler"/>
-        <result column="item_type" property="itemType"/>
-        <result column="parent_code" property="parentCode"/>
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.sys.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="level_no" property="levelNo"/>
-        <result column="level_code" property="levelCode"/>
-        <result column="sys_ids" property="sysIds" typeHandler="ShortListTypeHandler"/>
+        <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,sys_code
+    </sql>
+
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.sys.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"/>
+        <result column="sys_code" property="sysCode"/>
     </resultMap>
 
     <!-- 通用条件列 -->
     <sql id="Condition">
         <where>
-            <if test="itemNameI18n != null and itemNameI18n != ''">
-                AND item_name_i18n = #{itemNameI18n}
-            </if>
-            <if test="itemType != null">
-                AND item_type = #{itemType}
+            <if test="dictCode != null and dictCode != ''">
+                AND dict_code = #{dictCode}
             </if>
-            <if test="parentCode != null and parentCode != ''">
-                AND parent_code = #{parentCode}
+            <if test="dataValue != null and dataValue != ''">
+                AND data_value LIKE concat('%',my_ex.likequery(#{dataValue}),'%')
             </if>
             <if test="displayNo != null">
                 AND display_no = #{displayNo}
             </if>
-            <if test="levelNo != null">
-                AND level_no = #{levelNo}
-            </if>
-            <if test="levelCode != null and levelCode != ''">
-                AND level_code = #{levelCode}
-            </if>
-            <if test="sysIds != null and sysIds.size()>0">
-                AND sys_ids @> (#{sysIds,typeHandler=ShortListTypeHandler})
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
             </if>
             <if test="flgValid != null">
                 AND flg_valid = #{flgValid}
             </if>
-            <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
+            <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="textValue != null and textValue != ''">
-                AND item_name_i18n ->> 'zh_CN' like concat('%', #{textValue}, '%')
+            <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>
+            <if test="flgValidList != null and flgValidList.size()>0">
+                AND flg_valid =
+                any(#{flgValidList, typeHandler=BooleanListTypeHandler})
+            </if>
+            <if  test="searchText != null">
+                AND (data_value  like concat('%', my_ex.likequery(#{searchText}) , '%')
+                OR  dict_code  like concat('%', my_ex.likequery(#{searchText}) , '%')
+                OR  remarks like concat('%', my_ex.likequery(#{searchText}) , '%')
+                )
+            </if>
+
         </where>
     </sql>
 
     <sql id="idsForeach">
-        <!-- 根据主键itemCode批量操作 -->
-        WHERE item_code in
+        <!-- 根据主键dataId批量操作 -->
+        WHERE data_id in
         <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
             #{item}
         </foreach>
     </sql>
 
-    <!-- 查询表t_s_dictionary_item,(条件查询+分页)列表 -->
-    <select id="selectByCond" resultMap="BaseResultMap">
+    <!-- 查询表t_mst_dictionary_data,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
         SELECT
-        <include refid="Base_Column_List"/>
-        FROM sys.t_s_dictionary_item
+        <include refid="Base_Column_List_Response"/>
+        FROM dkic_b.t_mst_dictionary_data
         <include refid="Condition"/>
-        order by display_no
+        order by CASE WHEN flg_default = true THEN 0 ELSE 1 END, display_no
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
     </select>
 
-    <!-- 查询表t_s_dictionary_item,(条件查询)个数 -->
+    <!-- 查询表t_mst_dictionary_data,(条件查询)个数 -->
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM sys.t_s_dictionary_item
+        FROM dkic_b.t_mst_dictionary_data
         <include refid="Condition"/>
     </select>
+    <select id="countByCondMoneyAccount" resultType="Long">
+        SELECT
+            count(1)
+        FROM
+            dkic_b.t_mst_money_account
+                LEFT JOIN dkic_b.t_mst_dictionary_data dd ON mac_type = dd.data_id
+        where dd.data_id = #{id}::uuid
+    </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_s_dictionary_item的一行数据 -->
+    <!-- 根据主键锁定表t_mst_dictionary_data的一行数据 -->
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM sys.t_s_dictionary_item
-        WHERE item_code = #{itemCode}
+        FROM dkic_b.t_mst_dictionary_data
+        WHERE data_id = #{dataId}
         for update
     </select>
 
-    <!-- 根据主键锁定表t_s_dictionary_item的多行数据 -->
+    <!-- 根据主键锁定表t_mst_dictionary_data的多行数据 -->
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM sys.t_s_dictionary_item
+        FROM dkic_b.t_mst_dictionary_data
         <include refid="idsForeach"/>
         for update
     </select>
 
     <insert id="insertBatch">
-        insert into t_s_dictionary_item
+        insert into dkic_b.t_mst_dictionary_data
         (
         <trim suffixOverrides=",">
-            item_name_i18n,
-            item_type,
-            parent_code,
+            dict_code,
+            data_value,
             display_no,
-            level_no,
-            level_code,
-            sys_ids,
             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.itemNameI18n},
-                #{item.itemType},
-                #{item.parentCode},
+                #{item.dictCode},
+                #{item.dataValue},
                 #{item.displayNo},
-                #{item.levelNo},
-                #{item.levelCode},
-                #{item.sysIds},
                 #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+                #{item.sysCode},
+                #{item.dataCode},
+                #{item.flgDefault},
             </trim>
             )
         </foreach>
     </insert>
+
+
+
+
+    <update id="updateBatchDictionaryDataDisplayNo">
+        <foreach collection="list" index="index" item="item" separator=";">
+            UPDATE dkic_b.t_mst_dictionary_data
+            SET
+            display_no = #{item.displayNo}
+            WHERE data_id = #{item.id}::uuid
+        </foreach>
+    </update>
+
+
+    <update id="updateFlgDefault">
+        UPDATE dkic_b.t_mst_dictionary_data
+        SET
+            flg_default = false
+        WHERE      dict_code = #{dictCode} AND  cp_id = #{cpId} and (flg_default = true OR flg_default is null)
+    </update>
 </mapper>

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

@@ -0,0 +1,182 @@
+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")
+    @TableField(fill = FieldFill.INSERT)
+    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;
+
+}

+ 182 - 0
src/main/java/com/dk/mdm/model/pojo/mst/Unit.java

@@ -0,0 +1,182 @@
+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_unit", autoResultMap = true , schema =  "dkic_b")
+@ApiModel(value="实体类:计量单位", description="表名:t_mst_unit")
+public class Unit extends PageInfo<Unit> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 单位ID
+     */
+    @ApiModelProperty(value = "单位ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+
+    /**
+     * 单位编号
+     */
+    @Excel(name = "单位编号")
+    @ApiModelProperty(value = "单位编号")
+    private String unitCode;
+
+
+    /**
+     * 单位名称
+     */
+    @Excel(name = "单位名称")
+    @ApiModelProperty(value = "单位名称")
+    private String unitName;
+
+
+    /**
+     * 小数位数 ([0-6]能改大,不能改小)
+     */
+    @Excel(name = "小数位数 ([0-6]能改大,不能改小)")
+    @ApiModelProperty(value = "小数位数 ([0-6]能改大,不能改小)")
+    private Integer decimalPlaces;
+
+
+    /**
+     * 显示顺序 (【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")
+    @TableField(fill = FieldFill.INSERT)
+    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;
+
+}

+ 188 - 0
src/main/java/com/dk/mdm/model/pojo/sys/DictionaryData.java

@@ -0,0 +1,188 @@
+package com.dk.mdm.model.pojo.sys;
+
+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 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 DictionaryData extends PageInfo<DictionaryData> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 数据ID
+     */
+    @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")
+    @TableField(fill = FieldFill.INSERT)
+    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;
+
+
+    /**
+     * 系统代码 (页面不显示)
+     */
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
+    private String sysCode;
+
+
+    @ApiModelProperty(value = "")
+    private String dataCode;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

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

@@ -0,0 +1,185 @@
+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;
+import java.util.List;
+
+/**
+ *  销售渠道
+ */
+@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;
+
+    @ApiModelProperty(value = "查询条件")
+    private String searchText;
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+    private List<Boolean> flgValidList;
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 183 - 0
src/main/java/com/dk/mdm/model/query/mst/UnitQuery.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_unit", autoResultMap = true , schema =  "dkic_b")
+@ApiModel(value="实体类:计量单位", description="表名:t_mst_unit")
+public class UnitQuery extends PageInfo<UnitQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 单位ID
+     */
+    @TableId(value = "unit_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "单位ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+
+    /**
+     * 单位编号
+     */
+    @Excel(name = "单位编号")
+    @ApiModelProperty(value = "单位编号")
+    private String unitCode;
+
+
+    /**
+     * 单位名称
+     */
+    @Excel(name = "单位名称")
+    @ApiModelProperty(value = "单位名称")
+    private String unitName;
+
+
+    /**
+     * 小数位数 ([0-6]能改大,不能改小)
+     */
+    @Excel(name = "小数位数 ([0-6]能改大,不能改小)")
+    @ApiModelProperty(value = "小数位数 ([0-6]能改大,不能改小)")
+    private Integer decimalPlaces;
+
+
+    /**
+     * 显示顺序 (【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 String searchText;
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 195 - 0
src/main/java/com/dk/mdm/model/query/sys/DictionaryDataQuery.java

@@ -0,0 +1,195 @@
+package com.dk.mdm.model.query.sys;
+
+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;
+import java.util.List;
+
+/**
+ *  数据字典
+ */
+@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 DictionaryDataQuery extends PageInfo<DictionaryDataQuery> 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 = "创建时间 (触发器自动处理)", 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;
+
+
+    /**
+     * 系统代码 (页面不显示)
+     */
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
+    private String sysCode;
+
+
+    @ApiModelProperty(value = "")
+    private String dataCode;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
+
+    @ApiModelProperty(value = "查询条件")
+    private String searchText;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+    private List<Boolean> flgValidList;
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 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;
+
+}

+ 183 - 0
src/main/java/com/dk/mdm/model/response/mst/UnitResponse.java

@@ -0,0 +1,183 @@
+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_unit", autoResultMap = true , schema =  "dkic_b")
+@ApiModel(value="实体类:计量单位", description="表名:t_mst_unit")
+public class UnitResponse extends PageInfo<UnitResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 单位ID
+     */
+    @TableId(value = "unit_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "单位ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+
+    /**
+     * 单位编号
+     */
+    @Excel(name = "单位编号")
+    @ApiModelProperty(value = "单位编号")
+    private String unitCode;
+
+
+    /**
+     * 单位名称
+     */
+    @Excel(name = "单位名称")
+    @ApiModelProperty(value = "单位名称")
+    private String unitName;
+
+
+    /**
+     * 小数位数 ([0-6]能改大,不能改小)
+     */
+    @Excel(name = "小数位数 ([0-6]能改大,不能改小)")
+    @ApiModelProperty(value = "小数位数 ([0-6]能改大,不能改小)")
+    private Integer decimalPlaces;
+
+
+    /**
+     * 显示顺序 (【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;
+
+}

+ 111 - 0
src/main/java/com/dk/mdm/model/response/sys/DictionaryDataResponse.java

@@ -0,0 +1,111 @@
+package com.dk.mdm.model.response.sys;
+
+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.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ *  数据字典
+ */
+@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;
+
+}

+ 193 - 0
src/main/java/com/dk/mdm/model/vo/mst/DictionaryDataVO.java

@@ -0,0 +1,193 @@
+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;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *  数据字典
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@ExportTitle("数据字典")
+@TableName(value = "t_mst_dictionary_data", autoResultMap = true,schema = "dkic_b")
+@ApiModel(value="实体类:数据字典", description="表名:t_mst_dictionary_data")
+public class DictionaryDataVO  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 = "创建时间 (触发器自动处理)", 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;
+
+
+    /**
+     * 系统代码 (页面不显示)
+     */
+    @Excel(name = "系统代码 (页面不显示)")
+    @ApiModelProperty(value = "系统代码 (页面不显示)")
+    private String sysCode;
+
+
+    @ApiModelProperty(value = "")
+    private String dataCode;
+
+
+    @ApiModelProperty(value = "")
+    private Boolean flgDefault;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+    private List<Map<String,Object>> dataIds;
+
+
+    private static final long serialVersionUID = 1L;
+
+}

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

@@ -0,0 +1,185 @@
+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;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *  销售渠道
+ */
+@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 List<Map<String,Object>> dataIds;
+    private static final long serialVersionUID = 1L;
+
+}

+ 183 - 0
src/main/java/com/dk/mdm/model/vo/mst/UnitVO.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_unit", autoResultMap = true , schema =  "dkic_b")
+@ApiModel(value="实体类:计量单位", description="表名:t_mst_unit")
+public class UnitVO extends PageInfo<UnitVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 单位ID
+     */
+    @TableId(value = "unit_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "单位ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+
+    /**
+     * 单位编号
+     */
+    @Excel(name = "单位编号")
+    @ApiModelProperty(value = "单位编号")
+    private String unitCode;
+
+
+    /**
+     * 单位名称
+     */
+    @Excel(name = "单位名称")
+    @ApiModelProperty(value = "单位名称")
+    private String unitName;
+
+
+    /**
+     * 小数位数 ([0-6]能改大,不能改小)
+     */
+    @Excel(name = "小数位数 ([0-6]能改大,不能改小)")
+    @ApiModelProperty(value = "小数位数 ([0-6]能改大,不能改小)")
+    private Integer decimalPlaces;
+
+
+    /**
+     * 显示顺序 (【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;
+
+}

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

@@ -48,7 +48,7 @@ public class CommonService extends BaseService<Map<String, Object>> {
         param.put("docName", docName);
         // 公司Id
 //        StaffEntity staff = authUtils.getStaff();
-//        param.put("cpId", staff.getCpId());
+        param.put("cpId", 0);
         Map<String, Object> map = null;
 //        // 获取系统基础数据
 //        if (codeFlag) {
@@ -122,20 +122,20 @@ public class CommonService extends BaseService<Map<String, Object>> {
         if (param == null) {
             param = new HashMap<>();
         }
-//        param.put("cpId", authUtils.getStaff().getCpId());
-//        String table = displayNoTable.getTable();
-//        String mode = displayNoTable.getMode();
-//        if (table != null && mode != null) {
-//            table = mode + "." + table;
-//            param.put("table", table);
-//            // 默认有效标识为true
-//            if(param.get("noFlgValid") == null && param.get("flgValid") == null ){
-//                param.put("flgValid",true);
-//            }
-//            // 获取最大序号
-//            Integer maxDisplayNo = commonMapper.getMaxDisplayNo(param);
-//            return maxDisplayNo == null ? 1 : maxDisplayNo;
-//        }
+        param.put("cpId", 0);
+        String table = displayNoTable.getTable();
+        String mode = displayNoTable.getMode();
+        if (table != null && mode != null) {
+            table = mode + "." + table;
+            param.put("table", table);
+            // 默认有效标识为true
+            if(param.get("noFlgValid") == null && param.get("flgValid") == null ){
+                param.put("flgValid",true);
+            }
+            // 获取最大序号
+            Integer maxDisplayNo = commonMapper.getMaxDisplayNo(param);
+            return maxDisplayNo == null ? 1 : maxDisplayNo;
+        }
         return 0;
     }
 

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

@@ -0,0 +1,119 @@
+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.SaleChannelResponse;
+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<SaleChannelResponse>> 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);
+        //设置序号
+        saleChannel.setDisplayNo(commonService.getMaxDisplayNo(Constant.DisplayNoTable.SALECHANNEL));
+        //设置编码
+        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();
+    }
+
+
+
+    /**
+     * @desc : 批量编辑序号
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> updateBatchSaleChannelDisplayNo(SaleChannelVO saleChannelVO) {
+        saleChannelMapper.updateBatchSaleChannelDisplayNo(saleChannelVO.getDataIds());
+        return ResponseResultUtil.success();
+    }
+}

+ 103 - 0
src/main/java/com/dk/mdm/service/mst/UnitService.java

@@ -0,0 +1,103 @@
+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.UnitConvert;
+import com.dk.mdm.model.pojo.mst.Unit;
+import com.dk.mdm.mapper.mst.UnitMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.UnitQuery;
+import com.dk.mdm.model.response.mst.UnitResponse;
+import com.dk.mdm.model.vo.mst.UnitVO;
+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 UnitService extends BaseService<Unit> {
+
+    @Override
+    public BaseMapper<Unit> getRepository() {
+        return unitMapper;
+    }
+
+    @Autowired
+    private UnitMapper unitMapper;
+
+    @Autowired
+    private UnitConvert unitConvert;
+
+    @Autowired
+    private CommonService commonService;
+    /**
+     * @desc : 重写主键
+     * @author : 常皓宁
+     * @date : 2024/2/29 20:29
+     */
+    @Override
+    public String getPrimaryKey() {
+        return "unit_id";
+    }
+
+
+
+    /**
+     * @desc : 查询
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @Pagination
+    public ResponseResultVO<PageList<UnitResponse>> selectByCond(UnitQuery UnitQuery) {
+        return super.mergeListWithCount(UnitQuery, unitMapper.selectByCond(UnitQuery),
+                unitMapper.countByCond(UnitQuery));
+    }
+
+
+
+    /**
+     * @desc : 新建
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> insert(UnitVO unitVO) {
+        //实体转换
+        Unit unit = unitConvert.convertToPo(unitVO);
+        //设置序号
+        unit.setDisplayNo(commonService.getMaxDisplayNo(Constant.DisplayNoTable.UNIT));
+        //设置编码
+        Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.UNIT.getName(), true);
+        unit.setUnitId(uniqueNoteCode.get("outId").toString());
+        unit.setUnitCode(uniqueNoteCode.get("outNote").toString());
+        //新建
+        unitMapper.insert(unit);
+
+        return ResponseResultUtil.success();
+    }
+
+
+
+    /**
+     * @desc : 编辑
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> update(UnitVO unitVO) {
+        Unit unit = unitConvert.convertToPo(unitVO);
+        super.updateByUuid(unit);
+        return ResponseResultUtil.success();
+    }
+}

+ 154 - 24
src/main/java/com/dk/mdm/service/sys/DictionaryItemService.java

@@ -1,46 +1,176 @@
 package com.dk.mdm.service.sys;
 
-import com.dk.common.mapper.BaseMapper;
-import com.dk.common.service.BaseService;
+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.mst.DictionaryDataConvert;
 import com.dk.mdm.mapper.sys.DictionaryItemMapper;
-import com.dk.mdm.model.pojo.sys.DictionaryItem;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.dk.mdm.model.pojo.sys.DictionaryData;
+import com.dk.mdm.mapper.sys.DictionaryItemMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.sys.DictionaryDataQuery;
+import com.dk.mdm.model.response.sys.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.HashMap;
+import java.util.Map;
 
-/**
- * @author : 姜宏超
- * @desc : 数据字典业务实现类
- * @date : 2022/3/17 14:46
- */
 @Service
-public class DictionaryItemService extends BaseService<DictionaryItem> {
+@Transactional
+public class DictionaryItemService extends BaseService<DictionaryData> {
 
-    /**
-     * @desc : mapper对象
-     * @author : 姜宏超
-     * @date : 2022/3/17 14:48
-     */
     @Override
-    public BaseMapper<DictionaryItem> getRepository() {
+    public BaseMapper<DictionaryData> getRepository() {
         return dictionaryItemMapper;
     }
 
-    /**
-     * @desc : 注入数据字典mapper
-     * @author : 姜宏超
-     * @date : 2022/3/17 14:47
-     */
     @Autowired
     private DictionaryItemMapper dictionaryItemMapper;
 
+    @Autowired
+    private CommonService commonService;
+
+    @Autowired
+    private DictionaryDataConvert dictionaryDataConvert;
+
     /**
      * @desc : 重写主键
-     * @author : 姜宏超
-     * @date : 2022/5/7 16:07
+     * @author : 常皓宁
+     * @date : 2024/2/29 20:29
      */
     @Override
     public String getPrimaryKey() {
-        return "item_code";
+        return "data_id";
+    }
+
+
+    /**
+     * @desc : 查询
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @Pagination
+    public ResponseResultVO<PageList<DictionaryDataResponse>> selectByCond(DictionaryDataQuery dictionaryDataQuery) {
+        return super.mergeListWithCount(dictionaryDataQuery, dictionaryItemMapper.selectByCond(dictionaryDataQuery),
+                dictionaryItemMapper.countByCond(dictionaryDataQuery));
+    }
+
+
+    public ResponseResultVO<Long> countByCondMoneyAccount(String id) {
+        Long aLong = dictionaryItemMapper.countByCondMoneyAccount(id);
+        return ResponseResultUtil.success(aLong);
+    }
+    /**
+     * @desc : 新建
+     * @author : 常皓宁
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> insert(DictionaryDataVO dictionaryDataVO) {
+        //实体转换
+        DictionaryData dictionaryData = dictionaryDataConvert.convertToPo(dictionaryDataVO);
+        Map<String, Object> map = new HashMap<>();
+        map.put("dictCode",dictionaryDataVO.getDictCode());
+        //设置序号
+        dictionaryData.setDisplayNo(commonService.getMaxDisplayNo(Constant.DisplayNoTable.DICTIONARYDATA,map));
+        //设置编码
+        Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(dictionaryDataVO.getDictCode(), true);
+        dictionaryData.setDataId(uniqueNoteCode.get("outId").toString());
+        dictionaryData.setDataCode(uniqueNoteCode.get("outNote").toString());
+        //新建
+        dictionaryItemMapper.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);
+        DictionaryData dictionaryDataItem = dictionaryItemMapper.selectById(dictionaryDataVO.getDataId());
+        if (dictionaryDataItem.getSysCode() != null) {
+            //系统预制 无法编辑
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.SYSTEM_PRESET_DATA_UNABLE_TO_OPERATE.getMessage());
+        }
+        DictionaryData dictionaryData1 = dictionaryItemMapper.selectById(dictionaryDataVO.getDataId());
+        if ((dictionaryData1.getFlgDefault() == null || !dictionaryData1.getFlgDefault()) && dictionaryDataVO.getFlgDefault() != null && dictionaryDataVO.getFlgDefault()) {
+            //默认  把其他置为非默认
+            dictionaryItemMapper.updateFlgDefault(new DictionaryDataQuery().setCpId(dictionaryData1.getCpId()).setDictCode(dictionaryData1.getDictCode()));
+        }
+
+
+        super.updateByUuid(dictionaryData);
+
+        return ResponseResultUtil.success();
+    }
+
+    /**
+     * @desc : 停用
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<Boolean> disable(String id) {
+        DictionaryData dictionaryDataItem = dictionaryItemMapper.selectById(id);
+        if (dictionaryDataItem.getSysCode() != null) {
+            //系统预制 无法编辑
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.SYSTEM_PRESET_DATA_UNABLE_TO_OPERATE.getMessage());
+        }
+        super.disable(id);
+
+        return ResponseResultUtil.success();
+    }
+
+    /**
+     * @desc : 启用
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<Boolean> enable(String id) {
+        DictionaryData dictionaryDataItem = dictionaryItemMapper.selectById(id);
+        if (dictionaryDataItem.getSysCode() != null) {
+            //系统预制 无法编辑
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.SYSTEM_PRESET_DATA_UNABLE_TO_OPERATE.getMessage());
+        }
+        super.enable(id);
+
+        return ResponseResultUtil.success();
+    }
+
+
+    /**
+     * @desc : 批量编辑序号
+     * @author : 常皓宁
+     * @date :  2023/1/4 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> updateBatchDictionaryDataDisplayNo(DictionaryDataVO dictionaryDataVO) {
+        dictionaryItemMapper.updateBatchDictionaryDataDisplayNo(dictionaryDataVO.getDataIds());
+        return ResponseResultUtil.success();
+    }
 }