| 
					
				 | 
			
			
				@@ -4,30 +4,38 @@ import com.baomidou.mybatisplus.core.metadata.IPage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.google.common.collect.Lists; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jeeplus.aop.logging.annotation.ApiLog; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.jeeplus.core.excel.ExcelOptions; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.jeeplus.core.excel.ExportMode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.jeeplus.core.excel.utils.EasyPoiUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementBusinessTwoDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jeeplus.test.reimbursementProject.service.ProjectReimbursementBusinessService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jeeplus.test.reimbursementProject.service.ProjectReimbursementBusinessTwoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementUserDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.http.ResponseEntity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import javax.servlet.http.HttpServletResponse; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.math.BigDecimal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.stream.Collectors; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @RequestMapping("/project/reimbursementBusinessTwo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 public class ProjectReimbursementBusinessTwoController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private ProjectReimbursementBusinessTwoService ProjectReimbursementBusinessTwoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ProjectReimbursementBusinessTwoService projectReimbursementBusinessTwoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ProjectReimbursementBusinessService reimbursementBusinessService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiLog("查询无票报销列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping("findListPage") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResponseEntity findListPage(ProjectReimbursementBusinessTwoDTO ProjectReimbursementBusinessTwoDTO,Page<ProjectReimbursementBusinessTwoDTO> page){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        IPage<ProjectReimbursementBusinessTwoDTO> listPage = ProjectReimbursementBusinessTwoService.findListPage(page, ProjectReimbursementBusinessTwoDTO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        IPage<ProjectReimbursementBusinessTwoDTO> listPage = projectReimbursementBusinessTwoService.findListPage(page, ProjectReimbursementBusinessTwoDTO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return ResponseEntity.ok(listPage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -36,7 +44,7 @@ public class ProjectReimbursementBusinessTwoController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("hasAuthority('project:reimbursementBusinessTwo:del')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResponseEntity delById(@PathVariable("id")String ids){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String idArray[] =ids.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ProjectReimbursementBusinessTwoService.deleteByList ( Lists.newArrayList (idArray) ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        projectReimbursementBusinessTwoService.deleteByList ( Lists.newArrayList (idArray) ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return ResponseEntity.ok("删除成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,14 +52,14 @@ public class ProjectReimbursementBusinessTwoController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping("addData") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("hasAuthority('project:reimbursementBusinessTwo:add')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResponseEntity addData(@RequestBody ProjectReimbursementBusinessTwoDTO ProjectReimbursementBusinessTwoDTO){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ProjectReimbursementBusinessTwoService.addData(ProjectReimbursementBusinessTwoDTO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        projectReimbursementBusinessTwoService.addData(ProjectReimbursementBusinessTwoDTO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return ResponseEntity.ok("添加成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiLog("下拉列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping("findSelectList") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResponseEntity findSelectList(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return ResponseEntity.ok(ProjectReimbursementBusinessTwoService.findSelectList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return ResponseEntity.ok(projectReimbursementBusinessTwoService.findSelectList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiLog("绑定") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -62,11 +70,11 @@ public class ProjectReimbursementBusinessTwoController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal sum = new BigDecimal(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(split.length!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (int i = 0; i < split.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ProjectReimbursementBusinessTwoDTO dataById = ProjectReimbursementBusinessTwoService.findDataById(split[i]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ProjectReimbursementBusinessTwoDTO dataById = projectReimbursementBusinessTwoService.findDataById(split[i]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sum = sum.add(new BigDecimal(dataById.getReimbursementAmount())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ProjectReimbursementBusinessTwoDTO dataById = ProjectReimbursementBusinessTwoService.findDataById(ids); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ProjectReimbursementBusinessTwoDTO dataById = projectReimbursementBusinessTwoService.findDataById(ids); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sum = new BigDecimal(dataById.getReimbursementAmount()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ProjectReimbursementDTO businessById = reimbursementBusinessService.getBusinessById(businessCode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -75,10 +83,10 @@ public class ProjectReimbursementBusinessTwoController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(split.length!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (int i = 0; i < split.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ProjectReimbursementBusinessTwoService.modifyBindCode(split[i],businessCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                projectReimbursementBusinessTwoService.modifyBindCode(split[i],businessCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ProjectReimbursementBusinessTwoService.modifyBindCode(ids,businessCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            projectReimbursementBusinessTwoService.modifyBindCode(ids,businessCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return ResponseEntity.ok("成功"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,12 +95,41 @@ public class ProjectReimbursementBusinessTwoController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiLog("展示下拉列表所有年份") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping("findSelectYearList") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResponseEntity findSelectYearList(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return ResponseEntity.ok(ProjectReimbursementBusinessTwoService.findSelectYearList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return ResponseEntity.ok(projectReimbursementBusinessTwoService.findSelectYearList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiLog("根据年份展示所有编号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping("findSelectCodeListByYear/{year}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResponseEntity findSelectCodeListByYear(@PathVariable("year")String year){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return ResponseEntity.ok(ProjectReimbursementBusinessTwoService.findSelectCodeListByYear(year)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return ResponseEntity.ok(projectReimbursementBusinessTwoService.findSelectCodeListByYear(year)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 导出兴光项目无票报销信息数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param reimbursementUserDTO 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param page 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param response 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiLog("导出兴光项目无票报销信息数据") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping("export") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "导出兴光项目无票报销信息数据excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void exportFile(ProjectReimbursementBusinessTwoDTO reimbursementUserDTO, Page <ProjectReimbursementBusinessTwoDTO> page, ExcelOptions options, HttpServletResponse response) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String fileName = options.getFilename ( ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<ProjectReimbursementBusinessTwoDTO> result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if ( ExportMode.current.equals ( options.getMode ( ) ) ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result = projectReimbursementBusinessTwoService.findListPage ( page, reimbursementUserDTO ).getRecords(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if ( ExportMode.selected.equals ( options.getMode ( ) ) ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result = projectReimbursementBusinessTwoService.findListPage ( page, reimbursementUserDTO ).getRecords().stream ( ).filter ( reimbursement -> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    options.getSelectIds ( ).contains ( reimbursement.getId ( ) ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ).collect ( Collectors.toList ( ) ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            page.setSize ( -1 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            page.setCurrent ( 0 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result = projectReimbursementBusinessTwoService.findListPage ( page, reimbursementUserDTO ).getRecords(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        EasyPoiUtil.exportExcel ( result, "兴光项目无票报销信息数据",  options.getSheetName ( ), ProjectReimbursementBusinessTwoDTO.class, fileName, response ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |