| | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.FloorDto; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.UnitDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.intf.user.IOwnerCarV1InnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | |
| | | if(!"H".equals(ownerCarDto.getSpaceSate()) && !"S".equals(ownerCarDto.getSpaceSate())){ |
| | | throw new IllegalArgumentException(ownerCarDto.getCarNum()+"车位状态应填写 S(出售)或者 H (出租)"); |
| | | } |
| | | //获取房屋名称 |
| | | String roomName = ownerCarDto.getRoomName().trim(); |
| | | if(!roomName.contains("-")){ |
| | | throw new IllegalArgumentException(ownerCarDto.getCarNum()+"房屋号格式错误 格式应为:楼栋-单元-房屋,如果是商铺 楼栋-0-商铺编号"); |
| | | } |
| | | String[] split = roomName.split("-", 3); |
| | | if(split.length != 3){ |
| | | throw new IllegalArgumentException(ownerCarDto.getCarNum()+"房屋号格式错误 格式应为:楼栋-单元-房屋,如果是商铺 楼栋-0-商铺编号"); |
| | | } |
| | | |
| | | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setName(ownerCarDto.getOwnerName()); |
| | | ownerDto.setLink(ownerCarDto.getLink()); |
| | | ownerDto.setCommunityId(reqJson.getString("communityId")); |
| | | //查询业主 |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, ownerCarDto.getCarNum() + "查询业主信息错误!"); |
| | | //Assert.listOnlyOne(ownerDtos, ownerCarDto.getCarNum() + "查询业主信息错误!"); |
| | | if(ownerDtos == null || ownerDtos.size() < 1){ |
| | | throw new IllegalArgumentException("业主不存在"); |
| | | } |
| | | ownerCarDto.setOwnerId(ownerDtos.get(0).getOwnerId()); |
| | | } |
| | | |