| | |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.*; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | |
| | | JSONObject businessFeeDetail = new JSONObject(); |
| | | businessFeeDetail.putAll(paramInJson); |
| | | businessFeeDetail.put("detailId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | businessFeeDetail.put("detailId", paramInJson.getString("detailId")); |
| | | businessFeeDetail.put("primeRate", paramInJson.getString("primeRate")); |
| | | if (!businessFeeDetail.containsKey("state")) { |
| | | businessFeeDetail.put("state", "1400"); |
| | |
| | | Calendar endCalender = Calendar.getInstance(); |
| | | endCalender.setTime(endTime); |
| | | endCalender.add(Calendar.MONTH, Integer.parseInt(paramInJson.getString("cycles"))); |
| | | if (FeeDto.FEE_FLAG_ONCE.equals(feeInfo.getFeeFlag())) { |
| | | if (feeInfo.getDeadlineTime() != null) { |
| | | endCalender.setTime(feeInfo.getDeadlineTime()); |
| | | } else if (!StringUtil.isEmpty(feeInfo.getCurDegrees())) { |
| | | endCalender.setTime(feeInfo.getCurReadingTime()); |
| | | } else if (feeInfo.getImportFeeEndTime() == null) { |
| | | endCalender.setTime(feeInfo.getConfigEndTime()); |
| | | } else { |
| | | endCalender.setTime(feeInfo.getImportFeeEndTime()); |
| | | } |
| | | //businessFee.put("state",FeeDto.STATE_FINISH); |
| | | feeInfo.setState(FeeDto.STATE_FINISH); |
| | | } |
| | | feeInfo.setEndTime(endCalender.getTime()); |
| | | |
| | | |
| | | //判断 结束时间 是否大于 费用项 结束时间,这里 容错一下,如果 费用结束时间大于 费用项结束时间 30天 走报错 属于多缴费 |
| | | if (feeInfo.getEndTime().getTime() - feeInfo.getConfigEndTime().getTime() > 30 * 24 * 60 * 60 * 1000L) { |
| | | throw new IllegalArgumentException("缴费超过了 费用项结束时间" + JSONObject.toJSONString(feeInfo) + "|||" + paramInJson.getString("cycles")); |
| | |
| | | paramInJson.put("carFeeEndTime", feeInfo.getEndTime()); |
| | | paramInJson.put("carPayerObjType", feeInfo.getPayerObjType()); |
| | | paramInJson.put("carPayerObjId", feeInfo.getPayerObjId()); |
| | | |
| | | // 周期性收费、缴费后,到期日期在费用项终止日期后,则设置缴费状态结束,设置结束日期为费用项终止日期 |
| | | if (FeeFlagTypeConstant.CYCLE.equals(feeInfo.getFeeFlag())) { |
| | | //这里 容错五天时间 |
| | | Date configEndTime = feeInfo.getConfigEndTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(configEndTime); |
| | | calendar.add(Calendar.DAY_OF_MONTH, -5); |
| | | configEndTime = calendar.getTime(); |
| | | if (feeInfo.getEndTime().after(configEndTime)) { |
| | | businessFee.put("state", FeeStateConstant.END); |
| | | businessFee.put("endTime", feeInfo.getConfigEndTime()); |
| | | } |
| | | } |
| | | return paramInJson; |
| | | } |
| | | |
| | |
| | | businessUnit.put("feeTypeCd", paramInJson.getString("feeTypeCd")); |
| | | businessUnit.put("incomeObjId", paramInJson.getString("storeId")); |
| | | businessUnit.put("amount", "-1.00"); |
| | | if (paramInJson.containsKey("amount") && !StringUtil.isEmpty(paramInJson.getString("amount"))) { |
| | | businessUnit.put("amount", paramInJson.getString("amount")); |
| | | } |
| | | businessUnit.put("startTime", time); |
| | | businessUnit.put("endTime", time); |
| | | businessUnit.put("communityId", paramInJson.getString("communityId")); |