old mode 100644
new mode 100755
| | |
| | | package com.java110.api.bmo.parkingSpace.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.parkingSpace.IParkingSpaceBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.ownerCarAttr.OwnerCarAttrPo; |
| | | import com.java110.po.parking.ParkingSpacePo; |
| | | import com.java110.po.room.RoomAttrPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.FeeTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区楼信息 |
| | |
| | | businessParkingSpace.putAll(paramInJson); |
| | | businessParkingSpace.put("state", parkingSpaceDto.getState()); |
| | | ParkingSpacePo parkingSpacePo = BeanConvertUtil.covertBean(businessParkingSpace, ParkingSpacePo.class); |
| | | parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | //parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | super.update(dataFlowContext, parkingSpacePo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PARKING_SPACE); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (!paramInJson.containsKey("carTypeCd") || StringUtil.isEmpty(paramInJson.getString("carTypeCd"))) { |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_PRIMARY); |
| | | } |
| | | //添加车辆属性 |
| | | dealOwnerCarAttr(paramInJson, ownerCarPo, dataFlowContext); |
| | | super.insert(dataFlowContext, ownerCarPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_OWNER_CAR); |
| | | } |
| | | |
| | | private void dealOwnerCarAttr(JSONObject paramInJson, OwnerCarPo ownerCarPo, DataFlowContext dataFlowContext) { |
| | | |
| | | if (!paramInJson.containsKey("attrs")) { |
| | | return; |
| | | } |
| | | |
| | | JSONArray attrs = paramInJson.getJSONArray("attrs"); |
| | | if (attrs.size() < 1) { |
| | | return; |
| | | } |
| | | JSONObject attr = null; |
| | | int flag = 0; |
| | | for (int attrIndex = 0; attrIndex < attrs.size(); attrIndex++) { |
| | | attr = attrs.getJSONObject(attrIndex); |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setAttrId(GenerateCodeFactory.getAttrId()); |
| | | ownerCarAttrPo.setCommunityId(ownerCarPo.getCommunityId()); |
| | | ownerCarAttrPo.setCarId(ownerCarPo.getCarId()); |
| | | ownerCarAttrPo.setSpecCd(attr.getString("specCd")); |
| | | ownerCarAttrPo.setValue(attr.getString("value")); |
| | | flag = ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("保存车辆属性失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改停车位状态信息 |
| | | * |