| | |
| | | if (feeDtos == null || feeDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "查询费用信息失败,未查到数据或查到多条数据"); |
| | | } |
| | | if (!businessFeeDetail.containsKey("state")) { |
| | | if (!businessFeeDetail.containsKey("state") || StringUtil.isEmpty(businessFeeDetail.getString("state"))) { |
| | | businessFeeDetail.put("state", "1400"); |
| | | } |
| | | feeDto = feeDtos.get(0); |
| | |
| | | if (feeDtos == null || feeDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "查询费用信息失败,未查到数据或查到多条数据"); |
| | | } |
| | | if (!businessFeeDetail.containsKey("state")) { |
| | | if (!businessFeeDetail.containsKey("state") || StringUtil.isEmpty(businessFeeDetail.getString("state"))) { |
| | | businessFeeDetail.put("state", "1400"); |
| | | } |
| | | feeDto = feeDtos.get(0); |
| | |
| | | } |
| | | feeInfo.setEndTime(endCalender.getTime()); |
| | | //判断 结束时间 是否大于 费用项 结束时间,这里 容错一下,如果 费用结束时间大于 费用项结束时间 30天 走报错 属于多缴费 |
| | | if (feeInfo.getEndTime().getTime() - feeInfo.getConfigEndTime().getTime() > 30 * 24 * 60 * 60 * 1000) { |
| | | if (feeInfo.getEndTime().getTime() - feeInfo.getConfigEndTime().getTime() > 30 * 24 * 60 * 60 * 1000L) { |
| | | throw new IllegalArgumentException("缴费超过了 费用项结束时间"); |
| | | } |
| | | Map feeMap = BeanConvertUtil.beanCovertMap(feeInfo); |
| | |
| | | endCalender.add(Calendar.MONTH, Integer.parseInt(paramInJson.getString("cycles"))); |
| | | feeInfo.setEndTime(endCalender.getTime()); |
| | | //判断 结束时间 是否大于 费用项 结束时间,这里 容错一下,如果 费用结束时间大于 费用项结束时间 30天 走报错 属于多缴费 |
| | | if (feeInfo.getEndTime().getTime() - feeInfo.getConfigEndTime().getTime() > 30 * 24 * 60 * 60 * 1000) { |
| | | if (feeInfo.getEndTime().getTime() - feeInfo.getConfigEndTime().getTime() > 30 * 24 * 60 * 60 * 1000L) { |
| | | throw new IllegalArgumentException("缴费超过了 费用项结束时间" + JSONObject.toJSONString(feeInfo) + "|||" + paramInJson.getString("cycles")); |
| | | } |
| | | Map feeMap = BeanConvertUtil.beanCovertMap(feeInfo); |
| | |
| | | return business; |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | Date endTime = DateUtil.getDateFromString("2021-07-31 16:00:00", DateUtil.DATE_FORMATE_STRING_A); |
| | | Date configEndTime = DateUtil.getDateFromString("2021-08-31 15:05:45", DateUtil.DATE_FORMATE_STRING_A); |
| | | Calendar endCalender = Calendar.getInstance(); |
| | | endCalender.setTime(endTime); |
| | | endCalender.add(Calendar.MONTH, Integer.parseInt("1")); |
| | | if (endCalender.getTime().getTime() - configEndTime.getTime() > 30 * 24 * 60 * 60 * 1000) { |
| | | throw new IllegalArgumentException("缴费超过了 费用项结束时间"); |
| | | } |
| | | } |
| | | |
| | | public JSONObject modifyTempCarInout(JSONObject reqJson, DataFlowContext context) { |
| | | FeeDto feeDto = (FeeDto) reqJson.get("feeInfo"); |
| | |
| | | businessUnit.put("payerObjType", FeeDto.PAYER_OBJ_TYPE_CAR); |
| | | businessUnit.put("feeFlag", paramInJson.getString("feeFlag")); |
| | | businessUnit.put("state", "2008001"); |
| | | businessUnit.put("batchId", paramInJson.getString("batchId")); |
| | | businessUnit.put("userId", dataFlowContext.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeePo.class.getSimpleName(), businessUnit); |
| | | paramInJson.put("feeId", businessUnit.getString("feeId")); |
| | |
| | | businessUnit.put("payerObjType", "3333"); |
| | | businessUnit.put("feeFlag", paramInJson.getString("feeFlag")); |
| | | businessUnit.put("state", "2008001"); |
| | | businessUnit.put("batchId", paramInJson.getString("batchId")); |
| | | businessUnit.put("userId", dataFlowContext.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeePo.class.getSimpleName(), businessUnit); |
| | | paramInJson.put("feeId", businessUnit.getString("feeId")); |
| | |
| | | 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")); |
| | |
| | | businessUnit.put("payerObjType", FeeDto.PAYER_OBJ_TYPE_CONTRACT); |
| | | businessUnit.put("feeFlag", paramInJson.getString("feeFlag")); |
| | | businessUnit.put("state", "2008001"); |
| | | businessUnit.put("batchId", paramInJson.getString("batchId")); |
| | | businessUnit.put("userId", dataFlowContext.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeePo.class.getSimpleName(), businessUnit); |
| | | paramInJson.put("feeId", businessUnit.getString("feeId")); |