java110 лет назад: 5
Родитель
Сommit
809728a23d

+ 8 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeManualCollectionDetail/impl/GetCollectionBMOImpl.java

@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.List;
 
 
 @Service("getCollectionBMOImpl")
 @Service("getCollectionBMOImpl")
@@ -82,6 +83,7 @@ public class GetCollectionBMOImpl implements IGetExportCollectionBMO {
         dataObj.put("联系电话", tmpFeeManualCollectionDto.getLink());
         dataObj.put("联系电话", tmpFeeManualCollectionDto.getLink());
         dataObj.put("收费面积/m2", tmpFeeManualCollectionDto.getRoomArea());
         dataObj.put("收费面积/m2", tmpFeeManualCollectionDto.getRoomArea());
 
 
+        BigDecimal totalFee = new BigDecimal(0);
 
 
         for (FeeConfigDto feeConfigDto : feeConfigDtos) {
         for (FeeConfigDto feeConfigDto : feeConfigDtos) {
 
 
@@ -93,11 +95,17 @@ public class GetCollectionBMOImpl implements IGetExportCollectionBMO {
                 continue;
                 continue;
             }
             }
 
 
+            BigDecimal amount = new BigDecimal(tmpFeeManualCollectionDetailDto.getAmount());
+
+            totalFee = totalFee.add(amount);
+
             dataObj.put(feeConfigDto.getFeeName(), tmpFeeManualCollectionDetailDto.getAmount());
             dataObj.put(feeConfigDto.getFeeName(), tmpFeeManualCollectionDetailDto.getAmount());
             dataObj.put(feeConfigDto.getFeeName() + "_起止日期",
             dataObj.put(feeConfigDto.getFeeName() + "_起止日期",
                     tmpFeeManualCollectionDetailDto.getStartTime() + "至" + tmpFeeManualCollectionDetailDto.getEndTime());
                     tmpFeeManualCollectionDetailDto.getStartTime() + "至" + tmpFeeManualCollectionDetailDto.getEndTime());
         }
         }
 
 
+        dataObj.put("应交款总额", totalFee.setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
+
         data.add(dataObj);
         data.add(dataObj);
 
 
     }
     }

+ 6 - 2
service-front/src/main/java/com/java110/front/smo/assetExport/impl/ExportFeeManualCollectionSMOImpl.java

@@ -30,6 +30,7 @@ import org.springframework.web.client.RestTemplate;
 
 
 import java.io.ByteArrayOutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.IOException;
+import java.math.BigDecimal;
 
 
 /**
 /**
  * @ClassName AssetImportSmoImpl
  * @ClassName AssetImportSmoImpl
@@ -141,7 +142,7 @@ public class ExportFeeManualCollectionSMOImpl extends BaseComponentSMO implement
         //查询楼栋信息
         //查询楼栋信息
         JSONArray rooms = this.getExistsRoomFee(pd, componentValidateResult);
         JSONArray rooms = this.getExistsRoomFee(pd, componentValidateResult);
         if (rooms == null || rooms.size() < 1) {
         if (rooms == null || rooms.size() < 1) {
-            CellRangeAddress region = new CellRangeAddress(0, 0, 0, 6);
+            CellRangeAddress region = new CellRangeAddress(0, 0, 0, 10);
             sheet.addMergedRegion(region);
             sheet.addMergedRegion(region);
             return;
             return;
         }
         }
@@ -155,6 +156,8 @@ public class ExportFeeManualCollectionSMOImpl extends BaseComponentSMO implement
             }
             }
             dataKeyIndex++;
             dataKeyIndex++;
         }
         }
+        row.createCell(dataKeyIndex+2).setCellValue("备注");
+
 
 
         for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) {
         for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) {
             row = sheet.createRow(roomIndex + 2);
             row = sheet.createRow(roomIndex + 2);
@@ -165,9 +168,10 @@ public class ExportFeeManualCollectionSMOImpl extends BaseComponentSMO implement
                 row.createCell(dataKeyIndex).setCellValue(dataObj.getString(key));
                 row.createCell(dataKeyIndex).setCellValue(dataObj.getString(key));
                 dataKeyIndex++;
                 dataKeyIndex++;
             }
             }
+            row.createCell(dataKeyIndex+2).setCellValue("");
         }
         }
 
 
-        CellRangeAddress region = new CellRangeAddress(0, 0, 0, 6);
+        CellRangeAddress region = new CellRangeAddress(0, 0, 0, 10);
         sheet.addMergedRegion(region);
         sheet.addMergedRegion(region);
     }
     }