| 
					
				 | 
			
			
				@@ -1,9 +1,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.yijia.customer.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.common.core.domain.entity.SysDept; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.common.core.domain.model.LoginUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.common.utils.SecurityUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.common.utils.poi.ExcelUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.customer.domain.CustomerManage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.customer.service.ICustomerManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.system.service.ISysDeptService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.system.service.ISysUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,7 +40,7 @@ public class CustomerManageController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ICustomerManageService customerManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private ISysUserService sysUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ISysDeptService deptService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 查询客户管理列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,11 +48,12 @@ public class CustomerManageController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/list") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public TableDataInfo list(CustomerManage customerManage) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        LoginUser currentUser = SecurityUtils.getLoginUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String selectDeptid= sysUserService.getUserRoleDeptId(currentUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(selectDeptid !=null && selectDeptid!=""){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<String> list = Arrays.asList(selectDeptid.split(",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(customerManage!=null &&customerManage.getStationId()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dept.setDeptId(customerManage.getStationId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<String> list = deptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             customerManage.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customerManage.setStationId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         startPage(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -65,11 +68,12 @@ public class CustomerManageController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/export") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult export(CustomerManage customerManage) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        LoginUser currentUser = SecurityUtils.getLoginUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String selectDeptid= sysUserService.getUserRoleDeptId(currentUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(selectDeptid !=null && selectDeptid!=""){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<String> list = Arrays.asList(selectDeptid.split(",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(customerManage!=null &&customerManage.getStationId()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dept.setDeptId(customerManage.getStationId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<String> list = deptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             customerManage.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customerManage.setStationId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ExcelUtil<CustomerManage> util = new ExcelUtil<CustomerManage>(CustomerManage.class); 
			 |