浏览代码

批量归档

sangwenwei 1 年之前
父节点
当前提交
4643ef3641
共有 17 个文件被更改,包括 1113 次插入3 次删除
  1. 182 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/controller/CwFillingbatchController.java
  2. 38 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwFillingbatchFile.java
  3. 35 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwFillingbatchInfo.java
  4. 47 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwFillingbatchProject.java
  5. 38 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingBatchInfoMapper.java
  6. 9 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingbatchFileMapper.java
  7. 9 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingbatchProjectMapper.java
  8. 3 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java
  9. 158 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwFillingbatchInfoMapper.xml
  10. 13 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml
  11. 426 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwFillingbatchService.java
  12. 92 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwFillingbatchInfoDTO.java
  13. 55 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwFillingbatchProjectDTO.java
  14. 3 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java
  15. 4 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml
  16. 二进制
      jeeplus-modules/jeeplus-finance/src/main/resources/dot/批量归档导入模板 .xls
  17. 1 3
      jeeplus-modules/jeeplus-flowable/jeeplus-flowable.iml

+ 182 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/controller/CwFillingbatchController.java

@@ -0,0 +1,182 @@
+package com.jeeplus.finance.projectRecords.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.aop.demo.annotation.DemoMode;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDetailDTO;
+import com.jeeplus.finance.invoice.util.EasyPoiUtil;
+import com.jeeplus.finance.projectRecords.service.CwFillingbatchService;
+import com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchInfoDTO;
+import com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchProjectDTO;
+import com.jeeplus.finance.projectRecords.service.dto.CwProjectRecordsDTO;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import com.jeeplus.pubmodules.materialType.domain.MaterialTypeInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+@RestController
+@Api("项目批量归档信息")
+@RequestMapping(value = "/cwFillingbatch")
+public class CwFillingbatchController {
+    @Resource
+    private CwFillingbatchService cwFillingbatchService;
+
+
+
+    /**
+     * 列表查询
+     * @param info
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<IPage<CwFillingbatchInfoDTO>> list(CwFillingbatchInfoDTO info, Page<CwFillingbatchInfoDTO> page) {
+        IPage<CwFillingbatchInfoDTO> list = cwFillingbatchService.list(info,page);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 删除批量归档信息
+     * @param ids
+     * @return
+     */
+    @ApiLog(value = "删除批量归档信息")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String ids) {
+        return cwFillingbatchService.deleteByIds(ids);
+    }
+
+
+    /**
+     * 查询批量归档详情
+     * @param id
+     * @return
+     */
+    @ApiLog("查询批量归档详情")
+    @GetMapping("queryById")
+    public ResponseEntity queryById(@RequestParam("id") String id) {
+        CwFillingbatchInfoDTO cwFillingbatchInfoDTO = cwFillingbatchService.queryById ( id );
+        return ResponseEntity.ok (cwFillingbatchInfoDTO);
+    }
+
+    /**
+     *当前登录人未归档的B类项目,归档已完成但项目被驳回的B类项目
+     * @param info
+     * @param page
+     * @return
+     */
+    @ApiOperation(value = "当前登录人未归档的B类项目,归档已完成但项目被驳回的B类项目")
+    @GetMapping("/getProjectList")
+    public ResponseEntity<IPage<CwFillingbatchProjectDTO>> getProjectList(CwFillingbatchProjectDTO info, Page<CwFillingbatchProjectDTO> page) {
+        IPage<CwFillingbatchProjectDTO> list = cwFillingbatchService.getProjectList(info,page);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 保存财务项目批量归档信息-流程
+     * @param info
+     * @return
+     */
+    @ApiLog(value = "保存财务项目批量归档信息-流程", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody CwFillingbatchInfoDTO info) throws Exception {
+        String id = cwFillingbatchService.saveForm(info);
+        return ResponseUtil.newInstance().add("businessTable", "cw_fillingbatch_info").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
+     * 根据id修改状态值status
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "根据id修改状态值status")
+    @PostMapping(value = "/updateStatusById")
+    public ResponseEntity<String> updateStatusById(@RequestBody CwFillingbatchInfoDTO dto) {
+        String s = cwFillingbatchService.updateStatusById(dto);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 下载项目归档导入模板
+     *
+     * @param response
+     * @return
+     */
+    @GetMapping("/template")
+    @ApiOperation(value = "下载模板")
+    public void importFileTemplate(HttpServletResponse response, HttpServletRequest request) {
+        try {
+            InputStream inputStream = this.getClass().getResourceAsStream("/dot/批量归档导入模板.xlsx");
+            //强制下载不打开
+            response.setContentType("application/force-download");
+            OutputStream out = response.getOutputStream();
+            //使用URLEncoder来防止文件名乱码或者读取错误
+            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("批量归档导入模板.xlsx", "UTF-8"));
+            int b = 0;
+            byte[] buffer = new byte[1000000];
+            while (b != -1) {
+                b = inputStream.read(buffer);
+                if (b != -1) out.write(buffer, 0, b);
+            }
+            inputStream.close();
+            out.close();
+            out.flush();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 导入批量归档数据
+     *
+     * @return
+     */
+    @DemoMode
+    @PostMapping("/importDetail")
+    @ApiLog(value = "导入批量归档数据excel", type = LogTypeEnum.IMPORT)
+    public ResponseEntity importDetail(MultipartFile file, HttpServletRequest request) throws IOException {
+
+        ArrayList<CwFillingbatchProjectDTO> arrayList = new ArrayList<>();
+        HashMap<String,String> hashMap = new HashMap<>();
+
+        List<CwFillingbatchProjectDTO> listA = new ArrayList<>();
+        //获取sheet
+        listA = EasyPoiUtil.importExcel(file, 1, 1, CwFillingbatchProjectDTO.class);
+        //导入前检测数据
+        String resultA = cwFillingbatchService.importDecide(listA, arrayList, hashMap);
+        if(StringUtils.isNotBlank(resultA)){
+            //有返回值,说明导入的数据不正确。向用户抛提示
+            return ResponseEntity.badRequest().body  (resultA);
+        }
+
+        return ResponseEntity.ok(arrayList);
+    }
+
+
+
+
+
+
+
+
+
+}

+ 38 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwFillingbatchFile.java

@@ -0,0 +1,38 @@
+package com.jeeplus.finance.projectRecords.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName("cw_fillingbatch_file")
+public class CwFillingbatchFile extends BaseEntity {
+
+    //文件类型
+    private String fileType;
+
+    //文件描述
+    private String fileRemarks;
+
+    //报告id
+    private String reportId;
+
+    //排序
+    private Integer sort;
+
+    //报告文号
+    @TableField(exist = false)
+    private String no;
+    //项目名称
+    @TableField(exist = false)
+    private String name;
+    //层级
+    @TableField(exist = false)
+    private String level;
+    //父id
+    @TableField(exist = false)
+    private String parentId;
+
+    private String projectNumber;
+}

+ 35 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwFillingbatchInfo.java

@@ -0,0 +1,35 @@
+package com.jeeplus.finance.projectRecords.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+@TableName("cw_fillingbatch_info")
+public class CwFillingbatchInfo extends BaseEntity {
+
+    //归档批次号
+    private String no;
+
+    //归档名称
+    private String name;
+
+    //归档说明
+    private String remarks;
+
+    //流程信息
+    private String procInsId;
+    private String processDefinitionId;
+
+    //审核状态
+    private String status;
+
+    //审核通过时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date auditAgreeTime;
+}

+ 47 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwFillingbatchProject.java

@@ -0,0 +1,47 @@
+package com.jeeplus.finance.projectRecords.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@TableName("cw_fillingbatch_project")
+public class CwFillingbatchProject extends BaseEntity {
+
+    //归档id
+    private String fillingbatchId;
+
+    //报告id
+    private String reportId;
+
+    //案卷号
+    private String achiveNo;
+
+    //状态
+    private String status;
+
+    //排序
+    private Integer sort;
+    //报告文号
+    @TableField(exist = false)
+    private String no;
+    //项目名称
+    @TableField(exist = false)
+    private String name;
+    //层级
+    @TableField(exist = false)
+    private String level;
+    @TableField(exist = false)
+    private List<CwFillingbatchFile> children;
+
+    @TableField(exist = false)
+    private String parentId;
+
+    @TableField(exist = false)
+    private String projectNumber;
+    @TableField(exist = false)
+    private String projectStatus;
+}

+ 38 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingBatchInfoMapper.java

@@ -0,0 +1,38 @@
+package com.jeeplus.finance.projectRecords.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchFile;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchInfo;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchProject;
+import com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchInfoDTO;
+import com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchProjectDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface CwFillingBatchInfoMapper extends BaseMapper<CwFillingbatchInfo> {
+
+    IPage<CwFillingbatchInfoDTO> findList(Page<CwFillingbatchInfoDTO> page,@Param(Constants.WRAPPER) QueryWrapper<CwFillingbatchInfoDTO> queryWrapper);
+
+    List<CwFillingbatchInfoDTO> findProjectList();
+
+    List<CwFillingbatchProject> findProjectByBatchId(@Param("id") String id);
+
+    List<CwFillingbatchProject> findFileByProId(@Param("reportId") String reportId);
+
+    CwFillingbatchInfoDTO findById(@Param("id") String id);
+
+    IPage<CwFillingbatchProjectDTO> getList(Page<CwFillingbatchProjectDTO> page, @Param(Constants.WRAPPER)QueryWrapper<CwFillingbatchProjectDTO> queryWrapper);
+
+    List<CwFillingbatchProjectDTO> findProList(@Param("id") String id);
+
+    void updateInfo(@Param("id") String ids);
+
+    List<String> getIdList();
+}

+ 9 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingbatchFileMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.finance.projectRecords.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchFile;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CwFillingbatchFileMapper extends BaseMapper<CwFillingbatchFile> {
+}

+ 9 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingbatchProjectMapper.java

@@ -0,0 +1,9 @@
+package com.jeeplus.finance.projectRecords.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchProject;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CwFillingbatchProjectMapper extends BaseMapper<CwFillingbatchProject> {
+}

+ 3 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java

@@ -127,4 +127,7 @@ public interface CwProjectRecordsMapper extends BaseMapper<CwProjectRecords> {
      */
     void projectUpgrade( @Param("id") String id,@Param("level") String level);
 
+    CwProjectRecordsDTO getInfoById(@Param("id") String id);
+
+
 }

+ 158 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwFillingbatchInfoMapper.xml

@@ -0,0 +1,158 @@
+<?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.finance.projectRecords.mapper.CwFillingBatchInfoMapper">
+    <select id="findList" resultType="com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchInfoDTO">
+        select
+            a.id,
+            a.create_by_id,
+            a.create_time,
+            a.no,
+            a.name,
+            a.remarks,
+            a.proc_ins_id,
+            a.status,
+            a.process_definition_id,
+            a.audit_agree_time,
+            art.ID_ as task_id,
+            su.name as createName
+        from cw_fillingbatch_info a
+        left join sys_user su on a.create_by_id = su.id and su.del_flag = '0'
+        LEFT JOIN act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+        ${ew.customSqlSegment}
+        ORDER BY a.create_time DESC
+    </select>
+
+    <select id="findProjectList" resultType="com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchInfoDTO">
+        select
+            pre.id,
+            a.create_by_id,
+            a.create_time,
+            a.fillingbatch_id,
+            a.report_id,
+            a.achive_no,
+            a.status,
+            a.sort,
+            prnl.report_no as no,
+            a.fillingbatch_id as parentId,
+            pre.project_name as name,
+            su.name as createName
+        from cw_fillingbatch_project a
+        LEFT JOIN cw_project_report pr on pr.id=a.report_id and pr.del_flag = '0'
+        LEFT JOIN cw_project_report_new_line prnl on pr.id=prnl.report_id and prnl.del_flag = '0'
+        left join cw_project_records pre on pre.id = pr.project_id and pre.del_flag = '0'
+        left join sys_user su on pre.create_by_id = su.id and su.del_flag = '0'
+        where a.del_flag ='0' order by a.sort ASC
+    </select>
+
+    <select id="findProjectByBatchId" resultType="com.jeeplus.finance.projectRecords.domain.CwFillingbatchProject">
+        select
+            a.id,
+            a.create_by_id,
+            a.create_time,
+            a.fillingbatch_id,
+            a.report_id,
+            a.achive_no,
+            a.status as projectStatus,
+            a.sort,
+            prnl.report_no as no,
+            pre.project_name as name,
+            pre.project_number
+        from cw_fillingbatch_project a
+        LEFT JOIN cw_project_report pr on pr.id=a.report_id and pr.del_flag = '0'
+        LEFT JOIN cw_project_report_new_line prnl on pr.id=prnl.report_id and prnl.del_flag = '0'
+        left join cw_project_records pre on pre.id = pr.project_id and pre.del_flag = '0'
+        where a.del_flag ='0' and a.fillingbatch_id = #{id} order by a.sort ASC
+    </select>
+
+    <select id="findFileByProId" resultType="com.jeeplus.finance.projectRecords.domain.CwFillingbatchProject">
+        select
+            id,
+            create_by_id,
+            file_type as projectNumber,
+            file_remarks as name,
+            report_id,
+            sort,
+            report_id as parentId
+        from cw_fillingbatch_file
+        where del_flag = '0' and report_id = #{reportId} order by sort ASC
+    </select>
+
+    <select id="findById" resultType="com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchInfoDTO">
+        select
+            a.id,
+            a.create_by_id,
+            a.create_time,
+            a.no,
+            a.name,
+            a.remarks,
+            a.proc_ins_id,
+            a.status,
+            a.process_definition_id,
+            a.audit_agree_time,
+            art.ID_ as task_id,
+            su.name as createName
+        from cw_fillingbatch_info a
+        left join sys_user su on a.create_by_id = su.id and su.del_flag = '0'
+        LEFT JOIN act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+        where a.id = #{id}
+    </select>
+
+    <select id="getList" resultType="com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchProjectDTO">
+        select
+            a.id,
+            a.project_name as name,
+            a.create_time,
+            a.project_number,
+            a.project_type,
+            prnl.report_no as no,
+            su.name as projectLeaderName,
+            su1.name as createName,
+            pr.id as reportId
+        from cw_project_records a
+        LEFT JOIN cw_project_report pr on pr.project_id=a.id and pr.del_flag = '0'
+        LEFT JOIN cw_project_report_new_line prnl on pr.id=prnl.report_id and prnl.del_flag = '0'
+        left join sys_user su on a.project_leader_id = su.id and su.del_flag = '0'
+        left join sys_user su1 on a.create_by_id = su1.id and su1.del_flag = '0'
+        ${ew.customSqlSegment}
+        and a.project_level= '2' and a.del_flag = '0' and pr.id not in (select report_id from cw_fillingbatch_project where status in (2,3,5) and del_flag = '0')order by a.create_time DESC
+    </select>
+
+    <select id="getIdList" resultType="string">
+        select
+            id
+        from cw_project_records
+        where project_level= '2' and del_flag = '0'
+    </select>
+
+    <update id="updateInfo">
+        update cw_fillingbatch_project set del_flag = '1',status = '4' where fillingbatch_id = #{id}
+    </update>
+
+    <select id="findProList" resultType="com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchProjectDTO">
+        select
+            pre.id,
+            a.create_by_id,
+            a.create_time,
+            a.fillingbatch_id,
+            a.report_id,
+            a.achive_no,
+            a.status,
+            a.sort,
+            prnl.report_no as no,
+            pre.project_name as name,
+            su.name as projectLeaderName,
+            su1.name as createName,
+            pre.project_number,
+            pre.project_type
+        from cw_fillingbatch_project a
+        LEFT JOIN cw_project_report pr on pr.id=a.report_id and pr.del_flag = '0'
+        LEFT JOIN cw_project_report_new_line prnl on pr.id=prnl.report_id and prnl.del_flag = '0'
+        left join cw_project_records pre on pre.id = pr.project_id and pre.del_flag = '0'
+        left join sys_user su on pre.project_leader_id = su.id and su.del_flag = '0'
+        left join sys_user su1 on pre.create_by_id = su1.id and su1.del_flag = '0'
+        where  a.create_by_id = #{id} and a.status = '4' and a.del_flag = '0' order by a.create_time DESC
+    </select>
+
+</mapper>

+ 13 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml

@@ -666,4 +666,17 @@
         ORDER BY a.create_time DESC
     </select>
 
+    <select id="getInfoById" resultType="com.jeeplus.finance.projectRecords.service.dto.CwProjectRecordsDTO">
+        select
+            a.create_by_id as createId,
+            a.project_number,
+            a.project_name,
+            a.project_level,
+            prn.report_no
+        from cw_project_records a
+        left join cw_project_report pr on a.id = pr.project_id and pr.del_flag = '0'
+        left join cw_project_report_new_line prn on pr.id = prn.report_id and prn.del_flag = '0'
+         where pr.id = #{id}
+    </select>
+
 </mapper>

+ 426 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwFillingbatchService.java

@@ -0,0 +1,426 @@
+package com.jeeplus.finance.projectRecords.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.annotation.TableField;
+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.extension.plugins.pagination.Page;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchFile;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchInfo;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchProject;
+import com.jeeplus.finance.projectRecords.mapper.CwFillingBatchInfoMapper;
+import com.jeeplus.finance.projectRecords.mapper.CwFillingbatchFileMapper;
+import com.jeeplus.finance.projectRecords.mapper.CwFillingbatchProjectMapper;
+import com.jeeplus.finance.projectRecords.mapper.CwProjectRecordsMapper;
+import com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchInfoDTO;
+import com.jeeplus.finance.projectRecords.service.dto.CwFillingbatchProjectDTO;
+import com.jeeplus.finance.projectRecords.service.dto.CwProjectRecordsDTO;
+import com.jeeplus.finance.projectReport.domain.CwProjectReport;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReportMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.function.BinaryOperator;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Service
+@Transactional
+public class CwFillingbatchService {
+
+    @Resource
+    private CwFillingBatchInfoMapper cwFillingBatchInfoMapper;
+
+    @Resource
+    private CwFillingbatchProjectMapper cwFillingbatchProjectMapper;
+
+    @Resource
+    private CwFillingbatchFileMapper cwFillingbatchFileMapper;
+
+    @Resource
+    private CwProjectReportMapper cwProjectReportMapper;
+
+    @Resource
+    private CwProjectRecordsMapper cwProjectRecordsMapper;
+
+    public IPage<CwFillingbatchInfoDTO> list(CwFillingbatchInfoDTO info, Page<CwFillingbatchInfoDTO> page) {
+        QueryWrapper<CwFillingbatchInfoDTO> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("a.del_flag", 0);
+        if (ObjectUtil.isNotEmpty(info)) {
+            //创建时间
+            if (ArrayUtil.isNotEmpty(info.getCreateDates())) {
+                queryWrapper.between("a.create_time", info.getCreateDates()[0], info.getCreateDates()[1]);
+            }
+            //创建人
+            if (StringUtils.isNotBlank(info.getCreateById())) {
+                queryWrapper.eq("a.create_by_id", info.getCreateById());
+            }
+            //状态
+            if (StringUtils.isNotBlank(info.getStatus())) {
+                queryWrapper.eq("a.status", info.getStatus());
+            }
+            //归档名称
+            if (StringUtils.isNotBlank(info.getName())) {
+                queryWrapper.eq("a.name", info.getName());
+            }
+        }
+        //查询归档信息
+        IPage<CwFillingbatchInfoDTO> list = cwFillingBatchInfoMapper.findList(page, queryWrapper);
+        List<CwFillingbatchInfoDTO> projectList = cwFillingBatchInfoMapper.findProjectList();
+        for (CwFillingbatchInfoDTO record : list.getRecords()) {
+            //设置层级
+            record.setLevel("1");
+        }
+        List<CwFillingbatchInfoDTO> records = list.getRecords();
+        records.addAll(projectList);
+        return list;
+    }
+
+    /**
+     * 删除
+     *
+     * @param ids
+     * @return
+     */
+    public ResponseEntity deleteByIds(String ids) {
+        //删除归档信息
+        cwFillingBatchInfoMapper.deleteById(ids);
+        //修改归档项目中的信息
+        cwFillingBatchInfoMapper.updateInfo(ids);
+        //删除归档项目文件中的信息
+        List<CwFillingbatchProject> projectList = cwFillingbatchProjectMapper.selectList(new QueryWrapper<CwFillingbatchProject>().eq("fillingbatch_id", ids));
+        if (CollectionUtil.isNotEmpty(projectList)) {
+            for (CwFillingbatchProject project : projectList) {
+                //根据id查询项目文件
+                List<CwFillingbatchFile> fileList = cwFillingbatchFileMapper.selectList(new QueryWrapper<CwFillingbatchFile>().eq("report_id", project.getReportId()));
+                //删除文件
+                if (CollectionUtil.isNotEmpty(fileList)) {
+                    for (CwFillingbatchFile file : fileList) {
+                        cwFillingbatchFileMapper.delete(new QueryWrapper<CwFillingbatchFile>().eq("id", file.getId()));
+
+                    }
+                }
+            }
+        }
+        return ResponseEntity.ok("删除成功");
+    }
+
+    /**
+     * 查询批量归档详情
+     *
+     * @param id
+     * @return
+     */
+    public CwFillingbatchInfoDTO queryById(String id) {
+        //根据id查询归档信息
+        CwFillingbatchInfoDTO cwFillingbatchInfo = cwFillingBatchInfoMapper.findById(id);
+        //查询项目信息
+        ArrayList<CwFillingbatchProject> projects = new ArrayList<>();
+        List<CwFillingbatchProject> projectList = cwFillingBatchInfoMapper.findProjectByBatchId(id);
+        if (CollectionUtil.isNotEmpty(projectList)) {
+            ArrayList<CwFillingbatchProject> list = new ArrayList<>();
+            //遍历项目并查询文件
+            for (CwFillingbatchProject project : projectList) {
+                project.setLevel("1");
+                List<CwFillingbatchProject> fileList = cwFillingBatchInfoMapper.findFileByProId(project.getId());
+                list.addAll(fileList);
+            }
+            projects.addAll(projectList);
+            projects.addAll(list);
+            cwFillingbatchInfo.setCwFillingbatchProjects(projects);
+        }
+
+        return cwFillingbatchInfo;
+    }
+
+    /**
+     * 当前登录人未归档的B类项目,归档已完成但项目被驳回的B类项目
+     *
+     * @param info
+     * @param page
+     * @return
+     */
+    public IPage<CwFillingbatchProjectDTO> getProjectList(CwFillingbatchProjectDTO info, Page<CwFillingbatchProjectDTO> page) {
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        QueryWrapper<CwFillingbatchProjectDTO> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("a.create_by_id", userDTO.getId());
+        queryWrapper.eq("a.del_flag", "0");
+        if (StringUtils.isNotBlank(info.getName())) {
+            queryWrapper.like("a.project_name", info.getName());
+        }
+        //获取当前登陆人所有未归档的B类项目
+        IPage<CwFillingbatchProjectDTO> projectList = cwFillingBatchInfoMapper.getList(page, queryWrapper);
+        //获取当前登录人所有归档被驳回的的项目
+        List<CwFillingbatchProjectDTO> list = cwFillingBatchInfoMapper.findProList(userDTO.getId());
+        Map<String, CwFillingbatchProjectDTO> uniqueProjectMap = new LinkedHashMap<>();
+        //将未归档以及归档被驳回的项目存到list中最后重新进行赋值
+        if (ObjectUtil.isNotEmpty(projectList)) {
+            if (CollectionUtil.isNotEmpty(list)) {
+                for (CwFillingbatchProjectDTO projectDTO : list) {
+                    if ("4".equals(projectDTO.getStatus())) {
+                        projectDTO.setLevel("1");
+                        uniqueProjectMap.put(projectDTO.getId(), projectDTO);
+                        continue;
+                    }
+                }
+                List<CwFillingbatchProjectDTO> record = new ArrayList<>(uniqueProjectMap.values());
+                List<CwFillingbatchProjectDTO> records = projectList.getRecords();
+                records.addAll(record);
+                projectList.setRecords(records);
+            } else {
+                for (CwFillingbatchProjectDTO record : projectList.getRecords()) {
+                    record.setLevel("1");
+                }
+            }
+        }
+
+
+        return projectList;
+    }
+
+    /**
+     * 保存项目批量归档信息
+     *
+     * @param info
+     * @return
+     */
+    public String saveForm(CwFillingbatchInfoDTO info) throws Exception {
+        if (StringUtils.isNotBlank(info.getId())) {
+            return edit(info);
+        }
+        return add(info);
+    }
+
+    private String edit(CwFillingbatchInfoDTO info) {
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+
+        //修改归档信息
+        CwFillingbatchInfo cwFillingbatchInfo = new CwFillingbatchInfo();
+        BeanUtils.copyProperties(info, cwFillingbatchInfo);
+        cwFillingbatchInfo.setUpdateById(userDTO.getId());
+        cwFillingbatchInfo.setUpdateTime(new Date());
+        cwFillingBatchInfoMapper.updateById(cwFillingbatchInfo);
+        //根据id将归档项目表中的信息删除
+        cwFillingbatchProjectMapper.delete(new QueryWrapper<CwFillingbatchProject>().eq("fillingbatch_id", info.getId()));
+        //查找项目信息
+        List<CwFillingbatchProject> projectList = cwFillingBatchInfoMapper.findProjectByBatchId(info.getId());
+        if (CollectionUtil.isNotEmpty(projectList)) {
+            for (CwFillingbatchProject cwFillingbatchProject : projectList) {
+                //删除项目文件中的信息
+                cwFillingbatchFileMapper.delete(new QueryWrapper<CwFillingbatchFile>().eq("report_id", cwFillingbatchProject.getReportId()));
+            }
+        }
+        //新增项目信息
+        if (CollectionUtil.isNotEmpty(info.getCwFillingbatchProjects())) {
+            for (CwFillingbatchProject cwFillingbatchProject : info.getCwFillingbatchProjects()) {
+                Integer count = 0;
+                if ("1".equals(cwFillingbatchProject.getLevel())) {
+                    //往归档项目表中添加信息
+                    CwFillingbatchProject project = new CwFillingbatchProject();
+                    project.setId(UUID.randomUUID().toString().replace("-", ""));
+                    project.setFillingbatchId(info.getId());
+                    project.setReportId(cwFillingbatchProject.getReportId());
+                    project.setStatus("2");
+                    project.setSort(count++);
+                    cwFillingbatchProjectMapper.insert(project);
+                    //遍历子级数据
+                    if (CollectionUtil.isNotEmpty(cwFillingbatchProject.getChildren())) {
+                        Integer count1 = 0;
+                        for (CwFillingbatchFile child : cwFillingbatchProject.getChildren()) {
+                            CwFillingbatchFile cwFillingbatchFile = new CwFillingbatchFile();
+                            cwFillingbatchFile.setId(UUID.randomUUID().toString().replace("-", ""));
+                            cwFillingbatchFile.setFileType(child.getProjectNumber());
+                            cwFillingbatchFile.setFileRemarks(child.getName());
+                            cwFillingbatchFile.setReportId(project.getId());
+                            cwFillingbatchFile.setSort(count1++);
+                            //往项目文件表中添加信息
+                            cwFillingbatchFileMapper.insert(cwFillingbatchFile);
+                        }
+
+                    }
+                }
+            }
+        }
+
+
+
+
+        return info.getId();
+
+    }
+
+    private String add(CwFillingbatchInfoDTO info) throws Exception {
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        //生成归档批次号
+        String serialNum = SpringUtil.getBean(IWorkAttachmentApi.class).genSerialNum(userDTO.getCompanyDTO().getId(), CwFillingbatchInfoDTO.BIZ_CODE, TokenProvider.getCurrentToken());
+        //往归档信息表中添加信息
+        CwFillingbatchInfo cwFillingbatchInfo = new CwFillingbatchInfo();
+        BeanUtils.copyProperties(info, cwFillingbatchInfo);
+        cwFillingbatchInfo.setNo(serialNum);
+        String id = UUID.randomUUID().toString().replace("-", "");
+        cwFillingbatchInfo.setId(id);
+        cwFillingbatchInfo.setCreateById(userDTO.getId());
+        cwFillingbatchInfo.setCreateTime(new Date());
+        cwFillingbatchInfo.setUpdateById(userDTO.getId());
+        cwFillingbatchInfo.setUpdateTime(new Date());
+        cwFillingBatchInfoMapper.insert(cwFillingbatchInfo);
+        //遍历归档项目信息
+        if (CollectionUtil.isNotEmpty(info.getCwFillingbatchProjects())) {
+            for (CwFillingbatchProject cwFillingbatchProject : info.getCwFillingbatchProjects()) {
+                Integer count = 0;
+                if ("1".equals(cwFillingbatchProject.getLevel())) {
+                    //往归档项目表中添加信息
+                    CwFillingbatchProject project = new CwFillingbatchProject();
+                    project.setId(UUID.randomUUID().toString().replace("-", ""));
+                    project.setFillingbatchId(cwFillingbatchInfo.getId());
+                    project.setReportId(cwFillingbatchProject.getReportId());
+                    project.setStatus("2");
+                    project.setSort(count++);
+                    cwFillingbatchProjectMapper.insert(project);
+                    //遍历子级数据
+                    if (CollectionUtil.isNotEmpty(cwFillingbatchProject.getChildren())) {
+                        Integer count1 = 0;
+                        for (CwFillingbatchFile child : cwFillingbatchProject.getChildren()) {
+                            CwFillingbatchFile cwFillingbatchFile = new CwFillingbatchFile();
+                            cwFillingbatchFile.setId(UUID.randomUUID().toString().replace("-", ""));
+                            cwFillingbatchFile.setFileType(child.getProjectNumber());
+                            cwFillingbatchFile.setFileRemarks(child.getName());
+                            cwFillingbatchFile.setReportId(project.getId());
+                            cwFillingbatchFile.setSort(count1++);
+                            //往项目文件表中添加信息
+                            cwFillingbatchFileMapper.insert(cwFillingbatchFile);
+                        }
+
+                    }
+                }
+            }
+        }
+        return id;
+    }
+
+
+    /**
+     * 根据id修改状态
+     *
+     * @param dto
+     * @return
+     */
+    public String updateStatusById(CwFillingbatchInfoDTO dto) {
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+
+        CwFillingbatchInfo cwFillingbatchInfo = new CwFillingbatchInfo();
+        //如果状态为5
+        if (dto.getStatus().equals("5")) {
+            //修改归档项目表中的案卷号和项目状态
+            if (CollectionUtil.isNotEmpty(dto.getCwFillingbatchProjects())) {
+                for (CwFillingbatchProject cwFillingbatchProject : dto.getCwFillingbatchProjects()) {
+                    if (cwFillingbatchProject.getLevel().equals("1")){
+                        CwFillingbatchProject project1 = new CwFillingbatchProject();
+                        project1.setId(cwFillingbatchProject.getId());
+                        project1.setAchiveNo(cwFillingbatchProject.getAchiveNo());
+                        project1.setStatus(cwFillingbatchProject.getStatus());
+                        cwFillingbatchProjectMapper.updateById(project1);
+                    }
+                }
+            }
+            cwFillingbatchInfo.setAuditAgreeTime(new Date());
+        }
+        //修改归档信息表状态
+        cwFillingbatchInfo.setId(dto.getId());
+        cwFillingbatchInfo.setUpdateTime(new Date());
+        cwFillingbatchInfo.setUpdateById(userDTO.getId());
+        cwFillingbatchInfo.setStatus(dto.getStatus());
+        cwFillingBatchInfoMapper.updateById(cwFillingbatchInfo);
+        return "修改成功";
+    }
+
+    /*
+    批量归档
+     */
+    public String importDecide(List<CwFillingbatchProjectDTO> listA, ArrayList<CwFillingbatchProjectDTO> arrayList, HashMap<String, String> hashMap) {
+        //获取项目表中的所有数据
+        QueryWrapper<CwFillingbatchProject> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("del_flag",0);
+        List<CwFillingbatchProject> projectList = cwFillingbatchProjectMapper.selectList(queryWrapper);
+        //遍历导入的数据
+        for (CwFillingbatchProjectDTO cwFillingbatchInfoDTO : listA) {
+            HashSet<String> prefixReportNumberSet = new HashSet<>();
+            if (StringUtils.isNotBlank(cwFillingbatchInfoDTO.getReportNo())){
+                //对报告号进行分割,取“【”前的信息
+                String prefixReportNumber = cwFillingbatchInfoDTO.getReportNo().substring(0,cwFillingbatchInfoDTO.getReportNo().lastIndexOf("["));
+                prefixReportNumberSet.add(prefixReportNumber);
+                if(prefixReportNumberSet.size()>1){
+                    return "导入项目报告号类型不一样";
+                }
+            }
+            ArrayList<CwFillingbatchFile> files = new ArrayList<>();
+            if (ObjectUtil.isEmpty(cwFillingbatchInfoDTO)){
+                continue;
+            }
+            //根据报告号查找报告id
+            String id=cwProjectReportMapper.getIdByNo(cwFillingbatchInfoDTO.getReportNo());
+            //根据报告号查询对应的报告信息
+            if (StringUtils.isEmpty(id)){
+                return "未查询到报告号-"+cwFillingbatchInfoDTO.getReportNo()+"对应的报告信息";
+            }
+            //查询项目是否是B类项目
+            //根据报告id查询项目信息
+            CwProjectRecordsDTO recordsDTO=cwProjectRecordsMapper.getInfoById(id);
+            if (StringUtils.isBlank(recordsDTO.getProjectLevel()) && "1".equals(recordsDTO.getProjectLevel())){
+                return "报告号:"+cwFillingbatchInfoDTO.getReportNo()+"的项目信息不是B类项目,无法进行批量归档";
+            }
+            UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+            //判断当前登录人是否是项目登记人
+            if (!userDTO.getId().equals(recordsDTO.getCreateId())){
+                return "报告号"+cwFillingbatchInfoDTO.getReportNo()+"的项目登记人不是您,无法进行批量归档";
+            }
+            //判断该项目信息是否已经提交归档或者是否归档已完成
+            for (CwFillingbatchProject project : projectList) {
+                if (project.getReportId().equals(id)){
+                    //判断当前的状态是否是2,3,5
+                    switch (project.getStatus()){
+                        case "2":
+                            return "报告号-"+cwFillingbatchInfoDTO.getReportNo()+"正在归档中,无法重复归档";
+                        case "3":
+                            return "报告号-"+cwFillingbatchInfoDTO.getReportNo()+"正在归档中,无法重复归档";
+                        case "5":
+                            return "报告号-"+cwFillingbatchInfoDTO.getReportNo()+"已归档,无法重复归档";
+                    }
+                }
+            }
+
+            cwFillingbatchInfoDTO.setProjectNumber(recordsDTO.getProjectNumber());//项目编号
+            cwFillingbatchInfoDTO.setName(recordsDTO.getProjectName());
+            cwFillingbatchInfoDTO.setNo(recordsDTO.getReportNo());
+            cwFillingbatchInfoDTO.setLevel("1");
+            cwFillingbatchInfoDTO.setReportId(id);
+            //将文件放入项目中
+            CwFillingbatchFile cwFillingbatchFile = new CwFillingbatchFile();
+            cwFillingbatchFile.setProjectNumber(cwFillingbatchInfoDTO.getProjectNumber());
+            cwFillingbatchFile.setName(cwFillingbatchInfoDTO.getName());
+            cwFillingbatchFile.setParentId(id);
+            files.add(cwFillingbatchFile);
+            cwFillingbatchInfoDTO.setCwFillingbatchFiles(files);
+            arrayList.add(cwFillingbatchInfoDTO);
+
+        }
+        return null;
+    }
+}

+ 92 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwFillingbatchInfoDTO.java

@@ -0,0 +1,92 @@
+package com.jeeplus.finance.projectRecords.service.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchFile;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchInfo;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchProject;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CwFillingbatchInfoDTO extends BaseEntity {
+
+    //归档编号(字典值)
+    public static final String BIZ_CODE = "105";
+    //归档批次号
+    private String no;
+
+    //归档名称
+    private String name;
+
+    //归档说明
+    private String remarks;
+
+    //流程信息
+    private String procInsId;
+    private String processDefinitionId;
+    private String taskId;
+
+    //审核状态
+    private String status;
+
+    //审核通过时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date auditAgreeTime;
+
+
+    //报告id
+    private String reportId;
+
+
+
+    //案卷号
+    private String achiveNo;
+
+    //状态
+    private String projectStatus;
+
+    //排序
+    private Integer projectSort;
+
+    //文件类型
+
+    private String fileType;
+
+    //文件描述
+    private String fileRemarks;
+
+
+    //排序
+    private Integer fileSort;
+
+    //层级
+    private String level;
+
+    /**
+     * 时间查询
+     */
+    private String[] createDates;
+
+    private List<CwFillingbatchInfo> cwFillingbatchInfos;
+
+    private List<CwFillingbatchProject> cwFillingbatchProjects;
+
+    //查询时使用
+    private List<CwFillingbatchProject> children;
+
+    private List<CwFillingbatchFile> cwFillingbatchFiles;
+
+    private String createName;
+
+    //列表查询时项目使用
+    private String parentId;
+
+
+}

+ 55 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwFillingbatchProjectDTO.java

@@ -0,0 +1,55 @@
+package com.jeeplus.finance.projectRecords.service.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.finance.projectRecords.domain.CwFillingbatchFile;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+
+public class CwFillingbatchProjectDTO extends BaseEntity {
+
+    //归档id
+    private String fillingbatchId;
+
+    //报告id
+    private String reportId;
+
+    //案卷号
+    private String achiveNo;
+
+    //状态
+    private String status;
+
+    //排序
+    private Integer sort;
+    //报告文号
+    private String no;
+    @Excel(name = "*报告号(必填)",width = 25,orderNum = "1")
+    private String reportNo;
+    //项目名称
+    @Excel(name = "文件内容",width = 25,orderNum = "3")
+    private String name;
+    //层级
+    @TableField(exist = false)
+    private String level;
+    @TableField(exist = false)
+    private List<CwFillingbatchFile> cwFillingbatchFiles;
+
+    //项目编号
+    @Excel(name = "*文件类型(必填)",width = 25,orderNum = "2")
+    private String projectNumber;
+
+    //项目类别
+    private String projectType;
+
+    //项目负责人
+    private String projectLeaderName;
+
+    //项目登记人
+    private String createName;
+}

+ 3 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java

@@ -267,4 +267,7 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
      * @return
      */
     List<ArchivedReportInfo> archivedInfoExport(@Param(Constants.WRAPPER) QueryWrapper<ArchivedReportInfo> queryWrapper);
+
+    String getIdByNo(@Param("reportNo")String reportNo);
+
 }

+ 4 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -1318,4 +1318,8 @@ JOIN (
         ORDER BY a.create_time DESC
     </select>
 
+    <select id="getIdByNo" resultType="string">
+        select report_id from cw_project_report_new_line where report_no = #{reportNo}
+    </select>
+
 </mapper>

二进制
jeeplus-modules/jeeplus-finance/src/main/resources/dot/批量归档导入模板 .xls


+ 1 - 3
jeeplus-modules/jeeplus-flowable/jeeplus-flowable.iml

@@ -4,9 +4,7 @@
     <facet type="jpa" name="JPA">
       <configuration>
         <setting name="validation-enabled" value="true" />
-        <datasource-mapping>
-          <factory-entry name="jeeplus-flowable" />
-        </datasource-mapping>
+        <datasource-mapping />
         <naming-strategy-map />
       </configuration>
     </facet>