Selaa lähdekoodia

中审报销代码提交

user5 2 vuotta sitten
vanhempi
commit
90681da5e4
29 muutettua tiedostoa jossa 3088 lisäystä ja 0 poistoa
  1. 146 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/controller/ZsReimbursementInfoController.java
  2. 45 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementAmountInfo.java
  3. 86 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfo.java
  4. 88 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoContract.java
  5. 84 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoOther.java
  6. 84 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoProcured.java
  7. 99 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoReport.java
  8. 74 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementInfo.java
  9. 12 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementAmountInfoMapper.java
  10. 9 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoContractMapper.java
  11. 12 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoMapper.java
  12. 9 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoOtherMapper.java
  13. 9 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoProcuredMapper.java
  14. 9 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoReportMapper.java
  15. 53 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementInfoMapper.java
  16. 597 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml
  17. 641 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/ZsReimbursementInfoService.java
  18. 58 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsQueryListDto.java
  19. 21 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsReportNoDto.java
  20. 118 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsRetureListDto.java
  21. 93 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsSaveInfoDto.java
  22. 19 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsTreeUserDto.java
  23. 157 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/controller/ZsReimbursementTypeController.java
  24. 93 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/domain/ZsReimbursementTypeInfo.java
  25. 44 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/mapper/ZsReimbursementTypeMapper.java
  26. 42 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/mapper/xml/ZsReimbursementTypeMapper.xml
  27. 178 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/service/ZsReimbursementTypeForTreeDataService.java
  28. 187 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/service/ZsReimbursementTypeService.java
  29. 21 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/service/dto/ZsReimbursementTypeDto.java

+ 146 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/controller/ZsReimbursementInfoController.java

@@ -0,0 +1,146 @@
+package com.jeeplus.test.zs.zsReimbursement.approvalInfo.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.core.excel.utils.EasyPoiUtil;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.service.dto.*;
+import com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.service.ZsReimbursementInfoService;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.service.dto.ZsReportNoDto;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.service.dto.ZsRetureListDto;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.service.dto.ZsSaveInfoDto;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.service.dto.ZsTreeUserDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.http.ResponseEntity;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2022-11-24 16:44
+ **/
+@RestController
+@Api(tags ="财务-报销申请")
+@RequestMapping(value = "/zsReimbursement/info")
+public class ZsReimbursementInfoController {
+
+    @Resource
+    private ZsReimbursementInfoService service;
+
+    /**
+     * 报告号查询
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "报告号查询")
+    @GetMapping("/reportNoList")
+    public ResponseEntity<IPage<ZsReportNoDto>> reportNoList(Page<ZsReportNoDto> page, ZsReportNoDto dto) throws Exception{
+        IPage<ZsReportNoDto> iPage = service.getReportNoList(page, dto);
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 列表查询
+     * @param dto/reimbursementApproval/type/bxList
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<IPage<ZsRetureListDto>> list(Page<ZsRetureListDto> page, QueryListDto dto) throws Exception{
+        IPage<ZsRetureListDto> iPage = service.list(page, dto);
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 项目登记列表
+     * @param info
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation(value = "项目登记列表")
+    @GetMapping(value = "/projectList")
+    public ResponseEntity<IPage<ProgramProjectListInfo>> projectList(ProgramProjectListInfo info, Page<ProgramProjectListInfo> page) throws Exception {
+        IPage<ProgramProjectListInfo> list = service.projectList(page, info, "1");
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 新增/修改
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "新增、修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody ZsSaveInfoDto dto) throws Exception{
+        String s = service.save(dto);
+        return ResponseUtil.newInstance().add("businessTable", "zs_reimbursement_info").add("businessId", s).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<ZsSaveInfoDto> findById(@RequestParam String id) throws Exception{
+        ZsSaveInfoDto 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 ZsRetureListDto dto) {
+        service.updateStatusById(dto);
+    }
+
+    @ApiOperation(value = "用户树形")
+    @GetMapping(value = "/userTree")
+    public ResponseEntity<List<ZsTreeUserDto>> userTree(@RequestParam String name) {
+        List<ZsTreeUserDto> list = service.userTree(name);
+        return ResponseEntity.ok(list);
+    }
+
+    @ApiOperation(value = "文件下载")
+    @GetMapping(value = "/exportFile")
+    public void exportFileUploadList(QueryListDto dto, HttpServletResponse response) throws Exception {
+        List<ZsRetureListDto> infos = service.exportList(dto);
+        EasyPoiUtil.exportExcel(infos, "报销申请列表信息",  "报销申请列表信息", RetureListDto.class, "", response );
+    }
+
+    @ApiOperation(value = "关联报销")
+    @GetMapping(value = "/relationReimbursementList")
+    public ResponseEntity<IPage<ZsRetureListDto>> relationReimbursementList(Page<ZsRetureListDto> page, @RequestParam("id") String id) {
+        IPage<ZsRetureListDto> listDtoIPage = service.relationReimbursementList(page, id);
+        return ResponseEntity.ok(listDtoIPage);
+    }
+
+}

+ 45 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementAmountInfo.java

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

+ 86 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfo.java

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

+ 88 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoContract.java

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

+ 84 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoOther.java

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

+ 84 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoProcured.java

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

+ 99 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementDetailInfoReport.java

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

+ 74 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/domain/ZsReimbursementInfo.java

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

+ 12 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementAmountInfoMapper.java

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

+ 9 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoContractMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.test.zs.zsReimbursement.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoContract;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.domain.ZsReimbursementDetailInfoContract;
+
+public interface ZsReimbursementDetailInfoContractMapper extends BaseMapper<ZsReimbursementDetailInfoContract> {
+}

+ 12 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoMapper.java

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

+ 9 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoOtherMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.test.zs.zsReimbursement.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoOther;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoReport;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.domain.ZsReimbursementDetailInfoOther;
+
+public interface ZsReimbursementDetailInfoOtherMapper extends BaseMapper<ZsReimbursementDetailInfoOther> {
+}

+ 9 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoProcuredMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.test.zs.zsReimbursement.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoOther;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoProcured;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.domain.ZsReimbursementDetailInfoProcured;
+
+public interface ZsReimbursementDetailInfoProcuredMapper extends BaseMapper<ZsReimbursementDetailInfoProcured> {
+}

+ 9 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementDetailInfoReportMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.test.zs.zsReimbursement.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoReport;
+import com.jeeplus.test.zs.zsReimbursement.approvalInfo.domain.ZsReimbursementDetailInfoReport;
+
+public interface ZsReimbursementDetailInfoReportMapper extends BaseMapper<ZsReimbursementDetailInfoReport> {
+}

+ 53 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/ZsReimbursementInfoMapper.java

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

+ 597 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml

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

+ 641 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/ZsReimbursementInfoService.java

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

+ 58 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsQueryListDto.java

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

+ 21 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsReportNoDto.java

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

+ 118 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsRetureListDto.java

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

+ 93 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsSaveInfoDto.java

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

+ 19 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalInfo/service/dto/ZsTreeUserDto.java

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

+ 157 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/controller/ZsReimbursementTypeController.java

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

+ 93 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/domain/ZsReimbursementTypeInfo.java

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

+ 44 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/mapper/ZsReimbursementTypeMapper.java

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

+ 42 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/mapper/xml/ZsReimbursementTypeMapper.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.test.zs.zsReimbursement.approvalType.mapper.ZsReimbursementTypeMapper">
+	<update id="updateChildBusType">
+		update cw_reimbursement_type_info set business_type = #{businessType} where parent_id = #{id}
+	</update>
+	<select id="checkNameIsExist" resultType="java.lang.Integer">
+        SELECT
+			COUNT( 0 )
+		FROM
+			cw_reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND `name` = #{name}
+			AND parent_id = #{parentId}
+    </select>
+    <select id="getNo" resultType="java.lang.Integer">
+        SELECT
+			(MAX(`sort`) + 1) AS `sort`
+		FROM
+			cw_reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND parent_id = #{parentId}
+    </select>
+    <select id="getLevel" resultType="java.lang.Integer">
+        SELECT
+			(MAX(level) + 1) AS `level`
+		FROM
+			cw_reimbursement_type_info
+		WHERE
+			del_flag = 0
+			AND id = #{parentId}
+    </select>
+	<select id="getChildId" resultType="java.lang.String">
+		select id from cw_reimbursement_type_info where parent_id = #{id}
+	</select>
+	<select id="getAllList"
+			resultType="com.jeeplus.test.zs.zsReimbursement.approvalType.domain.ZsReimbursementTypeInfo">
+		select * from cw_reimbursement_type_info where business_type = #{type} and del_flag = '0' order by sort asc
+	</select>
+</mapper>

+ 178 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/service/ZsReimbursementTypeForTreeDataService.java

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

+ 187 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/service/ZsReimbursementTypeService.java

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

+ 21 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/zs/zsReimbursement/approvalType/service/dto/ZsReimbursementTypeDto.java

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