| 
					
				 | 
			
			
				@@ -1,7 +1,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.yijia.customer.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+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.ISysUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.GetMapping; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -19,6 +22,7 @@ import com.yijia.common.enums.BusinessType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yijia.common.core.page.TableDataInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.Arrays; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -33,7 +37,8 @@ public class CustomerManageController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ICustomerManageService customerManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ISysUserService sysUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 查询客户管理列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -41,6 +46,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(",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customerManage.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         startPage(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return getDataTable(list); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,6 +65,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(",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customerManage.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ExcelUtil<CustomerManage> util = new ExcelUtil<CustomerManage>(CustomerManage.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return util.exportExcel(list, "manage"); 
			 |