فهرست منبع

Merge remote-tracking branch 'origin/master'

dongke 2 سال پیش
والد
کامیت
a559caa722
35فایلهای تغییر یافته به همراه386 افزوده شده و 314 حذف شده
  1. 42 1
      src/main/java/com/dk/mdm/controller/mst/CustomerController.java
  2. 6 6
      src/main/java/com/dk/mdm/controller/sale/OrderController.java
  3. 10 0
      src/main/java/com/dk/mdm/infrastructure/convert/mst/CustomerConvert.java
  4. 2 2
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml
  5. 1 21
      src/main/java/com/dk/mdm/mapper/ivt/OutboundMapper.xml
  6. 17 1
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.java
  7. 96 55
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml
  8. 10 3
      src/main/java/com/dk/mdm/mapper/mst/GoodsBrandMapper.xml
  9. 32 38
      src/main/java/com/dk/mdm/mapper/mst/GoodsCategoryMapper.xml
  10. 3 0
      src/main/java/com/dk/mdm/mapper/mst/GoodsSeriesMapper.xml
  11. 20 4
      src/main/java/com/dk/mdm/mapper/mst/RoleFunMapper.xml
  12. 4 0
      src/main/java/com/dk/mdm/mapper/mst/RoleMapper.xml
  13. 3 1
      src/main/java/com/dk/mdm/mapper/mst/RoleSensitiveMapper.xml
  14. 3 3
      src/main/java/com/dk/mdm/mapper/mst/SettingValueMapper.xml
  15. 3 0
      src/main/java/com/dk/mdm/mapper/mst/UnitMapper.xml
  16. 0 34
      src/main/java/com/dk/mdm/model/pojo/ivt/Outbound.java
  17. 1 1
      src/main/java/com/dk/mdm/model/pojo/mst/Customer.java
  18. 0 34
      src/main/java/com/dk/mdm/model/query/ivt/OutboundQuery.java
  19. 1 1
      src/main/java/com/dk/mdm/model/query/mst/CustomerQuery.java
  20. 2 0
      src/main/java/com/dk/mdm/model/query/mst/GoodsBrandQuery.java
  21. 1 1
      src/main/java/com/dk/mdm/model/query/mst/GoodsCategoryQuery.java
  22. 1 1
      src/main/java/com/dk/mdm/model/query/mst/GoodsSeriesQuery.java
  23. 3 0
      src/main/java/com/dk/mdm/model/query/mst/RoleQuery.java
  24. 1 1
      src/main/java/com/dk/mdm/model/query/mst/UnitQuery.java
  25. 0 34
      src/main/java/com/dk/mdm/model/response/ivt/OutboundResponse.java
  26. 11 1
      src/main/java/com/dk/mdm/model/response/mst/CustomerResponse.java
  27. 3 1
      src/main/java/com/dk/mdm/model/response/mst/GoodsBrandResponse.java
  28. 1 0
      src/main/java/com/dk/mdm/model/response/mst/GoodsCategoryResponse.java
  29. 0 34
      src/main/java/com/dk/mdm/model/vo/ivt/OutboundVO.java
  30. 1 1
      src/main/java/com/dk/mdm/model/vo/mst/CustomerVO.java
  31. 19 19
      src/main/java/com/dk/mdm/model/vo/mst/GoodsCategoryVO.java
  32. 78 6
      src/main/java/com/dk/mdm/service/mst/CustomerService.java
  33. 8 3
      src/main/java/com/dk/mdm/service/mst/RoleService.java
  34. 1 5
      src/main/java/com/dk/mdm/service/mst/SettingValueService.java
  35. 2 2
      src/main/java/com/dk/mdm/service/sale/OrderService.java

+ 42 - 1
src/main/java/com/dk/mdm/controller/mst/CustomerController.java

@@ -1,8 +1,15 @@
 package com.dk.mdm.controller.mst;
 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.Customer;
 import com.dk.mdm.model.pojo.mst.Customer;
-import com.dk.common.controller.BaseController;
 import com.dk.common.service.BaseService;
 import com.dk.common.service.BaseService;
+import com.dk.mdm.model.query.mst.CustomerQuery;
+import com.dk.mdm.model.response.mst.CustomerResponse;
+import com.dk.mdm.model.vo.mst.CustomerVO;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -21,4 +28,38 @@ public class CustomerController{
     @Autowired
     @Autowired
     private CustomerService customerService;
     private CustomerService customerService;
 
 
+
+    /**
+     * @desc : 条件查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<CustomerResponse>> selectByCond(@RequestBody CustomerQuery customerQuery) {
+        return customerService.selectByCond(customerQuery);
+    }
+
+    /**
+     * @desc : 新建
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "新建角色(权限)", notes = "新建角色权限" )
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody CustomerVO customerVO) {
+        return customerService.insert(customerVO);
+    }
+
+    /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "编辑角色权限(编辑角色权限)", notes = "编辑角色权限" )
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody CustomerVO customerVO) {
+        return customerService.update(customerVO);
+    }
+
 }
 }

+ 6 - 6
src/main/java/com/dk/mdm/controller/sale/OrderController.java

@@ -65,9 +65,9 @@ public class OrderController {
      * @date : 2023/1/9 10:48
      * @date : 2023/1/9 10:48
      */
      */
     @ApiOperation(value = "新建订单", notes = "新建订单")
     @ApiOperation(value = "新建订单", notes = "新建订单")
-    @PostMapping({"insert_order"})
-    public ResponseResultVO<?> insertOrder(@RequestBody OrderVO orderVO) {
-        return orderService.insertOrder(orderVO);
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody OrderVO orderVO) {
+        return orderService.insert(orderVO);
     }
     }
 
 
     /**
     /**
@@ -87,8 +87,8 @@ public class OrderController {
      * @date : 2023/1/9 10:49
      * @date : 2023/1/9 10:49
      */
      */
     @ApiOperation(value = "编辑订单", notes = "编辑订单")
     @ApiOperation(value = "编辑订单", notes = "编辑订单")
-    @PostMapping({"update_order"})
-    public ResponseResultVO<Boolean> updateOrder(@RequestBody OrderVO orderVO) {
-        return orderService.updateOrder(orderVO);
+    @PostMapping({"update"})
+    public ResponseResultVO<Boolean> update(@RequestBody OrderVO orderVO) {
+        return orderService.update(orderVO);
     }
     }
 }
 }

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

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

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

@@ -320,8 +320,8 @@
                role_name  AS "roleName",
                role_name  AS "roleName",
                display_no AS "displayNo",
                display_no AS "displayNo",
                remarks
                remarks
-        from core.t_role
-        where (fty_id = #{ftyId} OR fty_id = 0)
+        from dkic_b.t_mst_role
+        where cp_id = #{cpId}
           and flg_valid
           and flg_valid
         order by display_no
         order by display_no
     </select>
     </select>

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

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
     <sql id="Base_Column_List">
-        out_id, out_no, out_type, from_id, from_no, org_id, staff_id, order_id, order_no, into_return_id, into_return_no, cus_id, sup_id, out_status, outing_qty, outing_amt, out_qty, out_amt, return_qty, return_amt, out_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, 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
+        out_id, out_no, out_type, from_id, from_no, org_id, staff_id, cus_id, sup_id, out_status, outing_qty, outing_amt, out_qty, out_amt, return_qty, return_amt, out_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, 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>
     </sql>
 
 
     <!-- 通用查询映射结果 -->
     <!-- 通用查询映射结果 -->
@@ -17,10 +17,6 @@
                 <result column="from_no" property="fromNo"/>
                 <result column="from_no" property="fromNo"/>
                 <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
                 <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
                 <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
                 <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
-                <result column="order_id" property="orderId" typeHandler="UuidTypeHandler"/>
-                <result column="order_no" property="orderNo"/>
-                <result column="into_return_id" property="intoReturnId" typeHandler="UuidTypeHandler"/>
-                <result column="into_return_no" property="intoReturnNo"/>
                 <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
                 <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
                 <result column="sup_id" property="supId" typeHandler="UuidTypeHandler"/>
                 <result column="sup_id" property="supId" typeHandler="UuidTypeHandler"/>
                 <result column="out_status" property="outStatus"/>
                 <result column="out_status" property="outStatus"/>
@@ -69,18 +65,6 @@
             <if test="staffId != null and staffId != ''">
             <if test="staffId != null and staffId != ''">
                 AND staff_id = #{staffId}
                 AND staff_id = #{staffId}
             </if>
             </if>
-            <if test="orderId != null and orderId != ''">
-                AND order_id = #{orderId}
-            </if>
-            <if test="orderNo != null and orderNo != ''">
-                AND order_no = #{orderNo}
-            </if>
-            <if test="intoReturnId != null and intoReturnId != ''">
-                AND into_return_id = #{intoReturnId}
-            </if>
-            <if test="intoReturnNo != null and intoReturnNo != ''">
-                AND into_return_no = #{intoReturnNo}
-            </if>
             <if test="cusId != null and cusId != ''">
             <if test="cusId != null and cusId != ''">
                 AND cus_id = #{cusId}
                 AND cus_id = #{cusId}
             </if>
             </if>
@@ -256,10 +240,6 @@
                 #{item.fromNo},
                 #{item.fromNo},
                 #{item.orgId}::uuid,
                 #{item.orgId}::uuid,
                 #{item.staffId}::uuid,
                 #{item.staffId}::uuid,
-                #{item.orderId}::uuid,
-                #{item.orderNo},
-                #{item.intoReturnId}::uuid,
-                #{item.intoReturnNo},
                 #{item.cusId}::uuid,
                 #{item.cusId}::uuid,
                 #{item.supId}::uuid,
                 #{item.supId}::uuid,
                 #{item.outStatus},
                 #{item.outStatus},

+ 17 - 1
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.java

@@ -2,13 +2,29 @@ package com.dk.mdm.mapper.mst;
 
 
 import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.common.mapper.BaseMapper;
 import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.CustomerQuery;
+import com.dk.mdm.model.response.mst.CustomerResponse;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
+import java.util.List;
+
 /**
 /**
 *  客户资料 Mapper
 *  客户资料 Mapper
 */
 */
 @Repository
 @Repository
 public interface CustomerMapper extends BaseMapper<Customer>{
 public interface CustomerMapper extends BaseMapper<Customer>{
-	
+    /**
+     * @desc   : 根据条件进行查询
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    List<CustomerResponse> selectByCond(CustomerQuery customerQuery);
+
+    /**
+     * @desc   : 根据条件进行查询(数量)
+     * @author : 于继渤
+     * @date : 2024/2/26 10:36
+     */
+    Long countByCond(CustomerQuery customerQuery);
 }
 }
 
 

+ 96 - 55
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml

@@ -8,6 +8,15 @@
         cus_id, cus_code, cus_name, cus_phone, address_area, address_name, address_no, address_gcj02, address_full, contact_name, contact_phone, cus_from, channel_id, org_id, staff_id, report_staff, report_time, sale_status, remarks, follow_staffs, last_follow_staff, last_follow_id, last_follow_status, last_follow_time, follow_count, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
         cus_id, cus_code, cus_name, cus_phone, address_area, address_name, address_no, address_gcj02, address_full, contact_name, contact_phone, cus_from, channel_id, org_id, staff_id, report_staff, report_time, sale_status, remarks, follow_staffs, last_follow_staff, last_follow_id, last_follow_status, last_follow_time, follow_count, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
     </sql>
     </sql>
 
 
+
+
+    <sql id="Base_Column_List_Response">
+        tmc.cus_id, tmc.cus_code,tmc.cus_name, tmc.cus_phone, tmc.address_area, tmc.address_name, tmc.address_no,
+                  tmc.address_gcj02, tmc.address_full, tmc.contact_name, tmc.contact_phone, tmc.cus_from, tmc.channel_id,
+                  tmc.org_id, tmc.staff_id, tmc.report_staff, tmc.report_time, tmc.sale_status, tmc.remarks, tmc.follow_staffs,
+                  tmc.last_follow_staff, tmc.last_follow_id, tmc.last_follow_status, tmc.last_follow_time, tmc.follow_count, tmc.flg_valid, tmc.cp_id
+    </sql>
+
     <!-- 通用查询映射结果 -->
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.Customer">
     <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.Customer">
         <id column="cus_id" property="cusId"/>
         <id column="cus_id" property="cusId"/>
@@ -46,108 +55,126 @@
                 <result column="op_db_user" property="opDbUser"/>
                 <result column="op_db_user" property="opDbUser"/>
     </resultMap>
     </resultMap>
 
 
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mst.CustomerResponse">
+        <id column="cus_id" property="cusId"/>
+        <result column="cus_code" property="cusCode"/>
+        <result column="cus_name" property="cusName"/>
+        <result column="cus_phone" property="cusPhone"/>
+        <result column="address_area" property="addressArea" typeHandler="JsonTypeHandler"/>
+        <result column="address_name" property="addressName"/>
+        <result column="address_no" property="addressNo"/>
+        <result column="address_gcj02" property="addressGcj02" typeHandler="JsonTypeHandler"/>
+        <result column="address_full" property="addressFull"/>
+        <result column="contact_name" property="contactName"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="cus_from" property="cusFrom" typeHandler="UuidTypeHandler"/>
+        <result column="channel_id" property="channelId" typeHandler="UuidTypeHandler"/>
+        <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+        <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+        <result column="report_staff" property="reportStaff" typeHandler="UuidTypeHandler"/>
+        <result column="report_time" property="reportTime" typeHandler="TimestampTypeHandler"/>
+        <result column="sale_status" property="saleStatus"/>
+        <result column="remarks" property="remarks"/>
+        <result column="follow_staffs" property="followStaffs" typeHandler="UuidListTypeHandler"/>
+        <result column="last_follow_staff" property="lastFollowStaff" typeHandler="UuidTypeHandler"/>
+        <result column="last_follow_id" property="lastFollowId" typeHandler="UuidTypeHandler"/>
+        <result column="last_follow_status" property="lastFollowStatus"/>
+        <result column="last_follow_time" property="lastFollowTime" typeHandler="TimestampTypeHandler"/>
+        <result column="follow_count" property="followCount"/>
+        <result column="flg_valid" property="flgValid"/>
+        <result column="cp_id" property="cpId"/>
+        <result column="cusFromName" property="cusFromName"/>
+        <result column="channelName" property="channelName"/>
+        <result column="orgName" property="orgName"/>
+        <result column="staffName" property="staffName"/>
+        <result column="reportStaffName" property="reportStaffName"/>
+        <result column="followStaffName" property="followStaffName"/>
+        <result column="lastFollowStaffName" property="lastFollowStaffName"/>
+
+    </resultMap>
+
     <!-- 通用条件列 -->
     <!-- 通用条件列 -->
     <sql id="Condition">
     <sql id="Condition">
         <where>
         <where>
             <if test="cusCode != null and cusCode != ''">
             <if test="cusCode != null and cusCode != ''">
-                AND cus_code = #{cusCode}
+                AND tmc.cus_code = #{cusCode}
             </if>
             </if>
             <if test="cusName != null and cusName != ''">
             <if test="cusName != null and cusName != ''">
-                AND cus_name = #{cusName}
+                AND tmc.cus_name = #{cusName}
             </if>
             </if>
             <if test="cusPhone != null and cusPhone != ''">
             <if test="cusPhone != null and cusPhone != ''">
-                AND cus_phone = #{cusPhone}
+                AND tmc.cus_phone = #{cusPhone}
             </if>
             </if>
             <if test="addressArea != null and addressArea != ''">
             <if test="addressArea != null and addressArea != ''">
-                AND address_area = #{addressArea}
+                AND tmc.address_area = #{addressArea}
             </if>
             </if>
             <if test="addressName != null and addressName != ''">
             <if test="addressName != null and addressName != ''">
-                AND address_name = #{addressName}
+                AND tmc.address_name = #{addressName}
             </if>
             </if>
             <if test="addressNo != null and addressNo != ''">
             <if test="addressNo != null and addressNo != ''">
-                AND address_no = #{addressNo}
+                AND tmc.address_no = #{addressNo}
             </if>
             </if>
             <if test="addressGcj02 != null and addressGcj02 != ''">
             <if test="addressGcj02 != null and addressGcj02 != ''">
-                AND address_gcj02 = #{addressGcj02}
+                AND tmc.address_gcj02 = #{addressGcj02}
             </if>
             </if>
             <if test="addressFull != null and addressFull != ''">
             <if test="addressFull != null and addressFull != ''">
-                AND address_full = #{addressFull}
+                AND tmc.address_full = #{addressFull}
             </if>
             </if>
             <if test="contactName != null and contactName != ''">
             <if test="contactName != null and contactName != ''">
-                AND contact_name = #{contactName}
+                AND tmc.contact_name = #{contactName}
             </if>
             </if>
             <if test="contactPhone != null and contactPhone != ''">
             <if test="contactPhone != null and contactPhone != ''">
-                AND contact_phone = #{contactPhone}
+                AND tmc.contact_phone = #{contactPhone}
             </if>
             </if>
             <if test="cusFrom != null and cusFrom != ''">
             <if test="cusFrom != null and cusFrom != ''">
-                AND cus_from = #{cusFrom}
+                AND tmc.cus_from = #{cusFrom}::uuid
             </if>
             </if>
             <if test="channelId != null and channelId != ''">
             <if test="channelId != null and channelId != ''">
-                AND channel_id = #{channelId}
+                AND tmc.channel_id = #{channelId}::uuid
             </if>
             </if>
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
-                AND org_id = #{orgId}
+                AND tmc.org_id = #{orgId}::uuid
             </if>
             </if>
             <if test="staffId != null and staffId != ''">
             <if test="staffId != null and staffId != ''">
-                AND staff_id = #{staffId}
+                AND tmc.staff_id = #{staffId}::uuid
             </if>
             </if>
             <if test="reportStaff != null and reportStaff != ''">
             <if test="reportStaff != null and reportStaff != ''">
-                AND report_staff = #{reportStaff}
+                AND tmc.report_staff = #{reportStaff}::uuid
             </if>
             </if>
             <if test="reportTime != null">
             <if test="reportTime != null">
-                AND report_time = #{reportTime}
+                AND tmc.report_time = #{reportTime}
             </if>
             </if>
             <if test="saleStatus != null and saleStatus != ''">
             <if test="saleStatus != null and saleStatus != ''">
-                AND sale_status = #{saleStatus}
+                AND tmc.sale_status = #{saleStatus}
             </if>
             </if>
             <if test="remarks != null and remarks != ''">
             <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
+                AND tmc.remarks = #{remarks}
             </if>
             </if>
             <if test="followStaffs != null and followStaffs != ''">
             <if test="followStaffs != null and followStaffs != ''">
-                AND follow_staffs = #{followStaffs}
+                AND tmc.follow_staffs = #{followStaffs}::uuid
             </if>
             </if>
             <if test="lastFollowStaff != null and lastFollowStaff != ''">
             <if test="lastFollowStaff != null and lastFollowStaff != ''">
-                AND last_follow_staff = #{lastFollowStaff}
+                AND tmc.last_follow_staff = #{lastFollowStaff}::uuid
             </if>
             </if>
             <if test="lastFollowId != null and lastFollowId != ''">
             <if test="lastFollowId != null and lastFollowId != ''">
-                AND last_follow_id = #{lastFollowId}
+                AND tmc.last_follow_id = #{lastFollowId}
             </if>
             </if>
             <if test="lastFollowStatus != null and lastFollowStatus != ''">
             <if test="lastFollowStatus != null and lastFollowStatus != ''">
-                AND last_follow_status = #{lastFollowStatus}
+                AND tmc.last_follow_status = #{lastFollowStatus}
             </if>
             </if>
             <if test="lastFollowTime != null">
             <if test="lastFollowTime != null">
-                AND last_follow_time = #{lastFollowTime}
+                AND tmc.last_follow_time = #{lastFollowTime}
             </if>
             </if>
             <if test="followCount != null">
             <if test="followCount != null">
-                AND follow_count = #{followCount}
+                AND tmc.follow_count = #{followCount}
             </if>
             </if>
             <if test="flgValid != null">
             <if test="flgValid != null">
-                AND flg_valid = #{flgValid}
+                AND tmc.flg_valid = #{flgValid}
             </if>
             </if>
             <if test="cpId != null">
             <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}
+                AND tmc.cp_id = #{cpId}
             </if>
             </if>
+
         </where>
         </where>
     </sql>
     </sql>
 
 
@@ -160,10 +187,24 @@
     </sql>
     </sql>
 
 
     <!-- 查询表t_mst_customer,(条件查询+分页)列表 -->
     <!-- 查询表t_mst_customer,(条件查询+分页)列表 -->
-    <select id="selectByCond" resultMap="BaseResultMap">
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
         SELECT
         SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_mst_customer
+        <include refid="Base_Column_List_Response"/>,
+        tmd.data_value  AS  "cusFromName",
+        tmsc.channel_name  AS  "channelName",
+        tmo.org_name  AS  "orgName",
+        tms.staff_name  AS  "staffName",
+        tms2.staff_name  AS  "reportStaffName"
+--         tms3.staff_name  AS  "followStaffName",
+--         tms4.staff_name  AS  "lastFollowStaffName"
+        FROM dkic_b.t_mst_customer tmc
+        LEFT JOIN  dkic_b.t_mst_dictionary_data tmd  on tmd.data_id =  tmc.cus_from
+        LEFT JOIN  dkic_b.t_mst_sale_channel tmsc  on tmsc.channel_id =  tmc.channel_id
+        LEFT JOIN  dkic_b.t_mst_org tmo  on tmo.org_id =  tmc.org_id
+        LEFT JOIN  dkic_b.t_mst_staff tms  on tms.staff_id =  tmc.staff_id
+        LEFT JOIN  dkic_b.t_mst_staff tms2  on tms2.staff_id =  tmc.report_staff
+--         LEFT JOIN  dkic_b.t_mst_staff tms3  on tms3.staff_id =  tmc.follow_staffs
+--         LEFT JOIN  dkic_b.t_mst_staff tms4  on tms4.staff_id =  tmc.last_follow_staff
         <include refid="Condition"/>
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
             limit #{end} offset #{start}
@@ -174,7 +215,7 @@
     <select id="countByCond" resultType="Long">
     <select id="countByCond" resultType="Long">
         SELECT
         SELECT
         count(1)
         count(1)
-        FROM t_mst_customer
+        FROM dkic_b.t_mst_customer
         <include refid="Condition"/>
         <include refid="Condition"/>
     </select>
     </select>
 
 
@@ -182,7 +223,7 @@
     <select id="selectById" resultMap="BaseResultMap">
     <select id="selectById" resultMap="BaseResultMap">
         SELECT
         SELECT
         <include refid="Base_Column_List"/>
         <include refid="Base_Column_List"/>
-        FROM t_mst_customer
+        FROM dkic_b.t_mst_customer
         WHERE cus_id = #{cusId}::uuid
         WHERE cus_id = #{cusId}::uuid
     </select>
     </select>
 
 
@@ -190,7 +231,7 @@
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
         SELECT
         <include refid="Base_Column_List"/>
         <include refid="Base_Column_List"/>
-        FROM t_mst_customer
+        FROM dkic_b.t_mst_customer
         WHERE cus_id = #{cusId}
         WHERE cus_id = #{cusId}
         for update
         for update
     </select>
     </select>
@@ -199,13 +240,13 @@
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
         SELECT
         SELECT
         <include refid="Base_Column_List"/>
         <include refid="Base_Column_List"/>
-        FROM t_mst_customer
+        FROM dkic_b.t_mst_customer
         <include refid="idsForeach"/>
         <include refid="idsForeach"/>
         for update
         for update
     </select>
     </select>
 
 
     <insert id="insertBatch">
     <insert id="insertBatch">
-        insert into t_mst_customer
+        insert into dkic_b.t_mst_customer
         (
         (
         <trim suffixOverrides=",">
         <trim suffixOverrides=",">
             cus_code,
             cus_code,

+ 10 - 3
src/main/java/com/dk/mdm/mapper/mst/GoodsBrandMapper.xml

@@ -43,7 +43,8 @@
         <result column="flg_valid" property="flgValid"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="cp_id" property="cpId"/>
         <result column="cp_id" property="cpId"/>
         <result column="goodsBrand" property="goodsBrand"/>
         <result column="goodsBrand" property="goodsBrand"/>
-        <result column="supplierName" property="supplierName"/>
+        <result column="supplierNames" property="supplierNames"/>
+        <result column="supplierIds" property="supplierIds"/>
     </resultMap>
     </resultMap>
 
 
     <!-- 通用条件列 -->
     <!-- 通用条件列 -->
@@ -73,7 +74,9 @@
             <if test="opCreateTime != null">
             <if test="opCreateTime != null">
                 AND tmgb.op_create_time = #{opCreateTime}
                 AND tmgb.op_create_time = #{opCreateTime}
             </if>
             </if>
-
+            <if test="searchText != null">
+                AND (position(#{searchText} in tmgb.brand_code) > 0   OR position(#{searchText} in tmgb.brand_name) > 0   OR  position(#{searchText} in tmgb.remarks) > 0 )
+            </if>
         </where>
         </where>
     </sql>
     </sql>
 
 
@@ -93,7 +96,11 @@
         (SELECT  COALESCE(array_to_string(array_agg(tsm.sup_name), ','),'')
         (SELECT  COALESCE(array_to_string(array_agg(tsm.sup_name), ','),'')
         FROM dkic_b.t_mst_supplier_brand tsmb
         FROM dkic_b.t_mst_supplier_brand tsmb
         left join dkic_b.t_mst_supplier tsm on tsm.sup_id = tsmb.sup_id
         left join dkic_b.t_mst_supplier tsm on tsm.sup_id = tsmb.sup_id
-        WHERE tsmb.brand_id  =  tmgb.brand_id) AS "supplierName"
+        WHERE tsmb.brand_id  =  tmgb.brand_id) AS "supplierNames",
+        (SELECT  COALESCE(array_to_string(array_agg(tsm.sup_id), ','),'')
+        FROM dkic_b.t_mst_supplier_brand tsmb
+        left join dkic_b.t_mst_supplier tsm on tsm.sup_id = tsmb.sup_id
+        WHERE tsmb.brand_id  =  tmgb.brand_id) AS "supplierIds"
         FROM dkic_b.t_mst_goods_brand tmgb
         FROM dkic_b.t_mst_goods_brand tmgb
         <include refid="Condition"/>
         <include refid="Condition"/>
         order by display_no asc
         order by display_no asc

+ 32 - 38
src/main/java/com/dk/mdm/mapper/mst/GoodsCategoryMapper.xml

@@ -9,6 +9,13 @@
         , cat_code, cat_name, parent_id, display_no, top_id, level_upper, level_lower, level_leaf, level_no, level_code, level_name, 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
         , cat_code, cat_name, parent_id, display_no, top_id, level_upper, level_lower, level_leaf, level_no, level_code, level_name, 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>
     </sql>
 
 
+    <sql id="Base_Column_List_Join">
+        tmgc.cat_id
+        , tmgc.cat_code, tmgc.cat_name, tmgc.parent_id, tmgc.display_no, tmgc.top_id, tmgc.level_upper,
+        tmgc.level_lower, tmgc.level_leaf, tmgc.level_no, tmgc.level_code, tmgc.level_name, tmgc.remarks, tmgc.flg_valid, tmgc.cp_id
+    </sql>
+
+
     <!-- 通用查询映射结果 -->
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.GoodsCategory">
     <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.GoodsCategory">
         <id column="cat_id" property="catId"/>
         <id column="cat_id" property="catId"/>
@@ -52,73 +59,57 @@
         <result column="remarks" property="remarks"/>
         <result column="remarks" property="remarks"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="cp_id" property="cpId"/>
         <result column="cp_id" property="cpId"/>
+        <result column="parentName" property="parentName"/>
     </resultMap>
     </resultMap>
 
 
     <!-- 通用条件列 -->
     <!-- 通用条件列 -->
     <sql id="Condition">
     <sql id="Condition">
         <where>
         <where>
             <if test="catCode != null and catCode != ''">
             <if test="catCode != null and catCode != ''">
-                AND cat_code = #{catCode}
+                AND tmgc.cat_code = #{catCode}
             </if>
             </if>
             <if test="catName != null and catName != ''">
             <if test="catName != null and catName != ''">
-                AND cat_name = #{catName}
+                AND tmgc.cat_name = #{catName}
             </if>
             </if>
             <if test="parentId != null and parentId != ''">
             <if test="parentId != null and parentId != ''">
-                AND parent_id = #{parentId}
+                AND tmgc.parent_id = #{parentId}
             </if>
             </if>
             <if test="displayNo != null">
             <if test="displayNo != null">
-                AND display_no = #{displayNo}
+                AND tmgc.display_no = #{displayNo}
             </if>
             </if>
             <if test="topId != null and topId != ''">
             <if test="topId != null and topId != ''">
-                AND top_id = #{topId}
+                AND tmgc.top_id = #{topId}
             </if>
             </if>
             <if test="levelUpper != null and levelUpper != ''">
             <if test="levelUpper != null and levelUpper != ''">
-                AND level_upper = #{levelUpper}
+                AND tmgc.level_upper = #{levelUpper}
             </if>
             </if>
             <if test="levelLower != null and levelLower != ''">
             <if test="levelLower != null and levelLower != ''">
-                AND level_lower = #{levelLower}
+                AND tmgc.level_lower = #{levelLower}
             </if>
             </if>
             <if test="levelLeaf != null">
             <if test="levelLeaf != null">
-                AND level_leaf = #{levelLeaf}
+                AND tmgc.level_leaf = #{levelLeaf}
             </if>
             </if>
             <if test="levelNo != null">
             <if test="levelNo != null">
-                AND level_no = #{levelNo}
+                AND tmgc.level_no = #{levelNo}
             </if>
             </if>
             <if test="levelCode != null and levelCode != ''">
             <if test="levelCode != null and levelCode != ''">
-                AND level_code = #{levelCode}
+                AND tmgc.level_code = #{levelCode}
             </if>
             </if>
             <if test="levelName != null and levelName != ''">
             <if test="levelName != null and levelName != ''">
-                AND level_name = #{levelName}
+                AND tmgc.level_name = #{levelName}
             </if>
             </if>
             <if test="remarks != null and remarks != ''">
             <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
+                AND tmgc.remarks = #{remarks}
             </if>
             </if>
             <if test="flgValid != null">
             <if test="flgValid != null">
-                AND flg_valid = #{flgValid}
+                AND tmgc.flg_valid = #{flgValid}
             </if>
             </if>
             <if test="cpId != null">
             <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}
+                AND tmgc.cp_id = #{cpId}
             </if>
             </if>
-            <if test="opTimestamp != null">
-                AND op_timestamp = #{opTimestamp}
-            </if>
-            <if test="opDbUser != null and opDbUser != ''">
-                AND op_db_user = #{opDbUser}
+
+            <if test="searchText != null">
+                AND (position(#{searchText} in tmgc.cat_code) > 0   OR position(#{searchText} in tmgc.cat_name) > 0   OR  position(#{searchText} in tmgc.remarks) > 0 )
             </if>
             </if>
         </where>
         </where>
     </sql>
     </sql>
@@ -134,10 +125,13 @@
     <!-- 查询表t_mst_goods_category,(条件查询+分页)列表 -->
     <!-- 查询表t_mst_goods_category,(条件查询+分页)列表 -->
     <select id="selectByCond" resultMap="BaseResultMapResponse">
     <select id="selectByCond" resultMap="BaseResultMapResponse">
         SELECT
         SELECT
-        <include refid="Base_Column_List"/>
-        FROM dkic_b.t_mst_goods_category
+        <include refid="Base_Column_List_Join"/>,
+
+        (select cat_name FROM dkic_b.t_mst_goods_category tmstg where tmstg.cat_id = tmgc.parent_id) AS "parentName"
+        FROM dkic_b.t_mst_goods_category tmgc
+
         <include refid="Condition"/>
         <include refid="Condition"/>
-        ORDER BY display_no
+        ORDER BY tmgc.display_no
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
             limit #{end} offset #{start}
         </if>
         </if>
@@ -147,7 +141,7 @@
     <select id="countByCond" resultType="Long">
     <select id="countByCond" resultType="Long">
         SELECT
         SELECT
         count(1)
         count(1)
-        FROM dkic_b.t_mst_goods_category
+        FROM dkic_b.t_mst_goods_category tmgc
         <include refid="Condition"/>
         <include refid="Condition"/>
     </select>
     </select>
 
 

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

@@ -69,6 +69,9 @@
             <if test="opDbUser != null and opDbUser != ''">
             <if test="opDbUser != null and opDbUser != ''">
                 AND op_db_user = #{opDbUser}
                 AND op_db_user = #{opDbUser}
             </if>
             </if>
+            <if test="searchText != null">
+                AND (position(#{searchText} in series_code) > 0   OR position(#{searchText} in series_name) > 0   OR  position(#{searchText} in remarks) > 0 )
+            </if>
         </where>
         </where>
     </sql>
     </sql>
 
 

+ 20 - 4
src/main/java/com/dk/mdm/mapper/mst/RoleFunMapper.xml

@@ -115,14 +115,30 @@
                menu.app_code     AS "appCode",
                menu.app_code     AS "appCode",
                menu.parent_uuid  AS "parentId",
                menu.parent_uuid  AS "parentId",
                menu.flg_menu     AS "flgMenu",
                menu.flg_menu     AS "flgMenu",
-               roleFun.role_id   AS "roleId",
-               menu.fun_uuid     AS "funUuid",
-               CASE WHEN roleFun.role_id IS NULL THEN FALSE ELSE TRUE END    AS "checked"
+
+        <if test="menuUuids!=null and menuUuids.size()> 0">
+            CASE WHEN menus.menu_uuid IS NULL THEN FALSE ELSE TRUE END    AS "checked",
+        </if>
+        <if test="roleId != null">
+            roleFun.role_id   AS "roleId",
+            CASE WHEN roleFun.role_id IS NULL THEN FALSE ELSE TRUE END    AS "checked",
+        </if>
+        menu.fun_uuid     AS "funUuid"
         FROM sys.t_app_menu menu
         FROM sys.t_app_menu menu
-                 LEFT JOIN dkic_b.t_mst_role_fun roleFun ON menu.fun_uuid = roleFun.fun_uuid  and roleFun.role_id = #{roleId}::uuid
+        <if test="menuUuids!=null and menuUuids.size()> 0">
+            left JOIN sys.t_app_menu menus ON menu.menu_uuid =  menus.menu_uuid and  menus.menu_uuid = ANY(#{menuUuids, typeHandler=UuidListTypeHandler})
+        </if>
+        <if test="roleId != null">
+            LEFT JOIN dkic_b.t_mst_role_fun roleFun ON menu.fun_uuid = roleFun.fun_uuid  and roleFun.role_id = #{roleId}::uuid
+        </if>
+
+
         WHERE menu.flg_valid
         WHERE menu.flg_valid
           AND menu.flg_right
           AND menu.flg_right
           AND menu.object_code != 'home'
           AND menu.object_code != 'home'
+        <if test="searchText != null">
+            AND (position(#{searchText} in menu.menu_name ) > 0 )
+        </if>
         ORDER BY menu.level_code;
         ORDER BY menu.level_code;
     </select>
     </select>
 
 

+ 4 - 0
src/main/java/com/dk/mdm/mapper/mst/RoleMapper.xml

@@ -102,6 +102,10 @@
             <if test="flgNolimitSen != null">
             <if test="flgNolimitSen != null">
                 AND flg_nolimit_sen = #{flgNolimitSen}
                 AND flg_nolimit_sen = #{flgNolimitSen}
             </if>
             </if>
+            <if test="searchText != null">
+                AND (position(#{searchText} in role_name) > 0   OR position(#{searchText} in role_code) > 0   OR  position(#{searchText} in remarks) > 0 )
+            </if>
+
         </where>
         </where>
     </sql>
     </sql>
 
 

+ 3 - 1
src/main/java/com/dk/mdm/mapper/mst/RoleSensitiveMapper.xml

@@ -109,7 +109,9 @@
                  LEFT JOIN dkic_b.t_mst_role_sensitive tmrs
                  LEFT JOIN dkic_b.t_mst_role_sensitive tmrs
                            ON tsi.item_code = tmrs.sen_item_code and tmrs.role_id = #{roleId}::uuid
                            ON tsi.item_code = tmrs.sen_item_code and tmrs.role_id = #{roleId}::uuid
         WHERE tsi.flg_valid
         WHERE tsi.flg_valid
-
+        <if test="searchText != null">
+            AND (position(#{searchText} in tsi.item_name_i18n ->> 'zh_CN') > 0   OR position(#{searchText} in tsi.item_code) > 0 )
+        </if>
         ORDER BY tsi.level_code;
         ORDER BY tsi.level_code;
     </select>
     </select>
 
 

+ 3 - 3
src/main/java/com/dk/mdm/mapper/mst/SettingValueMapper.xml

@@ -89,7 +89,7 @@
                     tsi.setting_kind AS "parentCode",
                     tsi.setting_kind AS "parentCode",
                     tsi.value_kind AS "valueKind",
                     tsi.value_kind AS "valueKind",
                     tsi.def_value AS "defValue",
                     tsi.def_value AS "defValue",
-                    tmsv.setting_value AS "settingValue",
+                    COALESCE(tmsv.setting_value,tsi.def_value) AS "settingValue",
                     tsi.display_no AS "displayNo",
                     tsi.display_no AS "displayNo",
                     CASE
                     CASE
 
 
@@ -166,7 +166,7 @@
             setting_code,
             setting_code,
             setting_value,
             setting_value,
             remarks,
             remarks,
-            op_app_code,
+            cp_id,
         </trim>
         </trim>
         )
         )
         values
         values
@@ -176,7 +176,7 @@
                 #{item.settingCode},
                 #{item.settingCode},
                 #{item.settingValue},
                 #{item.settingValue},
                 #{item.remarks},
                 #{item.remarks},
-                #{item.opAppCode},
+                #{item.cpId},
             </trim>
             </trim>
             )
             )
         </foreach>
         </foreach>

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

@@ -72,6 +72,9 @@
             <if test="opDbUser != null and opDbUser != ''">
             <if test="opDbUser != null and opDbUser != ''">
                 AND op_db_user = #{opDbUser}
                 AND op_db_user = #{opDbUser}
             </if>
             </if>
+            <if test="searchText != null">
+                AND (position(#{searchText} in unit_code) > 0   OR position(#{searchText} in unit_name) > 0   OR  position(#{searchText} in remarks) > 0 )
+            </if>
         </where>
         </where>
     </sql>
     </sql>
 
 

+ 0 - 34
src/main/java/com/dk/mdm/model/pojo/ivt/Outbound.java

@@ -99,40 +99,6 @@ public class Outbound extends PageInfo<Outbound> implements Serializable {
 
 
 
 
     /**
     /**
-     * 销售订单ID
-     */
-    @Excel(name = "销售订单ID")
-    @ApiModelProperty(value = "销售订单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String orderId;
-
-
-    /**
-     * 销售订单号
-     */
-    @Excel(name = "销售订单号")
-    @ApiModelProperty(value = "销售订单号")
-    private String orderNo;
-
-
-    /**
-     * 入库退货单ID
-     */
-    @Excel(name = "入库退货单ID")
-    @ApiModelProperty(value = "入库退货单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String intoReturnId;
-
-
-    /**
-     * 入库退货单号
-     */
-    @Excel(name = "入库退货单号")
-    @ApiModelProperty(value = "入库退货单号")
-    private String intoReturnNo;
-
-
-    /**
      * 客户
      * 客户
      */
      */
     @Excel(name = "客户")
     @Excel(name = "客户")

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

@@ -29,7 +29,7 @@ import java.time.LocalDateTime;
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @Accessors(chain = true)
 @ExportTitle("客户资料")
 @ExportTitle("客户资料")
-@TableName(value = "t_mst_customer", autoResultMap = true)
+@TableName(value = "t_mst_customer", autoResultMap = true,schema = "dkic_b")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 public class Customer extends PageInfo<Customer> implements Serializable {
 public class Customer extends PageInfo<Customer> implements Serializable {
 
 

+ 0 - 34
src/main/java/com/dk/mdm/model/query/ivt/OutboundQuery.java

@@ -100,40 +100,6 @@ public class OutboundQuery extends PageInfo<OutboundQuery> implements Serializab
 
 
 
 
     /**
     /**
-     * 销售订单ID
-     */
-    @Excel(name = "销售订单ID")
-    @ApiModelProperty(value = "销售订单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String orderId;
-
-
-    /**
-     * 销售订单号
-     */
-    @Excel(name = "销售订单号")
-    @ApiModelProperty(value = "销售订单号")
-    private String orderNo;
-
-
-    /**
-     * 入库退货单ID
-     */
-    @Excel(name = "入库退货单ID")
-    @ApiModelProperty(value = "入库退货单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String intoReturnId;
-
-
-    /**
-     * 入库退货单号
-     */
-    @Excel(name = "入库退货单号")
-    @ApiModelProperty(value = "入库退货单号")
-    private String intoReturnNo;
-
-
-    /**
      * 客户
      * 客户
      */
      */
     @Excel(name = "客户")
     @Excel(name = "客户")

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

@@ -34,7 +34,7 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @Accessors(chain = true)
 @ExportTitle("客户资料")
 @ExportTitle("客户资料")
-@TableName(value = "t_mst_customer", autoResultMap = true)
+@TableName(value = "t_mst_customer", autoResultMap = true,schema = "dkic_b")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 public class CustomerQuery extends PageInfo<CustomerQuery> implements Serializable {
 public class CustomerQuery extends PageInfo<CustomerQuery> implements Serializable {
 
 

+ 2 - 0
src/main/java/com/dk/mdm/model/query/mst/GoodsBrandQuery.java

@@ -112,6 +112,8 @@ public class GoodsBrandQuery extends PageInfo<GoodsBrandQuery> implements Serial
     @TableField(typeHandler = TimestampTypeHandler.class)
     @TableField(typeHandler = TimestampTypeHandler.class)
     private LocalDateTime opCreateTime;
     private LocalDateTime opCreateTime;
 
 
+    private String searchText;
+
 
 
 
 
 
 

+ 1 - 1
src/main/java/com/dk/mdm/model/query/mst/GoodsCategoryQuery.java

@@ -237,7 +237,7 @@ public class GoodsCategoryQuery extends PageInfo<GoodsCategoryQuery> implements
      * 关联属性 + 查询条件
      * 关联属性 + 查询条件
      * @TableField(exist = false)
      * @TableField(exist = false)
      */
      */
-
+    private String searchText;
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 

+ 1 - 1
src/main/java/com/dk/mdm/model/query/mst/GoodsSeriesQuery.java

@@ -168,7 +168,7 @@ public class GoodsSeriesQuery extends PageInfo<GoodsSeriesQuery> implements Seri
      * 关联属性 + 查询条件
      * 关联属性 + 查询条件
      * @TableField(exist = false)
      * @TableField(exist = false)
      */
      */
-
+    private String searchText;
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 

+ 3 - 0
src/main/java/com/dk/mdm/model/query/mst/RoleQuery.java

@@ -173,6 +173,9 @@ public class RoleQuery extends PageInfo<Role> implements Serializable {
     @ApiModelProperty(value = "")
     @ApiModelProperty(value = "")
     private Boolean flgNolimitSen;
     private Boolean flgNolimitSen;
 
 
+    private String searchText;
+
+
 
 
     /*
     /*
      * 相关属性
      * 相关属性

+ 1 - 1
src/main/java/com/dk/mdm/model/query/mst/UnitQuery.java

@@ -176,7 +176,7 @@ public class UnitQuery extends PageInfo<UnitQuery> implements Serializable {
      * 关联属性 + 查询条件
      * 关联属性 + 查询条件
      * @TableField(exist = false)
      * @TableField(exist = false)
      */
      */
-
+    private String searchText;
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 

+ 0 - 34
src/main/java/com/dk/mdm/model/response/ivt/OutboundResponse.java

@@ -100,40 +100,6 @@ public class OutboundResponse extends PageInfo<OutboundResponse> implements Seri
 
 
 
 
     /**
     /**
-     * 销售订单ID
-     */
-    @Excel(name = "销售订单ID")
-    @ApiModelProperty(value = "销售订单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String orderId;
-
-
-    /**
-     * 销售订单号
-     */
-    @Excel(name = "销售订单号")
-    @ApiModelProperty(value = "销售订单号")
-    private String orderNo;
-
-
-    /**
-     * 入库退货单ID
-     */
-    @Excel(name = "入库退货单ID")
-    @ApiModelProperty(value = "入库退货单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String intoReturnId;
-
-
-    /**
-     * 入库退货单号
-     */
-    @Excel(name = "入库退货单号")
-    @ApiModelProperty(value = "入库退货单号")
-    private String intoReturnNo;
-
-
-    /**
      * 客户
      * 客户
      */
      */
     @Excel(name = "客户")
     @Excel(name = "客户")

+ 11 - 1
src/main/java/com/dk/mdm/model/response/mst/CustomerResponse.java

@@ -34,7 +34,7 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @Accessors(chain = true)
 @ExportTitle("客户资料")
 @ExportTitle("客户资料")
-@TableName(value = "t_mst_customer", autoResultMap = true)
+@TableName(value = "t_mst_customer", autoResultMap = true,schema = "dkic_b")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 public class CustomerResponse extends PageInfo<CustomerResponse> implements Serializable {
 public class CustomerResponse extends PageInfo<CustomerResponse> implements Serializable {
 
 
@@ -348,6 +348,16 @@ public class CustomerResponse extends PageInfo<CustomerResponse> implements Seri
      */
      */
 
 
 
 
+
+
+    private String cusFromName;
+    private String channelName;
+    private String orgName;
+    private String staffName;
+    private String reportStaffName;
+    private String followStaffName;
+    private String lastFollowStaffName;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
 }
 }

+ 3 - 1
src/main/java/com/dk/mdm/model/response/mst/GoodsBrandResponse.java

@@ -169,7 +169,9 @@ public class GoodsBrandResponse extends PageInfo<GoodsBrandResponse> implements
 
 
     private String goodsBrand;
     private String goodsBrand;
 
 
-    private String supplierName;
+    private String supplierNames;
+
+    private String supplierIds;
     /*
     /*
      * 相关属性
      * 相关属性
      * @TableField(exist = false)
      * @TableField(exist = false)

+ 1 - 0
src/main/java/com/dk/mdm/model/response/mst/GoodsCategoryResponse.java

@@ -161,6 +161,7 @@ public class GoodsCategoryResponse implements Serializable {
     @Excel(name = "企业ID")
     @Excel(name = "企业ID")
     @ApiModelProperty(value = "企业ID")
     @ApiModelProperty(value = "企业ID")
     private Integer cpId;
     private Integer cpId;
+    private String parentName;
 
 
 
 
 
 

+ 0 - 34
src/main/java/com/dk/mdm/model/vo/ivt/OutboundVO.java

@@ -100,40 +100,6 @@ public class OutboundVO extends PageInfo<OutboundVO> implements Serializable {
 
 
 
 
     /**
     /**
-     * 销售订单ID
-     */
-    @Excel(name = "销售订单ID")
-    @ApiModelProperty(value = "销售订单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String orderId;
-
-
-    /**
-     * 销售订单号
-     */
-    @Excel(name = "销售订单号")
-    @ApiModelProperty(value = "销售订单号")
-    private String orderNo;
-
-
-    /**
-     * 入库退货单ID
-     */
-    @Excel(name = "入库退货单ID")
-    @ApiModelProperty(value = "入库退货单ID")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String intoReturnId;
-
-
-    /**
-     * 入库退货单号
-     */
-    @Excel(name = "入库退货单号")
-    @ApiModelProperty(value = "入库退货单号")
-    private String intoReturnNo;
-
-
-    /**
      * 客户
      * 客户
      */
      */
     @Excel(name = "客户")
     @Excel(name = "客户")

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

@@ -34,7 +34,7 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @Accessors(chain = true)
 @ExportTitle("客户资料")
 @ExportTitle("客户资料")
-@TableName(value = "t_mst_customer", autoResultMap = true)
+@TableName(value = "t_mst_customer", autoResultMap = true,schema = "dkic_b")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 public class CustomerVO extends PageInfo<CustomerVO> implements Serializable {
 public class CustomerVO extends PageInfo<CustomerVO> implements Serializable {
 
 

+ 19 - 19
src/main/java/com/dk/mdm/model/vo/mst/GoodsCategoryVO.java

@@ -90,24 +90,24 @@ public class GoodsCategoryVO extends PageInfo<GoodsCategoryVO> implements Serial
     private String topId;
     private String topId;
 
 
 
 
-    /**
-     * 上层ID
-     */
-    @Excel(name = "上层ID")
-    @ApiModelProperty(value = "上层ID")
-    @TableField(typeHandler = UuidListTypeHandler.class)
-    private String levelUpper;
-
-
-    /**
-     * 下层ID
-     */
-    @Excel(name = "下层ID")
-    @ApiModelProperty(value = "下层ID")
-    @TableField(typeHandler = UuidListTypeHandler.class)
-    private String levelLower;
-
-
+//    /**
+//     * 上层ID
+//     */
+//    @Excel(name = "上层ID")
+//    @ApiModelProperty(value = "上层ID")
+//    @TableField(typeHandler = UuidListTypeHandler.class)
+//    private String levelUpper;
+//
+//
+//    /**
+//     * 下层ID
+//     */
+//    @Excel(name = "下层ID")
+//    @ApiModelProperty(value = "下层ID")
+//    @TableField(typeHandler = UuidListTypeHandler.class)
+//    private String levelLower;
+//
+//
     /**
     /**
      * 末级标识
      * 末级标识
      */
      */
@@ -115,7 +115,7 @@ public class GoodsCategoryVO extends PageInfo<GoodsCategoryVO> implements Serial
     @ApiModelProperty(value = "末级标识")
     @ApiModelProperty(value = "末级标识")
     private Boolean levelLeaf;
     private Boolean levelLeaf;
 
 
-
+//
     /**
     /**
      * 层级序号
      * 层级序号
      */
      */

+ 78 - 6
src/main/java/com/dk/mdm/service/mst/CustomerService.java

@@ -1,23 +1,95 @@
 package com.dk.mdm.service.mst;
 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.CustomerConvert;
 import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.mapper.mst.CustomerMapper;
 import com.dk.mdm.mapper.mst.CustomerMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
 import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mst.CustomerQuery;
+import com.dk.mdm.model.response.mst.CustomerResponse;
+import com.dk.mdm.model.vo.mst.CustomerVO;
+import com.dk.mdm.service.common.CommonService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
+import java.util.Map;
+
 @Service
 @Service
 @Transactional
 @Transactional
 public class CustomerService extends BaseService<Customer> {
 public class CustomerService extends BaseService<Customer> {
 
 
-	@Override
-	public BaseMapper<Customer> getRepository() {
-		return customerMapper;
-	}
+    @Override
+    public BaseMapper<Customer> getRepository() {
+        return customerMapper;
+    }
+
+    @Autowired
+    private CustomerMapper customerMapper;
+
+
+    @Autowired
+    private CustomerConvert customerConvert;
+
+    @Autowired
+    private CommonService commonService;
+
+    /**
+     * @desc : 重写主键
+     * @author : 于继渤
+     * @date : 2024/2/29 20:29
+     */
+    @Override
+    public String getPrimaryKey() {
+        return "cus_id";
+    }
+
+
+    /**
+     * @desc : 查询
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @Pagination
+    public ResponseResultVO<PageList<CustomerResponse>> selectByCond(CustomerQuery customerQuery) {
+        return super.mergeListWithCount(customerQuery, customerMapper.selectByCond(customerQuery),
+                customerMapper.countByCond(customerQuery));
+    }
 
 
-	@Autowired
-	private CustomerMapper customerMapper;
+    /**
+     * @desc : 新建
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> insert(CustomerVO customerVO) {
+        Customer customer = customerConvert.convertToPo(customerVO);
+        //设置编码
+        Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.CUSTOMER.getName(), true);
+        customer.setCusId(uniqueNoteCode.get("outId").toString());
+        customer.setCusCode(uniqueNoteCode.get("outNote").toString());
+        customerMapper.insert(customer);
+        return ResponseResultUtil.success();
+    }
 
 
+    /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> update(CustomerVO customerVO) {
+        Customer customer = customerConvert.convertToPo(customerVO);
+        super.updateByUuid(customer);
+        return ResponseResultUtil.success();
+    }
 }
 }

+ 8 - 3
src/main/java/com/dk/mdm/service/mst/RoleService.java

@@ -78,7 +78,12 @@ public class RoleService extends BaseService<Role> {
     public ResponseResultVO<?> saveRole(RoleVo roleVO) {
     public ResponseResultVO<?> saveRole(RoleVo roleVO) {
         Role role = roleConvert.convertToPo(roleVO);
         Role role = roleConvert.convertToPo(roleVO);
         Integer displayNo = roleMapper.selectDisplayNo(new RoleQuery());
         Integer displayNo = roleMapper.selectDisplayNo(new RoleQuery());
-        role.setDisplayNo(displayNo);
+        if (displayNo != null) {
+            //插入序号
+            role.setDisplayNo(displayNo);
+        } else {
+            role.setDisplayNo(0);
+        }
         //设置编码
         //设置编码
         Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.ROLE.getName(), true);
         Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.ROLE.getName(), true);
         role.setRoleId(uniqueNoteCode.get("outId").toString());
         role.setRoleId(uniqueNoteCode.get("outId").toString());
@@ -92,7 +97,7 @@ public class RoleService extends BaseService<Role> {
     }
     }
 
 
     private void setRoleItem(RoleVo roleVO, Role role) {
     private void setRoleItem(RoleVo roleVO, Role role) {
-        if (roleVO.getRoleFunList() != null && roleVO.getRoleFunList().size() > 0) {
+        if (roleVO.getRoleFunList() != null && roleVO.getRoleFunList().size() > 0 && roleVO.getRoleFunList().get(0).getFunUuid() != null) {
             //新建角色功能权限
             //新建角色功能权限
             for (RoleFun roleFun : roleVO.getRoleFunList()) {
             for (RoleFun roleFun : roleVO.getRoleFunList()) {
                 roleFun.setRoleId(role.getRoleId());
                 roleFun.setRoleId(role.getRoleId());
@@ -100,7 +105,7 @@ public class RoleService extends BaseService<Role> {
             }
             }
             roleFunService.saveRoleFun(roleVO.getRoleFunList());
             roleFunService.saveRoleFun(roleVO.getRoleFunList());
         }
         }
-        if (roleVO.getRoleSensitiveList() != null && roleVO.getRoleSensitiveList().size() > 0) {
+        if (roleVO.getRoleSensitiveList() != null && roleVO.getRoleSensitiveList().size() > 0 && roleVO.getRoleSensitiveList().get(0).getSenItemCode()!= null) {
             //新建角色敏感信息权限
             //新建角色敏感信息权限
             for (RoleSensitive roleSensitive : roleVO.getRoleSensitiveList()) {
             for (RoleSensitive roleSensitive : roleVO.getRoleSensitiveList()) {
                 roleSensitive.setRoleId(role.getRoleId());
                 roleSensitive.setRoleId(role.getRoleId());

+ 1 - 5
src/main/java/com/dk/mdm/service/mst/SettingValueService.java

@@ -68,11 +68,7 @@ public class SettingValueService extends BaseService<SettingValue> {
             deleteSettingValueId(vo.getCpId());
             deleteSettingValueId(vo.getCpId());
         }
         }
         if (vo.getSettingValueList() != null && vo.getSettingValueList().size() > 0) {
         if (vo.getSettingValueList() != null && vo.getSettingValueList().size() > 0) {
-            //新建角色敏感信息权限
-            for (SettingValue settingValue : vo.getSettingValueList()) {
-                settingValue.setSettingValue(vo.getSettingValue());
-                settingValue.setCpId(vo.getCpId());
-            }
+
             //批量新建
             //批量新建
             settingValueMapper.insertBatch(vo.getSettingValueList());
             settingValueMapper.insertBatch(vo.getSettingValueList());
         }
         }

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

@@ -110,7 +110,7 @@ public class OrderService extends BaseService<Order> {
     @Transactional(
     @Transactional(
             rollbackFor = {Exception.class}
             rollbackFor = {Exception.class}
     )
     )
-    public ResponseResultVO<?> insertOrder(OrderVO orderVO) {
+    public ResponseResultVO<?> insert(OrderVO orderVO) {
 
 
         // 如果没有客户id,要新建
         // 如果没有客户id,要新建
         if (orderVO.getCusId() == null) {
         if (orderVO.getCusId() == null) {
@@ -183,7 +183,7 @@ public class OrderService extends BaseService<Order> {
     @Transactional(
     @Transactional(
             rollbackFor = {Exception.class}
             rollbackFor = {Exception.class}
     )
     )
-    public ResponseResultVO<Boolean> updateOrder(OrderVO orderVO) {
+    public ResponseResultVO<Boolean> update(OrderVO orderVO) {
         // 转化实体
         // 转化实体
         Order order = orderConvert.convertToPo(orderVO);
         Order order = orderConvert.convertToPo(orderVO);
         //删除的
         //删除的