|
@@ -194,9 +194,38 @@ public class CwReimbursementInfoController {
|
|
|
result = service.list (page,cwDTO).getRecords();
|
|
|
}
|
|
|
EasyPoiUtil.exportExcel ( result, sheetName, sheetName, RetureListDto.class, fileName, response );
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 苏州报销(杨忆湄)
|
|
|
+ * @param cwDTO
|
|
|
+ * @param page
|
|
|
+ * @param options
|
|
|
+ * @param response
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @ApiLog(value = "财务报销数据", type = LogTypeEnum.EXPORT)
|
|
|
+ @GetMapping("exportFile2")
|
|
|
+ @ApiOperation(value = "财务报销数据")
|
|
|
+ public void exportFile2(QueryListDto cwDTO, Page <RetureListDto> page, ExcelOptions options, HttpServletResponse response) throws Exception {
|
|
|
+ String fileName = options.getFilename();
|
|
|
+ String sheetName = options.getSheetName();
|
|
|
+ List<RetureListDto> result = new ArrayList<>();
|
|
|
+ if ( ExportMode.current.equals ( options.getMode() ) ) {
|
|
|
+ result = service.list2 (page,cwDTO).getRecords();
|
|
|
+ } else if (ExportMode.selected.equals ( options.getMode() )) {
|
|
|
+ result = service.list2 (page,cwDTO).getRecords().stream ( ).filter ( item ->
|
|
|
+ options.getSelectIds ( ).contains ( item.getId ( ) )
|
|
|
+ ).collect ( Collectors.toList ( ) );
|
|
|
+ } else {
|
|
|
+ page.setSize (-1);
|
|
|
+ page.setCurrent (0);
|
|
|
+ result = service.list2 (page,cwDTO).getRecords();
|
|
|
+ }
|
|
|
+ EasyPoiUtil.exportExcel ( result, sheetName, sheetName, RetureListDto.class, fileName, response );
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@ApiLog(value = "财务电子发票报销数据")
|
|
|
@GetMapping("exportInvoiceReimbursementFile")
|
|
|
@ApiOperation(value = "财务电子发票报销数据")
|
|
@@ -235,6 +264,53 @@ public class CwReimbursementInfoController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 苏州报销(杨忆湄)
|
|
|
+ * @param cwDTO
|
|
|
+ * @param page
|
|
|
+ * @param options
|
|
|
+ * @param response
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @ApiLog(value = "财务电子发票报销数据")
|
|
|
+ @GetMapping("exportInvoiceReimbursementFile2")
|
|
|
+ @ApiOperation(value = "财务电子发票报销数据")
|
|
|
+ public void exportInvoiceReimbursementFile2(QueryListDto cwDTO, Page <RetureListDto> page, ExcelOptions options, HttpServletResponse response) throws Exception {
|
|
|
+ String fileName = "财务电子发票报销数据表";
|
|
|
+ String sheetName = "财务电子发票报销列表";
|
|
|
+ List<RetureListDto> result = new ArrayList<>();
|
|
|
+ if ( com.jeeplus.common.excel.ExportMode.current.equals ( options.getMode() ) ) {
|
|
|
+ result = service.list2 (page,cwDTO).getRecords();
|
|
|
+ } else if (com.jeeplus.common.excel.ExportMode.selected.equals ( options.getMode() )) {
|
|
|
+ result = service.list2 (page,cwDTO).getRecords().stream ( ).filter ( item ->
|
|
|
+ options.getSelectIds ( ).contains ( item.getId ( ) )
|
|
|
+ ).collect ( Collectors.toList ( ) );
|
|
|
+ } else {
|
|
|
+ page.setSize (-1);
|
|
|
+ page.setCurrent (0);
|
|
|
+ if(com.jeeplus.utils.StringUtils.isBlank(cwDTO.getReimbursementType())){
|
|
|
+ cwDTO.setReimbursementType("1");
|
|
|
+ }
|
|
|
+ result = service.list2 (page,cwDTO).getRecords();
|
|
|
+ }
|
|
|
+ List<String> idList = Lists.newArrayList();
|
|
|
+ for (RetureListDto listDto : result) {
|
|
|
+ idList.add(listDto.getId());
|
|
|
+ }
|
|
|
+ List<CwReimbursementAmountInfoDTO> invoiceReimbursementAmountList = Lists.newArrayList();
|
|
|
+ if(idList.size()>0){
|
|
|
+ invoiceReimbursementAmountList = service.getInvoiceReimbursementAmountList(idList);
|
|
|
+ }
|
|
|
+ for (int i = 1;i <=invoiceReimbursementAmountList.size();i ++){
|
|
|
+ CwReimbursementAmountInfoDTO reimbursementAmountInfoDTO = invoiceReimbursementAmountList.get(i - 1);
|
|
|
+ reimbursementAmountInfoDTO.setSerialNumber(i);
|
|
|
+ }
|
|
|
+
|
|
|
+ EasyPoiUtil.exportExcel ( invoiceReimbursementAmountList, sheetName, sheetName, CwReimbursementAmountInfoDTO.class, fileName, response );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@ApiOperation(value = "关联报销")
|
|
|
@GetMapping(value = "/relationReimbursementList")
|
|
|
public ResponseEntity<IPage<RetureListDto>> relationReimbursementList(Page<RetureListDto> page, @RequestParam("id") String id) {
|