|  |  |  | @ -2,9 +2,19 @@ package com.glxp.api.admin.service.basic; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.collection.CollUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.StrUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.constant.ConstantStatus; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.dao.basic.UdiRelevanceDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.entity.basic.UdiInfoEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.entity.basic.UdiRelevanceEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.entity.thrsys.ThrProductsEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.req.basic.FilterUdiInfoRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.service.thrsys.ThrProductsService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.util.CustomUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.util.DateUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.util.GennerOrderUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.admin.util.UdiInfoUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.beans.BeanUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import javax.annotation.Resource; | 
			
		
	
	
		
			
				
					|  |  |  | @ -109,4 +119,53 @@ public class UdiContrastService { | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     GennerOrderUtils gennerOrderUtils; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     ThrProductsService thrProductsService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     UdiRelevanceService udiRelevanceService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     UdiInfoService udiInfoService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public void createOnlyMainId(String mainId) { | 
			
		
	
		
			
				
					|  |  |  |  |         FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest(); | 
			
		
	
		
			
				
					|  |  |  |  |         filterThrProductsRequest.setCode(mainId); | 
			
		
	
		
			
				
					|  |  |  |  |         List<ThrProductsEntity> thrProductsEntities = thrProductsService.selectThrProducts(filterThrProductsRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         ThrProductsEntity thrProductsEntity = thrProductsEntities.get(0); | 
			
		
	
		
			
				
					|  |  |  |  |         UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setThirdId(thrProductsEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setThirdName(thrProductsEntity.getName()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setMainId(thrProductsEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setMainName(thrProductsEntity.getName()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setMeasname(thrProductsEntity.getMeasname()); | 
			
		
	
		
			
				
					|  |  |  |  |         String time = DateUtil.getDateTime(); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setUpdateTime(time); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setModifyTime(time); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setUuid(CustomUtil.getUUId()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setSupName(thrProductsEntity.getSupName()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setManufactory(thrProductsEntity.getManufactory()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setPrice(thrProductsEntity.getPrice()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceService.insertUdiRelevance(udiRelevanceEntity); | 
			
		
	
		
			
				
					|  |  |  |  |         UdiInfoEntity udiInfoEntity = new UdiInfoEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |         BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setNameCode(thrProductsEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setCpmctymc(thrProductsEntity.getName()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setManufactory(thrProductsEntity.getManufactory()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setYlqxzcrbarmc(thrProductsEntity.getManufactory()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setGgxh(thrProductsEntity.getSpec()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setZczbhhzbapzbh(thrProductsEntity.getRegisterNo()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setUuid(udiRelevanceEntity.getUuid()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setDiType(1); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setScbssfbhph("是"); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setScbssfbhscrq("是"); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setScbssfbhsxrq("是"); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity.setScbssfbhxlh("否"); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoEntity = UdiInfoUtil.initUdiInfoEntity(udiInfoEntity); | 
			
		
	
		
			
				
					|  |  |  |  |         udiInfoService.insertUdiInfo(udiInfoEntity); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |