Browse Source

set省平台数据

hanqingsong 7 months ago
parent
commit
914af3f24c

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

@@ -87,7 +87,7 @@ public class BusinessFsSaleRevenueController {
87
     }
87
     }
88
 
88
 
89
     @PostMapping("/save")
89
     @PostMapping("/save")
90
-    @ApiOperation(value = "销售收入上缴新增*", notes = "新增")
90
+    @ApiOperation(value = "销售收入上缴新增", notes = "新增")
91
     public ResponseEntity save(@Validated @RequestBody BusinessFsSaleRevenue param) {
91
     public ResponseEntity save(@Validated @RequestBody BusinessFsSaleRevenue param) {
92
         saleRevenueService.saveData(param);
92
         saleRevenueService.saveData(param);
93
         return ResponseEntity.ok();
93
         return ResponseEntity.ok();

+ 26 - 2
src/main/java/com/chinaitop/depot/intelligent/priceApproval/service/impl/BusinessFsSaleRevenueServiceImpl.java

@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
10
 import org.springframework.transaction.annotation.Transactional;
10
 import org.springframework.transaction.annotation.Transactional;
11
 
11
 
12
 import javax.annotation.Resource;
12
 import javax.annotation.Resource;
13
+import java.math.BigDecimal;
13
 import java.util.HashMap;
14
 import java.util.HashMap;
14
 import java.util.List;
15
 import java.util.List;
15
 import java.util.Map;
16
 import java.util.Map;
@@ -44,8 +45,10 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
44
         saleRevenueMapper.insert(param);
45
         saleRevenueMapper.insert(param);
45
         // 保存子表-质检损益信息
46
         // 保存子表-质检损益信息
46
         this.saveInspectionLoss(param);
47
         this.saveInspectionLoss(param);
47
-        // 保存子表-三账一致性
48
+        // 保存子表-三账一致性-会计账
48
         this.saveThreeConsistence(param);
49
         this.saveThreeConsistence(param);
50
+        // 保存子表-三账一致性-实际出库情况
51
+        this.saveOutStorage(param);
49
         // 保存子表-结算信息
52
         // 保存子表-结算信息
50
         this.saveSettle(param);
53
         this.saveSettle(param);
51
         // 保存子表-原核定入库价格
54
         // 保存子表-原核定入库价格
@@ -117,15 +120,34 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
117
         }
120
         }
118
     }
121
     }
119
 
122
 
120
-    // 保存子表-三账一致性
123
+    // 保存子表-三账一致性-会计账
121
     private void saveThreeConsistence(BusinessFsSaleRevenue param) {
124
     private void saveThreeConsistence(BusinessFsSaleRevenue param) {
122
         if (CollectionUtils.isNotEmpty(param.getThreeConsistenceList())) {
125
         if (CollectionUtils.isNotEmpty(param.getThreeConsistenceList())) {
123
             param.getThreeConsistenceList().forEach(threeConsistence -> {
126
             param.getThreeConsistenceList().forEach(threeConsistence -> {
124
                 threeConsistence.setFsSaleRevenueId(param.getId());
127
                 threeConsistence.setFsSaleRevenueId(param.getId());
128
+                threeConsistence.setProvinceAccountingQuantity(threeConsistence.getAccountingQuantity());
129
+                threeConsistence.setAccountingUnitPrice(new BigDecimal(0));
130
+                threeConsistence.setProvinceAccountingUnitPrice(new BigDecimal(0));
131
+                threeConsistence.setProvinceAccountingAmount(threeConsistence.getAccountingAmount());
125
                 threeConsistenceMapper.insert(threeConsistence);
132
                 threeConsistenceMapper.insert(threeConsistence);
126
             });
133
             });
127
         }
134
         }
128
     }
135
     }
136
+
137
+    // 保存子表-三账一致性-实际出库情况
138
+    private void saveOutStorage(BusinessFsSaleRevenue param) {
139
+        if (CollectionUtils.isNotEmpty(param.getThreeConsistenceList())) {
140
+            param.getThreeConsistenceList().forEach(threeConsistence -> {
141
+                threeConsistence.setFsSaleRevenueId(param.getId());
142
+                threeConsistence.setProvinceLoss(threeConsistence.getLoss());
143
+                threeConsistence.setProvinceCustodyAccountQuantity(threeConsistence.getCustodyAccountQuantity().toString());
144
+                threeConsistence.setProvinceStatisticalAccountQuantity(threeConsistence.getStatisticalAccountQuantity());
145
+                threeConsistence.setProvinceCompleteTime(threeConsistence.getCompleteTime());
146
+                threeConsistenceMapper.insert(threeConsistence);
147
+            });
148
+        }
149
+    }
150
+
129
     // 保存子表-结算信息
151
     // 保存子表-结算信息
130
     private void saveSettle(BusinessFsSaleRevenue param) {
152
     private void saveSettle(BusinessFsSaleRevenue param) {
131
         if (CollectionUtils.isNotEmpty(param.getRevenueSettleList())) {
153
         if (CollectionUtils.isNotEmpty(param.getRevenueSettleList())) {
@@ -149,6 +171,8 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
149
         if (CollectionUtils.isNotEmpty(param.getDiffPriceList())) {
171
         if (CollectionUtils.isNotEmpty(param.getDiffPriceList())) {
150
             param.getDiffPriceList().forEach(diffPrice -> {
172
             param.getDiffPriceList().forEach(diffPrice -> {
151
                 diffPrice.setFsSaleRevenueId(param.getId());
173
                 diffPrice.setFsSaleRevenueId(param.getId());
174
+                diffPrice.setProvinceTotalQuantity(diffPrice.getTotalQuantity());
175
+                diffPrice.setProvinceTotalAmount(diffPrice.getTotalAmount());
152
                 diffPriceMapper.insert(diffPrice);
176
                 diffPriceMapper.insert(diffPrice);
153
             });
177
             });
154
         }
178
         }