From 4b2f75d7dae6acd2cb1101a8ac7aae292c0c1887 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 31 Mar 2023 10:15:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=A2=9E=E4=B8=BB=E9=94=AE=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E6=9B=B4=E6=96=B0=EF=BC=8C=E4=B8=8D=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idc/service/impl/IdcServiceImpl.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java index 5d15abc..ee0c789 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java @@ -69,16 +69,16 @@ public class IdcServiceImpl implements IdcService { /*同步表,格式:同步设置表列名/同步设置表列名(子表时设置,主表不设置)/主表唯一列(多列逗号分隔)/主表关联列/子表关联列/数据库实际表/时间列/图片或文件列/数据条件/说明*/ private final String[] SYNC_TABLES= { - "entrustAction/////////委托验收","basicProducts//basic_udirel/uuid///updateTime///耗材字典","/basicProducts/basic_products/uuid,nameCode/uuid/uuid////耗材字典信息详情", + "entrustAction//basic_entrust_accept/id//////委托验收","basicProducts//basic_udirel/id///updateTime///耗材字典","/basicProducts/basic_products/id/uuid/uuid////耗材字典信息详情", "//company_product_relevance////updateTime///供应商关联信息", - "basicCorp//basic_corp/erpId///updateTime///往来单位","typeThird//thr_bustype_origin/action,thirdSys///updateTime///第三方单据类型", - "basicThirdCorp//thr_corp/unitId,thirdSysFk///updateTime///第三方往来单位","//thr_dept/code,thirdSysFk///updateTime///第三方部门", - "//thr_inv_products/inventoryCode,batchNo,warehouseCode,spaceCode,thirdSysFk///updateTime///第三方库存","basicThirdInv//thr_inv_warehouse/code,thirdSysFk//////第三方仓库", - "basicThirdBusOrder//thr_order/billNo,thirdSysFk///updateTime///第三方业务单据","/basicThirdBusOrder/thr_order_detail/productId,orderIdFk,thirdSysFk///updateTime///第三方单据详情", - "basicThirdProducts//thr_products/code,thirdSysFk///updateTime///第三方产品信息","//sup_cert////updateTime/filePath//资质证书信息", - "//sup_cert_set////updateTime///供应商资质证书设置","companyCert//sup_company////updateTime///配送企业", - "manufacturerCert//sup_manufacturer////updateTime///生产企业","productCert//sup_product/productId,manufacturerIdFk,customerId///updateTime///产品资质信息", - "dbDiProducts//productinfo/nameCode,uuid,diType///updateTime///DI产品信息//udicompany/tyshxydm///updateTime///国际库医疗器械注册人信息"}; + "basicCorp//basic_corp/id///updateTime///往来单位","typeThird//thr_bustype_origin/id///updateTime///第三方单据类型", + "basicThirdCorp//thr_corp/id///updateTime///第三方往来单位","//thr_dept/id///updateTime///第三方部门", + "//thr_inv_products/id///updateTime///第三方库存","basicThirdInv//thr_inv_warehouse/id//////第三方仓库", + "basicThirdBusOrder//thr_order/id///updateTime///第三方业务单据","/basicThirdBusOrder/thr_order_detail/orderIdFk///updateTime///第三方单据详情", + "basicThirdProducts//thr_products/id///updateTime///第三方产品信息","//sup_cert/id///updateTime/filePath//资质证书信息", + "//sup_cert_set/id///updateTime///供应商资质证书设置","companyCert//sup_company/customerId///updateTime///配送企业", + "manufacturerCert//sup_manufacturer/id///updateTime///生产企业","productCert//sup_product/id///updateTime///产品资质信息", + "dbDiProducts//productinfo/id///updateTime///DI产品信息","//udicompany/id///updateTime///国际库医疗器械注册人信息"}; private int orderNum=0; @@ -561,16 +561,15 @@ public class IdcServiceImpl implements IdcService { if(col>0) sql+=","; columnList.get(i).put("attrName", columnList.get(i).get("columnName")); - String extra = columnList.get(i).get("extra")!=null&&columnList.get(i).get("extra").toLowerCase().contains("auto_i") ? "A" : "N"; - sql+=extra.equals("N") ? columnList.get(i).get("columnName").toString() : ""; - col+=extra.equals("N") ? 1 : 0; + sql+= columnList.get(i).get("columnName").toString() ; + col++; if(uniqueColumn!=null&&columnList.get(i).get("columnKey")!=null&&(","+uniqueColumn+",").contains(","+columnList.get(i).get("columnName")+",")) { keyColumn[key] = columnList.get(i).get("columnName").toString(); keyDataType[key]=columnList.get(i).get("dataType").toString().contains("char") ? "C" : columnList.get(i).get("dataType").toString().contains("date") ? "D" : "N"; key++; } else { if(columnList.get(i).get("columnKey")!=null&&!StringUtils.isEmpty(columnList.get(i).get("columnKey").toString())&& - ("PRI,UNI,MUL".contains(columnList.get(i).get("columnKey").toString()))&&extra.equals("N")) { + ("PRI".contains(columnList.get(i).get("columnKey").toString()))) { keyColumn[key] = columnList.get(i).get("columnName").toString(); keyDataType[key]=columnList.get(i).get("dataType").toString().contains("char") ? "C" : columnList.get(i).get("dataType").toString().contains("date") ? "D" : "N"; key++; @@ -607,13 +606,12 @@ public class IdcServiceImpl implements IdcService { int m = 0; int h = 0; for(int k=0;k0 ? "," : ""; boolean ups = list.get(i).containsKey(attrName) ? true : false ; updateSet+=ups&&h>0 ? "," : ""; @@ -641,12 +639,12 @@ public class IdcServiceImpl implements IdcService { dbDao.update(upd + updateSet+" where "+updateWhere); h+=ups ? 1 : 0; } - } + sql+=")"; n++; } - for(int m=0;m<6;m++) { + for(int m=0;m<30;m++) { if(list.get(i).get("tableName"+m)!=null&&list.get(i).get("data"+m)!=null) { Object obj = list.get(i).get("data"+m); List> chList = new ArrayList>(); @@ -654,6 +652,8 @@ public class IdcServiceImpl implements IdcService { chList.add((Map)o); } analyData(list.get(i).get("tableName"+m).toString(),"",chList); + } else { + break; } }