Explorar o código

Merge branch 'dev' of depot-qinghai/depot-smart-storage-qinghai into master

gdd hai 5 meses
pai
achega
df6176459b
Modificáronse 82 ficheiros con 4410 adicións e 17 borrados
  1. 0 1
      src/main/java/com/chinaitop/depot/intelligent/basicData/controller/TJctableController.java
  2. 2 1
      src/main/java/com/chinaitop/depot/intelligent/basicData/param/TJctableParam.java
  3. 1 0
      src/main/java/com/chinaitop/depot/intelligent/basicData/service/TJctableService.java
  4. 2 0
      src/main/java/com/chinaitop/depot/intelligent/basicData/service/impl/TJctableServiceImpl.java
  5. 8 2
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsInConfirmController.java
  6. 63 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsInterestMaintainController.java
  7. 20 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsOutConfirmContractItemController.java
  8. 82 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsOutConfirmController.java
  9. 20 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsOutConfirmDiffPriceItemController.java
  10. 20 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsInterestMaintainMapper.java
  11. 18 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsOutConfirmContractItemMapper.java
  12. 18 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsOutConfirmDiffPriceItemMapper.java
  13. 32 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsOutConfirmMapper.java
  14. 82 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsInterestMaintain.java
  15. 112 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsOutConfirm.java
  16. 94 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsOutConfirmContractItem.java
  17. 74 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsOutConfirmDiffPriceItem.java
  18. 31 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsInterestMaintainPageParam.java
  19. 73 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsInterestMaintainParam.java
  20. 32 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsInterestainPageParam.java
  21. 96 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsOutConfirmAddParam.java
  22. 29 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsOutConfirmPageParam.java
  23. 98 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsOutConfirmUpdateParam.java
  24. 11 1
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsInConfirmService.java
  25. 59 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsInterestMaintainService.java
  26. 16 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsOutConfirmContractItemService.java
  27. 16 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsOutConfirmDiffPriceItemService.java
  28. 82 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsOutConfirmService.java
  29. 19 8
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsInConfirmServiceImpl.java
  30. 144 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsInterestMaintainServiceImpl.java
  31. 20 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsOutConfirmContractItemServiceImpl.java
  32. 20 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsOutConfirmDiffPriceItemServiceImpl.java
  33. 398 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsOutConfirmServiceImpl.java
  34. 42 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessFsOutConfirmDetailVO.java
  35. 35 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessFsOutConfirmPageVO.java
  36. 48 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessStoreWareDetailDataVO.java
  37. 12 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessStoreWareDetailVO.java
  38. 30 0
      src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/GetFsOutConfirmByContractVO.java
  39. 122 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/controller/BusinessFsSaleRevenueController.java
  40. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueApprovalPriceMapper.java
  41. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueDiffPriceMapper.java
  42. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueInspectionLossMapper.java
  43. 54 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueMapper.java
  44. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueSettleMapper.java
  45. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueThreeConsistenceAccountMapper.java
  46. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueThreeConsistenceMapper.java
  47. 6 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessContractDetail.java
  48. 124 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenue.java
  49. 94 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueApprovalPrice.java
  50. 76 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueDiffPrice.java
  51. 126 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueInspectionLoss.java
  52. 25 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenuePage.java
  53. 115 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueSettle.java
  54. 134 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueThreeConsistence.java
  55. 88 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueThreeConsistenceAccount.java
  56. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueApprovalPriceService.java
  57. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueDiffPriceService.java
  58. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueInspectionLossService.java
  59. 47 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueService.java
  60. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueSettleService.java
  61. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueThreeConsistenceAccountService.java
  62. 16 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueThreeConsistenceService.java
  63. 20 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueApprovalPriceServiceImpl.java
  64. 20 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueDiffPriceServiceImpl.java
  65. 20 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueInspectionLossServiceImpl.java
  66. 352 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueServiceImpl.java
  67. 20 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueSettleServiceImpl.java
  68. 20 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueThreeConsistenceAccountServiceImpl.java
  69. 20 0
      src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueThreeConsistenceServiceImpl.java
  70. 4 4
      src/main/java/com/chinaitop/depot/intelligent/pushs/service/impl/GrainPushsServiceImpl.java
  71. 30 0
      src/main/resources/mapper/financialSupervision/BusinessFsInterestMaintainMapper.xml
  72. 25 0
      src/main/resources/mapper/financialSupervision/BusinessFsOutConfirmContractItemMapper.xml
  73. 23 0
      src/main/resources/mapper/financialSupervision/BusinessFsOutConfirmDiffPriceItemMapper.xml
  74. 74 0
      src/main/resources/mapper/financialSupervision/BusinessFsOutConfirmMapper.xml
  75. 24 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueApprovalPriceMapper.xml
  76. 25 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueDiffPriceMapper.xml
  77. 23 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueInspectionLossMapper.xml
  78. 450 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueMapper.xml
  79. 33 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueSettleMapper.xml
  80. 26 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueThreeConsistenceAccountMapper.xml
  81. 38 0
      src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueThreeConsistenceMapper.xml
  82. 1 0
      src/main/resources/mapper/priceApproval/BusinessFsStoragePriceApprovalMapper.xml

+ 0 - 1
src/main/java/com/chinaitop/depot/intelligent/basicData/controller/TJctableController.java

@@ -62,5 +62,4 @@ public class TJctableController {
62 62
     }
63 63
 
64 64
 
65
-
66 65
 }

+ 2 - 1
src/main/java/com/chinaitop/depot/intelligent/basicData/param/TJctableParam.java

@@ -81,5 +81,6 @@ public class TJctableParam implements Serializable {
81 81
     @ApiModelProperty(value = "创建时间")
82 82
     private Date updatetime;
83 83
 
84
-
84
+    @ApiModelProperty(value = "检测设备编码")
85
+    private String vDevCode;
85 86
 }

+ 1 - 0
src/main/java/com/chinaitop/depot/intelligent/basicData/service/TJctableService.java

@@ -24,4 +24,5 @@ public interface TJctableService extends IService<TJctable> {
24 24
     int updateData(TJctableParam param);
25 25
 
26 26
     int deleteData(String id);
27
+
27 28
 }

+ 2 - 0
src/main/java/com/chinaitop/depot/intelligent/basicData/service/impl/TJctableServiceImpl.java

@@ -86,4 +86,6 @@ public class TJctableServiceImpl extends ServiceImpl<TJctableMapper, TJctable> i
86 86
     public int deleteData(String id) {
87 87
         return tJctableMapper.deleteById(id);
88 88
     }
89
+
90
+
89 91
 }

+ 8 - 2
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsInConfirmController.java

@@ -3,8 +3,7 @@ package com.chinaitop.depot.intelligent.financialSupervision.controller;
3 3
 
4 4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 5
 import com.chinaitop.depot.intelligent.common.ResponseEntity;
6
-import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInConfirm;
7
-import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsLoan;
6
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessContract;
8 7
 import com.chinaitop.depot.intelligent.financialSupervision.param.*;
9 8
 import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsInConfirmService;
10 9
 import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsInConfirmDetailVO;
@@ -16,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
16 15
 import org.springframework.validation.annotation.Validated;
17 16
 import org.springframework.web.bind.annotation.*;
18 17
 
18
+import java.util.List;
19
+
19 20
 /**
20 21
  * <p>
21 22
  * 财务监管-入库确认单 前端控制器
@@ -63,7 +64,12 @@ public class BusinessFsInConfirmController {
63 64
         return ResponseEntity.ok(businessFsInConfirmService.getDataById(id));
64 65
     }
65 66
 
67
+    @GetMapping("/getContractData")
68
+    @ApiOperation(value = "获取采购合同编号", notes = "获取采购合同编号")
69
+    public ResponseEntity<List<BusinessContract>> getContractData(Integer orgId) {
66 70
 
71
+        return ResponseEntity.ok(businessFsInConfirmService.getContractData(orgId));
72
+    }
67 73
     @GetMapping("/getByContractId/{id}")
68 74
     @ApiOperation(value = "通过合同id获取带出数据", notes = "通过合同id获取带出数据")
69 75
     public ResponseEntity<GetFsConfirmByContractIdVO> getByContractId(@PathVariable("id") String id) {

+ 63 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsInterestMaintainController.java

@@ -0,0 +1,63 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.chinaitop.depot.intelligent.common.ResponseEntity;
6
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInterestMaintain;
7
+import com.chinaitop.depot.intelligent.financialSupervision.param.*;
8
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsInterestMaintainService;
9
+import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsInConfirmDetailVO;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.validation.annotation.Validated;
14
+import org.springframework.web.bind.annotation.*;
15
+
16
+/**
17
+ * <p>
18
+ * 财务监管-利息维护 前端控制器
19
+ * </p>
20
+ *
21
+ * @author root
22
+ * @since 2024-07-23
23
+ */
24
+@RestController
25
+@RequestMapping("/business-fs-interest-maintain")
26
+@Api(value = "BusinessFsInterestMaintain", description = "利息维护控制类")
27
+public class BusinessFsInterestMaintainController {
28
+
29
+    @Autowired
30
+    private BusinessFsInterestMaintainService businessFsInterestMaintainService;
31
+
32
+    @GetMapping("/getList")
33
+    @ApiOperation(value = "查询 利息维护 信息列表", notes = "查询 利息维护 信息列表")
34
+    public ResponseEntity<Page<BusinessFsInterestMaintain>> getList(@Validated BusinessFsInterestMaintainPageParam pageParam) {
35
+
36
+        return ResponseEntity.ok(businessFsInterestMaintainService.getList(pageParam));
37
+    }
38
+
39
+    @PostMapping("/save")
40
+    @ApiOperation(value = "利息维护新增", notes = "新增")
41
+    public ResponseEntity save(@Validated @RequestBody BusinessFsInterestMaintainParam param) {
42
+        return ResponseEntity.ok(businessFsInterestMaintainService.saveData(param));
43
+    }
44
+
45
+    @PutMapping("/update")
46
+    @ApiOperation(value = "利息维护修改", notes = "修改")
47
+    public ResponseEntity update(@Validated @RequestBody BusinessFsInterestMaintainParam param) {
48
+        return ResponseEntity.ok(businessFsInterestMaintainService.updateData(param));
49
+    }
50
+
51
+    @DeleteMapping("/delete/{id}")
52
+    @ApiOperation(value = "利息维护删除", notes = "id删除")
53
+    public ResponseEntity delete(@PathVariable("id") Integer id) {
54
+        return ResponseEntity.ok(businessFsInterestMaintainService.deleteData(id));
55
+    }
56
+
57
+    @GetMapping("/getById/{id}")
58
+    @ApiOperation(value = "利息维护详情", notes = "id获取详情")
59
+    public ResponseEntity<BusinessFsInterestMaintain> getById(@PathVariable("id") String id) {
60
+        return ResponseEntity.ok(businessFsInterestMaintainService.getDataById(id));
61
+    }
62
+
63
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsOutConfirmContractItemController.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.controller;
2
+
3
+
4
+import org.springframework.web.bind.annotation.RequestMapping;
5
+
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 财务监管-销售收入上缴-出库验收确认-合同元素 前端控制器
11
+ * </p>
12
+ *
13
+ * @author root
14
+ * @since 2024-07-23
15
+ */
16
+@RestController
17
+@RequestMapping("/business-fs-out-confirm-contract-item")
18
+public class BusinessFsOutConfirmContractItemController {
19
+
20
+}

+ 82 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsOutConfirmController.java

@@ -0,0 +1,82 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.chinaitop.depot.intelligent.common.ResponseEntity;
6
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessContract;
7
+import com.chinaitop.depot.intelligent.financialSupervision.param.*;
8
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsOutConfirmService;
9
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsStatisticalAccountService;
10
+import com.chinaitop.depot.intelligent.financialSupervision.vo.*;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.validation.annotation.Validated;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import java.util.List;
18
+
19
+/**
20
+ * <p>
21
+ * 财务监管-销售收入上缴-出库验收确认 前端控制器
22
+ * </p>
23
+ *
24
+ * @author root
25
+ * @since 2024-07-23
26
+ */
27
+@RestController
28
+@RequestMapping("/business-fs-out-confirm")
29
+@Api(value = "BusinessFsInterestMaintain", description = "出库验收确认控制类")
30
+public class BusinessFsOutConfirmController {
31
+
32
+    @Autowired
33
+    private BusinessFsOutConfirmService businessFsOutConfirmService;
34
+
35
+    @Autowired
36
+    private BusinessFsStatisticalAccountService businessFsStatisticalAccountService;
37
+
38
+
39
+      @GetMapping("/getList")
40
+      @ApiOperation(value = "查询 出库验收确认 信息列表", notes = "查询 出库验收确认 信息列表")
41
+      public ResponseEntity<Page<BusinessFsOutConfirmPageVO>> getList(@Validated BusinessFsOutConfirmPageParam pageParam) {
42
+
43
+          return ResponseEntity.ok(businessFsOutConfirmService.getList(pageParam));
44
+      }
45
+
46
+      @PostMapping("/save")
47
+      @ApiOperation(value = "出库验收确认新增", notes = "新增")
48
+      public ResponseEntity save(@Validated @RequestBody BusinessFsOutConfirmAddParam param) {
49
+          return ResponseEntity.ok(businessFsOutConfirmService.saveData(param));
50
+      }
51
+      @PutMapping("/update")
52
+      @ApiOperation(value = "出库验收确认修改", notes = "修改")
53
+      public ResponseEntity update(@Validated @RequestBody BusinessFsOutConfirmUpdateParam param) {
54
+          return ResponseEntity.ok(businessFsOutConfirmService.updateData(param));
55
+      }
56
+
57
+      @DeleteMapping("/delete/{id}")
58
+      @ApiOperation(value = "出库验收确认删除", notes = "id删除")
59
+      public ResponseEntity delete(@PathVariable("id") Integer id) {
60
+          return ResponseEntity.ok(businessFsOutConfirmService.deleteData(id));
61
+      }
62
+
63
+      @GetMapping("/getById/{id}")
64
+      @ApiOperation(value = "出库验收确认详情", notes = "id获取详情")
65
+      public ResponseEntity<BusinessFsOutConfirmDetailVO> getById(@PathVariable("id") String id) {
66
+          return ResponseEntity.ok(businessFsOutConfirmService.getDataById(id));
67
+      }
68
+
69
+    @GetMapping("/getContractData")
70
+    @ApiOperation(value = "获取销售合同编号", notes = "获取合同编号")
71
+    public ResponseEntity<List<BusinessContract>> getContractData(Integer orgId) {
72
+
73
+        return ResponseEntity.ok(businessFsOutConfirmService.getContractData(orgId));
74
+    }
75
+
76
+    @GetMapping("/getByContractId/{id}")
77
+    @ApiOperation(value = "通过合同id获取带出数据", notes = "通过合同id获取带出数据")
78
+    public ResponseEntity<GetFsOutConfirmByContractVO> getByContractId(@PathVariable("id") String id) {
79
+        return ResponseEntity.ok(businessFsOutConfirmService.getByContractId(id));
80
+    }
81
+
82
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/controller/BusinessFsOutConfirmDiffPriceItemController.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.controller;
2
+
3
+
4
+import org.springframework.web.bind.annotation.RequestMapping;
5
+
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 财务监管-销售收入上缴-出库验收确认-差额上缴元素 前端控制器
11
+ * </p>
12
+ *
13
+ * @author root
14
+ * @since 2024-07-23
15
+ */
16
+@RestController
17
+@RequestMapping("/business-fs-out-confirm-diff-price-item")
18
+public class BusinessFsOutConfirmDiffPriceItemController {
19
+
20
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsInterestMaintainMapper.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInterestMaintain;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 财务监管-利息维护 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author root
13
+ * @since 2024-07-23
14
+ */
15
+@Mapper
16
+public interface BusinessFsInterestMaintainMapper extends BaseMapper<BusinessFsInterestMaintain> {
17
+
18
+    String selectNum();
19
+
20
+}

+ 18 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsOutConfirmContractItemMapper.java

@@ -0,0 +1,18 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmContractItem;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 财务监管-销售收入上缴-出库验收确认-合同元素 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author root
13
+ * @since 2024-07-23
14
+ */
15
+@Mapper
16
+public interface BusinessFsOutConfirmContractItemMapper extends BaseMapper<BusinessFsOutConfirmContractItem> {
17
+
18
+}

+ 18 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsOutConfirmDiffPriceItemMapper.java

@@ -0,0 +1,18 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 财务监管-销售收入上缴-出库验收确认-差额上缴元素 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author root
13
+ * @since 2024-07-23
14
+ */
15
+@Mapper
16
+public interface BusinessFsOutConfirmDiffPriceItemMapper extends BaseMapper<BusinessFsOutConfirmDiffPriceItem> {
17
+
18
+}

+ 32 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/mapper/BusinessFsOutConfirmMapper.java

@@ -0,0 +1,32 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.mapper;
2
+
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirm;
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsOutConfirmPageVO;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+/**
11
+ * <p>
12
+ * 财务监管-销售收入上缴-出库验收确认 Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author root
16
+ * @since 2024-07-23
17
+ */
18
+@Mapper
19
+public interface BusinessFsOutConfirmMapper extends BaseMapper<BusinessFsOutConfirm> {
20
+
21
+    Double selectSum(@Param("id") String id,
22
+                     @Param("grainKind") Integer grainKind,
23
+                     @Param("grainAttribute") Integer grainAttribute);
24
+
25
+    Page<BusinessFsOutConfirmPageVO> selectMyPage(@Param("page") Page<BusinessFsOutConfirmPageVO> page,
26
+                                                  @Param("contractNumber") String contractNumber,
27
+                                                  @Param("orgId") Integer orgId);
28
+
29
+    String selectOutboundConfirmationNumber();
30
+
31
+
32
+}

+ 82 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsInterestMaintain.java

@@ -0,0 +1,82 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-利息维护
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-23
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("business_fs_interest_maintain")
26
+@ApiModel(value="BusinessFsInterestMaintain对象", description="财务监管-利息维护")
27
+public class BusinessFsInterestMaintain implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "粮库id;org_info的id;")
52
+    @TableField("org_id")
53
+    private Integer orgId;
54
+
55
+    @ApiModelProperty(value = "利息单号")
56
+    @TableField("interest_bill_no")
57
+    private String interestBillNo;
58
+
59
+    @ApiModelProperty(value = "年")
60
+    @TableField("year")
61
+    private Integer year;
62
+
63
+    @ApiModelProperty(value = "月")
64
+    @TableField("month")
65
+    private Integer month;
66
+
67
+    @ApiModelProperty(value = "农发行实收利息;单位:万元;")
68
+    @TableField("actual_interest_received")
69
+    private BigDecimal actualInterestReceived;
70
+
71
+    @ApiModelProperty(value = "对其他扣款;单位:万元;")
72
+    @TableField("other_deduction")
73
+    private BigDecimal otherDeduction;
74
+
75
+    @ApiModelProperty(value = "备注")
76
+    @TableField("remark")
77
+    private String remark;
78
+
79
+    @ApiModelProperty(value = "日期")
80
+    @TableField(exist = false)
81
+    private String yearAndMonth;
82
+}

+ 112 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsOutConfirm.java

@@ -0,0 +1,112 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-销售收入上缴-出库验收确认
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-23
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("business_fs_out_confirm")
26
+@ApiModel(value="BusinessFsOutConfirm对象", description="财务监管-销售收入上缴-出库验收确认")
27
+public class BusinessFsOutConfirm implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "org_info的id;")
52
+    @TableField("org_id")
53
+    private Integer orgId;
54
+
55
+    @ApiModelProperty(value = "合同编号;business_contract的ID;")
56
+    @TableField("contract_id")
57
+    private Integer contractId;
58
+
59
+    @ApiModelProperty(value = "出库确认单-出库确认时间")
60
+    @TableField("outbound_confirmation_time")
61
+    private Date outboundConfirmationTime;
62
+
63
+    @ApiModelProperty(value = "出库确认单号")
64
+    @TableField("outbound_confirmation_number")
65
+    private String outboundConfirmationNumber;
66
+
67
+    @ApiModelProperty(value = "出库确认单-小计-总结算数量(吨)")
68
+    @TableField("total_settle_quantity")
69
+    private BigDecimal totalSettleQuantity;
70
+
71
+    @ApiModelProperty(value = "出库确认单-小计-总结算金额,单位:元")
72
+    @TableField("total_settle_amount")
73
+    private BigDecimal totalSettleAmount;
74
+
75
+    @ApiModelProperty(value = "贷款信息-贷款收回单位")
76
+    @TableField("loan_recovery_unit")
77
+    private String loanRecoveryUnit;
78
+
79
+    @ApiModelProperty(value = "贷款信息-贷款收回数量")
80
+    @TableField("loan_recovery_quantity")
81
+    private BigDecimal loanRecoveryQuantity;
82
+
83
+    @ApiModelProperty(value = "贷款信息-贷款收回金额")
84
+    @TableField("loan_recovery_amount")
85
+    private BigDecimal loanRecoveryAmount;
86
+
87
+    @ApiModelProperty(value = "贷款信息-贷款归还时间")
88
+    @TableField("loan_return_time")
89
+    private Date loanReturnTime;
90
+
91
+    @ApiModelProperty(value = "贷款信息-贷款归还金额")
92
+    @TableField("loan_return_amount")
93
+    private BigDecimal loanReturnAmount;
94
+
95
+    @ApiModelProperty(value = "销售发票情况-单位")
96
+    @TableField("invoice_unit")
97
+    private String invoiceUnit;
98
+
99
+    @ApiModelProperty(value = "销售发票情况-发票数量")
100
+    @TableField("invoice_quantity")
101
+    private Integer invoiceQuantity;
102
+
103
+    @ApiModelProperty(value = "销售发票情况-发票单价")
104
+    @TableField("invoice_unit_price")
105
+    private BigDecimal invoiceUnitPrice;
106
+
107
+    @ApiModelProperty(value = "销售发票情况-发票金额")
108
+    @TableField("invoice_amount")
109
+    private BigDecimal invoiceAmount;
110
+
111
+
112
+}

+ 94 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsOutConfirmContractItem.java

@@ -0,0 +1,94 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+import javax.validation.constraints.NotNull;
16
+
17
+/**
18
+ * <p>
19
+ * 财务监管-销售收入上缴-出库验收确认-合同元素
20
+ * </p>
21
+ *
22
+ * @author root
23
+ * @since 2024-07-23
24
+ */
25
+@Data
26
+@EqualsAndHashCode(callSuper = false)
27
+@TableName("business_fs_out_confirm_contract_item")
28
+@ApiModel(value="BusinessFsOutConfirmContractItem对象", description="财务监管-销售收入上缴-出库验收确认-合同元素")
29
+public class BusinessFsOutConfirmContractItem implements Serializable {
30
+
31
+    private static final long serialVersionUID = 1L;
32
+
33
+    @ApiModelProperty(value = "主键ID")
34
+    @TableId(value = "id", type = IdType.AUTO)
35
+    private Integer id;
36
+
37
+    @ApiModelProperty(value = "创建人")
38
+    @TableField("createname")
39
+    private String createname;
40
+
41
+    @ApiModelProperty(value = "创建日期")
42
+    @TableField("createdate")
43
+    private Date createdate;
44
+
45
+    @ApiModelProperty(value = "更新人")
46
+    @TableField("updatename")
47
+    private String updatename;
48
+
49
+    @ApiModelProperty(value = "更新日期")
50
+    @TableField("updatedate")
51
+    private Date updatedate;
52
+
53
+    @ApiModelProperty(value = "business_fs_out_confirm的ID;")
54
+    @TableField("fs_out_confirm_id")
55
+    @NotNull(message = "fs_out_confirm_id不能为空")
56
+    private Integer fsOutConfirmId;
57
+
58
+    @ApiModelProperty(value = "仓房id;basic_storehouse的id;")
59
+    @TableField("basic_storehouse_id")
60
+    @NotNull(message = "仓房id不能为空")
61
+    private Integer basicStorehouseId;
62
+
63
+    @ApiModelProperty(value = "货位id;basic_warehouse的id;")
64
+    @TableField("warehouse_id")
65
+    @NotNull(message = "货位id不能为空")
66
+    private Integer warehouseId;
67
+
68
+    @ApiModelProperty(value = "粮食品种id;basic_enum的id;")
69
+    @TableField("grain_variety_id")
70
+    @NotNull(message = "粮食品种id不能为空")
71
+    private Integer grainVarietyId;
72
+
73
+    @ApiModelProperty(value = "粮食性质id;basic_enum的id;")
74
+    @TableField("grain_nature_id")
75
+    @NotNull(message = "粮食性质id不能为空")
76
+    private Integer grainNatureId;
77
+
78
+    @ApiModelProperty(value = "结算数量(吨)")
79
+    @TableField("settle_quantity")
80
+    @NotNull(message = "结算数量不能为空")
81
+    private BigDecimal settleQuantity;
82
+
83
+    @ApiModelProperty(value = "结算价格(元/吨)")
84
+    @TableField("settle_price")
85
+    @NotNull(message = "结算价格不能为空")
86
+    private BigDecimal settlePrice;
87
+
88
+    @ApiModelProperty(value = "结算金额")
89
+    @TableField("settle_amount")
90
+    @NotNull(message = "结算金额不能为空")
91
+    private BigDecimal settleAmount;
92
+
93
+
94
+}

+ 74 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/model/BusinessFsOutConfirmDiffPriceItem.java

@@ -0,0 +1,74 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+import javax.validation.constraints.NotNull;
16
+
17
+/**
18
+ * <p>
19
+ * 财务监管-销售收入上缴-出库验收确认-差额上缴元素
20
+ * </p>
21
+ *
22
+ * @author root
23
+ * @since 2024-07-23
24
+ */
25
+@Data
26
+@EqualsAndHashCode(callSuper = false)
27
+@TableName("business_fs_out_confirm_diff_price_item")
28
+@ApiModel(value="BusinessFsOutConfirmDiffPriceItem对象", description="财务监管-销售收入上缴-出库验收确认-差额上缴元素")
29
+public class BusinessFsOutConfirmDiffPriceItem implements Serializable {
30
+
31
+    private static final long serialVersionUID = 1L;
32
+
33
+    @ApiModelProperty(value = "主键ID")
34
+    @TableId(value = "id", type = IdType.AUTO)
35
+    private Integer id;
36
+
37
+    @ApiModelProperty(value = "创建人")
38
+    @TableField("createname")
39
+    private String createname;
40
+
41
+    @ApiModelProperty(value = "创建日期")
42
+    @TableField("createdate")
43
+    private Date createdate;
44
+
45
+    @ApiModelProperty(value = "更新人")
46
+    @TableField("updatename")
47
+    private String updatename;
48
+
49
+    @ApiModelProperty(value = "更新日期")
50
+    @TableField("updatedate")
51
+    private Date updatedate;
52
+
53
+    @ApiModelProperty(value = "business_fs_out_confirm的ID;")
54
+    @TableField("fs_out_confirm_id")
55
+    @NotNull(message = "fs_out_confirm_id不能为空")
56
+    private Integer fsOutConfirmId;
57
+
58
+    @ApiModelProperty(value = "项目类型 1:销售;2:损耗;3:入库(用负数表示);4:交易手续费(用负数表示);")
59
+    @TableField("project_type")
60
+    @NotNull(message = "项目类型不能为空")
61
+    private Integer projectType;
62
+
63
+    @ApiModelProperty(value = "数量")
64
+    @TableField("quantity")
65
+    @NotNull(message = "数量不能为空")
66
+    private BigDecimal quantity;
67
+
68
+    @ApiModelProperty(value = "金额")
69
+    @TableField("amount")
70
+    @NotNull(message = "金额不能为空")
71
+    private BigDecimal amount;
72
+
73
+
74
+}

+ 31 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsInterestMaintainPageParam.java

@@ -0,0 +1,31 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.param;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Data;
6
+
7
+import javax.validation.constraints.NotNull;
8
+
9
+/**
10
+ * @author hjc
11
+ * @date 2024/7/23 14:46
12
+ */
13
+@Data
14
+public class BusinessFsInterestMaintainPageParam {
15
+    /** 当前页 */
16
+    @ApiModelProperty(value = "页码")
17
+    private Integer pageNum;
18
+
19
+    /** 每页条数 */
20
+    @ApiModelProperty(value = "每页条数")
21
+    private Integer pageSize;
22
+
23
+    @ApiModelProperty(value = "单位id;org_info的ID;")
24
+    @NotNull(message = "单位id不能为空")
25
+    private Integer orgId;
26
+
27
+
28
+    @ApiModelProperty(value = "利息单号")
29
+    private String interestBillNo;
30
+
31
+}

+ 73 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsInterestMaintainParam.java

@@ -0,0 +1,73 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.param;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+
12
+import javax.validation.constraints.NotBlank;
13
+import javax.validation.constraints.NotNull;
14
+import java.io.Serializable;
15
+import java.math.BigDecimal;
16
+import java.util.Date;
17
+
18
+/**
19
+ * <p>
20
+ * 财务监管-利息维护
21
+ * </p>
22
+ *
23
+ * @author root
24
+ * @since 2024-07-23
25
+ */
26
+@Data
27
+public class BusinessFsInterestMaintainParam implements Serializable {
28
+
29
+
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    private Integer id;
33
+
34
+    @ApiModelProperty(value = "创建人")
35
+    private String createname;
36
+
37
+    @ApiModelProperty(value = "创建日期")
38
+    private Date createdate;
39
+
40
+    @ApiModelProperty(value = "更新人")
41
+    private String updatename;
42
+
43
+    @ApiModelProperty(value = "更新日期")
44
+    private Date updatedate;
45
+
46
+    @ApiModelProperty(value = "粮库id;org_info的id;")
47
+    @NotNull(message = "库区id不能为空")
48
+    private Integer orgId;
49
+
50
+  /*  @ApiModelProperty(value = "利息单号")
51
+    private String interestBillNo;*/
52
+
53
+    @ApiModelProperty(value = "年")
54
+    @NotNull(message = "年不能为空")
55
+    private Integer year;
56
+
57
+    @ApiModelProperty(value = "月")
58
+    @NotNull(message = "月不能为空")
59
+    private Integer month;
60
+
61
+    @ApiModelProperty(value = "农发行实收利息;单位:万元;")
62
+    @NotNull(message = "农发行实收利息不能为空")
63
+    private BigDecimal actualInterestReceived;
64
+
65
+    @ApiModelProperty(value = "对其他扣款;单位:万元;")
66
+    @NotNull(message = "对其他扣款不能为空")
67
+    private BigDecimal otherDeduction;
68
+
69
+    @ApiModelProperty(value = "备注")
70
+    private String remark;
71
+
72
+
73
+}

+ 32 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsInterestainPageParam.java

@@ -0,0 +1,32 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.param;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Data;
5
+
6
+import javax.validation.constraints.NotNull;
7
+
8
+/**
9
+ * @author hjc
10
+ * @date 2024/7/2 18:08
11
+ */
12
+@Data
13
+public class BusinessFsInterestainPageParam {
14
+
15
+    /** 当前页 */
16
+    @ApiModelProperty(value = "页码")
17
+    private Integer pageNum;
18
+
19
+    /** 每页条数 */
20
+    @ApiModelProperty(value = "每页条数")
21
+    private Integer pageSize;
22
+
23
+    @ApiModelProperty(value = "合同编号")
24
+    private String contractNumber;
25
+
26
+    @ApiModelProperty(value = "入库确认单-入库确认单号")
27
+    private String receiptNumber;
28
+
29
+    @ApiModelProperty(value = "单位id;org_info的ID;")
30
+    @NotNull(message = "单位id不能为空")
31
+    private Integer orgId;
32
+}

+ 96 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsOutConfirmAddParam.java

@@ -0,0 +1,96 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.param;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInConfirmContractItem;
5
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmContractItem;
6
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
7
+import io.swagger.annotations.ApiModelProperty;
8
+import lombok.Data;
9
+
10
+import javax.validation.constraints.NotBlank;
11
+import javax.validation.constraints.NotNull;
12
+import java.io.Serializable;
13
+import java.math.BigDecimal;
14
+import java.util.Date;
15
+import java.util.List;
16
+
17
+/**
18
+ * <p>
19
+ * 财务监管-入库确认单
20
+ * </p>
21
+ *
22
+ * @author root
23
+ * @since 2024-07-04
24
+ */
25
+@Data
26
+public class BusinessFsOutConfirmAddParam implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    @ApiModelProperty(value = "org_info的id;")
31
+    @NotNull(message = "库区id不能为空")
32
+    private Integer orgId;
33
+
34
+    @ApiModelProperty(value = "合同id;business_contract的ID;")
35
+    @NotNull(message = "合同id不能为空")
36
+    private Integer contractId;
37
+
38
+    @ApiModelProperty(value = "出库确认单-出库确认时间")
39
+    @NotNull(message = "出库确认时间不能为空")
40
+    private Date outboundConfirmationTime;
41
+
42
+   /* @ApiModelProperty(value = "出库确认单号")
43
+    @NotBlank(message = "出库确认单号不能为空")
44
+    private String outboundConfirmationNumber;*/
45
+
46
+    @ApiModelProperty(value = "出库确认单-小计-总结算数量(吨)")
47
+    @NotNull(message = "总结算数量不能为空")
48
+    private BigDecimal totalSettleQuantity;
49
+
50
+    @ApiModelProperty(value = "出库确认单-小计-总结算金额,单位:元")
51
+    @NotNull(message = "总结算金额不能为空")
52
+    private BigDecimal totalSettleAmount;
53
+
54
+    @ApiModelProperty(value = "贷款信息-贷款收回单位")
55
+    @NotBlank(message = "贷款收回单位不能为空")
56
+    private String loanRecoveryUnit;
57
+
58
+    @ApiModelProperty(value = "贷款信息-贷款收回数量")
59
+    @NotNull(message = "贷款收回数量不能为空")
60
+    private BigDecimal loanRecoveryQuantity;
61
+
62
+    @ApiModelProperty(value = "贷款信息-贷款收回金额")
63
+    @NotNull(message = "贷款收回金额不能为空")
64
+    private BigDecimal loanRecoveryAmount;
65
+
66
+    @ApiModelProperty(value = "贷款信息-贷款归还时间")
67
+    @NotNull(message = "贷款归还时间不能为空")
68
+    private Date loanReturnTime;
69
+
70
+    @ApiModelProperty(value = "贷款信息-贷款归还金额")
71
+    @NotNull(message = "贷款归还金额不能为空")
72
+    private BigDecimal loanReturnAmount;
73
+
74
+    @ApiModelProperty(value = "销售发票情况-单位")
75
+    @NotBlank(message = "单位不能为空")
76
+    private String invoiceUnit;
77
+
78
+    @ApiModelProperty(value = "销售发票情况-发票数量")
79
+    @NotNull(message = "发票数量不能为空")
80
+    private Integer invoiceQuantity;
81
+
82
+    @ApiModelProperty(value = "销售发票情况-发票单价")
83
+    @NotNull(message = "发票单价不能为空")
84
+    private BigDecimal invoiceUnitPrice;
85
+
86
+    @ApiModelProperty(value = "销售发票情况-发票金额")
87
+    @NotNull(message = "发票金额不能为空")
88
+    private BigDecimal invoiceAmount;
89
+
90
+    @ApiModelProperty(value = "合同详情")
91
+    private List<BusinessFsOutConfirmContractItem> fsOutConfirmContractItemList;
92
+
93
+    @ApiModelProperty(value = "差价上缴详情")
94
+    private List<BusinessFsOutConfirmDiffPriceItem> fsOutConfirmDiffPriceItemList;
95
+
96
+}

+ 29 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsOutConfirmPageParam.java

@@ -0,0 +1,29 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.param;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Data;
5
+
6
+import javax.validation.constraints.NotNull;
7
+
8
+/**
9
+ * @author hjc
10
+ * @date 2024/7/23 15:44
11
+ */
12
+@Data
13
+public class BusinessFsOutConfirmPageParam {
14
+
15
+    /** 当前页 */
16
+    @ApiModelProperty(value = "页码")
17
+    private Integer pageNum;
18
+
19
+    /** 每页条数 */
20
+    @ApiModelProperty(value = "每页条数")
21
+    private Integer pageSize;
22
+
23
+    @ApiModelProperty(value = "合同编号")
24
+    private String contractNumber;
25
+
26
+    @ApiModelProperty(value = "单位id;org_info的ID;")
27
+    @NotNull(message = "单位id不能为空")
28
+    private Integer orgId;
29
+}

+ 98 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/param/BusinessFsOutConfirmUpdateParam.java

@@ -0,0 +1,98 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.param;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmContractItem;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
5
+import io.swagger.annotations.ApiModelProperty;
6
+import lombok.Data;
7
+
8
+import javax.validation.constraints.NotBlank;
9
+import javax.validation.constraints.NotNull;
10
+import java.io.Serializable;
11
+import java.math.BigDecimal;
12
+import java.util.Date;
13
+import java.util.List;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-入库确认单
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-04
22
+ */
23
+@Data
24
+public class BusinessFsOutConfirmUpdateParam implements Serializable {
25
+
26
+    private static final long serialVersionUID = 1L;
27
+
28
+    @ApiModelProperty(value = "主键ID")
29
+    @NotNull(message = "id不能为空")
30
+    private Integer id;
31
+
32
+    @ApiModelProperty(value = "org_info的id;")
33
+    @NotNull(message = "库区id不能为空")
34
+    private Integer orgId;
35
+
36
+    @ApiModelProperty(value = "合同id;business_contract的ID;")
37
+    @NotNull(message = "合同id不能为空")
38
+    private Integer contractId;
39
+
40
+    @ApiModelProperty(value = "出库确认单-出库确认时间")
41
+    @NotNull(message = "出库确认时间不能为空")
42
+    private Date outboundConfirmationTime;
43
+
44
+/*    @ApiModelProperty(value = "出库确认单号")
45
+    @NotBlank(message = "出库确认单号不能为空")
46
+    private String outboundConfirmationNumber;*/
47
+
48
+    @ApiModelProperty(value = "出库确认单-小计-总结算数量(吨)")
49
+    @NotNull(message = "总结算数量不能为空")
50
+    private BigDecimal totalSettleQuantity;
51
+
52
+    @ApiModelProperty(value = "出库确认单-小计-总结算金额,单位:元")
53
+    @NotNull(message = "总结算金额不能为空")
54
+    private BigDecimal totalSettleAmount;
55
+
56
+    @ApiModelProperty(value = "贷款信息-贷款收回单位")
57
+    @NotBlank(message = "贷款收回单位不能为空")
58
+    private String loanRecoveryUnit;
59
+
60
+    @ApiModelProperty(value = "贷款信息-贷款收回数量")
61
+    @NotNull(message = "贷款收回数量不能为空")
62
+    private BigDecimal loanRecoveryQuantity;
63
+
64
+    @ApiModelProperty(value = "贷款信息-贷款收回金额")
65
+    @NotNull(message = "贷款收回金额不能为空")
66
+    private BigDecimal loanRecoveryAmount;
67
+
68
+    @ApiModelProperty(value = "贷款信息-贷款归还时间")
69
+    @NotNull(message = "贷款归还时间不能为空")
70
+    private Date loanReturnTime;
71
+
72
+    @ApiModelProperty(value = "贷款信息-贷款归还金额")
73
+    @NotNull(message = "贷款归还金额不能为空")
74
+    private BigDecimal loanReturnAmount;
75
+
76
+    @ApiModelProperty(value = "销售发票情况-单位")
77
+    @NotBlank(message = "单位不能为空")
78
+    private String invoiceUnit;
79
+
80
+    @ApiModelProperty(value = "销售发票情况-发票数量")
81
+    @NotNull(message = "发票数量不能为空")
82
+    private Integer invoiceQuantity;
83
+
84
+    @ApiModelProperty(value = "销售发票情况-发票单价")
85
+    @NotNull(message = "发票单价不能为空")
86
+    private BigDecimal invoiceUnitPrice;
87
+
88
+    @ApiModelProperty(value = "销售发票情况-发票金额")
89
+    @NotNull(message = "发票金额不能为空")
90
+    private BigDecimal invoiceAmount;
91
+
92
+    @ApiModelProperty(value = "合同详情")
93
+    private List<BusinessFsOutConfirmContractItem> fsOutConfirmContractItemList;
94
+
95
+    @ApiModelProperty(value = "差价上缴详情")
96
+    private List<BusinessFsOutConfirmDiffPriceItem> fsOutConfirmDiffPriceItemList;
97
+
98
+}

+ 11 - 1
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsInConfirmService.java

@@ -1,9 +1,9 @@
1 1
 package com.chinaitop.depot.intelligent.financialSupervision.service;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessContract;
4 5
 import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInConfirm;
5 6
 import com.baomidou.mybatisplus.extension.service.IService;
6
-import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsAccountUpdateParam;
7 7
 import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmAddParam;
8 8
 import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmPageParam;
9 9
 import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmUpdateParam;
@@ -11,6 +11,8 @@ import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsInConfi
11 11
 import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsInConfirmPageVO;
12 12
 import com.chinaitop.depot.intelligent.financialSupervision.vo.GetFsConfirmByContractIdVO;
13 13
 
14
+import java.util.List;
15
+
14 16
 /**
15 17
  * <p>
16 18
  * 财务监管-入库确认单 服务类
@@ -69,4 +71,12 @@ public interface BusinessFsInConfirmService extends IService<BusinessFsInConfirm
69 71
     *@date 2024/7/4 18:06
70 72
     */
71 73
     int updateData(BusinessFsInConfirmUpdateParam param);
74
+
75
+    /**
76
+    *获取采购合同编号
77
+    *
78
+    *@author hjc
79
+    *@date 2024/7/24 17:52
80
+    */
81
+    List<BusinessContract> getContractData(Integer orgId);
72 82
 }

+ 59 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsInterestMaintainService.java

@@ -0,0 +1,59 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service;
2
+
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInterestMaintain;
5
+import com.baomidou.mybatisplus.extension.service.IService;
6
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmPageParam;
7
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInterestMaintainPageParam;
8
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInterestMaintainParam;
9
+
10
+/**
11
+ * <p>
12
+ * 财务监管-利息维护 服务类
13
+ * </p>
14
+ *
15
+ * @author root
16
+ * @since 2024-07-23
17
+ */
18
+public interface BusinessFsInterestMaintainService extends IService<BusinessFsInterestMaintain> {
19
+
20
+    /**
21
+    *查询 利息维护 信息列表
22
+    *
23
+    *@author hjc
24
+    *@date 2024/7/23 14:41
25
+    */
26
+    Page<BusinessFsInterestMaintain> getList(BusinessFsInterestMaintainPageParam pageParam);
27
+
28
+    /**
29
+    *利息维护新增
30
+    *
31
+    *@author hjc
32
+    *@date 2024/7/23 14:58
33
+    */
34
+    int saveData(BusinessFsInterestMaintainParam param);
35
+
36
+    /**
37
+    *利息维护修改
38
+    *
39
+    *@author hjc
40
+    *@date 2024/7/23 14:59
41
+    */
42
+    int updateData(BusinessFsInterestMaintainParam param);
43
+
44
+    /**
45
+    *利息维护删除
46
+    *
47
+    *@author hjc
48
+    *@date 2024/7/23 15:12
49
+    */
50
+    int deleteData(Integer id);
51
+
52
+    /**
53
+    *利息维护详情
54
+    *
55
+    *@author hjc
56
+    *@date 2024/7/23 15:32
57
+    */
58
+    BusinessFsInterestMaintain getDataById(String id);
59
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsOutConfirmContractItemService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmContractItem;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-出库验收确认-合同元素 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-23
13
+ */
14
+public interface BusinessFsOutConfirmContractItemService extends IService<BusinessFsOutConfirmContractItem> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsOutConfirmDiffPriceItemService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-出库验收确认-差额上缴元素 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-23
13
+ */
14
+public interface BusinessFsOutConfirmDiffPriceItemService extends IService<BusinessFsOutConfirmDiffPriceItem> {
15
+
16
+}

+ 82 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/BusinessFsOutConfirmService.java

@@ -0,0 +1,82 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service;
2
+
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessContract;
5
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirm;
6
+import com.baomidou.mybatisplus.extension.service.IService;
7
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsOutConfirmAddParam;
8
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsOutConfirmPageParam;
9
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsOutConfirmUpdateParam;
10
+import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsOutConfirmDetailVO;
11
+import com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsOutConfirmPageVO;
12
+import com.chinaitop.depot.intelligent.financialSupervision.vo.GetFsConfirmByContractIdVO;
13
+import com.chinaitop.depot.intelligent.financialSupervision.vo.GetFsOutConfirmByContractVO;
14
+
15
+import java.util.List;
16
+
17
+/**
18
+ * <p>
19
+ * 财务监管-销售收入上缴-出库验收确认 服务类
20
+ * </p>
21
+ *
22
+ * @author root
23
+ * @since 2024-07-23
24
+ */
25
+public interface BusinessFsOutConfirmService extends IService<BusinessFsOutConfirm> {
26
+
27
+    /**
28
+    *通过合同id获取带出数据
29
+    *
30
+    *@author hjc
31
+    *@date 2024/7/23 16:37
32
+    */
33
+    GetFsOutConfirmByContractVO getByContractId(String id);
34
+
35
+    /**
36
+    *获取销售合同编号
37
+    *
38
+    *@author hjc
39
+    *@date 2024/7/23 16:55
40
+    */
41
+    List<BusinessContract> getContractData(Integer orgId);
42
+
43
+    /**
44
+    *出库验收确认详情
45
+    *
46
+    *@author hjc
47
+    *@date 2024/7/24 9:12
48
+    */
49
+    BusinessFsOutConfirmDetailVO getDataById(String id);
50
+
51
+    /**
52
+    *出库验收确认删除
53
+    *
54
+    *@author hjc
55
+    *@date 2024/7/24 10:42
56
+    */
57
+    int deleteData(Integer id);
58
+
59
+    /**
60
+    *出库验收确认新增
61
+    *
62
+    *@author hjc
63
+    *@date 2024/7/24 11:09
64
+    */
65
+    int saveData(BusinessFsOutConfirmAddParam param);
66
+
67
+    /**
68
+    *出库验收确认修改
69
+    *
70
+    *@author hjc
71
+    *@date 2024/7/24 11:18
72
+    */
73
+    int updateData(BusinessFsOutConfirmUpdateParam param);
74
+
75
+    /**
76
+    *查询 出库验收确认 信息列表
77
+    *
78
+    *@author hjc
79
+    *@date 2024/7/24 11:25
80
+    */
81
+    Page<BusinessFsOutConfirmPageVO> getList(BusinessFsOutConfirmPageParam pageParam);
82
+}

+ 19 - 8
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsInConfirmServiceImpl.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.intelligent.financialSupervision.service.impl;
2 2
 
3 3
 import cn.hutool.core.collection.CollectionUtil;
4
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 5
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
5 6
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 7
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -12,7 +13,6 @@ import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInCo
12 13
 import com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsInConfirmMapper;
13 14
 import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInConfirmContractItem;
14 15
 import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessStoreWareDetail;
15
-import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsAccountUpdateParam;
16 16
 import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmAddParam;
17 17
 import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmPageParam;
18 18
 import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmUpdateParam;
@@ -75,6 +75,19 @@ public class BusinessFsInConfirmServiceImpl extends ServiceImpl<BusinessFsInConf
75 75
 
76 76
     }
77 77
 
78
+    /**
79
+     *获取采购合同编号
80
+     *
81
+     *@author hjc
82
+     *@date 2024/7/24 17:52
83
+     */
84
+    @Override
85
+    public List<BusinessContract> getContractData(Integer orgId) {
86
+        return businessContractMapper.selectList(new LambdaQueryWrapper<BusinessContract>()
87
+                .eq(BusinessContract::getAuditState, 2)
88
+                .eq(BusinessContract::getContractType, "3147")
89
+                .eq(BusinessContract::getOrgId, orgId));
90
+    }
78 91
 
79 92
     /**
80 93
      * 通过合同id获取带出数据
@@ -102,7 +115,8 @@ public class BusinessFsInConfirmServiceImpl extends ServiceImpl<BusinessFsInConf
102 115
         //获取合同详情信息
103 116
         List<BusinessStoreWareDetail> storeWareDetailList = businessStoreWareDetailMapper.selectList(
104 117
                 Wrappers.lambdaQuery(BusinessStoreWareDetail.class)
105
-                        .eq(BusinessStoreWareDetail::getZid, id));
118
+                        .eq(BusinessStoreWareDetail::getZid, id)
119
+                        .eq(BusinessStoreWareDetail::getType, "contract"));
106 120
 
107 121
         List<BusinessStoreWareDetailVO> storeWareDetailVOList = new ArrayList<>();
108 122
 
@@ -130,13 +144,10 @@ public class BusinessFsInConfirmServiceImpl extends ServiceImpl<BusinessFsInConf
130 144
                     sum = 0.0;
131 145
                 }
132 146
                 //用总的减去填写的数量
133
-                double num = 0;
134
-                if (businessStoreWareDetail.getInCount() != null) {
135
-                    num = Double.parseDouble(businessStoreWareDetail.getInCount()) - sum;
136
-                } else {
137
-                    businessStoreWareDetail.setInCount("0.0");
138
-                    num = Double.parseDouble(businessStoreWareDetail.getInCount()) - sum;
147
+                if (businessStoreWareDetail.getOutCount() == null){
148
+                    businessStoreWareDetail.setOutCount("0.0");
139 149
                 }
150
+                double num =Double.parseDouble(businessStoreWareDetail.getOutCount()) - sum;
140 151
 
141 152
                 if (num <= 0) {
142 153
                     storeWareDetailVO.setInCount("0.0");

+ 144 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsInterestMaintainServiceImpl.java

@@ -0,0 +1,144 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service.impl;
2
+
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
6
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
7
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
8
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInterestMaintain;
9
+import com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsInterestMaintainMapper;
10
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInConfirmPageParam;
11
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInterestMaintainPageParam;
12
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsInterestMaintainParam;
13
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsInterestMaintainService;
14
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
15
+import com.chinaitop.depot.intelligent.utils.OrderNumberUtil;
16
+import org.springframework.beans.BeanUtils;
17
+import org.springframework.beans.factory.annotation.Autowired;
18
+import org.springframework.stereotype.Service;
19
+
20
+import java.util.Date;
21
+import java.util.List;
22
+
23
+/**
24
+ * <p>
25
+ * 财务监管-利息维护 服务实现类
26
+ * </p>
27
+ *
28
+ * @author root
29
+ * @since 2024-07-23
30
+ */
31
+@Service
32
+public class BusinessFsInterestMaintainServiceImpl extends ServiceImpl<BusinessFsInterestMaintainMapper, BusinessFsInterestMaintain> implements BusinessFsInterestMaintainService {
33
+
34
+    @Autowired
35
+    private BusinessFsInterestMaintainMapper businessFsInterestMaintainMapper;
36
+
37
+    /**
38
+     * 查询 利息维护 信息列表
39
+     *
40
+     * @author hjc
41
+     * @date 2024/7/23 14:41
42
+     */
43
+    @Override
44
+    public Page<BusinessFsInterestMaintain> getList(BusinessFsInterestMaintainPageParam pageParam) {
45
+
46
+        Page<BusinessFsInterestMaintain> page = new Page<>(pageParam.getPageNum(), pageParam.getPageSize());
47
+
48
+        LambdaQueryWrapper<BusinessFsInterestMaintain> wrapper = new LambdaQueryWrapper<>();
49
+        wrapper.eq(BusinessFsInterestMaintain::getOrgId, pageParam.getOrgId());
50
+        if (StringUtils.isNotBlank(pageParam.getInterestBillNo())) {
51
+            wrapper.like(BusinessFsInterestMaintain::getInterestBillNo, pageParam.getInterestBillNo());
52
+        }
53
+        wrapper.orderByDesc(BusinessFsInterestMaintain::getCreatedate);
54
+        Page<BusinessFsInterestMaintain> maintainPage = businessFsInterestMaintainMapper.selectPage(page, wrapper);
55
+        List<BusinessFsInterestMaintain> records = maintainPage.getRecords();
56
+        if (CollectionUtil.isNotEmpty(records)){
57
+            for (BusinessFsInterestMaintain maintain : records) {
58
+
59
+                if (maintain.getMonth()>=10){
60
+                    String yearAndMonth = maintain.getYear()+"-"+maintain.getMonth();
61
+                    maintain.setYearAndMonth(yearAndMonth);
62
+                }
63
+                if (maintain.getMonth()<10){
64
+                    String yearAndMonth = maintain.getYear()+"-0"+maintain.getMonth();
65
+                    maintain.setYearAndMonth(yearAndMonth);
66
+                }
67
+
68
+            }
69
+        }
70
+      return maintainPage;
71
+
72
+
73
+    }
74
+
75
+    /**
76
+     * 利息维护新增
77
+     *
78
+     * @author hjc
79
+     * @date 2024/7/23 14:58
80
+     */
81
+    @Override
82
+    public int saveData(BusinessFsInterestMaintainParam param) {
83
+
84
+        String interestBillNo = businessFsInterestMaintainMapper.selectNum();
85
+        String s = OrderNumberUtil.initNum("LXDH", 3, interestBillNo);
86
+        BusinessFsInterestMaintain businessFsInterestMaintain = new BusinessFsInterestMaintain();
87
+        BeanUtils.copyProperties(param, businessFsInterestMaintain);
88
+
89
+        businessFsInterestMaintain.setInterestBillNo(s);
90
+        businessFsInterestMaintain.setCreatedate(new Date());
91
+
92
+        return businessFsInterestMaintainMapper.insert(businessFsInterestMaintain);
93
+    }
94
+
95
+    /**
96
+     * 利息维护修改
97
+     *
98
+     * @author hjc
99
+     * @date 2024/7/23 14:59
100
+     */
101
+    @Override
102
+    public int updateData(BusinessFsInterestMaintainParam param) {
103
+
104
+        BusinessFsInterestMaintain businessFsInterestMaintain = new BusinessFsInterestMaintain();
105
+        BeanUtils.copyProperties(param, businessFsInterestMaintain);
106
+
107
+        businessFsInterestMaintain.setUpdatedate(new Date());
108
+
109
+        return businessFsInterestMaintainMapper.updateById(businessFsInterestMaintain);
110
+    }
111
+
112
+    /**
113
+    *利息维护删除
114
+    *
115
+    *@author hjc
116
+    *@date 2024/7/23 15:12
117
+    */
118
+    @Override
119
+    public int deleteData(Integer id) {
120
+        return businessFsInterestMaintainMapper.deleteById(id);
121
+    }
122
+
123
+    /**
124
+     *利息维护详情
125
+     *
126
+     *@author hjc
127
+     *@date 2024/7/23 15:32
128
+     */
129
+    @Override
130
+    public BusinessFsInterestMaintain getDataById(String id) {
131
+
132
+        BusinessFsInterestMaintain maintain = businessFsInterestMaintainMapper.selectById(id);
133
+
134
+        if (maintain.getMonth()>=10){
135
+            String yearAndMonth = maintain.getYear()+"-"+maintain.getMonth();
136
+            maintain.setYearAndMonth(yearAndMonth);
137
+        }
138
+        if (maintain.getMonth()<10){
139
+            String yearAndMonth = maintain.getYear()+"-0"+maintain.getMonth();
140
+            maintain.setYearAndMonth(yearAndMonth);
141
+        }
142
+        return maintain;
143
+    }
144
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsOutConfirmContractItemServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmContractItem;
4
+import com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsOutConfirmContractItemMapper;
5
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsOutConfirmContractItemService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-出库验收确认-合同元素 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-23
16
+ */
17
+@Service
18
+public class BusinessFsOutConfirmContractItemServiceImpl extends ServiceImpl<BusinessFsOutConfirmContractItemMapper, BusinessFsOutConfirmContractItem> implements BusinessFsOutConfirmContractItemService {
19
+
20
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsOutConfirmDiffPriceItemServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
4
+import com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsOutConfirmDiffPriceItemMapper;
5
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsOutConfirmDiffPriceItemService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-出库验收确认-差额上缴元素 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-23
16
+ */
17
+@Service
18
+public class BusinessFsOutConfirmDiffPriceItemServiceImpl extends ServiceImpl<BusinessFsOutConfirmDiffPriceItemMapper, BusinessFsOutConfirmDiffPriceItem> implements BusinessFsOutConfirmDiffPriceItemService {
19
+
20
+}

+ 398 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/service/impl/BusinessFsOutConfirmServiceImpl.java

@@ -0,0 +1,398 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.service.impl;
2
+
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
6
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
7
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
8
+import com.chinaitop.depot.intelligent.basicData.mapper.BasicStorehouseMapper;
9
+import com.chinaitop.depot.intelligent.basicData.model.BasicStorehouse;
10
+import com.chinaitop.depot.intelligent.basicData.param.StorehouseAndLqVO;
11
+import com.chinaitop.depot.intelligent.financialSupervision.mapper.*;
12
+import com.chinaitop.depot.intelligent.financialSupervision.model.*;
13
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsOutConfirmAddParam;
14
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsOutConfirmPageParam;
15
+import com.chinaitop.depot.intelligent.financialSupervision.param.BusinessFsOutConfirmUpdateParam;
16
+import com.chinaitop.depot.intelligent.financialSupervision.service.BusinessFsOutConfirmService;
17
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
18
+import com.chinaitop.depot.intelligent.financialSupervision.vo.*;
19
+import com.chinaitop.depot.intelligent.grainReserves.mapper.BasicEnumMapper;
20
+import com.chinaitop.depot.intelligent.grainReserves.mapper.BasicWarehouseMapper;
21
+import com.chinaitop.depot.intelligent.grainReserves.model.BasicEnum;
22
+import com.chinaitop.depot.intelligent.grainReserves.model.BasicWarehouse;
23
+import com.chinaitop.depot.intelligent.utils.OrderNumberUtil;
24
+import org.springframework.beans.BeanUtils;
25
+import org.springframework.beans.factory.annotation.Autowired;
26
+import org.springframework.stereotype.Service;
27
+import org.springframework.transaction.annotation.Transactional;
28
+
29
+import java.math.BigDecimal;
30
+import java.util.*;
31
+import java.util.stream.Collectors;
32
+
33
+/**
34
+ * <p>
35
+ * 财务监管-销售收入上缴-出库验收确认 服务实现类
36
+ * </p>
37
+ *
38
+ * @author root
39
+ * @since 2024-07-23
40
+ */
41
+@Service
42
+public class BusinessFsOutConfirmServiceImpl extends ServiceImpl<BusinessFsOutConfirmMapper, BusinessFsOutConfirm> implements BusinessFsOutConfirmService {
43
+
44
+    @Autowired
45
+    private BusinessFsOutConfirmMapper businessFsOutConfirmMapper;
46
+
47
+    @Autowired
48
+    private BusinessContractMapper businessContractMapper;
49
+
50
+    @Autowired
51
+    private BasicEnumMapper basicEnumMapper;
52
+
53
+    @Autowired
54
+    private BusinessStoreWareDetailMapper businessStoreWareDetailMapper;
55
+
56
+    @Autowired
57
+    private BusinessFsOutConfirmContractItemMapper businessFsOutConfirmContractItemMapper;
58
+
59
+    @Autowired
60
+    private BusinessFsOutConfirmDiffPriceItemMapper businessFsOutConfirmDiffPriceItemMapper;
61
+
62
+    @Autowired
63
+    private BasicStorehouseMapper basicStorehouseMapper;
64
+
65
+    @Autowired
66
+    private BasicWarehouseMapper basicWarehouseMapper;
67
+
68
+    /**
69
+     * 获取销售合同编号
70
+     *
71
+     * @author hjc
72
+     * @date 2024/7/23 16:56
73
+     */
74
+    @Override
75
+    public List<BusinessContract> getContractData(Integer orgId) {
76
+        return businessContractMapper.selectList(new LambdaQueryWrapper<BusinessContract>()
77
+                .eq(BusinessContract::getAuditState, 2)
78
+                .eq(BusinessContract::getContractType, "3148")
79
+                .eq(BusinessContract::getOrgId, orgId));
80
+    }
81
+
82
+    /**
83
+     * 通过合同id获取带出数据
84
+     *
85
+     * @author hjc
86
+     * @date 2024/7/23 16:37
87
+     */
88
+    @Override
89
+    public GetFsOutConfirmByContractVO getByContractId(String id) {
90
+
91
+        GetFsOutConfirmByContractVO vo = new GetFsOutConfirmByContractVO();
92
+        //获取合同信息
93
+        BusinessContract businessContract = businessContractMapper.selectById(id);
94
+        if (ObjectUtils.isNotEmpty(businessContract)) {
95
+            vo.setContractNumber(businessContract.getContractNumber());
96
+            vo.setContractTitle(businessContract.getContractTitle());
97
+            vo.setPurchaseUnit(businessContract.getPurchaseUnit());
98
+            BasicEnum basicEnum = basicEnumMapper.selectById(businessContract.getContractType());
99
+            if (ObjectUtils.isNotEmpty(basicEnum)) {
100
+                vo.setContractType(basicEnum.getEnumname());
101
+            }
102
+
103
+        }
104
+        //获取合同详情信息
105
+        List<BusinessStoreWareDetail> storeWareDetailList = businessStoreWareDetailMapper.selectList(
106
+                Wrappers.lambdaQuery(BusinessStoreWareDetail.class)
107
+                        .eq(BusinessStoreWareDetail::getZid, id)
108
+                        .eq(BusinessStoreWareDetail::getType, "contract"));
109
+
110
+        List<BusinessStoreWareDetailDataVO> storeWareDetailVOList = new ArrayList<>();
111
+
112
+        if (CollectionUtil.isNotEmpty(storeWareDetailList)) {
113
+            for (BusinessStoreWareDetail businessStoreWareDetail : storeWareDetailList) {
114
+                BusinessStoreWareDetailDataVO storeWareDetailVO = new BusinessStoreWareDetailDataVO();
115
+
116
+                storeWareDetailVO.setId(businessStoreWareDetail.getId());
117
+                //获取仓房
118
+                BasicEnum houseInfo = basicEnumMapper.selectById(businessStoreWareDetail.getHouseId());
119
+                if (ObjectUtils.isNotEmpty(houseInfo)) {
120
+                    storeWareDetailVO.setBasicStorehouseId(businessStoreWareDetail.getHouseId());
121
+                    storeWareDetailVO.setBasicStorehouseName(houseInfo.getEnumname());
122
+                }
123
+
124
+                //获取货位
125
+                BasicEnum warehouse = basicEnumMapper.selectById(businessStoreWareDetail.getWarehouseId());
126
+                if (ObjectUtils.isNotEmpty(warehouse)) {
127
+                    storeWareDetailVO.setWarehouseId(businessStoreWareDetail.getWarehouseId());
128
+                    storeWareDetailVO.setWarehouseName(warehouse.getEnumname());
129
+                }
130
+
131
+                //获取品种
132
+                BasicEnum grainKind = basicEnumMapper.selectById(businessStoreWareDetail.getGrainKind());
133
+                if (ObjectUtils.isNotEmpty(grainKind)) {
134
+                    storeWareDetailVO.setGrainVarietyId(businessStoreWareDetail.getGrainKind());
135
+                    storeWareDetailVO.setGrainVarietyName(grainKind.getEnumname());
136
+                }
137
+                //获取性质
138
+                BasicEnum grainAttribute = basicEnumMapper.selectById(businessStoreWareDetail.getGrainAttribute());
139
+                if (ObjectUtils.isNotEmpty(grainAttribute)) {
140
+                    storeWareDetailVO.setGrainNatureId(businessStoreWareDetail.getGrainAttribute());
141
+                    storeWareDetailVO.setGrainNatureName(grainAttribute.getEnumname());
142
+                }
143
+
144
+                //销售合同使用轮出价格,数量和总价
145
+                storeWareDetailVO.setSettlePrice(businessStoreWareDetail.getOutPrice() == null ? "0.0" : businessStoreWareDetail.getOutPrice());
146
+
147
+                //获取保存的确认单数量
148
+                Double sum = businessFsOutConfirmMapper.selectSum(id, businessStoreWareDetail.getGrainKind(), businessStoreWareDetail.getGrainAttribute());
149
+                if (sum == null) {
150
+                    sum = 0.0;
151
+                }
152
+                //用总的减去填写的数量
153
+                if (businessStoreWareDetail.getOutCount() == null) {
154
+                    businessStoreWareDetail.setOutCount("0.0");
155
+                }
156
+                double num = Double.parseDouble(businessStoreWareDetail.getOutCount()) - sum;
157
+
158
+                if (num <= 0) {
159
+                    storeWareDetailVO.setSettleQuantity("0.0");
160
+                    storeWareDetailVOList.add(storeWareDetailVO);
161
+                } else {
162
+                    storeWareDetailVO.setSettleQuantity(Double.toString(num));
163
+                    storeWareDetailVOList.add(storeWareDetailVO);
164
+                }
165
+            }
166
+        }
167
+
168
+
169
+        List<BusinessStoreWareDetailDataVO> list = new ArrayList<>();
170
+
171
+        //通过仓房,货位,品种,性质进行汇总
172
+        Map<String, List<BusinessStoreWareDetailDataVO>> collect =
173
+                storeWareDetailVOList.stream().collect(Collectors.groupingBy(this::fetchGroupKey));
174
+
175
+
176
+        Set<Map.Entry<String, List<BusinessStoreWareDetailDataVO>>> entries = collect.entrySet();
177
+
178
+        for (Map.Entry<String, List<BusinessStoreWareDetailDataVO>> entry : entries) {
179
+            int sum = 0;
180
+            List<BusinessStoreWareDetailDataVO> value = entry.getValue();
181
+            List<String> collect1 = value.stream().map(BusinessStoreWareDetailDataVO::getSettleQuantity).collect(Collectors.toList());
182
+            for (String s : collect1) {
183
+                sum += Double.parseDouble(s);
184
+            }
185
+            BusinessStoreWareDetailDataVO storeWareDetailVO = value.get(0);
186
+            storeWareDetailVO.setSettleQuantity(String.valueOf(sum));
187
+            list.add(storeWareDetailVO);
188
+        }
189
+
190
+
191
+        vo.setStoreWareDetailDataVOList(list);
192
+
193
+        return vo;
194
+
195
+
196
+    }
197
+
198
+
199
+    private String fetchGroupKey(BusinessStoreWareDetailDataVO vo) {
200
+        return vo.getBasicStorehouseId() + "_" + vo.getWarehouseId() + "_" + vo.getGrainVarietyId() + "_" + vo.getGrainNatureId();
201
+    }
202
+
203
+    /**
204
+     * 出库验收确认详情
205
+     *
206
+     * @author hjc
207
+     * @date 2024/7/24 9:46
208
+     */
209
+    @Override
210
+    public BusinessFsOutConfirmDetailVO getDataById(String id) {
211
+
212
+        BusinessFsOutConfirmDetailVO vo = new BusinessFsOutConfirmDetailVO();
213
+
214
+        //通过id获取确认单
215
+        BusinessFsOutConfirm businessFsOutConfirm = businessFsOutConfirmMapper.selectById(id);
216
+        BeanUtils.copyProperties(businessFsOutConfirm, vo);
217
+
218
+        //获取合同
219
+        BusinessContract businessContract = businessContractMapper.selectById(businessFsOutConfirm.getContractId());
220
+        BeanUtils.copyProperties(businessContract, vo);
221
+        if (ObjectUtils.isNotEmpty(businessContract)){
222
+
223
+            BasicEnum basicEnum = basicEnumMapper.selectById(businessContract.getContractType());
224
+            vo.setContractType(basicEnum.getEnumname());
225
+        }
226
+
227
+        //通过确认单获取合同信息
228
+        List<BusinessFsOutConfirmContractItem> businessFsOutConfirmContractItemList = businessFsOutConfirmContractItemMapper.selectList(new LambdaQueryWrapper<BusinessFsOutConfirmContractItem>()
229
+                .eq(BusinessFsOutConfirmContractItem::getFsOutConfirmId, businessFsOutConfirm.getId()));
230
+        List<BusinessStoreWareDetailDataVO> listVO = new ArrayList<>();
231
+        if (CollectionUtil.isNotEmpty(businessFsOutConfirmContractItemList)) {
232
+            for (BusinessFsOutConfirmContractItem businessFsOutConfirmContractItem : businessFsOutConfirmContractItemList) {
233
+
234
+                BusinessStoreWareDetailDataVO storeWareDetailVO = new BusinessStoreWareDetailDataVO();
235
+                storeWareDetailVO.setId(businessFsOutConfirmContractItem.getId());
236
+                storeWareDetailVO.setSettleQuantity(String.valueOf(businessFsOutConfirmContractItem.getSettleQuantity()));
237
+                storeWareDetailVO.setSettlePrice(String.valueOf(businessFsOutConfirmContractItem.getSettlePrice()));
238
+                storeWareDetailVO.setSettleAmount(String.valueOf(businessFsOutConfirmContractItem.getSettleAmount()));
239
+
240
+                //设置仓房货位品种性质
241
+                BasicStorehouse basicStorehouse = basicStorehouseMapper.selectById(businessFsOutConfirmContractItem.getBasicStorehouseId());
242
+                if (ObjectUtils.isNotEmpty(basicStorehouse)) {
243
+                    storeWareDetailVO.setBasicStorehouseId(businessFsOutConfirmContractItem.getBasicStorehouseId());
244
+                    storeWareDetailVO.setBasicStorehouseName(basicStorehouse.getStorehouseName());
245
+                }
246
+
247
+                BasicWarehouse basicWarehouse = basicWarehouseMapper.selectById(businessFsOutConfirmContractItem.getWarehouseId());
248
+                if (ObjectUtils.isNotEmpty(basicWarehouse)) {
249
+                    storeWareDetailVO.setWarehouseId(businessFsOutConfirmContractItem.getWarehouseId());
250
+                    storeWareDetailVO.setWarehouseName(basicWarehouse.getWarehouseName());
251
+                }
252
+
253
+                BasicEnum grainVariety = basicEnumMapper.selectById(businessFsOutConfirmContractItem.getGrainVarietyId());
254
+                if (ObjectUtils.isNotEmpty(grainVariety)) {
255
+                    storeWareDetailVO.setGrainVarietyName(grainVariety.getEnumname());
256
+                    storeWareDetailVO.setGrainVarietyId(businessFsOutConfirmContractItem.getGrainVarietyId());
257
+                }
258
+                BasicEnum grainNature = basicEnumMapper.selectById(businessFsOutConfirmContractItem.getGrainNatureId());
259
+                if (ObjectUtils.isNotEmpty(grainNature)) {
260
+                    storeWareDetailVO.setGrainNatureId(businessFsOutConfirmContractItem.getGrainNatureId());
261
+                    storeWareDetailVO.setGrainNatureName(grainNature.getEnumname());
262
+                }
263
+                listVO.add(storeWareDetailVO);
264
+
265
+            }
266
+        }
267
+        vo.setStoreWareDetailDataVOList(listVO);
268
+
269
+        List<BusinessFsOutConfirmDiffPriceItem> fsOutConfirmDiffPriceItemList = businessFsOutConfirmDiffPriceItemMapper.selectList(new LambdaQueryWrapper<BusinessFsOutConfirmDiffPriceItem>()
270
+                .eq(BusinessFsOutConfirmDiffPriceItem::getFsOutConfirmId, businessFsOutConfirm.getId()));
271
+        if (CollectionUtil.isNotEmpty(fsOutConfirmDiffPriceItemList)) {
272
+            vo.setFsOutConfirmDiffPriceItemList(fsOutConfirmDiffPriceItemList);
273
+        }
274
+
275
+        return vo;
276
+
277
+    }
278
+
279
+    /**
280
+     * 出库验收确认删除
281
+     *
282
+     * @author hjc
283
+     * @date 2024/7/24 10:42
284
+     */
285
+    @Transactional
286
+    @Override
287
+    public int deleteData(Integer id) {
288
+        //删除三张表数据
289
+        businessFsOutConfirmMapper.deleteById(id);
290
+        businessFsOutConfirmContractItemMapper.delete(new LambdaQueryWrapper<BusinessFsOutConfirmContractItem>()
291
+                .eq(BusinessFsOutConfirmContractItem::getFsOutConfirmId, id));
292
+        return businessFsOutConfirmDiffPriceItemMapper.delete(new LambdaQueryWrapper<BusinessFsOutConfirmDiffPriceItem>()
293
+                .eq(BusinessFsOutConfirmDiffPriceItem::getFsOutConfirmId, id));
294
+    }
295
+
296
+
297
+    /**
298
+     * 出库验收确认新增
299
+     *
300
+     * @author hjc
301
+     * @date 2024/7/24 11:09
302
+     */
303
+    @Transactional
304
+    @Override
305
+    public int saveData(BusinessFsOutConfirmAddParam param) {
306
+        //保存主表
307
+        String outboundConfirmationNumber = businessFsOutConfirmMapper.selectOutboundConfirmationNumber();
308
+        String s = OrderNumberUtil.initNum("CKQRD", 3, outboundConfirmationNumber);
309
+        BusinessFsOutConfirm businessFsOutConfirm = new BusinessFsOutConfirm();
310
+        BeanUtils.copyProperties(param, businessFsOutConfirm);
311
+        businessFsOutConfirm.setCreatedate(new Date());
312
+        businessFsOutConfirm.setUpdatedate(new Date());
313
+        businessFsOutConfirm.setOutboundConfirmationNumber(s);
314
+        businessFsOutConfirmMapper.insert(businessFsOutConfirm);
315
+
316
+        //保存合同表
317
+        List<BusinessFsOutConfirmContractItem> fsOutConfirmContractItemList = param.getFsOutConfirmContractItemList();
318
+        if (CollectionUtil.isNotEmpty(fsOutConfirmContractItemList)) {
319
+            for (BusinessFsOutConfirmContractItem businessFsOutConfirmContractItem : fsOutConfirmContractItemList) {
320
+                businessFsOutConfirmContractItem.setCreatedate(new Date());
321
+                businessFsOutConfirmContractItem.setUpdatedate(new Date());
322
+                businessFsOutConfirmContractItem.setFsOutConfirmId(businessFsOutConfirm.getId());
323
+                businessFsOutConfirmContractItemMapper.insert(businessFsOutConfirmContractItem);
324
+            }
325
+
326
+        }
327
+        //保存差价上缴
328
+        List<BusinessFsOutConfirmDiffPriceItem> fsOutConfirmDiffPriceItemList = param.getFsOutConfirmDiffPriceItemList();
329
+        if (CollectionUtil.isNotEmpty(fsOutConfirmDiffPriceItemList)) {
330
+            for (BusinessFsOutConfirmDiffPriceItem businessFsOutConfirmDiffPriceItem : fsOutConfirmDiffPriceItemList) {
331
+                businessFsOutConfirmDiffPriceItem.setCreatedate(new Date());
332
+                businessFsOutConfirmDiffPriceItem.setUpdatedate(new Date());
333
+                businessFsOutConfirmDiffPriceItem.setFsOutConfirmId(businessFsOutConfirm.getId());
334
+                businessFsOutConfirmDiffPriceItemMapper.insert(businessFsOutConfirmDiffPriceItem);
335
+            }
336
+        }
337
+
338
+        return 1;
339
+    }
340
+
341
+    /**
342
+     * 出库验收确认修改
343
+     *
344
+     * @author hjc
345
+     * @date 2024/7/24 11:18
346
+     */
347
+    @Transactional
348
+    @Override
349
+    public int updateData(BusinessFsOutConfirmUpdateParam param) {
350
+
351
+        //修改主表
352
+        BusinessFsOutConfirm businessFsOutConfirm = new BusinessFsOutConfirm();
353
+        BeanUtils.copyProperties(param, businessFsOutConfirm);
354
+        businessFsOutConfirm.setUpdatedate(new Date());
355
+        businessFsOutConfirmMapper.updateById(businessFsOutConfirm);
356
+
357
+        //删除合同和差价上缴
358
+        businessFsOutConfirmContractItemMapper.delete(new LambdaQueryWrapper<BusinessFsOutConfirmContractItem>()
359
+                .eq(BusinessFsOutConfirmContractItem::getFsOutConfirmId, param.getId()));
360
+        businessFsOutConfirmDiffPriceItemMapper.delete(new LambdaQueryWrapper<BusinessFsOutConfirmDiffPriceItem>()
361
+                .eq(BusinessFsOutConfirmDiffPriceItem::getFsOutConfirmId, param.getId()));
362
+
363
+
364
+        //保存合同表
365
+        List<BusinessFsOutConfirmContractItem> fsOutConfirmContractItemList = param.getFsOutConfirmContractItemList();
366
+        if (CollectionUtil.isNotEmpty(fsOutConfirmContractItemList)) {
367
+            for (BusinessFsOutConfirmContractItem businessFsOutConfirmContractItem : fsOutConfirmContractItemList) {
368
+                businessFsOutConfirmContractItem.setUpdatedate(new Date());
369
+                businessFsOutConfirmContractItem.setFsOutConfirmId(param.getId());
370
+                businessFsOutConfirmContractItemMapper.insert(businessFsOutConfirmContractItem);
371
+            }
372
+
373
+        }
374
+        //保存差价上缴
375
+        List<BusinessFsOutConfirmDiffPriceItem> fsOutConfirmDiffPriceItemList = param.getFsOutConfirmDiffPriceItemList();
376
+        if (CollectionUtil.isNotEmpty(fsOutConfirmDiffPriceItemList)) {
377
+            for (BusinessFsOutConfirmDiffPriceItem businessFsOutConfirmDiffPriceItem : fsOutConfirmDiffPriceItemList) {
378
+                businessFsOutConfirmDiffPriceItem.setUpdatedate(new Date());
379
+                businessFsOutConfirmDiffPriceItem.setFsOutConfirmId(param.getId());
380
+                businessFsOutConfirmDiffPriceItemMapper.insert(businessFsOutConfirmDiffPriceItem);
381
+            }
382
+        }
383
+        return 1;
384
+
385
+    }
386
+
387
+    /**
388
+     * 查询 出库验收确认 信息列表
389
+     *
390
+     * @author hjc
391
+     * @date 2024/7/24 11:25
392
+     */
393
+    @Override
394
+    public Page<BusinessFsOutConfirmPageVO> getList(BusinessFsOutConfirmPageParam pageParam) {
395
+        Page<BusinessFsOutConfirmPageVO> page = new Page<>(pageParam.getPageNum(), pageParam.getPageSize());
396
+        return businessFsOutConfirmMapper.selectMyPage(page, pageParam.getContractNumber(),pageParam.getOrgId());
397
+    }
398
+}

+ 42 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessFsOutConfirmDetailVO.java

@@ -0,0 +1,42 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.vo;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInConfirm;
5
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirm;
6
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
7
+import com.fasterxml.jackson.annotation.JsonFormat;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+
11
+import java.util.Date;
12
+import java.util.List;
13
+
14
+/**
15
+ * @author hjc
16
+ * @date 2024/7/24 09:11
17
+ */
18
+@Data
19
+public class BusinessFsOutConfirmDetailVO extends BusinessFsOutConfirm{
20
+
21
+    @ApiModelProperty(value = "合同编号")
22
+    private String contractNumber;
23
+
24
+    @ApiModelProperty(value = "合同名称")
25
+    private String contractTitle;
26
+
27
+    @ApiModelProperty(value = "合同类型")
28
+    private String contractType;
29
+
30
+    @ApiModelProperty(value = "销往单位")
31
+    private String purchaseUnit;
32
+
33
+
34
+    @ApiModelProperty(value = "合同详情")
35
+    private List<BusinessStoreWareDetailDataVO> storeWareDetailDataVOList;
36
+
37
+
38
+    @ApiModelProperty(value = "差价上缴")
39
+    private List<BusinessFsOutConfirmDiffPriceItem> fsOutConfirmDiffPriceItemList;
40
+
41
+
42
+}

+ 35 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessFsOutConfirmPageVO.java

@@ -0,0 +1,35 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.vo;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Data;
6
+
7
+import java.util.Date;
8
+
9
+/**
10
+ * @author hjc
11
+ * @date 2024/7/23 15:47
12
+ */
13
+@Data
14
+public class BusinessFsOutConfirmPageVO {
15
+
16
+
17
+    @ApiModelProperty(value = "主键ID")
18
+    private Integer id;
19
+
20
+    @ApiModelProperty(value = "合同编号")
21
+    private String contractNumber;
22
+
23
+    @ApiModelProperty(value = "数量")
24
+    private String totalNum;
25
+
26
+    @ApiModelProperty(value = "金额")
27
+    private String totalPrice;
28
+
29
+    @ApiModelProperty(value = "确认数量")
30
+    private String confirmNum;
31
+
32
+    @ApiModelProperty(value = "创建日期")
33
+    private Date createdate;
34
+
35
+}

+ 48 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessStoreWareDetailDataVO.java

@@ -0,0 +1,48 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.vo;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Data;
5
+
6
+/**
7
+ * @author hjc
8
+ * @date 2024/7/4 14:07
9
+ */
10
+@Data
11
+public class BusinessStoreWareDetailDataVO {
12
+
13
+    @ApiModelProperty(value = "basic_storehouse的id;仓房id")
14
+    private Integer basicStorehouseId;
15
+
16
+    @ApiModelProperty(value = "仓房名称")
17
+    private String basicStorehouseName;
18
+
19
+    @ApiModelProperty(value = "basic_warehouse的id;货位id;")
20
+    private Integer warehouseId;
21
+
22
+    @ApiModelProperty(value = "货位名称")
23
+    private String warehouseName;
24
+
25
+    @ApiModelProperty(value = "粮油品种id;basic_enum的id;")
26
+    private Integer grainVarietyId;
27
+
28
+    @ApiModelProperty(value = "粮油品种名称")
29
+    private String grainVarietyName;
30
+
31
+    @ApiModelProperty(value = "粮油性质;basic_enum的id;")
32
+    private Integer grainNatureId;
33
+
34
+    @ApiModelProperty(value = "粮油性质名称")
35
+    private String grainNatureName;
36
+
37
+    @ApiModelProperty(value = "结算数量")
38
+    private String settleQuantity;
39
+
40
+    @ApiModelProperty(value = "结算价格")
41
+    private String settlePrice;
42
+
43
+    @ApiModelProperty(value = "结算金额")
44
+    private String settleAmount;
45
+
46
+    @ApiModelProperty(value = "合同详情id")
47
+    private Integer id;
48
+}

+ 12 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/BusinessStoreWareDetailVO.java

@@ -1,5 +1,6 @@
1 1
 package com.chinaitop.depot.intelligent.financialSupervision.vo;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3 4
 import io.swagger.annotations.ApiModelProperty;
4 5
 import lombok.Data;
5 6
 
@@ -10,6 +11,17 @@ import lombok.Data;
10 11
 @Data
11 12
 public class BusinessStoreWareDetailVO {
12 13
 
14
+    @ApiModelProperty(value = "basic_storehouse的id;仓房id")
15
+    private Integer houseId;
16
+
17
+    @ApiModelProperty(value = "仓房名称")
18
+    private String houseName;
19
+
20
+    @ApiModelProperty(value = "basic_warehouse的id;货位id;")
21
+    private Integer warehouseId;
22
+
23
+    @ApiModelProperty(value = "货位名称")
24
+    private String warehouseName;
13 25
 
14 26
     @ApiModelProperty(value = "粮油品种id;basic_enum的id;")
15 27
     private Integer grainKind;

+ 30 - 0
src/main/java/com/chinaitop/depot/intelligent/financialSupervision/vo/GetFsOutConfirmByContractVO.java

@@ -0,0 +1,30 @@
1
+package com.chinaitop.depot.intelligent.financialSupervision.vo;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Data;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * @author hjc
10
+ * @date 2024/7/23 16:41
11
+ */
12
+@Data
13
+public class GetFsOutConfirmByContractVO {
14
+
15
+    @ApiModelProperty(value = "合同编号")
16
+    private String contractNumber;
17
+
18
+    @ApiModelProperty(value = "合同名称")
19
+    private String contractTitle;
20
+
21
+    @ApiModelProperty(value = "合同类型")
22
+    private String contractType;
23
+
24
+    @ApiModelProperty(value = "销往单位")
25
+    private String purchaseUnit;
26
+
27
+
28
+    @ApiModelProperty(value = "合同详情")
29
+    private List<BusinessStoreWareDetailDataVO> storeWareDetailDataVOList;
30
+}

+ 122 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/controller/BusinessFsSaleRevenueController.java

@@ -0,0 +1,122 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.chinaitop.depot.intelligent.common.ResponseEntity;
6
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
7
+import com.chinaitop.depot.intelligent.priceApproval.model.*;
8
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.validation.annotation.Validated;
12
+import org.springframework.web.bind.annotation.*;
13
+
14
+import javax.annotation.Resource;
15
+import java.util.List;
16
+
17
+/**
18
+ * <p>
19
+ * 财务监管-销售收入上缴 前端控制器
20
+ * </p>
21
+ *
22
+ * @author root
23
+ * @since 2024-07-24
24
+ */
25
+@RestController
26
+@RequestMapping("/business-fs-sale-revenue")
27
+@Api(tags = "销售收入上缴")
28
+public class BusinessFsSaleRevenueController {
29
+    @Resource
30
+    private BusinessFsSaleRevenueService saleRevenueService;
31
+
32
+    @GetMapping("/getContractInfo/{orgId}")
33
+    @ApiOperation(value = "合同编号下拉", notes = "包含合同其它信息")
34
+    public ResponseEntity<List<BusinessContract>> getContractInfo(@PathVariable("orgId") Integer orgId) {
35
+        return ResponseEntity.ok(saleRevenueService.getContractInfo(orgId));
36
+    }
37
+
38
+    @GetMapping("/getContractInfoById/{id}")
39
+    @ApiOperation(value = "合同信息", notes = "合同编号下拉id")
40
+    public ResponseEntity<List<BusinessContractDetail>> getContractInfoList(@PathVariable("id") Integer id) {
41
+        return ResponseEntity.ok(saleRevenueService.getContractInfoList(id));
42
+    }
43
+
44
+    @GetMapping("/getConsistenceAccountInfo/{orgId}/{basicStorehouseId}/{warehouseId}")
45
+    @ApiOperation(value = "质检损益信息", notes = "质检损益信息")
46
+    public ResponseEntity<BusinessFsSaleRevenueInspectionLoss> getQualityInfo(@PathVariable("orgId") Integer orgId,
47
+                                                                                    @PathVariable("basicStorehouseId") Integer basicStorehouseId,
48
+                                                                                    @PathVariable("warehouseId") Integer warehouseId) {
49
+        return ResponseEntity.ok(saleRevenueService.getQualityInfo(orgId, basicStorehouseId, warehouseId));
50
+    }
51
+
52
+    @GetMapping("/getConsistenceAccountInfo/{contractNumber}")
53
+    @ApiOperation(value = "三账一致性-会计账", notes = "会计账")
54
+    public ResponseEntity<List<BusinessFsSaleRevenueThreeConsistenceAccount>> getConsistenceAccountInfo(@PathVariable("contractNumber") String contractNumber) {
55
+        return ResponseEntity.ok(saleRevenueService.getConsistenceAccountInfo(contractNumber));
56
+    }
57
+
58
+    @GetMapping("/getOutStorageInfo/{contractNumber}")
59
+    @ApiOperation(value = "三账一致性-实际出库情况", notes = "实际出库情况")
60
+    public ResponseEntity<List<BusinessFsSaleRevenueThreeConsistence>> getOutStorageInfo(@PathVariable("contractNumber") String contractNumber) {
61
+        return ResponseEntity.ok(saleRevenueService.getOutStorageInfo(contractNumber));
62
+    }
63
+
64
+    @GetMapping("/getOutStorageDetailed/{contractNumber}")
65
+    @ApiOperation(value = "三账一致性-出库明细", notes = "出库明细")
66
+    public ResponseEntity<List<DataCPZ>> getOutStorageDetailed(@PathVariable("contractNumber") String contractNumber) {
67
+        return ResponseEntity.ok(saleRevenueService.getOutStorageDetailed(contractNumber));
68
+    }
69
+
70
+    @GetMapping("/getSettlementInfo/{contractNumber}")
71
+    @ApiOperation(value = "结算信息", notes = "结算信息")
72
+    public ResponseEntity<List<BusinessFsSaleRevenueSettle>> getSettlementInfo(@PathVariable("contractNumber") String contractNumber) {
73
+        return ResponseEntity.ok(saleRevenueService.getSettlementInfo(contractNumber));
74
+    }
75
+
76
+    @GetMapping("/getDiffPriceInfo/{contractNumber}")
77
+    @ApiOperation(value = "差价上缴", notes = "差价上缴")
78
+    public ResponseEntity<List<BusinessFsSaleRevenueDiffPrice>> getDiffPriceInfo(@PathVariable("contractNumber") String contractNumber) {
79
+        return ResponseEntity.ok(saleRevenueService.getDiffPriceInfo(contractNumber));
80
+    }
81
+
82
+    @GetMapping("/getCardInfo/{orgId}/{basicStorehouseId}/{warehouseId}")
83
+    @ApiOperation(value = "原核定入库价格", notes = "原核定入库价格")
84
+    public ResponseEntity<BusinessFsSaleRevenueApprovalPrice> getCardInfo(@PathVariable("orgId") Integer orgId,
85
+                                                                     @PathVariable("basicStorehouseId") Integer basicStorehouseId,
86
+                                                                     @PathVariable("warehouseId") Integer warehouseId) {
87
+        return ResponseEntity.ok(saleRevenueService.getCardInfo(orgId, basicStorehouseId, warehouseId));
88
+    }
89
+
90
+    @PostMapping("/save")
91
+    @ApiOperation(value = "销售收入上缴新增", notes = "新增")
92
+    public ResponseEntity save(@Validated @RequestBody BusinessFsSaleRevenue param) {
93
+        saleRevenueService.saveData(param);
94
+        return ResponseEntity.ok();
95
+    }
96
+
97
+    @PostMapping("/details/{id}")
98
+    @ApiOperation(value = "销售收入上缴详情", notes = "详情")
99
+    public ResponseEntity details(@PathVariable("id") Integer id) {
100
+        return ResponseEntity.ok(saleRevenueService.detailsData(id));
101
+    }
102
+
103
+    @PostMapping("/update")
104
+    @ApiOperation(value = "销售收入上缴修改", notes = "修改")
105
+    public ResponseEntity update(@Validated @RequestBody BusinessFsSaleRevenue param) {
106
+        saleRevenueService.updateData(param);
107
+        return ResponseEntity.ok();
108
+    }
109
+
110
+    @GetMapping("/getPageList")
111
+    @ApiOperation(value = "分页列表", notes = "支持分页")
112
+    public ResponseEntity<Page<BusinessFsSaleRevenue>> getPageList(@Validated BusinessFsSaleRevenuePage param) {
113
+        return ResponseEntity.ok(saleRevenueService.selectPageList(param));
114
+    }
115
+
116
+    @PostMapping("/delete/{id}")
117
+    @ApiOperation(value = "销售收入上缴删除", notes = "删除")
118
+    public ResponseEntity delete(@PathVariable("id") Integer id) {
119
+        saleRevenueService.deleteData(id);
120
+        return ResponseEntity.ok();
121
+    }
122
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueApprovalPriceMapper.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueApprovalPrice;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-原核定入库价格 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueApprovalPriceMapper extends BaseMapper<BusinessFsSaleRevenueApprovalPrice> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueDiffPriceMapper.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueDiffPrice;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-差额上缴 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueDiffPriceMapper extends BaseMapper<BusinessFsSaleRevenueDiffPrice> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueInspectionLossMapper.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueInspectionLoss;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-质检损益信息 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueInspectionLossMapper extends BaseMapper<BusinessFsSaleRevenueInspectionLoss> {
15
+
16
+}

+ 54 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueMapper.java

@@ -0,0 +1,54 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
6
+import com.chinaitop.depot.intelligent.priceApproval.model.*;
7
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * <p>
15
+ * 财务监管-销售收入上缴 Mapper 接口
16
+ * </p>
17
+ *
18
+ * @author root
19
+ * @since 2024-07-24
20
+ */
21
+public interface BusinessFsSaleRevenueMapper extends BaseMapper<BusinessFsSaleRevenue> {
22
+
23
+    List<BusinessContract> getContractInfo(@Param("orgId") Integer orgId);
24
+
25
+    List<BusinessContractDetail> getContractInfoList(@Param("id") Integer id);
26
+
27
+    BusinessFsSaleRevenueInspectionLoss getQualityInfo(Map<String, Object> map);
28
+
29
+    List<BusinessFsSaleRevenueThreeConsistenceAccount> getConsistenceAccountInfo(@Param("contractNumber") String contractNumber);
30
+
31
+    List<BusinessFsSaleRevenueThreeConsistence> getOutStorageInfo(@Param("contractNumber") String contractNumber);
32
+
33
+    List<DataCPZ> getOutStorageDetailed(@Param("contractNumber") String contractNumber);
34
+
35
+    List<BusinessFsSaleRevenueSettle> getSettlementInfo(@Param("contractNumber") String contractNumber);
36
+
37
+    List<BusinessFsSaleRevenueDiffPrice> getDiffPriceInfo(@Param("contractNumber") String contractNumber);
38
+
39
+    BusinessFsSaleRevenueApprovalPrice getCardInfo(Map<String, Object> map);
40
+
41
+    List<BusinessFsSaleRevenueThreeConsistenceAccount> getConsistenceAccountDetailsInfo(@Param("id") Integer id);
42
+
43
+    List<BusinessFsSaleRevenueInspectionLoss> getQualityDetailsInfo(@Param("id") Integer id);
44
+
45
+    List<BusinessFsSaleRevenueThreeConsistence> getOutStorageDetailsInfo(@Param("id") Integer id);
46
+
47
+    List<BusinessFsSaleRevenueSettle> getSettlementDetailsInfo(@Param("id") Integer id);
48
+
49
+    List<BusinessFsSaleRevenueApprovalPrice> getCardDetailsInfo(@Param("id") Integer id);
50
+
51
+    List<BusinessFsSaleRevenueDiffPrice> getDiffPriceDetailsInfo(@Param("id") Integer id);
52
+
53
+    Page<BusinessFsSaleRevenue> selectPageList(Page<Object> objectPage, @Param("ew") QueryWrapper<BusinessFsSaleRevenue> wrapper);
54
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueSettleMapper.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueSettle;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-结算信息 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueSettleMapper extends BaseMapper<BusinessFsSaleRevenueSettle> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueThreeConsistenceAccountMapper.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistenceAccount;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-三账一致性-会计账 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-25
13
+ */
14
+public interface BusinessFsSaleRevenueThreeConsistenceAccountMapper extends BaseMapper<BusinessFsSaleRevenueThreeConsistenceAccount> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/mapper/BusinessFsSaleRevenueThreeConsistenceMapper.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.mapper;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistence;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-三账一致性 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueThreeConsistenceMapper extends BaseMapper<BusinessFsSaleRevenueThreeConsistence> {
15
+
16
+}

+ 6 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessContractDetail.java

@@ -14,6 +14,12 @@ public class BusinessContractDetail {
14 14
     @ApiModelProperty(value = "主键ID")
15 15
     private Integer id;
16 16
 
17
+    @ApiModelProperty(value = "仓房名称(销售收入上缴)")
18
+    private String houseName;
19
+
20
+    @ApiModelProperty(value = "货位名称(销售收入上缴)")
21
+    private String warehouseName;
22
+
17 23
     @ApiModelProperty(value = "粮油品种编码")
18 24
     private String grainKind;
19 25
 

+ 124 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenue.java

@@ -0,0 +1,124 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import com.baomidou.mybatisplus.annotation.IdType;
5
+import java.util.Date;
6
+import com.baomidou.mybatisplus.annotation.TableId;
7
+import com.baomidou.mybatisplus.annotation.TableField;
8
+import java.io.Serializable;
9
+import java.util.List;
10
+
11
+import io.swagger.annotations.ApiModel;
12
+import io.swagger.annotations.ApiModelProperty;
13
+import lombok.Data;
14
+import lombok.EqualsAndHashCode;
15
+
16
+/**
17
+ * <p>
18
+ * 财务监管-销售收入上缴
19
+ * </p>
20
+ *
21
+ * @author root
22
+ * @since 2024-07-24
23
+ */
24
+@Data
25
+@EqualsAndHashCode(callSuper = false)
26
+@TableName("business_fs_sale_revenue")
27
+@ApiModel(value="BusinessFsSaleRevenue对象", description="财务监管-销售收入上缴")
28
+public class BusinessFsSaleRevenue implements Serializable {
29
+
30
+    private static final long serialVersionUID = 1L;
31
+
32
+    @ApiModelProperty(value = "主键ID")
33
+    @TableId(value = "id", type = IdType.AUTO)
34
+    private Integer id;
35
+
36
+    @ApiModelProperty(value = "创建人")
37
+    @TableField("createname")
38
+    private String createname;
39
+
40
+    @ApiModelProperty(value = "创建日期")
41
+    @TableField("createdate")
42
+    private Date createdate;
43
+
44
+    @ApiModelProperty(value = "更新人")
45
+    @TableField("updatename")
46
+    private String updatename;
47
+
48
+    @ApiModelProperty(value = "更新日期")
49
+    @TableField("updatedate")
50
+    private Date updatedate;
51
+
52
+    @ApiModelProperty(value = "上报库区;org_info的id;")
53
+    @TableField("org_id")
54
+    private Integer orgId;
55
+
56
+    @ApiModelProperty(value = "上报时间")
57
+    @TableField("report_time")
58
+    private Date reportTime;
59
+
60
+    @ApiModelProperty(value = "计划类型")
61
+    @TableField("plan_type")
62
+    private String planType;
63
+
64
+    @ApiModelProperty(value = "销往单位")
65
+    @TableField("sales_unit")
66
+    private String salesUnit;
67
+
68
+    @ApiModelProperty(value = "合同编号;business_contract的ID;")
69
+    @TableField("contract_id")
70
+    private Integer contractId;
71
+
72
+    @ApiModelProperty(value = "问题跟踪反馈")
73
+    @TableField("problem_feedback")
74
+    private String problemFeedback;
75
+
76
+    @ApiModelProperty(value = "状态 0:保存;1:库级系统-上报;2:已核定;3:省级平台-上报")
77
+    @TableField("status")
78
+    private Integer status;
79
+
80
+    // 只展示不保存
81
+    @ApiModelProperty(value = "合同信息")
82
+    @TableField(exist = false)
83
+    private List<BusinessContractDetail> contractDetails;
84
+
85
+    @ApiModelProperty(value = "质检损益信息")
86
+    @TableField(exist = false)
87
+    private List<BusinessFsSaleRevenueInspectionLoss> inspectionLossList;
88
+
89
+    @ApiModelProperty(value = "三账一致性-会计账")
90
+    @TableField(exist = false)
91
+    private List<BusinessFsSaleRevenueThreeConsistenceAccount> threeConsistenceAccountList;
92
+
93
+    @ApiModelProperty(value = "三账一致性-实际出库情况")
94
+    @TableField(exist = false)
95
+    private List<BusinessFsSaleRevenueThreeConsistence> threeConsistenceList;
96
+
97
+    @ApiModelProperty(value = "结算信息")
98
+    @TableField(exist = false)
99
+    private List<BusinessFsSaleRevenueSettle> revenueSettleList;
100
+
101
+    @ApiModelProperty(value = "原核定入库价格")
102
+    @TableField(exist = false)
103
+    private List<BusinessFsSaleRevenueApprovalPrice> approvalPriceList;
104
+
105
+    @ApiModelProperty(value = "差额上缴")
106
+    @TableField(exist = false)
107
+    private List<BusinessFsSaleRevenueDiffPrice> DiffPriceList;
108
+
109
+    @ApiModelProperty(value = "合同编号")
110
+    @TableField(exist = false)
111
+    private String contractNumber;
112
+
113
+    @ApiModelProperty(value = "数量")
114
+    @TableField(exist = false)
115
+    private String grainQuantity;
116
+
117
+    @ApiModelProperty(value = "金额")
118
+    @TableField(exist = false)
119
+    private String moneyQuantity;
120
+
121
+    @ApiModelProperty(value = "确认数量")
122
+    @TableField(exist = false)
123
+    private String performanceQuantity;
124
+}

+ 94 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueApprovalPrice.java

@@ -0,0 +1,94 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-销售收入上缴-原核定入库价格
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-24
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("business_fs_sale_revenue_approval_price")
26
+@ApiModel(value="BusinessFsSaleRevenueApprovalPrice对象", description="财务监管-销售收入上缴-原核定入库价格")
27
+public class BusinessFsSaleRevenueApprovalPrice implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "business_fs_sale_revenue的ID;")
52
+    @TableField("fs_sale_revenue_id")
53
+    private Integer fsSaleRevenueId;
54
+
55
+    @ApiModelProperty(value = "原粮专卡ID;grain_situation_card的ID;")
56
+    @TableField("grain_situation_card_id")
57
+    private Integer grainSituationCardId;
58
+
59
+    @ApiModelProperty(value = "入库金额")
60
+    @TableField("storage_amount")
61
+    private BigDecimal storageAmount;
62
+
63
+    @ApiModelProperty(value = "文件号")
64
+    @TableField("document_number")
65
+    private String documentNumber;
66
+
67
+    @ApiModelProperty(value = "文档上传")
68
+    @TableField("document_upload")
69
+    private String documentUpload;
70
+
71
+    @ApiModelProperty(value = "仓房名称")
72
+    @TableField(exist = false)
73
+    private Integer storehouseId;
74
+
75
+    @ApiModelProperty(value = "仓房名称")
76
+    @TableField(exist = false)
77
+    private String storehouseName;
78
+
79
+    @ApiModelProperty(value = "货位名称")
80
+    @TableField(exist = false)
81
+    private String warehouseId;
82
+
83
+    @ApiModelProperty(value = "货位名称")
84
+    @TableField(exist = false)
85
+    private String warehouseName;
86
+
87
+    @ApiModelProperty(value = "入库数量(公斤)")
88
+    @TableField(exist = false)
89
+    private BigDecimal lssl;
90
+
91
+    @ApiModelProperty(value = "核定单价(元)")
92
+    @TableField(exist = false)
93
+    private BigDecimal inNinancialVerification;
94
+}

+ 76 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueDiffPrice.java

@@ -0,0 +1,76 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-销售收入上缴-差额上缴
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-24
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("business_fs_sale_revenue_diff_price")
26
+@ApiModel(value="BusinessFsSaleRevenueDiffPrice对象", description="财务监管-销售收入上缴-差额上缴")
27
+public class BusinessFsSaleRevenueDiffPrice implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "business_fs_sale_revenue的ID;")
52
+    @TableField("fs_sale_revenue_id")
53
+    private Integer fsSaleRevenueId;
54
+
55
+    @ApiModelProperty(value = "项目类型 1:销售;2:损耗;3:入库(用负数表示);4:交易手续费(用负数表示);")
56
+    @TableField("project_type")
57
+    private Integer projectType;
58
+
59
+    @ApiModelProperty(value = "数量")
60
+    @TableField("total_quantity")
61
+    private BigDecimal totalQuantity;
62
+
63
+    @ApiModelProperty(value = "省平台修改-数量")
64
+    @TableField("province_total_quantity")
65
+    private BigDecimal provinceTotalQuantity;
66
+
67
+    @ApiModelProperty(value = "金额")
68
+    @TableField("total_amount")
69
+    private BigDecimal totalAmount;
70
+
71
+    @ApiModelProperty(value = "省平台修改-金额")
72
+    @TableField("province_total_amount")
73
+    private BigDecimal provinceTotalAmount;
74
+
75
+
76
+}

+ 126 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueInspectionLoss.java

@@ -0,0 +1,126 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import com.baomidou.mybatisplus.annotation.IdType;
5
+import java.util.Date;
6
+import com.baomidou.mybatisplus.annotation.TableId;
7
+import com.baomidou.mybatisplus.annotation.TableField;
8
+import java.io.Serializable;
9
+import io.swagger.annotations.ApiModel;
10
+import io.swagger.annotations.ApiModelProperty;
11
+import lombok.Data;
12
+import lombok.EqualsAndHashCode;
13
+
14
+/**
15
+ * <p>
16
+ * 财务监管-销售收入上缴-质检损益信息
17
+ * </p>
18
+ *
19
+ * @author root
20
+ * @since 2024-07-24
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@TableName("business_fs_sale_revenue_inspection_loss")
25
+@ApiModel(value="BusinessFsSaleRevenueInspectionLoss对象", description="财务监管-销售收入上缴-质检损益信息")
26
+public class BusinessFsSaleRevenueInspectionLoss implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    @ApiModelProperty(value = "主键ID")
31
+    @TableId(value = "id", type = IdType.AUTO)
32
+    private Integer id;
33
+
34
+    @ApiModelProperty(value = "创建人")
35
+    @TableField("createname")
36
+    private String createname;
37
+
38
+    @ApiModelProperty(value = "创建日期")
39
+    @TableField("createdate")
40
+    private Date createdate;
41
+
42
+    @ApiModelProperty(value = "更新人")
43
+    @TableField("updatename")
44
+    private String updatename;
45
+
46
+    @ApiModelProperty(value = "更新日期")
47
+    @TableField("updatedate")
48
+    private Date updatedate;
49
+
50
+    @ApiModelProperty(value = "business_fs_sale_revenue的ID;")
51
+    @TableField("fs_sale_revenue_id")
52
+    private Integer fsSaleRevenueId;
53
+
54
+    @ApiModelProperty(value = "出库质检报告;business_qc_quality_inspection的id;")
55
+    @TableField("qc_quality_inspection_id_out")
56
+    private Integer qcQualityInspectionIdOut;
57
+
58
+    @ApiModelProperty(value = "入库质检报告;business_qc_quality_inspection的id;")
59
+    @TableField("qc_quality_inspection_id_in")
60
+    private Integer qcQualityInspectionIdIn;
61
+
62
+    @ApiModelProperty(value = "损溢损失信息;business_gslr_loss_collect的id;")
63
+    @TableField("gslr_loss_collect_id")
64
+    private Integer gslrLossCollectId;
65
+
66
+    // 业务数据
67
+    @ApiModelProperty(value = "报告单号-入库单号")
68
+    @TableField(exist = false)
69
+    private String zjbgdhIn;
70
+
71
+    @ApiModelProperty(value = "仓房名称")
72
+    @TableField(exist = false)
73
+    private String storehouseName;
74
+
75
+    @ApiModelProperty(value = "货位名称")
76
+    @TableField(exist = false)
77
+    private String warehouseName;
78
+
79
+    @ApiModelProperty(value = "入仓杂质")
80
+    @TableField(exist = false)
81
+    private String zzIn;
82
+
83
+    @ApiModelProperty(value = "入仓水分")
84
+    @TableField(exist = false)
85
+    private String sfIn;
86
+
87
+    @ApiModelProperty(value = "报告单号-出库单号")
88
+    @TableField(exist = false)
89
+    private String zjbgdhOut;
90
+
91
+    @ApiModelProperty(value = "出仓杂质")
92
+    @TableField(exist = false)
93
+    private String zzOut;
94
+
95
+    @ApiModelProperty(value = "出仓水分")
96
+    @TableField(exist = false)
97
+    private String sfOut;
98
+
99
+    @ApiModelProperty(value = "实际损耗量(公斤)")
100
+    @TableField(exist = false)
101
+    private String actualLossQuantity;
102
+
103
+    @ApiModelProperty(value = "定额损耗小计(公斤)")
104
+    @TableField(exist = false)
105
+    private String quotaLoss;
106
+
107
+    @ApiModelProperty(value = "保管损耗(公斤)")
108
+    @TableField(exist = false)
109
+    private String naturalLoss;
110
+
111
+    @ApiModelProperty(value = "水分减量(公斤)")
112
+    @TableField(exist = false)
113
+    private String moistureLoss;
114
+
115
+    @ApiModelProperty(value = "杂质减量(公斤)")
116
+    @TableField(exist = false)
117
+    private String impurityReductionQuality;
118
+
119
+    @ApiModelProperty(value = "超耗数量(公斤)")
120
+    @TableField(exist = false)
121
+    private String excessLossQuantity;
122
+
123
+    @ApiModelProperty(value = "超耗原因")
124
+    @TableField(exist = false)
125
+    private String lossProfitReason;
126
+}

+ 25 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenuePage.java

@@ -0,0 +1,25 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import com.chinaitop.depot.intelligent.common.PageParam;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Data;
6
+
7
+import javax.validation.constraints.NotNull;
8
+import java.io.Serializable;
9
+
10
+/**
11
+ * @author qingsong.han
12
+ * @description:
13
+ * @create 2024-07-25 17:58
14
+ */
15
+@Data
16
+public class BusinessFsSaleRevenuePage extends PageParam implements Serializable {
17
+    private static final long serialVersionUID = -5868563850694881293L;
18
+
19
+    @ApiModelProperty(value = "库区编码", required = true)
20
+    @NotNull(message = "机构编码不能为空")
21
+    private Integer orgId;
22
+    //合同编号
23
+    @ApiModelProperty(value = "合同编号")
24
+    private String contractNumber;
25
+}

+ 115 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueSettle.java

@@ -0,0 +1,115 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-销售收入上缴-结算信息
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-24
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("business_fs_sale_revenue_settle")
26
+@ApiModel(value="BusinessFsSaleRevenueSettle对象", description="财务监管-销售收入上缴-结算信息")
27
+public class BusinessFsSaleRevenueSettle implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "business_fs_sale_revenue的ID;")
52
+    @TableField("fs_sale_revenue_id")
53
+    private Integer fsSaleRevenueId;
54
+
55
+    @ApiModelProperty(value = "business_fs_out_confirm的ID;")
56
+    @TableField("fs_out_confirm_id")
57
+    private Integer fsOutConfirmId;
58
+
59
+    @ApiModelProperty(value = "省平台修改-出库验收确认-销往单位")
60
+    @TableField("province_acceptance_unit")
61
+    private String provinceAcceptanceUnit;
62
+
63
+    @ApiModelProperty(value = "省平台修改-出库确认单-数量(吨)")
64
+    @TableField("province_total_settle_quantity")
65
+    private BigDecimal provinceTotalSettleQuantity;
66
+
67
+    @ApiModelProperty(value = "省平台修改-出库确认单-金额,单位:元")
68
+    @TableField("province_total_settle_amount")
69
+    private BigDecimal provinceTotalSettleAmount;
70
+
71
+    @ApiModelProperty(value = "省平台修改-贷款收回情况-单位")
72
+    @TableField("province_loan_recovery_unit")
73
+    private String provinceLoanRecoveryUnit;
74
+
75
+    @ApiModelProperty(value = "省平台修改-贷款收回情况-数量")
76
+    @TableField("province_loan_recovery_quantity")
77
+    private BigDecimal provinceLoanRecoveryQuantity;
78
+
79
+    @ApiModelProperty(value = "省平台修改-贷款收回情况-金额")
80
+    @TableField("province_loan_recovery_amount")
81
+    private BigDecimal provinceLoanRecoveryAmount;
82
+
83
+    @ApiModelProperty(value = "省平台修改-销售发票情况-单位")
84
+    @TableField("province_invoice_unit")
85
+    private String provinceInvoiceUnit;
86
+
87
+    @ApiModelProperty(value = "省平台修改-销售发票情况-发票数量")
88
+    @TableField("province_invoice_quantity")
89
+    private Integer provinceInvoiceQuantity;
90
+
91
+    @ApiModelProperty(value = "省平台修改-销售发票情况-发票单价")
92
+    @TableField("province_invoice_unit_price")
93
+    private BigDecimal provinceInvoiceUnitPrice;
94
+
95
+    @ApiModelProperty(value = "省平台修改-销售发票情况-发票金额")
96
+    @TableField("province_invoice_amount")
97
+    private BigDecimal provinceInvoiceAmount;
98
+
99
+    @ApiModelProperty(value = "省平台修改-贷款归还-日期")
100
+    @TableField("province_loan_return_time")
101
+    private Date provinceLoanReturnTime;
102
+
103
+    @ApiModelProperty(value = "省平台修改-贷款归还-金额")
104
+    @TableField("province_loan_return_amount")
105
+    private BigDecimal provinceLoanReturnAmount;
106
+
107
+    // 业务数据
108
+    @ApiModelProperty(value = "出库验收确认-单位")
109
+    @TableField(exist = false)
110
+    private String orgName;
111
+
112
+    @ApiModelProperty(value = "贷款收回情况-日期")
113
+    @TableField(exist = false)
114
+    private Date loanReturnTime;
115
+}

+ 134 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueThreeConsistence.java

@@ -0,0 +1,134 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import java.math.BigDecimal;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 财务监管-销售收入上缴-三账一致性
18
+ * </p>
19
+ *
20
+ * @author root
21
+ * @since 2024-07-24
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("business_fs_sale_revenue_three_consistence")
26
+@ApiModel(value="BusinessFsSaleRevenueThreeConsistence对象", description="财务监管-销售收入上缴-三账一致性")
27
+public class BusinessFsSaleRevenueThreeConsistence implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "business_fs_sale_revenue的ID")
52
+    @TableField("fs_sale_revenue_id")
53
+    private Integer fsSaleRevenueId;
54
+
55
+    @ApiModelProperty(value = "年")
56
+    @TableField("year")
57
+    private Integer year;
58
+
59
+    @ApiModelProperty(value = "月份")
60
+    @TableField("month")
61
+    private String month;
62
+
63
+    @ApiModelProperty(value = "出库情况-仓号;basic_storehouse的id;仓房id")
64
+    @TableField("basic_storehouse_id")
65
+    private Integer basicStorehouseId;
66
+
67
+    @ApiModelProperty(value = "basic_warehouse的id;货位id;")
68
+    @TableField("warehouse_id")
69
+    private Integer warehouseId;
70
+
71
+    @ApiModelProperty(value = "出库情况-其中:损耗")
72
+    @TableField("loss")
73
+    private BigDecimal loss;
74
+
75
+    @ApiModelProperty(value = "省平台修改-出库情况-其中:损耗")
76
+    @TableField("province_loss")
77
+    private BigDecimal provinceLoss;
78
+
79
+    @ApiModelProperty(value = "出库情况-保管账数量")
80
+    @TableField("custody_account_quantity")
81
+    private BigDecimal custodyAccountQuantity;
82
+
83
+    @ApiModelProperty(value = "省平台修改-出库情况-保管账数量")
84
+    @TableField("province_custody_account_quantity")
85
+    private String provinceCustodyAccountQuantity;
86
+
87
+    @ApiModelProperty(value = "出库情况-统计账数量,单位:公斤;")
88
+    @TableField("statistical_account_quantity")
89
+    private BigDecimal statisticalAccountQuantity;
90
+
91
+    @ApiModelProperty(value = "省平台修改-出库情况-统计账数量,单位:公斤;")
92
+    @TableField("province_statistical_account_quantity")
93
+    private BigDecimal provinceStatisticalAccountQuantity;
94
+
95
+    @ApiModelProperty(value = "完成时间")
96
+    @TableField("complete_time")
97
+    private Date completeTime;
98
+
99
+    @ApiModelProperty(value = "省平台修改-完成时间")
100
+    @TableField("province_complete_time")
101
+    private Date provinceCompleteTime;
102
+
103
+    @ApiModelProperty(value = "会计账-数量,单位:公斤")
104
+    @TableField("accounting_quantity")
105
+    private BigDecimal accountingQuantity;
106
+
107
+    @ApiModelProperty(value = "省平台修改-会计账-数量,单位:公斤;")
108
+    @TableField("province_accounting_quantity")
109
+    private BigDecimal provinceAccountingQuantity;
110
+
111
+    @ApiModelProperty(value = "会计账-单价,单位:元/公斤")
112
+    @TableField("accounting_unit_price")
113
+    private BigDecimal accountingUnitPrice;
114
+
115
+    @ApiModelProperty(value = "省平台修改-会计账-单价,单位:元/公斤")
116
+    @TableField("province_accounting_unit_price")
117
+    private BigDecimal provinceAccountingUnitPrice;
118
+
119
+    @ApiModelProperty(value = "会计账-金额,单位:元")
120
+    @TableField("accounting_amount")
121
+    private BigDecimal accountingAmount;
122
+
123
+    @ApiModelProperty(value = "省平台修改-会计账-金额,单位:元")
124
+    @TableField("province_accounting_amount")
125
+    private BigDecimal provinceAccountingAmount;
126
+
127
+    @ApiModelProperty(value = "仓房名称")
128
+    @TableField(exist = false)
129
+    private String storehouseName;
130
+
131
+    @ApiModelProperty(value = "货位名称")
132
+    @TableField(exist = false)
133
+    private String warehouseName;
134
+}

+ 88 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/model/BusinessFsSaleRevenueThreeConsistenceAccount.java

@@ -0,0 +1,88 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+
12
+import java.io.Serializable;
13
+import java.math.BigDecimal;
14
+import java.util.Date;
15
+
16
+/**
17
+ * <p>
18
+ * 财务监管-销售收入上缴-三账一致性-会计账
19
+ * </p>
20
+ *
21
+ * @author root
22
+ * @since 2024-07-25
23
+ */
24
+@Data
25
+@EqualsAndHashCode(callSuper = false)
26
+@TableName("business_fs_sale_revenue_three_consistence_account")
27
+@ApiModel(value="BusinessFsSaleRevenueThreeConsistenceAccount对象", description="财务监管-销售收入上缴-三账一致性-会计账")
28
+public class BusinessFsSaleRevenueThreeConsistenceAccount implements Serializable {
29
+
30
+    private static final long serialVersionUID = 1L;
31
+
32
+    @ApiModelProperty(value = "主键ID")
33
+    @TableId(value = "id", type = IdType.AUTO)
34
+    private Integer id;
35
+
36
+    @ApiModelProperty(value = "创建人")
37
+    @TableField("createname")
38
+    private String createname;
39
+
40
+    @ApiModelProperty(value = "创建日期")
41
+    @TableField("createdate")
42
+    private Date createdate;
43
+
44
+    @ApiModelProperty(value = "更新人")
45
+    @TableField("updatename")
46
+    private String updatename;
47
+
48
+    @ApiModelProperty(value = "更新日期")
49
+    @TableField("updatedate")
50
+    private Date updatedate;
51
+
52
+    @ApiModelProperty(value = "business_fs_sale_revenue的ID")
53
+    @TableField("fs_sale_revenue_id")
54
+    private Integer fsSaleRevenueId;
55
+
56
+    @ApiModelProperty(value = "年")
57
+    @TableField("year")
58
+    private Integer year;
59
+
60
+    @ApiModelProperty(value = "月份")
61
+    @TableField("month")
62
+    private String month;
63
+
64
+    @ApiModelProperty(value = "会计账-数量,单位:公斤")
65
+    @TableField("accounting_quantity")
66
+    private BigDecimal accountingQuantity;
67
+
68
+    @ApiModelProperty(value = "省平台修改-会计账-数量,单位:公斤;")
69
+    @TableField("province_accounting_quantity")
70
+    private BigDecimal provinceAccountingQuantity;
71
+
72
+    @ApiModelProperty(value = "会计账-金额,单位:元")
73
+    @TableField("accounting_amount")
74
+    private BigDecimal accountingAmount;
75
+
76
+    @ApiModelProperty(value = "省平台修改-会计账-金额,单位:元")
77
+    @TableField("province_accounting_amount")
78
+    private BigDecimal provinceAccountingAmount;
79
+
80
+    @ApiModelProperty(value = "凭证号")
81
+    @TableField(exist = false)
82
+    private String voucherNumber;
83
+
84
+    @ApiModelProperty(value = "销售单价(元)")
85
+    @TableField(exist = false)
86
+    private BigDecimal unitPrice;
87
+
88
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueApprovalPriceService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueApprovalPrice;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-原核定入库价格 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueApprovalPriceService extends IService<BusinessFsSaleRevenueApprovalPrice> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueDiffPriceService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueDiffPrice;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-差额上缴 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueDiffPriceService extends IService<BusinessFsSaleRevenueDiffPrice> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueInspectionLossService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueInspectionLoss;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-质检损益信息 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueInspectionLossService extends IService<BusinessFsSaleRevenueInspectionLoss> {
15
+
16
+}

+ 47 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueService.java

@@ -0,0 +1,47 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
5
+import com.chinaitop.depot.intelligent.priceApproval.model.*;
6
+import com.baomidou.mybatisplus.extension.service.IService;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * <p>
12
+ * 财务监管-销售收入上缴 服务类
13
+ * </p>
14
+ *
15
+ * @author root
16
+ * @since 2024-07-24
17
+ */
18
+public interface BusinessFsSaleRevenueService extends IService<BusinessFsSaleRevenue> {
19
+
20
+    void saveData(BusinessFsSaleRevenue param);
21
+
22
+    List<BusinessContract> getContractInfo(Integer orgId);
23
+
24
+    List<BusinessContractDetail> getContractInfoList(Integer id);
25
+
26
+    BusinessFsSaleRevenueInspectionLoss getQualityInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId);
27
+
28
+    List<BusinessFsSaleRevenueThreeConsistenceAccount> getConsistenceAccountInfo(String contractNumber);
29
+
30
+    List<BusinessFsSaleRevenueThreeConsistence> getOutStorageInfo(String contractNumber);
31
+
32
+    List<DataCPZ> getOutStorageDetailed(String contractNumber);
33
+
34
+    List<BusinessFsSaleRevenueSettle> getSettlementInfo(String contractNumber);
35
+
36
+    List<BusinessFsSaleRevenueDiffPrice> getDiffPriceInfo(String contractNumber);
37
+
38
+    BusinessFsSaleRevenueApprovalPrice getCardInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId);
39
+
40
+    void updateData(BusinessFsSaleRevenue param);
41
+
42
+    BusinessFsSaleRevenue detailsData(Integer id);
43
+
44
+    Page<BusinessFsSaleRevenue> selectPageList(BusinessFsSaleRevenuePage param);
45
+
46
+    void deleteData(Integer id);
47
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueSettleService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueSettle;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-结算信息 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueSettleService extends IService<BusinessFsSaleRevenueSettle> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueThreeConsistenceAccountService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistenceAccount;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-三账一致性-会计账 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-25
13
+ */
14
+public interface BusinessFsSaleRevenueThreeConsistenceAccountService extends IService<BusinessFsSaleRevenueThreeConsistenceAccount> {
15
+
16
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueThreeConsistenceService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistence;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 财务监管-销售收入上缴-三账一致性 服务类
9
+ * </p>
10
+ *
11
+ * @author root
12
+ * @since 2024-07-24
13
+ */
14
+public interface BusinessFsSaleRevenueThreeConsistenceService extends IService<BusinessFsSaleRevenueThreeConsistence> {
15
+
16
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueApprovalPriceServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueApprovalPrice;
4
+import com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueApprovalPriceMapper;
5
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueApprovalPriceService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-原核定入库价格 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-24
16
+ */
17
+@Service
18
+public class BusinessFsSaleRevenueApprovalPriceServiceImpl extends ServiceImpl<BusinessFsSaleRevenueApprovalPriceMapper, BusinessFsSaleRevenueApprovalPrice> implements BusinessFsSaleRevenueApprovalPriceService {
19
+
20
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueDiffPriceServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueDiffPrice;
4
+import com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueDiffPriceMapper;
5
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueDiffPriceService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-差额上缴 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-24
16
+ */
17
+@Service
18
+public class BusinessFsSaleRevenueDiffPriceServiceImpl extends ServiceImpl<BusinessFsSaleRevenueDiffPriceMapper, BusinessFsSaleRevenueDiffPrice> implements BusinessFsSaleRevenueDiffPriceService {
19
+
20
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueInspectionLossServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueInspectionLoss;
4
+import com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueInspectionLossMapper;
5
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueInspectionLossService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-质检损益信息 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-24
16
+ */
17
+@Service
18
+public class BusinessFsSaleRevenueInspectionLossServiceImpl extends ServiceImpl<BusinessFsSaleRevenueInspectionLossMapper, BusinessFsSaleRevenueInspectionLoss> implements BusinessFsSaleRevenueInspectionLossService {
19
+
20
+}

+ 352 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueServiceImpl.java

@@ -0,0 +1,352 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
5
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
8
+import com.chinaitop.depot.intelligent.priceApproval.mapper.*;
9
+import com.chinaitop.depot.intelligent.priceApproval.model.*;
10
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueService;
11
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12
+import org.springframework.stereotype.Service;
13
+import org.springframework.transaction.annotation.Transactional;
14
+
15
+import javax.annotation.Resource;
16
+import java.math.BigDecimal;
17
+import java.util.HashMap;
18
+import java.util.List;
19
+import java.util.Map;
20
+
21
+/**
22
+ * <p>
23
+ * 财务监管-销售收入上缴 服务实现类
24
+ * </p>
25
+ *
26
+ * @author root
27
+ * @since 2024-07-24
28
+ */
29
+@Service
30
+public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSaleRevenueMapper, BusinessFsSaleRevenue> implements BusinessFsSaleRevenueService {
31
+    @Resource
32
+    private BusinessFsSaleRevenueMapper saleRevenueMapper;
33
+    @Resource
34
+    private BusinessFsSaleRevenueInspectionLossMapper saleRevenueInspectionLossMapper;
35
+    @Resource
36
+    private BusinessFsSaleRevenueThreeConsistenceMapper threeConsistenceMapper;
37
+    @Resource
38
+    private BusinessFsSaleRevenueSettleMapper settleMapper;
39
+    @Resource
40
+    private BusinessFsSaleRevenueApprovalPriceMapper approvalPriceMapper;
41
+    @Resource
42
+    private BusinessFsSaleRevenueDiffPriceMapper diffPriceMapper;
43
+    @Resource
44
+    private BusinessFsSaleRevenueThreeConsistenceAccountMapper threeConsistenceAccountMapper;
45
+
46
+
47
+    @Override
48
+    @Transactional(rollbackFor = Exception.class)
49
+    public void saveData(BusinessFsSaleRevenue param) {
50
+        // 保存主表
51
+        saleRevenueMapper.insert(param);
52
+        // 保存子表-质检损益信息
53
+        this.saveInspectionLoss(param);
54
+        // 保存子表-三账一致性-会计账
55
+        this.saveThreeConsistence(param);
56
+        // 保存子表-三账一致性-实际出库情况
57
+        this.saveOutStorage(param);
58
+        // 保存子表-结算信息
59
+        this.saveSettle(param);
60
+        // 保存子表-原核定入库价格
61
+        this.saveApprovalPrice(param);
62
+        // 保存子表-差价上缴
63
+        this.saveDiffPrice(param);
64
+    }
65
+
66
+    @Override
67
+    public List<BusinessContract> getContractInfo(Integer orgId) {
68
+        return saleRevenueMapper.getContractInfo(orgId);
69
+    }
70
+
71
+    @Override
72
+    public List<BusinessContractDetail> getContractInfoList(Integer id) {
73
+        return saleRevenueMapper.getContractInfoList(id);
74
+    }
75
+
76
+    @Override
77
+    public BusinessFsSaleRevenueInspectionLoss getQualityInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId) {
78
+        Map<String, Object> map = new HashMap<>();
79
+        map.put("orgId", orgId);
80
+        map.put("basicStorehouseId", basicStorehouseId);
81
+        map.put("warehouseId", warehouseId);
82
+        return saleRevenueMapper.getQualityInfo(map);
83
+    }
84
+
85
+    @Override
86
+    public List<BusinessFsSaleRevenueThreeConsistenceAccount> getConsistenceAccountInfo(String contractNumber) {
87
+        return saleRevenueMapper.getConsistenceAccountInfo(contractNumber);
88
+    }
89
+
90
+    @Override
91
+    public List<BusinessFsSaleRevenueThreeConsistence> getOutStorageInfo(String contractNumber) {
92
+        return saleRevenueMapper.getOutStorageInfo(contractNumber);
93
+    }
94
+
95
+    @Override
96
+    public List<DataCPZ> getOutStorageDetailed(String contractNumber) {
97
+        return saleRevenueMapper.getOutStorageDetailed(contractNumber);
98
+    }
99
+
100
+    @Override
101
+    public List<BusinessFsSaleRevenueSettle> getSettlementInfo(String contractNumber) {
102
+        return saleRevenueMapper.getSettlementInfo(contractNumber);
103
+    }
104
+
105
+    @Override
106
+    public List<BusinessFsSaleRevenueDiffPrice> getDiffPriceInfo(String contractNumber) {
107
+        return saleRevenueMapper.getDiffPriceInfo(contractNumber);
108
+    }
109
+
110
+    @Override
111
+    public BusinessFsSaleRevenueApprovalPrice getCardInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId) {
112
+        Map<String, Object> map = new HashMap<>();
113
+        map.put("orgId", orgId);
114
+        map.put("basicStorehouseId", basicStorehouseId);
115
+        map.put("warehouseId", warehouseId);
116
+        return saleRevenueMapper.getCardInfo(map);
117
+    }
118
+
119
+    @Override
120
+    @Transactional(rollbackFor = Exception.class)
121
+    public void updateData(BusinessFsSaleRevenue param) {
122
+        // 主表id
123
+        Integer id = param.getId();
124
+
125
+        // 修改主表
126
+        saleRevenueMapper.updateById(param);
127
+
128
+        // 删除子表-质检损益信息
129
+        this.inspectionLossDelete(id);
130
+        // 保存子表-质检损益信息
131
+        this.saveInspectionLoss(param);
132
+
133
+        // 删除子表-三账一致性-会计账
134
+        this.threeConsistenceAccountDelete(id);
135
+        // 保存子表-三账一致性-会计账
136
+        this.saveThreeConsistence(param);
137
+
138
+        // 删除子表-三账一致性-实际出库情况
139
+        this.threeConsistenceDelete(id);
140
+        // 保存子表-三账一致性-实际出库情况
141
+        this.saveOutStorage(param);
142
+
143
+        // 删除子表-结算信息
144
+        this.revenueSettleDelete(id);
145
+        // 保存子表-结算信息
146
+        this.saveSettle(param);
147
+
148
+        // 删除子表-原核定入库价格
149
+        this.approvalPriceDelete(id);
150
+        // 保存子表-原核定入库价格
151
+        this.saveApprovalPrice(param);
152
+
153
+        // 删除子表-差价上缴
154
+        this.diffPriceDelete(id);
155
+        // 保存子表-差价上缴
156
+        this.saveDiffPrice(param);
157
+    }
158
+
159
+    @Override
160
+    public BusinessFsSaleRevenue detailsData(Integer id) {
161
+        // 查询主表
162
+        BusinessFsSaleRevenue saleRevenue = saleRevenueMapper.selectById(id);
163
+        // 查询子表-合同信息
164
+        List<BusinessContractDetail> contractInfoList = this.getContractInfoList(saleRevenue.getContractId());
165
+        if (CollectionUtils.isNotEmpty(contractInfoList)) {
166
+            saleRevenue.setContractDetails(contractInfoList);
167
+        }
168
+        // 查询子表-质检损益信息
169
+        List<BusinessFsSaleRevenueInspectionLoss> inspectionLossList = saleRevenueMapper.getQualityDetailsInfo(id);
170
+        if (CollectionUtils.isNotEmpty(inspectionLossList)) {
171
+            saleRevenue.setInspectionLossList(inspectionLossList);
172
+        }
173
+        // 查询子表-三账一致性-会计账
174
+        List<BusinessFsSaleRevenueThreeConsistenceAccount> threeConsistenceList = saleRevenueMapper.getConsistenceAccountDetailsInfo(id);
175
+        if (CollectionUtils.isNotEmpty(threeConsistenceList)) {
176
+            saleRevenue.setThreeConsistenceAccountList(threeConsistenceList);
177
+        }
178
+        // 查询子表-三账一致性-实际出库情况
179
+        List<BusinessFsSaleRevenueThreeConsistence> outStorageDetailsInfo = saleRevenueMapper.getOutStorageDetailsInfo(id);
180
+        if (CollectionUtils.isNotEmpty(outStorageDetailsInfo)) {
181
+            saleRevenue.setThreeConsistenceList(outStorageDetailsInfo);
182
+        }
183
+        // 查询子表-结算信息
184
+        List<BusinessFsSaleRevenueSettle> revenueSettleList = saleRevenueMapper.getSettlementDetailsInfo(id);
185
+        if (CollectionUtils.isNotEmpty(revenueSettleList)) {
186
+            saleRevenue.setRevenueSettleList(revenueSettleList);
187
+        }
188
+        // 查询子表-原核定入库价格
189
+        List<BusinessFsSaleRevenueApprovalPrice> approvalPriceList = saleRevenueMapper.getCardDetailsInfo(id);
190
+        if (CollectionUtils.isNotEmpty(approvalPriceList)) {
191
+            saleRevenue.setApprovalPriceList(approvalPriceList);
192
+        }
193
+        // 查询子表-差价上缴
194
+        List<BusinessFsSaleRevenueDiffPrice> DiffPriceList = saleRevenueMapper.getDiffPriceDetailsInfo(id);
195
+        if (CollectionUtils.isNotEmpty(DiffPriceList)) {
196
+            saleRevenue.setDiffPriceList(DiffPriceList);
197
+        }
198
+        return saleRevenue;
199
+    }
200
+
201
+    @Override
202
+    public Page<BusinessFsSaleRevenue> selectPageList(BusinessFsSaleRevenuePage param) {
203
+        QueryWrapper<BusinessFsSaleRevenue> wrapper = new QueryWrapper<>();
204
+        wrapper.eq("sr.org_id", param.getOrgId());
205
+        if (StringUtils.isNotBlank(param.getContractNumber())) {
206
+            wrapper.eq("bc.contract_number", param.getContractNumber());
207
+        }
208
+        return saleRevenueMapper.selectPageList(new Page<>(param.getCurrent(), param.getSize()), wrapper);
209
+    }
210
+
211
+    @Override
212
+    @Transactional(rollbackFor = Exception.class)
213
+    public void deleteData(Integer id) {
214
+        // 删除主表
215
+        saleRevenueMapper.deleteById(id);
216
+
217
+        // 删除子表-质检损益信息
218
+        this.inspectionLossDelete(id);
219
+
220
+        // 删除子表-三账一致性-会计账
221
+        this.threeConsistenceAccountDelete(id);
222
+
223
+        // 删除子表-三账一致性-实际出库情况
224
+        this.threeConsistenceDelete(id);
225
+
226
+        // 删除子表-结算信息
227
+        this.revenueSettleDelete(id);
228
+
229
+        // 删除子表-原核定入库价格
230
+        this.approvalPriceDelete(id);
231
+
232
+        // 删除子表-差价上缴
233
+        this.diffPriceDelete(id);
234
+    }
235
+
236
+    // 保存子表-质检损益信息
237
+    private void saveInspectionLoss(BusinessFsSaleRevenue param) {
238
+        if (CollectionUtils.isNotEmpty(param.getInspectionLossList())) {
239
+            param.getInspectionLossList().forEach(inspectionLoss -> {
240
+                inspectionLoss.setFsSaleRevenueId(param.getId());
241
+                saleRevenueInspectionLossMapper.insert(inspectionLoss);
242
+            });
243
+        }
244
+    }
245
+
246
+    // 保存子表-三账一致性-会计账
247
+    private void saveThreeConsistence(BusinessFsSaleRevenue param) {
248
+        if (CollectionUtils.isNotEmpty(param.getThreeConsistenceAccountList())) {
249
+            param.getThreeConsistenceAccountList().forEach(threeConsistenceAccount -> {
250
+                threeConsistenceAccount.setFsSaleRevenueId(param.getId());
251
+                threeConsistenceAccount.setProvinceAccountingQuantity(threeConsistenceAccount.getAccountingQuantity() == null ? new BigDecimal(0) : threeConsistenceAccount.getAccountingQuantity());
252
+                threeConsistenceAccount.setProvinceAccountingAmount(threeConsistenceAccount.getAccountingAmount() == null ? new BigDecimal(0) : threeConsistenceAccount.getAccountingAmount());
253
+                threeConsistenceAccountMapper.insert(threeConsistenceAccount);
254
+            });
255
+        }
256
+    }
257
+
258
+    // 保存子表-三账一致性-实际出库情况
259
+    private void saveOutStorage(BusinessFsSaleRevenue param) {
260
+        if (CollectionUtils.isNotEmpty(param.getThreeConsistenceList())) {
261
+            param.getThreeConsistenceList().forEach(outStorage -> {
262
+                outStorage.setFsSaleRevenueId(param.getId());
263
+                outStorage.setAccountingQuantity(new BigDecimal(0));
264
+                outStorage.setProvinceAccountingQuantity(new BigDecimal(0));
265
+                outStorage.setAccountingUnitPrice(new BigDecimal(0));
266
+                outStorage.setProvinceAccountingUnitPrice(new BigDecimal(0));
267
+                outStorage.setAccountingAmount(new BigDecimal(0));
268
+                outStorage.setProvinceAccountingAmount(new BigDecimal(0));
269
+                outStorage.setProvinceLoss(outStorage.getLoss());
270
+                outStorage.setProvinceCustodyAccountQuantity(outStorage.getCustodyAccountQuantity().toString());
271
+                outStorage.setProvinceStatisticalAccountQuantity(outStorage.getStatisticalAccountQuantity());
272
+                outStorage.setProvinceCompleteTime(outStorage.getCompleteTime());
273
+                threeConsistenceMapper.insert(outStorage);
274
+            });
275
+        }
276
+    }
277
+
278
+    // 保存子表-结算信息
279
+    private void saveSettle(BusinessFsSaleRevenue param) {
280
+        if (CollectionUtils.isNotEmpty(param.getRevenueSettleList())) {
281
+            param.getRevenueSettleList().forEach(settle -> {
282
+                settle.setFsSaleRevenueId(param.getId());
283
+                settle.setProvinceAcceptanceUnit(settle.getOrgName());
284
+                settleMapper.insert(settle);
285
+            });
286
+        }
287
+    }
288
+
289
+    // 保存子表-原核定入库价格
290
+    private void saveApprovalPrice(BusinessFsSaleRevenue param) {
291
+        if (CollectionUtils.isNotEmpty(param.getApprovalPriceList())) {
292
+            param.getApprovalPriceList().forEach(approvalPrice -> {
293
+                approvalPrice.setFsSaleRevenueId(param.getId());
294
+                approvalPriceMapper.insert(approvalPrice);
295
+            });
296
+        }
297
+    }
298
+
299
+    // 保存子表-差价上缴
300
+    private void saveDiffPrice(BusinessFsSaleRevenue param) {
301
+        if (CollectionUtils.isNotEmpty(param.getDiffPriceList())) {
302
+            param.getDiffPriceList().forEach(diffPrice -> {
303
+                diffPrice.setFsSaleRevenueId(param.getId());
304
+                diffPrice.setProvinceTotalQuantity(diffPrice.getTotalQuantity());
305
+                diffPrice.setProvinceTotalAmount(diffPrice.getTotalAmount());
306
+                diffPriceMapper.insert(diffPrice);
307
+            });
308
+        }
309
+    }
310
+
311
+    // 删除子表-质检损益信息
312
+    private void inspectionLossDelete(Integer id) {
313
+        QueryWrapper<BusinessFsSaleRevenueInspectionLoss> wrapperInspectionLoss = new QueryWrapper<>();
314
+        wrapperInspectionLoss.eq("fs_sale_revenue_id", id);
315
+        saleRevenueInspectionLossMapper.delete(wrapperInspectionLoss);
316
+    }
317
+
318
+    // 删除子表-三账一致性-会计账
319
+    private void threeConsistenceAccountDelete(Integer id) {
320
+        QueryWrapper<BusinessFsSaleRevenueThreeConsistenceAccount> wrapperThreeConsistenceAccount = new QueryWrapper<>();
321
+        wrapperThreeConsistenceAccount.eq("fs_sale_revenue_id", id);
322
+        threeConsistenceAccountMapper.delete(wrapperThreeConsistenceAccount);
323
+    }
324
+
325
+    // 删除子表-三账一致性-实际出库情况
326
+    private void threeConsistenceDelete(Integer id) {
327
+        QueryWrapper<BusinessFsSaleRevenueThreeConsistence> wrapperThreeConsistence = new QueryWrapper<>();
328
+        wrapperThreeConsistence.eq("fs_sale_revenue_id", id);
329
+        threeConsistenceMapper.delete(wrapperThreeConsistence);
330
+    }
331
+
332
+    // 删除子表-结算信息
333
+    private void revenueSettleDelete(Integer id) {
334
+        QueryWrapper<BusinessFsSaleRevenueSettle> wrapperRevenueSettle = new QueryWrapper<>();
335
+        wrapperRevenueSettle.eq("fs_sale_revenue_id", id);
336
+        settleMapper.delete(wrapperRevenueSettle);
337
+    }
338
+
339
+    // 删除子表-原核定入库价格
340
+    private void approvalPriceDelete(Integer id) {
341
+        QueryWrapper<BusinessFsSaleRevenueApprovalPrice> wrapperApprovalPrice = new QueryWrapper<>();
342
+        wrapperApprovalPrice.eq("fs_sale_revenue_id", id);
343
+        approvalPriceMapper.delete(wrapperApprovalPrice);
344
+    }
345
+
346
+    // 删除子表-差价上缴
347
+    private void diffPriceDelete(Integer id) {
348
+        QueryWrapper<BusinessFsSaleRevenueDiffPrice> wrapperDiffPrice = new QueryWrapper<>();
349
+        wrapperDiffPrice.eq("fs_sale_revenue_id", id);
350
+        diffPriceMapper.delete(wrapperDiffPrice);
351
+    }
352
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueSettleServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueSettle;
4
+import com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueSettleMapper;
5
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueSettleService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-结算信息 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-24
16
+ */
17
+@Service
18
+public class BusinessFsSaleRevenueSettleServiceImpl extends ServiceImpl<BusinessFsSaleRevenueSettleMapper, BusinessFsSaleRevenueSettle> implements BusinessFsSaleRevenueSettleService {
19
+
20
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueThreeConsistenceAccountServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueThreeConsistenceAccountMapper;
5
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistenceAccount;
6
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueThreeConsistenceAccountService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-三账一致性-会计账 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-25
16
+ */
17
+@Service
18
+public class BusinessFsSaleRevenueThreeConsistenceAccountServiceImpl extends ServiceImpl<BusinessFsSaleRevenueThreeConsistenceAccountMapper, BusinessFsSaleRevenueThreeConsistenceAccount> implements BusinessFsSaleRevenueThreeConsistenceAccountService {
19
+
20
+}

+ 20 - 0
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueThreeConsistenceServiceImpl.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2
+
3
+import com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistence;
4
+import com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueThreeConsistenceMapper;
5
+import com.chinaitop.depot.intelligent.priceApproval.service.BusinessFsSaleRevenueThreeConsistenceService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 财务监管-销售收入上缴-三账一致性 服务实现类
12
+ * </p>
13
+ *
14
+ * @author root
15
+ * @since 2024-07-24
16
+ */
17
+@Service
18
+public class BusinessFsSaleRevenueThreeConsistenceServiceImpl extends ServiceImpl<BusinessFsSaleRevenueThreeConsistenceMapper, BusinessFsSaleRevenueThreeConsistence> implements BusinessFsSaleRevenueThreeConsistenceService {
19
+
20
+}

+ 4 - 4
src/main/java/com/chinaitop/depot/intelligent/pushs/service/impl/GrainPushsServiceImpl.java

@@ -70,8 +70,8 @@ public class GrainPushsServiceImpl implements GrainPushsService {
70 70
             BigDecimal max = points.stream().filter(TPoints -> !TempUtils.isBad(TPoints.getTemp())).map(TPoints::getTemp).reduce(BigDecimal.ZERO, BigDecimal::max);
71 71
             lqData.setTempMax(max);
72 72
             // 最低
73
-            BigDecimal min = points.stream().filter(TPoints -> !TempUtils.isBad(TPoints.getTemp())).map(TPoints::getTemp).reduce(BigDecimal.ZERO, BigDecimal::min);
74
-            lqData.setTempMin(min);
73
+            Optional<BigDecimal> minOptinal = points.stream().map(TPoints::getTemp).min(BigDecimal::compareTo);
74
+            minOptinal.ifPresent(min -> lqData.setTempMin(min));
75 75
             // 平均
76 76
             BigDecimal wholeSum = points.stream().filter(TPoints -> !TempUtils.isBad(TPoints.getTemp())).map(TPoints::getTemp).reduce(BigDecimal.ZERO, BigDecimal::add);
77 77
             float doubleValue = wholeSum.floatValue();
@@ -129,8 +129,8 @@ public class GrainPushsServiceImpl implements GrainPushsService {
129 129
                 BigDecimal lsyerMax = v.stream().filter(TPoints -> !TPoints.getTemp().equals(new BigDecimal("250.0"))).map(TPoints::getTemp).reduce(BigDecimal.ZERO, BigDecimal::max);
130 130
                 layer.setLmax(lsyerMax);
131 131
                 // 每层最低
132
-                BigDecimal lsyerMin = v.stream().filter(TPoints -> !TPoints.getTemp().equals(new BigDecimal("250.0"))).map(TPoints::getTemp).reduce(BigDecimal.ZERO, BigDecimal::min);
133
-                layer.setLmin(lsyerMin);
132
+                Optional<BigDecimal> vMin = v.stream().map(TPoints::getTemp).min(BigDecimal::compareTo);
133
+                vMin.ifPresent(lsyerMin -> layer.setLmin(lsyerMin));
134 134
                 // 每层平均温
135 135
                 BigDecimal lsyerSums = v.stream().filter(TPoints -> !TPoints.getTemp().equals(new BigDecimal("250.0"))).map(TPoints::getTemp).reduce(BigDecimal.ZERO, BigDecimal::add);
136 136
                 float lsyerSum = lsyerSums.floatValue();

+ 30 - 0
src/main/resources/mapper/financialSupervision/BusinessFsInterestMaintainMapper.xml

@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsInterestMaintainMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsInterestMaintain">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="org_id" property="orgId" />
13
+        <result column="interest_bill_no" property="interestBillNo" />
14
+        <result column="year" property="year" />
15
+        <result column="month" property="month" />
16
+        <result column="actual_interest_received" property="actualInterestReceived" />
17
+        <result column="other_deduction" property="otherDeduction" />
18
+        <result column="remark" property="remark" />
19
+    </resultMap>
20
+
21
+    <!-- 通用查询结果列 -->
22
+    <sql id="Base_Column_List">
23
+        id, createname, createdate, updatename, updatedate, org_id, interest_bill_no, year, month, actual_interest_received, other_deduction, remark
24
+    </sql>
25
+
26
+    <select id="selectNum" resultType="java.lang.String">
27
+        select interest_bill_no from business_fs_interest_maintain order by createdate desc limit 1
28
+    </select>
29
+
30
+</mapper>

+ 25 - 0
src/main/resources/mapper/financialSupervision/BusinessFsOutConfirmContractItemMapper.xml

@@ -0,0 +1,25 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsOutConfirmContractItemMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmContractItem">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_out_confirm_id" property="fsOutConfirmId" />
13
+        <result column="grain_variety_id" property="grainVarietyId" />
14
+        <result column="grain_nature_id" property="grainNatureId" />
15
+        <result column="settle_quantity" property="settleQuantity" />
16
+        <result column="settle_price" property="settlePrice" />
17
+        <result column="settle_amount" property="settleAmount" />
18
+    </resultMap>
19
+
20
+    <!-- 通用查询结果列 -->
21
+    <sql id="Base_Column_List">
22
+        id, createname, createdate, updatename, updatedate, fs_out_confirm_id, grain_variety_id, grain_nature_id, settle_quantity, settle_price, settle_amount
23
+    </sql>
24
+
25
+</mapper>

+ 23 - 0
src/main/resources/mapper/financialSupervision/BusinessFsOutConfirmDiffPriceItemMapper.xml

@@ -0,0 +1,23 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsOutConfirmDiffPriceItemMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_out_confirm_id" property="fsOutConfirmId" />
13
+        <result column="project_type" property="projectType" />
14
+        <result column="quantity" property="quantity" />
15
+        <result column="amount" property="amount" />
16
+    </resultMap>
17
+
18
+    <!-- 通用查询结果列 -->
19
+    <sql id="Base_Column_List">
20
+        id, createname, createdate, updatename, updatedate, fs_out_confirm_id, project_type, quantity, amount
21
+    </sql>
22
+
23
+</mapper>

+ 74 - 0
src/main/resources/mapper/financialSupervision/BusinessFsOutConfirmMapper.xml

@@ -0,0 +1,74 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.financialSupervision.mapper.BusinessFsOutConfirmMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirm">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="org_id" property="orgId" />
13
+        <result column="contract_id" property="contractId" />
14
+        <result column="outbound_confirmation_time" property="outboundConfirmationTime" />
15
+        <result column="outbound_confirmation_number" property="outboundConfirmationNumber" />
16
+        <result column="total_settle_quantity" property="totalSettleQuantity" />
17
+        <result column="total_settle_amount" property="totalSettleAmount" />
18
+        <result column="loan_recovery_unit" property="loanRecoveryUnit" />
19
+        <result column="loan_recovery_quantity" property="loanRecoveryQuantity" />
20
+        <result column="loan_recovery_amount" property="loanRecoveryAmount" />
21
+        <result column="loan_return_time" property="loanReturnTime" />
22
+        <result column="loan_return_amount" property="loanReturnAmount" />
23
+        <result column="invoice_unit" property="invoiceUnit" />
24
+        <result column="invoice_quantity" property="invoiceQuantity" />
25
+        <result column="invoice_unit_price" property="invoiceUnitPrice" />
26
+        <result column="invoice_amount" property="invoiceAmount" />
27
+    </resultMap>
28
+
29
+    <!-- 通用查询结果列 -->
30
+    <sql id="Base_Column_List">
31
+        id, createname, createdate, updatename, updatedate, org_id, contract_id, outbound_confirmation_time, outbound_confirmation_number, total_settle_quantity, total_settle_amount, loan_recovery_unit, loan_recovery_quantity, loan_recovery_amount, loan_return_time, loan_return_amount, invoice_unit, invoice_quantity, invoice_unit_price, invoice_amount
32
+    </sql>
33
+    <select id="selectSum" resultType="java.lang.Double">
34
+        SELECT sum(ifnull(t2.settle_quantity, 0))
35
+        FROM business_fs_out_confirm t1
36
+                 LEFT JOIN business_fs_out_confirm_contract_item t2 ON t1.id = t2.fs_out_confirm_id
37
+        where t1.contract_id = #{id}
38
+          and t2.grain_variety_id = #{grainKind}
39
+          and t2.grain_nature_id = #{grainAttribute}
40
+        GROUP BY t1.contract_id,
41
+                 t2.grain_variety_id,
42
+                 t2.grain_nature_id
43
+    </select>
44
+
45
+    <select id="selectMyPage"
46
+            resultType="com.chinaitop.depot.intelligent.financialSupervision.vo.BusinessFsOutConfirmPageVO">
47
+
48
+        SELECT
49
+        t1.id,
50
+        t1.createdate,
51
+        t4.contract_number,
52
+        ifnull( sum( t2.quantity ), 0 ) totalNum,
53
+        ifnull( sum( t2.amount ), 0 ) totalPrice,
54
+        t1.total_settle_quantity confirmNum
55
+        FROM
56
+        business_fs_out_confirm t1
57
+        LEFT JOIN business_fs_out_confirm_diff_price_item t2 ON t1.id = t2.fs_out_confirm_id
58
+        LEFT JOIN business_contract t4 ON t1.contract_id = t4.id
59
+        <where>
60
+            t1.org_id=#{orgId}
61
+            <if test="contractNumber!=null and contractNumber!=''">
62
+                and t4.contract_number like concat("%",#{contractNumber},"%")
63
+            </if>
64
+        </where>
65
+        group by t1.id
66
+        order by t1.createdate desc
67
+
68
+    </select>
69
+
70
+    <select id="selectOutboundConfirmationNumber" resultType="java.lang.String">
71
+        select outbound_confirmation_number from business_fs_out_confirm order by id desc limit 1
72
+    </select>
73
+
74
+</mapper>

+ 24 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueApprovalPriceMapper.xml

@@ -0,0 +1,24 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueApprovalPriceMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueApprovalPrice">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_sale_revenue_id" property="fsSaleRevenueId" />
13
+        <result column="grain_situation_card_id" property="grainSituationCardId" />
14
+        <result column="storage_amount" property="storageAmount" />
15
+        <result column="document_number" property="documentNumber" />
16
+        <result column="document_upload" property="documentUpload" />
17
+    </resultMap>
18
+
19
+    <!-- 通用查询结果列 -->
20
+    <sql id="Base_Column_List">
21
+        id, createname, createdate, updatename, updatedate, fs_sale_revenue_id, grain_situation_card_id, storage_amount, document_number, document_upload
22
+    </sql>
23
+
24
+</mapper>

+ 25 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueDiffPriceMapper.xml

@@ -0,0 +1,25 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueDiffPriceMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueDiffPrice">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_sale_revenue_id" property="fsSaleRevenueId" />
13
+        <result column="project_type" property="projectType" />
14
+        <result column="total_quantity" property="totalQuantity" />
15
+        <result column="province_total_quantity" property="provinceTotalQuantity" />
16
+        <result column="total_amount" property="totalAmount" />
17
+        <result column="province_total_amount" property="provinceTotalAmount" />
18
+    </resultMap>
19
+
20
+    <!-- 通用查询结果列 -->
21
+    <sql id="Base_Column_List">
22
+        id, createname, createdate, updatename, updatedate, fs_sale_revenue_id, project_type, total_quantity, province_total_quantity, total_amount, province_total_amount
23
+    </sql>
24
+
25
+</mapper>

+ 23 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueInspectionLossMapper.xml

@@ -0,0 +1,23 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueInspectionLossMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueInspectionLoss">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_sale_revenue_id" property="fsSaleRevenueId" />
13
+        <result column="qc_quality_inspection_id_out" property="qcQualityInspectionIdOut" />
14
+        <result column="qc_quality_inspection_id_in" property="qcQualityInspectionIdIn" />
15
+        <result column="gslr_loss_collect_id" property="gslrLossCollectId" />
16
+    </resultMap>
17
+
18
+    <!-- 通用查询结果列 -->
19
+    <sql id="Base_Column_List">
20
+        id, createname, createdate, updatename, updatedate, fs_sale_revenue_id, qc_quality_inspection_id_out, qc_quality_inspection_id_in, gslr_loss_collect_id
21
+    </sql>
22
+
23
+</mapper>

+ 450 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueMapper.xml

@@ -0,0 +1,450 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenue">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="org_id" property="orgId" />
13
+        <result column="report_time" property="reportTime" />
14
+        <result column="plan_type" property="planType" />
15
+        <result column="sales_unit" property="salesUnit" />
16
+        <result column="contract_id" property="contractId" />
17
+        <result column="problem_feedback" property="problemFeedback" />
18
+        <result column="status" property="status" />
19
+    </resultMap>
20
+
21
+    <!-- 通用查询结果列 -->
22
+    <sql id="Base_Column_List">
23
+        id, createname, createdate, updatename, updatedate, org_id, report_time, plan_type, sales_unit, contract_id, problem_feedback, status
24
+    </sql>
25
+    <select id="getContractInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessContract">
26
+        SELECT
27
+            id,
28
+            contract_number contractNumber,
29
+            contract_title contractTitle,
30
+            signing_time signingTime,
31
+            attachment
32
+        FROM
33
+          business_contract
34
+        WHERE
35
+          audit_state = 2
36
+        AND in_application != 3
37
+        AND in_application != 4
38
+        AND contract_type = 3148
39
+        AND org_id = #{orgId}
40
+    </select>
41
+    <select id="getContractInfoList" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessContractDetail">
42
+        SELECT
43
+            swd.id,
44
+            bs.storehouse_name houseName,
45
+            bw.warehouse_name warehouseName,
46
+            swd.grain_kind grainKind,
47
+            be.enumname grainKindName,
48
+            swd.in_count inCount,
49
+            swd.in_price inPrice,
50
+            swd.in_detail_total_price inDetailTotalPrice
51
+        FROM
52
+            business_store_ware_detail swd
53
+        LEFT JOIN basic_enum be ON be.enumId = swd.grain_kind
54
+        LEFT JOIN basic_storehouse bs ON swd.house_id = bs.storehouse_id
55
+        LEFT JOIN basic_warehouse bw ON swd.warehouse_id = bw.warehouse_id
56
+        WHERE
57
+            swd.zid = #{id}
58
+    </select>
59
+    <select id="getQualityInfo" parameterType="map" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueInspectionLoss">
60
+        SELECT
61
+            t1.qcQualityInspectionIdIn,
62
+            t1.zjbgdhIn,
63
+            t1.storehouseName,
64
+            t1.warehouseName,
65
+            t1.zzIn,
66
+            t1.sfIn,
67
+            t2.qcQualityInspectionIdOut,
68
+            t2.zjbgdhOut,
69
+            t2.zzOut,
70
+            t2.sfOut,
71
+            t3.gslrLossCollectId,
72
+            t3.actualLossQuantity,
73
+            t3.quotaLoss,
74
+            t3.naturalLoss,
75
+            t3.moistureLoss,
76
+            t3.impurityReductionQuality,
77
+            t3.excessLossQuantity,
78
+            t3.lossProfitReason
79
+        FROM
80
+        (
81
+        SELECT
82
+                qi.id qcQualityInspectionIdIn,
83
+                qi.org_id,
84
+                qi.zjbgdh zjbgdhIn,
85
+                bs.storehouse_name storehouseName,
86
+                bw.warehouse_name warehouseName,
87
+                SUM(CASE WHEN qii.inspection_item_id = 7619 THEN qii.inspection_value ELSE 0 END) zzIn,
88
+                SUM(CASE WHEN qii.inspection_item_id = 9528239 THEN qii.inspection_value ELSE 0 END) sfIn
89
+        FROM
90
+                business_qc_quality_inspection qi
91
+        LEFT JOIN basic_storehouse bs ON qi.basic_storehouse_id = bs.storehouse_id
92
+        LEFT JOIN basic_warehouse bw ON qi.warehouse_id = bw.warehouse_id
93
+        LEFT JOIN business_qc_quality_inspection_item qii ON qi.id = qii.qc_quality_inspection_id
94
+        WHERE
95
+                qi.jylb = '01'
96
+        AND qi.org_id = #{orgId}
97
+        AND qi.basic_storehouse_id = #{basicStorehouseId}
98
+        AND qi.warehouse_id = #{warehouseId}
99
+        ORDER BY qi.createdate DESC
100
+        ) t1 INNER JOIN
101
+        (
102
+        SELECT
103
+                qi.id qcQualityInspectionIdOut,
104
+                qi.org_id,
105
+                qi.zjbgdh zjbgdhOut,
106
+                bs.storehouse_name storehouseName,
107
+                bw.warehouse_name warehouseName,
108
+                SUM(CASE WHEN qii.inspection_item_id = 7619 THEN qii.inspection_value ELSE 0 END) zzOut,
109
+                SUM(CASE WHEN qii.inspection_item_id = 9528239 THEN qii.inspection_value ELSE 0 END) sfOut
110
+        FROM
111
+                business_qc_quality_inspection qi
112
+        LEFT JOIN basic_storehouse bs ON qi.basic_storehouse_id = bs.storehouse_id
113
+        LEFT JOIN basic_warehouse bw ON qi.warehouse_id = bw.warehouse_id
114
+        LEFT JOIN business_qc_quality_inspection_item qii ON qi.id = qii.qc_quality_inspection_id
115
+        WHERE
116
+                qi.jylb = '02'
117
+        AND qi.org_id = #{orgId}
118
+        AND qi.basic_storehouse_id = #{basicStorehouseId}
119
+        AND qi.warehouse_id = #{warehouseId}
120
+        ORDER BY qi.createdate DESC
121
+        ) t2 ON t1.org_id = t2.org_id
122
+        INNER JOIN
123
+        (
124
+        SELECT
125
+            lc.id gslrLossCollectId,
126
+            lc.org_id,
127
+            lc.actual_loss_quantity actualLossQuantity,
128
+            (
129
+                lc.natural_loss + lc.moisture_loss + lc.impurity_reduction_quality
130
+            ) quotaLoss,
131
+            lc.natural_loss naturalLoss,
132
+            lc.moisture_loss moistureLoss,
133
+            lc.impurity_reduction_quality impurityReductionQuality,
134
+            lc.excess_loss_quantity excessLossQuantity,
135
+            lc.loss_profit_reason lossProfitReason
136
+        FROM
137
+            business_gslr_loss_collect lc
138
+        WHERE
139
+            lc.org_id = #{orgId}
140
+        AND lc.basic_storehouse_id = #{basicStorehouseId}
141
+        AND lc.warehouse_id = #{warehouseId}
142
+        ORDER BY lc.createdate DESC
143
+        ) t3 ON t1.org_id = t3.org_id
144
+        LIMIT 1
145
+    </select>
146
+    <select id="getConsistenceAccountInfo" parameterType="string" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistenceAccount">
147
+        SELECT
148
+            YEAR (fa.statistical_date) `year`,
149
+            MONTH (fa.statistical_date) `month`,
150
+            fa.voucher_number voucherNumber,
151
+            fa.quantity accountingQuantity,
152
+            fa.unit_price unitPrice,
153
+            fa.amount accountingAmount
154
+        FROM
155
+            business_fs_account fa
156
+        LEFT JOIN business_contract bc ON fa.contract_id = bc.id
157
+        WHERE
158
+            fa.type = 2
159
+        AND bc.contract_number = #{contractNumber}
160
+    </select>
161
+    <select id="getOutStorageInfo" parameterType="string" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistence">
162
+        SELECT
163
+            YEAR (ci.createdate) `year`,
164
+            MONTH (ci.createdate) `month`,
165
+            ci.basic_storehouse_id basicStorehouseId,
166
+            ci.warehouse_id warehouseId,
167
+            bs.storehouse_name storehouseName,
168
+            bw.warehouse_name warehouseName,
169
+            IFNULL(lc.actual_loss_quantity, 0) loss,
170
+            IFNULL(cd.klhjz, 0) custodyAccountQuantity,
171
+            IFNULL(sa.expenditure_quantity, 0) statisticalAccountQuantity,
172
+            cd.djsj completeTime
173
+        FROM
174
+            business_fs_out_confirm oc
175
+        LEFT JOIN business_fs_out_confirm_contract_item ci ON ci.fs_out_confirm_id = oc.id
176
+        LEFT JOIN business_contract bc ON bc.id = oc.contract_id
177
+        LEFT JOIN basic_storehouse bs ON ci.basic_storehouse_id = bs.storehouse_id
178
+        LEFT JOIN basic_warehouse bw ON ci.warehouse_id = bw.warehouse_id
179
+        LEFT JOIN (
180
+            SELECT
181
+                SUM(lcIn.actual_loss_quantity) actual_loss_quantity,
182
+                YEAR (lcIn.outbound_time) `year`,
183
+                MONTH (lcIn.outbound_time) `month`
184
+            FROM
185
+                business_gslr_loss_collect lcIn
186
+            GROUP BY
187
+                YEAR (lcIn.outbound_time),
188
+                MONTH (lcIn.outbound_time)
189
+        ) lc ON YEAR (ci.createdate) = lc. YEAR
190
+        AND MONTH (ci.createdate) = lc. MONTH
191
+        LEFT JOIN (
192
+            SELECT
193
+                cdIn.htbh,
194
+                cdIn2.klhjz,
195
+                cdIn2.sjhwh,
196
+                cdIn2.xldd,
197
+                cdIn.djsj,
198
+                YEAR (cdIn.djsj) `year`,
199
+                MONTH (cdIn.djsj) `month`
200
+            FROM
201
+                data_crkyw_ckrmdj_default cdIn
202
+            LEFT JOIN data_crkyw_ckcmz_default cdIn2 ON cdIn.BizNo = cdIn2.BizNo
203
+            GROUP BY
204
+                YEAR (cdIn.djsj),
205
+                MONTH (cdIn.djsj)
206
+        ) cd ON YEAR (ci.createdate) = cd. YEAR
207
+        AND MONTH (ci.createdate) = cd. MONTH
208
+        LEFT JOIN (
209
+            SELECT
210
+                SUM(saIn.expenditure_quantity) expenditure_quantity,
211
+                YEAR (saIn.statistical_date) `year`,
212
+                MONTH (saIn.statistical_date) `month`
213
+            FROM
214
+                business_fs_statistical_account saIn
215
+            LEFT JOIN business_contract bcIn ON saIn.contract_id = bcIn.id
216
+            GROUP BY
217
+                YEAR (saIn.statistical_date),
218
+                MONTH (saIn.statistical_date)
219
+        ) sa ON YEAR (ci.createdate) = sa. YEAR
220
+        AND MONTH (ci.createdate) = sa. MONTH
221
+        WHERE
222
+            bc.contract_number = #{contractNumber}
223
+    </select>
224
+    <select id="getOutStorageDetailed" parameterType="string" resultType="com.chinaitop.depot.intelligent.priceApproval.model.DataCPZ">
225
+        SELECT
226
+            cdIn.htbh,
227
+            cdIn2.sjckchmc storehouseName,
228
+            cdIn2.sjhwhmc warehouseName,
229
+            cdIn.cph,
230
+            cdIn2.mz mzzl,
231
+            cdIn3.pz,
232
+            cdIn2.klhjz bzwkl,
233
+            cdIn.djsj cpzsj
234
+        FROM
235
+            data_crkyw_ckrmdj_default cdIn
236
+        LEFT JOIN data_crkyw_ckcmz_default cdIn2 ON cdIn.BizNo = cdIn2.BizNo
237
+        LEFT JOIN data_crkyw_ckcpz_default cdIn3 ON cdIn.BizNo = cdIn3.BizNo
238
+        WHERE
239
+            cdIn.htbh = #{contractNumber}
240
+    </select>
241
+    <select id="getSettlementInfo" parameterType="string" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueSettle">
242
+        SELECT
243
+            oc.id fsOutConfirmId,
244
+            oi.org_name orgName,
245
+            (
246
+                oc.total_settle_quantity / 1000
247
+            ) provinceTotalSettleQuantity,
248
+            oc.total_settle_amount provinceTotalSettleAmount,
249
+            oc.loan_return_time loanReturnTime,
250
+            oc.loan_recovery_unit provinceLoanRecoveryUnit,
251
+            oc.loan_recovery_quantity provinceLoanRecoveryQuantity,
252
+            oc.loan_recovery_amount provinceLoanRecoveryAmount,
253
+            oc.invoice_unit provinceInvoiceUnit,
254
+            oc.invoice_quantity provinceInvoiceQuantity,
255
+            oc.invoice_unit_price provinceInvoiceUnitPrice,
256
+            oc.invoice_amount provinceInvoiceAmount,
257
+            oc.loan_return_time provinceLoanReturnTime,
258
+            oc.loan_return_amount provinceLoanReturnAmount
259
+        FROM
260
+            business_fs_out_confirm oc
261
+        LEFT JOIN business_contract bc ON bc.id = oc.contract_id
262
+        LEFT JOIN org_info oi ON oc.org_id = oi.org_id
263
+        WHERE
264
+            bc.contract_number = #{contractNumber}
265
+    </select>
266
+    <select id="getDiffPriceInfo" parameterType="string" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueDiffPrice">
267
+        SELECT
268
+            dpi.project_type projectType,
269
+            IFNULL(dpi.quantity,0) totalQuantity,
270
+	        IFNULL(dpi.amount,0) totalAmount
271
+        FROM
272
+            business_fs_out_confirm_diff_price_item dpi
273
+        LEFT JOIN business_fs_out_confirm oc ON dpi.fs_out_confirm_id = oc.id
274
+        LEFT JOIN business_contract bc ON bc.id = oc.contract_id
275
+        WHERE
276
+            bc.contract_number = #{contractNumber}
277
+    </select>
278
+    <select id="getCardInfo" parameterType="map" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueApprovalPrice">
279
+        SELECT
280
+            sc.id grainSituationCardId,
281
+            bs.storehouse_name storehouseName,
282
+            bw.warehouse_name warehouseName,
283
+            sc.lssl,
284
+            sc.in_financial_verification inNinancialVerification,
285
+            (
286
+                sc.in_financial_verification * sc.lssl
287
+            ) storageAmount
288
+        FROM
289
+            grain_situation_card sc
290
+        LEFT JOIN basic_storehouse bs ON bs.storehouse_id = sc.basic_storehouse_id
291
+        LEFT JOIN basic_warehouse bw ON sc.warehouse_id = bw.warehouse_id
292
+        WHERE
293
+            sc.fill_org_id = #{orgId}
294
+        AND sc.basic_storehouse_id = #{basicStorehouseId}
295
+        AND sc.warehouse_id = #{warehouseId}
296
+        ORDER BY
297
+            sc.createdate
298
+        LIMIT 1
299
+    </select>
300
+    <select id="getConsistenceAccountDetailsInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistenceAccount">
301
+        SELECT
302
+            tcc.id,
303
+            tcc. YEAR,
304
+            tcc. MONTH,
305
+            tcc.accounting_quantity accountingQuantity,
306
+            tcc.accounting_amount accountingAmount
307
+        FROM
308
+            business_fs_sale_revenue_three_consistence_account tcc
309
+        LEFT JOIN business_fs_sale_revenue sr ON sr.id = tcc.fs_sale_revenue_id
310
+        WHERE
311
+            tcc.fs_sale_revenue_id = #{id}
312
+    </select>
313
+    <select id="getQualityDetailsInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueInspectionLoss">
314
+        SELECT
315
+            il.id,
316
+            il.qc_quality_inspection_id_out,
317
+            il.qc_quality_inspection_id_in,
318
+            bs.storehouse_name storehouseName,
319
+            bw.warehouse_name warehouseName,
320
+            t1.zzIn,
321
+            t1.sfIn,
322
+            t2.zzOut,
323
+            t2.sfOut,
324
+            il.gslr_loss_collect_id gslrLossCollectId,
325
+            lc.actual_loss_quantity actualLossQuantity,
326
+            (
327
+                lc.natural_loss + lc.moisture_loss + lc.impurity_reduction_quality
328
+            ) quotaLoss,
329
+            lc.natural_loss naturalLoss,
330
+            lc.moisture_loss moistureLoss,
331
+            lc.impurity_reduction_quality impurityReductionQuality,
332
+            lc.excess_loss_quantity excessLossQuantity,
333
+            lc.loss_profit_reason lossProfitReason
334
+        FROM
335
+            business_fs_sale_revenue_inspection_loss il
336
+        LEFT JOIN business_gslr_loss_collect lc ON lc.id = il.gslr_loss_collect_id
337
+        LEFT JOIN basic_storehouse bs ON lc.basic_storehouse_id = bs.storehouse_id
338
+        LEFT JOIN basic_warehouse bw ON lc.warehouse_id = bw.warehouse_id
339
+        LEFT JOIN
340
+        (
341
+        SELECT
342
+            qi.id,
343
+            SUM(CASE WHEN qii.inspection_item_id = 7619 THEN qii.inspection_value ELSE 0 END) zzIn,
344
+          SUM(CASE WHEN qii.inspection_item_id = 9528239 THEN qii.inspection_value ELSE 0 END) sfIn
345
+        FROM
346
+            business_fs_sale_revenue_inspection_loss il
347
+        LEFT JOIN business_qc_quality_inspection qi ON il.qc_quality_inspection_id_out = qi.id
348
+        LEFT JOIN business_qc_quality_inspection_item qii ON qi.id = qii.qc_quality_inspection_id
349
+        ) t1 ON il.qc_quality_inspection_id_in = t1.id
350
+        LEFT JOIN
351
+        (
352
+        SELECT
353
+            qi.id,
354
+            SUM(CASE WHEN qii.inspection_item_id = 7619 THEN qii.inspection_value ELSE 0 END) zzOut,
355
+          SUM(CASE WHEN qii.inspection_item_id = 9528239 THEN qii.inspection_value ELSE 0 END) sfOut
356
+        FROM
357
+            business_fs_sale_revenue_inspection_loss il
358
+        LEFT JOIN business_qc_quality_inspection qi ON il.qc_quality_inspection_id_out = qi.id
359
+        LEFT JOIN business_qc_quality_inspection_item qii ON qi.id = qii.qc_quality_inspection_id
360
+        ) t2 ON il.qc_quality_inspection_id_out = t2.id
361
+        WHERE
362
+            il.fs_sale_revenue_id = #{id}
363
+    </select>
364
+    <select id="getOutStorageDetailsInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistence">
365
+        SELECT
366
+            tc.id,
367
+            tc.`year`,
368
+            tc.`month`,
369
+            tc.basic_storehouse_id,
370
+            tc.warehouse_id,
371
+            bs.storehouse_name storehouseName,
372
+            bw.warehouse_name warehouseName,
373
+            tc.loss,
374
+            tc.custody_account_quantity,
375
+            tc.statistical_account_quantity,
376
+            tc.complete_time
377
+        FROM
378
+            business_fs_sale_revenue_three_consistence tc
379
+        LEFT JOIN basic_storehouse bs ON tc.basic_storehouse_id = bs.storehouse_id
380
+        LEFT JOIN basic_warehouse bw ON tc.warehouse_id = bw.warehouse_id
381
+        WHERE
382
+            tc.fs_sale_revenue_id = #{id}
383
+    </select>
384
+    <select id="getSettlementDetailsInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueSettle">
385
+        SELECT
386
+            rs.id,
387
+            rs.province_acceptance_unit,
388
+            rs.province_total_settle_quantity,
389
+            rs.province_total_settle_amount,
390
+            rs.province_loan_return_time loanReturnTime,
391
+            rs.province_loan_recovery_unit provinceLoanRecoveryUnit,
392
+            rs.province_loan_recovery_quantity provinceLoanRecoveryQuantity,
393
+            rs.province_loan_recovery_amount provinceLoanRecoveryAmount,
394
+            rs.province_invoice_unit provinceInvoiceUnit,
395
+            rs.province_invoice_quantity provinceInvoiceQuantity,
396
+            rs.province_invoice_unit_price provinceInvoiceUnitPrice,
397
+            rs.province_invoice_amount provinceInvoiceAmount,
398
+            rs.province_loan_return_time provinceLoanReturnTime,
399
+            rs.province_loan_return_amount provinceLoanReturnAmount
400
+        FROM
401
+            business_fs_sale_revenue_settle rs
402
+        WHERE
403
+            rs.fs_sale_revenue_id = #{id}
404
+    </select>
405
+    <select id="getCardDetailsInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueApprovalPrice">
406
+        SELECT
407
+            ap.id,
408
+            sc.basic_storehouse_id storehouseId,
409
+            bs.storehouse_name storehouseName,
410
+            sc.warehouse_id warehouseId,
411
+            bw.warehouse_name warehouseName,
412
+            sc.lssl,
413
+            sc.in_financial_verification inNinancialVerification,
414
+            ap.storage_amount storageAmount,
415
+            ap.document_number,
416
+            ap.document_upload
417
+        FROM
418
+            business_fs_sale_revenue_approval_price ap
419
+        LEFT JOIN grain_situation_card sc ON ap.grain_situation_card_id = sc.id
420
+        LEFT JOIN basic_storehouse bs ON sc.basic_storehouse_id = bs.storehouse_id
421
+        LEFT JOIN basic_warehouse bw ON sc.warehouse_id = bw.warehouse_id
422
+        WHERE
423
+            ap.fs_sale_revenue_id = #{id}
424
+    </select>
425
+    <select id="getDiffPriceDetailsInfo" parameterType="integer" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueDiffPrice">
426
+        SELECT
427
+            dp.id,
428
+            dp.project_type projectType,
429
+            dp.total_quantity totalQuantity,
430
+            dp.total_amount totalAmount
431
+        FROM
432
+            business_fs_sale_revenue_diff_price dp
433
+        WHERE
434
+            dp.fs_sale_revenue_id = #{id}
435
+    </select>
436
+    <select id="selectPageList" parameterType="com.baomidou.mybatisplus.core.conditions.Wrapper" resultType="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenue">
437
+        SELECT
438
+            sr.id,
439
+            bc.contract_number contractNumber,
440
+            bc.grain_quantity grainQuantity,
441
+            bc.money_quantity moneyQuantity,
442
+            bc.performance_quantity performanceQuantity,
443
+            sr.createdate,
444
+            sr.`status`
445
+        FROM
446
+            business_fs_sale_revenue sr
447
+        LEFT JOIN business_contract bc ON sr.contract_id = bc.id
448
+        ${ew.customSqlSegment}
449
+    </select>
450
+</mapper>

+ 33 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueSettleMapper.xml

@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueSettleMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueSettle">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_sale_revenue_id" property="fsSaleRevenueId" />
13
+        <result column="fs_out_confirm_id" property="fsOutConfirmId" />
14
+        <result column="province_acceptance_unit" property="provinceAcceptanceUnit" />
15
+        <result column="province_total_settle_quantity" property="provinceTotalSettleQuantity" />
16
+        <result column="province_total_settle_amount" property="provinceTotalSettleAmount" />
17
+        <result column="province_loan_recovery_unit" property="provinceLoanRecoveryUnit" />
18
+        <result column="province_loan_recovery_quantity" property="provinceLoanRecoveryQuantity" />
19
+        <result column="province_loan_recovery_amount" property="provinceLoanRecoveryAmount" />
20
+        <result column="province_invoice_unit" property="provinceInvoiceUnit" />
21
+        <result column="province_invoice_quantity" property="provinceInvoiceQuantity" />
22
+        <result column="province_invoice_unit_price" property="provinceInvoiceUnitPrice" />
23
+        <result column="province_invoice_amount" property="provinceInvoiceAmount" />
24
+        <result column="province_loan_return_time" property="provinceLoanReturnTime" />
25
+        <result column="province_loan_return_amount" property="provinceLoanReturnAmount" />
26
+    </resultMap>
27
+
28
+    <!-- 通用查询结果列 -->
29
+    <sql id="Base_Column_List">
30
+        id, createname, createdate, updatename, updatedate, fs_sale_revenue_id, fs_out_confirm_id, province_acceptance_unit, province_total_settle_quantity, province_total_settle_amount, province_loan_recovery_unit, province_loan_recovery_quantity, province_loan_recovery_amount, province_invoice_unit, province_invoice_quantity, province_invoice_unit_price, province_invoice_amount, province_loan_return_time, province_loan_return_amount
31
+    </sql>
32
+
33
+</mapper>

+ 26 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueThreeConsistenceAccountMapper.xml

@@ -0,0 +1,26 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueThreeConsistenceAccountMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistenceAccount">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_sale_revenue_id" property="fsSaleRevenueId" />
13
+        <result column="year" property="year" />
14
+        <result column="month" property="month" />
15
+        <result column="accounting_quantity" property="accountingQuantity" />
16
+        <result column="province_accounting_quantity" property="provinceAccountingQuantity" />
17
+        <result column="accounting_amount" property="accountingAmount" />
18
+        <result column="province_accounting_amount" property="provinceAccountingAmount" />
19
+    </resultMap>
20
+
21
+    <!-- 通用查询结果列 -->
22
+    <sql id="Base_Column_List">
23
+        id, createname, createdate, updatename, updatedate, fs_sale_revenue_id, year, month, accounting_quantity, province_accounting_quantity, accounting_amount, province_accounting_amount
24
+    </sql>
25
+
26
+</mapper>

+ 38 - 0
src/main/resources/mapper/priceApproval/BusinessFsSaleRevenueThreeConsistenceMapper.xml

@@ -0,0 +1,38 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.intelligent.priceApproval.mapper.BusinessFsSaleRevenueThreeConsistenceMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.priceApproval.model.BusinessFsSaleRevenueThreeConsistence">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="fs_sale_revenue_id" property="fsSaleRevenueId" />
13
+        <result column="year" property="year" />
14
+        <result column="month" property="month" />
15
+        <result column="basic_storehouse_id" property="basicStorehouseId" />
16
+        <result column="warehouse_id" property="warehouseId" />
17
+        <result column="loss" property="loss" />
18
+        <result column="province_loss" property="provinceLoss" />
19
+        <result column="custody_account_quantity" property="custodyAccountQuantity" />
20
+        <result column="province_custody_account_quantity" property="provinceCustodyAccountQuantity" />
21
+        <result column="statistical_account_quantity" property="statisticalAccountQuantity" />
22
+        <result column="province_statistical_account_quantity" property="provinceStatisticalAccountQuantity" />
23
+        <result column="complete_time" property="completeTime" />
24
+        <result column="province_complete_time" property="provinceCompleteTime" />
25
+        <result column="accounting_quantity" property="accountingQuantity" />
26
+        <result column="province_accounting_quantity" property="provinceAccountingQuantity" />
27
+        <result column="accounting_unit_price" property="accountingUnitPrice" />
28
+        <result column="province_accounting_unit_price" property="provinceAccountingUnitPrice" />
29
+        <result column="accounting_amount" property="accountingAmount" />
30
+        <result column="province_accounting_amount" property="provinceAccountingAmount" />
31
+    </resultMap>
32
+
33
+    <!-- 通用查询结果列 -->
34
+    <sql id="Base_Column_List">
35
+        id, createname, createdate, updatename, updatedate, fs_sale_revenue_id, year, month, basic_storehouse_id, warehouse_id, loss, province_loss, custody_account_quantity, province_custody_account_quantity, statistical_account_quantity, province_statistical_account_quantity, complete_time, province_complete_time, accounting_quantity, province_accounting_quantity, accounting_unit_price, province_accounting_unit_price, accounting_amount, province_accounting_amount
36
+    </sql>
37
+
38
+</mapper>

+ 1 - 0
src/main/resources/mapper/priceApproval/BusinessFsStoragePriceApprovalMapper.xml

@@ -35,6 +35,7 @@
35 35
             audit_state = 2
36 36
         AND in_application != 3
37 37
         AND in_application != 4
38
+        AND contract_type = 3147
38 39
         <if test="orgId != null and orgId != ''">
39 40
             AND org_id = #{orgId}
40 41
         </if>