| | |
| | | |
| | | //获取房屋名称 |
| | | String roomName = ownerCarDto.getRoomName().trim(); |
| | | String[] split = roomName.split("-"); |
| | | String[] split = roomName.split("-",3); |
| | | String floorNum = split[0]; |
| | | String unitNum = split[1]; |
| | | String roomNum = split[2]; |
| | |
| | | parkingSpaceDto.setPaId(paId); |
| | | //查询停车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | String state = ""; |
| | | if(parkingSpaceDtos == null || parkingSpaceDtos.size() <1){ |
| | | psId = GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_psId); |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | |
| | | parkingSpacePo.setPsId(psId); |
| | | parkingSpacePo.setRemark("导入数据"); |
| | | parkingSpaceV1InnerServiceSMOImpl.saveParkingSpace(parkingSpacePo); |
| | | state = ParkingSpaceDto.STATE_FREE; |
| | | }else{ |
| | | psId = parkingSpaceDtos.get(0).getPsId(); |
| | | //获取停车位状态(出售 S,出租 H ,空闲 F) |
| | | state = parkingSpaceDtos.get(0).getState(); |
| | | } |
| | | //获取停车位状态(出售 S,出租 H ,空闲 F) |
| | | String state = parkingSpaceDtos.get(0).getState(); |
| | | |
| | | if (!StringUtil.isEmpty(state) && !state.equals("F")) { |
| | | throw new IllegalArgumentException(ownerCarDto.getAreaNum() + "停车场-" + ownerCarDto.getNum() + "停车位不是空闲状态!"); |
| | | } |
| | |
| | | ownerCarPo.setCarId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_carId)); |
| | | ownerCarPo.setMemberId(ownerCarPo.getCarId()); |
| | | ownerCarPo.setState("1001"); //1001 正常状态,2002 车位释放欠费状态,3003 车位释放 |
| | | ownerCarPo.setLeaseType(ownerCarDto.getSpaceSate()); |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(psId); //车位id |