| | |
| | | roomDto.setCommunityId(ownerCarDto.getCommunityId()); |
| | | roomDto.setUnitNum(ownerCarDto.getUnitNum()); |
| | | roomDto.setRoomNum(ownerCarDto.getRoomNum()); |
| | | if (Vtil.defaultValue(roomDto.getRoomNum()).equals("")){ |
| | | if (Vtil.defaultValue(roomDto.getRoomNum()) == null){ |
| | | roomDto.setPropertyType("商铺"); |
| | | } |
| | | List<RoomDto> roomDtos = iroomInnerServiceSMOImpl.queryRooms(roomDto); |
| | |
| | | carDto.setCarNum(ownerCarDto.getCarNum()); |
| | | communityDto.setCommunityCode(defaultValue(os[1])); |
| | | communityDto.setName(defaultValue(os[2])); |
| | | if (communityDto.getCommunityCode().equals("") && communityDto.getName().equals("")) { |
| | | if (communityDto.getCommunityCode() == null && communityDto.getName() == null) { |
| | | throw new IllegalArgumentException("导入失败:小区编码和小区名称都为空"); |
| | | } |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | |
| | | // } |
| | | |
| | | ownerCarPo.setCarTypeCd("1001"); //默认主车辆 |
| | | |
| | | int i1 = ownerCarInnerServiceSMOImpl.queryOwnerCarsCount(carDto); |
| | | if (i1 > 0) { |
| | | carDto.setOwnerId(ownerCarDto.getOwnerId()); |
| | | carDto.setCommunityId(ownerCarDto.getCommunityId()); |
| | | carDto.setParkingType(Vtil.defaultValue(os[13])); |
| | | carDto.setCarNum(null); |
| | | carDto.setCarNumLikeRight_(ownerCarDto.getCarNum()); |
| | |
| | | carDto.setCarTypeCd(ownerCarPo.getCarTypeCd()); |
| | | carDto.setUnitPricePerMonth(defaultValue(os[18])); |
| | | int i2 = ownerCarInnerServiceSMOImpl.queryOwnerCarsCount(carDto); |
| | | if (i2 > 0) { |
| | | throw new IllegalArgumentException("重复的车辆:" + ownerCarDto.getCarNum()); |
| | | } else { |
| | | ownerCarDto.setCarNum(ownerCarDto.getCarNum() + "_" + i1); |
| | | } |
| | | ownerCarPo.setCarNum(ownerCarDto.getCarNum() + "_" + (i2 + 1)); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | //导入车辆 |
| | | saveFee(ownerCarPo, os, ownerCarDto, assetImportLogDetailDto); |
| | | if (Vtil.processCount(ownerCarPo.getUnitPricePerMonth(), 2, null) == null) { |
| | | ownerCarPo.setRemark(Vtil.defaultValue(ownerCarPo.getRemark(), "") + "\n未传入收费单价"); |
| | | }else { |
| | | saveFee(ownerCarPo, os, ownerCarDto, assetImportLogDetailDto); |
| | | } |
| | | ownerCarPo.setParkingType(Vtil.defaultValue(os[12])); |
| | | |
| | | ownerCarPo.setRoadName(defaultValue(os[3])); |
| | |
| | | ownerCarPo.setUnitNum(defaultValue(os[5])); |
| | | ownerCarPo.setRoomNum(defaultValue(os[6])); |
| | | ownerCarPo.setParkingLocation(defaultValue(os[12])); |
| | | if (Vtil.isValidDbDate(ownerCarPo.getStartTime())) { |
| | | ownerCarPo.setRemark(Vtil.defaultValue(ownerCarPo.getRemark(), "") + "\n启用日期:" + ownerCarPo.getStartTime() + "格式错误"); |
| | | ownerCarPo.setStartTime(null); |
| | | } |
| | | if (Vtil.isValidDbDate(ownerCarPo.getEndTime())) { |
| | | ownerCarPo.setRemark(Vtil.defaultValue(ownerCarPo.getRemark(), "") + "\n注销日期:" + ownerCarPo.getEndTime() + "格式错误"); |
| | | ownerCarPo.setEndTime(null); |
| | | } |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(psId); //车位id |
| | |
| | | feeConfigDto.setSquarePrice(Vtil.processCount(ownerCarPo.getUnitPricePerMonth(), 2, null)); |
| | | feeConfigDto.setFeeTypeCds(new String[]{"630000003","630000004","630000005"}); |
| | | if (feeConfigDto.getSquarePrice() == null) { |
| | | throw new IllegalArgumentException("未传入收费单价"); |
| | | throw new IllegalArgumentException(Vtil.defaultValue(ownerCarPo.getRemark(), "") + "未传入收费单价"); |
| | | } |
| | | feeDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | if (feeDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("单价`"+ownerCarPo.getUnitPricePerMonth()+"`未查询到收费项"); |
| | | ownerCarPo.setRemark("单价`"+ownerCarPo.getUnitPricePerMonth()+"`未查询到收费项"); |
| | | } else if (feeDtos.size() > 1) { |
| | | switch (Vtil.defaultValue(os[12])) { |
| | | case "地面停车": feeConfigDto.setFeeTypeCd("630000003");break; |
| | |
| | | feeDtos.removeIf(feeConfigDto1 -> !feeConfigDto1.getFeeTypeCd().equals(feeConfigDto.getFeeTypeCd())); |
| | | } |
| | | |
| | | if (feeDtos.size() > 1) { |
| | | if (feeDtos.isEmpty()) { |
| | | ownerCarPo.setRemark("单价`"+ownerCarPo.getUnitPricePerMonth()+"`未查询到收费项"); |
| | | } |
| | | else if (feeDtos.size() > 1) { |
| | | throw new IllegalArgumentException("系统错误,查询到的费用项超过一个"); |
| | | } |
| | | } |