Prechádzať zdrojové kódy

财务管理-发票

lizhenhao 2 rokov pred
rodič
commit
13bf8d3ac6
14 zmenil súbory, kde vykonal 948 pridanie a 0 odobranie
  1. 88 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/controller/FinanceInvoiceController.java
  2. 126 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/domain/FinanceInvoice.java
  3. 66 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/domain/FinanceInvoiceBase.java
  4. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/FinanceInvoiceBaseMapper.java
  5. 28 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/FinanceInvoiceMapper.java
  6. 42 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/xml/FinanceInvoiceBaseMapper.xml
  7. 106 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/xml/FinanceInvoiceMapper.xml
  8. 109 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/FinanceInvoiceService.java
  9. 63 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/dto/FinanceInvoiceBaseDTO.java
  10. 133 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/dto/FinanceInvoiceDTO.java
  11. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/mapstruct/FinanceInvoiceBaseWrapper.java
  12. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/mapstruct/FinanceInvoiceWrapper.java
  13. 3 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/ProjectListMapper.java
  14. 133 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

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

@@ -0,0 +1,88 @@
+package com.jeeplus.test.finance.invoice.controller;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.sys.constant.enums.LogTypeEnum;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoice;
+import com.jeeplus.test.finance.invoice.service.FinanceInvoiceService;
+import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDTO;
+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 io.swagger.annotations.Api;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Api("财务管理-发票")
+@RestController
+@RequestMapping(value = "/finance/invoice")
+public class FinanceInvoiceController {
+
+    @Resource
+    private FinanceInvoiceService financeInvoiceService;
+
+    /**
+     * 查询发票列表
+     * @param financeInvoiceDTO
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiLog("查询发票列表")
+    @PreAuthorize("hasAuthority('finance:invoice:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<FinanceInvoiceDTO>> data(FinanceInvoiceDTO financeInvoiceDTO, Page<FinanceInvoiceDTO> page) {
+        IPage<FinanceInvoiceDTO> result = new Page<FinanceInvoiceDTO>();
+        result = financeInvoiceService.findList (page,new QueryWrapper<FinanceInvoice>());
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 查询发票数据
+     * @param id
+     * @return
+     */
+    @ApiLog("查询发票数据")
+    @PreAuthorize ("hasAnyAuthority('finance:invoice:view','finance:invoice:add','finance:invoice:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity queryById(@RequestParam("id") String id) {
+        FinanceInvoiceDTO financeInvoiceDTO = financeInvoiceService.queryById ( id );
+        return ResponseEntity.ok (financeInvoiceDTO);
+    }
+
+    /**
+     * 保存发票数据
+     * @param financeInvoiceDTO
+     * @return
+     */
+    @ApiLog(value = "修改/新增发票数据", type = LogTypeEnum.SAVE)
+    @PreAuthorize("hasAnyAuthority('finance:invoice:add','finance:invoice:edit')")
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody FinanceInvoiceDTO financeInvoiceDTO) throws Exception {
+        financeInvoiceService.saveInvoice(financeInvoiceDTO);
+        return ResponseEntity.ok ("操作成功");
+    }
+
+    /**
+     * 删除附件类型
+     * @param ids
+     * @return
+     */
+    @ApiLog(value = "删除附件类型", type = LogTypeEnum.SAVE)
+    @PreAuthorize ("hasAuthority('finance:invoice:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String ids) {
+        return financeInvoiceService.deleteByIds(ids);
+    }
+}

+ 126 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/domain/FinanceInvoice.java

@@ -0,0 +1,126 @@
+package com.jeeplus.test.finance.invoice.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 财务管理-发票
+ * @TableName finance_invoice
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("finance_invoice")
+public class FinanceInvoice extends BaseEntity {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 发票类型
+     */
+    private String type;
+
+    /**
+     * 发票申请编号
+     */
+    private String no;
+
+    /**
+     * 开票类型
+     */
+    private String billingType;
+
+    /**
+     * 实际开票单位
+     */
+    private String billingWorkplaceReal;
+
+    /**
+     * 纳税人识别号
+     */
+    private String taxpayerIdentificationNo;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 电话
+     */
+    private String telPhone;
+
+    /**
+     * 开户银行
+     */
+    private String openBank;
+
+    /**
+     * 银行账号
+     */
+    private String bankAccount;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 收款类型
+     */
+    private String receivablesType;
+
+    /**
+     * 开票内容
+     */
+    private String billingContent;
+
+    /**
+     * 发票金额(元)
+     */
+    private String account;
+
+    /**
+     * 开票内容要求
+     */
+    private String billingContentTerms;
+
+    /**
+     * 开票人
+     */
+    private String billingPeople;
+
+    /**
+     * 开票时间
+     */
+    private Date billingDate;
+
+    /**
+     * 领票时间
+     */
+    private Date collectDate;
+
+    /**
+     * 实际开票人
+     */
+    private String billingPeopleReal;
+
+    /**
+     * 对账人
+     */
+    private String reconciliationPeople;
+
+    /**
+     * 对账地区
+     */
+    private String reconciliationArea;
+
+    private static final long serialVersionUID = 1L;
+}

+ 66 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/domain/FinanceInvoiceBase.java

@@ -0,0 +1,66 @@
+package com.jeeplus.test.finance.invoice.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 财务管理-发票基本信息
+ * @TableName finance_invoice_base
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("finance_invoice_base")
+public class FinanceInvoiceBase extends BaseEntity {
+
+    /**
+     * 发票id
+     */
+    private String invoiceId;
+
+    /**
+     * 项目名称
+     */
+    private String programName;
+
+    /**
+     * 项目id
+     */
+    private String programId;
+
+    /**
+     * 合同名称
+     */
+    private String contractName;
+
+    /**
+     * 项目所在地
+     */
+    private String location;
+
+    /**
+     * 项目编号
+     */
+    private String programNo;
+
+    /**
+     * 委托方
+     */
+    private String clientName;
+
+    /**
+     * 委托方id
+     */
+    private String clientId;
+
+    /**
+     * 报告号
+     */
+    private String reportNo;
+
+    private static final long serialVersionUID = 1L;
+}

+ 17 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/FinanceInvoiceBaseMapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.test.finance.invoice.mapper;
+
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoiceBase;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.finance.invoice.domain.FinanceInvoiceBase
+ */
+@Mapper
+public interface FinanceInvoiceBaseMapper extends BaseMapper<FinanceInvoiceBase> {
+
+}
+
+
+
+

+ 28 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/FinanceInvoiceMapper.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.finance.invoice.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoice;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDTO;
+import com.jeeplus.test.program.configuration.fileDict.domain.ProgramFileDict;
+import com.jeeplus.test.program.configuration.fileDict.service.dto.ProgramFileDictDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Entity com.jeeplus.test.finance.invoice.domain.FinanceInvoice
+ */
+@Mapper
+public interface FinanceInvoiceMapper extends BaseMapper<FinanceInvoice> {
+
+    public IPage<FinanceInvoiceDTO> findList(Page<FinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<FinanceInvoice> queryWrapper);
+
+    public FinanceInvoiceDTO queryById(@Param("id") String id);
+}
+
+
+
+

+ 42 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/xml/FinanceInvoiceBaseMapper.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.test.finance.invoice.mapper.FinanceInvoiceBaseMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceBaseDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="invoiceId" column="invoice_id" jdbcType="VARCHAR"/>
+            <result property="programName" column="program_name" jdbcType="VARCHAR"/>
+            <result property="programId" column="program_id" jdbcType="VARCHAR"/>
+            <result property="contractName" column="contract_name" jdbcType="VARCHAR"/>
+            <result property="location" column="location" jdbcType="VARCHAR"/>
+            <result property="programNo" column="program_no" jdbcType="VARCHAR"/>
+            <result property="clientName" column="client_name" jdbcType="VARCHAR"/>
+            <result property="clientId" column="client_id" jdbcType="VARCHAR"/>
+            <result property="reportNo" column="report_no" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        fib.id,
+        fib.create_by,
+        fib.create_date,
+        fib.update_by,
+        fib.update_date,
+        fib.del_flag,
+        fib.invoice_id,
+        fib.program_name,
+        fib.program_id,
+        fib.contract_name,
+        fib.location,
+        fib.program_no,
+        fib.client_name,
+        fib.client_id,
+        fib.report_no
+    </sql>
+</mapper>

+ 106 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/mapper/xml/FinanceInvoiceMapper.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.test.finance.invoice.mapper.FinanceInvoiceMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="type" column="type" jdbcType="VARCHAR"/>
+            <result property="no" column="no" jdbcType="VARCHAR"/>
+            <result property="billingType" column="billing_type" jdbcType="VARCHAR"/>
+            <result property="billingWorkplaceReal" column="billing_workplace_real" jdbcType="VARCHAR"/>
+            <result property="taxpayerIdentificationNo" column="taxpayer_identification_no" jdbcType="VARCHAR"/>
+            <result property="address" column="address" jdbcType="VARCHAR"/>
+            <result property="telPhone" column="tel_phone" jdbcType="VARCHAR"/>
+            <result property="openBank" column="open_bank" jdbcType="VARCHAR"/>
+            <result property="bankAccount" column="bank_account" jdbcType="VARCHAR"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="receivablesType" column="receivables_type" jdbcType="VARCHAR"/>
+            <result property="billingContent" column="billing_content" jdbcType="VARCHAR"/>
+            <result property="account" column="account" jdbcType="VARCHAR"/>
+            <result property="billingContentTerms" column="billing_content_terms" jdbcType="VARCHAR"/>
+            <result property="billingPeople" column="billing_people" jdbcType="VARCHAR"/>
+            <result property="billingDate" column="billing_date" jdbcType="TIMESTAMP"/>
+            <result property="collectDate" column="collect_date" jdbcType="TIMESTAMP"/>
+            <result property="billingPeopleReal" column="billing_people_real" jdbcType="VARCHAR"/>
+            <result property="reconciliationPeople" column="reconciliation_people" jdbcType="VARCHAR"/>
+            <result property="reconciliationArea" column="reconciliation_area" jdbcType="VARCHAR"/>
+            <collection property="financeInvoiceBaseDTOList" column="id" select="getBaseList" ofType="com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceBaseDTO"></collection>
+    </resultMap>
+
+    <sql id="FIB_Column_List">
+        fib.id,
+        fib.create_by,
+        fib.create_date,
+        fib.update_by,
+        fib.update_date,
+        fib.del_flag,
+        fib.invoice_id,
+        fib.program_name,
+        fib.program_id,
+        fib.contract_name,
+        fib.location,
+        fib.program_no,
+        fib.client_name,
+        fib.client_id,
+        fib.report_no
+    </sql>
+
+    <sql id="Base_Column_List">
+        fi.id,
+        fi.create_by,
+        fi.create_date,
+        fi.update_by,
+        fi.update_date,
+        fi.del_flag,
+        fi.remarks,
+        fi.type,
+        fi.no,
+        fi.billing_type,
+        fi.billing_workplace_real,
+        fi.taxpayer_identification_no,
+        fi.address,
+        fi.tel_phone,
+        fi.open_bank,
+        fi.bank_account,
+        fi.name,
+        fi.receivables_type,
+        fi.billing_content,
+        fi.account,
+        fi.billing_content_terms,
+        fi.billing_people,
+        fi.billing_date,
+        fi.collect_date,
+        fi.billing_people_real,
+        fi.reconciliation_people,
+        fi.reconciliation_area
+    </sql>
+
+    <select id="getBaseList" resultType="com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceBaseDTO">
+        select
+        <include refid="FIB_Column_List"></include>
+        from finance_invoice_base fib
+        where fib.del_flag = '0' and fib.invoice_id = ${id}
+    </select>
+
+    <select id="findList" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>
+        from finance_invoice fi
+        ${ew.customSqlSegment}
+    </select>
+
+    <select id="queryById" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>
+        from finance_invoice fi
+        where fi.del_flag = '0' and fi.id = ${id}
+    </select>
+</mapper>

+ 109 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/finance/invoice/service/FinanceInvoiceService.java

@@ -0,0 +1,109 @@
+package com.jeeplus.test.finance.invoice.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoice;
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoiceBase;
+import com.jeeplus.test.finance.invoice.mapper.FinanceInvoiceBaseMapper;
+import com.jeeplus.test.finance.invoice.mapper.FinanceInvoiceMapper;
+import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceBaseDTO;
+import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDTO;
+import com.jeeplus.test.finance.invoice.service.mapstruct.FinanceInvoiceBaseWrapper;
+import com.jeeplus.test.finance.invoice.service.mapstruct.FinanceInvoiceWrapper;
+import com.jeeplus.test.mould.service.SerialnumTplService;
+import com.jeeplus.test.program.configuration.fileDict.domain.ProgramFileDict;
+import com.jeeplus.test.program.configuration.fileDict.mapper.ProgramFileDictMapper;
+import com.jeeplus.test.program.configuration.fileDict.service.dto.ProgramFileDictDTO;
+import com.jeeplus.test.program.configuration.fileDict.service.mapstruct.ProgramFileDictWrapper;
+import com.jeeplus.test.roster.service.dto.RosterBaseDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+@Transactional
+public class FinanceInvoiceService extends ServiceImpl<FinanceInvoiceMapper, FinanceInvoice> {
+
+    @Resource
+    private FinanceInvoiceMapper financeInvoiceMapper;
+    @Resource
+    private FinanceInvoiceBaseMapper financeInvoiceBaseMapper;
+    @Resource
+    private SerialnumTplService serialnumTplService;
+
+    public IPage<FinanceInvoiceDTO> findList(Page<FinanceInvoiceDTO> page, QueryWrapper<FinanceInvoice> queryWrapper){
+        queryWrapper.eq("fi.del_flag","0");
+        return financeInvoiceMapper.findList(page,queryWrapper);
+    }
+
+    public FinanceInvoiceDTO queryById(String id) {
+
+        FinanceInvoiceDTO financeInvoiceDTO = financeInvoiceMapper.queryById(id);
+
+        return financeInvoiceDTO;
+    }
+
+    public ResponseEntity saveInvoice(FinanceInvoiceDTO financeInvoiceDTO) throws Exception{
+        FinanceInvoice financeInvoice = FinanceInvoiceWrapper.INSTANCE.toEntity(financeInvoiceDTO);
+        if (ObjectUtil.isNotEmpty(financeInvoice)) {
+            if(StringUtils.isBlank(financeInvoice.getId())){
+                //获取当前登录人信息
+                UserDTO userDTO = UserUtils.getCurrentUserDTO();
+                //发票编号生成
+                String serialNum = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), FinanceInvoiceDTO.BIZ_CODE);
+                financeInvoice.setNo(serialNum);
+            }
+        }
+        this.saveOrUpdate(financeInvoice);
+        if (ObjectUtil.isNotEmpty(financeInvoiceDTO)) {
+            if(CollectionUtil.isNotEmpty(financeInvoiceDTO.getFinanceInvoiceBaseDTOList())){
+                List<String> delIds = financeInvoiceDTO.getFinanceInvoiceBaseDTOList().stream().distinct().filter(item->{
+                    if(StringUtils.isNotBlank(item.getId())){
+                        return true;
+                    }
+                    return false;
+                }).map(FinanceInvoiceBaseDTO::getId).collect(Collectors.toList());
+                if(CollectionUtil.isNotEmpty(delIds)){
+                    financeInvoiceBaseMapper.delete(new QueryWrapper<FinanceInvoiceBase>().lambda()
+                            .eq(FinanceInvoiceBase::getInvoiceId,financeInvoice.getId()).notIn(FinanceInvoiceBase::getId,delIds));
+                }else{
+                    financeInvoiceBaseMapper.delete(new QueryWrapper<FinanceInvoiceBase>().lambda()
+                            .eq(FinanceInvoiceBase::getInvoiceId,financeInvoice.getId()));
+                }
+                financeInvoiceDTO.getFinanceInvoiceBaseDTOList().stream().forEach(item->{
+                    FinanceInvoiceBase financeInvoiceBase = FinanceInvoiceBaseWrapper.INSTANCE.toEntity(item);
+                    if(StringUtils.isNotBlank(financeInvoiceBase.getId())){
+                        financeInvoiceBaseMapper.updateById(financeInvoiceBase);
+                    }else{
+                        financeInvoiceBase.setInvoiceId(financeInvoice.getId());
+                        financeInvoiceBaseMapper.insert(financeInvoiceBase);
+                    }
+                });
+            }else{
+                financeInvoiceBaseMapper.delete(new QueryWrapper<FinanceInvoiceBase>().lambda()
+                        .eq(FinanceInvoiceBase::getInvoiceId,financeInvoice.getId()));
+            }
+        }
+
+        return ResponseEntity.ok("保存成功");
+    }
+
+    public ResponseEntity deleteByIds(String ids) {
+        String idArray[] =ids.split(",");
+        this.removeByIds (Lists.newArrayList (idArray));
+        return ResponseEntity.ok ("删除成功");
+    }
+}

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

@@ -0,0 +1,63 @@
+package com.jeeplus.test.finance.invoice.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 财务管理-发票基本信息
+ * @TableName finance_invoice_base
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class FinanceInvoiceBaseDTO extends BaseDTO {
+
+    /**
+     * 发票id
+     */
+    private String invoiceId;
+
+    /**
+     * 项目名称
+     */
+    private String programName;
+
+    /**
+     * 项目id
+     */
+    private String programId;
+
+    /**
+     * 合同名称
+     */
+    private String contractName;
+
+    /**
+     * 项目所在地
+     */
+    private String location;
+
+    /**
+     * 项目编号
+     */
+    private String programNo;
+
+    /**
+     * 委托方
+     */
+    private String clientName;
+
+    /**
+     * 委托方id
+     */
+    private String clientId;
+
+    /**
+     * 报告号
+     */
+    private String reportNo;
+
+    private static final long serialVersionUID = 1L;
+}

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

@@ -0,0 +1,133 @@
+package com.jeeplus.test.finance.invoice.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 财务管理-发票
+ * @TableName finance_invoice
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class FinanceInvoiceDTO extends BaseDTO {
+
+    public static final String BIZ_CODE = "4";
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 发票类型
+     */
+    private String type;
+
+    /**
+     * 发票申请编号
+     */
+    private String no;
+
+    /**
+     * 开票类型
+     */
+    private String billingType;
+
+    /**
+     * 实际开票单位
+     */
+    private String billingWorkplaceReal;
+
+    /**
+     * 纳税人识别号
+     */
+    private String taxpayerIdentificationNo;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 电话
+     */
+    private String telPhone;
+
+    /**
+     * 开户银行
+     */
+    private String openBank;
+
+    /**
+     * 银行账号
+     */
+    private String bankAccount;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 收款类型
+     */
+    private String receivablesType;
+
+    /**
+     * 开票内容
+     */
+    private String billingContent;
+
+    /**
+     * 发票金额(元)
+     */
+    private String account;
+
+    /**
+     * 开票内容要求
+     */
+    private String billingContentTerms;
+
+    /**
+     * 开票人
+     */
+    private String billingPeople;
+
+    /**
+     * 开票时间
+     */
+    private Date billingDate;
+
+    /**
+     * 领票时间
+     */
+    private Date collectDate;
+
+    /**
+     * 实际开票人
+     */
+    private String billingPeopleReal;
+
+    /**
+     * 对账人
+     */
+    private String reconciliationPeople;
+
+    /**
+     * 对账地区
+     */
+    private String reconciliationArea;
+
+    /**
+     * 基础信息
+     */
+    private List<FinanceInvoiceBaseDTO> financeInvoiceBaseDTOList;
+
+    private static final long serialVersionUID = 1L;
+}

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

@@ -0,0 +1,17 @@
+package com.jeeplus.test.finance.invoice.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoiceBase;
+import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceBaseDTO;
+import com.jeeplus.test.program.configuration.fileDict.domain.ProgramFileDict;
+import com.jeeplus.test.program.configuration.fileDict.service.dto.ProgramFileDictDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface FinanceInvoiceBaseWrapper extends EntityWrapper<FinanceInvoiceBaseDTO, FinanceInvoiceBase>{
+
+        FinanceInvoiceBaseWrapper INSTANCE = Mappers.getMapper(FinanceInvoiceBaseWrapper.class);
+
+}

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

@@ -0,0 +1,17 @@
+package com.jeeplus.test.finance.invoice.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.finance.invoice.domain.FinanceInvoice;
+import com.jeeplus.test.finance.invoice.service.dto.FinanceInvoiceDTO;
+import com.jeeplus.test.program.configuration.fileDict.domain.ProgramFileDict;
+import com.jeeplus.test.program.configuration.fileDict.service.dto.ProgramFileDictDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface FinanceInvoiceWrapper extends EntityWrapper<FinanceInvoiceDTO, FinanceInvoice>{
+
+        FinanceInvoiceWrapper INSTANCE = Mappers.getMapper(FinanceInvoiceWrapper.class);
+
+}

+ 3 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/ProjectListMapper.java

@@ -22,4 +22,7 @@ public interface ProjectListMapper extends BaseMapper<ProgramProjectListInfo> {
     IPage<ProgramProjectListInfo> findPageList(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);
 
     List<ExportFileDto> findList(@Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);
+
+    IPage<ProgramProjectListInfo> findPage(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);
+
 }

+ 133 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

@@ -140,4 +140,137 @@
             ORDER BY a.update_date DESC
     </select>
 
+    <resultMap id="BaseResultMap" type="com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+        <result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
+        <result property="contractId" column="contract_id" jdbcType="VARCHAR"/>
+        <result property="contractName" column="contract_name" jdbcType="VARCHAR"/>
+        <result property="client" column="client" jdbcType="VARCHAR"/>
+        <result property="clientName" column="client_name" jdbcType="VARCHAR"/>
+        <result property="amount" column="amount" jdbcType="VARCHAR"/>
+        <result property="contractType" column="contract_type" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="no" column="no" jdbcType="VARCHAR"/>
+        <result property="projectType" column="project_type" jdbcType="VARCHAR"/>
+        <result property="approvalNo" column="approval_no" jdbcType="VARCHAR"/>
+        <result property="company" column="company" jdbcType="VARCHAR"/>
+        <result property="projectMould" column="project_mould" jdbcType="VARCHAR"/>
+        <result property="propertyHolder" column="property_holder" jdbcType="VARCHAR"/>
+        <result property="propertyHolderName" column="property_holder_name" jdbcType="VARCHAR"/>
+        <result property="location" column="location" jdbcType="VARCHAR"/>
+        <result property="isFirst" column="is_first" jdbcType="VARCHAR"/>
+        <result property="yearNum" column="year_num" jdbcType="VARCHAR"/>
+        <result property="checkYear" column="check_year" jdbcType="VARCHAR"/>
+        <result property="projectManager" column="project_manager" jdbcType="VARCHAR"/>
+        <result property="projectManagerName" column="project_manager_name" jdbcType="VARCHAR"/>
+        <result property="reportType" column="report_type" jdbcType="VARCHAR"/>
+        <result property="industry" column="industry" jdbcType="VARCHAR"/>
+        <result property="enterpriseType" column="enterprise_type" jdbcType="VARCHAR"/>
+        <result property="riskLevel" column="risk_level" jdbcType="VARCHAR"/>
+        <result property="projectSource" column="project_source" jdbcType="VARCHAR"/>
+        <result property="estimate" column="estimate" jdbcType="DECIMAL"/>
+        <result property="planEndTime" column="plan_end_time" jdbcType="TIMESTAMP"/>
+        <result property="useNum" column="use_num" jdbcType="INTEGER"/>
+        <result property="appointment" column="appointment" jdbcType="INTEGER"/>
+        <result property="workHours" column="work_hours" jdbcType="DOUBLE"/>
+        <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+        <result property="assessmentEnterprise" column="assessment_enterprise" jdbcType="VARCHAR"/>
+        <result property="assessmentEnterpriseName" column="assessment_enterprise_name" jdbcType="VARCHAR"/>
+        <result property="linkNum" column="link_num" jdbcType="VARCHAR"/>
+        <result property="relationship" column="relationship" jdbcType="VARCHAR"/>
+        <result property="assessmentWay" column="assessment_way" jdbcType="VARCHAR"/>
+        <result property="assessmentObjective" column="assessment_objective" jdbcType="VARCHAR"/>
+        <result property="assessmentDate" column="assessment_date" jdbcType="TIMESTAMP"/>
+        <result property="num" column="num" jdbcType="DECIMAL"/>
+        <result property="projectDevelopment" column="project_development" jdbcType="VARCHAR"/>
+        <result property="delegateProjectType" column="delegate_project_type" jdbcType="VARCHAR"/>
+        <result property="assessmentObject" column="assessment_object" jdbcType="VARCHAR"/>
+        <result property="workBeginDate" column="work_begin_date" jdbcType="TIMESTAMP"/>
+        <result property="workEndDate" column="work_end_date" jdbcType="TIMESTAMP"/>
+        <result property="reportingDate" column="reporting_date" jdbcType="TIMESTAMP"/>
+        <result property="isHave" column="is_have" jdbcType="VARCHAR"/>
+        <result property="isInfluence" column="is_influence" jdbcType="VARCHAR"/>
+        <result property="mode" column="mode" jdbcType="VARCHAR"/>
+        <result property="status" column="status" jdbcType="VARCHAR"/>
+        <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
+        <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        ppli.id,
+        ppli.create_by,
+        ppli.create_date,
+        ppli.update_by,
+        ppli.update_date,
+        ppli.del_flag,
+        ppli.contract_id,
+        ppli.contract_name,
+        ppli.client,
+        ppli.client_name,
+        ppli.amount,
+        ppli.contract_type,
+        ppli.name,
+        ppli.no,
+        ppli.project_type,
+        ppli.approval_no,
+        ppli.company,
+        ppli.project_mould,
+        ppli.property_holder,
+        ppli.property_holder_name,
+        ppli.location,
+        ppli.is_first,
+        ppli.year_num,
+        ppli.check_year,
+        ppli.project_manager,
+        ppli.project_manager_name,
+        ppli.report_type,
+        ppli.industry,
+        ppli.enterprise_type,
+        ppli.risk_level,
+        ppli.project_source,
+        ppli.estimate,
+        ppli.plan_end_time,
+        ppli.use_num,
+        ppli.appointment,
+        ppli.work_hours,
+        ppli.remarks,
+        ppli.assessment_enterprise,
+        ppli.assessment_enterprise_name,
+        ppli.link_num,
+        ppli.relationship,
+        ppli.assessment_way,
+        ppli.assessment_objective,
+        ppli.assessment_date,
+        ppli.num,
+        ppli.project_development,
+        ppli.delegate_project_type,
+        ppli.assessment_object,
+        ppli.work_begin_date,
+        ppli.work_end_date,
+        ppli.reporting_date,
+        ppli.is_have,
+        ppli.is_influence,
+        ppli.mode,
+        ppli.status,
+        ppli.proc_ins_id,
+        ppli.process_definition_id
+    </sql>
+    <select id="findPage" resultType="com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo">
+        SELECT
+        <include refid="Base_Column_List"></include>,
+        su.name AS create_by,
+        sup.name as project_manager_name
+        FROM
+            program_project_list_info ppli
+            LEFT JOIN sys_user su ON ppli.create_by = su.id
+            LEFT JOIN sys_user sup ON ppli.project_manager = su.id
+            LEFT JOIN
+            ${ew.customSqlSegment}
+            ORDER BY ppli.update_date DESC
+    </select>
+
 </mapper>