胖ap设备入库
2016-11-01 14:29:33 0 举报
今日,一批全新的胖AP设备正式入库。这些设备外观精致,体积适中,采用了先进的无线通信技术,具有强大的信号覆盖能力和稳定的网络连接性能。它们将为我们提供更加便捷、快速的无线网络服务,满足各种场景下的无线接入需求。此外,这批胖AP设备还具备智能管理功能,可以实现对无线网络的集中管理和监控,大大提高了网络运维效率。我们相信,这批胖AP设备的加入将为我们的无线网络建设注入新的活力,为用户提供更加优质的网络体验。
作者其他创作
大纲/内容
N
开始
value=obj.getCity()
返回实体为空
errors为空
获取filestatus为0的列表中updatetime最小的一条
读取一行数据
value=obj.getCounty()
throw new ApplicationException(\"Excel 中区/县:\" + value + \"不存在!\");
Y
启用runTask()线程
value == null || StringUtils.isEmpty(value.toString())
将全局变量running标记为false
centerPubCorp.getCorpId() != null && !corpId.equals(centerPubCorp.getCorpId().toString())
抛出异常
根据map条件查数据库结果返回result
ApplicationException异常
打印异常
异常处理
return obj.getProvince();
公共资源层
error.add(\"第 \" + row + \" 行 \" + e.getMessage());
错误信息记录到EmsSysExcel实体
centerPubCorp == null
checkData开始验证,返回List errors
return
EmsSysExcel实体保存到数据库
!StringUtils.isEmpty(areaList.getString(\"province\")) && StringUtils.isEmpty(areaList.getString(\"city\")) && StringUtils.isEmpty(areaList.getString(\"county\"))
areaValidation(obj);
centerPubArea == null
provinceValidation(obj)
执行run方法
throw new ApplicationException(\"非法导入,请导入本地区的数据\");
throw new IllegalDataException(error);
JSONObject areaList = info.getJSONObject(i);
记录错误信息
业务资源层
throw new ApplicationException(\"文件中的省市区与型号管理中添加的省市区不相符,请核查!\");
JSONArray info = centerPubModel.getInfo();
实体不为空
遍历e.getError
throw new ApplicationException(\"Excel 中的厂商:\" + value + \"不存在!\")
remain=集采数量-数据中心查询已入库设备数
provinceRemain=该省最大集采数量-该省已入库设备数
errors添加到error
userSession.getCounty() != null&& !(userSession.getCounty()).equals(centerPubArea.getId().intValue())
String areaValid = areaList.getString(\"province\") + areaList.getString(\"city\");
corpMap!=null
生成错误日志文件到error.xls
throw new ApplicationException(\"Excel 中的厂商下不存在此型号!\");
filename为空
throw new ApplicationException(\"Excel 中市:\" + value + \"不存在!\");
组装EmsSysExcel实体
更新EmsSysExcel实体到数据库
centerPubCorp=corpMap.get(corp);
addrP = true; addrPC = true; addrPCC = true;
return error
启用runTask线程
IllegalDataException异常
验证excel数据
error.add(errorInfo);
InsertBatchException异常
根据map条件查数据库结果返回实体
modelById != null
ImportExcel调用runTask
centerPubModel == null
IllegalDataException 异常
接口层
result==1
throw new ApplicationException(\"Excel 中省:\" + value + \"不存在!\");
数据中心查询入库的入库数量
userSession.getCity() != null && !(userSession.getCity()).equals(centerPubArea.getId().intValue())
remain导入设备数
地区厂家验证nArea.validate(excelFatAp)
centerPubCorp = map.get(model)
业务层
throw new ApplicationException(\"Excel 中的型号:\" + value + \"不存在!\");
getUserptype() != null&&getUserptype()为厂家用户&&getUserOrgId() != null&&getUserOrgId()不为obj.getCorporation()
addrPCC || addrPC || addrP
value=obj.getProvince();
读取数据到EmsSysExcel实体
文件为空异常
throw new ApplicationException(\"根据型号编号查询信号信息为空!\");
excel.hasNext()
开始Excel验证
return obj.getCorporation();
将pubareaService set到ExcelValidation对象
结果添加到excellsit
String areaValid = areaList.getString(\"province\");
ApplicationException e
mapMac.containsKey(mac)
map == null || map.isEmpty()
return obj.getCity()
返回
error.size() 0
!StringUtils.isEmpty(areaList.getString(\"province\")) && !StringUtils.isEmpty(areaList.getString(\"city\")) && StringUtils.isEmpty(areaList.getString(\"county\"))
throw new ApplicationException(\"文件为空!\");
corpModel=数据的corporation+数据的model
拷贝文件到临时目录
excellist.size() == 0
结束
areaValid = areaList.getString(\"province\") + areaList.getString(\"city\") + areaList.getString(\"county\")
批量插入到数据中心
error.add(\"第\" + row + \" 行开始Excel表格中的‘厂商型号’不相同,一次只能导入相同厂商型号的设备!\")
生成ImportExcel这个bean
验证厂家corpValidation(obj)
Exception异常
CenterPubModel centerPubModel = modelById.get(value);
modelMap.get(corpId + obj.getmodel());
error.add(\"第 \" + row + \" 行的‘MAC地址’在Excel表格中存在重复值! \");
throw new ApplicationException(\"非法导入,请导入本厂商的数据\");
getFirstOne
胖ap设备入库
获取mac
provinceRemain导入设备数
调用addTask
userSession.getProvince() != null && !(userSession.getProvince()).equals(centerPubArea.getId().intValue()
!StringUtils.isEmpty(areaList.getString(\"province\"))&& !StringUtils.isEmpty(areaList.getString(\"city\"))&& !StringUtils.isEmpty(areaList.getString(\"county\"))
iinfo.size()
mapCorp.size==0||mapCorp.containsKey(corpModel)
0 条评论
下一页