|  |  | @ -2,19 +2,14 @@ package com.glxp.api.admin.service.basic.impl; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import cn.hutool.core.collection.CollUtil; |  |  |  | import cn.hutool.core.collection.CollUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.github.pagehelper.PageHelper; |  |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.dao.basic.BasicUnitMaintainDao; |  |  |  | import com.glxp.api.admin.dao.basic.*; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.dao.basic.UdiInfoDao; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.dao.basic.UdiInfoImportDetailDao; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.dao.basic.UdiRelevanceDao; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.dao.thrsys.ThrProductsDao; |  |  |  | import com.glxp.api.admin.dao.thrsys.ThrProductsDao; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity; |  |  |  | import com.glxp.api.admin.entity.basic.*; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.entity.basic.UdiInfoEntity; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.entity.basic.UdiInfoImportDetailEntity; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.entity.basic.UdiRelevanceEntity; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.entity.thrsys.ThrProductsEntity; |  |  |  | import com.glxp.api.admin.entity.thrsys.ThrProductsEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.req.basic.FilterUdiIpLogRequest; |  |  |  | import com.glxp.api.admin.req.basic.FilterUdiIpLogRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.res.basic.UdiRelevanceExportJsonResponse; |  |  |  | import com.glxp.api.admin.res.basic.UdiRelevanceExportJsonResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.admin.service.basic.UdiInfoImportDetailService; |  |  |  | import com.glxp.api.admin.service.basic.UdiInfoImportDetailService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.admin.service.info.CompanyProductRelevanceService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.apache.ibatis.session.ExecutorType; |  |  |  | import org.apache.ibatis.session.ExecutorType; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.apache.ibatis.session.SqlSession; |  |  |  | import org.apache.ibatis.session.SqlSession; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.apache.ibatis.session.SqlSessionFactory; |  |  |  | import org.apache.ibatis.session.SqlSessionFactory; | 
			
		
	
	
		
		
			
				
					|  |  | @ -85,6 +80,7 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic | 
			
		
	
		
		
			
				
					
					|  |  |  |     public void importJsonData(UdiRelevanceExportJsonResponse udiRelevanceExportJsonResponse) { |  |  |  |     public void importJsonData(UdiRelevanceExportJsonResponse udiRelevanceExportJsonResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiInfoEntities())) { |  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiInfoEntities())) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //基础表导入
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); |  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiInfoEntities())) { |  |  |  |             if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiInfoEntities())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 try { |  |  |  |                 try { | 
			
		
	
	
		
		
			
				
					|  |  | @ -102,6 +98,7 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //关联表导入
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiRelevanceEntities())) { |  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiRelevanceEntities())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); |  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); | 
			
		
	
		
		
			
				
					
					|  |  |  |             try { |  |  |  |             try { | 
			
		
	
	
		
		
			
				
					|  |  | @ -116,6 +113,7 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic | 
			
		
	
		
		
			
				
					
					|  |  |  | //            udiRelevanceDao.importUdiRelevance(udiRelevanceExportJsonResponse.getUdiRelevanceEntities());
 |  |  |  | //            udiRelevanceDao.importUdiRelevance(udiRelevanceExportJsonResponse.getUdiRelevanceEntities());
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //第三方产品信息导入
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getThrProductsEntities())) { |  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getThrProductsEntities())) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); |  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); | 
			
		
	
	
		
		
			
				
					|  |  | @ -131,5 +129,21 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //            thrProductsDao.importThrProductss(udiRelevanceExportJsonResponse.getThrProductsEntities());
 |  |  |  | //            thrProductsDao.importThrProductss(udiRelevanceExportJsonResponse.getThrProductsEntities());
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //供应商关联表导入
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getCompanyProductRelevanceEntities())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             try { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 List<CompanyProductRelevanceEntity> companyProductRelevanceEntities = udiRelevanceExportJsonResponse.getCompanyProductRelevanceEntities(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 CompanyProductRelevanceDao mapper = batchSession.getMapper(CompanyProductRelevanceDao.class); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 for (CompanyProductRelevanceEntity companyProductRelevanceEntity : companyProductRelevanceEntities) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     mapper.importCompanyProductRelevance(companyProductRelevanceEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 batchSession.commit(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } catch (Exception e) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |