sangwenwei 1 год назад
Родитель
Сommit
e97cbe7e36
38 измененных файлов с 4928 добавлено и 1 удалено
  1. 173 0
      jeeplus-modules/jeeplus-consult/pom.xml
  2. 27 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/JeeplusConsultancyApplication.java
  3. 241 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/controller/ConsultancyReimbursementInfoController.java
  4. 425 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyProgramProjectListInfo.java
  5. 76 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementAmountInfo.java
  6. 85 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfo.java
  7. 88 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoContract.java
  8. 84 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoOther.java
  9. 84 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoProcured.java
  10. 99 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoReport.java
  11. 79 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementInfo.java
  12. 12 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementAmountInfoMapper.java
  13. 10 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoContractMapper.java
  14. 14 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoMapper.java
  15. 10 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoOtherMapper.java
  16. 9 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoProcuredMapper.java
  17. 9 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoReportMapper.java
  18. 67 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementInfoMapper.java
  19. 685 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/xml/ConsultancyReimbursementInfoMapper.xml
  20. 793 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/ConsultancyReimbursementInfoService.java
  21. 63 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyQueryListDto.java
  22. 114 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyReimbursementAmountInfoDTO.java
  23. 21 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyReportNoDto.java
  24. 129 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyRetureListDto.java
  25. 96 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancySaveInfoDto.java
  26. 19 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyTreeUserDto.java
  27. 152 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/controller/ConsultancyReimbursementTypeController.java
  28. 88 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/domain/ConsultancyReimbursementTypeInfo.java
  29. 43 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/mapper/ConsultancyReimbursementTypeMapper.java
  30. 52 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/mapper/xml/ConsultancyReimbursementTypeMapper.xml
  31. 178 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/service/ConsultancyReimbursementTypeForTreeDataService.java
  32. 379 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/service/ConsultancyReimbursementTypeService.java
  33. 21 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/service/dto/ConsultancyReimbursementTypeDto.java
  34. 323 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/util/ConsultancyEasyPoiUtil.java
  35. 75 0
      jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/util/ConsultancyExcelDiceAddressListHandlerImpl.java
  36. 103 0
      jeeplus-modules/jeeplus-consult/src/main/resources/bootstrap.yml
  37. 1 1
      jeeplus-modules/jeeplus-system/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/TenantWrapperImpl.java
  38. 1 0
      jeeplus-modules/pom.xml

+ 173 - 0
jeeplus-modules/jeeplus-consult/pom.xml

@@ -0,0 +1,173 @@
+<?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">
+    <parent>
+        <artifactId>jeeplus-modules</artifactId>
+        <groupId>org.jeeplus</groupId>
+        <version>9.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jeeplus-consult</artifactId>
+    <name>jeeplus-consult</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-consult</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>

+ 27 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/JeeplusConsultancyApplication.java

@@ -0,0 +1,27 @@
+package com.jeeplus.consultancy;
+
+import com.jeeplus.core.annotation.JeeplusCloudApplication;
+import org.springframework.boot.SpringApplication;
+import org.springframework.cache.annotation.EnableCaching;
+
+/**
+ * 咨询模块
+ *
+ * @Description: 咨询模块
+ */
+@EnableCaching
+@JeeplusCloudApplication
+public class JeeplusConsultancyApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(JeeplusConsultancyApplication.class, args);
+        System.out.println(" O(∩_∩)O~ 项目模块启动成功 ^_^゙  \n" +
+                "    _                         _                                       _                      \n" +
+                "   (_)                       | |                                     | |                     \n" +
+                "    _    ___    ___   _ __   | |  _   _   ___     ___   _   _   ___  | |_    ___   _ __ ___  \n" +
+                "   | |  / _ \\  / _ \\ | '_ \\  | | | | | | / __|   / __| | | | | / __| | __|  / _ \\ | '_ ` _ \\ \n" +
+                "   | | |  __/ |  __/ | |_) | | | | |_| | \\__ \\   \\__ \\ | |_| | \\__ \\ | |_  |  __/ | | | | | |\n" +
+                "   | |  \\___|  \\___| | .__/  |_|  \\__,_| |___/   |___/  \\__, | |___/  \\__|  \\___| |_| |_| |_|\n" +
+                "  _/ |               | |                                 __/ |                               \n" +
+                " |__/                |_|                                |___/                                ");
+    }
+}

+ 241 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/controller/ConsultancyReimbursementInfoController.java

@@ -0,0 +1,241 @@
+package com.jeeplus.consultancy.approvalInfo.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.ExportMode;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyProgramProjectListInfo;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementInfo;
+import com.jeeplus.consultancy.approvalInfo.service.ConsultancyReimbursementInfoService;
+import com.jeeplus.consultancy.approvalInfo.service.dto.*;
+import com.jeeplus.consultancy.util.ConsultancyEasyPoiUtil;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import com.jeeplus.utils.StringUtils;
+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 javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author: 桑文巍
+ * @create: 2022-11-24 16:44
+ **/
+@RestController
+@Api(tags ="咨询-报销申请")
+@RequestMapping(value = "/consultancyReimbursement/info")
+public class ConsultancyReimbursementInfoController {
+
+    @Resource
+    private ConsultancyReimbursementInfoService service;
+
+    @Resource
+    private IFlowableApi flowTaskService;
+
+    /**
+     * 报告号查询
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "报告号查询")
+    @GetMapping("/reportNoList")
+    public ResponseEntity<IPage<ConsultancyReportNoDto>> reportNoList(Page<ConsultancyReportNoDto> page, ConsultancyReportNoDto dto) throws Exception{
+        IPage<ConsultancyReportNoDto> iPage = service.getReportNoList(page, dto);
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 列表查询
+     * @param dto/reimbursementApproval/type/bxList
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<IPage<ConsultancyRetureListDto>> list(Page<ConsultancyRetureListDto> page, ConsultancyQueryListDto dto) throws Exception{
+        IPage<ConsultancyRetureListDto> iPage = service.list(page, dto);
+        iPage.getRecords().stream().forEach(i -> {
+            if (StringUtils.isNotBlank(i.getProcInsId()) && StringUtils.isNotBlank(i.getTaskId())) {
+                i.setAuditUserIds(flowTaskService.getTaskAuditUsers(i.getTaskId()));  // 获取数据审核人
+            }
+        });
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 项目登记列表
+     * @param info
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation(value = "项目登记列表")
+    @GetMapping(value = "/projectList")
+    public ResponseEntity<IPage<ConsultancyProgramProjectListInfo>> projectList(ConsultancyProgramProjectListInfo info, Page<ConsultancyProgramProjectListInfo> page) throws Exception {
+        IPage<ConsultancyProgramProjectListInfo> list = service.projectList(page, info, "1");
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 新增/修改
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "新增、修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody ConsultancySaveInfoDto dto) throws Exception{
+        ConsultancyReimbursementInfo s = service.save(dto);
+        return ResponseUtil.newInstance().add("businessTable", "consultancy_reimbursement_info")
+                .add("businessId", s.getId())
+                .add("no", s.getNo())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "删除")
+    @GetMapping("/remove")
+    public ResponseEntity<String> remove(@RequestParam String id){
+        String s = service.remove(id);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<ConsultancySaveInfoDto> findById(@RequestParam String id) throws Exception{
+        ConsultancySaveInfoDto dto = service.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    @ApiOperation(value = "发票号判断")
+    @GetMapping("/checkNumber")
+    public ResponseEntity<Boolean> checkNumber(@RequestParam String number) {
+        Boolean is = service.checkNumber(number);
+        return ResponseEntity.ok(is);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody ConsultancyRetureListDto dto) {
+        service.updateStatusById(dto);
+    }
+
+    @ApiOperation(value = "用户树形")
+    @GetMapping(value = "/userTree")
+    public ResponseEntity<List<ConsultancyTreeUserDto>> userTree(@RequestParam String name) {
+        List<ConsultancyTreeUserDto> list = service.userTree(name);
+        return ResponseEntity.ok(list);
+    }
+
+
+
+    @ApiLog(value = "项目报销数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("exportFile")
+    @ApiOperation(value = "项目报销数据")
+    public void exportFile(ConsultancyQueryListDto cwFinanceInvoiceDTO, Page <ConsultancyRetureListDto> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<ConsultancyRetureListDto> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = service.list (page,cwFinanceInvoiceDTO).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = service.list (page,cwFinanceInvoiceDTO).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = service.list (page,cwFinanceInvoiceDTO).getRecords();
+        }
+        ConsultancyEasyPoiUtil.exportExcel ( result, sheetName,  sheetName, ConsultancyRetureListDto.class, fileName, response );
+
+    }
+
+    @ApiLog(value = "项目电子发票报销数据")
+    @GetMapping("exportInvoiceReimbursementFile")
+    @ApiOperation(value = "项目电子发票报销数据")
+    public void exportInvoiceReimbursementFile(ConsultancyQueryListDto cwDTO, Page <ConsultancyRetureListDto> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = "项目电子发票报销数据表";
+        String sheetName = "项目电子发票报销列表";
+        List<ConsultancyRetureListDto> result = new ArrayList<>();
+        if (ExportMode.current.equals ( options.getMode() ) ) {
+            result = service.list (page,cwDTO).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = service.list (page,cwDTO).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            if(StringUtils.isBlank(cwDTO.getReimbursementType())){
+                cwDTO.setReimbursementType("1");
+            }
+            result = service.list (page,cwDTO).getRecords();
+        }
+        List<String> idList = Lists.newArrayList();
+        for (ConsultancyRetureListDto listDto : result) {
+            idList.add(listDto.getId());
+        }
+        List<ConsultancyReimbursementAmountInfoDTO> invoiceReimbursementAmountList = Lists.newArrayList();
+        if(idList.size()>0){
+            invoiceReimbursementAmountList = service.getInvoiceReimbursementAmountList(idList);
+        }
+        for (int i = 1;i <=invoiceReimbursementAmountList.size();i ++){
+            ConsultancyReimbursementAmountInfoDTO reimbursementAmountInfoDTO = invoiceReimbursementAmountList.get(i - 1);
+            reimbursementAmountInfoDTO.setSerialNumber(i);
+        }
+
+        ConsultancyEasyPoiUtil.exportExcel ( invoiceReimbursementAmountList, sheetName,  sheetName, ConsultancyReimbursementAmountInfoDTO.class, fileName, response );
+
+    }
+
+
+
+    @ApiOperation(value = "关联报销")
+    @GetMapping(value = "/relationReimbursementList")
+    public ResponseEntity<IPage<ConsultancyRetureListDto>> relationReimbursementList(Page<ConsultancyRetureListDto> page, @RequestParam("id") String id) {
+        IPage<ConsultancyRetureListDto> listDtoIPage = service.relationReimbursementList(page, id);
+        return ResponseEntity.ok(listDtoIPage);
+    }
+
+    /**
+     * 根据发票号查询是否已经或正在报销
+     * @return
+     */
+    @ApiLog(value = "根据发票号查询是否已经或正在报销")
+    @GetMapping("getEffectiveDataByInvoiceNumber")
+    @ApiOperation(value = "根据发票号查询是否已经或正在报销")
+    public Map<String,Object> getEffectiveDataByInvoiceNumber(String invoiceNumber, String id){
+        Map map = new HashMap();
+        Integer count = service.getEffectiveDataByInvoiceNumber(invoiceNumber, id);
+        if(count>0){
+            map.put("success",false);
+            map.put("message","发票号:" + invoiceNumber + " 已发起或完成报销,请勿重复报销");
+        }else{
+            map.put("success",true);
+        }
+        return map;
+    }
+
+}

+ 425 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyProgramProjectListInfo.java

@@ -0,0 +1,425 @@
+package com.jeeplus.consultancy.approvalInfo.domain;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.query.Query;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@TableName(value = "consultancy_program_project_list_info")
+public class ConsultancyProgramProjectListInfo {
+
+    /**
+     * 实体主键
+     */
+    @TableId
+    private String id;
+
+    /**
+     * 创建日期
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, orderNum = "6")
+    private Date createDate;
+
+    /**
+     * 创建人
+     */
+    @Query(tableColumn = "a.create_by")
+    @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 contractId;
+
+    /**
+     * 合同名称
+     */
+    @Excel(name = "合同名称", width = 30, orderNum = "3")
+    @Query(tableColumn = "a.contract_name")
+    private String contractName;
+
+    /**
+     * 委托方
+     */
+    private String client;
+
+    @Excel(name = "委托方", width = 30, orderNum = "5")
+    @Query(tableColumn = "a.client_name")
+    private String clientName;
+
+    private String amount;
+
+    private String contractType;
+
+    /**
+     * 项目名称
+     */
+    @Excel(name = "项目名称", width = 30, orderNum = "1")
+    @Query(tableColumn = "a.name")
+    private String name;
+
+    /**
+     * 项目编号
+     */
+    @Excel(name = "项目编号", width = 20, orderNum = "2")
+    @Query(tableColumn = "a.no")
+    private String no;
+
+    private String projectType;
+
+    /**
+     * 项目立项号
+     */
+    private String approvalNo;
+
+    private String company;
+
+    private String projectMould;
+
+    private String propertyHolder;
+
+    private String propertyHolderName;
+
+    private String location;
+
+    private String isFirst;
+
+    private String yearNum;
+
+    private String checkYear;
+
+    /**
+     * 项目经理(项目责任人)
+     */
+    private String projectManager;
+
+    @Excel(name = "项目经理", width = 20, orderNum = "4")
+    @Query(tableColumn = "c.name")
+    private String projectManagerName;
+
+    private String reportType;
+
+    private String industry;
+
+    private String enterpriseType;
+
+    private String riskLevel;
+
+    private String projectSource;
+
+    private BigDecimal estimate;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date planEndTime;
+
+    private Integer useNum;
+
+    private Integer appointment;
+
+    private Double workHours;
+
+    private String remarks;
+
+    private String assessmentEnterprise;
+
+    private String assessmentEnterpriseName;
+
+    private String linkNum;
+
+    private String relationship;
+
+    private String assessmentWay;
+
+    private String assessmentObjective;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date assessmentDate;
+
+    private BigDecimal num;
+
+    private String projectDevelopment;
+
+    private String delegateProjectType;
+
+    private String assessmentObject;
+
+    private String assessmentRange;
+
+    /**
+     * 是否生成报告号
+     */
+    private String generateReportNumber;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date workBeginDate;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date workEndDate;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date reportingDate;
+
+    private String isHave;
+
+    private String isInfluence;
+
+    private String mode;
+
+    /**
+     * 状态
+     */
+    @Excel(name = "状态", width = 20, orderNum = "7")
+    @Query(tableColumn = "a.status")
+    private String status;
+
+    private String procInsId;
+
+    private String processDefinitionId;
+
+    /**
+     * 创建时间
+     */
+    @TableField(exist = false)
+    private String[] createDates;
+
+    /**
+     * 是否开票
+     */
+    @TableField(exist = false)
+    private String isInvoice;
+
+    /**
+     * 项目报告号
+     */
+    @TableField(exist = false)
+    private String reportNo;
+
+    /**
+     * 一级校审状态
+     */
+    @TableField(exist = false)
+    private String status1;
+
+    /**
+     * 二级校审状态
+     */
+    @TableField(exist = false)
+    private String status2;
+
+    /**
+     * 三级校审状态
+     */
+    @TableField(exist = false)
+    private String status3;
+
+    /**
+     * 报告签发状态
+     */
+    @TableField(exist = false)
+    private String issuedStatus;
+
+    /**
+     * 一级校审id
+     */
+    @TableField(exist = false)
+    private String auditId1;
+
+    /**
+     * 二级校审id
+     */
+    @TableField(exist = false)
+    private String auditId2;
+
+    /**
+     * 三级校审id
+     */
+    @TableField(exist = false)
+    private String auditId3;
+
+    /**
+     * 报告签发id
+     */
+    @TableField(exist = false)
+    private String issuedId;
+
+    /**
+     * 三级校审流程id
+     */
+    @TableField(exist = false)
+    private String procInsId1;
+
+    /**
+     * 三级校审流程id
+     */
+    @TableField(exist = false)
+    private String procInsId2;
+
+    /**
+     * 三级校审流程id
+     */
+    @TableField(exist = false)
+    private String procInsId3;
+
+    /**
+     * 项目归档流程id
+     */
+    @TableField(exist = false)
+    private String procInsIdArchive;
+
+    /**
+     * 项目归档id
+     */
+    @TableField(exist = false)
+    private String archiveId;
+
+    /**
+     * 项目归档状态
+     */
+    @TableField(exist = false)
+    private String archiveStatus;
+
+    /**
+     * 项目负责人id
+     */
+    @TableField(exist = false)
+    private String OfficeId;
+
+    /**
+     * 报告签发流程id
+     */
+    @TableField(exist = false)
+    private String procInsId4;
+
+    /**
+     * 审批通过时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date agreeTime;
+
+    /**
+     * 审批人
+     */
+    private String agreeUserId;
+
+    /**
+     * 合同编号
+     */
+    @TableField(exist = false)
+    private String contractNo;
+
+    /**
+     * 所属菜单   是评估项目登记   还是  评估2022项目登记
+     */
+    private String tabType;
+
+    /**
+     * 项目登记  taskId
+     */
+    @TableField(exist = false)
+    private String taskId;
+
+    /**
+     * 数据审核人  项目登记
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds;
+
+    /**
+     * 一级校审  taskId
+     */
+    @TableField(exist = false)
+    private String taskIdAudit1;
+
+    /**
+     * 二级校审  taskId
+     */
+    @TableField(exist = false)
+    private String taskIdAudit2;
+
+    /**
+     * 三级校审  taskId
+     */
+    @TableField(exist = false)
+    private String taskIdAudit3;
+
+    /**
+     * 数据审核人  一级校审
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds1;
+
+    /**
+     * 数据审核人  二级校审
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds2;
+
+    /**
+     * 数据审核人  三级校审
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds3;
+
+    /**
+     * 签发  taskId
+     */
+    @TableField(exist = false)
+    private String taskIdIssued;
+
+    /**
+     * 归档  taskId
+     */
+    @TableField(exist = false)
+    private String taskIdArchive;
+
+    /**
+     * 数据审核人  签发
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIdsIssued;
+
+    /**
+     * 数据审核人  归档
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIdsArchive;
+
+    /**
+     * 是否展示关联发票的开票状态   1展示   其他不展示
+     */
+    @TableField(exist = false)
+    private String showInvoiceFlag;
+
+}

+ 76 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementAmountInfo.java

@@ -0,0 +1,76 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_amount_info")
+public class ConsultancyReimbursementAmountInfo extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 发票代码
+     */
+    private String code;
+
+    /**
+     * 发票编号
+     */
+    private String number;
+
+    /**
+     * 金额
+     */
+    private String amount;
+
+    /**
+     * 税额
+     */
+    private String taxAmount;
+
+    /**
+     * 价税合计
+     */
+    private String count;
+
+    /**
+     * 报销类型(0:普通报销;1:电子发票报销)
+     */
+    private String reimbursementType;
+
+    /**
+     * 发票类型(01:增值税发票;02:普通发票)
+     */
+    private String invoiceType;
+
+    /**
+     * 发票项目名
+     */
+    private String invoiceProjectName;
+
+    /**
+     * 开票时间
+     */
+    private String invoiceDate;
+
+    /**
+     * 开票单位
+     */
+    private String invoiceUnit;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+}

+ 85 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfo.java

@@ -0,0 +1,85 @@
+package com.jeeplus.consultancy.approvalInfo.domain;
+
+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 = "consultancy_reimbursement_detail_info")
+public class ConsultancyReimbursementDetailInfo 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-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoContract.java

@@ -0,0 +1,88 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_detail_info_contract")
+public class ConsultancyReimbursementDetailInfoContract 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-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoOther.java

@@ -0,0 +1,84 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_detail_info_other")
+public class ConsultancyReimbursementDetailInfoOther 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-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoProcured.java

@@ -0,0 +1,84 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_detail_info_procured")
+public class ConsultancyReimbursementDetailInfoProcured 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-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementDetailInfoReport.java

@@ -0,0 +1,99 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_detail_info_report")
+public class ConsultancyReimbursementDetailInfoReport 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;
+}

+ 79 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/domain/ConsultancyReimbursementInfo.java

@@ -0,0 +1,79 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_info")
+public class ConsultancyReimbursementInfo 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;
+
+    /**
+     * 报销类型(0:普通报销;1:电子发票报销)
+     */
+    private String reimbursementType;
+
+}

+ 12 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementAmountInfoMapper.java

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

+ 10 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoContractMapper.java

@@ -0,0 +1,10 @@
+package com.jeeplus.consultancy.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoContract;
+
+
+//@InterceptorIgnore(tenantLine = "true")
+public interface ConsultancyReimbursementDetailInfoContractMapper extends BaseMapper<ConsultancyReimbursementDetailInfoContract> {
+}

+ 14 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoMapper.java

@@ -0,0 +1,14 @@
+package com.jeeplus.consultancy.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfo;
+
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:31
+ **/
+//@InterceptorIgnore(tenantLine = "true")
+public interface ConsultancyReimbursementDetailInfoMapper extends BaseMapper<ConsultancyReimbursementDetailInfo> {
+}

+ 10 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoOtherMapper.java

@@ -0,0 +1,10 @@
+package com.jeeplus.consultancy.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoOther;
+
+
+//@InterceptorIgnore(tenantLine = "true")
+public interface ConsultancyReimbursementDetailInfoOtherMapper extends BaseMapper<ConsultancyReimbursementDetailInfoOther> {
+}

+ 9 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoProcuredMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.consultancy.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoProcured;
+
+
+//@InterceptorIgnore(tenantLine = "true")
+public interface ConsultancyReimbursementDetailInfoProcuredMapper extends BaseMapper<ConsultancyReimbursementDetailInfoProcured> {
+}

+ 9 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementDetailInfoReportMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.consultancy.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoReport;
+
+
+//@InterceptorIgnore(tenantLine = "true")
+public interface ConsultancyReimbursementDetailInfoReportMapper extends BaseMapper<ConsultancyReimbursementDetailInfoReport> {
+}

+ 67 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/ConsultancyReimbursementInfoMapper.java

@@ -0,0 +1,67 @@
+package com.jeeplus.consultancy.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+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.consultancy.approvalInfo.domain.*;
+import com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyReimbursementAmountInfoDTO;
+import com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyReportNoDto;
+import com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyRetureListDto;
+import com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyTreeUserDto;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:09
+ **/
+//@InterceptorIgnore(tenantLine = "true")
+public interface ConsultancyReimbursementInfoMapper extends BaseMapper<ConsultancyReimbursementInfo> {
+
+    IPage<ConsultancyProgramProjectListInfo> findProjectList(Page<ConsultancyProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ConsultancyProgramProjectListInfo> wrapper);
+
+    String selectInvoiceFlag(@Param("id") String id);
+    //@InterceptorIgnore(tenantLine = "true")
+    IPage<ConsultancyRetureListDto> findList (Page<ConsultancyRetureListDto> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<WorkAttachmentInfo> findFiles(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+
+    List<ConsultancyTreeUserDto> findOfficeList();
+
+    List<ConsultancyTreeUserDto> findUserList(@Param("name") String name);
+
+    List<ConsultancyRetureListDto> findExportList (@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    IPage<ConsultancyRetureListDto> relationReimbursementList (Page<ConsultancyRetureListDto> page, @Param("id") String id);
+
+    IPage<ConsultancyReportNoDto> getReportNoList(Page<ConsultancyReportNoDto> page, @Param(Constants.WRAPPER) QueryWrapper<ConsultancyReportNoDto> queryWrapper);
+    @InterceptorIgnore(tenantLine = "true")
+    List<ConsultancyReimbursementDetailInfoContract> getContractDetailList(@Param("id") String id);
+    @InterceptorIgnore(tenantLine = "true")
+    List<ConsultancyReimbursementDetailInfoReport> getReportDetailList(@Param("id") String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<ConsultancyReimbursementDetailInfoOther> getOtherDetailList(@Param("id") String id);
+    @InterceptorIgnore(tenantLine = "true")
+    List<ConsultancyReimbursementDetailInfoProcured> getProcuredDetailList(@Param("id") String id);
+    @InterceptorIgnore(tenantLine = "true")
+    List<ConsultancyReimbursementDetailInfo> getDetailList(@Param("id") String id);
+
+    /**
+     * 根据发票号查询是否已经或正在报销
+     * @param invoiceNumber
+     * @return
+     */
+    Integer getEffectiveDataByInvoiceNumber(@Param("invoiceNumber") String invoiceNumber, @Param("id") String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<ConsultancyReimbursementAmountInfoDTO> getInvoiceReimbursementAmountList(@Param("idList") List<String> idList);
+}

+ 685 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/mapper/xml/ConsultancyReimbursementInfoMapper.xml

@@ -0,0 +1,685 @@
+<?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.consultancy.approvalInfo.mapper.ConsultancyReimbursementInfoMapper">
+	<update id="updateStatusById">
+		UPDATE consultancy_reimbursement_info SET type = #{type}
+		WHERE id = #{id}
+	</update>
+
+
+	<select id="findList"
+            resultType="com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyRetureListDto">
+        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,
+			a.reimbursement_type,
+			pru.purchase_no,
+                         a.update_time
+		FROM
+			consultancy_reimbursement_info a
+			LEFT JOIN consultancy_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 consultancy_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 consultancy_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 consultancy_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 consultancy_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.sys.domain.WorkAttachmentInfo">
+		SELECT
+			id,
+			url,
+			attachment_name AS `name`,
+			create_by_id AS `by`,
+			attachment_flag AS `attachmentFlag`,
+			create_time
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+	</select>
+	<select id="findOfficeList"
+			resultType="com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyTreeUserDto">
+		SELECT id,`name`,parent_id FROM sys_office WHERE del_flag = 0
+	</select>
+	<select id="findUserList"
+			resultType="com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyTreeUserDto">
+		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.consultancy.approvalInfo.service.dto.ConsultancyRetureListDto">
+		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
+			consultancy_reimbursement_info a
+			LEFT JOIN consultancy_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 consultancy_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 consultancy_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 consultancy_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 consultancy_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 consultancy_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 consultancy_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 consultancy_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 consultancy_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.consultancy.approvalInfo.service.dto.ConsultancyRetureListDto">
+		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
+			consultancy_reimbursement_info a
+			LEFT JOIN consultancy_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.consultancy.approvalInfo.domain.ConsultancyProgramProjectListInfo">
+		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.consultancy.approvalInfo.service.dto.ConsultancyReportNoDto">
+		select report_no,c.project_name from consultancy_project_report_new_line a
+		left join consultancy_project_report b
+		on a.report_id = b.id
+		left join consultancy_project_records c
+		on b.project_id = c.id
+		${ew.customSqlSegment}
+		ORDER BY a.update_time DESC
+	</select>
+
+	<select id="getContractDetailList" resultType="com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoContract">
+		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 consultancy_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.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoReport">
+		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 consultancy_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.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfo">
+		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 consultancy_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.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoOther">
+		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 consultancy_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.consultancy.approvalInfo.domain.ConsultancyReimbursementDetailInfoProcured">
+		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 consultancy_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>
+
+	<select id="getEffectiveDataByInvoiceNumber" resultType="java.lang.Integer">
+		select count(a.id) as count from ccpm_reimbursement_amount_info a
+		left join ccpm_reimbursement_info ri on ri.id = a.info_id
+		<where>
+			a.number = #{invoiceNumber} and a.del_flag = 0
+			<if test="id != null and id != ''">
+				and a.info_id != #{id}
+			</if>
+			and ri.del_flag = 0
+		</where>
+	</select>
+
+
+
+	<select id="getInvoiceReimbursementAmountList" resultType="com.jeeplus.consultancy.approvalInfo.service.dto.ConsultancyReimbursementAmountInfoDTO">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.update_by_id,
+		a.update_time,
+		a.del_flag,
+		a.info_id,
+		a.code,
+		a.number,
+		a.amount,
+		a.tax_amount,
+		a.count,
+		a.tenant_id,
+		a.reimbursement_type,
+		a.invoice_type,
+		a.invoice_project_name,
+		date_format(a.invoice_date,'%Y-%m-%d %h:%i:%s') as 'invoiceDate',
+		a.invoice_date,
+		a.invoice_unit,
+		a.remarks,
+		ri.type as "status",
+		date_format(ri.reim_date,'%Y-%m-%d') as 'reimDate',
+		su.name as "reimbursementApplicantName",
+		so.name as "officeName",
+		sdv.label as "invoiceTypeStr"
+		from
+		consultancy_reimbursement_amount_info a
+		left join consultancy_reimbursement_info ri on ri.id = a.info_id
+		left join sys_user su on su.id = ri.create_by_id
+		left join sys_office so on so.id = su.office_id
+		left join sys_dict_value sdv on sdv.value = a.invoice_type
+		left join sys_dict_type sdt on sdt.id = sdv.dict_type_id and sdt.type = 'invoice_reimbursement_type'
+		<where>
+			a.del_flag = 0
+			and a.info_id in
+			<foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
+				#{id}
+			</foreach>
+		</where>
+	</select>
+
+	<select id="findById" resultType="com.jeeplus.consultancy.approvalInfo.domain.ConsultancyReimbursementInfo">
+		SELECT
+	id,
+	user_id,
+	user_name,
+	NO,
+	department,
+	reim_date,
+	remarks,
+	type,
+	proc_ins_id,
+	process_definition_id,
+	source_type,
+	purchase_id,
+	reimbursement_type,
+	create_time,
+	create_by_id,
+	update_time,
+	update_by_id,
+	del_flag,
+	tenant_id
+FROM
+	consultancy_reimbursement_info
+WHERE
+	id = #{id}
+	AND del_flag = 0
+	</select>
+</mapper>

+ 793 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/ConsultancyReimbursementInfoService.java

@@ -0,0 +1,793 @@
+package com.jeeplus.consultancy.approvalInfo.service;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+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.common.TokenProvider;
+import com.jeeplus.consultancy.approvalInfo.domain.*;
+import com.jeeplus.consultancy.approvalInfo.mapper.*;
+import com.jeeplus.consultancy.approvalInfo.service.dto.*;
+import com.jeeplus.consultancy.approvalType.service.ConsultancyReimbursementTypeService;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.feign.IDictApi;
+import com.jeeplus.sys.feign.IOfficeApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.OfficeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.utils.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+//import com.jeeplus.finance.contractRegistration.service.ContractInfoService;
+//import com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.QueryListDto;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:11
+ **/
+@Service
+public class ConsultancyReimbursementInfoService {
+
+    @Resource
+    private ConsultancyReimbursementInfoMapper infoMapper;
+
+    @Resource
+    private ConsultancyReimbursementDetailInfoContractMapper zsReimbursementDetailInfoContractMapper;
+
+    @Resource
+    private ConsultancyReimbursementDetailInfoReportMapper zsReimbursementDetailInfoReportMapper;
+
+    @Resource
+    private ConsultancyReimbursementDetailInfoOtherMapper zsReimbursementDetailInfoOtherMapper;
+
+    @Resource
+    private ConsultancyReimbursementDetailInfoProcuredMapper zsReimbursementDetailInfoProcuredMapper;
+
+    @Resource
+    private ConsultancyReimbursementDetailInfoMapper detailInfoMapper;
+
+    @Resource
+    private ConsultancyReimbursementAmountInfoMapper amountInfoMapper;
+
+//    @Resource
+//    private OssServiceMapper ossServiceMapper;
+
+//    @Resource
+//    private SerialnumTplService serialnumTplService;
+
+//    @Resource
+//    private ContractInfoService infoService;
+
+   /* @Resource
+    private MaterialBasicMapper materialBasicMapper;*/
+
+//    @Resource
+//    private OfficeService officeService;
+
+    @Resource
+    private ConsultancyReimbursementTypeService typeService;
+
+    /**
+     * 报告号查询
+     */
+    public IPage<ConsultancyReportNoDto> getReportNoList(Page<ConsultancyReportNoDto> page , ConsultancyReportNoDto dto) throws Exception{
+        QueryWrapper<ConsultancyReportNoDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyReportNoDto.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<ConsultancyRetureListDto> list(Page<ConsultancyRetureListDto> page , ConsultancyQueryListDto dto) throws Exception{
+        QueryWrapper<ConsultancyQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyQueryListDto.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());
+        }
+        // 报销项状态
+        if (StringUtils.isNotEmpty(dto.getReimbursementType())) {
+            queryWrapper.eq("a.reimbursement_type", dto.getReimbursementType());
+        }
+
+        /*//获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        //获取当前登录人所属角色
+        //若是中审部门主任,则仅展示部门主任信息
+        //若是中审员工,则仅展示自己的数据信息
+        List<RoleDTO> roleDTOList = userDTO.getRoleDTOList();
+        for (RoleDTO roleDTO : roleDTOList) {
+            //根据角色id查询角色信息
+            RoleDTO roleDTOById = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(roleDTO.getId());
+            if("zsyg".equals(roleDTOById.getEnName()) && "中审员工".equals(roleDTOById.getName())){
+                queryWrapper.eq("a.create_by_id", userDTO.getId());
+                break;
+            }else if("zsbmzr".equals(roleDTOById.getEnName()) && "中审部门主任".equals(roleDTOById.getName())){
+                queryWrapper.eq("c.office_id", userDTO.getOfficeDTO().getId());
+                break;
+            }
+        }*/
+
+        return infoMapper.findList(page, queryWrapper);
+    }
+
+    public IPage<ConsultancyProgramProjectListInfo> projectList(Page<ConsultancyProgramProjectListInfo> page, ConsultancyProgramProjectListInfo info, String tabType) throws Exception{
+
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+
+
+        QueryWrapper<ConsultancyProgramProjectListInfo> wrapper = QueryWrapperGenerator.buildQueryCondition(info, ConsultancyProgramProjectListInfo.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<ConsultancyProgramProjectListInfo> pageList = infoMapper.findProjectList(page, wrapper);
+        pageList.getRecords().stream().forEach(item ->{
+            String isInvoice = infoMapper.selectInvoiceFlag(item.getId());
+            item.setIsInvoice(isInvoice);
+        });
+        return pageList;
+    }
+
+    public ConsultancyReimbursementInfo save(ConsultancySaveInfoDto dto) throws Exception{
+        // 获取当前登录人信息
+      UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto, userDTO);
+        } else {
+            return add(dto, userDTO);
+        }
+    }
+
+    public ConsultancyReimbursementInfo add(ConsultancySaveInfoDto dto, UserDTO userDTO) throws Exception{
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        // 生成编号
+        String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ConsultancySaveInfoDto.BIZ_CODE,TokenProvider.getCurrentToken());
+        // 保存基础信息表信息
+        ConsultancyReimbursementInfo info = new ConsultancyReimbursementInfo();
+        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 (ConsultancyReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                detailInfoMapper.insert(detailInfo);
+            }
+        }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (ConsultancyReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存报告详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoReports())) {
+            for (ConsultancyReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            for (ConsultancyReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoOtherMapper.insert(detailInfo);
+            }
+        }
+        // 保存采购报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
+            for (ConsultancyReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoProcuredMapper.insert(detailInfo);
+            }
+        }
+        if(StringUtils.isNotBlank(dto.getReimbursementType())){
+            if("0".equals(dto.getReimbursementType())){
+                // 保存专用发票列表信息
+                if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
+                    for (ConsultancyReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
+                        //普通报销 发票信息
+                        amountInfo.setReimbursementType("0");
+                        // 生成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);
+                    }
+                }
+                //清除电子发票信息
+                // 删除合同列表
+                LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
+                deleteInfo.eq(ConsultancyReimbursementAmountInfo::getInfoId, dto.getId());
+                deleteInfo.ne(ConsultancyReimbursementAmountInfo::getReimbursementType, "0");
+                amountInfoMapper.delete(deleteInfo);
+            }else if("1".equals(dto.getReimbursementType())){
+                // 保存电子发票列表信息
+                if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
+                    for (ConsultancyReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
+                        //电子发票报销 发票信息
+                        amountInfo.setReimbursementType("1");
+                        // 生成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);
+                    }
+                }
+                //清除专用发票信息
+                LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
+                deleteInfo.eq(ConsultancyReimbursementAmountInfo::getInfoId, dto.getId());
+                deleteInfo.ne(ConsultancyReimbursementAmountInfo::getReimbursementType, "1");
+                amountInfoMapper.delete(deleteInfo);
+
+                // 保存电子发票附件列表信息
+                if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
+                    typeService.saveFiles(dto.getInvoiceReimbursementFiles(), userDTO, id,"invoiceReimbursement");
+                }
+            }
+        }
+        // 保存附件列表信息
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            typeService.saveFiles(dto.getFiles(), userDTO, id);
+        }
+        return info;
+    }
+
+    public ConsultancyReimbursementInfo update(ConsultancySaveInfoDto dto, UserDTO userDTO) {
+        // 修改基础信息
+        ConsultancyReimbursementInfo info = new ConsultancyReimbursementInfo();
+        BeanUtils.copyProperties(dto, info);
+        info.setUpdateById(userDTO.getId());
+        info.setUpdateTime(new Date());
+        infoMapper.updateById(info);
+        // 修改报销详情列表信息
+        // 删除原有数据
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(ConsultancyReimbursementDetailInfo::getInfoId, dto.getId());
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(ConsultancyReimbursementDetailInfoContract::getInfoId, dto.getId());
+        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除报告列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
+        detailWrapperReport.eq(ConsultancyReimbursementDetailInfoReport::getInfoId, dto.getId());
+        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        // 删除其他报销表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoOther> detailWrapperOthers = new LambdaQueryWrapper<>();
+        detailWrapperOthers.eq(ConsultancyReimbursementDetailInfoOther::getInfoId, dto.getId());
+        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOthers);
+        // 删除采购报销表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
+        detailWrapperProcured.eq(ConsultancyReimbursementDetailInfoProcured::getInfoId, dto.getId());
+        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+
+        // 保存项目详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
+            for (ConsultancyReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                detailInfoMapper.insert(detailInfo);
+            }
+        }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (ConsultancyReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存报告详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoReports())) {
+            for (ConsultancyReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            for (ConsultancyReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoOtherMapper.insert(detailInfo);
+            }
+        }
+        // 保存采购报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
+            for (ConsultancyReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoProcuredMapper.insert(detailInfo);
+            }
+        }
+        // 修改专用发票信息列表
+        // 删除原有数据
+        LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> amountWrapper = new LambdaQueryWrapper<>();
+        amountWrapper.eq(ConsultancyReimbursementAmountInfo::getInfoId, dto.getId());
+        amountInfoMapper.delete(amountWrapper);
+        if(StringUtils.isNotBlank(dto.getReimbursementType())){
+            if("0".equals(dto.getReimbursementType())){
+                // 保存专用发票列表信息
+                if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
+                    for (ConsultancyReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
+                        //普通报销 发票信息
+                        amountInfo.setReimbursementType("0");
+                        // 生成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);
+                    }
+                }
+                //清除电子发票信息
+                // 删除合同列表
+                LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
+                deleteInfo.eq(ConsultancyReimbursementAmountInfo::getInfoId, dto.getId());
+                deleteInfo.ne(ConsultancyReimbursementAmountInfo::getReimbursementType, "0");
+                amountInfoMapper.delete(deleteInfo);
+            }else if("1".equals(dto.getReimbursementType())){
+                // 保存电子发票列表信息
+                if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
+                    for (ConsultancyReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
+                        //电子发票报销 发票信息
+                        amountInfo.setReimbursementType("1");
+                        // 生成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);
+                    }
+                }
+                //清除专用发票信息
+                LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
+                deleteInfo.eq(ConsultancyReimbursementAmountInfo::getInfoId, dto.getId());
+                deleteInfo.ne(ConsultancyReimbursementAmountInfo::getReimbursementType, "1");
+                amountInfoMapper.delete(deleteInfo);
+
+                // 保存电子发票附件列表信息
+                if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
+                    typeService.updateFiles(dto.getInvoiceReimbursementFiles(), userDTO, dto.getId(),"invoiceReimbursement");
+                }
+            }
+        }
+        /*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())) {
+            typeService.updateFiles(dto.getFiles(), userDTO, dto.getId());
+        }
+        return info;
+    }
+
+    public String remove(String id) {
+        // 删除基础信息表
+        infoMapper.deleteById(id);
+        // 删除详情列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(ConsultancyReimbursementDetailInfo::getInfoId, id);
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(ConsultancyReimbursementDetailInfoContract::getInfoId, id);
+        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除报告列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
+        detailWrapperReport.eq(ConsultancyReimbursementDetailInfoReport::getInfoId, id);
+        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        // 删除其他报销列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
+        detailWrapperOther.eq(ConsultancyReimbursementDetailInfoOther::getInfoId, id);
+        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        // 删除采购报销列表
+        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
+        detailWrapperProcured.eq(ConsultancyReimbursementDetailInfoProcured::getInfoId, id);
+        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        // 删除专用发票信息列表
+        LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        amountInfoLambdaQueryWrapper.eq(ConsultancyReimbursementAmountInfo::getInfoId, id);
+        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
+        // 删除附件信息
+//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
+//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
+        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+        return "操作成功";
+    }
+
+    public ConsultancySaveInfoDto findById(String id) {
+        ConsultancySaveInfoDto dto = new ConsultancySaveInfoDto();
+        // 查询基础信息表
+        ConsultancyReimbursementInfo info = infoMapper.selectById(id);
+        if (ObjectUtil.isNotEmpty(info)){
+            BeanUtils.copyProperties(info, dto);
+            if(StringUtils.isNotBlank(info.getDepartment())) {
+                OfficeDTO byId = SpringUtil.getBean ( IOfficeApi.class ).getOfficeById(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<ConsultancyReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            amountInfoLambdaQueryWrapper.eq(ConsultancyReimbursementAmountInfo::getInfoId, id);
+            amountInfoLambdaQueryWrapper.eq(ConsultancyReimbursementAmountInfo::getReimbursementType, "0");
+            List<ConsultancyReimbursementAmountInfo> amountInfos = amountInfoMapper.selectList(amountInfoLambdaQueryWrapper);
+            dto.setAmountInfos(amountInfos);
+            LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> invoiceReimbursementsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            invoiceReimbursementsLambdaQueryWrapper.eq(ConsultancyReimbursementAmountInfo::getInfoId, id);
+            invoiceReimbursementsLambdaQueryWrapper.eq(ConsultancyReimbursementAmountInfo::getReimbursementType, "1");
+            List<ConsultancyReimbursementAmountInfo> invoiceReimbursements = amountInfoMapper.selectList(invoiceReimbursementsLambdaQueryWrapper);
+            dto.setInvoiceReimbursements(invoiceReimbursements);
+            // 查询附件信息
+            List<WorkAttachmentInfo> fileList = infoMapper.findFiles(id);
+            List<WorkAttachmentInfo> files = com.google.common.collect.Lists.newArrayList();
+            List<WorkAttachmentInfo> invoiceReimbursementFiles = com.google.common.collect.Lists.newArrayList();
+
+            if (CollectionUtils.isNotEmpty(fileList)) {
+                for (WorkAttachmentInfo i : fileList) {
+                    i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
+                    if("invoiceReimbursement".equals(i.getAttachmentFlag())){
+                        invoiceReimbursementFiles.add(i);
+                    }else{
+                        files.add(i);
+                    }
+                }
+            }
+            dto.setFiles(files);
+            dto.setInvoiceReimbursementFiles(invoiceReimbursementFiles);
+        }
+        return dto;
+    }
+
+    public Boolean checkNumber(String number) {
+        LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ConsultancyReimbursementAmountInfo::getNumber, number);
+        List<ConsultancyReimbursementAmountInfo> infos = amountInfoMapper.selectList(wrapper);
+        if (CollectionUtils.isNotEmpty(infos)) {
+            return true;
+        }
+        return false;
+    }
+
+    public void updateStatusById(ConsultancyRetureListDto dto) {
+        infoMapper.updateStatusById(dto.getId(), dto.getType());
+    }
+
+    //用户树形
+    public List<ConsultancyTreeUserDto> userTree(String name) {
+        List<ConsultancyTreeUserDto> list = new ArrayList<>();
+        // 查询部门
+        List<ConsultancyTreeUserDto> officeList = infoMapper.findOfficeList();
+        if (CollectionUtils.isNotEmpty(officeList)) {
+            list.addAll(officeList);
+        }
+        // 查询用户
+        List<ConsultancyTreeUserDto> userList = infoMapper.findUserList(name);
+        if (CollectionUtils.isNotEmpty(userList)) {
+            list.addAll(userList);
+        }
+        return list;
+    }
+
+    /**
+     * 下载列表查询
+     */
+    public List<ConsultancyRetureListDto> exportList(ConsultancyQueryListDto dto) throws Exception{
+        QueryWrapper<ConsultancyQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyQueryListDto.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<ConsultancyRetureListDto> exportList = infoMapper.findExportList(queryWrapper);
+        if (CollectionUtils.isNotEmpty(exportList)) {
+            for (ConsultancyRetureListDto 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(SpringUtil.getBean ( IDictApi.class ).getDictLabel(retureListDto.getSourceType(),"cw_reimbursement_source_type",""));
+                }
+            }
+        }
+        return exportList;
+    }
+
+    /**
+     * 关联报销
+     */
+    public IPage<ConsultancyRetureListDto> relationReimbursementList(Page<ConsultancyRetureListDto> page, String id) {
+        IPage<ConsultancyRetureListDto> iPage = infoMapper.relationReimbursementList(page, id);
+        return iPage;
+    }
+
+    /**
+     * 根据发票号查询是否已经或正在报销
+     * @param invoiceNumber
+     * @return
+     */
+    public Integer getEffectiveDataByInvoiceNumber(String invoiceNumber, String id){
+        return infoMapper.getEffectiveDataByInvoiceNumber(invoiceNumber, id);
+    }
+
+    public List<ConsultancyReimbursementAmountInfoDTO> getInvoiceReimbursementAmountList(List<String> idList) {
+        List<ConsultancyReimbursementAmountInfoDTO> list = infoMapper.getInvoiceReimbursementAmountList(idList);
+
+
+        return list;
+    }
+
+}

+ 63 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyQueryListDto.java

@@ -0,0 +1,63 @@
+package com.jeeplus.consultancy.approvalInfo.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+public class ConsultancyQueryListDto 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;
+
+    /**
+     * 报销类型(0:普通报销;1:电子发票报销)
+     */
+    private String reimbursementType;
+}

+ 114 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyReimbursementAmountInfoDTO.java

@@ -0,0 +1,114 @@
+package com.jeeplus.consultancy.approvalInfo.service.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author: 徐滕
+ * @version: 2023-11-03 16:26
+ */
+@Data
+public class ConsultancyReimbursementAmountInfoDTO extends BaseEntity {
+    /**
+     * 序号
+     */
+    @Excel(name = "序号", width = 6, orderNum = "1")
+    private Integer serialNumber;
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 发票代码
+     */
+    private String code;
+
+    /**
+     * 发票编号
+     */
+    @Excel(name = "发票号号", width = 22, orderNum = "3")
+    private String number;
+
+    /**
+     * 金额
+     */
+    @Excel(name = "金额", width = 16, orderNum = "7")
+    private Double amount;
+
+    /**
+     * 税额
+     */
+    @Excel(name = "税额", width = 16, orderNum = "8")
+    private Double taxAmount;
+
+    /**
+     * 价税合计
+     */
+    @Excel(name = "合计", width = 16, orderNum = "9")
+    private Double count;
+
+    /**
+     * 报销类型(0:普通报销;1:电子发票报销)
+     */
+    private String reimbursementType;
+
+    /**
+     * 发票类型(01:增值税发票;02:普通发票)
+     */
+    private String invoiceType;
+
+    /**
+     * 发票项目名
+     */
+    @Excel(name = "项目名称", width = 30, orderNum = "6")
+    private String invoiceProjectName;
+
+    /**
+     * 开票时间
+     */
+    @Excel(name = "开票日期", width = 20, orderNum = "4")
+    private String invoiceDate;
+
+    /**
+     * 开票单位
+     */
+    @Excel(name = "开票单位", width = 30, orderNum = "5")
+    private String invoiceUnit;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 30, orderNum = "12")
+    private String remarks;
+
+    /**
+     * 发票类型Str
+     */
+    @Excel(name = "发票类型", width = 20, orderNum = "2")
+    private String invoiceTypeStr;
+    private String officeName;
+
+    /**
+     * 报销人
+     */
+    @Excel(name = "报销人", width = 10, orderNum = "10")
+    private String reimbursementApplicantName;
+
+    /**
+     * 报销日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "报销日期", exportFormat="yyyy-MM-dd", width = 12, orderNum = "11")
+    private Date reimDate;
+
+    /**
+     * 报销状态
+     */
+    //@Excel(name = "报销状态", width = 30, orderNum = "12",dict = "status")
+    private String status;
+}

+ 21 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyReportNoDto.java

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

+ 129 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyRetureListDto.java

@@ -0,0 +1,129 @@
+package com.jeeplus.consultancy.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 ConsultancyRetureListDto {
+
+    /**
+     * 基础表主键值
+     */
+    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;
+
+    /**
+     * 报销类型(0:普通报销;1:电子发票报销)
+     */
+    private String reimbursementType;
+}

+ 96 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancySaveInfoDto.java

@@ -0,0 +1,96 @@
+package com.jeeplus.consultancy.approvalInfo.service.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.consultancy.approvalInfo.domain.*;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ConsultancySaveInfoDto 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<ConsultancyReimbursementDetailInfo> detailInfos;
+    private List<ConsultancyReimbursementDetailInfoContract> detailInfoContracts;
+    private List<ConsultancyReimbursementDetailInfoReport> detailInfoReports;
+    private List<ConsultancyReimbursementDetailInfoOther> detailInfoOthers;
+    private List<ConsultancyReimbursementDetailInfoProcured> detailInfoProcured;
+
+    private List<ConsultancyReimbursementAmountInfo> amountInfos;
+    private List<ConsultancyReimbursementAmountInfo> invoiceReimbursements;
+
+    private List<WorkAttachmentInfo> files;
+    private List<WorkAttachmentInfo> invoiceReimbursementFiles;
+
+    /**
+     * 报销类型
+     */
+    private String sourceType;
+
+    /**
+     * 采购编号
+     */
+    private String purchaseNo;
+
+    private String purchaseId;
+
+    private String departmentName;
+    /**
+     * 报销类型
+     */
+    private String reimbursementType;
+
+}

+ 19 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancyTreeUserDto.java

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

+ 152 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/controller/ConsultancyReimbursementTypeController.java

@@ -0,0 +1,152 @@
+package com.jeeplus.consultancy.approvalType.controller;
+import com.jeeplus.consultancy.approvalType.domain.ConsultancyReimbursementTypeInfo;
+import com.jeeplus.consultancy.approvalType.mapper.ConsultancyReimbursementTypeMapper;
+import com.jeeplus.consultancy.approvalType.service.ConsultancyReimbursementTypeForTreeDataService;
+import com.jeeplus.consultancy.approvalType.service.ConsultancyReimbursementTypeService;
+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 = "/consultancyReimbursement/type")
+public class ConsultancyReimbursementTypeController {
+
+    @Resource
+    private ConsultancyReimbursementTypeService service;
+
+    @Resource
+    private ConsultancyReimbursementTypeForTreeDataService treeService;
+
+    @Resource
+    private ConsultancyReimbursementTypeMapper mapper;
+
+    /**
+     * 列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<List<ConsultancyReimbursementTypeInfo>> list(ConsultancyReimbursementTypeInfo info) {
+        List<ConsultancyReimbursementTypeInfo> list = service.list(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/bxList")
+    public ResponseEntity<List<ConsultancyReimbursementTypeInfo>> bxList(ConsultancyReimbursementTypeInfo info) {
+        List<ConsultancyReimbursementTypeInfo> list = service.bxList(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 采购类型列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "采购类型列表查询")
+    @GetMapping("/cgList")
+    public ResponseEntity<List<ConsultancyReimbursementTypeInfo>> cgList(ConsultancyReimbursementTypeInfo info) {
+        List<ConsultancyReimbursementTypeInfo> list = service.cgList(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 新增/修改
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "新增/修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody ConsultancyReimbursementTypeInfo info) {
+        String s = service.save(info);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping("/findById")
+    public ResponseEntity<ConsultancyReimbursementTypeInfo> findById(String id) {
+        ConsultancyReimbursementTypeInfo 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<ConsultancyReimbursementTypeInfo>> treeData(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ConsultancyReimbursementTypeInfo> infos = treeService.treeDataForType(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/treeData1")
+    public ResponseEntity<List<ConsultancyReimbursementTypeInfo>> treeData1(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ConsultancyReimbursementTypeInfo> infos = treeService.treeDataForType1(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/summaryTreeData")
+    public ResponseEntity<List<ConsultancyReimbursementTypeInfo>> summaryTreeData(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ConsultancyReimbursementTypeInfo> infos = treeService.summaryTreeData(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+    /**
+     * 查询树形
+     * @param extId 排除的ID
+     * @return
+     */
+    @ApiOperation(value = "查询树形")
+    @GetMapping("/treeData2")
+    public ResponseEntity<List<ConsultancyReimbursementTypeInfo>> treeData2(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ConsultancyReimbursementTypeInfo> infos = treeService.treeDataForType2(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+}

+ 88 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/domain/ConsultancyReimbursementTypeInfo.java

@@ -0,0 +1,88 @@
+package com.jeeplus.consultancy.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 = "consultancy_reimbursement_type_info")
+public class ConsultancyReimbursementTypeInfo extends TreeEntity<ConsultancyReimbursementTypeInfo> {
+
+    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;
+}

+ 43 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/mapper/ConsultancyReimbursementTypeMapper.java

@@ -0,0 +1,43 @@
+package com.jeeplus.consultancy.approvalType.mapper;
+
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.consultancy.approvalType.domain.ConsultancyReimbursementTypeInfo;
+import com.jeeplus.core.domain.TreeMapper;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:02
+ **/
+public interface ConsultancyReimbursementTypeMapper extends BaseMapper<ConsultancyReimbursementTypeInfo>, TreeMapper<ConsultancyReimbursementTypeInfo> {
+
+    /**
+     * 根据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<ConsultancyReimbursementTypeInfo> getAllList(String type);
+    @InterceptorIgnore(tenantLine = "true")
+    List<WorkAttachmentInfo> findList(@Param("id") String id);
+    @InterceptorIgnore(tenantLine = "true")
+    Integer findIsExit(@Param("id") String id, @Param("name")String name);
+}

+ 52 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/mapper/xml/ConsultancyReimbursementTypeMapper.xml

@@ -0,0 +1,52 @@
+<?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.consultancy.approvalType.mapper.ConsultancyReimbursementTypeMapper">
+	<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.consultancy.approvalType.domain.ConsultancyReimbursementTypeInfo">
+		select * from cw_reimbursement_type_info where del_flag = '0' order by sort asc
+	</select>
+    <select id="findList" resultType="com.jeeplus.sys.domain.WorkAttachmentInfo">
+		SELECT * FROM work_attachment WHERE del_flag = 0 AND attachment_id = #{id}
+	</select>
+	<select id="findIsExit" resultType="java.lang.Integer">
+		SELECT
+			COUNT( 0 )
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+			AND attachment_name = #{name}
+	</select>
+</mapper>

+ 178 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/service/ConsultancyReimbursementTypeForTreeDataService.java

@@ -0,0 +1,178 @@
+package com.jeeplus.consultancy.approvalType.service;
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.consultancy.approvalType.domain.ConsultancyReimbursementTypeInfo;
+import com.jeeplus.consultancy.approvalType.mapper.ConsultancyReimbursementTypeMapper;
+import com.jeeplus.core.service.TreeService;
+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 ConsultancyReimbursementTypeForTreeDataService extends TreeService<ConsultancyReimbursementTypeMapper, ConsultancyReimbursementTypeInfo> {
+
+    @Resource
+    private ConsultancyReimbursementTypeMapper typeMapper;
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ConsultancyReimbursementTypeInfo> treeDataForType(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+//        List<ZsReimbursementTypeInfo> allList = typeMapper.getAllList("1");
+        List<ConsultancyReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ConsultancyReimbursementTypeInfo>) entityClass ).orderByAsc ( ConsultancyReimbursementTypeInfo::getSort ));
+        ConsultancyReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ConsultancyReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ConsultancyReimbursementTypeInfo> treeDataForType1(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+        List<ConsultancyReimbursementTypeInfo> allList = typeMapper.getAllList("1");
+//        List<ZsReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ZsReimbursementTypeInfo>) entityClass ).orderByAsc ( ZsReimbursementTypeInfo::getSort ));
+        ConsultancyReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ConsultancyReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ConsultancyReimbursementTypeInfo> summaryTreeData(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+        List<ConsultancyReimbursementTypeInfo> allList = typeMapper.getAllList("2");
+        ConsultancyReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ConsultancyReimbursementTypeInfo> rootTree = this.formatListToTreeForType ( root, allList, extId, type );
+        return rootTree;
+    }
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ConsultancyReimbursementTypeInfo> treeDataForType2(String extId, String type) throws Exception{
+        //获取所有的业务类型为1的数据
+        List<ConsultancyReimbursementTypeInfo> allList = typeMapper.getAllList("2");
+//        List<ZsReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ZsReimbursementTypeInfo>) entityClass ).orderByAsc ( ZsReimbursementTypeInfo::getSort ));
+        ConsultancyReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ConsultancyReimbursementTypeInfo> 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 <ConsultancyReimbursementTypeInfo> formatListToTreeForType (ConsultancyReimbursementTypeInfo root, List <ConsultancyReimbursementTypeInfo> allList, String extId, String type) {
+        String rootId = root.getId ( );
+        // 最终的树形态
+        List <ConsultancyReimbursementTypeInfo> trees = Lists.newArrayList ( );
+
+        // 把需要构造树的所有列表, 根据以父id作为key, 整理为列表
+        Map<String, List <ConsultancyReimbursementTypeInfo>> treeMap = Maps.newHashMap ( );
+        for (ConsultancyReimbursementTypeInfo entity : allList) {
+            List <ConsultancyReimbursementTypeInfo> 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 <ConsultancyReimbursementTypeInfo> children = treeMap.get ( rootId );
+        for (ConsultancyReimbursementTypeInfo 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(ConsultancyReimbursementTypeInfo parent, Map <String, List <ConsultancyReimbursementTypeInfo>> treeMap) {
+        List <ConsultancyReimbursementTypeInfo> children = treeMap.get ( parent.getId ( ) );
+        parent.setChildren ( children );
+        if ( children != null && !children.isEmpty ( ) ) {
+            for (ConsultancyReimbursementTypeInfo child : children) {
+                formatFillChildren ( child, treeMap );
+            }
+        }
+    }
+}

+ 379 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/service/ConsultancyReimbursementTypeService.java

@@ -0,0 +1,379 @@
+package com.jeeplus.consultancy.approvalType.service;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.consultancy.approvalType.domain.ConsultancyReimbursementTypeInfo;
+import com.jeeplus.consultancy.approvalType.mapper.ConsultancyReimbursementTypeMapper;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.utils.StringUtils;
+import org.flowable.editor.language.json.converter.util.CollectionUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-25 09:13
+ **/
+@Service
+public class ConsultancyReimbursementTypeService {
+
+    @Resource
+    private ConsultancyReimbursementTypeMapper mapper;
+
+    public List<ConsultancyReimbursementTypeInfo> list(ConsultancyReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ConsultancyReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ConsultancyReimbursementTypeInfo::getName, info.getName());
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ConsultancyReimbursementTypeInfo::getSort, info.getSort());
+        }
+//        wrapper.eq(ZsReimbursementTypeInfo::getBusinessType, "1");
+
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ConsultancyReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public List<ConsultancyReimbursementTypeInfo> bxList(ConsultancyReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ConsultancyReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ConsultancyReimbursementTypeInfo::getName, info.getName());
+        }
+        if (ObjectUtil.isNotEmpty(info)) {
+            if (StringUtils.isNotBlank(info.getLike())){
+                wrapper.likeRight(ConsultancyReimbursementTypeInfo::getSort,info.getLike());
+            }
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ConsultancyReimbursementTypeInfo::getSort, info.getSort());
+        }
+
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ConsultancyReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public List<ConsultancyReimbursementTypeInfo> cgList(ConsultancyReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ConsultancyReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ConsultancyReimbursementTypeInfo::getName, info.getName());
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ConsultancyReimbursementTypeInfo::getSort, info.getSort());
+        }
+
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ConsultancyReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public String save(ConsultancyReimbursementTypeInfo 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(ConsultancyReimbursementTypeInfo info) {
+        // 判断名称是否已存在
+        Integer isExist = mapper.checkNameIsExist(info.getName(), info.getParentId());
+        if (isExist > 0) {
+            return "false";
+        }
+        // 获取当前登录人信息
+        UserDTO userDto = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        // 生成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(ConsultancyReimbursementTypeInfo info) {
+        // 获取当前登录人信息
+        UserDTO userDto = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        info.setUpdateById(userDto.getId());
+        info.setUpdateTime(new Date());
+
+        mapper.updateById(info);
+        return "操作完成";
+    }
+
+    /**
+     * 生成序号/层级
+     * @param info
+     * @return
+     */
+    public ConsultancyReimbursementTypeInfo getNo(ConsultancyReimbursementTypeInfo info) {
+        ConsultancyReimbursementTypeInfo parentInfo = null;
+        if (!"0".equals(info.getParentId())) {
+            //根据parentId查询父节点信息
+            LambdaQueryWrapper<ConsultancyReimbursementTypeInfo> 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;
+    }
+
+    /**
+     * 修改附件信息
+     * @param list 待修改的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void updateFiles(List<WorkAttachmentInfo> list, UserDTO userDTO, String id) {
+        int j = 1;
+        String names = new String();
+        //表中存在,但是传过来不存在,说明已删除,表中数据也要删除
+        for (WorkAttachmentInfo dto : list) {
+            names = names + "," +dto.getUrl();
+        }
+        //查询保存的附件信息
+        List<WorkAttachmentInfo> infoList = mapper.findList(id);
+        if (CollectionUtils.isNotEmpty(infoList)) {
+            for (WorkAttachmentInfo i : infoList) {
+                if (!names.contains(i.getUrl())) {
+//                    ossServiceMapper.deleteById(i.getId());
+                    SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteById(i.getId());
+                }
+            }
+        }
+        //保存信息
+        for (WorkAttachmentInfo dto : list) {
+            //判断是否存在
+            Integer isExit = mapper.findIsExit(id, dto.getName());
+            if (isExit == 0) {
+                WorkAttachmentInfo i = new WorkAttachmentInfo();
+                //包含了url、size、name
+                i.setId(UUID.randomUUID().toString().replace("-", ""));
+//                i.getCreateBy().setId(userDTO.getId());
+                i.setCreateTime(new Date());
+//                i.getUpdateBy().setId(userDTO.getId());
+                i.setUpdateTime(new Date());
+                i.setDelFlag(0);
+                i.setUrl(dto.getUrl());
+                //文件类型处理
+                List<String> strings = Arrays.asList(dto.getName().split("\\."));
+                if (CollectionUtils.isNotEmpty(strings)) {
+                    i.setType(strings.get(1));
+                }
+                i.setAttachmentId(id);
+                i.setAttachmentName(dto.getName());
+                i.setAttachmentFlag("cwWorkContract");
+                i.setFileSize(dto.getSize());
+                i.setSort(j);
+                Map<String,String> map = new HashMap<>();
+                String workAttachment = JSON.toJSONString((i));
+                String userDTOInfo = JSON.toJSONString((userDTO));
+                map.put("workAttachment",workAttachment);
+                map.put("userDTO",userDTOInfo);
+                SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+//                ossServiceMapper.insertWorkAttachment(i, userDTO);
+                j++;
+            }
+        }
+    }
+
+    /**
+     * 修改附件信息
+     * @param list 待修改的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void updateFiles(List<WorkAttachmentInfo> list, UserDTO userDTO, String id, String attachmentFlag) {
+        int j = 1;
+        String names = new String();
+        //表中存在,但是传过来不存在,说明已删除,表中数据也要删除
+        for (WorkAttachmentInfo dto : list) {
+            names = names + "," +dto.getUrl();
+        }
+        //查询保存的附件信息
+        List<WorkAttachmentInfo> infoList = mapper.findList(id);
+        if (CollectionUtils.isNotEmpty(infoList)) {
+            for (WorkAttachmentInfo i : infoList) {
+                if (!names.contains(i.getUrl())) {
+//                    ossServiceMapper.deleteById(i.getId());
+                    SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteById(i.getId());
+                }
+            }
+        }
+        //保存信息
+        for (WorkAttachmentInfo dto : list) {
+            //判断是否存在
+            Integer isExit = mapper.findIsExit(id, dto.getName());
+            if (isExit == 0) {
+                WorkAttachmentInfo i = new WorkAttachmentInfo();
+                //包含了url、size、name
+                i.setId(UUID.randomUUID().toString().replace("-", ""));
+//                i.getCreateBy().setId(userDTO.getId());
+                i.setCreateTime(new Date());
+//                i.getUpdateBy().setId(userDTO.getId());
+                i.setUpdateTime(new Date());
+                i.setDelFlag(0);
+                i.setUrl(dto.getUrl());
+                //文件类型处理
+                List<String> strings = Arrays.asList(dto.getName().split("\\."));
+                if (CollectionUtils.isNotEmpty(strings)) {
+                    i.setType(strings.get(1));
+                }
+                i.setAttachmentId(id);
+                i.setAttachmentName(dto.getName());
+                i.setAttachmentFlag(attachmentFlag);
+                i.setFileSize(dto.getSize());
+                i.setSort(j);
+                Map<String,String> map = new HashMap<>();
+                String workAttachment = JSON.toJSONString((i));
+                String userDTOInfo = JSON.toJSONString((userDTO));
+                map.put("workAttachment",workAttachment);
+                map.put("userDTO",userDTOInfo);
+                SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+//                ossServiceMapper.insertWorkAttachment(i, userDTO);
+                j++;
+            }
+        }
+    }
+
+    /**
+     * 保存附件信息
+     * @param list 待保存的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void saveFiles(List<WorkAttachmentInfo> list, UserDTO userDTO, String id) {
+        int j = 1;
+        for (WorkAttachmentInfo dto : list) {
+            WorkAttachmentInfo i = new WorkAttachmentInfo();
+            //包含了url、size、name
+            i.setId(UUID.randomUUID().toString().replace("-", ""));
+//            i.getCreateBy().setId(userDTO.getId());
+            i.setCreateTime(new Date());
+//            i.getUpdateBy().setId(userDTO.getId());
+            i.setUpdateTime(new Date());
+            i.setDelFlag(0);
+            i.setUrl(dto.getUrl());
+            //文件类型处理
+            List<String> strings = Arrays.asList(dto.getName().split("\\."));
+            if (CollectionUtils.isNotEmpty(strings)) {
+                i.setType(strings.get(1));
+            }
+            i.setAttachmentId(id);
+            i.setAttachmentName(dto.getName());
+            i.setAttachmentFlag("cwWorkContract");
+            i.setFileSize(dto.getSize());
+            i.setSort(j);
+//            ossServiceMapper.insertWorkAttachment(i, userDTO);
+            Map<String,String> map = new HashMap<>();
+            String workAttachment = JSON.toJSONString((i));
+            String userDTOInfo = JSON.toJSONString((userDTO));
+            map.put("workAttachment",workAttachment);
+            map.put("userDTO",userDTOInfo);
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+            j++;
+        }
+    }
+
+    /**
+     * 保存附件信息
+     * @param list 待保存的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void saveFiles(List<WorkAttachmentInfo> list, UserDTO userDTO, String id, String attachmentFlag) {
+        int j = 1;
+        for (WorkAttachmentInfo dto : list) {
+            WorkAttachmentInfo i = new WorkAttachmentInfo();
+            //包含了url、size、name
+            i.setId(UUID.randomUUID().toString().replace("-", ""));
+//            i.getCreateBy().setId(userDTO.getId());
+            i.setCreateTime(new Date());
+//            i.getUpdateBy().setId(userDTO.getId());
+            i.setUpdateTime(new Date());
+            i.setDelFlag(0);
+            i.setUrl(dto.getUrl());
+            //文件类型处理
+            List<String> strings = Arrays.asList(dto.getName().split("\\."));
+            if (CollectionUtils.isNotEmpty(strings)) {
+                i.setType(strings.get(1));
+            }
+            i.setAttachmentId(id);
+            i.setAttachmentName(dto.getName());
+            i.setAttachmentFlag(attachmentFlag);
+            i.setFileSize(dto.getSize());
+            i.setSort(j);
+//            ossServiceMapper.insertWorkAttachment(i, userDTO);
+            Map<String,String> map = new HashMap<>();
+            String workAttachment = JSON.toJSONString((i));
+            String userDTOInfo = JSON.toJSONString((userDTO));
+            map.put("workAttachment",workAttachment);
+            map.put("userDTO",userDTOInfo);
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+            j++;
+        }
+    }
+}

+ 21 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalType/service/dto/ConsultancyReimbursementTypeDto.java

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

+ 323 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/util/ConsultancyEasyPoiUtil.java

@@ -0,0 +1,323 @@
+package com.jeeplus.consultancy.util;
+
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+/**
+ * @Author Steel.D
+ * @Description easypoi导入导出通用工具类
+ * @Date 2019-7-31 9:29
+ * @Param
+ * @return
+ **/
+
+public class ConsultancyEasyPoiUtil {
+
+    /**
+     * 功能描述:复杂导出Excel,包括文件名以及表名。创建表头
+     *
+     * @param list           导出的实体类
+     * @param title          表头名称
+     * @param sheetName      sheet表名
+     * @param pojoClass      映射的实体类
+     * @param isCreateHeader 是否创建表头
+     * @param fileName
+     * @param response
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 9:30
+     */
+
+    public static void exportExcel(List <?> list, String title, String sheetName, Class <?> pojoClass, String fileName, boolean isCreateHeader, HttpServletResponse response) {
+
+        ExportParams exportParams = new ExportParams ( title, sheetName );
+
+        exportParams.setCreateHeadRows ( isCreateHeader );
+
+        defaultExport ( list, pojoClass, fileName, response, exportParams );
+
+    }
+
+
+    /**
+     * 功能描述:复杂导出Excel,包括文件名以及表名,不创建表头
+     *
+     * @param list      导出的实体类
+     * @param title     表头名称
+     * @param sheetName sheet表名
+     * @param pojoClass 映射的实体类
+     * @param fileName  文件名
+     * @param response
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 9:35
+     */
+
+    public static void exportExcel(List <?> list, String title, String sheetName, Class <?> pojoClass, String fileName, HttpServletResponse response) {
+        ExportParams exportParams = new ExportParams(title, sheetName);
+        exportParams.setDictHandler(new ConsultancyExcelDiceAddressListHandlerImpl());
+        defaultExport ( list, pojoClass, fileName, response, exportParams );
+
+    }
+
+
+    /**
+     * 功能描述:Map 集合导出
+     *
+     * @param list     实体集合
+     * @param fileName 导出的文件名称
+     * @param response
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 9:45
+     */
+
+    public static void exportExcel(List <Map <String, Object>> list, String fileName, HttpServletResponse response) {
+
+        defaultExport ( list, fileName, response );
+
+    }
+
+
+    /**
+     * 功能描述:默认导出方法
+     *
+     * @param list         导出的实体集合
+     * @param fileName     导出的文件名
+     * @param pojoClass    pojo实体
+     * @param exportParams ExportParams封装实体
+     * @param response
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 9:50
+     */
+
+    private static void defaultExport(List <?> list, Class <?> pojoClass, String fileName, HttpServletResponse response, ExportParams exportParams) {
+
+        Workbook workbook = ExcelExportUtil.exportExcel ( exportParams, pojoClass, list );
+
+        if ( workbook != null ) {
+
+            downLoadExcel ( fileName, response, workbook );
+
+        }
+
+    }
+
+    /**
+     * 功能描述:Excel导出
+     *
+     * @param fileName 文件名称
+     * @param response
+     * @param workbook Excel对象
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 10:35
+     */
+
+    private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) {
+
+        try {
+
+            response.setCharacterEncoding ( "UTF-8" );
+
+            response.setHeader ( "content-Type", "application/vnd.ms-excel" );
+
+            response.setHeader ( "Content-Disposition", "attachment;filename=" + URLEncoder.encode ( fileName, "UTF-8" ) );
+
+            workbook.write ( response.getOutputStream ( ) );
+
+        } catch (IOException e) {
+
+            throw new RuntimeException ( e );
+
+        }
+
+    }
+
+
+    /**
+     * 功能描述:默认导出方法
+     *
+     * @param list     导出的实体集合
+     * @param fileName 导出的文件名
+     * @param response
+     * @return
+     * @author SteeL.D
+     * @Date 2019-7-31 10:45
+     */
+
+    private static void defaultExport(List <Map <String, Object>> list, String fileName, HttpServletResponse response) {
+
+        Workbook workbook = ExcelExportUtil.exportExcel ( list, ExcelType.HSSF );
+
+        if ( workbook != null ) ;
+
+        downLoadExcel ( fileName, response, workbook );
+
+    }
+
+
+    /**
+     * 功能描述:根据文件路径来导入Excel
+     *
+     * @param filePath   文件路径
+     * @param titleRows  表标题的行数
+     * @param headerRows 表头行数
+     * @param pojoClass  Excel实体类
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 11:05
+     */
+
+    public static <T> List <T> importExcel(String filePath, Integer titleRows, Integer headerRows, Class <T> pojoClass) {
+
+        //判断文件是否存在
+
+        if ( StringUtils.isBlank ( filePath ) ) {
+
+            return null;
+
+        }
+
+        ImportParams params = new ImportParams ( );
+
+        params.setTitleRows ( titleRows );
+
+        params.setHeadRows ( headerRows );
+
+        List <T> list = null;
+
+        try {
+
+            list = ExcelImportUtil.importExcel ( new File ( filePath ), pojoClass, params );
+
+        } catch (NoSuchElementException e) {
+
+            throw new RuntimeException ( "模板不能为空" );
+
+        } catch (Exception e) {
+
+            e.printStackTrace ( );
+
+
+        }
+
+        return list;
+
+    }
+
+
+    /**
+     * 功能描述:根据接收的Excel文件来导入Excel,并封装成实体类
+     *
+     * @param file       上传的文件
+     * @param titleRows  表标题的行数
+     * @param headerRows 表头行数
+     * @param pojoClass  Excel实体类
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 11:30
+     */
+
+    public static <T> List <T> importExcel(MultipartFile file, Integer titleRows, Integer headerRows, Class <T> pojoClass) {
+
+        if ( file == null ) {
+
+            return null;
+
+        }
+
+        ImportParams params = new ImportParams ( );
+
+        params.setTitleRows ( titleRows );
+
+        params.setHeadRows ( headerRows );
+
+        List <T> list = null;
+
+        try {
+
+            list = ExcelImportUtil.importExcel ( file.getInputStream ( ), pojoClass, params );
+
+        } catch (NoSuchElementException e) {
+
+            throw new RuntimeException ( "excel文件不能为空" );
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+            throw new RuntimeException ( e.getMessage ( ) );
+
+        }
+
+        return list;
+
+    }
+
+    /**
+     * 功能描述:根据接收的Excel文件来导入Excel,并封装成实体类
+     *
+     * @param file       上传的文件
+     * @param titleRows  表标题的行数
+     * @param headerRows 表头行数
+     * @param sheetNum   开始sheet页
+     * @param sheetNum   sheet页数
+     * @param pojoClass  Excel实体类
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 11:30
+     */
+    public static <T> List <T> importSheetExcel(MultipartFile file, Integer titleRows, Integer headerRows, Integer startSheetIndex, Integer sheetNum, Class <T> pojoClass) {
+
+        if ( file == null ) {
+
+            return null;
+
+        }
+
+        ImportParams params = new ImportParams ( );
+
+        params.setTitleRows ( titleRows );
+
+        params.setHeadRows ( headerRows );
+
+        params.setStartSheetIndex(startSheetIndex);
+
+        params.setSheetNum(sheetNum);
+
+        List <T> list = null;
+
+        try {
+
+            list = ExcelImportUtil.importExcel ( file.getInputStream ( ), pojoClass, params );
+
+        } catch (NoSuchElementException e) {
+
+            throw new RuntimeException ( "excel文件不能为空" );
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+            throw new RuntimeException ( e.getMessage ( ) );
+
+        }
+
+        return list;
+
+    }
+
+
+}

+ 75 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/util/ConsultancyExcelDiceAddressListHandlerImpl.java

@@ -0,0 +1,75 @@
+package com.jeeplus.consultancy.util;
+
+import cn.afterturn.easypoi.handler.inter.IExcelDictHandler;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.jeeplus.sys.feign.IDictApi;
+import com.jeeplus.sys.service.dto.DictValueInfoDTO;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+//import com.jeeplus.sys.utils.DictUtils;
+//import com.jeeplus.sys.service.dto.DictValueDTO;
+//import com.jeeplus.sys.utils.DictUtils;
+
+/**
+ * 模拟使用,生产请用真实字典
+ *
+ */
+public class ConsultancyExcelDiceAddressListHandlerImpl implements IExcelDictHandler {
+
+    /**
+     * 返回字典所有值
+     * key: dictKey
+     *
+     * @param dict 字典Key
+     * @return
+     */
+    @Override
+    public List<Map> getList(String dict) {
+        List<Map> list = new ArrayList<> ();
+//        Map<String, String> dictMap = new HashMap<>();
+//        dictMap.put("dictKey", "0");
+//        dictMap.put("dictValue", "严重瞌睡");
+//        list.add(dictMap);
+//        dictMap = new HashMap<>();
+//        dictMap.put("dictKey", "1");
+//        dictMap.put("dictValue", "小B");
+//        list.add(dictMap);
+//        dictMap = new HashMap<>();
+//        dictMap.put("dictKey", "1");
+//        dictMap.put("dictValue", "深度富有");
+//        list.add(dictMap);
+        String datas = SpringUtil.getBean ( IDictApi.class ).getDictMap (dict);
+        List<DictValueInfoDTO> dictValueDTOs = JSON.parseObject(datas, new TypeReference<List<DictValueInfoDTO>>() {});
+//        List<DictValueInfoDTO> dictValueDTOs = DictUtils.getDictMap ().get (dict);
+        dictValueDTOs.forEach (dictValueDTO -> {
+            Map<String, String> dictMap = new HashMap<> ();
+            dictMap.put ("dictKey", dictValueDTO.getValue ());
+            dictMap.put ("dictValue", dictValueDTO.getLabel ());
+            list.add (dictMap);
+        });
+        return list;
+    }
+
+    @Override
+    public String toName(String dict, Object obj, String name, Object value) {
+        if (ObjectUtil.isNotEmpty(value)) {
+            return SpringUtil.getBean ( IDictApi.class ).getDictLabel (value.toString (), dict, null);
+        }
+        return "";
+    }
+
+    @Override
+    public String toValue(String dict, Object obj, String name, Object value) {
+        if (ObjectUtil.isNotEmpty(value)) {
+            return SpringUtil.getBean ( IDictApi.class ).getDictLabel (value.toString (), dict, null);
+        }
+        return "";
+    }
+}

+ 103 - 0
jeeplus-modules/jeeplus-consult/src/main/resources/bootstrap.yml

@@ -0,0 +1,103 @@
+# Tomcat
+server:
+  port: 9441
+  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-consultancy
+  profiles:
+    # 环境配置
+    active: pro
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 127.0.0.1:8848
+        # 命名空间
+        namespace: ${spring.profiles.active}
+        # username: nacos
+        # password: nacos
+      config:
+        # 配置中心地址
+        server-addr: 127.0.0.1:8848
+        # 配置文件格式
+        file-extension: yml
+        # 共享配置
+        shared-configs:
+          - application.${spring.cloud.nacos.config.file-extension}
+        # 命名空间
+        namespace: ${spring.profiles.active}
+        # username: ${spring.cloud.nacos.discovery.username}
+        # password: ${spring.cloud.nacos.discovery.password}
+#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: xg-pg
+    minIO:
+      endpoint:
+      accessKey:
+      secretKey:
+      bucketName:
+
+#阿里云文件夹路径
+aliyun_directory: attachment-file/assess
+#签章阿里云文件bucketName
+qzBucketName: xg-qz
+

+ 1 - 1
jeeplus-modules/jeeplus-system/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/TenantWrapperImpl.java

@@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
 
 @Generated(
     value = "org.mapstruct.ap.MappingProcessor",
-    date = "2023-07-19T09:23:21+0800",
+    date = "2024-01-31T09:59:17+0800",
     comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
 )
 @Component

+ 1 - 0
jeeplus-modules/pom.xml

@@ -28,6 +28,7 @@
         <module>jeeplus-centrecareful</module>
         <module>jeeplus-human</module>
         <module>jeeplus-ccpm</module>
+        <module>jeeplus-consult</module>
     </modules>
 
 </project>