wuxw
2024-02-27 45149c4de50d945a27cbc7324ec0699f5b15df14
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportFeeManualCollectionSMOImpl.java
@@ -6,9 +6,9 @@
import com.java110.api.smo.DefaultAbstractComponentSMO;
import com.java110.api.smo.assetExport.IExportFeeManualCollectionSMO;
import com.java110.core.context.IPageData;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.core.log.LoggerFactory;
import com.java110.dto.fee.FeeDto;
import com.java110.entity.component.ComponentValidateResult;
import com.java110.dto.system.ComponentValidateResult;
import com.java110.utils.util.Assert;
import com.java110.utils.util.Base64Convert;
import com.java110.utils.util.DateUtil;
@@ -18,7 +18,6 @@
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
@@ -349,7 +348,7 @@
            endTime = feeObj.getString("deadlineTime").length() > 10 ? feeObj.getString("deadlineTime").substring(0, 10) : feeObj.getString("deadlineTime");
            //如果费用是周期性费用 则 结束时间减一天
            try {
                if (feeObj.containsKey("feeFlag") && FeeDto.FEE_FLAG_CYCLE.equals(feeObj.getString("feeFlag"))) {
                if (feeObj.containsKey("feeFlag") && (FeeDto.FEE_FLAG_CYCLE.equals(feeObj.getString("feeFlag")) || FeeDto.FEE_FLAG_CYCLE_ONCE.equals(feeObj.getString("feeFlag")))) {
                    endTime = DateUtil.getFormatTimeString(DateUtil.stepDay(DateUtil.getDateFromString(endTime, DateUtil.DATE_FORMATE_STRING_B), -1),
                            DateUtil.DATE_FORMATE_STRING_B);
                }
@@ -359,7 +358,7 @@
            squarePrice = feeObj.getString("squarePrice");
            //动态费用单价就去动态单价
            if(feeObj.containsKey("computingFormula") && "9009".equals(feeObj.getString("computingFormula"))){
            if (feeObj.containsKey("computingFormula") && "9009".equals(feeObj.getString("computingFormula"))) {
                squarePrice = feeObj.getString("mwPrice");
            }
@@ -370,7 +369,13 @@
            cell1.setCellValue(squarePrice);
            cell1.setCellStyle(cellStyle);
            cell2 = row.createCell(2);
            cell2.setCellValue(room.getString("builtUpArea"));
            if (feeObj.containsKey("curDegrees")) {
                double totalDegrees = feeObj.getDouble("curDegrees") - feeObj.getDouble("preDegrees");
                BigDecimal degreesDec = new BigDecimal(totalDegrees).setScale(2, BigDecimal.ROUND_HALF_UP);
                cell2.setCellValue(degreesDec.doubleValue());
            } else {
                cell2.setCellValue(room.getString("builtUpArea"));
            }
            cell2.setCellStyle(cellStyle);
            cell3 = row.createCell(3);
            if (feeObj.containsKey("curDegrees")) {
@@ -380,7 +385,7 @@
            }
            cell3.setCellStyle(cellStyle);
            cell4 = row.createCell(4);
            cell4.setCellValue(feeObj.getString("feePrice"));
            cell4.setCellValue(feeObj.getString("feeTotalPrice"));
            cell4.setCellStyle(cellStyle);
            cell5 = row.createCell(5);
            cell5.setCellValue("0");
@@ -389,7 +394,7 @@
            cell6.setCellValue("");
            cell6.setCellStyle(cellStyle);
            row.setHeight((short) (defaultRowHeight));
            totalPrice = totalPrice.add(new BigDecimal(feeObj.getString("feePrice")));
            totalPrice = totalPrice.add(new BigDecimal(feeObj.getString("feeTotalPrice")));
        }
        row = sheet.createRow(line + fees.size() + 3);