version1
admin 2 years ago
parent 40379fb4ad
commit 70ec8d995e

@ -78,8 +78,8 @@ 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///产品资质信息",
"dbDiProducts//productinfo/id///updateTime///DI产品信息","//udicompany/id///updateTime///国际库医疗器械注册人信息"}; "//udicompany/id///updateTime///国际库医疗器械注册人信息"};
//"dbDiProducts//productinfo/id///updateTime///DI产品信息",
private int orderNum=0; private int orderNum=0;
@Resource @Resource
@ -601,21 +601,24 @@ public class IdcServiceImpl implements IdcService {
/*解析到数据库*/ /*解析到数据库*/
private boolean analyToDB(JSONObject jsonObject,MultipartFile[] files) { private boolean analyToDB(JSONObject jsonObject,MultipartFile[] files) {
if(jsonObject.getJSONObject("data")!=null) {
if(jsonObject.get("data")!=null) {
logger.error("json>>>>>>>>>");
String tableName = ""; String tableName = "";
String uniqueColumn = ""; String uniqueColumn = "";
JSONObject object = jsonObject.getJSONObject("data"); Object object = jsonObject.get("data");
List<Map<String,Object>> list = new ArrayList<>(); List<Map<String,Object>> list = new ArrayList<>();
if(object instanceof List<?>) { if(object instanceof List<?>) {
list = jsonObject.getObject("data", List.class); list = jsonObject.getObject("data", List.class);
tableName = jsonObject.getString("tableName"); tableName = jsonObject.getString("tableName");
uniqueColumn = jsonObject.getString("uniqueColumn"); uniqueColumn = jsonObject.getString("uniqueColumn");
} else { } else {
list = object.getObject("data", List.class); JSONObject obj = jsonObject.getJSONObject("data");
tableName = object.getString("tableName"); list = obj.getObject("data", List.class);
uniqueColumn = object.getString("uniqueColumn"); tableName = obj.getString("tableName");
uniqueColumn = obj.getString("uniqueColumn");
} }
logger.error("table-->"+tableName);
if(!StringUtils.isEmpty(tableName)) { if(!StringUtils.isEmpty(tableName)) {
return analyData(tableName,uniqueColumn,list); return analyData(tableName,uniqueColumn,list);
} else { } else {
@ -626,7 +629,6 @@ public class IdcServiceImpl implements IdcService {
return false; return false;
} }
/*按表名解析数据到数据库,子表暂未处理*/ /*按表名解析数据到数据库,子表暂未处理*/
private boolean analyData(String tableName,String uniqueColumn,List<Map<String,Object>> list) { private boolean analyData(String tableName,String uniqueColumn,List<Map<String,Object>> list) {

Loading…
Cancel
Save