Explorar el Código

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/ProjectListService.java
user5 hace 2 años
padre
commit
758f295c24
Se han modificado 17 ficheros con 1184 adiciones y 36 borrados
  1. 112 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/oss/service/OssService.java
  2. 34 4
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/controller/ProjectListController.java
  3. 164 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramArchive.java
  4. 42 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramProjectListInfo.java
  5. 19 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/ProgramArchiveMapper.java
  6. 119 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProgramArchiveMapper.xml
  7. 12 4
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProjectListMapper.xml
  8. 96 28
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/ProjectListService.java
  9. 210 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ProgramArchiveDto.java
  10. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/mapstruct/ProgramArchiveWrapper.java
  11. 68 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/controller/ProofreadIssuedController.java
  12. 124 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/domain/ProofreadIssued.java
  13. 15 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/mapper/ProofreadIssuedMapper.java
  14. 68 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/mapper/xml/ProofreadIssuedMapper.xml
  15. 67 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/service/ProofreadIssuedService.java
  16. 2 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/mapper/WorkContractInfoMapper.java
  17. 15 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/mapper/xml/WorkContractInfoMapper.xml

+ 112 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/oss/service/OssService.java

@@ -19,12 +19,14 @@ import com.jeeplus.test.oss.service.dto.OssServiceDto;
 import com.jeeplus.test.projectRecords.domain.Project;
 import com.jeeplus.test.projectRecords.mapper.ProjectMapper;
 import com.jeeplus.test.user.service.dto.FileUrlDto;
+import com.jeeplus.test.workContract.service.dto.WorkAttachmentDto;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.flowable.editor.language.json.converter.util.CollectionUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -35,6 +37,7 @@ import java.io.IOException;
 import java.net.URL;
 import java.net.URLEncoder;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Service
@@ -301,4 +304,113 @@ public class OssService extends ServiceImpl<OssServiceMapper,WorkAttachment> {
         return dto;
     }
 
+    /**
+     * 保存/修改附件
+     * @param fileList 要保存的附件,传空值则删除attachmentId下的所有附件
+     * @param attachmentId 附件的attachmentId
+     * @param attachmentFlag 附件的attachmentFlag
+     */
+    public void saveOrUpdateFileList(List<WorkAttachmentDto> fileList,String attachmentId,String attachmentFlag){
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        if (CollectionUtil.isNotEmpty(fileList)) {
+            List<String> ids = fileList.stream().filter(item -> {
+                if (com.jeeplus.sys.utils.StringUtils.isNotBlank(item.getId())) {
+                    return true;
+                }
+                return false;
+            }).map(WorkAttachmentDto::getId).collect(Collectors.toList());
+            if(CollectionUtil.isNotEmpty(ids)){
+                ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda()
+                        .eq(WorkAttachment::getAttachmentId, attachmentId)
+                        .notIn(WorkAttachment::getId,ids));
+            }else{
+                ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda()
+                        .eq(WorkAttachment::getAttachmentId, attachmentId));
+            }
+
+            List<WorkAttachmentDto> dtoList = fileList.stream().filter(item -> {
+                if (com.jeeplus.sys.utils.StringUtils.isNotBlank(item.getId())) {
+                    return false;
+                }
+                return true;
+            }).collect(Collectors.toList());
+
+            this.saveFileList(dtoList, userDTO, attachmentId,attachmentFlag);
+        } else {
+            ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda().eq(WorkAttachment::getAttachmentId, attachmentId));
+        }
+    }
+
+    /**
+     * 保存/修改附件
+     * @param fileList 要保存的附件,传空值则删除attachmentId下attachmentFlag下的所有附件
+     * @param attachmentId 附件的attachmentId
+     * @param attachmentFlag 附件的attachmentFlag
+     */
+    public void saveOrUpdateFileListFlag(List<WorkAttachmentDto> fileList,String attachmentId,String attachmentFlag){
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        if (CollectionUtil.isNotEmpty(fileList)) {
+            List<String> ids = fileList.stream().filter(item -> {
+                if (com.jeeplus.sys.utils.StringUtils.isNotBlank(item.getId())) {
+                    return true;
+                }
+                return false;
+            }).map(WorkAttachmentDto::getId).collect(Collectors.toList());
+            if(CollectionUtil.isNotEmpty(ids)){
+                ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda()
+                        .eq(WorkAttachment::getAttachmentId, attachmentId)
+                        .eq(WorkAttachment::getAttachmentFlag, attachmentFlag)
+                        .notIn(WorkAttachment::getId,ids));
+            }else{
+                ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda()
+                        .eq(WorkAttachment::getAttachmentId, attachmentId)
+                        .eq(WorkAttachment::getAttachmentFlag, attachmentFlag));
+            }
+
+            List<WorkAttachmentDto> dtoList = fileList.stream().filter(item -> {
+                if (com.jeeplus.sys.utils.StringUtils.isNotBlank(item.getId())) {
+                    return false;
+                }
+                return true;
+            }).collect(Collectors.toList());
+
+            this.saveFileList(dtoList, userDTO, attachmentId,attachmentFlag);
+        } else {
+            ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda().eq(WorkAttachment::getAttachmentId, attachmentId).eq(WorkAttachment::getAttachmentFlag, attachmentFlag));
+        }
+    }
+
+    /**
+     * 保存附件信息
+     * @param list 待保存的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    public void saveFileList(List<WorkAttachmentDto> list, UserDTO userDTO, String id,String attachmentFlag) {
+        int j = 1;
+        for (WorkAttachmentDto dto : list) {
+            WorkAttachment i = new WorkAttachment();
+            //包含了url、size、name
+            i.setId(UUID.randomUUID().toString().replace("-", ""));
+//            i.getCreateBy().setId(userDTO.getId());
+            i.setCreateDate(new Date());
+//            i.getUpdateBy().setId(userDTO.getId());
+            i.setUpdateDate(new Date());
+            i.setDelFlag(0);
+            i.setUrl(dto.getUrl());
+            //文件类型处理
+            List<String> strings = Arrays.asList(dto.getName().split("\\."));
+            if (CollectionUtils.isNotEmpty(strings)) {
+                i.setType(strings.get(1));
+            }
+            i.setAttachmentId(id);
+            i.setAttachmentName(dto.getName());
+            i.setAttachmentFlag(attachmentFlag);
+            i.setFileSize(dto.getSize());
+            i.setSort(j);
+            ossServiceMapper.insertWorkAttachment(i, userDTO);
+            j++;
+        }
+    }
+
 }

+ 34 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/controller/ProjectListController.java

@@ -13,10 +13,7 @@ import com.jeeplus.sys.utils.StringUtils;
 import com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo;
 import com.jeeplus.test.program.configuration.projectList.mapper.ProgramReportNoMapper;
 import com.jeeplus.test.program.configuration.projectList.service.ProjectListService;
-import com.jeeplus.test.program.configuration.projectList.service.dto.ContractDto;
-import com.jeeplus.test.program.configuration.projectList.service.dto.ExportFileDto;
-import com.jeeplus.test.program.configuration.projectList.service.dto.ProgramAuditDto;
-import com.jeeplus.test.program.configuration.projectList.service.dto.ProjectListDto;
+import com.jeeplus.test.program.configuration.projectList.service.dto.*;
 import com.jeeplus.test.projectRecords.domain.Project;
 import com.jeeplus.test.projectRecords.service.dto.FileUploadListDTO;
 import com.jeeplus.test.projectRecords.service.dto.ProjectDTO;
@@ -56,6 +53,16 @@ public class ProjectListController {
     }
 
     /**
+     * 新增/修改项目归档
+     */
+    @ApiOperation(value = "新增/修改项目归档")
+    @PostMapping(value = "/saveFormArchive")
+    public ResponseEntity saveFormArchive(@RequestBody ProgramArchiveDto programArchiveDto) throws Exception{
+        String id = projectListService.saveFormArchive(programArchiveDto);
+        return ResponseUtil.newInstance().add("businessTable", "program_archive").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
      * 新增/修改三级校审
      */
     @ApiOperation(value = "新增/修改三级校审")
@@ -100,6 +107,17 @@ public class ProjectListController {
     }
 
     /**
+     * 根据id查询项目归档
+     * @return
+     */
+    @ApiOperation(value = "根据id查询项目归档")
+    @GetMapping(value = "/findByIdArchive")
+    public ResponseEntity<ProgramArchiveDto> findByIdArchive(@RequestParam String id){
+        ProgramArchiveDto dto = projectListService.findByIdArchive(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
      * 根据id删除
      * @param id
      * @return
@@ -149,6 +167,18 @@ public class ProjectListController {
     }
 
     /**
+     * 根据id修改项目归档状态值status
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "根据id修改项目归档状态值status")
+    @PostMapping(value = "/updateStatusByArchiveId")
+    public ResponseEntity<String> updateStatusByArchiveId(@RequestBody ProjectListDto dto) {
+        String s = projectListService.updateStatusByArchiveId(dto);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
      * 合同登记列表
      * @param info
      * @param page

+ 164 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramArchive.java

@@ -0,0 +1,164 @@
+package com.jeeplus.test.program.configuration.projectList.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 新项目管理-项目登记-项目归档
+ * @TableName program_archive
+ */
+@Data
+@TableName(value = "program_archive")
+public class ProgramArchive extends BaseEntity {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 项目id
+     */
+    private String programId;
+
+    /**
+     * 年份
+     */
+    private String year;
+
+    /**
+     * 项目类型
+     */
+    private String programType;
+
+    /**
+     * 评估报告日
+     */
+    private Date evaluationReportDate;
+
+    /**
+     * 协议号
+     */
+    private String protocolNum;
+
+    /**
+     * 废旧物资评估(万元)
+     */
+    private String waystEvaluation;
+
+    /**
+     * 固定资产评估(万元)
+     */
+    private String fixedAssetsEvaluation;
+
+    /**
+     * 净资产评估
+     */
+    private String netAssetsEvaluation;
+
+    /**
+     * 租金评估(万/年)
+     */
+    private String rentEvaluation;
+
+    /**
+     * 司法鉴定
+     */
+    private String forensics;
+
+    /**
+     * 报告收费(元)
+     */
+    private String reportCharges;
+
+    /**
+     * 当前处理人
+     */
+    private String currentDisposePerson;
+
+    /**
+     * 是否开票
+     */
+    private String isInvoice;
+
+    /**
+     * 开票日期
+     */
+    private Date invoiceDate;
+
+    /**
+     * 预估/实际收费(万元)
+     */
+    private String actualCharges;
+
+    /**
+     * 合同是否存档
+     */
+    private String isContractArchive;
+
+    /**
+     * 底稿是否完好
+     */
+    private String isPapersIntact;
+
+    /**
+     * 底稿是否归档
+     */
+    private String isPapersArchive;
+
+    /**
+     * 报销外勤天数
+     */
+    private String opsAmount;
+
+    /**
+     * 外勤是否已经报销
+     */
+    private String isOpsReimbursement;
+
+    /**
+     * 已报销金额
+     */
+    private String reimbursementAmount;
+
+    /**
+     * 未报销金额
+     */
+    private String unreimbursedAmount;
+
+    /**
+     * 报销单号
+     */
+    private String reimbursementNum;
+
+    /**
+     * 报销日期
+     */
+    private Date reimbursementDate;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     * 流程信息
+     */
+    private String processDefinitionId;
+
+    /**
+     * 状态
+     */
+    private String status;
+
+    /**
+     * 审核通过时间
+     */
+    private String auditDate;
+
+    private static final long serialVersionUID = 1L;
+}

+ 42 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramProjectListInfo.java

@@ -238,6 +238,12 @@ public class ProgramProjectListInfo {
     private String status3;
 
     /**
+     * 报告签发状态
+     */
+    @TableField(exist = false)
+    private String issuedStatus;
+
+    /**
      * 一级校审id
      */
     @TableField(exist = false)
@@ -256,6 +262,12 @@ public class ProgramProjectListInfo {
     private String auditId3;
 
     /**
+     * 报告签发id
+     */
+    @TableField(exist = false)
+    private String issuedId;
+
+    /**
      * 三级校审流程id
      */
     @TableField(exist = false)
@@ -273,4 +285,34 @@ public class ProgramProjectListInfo {
     @TableField(exist = false)
     private String procInsId3;
 
+    /**
+     * 项目归档流程id
+     */
+    @TableField(exist = false)
+    private String procInsIdArchive;
+
+    /**
+     * 项目归档id
+     */
+    @TableField(exist = false)
+    private String archiveId;
+
+    /**
+     * 项目归档状态
+     */
+    @TableField(exist = false)
+    private String archiveStatus;
+
+    /**
+     * 项目负责人id
+     */
+    @TableField(exist = false)
+    private String OfficeId;
+
+    /**
+     * 报告签发流程id
+     */
+    @TableField(exist = false)
+    private String procInsId4;
+
 }

+ 19 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/ProgramArchiveMapper.java

@@ -0,0 +1,19 @@
+package com.jeeplus.test.program.configuration.projectList.mapper;
+
+import com.jeeplus.test.program.configuration.projectList.domain.ProgramArchive;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.program.configuration.projectList.service.dto.ProgramArchiveDto;
+import com.jeeplus.test.program.configuration.projectList.service.dto.ProgramAuditDto;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.program.configuration.projectList.domain.ProgramArchive
+ */
+@Mapper
+public interface ProgramArchiveMapper extends BaseMapper<ProgramArchive> {
+    ProgramArchiveDto findByIdArchive(String id);
+}
+
+
+
+

+ 119 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProgramArchiveMapper.xml

@@ -0,0 +1,119 @@
+<?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.program.configuration.projectList.mapper.ProgramArchiveMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.test.program.configuration.projectList.service.dto.ProgramArchiveDto">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="programId" column="program_id" jdbcType="VARCHAR"/>
+            <result property="year" column="year" jdbcType="VARCHAR"/>
+            <result property="programType" column="program_type" jdbcType="VARCHAR"/>
+            <result property="evaluationReportDate" column="evaluation_report_date" jdbcType="TIMESTAMP"/>
+            <result property="protocolNum" column="protocol_num" jdbcType="VARCHAR"/>
+            <result property="waystEvaluation" column="wayst_evaluation" jdbcType="VARCHAR"/>
+            <result property="fixedAssetsEvaluation" column="fixed_assets_evaluation" jdbcType="VARCHAR"/>
+            <result property="netAssetsEvaluation" column="net_assets_evaluation" jdbcType="VARCHAR"/>
+            <result property="rentEvaluation" column="rent_evaluation" jdbcType="VARCHAR"/>
+            <result property="forensics" column="forensics" jdbcType="VARCHAR"/>
+            <result property="reportCharges" column="report_charges" jdbcType="VARCHAR"/>
+            <result property="currentDisposePerson" column="current_dispose_person" jdbcType="VARCHAR"/>
+            <result property="isInvoice" column="is_invoice" jdbcType="VARCHAR"/>
+            <result property="invoiceDate" column="invoice_date" jdbcType="TIMESTAMP"/>
+            <result property="actualCharges" column="actual_charges" jdbcType="VARCHAR"/>
+            <result property="isContractArchive" column="is_contract_archive" jdbcType="VARCHAR"/>
+            <result property="isPapersIntact" column="is_papers_intact" jdbcType="VARCHAR"/>
+            <result property="isPapersArchive" column="is_papers_archive" jdbcType="VARCHAR"/>
+            <result property="opsAmount" column="ops_amount" jdbcType="VARCHAR"/>
+            <result property="isOpsReimbursement" column="is_ops_reimbursement" jdbcType="VARCHAR"/>
+            <result property="reimbursementAmount" column="reimbursement_amount" jdbcType="VARCHAR"/>
+            <result property="unreimbursedAmount" column="unreimbursed_amount" jdbcType="VARCHAR"/>
+            <result property="reimbursementNum" column="reimbursement_num" jdbcType="VARCHAR"/>
+            <result property="reimbursementDate" column="reimbursement_date" jdbcType="TIMESTAMP"/>
+            <result property="auditDate" column="audit_date" jdbcType="TIMESTAMP"/>
+            <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
+            <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
+            <result property="status" column="status" jdbcType="VARCHAR"/>
+            <result property="reportNo" column="report_no" jdbcType="VARCHAR"/>
+            <association property="programProjectListInfo" select="getProgram" javaType="com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo" column="program_id"></association>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        pa.id,
+        pa.create_by,
+        pa.create_date,
+        pa.update_by,
+        pa.update_date,
+        pa.del_flag,
+        pa.remarks,
+        pa.program_id,
+        pa.year,
+        pa.program_type,
+        pa.evaluation_report_date,
+        pa.protocol_num,
+        pa.wayst_evaluation,
+        pa.fixed_assets_evaluation,
+        pa.net_assets_evaluation,
+        pa.rent_evaluation,
+        pa.forensics,
+        pa.report_charges,
+        pa.current_dispose_person,
+        pa.is_invoice,
+        pa.invoice_date,
+        pa.actual_charges,
+        pa.is_contract_archive,
+        pa.is_papers_intact,
+        pa.is_papers_archive,
+        pa.ops_amount,
+        pa.is_ops_reimbursement,
+        pa.reimbursement_amount,
+        pa.unreimbursed_amount,
+        pa.reimbursement_num,
+        pa.reimbursement_date,
+        pa.proc_ins_id,
+        pa.process_definition_id,
+        pa.status,
+        pa.audit_date
+    </sql>
+    <sql id="Program_Column_List">
+        id,create_by,create_date,
+        update_by,update_date,del_flag,
+        contract_id,contract_name,client,
+        client_name,amount,contract_type,
+        name,no,project_type,
+        approval_no,company,project_mould,
+        property_holder,property_holder_name,location,
+        is_first,year_num,check_year,
+        project_manager,project_manager_name,report_type,
+        industry,enterprise_type,risk_level,
+        project_source,estimate,plan_end_time,
+        use_num,appointment,work_hours,
+        remarks,assessment_enterprise,assessment_enterprise_name,
+        link_num,relationship,assessment_way,
+        assessment_objective,assessment_date,num,
+        project_development,delegate_project_type,assessment_object,
+        work_begin_date,work_end_date,reporting_date,
+        is_have,is_influence,mode,
+        status,proc_ins_id,process_definition_id
+    </sql>
+    <select id="getProgram" resultType="com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo">
+        select
+        <include refid="Program_Column_List"></include>
+        from program_project_list_info ppli
+        where ppli.del_flag = '0' and id = #{program_id}
+    </select>
+    <select id="findByIdArchive" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>,
+        prn.report_no as report_no
+        from program_archive pa
+        left join program_report_no prn on prn.program_id = pa.program_id and prn.del_flag = '0'
+        where pa.del_flag = '0' and pa.id = #{id}
+    </select>
+</mapper>

+ 12 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

@@ -125,15 +125,23 @@
            pa2.proc_ins_id as procInsId2,
            pa3.status as status3,
            pa3.id as auditId3,
-           pa3.proc_ins_id as procInsId3
+           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
         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 program_report_no prn ON prn.program_id = a.id
-            LEFT JOIN program_audit pa1 ON pa1.program_id = a.id and pa1.audit_level = '1'
-            LEFT JOIN program_audit pa2 ON pa2.program_id = a.id and pa2.audit_level = '2'
-            LEFT JOIN program_audit pa3 ON pa3.program_id = a.id and pa3.audit_level = '3'
+            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>

+ 96 - 28
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/ProjectListService.java

@@ -15,9 +15,11 @@ import com.jeeplus.sys.utils.UserUtils;
 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.oss.service.OssService;
 import com.jeeplus.test.program.configuration.projectList.domain.*;
 import com.jeeplus.test.program.configuration.projectList.mapper.*;
 import com.jeeplus.test.program.configuration.projectList.service.dto.*;
+import com.jeeplus.test.program.configuration.projectList.service.mapstruct.ProgramArchiveWrapper;
 import com.jeeplus.test.program.configuration.projectList.service.mapstruct.ProgramAuditAssessPeopleWrapper;
 import com.jeeplus.test.program.configuration.projectList.service.mapstruct.ProgramAuditWrapper;
 import com.jeeplus.test.proofread.domain.ProofreadDetail;
@@ -49,7 +51,8 @@ public class ProjectListService {
     private WorkContractInfoMapper workContractInfoMapper;
     @Resource
     private OssServiceMapper ossServiceMapper;
-
+    @Resource
+    private OssService ossService;
     @Resource
     private SerialnumTplService serialnumTplService;
     @Resource
@@ -62,6 +65,8 @@ public class ProjectListService {
     private ProgramAuditAssessPeopleMapper programAuditAssessPeopleMapper;
     @Resource
     private ProofreadInfoService proofreadInfoService;
+    @Resource
+    private ProgramArchiveMapper programArchiveMapper;
 
     public String save(ProjectListDto dto) throws Exception{
         if (StringUtils.isNotEmpty(dto.getId())) {
@@ -136,9 +141,31 @@ public class ProjectListService {
         programAudit3.setProgramId(info.getId());
         programAudit3.setStatus("0");
         programAuditMapper.insert(programAudit3);
+        // 项目归档添加
+        ProgramArchive programArchive = new ProgramArchive();
+        programArchive.setProgramId(info.getId());
+        programArchive.setStatus("0");
+        programArchiveMapper.insert(programArchive);
         return id;
     }
 
+    public String saveFormArchive(ProgramArchiveDto programArchiveDto) {
+        ProgramArchive programArchive = ProgramArchiveWrapper.INSTANCE.toEntity(programArchiveDto);
+        if (StringUtils.isNotBlank(programArchive.getId())){
+            programArchiveMapper.updateById(programArchive);
+        }else{
+            programArchiveMapper.insert(programArchive);
+        }
+        if (ObjectUtil.isNotEmpty(programArchiveDto)) {
+            ossService.saveOrUpdateFileListFlag(programArchiveDto.getReportFileList(),programArchive.getId(),"report");
+            ossService.saveOrUpdateFileListFlag(programArchiveDto.getDetailFileList(),programArchive.getId(),"detail");
+            ossService.saveOrUpdateFileListFlag(programArchiveDto.getExplainFileList(),programArchive.getId(),"explain");
+            ossService.saveOrUpdateFileListFlag(programArchiveDto.getPapersFileList(),programArchive.getId(),"papers");
+            ossService.saveOrUpdateFileListFlag(programArchiveDto.getOtherFileList(),programArchive.getId(),"other");
+        }
+        return programArchive.getId();
+    }
+
     public String saveFormThree(ProgramAuditDto programAuditDto) {
         UserDTO userDTO = UserUtils.getCurrentUserDTO();
         ProgramAudit programAudit = ProgramAuditWrapper.INSTANCE.toEntity(programAuditDto);
@@ -149,33 +176,7 @@ public class ProjectListService {
         }
         if (ObjectUtil.isNotEmpty(programAuditDto)) {
             //附件
-            if (CollectionUtil.isNotEmpty(programAuditDto.getWorkAttachmentDtoList())) {
-                List<String> ids = programAuditDto.getWorkAttachmentDtoList().stream().filter(item -> {
-                    if (StringUtils.isNotBlank(item.getId())) {
-                        return true;
-                    }
-                    return false;
-                }).map(WorkAttachmentDto::getId).collect(Collectors.toList());
-                if(CollectionUtil.isNotEmpty(ids)){
-                    ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda()
-                            .eq(WorkAttachment::getAttachmentId, programAudit.getId())
-                            .notIn(WorkAttachment::getId,ids));
-                }else{
-                    ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda()
-                            .eq(WorkAttachment::getAttachmentId, programAudit.getId()));
-                }
-
-                List<WorkAttachmentDto> dtoList = programAuditDto.getWorkAttachmentDtoList().stream().filter(item -> {
-                    if (StringUtils.isNotBlank(item.getId())) {
-                        return false;
-                    }
-                    return true;
-                }).collect(Collectors.toList());
-
-                workContractService.saveFilesNew(dtoList, userDTO, programAudit.getId(),"program");
-            } else {
-                ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda().eq(WorkAttachment::getAttachmentId, programAudit.getId()));
-            }
+            ossService.saveOrUpdateFileList(programAuditDto.getWorkAttachmentDtoList(),programAudit.getId(),"program");
             //专业评估人员
             if (CollectionUtil.isNotEmpty(programAuditDto.getProgramAuditAssessPeopleDtoList())) {
                 programAuditAssessPeopleMapper.delete(new QueryWrapper<ProgramAuditAssessPeople>().lambda().eq(ProgramAuditAssessPeople::getAuditId,programAudit.getId()));
@@ -280,6 +281,65 @@ public class ProjectListService {
         return byIdAudit;
     }
 
+    public ProgramArchiveDto findByIdArchive(String id){
+        ProgramArchiveDto programArchiveDto = programArchiveMapper.findByIdArchive(id);
+        if(ObjectUtil.isNotEmpty(programArchiveDto)){
+            if(ObjectUtil.isNotEmpty(programArchiveDto.getProgramProjectListInfo())){
+                if(StringUtils.isNotBlank(programArchiveDto.getProgramProjectListInfo().getProjectManager())){
+                    UserDTO userDTO = UserUtils.get(programArchiveDto.getProgramProjectListInfo().getProjectManager());
+                    programArchiveDto.getProgramProjectListInfo().setOfficeId(userDTO.getOfficeDTO().getName());
+                }
+            }
+        }
+        // 查询附件信息 - 评估报告
+        List<WorkAttachmentDto> reportFileList = workContractInfoMapper.findByAttachmentIdAndFlag(id, "report");
+        if (CollectionUtils.isNotEmpty(reportFileList)) {
+            for (WorkAttachmentDto i : reportFileList) {
+                i.setCreateBy(UserUtils.get(i.getBy()));
+            }
+            programArchiveDto.setReportFileList(reportFileList);
+        }
+
+        // 查询附件信息 - 评估说明
+        List<WorkAttachmentDto> explainFileList = workContractInfoMapper.findByAttachmentIdAndFlag(id, "explain");
+        if (CollectionUtils.isNotEmpty(explainFileList)) {
+            for (WorkAttachmentDto i : explainFileList) {
+                i.setCreateBy(UserUtils.get(i.getBy()));
+            }
+            programArchiveDto.setExplainFileList(explainFileList);
+        }
+
+        // 查询附件信息 - 评估明细表
+        List<WorkAttachmentDto> detailFileList = workContractInfoMapper.findByAttachmentIdAndFlag(id, "detail");
+        if (CollectionUtils.isNotEmpty(detailFileList)) {
+            for (WorkAttachmentDto i : detailFileList) {
+                i.setCreateBy(UserUtils.get(i.getBy()));
+            }
+            programArchiveDto.setDetailFileList(detailFileList);
+        }
+
+        // 查询附件信息 - 评估操作计算底稿
+        List<WorkAttachmentDto> papersFileList = workContractInfoMapper.findByAttachmentIdAndFlag(id, "papers");
+        if (CollectionUtils.isNotEmpty(papersFileList)) {
+            for (WorkAttachmentDto i : papersFileList) {
+                i.setCreateBy(UserUtils.get(i.getBy()));
+            }
+            programArchiveDto.setPapersFileList(papersFileList);
+        }
+
+        // 查询附件信息 - 其他
+        List<WorkAttachmentDto> otherFileList = workContractInfoMapper.findByAttachmentIdAndFlag(id, "other");
+        if (CollectionUtils.isNotEmpty(otherFileList)) {
+            for (WorkAttachmentDto i : otherFileList) {
+                i.setCreateBy(UserUtils.get(i.getBy()));
+            }
+            programArchiveDto.setOtherFileList(otherFileList);
+        }
+
+
+        return programArchiveDto;
+    }
+
     public String deleteById(String id) {
         projectListMapper.deleteById(id);
         projectLinkMapper.deleteByInfoId(id);
@@ -308,6 +368,14 @@ public class ProjectListService {
         return "操作成功";
     }
 
+    public String updateStatusByArchiveId(ProjectListDto dto) {
+        ProgramArchive programArchive = new ProgramArchive();
+        programArchive.setId(dto.getId());
+        programArchive.setStatus(dto.getStatus());
+        programArchiveMapper.update(programArchive,new QueryWrapper<ProgramArchive>().lambda().eq(ProgramArchive::getId,programArchive.getId()));
+        return "操作成功";
+    }
+
     public IPage<ProgramProjectListInfo> list(Page<ProgramProjectListInfo> page, ProgramProjectListInfo info) throws Exception{
         QueryWrapper<ProgramProjectListInfo> wrapper = QueryWrapperGenerator.buildQueryCondition(info, ProgramProjectListInfo.class);
         wrapper.eq("a.del_flag", "0");

+ 210 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ProgramArchiveDto.java

@@ -0,0 +1,210 @@
+package com.jeeplus.test.program.configuration.projectList.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.test.oss.domain.WorkAttachment;
+import com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo;
+import com.jeeplus.test.workContract.service.dto.WorkAttachmentDto;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 新项目管理-项目登记-项目归档
+ * @TableName program_archive
+ */
+@Data
+public class ProgramArchiveDto extends BaseDTO {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 项目id
+     */
+    private String programId;
+
+    /**
+     * 年份
+     */
+    private String year;
+
+    /**
+     * 项目类型
+     */
+    private String programType;
+
+    /**
+     * 评估报告日
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date evaluationReportDate;
+
+    /**
+     * 协议号
+     */
+    private String protocolNum;
+
+    /**
+     * 废旧物资评估(万元)
+     */
+    private String waystEvaluation;
+
+    /**
+     * 固定资产评估(万元)
+     */
+    private String fixedAssetsEvaluation;
+
+    /**
+     * 净资产评估
+     */
+    private String netAssetsEvaluation;
+
+    /**
+     * 租金评估(万/年)
+     */
+    private String rentEvaluation;
+
+    /**
+     * 司法鉴定
+     */
+    private String forensics;
+
+    /**
+     * 报告收费(元)
+     */
+    private String reportCharges;
+
+    /**
+     * 当前处理人
+     */
+    private String currentDisposePerson;
+
+    /**
+     * 是否开票
+     */
+    private String isInvoice;
+
+    /**
+     * 开票日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date invoiceDate;
+
+    /**
+     * 预估/实际收费(万元)
+     */
+    private String actualCharges;
+
+    /**
+     * 合同是否存档
+     */
+    private String isContractArchive;
+
+    /**
+     * 底稿是否完好
+     */
+    private String isPapersIntact;
+
+    /**
+     * 底稿是否归档
+     */
+    private String isPapersArchive;
+
+    /**
+     * 报销外勤天数
+     */
+    private String opsAmount;
+
+    /**
+     * 外勤是否已经报销
+     */
+    private String isOpsReimbursement;
+
+    /**
+     * 已报销金额
+     */
+    private String reimbursementAmount;
+
+    /**
+     * 未报销金额
+     */
+    private String unreimbursedAmount;
+
+    /**
+     * 报销单号
+     */
+    private String reimbursementNum;
+
+    /**
+     * 报销日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date reimbursementDate;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     * 流程信息
+     */
+    private String processDefinitionId;
+
+    /**
+     * 状态
+     */
+    private String status;
+
+    /**
+     * 审核通过时间
+     */
+    private String auditDate;
+
+    /**
+     * 项目信息
+     */
+    private ProgramProjectListInfo programProjectListInfo;
+
+    /**
+     * 附件 - 评估报告
+     */
+    private List<WorkAttachmentDto> reportFileList;
+
+    /**
+     * 附件 - 评估说明
+     */
+    private List<WorkAttachmentDto> explainFileList;
+
+    /**
+     * 附件 - 评估明细表
+     */
+    private List<WorkAttachmentDto> detailFileList;
+
+    /**
+     * 附件 - 评估操作计算底稿
+     */
+    private List<WorkAttachmentDto> papersFileList;
+
+    /**
+     * 附件 - 其他
+     */
+    private List<WorkAttachmentDto> otherFileList;
+
+    /**
+     * 项目报告号
+     */
+    private String reportNo;
+
+    private static final long serialVersionUID = 1L;
+}

+ 17 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/mapstruct/ProgramArchiveWrapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.test.program.configuration.projectList.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.program.configuration.projectList.domain.ProgramArchive;
+import com.jeeplus.test.program.configuration.projectList.domain.ProgramAuditAssessPeople;
+import com.jeeplus.test.program.configuration.projectList.service.dto.ProgramArchiveDto;
+import com.jeeplus.test.program.configuration.projectList.service.dto.ProgramAuditAssessPeopleDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface ProgramArchiveWrapper extends EntityWrapper<ProgramArchiveDto, ProgramArchive>{
+
+        ProgramArchiveWrapper INSTANCE = Mappers.getMapper(ProgramArchiveWrapper.class);
+
+}

+ 68 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/controller/ProofreadIssuedController.java

@@ -0,0 +1,68 @@
+package com.jeeplus.test.proofread.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.test.proofread.domain.ProofreadIssued;
+import com.jeeplus.test.proofread.service.ProofreadIssuedService;
+import com.jeeplus.test.proofread.service.dto.ProofreadInfoDto;
+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;
+
+@RestController
+@Api(tags ="报告签发单")
+@RequestMapping(value = "/proofread/issued")
+public class ProofreadIssuedController {
+
+    @Resource
+    private ProofreadIssuedService service;
+
+    /**
+     * 新增/修改
+     * @param issued
+     * @return
+     */
+    @ApiOperation(value = "新增/修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody ProofreadIssued issued) {
+        String s = service.save(issued);
+        return ResponseUtil.newInstance().add("businessTable", "proofread_issued").add("businessId", s).ok ("操作成功");
+    }
+
+    /**
+     * 根据项目id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据项目id查询")
+    @GetMapping("/findById")
+    public ResponseEntity<ProofreadIssued> findById(String id) {
+        ProofreadIssued info = service.findById(id);
+        return ResponseEntity.ok(info);
+    }
+
+    /**
+     * 根据项目id查询初始化信息
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据项目id查询初始化信息")
+    @GetMapping("/findProjectInfoById")
+    public ResponseEntity<ProofreadIssued> findProjectInfoById(String id) {
+        ProofreadIssued info = service.findProjectInfoById(id);
+        return ResponseEntity.ok(info);
+    }
+
+    /**
+     * 根据项目id修改状态值
+     * @param issued
+     * @return
+     */
+    @ApiOperation(value = "根据项目id修改状态值")
+    @PostMapping("/updateStatusById")
+    public void updateStatusById(@RequestBody ProofreadIssued issued) {
+        service.updateStatusById(issued);
+    }
+}

+ 124 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/domain/ProofreadIssued.java

@@ -0,0 +1,124 @@
+package com.jeeplus.test.proofread.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+@TableName(value = "proofread_issued")
+public class ProofreadIssued extends BaseEntity {
+
+    /**
+     * 项目id
+     */
+    private String projectId;
+
+    /**
+     * 项目名称
+     */
+    @TableField(exist = false)
+    private String projectName;
+
+    /**
+     * 评估基准日
+     */
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date assessmentDate;
+
+    /**
+     * 报告文号
+     */
+    @TableField(exist = false)
+    private String reportNo;
+
+    /**
+     * 项目负责人id
+     */
+    @TableField(exist = false)
+    private String projectManager;
+
+    /**
+     * 项目负责人
+     */
+    @TableField(exist = false)
+    private String projectManagerName;
+
+    /**
+     * 所属部门
+     */
+    @TableField(exist = false)
+    private String department;
+
+    /**
+     * 是否填写台账
+     */
+    private String isTxtz;
+
+    /**
+     * 报告电子档是否归档
+     */
+    private String isBgdzdgd;
+
+    /**
+     * 是否需要备案
+     */
+    private String isXyba;
+
+    /**
+     * 是否完成备案
+     */
+    private String isWcba;
+
+    /**
+     * 用印类型
+     */
+    private String sealType;
+
+    /**
+     * 评估报告(份)
+     */
+    private String assessmentReport;
+
+    /**
+     * 评估说明(份)
+     */
+    private String assessmentExplain;
+
+    /**
+     * 评估明细表(份)
+     */
+    private String assessmentDetail;
+
+    /**
+     * 咨询报告(份)
+     */
+    private String consultingReport;
+
+    /**
+     * 审批状态
+     */
+    private String status;
+
+    /**
+     * 审批通过时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date agreeTime;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     * 流程类型
+     */
+    private String processDefinitionId;
+}

+ 15 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/mapper/ProofreadIssuedMapper.java

@@ -0,0 +1,15 @@
+package com.jeeplus.test.proofread.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.proofread.domain.ProofreadIssued;
+import org.apache.ibatis.annotations.Param;
+
+public interface ProofreadIssuedMapper extends BaseMapper<ProofreadIssued> {
+
+    ProofreadIssued findById(@Param("id")String id);
+
+    ProofreadIssued findProjectInfoById(@Param("id")String id);
+
+    void updateStatusById(@Param("id")String id, @Param("status")String status);
+
+}

+ 68 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/mapper/xml/ProofreadIssuedMapper.xml

@@ -0,0 +1,68 @@
+<?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.proofread.mapper.ProofreadIssuedMapper">
+
+	<select id="findById" resultType="com.jeeplus.test.proofread.domain.ProofreadIssued">
+		SELECT
+			a.id,
+			a.create_by,
+			a.create_date,
+			a.update_by,
+			a.update_date,
+			a.del_flag,
+			a.project_id,
+			b.`name` AS project_name,
+			b.assessment_date,
+			b.project_manager,
+			c.report_no,
+			d.`name` AS project_manager_name,
+			e.`name` AS department,
+			a.is_txtz,
+			a.is_bgdzdgd,
+			a.is_xyba,
+			a.is_wcba,
+			a.seal_type,
+			a.assessment_report,
+			a.assessment_explain,
+			a.assessment_detail,
+			a.consulting_report,
+			a.status,
+			a.agree_time,
+			a.proc_ins_id,
+			a.process_definition_id
+		FROM
+			proofread_issued a
+			LEFT JOIN program_project_list_info b ON a.project_id = b.id
+			LEFT JOIN program_report_no c ON b.id = c.program_id
+			LEFT JOIN sys_user d ON b.project_manager = d.id
+			LEFT JOIN sys_office e ON d.office_id = e.id
+		WHERE
+			a.del_flag = 0
+			AND a.project_id = #{id}
+	</select>
+
+	<select id="findProjectInfoById" resultType="com.jeeplus.test.proofread.domain.ProofreadIssued">
+		SELECT
+			b.id AS project_id,
+			b.`name` AS project_name,
+			b.assessment_date,
+			b.project_manager,
+			c.report_no,
+			d.`name` AS project_manager_name,
+			e.`name` AS department
+		FROM
+			program_project_list_info b
+			LEFT JOIN program_report_no c ON b.id = c.program_id
+			LEFT JOIN sys_user d ON b.project_manager = d.id
+			LEFT JOIN sys_office e ON d.office_id = e.id
+		WHERE
+			b.del_flag = 0
+			AND b.id = #{id}
+	</select>
+
+	<update id="updateStatusById">
+		update proofread_issued set status = #{status}
+		 where del_flag = 0 AND id = #{id}
+	</update>
+
+</mapper>

+ 67 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/proofread/service/ProofreadIssuedService.java

@@ -0,0 +1,67 @@
+package com.jeeplus.test.proofread.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.test.proofread.domain.ProofreadIssued;
+import com.jeeplus.test.proofread.mapper.ProofreadIssuedMapper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.UUID;
+
+@Service
+public class ProofreadIssuedService {
+
+    @Resource
+    private ProofreadIssuedMapper mapper;
+
+    public String save(ProofreadIssued issued){
+        ProofreadIssued byId = findById(issued.getProjectId());
+        if (byId != null) {
+            update(issued);
+            return byId.getId();
+        } else {
+            return add(issued);
+        }
+    }
+
+    public String add(ProofreadIssued issued) {
+        //获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        String id = issued.getProjectId();
+        issued.setId(id);
+        issued.setCreateBy(userDTO.getId());
+        issued.setCreateDate(new Date());
+        issued.setUpdateBy(userDTO.getId());
+        issued.setUpdateDate(new Date());
+        issued.setDelFlag(0);
+        mapper.insert(issued);
+        return id;
+    }
+
+    public void update(ProofreadIssued issued) {
+        //获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        issued.setUpdateBy(userDTO.getId());
+        issued.setUpdateDate(new Date());
+        LambdaQueryWrapper<ProofreadIssued> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ProofreadIssued::getProjectId, issued.getProjectId());
+        mapper.update(issued, wrapper);
+    }
+
+    public ProofreadIssued findById(String id) {
+        ProofreadIssued issued = mapper.findById(id);
+        return issued;
+    }
+
+    public ProofreadIssued findProjectInfoById(String id) {
+        ProofreadIssued issued = mapper.findProjectInfoById(id);
+        return issued;
+    }
+
+    public void updateStatusById(ProofreadIssued issued) {
+        mapper.updateStatusById(issued.getId(), issued.getStatus());
+    }
+}

+ 2 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/mapper/WorkContractInfoMapper.java

@@ -25,6 +25,8 @@ public interface WorkContractInfoMapper extends BaseMapper<WorkContractInfo> {
 
     List<WorkAttachmentDto> findDtos(@Param("id") String id);
 
+    List<WorkAttachmentDto> findByAttachmentIdAndFlag(@Param("attachmentId") String id,@Param("attachmentFlag") String attachmentFlag);
+
     void updateStatusById(@Param("id") String id, @Param("status")String status);
 
     IPage<ProgramProjectListInfo> relationProjectList(@Param("id") String id, Page<ProgramProjectListInfo> page);

+ 15 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/mapper/xml/WorkContractInfoMapper.xml

@@ -122,6 +122,21 @@
 			AND attachment_id = #{id}
 	</select>
 
+	<select id="findByAttachmentIdAndFlag" 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 = #{attachmentId}
+			And attachment_flag = #{attachmentFlag}
+	</select>
+
 	<update id="updateStatusById">
 		UPDATE work_contract_info SET `status` = #{status} WHERE del_flag = 0 AND id = #{id}
 	</update>