diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index 199e42b9..242d6e7d 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -416,35 +416,34 @@ public class SpsSyncDownloadController { private void saveUploadSysSettingData(SpsSyncSysSettingResponse bean) { if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) { - systemParamConfigDao.insertOrUpdateBatch(bean.getSystemParamConfigEntities()); + systemParamConfigDao.replaceBatch(bean.getSystemParamConfigEntities()); } if (CollectionUtil.isNotEmpty(bean.getEntrustReceEntities())) { - entrustReceDao.insertOrUpdateBatch(bean.getEntrustReceEntities()); + entrustReceDao.replaceBatch(bean.getEntrustReceEntities()); } if (CollectionUtil.isNotEmpty(bean.getSystemPDFModuleEntities())) { - systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities()); + systemPDFModuleDao.replaceBatch(bean.getSystemPDFModuleEntities()); } if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) { - for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities()) - systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity); + systemPDFTemplateDao.replaceBatch(bean.getSystemPDFTemplateEntities()); } if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) { - sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities()); + sysPdfTemplateRelevanceCodeDao.replaceBatch(bean.getSysPdfTemplateRelevanceCodeEntities()); } if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceBizEntities())) { - sysPdfTemplateRelevanceBizDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceBizEntities()); + sysPdfTemplateRelevanceBizDao.replaceBatch(bean.getSysPdfTemplateRelevanceBizEntities()); } if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceLabelEntities())) { - sysPdfTemplateRelevanceLabelDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceLabelEntities()); + sysPdfTemplateRelevanceLabelDao.replaceBatch(bean.getSysPdfTemplateRelevanceLabelEntities()); } if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceStatemenEntities())) { - sysPdfTemplateRelevanceStatemenDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceStatemenEntities()); + sysPdfTemplateRelevanceStatemenDao.replaceBatch(bean.getSysPdfTemplateRelevanceStatemenEntities()); } if (CollectionUtil.isNotEmpty(bean.getBasicBusTypePreEntities())) { - basicBusTypePreDao.insertOrUpdateBatch(bean.getBasicBusTypePreEntities()); + basicBusTypePreDao.replaceBatch(bean.getBasicBusTypePreEntities()); } if (CollectionUtil.isNotEmpty(bean.getBasicBusTypeChangeEntities())) { - basicBusTypeChangeDao.insertOrUpdateBatch(bean.getBasicBusTypeChangeEntities()); + basicBusTypeChangeDao.replaceBatch(bean.getBasicBusTypeChangeEntities()); } @@ -458,46 +457,44 @@ public class SpsSyncDownloadController { private void saveUploadThrData(SpsSyncThrDataResponse bean) { if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) { - thrDeptDao.insertOrUpdateBatch(bean.getDeptEntities()); + thrDeptDao.replaceBatch(bean.getDeptEntities()); } if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { - thrInvWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); + thrInvWarehouseDao.replaceBatch(bean.getInvWarehouseEntities()); } if (CollectionUtil.isNotEmpty(bean.getProductsEntityList())) { - thrProductsDao.insertOrUpdateBatch(bean.getProductsEntityList()); + thrProductsDao.replaceBatch(bean.getProductsEntityList()); } if (CollectionUtil.isNotEmpty(bean.getCorpEntities())) { - thrCorpDao.insertOrUpdateBatch(bean.getCorpEntities()); + thrCorpDao.replaceBatch(bean.getCorpEntities()); } } private void saveUploadUserData(SpsSyncDataResponse bean) { if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) { - authAdminDao.insertOrUpdateBatch(bean.getAuthAdminList()); + authAdminDao.replaceBatch(bean.getAuthAdminList()); } if (CollectionUtil.isNotEmpty(bean.getDeptEntityList())) { - deptDao.insertOrUpdateBatch(bean.getDeptEntityList()); + deptDao.replaceBatch(bean.getDeptEntityList()); } if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) { deptUserDao.replaceBatch(bean.getDeptUserEntities()); } if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { - invWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); + invWarehouseDao.replaceBatch(bean.getInvWarehouseEntities()); } if (CollectionUtil.isNotEmpty(bean.getWarehouseUserEntities())) { - warehouseUserDao.insertOrUpdateBatch(bean.getWarehouseUserEntities()); + warehouseUserDao.replaceBatch(bean.getWarehouseUserEntities()); } if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) { - for (WarehouseBussinessTypeEntity warehouseBussinessTypeEntity : bean.getWarehouseBussinessTypeEntities()) { - warehouseBussinessTypeDao.insertOrUpdate(warehouseBussinessTypeEntity); - } + warehouseBussinessTypeDao.replaceBatch(bean.getWarehouseBussinessTypeEntities()); } if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) { - invSpaceDao.insertOrUpdateBatch(bean.getInvSpaces()); + invSpaceDao.replaceBatch(bean.getInvSpaces()); } if (CollectionUtil.isNotEmpty(bean.getInvBusUserEntities())) { - invBusUserDao.insertOrUpdateBatch(bean.getInvBusUserEntities()); + invBusUserDao.replaceBatch(bean.getInvBusUserEntities()); } } @@ -513,13 +510,13 @@ public class SpsSyncDownloadController { */ private void saveUploadDocumentTypeData(SpsSyncBusResponse bean) { if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) { - basicBussinessTypeDao.insertOrUpdateBatch(bean.getBussinessTypeEntities()); + basicBussinessTypeDao.replaceBatch(bean.getBussinessTypeEntities()); } if (CollectionUtil.isNotEmpty(bean.getBusTypeChangeEntities())) { - busTypeChangeDao.insertOrUpdateBatch(bean.getBusTypeChangeEntities()); + busTypeChangeDao.replaceBatch(bean.getBusTypeChangeEntities()); } if (CollectionUtil.isNotEmpty(bean.getThrBusTypeOriginEntities())) { - thrBusTypeOriginDao.insertOrUpdateBatch(bean.getThrBusTypeOriginEntities()); + thrBusTypeOriginDao.replaceBatch(bean.getThrBusTypeOriginEntities()); } } @@ -534,10 +531,10 @@ public class SpsSyncDownloadController { */ private void saveUploadOtherData(SpsSyncOtherDataResponse bean) { if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) { - ioCodeLostMapper.insertOrUpdateBatch(bean.getIoCodeLostList()); + ioCodeLostMapper.replaceBatch(bean.getIoCodeLostList()); } if (CollectionUtil.isNotEmpty(bean.getIoCodeRelList())) { - ioCodeRelMapper.insertOrUpdateBatch(bean.getIoCodeRelList()); + ioCodeRelMapper.replaceBatch(bean.getIoCodeRelList()); } } @@ -560,34 +557,34 @@ public class SpsSyncDownloadController { */ private void saveUploadBasicData(SpsSyncBasicDataResponse bean) { if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) { - basicHospTypeDao.insertOrUpdateBatch(bean.getHospTypeList()); + basicHospTypeDao.replaceBatch(bean.getHospTypeList()); } if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) { - udiRelevanceDao.insertOrUpdateBatch(bean.getUdiRelevanceList()); + udiRelevanceDao.replaceBatch(bean.getUdiRelevanceList()); } if (CollectionUtil.isNotEmpty(bean.getProductsList())) { - basicProductsDao.insertOrUpdateBatch(bean.getProductsList()); + basicProductsDao.replaceBatch(bean.getProductsList()); } if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) { - relevanceDao.insertOrUpdateBatch(bean.getRelevanceList()); + relevanceDao.replaceBatch(bean.getRelevanceList()); } if (CollectionUtil.isNotEmpty(bean.getCorpList())) { - corpDao.insertOrUpdateBatch(bean.getCorpList()); + corpDao.replaceBatch(bean.getCorpList()); } if (CollectionUtil.isNotEmpty(bean.getSupCertList())) { - supCertDao.insertOrUpdateBatch(bean.getSupCertList()); + supCertDao.replaceBatch(bean.getSupCertList()); } if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) { - supCertSetDao.insertOrUpdateBatch(bean.getSupCertSetList()); + supCertSetDao.replaceBatch(bean.getSupCertSetList()); } if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) { - supCompanyDao.insertOrUpdateBatch(bean.getSupCompanyList()); + supCompanyDao.replaceBatch(bean.getSupCompanyList()); } if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) { - supManufacturerDao.insertOrUpdateBatch(bean.getSupManufacturerList()); + supManufacturerDao.replaceBatch(bean.getSupManufacturerList()); } if (CollectionUtil.isNotEmpty(bean.getSupProductList())) { - supProductDao.insertOrUpdateBatch(bean.getSupProductList()); + supProductDao.replaceBatch(bean.getSupProductList()); } }