| | |
| | | // Assert.hasValue(os[2], (osIndex + 1) + "手机号不能为空"); |
| | | // Assert.hasValue(os[3], (osIndex + 1) + "车辆品牌不能为空"); |
| | | // Assert.hasValue(os[4], (osIndex + 1) + "车辆类型不能为空"); |
| | | // Assert.hasValue(os[5], (osIndex + 1) + "颜色不能为空"); |
| | | // Assert.hasValue(os[6], (osIndex + 1) + "停车场不能为空"); |
| | | // Assert.hasValue(os[7], (osIndex + 1) + "车位不能为空"); |
| | | Assert.hasValue(os[8], (osIndex + 1) + "起租时间不能为空"); |
| | | Assert.hasValue(os[9], (osIndex + 1) + "截止时间不能为空"); |
| | | // Assert.hasValue(os[10], (osIndex + 1) + "停车场类型不能为空"); |
| | | Assert.hasValue(os[11], (osIndex + 1) + "车位类型不能为空"); |
| | | String startTime = excelDoubleToDate(os[8].toString()); |
| | | String endTime = excelDoubleToDate(os[9].toString()); |
| | | Assert.isDate(startTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行开始时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | Assert.isDate(endTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行结束时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | // Assert.hasValue(os[5], (osIndex + 1) + "车牌类型不能为空"); |
| | | // Assert.hasValue(os[6], (osIndex + 1) + "颜色不能为空"); |
| | | // Assert.hasValue(os[7], (osIndex + 1) + "停车场不能为空"); |
| | | // Assert.hasValue(os[8], (osIndex + 1) + "车位不能为空"); |
| | | if(os.length > 8) { |
| | | Assert.hasValue(os[9], (osIndex + 1) + "起租时间不能为空"); |
| | | }else if(os.length > 9) { |
| | | Assert.hasValue(os[10], (osIndex + 1) + "截止时间不能为空"); |
| | | }else if(os.length > 11) { |
| | | Assert.hasValue(os[12], (osIndex + 1) + "车位类型不能为空"); |
| | | } |
| | | // Assert.hasValue(os[11], (osIndex + 1) + "停车场类型不能为空"); |
| | | String startTime = os.length >= 9 && os[9] != null ? excelDoubleToDate(os[9].toString()):""; |
| | | String endTime = os.length >= 10 && os[10] != null ? excelDoubleToDate(os[10].toString()):""; |
| | | // Assert.isDate(startTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行开始时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | // Assert.isDate(endTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行结束时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | importOwnerCar = new OwnerCarDto(); |
| | | importOwnerCar.setCarNum(os[0].toString().trim()); |
| | | importOwnerCar.setOwnerName(os[1].toString().trim()); |
| | | importOwnerCar.setLink(os[2] == null ? "" : os[2].toString().trim()); |
| | | importOwnerCar.setCarBrand(os[3] == null ? "" : os[3].toString().trim()); |
| | | importOwnerCar.setCarType(os[4] == null ? "" : os[4].toString().trim()); |
| | | importOwnerCar.setCarColor(os[5] == null ? "" : os[5].toString().trim()); |
| | | importOwnerCar.setAreaNum(os[6] == null ? "" : os[6].toString().trim()); |
| | | importOwnerCar.setLink(os.length <= 2 || os[2] == null ? "" : os[2].toString().trim()); |
| | | importOwnerCar.setCarBrand(os.length <= 3 || os[3] == null ? "" : os[3].toString().trim()); |
| | | importOwnerCar.setCarType(os.length <= 4 || os[4] == null ? "" : os[4].toString().trim()); |
| | | importOwnerCar.setLeaseType(os.length <= 5 || os[5] == null ? "" : os[5].toString().trim()); |
| | | importOwnerCar.setCarColor(os.length <= 6 || os[6] == null ? "" : os[6].toString().trim()); |
| | | importOwnerCar.setAreaNum(os.length <= 7 || os[7] == null ? "" : os[7].toString().trim()); |
| | | //获取车位 |
| | | String parkingLot = os[7] == null ? "" : os[7].toString().trim(); |
| | | String parkingLot = os.length <= 8 || os[8] == null ? "" : os[8].toString().trim(); |
| | | importOwnerCar.setNum(parkingLot); |
| | | importOwnerCar.setLogStartTime(startTime); |
| | | importOwnerCar.setLogEndTime(endTime); |
| | | importOwnerCar.setTypeCd(os[10] == null ? "" : os[10].toString().trim()); |
| | | importOwnerCar.setSpaceSate(os[11].toString().trim()); |
| | | importOwnerCar.setTypeCd(os.length <= 11 || os[11] == null ? "" : os[11].toString().trim()); |
| | | importOwnerCar.setSpaceSate(os.length <= 12 || os[12] == null ? "" : os[12].toString().trim()); |
| | | importOwnerCar.setCommunityId(result.getCommunityId()); |
| | | importOwnerCar.setUserId(result.getUserId()); |
| | | ownerCars.add(importOwnerCar); |