| | |
| | | index = it.getCell(0)?.numericCellValue?.toInt() |
| | | remark = null |
| | | } |
| | | if (scense?.name.isNullOrBlank()) throw BizException(errorStr(it.rowNum + 1, 2, "场景名称不能空白")) |
| | | scense?.typeid = Constant.SceneType.getByName(scense?.type)?.value?.toByte() |
| | | ?: throw BizException(errorStr(it.rowNum + 1, 3, "场景类型不存在")) |
| | | if (scense?.location.isNullOrBlank()) throw BizException(errorStr(it.rowNum + 1, 4, "场景地址不能空白")) |
| | | scense?.longitude ?: throw BizException(errorStr(it.rowNum + 1, 5, "经度不能空白")) |
| | | scense?.latitude ?: throw BizException(errorStr(it.rowNum + 1, 6, "纬度不能空白")) |
| | | scense?.provincecode = regionRep.findProvince(scense?.provincename)?.provincecode |
| | | ?: throw BizException(errorStr(it.rowNum + 1, 7, "省份错误或系统未曾配置")) |
| | | scense?.citycode = regionRep.findCity(scense?.cityname)?.citycode |