Sfoglia il codice sorgente

项目登记修改

lizhenhao 2 anni fa
parent
commit
9cc637da8e

+ 16 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/controller/FinanceInvoiceController.java

@@ -29,6 +29,8 @@ import com.jeeplus.test.jobPosion.service.mapstruct.JobPositionWrapper;
 import com.jeeplus.test.program.configuration.fileDict.domain.ProgramFileDict;
 import com.jeeplus.test.program.configuration.fileDict.service.ProgramFileDictService;
 import com.jeeplus.test.program.configuration.fileDict.service.dto.ProgramFileDictDTO;
+import com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo;
+import com.jeeplus.test.program.configuration.projectList.service.dto.ExportFileDto;
 import com.jeeplus.test.program.configuration.projectList.service.dto.ProjectListDto;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -269,4 +271,18 @@ public class FinanceInvoiceController {
 
         return financeInvoiceDetailDTOS;
     }
+
+    /**
+     * 导出
+     *
+     * @param financeInvoiceDTO
+     * @param response
+     * @throws Exception
+     */
+//    @GetMapping("/exportFile")
+//    @ApiOperation(value = "导出")
+//    public void exportList(FinanceInvoiceDTO financeInvoiceDTO,Page<FinanceInvoiceDTO> page, HttpServletResponse response) throws Exception {
+//        List<FinanceInvoiceDTO> infos = financeInvoiceService.exportList(page,financeInvoiceDTO);
+//        EasyPoiUtil.exportExcel(infos, "发票列表数据",  "发票列表数据", FinanceInvoiceDTO.class, "发票数据导出", response );
+//    }
 }

+ 52 - 6
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/FinanceInvoiceService.java

@@ -2,7 +2,6 @@ package com.jeeplus.test.finance.invoice.service;
 
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -10,9 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.jeeplus.core.query.QueryWrapperGenerator;
-import com.jeeplus.sys.domain.Office;
 import com.jeeplus.sys.domain.User;
-import com.jeeplus.sys.mapper.UserMapper;
 import com.jeeplus.sys.service.UserService;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.StringUtils;
@@ -24,9 +21,6 @@ import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDTO;
 import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDetailDTO;
 import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceReceivablesDTO;
 import com.jeeplus.test.finance.invoice.service.mapstruct.*;
-import com.jeeplus.test.jobPosion.domain.JobPosition;
-import com.jeeplus.test.jobPosion.domain.Position;
-import com.jeeplus.test.jobPosion.service.mapstruct.JobPositionWrapper;
 import com.jeeplus.test.mould.service.SerialnumTplService;
 import com.jeeplus.test.oss.domain.WorkAttachment;
 import com.jeeplus.test.oss.mapper.OssServiceMapper;
@@ -42,6 +36,7 @@ import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
 
 @Service
@@ -278,6 +273,57 @@ public class FinanceInvoiceService extends ServiceImpl<FinanceInvoiceMapper, Fin
         return financeInvoiceMapper.findList(page,queryWrapper);
     }
 
+//    public List<FinanceInvoiceDTO> exportList(Page<FinanceInvoiceDTO> page, FinanceInvoiceDTO financeInvoiceDTO) throws Exception{
+//        IPage<FinanceInvoiceDTO> FinanceInvoiceDTOIPage = this.findList(page, financeInvoiceDTO);
+//        List<FinanceInvoiceDTO> records = FinanceInvoiceDTOIPage.getRecords();
+//        if(CollectionUtil.isNotEmpty(records)){
+//            records.stream().forEach(record->{
+//                if(CollectionUtil.isNotEmpty(record.getFinanceInvoiceBaseDTOList())){
+//                    if(record.getFinanceInvoiceBaseDTOList().size() == 1 && StringUtils.isBlank(record.getFinanceInvoiceBaseDTOList().get(0).getProgramId())) {
+//                        record.setProgramName("其他: " + record.getFinanceInvoiceBaseDTOList().get(0).getProgramName());
+//                    } else {
+//                        AtomicReference<String> programName = new AtomicReference<>("");
+//                        AtomicInteger n = new AtomicInteger();
+//                        record.getFinanceInvoiceBaseDTOList().stream().forEach((item)->{
+//                            n.getAndIncrement();
+//                            if (n.get() == record.getFinanceInvoiceBaseDTOList().size()){
+//                                if(StringUtils.isNotBlank(item.getProgramName())){
+//                                    programName.set(programName.get() + item.getProgramName());
+//                                }
+//                            } else {
+//                                if(StringUtils.isNotBlank(item.getProgramName())){
+//                                    programName.set(programName.get() + item.getProgramName() + ",");
+//                                }
+//                            }
+//                        });
+//                        record.setProgramName(programName.get());
+//                    }
+//                }else{
+//                    record.setProgramName("");
+//                }
+//                if(CollectionUtil.isNotEmpty(record.getFinanceInvoiceDetailDTOList())){
+//                    AtomicReference<String> programName = new AtomicReference<>("");
+//                    AtomicInteger n = new AtomicInteger();
+//                    record.getFinanceInvoiceBaseDTOList().stream().forEach((item)->{
+//                        n.getAndIncrement();
+//                        if (n.get() == record.getFinanceInvoiceBaseDTOList().size()){
+//                            if(StringUtils.isNotBlank(item.getProgramName())){
+//                                programName.set(programName.get() + item.getProgramName());
+//                            }
+//                        } else {
+//                            if(StringUtils.isNotBlank(item.getProgramName())){
+//                                programName.set(programName.get() + item.getProgramName() + ",");
+//                            }
+//                        }
+//                    });
+//                    record.setProgramName(programName.get());
+//                }
+//            });
+//        }else{
+//            return records;
+//        }
+//    }
+
     public FinanceInvoiceDTO queryById(String id) {
 
         FinanceInvoiceDTO financeInvoiceDTO = financeInvoiceMapper.queryById(id);

+ 17 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/dto/FinanceInvoiceDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.test.finance.invoice.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.core.domain.BaseEntity;
@@ -31,21 +32,25 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 发票类型
      */
+    @Excel(name = "发票类型", orderNum = "0", width = 30)
     private String type;
 
     /**
      * 发票申请编号
      */
+    @Excel(name = "发票申请编号", orderNum = "0", width = 30)
     private String no;
 
     /**
      * 开票类型
      */
+    @Excel(name = "开票类型", orderNum = "0", width = 30)
     private String billingType;
 
     /**
      * 实际开票单位
      */
+    @Excel(name = "实际开票单位", orderNum = "0", width = 30)
     private String billingWorkplaceReal;
 
     /**
@@ -81,16 +86,19 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 收款类型
      */
+    @Excel(name = "收款类型", orderNum = "0", width = 30)
     private String receivablesType;
 
     /**
      * 开票内容
      */
+    @Excel(name = "开票内容", orderNum = "0", width = 30)
     private String billingContent;
 
     /**
      * 发票金额(元)
      */
+    @Excel(name = "发票金额(元)", orderNum = "0", width = 30)
     private String account;
 
     /**
@@ -106,6 +114,7 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 开票时间
      */
+    @Excel(name = "开票时间", orderNum = "0", width = 30)
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
     private Date billingDate;
@@ -150,6 +159,7 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 状态
      */
+    @Excel(name = "状态", orderNum = "0", width = 30)
     private String status;
 
     /**
@@ -165,16 +175,19 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 是否确认收款
      */
+    @Excel(name = "是否确认收款", orderNum = "0", width = 30)
     private String receivablesStatus;
 
     /**
      * 是否作废
      */
+    @Excel(name = "是否作废", orderNum = "0", width = 30)
     private String invalidStatus;
 
     /**
      * 收款日期
      */
+    @Excel(name = "收款日期", orderNum = "0", width = 30)
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
     private Date receivablesDate;
@@ -207,6 +220,7 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 发票号
      */
+    @Excel(name = "发票号", orderNum = "0", width = 30)
     private String number;
 
     /**
@@ -242,6 +256,7 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 项目名称
      */
+    @Excel(name = "项目名称", orderNum = "0", width = 30)
     private String programName;
 
     /**
@@ -252,11 +267,13 @@ public class FinanceInvoiceDTO extends BaseDTO {
     /**
      * 经办人
      */
+    @Excel(name = "经办人", orderNum = "0", width = 30)
     private String operator;
 
     /**
      * 经办人部门
      */
+    @Excel(name = "经办人部门", orderNum = "0", width = 30)
     private String operatorOffice;
 
     private static final long serialVersionUID = 1L;

+ 5 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramProjectListLink.java

@@ -22,4 +22,9 @@ public class ProgramProjectListLink extends BaseEntity {
 
     private String remarks;
 
+    /**
+     * 人员类型
+     */
+    private String clientType;
+
 }

BIN
jeeplus-web/src/main/resources/dot/发票明细导入模板.xlsx