| | |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.machine.CarInoutDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.intf.common.ICarInoutInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | |
| | | super.delete(dataFlowContext, payFeePo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_FEE_INFO); |
| | | } |
| | | |
| | | public JSONObject updateFee(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FEE_INFO); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeePo.class.getSimpleName(), paramInJson); |
| | | return business; |
| | | public void updateFee(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | PayFeePo payFeePo = BeanConvertUtil.covertBean(paramInJson, PayFeePo.class); |
| | | |
| | | super.update(dataFlowContext, payFeePo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FEE_INFO); |
| | | } |
| | | |
| | | /** |
| | |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "查询费用信息失败,未查到数据或查到多条数据"); |
| | | } |
| | | |
| | | |
| | | feeDto = feeDtos.get(0); |
| | | businessFeeDetail.put("startTime", DateUtil.getFormatTimeString(feeDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | Date endTime = feeDto.getEndTime(); |
| | | Calendar endCalender = Calendar.getInstance(); |
| | | endCalender.setTime(endTime); |
| | | int hours = 0; |
| | | if ("-101".equals(paramInJson.getString("cycles"))) { |
| | | hours = new Double(Double.parseDouble(paramInJson.getString("tmpCycles")) * DateUtil.getCurrentMonthDay() * 24).intValue(); |
| | | endCalender.add(Calendar.HOUR, hours); |
| | | } else { |
| | | endCalender.add(Calendar.MONTH, Integer.parseInt(paramInJson.getString("cycles"))); |
| | | } |
| | | businessFeeDetail.put("endTime", DateUtil.getFormatTimeString(endCalender.getTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | paramInJson.put("feeInfo", feeDto); |
| | | |
| | | BigDecimal feePrice = new BigDecimal("0.00"); |
| | |
| | | businessFee.putAll(feeMap); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeePo.class.getSimpleName(), businessFee); |
| | | |
| | | //为停车费单独处理 |
| | | paramInJson.put("carFeeEndTime",feeInfo.getEndTime()); |
| | | paramInJson.put("carPayerObjType",feeInfo.getPayerObjType()); |
| | | paramInJson.put("carPayerObjId",feeInfo.getPayerObjId()); |
| | | |
| | | return business; |
| | | } |
| | | |
| | |
| | | |
| | | feeDto = feeDtos.get(0); |
| | | paramInJson.put("feeInfo", feeDto); |
| | | businessFeeDetail.put("startTime", DateUtil.getFormatTimeString(feeDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | Date endTime = feeDto.getEndTime(); |
| | | Calendar endCalender = Calendar.getInstance(); |
| | | endCalender.setTime(endTime); |
| | | int hours = 0; |
| | | if ("-101".equals(paramInJson.getString("cycles"))) { |
| | | hours = new Double(Double.parseDouble(paramInJson.getString("tmpCycles")) * DateUtil.getCurrentMonthDay() * 24).intValue(); |
| | | endCalender.add(Calendar.HOUR, hours); |
| | | } else { |
| | | endCalender.add(Calendar.MONTH, Integer.parseInt(paramInJson.getString("cycles"))); |
| | | } |
| | | businessFeeDetail.put("endTime", DateUtil.getFormatTimeString(endCalender.getTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | |
| | | BigDecimal feePrice = new BigDecimal("0.00"); |
| | | |
| | |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public JSONObject addFee(ParkingSpaceDto parkingSpaceDto, JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | public JSONObject addFee(OwnerCarDto ownerCarDto, JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | |
| | | businessUnit.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | businessUnit.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | businessUnit.put("communityId", paramInJson.getString("communityId")); |
| | | businessUnit.put("payerObjId", parkingSpaceDto.getPsId()); |
| | | businessUnit.put("payerObjType", "6666"); |
| | | businessUnit.put("payerObjId", ownerCarDto.getCarId()); |
| | | businessUnit.put("payerObjType", FeeDto.PAYER_OBJ_TYPE_CAR); |
| | | businessUnit.put("feeFlag", paramInJson.getString("feeFlag")); |
| | | businessUnit.put("state", "2008001"); |
| | | businessUnit.put("userId", dataFlowContext.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |