sangwenwei vor 1 Jahr
Ursprung
Commit
082372b1e7
24 geänderte Dateien mit 2025 neuen und 30 gelöschten Zeilen
  1. 145 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java
  2. 173 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProject.java
  3. 49 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProjectMembers.java
  4. 39 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMapper.java
  5. 14 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMemberMapper.java
  6. 9 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/JyProjectMemberMapper.xml
  7. 596 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml
  8. 15 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectMembersService.java
  9. 473 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java
  10. 179 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/dto/JyProjectDTO.java
  11. 5 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/JyWorkClientInfoMapper.java
  12. 14 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientInfoMapper.xml
  13. 2 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/controller/JyWorkContractController.java
  14. 18 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/domain/JyWorkContractInfo.java
  15. 7 12
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/xml/JyWorkContractInfoMapper.xml
  16. 18 14
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/JyWorkContractService.java
  17. 12 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/dto/JyWorkContractInfoDto.java
  18. 90 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectExecutionListener.java
  19. 12 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/AreaController.java
  20. 31 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  21. 3 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java
  22. 34 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml
  23. 35 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/AreaService.java
  24. 52 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

+ 145 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java

@@ -0,0 +1,145 @@
+package com.jeeplus.business.project.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.assess.program.configuration.projectList.service.dto.ContractDto;
+import com.jeeplus.assess.program.configuration.projectList.service.dto.ProjectListDto;
+import com.jeeplus.assess.workContract.domain.WorkContractInfo;
+import com.jeeplus.business.project.domain.JyProject;
+import com.jeeplus.business.project.service.JyProjectService;
+import com.jeeplus.business.project.service.dto.JyProjectDTO;
+import com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo;
+import com.jeeplus.business.workContractInfo.service.dto.JyWorkContractInfoDto;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Slf4j
+@Api(tags ="嘉溢项目登记")
+@RestController
+@RequestMapping(value = "/jyProject")
+public class JyProjectController {
+
+    @Resource
+    private JyProjectService jyProjectService;
+
+
+    /**
+     * 项目登记列表
+     * @param info
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation(value = "项目登记列表")
+    @GetMapping(value = "/list")
+    public ResponseEntity<IPage<JyProject>> list(JyProject info, Page<JyProject> page) throws Exception {
+        IPage<JyProject> list = jyProjectService.list(page, info);
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 查询当前登录人所属项目组的项目
+     * @return
+     */
+    @ApiOperation(value = "查询当前登录人所属项目组的项目")
+    @GetMapping(value = "/getHaveProjectIds")
+    public ResponseEntity<List<String>> getHaveProjectIds() {
+        return jyProjectService.getHaveProjectIds();
+    }
+
+    /**
+     * 合同信息列表查询
+     * @param dto
+     * @param page
+     * @return
+     */
+    @ApiOperation(value = "合同信息列表查询")
+    @GetMapping(value = "/findContractPageList")
+    public ResponseEntity<IPage<JyWorkContractInfo>> findContractPageList(JyWorkContractInfoDto dto, Page<JyWorkContractInfo> page) {
+        IPage<JyWorkContractInfo> pageList = jyProjectService.findContractPageList(dto, page);
+        return ResponseEntity.ok(pageList);
+    }
+
+    /**
+     * 流程保存
+     */
+    @ApiOperation(value = "流程保存")
+    @PostMapping(value = "/saveForm")
+    public ResponseEntity saveForm(@RequestBody JyProjectDTO jyProjectDTO) throws Exception{
+        String id = jyProjectService.save(jyProjectDTO);
+        return ResponseUtil.newInstance().add("businessTable", "jy_project_record").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping(value = "/findById")
+    public ResponseEntity<JyProjectDTO> save(@RequestParam String id){
+        JyProjectDTO dto = jyProjectService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody JyProjectDTO jyProjectDTO) {
+        jyProjectService.updateStatusById(jyProjectDTO);
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除")
+    @GetMapping(value = "/deleteById")
+    public ResponseEntity<String> deleteById(@RequestParam String id){
+        String s = jyProjectService.deleteById(id);
+        return ResponseEntity.ok(s);
+    }
+
+
+    /**
+     * 批量删除字典
+     */
+    @DemoMode
+    @ApiLog("批量删除项目信息")
+    @PreAuthorize("hasAuthority('jy_project:info:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String ids) {
+        String idArray[] = ids.split ( "," );
+        for(String id: idArray){
+            jyProjectService.deleteById ( id );
+        }
+        return ResponseEntity.ok ( "删除信息成功!" );
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}

+ 173 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProject.java

@@ -0,0 +1,173 @@
+package com.jeeplus.business.project.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+@TableName("jy_project_record")
+public class JyProject extends BaseEntity implements Serializable {
+    //项目编号(字典值)
+    public static final String BIZ_CODE = "36";
+
+
+    /**
+     * 项目名称
+     */
+    private String name;
+
+    /**
+     * 项目编号
+     */
+    private String no;
+
+    /**
+     * 合同id
+     */
+    private String contractId;
+
+    /**
+     * 登记状态
+     */
+    private String status;
+
+    /**
+     * 一审状态
+     */
+    private String firstInstanceStatus;
+
+    /**
+     * 二审状态
+     */
+    private String secondInstanceStatus;
+
+    /**
+     * 三审状态
+     */
+    private String thirdInstanceStatus;
+
+    /**
+     * 报告签发
+     */
+    private String reportIssuance;
+
+    /**
+     * 外审
+     */
+    private String outIssuance;
+
+    /**
+     * 报批签发
+     */
+    private String reportSubmit;
+
+    /**
+     * 归档状态
+     */
+    private String reviewStatus;
+
+    /**
+     * 合同情况(1:有合同  0:无合同)
+     */
+    private String contractStatus;
+
+    /**
+     * 项目所在地
+     */
+    private String projectPlace;
+
+    /**
+     * 建设地点
+     */
+    private String buildPlace;
+
+    /**
+     * 工程概况
+     */
+    private String projectOverview;
+
+    /**
+     * 特殊要求
+     */
+    private String special;
+
+
+    /*
+    流程id
+     */
+    private String procInsId;
+    private String processDefinitionId;
+
+    /**
+     * 关联合同下的项目排序
+     */
+    private String contractProjectNo;
+
+    /**
+     * 合同名称
+     */
+    private String contractName;
+
+    /**
+     * 委托方
+     */
+    private String client;
+
+    /**
+     * 委托方名称
+     */
+    private String clientName;
+
+    /**
+     * 项目负责人
+     */
+    private String projectLeader;
+    /**
+     * 创建时间
+     */
+    @TableField(exist = false)
+    private String[] createDates;
+
+    /**
+     * 创建人id
+     */
+    @TableField(exist = false)
+    private String createBy;
+
+    /**
+     * 项目登记  taskId
+     */
+    @TableField(exist = false)
+    private String taskId;
+
+    /**
+     * 数据审核人  项目登记
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds;
+
+    /**
+     * 著委托方
+     */
+    @TableField(exist = false)
+    private String primaryLinkman;
+
+    /**
+     * 合同参数
+     */
+    @TableField(exist = false)
+    private String contractAmount;
+    @TableField(exist = false)
+    private String contractType;
+    @TableField(exist = false)
+    private String contractTypeFirst;
+
+
+
+
+
+}

+ 49 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProjectMembers.java

@@ -0,0 +1,49 @@
+package com.jeeplus.business.project.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 项目管理-项目组成员
+ * @TableName program_members
+ */
+@TableName(value ="jy_project_members")
+@Data
+public class JyProjectMembers extends BaseEntity implements Serializable {
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 项目id
+     */
+    private String projectId;
+
+    /**
+     * 人员id
+     */
+    private String userId;
+
+    /**
+     * 状态  0为正常  1为移除
+     */
+    private String status;
+
+    /**
+     * 项目主要成员  1为主要成员 
+     */
+    private String isImportant;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    @TableField(exist = false)
+    private String name;
+
+}

+ 39 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMapper.java

@@ -0,0 +1,39 @@
+package com.jeeplus.business.project.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo;
+import com.jeeplus.business.project.domain.JyProject;
+import com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo;
+import com.jeeplus.business.workContractInfo.service.dto.JyWorkContractInfoDto;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+public interface JyProjectMapper extends BaseMapper<JyProject> {
+
+    IPage<JyProject> findPageList(Page<JyProject> page, @Param(Constants.WRAPPER) QueryWrapper<JyProject> wrapper);
+
+    List<String> getHaveProjectIds(@Param("currentUser")UserDTO userDTO);
+
+    IPage<JyWorkContractInfo> findContractPageList(Page<JyWorkContractInfo> page, @Param("dto") JyWorkContractInfoDto dto);
+
+    Integer getProByContractId(@Param("contractId")String contractId);
+
+    JyProject getById(String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<WorkAttachmentInfo> findFileList(@Param("id") String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    Integer findIsExit(@Param("id") String id, @Param("name")String name);
+
+    void updateStatusById(@Param("id") String id, @Param("status")String status);
+}

+ 14 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMemberMapper.java

@@ -0,0 +1,14 @@
+package com.jeeplus.business.project.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import com.jeeplus.business.project.domain.JyProjectMembers;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface JyProjectMemberMapper extends BaseMapper<JyProjectMembers> {
+
+    void deleteByInfoId(@Param("id") String id);
+
+}

+ 9 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/JyProjectMemberMapper.xml

@@ -0,0 +1,9 @@
+<?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.business.project.mapper.JyProjectMemberMapper">
+
+   <delete id="deleteByInfoId">
+       UPDATE jy_project_members SET del_flag = 1 WHERE del_flag = 0 AND project_id = #{id}
+   </delete>
+
+</mapper>

+ 596 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml

@@ -0,0 +1,596 @@
+<?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.business.project.mapper.JyProjectMapper">
+
+   <select id="findContractPageList" resultType="com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo">
+       SELECT
+       a.id,
+       a.create_time,
+       a.update_by_id,
+       a.update_time,
+       a.del_flag,
+       a.client_id,
+       a.client_name,
+       a.`no`,
+       a.`name`,
+       DATE_FORMAT(a.contract_date,'%Y-%m-%d') as contract_date,
+       a.effective_date,
+       a.closing_date,
+       a.contract_type as contractType,
+       (SELECT dv.label FROM `sys_dict_value` dv
+       LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id
+       where dt.type='jy_contract_type_up' and a.contract_type_first=dv.value) as contractTypeFirst,
+       a.contract_amount_type,
+       a.contract_amount,
+       a.contract_opposite,
+       a.contract_fee,
+       a.fees,
+       a.payment_describe,
+       a.contract_special,
+       a.remarks,
+       a.filed_by,
+       a.filed_date,
+       a.filed_no,
+       a.filed_remarks,
+       a.proc_ins_id,
+       a.process_definition_id,
+       a.status,
+       a.create_by_id as create_id,
+       a.filed_type,
+       a.primary_linkman,
+           b.NAME AS create_by_id,
+           ci.id as linkmanId
+        FROM
+            jy_work_contract_info a
+            LEFT JOIN sys_user b ON a.create_by_id = b.id
+            left join jy_work_client_info ci on ci.name= a.primary_linkman
+            left join jy_work_client_linkman cl on ci.id=cl.client_id
+        WHERE
+            a.del_flag = 0
+            and a.filed_type != 1
+            <if test="dto.createBy.id != null and dto.createBy.id != ''">
+                AND a.create_by_id = #{dto.createBy.id}
+            </if>
+           <if test="dto.contractName != null and dto.contractName != ''">
+               AND a.name LIKE CONCAT ('%', #{dto.contractName}, '%')
+           </if>
+           <if test="dto.primaryLinkman != null and dto.primaryLinkman != ''">
+               AND a.primary_linkman LIKE CONCAT ('%', #{dto.primaryLinkman}, '%')
+           </if>
+            ORDER BY a.create_time DESC,cl.create_time DESC
+   </select>
+
+    <update id="updateStatusById">
+        UPDATE jy_project_record SET `status` = #{status} WHERE id = #{id}
+    </update>
+
+    <select id="findPageList" resultType="com.jeeplus.business.project.domain.JyProject">
+        SELECT
+        distinct
+           a.id,
+           a.create_by_id as create_by,
+           a.create_time,
+           a.update_by_id,
+           a.update_time,
+           a.del_flag,
+           a.name,
+           a.no,
+           a.contract_id,
+           a.contract_name,
+           a.client,
+           a.client_name,
+           a.status,
+           a.first_instance_status,
+           a.second_instance_status,
+           a.third_instance_status,
+           a.report_issuance,
+           a.out_instance,
+           a.reports_submit,
+           a.review_status,
+           a.contract_status,
+           a.project_place,
+           a.build_place,
+           a.project_overview,
+           a.special,
+           a.contract_project_no,
+           (select name from sys_user where id=a.project_leader) as projectLeader,
+           a.proc_ins_id,
+           a.process_definition_id,
+           b.name AS create_by_id,
+           art.ID_ as taskId,
+           wci.primary_linkman as primaryLinkman
+        FROM
+            jy_project_record a
+            LEFT JOIN sys_user b ON a.create_by_id = b.id
+            LEFT JOIN sys_user c ON a.project_leader = c.id
+            LEFT JOIN jy_work_contract_info wci ON wci.id = a.contract_id and wci.del_flag = '0'
+            left join jy_project_members pm on a.id = pm.project_id
+            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="getById" resultType="com.jeeplus.business.project.domain.JyProject">
+        SELECT
+           a.id,
+           a.create_by_id as create_by,
+           a.create_time,
+           a.update_by_id,
+           a.update_time,
+           a.del_flag,
+           a.name,
+           a.no,
+           a.contract_id,
+           a.contract_name,
+           a.client,
+           a.client_name,
+           a.status,
+           a.first_instance_status,
+           a.second_instance_status,
+           a.third_instance_status,
+           a.report_issuance,
+           a.out_instance,
+           a.reports_submit,
+           a.review_status,
+           a.contract_status,
+           a.project_place,
+           a.build_place,
+           a.project_overview,
+           a.special,
+           a.contract_project_no,
+           a.project_leader,
+           a.proc_ins_id,
+           a.process_definition_id,
+           b.name AS create_by_id,
+           art.ID_ as taskId,
+           wci.primary_linkman as primaryLinkman,
+           wci.contract_amount,
+           wci.contract_type,
+           (SELECT dv.label FROM `sys_dict_value` dv
+			LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id
+			where dt.type='jy_contract_type_up' and wci.contract_type_first=dv.value) as contractTypeFirst
+        FROM
+            jy_project_record a
+            LEFT JOIN sys_user b ON a.create_by_id = b.id
+            LEFT JOIN sys_user c ON a.project_leader = c.id
+            LEFT JOIN jy_work_contract_info wci ON wci.id = a.contract_id and wci.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="findList" resultType="com.jeeplus.assess.program.configuration.projectList.service.dto.ExportFileDto">
+        SELECT
+            (@i:=@i+1) AS `no`,
+            tab.*
+        FROM
+            (SELECT
+                b.`year`,
+                d.`name` AS client_name,
+                a.`name`,
+                a.assessment_objective,
+                a.assessment_object,
+                a.assessment_range,
+                a.project_mould as program_type,
+                DATE_FORMAT(a.assessment_date,'%Y-%m-%d') AS assessment_date,
+                DATE_FORMAT(b.evaluation_report_date, '%Y-%m-%d') as "evaluation_report_date",
+                b.protocol_num,
+                c.no as contract_num,
+                e.report_no,
+                f.`name` AS project_manager_name,
+                g.`name` AS signature_evaluator_first,
+                h.`name` AS signature_evaluator_second,
+                b.wayst_evaluation,
+                b.fixed_assets_evaluation,
+                b.net_assets_evaluation,
+                b.rent_evaluation,
+                b.forensics,
+                b.report_charges,
+                i.name as current_dispose_person,
+                (CASE b.is_invoice WHEN 0 THEN "否" WHEN 1 THEN "是" ELSE "" END) AS is_invoice,
+                DATE_FORMAT(b.invoice_date,'%Y-%m-%d') AS invoice_date,
+                (CASE b.is_contract_archive WHEN 0 THEN "否" WHEN 1 THEN "是" ELSE "" END) AS is_contract_archive,
+                (CASE b.is_papers_intact WHEN 0 THEN "否" WHEN 1 THEN "是" ELSE "" END) AS is_papers_intact,
+                (CASE b.is_papers_archive WHEN 0 THEN "否" WHEN 1 THEN "是" ELSE "" END) AS is_papers_archive
+            FROM
+                program_project_list_info a
+                LEFT JOIN program_archive b ON a.id = b.program_id
+                LEFT JOIN work_contract_info c ON a.contract_id = c.id
+                LEFT JOIN work_client_info d ON c.client_id = d.id
+                LEFT JOIN program_report_no e ON a.id = e.program_id
+                LEFT JOIN sys_user f ON a.project_manager = f.id
+                LEFT JOIN sys_user i ON b.current_dispose_person = i.id
+                LEFT JOIN sys_user g ON b.signature_evaluator_first = g.id
+                LEFT JOIN sys_user h ON b.signature_evaluator_second = h.id
+            WHERE a.del_flag = 0
+            <if test="infoList != null">
+                AND a.id IN
+                <foreach collection="infoList" item="item" index="index" open="(" close=")" separator=",">
+                    #{item.id}
+                </foreach>
+            </if>
+            ORDER BY a.create_time DESC) AS tab
+            ,(SELECT @i:=0) AS itable
+    </select>
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="createById" column="create_by_id" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateById" column="update_by_id" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
+        <result property="contractId" column="contract_id" jdbcType="VARCHAR"/>
+        <result property="contractName" column="contract_name" jdbcType="VARCHAR"/>
+        <result property="client" column="client" jdbcType="VARCHAR"/>
+        <result property="clientName" column="client_name" jdbcType="VARCHAR"/>
+        <result property="amount" column="amount" jdbcType="VARCHAR"/>
+        <result property="contractType" column="contract_type" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="no" column="no" jdbcType="VARCHAR"/>
+        <result property="projectType" column="project_type" jdbcType="VARCHAR"/>
+        <result property="approvalNo" column="approval_no" jdbcType="VARCHAR"/>
+        <result property="company" column="company" jdbcType="VARCHAR"/>
+        <result property="projectMould" column="project_mould" jdbcType="VARCHAR"/>
+        <result property="propertyHolder" column="property_holder" jdbcType="VARCHAR"/>
+        <result property="propertyHolderName" column="property_holder_name" jdbcType="VARCHAR"/>
+        <result property="location" column="location" jdbcType="VARCHAR"/>
+        <result property="isFirst" column="is_first" jdbcType="VARCHAR"/>
+        <result property="yearNum" column="year_num" jdbcType="VARCHAR"/>
+        <result property="checkYear" column="check_year" jdbcType="VARCHAR"/>
+        <result property="projectManager" column="project_manager" jdbcType="VARCHAR"/>
+        <result property="projectManagerName" column="project_manager_name" jdbcType="VARCHAR"/>
+        <result property="reportType" column="report_type" jdbcType="VARCHAR"/>
+        <result property="industry" column="industry" jdbcType="VARCHAR"/>
+        <result property="enterpriseType" column="enterprise_type" jdbcType="VARCHAR"/>
+        <result property="riskLevel" column="risk_level" jdbcType="VARCHAR"/>
+        <result property="projectSource" column="project_source" jdbcType="VARCHAR"/>
+        <result property="estimate" column="estimate" jdbcType="DECIMAL"/>
+        <result property="planEndTime" column="plan_end_time" jdbcType="TIMESTAMP"/>
+        <result property="useNum" column="use_num" jdbcType="INTEGER"/>
+        <result property="appointment" column="appointment" jdbcType="INTEGER"/>
+        <result property="workHours" column="work_hours" jdbcType="DOUBLE"/>
+        <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+        <result property="assessmentEnterprise" column="assessment_enterprise" jdbcType="VARCHAR"/>
+        <result property="assessmentEnterpriseName" column="assessment_enterprise_name" jdbcType="VARCHAR"/>
+        <result property="linkNum" column="link_num" jdbcType="VARCHAR"/>
+        <result property="relationship" column="relationship" jdbcType="VARCHAR"/>
+        <result property="assessmentWay" column="assessment_way" jdbcType="VARCHAR"/>
+        <result property="assessmentObjective" column="assessment_objective" jdbcType="VARCHAR"/>
+        <result property="assessmentDate" column="assessment_date" jdbcType="TIMESTAMP"/>
+        <result property="num" column="num" jdbcType="DECIMAL"/>
+        <result property="projectDevelopment" column="project_development" jdbcType="VARCHAR"/>
+        <result property="delegateProjectType" column="delegate_project_type" jdbcType="VARCHAR"/>
+        <result property="assessmentObject" column="assessment_object" jdbcType="VARCHAR"/>
+        <result property="workBeginDate" column="work_begin_date" jdbcType="TIMESTAMP"/>
+        <result property="workEndDate" column="work_end_date" jdbcType="TIMESTAMP"/>
+        <result property="reportingDate" column="reporting_date" jdbcType="TIMESTAMP"/>
+        <result property="isHave" column="is_have" jdbcType="VARCHAR"/>
+        <result property="isInfluence" column="is_influence" jdbcType="VARCHAR"/>
+        <result property="mode" column="mode" jdbcType="VARCHAR"/>
+        <result property="status" column="status" jdbcType="VARCHAR"/>
+        <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
+        <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        ppli.id,
+        ppli.create_by_id,
+        ppli.create_time,
+        ppli.update_by_id,
+        ppli.update_time,
+        ppli.del_flag,
+        ppli.contract_id,
+        ppli.contract_name,
+        ppli.client,
+        ppli.client_name,
+        ppli.amount,
+        ppli.contract_type,
+        ppli.name,
+        ppli.no,
+        ppli.project_type,
+        ppli.approval_no,
+        ppli.company,
+        ppli.project_mould,
+        ppli.property_holder,
+        ppli.property_holder_name,
+        ppli.location,
+        ppli.is_first,
+        ppli.year_num,
+        ppli.check_year,
+        ppli.project_manager,
+        ppli.project_manager_name,
+        ppli.report_type,
+        ppli.industry,
+        ppli.enterprise_type,
+        ppli.risk_level,
+        ppli.project_source,
+        ppli.estimate,
+        ppli.plan_end_time,
+        ppli.use_num,
+        ppli.appointment,
+        ppli.work_hours,
+        ppli.remarks,
+        ppli.assessment_enterprise,
+        ppli.assessment_enterprise_name,
+        ppli.link_num,
+        ppli.relationship,
+        ppli.assessment_way,
+        ppli.assessment_objective,
+        ppli.assessment_date,
+        ppli.num,
+        ppli.project_development,
+        ppli.delegate_project_type,
+        ppli.assessment_object,
+        ppli.work_begin_date,
+        ppli.work_end_date,
+        ppli.reporting_date,
+        ppli.is_have,
+        ppli.is_influence,
+        ppli.mode,
+        ppli.status,
+        ppli.proc_ins_id,
+        ppli.process_definition_id
+    </sql>
+    <select id="findPage" resultType="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
+        SELECT
+        <include refid="Base_Column_List"></include>,
+        su.name AS create_by_id,
+        sup.name as project_manager_name,
+        ppli.create_by_id as create_by
+        FROM
+            program_project_list_info ppli
+            LEFT JOIN sys_user su ON ppli.create_by_id = su.id
+            LEFT JOIN sys_user sup ON ppli.project_manager = su.id
+            LEFT JOIN
+            ${ew.customSqlSegment}
+            ORDER BY ppli.create_time DESC
+    </select>
+
+    <select id="selectInvoiceFlag" resultType="string">
+        select
+            case
+                 when fi.status = '1' then '开票中'
+                 when fi.status = '2' then '开票中'
+                 when fi.status = '3' then '开票中'
+                 when fi.status = '4' then '开票中'
+                 when fi.status = '5' then '已开票'
+                 when fi.status = '6' then '已开票'
+                 when fi.status = '7' then '已开票'
+                 when fi.status = '8' then '已开票'
+            else '' end
+        from finance_invoice_base fib
+        inner join finance_invoice fi on fi.id = fib.invoice_id and fi.del_flag = '0'
+        where fib.del_flag = '0' and fi.status != '9' and fib.program_id = #{id}
+        order by fi.create_time desc
+        limit 1
+    </select>
+
+    <select id="getHaveProjectIds" resultType="string">
+        select
+            pm.project_id
+        from jy_project_members pm
+        where pm.user_id = #{currentUser.id} and pm.del_flag = '0'
+    </select>
+
+    <select id="getListByidList" resultType="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
+        SELECT
+        a.id,
+        a.contract_id,
+        a.contract_name,
+        a.client,
+        a.client_name,
+        a.amount,
+        a.contract_type,
+        a.NAME,
+        a.NO,
+        a.project_type,
+        a.approval_no,
+        a.company,
+        a.project_mould,
+        a.property_holder,
+        a. property_holder_name,
+        a.location,
+        a.is_first,
+        a.year_num,
+        a.check_year,
+        a.project_manager,
+        a.project_manager_name,
+        a.report_type,
+        a.industry,
+        a.enterprise_type,
+        a.risk_level,
+        a.project_source,
+        a.estimate,
+        a.plan_end_time,
+        a.use_num,
+        a.appointment,
+        a. work_hours,
+        a.remarks,
+        a.assessment_enterprise,
+        a.assessment_enterprise_name,
+        a.link_num,
+        a.relationship,
+        a.assessment_way,
+        a.assessment_objective,
+        a.assessment_date,
+        a.num,
+        a.project_development,
+        a.delegate_project_type,
+        a.assessment_object,
+        a.assessment_range,
+        a.generate_report_number,
+        a.work_begin_date,
+        a.work_end_date,
+        a.reporting_date,
+        a.is_have,
+        a.is_influence,
+        a.MODE,
+        a.STATUS,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.agree_time,
+        a.agree_user_id,
+        a.tab_type,
+        a.create_time,
+        a.create_by_id,
+        a.update_time,
+        a.update_by_id,
+        a.del_flag,
+        a.tenant_id,
+        pa1.id as auditId1,
+        pa2.id as auditId2,
+        pa3.id as auditId3,
+        pa.id as archive_id
+        from
+            program_project_list_info a
+        LEFT JOIN program_report_no prn ON prn.program_id = a.id and prn.del_flag = '0'
+        LEFT JOIN program_audit pa1 ON pa1.program_id = a.id and pa1.audit_level = '1' and pa1.del_flag = '0'
+        LEFT JOIN program_audit pa2 ON pa2.program_id = a.id and pa2.audit_level = '2' and pa2.del_flag = '0'
+        LEFT JOIN program_audit pa3 ON pa3.program_id = a.id and pa3.audit_level = '3' and pa3.del_flag = '0'
+        LEFT JOIN program_archive pa ON pa.program_id = a.id and pa.del_flag = '0'
+        <where>
+            a.del_flag = 0
+            and a.id in
+            <foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
+                #{id}
+            </foreach>
+        </where>
+    </select>
+    <select id="getOverdueFilingProjectList"
+            resultType="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
+        SELECT
+        distinct
+        a.id,
+        a.create_by_id AS create_by,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.contract_id,
+        a.contract_name,
+        a.client,
+        a.client_name,
+        a.amount,
+        a.contract_type,
+        a.name,
+        a.no,
+        a.project_type,
+        a.approval_no,
+        a.company,
+        a.project_mould,
+        a.property_holder,
+        a.property_holder_name,
+        a.location,
+        a.is_first,
+        a.year_num,
+        a.check_year,
+        a.project_manager,
+        c.name AS project_manager_name,
+        a.report_type,
+        a.industry,
+        a.enterprise_type,
+        a.risk_level,
+        a.project_source,
+        a.estimate,
+        a.plan_end_time,
+        a.use_num,
+        a.appointment,
+        a.work_hours,
+        a.remarks,
+        a.assessment_enterprise,
+        a.assessment_enterprise_name,
+        a.link_num,
+        a.relationship,
+        a.assessment_way,
+        a.assessment_objective,
+        a.assessment_date,
+        a.num,
+        a.project_development,
+        a.delegate_project_type,
+        a.assessment_object,
+        a.work_begin_date,
+        a.work_end_date,
+        a.reporting_date,
+        a.is_have,
+        a.is_influence,
+        a.mode,
+        a.status,
+        a.proc_ins_id,
+        a.process_definition_id,
+        prn.report_no,
+        pa1.status as status1,
+        pa1.id as auditId1,
+        pa1.proc_ins_id as procInsId1,
+        pa2.status as status2,
+        pa2.id as auditId2,
+        pa2.proc_ins_id as procInsId2,
+        pa3.status as status3,
+        pa3.id as auditId3,
+        pa3.proc_ins_id as procInsId3,
+        pa.status as archive_status,
+        pa.id as archive_id,
+        pa.proc_ins_id as procInsIdArchive,
+        d.id AS issued_id,
+        d.proc_ins_id AS procInsId4,
+        d.status AS issued_status,
+        d.agree_time AS agree_time,
+        wci.no AS contract_no,
+        art.ID_ as task_id,
+        art1.ID_ as task_id_audit1,
+        art2.ID_ as task_id_audit2,
+        art3.ID_ as task_id_audit3,
+        artd.ID_ as task_id_issued,
+        art_archive.ID_ as task_id_archive
+        FROM
+        program_project_list_info a
+        LEFT JOIN sys_user b ON a.create_by_id = b.id
+        LEFT JOIN sys_user c ON a.project_manager = c.id
+        LEFT JOIN work_contract_info wci ON wci.id = a.contract_id and wci.del_flag = '0'
+        LEFT JOIN program_report_no prn ON prn.program_id = a.id and prn.del_flag = '0'
+        LEFT JOIN program_audit pa1 ON pa1.program_id = a.id and pa1.audit_level = '1' and pa1.del_flag = '0'
+        LEFT JOIN program_audit pa2 ON pa2.program_id = a.id and pa2.audit_level = '2' and pa2.del_flag = '0'
+        LEFT JOIN program_audit pa3 ON pa3.program_id = a.id and pa3.audit_level = '3' and pa3.del_flag = '0'
+        LEFT JOIN program_archive pa ON pa.program_id = a.id and pa.del_flag = '0'
+        left join program_members pm on a.id = pm.project_id
+        LEFT JOIN proofread_issued d ON a.id = d.project_id
+        LEFT JOIN act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+        LEFT JOIN act_ru_task art1 ON pa1.proc_ins_id = art1.PROC_INST_ID_
+        LEFT JOIN act_ru_task art2 ON pa2.proc_ins_id = art2.PROC_INST_ID_
+        LEFT JOIN act_ru_task art3 ON pa3.proc_ins_id = art3.PROC_INST_ID_
+        LEFT JOIN act_ru_task artd ON d.proc_ins_id = artd.PROC_INST_ID_
+        LEFT JOIN act_ru_task art_archive ON pa.proc_ins_id = art_archive.PROC_INST_ID_
+        <where>
+            a.del_flag = 0
+            and (pa.status is null or (pa.status != 5 and pa.status != 7))
+            and d.status = 5 and d.agree_time &lt;= #{threeDayAgo}
+        </where>
+        ORDER BY a.update_time DESC
+    </select>
+    <select id="getOverArchiveFlag" resultType="java.lang.Integer">
+        select count(id) from program_archive
+        where over_archive_status =1 and status != 7 and create_by_id = #{currentUser.id}
+    </select>
+
+    <select id="getProByContractId" resultType="java.lang.Integer">
+        select count(id) from jy_project_record
+        where contract_id=#{contractId}
+    </select>
+
+    <select id="findFileList" resultType="com.jeeplus.sys.domain.WorkAttachmentInfo">
+		SELECT * FROM work_attachment WHERE del_flag = 0 AND attachment_id = #{id}
+	</select>
+
+    <select id="findIsExit" resultType="java.lang.Integer">
+		SELECT
+			COUNT( 0 )
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+			AND attachment_name = #{name}
+	</select>
+
+
+</mapper>

+ 15 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectMembersService.java

@@ -0,0 +1,15 @@
+package com.jeeplus.business.project.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.assess.program.configuration.projectList.mapper.ProgramMembersMapper;
+import com.jeeplus.business.project.domain.JyProjectMembers;
+import com.jeeplus.business.project.mapper.JyProjectMemberMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class JyProjectMembersService extends ServiceImpl<JyProjectMemberMapper, JyProjectMembers> {
+
+    @Autowired
+    private ProgramMembersMapper programMembersMapper;
+}

+ 473 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java

@@ -0,0 +1,473 @@
+package com.jeeplus.business.project.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.assess.program.configuration.projectList.domain.*;
+import com.jeeplus.assess.program.configuration.projectList.service.dto.ProgramReportNoDto;
+import com.jeeplus.assess.program.configuration.projectList.service.dto.ProjectListDto;
+import com.jeeplus.assess.workContract.domain.WorkContractInfo;
+import com.jeeplus.assess.workContract.service.WorkContractService;
+import com.jeeplus.assess.workContract.service.dto.WorkContractInfoDto;
+import com.jeeplus.business.project.domain.JyProject;
+import com.jeeplus.business.project.domain.JyProjectMembers;
+import com.jeeplus.business.project.mapper.JyProjectMapper;
+import com.jeeplus.business.project.mapper.JyProjectMemberMapper;
+import com.jeeplus.business.project.service.dto.JyProjectDTO;
+import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
+import com.jeeplus.business.workClientInfo.mapper.JyWorkClientInfoMapper;
+import com.jeeplus.business.workClientInfo.mapper.JyWorkClientLinkmanMapper;
+import com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo;
+import com.jeeplus.business.workContractInfo.mapper.JyWorkContractInfoMapper;
+import com.jeeplus.business.workContractInfo.service.JyWorkContractService;
+import com.jeeplus.business.workContractInfo.service.dto.JyWorkContractInfoDto;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.sys.domain.DictValue;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.mapper.DictValueMapper;
+import com.jeeplus.sys.service.DictValueService;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class JyProjectService {
+
+    @Autowired
+    private JyProjectMapper jyProjectMapper;
+
+    @Autowired
+    private IFlowableApi flowTaskService;
+
+    @Autowired
+    private JyWorkContractInfoMapper jyWorkContractInfoMapper;
+
+    @Autowired
+    private JyWorkClientInfoMapper jyWorkClientInfoMapper;
+
+    @Autowired
+    private JyProjectMemberMapper jyProjectMemberMapper;
+
+
+    @Autowired
+    private JyWorkClientLinkmanMapper jyWorkClientLinkmanMapper;
+
+    @Autowired
+    private JyWorkContractService jyWorkContractService;
+
+    @Autowired
+    private DictValueMapper dictValueMapper;
+
+
+    /**
+     * 项目登记列表
+     * @param page
+     * @param info
+     * @return
+     */
+    public IPage<JyProject> list(Page<JyProject> page, JyProject info) throws Exception {
+        QueryWrapper<JyProject> wrapper = QueryWrapperGenerator.buildQueryCondition(info, JyProject.class);
+        if (ObjectUtil.isNotEmpty(info) && StringUtils.isNotBlank(info.getCreateById())) {
+            wrapper.eq("a.create_by_id", info.getCreateById());
+        }
+        wrapper.eq("a.del_flag", "0");
+        //创建时间
+        if (info.getCreateDates() != null && info.getCreateDates().length > 0) {
+            wrapper.between("a.create_time", info.getCreateDates()[0], info.getCreateDates()[1]);
+        }
+        //一审状态
+        if (StringUtils.isNotBlank(info.getFirstInstanceStatus())){
+            wrapper.eq("a.first_instance_status", info.getFirstInstanceStatus());
+        }
+        //二审状态
+        if (StringUtils.isNotBlank(info.getSecondInstanceStatus())){
+            wrapper.eq("a.second_instance_status", info.getSecondInstanceStatus());
+        }
+        //三审状态
+        if (StringUtils.isNotBlank(info.getThirdInstanceStatus())){
+            wrapper.eq("a.third_instance_status", info.getThirdInstanceStatus());
+        }
+        //项目编号
+        if (StringUtils.isNotBlank(info.getNo())){
+            wrapper.like("a.no",info.getNo());
+        }
+        //项目名称
+        if (StringUtils.isNotBlank(info.getName())){
+            wrapper.like("a.name",info.getName());
+        }
+        //项目负责人
+        if (StringUtils.isNotBlank(info.getProjectLeader())){
+            wrapper.like("a.project_leader",info.getProjectLeader());
+        }
+        //合同名称
+        if (StringUtils.isNotBlank(info.getContractName())){
+            wrapper.like("a.contract_name",info.getContractName());
+        }
+        //委托方
+        if (StringUtils.isNotBlank(info.getClientName())){
+            wrapper.like("a.client_name",info.getClientName());
+        }
+        //登记状态
+        if (StringUtils.isNotBlank(info.getStatus())){
+            wrapper.eq("a.status", info.getStatus());
+        }
+        //报告签发
+        if (StringUtils.isNotBlank(info.getReportIssuance())){
+            wrapper.eq("a.report_issuance", info.getReportIssuance());
+        }
+        //外审
+        if (StringUtils.isNotBlank(info.getOutIssuance())){
+            wrapper.eq("a.out_issuance", info.getOutIssuance());
+        }
+        //报批签发
+        if (StringUtils.isNotBlank(info.getReportSubmit())){
+            wrapper.eq("a.report_submit", info.getReportSubmit());
+        }
+        //归档状态
+        if (StringUtils.isNotBlank(info.getReviewStatus())){
+            wrapper.eq("a.review_status", info.getReviewStatus());
+        }
+        IPage<JyProject> pageList = jyProjectMapper.findPageList(page, wrapper);
+        pageList.getRecords().stream().forEach(item ->{
+            // 项目登记
+            if (StringUtils.isNotBlank(item.getTaskId()) && StringUtils.isNotBlank(item.getStatus())) {
+                if ("2".equals(item.getStatus())) { // “审核中”的数据要获取数据审核人
+                    item.setAuditUserIds(flowTaskService.getTaskAuditUsers(item.getTaskId()));  // 获取数据审核人
+                }
+            }
+            //合同名称
+            if (StringUtils.isEmpty(item.getContractName())){
+                item.setContractName("暂无合同");
+            }
+        });
+        return pageList;
+    }
+
+    /**
+     * 查询当前登录人所属项目组的项目
+     * @return
+     */
+    public ResponseEntity<List<String>> getHaveProjectIds() {
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        return ResponseEntity.ok(jyProjectMapper.getHaveProjectIds(userDTO));
+    }
+
+    public IPage<JyWorkContractInfo> findContractPageList(JyWorkContractInfoDto dto, Page<JyWorkContractInfo> page) {
+        IPage<JyWorkContractInfo> contractPageList = jyProjectMapper.findContractPageList(page, dto);
+        contractPageList.getRecords().stream().forEach(i->{
+        //合同类型查询
+        StringBuffer stringBuffer = new StringBuffer();
+        String newType="";
+        if (StringUtils.isNotEmpty(i.getContractType())){
+            if (!i.getContractType().contains(",")){
+                String type= jyWorkContractInfoMapper.findType(i.getContractType());
+                i.setContractType(type);
+            }else {
+                String[] split = i.getContractType().split(",");
+                for (String s : split) {
+                    String type= jyWorkContractInfoMapper.findType2(s);
+                    stringBuffer.append(type+",");
+                    newType=stringBuffer.substring(0,stringBuffer.lastIndexOf(","));
+                    i.setContractType(newType);
+                }
+            }
+        }
+        //主委托方联系人信息查询
+            List<JyWorkClientLinkman> jyWorkClientLinkmen=jyWorkClientInfoMapper.getByNameInfo(i.getLinkmanId());
+            i.setLinkmanList(jyWorkClientLinkmen);
+        });
+
+        return contractPageList;
+    }
+
+    /**
+     * 项目保存或修改
+     * @param dto
+     * @return
+     * @throws Exception
+     */
+    public String save(JyProjectDTO  dto) throws Exception{
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto);
+        }
+        return add(dto);
+    }
+
+
+    public String add(JyProjectDTO dto) throws Exception{
+        String currentToken = TokenProvider.getCurrentToken();
+        JyProject jyProject = new JyProject();
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        // 保存项目管理列表信息
+        BeanUtils.copyProperties(dto, jyProject);
+        String projectNo = "";
+
+        String id = UUID.randomUUID().toString().replace("-", "");
+        //生成项目编号
+        if (dto.getContractStatus().equals("0")){
+            projectNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), JyProjectDTO.BIZ_CODE,currentToken);
+        }else {
+            JyWorkContractInfo byId = jyWorkContractInfoMapper.findById(dto.getContractId());
+            Integer projectNum=jyProjectMapper.getProByContractId(dto.getContractId());
+            Integer count=0;
+            if (projectNum == 0){
+                projectNo=byId.getNo()+"-0"+(count+1);
+            }else {
+                projectNo=byId.getNo()+"-0"+(projectNum+1);
+            }
+        }
+        jyProject.setId(id);//生成主键id
+        jyProject.setName(dto.getName());//项目名称
+        jyProject.setContractName(dto.getContractName());//合同名称
+        jyProject.setNo(projectNo); //项目编号
+        jyProject.setContractId(dto.getContractId()); //合同编号
+        List<JyWorkClientLinkman> clientList = dto.getClientList();
+        for (JyWorkClientLinkman jyWorkClientLinkman : clientList) {
+            jyProject.setClient(jyWorkClientLinkman.getId());//联系人id
+            jyProject.setClientName(jyWorkClientLinkman.getName());//联系人姓名
+        }
+        jyProject.setProjectLeader(dto.getProjectLeader());//项目负责人
+        jyProject.setProjectPlace(dto.getProjectPlace());//项目所在地
+        jyProject.setStatus(dto.getStatus());
+        jyProject.setDelFlag(0);
+        jyProject.setContractStatus(dto.getContractStatus());//合同情况
+        jyProject.setSpecial(dto.getSpecial());//特殊要求
+        jyProject.setProjectOverview(dto.getProjectOverview());//工程概况
+        jyProject.setBuildPlace(dto.getBuildPlace());//建设地点
+        jyProjectMapper.insert(jyProject);
+        //保存项目组成员
+
+
+        List<String> strings = new ArrayList<>();
+        strings.add(userDTO.getId());
+        strings.add(dto.getProjectLeader());
+        for (String string : strings) {
+            JyProjectMembers jyProjectMembers = new JyProjectMembers();
+            String memberId = UUID.randomUUID().toString().replace("-", "");
+            jyProjectMembers.setId(memberId);
+            jyProjectMembers.setCreateById(userDTO.getId());
+            jyProjectMembers.setCreateTime(new Date());
+            jyProjectMembers.setUpdateById(userDTO.getId());
+            jyProjectMembers.setUpdateTime(new Date());
+            jyProjectMembers.setProjectId(id);
+            jyProjectMembers.setUserId(string);
+            jyProjectMemberMapper.insert(jyProjectMembers);
+        }
+
+
+        // 保存附件信息
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            saveFiles(dto.getFiles(), userDTO, id);
+        }
+        return id;
+    }
+
+    public String update(JyProjectDTO dto) throws Exception{
+        String currentToken = TokenProvider.getCurrentToken();
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        // 修改项目管理列表主表信息
+        JyProject jyProject = new JyProject();
+        BeanUtils.copyProperties(dto, jyProject);
+        jyProject.setUpdateById(userDTO.getId());
+        jyProject.setUpdateTime(new Date());
+        jyProject.setDelFlag(0);
+        jyProjectMapper.updateById(jyProject);
+        // 修改附件信息
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            updateFiles(dto.getFiles(), userDTO, dto.getId());
+        }
+        return dto.getId();
+    }
+
+    /**
+     * 修改附件信息
+     * @param list 待修改的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void updateFiles(List<WorkAttachmentInfo> list, UserDTO userDTO, String id) {
+        int j = 1;
+        String names = new String();
+        //表中存在,但是传过来不存在,说明已删除,表中数据也要删除
+        for (WorkAttachmentInfo dto : list) {
+            names = names + "," +dto.getUrl();
+        }
+        //查询保存的附件信息
+        List<WorkAttachmentInfo> infoList = jyProjectMapper.findFileList(id);
+        if (CollectionUtil.isNotEmpty(infoList)) {
+            for (WorkAttachmentInfo i : infoList) {
+                if (!names.contains(i.getUrl())) {
+                    SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteById(i.getId());
+                }
+            }
+        }
+        //保存信息
+        for (WorkAttachmentInfo dto : list) {
+            //判断是否存在
+            Integer isExit = jyProjectMapper.findIsExit(id, dto.getName());
+            if (isExit == 0) {
+                WorkAttachmentInfo i = new WorkAttachmentInfo();
+                //包含了url、size、name
+                i.setId(UUID.randomUUID().toString().replace("-", ""));
+//                i.getCreateBy().setId(userDTO.getId());
+                i.setCreateTime(new Date());
+//                i.getUpdateBy().setId(userDTO.getId());
+                i.setUpdateTime(new Date());
+                i.setDelFlag(0);
+                i.setUrl(dto.getUrl());
+                //文件类型处理
+                List<String> strings = Arrays.asList(dto.getName().split("\\."));
+                if (CollectionUtil.isNotEmpty(strings)) {
+                    i.setType(strings.get(1));
+                }
+                i.setAttachmentId(id);
+                i.setAttachmentName(dto.getName());
+                i.setAttachmentFlag("workcontract");
+                i.setFileSize(dto.getSize());
+                i.setSort(j);
+                Map<String,String> map = new HashMap<>();
+                String workAttachment = JSON.toJSONString((i));
+                String userDTOInfo = JSON.toJSONString((userDTO));
+                map.put("workAttachment",workAttachment);
+                map.put("userDTO",userDTOInfo);
+                SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+                j++;
+            }
+        }
+    }
+
+    /**
+     * 保存附件信息
+     * @param list 待保存的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void saveFiles(List<WorkAttachmentInfo> list, UserDTO userDTO, String id) {
+        int j = 1;
+        for (WorkAttachmentInfo dto : list) {
+            WorkAttachmentInfo i = new WorkAttachmentInfo();
+            //包含了url、size、name
+            i.setId(UUID.randomUUID().toString().replace("-", ""));
+//            i.getCreateBy().setId(userDTO.getId());
+            i.setCreateTime(new Date());
+//            i.getUpdateBy().setId(userDTO.getId());
+            i.setUpdateTime(new Date());
+            i.setDelFlag(0);
+            i.setUrl(dto.getUrl());
+            //文件类型处理
+            List<String> strings = Arrays.asList(dto.getName().split("\\."));
+            if (CollectionUtil.isNotEmpty(strings)) {
+                i.setType(strings.get(1));
+            }
+            i.setAttachmentId(id);
+            i.setAttachmentName(dto.getName());
+            i.setAttachmentFlag("workcontract");
+            i.setFileSize(dto.getSize());
+            i.setSort(j);
+            Map<String,String> map = new HashMap<>();
+            String workAttachment = JSON.toJSONString((i));
+            String userDTOInfo = JSON.toJSONString((userDTO));
+            map.put("workAttachment",workAttachment);
+            map.put("userDTO",userDTOInfo);
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+            j++;
+        }
+    }
+
+    public JyProjectDTO findById(String id) {
+        JyProjectDTO jyProjectDTO = new JyProjectDTO();
+        // 查询主表信息
+        JyProject info = jyProjectMapper.getById(id);
+        //保存项目信息
+        BeanUtils.copyProperties(info, jyProjectDTO);
+        // 查询联系人列表
+        ArrayList<JyWorkClientLinkman> jyWorkClientLinkmen = new ArrayList<>();
+        JyWorkClientLinkman jyWorkClientLinkman = jyWorkClientLinkmanMapper.selectById(info.getClient());
+        if (ObjectUtil.isNotEmpty(jyWorkClientLinkman)){
+            jyWorkClientLinkmen.add(jyWorkClientLinkman);
+            jyProjectDTO.setClientList(jyWorkClientLinkmen);
+        }
+        // 查询成员列表
+        LambdaQueryWrapper<JyProjectMembers> memberWrapper = new LambdaQueryWrapper<>();
+        memberWrapper.eq(JyProjectMembers::getProjectId, id);
+        memberWrapper.eq(JyProjectMembers::getDelFlag, 0);
+        List<JyProjectMembers> members = jyProjectMemberMapper.selectList(memberWrapper);
+        if (CollectionUtils.isNotEmpty(members)) {
+            members.stream().forEach(member -> {
+                if (StringUtils.isNotBlank(member.getUserId())) {
+                    UserDTO byId = SpringUtil.getBean ( IUserApi.class ).getById(member.getUserId());
+                    if (ObjectUtil.isNotEmpty(byId)) {
+                        member.setName(byId.getName());
+                    }
+                }
+            });
+            jyProjectDTO.setProjectMembers(members);
+        }
+        //合同类型查询
+        String type="";
+        if (!info.getContractType().contains(",")){
+            jyProjectDTO.setContractType(info.getContractType());
+        }else {
+            String[] split = info.getContractType().split(",");
+            for (String s : split) {
+                DictValue dictValue = dictValueMapper.selectById(s);
+                type=dictValue.getLabel()+",";
+                jyProjectDTO.setContractType(type);
+            }
+        }
+
+
+        // 查询附件信息
+        List<WorkAttachmentInfo> files = jyWorkContractInfoMapper.findDtos(id);
+        if (CollectionUtils.isNotEmpty(files)) {
+            for (WorkAttachmentInfo i : files) {
+                i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
+            }
+            jyProjectDTO.setFiles(files);
+        }
+        return jyProjectDTO;
+    }
+
+
+    /**
+     * 根据id修改status
+     */
+    public void updateStatusById(JyProjectDTO jyProjectDTO) {
+        jyProjectMapper.updateStatusById(jyProjectDTO.getId(), jyProjectDTO.getStatus());
+    }
+
+
+    public String deleteById(String id) {
+        jyProjectMapper.deleteById(id);
+        jyProjectMemberMapper.deleteByInfoId(id);
+        // 附件删除
+//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
+//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
+        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+        return "删除项目成功";
+    }
+
+
+}

+ 179 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/dto/JyProjectDTO.java

@@ -0,0 +1,179 @@
+package com.jeeplus.business.project.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.jeeplus.business.project.domain.JyProjectMembers;
+import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+@Data
+public class JyProjectDTO extends BaseEntity implements Serializable {
+    //项目编号(字典值)
+    public static final String BIZ_CODE = "36";
+
+
+    /**
+     * 项目名称
+     */
+    private String name;
+
+    /**
+     * 项目编号
+     */
+    private String no;
+
+    /**
+     * 合同id
+     */
+    private String contractId;
+
+
+
+    /**
+     * 登记状态
+     */
+    private String status;
+
+    /**
+     * 一审状态
+     */
+    private String firstInstance;
+
+    /**
+     * 二审状态
+     */
+    private String secondInstance;
+
+    /**
+     * 三审状态
+     */
+    private String thirdInstance;
+
+    /**
+     * 报告签发
+     */
+    private String reportIssuance;
+
+    /**
+     * 外审
+     */
+    private String outIssuance;
+
+    /**
+     * 报批签发
+     */
+    private String reportSubmit;
+
+    /**
+     * 归档状态
+     */
+    private String reviewStatus;
+
+    /**
+     * 合同情况(1:有合同  0:无合同)
+     */
+    private String contractStatus;
+
+    /**
+     * 项目所在地
+     */
+    private String projectPlace;
+
+    /**
+     * 建设地点
+     */
+    private String buildPlace;
+
+    /**
+     * 工程概况
+     */
+    private String projectOverview;
+
+    /**
+     * 特殊要求
+     */
+    private String special;
+
+
+    /*
+    流程id
+     */
+    private String procInsId;
+    private String processDefinitionId;
+
+    /**
+     * 关联合同下的项目排序
+     */
+    private String contractProjectNo;
+
+    /**
+     * 合同名称
+     */
+    private String contractName;
+
+    /**
+     * 委托方
+     */
+    private String client;
+
+    /**
+     * 委托方名称
+     */
+    private String clientName;
+
+    /**
+     * 项目负责人
+     */
+    private String projectLeader;
+    /**
+     * 创建时间
+     */
+    @TableField(exist = false)
+    private String[] createDates;
+
+    /**
+     * 创建人id
+     */
+    @TableField(exist = false)
+    private String createBy;
+
+    /**
+     * 项目登记  taskId
+     */
+    @TableField(exist = false)
+    private String taskId;
+
+    /**
+     * 数据审核人  项目登记
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds;
+
+    /**
+     * 委托方联系人
+     */
+    private List<JyWorkClientLinkman> clientList;
+    /**
+     * 附件
+     */
+    private List<WorkAttachmentInfo> files;
+
+    /**
+     * 项目组成员
+     */
+    private List<JyProjectMembers> projectMembers;
+
+    /**
+     * 合同参数
+     */
+    @TableField(exist = false)
+    private String contractAmount;
+    @TableField(exist = false)
+    private String contractType;
+    @TableField(exist = false)
+    private String contractTypeFirst;
+
+}

+ 5 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/JyWorkClientInfoMapper.java

@@ -7,9 +7,12 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
 import com.jeeplus.business.workClientInfo.domain.JyWorkClientInfo;
+import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 @Mapper
 public interface JyWorkClientInfoMapper extends BaseMapper<JyWorkClientInfo> {
 
@@ -20,4 +23,6 @@ public interface JyWorkClientInfoMapper extends BaseMapper<JyWorkClientInfo> {
     Integer isExist(@Param("value") String value);
 
     IPage<JyWorkClientInfo> componentList(Page<JyWorkClientInfo> page, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
+
+    List<JyWorkClientLinkman> getByNameInfo(@Param("LinkmanId")String LinkmanId);
 }

+ 14 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientInfoMapper.xml

@@ -143,4 +143,18 @@
 		from jy_work_client_info
 		where name=#{clientName}
 	</select>
+
+	<select id="getByNameInfo" resultType="com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman">
+		select
+			id,
+			name,
+			office,
+			position,
+			qq,
+			link_mobile,
+			link_phone,
+			email
+		from jy_work_client_linkman
+		where client_id=#{LinkmanId}
+	</select>
 </mapper>

+ 2 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/controller/JyWorkContractController.java

@@ -39,7 +39,7 @@ public class JyWorkContractController {
     public ResponseEntity<IPage<JyWorkContractInfo>> list(JyWorkContractInfo jyWorkContractInfo, Page<JyWorkContractInfo> page) throws Exception {
         String primaryLinkman = jyWorkContractInfo.getClientName();
         String[] contractDates = jyWorkContractInfo.getContractDates();
-        String contractAmount = jyWorkContractInfo.getContractAmount();
+        String[] contractAmounts = jyWorkContractInfo.getContractAmounts();
         String[] createDates= jyWorkContractInfo.getCreateDates();
         String statusList = jyWorkContractInfo.getStatusList();
         String filedType = jyWorkContractInfo.getFiledType();
@@ -51,7 +51,7 @@ public class JyWorkContractController {
         if (ObjectUtil.isNotEmpty(jyWorkContractInfo) && StringUtils.isNotBlank(jyWorkContractInfo.getCreateById())) {
             workContractInfoQueryWrapper.eq("a.create_by_id", jyWorkContractInfo.getCreateById());
         }
-        IPage<JyWorkContractInfo> list = jyWorkContractService.list(page, workContractInfoQueryWrapper, primaryLinkman, contractDates,createDates, contractAmount,name,createById, filedType,no,contractTypeList);
+        IPage<JyWorkContractInfo> list = jyWorkContractService.list(page, workContractInfoQueryWrapper, primaryLinkman, contractDates,createDates, contractAmounts,name,createById, filedType,no,contractTypeList);
         return ResponseEntity.ok (list);
     }
 

+ 18 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/domain/JyWorkContractInfo.java

@@ -3,6 +3,7 @@ package com.jeeplus.business.workContractInfo.domain;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.core.query.Query;
 import lombok.Data;
@@ -59,9 +60,13 @@ public class JyWorkContractInfo extends BaseEntity {
     private Date closingDate;
 
     /**
-     * 合同类型
+     * 合同类型(小类)
      */
     private String contractType;
+    /**
+     * 合同类型(大类)
+     */
+    private String contractTypeFirst;
     @TableField(exist = false)
     private List<String> contractTypes;
 
@@ -148,6 +153,12 @@ public class JyWorkContractInfo extends BaseEntity {
     @Query(tableColumn = "a.primary_linkman")
     private String primaryLinkman;
 
+    /**
+     * 主委托方信息
+     */
+    @TableField(exist = false)
+    private List<JyWorkClientLinkman> linkmanList;
+
 
     /**
      * 所属部门
@@ -189,6 +200,12 @@ public class JyWorkContractInfo extends BaseEntity {
     @TableField(exist = false)
     private String[] createDates;
 
+    /**
+     * 客户联系人id
+     */
+    @TableField(exist = false)
+    private String linkmanId;
+
 
 
 

+ 7 - 12
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/xml/JyWorkContractInfoMapper.xml

@@ -18,6 +18,7 @@
 			a.effective_date,
 			a.closing_date,
 			a.contract_type as contractType,
+			a.contract_type_first,
 			a.contract_amount_type,
 			a.contract_amount,
 			a.contract_opposite,
@@ -28,23 +29,19 @@
 			a.remarks,
 			a.filed_by,
 			a.filed_date,
-			d.filed_no,
-			d.confirm_filed_no,
+			a.filed_no,
 			a.filed_remarks,
 			a.proc_ins_id,
 			a.process_definition_id,
 			a.status,
 			a.create_by_id as create_id,
 			a.filed_type,
-			e.ID_ as task_filed_id,
 			a.primary_linkman,
 			art.ID_ as taskId
 		FROM
 			jy_work_contract_info a
 			LEFT JOIN sys_user c ON a.create_by_id = c.id
-			LEFT JOIN jy_work_contract_file d ON a.id = d.contract_info_id
-			LEFT JOIN act_ru_task e ON d.proc_ins_id = e.PROC_INST_ID_
-			left join jy_work_client_info jy_ci on a.primary_linkman=jy_ci.id
+			left join jy_work_client_info jy_ci on a.primary_linkman=jy_ci.name
 			left join act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
 		${ew.customSqlSegment}
 		ORDER BY a.update_time DESC
@@ -65,6 +62,9 @@
 			a.effective_date,
 			a.closing_date,
 			a.contract_type as contractType,
+			(SELECT dv.label FROM `sys_dict_value` dv
+			LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id
+			where dt.type='jy_contract_type_up' and a.contract_type_first=dv.value) as contractTypeFirst,
 			a.contract_amount_type,
 			a.contract_amount,
 			a.contract_opposite,
@@ -75,8 +75,7 @@
 			a.remarks,
 			a.filed_by,
 			a.filed_date,
-			d.filed_no,
-			d.confirm_filed_no,
+			a.filed_no,
 			a.filed_remarks,
 			a.proc_ins_id,
 			a.process_definition_id,
@@ -84,14 +83,10 @@
 			a.create_by_id as create_id,
 			a.filed_type,
 			a.primary_linkman,
-			d.filed_no,
-			d.confirm_filed_no,
-			d.filed_type,
 			so.name as department,
 			art.ID_ as taskId
 		FROM
 			jy_work_contract_info a
-			LEFT JOIN jy_work_contract_file d ON a.id = d.contract_info_id
 			left join jy_work_client_info jy_ci on a.primary_linkman=jy_ci.name
 			left join sys_office so on a.department=so.id
 			left join act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_

+ 18 - 14
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/JyWorkContractService.java

@@ -54,7 +54,7 @@ public class JyWorkContractService {
      * @param
      * @return
      */
-    public IPage<JyWorkContractInfo> list(Page<JyWorkContractInfo> page, QueryWrapper<JyWorkContractInfo> queryWrapper, String primaryLinkman, String[] contractDates, String[] createDates, String contractAmount,String name,String createById,String filedType,String no,List contractTypeList) {
+    public IPage<JyWorkContractInfo> list(Page<JyWorkContractInfo> page, QueryWrapper<JyWorkContractInfo> queryWrapper, String primaryLinkman, String[] contractDates, String[] createDates, String[] contractAmounts,String name,String createById,String filedType,String no,List contractTypeList) {
         queryWrapper.eq("a.del_flag","0");
         if (contractDates != null) {
             queryWrapper.between("a.contract_date", contractDates[0], contractDates[1]);
@@ -62,8 +62,13 @@ public class JyWorkContractService {
         if (createDates != null) {
             queryWrapper.between("a.create_time", createDates[0], createDates[1]);
         }
-        if (StringUtils.isNotEmpty(contractAmount)) {
-                queryWrapper.eq("a.contract_amount", contractAmount);
+        if (contractAmounts != null) {
+            if (StringUtils.isNotEmpty(contractAmounts[0])) {
+                queryWrapper.ge("a.contract_amount", contractAmounts[0]);
+            }
+            if (StringUtils.isNotEmpty(contractAmounts[1])) {
+                queryWrapper.le("a.contract_amount", contractAmounts[1]);
+            }
         }
         if (StringUtils.isNotEmpty(no)){
             queryWrapper.like("a.no",no);
@@ -94,21 +99,19 @@ public class JyWorkContractService {
             }
             //合同类型查询
             StringBuffer stringBuffer = new StringBuffer();
-            String newType="";
+            String typeData="";
+            if (StringUtils.isNotEmpty(i.getContractTypeFirst())){
+                 typeData = jyWorkContractInfoMapper.findType(i.getContractTypeFirst());
+            }
             if (StringUtils.isNotEmpty(i.getContractType())){
-                if (!i.getContractType().contains(",")){
-                   String type= jyWorkContractInfoMapper.findType(i.getContractType());
-                   i.setContractType(type);
-                }else {
                     String[] split = i.getContractType().split(",");
-                    for (String s : split) {
-                        String type= jyWorkContractInfoMapper.findType2(s);
+                    for (int j = 0; j < split.length; j++) {
+                        String type= jyWorkContractInfoMapper.findType2(split[j]);
                         stringBuffer.append(type+",");
-                        newType=stringBuffer.substring(0,stringBuffer.lastIndexOf(",")+1);
-                        i.setContractType(newType);
+                        typeData=stringBuffer.substring(0,stringBuffer.lastIndexOf(","));
                     }
-                }
             }
+            i.setContractType(typeData);
         });
         return pageList;
     }
@@ -174,7 +177,8 @@ public class JyWorkContractService {
         info.setEffectiveDate(workContractInfoDto.getEffectiveDate()); //开始日期
         info.setClosingDate(workContractInfoDto.getClosingDate()); //结束日期
         info.setContractDate(workContractInfoDto.getContractDate()); //签订日期
-        info.setContractType(newType);//合同类型
+        info.setContractType(newType);//合同类型(小类)
+        info.setContractTypeFirst(contractTypes.get(0).get(0));
         info.setName(workContractInfoDto.getContractName()); //合同名称
         info.setContractOpposite(workContractInfoDto.getContractOpposite()); //对方合同编号
         info.setDepartment(workContractInfoDto.getDepartment());//所属部门

+ 12 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/dto/JyWorkContractInfoDto.java

@@ -3,6 +3,7 @@ package com.jeeplus.business.workContractInfo.service.dto;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
 import com.jeeplus.business.workContractInfo.domain.JyContractParticipant;
 import com.jeeplus.core.service.dto.BaseDTO;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
@@ -77,13 +78,18 @@ public class JyWorkContractInfoDto extends BaseDTO {
     private String department;
 
     /**
-     * 合同类型
+     * 合同类型(小类)
      */
     @TableField(typeHandler = JacksonTypeHandler.class)
     private List<List<String>> contractTypes;
     private List<String> contractTypeList;
     private String contractType;
 
+    /**
+     * 合同类型(大类)
+     */
+    private String contractTypeFirst;
+
 
     /**
      * 合同金额类别
@@ -142,6 +148,11 @@ public class JyWorkContractInfoDto extends BaseDTO {
     private String primaryLinkman;
 
     /**
+     * 主委托方信息
+     */
+    private List<JyWorkClientLinkman> linkmanList;
+
+    /**
      * 委托方
      */
     private String linkman;

+ 90 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectExecutionListener.java

@@ -0,0 +1,90 @@
+package com.jeeplus.modules.flowable.listener;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.OfficeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.delegate.DelegateExecution;
+import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+@Component("JyProjectExecutionListener")
+public class JyProjectExecutionListener implements ExecutionListener {
+
+    @SneakyThrows
+    public void notify(DelegateExecution delegateExecution) {
+        String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
+
+        if ( "start".equals ( eventName ) ) {
+            System.out.println ( "start=========" );
+        } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
+
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
+
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                    if (title != null) {
+                        titleName = title.toString();
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
+                }
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
+                }
+
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+                UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
+                OfficeDTO officeDTO = userDTO.getOfficeDTO();
+                //如果是嘉溢发送的项目登记,则会给办公室进行抄送
+                if(null != officeDTO && "办公室".equals(officeDTO.getName())){
+                    //获取角色为“办公室”的角色对应人员信息
+                    List<UserDTO> userDTOList = SpringUtil.getBean(IUserApi.class).getUserInfoByEnName("bgs");
+                    for (UserDTO dto : userDTOList) {
+                        SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                                flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
+                                dto.getName(),dto.getId(),userDTO.getId());
+                    }
+                }
+
+            }
+
+            System.out.println ( "end=========" );
+        } else if ( "take".equals ( eventName ) ) {//连线监听
+            System.out.println ( "take=========" );
+        }
+    }
+}

+ 12 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/AreaController.java

@@ -119,4 +119,16 @@ public class AreaController {
         return ResponseEntity.ok ( rootTree );
     }
 
+
+    /**
+     * 获取区域的上级
+     */
+    @ApiLog("获取区域的上级")
+    @GetMapping("getParent")
+    public ResponseEntity <List <String>> getParent(@RequestParam(required = false) String extId) {
+        List <String> rootTree = areaService.getParent ( extId );
+        return ResponseEntity.ok ( rootTree );
+    }
+
+
 }

+ 31 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -778,6 +778,37 @@ public class UserController {
     }
 
     /**
+     * 获取嘉溢机构JSON数据。
+     *
+     * @param officeName 部门名称
+     * @param extId 排除的ID
+     * @param type  类型(1:公司;2:部门)
+     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @return
+     */
+    @ApiLog("获取财务部门用户数据")
+    @GetMapping("treeUserDataJyOffice")
+    public ResponseEntity treeUserDataJyOffice(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        officeName = "嘉溢";
+        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
+        if(list.size()>0){
+            List<String> officeIds = Lists.newArrayList();
+            for (OfficeDTO info : list) {
+                info.setTypeFlag(true);
+                officeIds.add(info.getId());
+            }
+            //根据部门查询对应部门下的所有数据
+            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+            list.addAll(officeDTOList);
+        }
+        List rootTree = officeService.getJyRootTree (list, extId, type, showAll, "1");
+        return ResponseEntity.ok (rootTree);
+    }
+
+
+
+
+    /**
      * 判断当前用户是否是管理员
      *
      * @return

+ 3 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java

@@ -127,4 +127,7 @@ public interface OfficeMapper extends TreeMapper <Office> {
      */
     @InterceptorIgnore(tenantLine = "true")
     OfficeDTO getParentOfficeById(String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<Office> getJyChildren(String rootId);
 }

+ 34 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml

@@ -375,4 +375,38 @@
             and a.del_flag = 0
         </where>
     </select>
+
+    <select id="getJyChildren" resultType="com.jeeplus.sys.domain.Office">
+        SELECT
+            id,
+            is_public,
+            area,
+            CODE,
+            type,
+            grade,
+            address,
+            zip_code,
+            MASTER,
+            phone,
+            fax,
+            email,
+            useable,
+            remarks,
+            parent_id,
+            parent_ids,
+            NAME,
+            sort,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            sys_office
+        WHERE
+            del_flag = 0
+            and parent_id = #{rootId}
+            and NAME LIKE concat('%','嘉溢','%')
+    </select>
 </mapper>

+ 35 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/AreaService.java

@@ -7,12 +7,17 @@ import com.jeeplus.common.constant.CacheNames;
 import com.jeeplus.core.service.TreeService;
 import com.jeeplus.sys.domain.Area;
 import com.jeeplus.sys.mapper.AreaMapper;
+import com.jeeplus.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 区域Service
@@ -24,6 +29,9 @@ import java.util.List;
 @Transactional
 public class AreaService extends TreeService <AreaMapper, Area> {
 
+    @Autowired
+    private AreaMapper areaMapper;
+
     @Cacheable(cacheNames = CacheNames.SYS_CACHE_AREA_LIST)
     public List <Area> findAll() {
         return super.list ( );
@@ -39,4 +47,31 @@ public class AreaService extends TreeService <AreaMapper, Area> {
         return super.removeWithChildrenById ( id );
     }
 
+    @Cacheable(cacheNames = CacheNames.SYS_CACHE_AREA_LIST)
+    public List<String> getParent(String extId) {
+        if (StringUtils.isEmpty(extId)){
+            return null;
+        }
+        List<Area> all = this.findAll();
+        HashMap<String, String> hashMap = new HashMap<>();
+        for (Area area : all) {
+            hashMap.put(area.getId(),area.getName());
+        }
+        Area area = areaMapper.selectById(extId);
+        ArrayList<String> areas = new ArrayList<>();
+        String[] split = area.getParentIds().split(",");
+        for (int i = 0; i < split.length; i++) {
+            if (split[i].equals("")){
+                break;
+            }else {
+                if (split[i].equals(0)){
+                    continue;
+                }else {
+                    areas.add(hashMap.get(split[i]));
+                }
+            }
+        }
+        areas.add(hashMap.get(extId));
+        return areas;
+    }
 }

+ 52 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -224,6 +224,58 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
         return offices;
     }
 
+    /**
+     * 获取嘉溢数据
+     * @param list
+     * @param extId
+     * @param type
+     * @param showAll
+     * @param showMyOffice
+     * @return
+     */
+    public List <OfficeDTO> getJyRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
+        List<OfficeDTO> offices = Lists.newArrayList ();
+        // 获取到所有parent_id为‘0’的部门数据
+        List<Office> children = officeMapper.getJyChildren(OfficeDTO.getRootId());
+//        List<Office> children = super.getChildren(new Office(OfficeDTO.getRootId()));
+        List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (children);
+        for (OfficeDTO root : rootTrees) {
+            if (this.isUseAble ( extId, type,root, showAll )){
+                // 不是被排除节点的子节点
+                List<OfficeDTO> officeList = formatListToTree (root, list, extId, type, showAll);
+                offices.addAll (officeList);
+            }
+        }
+        if (StringUtils.isNotBlank(showMyOffice)) {
+            OfficeDTO officeDTO = UserUtils.getCurrentUserDTO().getOfficeDTO();
+            // 排除管理员
+            if (!UserUtils.getCurrentUserDTO().isAdmin()){
+                if (org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())) {
+                    String[] split = officeDTO.getParentIds().split(",");
+                    if (split.length > 2) {
+                        Office office = officeMapper.selectById(split[2]);
+                        if ("0".equals(office.getIsPublic())) {
+                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
+                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
+                                offices = this.getCompanyFromTree(offices);
+                            }
+                        }
+                    } else {
+                        if ("0".equals(officeDTO.getIsPublic())) {
+                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
+                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
+                                offices = this.getCompanyFromTree(offices);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return offices;
+    }
+
+
+
     public List <OfficeDTO> getRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
         List<OfficeDTO> offices = Lists.newArrayList ();
         // 获取到所有parent_id为‘0’的部门数据