| | |
| | | endCalender.setTime(endTime); |
| | | BigDecimal receivedAmount = new BigDecimal(Double.parseDouble(paramInJson.getString("receivedAmount"))); |
| | | cycles = receivedAmount.divide(feePrice, 2, BigDecimal.ROUND_HALF_EVEN); |
| | | endCalender = getTargetEndTime(endCalender,cycles.doubleValue()); |
| | | endCalender = getTargetEndTime(endCalender, cycles.doubleValue()); |
| | | targetEndTime = endCalender.getTime(); |
| | | paramInJson.put("tmpCycles", cycles.doubleValue()); |
| | | businessFeeDetail.put("cycles", cycles.doubleValue()); |
| | |
| | | paramInJson.put("feeInfo", feeDto); |
| | | |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeeDetailPo.class.getSimpleName(), businessFeeDetail); |
| | | |
| | | paramInJson.put("detailId", businessFeeDetail.getString("detailId")); |
| | | feeReceiptDetailPo.setAmount(businessFeeDetail.getString("receivedAmount")); |
| | | feeReceiptDetailPo.setCommunityId(feeDto.getCommunityId()); |
| | | feeReceiptDetailPo.setCycle(businessFeeDetail.getString("cycles")); |
| | |
| | | return endCalender; |
| | | } |
| | | |
| | | if(cycles >= 1){ |
| | | if (cycles >= 1) { |
| | | endCalender.add(Calendar.MONTH, new Double(Math.floor(cycles)).intValue()); |
| | | cycles = cycles - Math.floor(cycles); |
| | | } |
| | | int hours = new Double(cycles * DateUtil.getCurrentMonthDay() * 24).intValue(); |
| | | //int hours = new Double(cycles * DateUtil.getCurrentMonthDay() * 24).intValue(); |
| | | int hours = new Double(cycles * 30 * 24).intValue(); |
| | | endCalender.add(Calendar.HOUR, hours); |
| | | |
| | | return endCalender; |
| | |
| | | */ |
| | | public JSONObject addFee(OwnerCarDto ownerCarDto, JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | String time = DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A); |
| | | |
| | | if (paramInJson.containsKey("startTime")) { |
| | | time = paramInJson.getString("startTime"); |
| | | } |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_INFO); |
| | |
| | | businessUnit.put("feeTypeCd", paramInJson.getString("feeTypeCd")); |
| | | businessUnit.put("incomeObjId", paramInJson.getString("storeId")); |
| | | businessUnit.put("amount", "-1.00"); |
| | | businessUnit.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | businessUnit.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | businessUnit.put("startTime", time); |
| | | businessUnit.put("endTime", time); |
| | | businessUnit.put("communityId", paramInJson.getString("communityId")); |
| | | businessUnit.put("payerObjId", ownerCarDto.getCarId()); |
| | | businessUnit.put("payerObjType", FeeDto.PAYER_OBJ_TYPE_CAR); |
| | |
| | | */ |
| | | public JSONObject addRoomFee(RoomDto roomDto, JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | String time = DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A); |
| | | |
| | | if (paramInJson.containsKey("feeEndDate")) { |
| | | time = paramInJson.getString("feeEndDate"); |
| | | } else if (paramInJson.containsKey("startTime")) { |
| | | time = paramInJson.getString("startTime"); |
| | | } |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_INFO); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1); |
| | |
| | | businessUnit.put("feeTypeCd", paramInJson.getString("feeTypeCd")); |
| | | businessUnit.put("incomeObjId", paramInJson.getString("storeId")); |
| | | businessUnit.put("amount", "-1.00"); |
| | | businessUnit.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | businessUnit.put("endTime", paramInJson.containsKey("feeEndDate") ? paramInJson.getString("feeEndDate") |
| | | : DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | businessUnit.put("startTime", time); |
| | | businessUnit.put("endTime", time); |
| | | businessUnit.put("communityId", paramInJson.getString("communityId")); |
| | | businessUnit.put("payerObjId", roomDto.getRoomId()); |
| | | businessUnit.put("payerObjType", "3333"); |