Pārlūkot izejas kodu

评估报销迁移

lizhenhao 2 gadi atpakaļ
vecāks
revīzija
721448a6e2
38 mainītis faili ar 3178 papildinājumiem un 0 dzēšanām
  1. 10 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java
  2. 12 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java
  3. 10 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/domain/Office.java
  4. 10 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/OfficeDTO.java
  5. 155 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/controller/ReimbursementInfoController.java
  6. 44 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementAmountInfo.java
  7. 88 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfo.java
  8. 96 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoContract.java
  9. 100 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoOther.java
  10. 95 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoProcured.java
  11. 68 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementInfo.java
  12. 7 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementAmountInfoMapper.java
  13. 17 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoContractMapper.java
  14. 7 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoMapper.java
  15. 17 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoOtherMapper.java
  16. 17 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoProcuredMapper.java
  17. 41 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java
  18. 34 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementDetailInfoContractMapper.xml
  19. 39 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementDetailInfoOtherMapper.xml
  20. 39 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementDetailInfoProcuredMapper.xml
  21. 315 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml
  22. 846 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java
  23. 58 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/QueryListDto.java
  24. 73 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoContractDTO.java
  25. 81 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoDTO.java
  26. 93 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoOtherDTO.java
  27. 93 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoProcuredDTO.java
  28. 124 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/RetureListDto.java
  29. 19 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/TreeUserDto.java
  30. 89 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/controller/ReimbursementTypeController.java
  31. 81 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/domain/ReimbursementTypeInfo.java
  32. 21 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/mapper/ReimbursementTypeMapper.java
  33. 35 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/mapper/xml/ReimbursementTypeMapper.xml
  34. 126 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/service/ReimbursementTypeForTreeDataService.java
  35. 133 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/service/ReimbursementTypeService.java
  36. 17 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/service/dto/ReimbursementTypeDto.java
  37. 11 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java
  38. 57 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

+ 10 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java

@@ -29,6 +29,16 @@ public class FlowableApiFallbackFactory implements FallbackFactory <IFlowableApi
             public String getCurrentTaskName(String processInstanceId) {
                 return null;
             }
+
+            @Override
+            public void auditByProcInsIdAndFlag(String procInsId, String flag, String assignee, String comm) {
+
+            }
+
+            @Override
+            public boolean checkIsLastTask(String procInsId) {
+                return false;
+            }
         };
     }
 }

+ 12 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java

@@ -29,4 +29,16 @@ public interface IFlowableApi {
     @GetMapping(value = "/flowable/task/getCurrentTaskName")
     String getCurrentTaskName(@RequestParam(value = "processInstanceId") String processInstanceId);
 
+    /**
+     * 审核通过或驳回
+     */
+    @GetMapping(value = "/flowable/task/auditByProcInsIdAndFlag")
+    void auditByProcInsIdAndFlag(@RequestParam(value = "procInsId")String procInsId,@RequestParam(value = "flag")String flag,
+                                 @RequestParam(value = "assignee")String assignee,@RequestParam(value = "comm")String comm);
+
+    /**
+     * 检查是否为最后一个审核节点
+     */
+    @GetMapping(value = "/flowable/task/checkIsLastTask")
+    boolean checkIsLastTask(@RequestParam(value = "procInsId")String procInsId);
 }

+ 10 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/domain/Office.java

@@ -82,6 +82,16 @@ public class Office extends TreeEntity <Office> {
     private String remarks;
 
     /**
+     * 0为私有,1为公有
+     */
+    private String isPublic;
+
+    /**
+     * 分管领导
+     */
+    private String administrator;
+
+    /**
      * 构造函数
      */
     public Office() {

+ 10 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/OfficeDTO.java

@@ -91,6 +91,16 @@ public class OfficeDTO extends TreeDTO <OfficeDTO> {
     private String remarks;
 
     /**
+     * 0为私有,1为公有
+     */
+    private String isPublic;
+
+    /**
+     * 分管领导
+     */
+    private String administrator;
+
+    /**
      * 子部门
      */
     private List <String> childDeptList;

+ 155 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/controller/ReimbursementInfoController.java

@@ -0,0 +1,155 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.ExportMode;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo;
+import com.jeeplus.assess.program.configuration.projectList.service.dto.ExportFileDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementInfo;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.ReimbursementInfoService;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.QueryListDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.SaveInfoDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto;
+import com.jeeplus.core.excel.EasyPoiUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+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.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@RestController
+@Api(tags ="报销申请")
+@RequestMapping(value = "/reimbursement/info")
+public class ReimbursementInfoController {
+
+    @Resource
+    private ReimbursementInfoService service;
+
+    /**
+     * 列表查询
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<IPage<RetureListDto>> list(Page<RetureListDto> page, QueryListDto dto) throws Exception{
+        IPage<RetureListDto> iPage = service.list(page, dto);
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 新增/修改
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "新增、修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody SaveInfoDto dto) throws Exception{
+        ReimbursementInfo s = service.save(dto);
+        return ResponseUtil.newInstance().add("businessTable", "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<SaveInfoDto> findById(@RequestParam("id") String id) throws Exception{
+        SaveInfoDto 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 RetureListDto dto) {
+        service.updateStatusById(dto);
+    }
+
+    @ApiOperation(value = "用户树形")
+    @GetMapping(value = "/userTree")
+    public ResponseEntity<List<TreeUserDto>> userTree(@RequestParam String name) {
+        List<TreeUserDto> list = service.userTree(name);
+        return ResponseEntity.ok(list);
+    }
+
+
+    @ApiLog(value = "评估报销数据")
+    @GetMapping("exportFile")
+    @ApiOperation(value = "评估报销数据")
+    public void exportFile(QueryListDto cwDTO, Page <RetureListDto> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<RetureListDto> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = service.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);
+            result = service.list (page,cwDTO).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, RetureListDto.class, fileName, response );
+
+    }
+
+    @ApiOperation(value = "关联报销")
+    @GetMapping(value = "/relationReimbursementList")
+    public ResponseEntity<IPage<RetureListDto>> relationReimbursementList(Page<RetureListDto> page, @RequestParam("id") String id) {
+        IPage<RetureListDto> listDtoIPage = service.relationReimbursementList(page, id);
+        return ResponseEntity.ok(listDtoIPage);
+    }
+
+    @ApiOperation(value = "报销审核")
+    @PostMapping(value = "/auditFunc")
+    public Map<String,Object> auditFunc(@RequestBody SaveInfoDto saveInfoDto) {
+        Map<String, Object> res = service.auditFunc(saveInfoDto);
+        return res;
+    }
+
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/queryByProIds")
+    public ResponseEntity<List<ProgramProjectListInfo>> queryByProIds(String ids){
+        List<ProgramProjectListInfo> cwProjectRecords = service.queryByProIds(ids);
+        return ResponseEntity.ok(cwProjectRecords);
+    }
+}

+ 44 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementAmountInfo.java

@@ -0,0 +1,44 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.poi.hpsf.Decimal;
+
+import java.math.BigDecimal;
+
+@Data
+@TableName(value = "reimbursement_amount_info")
+public class ReimbursementAmountInfo extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 发票代码
+     */
+    private String code;
+
+    /**
+     * 发票编号
+     */
+    private String number;
+
+    /**
+     * 金额
+     */
+    private String amount;
+
+    /**
+     * 税额
+     */
+    private String taxAmount;
+
+    /**
+     * 价税合计
+     */
+    private String count;
+
+}

+ 88 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfo.java

@@ -0,0 +1,88 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.poi.hpsf.Decimal;
+
+import java.math.BigDecimal;
+
+@Data
+@TableName(value = "reimbursement_detail_info")
+public class ReimbursementDetailInfo 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;
+
+    /**
+     * 排序
+     */
+    private String sort;
+}

+ 96 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoContract.java

@@ -0,0 +1,96 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 评估-报销详情信息表
+ * @TableName reimbursement_detail_info_contract
+ */
+@TableName(value ="reimbursement_detail_info_contract")
+@Data
+public class ReimbursementDetailInfoContract extends BaseEntity implements Serializable {
+
+    /**
+     * 基础表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;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 100 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoOther.java

@@ -0,0 +1,100 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 评估-报销详情信息表
+ * @TableName reimbursement_detail_info_other
+ */
+@TableName(value ="reimbursement_detail_info_other")
+@Data
+public class ReimbursementDetailInfoOther extends BaseEntity implements Serializable {
+
+    /**
+     * 基础表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 projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 排序
+     */
+    private String sort;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 95 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoProcured.java

@@ -0,0 +1,95 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 评估-报销详情信息表
+ * @TableName reimbursement_detail_info_procured
+ */
+@TableName(value ="reimbursement_detail_info_procured")
+@Data
+public class ReimbursementDetailInfoProcured extends BaseEntity implements Serializable {
+
+    /**
+     * 基础表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 projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 68 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/domain/ReimbursementInfo.java

@@ -0,0 +1,68 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.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;
+
+@Data
+@TableName(value = "reimbursement_info")
+public class ReimbursementInfo 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;
+}

+ 7 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementAmountInfoMapper.java

@@ -0,0 +1,7 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementAmountInfo;
+
+public interface ReimbursementAmountInfoMapper extends BaseMapper<ReimbursementAmountInfo> {
+}

+ 17 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoContractMapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.mapper;
+
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoContract;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoContract
+ */
+@Mapper
+public interface ReimbursementDetailInfoContractMapper extends BaseMapper<ReimbursementDetailInfoContract> {
+
+}
+
+
+
+

+ 7 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoMapper.java

@@ -0,0 +1,7 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfo;
+
+public interface ReimbursementDetailInfoMapper extends BaseMapper<ReimbursementDetailInfo> {
+}

+ 17 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoOtherMapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.mapper;
+
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoOther;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoOther
+ */
+@Mapper
+public interface ReimbursementDetailInfoOtherMapper extends BaseMapper<ReimbursementDetailInfoOther> {
+
+}
+
+
+
+

+ 17 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementDetailInfoProcuredMapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.mapper;
+
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoProcured;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoProcured
+ */
+@Mapper
+public interface ReimbursementDetailInfoProcuredMapper extends BaseMapper<ReimbursementDetailInfoProcured> {
+
+}
+
+
+
+

+ 41 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java

@@ -0,0 +1,41 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.*;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {
+
+    IPage<RetureListDto> findList (Page<RetureListDto> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    List<WorkAttachmentDto> findFiles(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+
+    List<TreeUserDto> findOfficeList();
+
+    List<TreeUserDto> findUserList(@Param("name") String name);
+
+    List<RetureListDto> findExportList (@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    IPage<RetureListDto> relationReimbursementList (Page<RetureListDto> page, @Param("id") String id);
+
+    List<TreeUserDto> findOfficeListByUserName(String name);
+
+    List<ReimbursementDetailInfoContract> getContractDetailList(@Param("id") String id);
+
+    List<ReimbursementDetailInfoOther> getOtherDetailList(@Param("id") String id);
+
+    List<ReimbursementDetailInfoProcured> getProcuredDetailList(@Param("id") String id);
+
+    List<ReimbursementDetailInfo> getDetailList(@Param("id") String id);
+}

+ 34 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementDetailInfoContractMapper.xml

@@ -0,0 +1,34 @@
+<?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.assess.reimbursement.reimbursementInfo.mapper.ReimbursementDetailInfoContractMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.ReimbursementDetailInfoContractDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="infoId" column="info_id" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+            <result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
+            <result property="typeId" column="type_id" jdbcType="VARCHAR"/>
+            <result property="contractId" column="contract_id" jdbcType="VARCHAR"/>
+            <result property="reportNumber" column="report_number" jdbcType="VARCHAR"/>
+            <result property="number" column="number" jdbcType="VARCHAR"/>
+            <result property="receiptNumber" column="receipt_number" jdbcType="INTEGER"/>
+            <result property="days" column="days" jdbcType="INTEGER"/>
+            <result property="content" column="content" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,create_by,create_date,
+        update_by,update_date,del_flag,
+        info_id,user_id,dept_id,
+        type_id,contract_id,report_number,
+        number,receipt_number,days,
+        content
+    </sql>
+</mapper>

+ 39 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementDetailInfoOtherMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.assess.reimbursement.reimbursementInfo.mapper.ReimbursementDetailInfoOtherMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.ReimbursementDetailInfoOtherDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="infoId" column="info_id" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+            <result property="userName" column="user_name" jdbcType="VARCHAR"/>
+            <result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
+            <result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
+            <result property="typeId" column="type_id" jdbcType="VARCHAR"/>
+            <result property="typeName" column="type_name" jdbcType="VARCHAR"/>
+            <result property="projectId" column="project_id" jdbcType="VARCHAR"/>
+            <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
+            <result property="reportNumber" column="report_number" jdbcType="VARCHAR"/>
+            <result property="number" column="number" jdbcType="VARCHAR"/>
+            <result property="receiptNumber" column="receipt_number" jdbcType="INTEGER"/>
+            <result property="days" column="days" jdbcType="INTEGER"/>
+            <result property="content" column="content" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,create_by,create_date,
+        update_by,update_date,del_flag,
+        info_id,user_id,user_name,
+        dept_id,dept_name,type_id,
+        type_name,project_id,project_name,
+        report_number,number,receipt_number,
+        days,content
+    </sql>
+</mapper>

+ 39 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementDetailInfoProcuredMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.assess.reimbursement.reimbursementInfo.mapper.ReimbursementDetailInfoProcuredMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.ReimbursementDetailInfoProcuredDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="infoId" column="info_id" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+            <result property="userName" column="user_name" jdbcType="VARCHAR"/>
+            <result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
+            <result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
+            <result property="typeId" column="type_id" jdbcType="VARCHAR"/>
+            <result property="typeName" column="type_name" jdbcType="VARCHAR"/>
+            <result property="projectId" column="project_id" jdbcType="VARCHAR"/>
+            <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
+            <result property="reportNumber" column="report_number" jdbcType="VARCHAR"/>
+            <result property="number" column="number" jdbcType="VARCHAR"/>
+            <result property="receiptNumber" column="receipt_number" jdbcType="INTEGER"/>
+            <result property="days" column="days" jdbcType="INTEGER"/>
+            <result property="content" column="content" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,create_by,create_date,
+        update_by,update_date,del_flag,
+        info_id,user_id,user_name,
+        dept_id,dept_name,type_id,
+        type_name,project_id,project_name,
+        report_number,number,receipt_number,
+        days,content
+    </sql>
+</mapper>

+ 315 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml

@@ -0,0 +1,315 @@
+<?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.assess.reimbursement.reimbursementInfo.mapper.ReimbursementInfoMapper">
+
+	<select id="findList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto">
+		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 = 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 = 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 = 4 THEN b4.project_id
+									ELSE b5.project_id END) AS project_id,
+			(CASE
+			WHEN a.source_type = 1 THEN p.name
+			WHEN a.source_type = 2 THEN contr2.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 = 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 = 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 = 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 = 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 as create_id,
+			a.source_type,
+			a.purchase_id,
+			pru.purchase_no
+		FROM
+			reimbursement_info a
+
+			LEFT JOIN 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 program_project_list_info 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 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 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 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 program_project_list_info 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 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 program_project_list_info 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 =  c.id
+			left join sys_user_manage_office sumo on sumo.office_id = c.office_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_date DESC
+	</select>
+
+	<select id="findFiles" resultType="com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto">
+		SELECT
+			id,
+			url,
+			attachment_name AS `name`,
+			create_by AS `by`,
+			create_date
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+	</select>
+
+	<update id="updateStatusById">
+		UPDATE reimbursement_info SET type = #{type}
+	    WHERE id = #{id}
+	</update>
+
+	<select id="findOfficeList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT id,`name`,parent_id FROM sys_office WHERE del_flag = 0
+	</select>
+
+	<select id="findUserList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		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 and a.is_admin is null
+			<if test="name != null and name != ''">
+				and a.`name` LIKE CONCAT ('%', #{name}, '%')
+			</if>
+	</select>
+
+	<select id="findExportList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto">
+		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
+			reimbursement_info a
+			LEFT JOIN reimbursement_detail_info b ON a.id = b.info_id AND b.del_flag = 0
+			LEFT JOIN sys_user c ON a.create_by =  c.id
+			LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
+			${ew.customSqlSegment}
+		ORDER BY a.update_date DESC
+	</select>
+
+	<select id="relationReimbursementList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto">
+		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
+			reimbursement_info a
+			LEFT JOIN reimbursement_detail_info b ON a.id = b.info_id AND b.del_flag = 0
+			LEFT JOIN sys_user c ON a.create_by =  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_date DESC
+	</select>
+	<select id="findOfficeListByUserName"
+			resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT a.id,a.`name`,a.parent_id FROM sys_office a
+		LEFT JOIN sys_user b
+		on a.id = b.office_id
+		WHERE a.del_flag = 0 and b.name = #{name}
+	</select>
+
+	<select id="getContractDetailList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoContract">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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,
+		pg_type.name as type_name,
+		pg_contract.name as contract_name
+		from 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 pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
+		left join work_contract_info pg_contract on pg_contract.id = a.contract_id and pg_contract.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.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfo">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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,
+		pg_type.name as type_name,
+		pg_project.name as project_name
+		from 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 pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
+		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.sort+0 asc
+	</select>
+
+	<select id="getOtherDetailList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoOther">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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,
+		pg_type.name as type_name,
+		a.project_name as project_name
+		from 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 pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
+		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.sort+0 asc
+	</select>
+
+	<select id="getProcuredDetailList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoProcured">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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,
+		pg_type.name as type_name,
+		a.project_name as project_name
+		from 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 pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
+		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+</mapper>

+ 846 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java

@@ -0,0 +1,846 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+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.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.sys.domain.Office;
+import com.jeeplus.sys.mapper.OfficeMapper;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.DictUtils;
+import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.pubmodules.serialNumTpl.service.SerialnumTplService;
+import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
+import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
+import com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo;
+import com.jeeplus.assess.program.configuration.projectList.domain.ProgramReportNo;
+import com.jeeplus.assess.program.configuration.projectList.mapper.ProgramReportNoMapper;
+import com.jeeplus.assess.program.configuration.projectList.mapper.ProjectListMapper;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.domain.*;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.mapper.*;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.QueryListDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.SaveInfoDto;
+import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto;
+import com.jeeplus.assess.workContract.service.WorkContractService;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.assess.workContract.service.dto.WorkContractInfoDto;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class ReimbursementInfoService {
+
+    @Resource
+    private ReimbursementInfoMapper infoMapper;
+
+    @Resource
+    private ReimbursementDetailInfoMapper detailInfoMapper;
+
+    @Resource
+    private ReimbursementAmountInfoMapper amountInfoMapper;
+
+    @Resource
+    private OssServiceMapper ossServiceMapper;
+
+    @Resource
+    private SerialnumTplService serialnumTplService;
+
+    @Resource
+    private WorkContractService workContractService;
+
+    @Autowired
+    private OfficeMapper officeMapper;
+
+    @Autowired
+    private ReimbursementDetailInfoContractMapper reimbursementDetailInfoContractMapper;
+
+    @Autowired
+    private ReimbursementDetailInfoOtherMapper reimbursementDetailInfoOtherMapper;
+
+    @Autowired
+    private ReimbursementDetailInfoProcuredMapper reimbursementDetailInfoProcuredMapper;
+
+    @Resource
+    private IFlowableApi flowTaskService;
+
+    @Autowired
+    private IFlowableApi taskService;
+
+    @Resource
+    private ProjectListMapper projectListMapper;
+
+    @Resource
+    private ProgramReportNoMapper programReportNoMapper;
+    /**
+     * 列表查询
+     */
+    public IPage<RetureListDto> list(Page<RetureListDto> page , QueryListDto dto) throws Exception{
+        QueryWrapper<QueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, QueryListDto.class);
+        /**
+         * a表是reimbursementInfo
+         * b表是reimbursementDetailInfo
+         * c表是sysUser
+         */
+        queryWrapper.eq("a.del_flag", 0);
+        // 报销项目
+        if (StringUtils.isNotEmpty(dto.getProject())) {
+            queryWrapper.apply("(b.project_id LIKE {0} OR b.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 = {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("( 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("( 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(" (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("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("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("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());
+        }
+        IPage<RetureListDto> pageList = infoMapper.findList(page, queryWrapper);
+        pageList.getRecords().stream().forEach(item -> {
+            // 报销申请
+            if (StringUtils.isNotBlank(item.getTaskId()) && StringUtils.isNotBlank(item.getType())) {
+                if ("2".equals(item.getType())) { // “审核中”的数据要获取数据审核人
+                    item.setAuditUserIds(flowTaskService.getTaskAuditUsers(item.getTaskId()));  // 获取数据审核人
+                }
+            }
+            if (StringUtils.isNotBlank(item.getSourceType()) && "1".equals(item.getSourceType())) { //项目报销
+                if (StringUtils.isNotBlank(item.getProjectId())) {
+                    String proName = selectProjectByIds(item.getProjectId());
+                    item.setProjectName(proName);
+                    String reportNo = selectReportNoByIds(item.getProjectId());
+                    item.setReportNumber(reportNo);
+                }
+            }
+        });
+        return pageList;
+    }
+
+    /**
+     * 根据项目id查询项目名称
+     * @param ids 以逗号分隔的多个项目id字符串
+     * @return
+     */
+    public String selectProjectByIds(String ids) {
+        String projectName = "";
+        String[] split = ids.split(",");
+        List<String> idList = Arrays.asList(split);
+        List<ProgramProjectListInfo> list = projectListMapper.selectList(new LambdaQueryWrapper<ProgramProjectListInfo>().in(ProgramProjectListInfo::getId, idList));
+        if (CollectionUtil.isNotEmpty(list)) {
+            projectName = list.stream().map(ProgramProjectListInfo::getName).collect(Collectors.joining(","));
+        }
+        return projectName;
+    }
+
+    /**
+     * 根据项目id查询报告号
+     * @param ids 以逗号分隔的多个项目id字符串
+     * @return
+     */
+    public String selectReportNoByIds(String ids) {
+        List<String> reportNoList = new ArrayList<>();
+        String reportNo = "";
+        String[] split = ids.split(",");
+        List<String> idList = Arrays.asList(split);
+        List<ProgramProjectListInfo> list = projectListMapper.selectList(new LambdaQueryWrapper<ProgramProjectListInfo>().in(ProgramProjectListInfo::getId, idList));
+        if (CollectionUtil.isNotEmpty(list)) {
+            list.stream().forEach(item -> {
+                ProgramReportNo programReportNo = programReportNoMapper.selectOne(new LambdaQueryWrapper<ProgramReportNo>().eq(ProgramReportNo::getProgramId, item.getId()));
+                if (ObjectUtil.isNotEmpty(programReportNo) && StringUtils.isNotBlank(programReportNo.getReportNo())) {
+                    reportNoList.add(programReportNo.getReportNo());
+                } else {
+                    reportNoList.add("无");
+                }
+            });
+            if (CollectionUtil.isNotEmpty(reportNoList)) {
+                reportNo = reportNoList.stream().collect(Collectors.joining(","));
+            }
+        }
+        return reportNo;
+    }
+
+    public ReimbursementInfo save(SaveInfoDto dto) throws Exception{
+        // 获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto, userDTO);
+        } else {
+            return add(dto, userDTO);
+        }
+    }
+
+    public ReimbursementInfo add(SaveInfoDto dto, UserDTO userDTO) throws Exception{
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        // 生成编号
+        String no = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), dto.BIZ_CODE);
+        // 保存基础信息表信息
+        ReimbursementInfo info = new ReimbursementInfo();
+        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())) {
+            int i = 0;
+            for (ReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                detailInfo.setSort(String.valueOf(i));
+                detailInfoMapper.insert(detailInfo);
+                i++;
+            }
+        }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (ReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                reimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            int i = 0;
+            for (ReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                detailInfo.setSort(String.valueOf(i));
+                reimbursementDetailInfoOtherMapper.insert(detailInfo);
+                i++;
+            }
+        }
+        // 保存采购报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
+            for (ReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                reimbursementDetailInfoProcuredMapper.insert(detailInfo);
+            }
+        }
+        // 保存专用发票列表信息
+        if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
+            for (ReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
+                // 生成id
+                String amountId = UUID.randomUUID().toString().replace("-", "");
+                amountInfo.setId(amountId);
+                amountInfo.setCreateById(userDTO.getId());
+                amountInfo.setCreateTime(new Date());
+                amountInfo.setUpdateById(userDTO.getId());
+                amountInfo.setUpdateTime(new Date());
+                amountInfo.setDelFlag(0);
+                // 保存基础表信息主键值
+                amountInfo.setInfoId(id);
+                amountInfoMapper.insert(amountInfo);
+            }
+        }
+        // 保存附件列表信息
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            workContractService.saveFiles(dto.getFiles(), userDTO, id);
+        }
+        return info;
+    }
+
+    public ReimbursementInfo update(SaveInfoDto dto, UserDTO userDTO) {
+        // 修改基础信息
+        ReimbursementInfo info = new ReimbursementInfo();
+        BeanUtils.copyProperties(dto, info);
+        info.setUpdateById(userDTO.getId());
+        info.setUpdateTime(new Date());
+        infoMapper.updateById(info);
+        // 修改报销详情列表信息
+        // 删除原有数据
+        LambdaQueryWrapper<ReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(ReimbursementDetailInfo::getInfoId, dto.getId());
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<ReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(ReimbursementDetailInfoContract::getInfoId, dto.getId());
+        reimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除其他报销表
+        LambdaQueryWrapper<ReimbursementDetailInfoOther> detailWrapperOthers = new LambdaQueryWrapper<>();
+        detailWrapperOthers.eq(ReimbursementDetailInfoOther::getInfoId, dto.getId());
+        reimbursementDetailInfoOtherMapper.delete(detailWrapperOthers);
+        // 删除采购报销表
+        LambdaQueryWrapper<ReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
+        detailWrapperProcured.eq(ReimbursementDetailInfoProcured::getInfoId, dto.getId());
+        reimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+
+        // 保存项目详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
+            int i = 0;
+            for (ReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                detailInfo.setSort(String.valueOf(i));
+                detailInfoMapper.insert(detailInfo);
+                i++;
+            }
+        }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (ReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                reimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            int i = 0;
+            for (ReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                detailInfo.setSort(String.valueOf(i));
+                reimbursementDetailInfoOtherMapper.insert(detailInfo);
+                i++;
+            }
+        }
+        // 保存采购报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
+            for (ReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                reimbursementDetailInfoProcuredMapper.insert(detailInfo);
+            }
+        }
+        // 修改专用发票信息列表
+        // 删除原有数据
+        LambdaQueryWrapper<ReimbursementAmountInfo> amountWrapper = new LambdaQueryWrapper<>();
+        amountWrapper.eq(ReimbursementAmountInfo::getInfoId, dto.getId());
+        amountInfoMapper.delete(amountWrapper);
+        if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
+            for (ReimbursementAmountInfo 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())) {
+            workContractService.updateFiles(dto.getFiles(), userDTO, dto.getId());
+        }
+        return info;
+    }
+
+    public String remove(String id) {
+        // 删除基础信息表
+        infoMapper.deleteById(id);
+        // 删除详情列表
+        LambdaQueryWrapper<ReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(ReimbursementDetailInfo::getInfoId, id);
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<ReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(ReimbursementDetailInfoContract::getInfoId, id);
+        reimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除其他报销列表
+        LambdaQueryWrapper<ReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
+        detailWrapperOther.eq(ReimbursementDetailInfoOther::getInfoId, id);
+        reimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        // 删除采购报销列表
+        LambdaQueryWrapper<ReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
+        detailWrapperProcured.eq(ReimbursementDetailInfoProcured::getInfoId, id);
+        reimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        // 删除专用发票信息列表
+        LambdaQueryWrapper<ReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        amountInfoLambdaQueryWrapper.eq(ReimbursementAmountInfo::getInfoId, id);
+        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
+        // 删除附件信息
+        LambdaQueryWrapper<WorkAttachment> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(WorkAttachment::getAttachmentId, id);
+        ossServiceMapper.delete(wrapper);
+        return "操作成功";
+    }
+
+    public SaveInfoDto findById(String id) {
+        SaveInfoDto dto = new SaveInfoDto();
+        // 查询基础信息表
+        ReimbursementInfo info = infoMapper.selectById(id);
+        if (ObjectUtil.isNotEmpty(info)){
+            BeanUtils.copyProperties(info, dto);
+            if(StringUtils.isNotBlank(info.getDepartment())) {
+                Office byId = officeMapper.selectById(info.getDepartment());
+                if (ObjectUtil.isNotEmpty(byId)) {
+                    dto.setDepartmentName(byId.getName());
+                }
+            }
+            // 项目报销详情
+            List<ReimbursementDetailInfo> detailList = infoMapper.getDetailList(id);
+            detailList.stream().forEach(projectDetail -> {
+                if (StringUtils.isNotBlank(projectDetail.getProjectId())) {
+                    String proName = selectProjectByIds(projectDetail.getProjectId());
+                    projectDetail.setProjectName(proName);
+                    String reportNo = selectReportNoByIds(projectDetail.getProjectId());
+                    projectDetail.setReportNumber(reportNo);
+                } else {
+                    projectDetail.setProjectName("");
+                    projectDetail.setReportNumber("");
+                }
+            });
+            dto.setDetailInfos(detailList);
+            // 合同报销详情
+            dto.setDetailInfoContracts(infoMapper.getContractDetailList(id));
+            // 其他报销
+            dto.setDetailInfoOthers(infoMapper.getOtherDetailList(id));
+            // 采购报销
+            dto.setDetailInfoProcured(infoMapper.getProcuredDetailList(id));
+            // 查询专用发票信息列表
+            LambdaQueryWrapper<ReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            amountInfoLambdaQueryWrapper.eq(ReimbursementAmountInfo::getInfoId, id);
+            List<ReimbursementAmountInfo> amountInfos = amountInfoMapper.selectList(amountInfoLambdaQueryWrapper);
+            dto.setAmountInfos(amountInfos);
+            // 查询附件信息
+            List<WorkAttachmentDto> files = infoMapper.findFiles(id);
+            if (CollectionUtils.isNotEmpty(files)) {
+                for (WorkAttachmentDto i : files) {
+                    i.setCreateBy(UserUtils.get(i.getBy()));
+                }
+            }
+            dto.setFiles(files);
+        }
+        return dto;
+    }
+
+    public Boolean checkNumber(String number) {
+        LambdaQueryWrapper<ReimbursementAmountInfo> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ReimbursementAmountInfo::getNumber, number);
+        List<ReimbursementAmountInfo> infos = amountInfoMapper.selectList(wrapper);
+        if (CollectionUtils.isNotEmpty(infos)) {
+            return true;
+        }
+        return false;
+    }
+
+    public void updateStatusById(RetureListDto dto) {
+        infoMapper.updateStatusById(dto.getId(), dto.getType());
+    }
+
+    //用户树形
+    public List<TreeUserDto> userTree(String name) {
+        List<TreeUserDto> list = new ArrayList<>();
+        // 查询部门
+        List<TreeUserDto> officeList = infoMapper.findOfficeList();
+        List<TreeUserDto> filterList = new ArrayList<>();
+        if (UserUtils.getCurrentUserDTO ().isAdmin ()) {
+            filterList = officeList;
+        } else {
+            String parentIds = officeMapper.selectById(UserUtils.getCurrentUserDTO().getOfficeDTO().getId()).getParentIds();
+            String[] split = parentIds.split(",");
+            if(split.length>2){
+                // 公司id
+                String companyId = split[2];
+                // 过滤出登录人所属公司和集团
+                List<TreeUserDto> finalFilterList5 = filterList;
+                officeList.stream().forEach(o -> {
+                    if (split[2].equals(o.getId())) {
+                        finalFilterList5.add(o);
+                    } else if(split[1].equals(o.getId())) {
+                        finalFilterList5.add(o);
+                    }
+                });
+                // 根据公司id找到其下部门
+                List<Office> oList = officeMapper.selectList(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
+                // 过滤出这些部门
+                List<TreeUserDto> finalFilterList4 = filterList;
+                oList.stream().forEach(item -> {
+                    officeList.stream().forEach(o -> {
+                        if (item.getId().equals(o.getId())) {
+                            finalFilterList4.add(o);
+                        }
+                    });
+                });
+                // 找到所有的公有部门
+                List<Office> publicOfficeList = officeMapper.selectList(new QueryWrapper<Office>().lambda().eq(Office::getIsPublic, "1"));
+                // 过滤出这些部门
+                List<TreeUserDto> finalFilterList3 = filterList;
+                publicOfficeList.stream().forEach(item -> {
+                    officeList.stream().forEach(o -> {
+                        if (item.getId().equals(o.getId())) {
+                            finalFilterList3.add(o);
+                        }
+                    });
+                });
+            }else{
+                // 私有的
+                if ("0".equals(UserUtils.getCurrentUserDTO().getOfficeDTO().getIsPublic())) {
+                    // 公司id
+                    String companyId = UserUtils.getCurrentUserDTO().getOfficeDTO().getId();
+                    // 过滤出登录人所属公司和集团
+                    List<TreeUserDto> finalFilterList2 = filterList;
+                    officeList.stream().forEach(o -> {
+                        if (companyId.equals(o.getId())) {
+                            finalFilterList2.add(o);
+                        } else if(split[1].equals(o.getId()) && !split[1].equals(companyId)) {
+                            finalFilterList2.add(o);
+                        }
+                    });
+                    // 根据公司id找到其下部门
+                    List<Office> oList = officeMapper.selectList(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
+                    // 过滤出这些部门
+                    List<TreeUserDto> finalFilterList1 = filterList;
+                    oList.stream().forEach(item -> {
+                        officeList.stream().forEach(o -> {
+                            if (item.getId().equals(o.getId())) {
+                                finalFilterList1.add(o);
+                            }
+                        });
+                    });
+                    // 找到所有的公有部门
+                    List<Office> publicOfficeList = officeMapper.selectList(new QueryWrapper<Office>().lambda().eq(Office::getIsPublic, "1"));
+                    // 过滤出这些部门
+                    List<TreeUserDto> finalFilterList = filterList;
+                    publicOfficeList.stream().forEach(item -> {
+                        officeList.stream().forEach(o -> {
+                            if (item.getId().equals(o.getId())) {
+                                finalFilterList.add(o);
+                            }
+                        });
+                    });
+                } else {
+                    filterList = officeList;
+                }
+            }
+        }
+
+        /*if (CollectionUtils.isNotEmpty(officeList)) {
+            list.addAll(officeList);
+        }*/
+
+        // 查询用户
+        List<TreeUserDto> userList = infoMapper.findUserList(name);
+        /*if (CollectionUtils.isNotEmpty(userList)) {
+            list.addAll(userList);
+        }*/
+        list = disposeUserTree(userList, filterList);
+        for (TreeUserDto officeDto : officeList) {
+            if("0".equals(officeDto.getParentId())){
+                list.add(officeDto);
+            }
+        }
+        //去重
+        List<TreeUserDto> newList = list.stream().collect(Collectors.collectingAndThen(
+                Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TreeUserDto::getId))), ArrayList::new)
+        );
+        return newList;
+    }
+
+    /**
+     * 用户树形数据处理
+     * @param userList
+     * @param officeList
+     * @return
+     */
+    public List<TreeUserDto> disposeUserTree(List<TreeUserDto> userList, List<TreeUserDto> officeList){
+        List<TreeUserDto> list = new ArrayList<>();
+        for (TreeUserDto userDto : userList) {
+
+            for (TreeUserDto officeDto : officeList) {
+                if(userDto.getParentId().equals(officeDto.getId())){
+                    list.add(officeDto);
+                    list.add(userDto);
+                    List<TreeUserDto> treeUserDtos = disposeOfficeTree(officeDto, officeList);
+                    if(null!= treeUserDtos && treeUserDtos.size()>0){
+                        list.addAll(treeUserDtos);
+                    }
+                }
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 用户树形数据处理
+     * @param officeInfo
+     * @param officeList
+     * @return
+     */
+    public List<TreeUserDto> disposeOfficeTree(TreeUserDto officeInfo, List<TreeUserDto> officeList){
+        List<TreeUserDto> listAll = Lists.newArrayList();
+            for (TreeUserDto officeDto : officeList) {
+                if(officeInfo.getParentId().equals(officeDto.getId())){
+                    listAll.add(officeDto);
+                    disposeOfficeTree(officeDto,officeList);
+                }
+            }
+        return listAll;
+    }
+
+    /**
+     * 下载列表查询
+     */
+    public List<RetureListDto> exportList(QueryListDto dto) throws Exception{
+        QueryWrapper<QueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, QueryListDto.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("(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 = {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("( 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("( 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(" (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("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("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("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<RetureListDto> exportList = infoMapper.findExportList(queryWrapper);
+        if (CollectionUtils.isNotEmpty(exportList)) {
+            for (RetureListDto retureListDto : exportList) {
+                if ("1".equals(retureListDto.getType())) {
+                    retureListDto.setType("暂存");
+                }
+                if ("2".equals(retureListDto.getType())) {
+                    retureListDto.setType("审批中");
+                }
+                if ("3".equals(retureListDto.getType())) {
+                    retureListDto.setType("撤回");
+                }
+                if ("4".equals(retureListDto.getType())) {
+                    retureListDto.setType("驳回");
+                }
+                if ("5".equals(retureListDto.getType())) {
+                    retureListDto.setType("已完成");
+                }
+                if (StringUtils.isNotBlank(retureListDto.getSourceType())) {
+                    if ("2".equals(retureListDto.getSourceType())) {
+                        retureListDto.setContractName(retureListDto.getProjectName());
+                        retureListDto.setProjectName("");
+                    }
+                    retureListDto.setSourceType(DictUtils.getDictLabel(retureListDto.getSourceType(),"pg_reimbursement_source_type",""));
+                }
+            }
+        }
+        return exportList;
+    }
+
+    /**
+     * 关联报销
+     */
+    public IPage<RetureListDto> relationReimbursementList(Page<RetureListDto> page, String id) {
+        IPage<RetureListDto> iPage = infoMapper.relationReimbursementList(page, id);
+        return iPage;
+    }
+
+    /**
+     * 报销审核
+     * @param saveInfoDto
+     * @return
+     */
+    public Map<String,Object> auditFunc(SaveInfoDto saveInfoDto) {
+        Map<String,Object> result = new HashMap<>();
+        result.put("success", "false");
+        result.put("message", "操作失败");
+        if (Objects.nonNull(saveInfoDto) && StringUtils.isNotBlank(saveInfoDto.getId()) && StringUtils.isNotBlank(saveInfoDto.getFlag())) {
+            String id = saveInfoDto.getId(); // 报销数据id
+            String flag = saveInfoDto.getFlag(); // 审核标记  yes通过  no驳回
+            SaveInfoDto reim = this.findById(id);
+            if (Objects.nonNull(reim) && StringUtils.isNotBlank(reim.getType()) && "2".equals(reim.getType())) { // 确保当时数据处于“待审核”状态
+                if ( StringUtils.isNotBlank(reim.getProcInsId())) {
+                    try {
+                        RetureListDto upStatusParam = new RetureListDto();
+                        upStatusParam.setId(id);
+                        if ("yes".equals(flag)) {
+                            boolean b = flowTaskService.checkIsLastTask(reim.getProcInsId());
+                            // b为true则审核节点为最后一个审核节点
+                            if (b) {
+                                // 当前审核节点为最后节点
+                                upStatusParam.setType("5"); // 审核状态设置为审核完成
+                            } else {
+                                upStatusParam.setType("2");
+                            }
+                        } else {
+                            upStatusParam.setType("4"); // 审核状态设置为审核驳回
+                        }
+                        this.updateStatusById(upStatusParam); // 修改数据的审核状态
+                        flowTaskService.auditByProcInsIdAndFlag(reim.getProcInsId(), flag, null, saveInfoDto.getComment()); // 审核操作
+                        result.put("success", "false");
+                        result.put("message", "操作成功");
+                    }catch (Exception e) {
+                        e.printStackTrace();
+                        result.put("success", "false");
+                        result.put("message", "操作失败");
+                    }
+                }
+            } else {
+                result.put("success", "false");
+                result.put("message", "操作失败,数据已发生改变或不存在,请刷新数据");
+            }
+        }
+        return result;
+    }
+
+    public List<ProgramProjectListInfo> queryByProIds(String ids) {
+        String[] split = ids.split(",");
+        List<String> idList = Arrays.asList(split);
+        List<ProgramProjectListInfo> list = projectListMapper.selectList(new LambdaQueryWrapper<ProgramProjectListInfo>().in(ProgramProjectListInfo::getId, idList));
+        if (CollectionUtil.isNotEmpty(list)) {
+            list.stream().forEach(item -> {
+                ProgramReportNo programReportNo = programReportNoMapper.selectOne(new LambdaQueryWrapper<ProgramReportNo>().eq(ProgramReportNo::getProgramId, item.getId()));
+                if (ObjectUtil.isNotEmpty(programReportNo) && StringUtils.isNotBlank(programReportNo.getReportNo())) {
+                    item.setReportNo(programReportNo.getReportNo());
+                } else {
+                    item.setReportNo("无");
+                }
+            });
+        }
+
+        return list;
+    }
+}

+ 58 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/QueryListDto.java

@@ -0,0 +1,58 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+public class QueryListDto 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;
+}

+ 73 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoContractDTO.java

@@ -0,0 +1,73 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 评估-报销详情信息表
+ * @TableName reimbursement_detail_info_contract
+ */
+@TableName(value ="reimbursement_detail_info_contract")
+@Data
+public class ReimbursementDetailInfoContractDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 基础表id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销合同
+     */
+    private String contractId;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 81 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoDTO.java

@@ -0,0 +1,81 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+@Data
+@TableName(value = "reimbursement_detail_info")
+public class ReimbursementDetailInfoDTO extends BaseDTO {
+
+    /**
+     * 关联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;
+}

+ 93 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoOtherDTO.java

@@ -0,0 +1,93 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 评估-报销详情信息表
+ * @TableName reimbursement_detail_info_other
+ */
+@TableName(value ="reimbursement_detail_info_other")
+@Data
+public class ReimbursementDetailInfoOtherDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 基础表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;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 93 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/ReimbursementDetailInfoProcuredDTO.java

@@ -0,0 +1,93 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 评估-报销详情信息表
+ * @TableName reimbursement_detail_info_procured
+ */
+@TableName(value ="reimbursement_detail_info_procured")
+@Data
+public class ReimbursementDetailInfoProcuredDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 基础表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;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 124 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/RetureListDto.java

@@ -0,0 +1,124 @@
+package com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.poi.hpsf.Decimal;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class RetureListDto {
+
+    /**
+     * 基础表主键值
+     */
+    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;
+
+    /**
+     * 报销合同
+     */
+    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;
+
+    @Excel(name = "报销类型", width = 30, orderNum = "2",dict = "pg_reimbursement_source_type")
+    private String sourceType;
+
+    private String taskId;
+
+    /**
+     * 创建人id
+     */
+    private String createId;
+
+    private String purchaseNo;
+
+    private String purchaseId;
+
+    /**
+     * 数据审核人  报销
+     */
+    private List<String> auditUserIds;
+}

+ 19 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/TreeUserDto.java

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

+ 89 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/controller/ReimbursementTypeController.java

@@ -0,0 +1,89 @@
+package com.jeeplus.assess.reimbursement.reimbursementType.controller;
+
+import com.jeeplus.assess.reimbursement.reimbursementType.domain.ReimbursementTypeInfo;
+import com.jeeplus.assess.reimbursement.reimbursementType.mapper.ReimbursementTypeMapper;
+import com.jeeplus.assess.reimbursement.reimbursementType.service.ReimbursementTypeForTreeDataService;
+import com.jeeplus.assess.reimbursement.reimbursementType.service.ReimbursementTypeService;
+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;
+
+@RestController
+@Api(tags ="报销类型管理")
+@RequestMapping(value = "/reimbursement/type")
+public class ReimbursementTypeController {
+
+    @Resource
+    private ReimbursementTypeService service;
+
+    @Resource
+    private ReimbursementTypeForTreeDataService treeService;
+
+    @Resource
+    private ReimbursementTypeMapper mapper;
+
+    /**
+     * 列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<List<ReimbursementTypeInfo>> list(ReimbursementTypeInfo info) {
+        List<ReimbursementTypeInfo> list = service.list(info);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 新增/修改
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "新增/修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody ReimbursementTypeInfo info) {
+        String s = service.save(info);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping("/findById")
+    public ResponseEntity<ReimbursementTypeInfo> findById(String id) {
+        ReimbursementTypeInfo 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<ReimbursementTypeInfo>> treeData(@RequestParam(required = false) String extId, @RequestParam(required = false) String type) throws Exception{
+        List<ReimbursementTypeInfo> infos = treeService.treeDataForType(extId, type);
+        return ResponseEntity.ok(infos);
+    }
+
+}

+ 81 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/domain/ReimbursementTypeInfo.java

@@ -0,0 +1,81 @@
+package com.jeeplus.assess.reimbursement.reimbursementType.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.domain.TreeEntity;
+import com.jeeplus.core.query.Query;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@TableName(value = "reimbursement_type_info")
+public class ReimbursementTypeInfo extends TreeEntity<ReimbursementTypeInfo> {
+
+    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;
+}

+ 21 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/mapper/ReimbursementTypeMapper.java

@@ -0,0 +1,21 @@
+package com.jeeplus.assess.reimbursement.reimbursementType.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.core.domain.TreeMapper;
+import com.jeeplus.assess.reimbursement.reimbursementType.domain.ReimbursementTypeInfo;
+import org.apache.ibatis.annotations.Param;
+
+public interface ReimbursementTypeMapper extends BaseMapper<ReimbursementTypeInfo>, TreeMapper<ReimbursementTypeInfo> {
+
+    /**
+     * 根据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);
+}

+ 35 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/mapper/xml/ReimbursementTypeMapper.xml

@@ -0,0 +1,35 @@
+<?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.assess.reimbursement.reimbursementType.mapper.ReimbursementTypeMapper">
+
+	<select id="checkNameIsExist" resultType="java.lang.Integer">
+		SELECT
+			COUNT( 0 )
+		FROM
+			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
+			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
+			reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND id = #{parentId}
+	</select>
+</mapper>

+ 126 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/service/ReimbursementTypeForTreeDataService.java

@@ -0,0 +1,126 @@
+package com.jeeplus.assess.reimbursement.reimbursementType.service;
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.core.service.TreeService;
+import com.jeeplus.core.service.dto.TreeDTO;
+import com.jeeplus.assess.reimbursement.reimbursementType.domain.ReimbursementTypeInfo;
+import com.jeeplus.assess.reimbursement.reimbursementType.mapper.ReimbursementTypeMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class ReimbursementTypeForTreeDataService extends TreeService<ReimbursementTypeMapper, ReimbursementTypeInfo> {
+
+    @Resource
+    private ReimbursementTypeMapper typeMapper;
+
+    /**
+     * 获取JSON树形数据。
+     *
+     * @param extId 排除的ID
+     * @param type 禁选类型
+     * @return
+     */
+    public List<ReimbursementTypeInfo> treeDataForType(String extId, String type) throws Exception{
+        List <ReimbursementTypeInfo> allList = super.list (new LambdaQueryWrapper<>( (Class <ReimbursementTypeInfo>) entityClass ).orderByAsc ( ReimbursementTypeInfo::getSort ));
+        ReimbursementTypeInfo root = entityClass.getConstructor ( ).newInstance ( );
+        root.setId ( TreeDTO.getRootId () );
+        List <ReimbursementTypeInfo> 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 <ReimbursementTypeInfo> formatListToTreeForType (ReimbursementTypeInfo root, List <ReimbursementTypeInfo> allList, String extId, String type) {
+        String rootId = root.getId ( );
+        // 最终的树形态
+        List <ReimbursementTypeInfo> trees = Lists.newArrayList ( );
+
+        // 把需要构造树的所有列表, 根据以父id作为key, 整理为列表
+        Map<String, List <ReimbursementTypeInfo>> treeMap = Maps.newHashMap ( );
+        for (ReimbursementTypeInfo entity : allList) {
+            List <ReimbursementTypeInfo> 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 <ReimbursementTypeInfo> children = treeMap.get ( rootId );
+        for (ReimbursementTypeInfo 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(ReimbursementTypeInfo parent, Map <String, List <ReimbursementTypeInfo>> treeMap) {
+        List <ReimbursementTypeInfo> children = treeMap.get ( parent.getId ( ) );
+        parent.setChildren ( children );
+        if ( children != null && !children.isEmpty ( ) ) {
+            for (ReimbursementTypeInfo child : children) {
+                formatFillChildren ( child, treeMap );
+            }
+        }
+    }
+
+}

+ 133 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/service/ReimbursementTypeService.java

@@ -0,0 +1,133 @@
+package com.jeeplus.assess.reimbursement.reimbursementType.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.assess.reimbursement.reimbursementType.domain.ReimbursementTypeInfo;
+import com.jeeplus.assess.reimbursement.reimbursementType.mapper.ReimbursementTypeMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+@Service
+public class ReimbursementTypeService {
+
+    @Resource
+    private ReimbursementTypeMapper mapper;
+
+    public List<ReimbursementTypeInfo> list(ReimbursementTypeInfo info) {
+        LambdaQueryWrapper<ReimbursementTypeInfo> wrapper = new LambdaQueryWrapper<>();
+        if (StringUtils.isNotEmpty(info.getName())) {
+            wrapper.like(ReimbursementTypeInfo::getName, info.getName());
+        }
+        if (info.getSort() != null) {
+            wrapper.like(ReimbursementTypeInfo::getSort, info.getSort());
+        }
+        wrapper.eq(BaseEntity::getDelFlag, 0);
+        wrapper.orderByAsc(ReimbursementTypeInfo::getSort);
+        return mapper.selectList(wrapper);
+    }
+
+    public String save(ReimbursementTypeInfo info) {
+        // parentId未传值,则表示一级菜单
+        if(StringUtils.isEmpty(info.getParentId())) {
+            info.setParentId("0");
+        }
+        // 判断名称是否已存在
+        Integer isExist = mapper.checkNameIsExist(info.getName(), info.getParentId());
+        if (isExist > 0) {
+            return "false";
+        }
+        // 保存数据
+        if (StringUtils.isNotEmpty(info.getId())) {
+            return update(info);
+        }
+        return add(info);
+    }
+
+    /**
+     * 新增
+     * @param info
+     * @return
+     */
+    public String add(ReimbursementTypeInfo info) {
+        // 获取当前登录人信息
+        UserDTO userDto = UserUtils.getCurrentUserDTO();
+        // 生成id值
+        String id = UUID.randomUUID().toString().replace("-", "");
+        info.setId(id);
+        info.setCreateBy(userDto.getId());
+        info.setCreateDate(new Date());
+        info.setUpdateBy(userDto.getId());
+        info.setUpdateDate(new Date());
+        info.setDelFlag(0);
+        // 生成序号/层级
+        getNo(info);
+        mapper.insert(info);
+        return "操作完成";
+    }
+
+    /**
+     * 修改
+     * @param info
+     * @return
+     */
+    public String update(ReimbursementTypeInfo info) {
+        // 获取当前登录人信息
+        UserDTO userDto = UserUtils.getCurrentUserDTO();
+        info.setUpdateBy(userDto.getId());
+        info.setUpdateDate(new Date());
+        mapper.updateById(info);
+        return "操作完成";
+    }
+
+    /**
+     * 生成序号/层级
+     * @param info
+     * @return
+     */
+    public ReimbursementTypeInfo getNo(ReimbursementTypeInfo info) {
+        ReimbursementTypeInfo parentInfo = null;
+        if (!"0".equals(info.getParentId())) {
+            //根据parentId查询父节点信息
+            LambdaQueryWrapper<ReimbursementTypeInfo> 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;
+    }
+}

+ 17 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementType/service/dto/ReimbursementTypeDto.java

@@ -0,0 +1,17 @@
+package com.jeeplus.assess.reimbursement.reimbursementType.service.dto;
+
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+public class ReimbursementTypeDto extends BaseEntity {
+
+    private String level;
+
+    private String name;
+
+    private Integer sort;
+
+    private String parentId;
+
+}

+ 11 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java

@@ -375,5 +375,16 @@ public class FlowableTaskController {
         return flowTaskService.getCurrentTaskName(processInstanceId);
     }
 
+    @GetMapping("auditByProcInsIdAndFlag")
+    public void auditByProcInsIdAndFlag(String procInsId,String flag,String assignee,String comm) throws Exception {
+        flowTaskService.auditByProcInsIdAndFlag(procInsId,flag,assignee,comm);
+    }
+
+
+    @GetMapping("checkIsLastTask")
+    public boolean checkIsLastTask(String procInsId) {
+        return flowTaskService.checkIsLastTask(procInsId);
+    }
+
 
 }

+ 57 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

@@ -23,6 +23,7 @@ import com.jeeplus.sys.feign.ITenantApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.flowable.bpmn.constants.BpmnXMLConstants;
 import org.flowable.bpmn.model.BpmnModel;
 import org.flowable.bpmn.model.FlowNode;
@@ -857,4 +858,60 @@ public class FlowTaskService {
         return "";
     }
 
+    /**
+     * 审核通过或驳回
+     * @param procInsId
+     * @param flag “yes”通过  “no”驳回
+     * @param assignee 设置下一步处理人
+     * @param comm 审核意见
+     */
+    public void auditByProcInsIdAndFlag(String procInsId,String flag,String assignee,String comm) throws Exception {
+        // 获取审核操作需要的参数
+        List<Flow> flows = this.historicTaskList(procInsId);
+        Flow flow = flows.get(flows.size() - 1);
+        Flow saveParam = new Flow();
+        HistoricActivityInstance histIns = flow.getHistIns();
+        saveParam.setTaskId(histIns.getTaskId());
+        saveParam.setTaskDefKey(histIns.getActivityId());
+        saveParam.setProcInsId(histIns.getProcessInstanceId());
+        saveParam.setProcDefId(histIns.getProcessDefinitionId());
+        Map<String, Object> vars = Maps.newHashMap();
+        TaskComment comment = new TaskComment();
+        comment.setMessage(comm);
+        if ("yes".equals(flag)) {
+            vars.put("agree", true); // 审核通过
+            comment.setType(ActionType.AGREE.getType());
+            comment.setStatus(ActionType.AGREE.getStatus());
+        } else {
+            vars.put("agree", false); // 审核驳回
+            comment.setType(ActionType.REJECT.getType());
+            comment.setStatus(ActionType.REJECT.getStatus());
+        }
+        saveParam.setComment(comment);
+        this.auditSave(saveParam, vars); // 流程审核操作
+        //指定下一步处理人
+        if(StringUtils.isNotBlank(assignee)){
+            Task task = taskService.createTaskQuery().processInstanceId(procInsId).active().singleResult();
+            if(task != null){
+                taskService.setAssignee(task.getId(), assignee);
+            }
+        }
+    }
+
+    /**
+     * 检查是否为最后一个审核节点
+     * @param processInstanceId
+     * @return
+     */
+    public boolean checkIsLastTask(String processInstanceId) {
+        Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).active().singleResult();
+        // task为null则审核节点为最后一个审核节点
+        if (Objects.nonNull(task)) {
+            return false;
+        } else {
+            // 当前审核节点为最后节点
+            return true;
+        }
+    }
+
 }