lijt 1 год назад
Родитель
Сommit
92712af057
31 измененных файлов с 3208 добавлено и 0 удалено
  1. 174 0
      jeeplus-modules/jeeplus-centrecareful/pom.xml
  2. 32 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/JeeplusCentrecarefulApplication.java
  3. 45 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementAmountInfo.java
  4. 86 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfo.java
  5. 88 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoContract.java
  6. 84 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoOther.java
  7. 84 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoProcured.java
  8. 99 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoReport.java
  9. 74 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementInfo.java
  10. 12 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementAmountInfoMapper.java
  11. 8 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoContractMapper.java
  12. 12 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoMapper.java
  13. 8 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoOtherMapper.java
  14. 8 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoProcuredMapper.java
  15. 7 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoReportMapper.java
  16. 53 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementInfoMapper.java
  17. 598 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml
  18. 637 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/ZsReimbursementInfoService.java
  19. 58 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsQueryListDto.java
  20. 21 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsReportNoDto.java
  21. 124 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsRetureListDto.java
  22. 91 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsSaveInfoDto.java
  23. 19 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsTreeUserDto.java
  24. 152 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/controller/ZsReimbursementTypeController.java
  25. 88 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/domain/ZsReimbursementTypeInfo.java
  26. 37 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/mapper/ZsReimbursementTypeMapper.java
  27. 39 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/mapper/xml/ZsReimbursementTypeMapper.xml
  28. 178 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/ZsReimbursementTypeForTreeDataService.java
  29. 172 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/ZsReimbursementTypeService.java
  30. 21 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/dto/ZsReimbursementTypeDto.java
  31. 99 0
      jeeplus-modules/jeeplus-centrecareful/src/main/resources/bootstrap.yml

+ 174 - 0
jeeplus-modules/jeeplus-centrecareful/pom.xml

@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>jeeplus-modules</artifactId>
+        <groupId>org.jeeplus</groupId>
+        <version>9.0</version>
+    </parent>
+
+    <artifactId>jeeplus-centrecareful</artifactId>
+    <name>jeeplus-centrecareful</name>
+    <description>Admin project for Spring Boot</description>
+
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-common-mybatis-plus</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <!-- SpringCloud Alibaba Nacos -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+
+        <!-- SpringCloud Alibaba Nacos Config -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+
+        <!-- SpringCloud Alibaba Sentinel -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
+        </dependency>
+
+        <!--添加actuator依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <!--spring boot admin依赖-->
+        <dependency>
+            <groupId>de.codecentric</groupId>
+            <artifactId>spring-boot-admin-starter-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-mail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-common-core</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-common-security</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-system-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-common-log</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-common-swagger</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-public-modules</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>${hutool.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>${easypoi-spring-boot-starter.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+            <version>${spring.boot.version}</version>
+        </dependency>
+
+        <!--调用-->
+      <!--  <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-common-core</artifactId>
+            <version>9.0</version>
+        </dependency>-->
+ <!--       <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-public-modules</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>org.jeeplus</groupId>-->
+<!--            <artifactId>jeeplus-assess</artifactId>-->
+<!--            <version>${project.parent.version}</version>-->
+<!--        </dependency>-->
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-finance</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-system</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.jeeplus</groupId>-->
+<!--            <artifactId>jeeplus-flowable</artifactId>-->
+<!--            <version>9.0</version>-->
+<!--        </dependency>-->
+    </dependencies>
+
+    <build>
+        <finalName>jeeplus-centrecareful</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.2.RELEASE</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+
+</project>

+ 32 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/JeeplusCentrecarefulApplication.java

@@ -0,0 +1,32 @@
+package com.jeeplus.centrecareful;
+
+import com.jeeplus.core.annotation.JeeplusCloudApplication;
+import com.jeeplus.sys.domain.Log;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cache.annotation.EnableCaching;
+
+/**
+ * 中审模块
+ *
+ * @Author 李狗蛋
+ * @Date 2023/6/27 13:38
+ * @Blog blog.lijintao.net/996.mba
+ * @Description: 中审模块
+ */
+@EnableCaching
+@JeeplusCloudApplication
+public class JeeplusCentrecarefulApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(JeeplusCentrecarefulApplication.class, args);
+        System.out.println(" O(∩_∩)O~ 中审模块启动成功 ^_^゙  \n" +
+                "    _                         _                                       _                      \n" +
+                "   (_)                       | |                                     | |                     \n" +
+                "    _    ___    ___   _ __   | |  _   _   ___     ___   _   _   ___  | |_    ___   _ __ ___  \n" +
+                "   | |  / _ \\  / _ \\ | '_ \\  | | | | | | / __|   / __| | | | | / __| | __|  / _ \\ | '_ ` _ \\ \n" +
+                "   | | |  __/ |  __/ | |_) | | | | |_| | \\__ \\   \\__ \\ | |_| | \\__ \\ | |_  |  __/ | | | | | |\n" +
+                "   | |  \\___|  \\___| | .__/  |_|  \\__,_| |___/   |___/  \\__, | |___/  \\__|  \\___| |_| |_| |_|\n" +
+                "  _/ |               | |                                 __/ |                               \n" +
+                " |__/                |_|                                |___/                                ");
+    }
+}

+ 45 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementAmountInfo.java

@@ -0,0 +1,45 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 中审-报销专用发票信息表
+ * @author: 王强
+ * @create: 2022-11-24 15:49
+ **/
+@Data
+@TableName(value = "zs_reimbursement_amount_info")
+public class ZsReimbursementAmountInfo extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 发票代码
+     */
+    private String code;
+
+    /**
+     * 发票编号
+     */
+    private String number;
+
+    /**
+     * 金额
+     */
+    private String amount;
+
+    /**
+     * 税额
+     */
+    private String taxAmount;
+
+    /**
+     * 价税合计
+     */
+    private String count;
+}

+ 86 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfo.java

@@ -0,0 +1,86 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 中审-报销详情信息表
+ * @author: 王强
+ * @create: 2022-11-24 15:51
+ **/
+@Data
+@TableName(value = "zs_reimbursement_detail_info")
+public class ZsReimbursementDetailInfo extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    private String typeName;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+}

+ 88 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoContract.java

@@ -0,0 +1,88 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 中审-报销详情信息表-合同报销
+ **/
+@Data
+@TableName(value = "zs_reimbursement_detail_info_contract")
+public class ZsReimbursementDetailInfoContract extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报销合同
+     */
+    private String contractId;
+
+    /**
+     * 报销合同名称
+     */
+    @TableField(exist = false)
+    private String contractName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+}

+ 84 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoOther.java

@@ -0,0 +1,84 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName(value = "zs_reimbursement_detail_info_other")
+public class ZsReimbursementDetailInfoOther extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+}

+ 84 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoProcured.java

@@ -0,0 +1,84 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName(value = "zs_reimbursement_detail_info_procured")
+public class ZsReimbursementDetailInfoProcured extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+}

+ 99 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoReport.java

@@ -0,0 +1,99 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 中审-报销详情信息表-报告
+ **/
+@Data
+@TableName(value = "zs_reimbursement_detail_info_report")
+public class ZsReimbursementDetailInfoReport extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报销报告
+     */
+    private String reportId;
+
+    /**
+     * 报销报告单据编号
+     */
+    @TableField(exist = false)
+    private String documentNo;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    @TableField(exist = false)
+    private String projectName;
+}

+ 74 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementInfo.java

@@ -0,0 +1,74 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 中审-报销单基础信息表
+ * @author: 王强
+ * @create: 2022-11-24 15:55
+ **/
+@Data
+@TableName(value = "zs_reimbursement_info")
+public class ZsReimbursementInfo extends BaseEntity {
+
+    /**
+     * 经办人id
+     */
+    private String userId;
+
+    /**
+     * 经办人名称
+     */
+    private String userName;
+
+    /**
+     * 报销编号
+     */
+    private String no;
+
+    /**
+     * 所属部门
+     */
+    private String department;
+
+    /**
+     * 报销日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date reimDate;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 状态
+     */
+    private String type;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     *
+     */
+    private String processDefinitionId;
+
+    /**
+     * 报销类型
+     */
+    private String sourceType;
+
+    private String purchaseId;
+
+}

+ 12 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementAmountInfoMapper.java

@@ -0,0 +1,12 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementAmountInfo;
+
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:25
+ **/
+public interface ZsReimbursementAmountInfoMapper extends BaseMapper<ZsReimbursementAmountInfo>  {
+}

+ 8 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoContractMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoContract;
+
+public interface ZsReimbursementDetailInfoContractMapper extends BaseMapper<ZsReimbursementDetailInfoContract> {
+}

+ 12 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoMapper.java

@@ -0,0 +1,12 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfo;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:31
+ **/
+public interface ZsReimbursementDetailInfoMapper extends BaseMapper<ZsReimbursementDetailInfo> {
+}

+ 8 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoOtherMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoOther;
+
+public interface ZsReimbursementDetailInfoOtherMapper extends BaseMapper<ZsReimbursementDetailInfoOther> {
+}

+ 8 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoProcuredMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoProcured;
+
+
+public interface ZsReimbursementDetailInfoProcuredMapper extends BaseMapper<ZsReimbursementDetailInfoProcured> {
+}

+ 7 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoReportMapper.java

@@ -0,0 +1,7 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoReport;
+
+public interface ZsReimbursementDetailInfoReportMapper extends BaseMapper<ZsReimbursementDetailInfoReport> {
+}

+ 53 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementInfoMapper.java

@@ -0,0 +1,53 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+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.finance.reimbursementApproval.approvalInfo.domain.ProgramProjectListInfo;
+import com.jeeplus.centrecareful.approvalInfo.domain.*;
+import com.jeeplus.centrecareful.approvalInfo.service.dto.ZsReportNoDto;
+import com.jeeplus.centrecareful.approvalInfo.service.dto.ZsRetureListDto;
+import com.jeeplus.centrecareful.approvalInfo.service.dto.ZsTreeUserDto;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:09
+ **/
+public interface ZsReimbursementInfoMapper extends BaseMapper<ZsReimbursementInfo> {
+
+    IPage<ProgramProjectListInfo> findProjectList(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);
+
+    String selectInvoiceFlag(@Param("id") String id);
+
+    IPage<ZsRetureListDto> findList (Page<ZsRetureListDto> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    List<WorkAttachmentDto> findFiles(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+
+    List<ZsTreeUserDto> findOfficeList();
+
+    List<ZsTreeUserDto> findUserList(@Param("name") String name);
+
+    List<ZsRetureListDto> findExportList (@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    IPage<ZsRetureListDto> relationReimbursementList (Page<ZsRetureListDto> page, @Param("id") String id);
+
+    IPage<ZsReportNoDto> getReportNoList(Page<ZsReportNoDto> page, @Param(Constants.WRAPPER) QueryWrapper<ZsReportNoDto> queryWrapper);
+
+    List<ZsReimbursementDetailInfoContract> getContractDetailList(@Param("id") String id);
+
+    List<ZsReimbursementDetailInfoReport> getReportDetailList(@Param("id") String id);
+
+    List<ZsReimbursementDetailInfoOther> getOtherDetailList(@Param("id") String id);
+
+    List<ZsReimbursementDetailInfoProcured> getProcuredDetailList(@Param("id") String id);
+
+    List<ZsReimbursementDetailInfo> getDetailList(@Param("id") String id);
+}

+ 598 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml

@@ -0,0 +1,598 @@
+<?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.centrecareful.approvalInfo.mapper.ZsReimbursementInfoMapper">
+	<update id="updateStatusById">
+		UPDATE zs_reimbursement_info SET type = #{type}
+		WHERE id = #{id}
+	</update>
+
+
+	<select id="findList"
+            resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsRetureListDto">
+        SELECT
+	DISTINCT a.id,
+	a.`no`,
+	(
+	CASE
+
+		WHEN a.source_type = 1 THEN
+		b.type_id
+		WHEN a.source_type = 2 THEN
+		b2.type_id
+		WHEN a.source_type = 3 THEN
+		b3.type_id
+		WHEN a.source_type = 4 THEN
+		b4.type_id ELSE b5.type_id
+	END
+	) AS type_id,
+	(
+	CASE
+
+		WHEN a.source_type = 1 THEN
+		t.NAME
+		WHEN a.source_type = 2 THEN
+		t2.NAME
+		WHEN a.source_type = 3 THEN
+		t3.NAME
+		WHEN a.source_type = 4 THEN
+		t4.NAME ELSE t5.NAME
+	END
+	) AS type_name,
+	(
+	CASE
+
+		WHEN a.source_type = 1 THEN
+		b.project_id
+		WHEN a.source_type = 2 THEN
+		b2.contract_id
+		WHEN a.source_type = 3 THEN
+		b3.project_id
+		WHEN a.source_type = 4 THEN
+		b4.project_id ELSE b5.project_id
+	END
+	) AS project_id,
+	(
+	CASE
+
+		WHEN a.source_type = 4 THEN
+		b4.project_name ELSE b5.project_name
+	END
+	) AS project_name,
+	(
+	CASE
+
+		WHEN a.source_type = 1 THEN
+		b.report_number
+		WHEN a.source_type = 2 THEN
+		b2.report_number
+		WHEN a.source_type = 3 THEN
+		b3.report_number
+		WHEN a.source_type = 4 THEN
+		b4.report_number ELSE b5.report_number
+	END
+	) AS report_number,
+	(
+	CASE
+
+		WHEN a.source_type = 1 THEN
+		so.NAME
+		WHEN a.source_type = 2 THEN
+		so2.NAME
+		WHEN a.source_type = 3 THEN
+		so3.NAME
+		WHEN a.source_type = 4 THEN
+		so4.NAME ELSE so5.NAME
+	END
+	) AS dept_name,
+	(
+	CASE
+
+			WHEN a.source_type = 1 THEN
+			us.NAME
+			WHEN a.source_type = 2 THEN
+			us2.NAME
+			WHEN a.source_type = 3 THEN
+			us3.NAME
+			WHEN a.source_type = 4 THEN
+			us4.NAME ELSE us5.NAME
+		END
+		) AS NAME,
+		(
+		CASE
+
+				WHEN a.source_type = 1 THEN
+				b.`number`
+				WHEN a.source_type = 2 THEN
+				b2.`number`
+				WHEN a.source_type = 3 THEN
+				b3.`number`
+				WHEN a.source_type = 4 THEN
+				b4.`number` ELSE b5.`number`
+			END
+			) AS `number`,
+			a.user_name,
+			a.reim_date,
+			a.type,
+			a.proc_ins_id,
+			a.process_definition_id,
+			d.ID_ AS task_id,
+			a.create_by_id AS create_id,
+			a.source_type,
+			a.purchase_id,
+			pru.purchase_no,
+                         a.update_time
+		FROM
+			zs_reimbursement_info a
+			LEFT JOIN zs_reimbursement_detail_info b ON a.id = b.info_id
+			AND b.del_flag = 0
+			LEFT JOIN cw_reimbursement_type_info t ON b.type_id = t.id
+			AND t.del_flag = 0
+			LEFT JOIN sys_office so ON so.id = b.dept_id
+			AND so.del_flag = 0
+			LEFT JOIN sys_user us ON us.id = b.user_id
+			AND us.del_flag = 0
+			LEFT JOIN zs_reimbursement_detail_info_contract b2 ON a.id = b2.info_id
+			AND b2.del_flag = 0
+			LEFT JOIN cw_reimbursement_type_info t2 ON b2.type_id = t2.id
+			AND t2.del_flag = 0
+			LEFT JOIN sys_office so2 ON so2.id = b2.dept_id
+			AND so2.del_flag = 0
+			LEFT JOIN sys_user us2 ON us2.id = b2.user_id
+			AND us2.del_flag = 0
+			LEFT JOIN zs_reimbursement_detail_info_report b3 ON a.id = b3.info_id
+			AND b3.del_flag = 0
+			LEFT JOIN cw_reimbursement_type_info t3 ON b3.type_id = t3.id
+			AND t3.del_flag = 0
+			LEFT JOIN sys_office so3 ON so3.id = b3.dept_id
+			AND so3.del_flag = 0
+			LEFT JOIN sys_user us3 ON us3.id = b3.user_id
+			AND us3.del_flag = 0
+			LEFT JOIN zs_reimbursement_detail_info_other b4 ON a.id = b4.info_id
+			AND b4.del_flag = 0
+			LEFT JOIN cw_reimbursement_type_info t4 ON b4.type_id = t4.id
+			AND t4.del_flag = 0
+			LEFT JOIN sys_office so4 ON so4.id = b4.dept_id
+			AND so4.del_flag = 0
+			LEFT JOIN sys_user us4 ON us4.id = b4.user_id
+			AND us4.del_flag = 0
+			LEFT JOIN zs_reimbursement_detail_info_procured b5 ON a.id = b5.info_id
+			AND b5.del_flag = 0
+			LEFT JOIN cw_reimbursement_type_info t5 ON b5.type_id = t5.id
+			AND t5.del_flag = 0
+			LEFT JOIN sys_office so5 ON so5.id = b5.dept_id
+			AND so5.del_flag = 0
+			LEFT JOIN sys_user us5 ON us5.id = b5.user_id
+			AND us5.del_flag = 0
+			LEFT JOIN sys_user c ON a.create_by_id = c.id
+			LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
+			LEFT JOIN material_management_pruchase_request_basics pru ON pru.id = a.purchase_id
+			AND pru.del_flag = '0'
+			${ew.customSqlSegment}
+		ORDER BY a.update_time DESC
+    </select>
+	<select id="findFiles" resultType="com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto">
+		SELECT
+			id,
+			url,
+			attachment_name AS `name`,
+			create_by_id AS `by`,
+			create_time
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+	</select>
+	<select id="findOfficeList"
+			resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsTreeUserDto">
+		SELECT id,`name`,parent_id FROM sys_office WHERE del_flag = 0
+	</select>
+	<select id="findUserList"
+			resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsTreeUserDto">
+		SELECT
+		a.id,
+		a.`name`,
+		a.office_id AS parent_id,
+		b.`name` AS office_name,
+		true AS is_user
+		FROM
+		sys_user a
+		LEFT JOIN sys_office b ON a.office_id = b.id
+		WHERE
+		a.del_flag = 0
+		<if test="name != null and name != ''">
+			and a.`name` LIKE CONCAT ('%', #{name}, '%')
+		</if>
+	</select>
+	<select id="findExportList"
+			resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsRetureListDto">
+		SELECT
+			a.id,
+			a.`no`,
+			(CASE
+			WHEN a.source_type = 1 THEN b.type_id
+			WHEN a.source_type = 2 THEN b2.type_id
+			WHEN a.source_type = 3 THEN b3.type_id
+			WHEN a.source_type = 4 THEN b4.type_id
+									ELSE b5.type_id END) AS type_id,
+			(CASE
+			WHEN a.source_type = 1 THEN t.name
+			WHEN a.source_type = 2 THEN t2.name
+			WHEN a.source_type = 3 THEN t3.name
+			WHEN a.source_type = 4 THEN t4.name
+									ELSE t5.name END) AS type_name,
+			(CASE
+			WHEN a.source_type = 1 THEN b.project_id
+			WHEN a.source_type = 2 THEN b2.contract_id
+			WHEN a.source_type = 3 THEN b3.project_id
+			WHEN a.source_type = 4 THEN b4.project_id
+									ELSE b5.project_id END) AS project_id,
+			(CASE
+			WHEN a.source_type = 1 THEN p.project_name
+			WHEN a.source_type = 2 THEN contr2.contract_name
+			WHEN a.source_type = 3 THEN p3.project_name
+			WHEN a.source_type = 4 THEN b4.project_name
+									ELSE b5.project_name END) AS project_name,
+			(CASE
+			WHEN a.source_type = 1 THEN b.report_number
+			WHEN a.source_type = 2 THEN b2.report_number
+			WHEN a.source_type = 3 THEN b3.report_number
+			WHEN a.source_type = 4 THEN b4.report_number
+									ELSE b5.report_number END) AS report_number,
+			(CASE
+			WHEN a.source_type = 1 THEN so.name
+			WHEN a.source_type = 2 THEN so2.name
+			WHEN a.source_type = 3 THEN so3.name
+			WHEN a.source_type = 4 THEN so4.name
+									ELSE so5.name END) AS dept_name,
+			(CASE
+			WHEN a.source_type = 1 THEN us.name
+			WHEN a.source_type = 2 THEN us2.name
+			WHEN a.source_type = 3 THEN us3.name
+			WHEN a.source_type = 4 THEN us4.name
+									ELSE us5.name END) AS name,
+			(CASE
+			WHEN a.source_type = 1 THEN b.`number`
+			WHEN a.source_type = 2 THEN b2.`number`
+			WHEN a.source_type = 3 THEN b3.`number`
+			WHEN a.source_type = 4 THEN b4.`number`
+									ELSE b5.`number` END) AS `number`,
+			a.user_name,
+			a.reim_date,
+			a.type,
+			a.proc_ins_id,
+			a.process_definition_id,
+			d.ID_ AS task_id,
+			a.source_type
+		FROM
+			zs_reimbursement_info a
+			LEFT JOIN zs_reimbursement_detail_info b ON a.id = b.info_id AND b.del_flag = 0
+			left join cw_reimbursement_type_info t on b.type_id = t.id and t.del_flag = 0
+			left join zs_project_records p on p.id = b.project_id and p.del_flag = 0
+			left join sys_office so on so.id = b.dept_id and so.del_flag = 0
+			left join sys_user us on us.id = b.user_id and us.del_flag = 0
+
+			LEFT JOIN zs_reimbursement_detail_info_contract b2 ON a.id = b2.info_id AND b2.del_flag = 0
+			left join cw_reimbursement_type_info t2 on b2.type_id = t2.id and t2.del_flag = 0
+			left join zs_work_contract_info contr2 on contr2.id = b2.contract_id and contr2.del_flag = 0
+			left join sys_office so2 on so2.id = b2.dept_id and so2.del_flag = 0
+			left join sys_user us2 on us2.id = b2.user_id and us2.del_flag = 0
+
+			LEFT JOIN zs_reimbursement_detail_info_report b3 ON a.id = b3.info_id AND b3.del_flag = 0
+			left join cw_reimbursement_type_info t3 on b3.type_id = t3.id and t3.del_flag = 0
+			left join zs_project_records p3 on p3.id = b3.project_id and p3.del_flag = 0
+			left join sys_office so3 on so3.id = b3.dept_id and so3.del_flag = 0
+			left join sys_user us3 on us3.id = b3.user_id and us3.del_flag = 0
+
+			LEFT JOIN zs_reimbursement_detail_info_other b4 ON a.id = b4.info_id AND b4.del_flag = 0
+			left join cw_reimbursement_type_info t4 on b4.type_id = t4.id and t4.del_flag = 0
+			left join zs_project_records p4 on p4.id = b4.project_id and p4.del_flag = 0
+			left join sys_office so4 on so4.id = b4.dept_id and so4.del_flag = 0
+			left join sys_user us4 on us4.id = b4.user_id and us4.del_flag = 0
+
+			LEFT JOIN zs_reimbursement_detail_info_procured b5 ON a.id = b5.info_id AND b5.del_flag = 0
+			left join cw_reimbursement_type_info t5 on b5.type_id = t5.id and t5.del_flag = 0
+			left join zs_project_records p5 on p5.id = b5.project_id and p5.del_flag = 0
+			left join sys_office so5 on so5.id = b5.dept_id and so5.del_flag = 0
+			left join sys_user us5 on us5.id = b5.user_id and us5.del_flag = 0
+
+			LEFT JOIN sys_user c ON a.create_by_id =  c.id
+			LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
+			${ew.customSqlSegment}
+		ORDER BY a.update_time DESC
+	</select>
+	<select id="relationReimbursementList"
+			resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsRetureListDto">
+		SELECT
+			a.id,
+			a.`no`,
+			b.type_id,
+			b.type_name,
+			b.project_id,
+			b.project_name,
+			b.report_number,
+			a.user_name,
+			b.user_name AS `name`,
+			b.dept_name,
+			a.reim_date,
+			b.`number`,
+			a.type,
+			a.proc_ins_id,
+			a.process_definition_id,
+			d.ID_ AS task_id
+		FROM
+			zs_reimbursement_info a
+			LEFT JOIN zs_reimbursement_detail_info b ON a.id = b.info_id AND b.del_flag = 0
+			LEFT JOIN sys_user c ON a.create_by_id =  c.id
+			LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
+		WHERE
+			a.del_flag = 0
+			AND a.project_id IN (SELECT id FROM program_project_list_info WHERE del_flag = 0 AND contract_id = #{id})
+		ORDER BY a.update_time DESC
+	</select>
+    <select id="findProjectList"
+            resultType="com.jeeplus.finance.reimbursementApproval.approvalInfo.domain.ProgramProjectListInfo">
+		SELECT
+           a.id,
+           b.name AS create_by_id,
+           b.office_id,
+           a.create_time,
+           a.update_by_id,
+           a.update_time,
+           a.del_flag,
+           a.contract_id,
+           a.contract_name,
+           a.client,
+           a.client_name,
+           a.amount,
+           a.contract_type,
+           a.name,
+           a.no,
+           a.project_type,
+           a.approval_no,
+           a.company,
+           a.project_mould,
+           a.property_holder,
+           a.property_holder_name,
+           a.location,
+           a.is_first,
+           a.year_num,
+           a.check_year,
+           a.project_manager,
+           c.name AS project_manager_name,
+           a.report_type,
+           a.industry,
+           a.enterprise_type,
+           a.risk_level,
+           a.project_source,
+           a.estimate,
+           a.plan_end_time,
+           a.use_num,
+           a.appointment,
+           a.work_hours,
+           a.remarks,
+           a.assessment_enterprise,
+           a.assessment_enterprise_name,
+           a.link_num,
+           a.relationship,
+           a.assessment_way,
+           a.assessment_objective,
+           a.assessment_date,
+           a.num,
+           a.project_development,
+           a.delegate_project_type,
+           a.assessment_object,
+           a.work_begin_date,
+           a.work_end_date,
+           a.reporting_date,
+           a.is_have,
+           a.is_influence,
+           a.mode,
+           a.status,
+           a.proc_ins_id,
+           a.process_definition_id,
+           prn.report_no,
+           pa1.status as status1,
+           pa1.id as auditId1,
+           pa1.proc_ins_id as procInsId1,
+           pa2.status as status2,
+           pa2.id as auditId2,
+           pa2.proc_ins_id as procInsId2,
+           pa3.status as status3,
+           pa3.id as auditId3,
+           pa3.proc_ins_id as procInsId3,
+           pa.status as archive_status,
+           pa.id as archive_id,
+           pa.proc_ins_id as procInsIdArchive,
+           d.id AS issued_id,
+           d.proc_ins_id AS procInsId4,
+           d.status AS issued_status,
+           wci.no AS contract_no
+        FROM
+            program_project_list_info a
+            LEFT JOIN sys_user b ON a.create_by_id = b.id
+            LEFT JOIN sys_user c ON a.project_manager = c.id
+            LEFT JOIN work_contract_info wci ON wci.id = a.contract_id and wci.del_flag = '0'
+            LEFT JOIN program_report_no prn ON prn.program_id = a.id and prn.del_flag = '0'
+            LEFT JOIN program_audit pa1 ON pa1.program_id = a.id and pa1.audit_level = '1' and pa1.del_flag = '0'
+            LEFT JOIN program_audit pa2 ON pa2.program_id = a.id and pa2.audit_level = '2' and pa2.del_flag = '0'
+            LEFT JOIN program_audit pa3 ON pa3.program_id = a.id and pa3.audit_level = '3' and pa3.del_flag = '0'
+            LEFT JOIN program_archive pa ON pa.program_id = a.id and pa.del_flag = '0'
+            LEFT JOIN proofread_issued d ON a.id = d.project_id
+            ${ew.customSqlSegment}
+            ORDER BY a.update_time DESC
+	</select>
+	<select id="selectInvoiceFlag" resultType="java.lang.String">
+		select
+         case
+             when ff.status = '1' then '开票中'
+             when ff.status = '2' then '开票中'
+             when ff.status = '3' then '开票中'
+             when ff.status = '4' then '开票中'
+             when ff.status = '5' then '已开票'
+             when ff.status = '6' then '已开票'
+             when ff.status = '7' then '已开票'
+             when ff.status = '8' then '已开票'
+         else '' end
+        from
+        (select
+        fib.program_name as program_name,
+        fi.`status` as status,
+        fib.program_id as program_id,
+        fi.create_time as create_time
+        from finance_invoice_base fib
+        inner join finance_invoice fi on fi.id = fib.invoice_id and fi.del_flag = '0'
+        where fib.del_flag = '0' and fi.status != '9'
+        order by fi.create_time desc) ff
+        where ff.program_id = #{id}
+        limit 1
+	</select>
+	<select id="getReportNoList"
+			resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsReportNoDto">
+		select report_no,c.project_name from zs_project_report_new_line a
+		left join zs_project_report b
+		on a.report_id = b.id
+		left join zs_project_records c
+		on b.project_id = c.id
+		${ew.customSqlSegment}
+		ORDER BY a.update_time DESC
+	</select>
+
+	<select id="getContractDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoContract">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.del_flag,
+		a.info_id,
+		a.user_id,
+		a.dept_id,
+		a.type_id,
+		a.contract_id,
+		a.report_number,
+		a.number,
+		a.receipt_number,
+		a.days,
+		a.content,
+		su.name as user_name,
+		so.name as dept_name,
+		zs_type.name as type_name
+		from zs_reimbursement_detail_info_contract a
+		left join sys_user su on a.user_id = su.id and su.del_flag = '0'
+		left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
+		left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getReportDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoReport">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.del_flag,
+		a.info_id,
+		a.user_id,
+		a.dept_id,
+		a.type_id,
+		a.report_id,
+		a.report_number,
+		a.number,
+		a.receipt_number,
+		a.days,
+		a.content,
+		su.name as user_name,
+		so.name as dept_name,
+		zs_type.name as type_name,
+		a.project_id
+		from zs_reimbursement_detail_info_report a
+		left join sys_user su on a.user_id = su.id and su.del_flag = '0'
+		left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
+		left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfo">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.del_flag,
+		a.info_id,
+		a.user_id,
+		a.dept_id,
+		a.type_id,
+		a.project_id,
+		a.report_number,
+		a.number,
+		a.receipt_number,
+		a.days,
+		a.content,
+		su.name as user_name,
+		so.name as dept_name,
+		zs_type.name as type_name
+		from zs_reimbursement_detail_info a
+		left join sys_user su on a.user_id = su.id and su.del_flag = '0'
+		left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
+		left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getOtherDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoOther">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.del_flag,
+		a.info_id,
+		a.user_id,
+		a.dept_id,
+		a.type_id,
+		a.project_id,
+		a.report_number,
+		a.number,
+		a.receipt_number,
+		a.days,
+		a.content,
+		su.name as user_name,
+		so.name as dept_name,
+		zs_type.name as type_name,
+		a.project_name as project_name
+		from zs_reimbursement_detail_info_other a
+		left join sys_user su on a.user_id = su.id and su.del_flag = '0'
+		left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
+		left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getProcuredDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoProcured">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.del_flag,
+		a.info_id,
+		a.user_id,
+		a.dept_id,
+		a.type_id,
+		a.project_id,
+		a.report_number,
+		a.number,
+		a.receipt_number,
+		a.days,
+		a.content,
+		su.name as user_name,
+		so.name as dept_name,
+		zs_type.name as type_name,
+		a.project_name as project_name
+		from zs_reimbursement_detail_info_procured a
+		left join sys_user su on a.user_id = su.id and su.del_flag = '0'
+		left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
+		left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+</mapper>

+ 637 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/ZsReimbursementInfoService.java

@@ -0,0 +1,637 @@
+package com.jeeplus.centrecareful.approvalInfo.service;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.finance.reimbursementApproval.approvalInfo.domain.ProgramProjectListInfo;
+import com.jeeplus.centrecareful.approvalInfo.domain.*;
+import com.jeeplus.centrecareful.approvalInfo.mapper.*;
+import com.jeeplus.centrecareful.approvalInfo.service.dto.*;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.finance.contractRegistration.service.ContractInfoService;
+import com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.QueryListDto;
+import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
+import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.pubmodules.serialNumTpl.service.SerialnumTplService;
+import com.jeeplus.sys.domain.Office;
+import com.jeeplus.sys.service.OfficeService;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.DictUtils;
+import com.jeeplus.sys.utils.UserUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import com.jeeplus.sys.utils.StringUtils;
+import com.baomidou.mybatisplus.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:11
+ **/
+@Service
+public class ZsReimbursementInfoService {
+
+    @Resource
+    private ZsReimbursementInfoMapper infoMapper;
+
+    @Resource
+    private ZsReimbursementDetailInfoContractMapper zsReimbursementDetailInfoContractMapper;
+
+    @Resource
+    private ZsReimbursementDetailInfoReportMapper zsReimbursementDetailInfoReportMapper;
+
+    @Resource
+    private ZsReimbursementDetailInfoOtherMapper zsReimbursementDetailInfoOtherMapper;
+
+    @Resource
+    private ZsReimbursementDetailInfoProcuredMapper zsReimbursementDetailInfoProcuredMapper;
+
+    @Resource
+    private ZsReimbursementDetailInfoMapper detailInfoMapper;
+
+    @Resource
+    private ZsReimbursementAmountInfoMapper amountInfoMapper;
+
+    @Resource
+    private OssServiceMapper ossServiceMapper;
+
+    @Resource
+    private SerialnumTplService serialnumTplService;
+
+    @Resource
+    private ContractInfoService infoService;
+
+   /* @Resource
+    private MaterialBasicMapper materialBasicMapper;*/
+
+    @Resource
+    private OfficeService officeService;
+
+    /**
+     * 报告号查询
+     */
+    public IPage<ZsReportNoDto> getReportNoList(Page<ZsReportNoDto> page , ZsReportNoDto dto) throws Exception{
+        QueryWrapper<ZsReportNoDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ZsReportNoDto.class);
+        /**
+         * a表是reimbursementInfo
+         * b表是reimbursementDetailInfo
+         * c表是sysUser
+         */
+        queryWrapper.eq("a.del_flag", 0);
+        queryWrapper.eq("c.id", dto.getProjectId());
+        return infoMapper.getReportNoList(page, queryWrapper);
+    }
+
+    /**
+     * 列表查询
+     */
+    public IPage<ZsRetureListDto> list(Page<ZsRetureListDto> page , ZsQueryListDto dto) throws Exception{
+        QueryWrapper<ZsQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ZsQueryListDto.class);
+        /**
+         * a表是reimbursementInfo
+         * b表是reimbursementDetailInfo
+         * c表是sysUser
+         */
+        queryWrapper.eq("a.del_flag", 0);
+        // 报销项目
+        if (StringUtils.isNotEmpty(dto.getProject())) {
+            queryWrapper.apply("(b.project_id = {0} OR p.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+            queryWrapper.or().apply("(b3.project_id = {0} OR p3.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+            queryWrapper.or().apply("(b4.project_id = {0} OR b4.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+            queryWrapper.or().apply("(b5.project_id = {0} OR b5.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+
+        }
+        // 报销时间
+        if (dto.getDates() != null) {
+            queryWrapper.between("a.reim_date", dto.getDates()[0], dto.getDates()[1]);
+        }
+        // 经办人
+        if (StringUtils.isNotEmpty(dto.getHandled())) {
+            queryWrapper.apply("(a.create_by_id = {0} OR c.name LIKE {1})", dto.getHandled(), "%" + dto.getHandled() + "%");
+        }
+        // 报销人
+        if (StringUtils.isNotEmpty(dto.getReimBy())) {
+            queryWrapper.apply("( b.user_id = {0} OR us.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b2.user_id = {0} OR us2.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b3.user_id = {0} OR us3.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b4.user_id = {0} OR us4.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b5.user_id = {0} OR us5.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+
+        }
+        // 报销状态
+        if (StringUtils.isNotEmpty(dto.getType())) {
+            queryWrapper.eq("a.type", dto.getType());
+        }
+        // 报销部门
+        if (StringUtils.isNotEmpty(dto.getDepartment())) {
+            queryWrapper.apply("( b.dept_id = {0} OR so.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b2.dept_id = {0} OR so2.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b3.dept_id = {0} OR so3.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b4.dept_id = {0} OR so4.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b5.dept_id = {0} OR so5.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+
+        }
+        // 报销类别
+        if (StringUtils.isNotEmpty(dto.getRemiType())) {
+            queryWrapper.apply(" (b.type_id = {0} OR t.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b2.type_id = {0} OR t2.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b3.type_id = {0} OR t3.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b4.type_id = {0} OR t4.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b5.type_id = {0} OR t5.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+
+        }
+        // 报销金额
+        if (dto.getAmounts() != null) {
+            if (StringUtils.isNotEmpty(dto.getAmounts()[0])) {
+                queryWrapper.and(w ->
+                    w.ge("b.number", Double.parseDouble(dto.getAmounts()[0]))
+                        .or().ge("b2.number", Double.parseDouble(dto.getAmounts()[0]))
+                        .or().ge("b3.number", Double.parseDouble(dto.getAmounts()[0]))
+                        .or().ge("b4.number", Double.parseDouble(dto.getAmounts()[0]))
+                        .or().ge("b5.number", Double.parseDouble(dto.getAmounts()[0]))
+                );
+            }
+            if (StringUtils.isNotEmpty(dto.getAmounts()[1])) {
+                queryWrapper.and(w ->
+                    w.le("b.number", Double.parseDouble(dto.getAmounts()[1]))
+                        .or().le("b2.number", Double.parseDouble(dto.getAmounts()[1]))
+                        .or().le("b3.number", Double.parseDouble(dto.getAmounts()[1]))
+                        .or().le("b4.number", Double.parseDouble(dto.getAmounts()[1]))
+                        .or().le("b5.number", Double.parseDouble(dto.getAmounts()[1]))
+                );
+            }
+        }
+        // 报告号
+        if (StringUtils.isNotEmpty(dto.getReportNumber())) {
+            queryWrapper.like("b.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b2.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b3.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b4.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b5.report_number", dto.getReportNumber());
+        }
+        // 报销类型
+        if (StringUtils.isNotBlank(dto.getSourceType())) {
+            queryWrapper.eq("a.source_type", dto.getSourceType());
+        }
+        return infoMapper.findList(page, queryWrapper);
+    }
+
+    public IPage<ProgramProjectListInfo> projectList(Page<ProgramProjectListInfo> page, ProgramProjectListInfo info, String tabType) throws Exception{
+
+        //获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+
+
+        QueryWrapper<ProgramProjectListInfo> wrapper = QueryWrapperGenerator.buildQueryCondition(info, ProgramProjectListInfo.class);
+        wrapper.eq("a.del_flag", "0");
+        wrapper.eq("a.tab_type", tabType);
+        wrapper.eq("b.office_id", userDTO.getOfficeDTO().getId());
+        if (info.getCreateDates() != null) {
+            wrapper.between("a.create_date", info.getCreateDates()[0], info.getCreateDates()[1]);
+        }
+        IPage<ProgramProjectListInfo> pageList = infoMapper.findProjectList(page, wrapper);
+        pageList.getRecords().stream().forEach(item ->{
+            String isInvoice = infoMapper.selectInvoiceFlag(item.getId());
+            item.setIsInvoice(isInvoice);
+        });
+        return pageList;
+    }
+
+    public String save(ZsSaveInfoDto dto) throws Exception{
+        // 获取当前登录人信息
+      UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto, userDTO);
+        } else {
+            return add(dto, userDTO);
+        }
+    }
+
+    public String add(ZsSaveInfoDto dto, UserDTO userDTO) throws Exception{
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        // 生成编号
+        String no = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ZsSaveInfoDto.BIZ_CODE);
+        // 保存基础信息表信息
+        ZsReimbursementInfo info = new ZsReimbursementInfo();
+        BeanUtils.copyProperties(dto, info);
+        info.setId(id);
+        info.setNo(no);
+        info.setCreateById(userDTO.getId());
+        info.setCreateTime(new Date());
+        info.setUpdateById(userDTO.getId());
+        info.setUpdateTime(new Date());
+        info.setDelFlag(0);
+        infoMapper.insert(info);
+        // 保存项目详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
+            for (ZsReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                detailInfoMapper.insert(detailInfo);
+            }
+        }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (ZsReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存报告详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoReports())) {
+            for (ZsReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            for (ZsReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoOtherMapper.insert(detailInfo);
+            }
+        }
+        // 保存采购报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
+            for (ZsReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoProcuredMapper.insert(detailInfo);
+            }
+        }
+        // 保存专用发票列表信息
+        if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
+            for (ZsReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
+                // 生成id
+                String amountId = UUID.randomUUID().toString().replace("-", "");
+                amountInfo.setId(amountId);
+                amountInfo.setCreateById(userDTO.getId());
+                amountInfo.setCreateTime(new Date());
+                amountInfo.setUpdateById(userDTO.getId());
+                amountInfo.setUpdateTime(new Date());
+                amountInfo.setDelFlag(0);
+                // 保存基础表信息主键值
+                amountInfo.setInfoId(id);
+                amountInfoMapper.insert(amountInfo);
+            }
+        }
+        // 保存附件列表信息
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            infoService.saveFiles(dto.getFiles(), userDTO, id);
+        }
+        return id;
+    }
+
+    public String update(ZsSaveInfoDto dto, UserDTO userDTO) {
+        // 修改基础信息
+        ZsReimbursementInfo info = new ZsReimbursementInfo();
+        BeanUtils.copyProperties(dto, info);
+        info.setUpdateById(userDTO.getId());
+        info.setUpdateTime(new Date());
+        infoMapper.updateById(info);
+        // 修改报销详情列表信息
+        // 删除原有数据
+        LambdaQueryWrapper<ZsReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(ZsReimbursementDetailInfo::getInfoId, dto.getId());
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(ZsReimbursementDetailInfoContract::getInfoId, dto.getId());
+        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除报告列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
+        detailWrapperReport.eq(ZsReimbursementDetailInfoReport::getInfoId, dto.getId());
+        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        // 删除其他报销表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoOther> detailWrapperOthers = new LambdaQueryWrapper<>();
+        detailWrapperOthers.eq(ZsReimbursementDetailInfoOther::getInfoId, dto.getId());
+        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOthers);
+        // 删除采购报销表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
+        detailWrapperProcured.eq(ZsReimbursementDetailInfoProcured::getInfoId, dto.getId());
+        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+
+        // 保存项目详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
+            for (ZsReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                detailInfoMapper.insert(detailInfo);
+            }
+        }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (ZsReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存报告详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoReports())) {
+            for (ZsReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            for (ZsReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoOtherMapper.insert(detailInfo);
+            }
+        }
+        // 保存采购报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
+            for (ZsReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoProcuredMapper.insert(detailInfo);
+            }
+        }
+        // 修改专用发票信息列表
+        // 删除原有数据
+        LambdaQueryWrapper<ZsReimbursementAmountInfo> amountWrapper = new LambdaQueryWrapper<>();
+        amountWrapper.eq(ZsReimbursementAmountInfo::getInfoId, dto.getId());
+        amountInfoMapper.delete(amountWrapper);
+        if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
+            for (ZsReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
+                // 生成id
+                String amountId = UUID.randomUUID().toString().replace("-", "");
+                amountInfo.setId(amountId);
+                amountInfo.setCreateById(userDTO.getId());
+                amountInfo.setCreateTime(new Date());
+                amountInfo.setUpdateById(userDTO.getId());
+                amountInfo.setUpdateTime(new Date());
+                amountInfo.setDelFlag(0);
+                // 保存基础表信息主键值
+                amountInfo.setInfoId(dto.getId());
+                amountInfoMapper.insert(amountInfo);
+            }
+        }
+        // 修改附件信息列表
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            infoService.updateFiles(dto.getFiles(), userDTO, dto.getId());
+        }
+        return dto.getId();
+    }
+
+    public String remove(String id) {
+        // 删除基础信息表
+        infoMapper.deleteById(id);
+        // 删除详情列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(ZsReimbursementDetailInfo::getInfoId, id);
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(ZsReimbursementDetailInfoContract::getInfoId, id);
+        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除报告列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
+        detailWrapperReport.eq(ZsReimbursementDetailInfoReport::getInfoId, id);
+        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        // 删除其他报销列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
+        detailWrapperOther.eq(ZsReimbursementDetailInfoOther::getInfoId, id);
+        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        // 删除采购报销列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
+        detailWrapperProcured.eq(ZsReimbursementDetailInfoProcured::getInfoId, id);
+        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        // 删除专用发票信息列表
+        LambdaQueryWrapper<ZsReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        amountInfoLambdaQueryWrapper.eq(ZsReimbursementAmountInfo::getInfoId, id);
+        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
+        // 删除附件信息
+        LambdaQueryWrapper<WorkAttachment> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(WorkAttachment::getAttachmentId, id);
+        ossServiceMapper.delete(wrapper);
+        return "操作成功";
+    }
+
+    public ZsSaveInfoDto findById(String id) {
+        ZsSaveInfoDto dto = new ZsSaveInfoDto();
+        // 查询基础信息表
+        ZsReimbursementInfo info = infoMapper.selectById(id);
+        if (ObjectUtil.isNotEmpty(info)){
+            BeanUtils.copyProperties(info, dto);
+            if(StringUtils.isNotBlank(info.getDepartment())) {
+                Office byId = officeService.getById(info.getDepartment());
+                if (ObjectUtil.isNotEmpty(byId)) {
+                    dto.setDepartmentName(byId.getName());
+                }
+            }
+
+            // 查询详情列表
+//        LambdaQueryWrapper<ZsReimbursementDetailInfo> detailInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+//        detailInfoLambdaQueryWrapper.eq(ZsReimbursementDetailInfo::getInfoId, id);
+//        detailInfoLambdaQueryWrapper.orderByAsc(ZsReimbursementDetailInfo::getNumber);
+//        List<ZsReimbursementDetailInfo> detailInfos = detailInfoMapper.selectList(detailInfoLambdaQueryWrapper);
+            // 项目报销详情
+            dto.setDetailInfos(infoMapper.getDetailList(id));
+            // 合同报销详情
+            dto.setDetailInfoContracts(infoMapper.getContractDetailList(id));
+            // 报告报销详情
+            dto.setDetailInfoReports(infoMapper.getReportDetailList(id));
+            // 其他报销
+            dto.setDetailInfoOthers(infoMapper.getOtherDetailList(id));
+            // 采购报销
+            dto.setDetailInfoProcured(infoMapper.getProcuredDetailList(id));
+            // 查询专用发票信息列表
+            LambdaQueryWrapper<ZsReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            amountInfoLambdaQueryWrapper.eq(ZsReimbursementAmountInfo::getInfoId, id);
+            List<ZsReimbursementAmountInfo> amountInfos = amountInfoMapper.selectList(amountInfoLambdaQueryWrapper);
+            dto.setAmountInfos(amountInfos);
+            // 查询附件信息
+            List<WorkAttachmentDto> files = infoMapper.findFiles(id);
+            if (CollectionUtils.isNotEmpty(files)) {
+                for (WorkAttachmentDto i : files) {
+                    i.setCreateBy(UserUtils.get(i.getBy()));
+                }
+            }
+            dto.setFiles(files);
+        }
+        return dto;
+    }
+
+    public Boolean checkNumber(String number) {
+        LambdaQueryWrapper<ZsReimbursementAmountInfo> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ZsReimbursementAmountInfo::getNumber, number);
+        List<ZsReimbursementAmountInfo> infos = amountInfoMapper.selectList(wrapper);
+        if (CollectionUtils.isNotEmpty(infos)) {
+            return true;
+        }
+        return false;
+    }
+
+    public void updateStatusById(ZsRetureListDto dto) {
+        infoMapper.updateStatusById(dto.getId(), dto.getType());
+    }
+
+    //用户树形
+    public List<ZsTreeUserDto> userTree(String name) {
+        List<ZsTreeUserDto> list = new ArrayList<>();
+        // 查询部门
+        List<ZsTreeUserDto> officeList = infoMapper.findOfficeList();
+        if (CollectionUtils.isNotEmpty(officeList)) {
+            list.addAll(officeList);
+        }
+        // 查询用户
+        List<ZsTreeUserDto> userList = infoMapper.findUserList(name);
+        if (CollectionUtils.isNotEmpty(userList)) {
+            list.addAll(userList);
+        }
+        return list;
+    }
+
+    /**
+     * 下载列表查询
+     */
+    public List<ZsRetureListDto> exportList(ZsQueryListDto dto) throws Exception{
+        QueryWrapper<ZsQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ZsQueryListDto.class);
+        /**
+         * a表是reimbursementInfo
+         * b表是reimbursementDetailInfo
+         * c表是sysUser
+         */
+        queryWrapper.eq("a.del_flag", 0);
+        // 报销项目
+        if (StringUtils.isNotEmpty(dto.getProject())) {
+            queryWrapper.apply("(b.project_id = {0} OR p.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+            queryWrapper.or().apply("(b3.project_id = {0} OR p3.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+            queryWrapper.or().apply("(b4.project_id = {0} OR b4.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+            queryWrapper.or().apply("(b5.project_id = {0} OR b5.project_name LIKE {1})", dto.getProject(), "%" + dto.getProject() + "%");
+
+        }
+        // 报销时间
+        if (dto.getDates() != null) {
+            queryWrapper.between("a.reim_date", dto.getDates()[0], dto.getDates()[1]);
+        }
+        // 经办人
+        if (StringUtils.isNotEmpty(dto.getHandled())) {
+            queryWrapper.apply("(a.create_by_id = {0} OR c.name LIKE {1})", dto.getHandled(), "%" + dto.getHandled() + "%");
+        }
+        // 报销人
+        if (StringUtils.isNotEmpty(dto.getReimBy())) {
+            queryWrapper.apply("( b.user_id = {0} OR us.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b2.user_id = {0} OR us2.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b3.user_id = {0} OR us3.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b4.user_id = {0} OR us4.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b5.user_id = {0} OR" +
+                    " us5.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+
+        }
+        // 报销状态
+        if (StringUtils.isNotEmpty(dto.getType())) {
+            queryWrapper.eq("a.type", dto.getType());
+        }
+        // 报销部门
+        if (StringUtils.isNotEmpty(dto.getDepartment())) {
+            queryWrapper.apply("( b.dept_id = {0} OR so.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b2.dept_id = {0} OR so2.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b3.dept_id = {0} OR so3.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b4.dept_id = {0} OR so4.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b5.dept_id = {0} OR so5.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+
+        }
+        // 报销类别
+        if (StringUtils.isNotEmpty(dto.getRemiType())) {
+            queryWrapper.apply(" (b.type_id = {0} OR t.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b2.type_id = {0} OR t2.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b3.type_id = {0} OR t3.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b4.type_id = {0} OR t4.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b5.type_id = {0} OR t5.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+
+        }
+        // 报销金额
+        if (dto.getAmounts() != null) {
+            if (StringUtils.isNotEmpty(dto.getAmounts()[0])) {
+                queryWrapper.and(w ->
+                        w.ge("b.number", Double.parseDouble(dto.getAmounts()[0]))
+                                .or().ge("b2.number", Double.parseDouble(dto.getAmounts()[0]))
+                                .or().ge("b3.number", Double.parseDouble(dto.getAmounts()[0]))
+                                .or().ge("b4.number", Double.parseDouble(dto.getAmounts()[0]))
+                                .or().ge("b5.number", Double.parseDouble(dto.getAmounts()[0]))
+                );
+            }
+            if (StringUtils.isNotEmpty(dto.getAmounts()[1])) {
+                queryWrapper.and(w ->
+                        w.le("b.number", Double.parseDouble(dto.getAmounts()[1]))
+                                .or().le("b2.number", Double.parseDouble(dto.getAmounts()[1]))
+                                .or().le("b3.number", Double.parseDouble(dto.getAmounts()[1]))
+                                .or().le("b4.number", Double.parseDouble(dto.getAmounts()[1]))
+                                .or().le("b5.number", Double.parseDouble(dto.getAmounts()[1]))
+                );
+            }
+        }
+        // 报告号
+        if (StringUtils.isNotEmpty(dto.getReportNumber())) {
+            queryWrapper.like("b.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b2.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b3.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b4.report_number", dto.getReportNumber());
+            queryWrapper.or().like("b5.report_number", dto.getReportNumber());
+        }
+        // 报销类型
+        if (StringUtils.isNotBlank(dto.getSourceType())) {
+            queryWrapper.eq("a.source_type", dto.getSourceType());
+        }
+        List<ZsRetureListDto> exportList = infoMapper.findExportList(queryWrapper);
+        if (CollectionUtils.isNotEmpty(exportList)) {
+            for (ZsRetureListDto retureListDto : exportList) {
+                if ("1".equals(retureListDto.getType())) {
+                    retureListDto.setType("暂存");
+                }
+                if ("2".equals(retureListDto.getType())) {
+                    retureListDto.setType("审批中");
+                }
+                if ("3".equals(retureListDto.getType())) {
+                    retureListDto.setType("撤回");
+                }
+                if ("4".equals(retureListDto.getType())) {
+                    retureListDto.setType("驳回");
+                }
+                if ("5".equals(retureListDto.getType())) {
+                    retureListDto.setType("已完成");
+                }
+                if (StringUtils.isNotBlank(retureListDto.getSourceType())) {
+                    if ("2".equals(retureListDto.getSourceType())) {
+                        retureListDto.setContractName(retureListDto.getProjectName());
+                        retureListDto.setProjectName("");
+                    }
+                    retureListDto.setSourceType(DictUtils.getDictLabel(retureListDto.getSourceType(),"cw_reimbursement_source_type",""));
+                }
+            }
+        }
+        return exportList;
+    }
+
+    /**
+     * 关联报销
+     */
+    public IPage<ZsRetureListDto> relationReimbursementList(Page<ZsRetureListDto> page, String id) {
+        IPage<ZsRetureListDto> iPage = infoMapper.relationReimbursementList(page, id);
+        return iPage;
+    }
+
+}

+ 58 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsQueryListDto.java

@@ -0,0 +1,58 @@
+package com.jeeplus.centrecareful.approvalInfo.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+public class ZsQueryListDto extends BaseEntity {
+
+    /**
+     * 报销项目
+     */
+    private String project;
+
+    /**
+     * 报销时间
+     */
+    private String[] dates;
+
+    /**
+     * 经办人
+     */
+    private String handled;
+
+    /**
+     * 报销人
+     */
+    private String reimBy;
+
+    /**
+     * 报销状态
+     */
+    private String type;
+
+    /**
+     * 报销部门
+     */
+    private String department;
+
+    /**
+     * 报销类别
+     */
+    private String remiType;
+
+    /**
+     * 报销金额
+     */
+    private String[] amounts;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 报销类型
+     */
+    private String sourceType;
+}

+ 21 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsReportNoDto.java

@@ -0,0 +1,21 @@
+package com.jeeplus.centrecareful.approvalInfo.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * @author: 王强
+ * @create: 2022-12-05 16:33
+ **/
+@Data
+public class ZsReportNoDto extends BaseEntity {
+
+    //报告号
+    private String reportNo;
+
+    //项目名称
+    private String projectName;
+
+    // 项目id
+    private String projectId;
+}

+ 124 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsRetureListDto.java

@@ -0,0 +1,124 @@
+package com.jeeplus.centrecareful.approvalInfo.service.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ZsRetureListDto {
+
+    /**
+     * 基础表主键值
+     */
+    private String id;
+
+    /**
+     * 报销编号
+     */
+    @Excel(name = "报销编号", width = 30, orderNum = "1")
+    private String no;
+
+    /**
+     * 报销类别id
+     */
+    private String typeId;
+
+    /**
+     * 报销类别
+     */
+    @Excel(name = "报销类别", width = 30, orderNum = "3")
+    private String typeName;
+
+    /**
+     * 报销项目id
+     */
+    private String projectId;
+
+    /**
+     * 报销项目
+     */
+    @Excel(name = "报销项目", width = 30, orderNum = "4")
+    private String projectName;
+
+    /**
+     * 报销合同
+     */
+    @Excel(name = "报销合同", width = 30, orderNum = "5")
+    private String contractName;
+
+    /**
+     * 报告号
+     */
+    @Excel(name = "报告号", width = 30, orderNum = "6")
+    private String reportNumber;
+
+    /**
+     * 经办人
+     */
+    @Excel(name = "经办人", width = 30, orderNum = "7")
+    private String userName;
+
+    /**
+     * 报销人
+     */
+    @Excel(name = "报销人", width = 30, orderNum = "8")
+    private String name;
+
+    /**
+     * 报销部门
+     */
+    @Excel(name = "报销部门", width = 30, orderNum = "9")
+    private String deptName;
+
+    /**
+     * 报销日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "报销日期",exportFormat="yyyy-MM-dd",width = 30, orderNum = "10")
+    private Date reimDate;
+
+    /**
+     * 报销金额
+     */
+    @Excel(name = "报销金额", width = 30, orderNum = "11",type = 10)
+    private BigDecimal number;
+
+    /**
+     * 报销状态
+     */
+    @Excel(name = "报销状态", width = 30, orderNum = "12",dict = "status")
+    private String type;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     *
+     */
+    private String processDefinitionId;
+
+    private String taskId;
+
+    /**
+     * 创建人id
+     */
+    private String createId;
+
+    @Excel(name = "报销类型", width = 30, orderNum = "2",dict = "cw_reimbursement_source_type")
+    private String sourceType;
+
+    private String purchaseNo;
+
+    private String purchaseId;
+
+    /**
+     * 数据审核人
+     */
+    private List<String> auditUserIds;
+}

+ 91 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsSaveInfoDto.java

@@ -0,0 +1,91 @@
+package com.jeeplus.centrecareful.approvalInfo.service.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.finance.reimbursementApproval.approvalInfo.domain.*;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.centrecareful.approvalInfo.domain.*;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ZsSaveInfoDto extends BaseEntity {
+
+    //合同编号类型(字典值)
+    public static final String BIZ_CODE = "5";
+
+    /**
+     * 经办人id
+     */
+    private String userId;
+
+    /**
+     * 经办人名称
+     */
+    private String userName;
+
+    /**
+     * 报销编号
+     */
+    private String no;
+
+    /**
+     * 所属部门
+     */
+    private String department;
+
+    /**
+     * 报销日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date reimDate;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 状态
+     */
+    private String type;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     *
+     */
+    private String processInstanceId;
+
+    private List<ZsReimbursementDetailInfo> detailInfos;
+    private List<ZsReimbursementDetailInfoContract> detailInfoContracts;
+    private List<ZsReimbursementDetailInfoReport> detailInfoReports;
+    private List<ZsReimbursementDetailInfoOther> detailInfoOthers;
+    private List<ZsReimbursementDetailInfoProcured> detailInfoProcured;
+
+    private List<ZsReimbursementAmountInfo> amountInfos;
+
+    private List<WorkAttachmentDto> files;
+
+    /**
+     * 报销类型
+     */
+    private String sourceType;
+
+    /**
+     * 采购编号
+     */
+    private String purchaseNo;
+
+    private String purchaseId;
+
+    private String departmentName;
+
+}

+ 19 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsTreeUserDto.java

@@ -0,0 +1,19 @@
+package com.jeeplus.centrecareful.approvalInfo.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+public class ZsTreeUserDto extends BaseEntity {
+
+    private String name;
+
+    private String parentId;
+
+    private String officeName;
+
+    private Boolean disable = false;
+
+    private Boolean isUser = false;
+
+}

+ 152 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/controller/ZsReimbursementTypeController.java

@@ -0,0 +1,152 @@
+package com.jeeplus.centrecareful.approvalType.controller;
+import com.jeeplus.centrecareful.approvalType.domain.ZsReimbursementTypeInfo;
+import com.jeeplus.centrecareful.approvalType.mapper.ZsReimbursementTypeMapper;
+import com.jeeplus.centrecareful.approvalType.service.ZsReimbursementTypeForTreeDataService;
+import com.jeeplus.centrecareful.approvalType.service.ZsReimbursementTypeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:18
+ **/
+@RestController
+@Api(tags ="财务-报销类型管理")
+@RequestMapping(value = "/zsReimbursement/type")
+public class ZsReimbursementTypeController {
+
+    @Resource
+    private ZsReimbursementTypeService service;
+
+    @Resource
+    private ZsReimbursementTypeForTreeDataService treeService;
+
+    @Resource
+    private ZsReimbursementTypeMapper mapper;
+
+    /**
+     * 列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> list(ZsReimbursementTypeInfo info) {
+        List<ZsReimbursementTypeInfo> list = service.list(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/bxList")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> bxList(ZsReimbursementTypeInfo info) {
+        List<ZsReimbursementTypeInfo> list = service.bxList(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 采购类型列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "采购类型列表查询")
+    @GetMapping("/cgList")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> cgList(ZsReimbursementTypeInfo info) {
+        List<ZsReimbursementTypeInfo> list = service.cgList(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 新增/修改
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "新增/修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody ZsReimbursementTypeInfo info) {
+        String s = service.save(info);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping("/findById")
+    public ResponseEntity<ZsReimbursementTypeInfo> findById(String id) {
+        ZsReimbursementTypeInfo info = mapper.selectById(id);
+        return ResponseEntity.ok(info);
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除")
+    @GetMapping("/deleteById")
+    public ResponseEntity<String> deleteById(String id) {
+        mapper.deleteById(id);
+        return ResponseEntity.ok("操作完成");
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/treeData")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> treeData(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ZsReimbursementTypeInfo> infos = treeService.treeDataForType(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/treeData1")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> treeData1(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ZsReimbursementTypeInfo> infos = treeService.treeDataForType1(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/summaryTreeData")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> summaryTreeData(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ZsReimbursementTypeInfo> infos = treeService.summaryTreeData(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/treeData2")
+    public ResponseEntity<List<ZsReimbursementTypeInfo>> treeData2(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ZsReimbursementTypeInfo> infos = treeService.treeDataForType2(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+}

+ 88 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/domain/ZsReimbursementTypeInfo.java

@@ -0,0 +1,88 @@
+package com.jeeplus.centrecareful.approvalType.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.jeeplus.core.domain.TreeEntity;
+import com.jeeplus.core.query.Query;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 报销类型信息列表
+ * @author: 王强
+ * @create: 2022-11-25 08:59
+ **/
+@Data
+@TableName(value = "cw_reimbursement_type_info")
+public class ZsReimbursementTypeInfo extends TreeEntity<ZsReimbursementTypeInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 实体主键
+     */
+    @TableId
+    private String id;
+
+    /**
+     * 创建日期
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+
+    /**
+     * 创建人
+     */
+    @Query
+    @TableField(fill = FieldFill.INSERT)
+    private String createBy;
+
+    /**
+     * 更新日期
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Date updateDate;
+
+    /**
+     * 更新人
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private String updateBy;
+
+    /**
+     * 逻辑删除标记
+     */
+    @TableLogic
+    @TableField(fill = FieldFill.INSERT)
+    private Integer delFlag;
+
+    /**
+     * 层级
+     */
+    private String level;
+
+    /**
+     * 报销类型名称
+     */
+    @Query
+    private String name;
+
+    /**
+     * 序号
+     */
+    @Query
+    private Integer sort;
+
+    /**
+     * 父节点id
+     */
+    private String parentId;
+
+    private String parentIds;
+
+    @TableField(exist = false)
+    private Boolean disabled = false;
+
+    @TableField(exist = false)
+    private String like;
+}

+ 37 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/mapper/ZsReimbursementTypeMapper.java

@@ -0,0 +1,37 @@
+package com.jeeplus.centrecareful.approvalType.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalType.domain.ZsReimbursementTypeInfo;
+import com.jeeplus.core.domain.TreeMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:02
+ **/
+public interface ZsReimbursementTypeMapper extends BaseMapper<ZsReimbursementTypeInfo>, TreeMapper<ZsReimbursementTypeInfo> {
+
+    /**
+     * 根据name和parentId查询名称是否重复
+     * @param name
+     * @param parentId
+     * @return
+     */
+    Integer checkNameIsExist(@Param("name") String name, @Param("parentId") String parentId);
+
+    Integer getNo(@Param("parentId") String parentId);
+
+    Integer getLevel(@Param("parentId") String parentId);
+
+    List<String> getChildId(String id);
+
+    /**
+     * 获取所有业务类型的数据
+     * @param type
+     * @return
+     */
+    List<ZsReimbursementTypeInfo> getAllList(String type);
+}

+ 39 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/mapper/xml/ZsReimbursementTypeMapper.xml

@@ -0,0 +1,39 @@
+<?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.centrecareful.approvalType.mapper.ZsReimbursementTypeMapper">
+	<select id="checkNameIsExist" resultType="java.lang.Integer">
+        SELECT
+			COUNT( 0 )
+		FROM
+			cw_reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND `name` = #{name}
+			AND parent_id = #{parentId}
+    </select>
+    <select id="getNo" resultType="java.lang.Integer">
+        SELECT
+			(MAX(`sort`) + 1) AS `sort`
+		FROM
+			cw_reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND parent_id = #{parentId}
+    </select>
+    <select id="getLevel" resultType="java.lang.Integer">
+        SELECT
+			(MAX(level) + 1) AS `level`
+		FROM
+			cw_reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND id = #{parentId}
+    </select>
+	<select id="getChildId" resultType="java.lang.String">
+		select id from cw_reimbursement_type_info where parent_id = #{id}
+	</select>
+	<select id="getAllList"
+			resultType="com.jeeplus.centrecareful.approvalType.domain.ZsReimbursementTypeInfo">
+		select * from cw_reimbursement_type_info where del_flag = '0' order by sort asc
+	</select>
+</mapper>

+ 178 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/ZsReimbursementTypeForTreeDataService.java

@@ -0,0 +1,178 @@
+package com.jeeplus.centrecareful.approvalType.service;
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.jeeplus.centrecareful.approvalType.domain.ZsReimbursementTypeInfo;
+import com.jeeplus.centrecareful.approvalType.mapper.ZsReimbursementTypeMapper;
+import com.jeeplus.core.service.TreeService;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.core.service.dto.TreeDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:01
+ **/
+@Service
+public class ZsReimbursementTypeForTreeDataService extends TreeService<ZsReimbursementTypeMapper, ZsReimbursementTypeInfo> {
+
+    @Resource
+    private ZsReimbursementTypeMapper typeMapper;
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ZsReimbursementTypeInfo> treeDataForType(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+//        List<ZsReimbursementTypeInfo> allList = typeMapper.getAllList("1");
+        List<ZsReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ZsReimbursementTypeInfo>) entityClass ).orderByAsc ( ZsReimbursementTypeInfo::getSort ));
+        ZsReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ZsReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ZsReimbursementTypeInfo> treeDataForType1(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+        List<ZsReimbursementTypeInfo> allList = typeMapper.getAllList("1");
+//        List<ZsReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ZsReimbursementTypeInfo>) entityClass ).orderByAsc ( ZsReimbursementTypeInfo::getSort ));
+        ZsReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ZsReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ZsReimbursementTypeInfo> summaryTreeData(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+        List<ZsReimbursementTypeInfo> allList = typeMapper.getAllList("2");
+        ZsReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ZsReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ZsReimbursementTypeInfo> treeDataForType2(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+        List<ZsReimbursementTypeInfo> allList = typeMapper.getAllList("2");
+//        List<ZsReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ZsReimbursementTypeInfo>) entityClass ).orderByAsc ( ZsReimbursementTypeInfo::getSort ));
+        ZsReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ZsReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 以root为根节点, 将allList从线性列表转为树形列表
+     *
+     * @param root    根节点, 为空抛出空指针异常
+     * @param allList 所有需要参与构造为树的列表
+     * @param extId   需要排除在树之外的节点(子节点一并被排除)
+     * @return java.util.List<T>
+     * @Author 滕鑫源
+     * @Date 2020/10/23 17:04
+     **/
+    public List <ZsReimbursementTypeInfo> formatListToTreeForType (ZsReimbursementTypeInfo root, List <ZsReimbursementTypeInfo> allList, String extId, String type) {
+        String rootId = root.getId ( );
+        // 最终的树形态
+        List <ZsReimbursementTypeInfo> trees = Lists.newArrayList ( );
+
+        // 把需要构造树的所有列表, 根据以父id作为key, 整理为列表
+        Map<String, List <ZsReimbursementTypeInfo>> treeMap = Maps.newHashMap ( );
+        for (ZsReimbursementTypeInfo entity : allList) {
+            List <ZsReimbursementTypeInfo> entities = treeMap.get ( entity.getParentId ( ) );
+            if ( entities == null ) {
+                entities = Lists.newLinkedList ( );
+            }
+
+            // 剔除排除项, 构造treeMap, 转递归为线性操作
+            if ( StrUtil.isBlank ( extId ) || (!extId.equals ( entity.getId ( ) ) && entity.getParentIds ( ).indexOf ( "," + extId + "," ) == -1) ) {
+                entities.add ( entity );
+                treeMap.put ( entity.getParentId ( ), entities );
+            }
+
+            if (StringUtils.isNotEmpty(type)) {
+                //禁选类型设置disable值为true
+                if ("last".equals(type)) {
+                    allList.stream().forEach(item -> {
+                        if (StringUtils.isNotBlank(item.getParentId())) {
+                            if (item.getParentId().equals(entity.getId())) {
+                                entity.setDisabled(true);
+                            }
+                        }
+                    });
+                } else {
+                    if (type.contains(entity.getLevel())) {
+                        entity.setDisabled(true);
+                    }
+                }
+            }
+        }
+
+        // 没有给定的子树, 返回空树
+        if ( treeMap.get ( rootId ) == null || treeMap.get ( rootId ).isEmpty ( ) ) {
+            return trees;
+        }
+
+        // 开始递归格式化
+        List <ZsReimbursementTypeInfo> children = treeMap.get ( rootId );
+        for (ZsReimbursementTypeInfo parent : children) {
+            formatFillChildren ( parent, treeMap );
+            trees.add ( parent );
+        }
+        if ( StrUtil.equals ( rootId, TreeDTO.getRootId () ) ) {
+            return children;
+        } else {
+            root.setChildren ( trees );
+            return Lists.newArrayList ( root );
+        }
+    }
+    /**
+     * 从treeMap中取出子节点填入parent, 并递归此操作
+     *
+     * @param parent
+     * @param treeMap
+     * @return void
+     * @Author 滕鑫源
+     * @Date 2020/9/30 16:33
+     **/
+    private void formatFillChildren(ZsReimbursementTypeInfo parent, Map <String, List <ZsReimbursementTypeInfo>> treeMap) {
+        List <ZsReimbursementTypeInfo> children = treeMap.get ( parent.getId ( ) );
+        parent.setChildren ( children );
+        if ( children != null && !children.isEmpty ( ) ) {
+            for (ZsReimbursementTypeInfo child : children) {
+                formatFillChildren ( child, treeMap );
+            }
+        }
+    }
+}

+ 172 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/ZsReimbursementTypeService.java

@@ -0,0 +1,172 @@
+package com.jeeplus.centrecareful.approvalType.service;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.jeeplus.centrecareful.approvalType.domain.ZsReimbursementTypeInfo;
+import com.jeeplus.centrecareful.approvalType.mapper.ZsReimbursementTypeMapper;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.sys.utils.UserUtils;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:13
+ **/
+@Service
+public class ZsReimbursementTypeService {
+
+    @Resource
+    private ZsReimbursementTypeMapper mapper;
+
+    public List<ZsReimbursementTypeInfo> list(ZsReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ZsReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ZsReimbursementTypeInfo::getName, info.getName());
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ZsReimbursementTypeInfo::getSort, info.getSort());
+        }
+//        wrapper.eq(ZsReimbursementTypeInfo::getBusinessType, "1");
+
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ZsReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public List<ZsReimbursementTypeInfo> bxList(ZsReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ZsReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ZsReimbursementTypeInfo::getName, info.getName());
+        }
+        if (ObjectUtil.isNotEmpty(info)) {
+            if (StringUtils.isNotBlank(info.getLike())){
+                wrapper.likeRight(ZsReimbursementTypeInfo::getSort,info.getLike());
+            }
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ZsReimbursementTypeInfo::getSort, info.getSort());
+        }
+
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ZsReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public List<ZsReimbursementTypeInfo> cgList(ZsReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ZsReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ZsReimbursementTypeInfo::getName, info.getName());
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ZsReimbursementTypeInfo::getSort, info.getSort());
+        }
+
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ZsReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public String save(ZsReimbursementTypeInfo info) {
+        // parentId未传值,则表示一级菜单
+        if(StringUtils.isEmpty(info.getParentId())) {
+            info.setParentId("0");
+        }
+        // 保存数据
+        if (StringUtils.isNotEmpty(info.getId())) {
+            return update(info);
+        }
+        return add(info);
+    }
+
+    /**
+     * 新增
+     * @param info
+     * @return
+     */
+    public String add(ZsReimbursementTypeInfo info) {
+        // 判断名称是否已存在
+        Integer isExist = mapper.checkNameIsExist(info.getName(), info.getParentId());
+        if (isExist > 0) {
+            return "false";
+        }
+        // 获取当前登录人信息
+        UserDTO userDto = UserUtils.getCurrentUserDTO();
+        // 生成id值
+        String id = UUID.randomUUID().toString().replace("-", "");
+        info.setId(id);
+        info.setCreateBy(userDto.getId());
+        info.setCreateDate(new Date());
+        info.setUpdateBy(userDto.getId());
+        info.setUpdateDate(new Date());
+        info.setDelFlag(0);
+        // 生成序号/层级
+        getNo(info);
+        mapper.insert(info);
+        return "操作完成";
+    }
+
+    /**
+     * 修改
+     * @param info
+     * @return
+     */
+    public String update(ZsReimbursementTypeInfo info) {
+        // 获取当前登录人信息
+        UserDTO userDto = UserUtils.getCurrentUserDTO();
+        info.setUpdateById(userDto.getId());
+        info.setUpdateTime(new Date());
+
+        mapper.updateById(info);
+        return "操作完成";
+    }
+
+    /**
+     * 生成序号/层级
+     * @param info
+     * @return
+     */
+    public ZsReimbursementTypeInfo getNo(ZsReimbursementTypeInfo info) {
+        ZsReimbursementTypeInfo parentInfo = null;
+        if (!"0".equals(info.getParentId())) {
+            //根据parentId查询父节点信息
+            LambdaQueryWrapper<ZsReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(BaseEntity::getDelFlag, 0);
+            wrapper.eq(BaseEntity::getId, info.getParentId());
+            parentInfo = mapper.selectOne(wrapper);
+        }
+        //查询序号
+        Integer no = mapper.getNo(info.getParentId());
+        // 该层级下有数据,正常返回序号值
+        if (no != null) {
+            info.setSort(no);
+        } else {
+            // 父节点存在,根据父节点序号生成;不存在,则表示无上级层级,从1开始
+            if (parentInfo != null) {
+                String s = parentInfo.getSort() + "01";
+                info.setSort(Integer.parseInt(s));
+            } else {
+                info.setSort(1);
+            }
+        }
+        // 生成层级
+        //查询层级
+        Integer level = mapper.getLevel(info.getParentId());
+        if (level != null) {
+            info.setLevel(level.toString());
+        } else {
+            // 父节点存在,根据父节点level生成,不存在,则表示无上级层级,从1开始
+            if (parentInfo != null) {
+                Integer i = Integer.parseInt(parentInfo.getLevel())+1;
+                info.setLevel(i.toString());
+            } else {
+                info.setLevel("1");
+            }
+        }
+        return info;
+    }
+}

+ 21 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/dto/ZsReimbursementTypeDto.java

@@ -0,0 +1,21 @@
+package com.jeeplus.centrecareful.approvalType.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:04
+ **/
+@Data
+public class ZsReimbursementTypeDto extends BaseEntity {
+
+    private String level;
+
+    private String name;
+
+    private Integer sort;
+
+    private String parentId;
+
+}

+ 99 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/resources/bootstrap.yml

@@ -0,0 +1,99 @@
+# Tomcat
+server:
+  port: 9349
+  servlet:
+    context-path:
+#mybatis-plus配置
+#mybatis-plus:
+#  mapper-locations:
+#    - classpath*:com/jeeplus/modules/**/*Mapper.xml
+#    - classpath:/META-INF/admin-mybatis-mappings/*.xml
+#    - classpath:/META-INF/modeler-mybatis-mappings/*.xml
+#  #实体扫描,多个package用逗号或者分号分隔
+#  typeAliasesPackage: com.jeeplus.modules.**.entity
+#  configuration-properties:
+#    prefix:
+#    boolValue: TRUE
+#    blobType: BLOB
+
+# Spring
+spring:
+  main:
+    allow-bean-definition-overriding: true
+  servlet:
+    multipart:
+      max-file-size: 100MB
+      max-request-size: 100MB
+  application:
+    # 应用名称
+    name: jeeplus-centrecareful
+  profiles:
+    # 环境配置
+    active: dev
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 127.0.0.1:8848
+        # 命名空间
+        namespace: ${spring.profiles.active}
+      config:
+        # 配置中心地址
+        server-addr: 127.0.0.1:8848
+        # 配置文件格式
+        file-extension: yml
+        # 共享配置
+        shared-configs:
+          - application.${spring.cloud.nacos.config.file-extension}
+        # 命名空间
+        namespace: ${spring.profiles.active}
+#ribbon的超时时间
+ribbon:
+  ConnectTimeout: 60000 # 连接超时时间(ms)
+  ReadTimeout: 60000 # 通信超时时间(ms)
+
+hystrix:
+  command:
+    default:
+      execution:
+        isolation:
+          thread:
+            timeoutInMillisecond: 60000 # 熔断超时时长:60000ms
+
+#上传文件绝对路径, 路径中不允许包含“userfiles”
+userfiles:
+  basedir:       # 文件上传路径,可以留空
+  allowedType: file  # 允许上传的文件类型, all, file ,image, audio, video, office
+  extensions:
+    all: all       # 允许上传所有类型文件
+    file: 7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip       # 只允许上传安全文件(linux系统非可执行)
+    image: gif,jpg,jpeg,bmp,png     # 只允许上传图片
+    audio: CD,OGG,MP3,ASF,WMA,WAV,MP3PRO,RM,REAL,APE,MODULE,MIDI,VQF    # 只允许上传音频
+    video: AVI,WMV,RM,RMVB,MPEG1,MPEG2,MPEG4(MP4),3GP,ASF,SWF,VOB,DAT,MOV,M4V,FLV,F4V,MKV,MTS,TS     # 只允许上传视频
+    office: txt,xls,xlsx,xlsm,xltx,xltm,xlsb,xlam,doc,docx,docm,dotx,dotm,ppt,pptx,pptm,ppsx,ppsm,potx,potm,ppam     # 只允许上传office文件
+
+#oss配置
+config:
+  accessory:
+    type: minIO       #local, aliyun, minIO
+    baseDir: file
+    local:
+      location: d:\\accessory
+    aliyun:
+      aliyunUrl: http://oss.gangwaninfo.com
+      aliyunDownloadUrl: http://cdn.gangwaninfo.com
+      endpoint: http://oss-cn-hangzhou.aliyuncs.com
+      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
+      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      bucketName: xgxm-test
+    minIO:
+      endpoint:
+      accessKey:
+      secretKey:
+      bucketName:
+
+#阿里云文件夹路径
+aliyun_directory: attachment-file/assess
+#签章阿里云文件bucketName
+qzBucketName: xg-qz
+