|  |  | @ -88,14 +88,14 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(StrUtil.isEmpty(basicProductTypeRequest.getName())){ |  |  |  |         if (StrUtil.isEmpty(basicProductTypeRequest.getName())) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, "名字不能为空!"); |  |  |  |             return ResultVOUtils.error(999, "名字不能为空!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         Boolean falg = basicProductCategoryService.checkName(basicProductTypeRequest, 1); |  |  |  |         Boolean falg = basicProductCategoryService.checkName(basicProductTypeRequest, 1); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(falg==false){ |  |  |  |         if (falg == false) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, "院内分类名字已存在!"); |  |  |  |             return ResultVOUtils.error(999, "院内分类名字已存在!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         falg =  basicProductCategoryService.saveBasicHospType(basicProductTypeRequest); |  |  |  |         falg = basicProductCategoryService.saveBasicHospType(basicProductTypeRequest); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         if (!falg) { |  |  |  |         if (!falg) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, "插入失败!"); |  |  |  |             return ResultVOUtils.error(999, "插入失败!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
	
		
		
			
				
					|  |  | @ -110,16 +110,16 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (bindingResult.hasErrors()) { |  |  |  |         if (bindingResult.hasErrors()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(StrUtil.isEmpty(basicProductTypeRequest.getName())){ |  |  |  |         if (StrUtil.isEmpty(basicProductTypeRequest.getName())) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, "名字不能为空!"); |  |  |  |             return ResultVOUtils.error(999, "名字不能为空!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(basicProductTypeRequest.getCode().equals(basicProductTypeRequest.getParentCode())){ |  |  |  |         if (basicProductTypeRequest.getCode().equals(basicProductTypeRequest.getParentCode())) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, "上级菜单不能选择自己!"); |  |  |  |             return ResultVOUtils.error(999, "上级菜单不能选择自己!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         Boolean falg = basicProductCategoryService.checkName(basicProductTypeRequest, 2); |  |  |  |         Boolean falg = basicProductCategoryService.checkName(basicProductTypeRequest, 2); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(falg==false){ |  |  |  |         if (falg == false) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, "院内分类名字已存在!"); |  |  |  |             return ResultVOUtils.error(999, "院内分类名字已存在!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         falg = basicProductCategoryService.updateBasicHospType(basicProductTypeRequest); |  |  |  |         falg = basicProductCategoryService.updateBasicHospType(basicProductTypeRequest); | 
			
		
	
	
		
		
			
				
					|  |  | @ -139,16 +139,16 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         //先判断是否有下级 无下级在判断是否有产品
 |  |  |  |         //先判断是否有下级 无下级在判断是否有产品
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         boolean b = basicProductCategoryService.checkExist(basicProductTypeRequest.getCode()); |  |  |  |         boolean b = basicProductCategoryService.checkExist(basicProductTypeRequest.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(b){ |  |  |  |         if (b) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(555,"此分类下还有子分类,不能删除!"); |  |  |  |             return ResultVOUtils.error(555, "此分类下还有子分类,不能删除!"); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         //判断此分类中是否有产品
 |  |  |  |         //判断此分类中是否有产品
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         boolean checkrel = basicProductCategoryService.checkrel(basicProductTypeRequest.getCode()); |  |  |  |         boolean checkrel = basicProductCategoryService.checkrel(basicProductTypeRequest.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(checkrel){ |  |  |  |         if (checkrel) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(555,"此分类中绑定产品,不能删除!"); |  |  |  |             return ResultVOUtils.error(555, "此分类中绑定产品,不能删除!"); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         String msg =  basicProductCategoryService.delectBasicHospType(basicProductTypeRequest); |  |  |  |         String msg = basicProductCategoryService.delectBasicHospType(basicProductTypeRequest); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (StringUtils.isNotBlank(msg)) { |  |  |  |         if (StringUtils.isNotBlank(msg)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(999, msg); |  |  |  |             return ResultVOUtils.error(999, msg); | 
			
		
	
	
		
		
			
				
					|  |  | @ -201,7 +201,7 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setDiType(1); |  |  |  |             filterUdiProductRequest.setDiType(1); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<UdiRelevanceResponse> list= basicProductCategoryService.selectAll(filterUdiProductRequest); |  |  |  |         List<UdiRelevanceResponse> list = basicProductCategoryService.selectAll(filterUdiProductRequest); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         PageInfo<UdiRelevanceResponse> pageInfo = new PageInfo<>(list); |  |  |  |         PageInfo<UdiRelevanceResponse> pageInfo = new PageInfo<>(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |         PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse = new PageSimpleResponse<>(); |  |  |  |         PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse = new PageSimpleResponse<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         pageSimpleResponse.setTotal(pageInfo.getTotal()); |  |  |  |         pageSimpleResponse.setTotal(pageInfo.getTotal()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -216,9 +216,9 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         BasicProductCategory category = basicProductCategoryService.checkCode(filterUdiRelRequest.getParentCode()); |  |  |  |         BasicProductCategory category = basicProductCategoryService.checkCode(filterUdiRelRequest.getParentCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         //过滤已被选入的产品
 |  |  |  |         //过滤已被选入的产品
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         FilterUdiProductRequest request = new FilterUdiProductRequest(); |  |  |  |         FilterUdiProductRequest request = new FilterUdiProductRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if("10000".equals(category.getParentCode())) { |  |  |  |         if ("10000".equals(category.getParentCode())) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             request.setCode(filterUdiRelRequest.getParentCode()); |  |  |  |             request.setCode(filterUdiRelRequest.getParentCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         }else{ |  |  |  |         } else { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             request.setCode(category.getCode()); |  |  |  |             request.setCode(category.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<UdiRelevanceResponse> udiRelevanceResponses1 = basicProductCategoryService.selectAll(request); |  |  |  |         List<UdiRelevanceResponse> udiRelevanceResponses1 = basicProductCategoryService.selectAll(request); | 
			
		
	
	
		
		
			
				
					|  |  | @ -227,35 +227,35 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             list.add(udiRelevanceResponse.getId()); |  |  |  |             list.add(udiRelevanceResponse.getId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         filterUdiRelRequest.setExistid(list); |  |  |  |         filterUdiRelRequest.setExistid(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<UdiRelevanceResponse> udiRelevanceResponses=null; |  |  |  |         List<UdiRelevanceResponse> udiRelevanceResponses = null; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { |  |  |  |         if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); |  |  |  |             UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 if (udiEntity != null) { |  |  |  |             if (udiEntity != null) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setNameCode(udiEntity.getUdi()); |  |  |  |                 filterUdiRelRequest.setNameCode(udiEntity.getUdi()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setUnionCode(udiEntity.getUdi()); |  |  |  |                 filterUdiRelRequest.setUnionCode(udiEntity.getUdi()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             //如果输入DI标识,精确找到不同层级对应的产品信息
 |  |  |  |         } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (StrUtil.isNotEmpty(filterUdiRelRequest.getUnionCode())) { |  |  |  |         //如果输入DI标识,精确找到不同层级对应的产品信息
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 FilterUdiRelRequest filterUdiInfoRequest = new FilterUdiRelRequest(); |  |  |  |         if (StrUtil.isNotEmpty(filterUdiRelRequest.getUnionCode())) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 filterUdiInfoRequest.setNameCode(filterUdiRelRequest.getUnionCode()); |  |  |  |             FilterUdiRelRequest filterUdiInfoRequest = new FilterUdiRelRequest(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 List<UdiRelevanceResponse> temps = basicHospTypeService.filterUdiGp(filterUdiInfoRequest); |  |  |  |             filterUdiInfoRequest.setNameCode(filterUdiRelRequest.getUnionCode()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 if (temps != null && temps.size() > 0) { |  |  |  |             List<UdiRelevanceResponse> temps = basicHospTypeService.filterUdiGp(filterUdiInfoRequest); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid()); |  |  |  |             if (temps != null && temps.size() > 0) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setNameCode(filterUdiInfoRequest.getNameCode()); |  |  |  |                 filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setUnionCode(null); |  |  |  |                 filterUdiRelRequest.setNameCode(filterUdiInfoRequest.getNameCode()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 filterUdiRelRequest.setUnionCode(null); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 //只查找主标识产品信息
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 filterUdiRelRequest.setDiType(1); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if("10000".equals(category.getParentCode())) { |  |  |  |         } else { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //只查找主标识产品信息
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             filterUdiRelRequest.setDiType(1); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if ("10000".equals(category.getParentCode())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             //查全部
 |  |  |  |             //查全部
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             udiRelevanceResponses=  basicHospTypeService.filterUdiGpexist(filterUdiRelRequest); |  |  |  |             udiRelevanceResponses = basicHospTypeService.filterUdiGpexist(filterUdiRelRequest); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         }else{ |  |  |  |         } else { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             // 查上级
 |  |  |  |             // 查上级
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             FilterUdiProductRequest filterUdiProductRequest = new FilterUdiProductRequest(); |  |  |  |             FilterUdiProductRequest filterUdiProductRequest = new FilterUdiProductRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setCode(category.getParentCode()); |  |  |  |             filterUdiProductRequest.setCode(category.getParentCode()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -266,7 +266,7 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setThrPiId(filterUdiRelRequest.getThrPiId()); |  |  |  |             filterUdiProductRequest.setThrPiId(filterUdiRelRequest.getThrPiId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setNameCode(filterUdiRelRequest.getNameCode()); |  |  |  |             filterUdiProductRequest.setNameCode(filterUdiRelRequest.getNameCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setExistid(list); |  |  |  |             filterUdiProductRequest.setExistid(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |             udiRelevanceResponses= basicProductCategoryService.selectAll(filterUdiProductRequest); |  |  |  |             udiRelevanceResponses = basicProductCategoryService.selectAll(filterUdiProductRequest); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -278,40 +278,39 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     @GetMapping("/udiwms/basic/product/category/SelcetproductList") |  |  |  |     @GetMapping("/udiwms/basic/product/category/SelcetproductList") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse SelectproductList(FilterUdiRelRequest filterUdiRelRequest) { |  |  |  |     public BaseResponse SelectproductList(FilterUdiRelRequest filterUdiRelRequest) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<UdiRelevanceResponse> udiRelevanceResponses=null; |  |  |  |         List<UdiRelevanceResponse> udiRelevanceResponses = null; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { |  |  |  |         if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); |  |  |  |             UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 if (udiEntity != null) { |  |  |  |             if (udiEntity != null) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setNameCode(udiEntity.getUdi()); |  |  |  |                 filterUdiRelRequest.setNameCode(udiEntity.getUdi()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setUnionCode(udiEntity.getUdi()); |  |  |  |                 filterUdiRelRequest.setUnionCode(udiEntity.getUdi()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             //如果输入DI标识,精确找到不同层级对应的产品信息
 |  |  |  |         } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (StrUtil.isNotEmpty(filterUdiRelRequest.getUnionCode())) { |  |  |  |         //如果输入DI标识,精确找到不同层级对应的产品信息
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 FilterUdiRelRequest filterUdiInfoRequest = new FilterUdiRelRequest(); |  |  |  |         if (StrUtil.isNotEmpty(filterUdiRelRequest.getUnionCode())) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 filterUdiInfoRequest.setNameCode(filterUdiRelRequest.getUnionCode()); |  |  |  |             FilterUdiRelRequest filterUdiInfoRequest = new FilterUdiRelRequest(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiInfoRequest); |  |  |  |             filterUdiInfoRequest.setNameCode(filterUdiRelRequest.getUnionCode()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 if (temps != null && temps.size() > 0) { |  |  |  |             List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiInfoRequest); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid()); |  |  |  |             if (temps != null && temps.size() > 0) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setNameCode(filterUdiInfoRequest.getNameCode()); |  |  |  |                 filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     filterUdiRelRequest.setUnionCode(null); |  |  |  |                 filterUdiRelRequest.setNameCode(filterUdiInfoRequest.getNameCode()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 filterUdiRelRequest.setUnionCode(null); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 //只查找主标识产品信息
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 filterUdiRelRequest.setDiType(1); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //只查找主标识产品信息
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             filterUdiRelRequest.setDiType(1); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         //是否是一级分类
 |  |  |  |         //是否是一级分类
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         BasicProductCategory category = basicProductCategoryService.checkCode(filterUdiRelRequest.getParentCode()); |  |  |  |         BasicProductCategory category = basicProductCategoryService.checkCode(filterUdiRelRequest.getParentCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if("10000".equals(category.getParentCode())) { |  |  |  |         if ("10000".equals(category.getParentCode())) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             //查全部
 |  |  |  |             //查全部
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             udiRelevanceResponses= basicHospTypeService.filterUdiGp(filterUdiRelRequest); |  |  |  |             udiRelevanceResponses = basicHospTypeService.filterUdiGp(filterUdiRelRequest); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         }else{ |  |  |  |         } else { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             // 查上级
 |  |  |  |             // 查上级
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             FilterUdiProductRequest filterUdiProductRequest = new FilterUdiProductRequest(); |  |  |  |             FilterUdiProductRequest filterUdiProductRequest = new FilterUdiProductRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setCode(category.getParentCode()); |  |  |  |             filterUdiProductRequest.setCode(category.getParentCode()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -322,7 +321,7 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setThrPiId(filterUdiRelRequest.getThrPiId()); |  |  |  |             filterUdiProductRequest.setThrPiId(filterUdiRelRequest.getThrPiId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterUdiProductRequest.setNameCode(filterUdiRelRequest.getNameCode()); |  |  |  |             filterUdiProductRequest.setNameCode(filterUdiRelRequest.getNameCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             udiRelevanceResponses= basicProductCategoryService.selectAll(filterUdiProductRequest); |  |  |  |             udiRelevanceResponses = basicProductCategoryService.selectAll(filterUdiProductRequest); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         //循环插入
 |  |  |  |         //循环插入
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -331,10 +330,10 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<String> list = new ArrayList<>(); |  |  |  |         List<String> list = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         for (UdiRelevanceResponse udiRelevanceRespons : udiRelevanceResponses) { |  |  |  |         for (UdiRelevanceResponse udiRelevanceRespons : udiRelevanceResponses) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             list.add(udiRelevanceRespons.getId()+""); |  |  |  |             list.add(udiRelevanceRespons.getId() + ""); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(!(udiRelevanceResponses != null && udiRelevanceResponses.size()>0)){ |  |  |  |         if (!(udiRelevanceResponses != null && udiRelevanceResponses.size() > 0)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(456,"为查询到对应数据!"); |  |  |  |             return ResultVOUtils.error(456, "为查询到对应数据!"); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         basicProductTypeRequest.setIds(list); |  |  |  |         basicProductTypeRequest.setIds(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |         basicProductCategoryService.insertCateRel(basicProductTypeRequest); |  |  |  |         basicProductCategoryService.insertCateRel(basicProductTypeRequest); | 
			
		
	
	
		
		
			
				
					|  |  | @ -343,20 +342,13 @@ public class BasicProductCategoryController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     @GetMapping("/udiwms/basic/product/category/deleterel") |  |  |  |     @GetMapping("/udiwms/basic/product/category/deleterel") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse deleterel(Integer id){ |  |  |  |     public BaseResponse deleterel(Integer id) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          basicProductCategoryService.deleterelByid(id); |  |  |  |         basicProductCategoryService.deleterelByid(id); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         return  ResultVOUtils.success(); |  |  |  |         return ResultVOUtils.success(); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     @PostMapping("/udiwms/basic/product/category/unbindRel") |  |  |  |     @PostMapping("/udiwms/basic/product/category/unbindRel") | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Log(title = "单据管理", businessType = BusinessType.UPDATE) |  |  |  |     @Log(title = "单据管理", businessType = BusinessType.UPDATE) | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse unbindRel(@RequestBody BasicHospTypeRequest basicHospTypeRequest, BindingResult bindingResult) { |  |  |  |     public BaseResponse unbindRel(@RequestBody BasicHospTypeRequest basicHospTypeRequest, BindingResult bindingResult) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |