|
|
@ -78,8 +78,7 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
"basicThirdProducts//thr_products/id///updateTime///第三方产品信息","//sup_cert/id///updateTime/filePath//资质证书信息",
|
|
|
|
"basicThirdProducts//thr_products/id///updateTime///第三方产品信息","//sup_cert/id///updateTime/filePath//资质证书信息",
|
|
|
|
"//sup_cert_set/id///updateTime///供应商资质证书设置","companyCert//sup_company/customerId///updateTime///配送企业",
|
|
|
|
"//sup_cert_set/id///updateTime///供应商资质证书设置","companyCert//sup_company/customerId///updateTime///配送企业",
|
|
|
|
"manufacturerCert//sup_manufacturer/id///updateTime///生产企业","productCert//sup_product/id///updateTime///产品资质信息",
|
|
|
|
"manufacturerCert//sup_manufacturer/id///updateTime///生产企业","productCert//sup_product/id///updateTime///产品资质信息",
|
|
|
|
"//udicompany/id///updateTime///国际库医疗器械注册人信息"};
|
|
|
|
"dbDiProducts//productinfo/id///updateTime///DI产品信息","//udicompany/id///updateTime///国际库医疗器械注册人信息"};
|
|
|
|
//"dbDiProducts//productinfo/id///updateTime///DI产品信息",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int orderNum=0;
|
|
|
|
private int orderNum=0;
|
|
|
|
|
|
|
|
|
|
|
@ -109,7 +108,13 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
if(map==null)
|
|
|
|
if(map==null)
|
|
|
|
ResultVOUtils.error(9000, "下载任务不存在");
|
|
|
|
ResultVOUtils.error(9000, "下载任务不存在");
|
|
|
|
String json = FileUtils.readFileAll(map.get("cacheFilePath").toString());
|
|
|
|
String json = FileUtils.readFileAll(map.get("cacheFilePath").toString());
|
|
|
|
|
|
|
|
logger.info("download-->"+json);
|
|
|
|
JSONObject object = JSON.parseObject(json);
|
|
|
|
JSONObject object = JSON.parseObject(json);
|
|
|
|
|
|
|
|
if(object!=null&&object.getInteger("code")==20000) {
|
|
|
|
|
|
|
|
BaseResponse response = JSON.parseObject(json,BaseResponse.class);
|
|
|
|
|
|
|
|
return response;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.success(object);
|
|
|
|
return ResultVOUtils.success(object);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -598,7 +603,15 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
/*解析到数据库*/
|
|
|
|
/*解析到数据库*/
|
|
|
|
private boolean analyToDB(JSONObject jsonObject,MultipartFile[] files) {
|
|
|
|
private boolean analyToDB(JSONObject jsonObject,MultipartFile[] files) {
|
|
|
|
if(!StringUtils.isEmpty(jsonObject.getString("tableName"))) {
|
|
|
|
if(!StringUtils.isEmpty(jsonObject.getString("tableName"))) {
|
|
|
|
List<Map<String,Object>> list = jsonObject.getObject("data", List.class);
|
|
|
|
JSONObject object = jsonObject.getJSONObject("data");
|
|
|
|
|
|
|
|
List<Map<String,Object>> list = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(object instanceof List<?>) {
|
|
|
|
|
|
|
|
list = jsonObject.getObject("data", List.class);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if(object.get("data")!=null)
|
|
|
|
|
|
|
|
list = object.getObject("data", List.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
return analyData(jsonObject.getString("tableName"),jsonObject.getString("uniqueColumn"),list);
|
|
|
|
return analyData(jsonObject.getString("tableName"),jsonObject.getString("uniqueColumn"),list);
|
|
|
|
//图片处理
|
|
|
|
//图片处理
|
|
|
|
}
|
|
|
|
}
|
|
|
|