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 89
     @PostMapping("/save")
90
-    @ApiOperation(value = "销售收入上缴新增*", notes = "新增")
90
+    @ApiOperation(value = "销售收入上缴新增", notes = "新增")
91 91
     public ResponseEntity save(@Validated @RequestBody BusinessFsSaleRevenue param) {
92 92
         saleRevenueService.saveData(param);
93 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 10
 import org.springframework.transaction.annotation.Transactional;
11 11
 
12 12
 import javax.annotation.Resource;
13
+import java.math.BigDecimal;
13 14
 import java.util.HashMap;
14 15
 import java.util.List;
15 16
 import java.util.Map;
@@ -44,8 +45,10 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
44 45
         saleRevenueMapper.insert(param);
45 46
         // 保存子表-质检损益信息
46 47
         this.saveInspectionLoss(param);
47
-        // 保存子表-三账一致性
48
+        // 保存子表-三账一致性-会计账
48 49
         this.saveThreeConsistence(param);
50
+        // 保存子表-三账一致性-实际出库情况
51
+        this.saveOutStorage(param);
49 52
         // 保存子表-结算信息
50 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 124
     private void saveThreeConsistence(BusinessFsSaleRevenue param) {
122 125
         if (CollectionUtils.isNotEmpty(param.getThreeConsistenceList())) {
123 126
             param.getThreeConsistenceList().forEach(threeConsistence -> {
124 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 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 152
     private void saveSettle(BusinessFsSaleRevenue param) {
131 153
         if (CollectionUtils.isNotEmpty(param.getRevenueSettleList())) {
@@ -149,6 +171,8 @@ public class BusinessFsSaleRevenueServiceImpl extends ServiceImpl<BusinessFsSale
149 171
         if (CollectionUtils.isNotEmpty(param.getDiffPriceList())) {
150 172
             param.getDiffPriceList().forEach(diffPrice -> {
151 173
                 diffPrice.setFsSaleRevenueId(param.getId());
174
+                diffPrice.setProvinceTotalQuantity(diffPrice.getTotalQuantity());
175
+                diffPrice.setProvinceTotalAmount(diffPrice.getTotalAmount());
152 176
                 diffPriceMapper.insert(diffPrice);
153 177
             });
154 178
         }