| | |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.NumberUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.ParseException; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | |
| | | return ResultVo.success(); |
| | | } |
| | | String cycel = null; |
| | | String custEndTime = null; |
| | | if (!StringUtil.isEmpty(feeDto.getCycle())) { |
| | | cycel = feeDto.getCycle(); |
| | | } |
| | | if (!StringUtil.isEmpty(feeDto.getCustEndTime())) { |
| | | custEndTime = feeDto.getCustEndTime(); |
| | | } |
| | | feeDto = feeDtos.get(0); |
| | | if (!StringUtil.isEmpty(cycel)) { |
| | | feeDto.setCycle(cycel); |
| | | } |
| | | if (!StringUtil.isEmpty(custEndTime)) { |
| | | feeDto.setCustEndTime(custEndTime); |
| | | } |
| | | |
| | | if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(feeDto.getPayerObjType())) { //房屋相关 |
| | |
| | | Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto); |
| | | feeDto.setFeePrice(Double.parseDouble(feePriceAll.get("feePrice").toString())); |
| | | feeDto.setFeeTotalPrice(Double.parseDouble(feePriceAll.get("feeTotalPrice").toString())); |
| | | |
| | | if(!StringUtil.isEmpty(custEndTime)){ |
| | | try { |
| | | computeFeeSMOImpl.dealRentRateCustEndTime(feeDto, DateUtil.getDateFromString(custEndTime,DateUtil.DATE_FORMATE_STRING_B)); |
| | | } catch (Exception e) { |
| | | throw new CmdException("计算费用失败"+e); |
| | | } |
| | | }else { |
| | | computeFeeSMOImpl.dealRentRateCycle(feeDto, NumberUtil.getDouble(feeDto.getCycle())); |
| | | } |
| | | |
| | | |
| | | //应收款取值 |
| | | //先取单小区的如果没有配置 取 全局的 |
| | | String val = CommunitySettingFactory.getValue(feeDto.getCommunityId(), TOTAL_FEE_PRICE); |
| | |
| | | feePrice = 0.0; |
| | | } else if ("1101".equals(computingFormula)) { // 租金 |
| | | feePrice = 0.0; |
| | | }else if ("1102".equals(computingFormula)) { // 租金 |
| | | feePrice = 0.0; |
| | | } else if ("4004".equals(computingFormula)) { |
| | | feePrice = Double.parseDouble(feeDto.getAmount()); |
| | | } else if ("5005".equals(computingFormula)) { |
| | |
| | | } else if ("1101".equals(computingFormula)) { // 租金 |
| | | BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpRoomDto.getRoomRent())); |
| | | feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | } else if ("4004".equals(computingFormula)) { |
| | | } else if ("1102".equals(computingFormula)) { // 租金 |
| | | BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpRoomDto.getRoomRent())); |
| | | feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | }else if ("4004".equals(computingFormula)) { |
| | | feePrice = Double.parseDouble(feeDto.getAmount()); |
| | | } else if ("5005".equals(computingFormula)) { |
| | | |