| | |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.parkingSpace.IParkingSpaceBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Service("parkingSpaceBMOImpl") |
| | | public class ParkingSpaceBMOImpl extends ApiBaseBMO implements IParkingSpaceBMO { |
| | | |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeInnerServiceSMO feeInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | |
| | | businessParkingSpace.putAll(paramInJson); |
| | | businessParkingSpace.put("state", parkingSpaceDto.getState()); |
| | | ParkingSpacePo parkingSpacePo = BeanConvertUtil.covertBean(businessParkingSpace, ParkingSpacePo.class); |
| | | super.update(dataFlowContext, parkingSpacePo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PARKING_SPACE); |
| | | parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void addParkingSpace(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | JSONObject businessParkingSpace = new JSONObject(); |
| | | businessParkingSpace.putAll(paramInJson); |
| | | businessParkingSpace.put("state", "F"); |
| | | businessParkingSpace.put("psId", "-1"); |
| | | businessParkingSpace.put("psId", GenerateCodeFactory.getPsId(GenerateCodeFactory.CODE_PREFIX_psId)); |
| | | businessParkingSpace.put("bId", "-1"); |
| | | businessParkingSpace.put("createTime", new Date()); |
| | | ParkingSpacePo parkingSpacePo = BeanConvertUtil.covertBean(businessParkingSpace, ParkingSpacePo.class); |
| | | super.delete(dataFlowContext, parkingSpacePo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_PARKING_SPACE); |
| | | parkingSpaceInnerServiceSMOImpl.saveParkingSpace(parkingSpacePo); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | JSONObject businessOwnerCar = new JSONObject(); |
| | | businessOwnerCar.putAll(paramInJson); |
| | | businessOwnerCar.put("carId", "-1"); |
| | | businessOwnerCar.put("memberId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_carId)); |
| | | if (!paramInJson.containsKey("carId") || paramInJson.getString("carId").startsWith("-")) { |
| | | businessOwnerCar.put("carId", businessOwnerCar.getString("memberId")); |
| | | } |
| | | OwnerCarPo ownerCarPo = BeanConvertUtil.covertBean(businessOwnerCar, OwnerCarPo.class); |
| | | ownerCarPo.setState(OwnerCarDto.STATE_NORMAL); |
| | | |
| | | //没有指定时为主要车辆 |
| | | if (!paramInJson.containsKey("carTypeCd") || StringUtil.isEmpty(paramInJson.getString("carTypeCd"))) { |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_PRIMARY); |
| | | } |
| | | super.insert(dataFlowContext, ownerCarPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_OWNER_CAR); |
| | | } |
| | | |
| | |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查询到停车位信息" + JSONObject.toJSONString(parkingSpaceDto)); |
| | | //throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查询到停车位信息" + JSONObject.toJSONString(parkingSpaceDto)); |
| | | return; |
| | | } |
| | | |
| | | parkingSpaceDto = parkingSpaceDtos.get(0); |