替换replaceBatch

pro
wj 2 years ago
parent c90077142f
commit 86487f966e

@ -416,35 +416,34 @@ public class SpsSyncDownloadController {
private void saveUploadSysSettingData(SpsSyncSysSettingResponse bean) { private void saveUploadSysSettingData(SpsSyncSysSettingResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) {
systemParamConfigDao.insertOrUpdateBatch(bean.getSystemParamConfigEntities()); systemParamConfigDao.replaceBatch(bean.getSystemParamConfigEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getEntrustReceEntities())) { if (CollectionUtil.isNotEmpty(bean.getEntrustReceEntities())) {
entrustReceDao.insertOrUpdateBatch(bean.getEntrustReceEntities()); entrustReceDao.replaceBatch(bean.getEntrustReceEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSystemPDFModuleEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemPDFModuleEntities())) {
systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities()); systemPDFModuleDao.replaceBatch(bean.getSystemPDFModuleEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) {
for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities()) systemPDFTemplateDao.replaceBatch(bean.getSystemPDFTemplateEntities());
systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity);
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) {
sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities()); sysPdfTemplateRelevanceCodeDao.replaceBatch(bean.getSysPdfTemplateRelevanceCodeEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceBizEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceBizEntities())) {
sysPdfTemplateRelevanceBizDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceBizEntities()); sysPdfTemplateRelevanceBizDao.replaceBatch(bean.getSysPdfTemplateRelevanceBizEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceLabelEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceLabelEntities())) {
sysPdfTemplateRelevanceLabelDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceLabelEntities()); sysPdfTemplateRelevanceLabelDao.replaceBatch(bean.getSysPdfTemplateRelevanceLabelEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceStatemenEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceStatemenEntities())) {
sysPdfTemplateRelevanceStatemenDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceStatemenEntities()); sysPdfTemplateRelevanceStatemenDao.replaceBatch(bean.getSysPdfTemplateRelevanceStatemenEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getBasicBusTypePreEntities())) { if (CollectionUtil.isNotEmpty(bean.getBasicBusTypePreEntities())) {
basicBusTypePreDao.insertOrUpdateBatch(bean.getBasicBusTypePreEntities()); basicBusTypePreDao.replaceBatch(bean.getBasicBusTypePreEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getBasicBusTypeChangeEntities())) { 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) { private void saveUploadThrData(SpsSyncThrDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) { if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) {
thrDeptDao.insertOrUpdateBatch(bean.getDeptEntities()); thrDeptDao.replaceBatch(bean.getDeptEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) {
thrInvWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); thrInvWarehouseDao.replaceBatch(bean.getInvWarehouseEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getProductsEntityList())) { if (CollectionUtil.isNotEmpty(bean.getProductsEntityList())) {
thrProductsDao.insertOrUpdateBatch(bean.getProductsEntityList()); thrProductsDao.replaceBatch(bean.getProductsEntityList());
} }
if (CollectionUtil.isNotEmpty(bean.getCorpEntities())) { if (CollectionUtil.isNotEmpty(bean.getCorpEntities())) {
thrCorpDao.insertOrUpdateBatch(bean.getCorpEntities()); thrCorpDao.replaceBatch(bean.getCorpEntities());
} }
} }
private void saveUploadUserData(SpsSyncDataResponse bean) { private void saveUploadUserData(SpsSyncDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) { if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) {
authAdminDao.insertOrUpdateBatch(bean.getAuthAdminList()); authAdminDao.replaceBatch(bean.getAuthAdminList());
} }
if (CollectionUtil.isNotEmpty(bean.getDeptEntityList())) { if (CollectionUtil.isNotEmpty(bean.getDeptEntityList())) {
deptDao.insertOrUpdateBatch(bean.getDeptEntityList()); deptDao.replaceBatch(bean.getDeptEntityList());
} }
if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) { if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) {
deptUserDao.replaceBatch(bean.getDeptUserEntities()); deptUserDao.replaceBatch(bean.getDeptUserEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) {
invWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); invWarehouseDao.replaceBatch(bean.getInvWarehouseEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getWarehouseUserEntities())) { if (CollectionUtil.isNotEmpty(bean.getWarehouseUserEntities())) {
warehouseUserDao.insertOrUpdateBatch(bean.getWarehouseUserEntities()); warehouseUserDao.replaceBatch(bean.getWarehouseUserEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) { if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) {
for (WarehouseBussinessTypeEntity warehouseBussinessTypeEntity : bean.getWarehouseBussinessTypeEntities()) { warehouseBussinessTypeDao.replaceBatch(bean.getWarehouseBussinessTypeEntities());
warehouseBussinessTypeDao.insertOrUpdate(warehouseBussinessTypeEntity);
}
} }
if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) { if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) {
invSpaceDao.insertOrUpdateBatch(bean.getInvSpaces()); invSpaceDao.replaceBatch(bean.getInvSpaces());
} }
if (CollectionUtil.isNotEmpty(bean.getInvBusUserEntities())) { 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) { private void saveUploadDocumentTypeData(SpsSyncBusResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) { if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) {
basicBussinessTypeDao.insertOrUpdateBatch(bean.getBussinessTypeEntities()); basicBussinessTypeDao.replaceBatch(bean.getBussinessTypeEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getBusTypeChangeEntities())) { if (CollectionUtil.isNotEmpty(bean.getBusTypeChangeEntities())) {
busTypeChangeDao.insertOrUpdateBatch(bean.getBusTypeChangeEntities()); busTypeChangeDao.replaceBatch(bean.getBusTypeChangeEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getThrBusTypeOriginEntities())) { 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) { private void saveUploadOtherData(SpsSyncOtherDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) { if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) {
ioCodeLostMapper.insertOrUpdateBatch(bean.getIoCodeLostList()); ioCodeLostMapper.replaceBatch(bean.getIoCodeLostList());
} }
if (CollectionUtil.isNotEmpty(bean.getIoCodeRelList())) { 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) { private void saveUploadBasicData(SpsSyncBasicDataResponse bean) {
if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) { if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) {
basicHospTypeDao.insertOrUpdateBatch(bean.getHospTypeList()); basicHospTypeDao.replaceBatch(bean.getHospTypeList());
} }
if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) { if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) {
udiRelevanceDao.insertOrUpdateBatch(bean.getUdiRelevanceList()); udiRelevanceDao.replaceBatch(bean.getUdiRelevanceList());
} }
if (CollectionUtil.isNotEmpty(bean.getProductsList())) { if (CollectionUtil.isNotEmpty(bean.getProductsList())) {
basicProductsDao.insertOrUpdateBatch(bean.getProductsList()); basicProductsDao.replaceBatch(bean.getProductsList());
} }
if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) { if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) {
relevanceDao.insertOrUpdateBatch(bean.getRelevanceList()); relevanceDao.replaceBatch(bean.getRelevanceList());
} }
if (CollectionUtil.isNotEmpty(bean.getCorpList())) { if (CollectionUtil.isNotEmpty(bean.getCorpList())) {
corpDao.insertOrUpdateBatch(bean.getCorpList()); corpDao.replaceBatch(bean.getCorpList());
} }
if (CollectionUtil.isNotEmpty(bean.getSupCertList())) { if (CollectionUtil.isNotEmpty(bean.getSupCertList())) {
supCertDao.insertOrUpdateBatch(bean.getSupCertList()); supCertDao.replaceBatch(bean.getSupCertList());
} }
if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) { if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) {
supCertSetDao.insertOrUpdateBatch(bean.getSupCertSetList()); supCertSetDao.replaceBatch(bean.getSupCertSetList());
} }
if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) { if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) {
supCompanyDao.insertOrUpdateBatch(bean.getSupCompanyList()); supCompanyDao.replaceBatch(bean.getSupCompanyList());
} }
if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) { if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) {
supManufacturerDao.insertOrUpdateBatch(bean.getSupManufacturerList()); supManufacturerDao.replaceBatch(bean.getSupManufacturerList());
} }
if (CollectionUtil.isNotEmpty(bean.getSupProductList())) { if (CollectionUtil.isNotEmpty(bean.getSupProductList())) {
supProductDao.insertOrUpdateBatch(bean.getSupProductList()); supProductDao.replaceBatch(bean.getSupProductList());
} }
} }

Loading…
Cancel
Save