|  |  |  | @ -153,13 +153,11 @@ public class SupProductController { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(Long.valueOf(selectProductBindRequest.getRelIdFk())); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         SupProductEntity supProductEntity = new SupProductEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |         BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setProductId(selectProductBindRequest.getProductId()); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh()); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setRelIdFk(selectProductBindRequest.getRelIdFk()); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc()); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -200,51 +198,51 @@ public class SupProductController { | 
			
		
	
		
			
				
					|  |  |  |  |         //提交审核
 | 
			
		
	
		
			
				
					|  |  |  |  |         if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         //判断是否上级供应商是否审核通过
 | 
			
		
	
		
			
				
					|  |  |  |  |             //判断是否上级供应商是否审核通过
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk()); | 
			
		
	
		
			
				
					|  |  |  |  |         if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN | 
			
		
	
		
			
				
					|  |  |  |  |                 || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) { | 
			
		
	
		
			
				
					|  |  |  |  |             return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!"); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |             SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk()); | 
			
		
	
		
			
				
					|  |  |  |  |             if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN | 
			
		
	
		
			
				
					|  |  |  |  |                     || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) { | 
			
		
	
		
			
				
					|  |  |  |  |                 return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         //验证证书是否齐全
 | 
			
		
	
		
			
				
					|  |  |  |  |         FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest(); | 
			
		
	
		
			
				
					|  |  |  |  |         filterCertSetsRequest.setType(ConstantStatus.CERT_PRODUCT); | 
			
		
	
		
			
				
					|  |  |  |  |         List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         List<SupCertEntity> supCertEntityList = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId()); | 
			
		
	
		
			
				
					|  |  |  |  |         ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); | 
			
		
	
		
			
				
					|  |  |  |  |         while (iterable.hasNext()) { | 
			
		
	
		
			
				
					|  |  |  |  |             SupCertSetEntity supCertSetEntity = iterable.next(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部") | 
			
		
	
		
			
				
					|  |  |  |  |                     || StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部") | 
			
		
	
		
			
				
					|  |  |  |  |                     || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2 | 
			
		
	
		
			
				
					|  |  |  |  |                     && StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) | 
			
		
	
		
			
				
					|  |  |  |  |                     || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) | 
			
		
	
		
			
				
					|  |  |  |  |                     || (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx())) | 
			
		
	
		
			
				
					|  |  |  |  |                     || (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb())) | 
			
		
	
		
			
				
					|  |  |  |  |                     || StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode()))) | 
			
		
	
		
			
				
					|  |  |  |  |             ) { | 
			
		
	
		
			
				
					|  |  |  |  |                 for (SupCertEntity supCertEntity : supCertEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (supCertEntity.getName().equals(supCertSetEntity.getName())) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) { | 
			
		
	
		
			
				
					|  |  |  |  |                             iterable.remove(); | 
			
		
	
		
			
				
					|  |  |  |  |                             break; | 
			
		
	
		
			
				
					|  |  |  |  |             //验证证书是否齐全
 | 
			
		
	
		
			
				
					|  |  |  |  |             FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest(); | 
			
		
	
		
			
				
					|  |  |  |  |             filterCertSetsRequest.setType(ConstantStatus.CERT_PRODUCT); | 
			
		
	
		
			
				
					|  |  |  |  |             List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest); | 
			
		
	
		
			
				
					|  |  |  |  |             List<SupCertEntity> supCertEntityList = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId()); | 
			
		
	
		
			
				
					|  |  |  |  |             ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); | 
			
		
	
		
			
				
					|  |  |  |  |             while (iterable.hasNext()) { | 
			
		
	
		
			
				
					|  |  |  |  |                 SupCertSetEntity supCertSetEntity = iterable.next(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部") | 
			
		
	
		
			
				
					|  |  |  |  |                         || StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部") | 
			
		
	
		
			
				
					|  |  |  |  |                         || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2 | 
			
		
	
		
			
				
					|  |  |  |  |                         && StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) | 
			
		
	
		
			
				
					|  |  |  |  |                         || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) | 
			
		
	
		
			
				
					|  |  |  |  |                         || (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx())) | 
			
		
	
		
			
				
					|  |  |  |  |                         || (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb())) | 
			
		
	
		
			
				
					|  |  |  |  |                         || StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode()))) | 
			
		
	
		
			
				
					|  |  |  |  |                 ) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (SupCertEntity supCertEntity : supCertEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if (supCertEntity.getName().equals(supCertSetEntity.getName())) { | 
			
		
	
		
			
				
					|  |  |  |  |                             if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 iterable.remove(); | 
			
		
	
		
			
				
					|  |  |  |  |                                 break; | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                     iterable.remove(); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |  |                 iterable.remove(); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         String errMsg = ""; | 
			
		
	
		
			
				
					|  |  |  |  |         if (supCertSetEntities.size() > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             for (SupCertSetEntity supCertSetEntity : supCertSetEntities) { | 
			
		
	
		
			
				
					|  |  |  |  |                 errMsg = errMsg + "," + supCertSetEntity.getName(); | 
			
		
	
		
			
				
					|  |  |  |  |             String errMsg = ""; | 
			
		
	
		
			
				
					|  |  |  |  |             if (supCertSetEntities.size() > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                 for (SupCertSetEntity supCertSetEntity : supCertSetEntities) { | 
			
		
	
		
			
				
					|  |  |  |  |                     errMsg = errMsg + "," + supCertSetEntity.getName(); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |                 return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!"); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         supProductEntity.setUpdateTime(new Date()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -314,7 +312,7 @@ public class SupProductController { | 
			
		
	
		
			
				
					|  |  |  |  |                 return ResultVOUtils.error(500, "必传证书不齐全"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         String msg=""; | 
			
		
	
		
			
				
					|  |  |  |  |         String msg = ""; | 
			
		
	
		
			
				
					|  |  |  |  |         //  查询是否包含审核未通过的证书
 | 
			
		
	
		
			
				
					|  |  |  |  |         if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || | 
			
		
	
		
			
				
					|  |  |  |  |                 supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -327,9 +325,9 @@ public class SupProductController { | 
			
		
	
		
			
				
					|  |  |  |  |             List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); | 
			
		
	
		
			
				
					|  |  |  |  |             if (CollUtil.isNotEmpty(supCertEntityList)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 for (SupCertEntity supCertEntity : supCertEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     msg+=supCertEntity.getName()+","; | 
			
		
	
		
			
				
					|  |  |  |  |                     msg += supCertEntity.getName() + ","; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |                 return ResultVOUtils.error(500, "审核失败,还有" + msg.substring(0,msg.length()-1) + "证书还未确认!"); | 
			
		
	
		
			
				
					|  |  |  |  |                 return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |