|  |  | @ -17,6 +17,7 @@ import com.glxp.api.entity.purchase.SupCertEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.purchase.SupCertSetEntity; |  |  |  | import com.glxp.api.entity.purchase.SupCertSetEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.purchase.SupCompanyEntity; |  |  |  | import com.glxp.api.entity.purchase.SupCompanyEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.purchase.SupManufacturerEntity; |  |  |  | import com.glxp.api.entity.purchase.SupManufacturerEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.sup.UserCompanyEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.exception.JsonException; |  |  |  | import com.glxp.api.exception.JsonException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.basic.FilterUdiRelRequest; |  |  |  | import com.glxp.api.req.basic.FilterUdiRelRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.purchase.FilterCertSetsRequest; |  |  |  | import com.glxp.api.req.purchase.FilterCertSetsRequest; | 
			
		
	
	
		
		
			
				
					|  |  | @ -236,6 +237,7 @@ public class SupManufacturerController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse directToCptAddCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) { |  |  |  |     public BaseResponse directToCptAddCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         String customerId = getCustomerId(); |  |  |  |         String customerId = getCustomerId(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        String customerId = getCustomerId();
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         supManufacturerEntity.setCustomerId(customerId); |  |  |  |         supManufacturerEntity.setCustomerId(customerId); | 
			
		
	
		
		
			
				
					
					|  |  |  |         //判断用户名和社会信用代码不能重复
 |  |  |  |         //判断用户名和社会信用代码不能重复
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest(); |  |  |  |         FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -256,6 +258,8 @@ public class SupManufacturerController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { |  |  |  |         if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             //判断是否上级供应商是否审核通过
 |  |  |  |             //判断是否上级供应商是否审核通过
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId()); |  |  |  |             SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             System.out.println(supCompanyEntity.toString()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             System.out.println(supCompanyEntity.getAuditStatus()+"zhi"); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (supCompanyEntity.getAuditStatus() == null || supCompanyEntity.getAuditStatus() != ConstantStatus.AUDIT_PASS |  |  |  |             if (supCompanyEntity.getAuditStatus() == null || supCompanyEntity.getAuditStatus() != ConstantStatus.AUDIT_PASS | 
			
		
	
		
		
			
				
					
					|  |  |  |             ) { |  |  |  |             ) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); |  |  |  |                 return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); | 
			
		
	
	
		
		
			
				
					|  |  | @ -643,15 +647,24 @@ public class SupManufacturerController { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //    public String getCustomerId() {
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        if (attributes == null) {
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //            throw new JsonException(ResultEnum.NOT_NETWORK);
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        }
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        HttpServletRequest request = attributes.getRequest();
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        String userId = request.getHeader("ADMIN_ID");
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //        return authAdmin.getCustomerId() + "";
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //    }
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public String getCustomerId() { |  |  |  |     public String getCustomerId() { | 
			
		
	
		
		
			
				
					
					|  |  |  |         ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |  |  |  |         ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (attributes == null) { |  |  |  |         if (attributes == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             throw new JsonException(ResultEnum.NOT_NETWORK); |  |  |  |             throw new JsonException(ResultEnum.NOT_NETWORK); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         HttpServletRequest request = attributes.getRequest(); |  |  |  |         HttpServletRequest request = attributes.getRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String userId = request.getHeader("ADMIN_ID"); |  |  |  |         String companyId = request.getHeader("companyId"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId)); |  |  |  |         return companyId; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         return authAdmin.getCustomerId() + ""; |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public String getCompanyId() { |  |  |  |     public String getCompanyId() { | 
			
		
	
	
		
		
			
				
					|  |  | @ -663,4 +676,5 @@ public class SupManufacturerController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         String companyId = request.getHeader("companyId"); |  |  |  |         String companyId = request.getHeader("companyId"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return companyId; |  |  |  |         return companyId; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |