java110
2020-09-29 d0948007141d15d84fed5e2f733bba51082ec13f
service-job/src/main/java/com/java110/job/task/fee/GenerateBillTemplate.java
@@ -1,13 +1,13 @@
package com.java110.job.task.fee;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.core.smo.community.IParkingSpaceInnerServiceSMO;
import com.java110.core.smo.community.IRoomInnerServiceSMO;
import com.java110.core.smo.fee.IFeeConfigInnerServiceSMO;
import com.java110.core.smo.fee.IFeeDetailInnerServiceSMO;
import com.java110.core.smo.fee.IFeeInnerServiceSMO;
import com.java110.core.smo.user.IOwnerCarInnerServiceSMO;
import com.java110.core.smo.user.IOwnerRoomRelInnerServiceSMO;
import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
import com.java110.intf.community.IRoomInnerServiceSMO;
import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
import com.java110.intf.fee.IFeeInnerServiceSMO;
import com.java110.intf.user.IOwnerCarInnerServiceSMO;
import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
import com.java110.dto.RoomDto;
import com.java110.dto.community.CommunityDto;
import com.java110.dto.fee.*;
@@ -208,9 +208,9 @@
            return;
        }
        if ("3333".equals(feeDto.getPayerObjType())) {
        if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(feeDto.getPayerObjType())) {
            computeFeePriceByRoom(feeDto);
        } else if ("6666".equals(feeDto.getPayerObjType())) {
        } else if (FeeDto.PAYER_OBJ_TYPE_PARKING_SPACE.equals(feeDto.getPayerObjType())) {
            computeFeePriceByParkingSpace(feeDto);
        } else {
            return;//这个没有欠费可算
@@ -225,8 +225,12 @@
        billOweFeeDto.setOweId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_oweId));
        billOweFeeDto.setFeeId(feeDto.getFeeId());
        billOweFeeDto.setBillId(billDto.getBillId());
        double month = monthCompare(startTime, billEndTime);
        double month = 0.0;
        if (TASK_ATTR_VALUE_DAY.equals(feeConfigDto.getBillType())) {
            month = dayCompare(feeDto.getEndTime(), billEndTime);
        } else {
            month = monthCompare(feeDto.getEndTime(), billEndTime);
        }
        BigDecimal curFeePrice = new BigDecimal(feeDto.getFeePrice());
        curFeePrice = curFeePrice.multiply(new BigDecimal(month));
        billOweFeeDto.setAmountOwed(curFeePrice.doubleValue() + "");
@@ -237,6 +241,7 @@
        }
        BigDecimal feePrice = new BigDecimal(feeDto.getFeePrice());
        feePrice = feePrice.multiply(new BigDecimal(month));
        billOweFeeDto.setBillAmountOwed(feePrice.doubleValue() + "");
        billOweFeeDto.setFeeEndTime(DateUtil.getFormatTimeString(feeDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A));
        billOweFeeDto.setCommunityId(feeDto.getCommunityId());
@@ -251,7 +256,7 @@
        feeInnerServiceSMOImpl.insertBillOweFees(billOweFeeDto);
        double recFee = StringUtil.isEmpty(billDto.getReceipts()) ? 0.0 : Double.parseDouble(billDto.getReceipts());
        double recFee = StringUtil.isEmpty(billDto.getReceivable()) ? 0.0 : Double.parseDouble(billDto.getReceivable());
        BigDecimal recFeeBig = new BigDecimal(recFee);
        BigDecimal newRecFee = recFeeBig.add(feePrice);