Просмотр исходного кода

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

# Conflicts:
#	src/main/java/com/dk/mdm/service/common/CommonService.java
zhoux 2 лет назад
Родитель
Сommit
7f95961d8f
73 измененных файлов с 3859 добавлено и 365 удалено
  1. 94 1
      src/main/java/com/dk/mdm/controller/common/CommonController.java
  2. 36 1
      src/main/java/com/dk/mdm/controller/ivt/InboundController.java
  3. 17 2
      src/main/java/com/dk/mdm/controller/ivt/InboundItemController.java
  4. 11 0
      src/main/java/com/dk/mdm/controller/ivt/InboundOtherController.java
  5. 1 1
      src/main/java/com/dk/mdm/controller/ivt/InboundPurchaseController.java
  6. 71 0
      src/main/java/com/dk/mdm/controller/mac/ReceiptController.java
  7. 23 0
      src/main/java/com/dk/mdm/controller/mst/CusFollowController.java
  8. 24 0
      src/main/java/com/dk/mdm/controller/mst/MeasureReceiptController.java
  9. 24 0
      src/main/java/com/dk/mdm/controller/mst/MeasureRoomController.java
  10. 1 1
      src/main/java/com/dk/mdm/controller/mst/StaffController.java
  11. 1 1
      src/main/java/com/dk/mdm/controller/pur/PurchaseController.java
  12. 21 0
      src/main/java/com/dk/mdm/infrastructure/convert/mac/ReceiptConvert.java
  13. 69 0
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.java
  14. 297 14
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml
  15. 8 0
      src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.java
  16. 6 0
      src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.xml
  17. 1 1
      src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.java
  18. 29 6
      src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml
  19. 1 7
      src/main/java/com/dk/mdm/mapper/ivt/IntoReturnItemMapper.java
  20. 7 5
      src/main/java/com/dk/mdm/mapper/ivt/IntoReturnItemMapper.xml
  21. 0 6
      src/main/java/com/dk/mdm/mapper/ivt/IntoReturnMapper.java
  22. 37 0
      src/main/java/com/dk/mdm/mapper/mac/ReceiptMapper.java
  23. 283 0
      src/main/java/com/dk/mdm/mapper/mac/ReceiptMapper.xml
  24. 1 7
      src/main/java/com/dk/mdm/mapper/mac/TransferMapper.xml
  25. 10 9
      src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.java
  26. 36 9
      src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.xml
  27. 3 0
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.java
  28. 9 0
      src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml
  29. 1 0
      src/main/java/com/dk/mdm/mapper/mst/GoodsSkuMapper.xml
  30. 14 0
      src/main/java/com/dk/mdm/mapper/mst/MeasureReceiptMapper.java
  31. 171 0
      src/main/java/com/dk/mdm/mapper/mst/MeasureReceiptMapper.xml
  32. 14 0
      src/main/java/com/dk/mdm/mapper/mst/MeasureRoomMapper.java
  33. 171 0
      src/main/java/com/dk/mdm/mapper/mst/MeasureRoomMapper.xml
  34. 0 7
      src/main/java/com/dk/mdm/mapper/pur/PurchaseItemMapper.java
  35. 0 6
      src/main/java/com/dk/mdm/mapper/pur/PurchaseMapper.java
  36. 2 0
      src/main/java/com/dk/mdm/mapper/pur/PurchaseMapper.xml
  37. 9 3
      src/main/java/com/dk/mdm/model/pojo/ivt/Inbound.java
  38. 6 0
      src/main/java/com/dk/mdm/model/pojo/ivt/InboundItem.java
  39. 292 0
      src/main/java/com/dk/mdm/model/pojo/mac/Receipt.java
  40. 1 9
      src/main/java/com/dk/mdm/model/pojo/mac/Transfer.java
  41. 202 0
      src/main/java/com/dk/mdm/model/pojo/mst/MeasureReceipt.java
  42. 203 0
      src/main/java/com/dk/mdm/model/pojo/mst/MeasureRoom.java
  43. 1 1
      src/main/java/com/dk/mdm/model/pojo/pur/Purchase.java
  44. 13 0
      src/main/java/com/dk/mdm/model/query/ivt/InboundQuery.java
  45. 322 0
      src/main/java/com/dk/mdm/model/query/mac/ReceiptQuery.java
  46. 1 9
      src/main/java/com/dk/mdm/model/query/mac/TransferQuery.java
  47. 4 0
      src/main/java/com/dk/mdm/model/query/mst/StaffQuery.java
  48. 30 0
      src/main/java/com/dk/mdm/model/response/ivt/InboundItemResponse.java
  49. 14 66
      src/main/java/com/dk/mdm/model/response/ivt/InboundResponse.java
  50. 5 63
      src/main/java/com/dk/mdm/model/response/ivt/IntoReturnItemResponse.java
  51. 318 0
      src/main/java/com/dk/mdm/model/response/mac/ReceiptResponse.java
  52. 1 9
      src/main/java/com/dk/mdm/model/response/mac/TransferResponse.java
  53. 43 0
      src/main/java/com/dk/mdm/model/response/mst/CusFollowResponse.java
  54. 6 1
      src/main/java/com/dk/mdm/model/response/mst/GoodsSkuResponse.java
  55. 3 61
      src/main/java/com/dk/mdm/model/vo/ivt/InboundItemVO.java
  56. 10 2
      src/main/java/com/dk/mdm/model/vo/ivt/InboundVO.java
  57. 293 0
      src/main/java/com/dk/mdm/model/vo/mac/ReceiptVO.java
  58. 1 9
      src/main/java/com/dk/mdm/model/vo/mac/TransferVO.java
  59. 14 0
      src/main/java/com/dk/mdm/model/vo/mst/CusFollowVO.java
  60. 161 0
      src/main/java/com/dk/mdm/service/common/CommonService.java
  61. 14 0
      src/main/java/com/dk/mdm/service/ivt/InboundItemService.java
  62. 28 0
      src/main/java/com/dk/mdm/service/ivt/InboundOtherService.java
  63. 1 2
      src/main/java/com/dk/mdm/service/ivt/InboundPurchaseService.java
  64. 7 1
      src/main/java/com/dk/mdm/service/ivt/InboundService.java
  65. 96 0
      src/main/java/com/dk/mdm/service/mac/ReceiptService.java
  66. 5 0
      src/main/java/com/dk/mdm/service/mac/TransferService.java
  67. 155 11
      src/main/java/com/dk/mdm/service/mst/CusFollowService.java
  68. 27 0
      src/main/java/com/dk/mdm/service/mst/MeasureReceiptService.java
  69. 28 0
      src/main/java/com/dk/mdm/service/mst/MeasureRoomService.java
  70. 6 19
      src/main/java/com/dk/mdm/service/mst/OrgService.java
  71. 36 6
      src/main/java/com/dk/mdm/service/mst/StaffService.java
  72. 3 3
      src/main/java/com/dk/mdm/service/pur/PurchaseService.java
  73. 6 6
      src/main/java/com/dk/mdm/service/sale/OrderService.java

+ 94 - 1
src/main/java/com/dk/mdm/controller/common/CommonController.java

@@ -179,7 +179,7 @@ public class CommonController extends BaseController<Map<String, Object>> {
     public ResponseResultVO<List<Map<String, Object>>> getSettingKind(@RequestBody Map<String, Object> param) {
         return commonService.getSettingKind(param);
     }
-    
+
     /**
      * @desc : 获取数据字典
      * @author : 姜宁
@@ -527,6 +527,99 @@ public class CommonController extends BaseController<Map<String, Object>> {
     public ResponseResultVO<?> getInitData(@RequestBody Map<String, Object> param) {
         return commonService.getInitData(param);
     }
+
+
+    /**
+     * @desc   : 查询供应商与客户
+     * @date   : 2024/3/13 14:01
+     * @author : 寇珊珊
+     */
+    @PostMapping({"get_supplier_and_customer"})
+    public ResponseResultVO<?> getSupplierAndCustomer(@RequestBody Map<String, Object> param) {
+        return commonService.getSupplierAndCustomer(param);
+    }
+
+    /**
+     * @desc   : 获取供应商和客户数据(分页)
+     * @date   : 2024/3/13 14:53
+     * @author : 寇珊珊
+     */
+    @ApiOperation(
+            value = "获取供应商和客户数据(分页)",
+            notes = "获取供应商和客户数据(分页)"
+    )
+    @PostMapping("get_supplier_and_customer_by_page")
+    public ResponseResultVO<PageList<Map<String, Object>>> getSupplierAndCustomerByPage(@RequestBody Map<String, Object> param) {
+        return commonService.getSupplierAndCustomerByPage(param);
+    }
+
+    /**
+     * @desc   : 获取组织机构
+     * @date   : 2024/3/13 16:48
+     * @author : 寇珊珊
+     */
+    @ApiOperation(
+            value = "获取组织机构",
+            notes = "获取组织机构"
+    )
+    @PostMapping("get_organization")
+    public ResponseResultVO<List<Map<String, Object>>> getOrganization(@RequestBody Map<String, Object> param) {
+        return commonService.getOrganization(param);
+    }
+
+
+    /**
+     * @desc   : 获取组织机构(分页)
+     * @date   : 2024/3/13 17:03
+     * @author : 寇珊珊
+     */
+    @ApiOperation(
+            value = "获取组织机构(分页)",
+            notes = "获取组织机构(分页)"
+    )
+    @PostMapping("get_organization_by_page")
+    public ResponseResultVO<PageList<Map<String, Object>>> getOrganizationByPage(@RequestBody Map<String, Object> param) {
+        return commonService.getOrganizationByPage(param);
+    }
+
+    /**
+     * @desc : 获取资金账户(下拉)
+     * @author : 付斌
+     * @date : 2024-03-14 11:34
+     */
+    @ApiOperation(
+            value = "获取资金账户",
+            notes = "获取资金账户"
+    )
+    @PostMapping("get_mac")
+    public ResponseResultVO<List<Map<String, Object>>> getMac(@RequestBody Map<String, Object> param) {
+        return commonService.getMac(param);
+    }
+
+    /**
+     * @desc : 获取资金账户(放大镜)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    @ApiOperation(
+            value = "获取商品",
+            notes = "获取商品"
+    )
+    @PostMapping("get_money_account")
+    public ResponseResultVO<List<Map<String, Object>>> getMoneyAccount(@RequestBody Map<String, Object> param) {
+        return commonService.getMoneyAccount(param);
+    }
+
+    /**
+     * @desc : 获取资金账户(放大镜分页)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    @ApiOperation(value = "获取商品分页查询", notes = "获取商品分页查询")
+    @PostMapping({"get_money_account_by_page"})
+    public ResponseResultVO<PageList<Map<String, Object>>> getMoneyAccountByPage(@RequestBody Map<String, Object> param) {
+        return commonService.getMoneyAccountByPage(param);
+    }
 }
 
 

+ 36 - 1
src/main/java/com/dk/mdm/controller/ivt/InboundController.java

@@ -10,12 +10,15 @@ import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.response.pur.PurchaseResponse;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import com.dk.mdm.model.vo.ivt.OutboundVO;
+import com.dk.mdm.service.ivt.InboundPurchaseService;
 import com.dk.mdm.service.ivt.InboundService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.validation.Valid;
+
 
 @Api(tags = "入库单API接口")
 @RestController
@@ -30,6 +33,8 @@ public class InboundController{
     private InboundService inboundService;
 
 
+    @Autowired
+    private InboundPurchaseService inheritedPurchaseService;
 
     /**
      * @desc   : 条件查询
@@ -41,7 +46,7 @@ public class InboundController{
             notes = "分页、关联、条件查询"
     )
     @PostMapping({"list_by"})
-    public ResponseResultVO<PageList<PurchaseResponse>> selectByCond(@RequestBody InboundQuery inboundQuery) {
+    public ResponseResultVO<PageList<InboundResponse>> selectByCond(@RequestBody InboundQuery inboundQuery) {
         return inboundService.selectByCond(inboundQuery);
     }
 
@@ -77,5 +82,35 @@ public class InboundController{
         return inboundService.insert(inboundVO);
     }
 
+    /**
+     * @desc   : 采购入库新建
+     * @date   : 2024/3/7 14:00
+     * @author : 王英杰
+     */
+    @ApiOperation(
+            value = "采购入库新建",
+            notes = "采购入库新建"
+    )
+    @PostMapping({"purchase_inbound/insert"})
+    public ResponseResultVO<?> purchaseInboundInsert(@Valid @RequestBody InboundVO inboundVO) {
+        return inheritedPurchaseService.purchaseInboundInsert(inboundVO);
+    }
+    /**
+     * @desc   : 采购入库办理
+     * @date   : 2024/3/7 15:34
+     * @author : 王英杰
+     */
+    @ApiOperation(
+            value = "采购入库办理",
+            notes = "采购入库办理"
+    )
+    @PostMapping({"purchase_handle_inbound/insert"})
+    public ResponseResultVO<?> purchaseHandleInbound(@RequestBody InboundVO inboundVO) {
+        return inheritedPurchaseService.purchaseHandleInbound(inboundVO);
+    }
+
+
+
+
 
 }

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

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

+ 11 - 0
src/main/java/com/dk/mdm/controller/ivt/InboundOtherController.java

@@ -107,4 +107,15 @@ public class InboundOtherController {
         return inboundOtherService.otherInboundCancel(inboundVO);
     }
 
+    /**
+     * @desc   : 获取单据信息(编辑用)
+     * @date   : 2024/3/14 16:37
+     * @author : 寇珊珊
+     */
+    @ApiOperation(value = "获取单据信息(编辑用)", notes = "获取单据信息(编辑用)")
+    @PostMapping({"select_by_update/{id}"})
+    public ResponseResultVO<?> selectByUpdate(@PathVariable String id) {
+        return inboundOtherService.selectByUpdate(id);
+    }
+
 }

+ 1 - 1
src/main/java/com/dk/mdm/controller/ivt/InboundPurchaseController.java

@@ -75,7 +75,7 @@ public class InboundPurchaseController {
             notes = "采购入库办理"
     )
     @PostMapping({"purchase_handle_inbound"})
-    public ResponseResultVO<?> purchaseHandleInbound(@RequestBody InboundVO inboundVO) {
+    public ResponseResultVO<?> purchaseHandleInbound(@Valid @RequestBody InboundVO inboundVO) {
         return inheritedPurchaseService.purchaseHandleInbound(inboundVO);
     }
 

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

@@ -0,0 +1,71 @@
+package com.dk.mdm.controller.mac;
+
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.model.pojo.mac.Receipt;
+import com.dk.common.service.BaseService;
+import com.dk.mdm.model.query.mac.ReceiptQuery;
+import com.dk.mdm.model.response.mac.ReceiptResponse;
+import com.dk.mdm.model.vo.mac.ReceiptVO;
+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.mac.ReceiptService;
+
+
+@Api(tags = "收【退】款单API接口")
+@RestController
+@RequestMapping("/mac/receipt")
+public class ReceiptController{
+
+    public BaseService<Receipt> getService() {
+        return receiptService;
+    }
+
+    @Autowired
+    private ReceiptService receiptService;
+
+    /**
+     * @desc : 条件查询
+     * @author : 付斌
+     * @date : 2023/1/9 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"list_by"})
+    public ResponseResultVO<PageList<ReceiptResponse>> selectByCond(@RequestBody ReceiptQuery receiptQuery) {
+        return receiptService.selectByCond(receiptQuery);
+    }
+
+    /**
+     * @desc : 通过ID查询
+     * @author : 付斌
+     * @date : 2023/1/9 10:41
+     */
+    @PostMapping({"/{id}"})
+    public ResponseResultVO selectById(@PathVariable String id) {
+        return receiptService.selectById(id);
+    }
+
+    /**
+     * @desc : 新建
+     * @author : 付斌
+     * @date : 2023/1/9 10:48
+     */
+    @ApiOperation(value = "新建", notes = "新建")
+    @PostMapping({"insert"})
+    public ResponseResultVO<?> insert(@RequestBody ReceiptVO receiptVO) {
+        return receiptService.insert(receiptVO);
+    }
+
+    /**
+     * @desc : 编辑
+     * @author : 付斌
+     * @date : 2023/1/9 10:49
+     */
+    @ApiOperation(value = "编辑", notes = "编辑")
+    @PostMapping({"update"})
+    public ResponseResultVO<?> update(@RequestBody ReceiptVO receiptVO) {
+        return receiptService.update(receiptVO);
+    }
+}

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

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.mst.CusFollowService;
 
+import javax.validation.Valid;
 import java.util.List;
 
 @Api(tags = "客户跟进API接口")
@@ -66,4 +67,26 @@ public class CusFollowController{
     public ResponseResultVO<List<CusFollowResponse>> selectByList(@RequestBody CusFollowQuery customerQuery) {
         return cusFollowService.selectByList(customerQuery);
     }
+
+    /**
+     * @desc : 新建量尺回执
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @ApiOperation( value = "新建量尺回执", notes = "v" )
+    @PostMapping({"update_measure"})
+    public ResponseResultVO<?> updateMeasure(@RequestBody CusFollowVO cusFollowVO) {
+        return cusFollowService.updateMeasure(cusFollowVO);
+    }
+
+
+    @ApiOperation(
+            value = "编辑",
+            notes = "编辑"
+    )
+    @PostMapping("update")
+    public ResponseResultVO<?> update(@Valid @RequestBody CusFollowVO cusFollowVO) {
+        return cusFollowService.update(cusFollowVO);
+    }
+
 }

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

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.mdm.model.pojo.mst.MeasureReceipt;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.MeasureReceiptService;
+
+@Api(tags = "量尺回执API接口")
+@RestController
+@RequestMapping("/measureReceipt")
+public class MeasureReceiptController{
+
+    public BaseService<MeasureReceipt> getService() {
+        return measureReceiptService;
+    }
+
+    @Autowired
+    private MeasureReceiptService measureReceiptService;
+
+}

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

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.mdm.model.pojo.mst.MeasureRoom;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.MeasureRoomService;
+
+@Api(tags = "量尺空间API接口")
+@RestController
+@RequestMapping("/measureRoom")
+public class MeasureRoomController{
+
+    public BaseService<MeasureRoom> getService() {
+        return measureRoomService;
+    }
+
+    @Autowired
+    private MeasureRoomService measureRoomService;
+
+}

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

@@ -117,7 +117,7 @@ public class StaffController {
     @ApiOperation(value = "新建员工", notes = "新建员工")
     @PostMapping({"insert_feign_staff"})
     public ResponseResultVO<?> insertFeignStaff(@RequestBody StaffVO staffVO) {
-        return staffService.insert(staffVO);
+        return staffService.insertFeignStaff(staffVO);
     }
 
     /**

+ 1 - 1
src/main/java/com/dk/mdm/controller/pur/PurchaseController.java

@@ -95,7 +95,7 @@ public class PurchaseController{
         return purchaseService.update(Purchasevo);
     }
     /**
-     * @desc   : 采购订单 转 采购入库
+     * @desc   : 采购订单 转 采购入库   (目前废弃)
      * @author : 王英杰
      * @date   : 2024年3月11日
      */

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

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

+ 69 - 0
src/main/java/com/dk/mdm/mapper/common/CommonMapper.java

@@ -365,7 +365,76 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
     Long getInventoryCountByPage(Map param);
 
     List<Map<String, Object>> getSaleChannel(Map param);
+
+
+    /**
+     * @desc   : 获取供应商和客户数据
+     * @date   : 2024/3/13 14:03
+     * @author : 寇珊珊
+     */
+    List<Map<String, Object>> getSupplierAndCustomer(Map param);
+
+    /**
+     * @desc   : 获取供应商和客户数据分页
+     * @date   : 2024/3/13 14:03
+     * @author : 寇珊珊
+     */
+    List<Map<String,Object>> getSupplierAndCustomerByPage(Map param);
+
+    /**
+     * @desc   : 获取供应商和客户数据分页数量
+     * @date   : 2024/3/13 14:53
+     * @author : 寇珊珊
+     */
+    Long getSupplierAndCustomerByPageCount(Map param);
+
+    /**
+     * @desc   : 获取员工
+     * @date   : 2024/3/13 16:24
+     * @author : 寇珊珊
+     */
     List<Map<String, Object>> getStaff(Map param);
 
 
+    /**
+     * @desc   : 获取组织机构
+     * @date   : 2024/3/13 17:03
+     * @author : 寇珊珊
+     */
+    List<Map<String, Object>> getOrganization(Map param);
+
+    /**
+     * @desc   : 获取组织机构分页
+     * @date   : 2024/3/13 17:03
+     * @author : 寇珊珊
+     */
+    List<Map<String, Object>> getOrganizationByPage(Map param);
+
+    /**
+     * @desc   : 获取组织机构数量
+     * @date   : 2024/3/13 17:03
+     * @author : 寇珊珊
+     */
+    Long getOrganizationCount(Map<String, Object> param);
+
+    /**
+     * @desc   : 获取资金账户(下拉)
+     * @author : 付斌
+     * @date   : 2024-03-14 11:35
+     */
+    List<Map<String, Object>> getMac(Map param);
+
+    /**
+     * @desc : 获取资金账户(放大镜)
+     * @author : 付斌
+     * @date : 2024-03-05 10:53
+     */
+    List<Map<String, Object>> getMoneyAccount(Map param);
+
+    /**
+     * @desc : 获取资金账户(数量)
+     * @author : 付斌
+     * @date : 2024-03-05 10:52
+     */
+    Long getMoneyAccountCountByPage(Map param);
 }

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

@@ -919,6 +919,9 @@
         <if test="whName != null">
             AND tmgs.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
         </if>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
     </select>
 
     <!-- 查询库存个数 -->
@@ -937,13 +940,13 @@
             AND tpi.non_std_code = #{nonStdCode}
         </if>
         <if test="skuCode != null">
-            AND tmgs.sku_code = #{skuCode}
+            AND tmgs.sku_code LIKE concat('%',my_ex.likequery(#{skuCode}),'%')
         </if>
         <if test="skuName != null">
-            AND tmgs.sku_name = #{skuName}
+            AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
         </if>
         <if test="whName != null">
-            AND tmgs.wh_name = #{whName}
+            AND tmgs.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
         </if>
     </select>
 
@@ -962,20 +965,300 @@
             </if>
         </where>
     </select>
-    <!--获取员工-->
-    <select id="getStaff" resultType="java.util.Map">
-        SELECT
-        staff_id AS "staffId",
-        staff_id AS "id",
-        staff_code AS "staffCode",
-        staff_name AS "staffName"
-        FROM dkic_b.t_mst_staff
+    <!--获取仓库档案-->
+
+
+
+    <!--获取供应商和客户数据-->
+    <select id="getSupplierAndCustomer" resultType="java.util.Map">
+        select tms.sup_id as "objId",
+        tms.sup_code as "objCode",
+        tms.sup_name as "objName",
+        '供应商' as "objTypeName",
+        1 as "objType",
+        tms.flg_valid as "flgValid"
+        null as "phone",
+        null as "addressFull"
+        from dkic_b.t_mst_supplier tms
         <where>
-            <if test="cpId != null">
-                AND cp_id = #{cpId}
+        <if test="flgValid">
+            AND tms.flgValid
+        </if>
+        <if test="objCode != null and objCode != ''">
+            AND tms.sup_code LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+        </if>
+        <if test="objName != null and objName != ''">
+            AND tms.sup_name LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+        </if>
+        </where>
+        union all
+        select cus.cus_id as "objId",
+        cus.cus_code as "objCode",
+        cus.cus_name as "objName",
+        '客户' as "objTypeName",
+        2 as "objType",
+        cus.flg_valid as "flgValid",
+        cus.cus_phone as "phone",
+        cus.address_full as "addressFull"
+        from dkic_b.t_mst_customer cus
+        <where>
+            <if test="flgValid">
+                AND cus.flgValid
+            </if>
+            <if test="objCode != null and objCode != ''">
+                AND cus.cus_code LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+            <if test="objName != null and objName != ''">
+                AND cus.cus_name LIKE concat('%',my_ex.likequery(#{objName}),'%')
             </if>
         </where>
     </select>
-    <!--获取仓库档案-->
+    <!--获取供应商和客户数据分页-->
+    <select id="getSupplierAndCustomerByPage" resultType="java.util.Map">
+        select * from(
+        select tms.sup_id as "objId",
+        tms.sup_code as "objCode",
+        tms.sup_name as "objName",
+        '供应商' as "objTypeName",
+        1 as "objType",
+        tms.flg_valid as "flgValid",
+        null as "phone",
+        null as "addressFull"
+        from dkic_b.t_mst_supplier tms
+        <where >
+            <if test="flgValid">
+                AND tms.flgValid
+            </if>
+            <if test="objCode != null and objCode != ''">
+                AND tms.sup_code LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+            <if test="objName != null and objName != ''">
+                AND tms.sup_name LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+        </where>
+        union all
+        select cus.cus_id as "objId",
+        cus.cus_code as "objCode",
+        cus.cus_name as "objName",
+        '客户' as "objTypeName",
+        2 as "objType",
+        cus.flg_valid as "flgValid",
+        cus.cus_phone as "phone",
+        cus.address_full as "addressFull"
+        from dkic_b.t_mst_customer cus
+        <where>
+            <if test="flgValid">
+                AND cus.flgValid
+            </if>
+            <if test="objCode != null and objCode != ''">
+                AND cus.cus_code LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+            <if test="objName != null and objName != ''">
+                AND cus.cus_name LIKE concat('%',my_ex.likequery(#{objName}),'%')
+            </if>
+            <if test="flgValid">
+                AND cus.flgValid
+            </if>
+        </where>
+        ) tt
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+    <!--获取供应商和客户数据分页-->
+    <select id="getSupplierAndCustomerByPageCount" resultType="Long">
+        select count(1) from(
+        select tms.sup_id as "objId",
+        tms.sup_code as "objCode",
+        tms.sup_name as "objName",
+        '供应商' as "objTypeName",
+        1 as "objType",
+        tms.flg_valid as "flgValid",
+        null as "phone",
+        null as "addressFull"
+        from dkic_b.t_mst_supplier tms
+        <where>
+            <if test="flgValid">
+                AND tms.flgValid
+            </if>
+            <if test="objCode != null and objCode != ''">
+                AND tms.sup_code LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+            <if test="objName != null and objName != ''">
+                AND tms.sup_name LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+        </where>
+        union all
+        select cus.cus_id as "objId",
+        cus.cus_code as "objCode",
+        cus.cus_name as "objName",
+        '客户' as "objTypeName",
+        2 as "objType",
+        cus.flg_valid as "flgValid",
+        cus.cus_phone as "phone",
+        cus.address_full as "addressFull"
+        from dkic_b.t_mst_customer cus
+        <where>
+            <if test="flgValid">
+                AND cus.flgValid
+            </if>
+            <if test="objCode != null and objCode != ''">
+                AND cus.cus_code LIKE concat('%',my_ex.likequery(#{objCode}),'%')
+            </if>
+            <if test="objName != null and objName != ''">
+                AND cus.cus_name LIKE concat('%',my_ex.likequery(#{objName}),'%')
+            </if>
+        </where>
+        ) tt
+    </select>
+
+
+    <!-- 获取用户 -->
+    <select id="getStaff" resultType="java.util.Map">
+        select
+          s.staff_name as "staffName"
+        , s.staff_code as "staffCode"
+        , sys.f_code_name(s.staff_code, s.staff_name) AS "staffCodeName",
+        , s.staff_id as "staffId"
+        , s.staff_id AS "id",
+        , s.org_id as "orgId"
+        , o.org_name as "orgName"
+        , c.cp_name as "cpName"
+        FROM dkic_b.t_mst_staff s
+        left join dkic_b.t_mst_org o on o.org_id = s.org_id
+        left join dkic_a.t_a_company c on c.cp_id = s.cp_id
+        where
+        u.cp_id = #{cpId}
+        <if test="staffCode !=null and staffCode !=''">
+            AND s.staff_code LIKE concat('%',my_ex.likequery(#{staffCode}),'%')
+        </if>
+        <if test="staffName !=null and staffName !=''">
+            AND s.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
+        </if>
+        <if test="orgId !=null">
+            AND s.org_id = #{orgId}
+        </if>
+        <if test="orgName !=null and orgName !=''">
+            AND o.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+        </if>
+    </select>
+
+
+    <!-- 获取组织机构 -->
+    <select id="getOrganization" resultType="java.util.Map">
+        select o.org_id as "orgId"
+        , o.org_code as "orgCode"
+        , o.org_name as "orgName"
+        , sys.f_code_name(o.org_code, o.org_name) AS "orgCodeName"
+        from dkic_b.t_mst_org o
+        where
+        o.flg_valid
+        and o.cp_id = #{cpId}
+        <if test="orgCode !=null and orgCode !=''">
+            AND o.org_code LIKE concat('%',my_ex.likequery(#{orgCode}),'%')
+        </if>
+        <if test="orgName !=null and orgName !=''">
+            AND o.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+        </if>
+        order by o.level_code
+    </select>
+    <!-- 获取组织机构分页 -->
+    <select id="getOrganizationByPage" resultType="java.util.Map">
+        select o.org_id as "orgId"
+        , o.org_code as "orgCode"
+        , o.org_name as "orgName"
+        , sys.f_code_name(o.org_code, o.org_name) AS "orgCodeName"
+        from dkic_b.t_mst_org o
+        where
+        o.flg_valid
+        and o.cp_id = #{cpId}
+        <if test="orgCode !=null and orgCode !=''">
+            AND o.org_code LIKE concat('%',my_ex.likequery(#{orgCode}),'%')
+        </if>
+        <if test="orgName !=null and orgName !=''">
+            AND o.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+        </if>
+        order by o.level_code
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+    <!-- 获取组织机构分个数-->
+    <select id="getOrganizationCount" resultType="java.lang.Long">
+        SELECT count(1)
+        from dkic_b.t_mst_org o
+        where
+        o.flg_valid
+        and o.cp_id = #{cpId}
+        <if test="orgCode !=null and orgCode !=''">
+            AND o.org_code LIKE concat('%',my_ex.likequery(#{orgCode}),'%')
+        </if>
+        <if test="orgName !=null and orgName !=''">
+            AND o.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+        </if>
+    </select>
 
+    <!-- 获取资金账户(下拉)-->
+    <select id="getMac" resultType="java.util.Map">
+        select tmma.mac_id           as "macId",
+               tmma.mac_code         as "macCode",
+               tmma.mac_name         as "macName",
+               tmma.mac_type         as "macType",
+               tmma.balance,
+               tmma.display_no       as "displayNo",
+               tmma.flg_default      as "flgDefault",
+               tmma.mac_receipt_code as "macReceiptCode",
+               tmma.remarks
+        from dkic_b.t_mst_money_account tmma
+        where tmma.flg_valid
+          and tmma.cp_id = #{cpId}
+        <if test="macCode !=null and macCode !=''">
+            AND tmma.mac_code LIKE concat('%',my_ex.likequery(#{macCode}),'%')
+        </if>
+        <if test="macName !=null and macName !=''">
+            AND tmma.mac_name LIKE concat('%',my_ex.likequery(#{macName}),'%')
+        </if>
+        order by tmma.display_no
+    </select>
+
+    <!-- 获取资金账户(放大镜) -->
+    <select id="getMoneyAccount" resultType="java.util.Map">
+        select tmma.mac_id           as "macId",
+               tmma.mac_code         as "macCode",
+               tmma.mac_name         as "macName",
+               tmma.mac_type         as "macType",
+               tmma.balance,
+               tmma.display_no       as "displayNo",
+               tmma.flg_default      as "flgDefault",
+               tmma.mac_receipt_code as "macReceiptCode",
+               tmma.remarks
+        from dkic_b.t_mst_money_account tmma
+        where tmma.flg_valid
+          and tmma.cp_id = #{cpId}
+        <if test="macCode !=null and macCode !=''">
+            AND tmma.mac_code LIKE concat('%',my_ex.likequery(#{macCode}),'%')
+        </if>
+        <if test="macName !=null and macName !=''">
+            AND tmma.mac_name LIKE concat('%',my_ex.likequery(#{macName}),'%')
+        </if>
+        order by tmma.display_no
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 获取资金账户(放大镜)个数 -->
+    <select id="getMoneyAccountCountByPage" resultType="Long">
+        SELECT
+        count(1)
+        from dkic_b.t_mst_money_account tmma
+        where tmma.flg_valid
+          and tmma.cp_id = #{cpId}
+        <if test="macCode !=null and macCode !=''">
+            AND tmma.mac_code LIKE concat('%',my_ex.likequery(#{macCode}),'%')
+        </if>
+        <if test="macName !=null and macName !=''">
+            AND tmma.mac_name LIKE concat('%',my_ex.likequery(#{macName}),'%')
+        </if>
+    </select>
 </mapper>

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

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

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

@@ -136,11 +136,17 @@
         ,tmgs.sku_code  as "skuCode"
         ,tmgs.sku_model as "skuModel"
         ,tmgs.sku_name  as "skuName"
+        ,tmgs.sku_spec  as "skuSpec"
         ,tmgb.brand_name  as "brandName"
         ,tmgb.short_name  as "shortName"
+        ,tmw.wh_id as "whId"
+        ,tmw.wh_code as "whCode"
+        ,tmw.wh_name as "whName"
         FROM dkic_b.t_psi_inbound_item tpii
         left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpii.sku_id
         left join dkic_b.t_mst_goods_brand tmgb on tmgb.brand_id = tmgs.brand_id
+        left join dkic_b.t_psi_inventory tpi on tpi.inv_id = tpii.inv_id
+        left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}

+ 1 - 1
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.java

@@ -54,7 +54,7 @@ public interface InboundMapper extends BaseMapper<Inbound>{
      * @author : 王英杰
      * @date   : 2024/3/8 10:58
      */
-    List<PurchaseResponse> selectByCond(InboundQuery inboundQuery);
+    List<InboundResponse> selectByCond(InboundQuery inboundQuery);
 
     /**
      * @desc   : 条件查询个数 (采购入库用)

+ 29 - 6
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -10,7 +10,8 @@
         into_status, intoing_qty, intoing_amt, into_qty, into_amt, return_qty,
         return_amt, into_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,wh_id
+        op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user,wh_id,
+        into_reason
     </sql>
 
 
@@ -20,13 +21,13 @@
         tpi.cus_id, tpi.sup_id, tpi.into_status, tpi.intoing_qty, tpi.intoing_amt, tpi.into_qty,
         tpi.into_amt, tpi.return_qty, tpi.return_amt, tpi.into_date, tpi.remarks, tpi.annex_paths,
         tpi.make_staff, tpi.make_time, tpi.receivable_id, tpi.payable_id, tpi.flg_valid, tpi.cp_id,
-        tpi.wh_id
+        tpi.wh_id,tpi.into_reason
     </sql>
 
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.ivt.Inbound">
-        <id column="into_id" property="intoId"/>
+        <id column="into_id" property="intoId" typeHandler="UuidTypeHandler"/>
         <result column="into_no" property="intoNo"/>
         <result column="into_type" property="intoType"/>
         <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
@@ -58,11 +59,13 @@
         <result column="op_app_code" property="opAppCode"/>
         <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
         <result column="op_db_user" property="opDbUser"/>
+        <result column="entry_reason" property="entryReason" typeHandler="UuidTypeHandler"/>
+        <result column="wh_id" property="whId"/>
     </resultMap>
 
     <!-- response查询映射结果 -->
     <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.ivt.InboundResponse">
-        <id column="into_id" property="intoId"/>
+        <id column="into_id" property="intoId" typeHandler="UuidTypeHandler"/>
         <result column="into_no" property="intoNo"/>
         <result column="into_type" property="intoType"/>
         <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
@@ -88,6 +91,7 @@
         <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="cp_id" property="cpId"/>
+        <result column="entry_reason" property="entryReason" typeHandler="UuidTypeHandler"/>
     </resultMap>
 
 
@@ -100,7 +104,7 @@
     </sql>
     <!-- response明细关联明细映射-->
     <resultMap id="BaseResultMapItemResponse" type="com.dk.mdm.model.response.ivt.InboundResponse">
-        <id column="into_id" property="intoId"/>
+        <id column="into_id" property="intoId" typeHandler="UuidTypeHandler"/>
         <result column="into_no" property="intoNo"/>
         <result column="into_type" property="intoType"/>
         <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
@@ -172,11 +176,24 @@
     <sql id="Condition">
         <where>
             <if test="intoNo != null and intoNo != ''">
-                AND tpi.into_no = #{intoNo}
+                AND tpi.into_no = LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
             </if>
             <if test="intoType != null and intoType != ''">
                 AND tpi.into_type LIKE concat('%',my_ex.likequery(#{intoType}),'%')
             </if>
+            <if test="intoTypes != null and intoTypes.size()>0">
+                AND tpi.into_type =any(#{intoTypes,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                    tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
             <if test="fromId != null and fromId != ''">
                 AND tpi.from_id = #{fromId}::uuid
             </if>
@@ -260,6 +277,7 @@
         tmc.cus_phone                                     as "cusPhone",
         tmc.cus_from                                      as "cusFrom",
         makestaff.staff_name                              as "makeStaffName",
+        sys.f_get_name_i18n(tdktype.kind_name_i18n, 'zh_CN') AS  "intoTypeName",
         sys.f_get_name_i18n(tdk.kind_name_i18n, 'zh_CN') AS  "intoStatusName"
         FROM dkic_b.t_psi_inbound tpi
         <include refid="Join_Table"/>
@@ -284,6 +302,7 @@
         Left join dkic_b.t_mst_staff tms on tms.staff_id = tpi.staff_id
         Left join dkic_b.t_mst_staff makestaff on makestaff.staff_id = tpi.make_staff
         LEFT JOIN sys.t_data_kind tdk   ON tdk.kind_code = tpi.into_status
+        LEFT JOIN sys.t_data_kind tdktype   ON tdktype.kind_code = tpi.into_type
         Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         left join dkic_b.t_mst_customer tmc on tpi.cus_id = tmc.cus_id
     </sql>
@@ -353,6 +372,8 @@
             payable_id,
             cp_id,
             op_app_code,
+            wh_id,
+            entry_reason,
         </trim>
         )
         values
@@ -383,6 +404,8 @@
                 #{item.payableId}::uuid,
                 #{item.cpId},
                 #{item.opAppCode},
+                #{item.whId},
+                #{item.entryReason}::uuid,
             </trim>
             )
         </foreach>

+ 1 - 7
src/main/java/com/dk/mdm/mapper/ivt/IntoReturnItemMapper.java

@@ -37,12 +37,6 @@ public interface IntoReturnItemMapper extends BaseMapper<IntoReturnItem>{
      */
     IntoReturnItemResponse selectById(@Param("itemId") String itemId);
 
-    /**
-     * @desc   : 根据Id修改
-     * @date   : 2024/3/12 9:32
-     * @author : 寇珊珊
-     */
-    int updateById(IntoReturnItem intoReturnItem);
-    
+
 }
 

+ 7 - 5
src/main/java/com/dk/mdm/mapper/ivt/IntoReturnItemMapper.xml

@@ -6,9 +6,10 @@
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
         item_id, return_id, into_id, into_item_id, pur_id, pur_item_id, item_index,
-               sku_id, item_qty, price_std, amt_std, price_return, item_amt, non_std_code,
-               out_status, outoing_qty, outoing_amt, out_qty, out_amt, 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
+        sku_id, item_qty, price_std, amt_std, price_return, item_amt, non_std_code,
+        out_status, outoing_qty, outoing_amt, out_qty, out_amt, 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,wh_id
     </sql>
 
 
@@ -16,7 +17,7 @@
         tpiri.item_id, tpiri.return_id, tpiri.into_id, tpiri.into_item_id, tpiri.pur_id, tpiri.pur_item_id, tpiri.item_index, tpiri.sku_id, tpiri.item_qty,
                      tpiri.price_std,tpiri.amt_std, tpiri.price_return,
                tpiri.item_amt, tpiri.non_std_code, tpiri.out_status, tpiri.outing_qty, tpiri.outing_amt, tpiri.out_qty, tpiri.out_amt,
-                     tpiri.remarks, tpiri.flg_valid, tpiri.cp_id
+                     tpiri.remarks, tpiri.flg_valid, tpiri.cp_id,tpiri.wh_id
     </sql>
 
 
@@ -53,6 +54,7 @@
                 <result column="op_app_code" property="opAppCode"/>
             <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
                 <result column="op_db_user" property="opDbUser"/>
+        <result column="wh_id" property="whId" typeHandler="UuidTypeHandler"/>
     </resultMap>
 
     <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.ivt.IntoReturnItemResponse">
@@ -82,7 +84,7 @@
         <result column="sku_name" property="skuName"/>
         <result column="sku_model" property="skuModel"/>
         <result column="sku_images" property="skuImages"/>
-
+        <result column="wh_id" property="whId" typeHandler="UuidTypeHandler"/>
     </resultMap>
 
 

+ 0 - 6
src/main/java/com/dk/mdm/mapper/ivt/IntoReturnMapper.java

@@ -43,11 +43,5 @@ public interface IntoReturnMapper extends BaseMapper<IntoReturn>{
      */
     IntoReturnResponse selectById(@Param("returnId") String returnId);
 
-    /**
-     * @desc   : 根据Id修改
-     * @date   : 2024/3/12 9:32
-     * @author : 寇珊珊
-     */
-    int updateById(IntoReturn intoReturn);
 }
 

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

@@ -0,0 +1,37 @@
+package com.dk.mdm.mapper.mac;
+
+import com.dk.mdm.model.pojo.mac.Receipt;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mac.ReceiptQuery;
+import com.dk.mdm.model.response.mac.ReceiptResponse;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+*  收【退】款单 Mapper
+*/
+@Repository
+public interface ReceiptMapper extends BaseMapper<Receipt>{
+    /**
+     * @desc   : 根据条件进行查询
+     * @author : 付斌
+     * @date   : 2024-02-28 10:18
+     */
+    List<ReceiptResponse> selectByCond(ReceiptQuery receiptQuery);
+
+    /**
+     * @desc   : 根据条件进行查询(数量)
+     * @author : 付斌
+     * @date   : 2024-02-28 10:19
+     */
+    Long countByCond(ReceiptQuery receiptQuery);
+
+    /**
+     * @desc   : 根据Id进行查询
+     * @author : 付斌
+     * @date   : 2024-03-03 9:25
+     */
+    ReceiptResponse selectById(String id);
+}
+

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

@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dk.mdm.mapper.mac.ReceiptMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        receipt_id, receipt_no, receipt_date, receipt_type, order_id, cus_id, org_id, staff_id, receipt_mac, receipt_amt, receivable_id, waive_amt, handle_amt, residue_amt, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mac.Receipt">
+        <id column="receipt_id" property="receiptId"/>
+                <result column="receipt_no" property="receiptNo"/>
+            <result column="receipt_date" property="receiptDate" typeHandler="TimestampTypeHandler"/>
+                <result column="receipt_type" property="receiptType"/>
+                <result column="order_id" property="orderId" typeHandler="UuidTypeHandler"/>
+                <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
+                <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+                <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+                <result column="receipt_mac" property="receiptMac" typeHandler="UuidTypeHandler"/>
+                <result column="receipt_amt" property="receiptAmt"/>
+                <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
+                <result column="waive_amt" property="waiveAmt"/>
+                <result column="handle_amt" property="handleAmt"/>
+                <result column="residue_amt" property="residueAmt"/>
+                <result column="remarks" property="remarks"/>
+                <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
+                <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
+            <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
+                <result column="flg_valid" property="flgValid"/>
+                <result column="cp_id" property="cpId"/>
+            <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
+            <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
+                <result column="op_app_code" property="opAppCode"/>
+            <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
+                <result column="op_db_user" property="opDbUser"/>
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mac.ReceiptResponse">
+        <id column="receipt_id" property="receiptId"/>
+                <result column="receipt_no" property="receiptNo"/>
+            <result column="receipt_date" property="receiptDate" typeHandler="TimestampTypeHandler"/>
+                <result column="receipt_type" property="receiptType"/>
+                <result column="order_id" property="orderId" typeHandler="UuidTypeHandler"/>
+                <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
+                <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+                <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+                <result column="receipt_mac" property="receiptMac" typeHandler="UuidTypeHandler"/>
+                <result column="receipt_amt" property="receiptAmt"/>
+                <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
+                <result column="waive_amt" property="waiveAmt"/>
+                <result column="handle_amt" property="handleAmt"/>
+                <result column="residue_amt" property="residueAmt"/>
+                <result column="remarks" property="remarks"/>
+                <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
+                <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
+            <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
+                <result column="flg_valid" property="flgValid"/>
+                <result column="cp_id" property="cpId"/>
+            <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
+            <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
+                <result column="op_app_code" property="opAppCode"/>
+            <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
+                <result column="op_db_user" property="opDbUser"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="receiptNo != null and receiptNo != ''">
+                AND t.receipt_no LIKE concat('%',my_ex.likequery(#{receiptNo}),'%')
+            </if>
+            <if test="receiptDate != null">
+                AND t.receipt_date = #{receiptDate}
+            </if>
+            <if test="orderId != null and orderId != ''">
+                AND t.order_id = #{orderId}
+            </if>
+            <if test="receiptAmt != null">
+                AND t.receipt_amt = #{receiptAmt}
+            </if>
+            <if test="receivableId != null and receivableId != ''">
+                AND t.receivable_id = #{receivableId}
+            </if>
+            <if test="waiveAmt != null">
+                AND t.waive_amt = #{waiveAmt}
+            </if>
+            <if test="handleAmt != null">
+                AND t.handle_amt = #{handleAmt}
+            </if>
+            <if test="residueAmt != null">
+                AND t.residue_amt = #{residueAmt}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND t.remarks = #{remarks}
+            </if>
+            <if test="annexPaths != null and annexPaths != ''">
+                AND t.annex_paths = #{annexPaths}
+            </if>
+            <if test="makeStaff != null and makeStaff != ''">
+                AND t.make_staff = #{makeStaff}
+            </if>
+            <if test="flgValid != null">
+                AND t.flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND t.cp_id = #{cpId}
+            </if>
+            <if test="cusPhone != null and cusPhone != ''">
+                AND tmc.cus_phone LIKE concat('%',my_ex.likequery(#{cusPhone}),'%')
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
+            </if>
+            <if test="addressFull != null and addressFull != ''">
+                AND tmc.address_full LIKE concat('%',my_ex.likequery(#{addressFull}),'%')
+            </if>
+            <if test="orgIdList != null and orgIdList.size() > 0">
+                AND t.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="staffIdList != null and staffIdList.size() > 0">
+                AND t.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="receiptTypeList != null and receiptTypeList.size() > 0">
+                AND t.receipt_type  =any(#{receiptTypeList, typeHandler=StringListTypeHandler})
+            </if>
+            <if test="receiptMacList != null and receiptMacList.size() > 0">
+                AND t.receipt_mac  =any(#{receiptMacList, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键receiptId批量操作 -->
+        WHERE receipt_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mac_receipt,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMapResponse">
+        SELECT t.receipt_id,
+               t.receipt_no,
+               t.receipt_date,
+               t.receipt_type,
+               sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "receiptTypeName",
+               t.order_id,
+               tpo.order_no                                      as "orderNo",
+               t.cus_id,
+               tmc.cus_code                                      as "cusCode",
+               tmc.cus_name                                      as "cusName",
+               tmc.cus_phone                                     as "cusPhone",
+               tmc.address_full                                  as "addressFull",
+               t.org_id,
+               tmo.org_name                                      as "orgName",
+               t.staff_id,
+               tms.staff_name                                    as "staffName",
+               t.receipt_mac,
+               t.receipt_amt,
+               t.receivable_id,
+               t.waive_amt,
+               t.handle_amt,
+               t.residue_amt,
+               t.remarks,
+               t.annex_paths,
+               t.make_staff,
+               makestaff.staff_name                              as "makeStaffName",
+               t.make_time,
+               t.flg_valid,
+               t.cp_id
+        FROM dkic_b.t_mac_receipt as t
+                 left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.receipt_type
+                 left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+                 left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
+                 left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.cus_id
+                 left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
+                 left join dkic_b.t_psi_order as tpo on tpo.order_id = t.order_id
+                <include refid="Condition"/>
+        order by t.op_create_time desc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mac_receipt,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_mac_receipt as t
+                left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.cus_id
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mac_receipt的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        WHERE receipt_id = #{receiptId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mac_receipt的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        WHERE receipt_id = #{receiptId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mac_receipt的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mac_receipt
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_mac_receipt
+        (
+        <trim suffixOverrides=",">
+            receipt_no,
+            receipt_date,
+            receipt_type,
+            order_id,
+            cus_id,
+            org_id,
+            staff_id,
+            receipt_mac,
+            receipt_amt,
+            receivable_id,
+            waive_amt,
+            handle_amt,
+            residue_amt,
+            remarks,
+            annex_paths,
+            make_staff,
+            make_time,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.receiptNo},
+                #{item.receiptDate},
+                #{item.receiptType},
+                #{item.orderId}::uuid,
+                #{item.cusId}::uuid,
+                #{item.orgId}::uuid,
+                #{item.staffId}::uuid,
+                #{item.receiptMac}::uuid,
+                #{item.receiptAmt},
+                #{item.receivableId}::uuid,
+                #{item.waiveAmt},
+                #{item.handleAmt},
+                #{item.residueAmt},
+                #{item.remarks},
+                #{item.annexPaths},
+                #{item.makeStaff}::uuid,
+                #{item.makeTime},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

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

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

+ 10 - 9
src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.java

@@ -11,35 +11,36 @@ import org.springframework.stereotype.Repository;
 import java.util.List;
 
 /**
-*  客户跟进 Mapper
-*/
+ * 客户跟进 Mapper
+ */
 @Repository
-public interface CusFollowMapper extends BaseMapper<CusFollow>{
+public interface CusFollowMapper extends BaseMapper<CusFollow> {
 
 
     /**
-     * @desc   : 根据条件进行查询
+     * @desc : 根据条件进行查询
      * @author : 于继渤
      * @date : 2024/2/26 10:36
      */
     List<CusFollowResponse> selectByCond(CusFollowQuery cusFollowQuery);
 
 
-
-
     /**
-     * @desc   : 根据条件进行查询(数量)
+     * @desc : 根据条件进行查询(数量)
      * @author : 于继渤
      * @date : 2024/2/26 10:36
      */
     Long countByCond(CusFollowQuery cusFollowQuery);
 
     /**
-     * @desc   : 查询跟进记录
+     * @desc : 查询跟进记录
      * @author : 于继渤
      * @date : 2024/2/26 10:36
      */
     List<CusFollowResponse> selectByList(CusFollowQuery cusFollowQuery);
-	
+
+
+    int updateMeasure(CusFollow cusFollow);
+
 }
 

+ 36 - 9
src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.xml

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

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

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

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

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

+ 1 - 0
src/main/java/com/dk/mdm/mapper/mst/GoodsSkuMapper.xml

@@ -147,6 +147,7 @@
     <select id="selectByCond" resultMap="BaseResultMapResponse">
         SELECT
         <include refid="Base_Column_List_JOIN"/>
+        ,tmgb.short_name AS "shorName"
         ,tmgb.brand_name AS "brandName",tmgsr.series_name AS "seriesName",tpi.usable_qty AS "usableQty"
         FROM dkic_b.t_mst_goods_sku  tmgs
         LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id

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

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.MeasureReceipt;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  量尺回执 Mapper
+*/
+@Repository
+public interface MeasureReceiptMapper extends BaseMapper<MeasureReceipt>{
+	
+}
+

+ 171 - 0
src/main/java/com/dk/mdm/mapper/mst/MeasureReceiptMapper.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.MeasureReceiptMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        receipt_id, follow_id, cus_id, measure_status, flg_again_measure, measure_remarks, measure_time, 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.MeasureReceipt">
+        <id column="receipt_id" property="receiptId"/>
+                <result column="follow_id" property="followId" typeHandler="UuidTypeHandler"/>
+                <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
+                <result column="measure_status" property="measureStatus"/>
+                <result column="flg_again_measure" property="flgAgainMeasure"/>
+                <result column="measure_remarks" property="measureRemarks"/>
+            <result column="measure_time" property="measureTime" typeHandler="TimestampTypeHandler"/>
+                <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="followId != null and followId != ''">
+                AND follow_id = #{followId}
+            </if>
+            <if test="cusId != null and cusId != ''">
+                AND cus_id = #{cusId}
+            </if>
+            <if test="measureStatus != null and measureStatus != ''">
+                AND measure_status = #{measureStatus}
+            </if>
+            <if test="flgAgainMeasure != null">
+                AND flg_again_measure = #{flgAgainMeasure}
+            </if>
+            <if test="measureRemarks != null and measureRemarks != ''">
+                AND measure_remarks = #{measureRemarks}
+            </if>
+            <if test="measureTime != null">
+                AND measure_time = #{measureTime}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </if>
+            <if test="opCreateTime != null">
+                AND op_create_time = #{opCreateTime}
+            </if>
+            <if test="opCreateUserId != null and opCreateUserId != ''">
+                AND op_create_user_id = #{opCreateUserId}
+            </if>
+            <if test="opUpdateTime != null">
+                AND op_update_time = #{opUpdateTime}
+            </if>
+            <if test="opUpdateUserId != null and opUpdateUserId != ''">
+                AND op_update_user_id = #{opUpdateUserId}
+            </if>
+            <if test="opAppCode != null and opAppCode != ''">
+                AND op_app_code = #{opAppCode}
+            </if>
+            <if test="opTimestamp != null">
+                AND op_timestamp = #{opTimestamp}
+            </if>
+            <if test="opDbUser != null and opDbUser != ''">
+                AND op_db_user = #{opDbUser}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键receiptId批量操作 -->
+        WHERE receipt_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_crm_measure_receipt,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_receipt
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_crm_measure_receipt,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_crm_measure_receipt
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_crm_measure_receipt的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_receipt
+        WHERE receipt_id = #{receiptId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_crm_measure_receipt的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_receipt
+        WHERE receipt_id = #{receiptId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_crm_measure_receipt的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_receipt
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_crm_measure_receipt
+        (
+        <trim suffixOverrides=",">
+            follow_id,
+            cus_id,
+            measure_status,
+            flg_again_measure,
+            measure_remarks,
+            measure_time,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.followId}::uuid,
+                #{item.cusId}::uuid,
+                #{item.measureStatus},
+                #{item.flgAgainMeasure},
+                #{item.measureRemarks},
+                #{item.measureTime},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

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

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.MeasureRoom;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  量尺空间 Mapper
+*/
+@Repository
+public interface MeasureRoomMapper extends BaseMapper<MeasureRoom>{
+	
+}
+

+ 171 - 0
src/main/java/com/dk/mdm/mapper/mst/MeasureRoomMapper.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.MeasureRoomMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        room_id, receipt_id, follow_id, cus_id, room_name, display_no, measure_annex, 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.MeasureRoom">
+        <id column="room_id" property="roomId"/>
+                <result column="receipt_id" property="receiptId" typeHandler="UuidTypeHandler"/>
+                <result column="follow_id" property="followId" typeHandler="UuidTypeHandler"/>
+                <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
+                <result column="room_name" property="roomName"/>
+                <result column="display_no" property="displayNo"/>
+                <result column="measure_annex" property="measureAnnex" typeHandler="JsonTypeHandler"/>
+                <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="receiptId != null and receiptId != ''">
+                AND receipt_id = #{receiptId}
+            </if>
+            <if test="followId != null and followId != ''">
+                AND follow_id = #{followId}
+            </if>
+            <if test="cusId != null and cusId != ''">
+                AND cus_id = #{cusId}
+            </if>
+            <if test="roomName != null and roomName != ''">
+                AND room_name = #{roomName}
+            </if>
+            <if test="displayNo != null">
+                AND display_no = #{displayNo}
+            </if>
+            <if test="measureAnnex != null and measureAnnex != ''">
+                AND measure_annex = #{measureAnnex}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </if>
+            <if test="opCreateTime != null">
+                AND op_create_time = #{opCreateTime}
+            </if>
+            <if test="opCreateUserId != null and opCreateUserId != ''">
+                AND op_create_user_id = #{opCreateUserId}
+            </if>
+            <if test="opUpdateTime != null">
+                AND op_update_time = #{opUpdateTime}
+            </if>
+            <if test="opUpdateUserId != null and opUpdateUserId != ''">
+                AND op_update_user_id = #{opUpdateUserId}
+            </if>
+            <if test="opAppCode != null and opAppCode != ''">
+                AND op_app_code = #{opAppCode}
+            </if>
+            <if test="opTimestamp != null">
+                AND op_timestamp = #{opTimestamp}
+            </if>
+            <if test="opDbUser != null and opDbUser != ''">
+                AND op_db_user = #{opDbUser}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键roomId批量操作 -->
+        WHERE room_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_crm_measure_room,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_room
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_crm_measure_room,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_crm_measure_room
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_crm_measure_room的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_room
+        WHERE room_id = #{roomId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_crm_measure_room的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_room
+        WHERE room_id = #{roomId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_crm_measure_room的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_crm_measure_room
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_crm_measure_room
+        (
+        <trim suffixOverrides=",">
+            receipt_id,
+            follow_id,
+            cus_id,
+            room_name,
+            display_no,
+            measure_annex,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.receiptId}::uuid,
+                #{item.followId}::uuid,
+                #{item.cusId}::uuid,
+                #{item.roomName},
+                #{item.displayNo},
+                #{item.measureAnnex},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 0 - 7
src/main/java/com/dk/mdm/mapper/pur/PurchaseItemMapper.java

@@ -49,12 +49,5 @@ public interface PurchaseItemMapper extends BaseMapper<PurchaseItem>{
     int  updateAmount(PurchaseItem purchaseItem);
 
 
-    /**
-     * @desc   : 根据Id修改
-     * @date   : 2024/3/12 9:32
-     * @author : 寇珊珊
-     */
-    int updateById(PurchaseItem purchaseItem);
-
 }
 

+ 0 - 6
src/main/java/com/dk/mdm/mapper/pur/PurchaseMapper.java

@@ -68,11 +68,5 @@ public interface PurchaseMapper extends BaseMapper<Purchase>{
 
     Purchase selectPurchaseByRighting(PurchaseQuery purchaseQuery);
 
-    /**
-     * @desc   : 根据Id修改
-     * @date   : 2024/3/12 9:32
-     * @author : 寇珊珊
-     */
-    int updateById(Purchase purchase);
 }
 

+ 2 - 0
src/main/java/com/dk/mdm/mapper/pur/PurchaseMapper.xml

@@ -142,6 +142,7 @@
     <resultMap id="purchaseItemListMap" type="java.util.Map">
         <id column="item_id" property="itemId"/>
         <result column="pur_id" property="purId" typeHandler="UuidTypeHandler"/>
+        <result column="pur_no" property="purNo"/>
         <result column="item_index" property="itemIndex"/>
         <result column="sku_id" property="skuId" typeHandler="UuidTypeHandler"/>
         <result column="item_qty" property="itemQty"/>
@@ -456,6 +457,7 @@
     <sql id="Base_Column_List_Item_Response_Join">
         ,tppi.item_id  as "List_item_id",
         tppi.pur_id  as "List_pur_id",
+        tpp.pur_no as "List_pur_no",
         tppi.item_index as "List_item_index",
         tppi.sku_id as "List_sku_id",
         tppi.item_qty as "List_item_qty",

+ 9 - 3
src/main/java/com/dk/mdm/model/pojo/ivt/Inbound.java

@@ -7,6 +7,7 @@ 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.dk.common.model.vo.AnnexVO;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.AllArgsConstructor;
@@ -193,10 +194,9 @@ public class Inbound extends PageInfo<Inbound> implements Serializable {
     /**
      * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
      */
-    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
-    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件")
     @TableField(typeHandler = JsonTypeHandler.class)
-    private JSONObject annexPaths;
+    private List<AnnexVO> annexPaths;
 
 
     /**
@@ -324,6 +324,12 @@ public class Inbound extends PageInfo<Inbound> implements Serializable {
     private String whId;
 
 
+    @Excel(name = "入库原因")
+    @ApiModelProperty(value = "入库原因")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String entryReason;
+
+
 
     /*
      * 相关属性

+ 6 - 0
src/main/java/com/dk/mdm/model/pojo/ivt/InboundItem.java

@@ -300,6 +300,12 @@ public class InboundItem extends PageInfo<InboundItem> implements Serializable {
     private String opDbUser;
 
 
+    @Excel(name = "入库仓库")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    @ApiModelProperty(value = "入库仓库")
+    private String whId;
+
+
     /*
      * 相关属性
      * @TableField(exist = false)

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

@@ -0,0 +1,292 @@
+package com.dk.mdm.model.pojo.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class Receipt extends PageInfo<Receipt> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 收款账户
+     */
+    @Excel(name = "收款账户")
+    @ApiModelProperty(value = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 9
src/main/java/com/dk/mdm/model/pojo/mac/Transfer.java

@@ -41,7 +41,7 @@ public class Transfer extends PageInfo<Transfer> implements Serializable {
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;
@@ -66,14 +66,6 @@ public class Transfer extends PageInfo<Transfer> implements Serializable {
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 202 - 0
src/main/java/com/dk/mdm/model/pojo/mst/MeasureReceipt.java

@@ -0,0 +1,202 @@
+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_crm_measure_receipt", autoResultMap = true)
+@ApiModel(value="实体类:量尺回执", description="表名:t_crm_measure_receipt")
+public class MeasureReceipt extends PageInfo<MeasureReceipt> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 回执ID
+     */
+    @ApiModelProperty(value = "回执ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 跟进ID
+     */
+    @Excel(name = "跟进ID")
+    @ApiModelProperty(value = "跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String followId;
+
+
+    /**
+     * 客户ID
+     */
+    @Excel(name = "客户ID")
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 量尺状态 (【系统字典】)
+     */
+    @Excel(name = "量尺状态 (【系统字典】)")
+    @ApiModelProperty(value = "量尺状态 (【系统字典】)")
+    private String measureStatus;
+
+
+    /**
+     * 复尺标识
+     */
+    @Excel(name = "复尺标识")
+    @ApiModelProperty(value = "复尺标识")
+    private Boolean flgAgainMeasure;
+
+
+    /**
+     * 量尺备注
+     */
+    @Excel(name = "量尺备注")
+    @ApiModelProperty(value = "量尺备注")
+    private String measureRemarks;
+
+
+    /**
+     * 量尺时间
+     */
+    @Excel(name = "量尺时间")
+    @ApiModelProperty(value = "量尺时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime measureTime;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @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;
+
+}

+ 203 - 0
src/main/java/com/dk/mdm/model/pojo/mst/MeasureRoom.java

@@ -0,0 +1,203 @@
+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_crm_measure_room", autoResultMap = true)
+@ApiModel(value="实体类:量尺空间", description="表名:t_crm_measure_room")
+public class MeasureRoom extends PageInfo<MeasureRoom> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 空间ID
+     */
+
+    @ApiModelProperty(value = "空间ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String roomId;
+
+
+    /**
+     * 回执ID
+     */
+    @Excel(name = "回执ID")
+    @ApiModelProperty(value = "回执ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 跟进ID
+     */
+    @Excel(name = "跟进ID")
+    @ApiModelProperty(value = "跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String followId;
+
+
+    /**
+     * 客户ID
+     */
+    @Excel(name = "客户ID")
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 空间名称
+     */
+    @Excel(name = "空间名称")
+    @ApiModelProperty(value = "空间名称")
+    private String roomName;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 量尺附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "量尺附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "量尺附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject measureAnnex;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 1
src/main/java/com/dk/mdm/model/pojo/pur/Purchase.java

@@ -32,7 +32,7 @@ import java.time.LocalDateTime;
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 @ExportTitle("采购订单")
-@TableName(value = "t_psi_purchase", autoResultMap = true)
+@TableName(value = "t_psi_purchase", autoResultMap = true, schema = "dkic_b")
 @ApiModel(value="实体类:采购订单", description="表名:t_psi_purchase")
 public class Purchase extends PageInfo<Purchase> implements Serializable {
 

+ 13 - 0
src/main/java/com/dk/mdm/model/query/ivt/InboundQuery.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.dk.common.infrastructure.annotaiton.ExportTitle;
 import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.StringListTypeHandler;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
@@ -67,6 +68,18 @@ public class InboundQuery extends PageInfo<InboundQuery> implements Serializable
     @ApiModelProperty(value = "入库类型 (【系统字典】采购入库、销退入库、其他入库)")
     private String intoType;
 
+    /**
+     * 小程序的查询条件
+     */
+    @ApiModelProperty(value = "小程序的查询条件")
+    private String searchText;
+
+    /**
+     * 入库类型-传入多个
+     */
+    @ApiModelProperty(value = "入库类型")
+    @TableField(typeHandler = StringListTypeHandler.class)
+    private List<String> intoTypes;
 
     /**
      * 来源单ID (采购订单、出库退货)

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

@@ -0,0 +1,322 @@
+package com.dk.mdm.model.query.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.*;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class ReceiptQuery extends PageInfo<ReceiptQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 收款账户
+     */
+    @Excel(name = "收款账户")
+    @ApiModelProperty(value = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+    @ApiModelProperty(value = "部门List")
+    private List<String> orgIdList;
+
+    @ApiModelProperty(value = "业务员List")
+    private List<String> staffIdList;
+
+    @ApiModelProperty(value = "收款类型List")
+    private List<String> receiptTypeList;
+
+    @ApiModelProperty(value = "资金账户List")
+    private List<String> receiptMacList;
+
+    @ApiModelProperty(value = "制单时间开始")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate makeTimeStart;
+
+    @ApiModelProperty(value = "制单时间结束")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate makeTimeEnd;
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 9
src/main/java/com/dk/mdm/model/query/mac/TransferQuery.java

@@ -44,7 +44,7 @@ public class TransferQuery extends PageInfo<TransferQuery> implements Serializab
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;
@@ -69,14 +69,6 @@ public class TransferQuery extends PageInfo<TransferQuery> implements Serializab
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 4 - 0
src/main/java/com/dk/mdm/model/query/mst/StaffQuery.java

@@ -221,6 +221,10 @@ public class StaffQuery extends PageInfo<StaffQuery> implements Serializable {
     @ApiModelProperty(value = "登录标识")
     private Integer hrStatus;
 
+    /**
+     * 小程序的查询条件
+     */
+    @ApiModelProperty(value = "小程序的查询条件")
     private String searchText;
 
     private static final long serialVersionUID = 1L;

+ 30 - 0
src/main/java/com/dk/mdm/model/response/ivt/InboundItemResponse.java

@@ -1,7 +1,9 @@
 package com.dk.mdm.model.response.ivt;
 
 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;
@@ -52,6 +54,12 @@ public class InboundItemResponse extends PageInfo<InboundItemResponse> implement
     @ApiModelProperty(value = "入库ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String intoId;
+    /**
+     * 商品规格
+     */
+    @Excel(name = "商品规格")
+    @ApiModelProperty(value = "商品规格")
+    private String skuSpec;
 
 
     /**
@@ -341,8 +349,30 @@ public class InboundItemResponse extends PageInfo<InboundItemResponse> implement
      * 关联属性 + 查询条件
      * @TableField(exist = false)
      */
+    /**
+     * 仓库ID
+     */
+    @TableId(value = "wh_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whId;
+
+
+    /**
+     * 仓库编号
+     */
+    @Excel(name = "仓库编号")
+    @ApiModelProperty(value = "仓库编号")
+    private String whCode;
 
 
+    /**
+     * 仓库名称
+     */
+    @Excel(name = "仓库名称")
+    @ApiModelProperty(value = "仓库名称")
+    private String whName;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 14 - 66
src/main/java/com/dk/mdm/model/response/ivt/InboundResponse.java

@@ -11,6 +11,7 @@ import com.dk.common.infrastructure.handler.JsonTypeHandler;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
+import com.dk.common.model.vo.AnnexVO;
 import com.dk.mdm.model.response.pur.PurchaseItemResponse;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -226,10 +227,10 @@ public class InboundResponse extends PageInfo<InboundResponse> implements Serial
     /**
      * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
      */
-    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
-    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @Excel(name = "附件信息")
+    @ApiModelProperty(value = "附件信息")
     @TableField(typeHandler = JsonTypeHandler.class)
-    private JSONObject annexPaths;
+    private List<AnnexVO> AnnexPaths;
 
 
     /**
@@ -284,70 +285,10 @@ public class InboundResponse extends PageInfo<InboundResponse> implements Serial
     @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 = "修改用户 (触发器自动处理)")
+    @Excel(name = "企业ID")
+    @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;
-
+    private String entryReason;
 
 
     /**
@@ -386,6 +327,13 @@ public class InboundResponse extends PageInfo<InboundResponse> implements Serial
     @ApiModelProperty(value = "入库状态名称")
     private String intoStatusName;
 
+    /**
+     * 入库类型名称
+     */
+    @Excel(name = "入库类型名称")
+    @ApiModelProperty(value = "入库类型名称")
+    private String intoTypeName;
+
 
     @ApiModelProperty(value = "入库单明细")
     private List<InboundItemResponse> goodsList;

+ 5 - 63
src/main/java/com/dk/mdm/model/response/ivt/IntoReturnItemResponse.java

@@ -225,69 +225,6 @@ public class IntoReturnItemResponse  implements Serializable {
     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 = "商品编码")
@@ -307,6 +244,11 @@ public class IntoReturnItemResponse  implements Serializable {
     @TableField(typeHandler = JsonTypeHandler.class)
     private String skuImages;
 
+    @Excel(name = "入库仓库")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    @ApiModelProperty(value = "入库仓库")
+    private String whId;
+
 
     private static final long serialVersionUID = 1L;
 

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

@@ -0,0 +1,318 @@
+package com.dk.mdm.model.response.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.*;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class ReceiptResponse extends PageInfo<ReceiptResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 收款账户
+     */
+    @Excel(name = "收款账户")
+    @ApiModelProperty(value = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+    @ApiModelProperty(value = "收款类型")
+    private String receiptTypeName;
+
+    @ApiModelProperty(value = "订单单号")
+    private String orderNo;
+
+    @ApiModelProperty(value = "客户编码")
+    private String cusCode;
+
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+    @ApiModelProperty(value = "组织名称")
+    private String orgName;
+
+    @ApiModelProperty(value = "员工姓名")
+    private String staffName;
+
+    @ApiModelProperty(value = "制单员")
+    private String makeStaffName;
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 9
src/main/java/com/dk/mdm/model/response/mac/TransferResponse.java

@@ -44,7 +44,7 @@ public class TransferResponse extends PageInfo<TransferResponse> implements Seri
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;
@@ -69,14 +69,6 @@ public class TransferResponse extends PageInfo<TransferResponse> implements Seri
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

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

@@ -239,9 +239,52 @@ public class CusFollowResponse implements Serializable {
 
     @ApiModelProperty(value = "跟进状态 (【系统字典】陌生接待、留资接待(报备)、跟进、邀约、约尺)")
     private String followStatusName;
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+
+    @ApiModelProperty(value = "客户意向")
+    private String intentionName;
+
+    @ApiModelProperty(value = "留店时长")
+    private String stayTimeLenName;
 
+    private String saleStatus;
 
 
+    @ApiModelProperty(value = "销售渠道")
+    private String channelId;
 
     private static final long serialVersionUID = 1L;
 

+ 6 - 1
src/main/java/com/dk/mdm/model/response/mst/GoodsSkuResponse.java

@@ -62,7 +62,12 @@ public class GoodsSkuResponse implements Serializable {
     @ApiModelProperty(value = "商品名称")
     private String skuName;
 
-
+    /**
+     * 品牌简称
+     */
+    @Excel(name = "品牌简称")
+    @ApiModelProperty(value = "品牌简称")
+    private String shortName;
     /**
      * 商品型号
      */

+ 3 - 61
src/main/java/com/dk/mdm/model/vo/ivt/InboundItemVO.java

@@ -234,68 +234,10 @@ public class InboundItemVO extends PageInfo<InboundItemVO> implements Serializab
     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 = "创建用户 (触发器自动处理)")
+    @Excel(name = "入库仓库")
     @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 whId;
 
 
     /*

+ 10 - 2
src/main/java/com/dk/mdm/model/vo/ivt/InboundVO.java

@@ -11,6 +11,7 @@ import com.dk.common.infrastructure.handler.JsonTypeHandler;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.dk.common.model.pojo.PageInfo;
+import com.dk.common.model.vo.AnnexVO;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -202,8 +203,8 @@ public class InboundVO extends PageInfo<InboundVO> implements Serializable {
      */
     @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
     @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
-    @TableField(typeHandler = JsonTypeHandler.class)
-    private JSONObject annexPaths;
+    private List<AnnexVO> annexPaths;
+
 
 
     /**
@@ -331,6 +332,13 @@ public class InboundVO extends PageInfo<InboundVO> implements Serializable {
     private String whId;
 
 
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "入库原因")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String entryReason;
+
+
+
     /*
      * 相关属性
      * @TableField(exist = false)

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

@@ -0,0 +1,293 @@
+package com.dk.mdm.model.vo.mac;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.*;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ *  收【退】款单
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("收【退】款单")
+@TableName(value = "t_mac_receipt", autoResultMap = true)
+@ApiModel(value="实体类:收【退】款单", description="表名:t_mac_receipt")
+public class ReceiptVO extends PageInfo<ReceiptVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 收款单ID
+     */
+//    @TableId(value = "receipt_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "收款单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptId;
+
+
+    /**
+     * 收款单号
+     */
+    @Excel(name = "收款单号")
+    @ApiModelProperty(value = "收款单号")
+    private String receiptNo;
+
+
+    /**
+     * 收款日期 (账务日期)
+     */
+    @Excel(name = "收款日期 (账务日期)")
+    @ApiModelProperty(value = "收款日期 (账务日期)")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate receiptDate;
+
+
+    /**
+     * 收款类型 (【系统字典】收款、退款)
+     */
+    @Excel(name = "收款类型 (【系统字典】收款、退款)")
+    @ApiModelProperty(value = "收款类型 (【系统字典】收款、退款)")
+    private String receiptType;
+
+
+    /**
+     * 销售订单ID (订单开单时收的款,记录此id)
+     */
+    @Excel(name = "销售订单ID (订单开单时收的款,记录此id)")
+    @ApiModelProperty(value = "销售订单ID (订单开单时收的款,记录此id)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 客户ID (账务对象)
+     */
+    @Excel(name = "客户ID (账务对象)")
+    @ApiModelProperty(value = "客户ID (账务对象)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 员工
+     */
+    @Excel(name = "员工")
+    @ApiModelProperty(value = "员工")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 收款账户
+     */
+    @Excel(name = "收款账户")
+    @ApiModelProperty(value = "收款账户")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receiptMac;
+
+
+    /**
+     * 收款金额
+     */
+    @Excel(name = "收款金额")
+    @ApiModelProperty(value = "收款金额")
+    private BigDecimal receiptAmt;
+
+
+    /**
+     * 应收款单
+     */
+    @Excel(name = "应收款单")
+    @ApiModelProperty(value = "应收款单")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String receivableId;
+
+
+    /**
+     * 优惠金额
+     */
+    @Excel(name = "优惠金额")
+    @ApiModelProperty(value = "优惠金额")
+    private BigDecimal waiveAmt;
+
+
+    /**
+     * 还款金额
+     */
+    @Excel(name = "还款金额")
+    @ApiModelProperty(value = "还款金额")
+    private BigDecimal handleAmt;
+
+
+    /**
+     * 剩余金额 (应收金额-优惠金额-还款金额)
+     */
+    @Excel(name = "剩余金额 (应收金额-优惠金额-还款金额)")
+    @ApiModelProperty(value = "剩余金额 (应收金额-优惠金额-还款金额)")
+    private BigDecimal residueAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)
+     */
+    @Excel(name = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @ApiModelProperty(value = "附件 (index(显示顺序)、name(文件名)、path(路径)、type(类型)、time(上传时间)...)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject annexPaths;
+
+
+    /**
+     * 制单员
+     */
+    @Excel(name = "制单员")
+    @ApiModelProperty(value = "制单员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String makeStaff;
+
+
+    /**
+     * 制单时间
+     */
+    @Excel(name = "制单时间")
+    @ApiModelProperty(value = "制单时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime makeTime;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 9
src/main/java/com/dk/mdm/model/vo/mac/TransferVO.java

@@ -44,7 +44,7 @@ public class TransferVO extends PageInfo<TransferVO> implements Serializable {
     /**
      * 转账单ID
      */
-    @TableId(value = "trf_id", type = IdType.AUTO)
+//    @TableId(value = "trf_id", type = IdType.AUTO)
     @ApiModelProperty(value = "转账单ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String trfId;
@@ -69,14 +69,6 @@ public class TransferVO extends PageInfo<TransferVO> implements Serializable {
 
 
     /**
-     * 转账类型 (0:期初 1:业务)
-     */
-    @Excel(name = "转账类型 (0:期初 1:业务)")
-    @ApiModelProperty(value = "转账类型 (0:期初 1:业务)")
-    private Integer trfType;
-
-
-    /**
      * 部门
      */
     @Excel(name = "部门")

+ 14 - 0
src/main/java/com/dk/mdm/model/vo/mst/CusFollowVO.java

@@ -9,6 +9,8 @@ import com.dk.common.infrastructure.annotaiton.ExportTitle;
 import com.dk.common.infrastructure.handler.JsonTypeHandler;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.mdm.model.pojo.mst.MeasureReceipt;
+import com.dk.mdm.model.pojo.mst.MeasureRoom;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -19,6 +21,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  *  客户跟进
@@ -330,6 +333,17 @@ public class CusFollowVO implements Serializable {
     @ApiModelProperty(value = "详细地址")
     private String addressFull;
 
+    private Boolean flgAgainMeasure;
+
+
+    private String saleStatus;
+
+    private List<MeasureRoom> measureRoomList;
+
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    private String channelId;
+
     private static final long serialVersionUID = 1L;
 
 }

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

@@ -67,6 +67,53 @@ public class CommonService extends BaseService<Map<String, Object>> {
     }
 
     /**
+     * @desc : 获取编码/单号
+     * @author : 周兴
+     * @date : 2024/3/1 11:41
+     */
+    public Map<String, Object> getUniqueNoteCode(String docName, Integer cpId, Boolean codeFlag) {
+        Map<String, Object> param = new HashMap<>();
+        param.put("docName", docName);
+        // 公司Id
+//        StaffEntity staff = authUtils.getStaff();
+        param.put("cpId", cpId);
+        Map<String, Object> map = null;
+        // 获取系统基础数据
+        if (codeFlag) {
+            map = commonMapper.getUniqueCode(param);
+        } else {
+            map = commonMapper.getUniqueNote(param);
+        }
+        return map;
+    }
+
+    /**
+     * @desc : 登录后获取信息
+     * @author : 周兴
+     * @date : 2024/3/4 11:41
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<Map<String, List<Map<String, Object>>>> getInfoAfterLogin(Map<String, Object> param) {
+        // 先根据userId查询当前企业的员工信息
+        StaffResponse staff = staffMapper.selectByUserId(param.get("userId").toString());
+        if (staff != null) {
+            // 存Redis
+            authUtils.saveStaff(new StaffEntity().setStaffId(staff.getStaffId())
+                    .setStaffCode(staff.getStaffCode())
+                    .setStaffName(staff.getStaffName())
+                    .setCpId(Integer.parseInt(param.get("cpId").toString()))
+                    .setAppCode(param.get("appCode").toString()));
+        }
+        // 获取菜单
+        List<Map<String, Object>> menuList = commonMapper.getMenuByUser(param);
+        Map<String, List<Map<String, Object>>> map = new HashMap<>();
+        map.put("menuList", menuList);
+        return ResponseResultUtil.success(map);
+    }
+
+    /**
      * @desc : 获取数据字典项目
      * @author : 王英杰
      * @date : 2023/1/6 11:41
@@ -697,4 +744,118 @@ public class CommonService extends BaseService<Map<String, Object>> {
         }
         return ResponseResultUtil.success(list);
     }
+
+
+
+
+    /**
+     * @desc   : 获取供应商和客户数据
+     * @date   : 2024/3/13 15:09
+     * @author : 寇珊珊
+     */
+    public ResponseResultVO<List<Map<String, Object>>> getSupplierAndCustomer(Map<String, Object> param) {
+        // 获取供应商和客户
+        List<Map<String, Object>> list = commonMapper.getSupplierAndCustomer(param);
+        return ResponseResultUtil.success(list);
+
+    }
+    
+    
+    /**
+     * @desc   : 获取供应商和客户数据(分页)
+     * @date   : 2024/3/13 14:02
+     * @author : 寇珊珊
+     */
+    public ResponseResultVO<PageList<Map<String, Object>>> getSupplierAndCustomerByPage(Map<String, Object> param) {
+        // 校验分页参数
+        if (param.get("pageSize") == null || param.get("currentPage") == null) {
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
+        }
+        // 定义返回值
+        PageList<Map<String, Object>> data = new PageList<>();
+        // 分页参数赋值
+        param = this.getLimit(param);
+
+        // 获取客户
+        List<Map<String, Object>> list = commonMapper.getSupplierAndCustomerByPage(param);
+        // 获取总数量
+        Long total = commonMapper.getSupplierAndCustomerByPageCount(param);
+        // 组装返回值
+        data.setPageSize((int) param.get("pageSize")).setCurrentPage((int) param.get("currentPage")).setList(list).setTotal(total);
+        return ResponseResultUtil.success(data);
+    }
+
+
+    /**
+     * @desc   : 获取组织机构
+     * @date   : 2024/3/13 17:01
+     * @author : 寇珊珊
+     */
+    public ResponseResultVO<List<Map<String, Object>>> getOrganization(Map<String, Object> param) {
+        // 获取组织机构
+        List<Map<String, Object>> list = commonMapper.getOrganization(param);
+        return ResponseResultUtil.success(list);
+    }
+
+
+    /**
+     * @desc   : 获取组织机构(分页)
+     * @date   : 2024/3/13 17:01
+     * @author : 寇珊珊
+     */
+    public ResponseResultVO<PageList<Map<String, Object>>> getOrganizationByPage(Map<String, Object> param) {
+        // 校验分页参数
+        if (param.get("pageSize") == null || param.get("currentPage") == null) {
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
+        }
+        // 定义返回值
+        PageList<Map<String, Object>> data = new PageList<>();
+        // 分页参数赋值
+        param = this.getLimit(param);
+        // 获取组织机构
+        List<Map<String, Object>> list = commonMapper.getOrganizationByPage(param);
+        // 获取总数量
+        Long total = commonMapper.getOrganizationCount(param);
+        // 组装返回值
+        data.setPageSize((int) param.get("pageSize")).setCurrentPage((int) param.get("currentPage")).setList(list).setTotal(total);
+        return ResponseResultUtil.success(data);
+    }
+
+    /**
+     * @desc   : 获取资金账户(下拉)
+     * @author : 付斌
+     * @date   : 2024-03-14 11:34
+     */
+    public ResponseResultVO<List<Map<String, Object>>> getMac(Map<String, Object> param) {
+        // 获取组织机构
+        List<Map<String, Object>> list = commonMapper.getMac(param);
+        return ResponseResultUtil.success(list);
+    }
+
+    /**
+     * @desc : 获取资金账户(放大镜)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    public ResponseResultVO<List<Map<String, Object>>> getMoneyAccount(Map<String, Object> param) {
+        // 获取系统基础数据
+        List<Map<String, Object>> list = commonMapper.getMoneyAccount(param);
+        return ResponseResultUtil.success(list);
+    }
+
+    /**
+     * @desc : 获取资金账户(放大镜分页)
+     * @author : 付斌
+     * @date : 2024-03-05 10:50
+     */
+    public ResponseResultVO<PageList<Map<String, Object>>> getMoneyAccountByPage(Map<String, Object> param) {
+        // 校验分页参数
+        if (param.get("pageSize") == null || param.get("currentPage") == null) {
+            return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
+        }
+        // 分页参数赋值
+        param = this.getLimit(param);
+        return super.mergeListWithCount(param, commonMapper.getMoneyAccount(param),
+                commonMapper.getMoneyAccountCountByPage(param));
+    }
 }

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

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

+ 28 - 0
src/main/java/com/dk/mdm/service/ivt/InboundOtherService.java

@@ -121,6 +121,10 @@ public class InboundOtherService extends BaseService<Inbound> {
 					.setIntoingQty(BigDecimal.ZERO)
 					.setIntoingAmt(BigDecimal.ZERO)
 			;
+		}else{
+			inboundVO.setIntoQty(BigDecimal.ZERO)
+					.setIntoAmt(BigDecimal.ZERO)
+			;
 		}
 		//实体转换
 		Inbound inbound = inboundConvert.convertToPo(inboundVO);
@@ -141,6 +145,8 @@ public class InboundOtherService extends BaseService<Inbound> {
 			inboundItemVO.setIntoId(inboundVO.getIntoId());
 			//入库类型
 			inboundItemVO.setIntoType(inboundVO.getIntoType());
+			//出库数量
+			inboundItemVO.setOutQty(BigDecimal.ZERO);
 			//入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
 			if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
 				inboundItemVO.setIntoQty(inboundItemVO.getIntoingQty())
@@ -148,6 +154,10 @@ public class InboundOtherService extends BaseService<Inbound> {
 						.setIntoingQty(BigDecimal.ZERO)
 						.setIntoingAmt(BigDecimal.ZERO)
 				;
+			}else{
+				inboundItemVO
+						.setIntoQty(BigDecimal.ZERO)
+						.setIntoAmt(BigDecimal.ZERO);
 			}
 			//成本单价
 			inboundItemVO.setCostPrice(inboundItemVO.getCostPrice());
@@ -346,5 +356,23 @@ public class InboundOtherService extends BaseService<Inbound> {
 		}
 		return intoStatus;
 	}
+
+
+	/**
+	 * @desc   : 获取单据信息(编辑用)
+	 * @date   : 2024/3/14 16:38
+	 * @author : 寇珊珊
+	 */
+	public ResponseResultVO<?> selectByUpdate(String id) {
+		Map<String, Object> dataInfo = new HashMap<>();
+		//总单
+		InboundResponse inboundResponse = inboundMapper.selectById(id);
+		dataInfo.put("data", inboundResponse);
+
+		// 明细
+		List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(id));
+		dataInfo.put("dataItem", inboundItemResponses);
+		return ResponseResultUtil.success(dataInfo);
+	}
 	
 }

+ 1 - 2
src/main/java/com/dk/mdm/service/ivt/InboundPurchaseService.java

@@ -45,7 +45,6 @@ import java.util.Map;
  * @author : 寇珊珊
  */
 @Service
-@Transactional
 public class InboundPurchaseService extends BaseService<Inbound> {
 
 	@Override
@@ -238,7 +237,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
 			}
 			for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
 				if (inboundItemVO.getIntoId() != null) {
-					InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getIntoId());
+					InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
 					//编辑明细
 					inboundItemVO
 							.setIntoQty(inboundItemResponse.getIntoQty().add(inboundItemVO.getIntoingQty()))

+ 7 - 1
src/main/java/com/dk/mdm/service/ivt/InboundService.java

@@ -18,10 +18,13 @@ import com.dk.mdm.model.query.ivt.InboundItemQuery;
 import com.dk.mdm.model.query.ivt.InboundQuery;
 import com.dk.mdm.model.query.pur.PurchaseItemQuery;
 import com.dk.mdm.model.query.pur.PurchaseQuery;
+import com.dk.mdm.model.query.sale.OrderItemQuery;
 import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.response.pur.PurchaseItemResponse;
 import com.dk.mdm.model.response.pur.PurchaseResponse;
+import com.dk.mdm.model.response.sale.OrderItemResponse;
+import com.dk.mdm.model.response.sale.OrderResponse;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import com.dk.mdm.model.vo.mst.GoodsBrandVO;
 import com.dk.mdm.service.common.CommonService;
@@ -29,6 +32,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -59,7 +63,7 @@ public class InboundService extends BaseService<Inbound> {
 	 * @date   : 2024/3/8 10:58
 	 */
 	@Pagination
-	public ResponseResultVO<PageList<PurchaseResponse>> selectByCond(InboundQuery inboundQuery) {
+	public ResponseResultVO<PageList<InboundResponse>> selectByCond(InboundQuery inboundQuery) {
 		return super.mergeListWithCount(inboundQuery, inboundMapper.selectByCond(inboundQuery), inboundMapper.countByCond(inboundQuery));
 	}
 
@@ -116,4 +120,6 @@ public class InboundService extends BaseService<Inbound> {
 	}
 
 
+
+
 }

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

@@ -0,0 +1,96 @@
+package com.dk.mdm.service.mac;
+
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.dk.common.infrastructure.annotaiton.Pagination;
+import com.dk.common.infrastructure.constant.Constant;
+import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
+import com.dk.common.response.ResponseResultVO;
+import com.dk.mdm.infrastructure.convert.mac.ReceiptConvert;
+import com.dk.mdm.model.pojo.mac.Receipt;
+import com.dk.mdm.mapper.mac.ReceiptMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.query.mac.ReceiptQuery;
+import com.dk.mdm.model.response.mac.ReceiptResponse;
+import com.dk.mdm.model.vo.mac.ReceiptVO;
+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;
+import java.util.UUID;
+
+@Service
+@Transactional
+public class ReceiptService extends BaseService<Receipt> {
+
+	@Override
+	public String getPrimaryKey() {
+		return "receipt_id";
+	}
+
+	@Override
+	public BaseMapper<Receipt> getRepository() {
+		return receiptMapper;
+	}
+
+	@Autowired
+	private ReceiptMapper receiptMapper;
+
+	@Autowired
+	private CommonService commonService;
+
+	@Autowired
+	private ReceiptConvert receiptConvert;
+	
+	/**
+	 * @desc : 条件查询
+	 * @author : 付斌
+	 * @date : 2023/1/9 10:40
+	 */
+	@Pagination
+	public ResponseResultVO<PageList<ReceiptResponse>> selectByCond(ReceiptQuery receiptQuery) {
+		return super.mergeListWithCount(receiptQuery, receiptMapper.selectByCond(receiptQuery),
+				receiptMapper.countByCond(receiptQuery));
+	}
+
+
+	/**
+	 * @desc : 新建方法
+	 * @author : 付斌
+	 * @date : 2023/1/9 10:49
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> insert(ReceiptVO receiptVO) {
+
+		// 获取单号
+		Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.CUSRECEIPT.getName(), false);
+		receiptVO.setReceiptId(codeMap.get("outId").toString()).setReceiptNo(codeMap.get("outNote").toString())
+				.setReceiptType(Constant.DocumentType.ORDER.getName());
+		// 转化实体
+		Receipt receipt = receiptConvert.convertToPo(receiptVO);
+		// Receipt总单保存
+		super.insert(receipt);
+
+		
+		return ResponseResultUtil.success();
+	}
+
+	/**
+	 * @desc : 编辑方法
+	 * @author : 付斌
+	 * @date : 2023/1/9 10:49
+	 */
+	@Transactional(
+			rollbackFor = {Exception.class}
+	)
+	public ResponseResultVO<?> update(ReceiptVO receiptVO) {
+		Receipt receipt = receiptConvert.convertToPo(receiptVO);
+		return ResponseResultUtil.success(super.update(receipt, new UpdateWrapper<Receipt>().lambda().eq(Receipt::getReceiptId,
+				UUID.fromString(receipt.getReceiptId()))));
+	}
+}

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

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

+ 155 - 11
src/main/java/com/dk/mdm/service/mst/CusFollowService.java

@@ -5,6 +5,8 @@ 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.model.vo.core.StaffEntity;
+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.CusFollowConvert;
@@ -12,12 +14,10 @@ import com.dk.mdm.infrastructure.util.AuthUtils;
 import com.dk.mdm.mapper.mst.CusFollowStaffMapper;
 import com.dk.mdm.mapper.mst.CustomerMapper;
 import com.dk.mdm.mapper.mst.StaffMapper;
-import com.dk.mdm.model.pojo.mst.CusFollow;
+import com.dk.mdm.model.pojo.mst.*;
 import com.dk.mdm.mapper.mst.CusFollowMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.pojo.mst.CusFollowStaff;
-import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.model.query.mst.CusFollowQuery;
 import com.dk.mdm.model.query.mst.CustomerQuery;
 import com.dk.mdm.model.response.mst.CusFollowResponse;
@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.*;
 
@@ -66,6 +67,12 @@ public class CusFollowService extends BaseService<CusFollow> {
     @Autowired
     private AuthUtils authUtils;
 
+    @Autowired
+    private MeasureRoomService measureRoomService;
+
+    @Autowired
+    private MeasureReceiptService measureReceiptService;
+
     /**
      * @desc : 重写主键
      * @author : 于继渤
@@ -89,7 +96,7 @@ public class CusFollowService extends BaseService<CusFollow> {
     }
 
     public ResponseResultVO<List<CusFollowResponse>> selectByList(CusFollowQuery cusFollowQuery) {
-       return ResponseResultUtil.success(cusFollowMapper.selectByList(cusFollowQuery)) ;
+        return ResponseResultUtil.success(cusFollowMapper.selectByList(cusFollowQuery));
     }
 
     /**
@@ -216,8 +223,7 @@ public class CusFollowService extends BaseService<CusFollow> {
             customer.setLastFollowId(cusFollow.getFollowId());
             customer.setLastFollowTime(cusFollow.getFollowTime());
             customer.setLastFollowStaff(cusFollow.getFollowStaff());
-
-
+            cusFollow.setCusId(customer.getCusId());
             // 同商户 电话不同
             Long count = customerMapper.countByCond(
                     new CustomerQuery().setCpId(customer.getCpId()).setCusPhone(customer.getCusPhone()).setFlgValid(true)
@@ -239,15 +245,12 @@ public class CusFollowService extends BaseService<CusFollow> {
                 customer.setSaleStatus(Constant.saleCustomerStatusConstant.SALE_STATUS_POTE.getName());
             }
 
-            customer.setFollowCount(0);
+
             //新建客户或编辑客户
             customerMapper.insert(customer);
 
-            cusFollowVO.setCusId(customer.getCusId());
-        }
-
-
 
+        }
 
 
         // 约量尺
@@ -319,4 +322,145 @@ public class CusFollowService extends BaseService<CusFollow> {
 //        );
 //    }
 
+    /**
+     * @desc : 新建量尺回执
+     * @author : 于继渤
+     * @date : 2023/1/5 9:39
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> updateMeasure(CusFollowVO cusFollowVO) {
+        CusFollow cusFollow = cusFollowConvert.convertToPo(cusFollowVO);
+        //更新总单
+        //  int update = cusFollowMapper.updateMeasure(cusFollow);
+        //更新客户信息
+        Customer customer = new Customer();
+        customer.setCusId(cusFollowVO.getCusId());
+        customer.setCusName(cusFollowVO.getCusName());
+        customer.setCusPhone(cusFollowVO.getCusPhone());
+
+        customer.setAddressName(cusFollowVO.getAddressName());
+        customer.setAddressNo(cusFollowVO.getAddressNo());
+        customer.setAddressFull(cusFollowVO.getAddressFull()); //全路径地址
+        customer.setAddressArea(cusFollowVO.getAddressArea()); //省市区
+        customer.setAddressGcj02(cusFollowVO.getAddressGcj02());//经纬度
+        customerService.updateByUuid(customer);
+
+
+        CusFollow Follow = cusFollowMapper.selectById(cusFollowVO.getFollowId());
+        if (Follow == null) {
+            return ResponseResultUtil.error(ResponseCodeEnum.SELECT_NULL);
+        } else if (Constant.BasicDataConstant.MEASURE_STATUS_1.getValue().equals(Follow.getMeasureStatus())) {
+            return ResponseResultUtil.error(ErrorCodeEnum.CUSTOMER_FOLLOW_MEASURE_STATUS_DONE.getCode(),
+                    ErrorCodeEnum.CUSTOMER_FOLLOW_MEASURE_STATUS_DONE.getMessage());
+        }
+
+        StaffEntity staff = authUtils.getStaff();
+
+        //设置id
+        Map<String, Object> uniqueNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.RECEIPT.getName(), true);
+        // 新建一条量尺记录
+        MeasureReceipt measureReceipt = new MeasureReceipt();
+        if (cusFollowVO.getFlgAgainMeasure() != null) {
+            measureReceipt.setFlgAgainMeasure(cusFollowVO.getFlgAgainMeasure());
+        } else {
+            measureReceipt.setFlgAgainMeasure(false);
+        }
+
+        measureReceipt.setReceiptId(uniqueNoteCode.get("outId").toString());
+        measureReceipt.setCusId(cusFollowVO.getCusId());
+        measureReceipt.setFollowId(cusFollowVO.getFollowId());
+        measureReceipt.setMeasureStatus(Constant.BasicDataConstant.MEASURE_STATUS_1.getValue());
+        measureReceipt.setMeasureTime(LocalDateTime.now());
+        //剩下参数有前台传
+        measureReceiptService.insert(measureReceipt);
+
+        //     新建空间
+        if (cusFollowVO.getMeasureRoomList() != null && cusFollowVO.getMeasureRoomList().size() > 0) {
+            for (MeasureRoom measureRoom : cusFollowVO.getMeasureRoomList()) {
+                //设置ID
+                Map<String, Object> uniqueNoteCode1 = commonService.getUniqueNoteCode(Constant.docNameConstant.ROOM.getName(), true);
+                measureRoom.setRoomId(uniqueNoteCode1.get("outId").toString());
+                measureRoom.setFollowId(cusFollowVO.getFollowId());
+                measureRoom.setCusId(cusFollowVO.getCusId());
+                measureRoom.setCpId(authUtils.getStaff().getCpId());
+                measureRoom.setReceiptId(measureReceipt.getReceiptId());
+                measureRoomService.insert(measureRoom);
+            }
+        }
+
+        //修改量尺状态为  已量尺
+        cusFollow.setMeasureStatus(Constant.BasicDataConstant.MEASURE_STATUS_1.getValue());
+        //修改跟进
+        super.updateByUuid(cusFollow);
+
+
+        return ResponseResultUtil.success();
+    }
+
+
+    /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2024-03-13 17:03
+     */
+    @Transactional(rollbackFor = {Exception.class})
+    public ResponseResultVO<?> update(CusFollowVO cusFollowVO) {
+        CusFollow cusFollow = cusFollowConvert.convertToPo(cusFollowVO);
+
+        //编辑时更改客户意向要把对应客户也需要更改
+        if (cusFollowVO.getSaleStatus() != null && (cusFollowVO.getSaleStatus().equals(Constant.saleCustomerStatusConstant.SALE_STATUS_INTE.getName()) || cusFollowVO.getSaleStatus().equals(Constant.saleCustomerStatusConstant.SALE_STATUS_LOST.getName()))) {
+            //公海客户清空跟进人
+            if (cusFollowVO.getSaleStatus().equals(Constant.saleCustomerStatusConstant.SALE_STATUS_INTE.getName())) {
+                customerMapper.updateFollowStaffs(new Customer().setCusId(cusFollowVO.getCusId()));
+            }
+
+
+        }
+        if (cusFollowVO.getCusId() != null) {
+            Customer customer = new Customer();
+            customer.setCusId(cusFollowVO.getCusId());
+            customer.setAddressName(cusFollowVO.getAddressName());
+            customer.setAddressNo(cusFollowVO.getAddressNo());
+            customer.setCusPhone(cusFollowVO.getCusPhone());
+            customer.setCusName(cusFollowVO.getCusName());
+            customer.setOrgId(cusFollowVO.getFollowOrg());
+            customer.setAddressFull(cusFollowVO.getAddressFull());
+            customer.setAddressArea(cusFollowVO.getAddressArea());
+            customer.setSaleStatus(cusFollowVO.getSaleStatus());
+            customer.setAddressGcj02(cusFollowVO.getAddressGcj02());
+            //更新客户信息
+            customerService.updateByUuid(customer);
+        } else {
+            StaffEntity staff = authUtils.getStaff();
+            Customer customer = new Customer();
+            customer.setCusName(cusFollowVO.getCusName());
+            customer.setCusPhone(cusFollowVO.getCusPhone());
+            customer.setAddressName(cusFollowVO.getAddressName());
+            customer.setAddressNo(cusFollowVO.getAddressNo());
+            customer.setOrgId(cusFollowVO.getFollowOrg());
+            customer.setAddressFull(cusFollowVO.getAddressFull());
+            customer.setAddressArea(cusFollowVO.getAddressArea());
+            customer.setSaleStatus(cusFollowVO.getSaleStatus());
+            customer.setAddressGcj02(cusFollowVO.getAddressGcj02());
+            customer.setReportStaff(cusFollowVO.getFollowStaff());
+            customer.setReportTime(LocalDateTime.now());
+            customer.setCpId(staff.getCpId());
+            List<String> list = new ArrayList<>();
+            list.add(staff.getStaffId());
+            customer.setFollowStaffs(list);
+            customer.setSaleStatus("客成状态-潜客");
+            customer.setChannelId(cusFollowVO.getChannelId());
+            Map<String, Object> customerNoteCode = commonService.getUniqueNoteCode(Constant.docNameConstant.CUSTOMER.getName(), true);
+            customer.setCusId(customerNoteCode.get("outId").toString());
+            //新建客户
+            customerMapper.insert(customer);
+            cusFollow.setCusId(customer.getCusId());
+        }
+        //更新总单
+        super.updateByUuid(cusFollow);
+        return ResponseResultUtil.success();
+
+    }
 }

+ 27 - 0
src/main/java/com/dk/mdm/service/mst/MeasureReceiptService.java

@@ -0,0 +1,27 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.mdm.model.pojo.mst.MeasureReceipt;
+import com.dk.mdm.mapper.mst.MeasureReceiptMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class MeasureReceiptService extends BaseService<MeasureReceipt> {
+
+	@Override
+	public BaseMapper<MeasureReceipt> getRepository() {
+		return measureReceiptMapper;
+	}
+
+	@Autowired
+	private MeasureReceiptMapper measureReceiptMapper;
+
+	@Override
+	public String getPrimaryKey() {
+		return "receipt_id";
+	}
+}

+ 28 - 0
src/main/java/com/dk/mdm/service/mst/MeasureRoomService.java

@@ -0,0 +1,28 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.mdm.model.pojo.mst.MeasureRoom;
+import com.dk.mdm.mapper.mst.MeasureRoomMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class MeasureRoomService extends BaseService<MeasureRoom> {
+
+	@Override
+	public BaseMapper<MeasureRoom> getRepository() {
+		return measureRoomMapper;
+	}
+
+	@Autowired
+	private MeasureRoomMapper measureRoomMapper;
+
+	@Override
+	public String getPrimaryKey() {
+		return "room_id";
+	}
+
+}

+ 6 - 19
src/main/java/com/dk/mdm/service/mst/OrgService.java

@@ -72,7 +72,7 @@ public class OrgService extends BaseService<Org> {
         // 获取编码和主键UuId
         organization.setDisplayNo(displayNo);
         organization.setOrgId(codeMap.get("outId").toString());
-//        organization.setOrgCode(codeMap.get("outNote").toString());
+        organization.setOrgCode(codeMap.get("outNote").toString());
 
         //查询 本次要加的 部门的 父级下 最大的DisplayNo  然后加1  就是现在要加的DisplayNo
         Map<String, Object> param = new HashMap<>();
@@ -105,29 +105,16 @@ public class OrgService extends BaseService<Org> {
         // 转化实体
         Org organization = orgConvert.convertToPo(orgVO);
         // 获取显示顺序
-//        Integer displayNo = commonService.getMaxDisplayNo(Constant.DisplayNoTable.ORG);
-        Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.ORG.getName(), true);
+        Map<String, Object> codeMap = commonService.getUniqueNoteCode(
+                Constant.docNameConstant.ORG.getName(),orgVO.getCpId(), true);
         // 获取编码和主键UuId
         organization.setDisplayNo(0);
         organization.setOrgId(codeMap.get("outId").toString());
-//        organization.setOrgCode(codeMap.get("outNote").toString());
-
-        //查询 本次要加的 部门的 父级下 最大的DisplayNo  然后加1  就是现在要加的DisplayNo
-        Map<String, Object> param = new HashMap<>();
-        param.put("otherCond", "parent_id = #{parentID} ::uuid");
-        organization.setDisplayNo(commonService.getMaxDisplayNo(Constant.DisplayNoTable.ORG ,param));
-        if (organization.getParentId() != null) {
-            //插入TOPid
-            organization.setTopId(organization.getParentId());
-        }
-
-
+        organization.setOrgCode(codeMap.get("outNote").toString());
         // 插入组织部门数据
         super.insert(organization);
         //执行函数
-        orgMapper.resetLevelOrg(new Org().setTopId(organization.getParentId()).setCpId(organization.getCpId()));
-        return ResponseResultUtil.success();
-        //        return result == 1 ? ResponseResultUtil.success(organization) :
-//                ResponseResultUtil.error(ResponseCodeEnum.INSERT_FAIL);
+        // orgMapper.resetLevelOrg(new Org().setTopId(organization.getParentId()).setCpId(organization.getCpId()));
+        return ResponseResultUtil.success(organization);
     }
 }

+ 36 - 6
src/main/java/com/dk/mdm/service/mst/StaffService.java

@@ -103,14 +103,43 @@ public class StaffService extends BaseService<Staff> {
         staffQuery.setCpId(staff.getCpId());
         staffQuery.setStaffPhone(staff.getStaffPhone());
         List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
-        if (staffResponses!=null && staffResponses.size() > 0){
+        if (staffResponses != null && staffResponses.size() > 0) {
             return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_PHONE_EXIST);
         }
         // 获取编码和主键UuId
         Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.STAFF.getName(), true);
         staff.setStaffId(codeMap.get("outId").toString());
         staff.setStaffCode(codeMap.get("outNote").toString());
-        return super.insert(staff);
+        super.insert(staff);
+        return ResponseResultUtil.success(staff);
+    }
+
+    /**
+     * @desc : 保存方法
+     * @author : 姜永辉
+     * @date : 2023/1/9 10:49
+     */
+    @Transactional(
+            rollbackFor = {Exception.class}
+    )
+    public ResponseResultVO<?> insertFeignStaff(StaffVO staffVO) {
+        // 转化实体
+        Staff staff = staffConvert.convertToPo(staffVO);
+        // 校验同一个公司的电话不能重复
+        StaffQuery staffQuery = new StaffQuery();
+        staffQuery.setCpId(staff.getCpId());
+        staffQuery.setStaffPhone(staff.getStaffPhone());
+        List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
+        if (staffResponses != null && staffResponses.size() > 0) {
+            return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_PHONE_EXIST);
+        }
+        // 获取编码和主键UuId
+        Map<String, Object> codeMap = commonService.getUniqueNoteCode(
+                Constant.docNameConstant.STAFF.getName(), staff.getCpId(), true);
+        staff.setStaffId(codeMap.get("outId").toString());
+        staff.setStaffCode(codeMap.get("outNote").toString());
+        super.insert(staff);
+        return ResponseResultUtil.success(staff);
     }
 
     /**
@@ -118,7 +147,7 @@ public class StaffService extends BaseService<Staff> {
      * @author : 姜永辉
      * @date : 2023/1/9 10:49
      */
-    @Transactional( rollbackFor = {Exception.class} )
+    @Transactional(rollbackFor = {Exception.class})
     public ResponseResultVO<?> insertRequestStaff(StaffVO staffVO) {
         // 转化实体
         Staff staff = staffConvert.convertToPo(staffVO);
@@ -127,7 +156,7 @@ public class StaffService extends BaseService<Staff> {
         staffQuery.setCpId(staff.getCpId());
         staffQuery.setStaffPhone(staff.getStaffPhone());
         List<StaffResponse> staffResponses = staffMapper.selectByCond(staffQuery);
-        if (staffResponses!=null && staffResponses.size() > 0){
+        if (staffResponses != null && staffResponses.size() > 0) {
             return ResponseResultUtil.error(ResponseCodeEnum.ERROR_STAFF_PHONE_EXIST);
         }
         // 获取编码和主键UuId
@@ -135,7 +164,7 @@ public class StaffService extends BaseService<Staff> {
         staff.setStaffId(codeMap.get("outId").toString());
         staff.setStaffCode(codeMap.get("outNote").toString());
         // 更新 被邀人员的cpid
-        if (staff.getWxUserId()!=null){
+        if (staff.getWxUserId() != null) {
             // 更新 被邀请人员的微信用户的cpid 加入公司
             Map<String, Object> collectQuery = new HashMap<>();
             collectQuery.put("cpId", staff.getCpId());
@@ -143,7 +172,8 @@ public class StaffService extends BaseService<Staff> {
             companyFeign.updateWxUserCompany(collectQuery);
         }
         // 插入员工
-        return super.insert(staff);
+        super.insert(staff);
+        return ResponseResultUtil.success(staff);
     }
 
     /**

+ 3 - 3
src/main/java/com/dk/mdm/service/pur/PurchaseService.java

@@ -230,7 +230,7 @@ public class PurchaseService extends BaseService<Purchase> {
     }
 
     /**
-     * @desc : 采购订单 转 采购入库
+     * @desc : 采购订单 转 采购入库   (目前废弃)
      * @author : 王英杰
      * @date : 2024年3月11日
      */
@@ -265,7 +265,7 @@ public class PurchaseService extends BaseService<Purchase> {
     }
 
     /**
-     * @desc :  采购订单实体数据 转 入库单数据
+     * @desc :  采购订单实体数据 转 入库单数据 (目前废弃)
      * @author : 王英杰
      * @date : 2024年3月11日
      */
@@ -294,7 +294,7 @@ public class PurchaseService extends BaseService<Purchase> {
         return inboundVO;
     }
     /**
-     * @desc :  采购订单明细实体数据 转 入库单明细数据
+     * @desc :  采购订单明细实体数据 转 入库单明细数据 (目前废弃)
      * @author : 王英杰
      * @date : 2024年3月11日
      */

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

@@ -52,12 +52,6 @@ public class OrderService extends BaseService<Order> {
     private OrderMapper orderMapper;
 
     @Autowired
-    private OrderConvert orderConvert;
-
-    @Autowired
-    private OrderItemConvert orderItemConvert;
-
-    @Autowired
     private OrderItemService orderItemService;
 
     @Autowired
@@ -69,6 +63,12 @@ public class OrderService extends BaseService<Order> {
     @Autowired
     private CustomerMapper customerMapper;
 
+    @Autowired
+    private OrderConvert orderConvert;
+
+    @Autowired
+    private OrderItemConvert orderItemConvert;
+
     /**
      * @desc : 条件查询
      * @author : 付斌