Browse Source

修改返回参数

hanqingsong 4 months ago
parent
commit
d126433d03

+ 27 - 1
src/main/java/com/chinaitop/depot/intelligent/priceApproval/controller/BusinessFsSaleRevenueController.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.intelligent.priceApproval.controller;
2 2
 
3 3
 
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.chinaitop.depot.intelligent.common.ResponseEntity;
5 6
 import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
6 7
 import com.chinaitop.depot.intelligent.priceApproval.model.*;
@@ -80,7 +81,7 @@ public class BusinessFsSaleRevenueController {
80 81
 
81 82
     @GetMapping("/getCardInfo/{orgId}/{basicStorehouseId}/{warehouseId}")
82 83
     @ApiOperation(value = "原核定入库价格", notes = "原核定入库价格")
83
-    public ResponseEntity<List<BusinessFsSaleRevenueApprovalPrice>> getCardInfo(@PathVariable("orgId") Integer orgId,
84
+    public ResponseEntity<BusinessFsSaleRevenueApprovalPrice> getCardInfo(@PathVariable("orgId") Integer orgId,
84 85
                                                                      @PathVariable("basicStorehouseId") Integer basicStorehouseId,
85 86
                                                                      @PathVariable("warehouseId") Integer warehouseId) {
86 87
         return ResponseEntity.ok(saleRevenueService.getCardInfo(orgId, basicStorehouseId, warehouseId));
@@ -93,4 +94,29 @@ public class BusinessFsSaleRevenueController {
93 94
         return ResponseEntity.ok();
94 95
     }
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
+    }
96 122
 }

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

@@ -34,5 +34,5 @@ public interface BusinessFsSaleRevenueMapper extends BaseMapper<BusinessFsSaleRe
34 34
 
35 35
     List<BusinessFsSaleRevenueDiffPrice> getDiffPriceInfo(@Param("contractNumber") String contractNumber);
36 36
 
37
-    List<BusinessFsSaleRevenueApprovalPrice> getCardInfo(Map<String, Object> map);
37
+    BusinessFsSaleRevenueApprovalPrice getCardInfo(Map<String, Object> map);
38 38
 }

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

@@ -77,6 +77,10 @@ public class BusinessFsSaleRevenue implements Serializable {
77 77
     @TableField("status")
78 78
     private Integer status;
79 79
 
80
+    @ApiModelProperty(value = "合同信息")
81
+    @TableField(exist = false)
82
+    private List<BusinessContractDetail> contractDetails;
83
+
80 84
     @ApiModelProperty(value = "质检损益信息")
81 85
     @TableField(exist = false)
82 86
     private List<BusinessFsSaleRevenueInspectionLoss> inspectionLossList;

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

+ 10 - 1
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/BusinessFsSaleRevenueService.java

@@ -1,5 +1,6 @@
1 1
 package com.chinaitop.depot.intelligent.priceApproval.service;
2 2
 
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
3 4
 import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
4 5
 import com.chinaitop.depot.intelligent.priceApproval.model.*;
5 6
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -34,5 +35,13 @@ public interface BusinessFsSaleRevenueService extends IService<BusinessFsSaleRev
34 35
 
35 36
     List<BusinessFsSaleRevenueDiffPrice> getDiffPriceInfo(String contractNumber);
36 37
 
37
-    List<BusinessFsSaleRevenueApprovalPrice> getCardInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId);
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);
38 47
 }

+ 37 - 1
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueServiceImpl.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.intelligent.priceApproval.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.chinaitop.depot.intelligent.financialSupervision.model.BusinessFsOutConfirmDiffPriceItem;
5 6
 import com.chinaitop.depot.intelligent.priceApproval.mapper.*;
6 7
 import com.chinaitop.depot.intelligent.priceApproval.model.*;
@@ -102,7 +103,7 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
102 103
     }
103 104
 
104 105
     @Override
105
-    public List<BusinessFsSaleRevenueApprovalPrice> getCardInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId) {
106
+    public BusinessFsSaleRevenueApprovalPrice getCardInfo(Integer orgId, Integer basicStorehouseId, Integer warehouseId) {
106 107
         Map<String, Object> map = new HashMap<>();
107 108
         map.put("orgId", orgId);
108 109
         map.put("basicStorehouseId", basicStorehouseId);
@@ -110,6 +111,41 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
110 111
         return saleRevenueMapper.getCardInfo(map);
111 112
     }
112 113
 
114
+    @Override
115
+    @Transactional(rollbackFor = Exception.class)
116
+    public void updateData(BusinessFsSaleRevenue param) {
117
+
118
+    }
119
+
120
+    @Override
121
+    public BusinessFsSaleRevenue detailsData(Integer id) {
122
+        // 查询主表
123
+        BusinessFsSaleRevenue saleRevenue = saleRevenueMapper.selectById(id);
124
+        // 查询子表-质检损益信息
125
+        List<BusinessContractDetail> contractInfoList = this.getContractInfoList(saleRevenue.getContractId());
126
+        if (CollectionUtils.isNotEmpty(contractInfoList)) {
127
+            saleRevenue.setContractDetails(contractInfoList);
128
+        }
129
+        // 查询子表-三账一致性-会计账
130
+        // 查询子表-三账一致性-实际出库情况
131
+        // 查询子表-结算信息
132
+        // 查询子表-原核定入库价格
133
+        // 查询子表-差价上缴
134
+
135
+        return null;
136
+    }
137
+
138
+    @Override
139
+    public Page<BusinessFsSaleRevenue> selectPageList(BusinessFsSaleRevenuePage param) {
140
+        return null;
141
+    }
142
+
143
+    @Override
144
+    @Transactional(rollbackFor = Exception.class)
145
+    public void deleteData(Integer id) {
146
+
147
+    }
148
+
113 149
     // 保存子表-质检损益信息
114 150
     private void saveInspectionLoss(BusinessFsSaleRevenue param) {
115 151
         if (CollectionUtils.isNotEmpty(param.getInspectionLossList())) {

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

@@ -286,5 +286,8 @@
286 286
             sc.fill_org_id = #{orgId}
287 287
         AND sc.basic_storehouse_id = #{basicStorehouseId}
288 288
         AND sc.warehouse_id = #{warehouseId}
289
+        ORDER BY
290
+            sc.createdate
291
+        LIMIT 1
289 292
     </select>
290 293
 </mapper>