Browse Source

复核流程部分代码调整

wangqiang 1 year ago
parent
commit
bd5b37887d
53 changed files with 2236 additions and 34 deletions
  1. 5 0
      jeeplus-api/jeeplus-public-modules-api/src/main/java/com/jeeplus/sys/factory/WorkAttachmentApiFallbackFactory.java
  2. 7 0
      jeeplus-api/jeeplus-public-modules-api/src/main/java/com/jeeplus/sys/feign/IWorkAttachmentApi.java
  3. 1 1
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectDict/mapper/ProjectDictMapper.java
  4. 0 1
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectDict/mapper/xml/ProjectDictMapper.xml
  5. 2 2
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectDict/service/ProjectDictService.java
  6. 7 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/controller/ReimbursementInfoController.java
  7. 2 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java
  8. 23 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml
  9. 24 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java
  10. 6 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/TreeUserDto.java
  11. 139 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/controller/ProgramFileDictController.java
  12. 48 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/domain/ProgramFileDict.java
  13. 26 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/mapper/ProgramFileDictMapper.java
  14. 51 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/mapper/xml/ProgramFileDictMapper.xml
  15. 55 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/service/ProgramFileDictService.java
  16. 46 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/service/dto/ProgramFileDictDTO.java
  17. 15 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/service/mapstruct/ProgramFileDictWrapper.java
  18. 72 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/controller/ProjectDictController.java
  19. 27 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/domain/ProgramProjectDict.java
  20. 52 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/domain/vo/FileDictVo.java
  21. 39 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/mapper/ProjectDictMapper.java
  22. 170 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/mapper/xml/ProjectDictMapper.xml
  23. 286 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/service/ProjectDictService.java
  24. 27 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/service/dto/ProjectDictDto.java
  25. 6 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwProjectRecords.java
  26. 7 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml
  27. 4 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwProjectRecordsService.java
  28. 6 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwProjectRecordsDTO.java
  29. 52 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java
  30. 47 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportReviewController.java
  31. 61 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportData.java
  32. 29 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportTeamMembers.java
  33. 50 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReviewNew.java
  34. 33 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReviewNewTeam.java
  35. 3 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java
  36. 24 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReviewNewMapper.java
  37. 25 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReviewNewTeamMapper.java
  38. 111 3
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml
  39. 8 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReviewNewMapper.xml
  40. 46 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReviewNewTeamMapper.xml
  41. 191 3
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java
  42. 36 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java
  43. 19 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReviewNewService.java
  44. 19 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReviewNewTeamService.java
  45. 21 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/controller/OssFileController.java
  46. 5 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/feign/WorkAttachmentApiImpl.java
  47. 19 14
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/mapper/xml/OssServiceMapper.xml
  48. 75 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/service/OssService.java
  49. 54 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java
  50. 107 5
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  51. 11 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  52. 22 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  53. 15 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

+ 5 - 0
jeeplus-api/jeeplus-public-modules-api/src/main/java/com/jeeplus/sys/factory/WorkAttachmentApiFallbackFactory.java

@@ -126,6 +126,11 @@ public class WorkAttachmentApiFallbackFactory implements FallbackFactory <IWorkA
 
             }
 
+            @Override
+            public void deleteByModuleType(String projectId) {
+
+            }
+
         };
     }
 }

+ 7 - 0
jeeplus-api/jeeplus-public-modules-api/src/main/java/com/jeeplus/sys/feign/IWorkAttachmentApi.java

@@ -190,6 +190,13 @@ public interface IWorkAttachmentApi {
      */
     @RequestMapping(value = "/oss/file/saveMsg2", method = RequestMethod.POST)
     void saveMsg2(@RequestBody Map<String ,String > map);
+
+    /**
+     * 根据id与module_type删除附件信息
+     * @param projectId
+     */
+    @RequestMapping(value = "/oss/file/deleteByModuleType", method = RequestMethod.POST)
+    void deleteByModuleType( @RequestParam(value = "projectId")String projectId);
 }
 
 

+ 1 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectDict/mapper/ProjectDictMapper.java

@@ -14,7 +14,7 @@ public interface ProjectDictMapper extends BaseMapper<ProgramProjectDict> {
 
     List<FileDictVo> parentList();
 
-    List<FileDictVo> list(@Param("type") String type, @Param("sort") String sort);
+    List<FileDictVo> list(@Param("type") String type/*, @Param("sort") String sort*/);
 
     List<ProgramFileDict> getFileParentList(@Param("id") String id, @Param("fileIds") List<String> fileIds);
 

+ 0 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectDict/mapper/xml/ProjectDictMapper.xml

@@ -46,7 +46,6 @@
         WHERE
             a.del_flag = 0
             AND a.attachment_project_type = #{type}
-            AND a.attachment_project_sort = #{sort}
             ORDER BY b.sort
     </select>
 

+ 2 - 2
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectDict/service/ProjectDictService.java

@@ -39,12 +39,12 @@ public class ProjectDictService {
      */
     public List<FileDictVo> list(ProjectDictDto projectDictDto) {
         List<FileDictVo> list = new ArrayList<>();
-        if (StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectType()) && StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectSort())) {
+        if (StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectType()) /*&& StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectSort())*/) {
             //查询父级
             List<FileDictVo> parentList = projectDictMapper.parentList();
             list.addAll(parentList);
             //查询子级
-            List<FileDictVo> dictVos = projectDictMapper.list(projectDictDto.getAttachmentProjectType(), projectDictDto.getAttachmentProjectSort());
+            List<FileDictVo> dictVos = projectDictMapper.list(projectDictDto.getAttachmentProjectType()/*, projectDictDto.getAttachmentProjectSort()*/);
             list.addAll(dictVos);
         }
         return list;

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

@@ -108,6 +108,13 @@ public class ReimbursementInfoController {
         return ResponseEntity.ok(list);
     }
 
+    @ApiOperation(value = "用户树形")
+    @GetMapping(value = "/userTreeNew")
+    public ResponseEntity<List<TreeUserDto>> userTreeNew(@RequestParam String name) {
+        List<TreeUserDto> list = service.userTreeNew(name);
+        return ResponseEntity.ok(list);
+    }
+
 
     @ApiLog(value = "评估报销数据")
     @GetMapping("exportFile")

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

@@ -35,6 +35,8 @@ public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {
 
     List<TreeUserDto> findUserList(@Param("name") String name);
 
+    List<TreeUserDto> findUserListNew(@Param("name") String name);
+
     List<RetureListDto> findExportList (@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
     IPage<RetureListDto> relationReimbursementList (Page<RetureListDto> page, @Param("id") String id);

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

@@ -139,6 +139,29 @@
 			</if>
 	</select>
 
+	<select id="findUserListNew" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT
+		a.id,
+		a.`name`,
+		a.office_id AS parent_id,
+		b.`name` AS office_name,
+		true AS is_user,
+		c.type,
+		c.enroll_cert_no as enrollCertNo,
+		c.profession
+		FROM
+		sys_user a
+		LEFT JOIN sys_office b ON a.office_id = b.id
+		LEFT JOIN sys_cert c ON a.id = c.user_id AND c.del_flag = 0
+		WHERE
+		a.del_flag = 0
+		AND a.is_admin IS NULL
+		AND (c.type = '3' OR (c.type = '4' AND a.id NOT IN (SELECT DISTINCT user_id FROM sys_cert WHERE type = '3' AND del_flag = 0)));
+		<if test="name != null and name != ''">
+			and a.`name` LIKE CONCAT ('%', #{name}, '%')
+		</if>
+	</select>
+
 	<select id="findExportList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto">
 		SELECT
 			a.id,

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

@@ -768,6 +768,30 @@ public class ReimbursementInfoService {
         return newList;
     }
 
+    //用户树形
+    public List<TreeUserDto> userTreeNew(String name) {
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        List<TreeUserDto> list = new ArrayList<>();
+        // 查询部门
+        List<TreeUserDto> officeList = infoMapper.findOfficeListByCompanyId(userDTO.getCompanyDTO().getId());
+        List<TreeUserDto> filterList = new ArrayList<>();
+        filterList = officeList;
+
+        // 查询用户
+        List<TreeUserDto> userList = infoMapper.findUserListNew(name);
+        list = disposeUserTree(userList, filterList);
+        for (TreeUserDto officeDto : officeList) {
+            if("0".equals(officeDto.getParentId())){
+                list.add(officeDto);
+            }
+        }
+        //去重
+        List<TreeUserDto> newList = list.stream().collect(Collectors.collectingAndThen(
+                Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TreeUserDto::getId))), ArrayList::new)
+        );
+        return newList;
+    }
+
     /**
      * 用户树形数据处理
      * @param userList

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

@@ -16,4 +16,10 @@ public class TreeUserDto extends BaseEntity {
 
     private Boolean isUser = false;
 
+    //专业
+    private String  profession;
+    //证书类型
+    private String  type;
+    //注册/资格证号
+    private String  enrollCertNo;
 }

+ 139 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/controller/ProgramFileDictController.java

@@ -0,0 +1,139 @@
+package com.jeeplus.finance.fileDict.controller;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.fileDict.service.ProgramFileDictService;
+import com.jeeplus.finance.fileDict.service.dto.ProgramFileDictDTO;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Api("项目配置管理-附件类型管理")
+@RestController
+@RequestMapping(value = "/program/configuration/file")
+public class ProgramFileDictController {
+
+    @Autowired
+    private ProgramFileDictService programFileDictService;
+
+    /**
+     * 查询附件类型管理列表
+     * @param programFileDictDTO
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiLog("查询附件类型管理列表")
+    @PreAuthorize("hasAuthority('program:configuration:file:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<ProgramFileDictDTO>> data(ProgramFileDictDTO programFileDictDTO, Page<ProgramFileDictDTO> page) throws Exception {
+        page.setSize(-1);
+        IPage<ProgramFileDictDTO> result = new Page<ProgramFileDictDTO>();
+        if(ObjectUtil.isNotEmpty(programFileDictDTO)){
+            if(StringUtils.isNotBlank(programFileDictDTO.getName())){
+                //根据name模糊查询
+                List<ProgramFileDict> programFileDictList = programFileDictService.list(new QueryWrapper<ProgramFileDict>().lambda()
+                        .like(StringUtils.isNotBlank(programFileDictDTO.getName()), ProgramFileDict::getName, programFileDictDTO.getName())
+                );
+                //获取到其中不是一级附件类型的数据
+                List<ProgramFileDict> childList = programFileDictList.stream().distinct().filter(item -> {
+                    if (!"0".equals(item.getParentId())) {
+                        return true;
+                    }
+                    return false;
+                }).collect(Collectors.toList());
+                //childList的id全部获取
+                List<String> cIdList = childList.stream().distinct().map(ProgramFileDict::getId).collect(Collectors.toList());
+                //childList的父级id全部获取
+                List<String> cupIdList = childList.stream().distinct().map(ProgramFileDict::getParentId).collect(Collectors.toList());
+                //获取到其中一级附件类型的数据的id
+                List<String> pIdList = programFileDictList.stream().distinct().filter(item -> {
+                    if ("0".equals(item.getParentId())) {
+                        return true;
+                    }
+                    return false;
+                }).map(ProgramFileDict::getId).collect(Collectors.toList());
+                //获取pIdList下的所有子附件类型的id
+                if(CollectionUtil.isNotEmpty(pIdList)){
+                    pIdList.addAll(programFileDictService.list(new QueryWrapper<ProgramFileDict>().lambda()
+                            .in(ProgramFileDict::getParentId,pIdList)).stream().map(ProgramFileDict::getId).collect(Collectors.toList()));
+                }
+                //将获取到的这几个id集合融合到一起并去重,然后根据id查询,即可得到结果
+                cIdList.addAll(cupIdList);
+                cIdList.addAll(pIdList);
+                List<String> idList = cIdList.stream().distinct().collect(Collectors.toList());
+                if(CollectionUtil.isNotEmpty(idList)){
+                    QueryWrapper<ProgramFileDict> wrapper = new QueryWrapper<ProgramFileDict>()
+                            .in("pfd.id",idList);
+                    result = programFileDictService.findList (page,wrapper);
+                }
+            }else{
+                result = programFileDictService.findList (page,new QueryWrapper<ProgramFileDict>());
+            }
+        }
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 查询附件类型管理数据
+     * @param id
+     * @return
+     */
+    @ApiLog("查询附件类型管理数据")
+    @PreAuthorize ("hasAnyAuthority('program:configuration:file:view','program:configuration:file:add','program:configuration:file:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity queryById(@RequestParam("id") String id) {
+        ProgramFileDictDTO programFileDictDTO = programFileDictService.queryById ( id );
+        return ResponseEntity.ok (programFileDictDTO);
+    }
+
+    /**
+     * 保存附件类型
+     * @param programFileDictDTO
+     * @return
+     */
+    @ApiLog(value = "修改/新增附件类型")
+    @PreAuthorize("hasAnyAuthority('program:configuration:type:save','program:configuration:type:edit')")
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody ProgramFileDictDTO programFileDictDTO) {
+        programFileDictService.saveType(programFileDictDTO);
+        return ResponseEntity.ok ("操作成功");
+    }
+
+    /**
+     * 删除附件类型
+     * @param ids
+     * @return
+     */
+    @ApiLog(value = "删除附件类型")
+    @PreAuthorize ("hasAuthority('program:configuration:type:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String ids) {
+        return programFileDictService.deleteByIds(ids);
+    }
+
+    /**
+     * 查询附件类型
+     * @return
+     */
+    @ApiLog("查询附件类型")
+    @GetMapping("getAllFileType")
+    public ResponseEntity getAllFileType() {
+        List<ProgramFileDict> list = programFileDictService.list ( new QueryWrapper<ProgramFileDict>().lambda().eq(ProgramFileDict::getParentId,"0") );
+        return ResponseEntity.ok (list);
+    }
+}

+ 48 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/domain/ProgramFileDict.java

@@ -0,0 +1,48 @@
+package com.jeeplus.finance.fileDict.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 
+ * @TableName program_file_dict
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("program_file_dict")
+public class ProgramFileDict extends BaseEntity {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 上级类型
+     */
+    private String parentId;
+
+    /**
+     * 附件结构名称
+     */
+    private String name;
+
+    /**
+     * 序号
+     */
+    private String sort;
+
+    /**
+     * 文件类型
+     */
+    private String type;
+
+    /**
+     * 文件大小
+     */
+    private String size;
+
+    private static final long serialVersionUID = 1L;
+}

+ 26 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/mapper/ProgramFileDictMapper.java

@@ -0,0 +1,26 @@
+package com.jeeplus.finance.fileDict.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.fileDict.service.dto.ProgramFileDictDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Entity com.jeeplus.test.program.configuration.fileDict.dimain.ProgramFileDict
+ */
+@Mapper
+public interface ProgramFileDictMapper extends BaseMapper<ProgramFileDict> {
+
+    public IPage<ProgramFileDictDTO> findList(Page<ProgramFileDictDTO> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramFileDict> queryWrapper);
+
+    public ProgramFileDictDTO queryById(@Param("id") String id);
+}
+
+
+
+

+ 51 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/mapper/xml/ProgramFileDictMapper.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.finance.fileDict.mapper.ProgramFileDictMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.finance.fileDict.service.dto.ProgramFileDictDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="sort" column="sort" jdbcType="VARCHAR"/>
+            <result property="type" column="type" jdbcType="VARCHAR"/>
+            <result property="size" column="size" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        pfd.id,
+        pfd.create_by_id,
+        pfd.create_time,
+        pfd.update_by_id,
+        pfd.update_time,
+        pfd.del_flag,
+        pfd.remarks,
+        pfd.parent_id,
+        pfd.name,
+        pfd.sort,
+        pfd.type,
+        pfd.size
+    </sql>
+
+    <select id="findList" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>
+        from program_file_dict pfd
+        ${ew.customSqlSegment}
+    </select>
+
+    <select id="queryById" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>
+        from program_file_dict pfd
+        where pfd.del_flag = '0' and pfd.id = ${id}
+    </select>
+
+</mapper>

+ 55 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/service/ProgramFileDictService.java

@@ -0,0 +1,55 @@
+package com.jeeplus.finance.fileDict.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.fileDict.mapper.ProgramFileDictMapper;
+import com.jeeplus.finance.fileDict.service.dto.ProgramFileDictDTO;
+import com.jeeplus.finance.fileDict.service.mapstruct.ProgramFileDictWrapper;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+@Transactional
+public class ProgramFileDictService extends ServiceImpl<ProgramFileDictMapper, ProgramFileDict> {
+
+    @Resource
+    private ProgramFileDictMapper programFileDictMapper;
+
+    public IPage<ProgramFileDictDTO> findList(Page<ProgramFileDictDTO> page, QueryWrapper<ProgramFileDict> queryWrapper){
+        queryWrapper.eq("pfd.del_flag","0").orderByAsc("pfd.sort");
+        return programFileDictMapper.findList(page,queryWrapper);
+    }
+
+    public ProgramFileDictDTO queryById(String id) {
+
+        ProgramFileDictDTO programFileDictDTO = programFileDictMapper.queryById(id);
+
+        return programFileDictDTO;
+    }
+
+    public ResponseEntity saveType(ProgramFileDictDTO programFileDictDTO) {
+        ProgramFileDict programFileDict = ProgramFileDictWrapper.INSTANCE.toEntity(programFileDictDTO);
+        this.saveOrUpdate(programFileDict);
+        return ResponseEntity.ok("保存成功");
+    }
+
+    public ResponseEntity deleteByIds(String ids) {
+        String idArray[] =ids.split(",");
+        if(CollectionUtil.isNotEmpty(Lists.newArrayList (idArray))){
+            List<String> list = this.list(new QueryWrapper<ProgramFileDict>().lambda().in(ProgramFileDict::getParentId, Lists.newArrayList(idArray))).stream().distinct().map(ProgramFileDict::getId).collect(Collectors.toList());
+            this.removeByIds (list);
+        }
+        this.removeByIds (Lists.newArrayList (idArray));
+        return ResponseEntity.ok ("删除成功");
+    }
+}

+ 46 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/service/dto/ProgramFileDictDTO.java

@@ -0,0 +1,46 @@
+package com.jeeplus.finance.fileDict.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 
+ * @TableName program_file_dict
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class ProgramFileDictDTO extends BaseDTO {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 上级类型
+     */
+    private String parentId;
+
+    /**
+     * 附件结构名称
+     */
+    private String name;
+
+    /**
+     * 序号
+     */
+    private String sort;
+
+    /**
+     * 文件类型
+     */
+    private String type;
+
+    /**
+     * 文件大小
+     */
+    private String size;
+
+    private static final long serialVersionUID = 1L;
+}

+ 15 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/fileDict/service/mapstruct/ProgramFileDictWrapper.java

@@ -0,0 +1,15 @@
+package com.jeeplus.finance.fileDict.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.fileDict.service.dto.ProgramFileDictDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface ProgramFileDictWrapper extends EntityWrapper<ProgramFileDictDTO, ProgramFileDict>{
+
+        ProgramFileDictWrapper INSTANCE = Mappers.getMapper(ProgramFileDictWrapper.class);
+
+}

+ 72 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/controller/ProjectDictController.java

@@ -0,0 +1,72 @@
+package com.jeeplus.finance.projectDict.controller;
+
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.projectDict.domain.vo.FileDictVo;
+import com.jeeplus.finance.projectDict.service.ProjectDictService;
+import com.jeeplus.finance.projectDict.service.dto.ProjectDictDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Api(tags ="项目类型附件设置")
+@RestController
+@RequestMapping(value = "/program/project")
+public class ProjectDictController {
+
+    @Resource
+    private ProjectDictService projectDictService;
+
+    /**
+     * 查询
+     */
+    @ApiOperation(value = "查询")
+    @PostMapping(value = "/list")
+    public ResponseEntity<List<FileDictVo>> list(@RequestBody ProjectDictDto projectDictDto){
+        List<FileDictVo> list = projectDictService.list(projectDictDto);
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 新增/修改
+     */
+    @ApiOperation(value = "新增")
+    @PostMapping(value = "/save")
+    public ResponseEntity<String> save(@RequestBody ProjectDictDto projectDictDto){
+        String add = projectDictService.save(projectDictDto);
+        return ResponseEntity.ok(add);
+    }
+
+    /**
+     * 新增
+     */
+    @ApiOperation(value = "删除")
+    @DeleteMapping(value = "/deleteById")
+    public ResponseEntity<String> deleteById(String id){
+        String deleteById = projectDictService.deleteById(id);
+        return ResponseEntity.ok(deleteById);
+    }
+
+    /**
+     * 新增下拉查询
+     */
+    @ApiOperation(value = "新增下拉查询")
+    @PostMapping(value = "/getFileList")
+    public ResponseEntity<List<ProgramFileDict>> getFileList(@RequestBody ProjectDictDto projectDictDto){
+        List<ProgramFileDict> fileList = projectDictService.getFileList(projectDictDto);
+        return ResponseEntity.ok(fileList);
+    }
+
+    /**
+     * 根据id查询
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping(value = "/findByFileId")
+    public ResponseEntity<ProgramFileDict> findByFileId(@RequestParam String id){
+        ProgramFileDict fileDict = projectDictService.findByFileId(id);
+        return ResponseEntity.ok(fileDict);
+    }
+}

+ 27 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/domain/ProgramProjectDict.java

@@ -0,0 +1,27 @@
+package com.jeeplus.finance.projectDict.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName(value = "program_project_dict")
+public class ProgramProjectDict extends BaseEntity {
+
+    private String projectLevel;
+
+    private String attachmentProjectType;
+
+    private String attachmentProjectSort;
+
+    private String projectType;
+
+    private String fileType;
+
+    private String fileId;
+
+    private String requiredStage;
+
+    private String attachmentProjectApprovalMoney;
+
+}

+ 52 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/domain/vo/FileDictVo.java

@@ -0,0 +1,52 @@
+package com.jeeplus.finance.projectDict.domain.vo;
+
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class FileDictVo extends ProgramFileDict {
+
+    private String fileId;
+
+    private String requiredStage;
+
+    /**
+     * 是否必填(1:必填;0:非必填)
+     */
+    private Integer mustFlag;
+
+    /**
+     * 层级(树形层级)
+     */
+    private Integer levelFlag;
+
+    /**
+     * 文件上传时间
+     */
+    private Date uploadDate;
+    /**
+     * 附件名称
+     */
+    private String attachmentName;
+
+    /**
+     * 附件地址
+     */
+    private String url;
+
+    /**
+     * 附件地址(临时文件地址)
+     */
+    private String lsUrl;
+
+    /**
+     * 附件文件类型
+     */
+    private String workAttachmentType;
+
+    private String fileSize;
+
+    private Date createDate;
+}

+ 39 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/mapper/ProjectDictMapper.java

@@ -0,0 +1,39 @@
+package com.jeeplus.finance.projectDict.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.projectDict.domain.ProgramProjectDict;
+import com.jeeplus.finance.projectDict.domain.vo.FileDictVo;
+import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface ProjectDictMapper extends BaseMapper<ProgramProjectDict> {
+
+    /**
+     * 根据类型值查询父节点
+     * @return
+     */
+    List<FileDictVo> getParentList(@Param("sortList")List<String> sortList);
+
+    List<FileDictVo> parentList();
+
+    List<FileDictVo> list(@Param("type") String type, @Param("attachmentProjectSort") String attachmentProjectSort, @Param("projectLevel") String projectLevel);
+
+    List<ProgramFileDict> getFileParentList(@Param("id") String id, @Param("fileIds") List<String> fileIds);
+
+    List<ProgramFileDict> getFileList(@Param("id") String id, @Param("fileIds") List<String> fileIds);
+
+    FileDictVo findById(@Param("id") String id);
+
+    /**
+     * 根据文件attachmentId 和moduleType 查询附件信息
+     * @param attachmentId
+     * @param moduleType
+     * @return
+     */
+    List<WorkAttachmentInfoDTO> getFileListByAttachmentAndModuleType(@Param("attachmentId")String attachmentId , @Param("moduleType")String moduleType);
+}

+ 170 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/mapper/xml/ProjectDictMapper.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.finance.projectDict.mapper.ProjectDictMapper">
+
+    <select id="parentList" resultType="com.jeeplus.finance.projectDict.domain.vo.FileDictVo">
+        SELECT
+            id AS file_id,
+            create_by_id,
+            create_time,
+            update_by_id,
+            update_time,
+            del_flag,
+            remarks,
+            parent_id,
+            `name`,
+            type,
+            sort,
+            size
+        FROM
+            program_file_dict
+        WHERE
+            del_flag = 0
+            AND parent_id = 0
+            ORDER BY sort
+    </select>
+
+    <select id="list" resultType="com.jeeplus.finance.projectDict.domain.vo.FileDictVo">
+        SELECT
+            a.id,
+            a.required_stage,
+            b.id AS file_id,
+            b.create_by_id,
+            b.create_time,
+            b.update_by_id,
+            b.update_time,
+            b.del_flag,
+            b.remarks,
+            b.parent_id,
+            b.`name`,
+            b.type,
+            b.sort,
+            b.size
+        FROM
+            program_project_dict a
+            LEFT JOIN program_file_dict b ON a.file_id = b.id
+        WHERE
+            a.del_flag = 0
+            AND a.attachment_project_type = #{type}
+            AND a.attachment_project_sort = #{attachmentProjectSort}
+        <if test="projectLevel != null and projectLevel != ''">
+            AND a.project_level = #{projectLevel}
+        </if>
+
+            ORDER BY b.sort
+    </select>
+
+    <select id="getFileParentList" resultType="com.jeeplus.finance.fileDict.domain.ProgramFileDict">
+        SELECT
+        *
+        FROM
+        program_file_dict
+        WHERE
+        del_flag = 0
+        AND parent_id = #{id}
+        <if test="fileIds != null">
+            AND id NOT IN
+            <foreach collection="fileIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        ORDER BY sort
+    </select>
+
+    <select id="getFileList" resultType="com.jeeplus.finance.fileDict.domain.ProgramFileDict">
+        SELECT
+            *
+        FROM
+            program_file_dict
+        WHERE
+            del_flag = 0
+            AND parent_id = (SELECT parent_id FROM program_file_dict WHERE del_flag = 0 AND id = #{id})
+            <if test="fileIds != null">
+                AND id NOT IN
+                <foreach collection="fileIds" item="item" index="index" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            ORDER BY sort
+    </select>
+
+    <select id="findById" resultType="com.jeeplus.finance.projectDict.domain.vo.FileDictVo">
+        SELECT
+            a.id,
+            a.required_stage,
+            b.id AS file_id,
+            b.create_by_id,
+            b.create_time,
+            b.update_by_id,
+            b.update_time,
+            b.del_flag,
+            b.remarks,
+            b.parent_id,
+            b.`name`,
+            b.type,
+            b.sort,
+            b.size
+        FROM
+            program_project_dict a
+            LEFT JOIN program_file_dict b ON a.file_id = b.id
+        WHERE
+            a.del_flag = 0
+            AND a.id = #{id}
+    </select>
+    <select id="getParentList" resultType="com.jeeplus.finance.projectDict.domain.vo.FileDictVo">
+        SELECT
+        id AS file_id,
+        create_by_id,
+        create_time,
+        update_by_id,
+        update_time,
+        del_flag,
+        remarks,
+        parent_id,
+        `name`,
+        type,
+        sort,
+        size
+        FROM
+        program_file_dict
+        <where>
+            del_flag = 0
+            AND parent_id = 0
+            <if test="sortList != null">
+                AND sort IN
+                <foreach collection="sortList" item="sort" index="index" open="(" close=")" separator=",">
+                    #{sort}
+                </foreach>
+            </if>
+            ORDER BY sort
+        </where>
+    </select>
+    <select id="getFileListByAttachmentAndModuleType"
+            resultType="com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO">
+        select
+        wa.id,
+        wa.url,
+        wa.attachment_name AS `name`,
+        wa.create_by_id AS `createBy.id`,
+        su.name AS `createBy.name`,
+        wa.create_time,
+        wa.type as "type",
+        wa.attachment_id as "attachmentId",
+        wa.attachment_name as "attachmentName",
+        wa.attachment_flag as "attachmentFlag",
+        wa.module_type as "moduleType",
+        wa.attachment_type as "attachmentType",
+        wa.file_size as "fileSize",
+        wa.sort as "sort",
+        wa.description as "description"
+        from
+        work_attachment wa
+        left join sys_user su on su.id = wa.create_by_id
+        <where>
+            wa.del_flag = 0
+            AND wa.attachment_id = #{attachmentId}
+            AND wa.module_type = #{moduleType}
+        </where>
+    </select>
+
+</mapper>

+ 286 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/service/ProjectDictService.java

@@ -0,0 +1,286 @@
+package com.jeeplus.finance.projectDict.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.aliyun.oss.OSSClient;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
+import com.jeeplus.finance.fileDict.mapper.ProgramFileDictMapper;
+import com.jeeplus.finance.projectDict.domain.ProgramProjectDict;
+import com.jeeplus.finance.projectDict.domain.vo.FileDictVo;
+import com.jeeplus.finance.projectDict.mapper.ProjectDictMapper;
+import com.jeeplus.finance.projectDict.service.dto.ProjectDictDto;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+//import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+@Service
+public class ProjectDictService {
+
+    @Resource
+    private ProjectDictMapper projectDictMapper;
+
+    @Resource
+    private ProgramFileDictMapper programFileDictMapper;
+
+    @Value("${config.accessory.aliyun.aliyunUrl}")
+    private String aliyunUrl;
+
+    @Value("${config.accessory.aliyun.aliyunDownloadUrl}")
+    private String aliyunDownloadUrl;
+
+    @Value("${config.accessory.aliyun.endpoint}")
+    private String endpoint;
+
+    @Value("${config.accessory.aliyun.accessKeyId}")
+    private String accessKeyId;
+
+    @Value("${config.accessory.aliyun.accessKeySecret}")
+    private String accessKeySecret;
+
+    @Value("${config.accessory.aliyun.bucketName}")
+    private String bucketName;
+
+    /**
+     * 查询
+     * @param projectDictDto
+     * @param id
+     * @return
+     */
+    public List<FileDictVo> getFileDictList(ProjectDictDto projectDictDto, String projectId, String id) {
+        //获取当前登陆人信息
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        List<FileDictVo> list = new ArrayList<>();
+        if (StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectType())) {
+            //查询父级
+            List<FileDictVo> parentList = projectDictMapper.getParentList(projectDictDto.getSortList());
+            for (FileDictVo fileDictVo : parentList) {
+                fileDictVo.setId(fileDictVo.getFileId());
+            }
+            list.addAll(parentList);
+            //查询子级
+            List<FileDictVo> dictVos = projectDictMapper.list(projectDictDto.getAttachmentProjectType(),projectDictDto.getAttachmentProjectSort(),projectDictDto.getProjectLevel());
+            list.addAll(dictVos);
+        }
+        List<WorkAttachmentInfoDTO> fileList = Lists.newArrayList();
+        String stage="";
+        //获取当前项目处于哪个阶段
+//        JyProject jyProject = jyProjectMapper.getById(projectId);
+        //获取当前节点审核人
+//        List<String> users = SpringUtil.getBean(IFlowableApi.class).getTaskAuditUsers(jyProject.getTaskIdEia());
+//        JyProject jyProject = jyProjectMapper.getById(id);
+        //获取当前节点名称
+//        String currentTaskName = SpringUtil.getBean(IFlowableApi.class).getCurrentTaskName(jyProject.getProcInsIdEia());
+
+//        if (StringUtils.isNotBlank(jyProject.getOutInstanceId()) || StringUtils.isNotBlank(jyProject.getArchiveId()) || StringUtils.isNotBlank(jyProject.getEiaId())){
+//            //设置必填项
+//            //外审
+//            if (jyProject.getOutInstanceId().equals(id)){
+//                stage="2";
+//            }
+//            //如果是环评项目,则需要在设置审核阶段的必填项
+//            if (jyProject.getEiaId().equals(id)){
+//                stage="1";
+//                if (StringUtils.isNotBlank(currentTaskName)){
+//                    if (currentTaskName.equals("办公室审批")){
+//                        stage= "4";
+//                    }
+//                }
+//
+//            }
+//            //归档
+//            if (jyProject.getArchiveId().equals(id)){
+//                stage="3";
+//            }
+//        }
+
+        for (FileDictVo dictVo : list) {
+            if(StringUtils.isNotBlank(dictVo.getRequiredStage()) && dictVo.getRequiredStage().equals(stage)){
+                dictVo.setMustFlag(1);
+            }else{
+                dictVo.setMustFlag(0);
+            }
+            if(StringUtils.isNotBlank(dictVo.getType())){
+                //此处为子集菜单,需根据项目id和附件类型id查询对应附件信息
+                dictVo.setLevelFlag(2);
+                // 查询附件信息
+                List<WorkAttachmentInfoDTO> files = projectDictMapper.getFileListByAttachmentAndModuleType(dictVo.getId(), projectId);
+                if (CollectionUtils.isNotEmpty(files)) {
+                    fileList.addAll(files);
+                }
+            }else{
+                dictVo.setLevelFlag(1);
+            }
+        }
+        //对附件进行处理
+        if (CollectionUtils.isNotEmpty(fileList)) {
+            for (WorkAttachmentInfoDTO workAttachmentInfoDTO : fileList) {
+                FileDictVo info = new FileDictVo();
+                info.setId(workAttachmentInfoDTO.getId());
+                info.setParentId(workAttachmentInfoDTO.getAttachmentId());
+                info.setAttachmentName(workAttachmentInfoDTO.getAttachmentName());
+                info.setWorkAttachmentType(workAttachmentInfoDTO.getType());
+                info.setFileSize(workAttachmentInfoDTO.getFileSize());
+                info.setCreateDate(workAttachmentInfoDTO.getCreateTime());
+                info.setUrl(workAttachmentInfoDTO.getUrl());
+                info.setLsUrl(getFileTemporaryLookUrl(aliyunUrl + workAttachmentInfoDTO.getUrl()));
+                //此处为子集菜单,需根据项目id和附件类型id查询对应附件信息
+                info.setLevelFlag(3);
+                list.add(info);
+            }
+        }
+
+
+        return list;
+    }
+
+    /**
+     * 查询
+     * @param projectDictDto
+     * @return
+     */
+    public List<FileDictVo> list(ProjectDictDto projectDictDto) {
+        List<FileDictVo> list = new ArrayList<>();
+        if (StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectType()) /*&& StringUtils.isNotEmpty(projectDictDto.getAttachmentProjectSort())*/) {
+            //查询父级
+            List<FileDictVo> parentList = projectDictMapper.parentList();
+            list.addAll(parentList);
+            //查询子级
+            List<FileDictVo> dictVos = projectDictMapper.list(projectDictDto.getAttachmentProjectType(),projectDictDto.getAttachmentProjectSort(), projectDictDto.getProjectLevel());
+            list.addAll(dictVos);
+        }
+        return list;
+    }
+
+    /**
+     * 保存
+     * @param projectDictDto
+     * @return
+     */
+    public String save(ProjectDictDto projectDictDto) {
+        if (StringUtils.isNotEmpty(projectDictDto.getId())) {
+            return update(projectDictDto);
+        } else {
+            return add(projectDictDto);
+        }
+    }
+
+    /**
+     * 新增
+     * @param projectDictDto
+     * @return
+     */
+    public String add(ProjectDictDto projectDictDto) {
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        String id = UUID.randomUUID().toString().replace("-", "");
+        ProgramProjectDict dict = new ProgramProjectDict();
+        BeanUtils.copyProperties(projectDictDto, dict);
+        dict.setId(id);
+        dict.setCreateById(userDTO.getId());
+        dict.setCreateTime(new Date());
+        dict.setUpdateById(userDTO.getId());
+        dict.setUpdateTime(new Date());
+        dict.setDelFlag(0);
+        projectDictMapper.insert(dict);
+        return "操作成功";
+    }
+
+    /**
+     * 修改
+     * @param projectDictDto
+     * @return
+     */
+    public String update(ProjectDictDto projectDictDto) {
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        ProgramProjectDict dict = new ProgramProjectDict();
+        BeanUtils.copyProperties(projectDictDto, dict);
+        dict.setUpdateById(userDTO.getId());
+        dict.setUpdateTime(new Date());
+        dict.setDelFlag(0);
+        projectDictMapper.updateById(dict);
+        return "操作成功";
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    public String deleteById(String id) {
+        projectDictMapper.deleteById(id);
+        return "操作成功";
+    }
+
+    /**
+     * 新增附件结构信息附件名称查询
+     * @param projectDictDto
+     * @return
+     */
+    public List<ProgramFileDict> getFileList(ProjectDictDto projectDictDto) {
+        List<FileDictVo> list = list(projectDictDto);
+        if (CollectionUtil.isNotEmpty(list)) {
+            List<String> fileIds = list.stream().map(i -> i.getFileId()).collect(Collectors.toList());
+            // 根据fileId查询所属层级
+            String parentId = programFileDictMapper.selectById(projectDictDto.getFileId()).getParentId();
+            if (CollectionUtil.isNotEmpty(fileIds) && StringUtils.isNotEmpty(projectDictDto.getFileId()) && !"0".equals(parentId)) {
+                fileIds.remove(projectDictDto.getFileId());
+                return projectDictMapper.getFileList(projectDictDto.getFileId(), fileIds);
+            } else {
+                return projectDictMapper.getFileParentList(projectDictDto.getFileId(),  fileIds);
+            }
+        }
+        return new ArrayList<>();
+    }
+
+    /**
+     * 根据fileId查询
+     * @param id
+     * @return
+     */
+    public ProgramFileDict findByFileId(String id) {
+        return projectDictMapper.findById(id);
+    }
+
+    /**
+     * 阿里云获取临时文件查看url
+     * @param url
+     */
+    public String getFileTemporaryLookUrl(String url){
+        url = url.replace("amp;","");
+        String cons = "";
+        if (url.contains(aliyunUrl)){
+            cons = aliyunUrl;
+        }else if (url.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+            cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+        }else {
+            cons = aliyunDownloadUrl;
+        }
+        String key = "";
+        String[] split = url.split(cons + "/");
+        if(split.length>1){
+            key = split[1];
+        }else{
+            key = url;
+        }
+        // 指定过期时间为24小时。
+        Date expiration = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 );
+        //初始化OSSClient
+        OSSClient ossClient = new OSSClient(endpoint,accessKeyId,accessKeySecret);
+        return ossClient.generatePresignedUrl(bucketName, key, expiration).toString();
+    }
+}

+ 27 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/service/dto/ProjectDictDto.java

@@ -0,0 +1,27 @@
+package com.jeeplus.finance.projectDict.service.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProjectDictDto {
+
+    /**
+     * 项目等级
+     */
+    private String projectLevel;
+
+    private String id;
+
+    private String attachmentProjectType;
+
+    private String attachmentProjectSort;
+
+    private String fileId;
+
+    private String requiredStage;
+
+    private List<String> sortList;
+
+}

+ 6 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/domain/CwProjectRecords.java

@@ -18,6 +18,12 @@ public class CwProjectRecords extends BaseEntity {
 
     private static final long serialVersionUID = 1L;
 
+    //项目等级
+    private String projectLevel;
+
+    //项目类型(区分造价审核与工程咨询)
+    private String projectType;
+
     /**
      * 备注信息
      */

+ 7 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml

@@ -90,7 +90,9 @@
         a.risk_level,
         a.real_header,
         a.report_type,
-        a.report_review
+        a.report_review,
+        a.project_type,
+        a.project_level
     </sql>
     <sql id="File_Column_List">
         wa.id,
@@ -284,7 +286,8 @@
         cw_wci.payment_method,
         cw_wcb.name as client_contacts_name,
         cw_pbt.name as business_type_name,
-        b.member_count
+        b.member_count,
+        prnl.report_no
         from cw_project_records a
         left join sys_user su on su.id = a.create_by_id and su.del_flag = '0'
         left join sys_user su2 on su2.id = a.project_master_id and su2.del_flag = '0'
@@ -300,6 +303,8 @@
         left join cw_project_members cpm on a.id = cpm.project_id
         left join sys_user sub on cpm.user_id = sub.id
         left join sys_user_manage_office sumo on sumo.office_id = sub.office_id
+        LEFT JOIN cw_project_report pr on pr.project_id=a.id and pr.del_flag = '0'
+        LEFT JOIN cw_project_report_new_line prnl on pr.id=prnl.report_id and prnl.del_flag = '0'
         ${ew.customSqlSegment}
         ORDER BY a.create_time DESC
     </select>

+ 4 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwProjectRecordsService.java

@@ -94,6 +94,9 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
             if (ArrayUtil.isNotEmpty(cwProjectRecordsDTO.getCreateDates())) {
                 queryWrapper.between("a.create_time", cwProjectRecordsDTO.getCreateDates()[0], cwProjectRecordsDTO.getCreateDates()[1]);
             }
+            if (ArrayUtil.isNotEmpty(cwProjectRecordsDTO.getProjectType())) {
+                queryWrapper.eq("a.project_type", cwProjectRecordsDTO.getProjectType());
+            }
             if (StringUtils.isNotBlank(cwProjectRecordsDTO.getProjectMasterName())) {
                 queryWrapper.in("a.project_master_id", cwProjectRecordsDTO.getProjectMasterName());
             }
@@ -283,6 +286,7 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
             }
         }
         CwProjectRecords cwProjectRecords = CwProjectRecordsWrapper.INSTANCE.toEntity(cwProjectRecordsDTO);
+
         if (ObjectUtil.isNotEmpty(cwProjectRecords)) {
             if (StringUtils.isBlank(cwProjectRecords.getCreateById())) {
                 cwProjectRecords.setCreateById(userDTO.getId());

+ 6 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwProjectRecordsDTO.java

@@ -25,6 +25,12 @@ import java.util.List;
 public class CwProjectRecordsDTO extends BaseDTO {
     private static final long serialVersionUID = 1L;
 
+    //项目等级
+    private String projectLevel;
+
+    //项目类型(区分造价审核与工程咨询)
+    private String projectType;
+
     //项目编号(字典值)
     public static final String BIZ_CODE = "12";
 

+ 52 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java

@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.collect.Lists;
 import com.jeeplus.common.TokenProvider;
 import com.jeeplus.common.excel.ExcelOptions;
 import com.jeeplus.common.excel.annotation.ExportMode;
@@ -13,6 +14,11 @@ import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.finance.invoice.util.EasyPoiUtil;
 import com.jeeplus.finance.invoice.util.FreemarkerUtil;
 import com.jeeplus.finance.invoice.util.SignaturePostUtil;
+import com.jeeplus.finance.projectDict.domain.vo.FileDictVo;
+import com.jeeplus.finance.projectDict.service.ProjectDictService;
+import com.jeeplus.finance.projectDict.service.dto.ProjectDictDto;
+import com.jeeplus.finance.projectRecords.domain.CwProjectRecords;
+import com.jeeplus.finance.projectRecords.service.CwProjectRecordsService;
 import com.jeeplus.finance.projectReport.domain.CwProjectReport;
 import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
 import com.jeeplus.finance.projectReport.domain.CwProjectReportSignature;
@@ -76,6 +82,10 @@ public class CwProjectReportController {
     @Autowired
     private IFlowableApi flowTaskService;
 
+    @Resource
+    private ProjectDictService projectDictService;
+    @Resource
+    private CwProjectRecordsService projectRecordsService;
 
     /**
      * 保存财务报告信息-流程
@@ -220,6 +230,46 @@ public class CwProjectReportController {
     }
 
     /**
+     * 查询客户信息数据
+     * @param id
+     * @return
+     */
+    @ApiLog("查询财务报告数据")
+    // @PreAuthorize ("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
+    @GetMapping("queryByIdNew")
+    public ResponseEntity queryByIdNew(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = projectReportService.queryByIdNew ( id );
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据项目id查询外审附件信息
+     * @param projectId  项目id
+     * @param id  当前阶段的id
+     * @return
+     */
+    @ApiOperation(value = "根据项目id查询外审附件信息")
+    @GetMapping(value = "/getAttachmentList")
+    public ResponseEntity<List<FileDictVo>> getAttachmentList(@RequestParam String projectId, @RequestParam String id){
+        //根据项目id查询项目信息
+        CwProjectRecords project = projectRecordsService.getById(projectId);
+        ProjectDictDto projectDictDto = new ProjectDictDto();
+        List<String> sortList = Lists.newArrayList();
+        sortList.add("11");
+        sortList.add("12");
+        sortList.add("13");
+        if(StringUtils.isNotBlank(project.getProjectType())){
+            projectDictDto.setAttachmentProjectType(project.getProjectType());
+        }
+//        projectDictDto.setAttachmentProjectType("2");
+
+        projectDictDto.setProjectLevel(project.getProjectLevel());
+        projectDictDto.setAttachmentProjectSort(project.getReportType());
+        projectDictDto.setSortList(sortList);
+        List<FileDictVo> list = projectDictService.getFileDictList(projectDictDto,projectId,id);
+        return ResponseEntity.ok(list);
+    }
+    /**
      * 查询客户信息数据  报告号申请流程所用
      * @param id
      * @return
@@ -292,8 +342,8 @@ public class CwProjectReportController {
     @ApiLog(value = "删除财务报告信息", type = LogTypeEnum.SAVE)
     @PreAuthorize ("hasAuthority('cwProjectReport:del')")
     @DeleteMapping("delete")
-    public ResponseEntity delete(String ids) {
-        return projectReportService.deleteByIds(ids);
+    public ResponseEntity delete(String ids,String projectId) {
+        return projectReportService.deleteByIds(ids, projectId);
     }
 
     /**

+ 47 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportReviewController.java

@@ -42,6 +42,30 @@ public class CwProjectReportReviewController {
     }
 
     /**
+     * 项目登记,生成报告号
+     * @param reportData
+     * @return
+     */
+    @ApiLog(value = "项目登记,生成报告号", type = LogTypeEnum.SAVE)
+    @PostMapping("saveFormNew")
+    public ResponseEntity saveFormNew(@Valid @RequestBody CwProjectReportData reportData) throws Exception {
+        String id = service.saveFormNew(reportData);
+        return ResponseUtil.newInstance().add("businessTable", "cw_project_report_review").add("businessId", id).ok ("操作成功");
+    }
+    /**
+     * 保存财务报告信息-流程
+     * @param reportData
+     * @return
+     */
+    @ApiLog(value = "保存财务报告信息-流程", type = LogTypeEnum.SAVE)
+    //@PreAuthorize("hasAnyAuthority('cwProjectReportReview:add','cwProjectReportReview:edit')")
+    @PostMapping("saveFormReviewNew")
+    public ResponseEntity saveFormReviewNew(@Valid @RequestBody CwProjectReportData reportData) throws Exception {
+        String id = service.saveFormReviewNew(reportData);
+        return ResponseUtil.newInstance().add("businessTable", "cw_project_report_review_new").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
      * 根据id修改状态值status
      * @param data
      * @return
@@ -52,6 +76,17 @@ public class CwProjectReportReviewController {
         String s = service.updateReviewStatysByReportId(data);
         return ResponseEntity.ok(s);
     }
+    /**
+     * 根据id修改状态值status
+     * @param data
+     * @return
+     */
+    @ApiOperation(value = "根据id修改状态值status")
+    @PostMapping(value = "/updateReviewStatusByReportIdNew")
+    public ResponseEntity<String> updateReviewStatusByReportIdNew(@RequestBody CwProjectReportData data) {
+        String s = service.updateReviewStatusByReportIdNew(data);
+        return ResponseEntity.ok(s);
+    }
 
     /**
      * 查询客户信息数据
@@ -65,6 +100,18 @@ public class CwProjectReportReviewController {
         CwProjectReportData projectReportData = service.queryByReportId(id);
         return ResponseEntity.ok (projectReportData);
     }
+    /**
+     * 查询客户信息数据
+     * @param id
+     * @return
+     */
+    @ApiLog("查询财务报告数据")
+    @PreAuthorize ("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
+    @GetMapping("queryByReportIdNew")
+    public ResponseEntity queryByReportIdNew(@RequestParam("id") String id) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
+        CwProjectReportData projectReportData = service.queryByReportIdNew(id);
+        return ResponseEntity.ok (projectReportData);
+    }
 
     /**
      * 查询客户信息数据

+ 61 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportData.java

@@ -9,6 +9,7 @@ import com.jeeplus.finance.common.flowable.dto.CommitParamDTO;
 import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 import java.util.List;
@@ -20,6 +21,66 @@ import java.util.List;
 @Data
 public class CwProjectReportData extends BaseDTO {
 
+    private List<CwProjectReviewNewTeam> detailInfos;
+
+    private String reviewNewId;
+
+    //项目等级
+    private String projectLevel;
+    /**
+     * 注册/资格证号
+     */
+    private String enrollCertNo;
+
+    /**
+     * 专业
+     */
+    private String profession;
+    /**
+     * 证书类型
+     */
+    private String professionType;
+
+    /**
+     * 成员名称
+     */
+    private String memberName;
+
+    /**
+     * 项目负责人
+     */
+    private String projectManager;
+    /**
+     * 项目负责人id
+     */
+    private String projectManagerId;
+
+    /**
+     * 项目创建人
+     */
+    private String projectCreateByName;
+
+    /**
+     * 项目创建时间
+     */
+    private Date projectCreateTime;
+
+    private String reviewFee;  //送审价
+    private String approvalFee;  //审定价
+    private String contractCategory;  //合同类别
+    private String contractFee;  //合同价
+    private String contractRate;  //费率
+    private String verifyFee;  //核增核减额
+    private String verifyRate;  //核增核减率
+    private String consultFee;  //咨询标的额
+    private String buildingFee;  //土建造价
+    private String installFee;  //安装造价
+    private String buildingRate;  //土建比例
+    private String installRate;  //安装比例
+    private String workStartDate;  //工作开始时间
+    private String workEndDate;  //工作结束时间
+    private String ziXunShouRu;  //造价咨询营业收入
+
     //报告号申请流程的  流程id,及流程状态  及 取号类型  及  非正常取号原因
     @TableField(exist = false)
     private String applyProcId;

+ 29 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportTeamMembers.java

@@ -0,0 +1,29 @@
+package com.jeeplus.finance.projectReport.domain;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+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 com.jeeplus.core.query.Query;
+import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: 徐滕
+ * @version: 2022-11-11 14:01
+ */
+@Data
+@TableName("cw_project_report")
+public class CwProjectReportTeamMembers extends BaseEntity {
+
+    private String userId;      //用户id
+    private String reportId;    //报告id
+    private String content;     //本人负责内容
+    private String opinion;     //审核意见
+
+}

+ 50 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReviewNew.java

@@ -0,0 +1,50 @@
+package com.jeeplus.finance.projectReport.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;
+
+/**
+ * @author: 王强
+ * @create: 2022-12-12 20:37
+ **/
+@Data
+@TableName(value = "cw_project_report_review_new")
+public class CwProjectReviewNew extends BaseEntity {
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    private String processDefinitionId;
+
+    /**
+     * 流程状态
+     */
+    private String reviewStatus;
+    private String reportId;  //报告id
+    private String reviewBy;  //下一节点审核人id
+    private String reviewFee;  //送审价
+    private String approvalFee;  //审定价
+    private String contractCategory;  //合同类别
+    private String contractFee;  //合同价
+    private String contractRate;  //费率
+    private String verifyFee;  //核增核减额
+    private String verifyRate;  //核增核减率
+    private String consultFee;  //咨询标的额
+    private String buildingFee;  //土建造价
+    private String installFee;  //安装造价
+    private String buildingRate;  //土建比例
+    private String installRate;  //安装比例
+    private String workStartDate;  //工作开始时间
+    private String workEndDate;  //工作结束时间
+    private String ziXunShouRu;  //造价咨询营业收入
+
+
+}

+ 33 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReviewNewTeam.java

@@ -0,0 +1,33 @@
+package com.jeeplus.finance.projectReport.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * @author: 王强
+ * @create: 2022-12-12 20:37
+ **/
+@Data
+@TableName(value = "cw_project_report_review_new_team")
+public class CwProjectReviewNewTeam extends BaseEntity {
+
+    private String reportId;  //报告id
+    private String userId;  //用户id
+    private String userRole;  //角色
+    private String content;  //本人负责内容
+    private String opinion;  //审核意见
+
+    @TableField(exist = false)
+    private String memberName;  //成员名称
+    @TableField(exist = false)
+    private String professionType;  //证书类型
+    @TableField(exist = false)
+    private String profession;  //专业
+    @TableField(exist = false)
+    private String enrollCertNo;  //注册/资格证号
+
+
+
+}

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

@@ -47,6 +47,9 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
     @InterceptorIgnore(tenantLine = "true")
     CwProjectReportData queryById(@Param("id") String id);
 
+    @InterceptorIgnore(tenantLine = "true")
+    CwProjectReportData queryByIdNew(@Param("id") String id);
+
     /**
      * 查询被服务单位
      * @param page

+ 24 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReviewNewMapper.java

@@ -0,0 +1,24 @@
+package com.jeeplus.finance.projectReport.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNew;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-19 9:55
+ */
+@Mapper
+public interface CwProjectReviewNewMapper extends BaseMapper<CwProjectReviewNew> {
+
+
+    /**
+     * 根据id修改状态
+     * @param id
+     * @param reviewStatus
+     */
+    void updateStatusById(@Param("id") String id, @Param("reviewStatus") String reviewStatus);
+}

+ 25 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReviewNewTeamMapper.java

@@ -0,0 +1,25 @@
+package com.jeeplus.finance.projectReport.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportSignature;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNewTeam;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-19 10:02
+ */
+@Mapper
+public interface CwProjectReviewNewTeamMapper extends BaseMapper<CwProjectReviewNewTeam> {
+
+    @InterceptorIgnore(tenantLine = "true")
+    void deleteByReportId(@Param("reportId") String reportId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<CwProjectReviewNewTeam> selectByReportId(@Param("reportId") String reportId );
+}

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

@@ -37,6 +37,113 @@
         cw_wcb.agree_user_id
     </sql>
 
+    <sql id="Cw_Re_Column_List">
+        cw_re.id AS reviewNewId,
+        cw_re.proc_ins_id AS procInsId3,
+        cw_re.review_status as reviewStatus,
+        cw_re.review_by reviewBy,
+        cw_re.review_fee reviewFee,
+        cw_re.approval_fee approvalFee,
+        cw_re.contract_category contractCategory,
+        cw_re.contract_fee contractFee,
+        cw_re.contract_rate contractRate,
+        cw_re.verify_fee verifyFee,
+        cw_re.verify_rate verifyRate,
+        cw_re.consult_fee consultFee,
+        cw_re.building_fee buildingFee,
+        cw_re.install_fee installFee,
+        cw_re.building_rate buildingRate,
+        cw_re.install_rate installRate,
+        cw_re.work_start_date workStartDate,
+        cw_re.work_end_date workEndDate,
+        cw_re.zi_xun_shou_ru ziXunShouRu
+    </sql>
+
+    <select id="queryByIdNew" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
+        SELECT
+         a.id,
+        a.create_by_id AS createById,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.remarks,
+        a.STATUS,
+        a.document_no,
+        a.project_report_number,
+        a.project_id,
+        a.office_id,
+        a.signature_type,
+        a.signature_annotator1,
+        a.signature_annotator2,
+        a.signature_contract_id,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.signature_annotator_status,
+        c.NAME AS departmentName,
+        d.NAME AS userName,
+        a.create_time,
+        e.NAME AS projectMasterName,
+        a.real_create,
+        a.business_type,
+        a.audit_business_type,
+        a.register_address,
+        a.business_location,
+        a.security_business,
+        suser.NAME AS real_header_name,
+        b.project_name AS projectName,
+        b.project_number AS projectNumber,
+        b.project_level AS projectLevel,
+        su3.NAME AS projectManager,
+        su3.id AS projectManagerId,
+        su3.NAME AS memberName,
+        cert.type AS professionType,
+        cert.profession AS profession,
+        cert.enroll_cert_no AS enrollCertNo,
+        su2.NAME AS projectCreateByName,
+        b.create_time AS projectCreateTime,
+        a.industry,
+        a.business_objects,
+        a.report_name,
+        <include refid="Cw_Re_Column_List"></include>
+    FROM
+        cw_project_report a
+        LEFT JOIN cw_project_records b ON a.project_id = b.id
+        AND b.del_flag = '0'
+        LEFT JOIN sys_user su2 ON b.create_by_id = su2.id
+        AND su2.del_flag = '0'
+        LEFT JOIN sys_user su3 ON b.project_leader_id = su3.id
+        AND su3.del_flag = '0'
+        LEFT JOIN sys_cert cert ON su3.id = cert.user_id
+        AND cert.del_flag = '0'
+        LEFT JOIN sys_office c ON a.office_id = c.id
+        AND c.del_flag = '0'
+        LEFT JOIN sys_user d ON a.create_by_id = d.id
+        AND d.del_flag = '0'
+        LEFT JOIN sys_user e ON b.project_master_id = e.id
+        AND e.del_flag = '0'
+        LEFT JOIN sys_user suser ON b.real_header = suser.id
+        AND suser.del_flag = '0'
+        LEFT JOIN cw_project_report_review_new cw_re ON a.id = cw_re.report_id
+        AND cw_re.del_flag = '0'
+    WHERE
+        a.id = #{id}
+				AND a.del_flag = '0'
+        AND cert.type IN ('3', '4')
+        AND cert.type = (
+            CASE
+                WHEN EXISTS (
+                    SELECT 1
+                    FROM sys_cert sub_cert
+                    WHERE sub_cert.user_id = su3.id
+                        AND sub_cert.type = '3'
+                        AND sub_cert.del_flag = '0'
+                ) THEN '3'
+                ELSE '4'
+            END
+        );
+    </select>
+
     <select id="findList" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
         SELECT
         DISTINCT a.id,
@@ -83,7 +190,7 @@
         cw_prs3.id as sid3,
         ifnull(cw_rev.review_status,'0') as reviewStatus,
         cw_rev.proc_ins_id as procInsId3,
-        cw_rev.new_type as newType,
+        cw_rev.id as reviewNewId,
         new_line.report_no as reportNo,
         cwcb.name as servedUnitName,
         art.ID_ as rev_task_id,
@@ -104,7 +211,8 @@
         cw_nra.proc_ins_id as applyReviewProcId,
         cw_nra.process_definition_id as applyReviewProcDefId,
         ifnull(cw_nra.review_status,'0') as applyReviewStatus,
-        cw_ci.contract_name
+        cw_ci.contract_name,
+        b.project_level
         FROM cw_project_report a
         left join cw_project_records b on a.project_id = b.id
         LEFT JOIN sys_office c on a.office_id = c.id
@@ -120,7 +228,7 @@
         left join act_ru_task art3 ON cw_prs3.proc_ins_id = art3.PROC_INST_ID_
 
         left join cw_project_report_new_line new_line on a.id = new_line.report_id and new_line.del_flag = '0'
-        left join cw_project_report_review cw_rev on a.id = cw_rev.report_id and cw_rev.del_flag = '0'
+        left join cw_project_report_review_new cw_rev on a.id = cw_rev.report_id and cw_rev.del_flag = '0'
         LEFT JOIN cw_project_report_archive cw_pa on  a.id = cw_pa.report_id and cw_pa.del_flag = '0'
         left join act_ru_task art ON cw_rev.proc_ins_id = art.PROC_INST_ID_
         left join cw_project_members cpm on b.id = cpm.project_id

+ 8 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReviewNewMapper.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.finance.projectReport.mapper.CwProjectReviewNewMapper">
+    <update id="updateStatusById">
+        update cw_project_report_review_new set review_status = #{reviewStatus}
+        where id = #{id}
+    </update>
+</mapper>

+ 46 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReviewNewTeamMapper.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.finance.projectReport.mapper.CwProjectReviewNewTeamMapper">
+
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.report_id,
+        a.user_id,
+        a.user_role,
+        a.content,
+        a.opinion
+    </sql>
+    <delete id="deleteByReportId">
+        update cw_project_report_review_new_team set del_flag = '1' where report_id = #{reportId}
+    </delete>
+    <select id="selectByReportId" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReviewNewTeam">
+        select
+        <include refid="Base_Column_List"></include>,
+        su.name as memberName,
+        cert.type AS professionType,
+        cert.profession AS profession,
+        cert.enroll_cert_no AS enrollCertNo
+        from cw_project_report_review_new_team a
+        left join sys_user su on a.user_id = su.id and su.del_flag = '0'
+        LEFT JOIN sys_cert cert ON su.id = cert.user_id AND cert.del_flag = '0'
+        where a.report_id = #{reportId} and a.del_flag = '0'
+        AND cert.type IN ('3', '4')
+        AND cert.type = (
+        CASE
+        WHEN EXISTS (
+        SELECT 1
+        FROM sys_cert sub_cert
+        WHERE sub_cert.user_id = su.id
+        AND sub_cert.type = '3'
+        AND sub_cert.del_flag = '0'
+        ) THEN '3'
+        ELSE '4'
+        END
+        );
+    </select>
+</mapper>

+ 191 - 3
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java

@@ -7,9 +7,8 @@ import com.jeeplus.common.TokenProvider;
 import com.jeeplus.finance.projectRecords.domain.CwProjectRecords;
 import com.jeeplus.finance.projectRecords.mapper.CwProjectRecordsMapper;
 import com.jeeplus.finance.projectReport.domain.*;
-import com.jeeplus.finance.projectReport.mapper.CwProjectInfoMapper;
-import com.jeeplus.finance.projectReport.mapper.CwProjectReportReviewMapper;
-import com.jeeplus.finance.projectReport.mapper.CwProofreadDetailMapper;
+import com.jeeplus.finance.projectReport.mapper.*;
+import com.jeeplus.finance.projectReport.service.dto.CwProjectReportDTO;
 import com.jeeplus.finance.projectReportArchive.mapper.CwProjectReportArchiveMapper;
 import com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.ReportNoDto;
 import com.jeeplus.flowable.feign.IFlowableApi;
@@ -20,6 +19,7 @@ import com.jeeplus.sys.service.dto.UserDTO;
 //import com.jeeplus.sys.utils.UserUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.commons.lang3.StringUtils;
+import org.checkerframework.checker.units.qual.C;
 import org.flowable.bpmn.model.FlowNode;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.flowable.editor.language.json.converter.util.CollectionUtils;
@@ -31,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
@@ -50,6 +51,11 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
     private CwProjectReportReviewMapper mapper;
 
     @Resource
+    private CwProjectReviewNewMapper reviewNewMapper;
+    @Resource
+    private CwProjectReviewNewTeamMapper newTeamMapper;
+
+    @Resource
     private CwProofreadDetailMapper detailMapper;
 
 //    @Resource
@@ -76,6 +82,14 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
 
         return data;
     }
+    public CwProjectReportData queryByReportIdNew(String id) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
+        CwProjectReviewNew reviewNew = reviewNewMapper.selectOne(new QueryWrapper<CwProjectReviewNew>().eq("report_id", id));
+        CwProjectReportData data = new CwProjectReportData();
+        BeanUtils.copyProperties(reviewNew, data);
+        //查询复核相关信息
+
+        return data;
+    }
 
     /**
      * 修改状态
@@ -136,6 +150,15 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
 
         return "操作成功";
     }
+    /**
+     * 修改状态
+     * @param data
+     * @return
+     */
+    public String updateReviewStatusByReportIdNew(CwProjectReportData data) {
+        reviewNewMapper.updateStatusById(data.getId(),data.getReviewStatus());
+        return "操作成功";
+    }
 
     /**
      * 保存项目以及其他相关信息
@@ -162,6 +185,171 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
         return add(reportData);
 
     }
+
+    /**
+     * 保存项目以及其他相关信息
+     * @param reportData
+     * @return
+     * @throws Exception
+     */
+    public String saveFormReviewNew(CwProjectReportData reportData) throws Exception{
+        if (StringUtils.isNotEmpty(reportData.getId())){
+
+            CwProjectReviewNew detail = reviewNewMapper.selectById(reportData.getReviewNewId());
+            if (detail != null){
+                reportData.setCreateBy(reportData.getCreateBy());
+                return updateNew(reportData,detail);
+            }
+        }
+        return addNew(reportData);
+
+    }
+
+    /**
+     * 合同登记修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public String updateNew(CwProjectReportData reportData,CwProjectReviewNew detail) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        CwProjectReviewNew review = new CwProjectReviewNew();
+        BeanUtils.copyProperties(reportData, review);
+        review.setUpdateById(userDTO.getId());
+        review.setUpdateTime(new Date());
+        review.setId(reportData.getReviewNewId());
+
+        reviewNewMapper.updateById(review);
+
+        //项目组成员数据处理
+        newTeamMapper.delete(new QueryWrapper<CwProjectReviewNewTeam>().eq("report_id",reportData.getId()));
+        //项目组成员保存
+        List<CwProjectReviewNewTeam> newTeams = reportData.getDetailInfos();
+        for (CwProjectReviewNewTeam newTeam : newTeams) {
+            String teamId = UUID.randomUUID().toString().replace("-", "");
+            newTeam.setId(teamId);
+            newTeam.setCreateById(userDTO.getId());
+            newTeam.setCreateTime(new Date());
+            newTeam.setUpdateById(userDTO.getId());
+            newTeam.setUpdateTime(new Date());
+            newTeam.setReportId(reportData.getId());
+            newTeamMapper.insert(newTeam);
+        }
+        return review.getId();
+    }
+
+    public String addNew(CwProjectReportData dto) throws Exception{
+
+
+        //生成主键id值
+        String id = UUID.randomUUID().toString().replace("-", "");
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        //保存基本信息
+        CwProjectReviewNew info = new CwProjectReviewNew();
+        BeanUtils.copyProperties(dto, info);
+
+        info.setId(id);
+        info.setCreateById(userDTO.getId());
+        info.setCreateTime(new Date());
+        info.setUpdateById(userDTO.getId());
+        info.setUpdateTime(new Date());
+        info.setReportId(dto.getId());
+
+        reviewNewMapper.insert(info);
+
+        //项目组成员保存
+        List<CwProjectReviewNewTeam> newTeams = dto.getDetailInfos();
+        for (CwProjectReviewNewTeam newTeam : newTeams) {
+            String teamId = UUID.randomUUID().toString().replace("-", "");
+            newTeam.setId(teamId);
+            newTeam.setCreateById(userDTO.getId());
+            newTeam.setCreateTime(new Date());
+            newTeam.setUpdateById(userDTO.getId());
+            newTeam.setUpdateTime(new Date());
+            newTeam.setReportId(dto.getId());
+            newTeamMapper.insert(newTeam);
+        }
+
+        return info.getId();
+    }
+
+    /**
+     * 保存项目以及其他相关信息
+     * @param reportData
+     * @return
+     * @throws Exception
+     */
+    public String saveFormNew(CwProjectReportData reportData) throws Exception{
+        //生成一条报告信息,并且生成一个报告号
+        //生成报告信息
+        String currentToken = TokenProvider.getCurrentToken();
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(currentToken);
+        String reportId = UUID.randomUUID().toString().replace("-", "");
+        CwProjectReport cwProjectReport = new CwProjectReport();
+        cwProjectReport.setProjectId(reportData.getProjectId());
+        cwProjectReport.setId(reportId);
+        cwProjectReport.setStatus("5");
+        cwProjectReport.setCreateById(userDTO.getId());
+        cwProjectReport.setCreateTime(new Date());
+        cwProjectReport.setUpdateById(userDTO.getId());
+        cwProjectReport.setUpdateTime(new Date());
+        //生成单据编号
+        String documentNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), CwProjectReportDTO.BIZ_CODE,currentToken);
+        cwProjectReport.setDocumentNo(documentNo);
+        //这个是报告编号
+//        String documentNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialReviewNum(userDTO.getCompanyDTO().getId(), CwProjectReview.BIZ_CODE2,TokenProvider.getCurrentToken());
+        CwProjectInfoData infoData = new CwProjectInfoData();
+        String infoDataId = UUID.randomUUID().toString().replace("-", "");
+        infoData.setId(infoDataId);
+        infoData.setCreateById(userDTO.getId());
+        infoData.setCreateTime(new Date());
+        infoData.setUpdateById(userDTO.getId());
+        infoData.setUpdateTime(new Date());
+        infoData.setReportId(reportId);
+        infoData.setReportType("2");
+
+        String reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNumNoSort(userDTO.getCompanyDTO().getId(), CwProjectInfoData.CONSULT_BIZ_CODE,currentToken);
+        infoData.setReportNo(reportNo);
+
+        //报告流水号生成  根据项目编号去new_line表查询
+        String reportNumber = infoMapper.selectReportNumberByProjectNo(reportData.getProjectNumber());
+        if (null != reportNumber) {
+            int stress = 0;
+            stress = reportNumber.indexOf("-");//分隔符位置
+            String substring = reportNumber.substring(stress + 1, reportNumber.length());
+            int integer = Integer.parseInt(substring);
+
+            String newReportNumber = "";
+            if (integer < 10) {
+                if (integer == 9) {
+                    newReportNumber = reportData.getProjectNumber() + "-010";
+                } else {
+                    newReportNumber = reportData.getProjectNumber() + "-00" + (integer + 1);
+                }
+            } else {
+                if (integer < 100) {
+                    if (integer == 99) {
+                        newReportNumber = reportData.getProjectNumber() + "-100";
+                    } else {
+                        newReportNumber = reportData.getProjectNumber() + "-0" + (integer + 1);
+                    }
+                } else {
+                    newReportNumber = reportData.getProjectNumber() + "-" + (integer + 1);
+                }
+            }
+
+            infoData.setReportNumber(newReportNumber);
+        } else {
+            infoData.setReportNumber(reportData.getProjectNumber() + "-001");
+        }
+
+        infoMapper.insert(infoData);
+
+        cwProjectReportService.saveOrUpdate(cwProjectReport);
+
+        return reportId;
+
+    }
     /**
      * 合同登记修改
      */

+ 36 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -73,6 +73,12 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     private Environment environment;
 
     @Resource
+    private CwProjectReviewNewTeamMapper newTeamMapper;
+
+    @Resource
+    private CwProjectReviewNewMapper reviewNewMapper;
+
+    @Resource
     private CwProjectReportMapper reportMapper;
 
     @Resource
@@ -698,6 +704,24 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         return "操作成功";
     }
 
+    public CwProjectReportData queryByIdNew(String id) {
+
+        CwProjectReportData reportData = reportMapper.queryByIdNew(id);
+        if (null != reportData) {
+            List<CwProjectReviewNewTeam> detailInfos = newTeamMapper.selectByReportId(reportData.getId());
+            reportData.setDetailInfos(detailInfos);
+        } else {
+            CwProjectReviewNew reviewNew = reviewNewMapper.selectById(id);
+            if (null != reviewNew) {
+                reportData = reportMapper.queryByIdNew(reviewNew.getReportId());
+                List<CwProjectReviewNewTeam> detailInfos = newTeamMapper.selectByReportId(reportData.getId());
+                reportData.setDetailInfos(detailInfos);
+            }
+        }
+
+        return reportData;
+    }
+
     public CwProjectReportData queryById(String id) {
 
         CwProjectReportData reportData = reportMapper.queryById(id);
@@ -2358,7 +2382,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         return map;
     }
 
-    public ResponseEntity deleteByIds(String ids) {
+    public ResponseEntity deleteByIds(String ids ,String projectId) {
         String idArray[] =ids.split(",");
         //删除 cw_project_report_new_line表信息  cw_project_report_file信息  work_attachment_id表信息
         //先根据ids找到cw_project_report_new_line表的id,根据id去work_attachment_id表中查出id信息删除cw_project_report_file信息
@@ -2403,6 +2427,17 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                 infoMapper.deleteById(info.getId());
             });*/
         }
+
+        for (String s : idArray) {
+            //删除cw_project_report_review_new表对应信息
+            reviewNewMapper.delete(new QueryWrapper<CwProjectReviewNew>().eq("report_id",s));
+            //项目组成员数据处理
+            newTeamMapper.delete(new QueryWrapper<CwProjectReviewNewTeam>().eq("report_id",s));
+
+        }
+        //根据报告id及项目id删除附件信息
+        SpringUtil.getBean(IWorkAttachmentApi.class).deleteByModuleType(projectId);
+
         this.removeByIds (Lists.newArrayList (idArray));
         return ResponseEntity.ok ("删除成功");
     }

+ 19 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReviewNewService.java

@@ -0,0 +1,19 @@
+package com.jeeplus.finance.projectReport.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNew;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReviewNewMapper;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-19 10:04
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+@Component
+public class CwProjectReviewNewService extends ServiceImpl<CwProjectReviewNewMapper, CwProjectReviewNew> {
+}

+ 19 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReviewNewTeamService.java

@@ -0,0 +1,19 @@
+package com.jeeplus.finance.projectReport.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNewTeam;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReviewNewTeamMapper;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-19 10:06
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+@Component
+public class CwProjectReviewNewTeamService extends ServiceImpl<CwProjectReviewNewTeamMapper, CwProjectReviewNewTeam> {
+}

+ 21 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/controller/OssFileController.java

@@ -79,6 +79,14 @@ public class OssFileController {
 //    private OfficeService officeService;
 
     @ApiOperation(value = "保存数据")
+    @PostMapping("/save")
+    public String save(@RequestBody List<WorkAttachment> workAttachments) {
+        String currentToken = TokenProvider.getCurrentToken();
+        String success = ossService.save(workAttachments, currentToken);
+        return success;
+    }
+
+    @ApiOperation(value = "保存数据")
     @PostMapping("/saveMsg")
     public void saveMsg(@RequestBody List<WorkAttachment> workAttachments) {
         String currentToken = TokenProvider.getCurrentToken();
@@ -111,6 +119,13 @@ public class OssFileController {
         return ResponseEntity.ok(list);
     }
 
+    @GetMapping("/getFileListByAttachmentIdAndModuleType")
+    @ApiOperation(value = "查询数据")
+    public List<AttachmentDTO> getFileListByAttachmentIdAndModuleType(@RequestParam("attachmentId") String attachmentId,@RequestParam("moduleType") String moduleType) {
+        List<AttachmentDTO> list = ossService.getFileListByAttachmentIdAndModuleType(attachmentId,moduleType);
+        return list;
+    }
+
     /**
      * 下载附件
      */
@@ -327,6 +342,12 @@ public class OssFileController {
         });
 
     }
+    @ApiOperation(value = "根据id与module_type删除附件信息")
+    @RequestMapping(value = "deleteByModuleType", method = RequestMethod.POST)
+    public void deleteByModuleType(String projectId) {
+        ossService.deleteByModuleType(projectId);
+
+    }
 
     /**
      * 保存附件操作

+ 5 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/feign/WorkAttachmentApiImpl.java

@@ -124,4 +124,9 @@ public class WorkAttachmentApiImpl implements IWorkAttachmentApi {
 
     }
 
+    @Override
+    public void deleteByModuleType(String projectId) {
+
+    }
+
 }

+ 19 - 14
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/mapper/xml/OssServiceMapper.xml

@@ -66,6 +66,7 @@
             type,
             attachment_id,
             attachment_name,
+            module_type,
             attachment_flag,
             file_size,
             sort
@@ -81,6 +82,7 @@
             #{workAttachment.type},
             #{workAttachment.attachmentId},
             #{workAttachment.attachmentName},
+            #{workAttachment.moduleType},
             #{workAttachment.attachmentFlag},
             #{workAttachment.fileSize},
             #{workAttachment.sort}
@@ -91,20 +93,23 @@
         SELECT a.id, a.url, a.type, a.attachment_id, a.attachment_name, a.attachment_flag,
         a.module_type, a.attachment_type, a.file_size, a.sort, a.description,
         a.create_time, a.create_by_id as "create_by.id", su.name as "createBy.name" , a.update_time, a.update_by_id as "updateBy.id", a.del_flag
-         FROM work_attachment a
-         left join sys_user su on su.id = a.create_by_id
-         <where>
-             a.del_flag = 0
-             <if test="attachmentId != null and attachmentId != ''">
-                 and a.attachment_id = #{attachmentId}
-             </if>
-             <if test="attachmentName != null and attachmentName != ''">
-                 and a.attachment_name = #{attachmentName}
-             </if>
-             <if test="attachmentFlag != null and attachmentFlag != ''">
-                 and a.attachment_flag = #{attachmentFlag}
-             </if>
-         </where>
+        FROM work_attachment a
+        left join sys_user su on su.id = a.create_by_id
+        <where>
+            a.del_flag = 0
+            <if test="attachmentId != null and attachmentId != ''">
+                and a.attachment_id = #{attachmentId}
+            </if>
+            <if test="attachmentName != null and attachmentName != ''">
+                and a.attachment_name = #{attachmentName}
+            </if>
+            <if test="attachmentFlag != null and attachmentFlag != ''">
+                and a.attachment_flag = #{attachmentFlag}
+            </if>
+            <if test="url != null and url != ''">
+                and a.url = #{url}
+            </if>
+        </where>
     </select>
 
     <select id="selectWorkAttachmentByAttachmentId"

+ 75 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/service/OssService.java

@@ -78,6 +78,76 @@ public class OssService extends ServiceImpl<OssServiceMapper, WorkAttachment> {
         ossServiceMapper.insertWorkAttachment(workAttachment, userDto);
     }
 
+    /**
+     * 保存数据
+     * @param workAttachments
+     * @return
+     */
+    public String save(List<WorkAttachment> workAttachments,String currentToken) {
+//        String currentToken = TokenProvider.getCurrentToken();
+        if (CollectionUtil.isNotEmpty(workAttachments)) {
+            //获取当前登录人信息
+            String id = SpringUtil.getBean ( IUserApi.class ).getByToken (currentToken).getId();
+            int i = 1;
+            for (WorkAttachment workAttachment : workAttachments) {
+                //判断文件是否存在
+                WorkAttachmentInfo workAttachmentInfo = new WorkAttachmentInfo();
+                workAttachmentInfo.setUrl(workAttachment.getUrl());
+                workAttachmentInfo.setAttachmentId(workAttachment.getAttachmentId());
+                List<WorkAttachmentInfo> list = ossServiceMapper.getByAttachmentIdAndUrlAndAttachmentFlag(workAttachmentInfo);
+                if (CollectionUtil.isNotEmpty(list)) {
+                    i++;
+                    continue;
+                }
+                log.info("开始执行保存操作,入参:{}" , JSONObject.toJSONString(workAttachments));
+                //文件后缀名赋值
+                List<String> strings = Arrays.asList(workAttachment.getUrl().split("\\."));
+                workAttachment.setType(strings.get(strings.size()-1));
+                workAttachment.setId(UUID.randomUUID().toString().replace("-",""));
+                //排序赋值
+                workAttachment.setSort(i);
+                //基础信息赋值
+                //workAttachment.getCreateBy().setId(id);
+                workAttachment.setCreateTime(new Date());
+                //workAttachment.getUpdateBy().setId(id);
+                workAttachment.setUpdateTime(new Date());
+                workAttachment.setAttachmentId(workAttachment.getAttachmentId());
+                workAttachment.setModuleType(workAttachment.getModuleType());
+                workAttachment.setDelFlag(0);
+                workAttachment.setFileSize(workAttachment.getFileSize());
+                i++;
+
+                UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken (currentToken);
+                ossServiceMapper.insertWorkAttachment(workAttachment, userDTO);
+            }
+
+
+            log.info("保存操作执行完成");
+        }
+        return "保存完成";
+    }
+
+    /**
+     * 根据附件对应父节点id查询文件列表
+     * @param attachmentId
+     * @return
+     */
+    public List<AttachmentDTO> getFileListByAttachmentIdAndModuleType(String attachmentId,String moduleType) {
+
+        log.info("文件查询开始,入参:{}" , attachmentId);
+        log.info("文件查询开始,入参:{}" , moduleType);
+        QueryWrapper<WorkAttachment> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq ("a.attachment_id", attachmentId );
+        queryWrapper.eq ("a.module_type", moduleType );
+        queryWrapper.eq ("a.del_flag", "0" );
+        List<AttachmentDTO> list = ossServiceMapper.findList(queryWrapper);
+        //创建人和文件名称处理
+        if (CollectionUtil.isNotEmpty(list)) {
+            temporaryUrl(list);
+        }
+        log.info("文件查询结束,查询结果:{}" , JSONObject.toJSONString(list));
+        return list;
+    }
 
     /**
      * 保存数据
@@ -548,4 +618,9 @@ public class OssService extends ServiceImpl<OssServiceMapper, WorkAttachment> {
     public void deleteByAttachmentIdNotInIds(String attachmentId, List<String> delIds) {
         ossServiceMapper.deleteByAttachmentIdNotInIds(attachmentId,delIds);
     }
+
+    public void deleteByModuleType(String projectId) {
+        ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().eq("module_type", projectId));
+
+    }
 }

+ 54 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java

@@ -10,8 +10,11 @@ import com.jeeplus.common.constant.CommonConstants;
 import com.jeeplus.core.dto.DragNode;
 import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.sys.domain.Office;
+import com.jeeplus.sys.mapper.UserMapper;
 import com.jeeplus.sys.service.OfficeService;
+import com.jeeplus.sys.service.UserService;
 import com.jeeplus.sys.service.dto.OfficeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.service.mapstruct.OfficeWrapper;
 import com.jeeplus.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -19,7 +22,9 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -36,6 +41,9 @@ public class OfficeController {
     private OfficeService officeService;
 
     @Autowired
+    private UserMapper userMapper;
+
+    @Autowired
     private OfficeWrapper officeWrapper;
 
     @ApiLog("获取二级节点数据信息")
@@ -138,6 +146,52 @@ public class OfficeController {
      * @return
      */
     @ApiLog("获取部门数据")
+    @GetMapping("treeDataNew")
+    public ResponseEntity <List <OfficeDTO>> treeDataNew(@RequestParam(required = false) String tenantId,
+                                                      @RequestParam(required = false) String parentId,
+                                                      @RequestParam(required = false) String extId,
+                                                      @RequestParam(required = false) String type,
+                                                      @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        List <OfficeDTO> list = officeService.findList ( tenantId, parentId );
+        List <OfficeDTO> rootTree = officeService.getOldRootTree (parentId,list, extId, type, showAll );
+
+        List<OfficeDTO> rootTreeNew = new ArrayList<>();
+        // 查询拥有总审角色的用户所在的部门
+        List<UserDTO> userDTOS = userMapper.getUserInfoByRoleName("总审");
+        if (userDTOS != null && !userDTOS.isEmpty()) {
+            for (UserDTO userDTO : userDTOS) {
+                for (OfficeDTO officeDTO : rootTree) {
+                    for (OfficeDTO child : officeDTO.getChildren()) {
+                        if (child.getId().equals(userDTO.getOfficeDTO().getId())) {
+                            rootTreeNew.add(child);
+                        }
+                    }
+                }
+            }
+        }
+
+        // 更新所有rootTree元素的rootTreeNew
+        for (OfficeDTO root : rootTree) {
+            List<OfficeDTO> updatedChildren = new ArrayList<>();
+            for (OfficeDTO child : root.getChildren()) {
+                if (rootTreeNew.contains(child)) {
+                    updatedChildren.add(child);
+                }
+            }
+            root.setChildren(updatedChildren);
+        }
+        return ResponseEntity.ok ( rootTree );
+    }
+
+    /**
+     * 获取机构JSON数据。
+     *
+     * @param extId   排除的ID
+     * @param type    类型(1:公司;2:部门)
+     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @return
+     */
+    @ApiLog("获取部门数据")
     @GetMapping("allTreeData")
     public ResponseEntity <List <OfficeDTO>> allTreeData(@RequestParam(required = false) String tenantId,
                                                       @RequestParam(required = false) String parentId,

+ 107 - 5
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -165,7 +165,7 @@ public class UserController {
     @ApiOperation(value = "查询用户")
     public ResponseEntity queryById(@RequestParam("id") String id) {
         UserDTO userDTO = userService.get ( id );
-        UserOtherInfo otherInfo = otherUserInfoService.getOne(new QueryWrapper<UserOtherInfo>().lambda().eq(UserOtherInfo::getUserInfoId, id));
+        UserOtherInfo otherInfo = otherUserInfoService.getOne(new QueryWrapper<UserOtherInfo>().lambda().eq(UserOtherInfo::getUserInfoId, id).eq(UserOtherInfo::getDelFlag, "0"));
         UserOtherInfoDto  otherInfoDto = new UserOtherInfoDto();
         if (null != otherInfo) {
             BeanUtils.copyProperties(otherInfo, otherInfoDto);
@@ -173,7 +173,7 @@ public class UserController {
         }
 
         //查询合同信息
-        RosterContract contract = rosterContractService.getOne(new QueryWrapper<RosterContract>().lambda().eq(RosterContract::getBaseId, id));
+        RosterContract contract = rosterContractService.getOne(new QueryWrapper<RosterContract>().lambda().eq(RosterContract::getBaseId, id).eq(RosterContract::getDelFlag, 0));
         RosterContractDTO  contractDto = new RosterContractDTO();
         if (null != contract) {
             BeanUtils.copyProperties(contract, contractDto);
@@ -186,7 +186,7 @@ public class UserController {
         }
 
         //查银行卡信息
-        List<RosterBankCards> bankCards = rosterBankCardsService.list(new QueryWrapper<RosterBankCards>().lambda().eq(RosterBankCards::getBaseId, id));
+        List<RosterBankCards> bankCards = rosterBankCardsService.list(new QueryWrapper<RosterBankCards>().lambda().eq(RosterBankCards::getBaseId, id).eq(RosterBankCards::getDelFlag, 0));
         List<RosterBankCardsDTO>  bankCardsDTO = new ArrayList<>();
         bankCards.forEach(ba->{
             RosterBankCardsDTO cardsDTO = new RosterBankCardsDTO();
@@ -196,7 +196,7 @@ public class UserController {
         userDTO.setRosterBankCardsDTOList(bankCardsDTO);
 
         //员工证书
-        List<RosterCertificate> certificates = rosterCertificateService.list(new QueryWrapper<RosterCertificate>().lambda().eq(RosterCertificate::getBaseId, id));
+        List<RosterCertificate> certificates = rosterCertificateService.list(new QueryWrapper<RosterCertificate>().lambda().eq(RosterCertificate::getBaseId, id).eq(RosterCertificate::getDelFlag, 0));
         List<RosterCertificateDTO>  certificateDTOS = new ArrayList<>();
         certificates.forEach(ba->{
             RosterCertificateDTO cardsDTO = new RosterCertificateDTO();
@@ -206,7 +206,7 @@ public class UserController {
         userDTO.setRosterCertificateDTOList(certificateDTOS);
 
         //查询人员资质
-        List<Cert> certs = certService.list(new QueryWrapper<Cert>().lambda().eq(Cert::getUserId, id));
+        List<Cert> certs = certService.list(new QueryWrapper<Cert>().lambda().eq(Cert::getUserId, id).eq(Cert::getDelFlag, 0));
         List<CertDTO>  certDTOS = new ArrayList<>();
         certs.forEach(ba->{
             CertDTO cardsDTO = new CertDTO();
@@ -453,6 +453,108 @@ public class UserController {
      * @param page
      * @return
      */
+    @ApiLog("用户数据列表(新)")
+    @ApiOperation(value = "用户数据列表(新)")
+    @GetMapping("listNew")
+    public ResponseEntity listNew(UserDTO userDTO, Page <UserDTO> page) throws Exception {
+
+        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+        // 管理员查询不限制
+        if (!UserUtils.getCurrentUserDTO().isAdmin()) {
+            queryWrapper.isNull("a.is_admin");
+            if (ObjectUtil.isNotEmpty(userDTO)){
+                if (ObjectUtil.isNotEmpty(userDTO.getCompanyDTO()) && ObjectUtil.isNotEmpty(userDTO.getOfficeDTO())) {
+                    String id = UserUtils.getCurrentUserDTO().getCompanyDTO().getId();
+                    if (StringUtils.isNotBlank(userDTO.getCertType())) {
+                        //获取当前登陆人是否事中审公司人员
+                        /*if(officeDTO.getParentIds().contains("1615171302381182978")){
+
+                        }*/
+                    }else{
+                        // 当不是精确的部门查询时,再添加下面的筛选条件
+                        if ((StringUtils.isNotBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isBlank(userDTO.getOfficeDTO().getId()))
+                                || "true".equals(userDTO.getSelectAll())) {
+                            // officeDTO.id是空,companyDTO.id不是空的话,说明前端组件点击的集团来进行查询
+                            // selectAll为‘true’的话,说明前端没有选择集团或者部门查询,这个时候要展示全部人员
+                            // 根据当前用户的部门id找到此部门的ids
+                            String ids = officeService.getById(UserUtils.getCurrentUserDTO().getOfficeDTO().getId()).getParentIds();
+                            // 根据ids分隔后的index[2],找到当前用户的所属公司id
+                            String companyId = null;
+                            String[] split = ids.split(",");
+                            // split.length大于2,说明当前登录人所属部门是普通部门,展示部分人员信息
+                            // 否则,当前登录人所属公共类部门(忘了叫什么类部门了,就是总经办那种部门),展示全部人员信息
+                            if(split.length>2){
+                                companyId = split[2];
+                                // 根据公司id,找到此公司下的所有部门
+                                List<Office> officeList = officeService.list(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
+                                Set officeIdSet = new HashSet();
+                                for (Office office : officeList) {
+                                    if(StringUtils.isNotBlank(office.getId())){
+                                        officeIdSet.add(office.getId());
+                                    }
+                                }
+                                List<String> officeIdList = Lists.newArrayList(officeIdSet);
+                                // 拿到这些部门的id
+                                //List<String> officeIdList = officeList.stream().distinct().map(Office::getId).collect(Collectors.toList());
+                                // 拿到所有公有部门的id
+                                List<String> officePublicIdList = officeService.list(new LambdaQueryWrapper<Office>().eq(Office::getIsPublic,"1")).stream().map(Office::getId).collect(Collectors.toList());
+                                // 拿到直属公司的id
+                                officeIdList.add(companyId);
+                                // 最后得到的所有部门的id
+                                officeIdList.addAll(officePublicIdList);
+                                List<String> lastIds = officeIdList.stream().distinct().collect(Collectors.toList());
+                                // 添加筛选条件为这些部门的id
+                                queryWrapper.in("a.office_id",lastIds);
+                            }
+                        } else if(StringUtils.isBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())) {
+                            // officeDTO.id不是空,companyDTO.id是空的话,说明前端组件点击的部门查询
+                            queryWrapper.eq("a.office_id",userDTO.getOfficeDTO().getId());
+                        }
+                    }
+                }
+            }
+        }
+        if (ObjectUtil.isNotEmpty(userDTO)) {
+            // 当certType传值时,获取拥有此资格证类型的人员
+            if (StringUtils.isNotBlank(userDTO.getCertType())) {
+
+                //获取当前登录人信息
+                UserDTO loginUserDTO = UserUtils.getCurrentUserDTO();
+                //如果当前登录人是中审的管理咨询部人员,则注会列表中添加该部门选择项
+                if(null != loginUserDTO && null != loginUserDTO.getOfficeDTO()){
+                    OfficeDTO officeDTO = loginUserDTO.getOfficeDTO();
+                    if(StringUtils.isNotBlank(officeDTO.getId())){
+                        if("1602840084816138241".equals(officeDTO.getId())){
+                            queryWrapper.and(
+                                    wrapper -> wrapper.eq("sc.type",userDTO.getCertType()).or().eq("a.office_id","1602840084816138241")
+                            );
+                        }else{
+                            queryWrapper.eq("sc.type",userDTO.getCertType());
+                        }
+                    }else{
+                        queryWrapper.eq("sc.type",userDTO.getCertType());
+                    }
+                }else{
+                    queryWrapper.eq("sc.type",userDTO.getCertType());
+                }
+
+            }
+            if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
+                queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+            }
+        }
+
+        IPage <UserDTO> result = userService.findPageNew ( page, queryWrapper );
+        return ResponseEntity.ok ( result );
+    }
+
+    /**
+     * 查询列表
+     *
+     * @param userDTO
+     * @param page
+     * @return
+     */
     @ApiLog("用户数据列表")
     @ApiOperation(value = "用户数据列表")
     @GetMapping("allUserList")

+ 11 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -115,6 +115,15 @@ public interface UserMapper extends BaseMapper <User> {
     @InterceptorIgnore(tenantLine = "true")
     IPage <UserDTO> findList(Page <UserDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
+    /**
+     * 获取用户列表
+     *
+     * @param queryWrapper
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    IPage <UserDTO> findListNew(Page <UserDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
 
     IPage <UserDTO> userFindPage(Page <UserDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
@@ -270,4 +279,6 @@ public interface UserMapper extends BaseMapper <User> {
      * @return
      */
     String getDepartmentId(@Param("id")String id);
+
+    List<UserDTO> getUserInfoByRoleName(@Param("roleName")String roleName);
 }

+ 22 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -170,6 +170,17 @@
         <include refid="userJoins"/>
         ${ew.customSqlSegment}
     </select>
+    <!-- 分页查询用户信息 -->
+    <select id="findListNew" resultMap="userResult">
+        SELECT
+        <include refid="userColumns"/>
+        FROM sys_user a
+        left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0'
+        left join sys_user_role sur on a.id = sur.user_id
+        left join sys_role sr on sur.role_id = sr.id
+        <include refid="userJoins"/>
+        ${ew.customSqlSegment}
+    </select>
 
     <!-- 分页查询用户信息 -->
     <select id="userFindPage" resultMap="userResult">
@@ -642,5 +653,16 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
         WHERE
             sp.CODE = 'bmzr' and a.office_id = (SELECT office_id FROM sys_user a WHERE a.id = #{id} )
     </select>
+    <select id="getUserInfoByRoleName" resultType="com.jeeplus.sys.service.dto.UserDTO">
+        SELECT
+        <include refid="userColumns"/>
+        FROM sys_user a
+        left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0'
+        left join sys_user_role sur on a.id = sur.user_id
+        left join sys_role sr on sur.role_id = sr.id
+        <include refid="userJoins"/>
+        WHERE
+        sr.name = #{roleName} and sr.del_flag = '0'
+    </select>
 
 </mapper>

+ 15 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -280,6 +280,21 @@ public class UserService extends ServiceImpl <UserMapper, User> {
      * @param queryWrapper
      * @return
      */
+    public IPage <UserDTO> findPageNew(Page <UserDTO> page, QueryWrapper queryWrapper) {
+        queryWrapper.eq ( "a.del_flag", CommonConstants.NOT_DELETED ); // 排除已经删除
+        queryWrapper.eq ( "sr.name", "总审" ); // 排除已经删除
+        return baseMapper.findListNew ( page, queryWrapper );
+
+
+    }
+
+    /**
+     * 自定义分页检索
+     *
+     * @param page
+     * @param queryWrapper
+     * @return
+     */
     public IPage <UserDTO> findMemberPage(Page <UserDTO> page, QueryWrapper queryWrapper) {
         queryWrapper.eq ( "a.del_flag", CommonConstants.NOT_DELETED ); // 排除已经删除
         if (!SecurityUtils.getCurrentUserDTO ( ).isAdmin ( )){