| 
					
				 | 
			
			
				@@ -3,6 +3,8 @@ package com.yijia.integral.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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.system.service.ISysDeptService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -40,20 +42,20 @@ public class IntegralRuleController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 查询积分规则列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:list')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/list") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public TableDataInfo list(IntegralRule integralRule) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(integralRule!=null &&integralRule.getStationId()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            dept.setDeptId(integralRule.getStationId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser currentUser = SecurityUtils.getLoginUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dept.setDeptId(currentUser.getUser().getDeptId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(list!=null && list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         startPage(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<IntegralRule> list = integralRuleService.selectIntegralRuleList(integralRule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return getDataTable(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<IntegralRule> integralRuleList = integralRuleService.selectIntegralRuleList(integralRule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return getDataTable(integralRuleList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,30 +63,30 @@ public class IntegralRuleController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param integralRule 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:listRuleInfo')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/listRuleInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public TableDataInfo listRuleInfo(IntegralRule integralRule) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(integralRule!=null &&integralRule.getStationId()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            dept.setDeptId(integralRule.getStationId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser currentUser = SecurityUtils.getLoginUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dept.setDeptId(currentUser.getUser().getDeptId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(list!=null && list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         startPage(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<IntegralRule> list = integralRuleService.listRuleInfo(integralRule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return getDataTable(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<IntegralRule> integralRuleList = integralRuleService.listRuleInfo(integralRule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return getDataTable(integralRuleList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:listRuleOne')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/listRuleOne") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult listRuleOne(IntegralRule integralRule) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(integralRule!=null &&integralRule.getStationId()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            dept.setDeptId(integralRule.getStationId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser currentUser = SecurityUtils.getLoginUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dept.setDeptId(currentUser.getUser().getDeptId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(list!=null && list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,27 +96,26 @@ public class IntegralRuleController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 导出积分规则列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:export')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Log(title = "积分规则", businessType = BusinessType.EXPORT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/export") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult export(IntegralRule integralRule) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(integralRule!=null &&integralRule.getStationId()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            dept.setDeptId(integralRule.getStationId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser currentUser = SecurityUtils.getLoginUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysDept dept =new SysDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dept.setDeptId(currentUser.getUser().getDeptId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<String> list = sysDeptService.selectDeptId(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(list!=null && list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationIdList(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             integralRule.setStationId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<IntegralRule> list = integralRuleService.selectIntegralRuleList(integralRule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<IntegralRule> integralRuleList = integralRuleService.selectIntegralRuleList(integralRule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ExcelUtil<IntegralRule> util = new ExcelUtil<IntegralRule>(IntegralRule.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return util.exportExcel(list, "rule"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return util.exportExcel(integralRuleList, "rule"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 获取积分规则详细信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:query')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping(value = "/{id}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult getInfo(@PathVariable("id") Long id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -124,7 +125,6 @@ public class IntegralRuleController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 新增积分规则 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:add')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Log(title = "积分规则", businessType = BusinessType.INSERT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult add(@RequestBody IntegralRule integralRule) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -138,7 +138,6 @@ public class IntegralRuleController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 修改积分规则 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:edit')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Log(title = "积分规则", businessType = BusinessType.UPDATE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PutMapping 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult edit(@RequestBody IntegralRule integralRule) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -152,7 +151,6 @@ public class IntegralRuleController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 删除积分规则 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @PreAuthorize("@ss.hasPermi('integral:rule:remove')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Log(title = "积分规则", businessType = BusinessType.DELETE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@DeleteMapping("/{ids}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult remove(@PathVariable Long[] ids) 
			 |