Browse Source

功能调整

wangqiang 1 năm trước cách đây
mục cha
commit
17c5c42b4c
68 tập tin đã thay đổi với 3313 bổ sung1133 xóa
  1. 15 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FinanceApiFallbackFactory.java
  2. 21 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFinanceApi.java
  3. 4 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java
  4. 4 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml
  5. 3 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java
  6. 7 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml
  7. 4 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/dto/CwFinanceInvoiceBaseDTO.java
  8. 26 32
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/service/ProjectDictService.java
  9. 0 183
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/controller/CwFillingbatchController.java
  10. 26 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/controller/CwProjectRecordsController.java
  11. 0 39
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingBatchInfoMapper.java
  12. 0 10
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingbatchFileMapper.java
  13. 0 10
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwFillingbatchProjectMapper.java
  14. 6 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java
  15. 0 158
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwFillingbatchInfoMapper.xml
  16. 9 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml
  17. 0 427
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwFillingbatchService.java
  18. 116 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwProjectRecordsService.java
  19. 209 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/ProjectService.java
  20. 0 93
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwFillingbatchInfoDTO.java
  21. 0 56
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwFillingbatchProjectDTO.java
  22. 10 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/dto/CwProjectRecordsDTO.java
  23. 328 29
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java
  24. 65 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportOnlineArchivingController.java
  25. 67 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportPaperArchivingController.java
  26. 11 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportReviewController.java
  27. 79 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignAndIssueController.java
  28. 105 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/ArchivedReportInfo.java
  29. 101 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportData.java
  30. 32 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportOnlineArchiving.java
  31. 32 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportPaperArchiving.java
  32. 34 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportSignAndIssue.java
  33. 7 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReviewNew.java
  34. 3 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReviewNewTeam.java
  35. 34 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java
  36. 22 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportOnlineArchivingMapper.java
  37. 22 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportPaperArchivingMapper.java
  38. 6 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportReviewMapper.java
  39. 23 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportSignAndIssueMapper.java
  40. 261 6
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml
  41. 8 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportOnlineArchivingMapper.xml
  42. 8 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportPaperArchivingMapper.xml
  43. 24 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportReviewMapper.xml
  44. 8 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportSignAndIssueMapper.xml
  45. 11 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReviewNewTeamMapper.xml
  46. 124 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportOnlineArchivingService.java
  47. 124 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportPaperArchivingService.java
  48. 25 4
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java
  49. 459 55
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java
  50. 127 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportSignAndIssueService.java
  51. 22 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/dto/ProjectContactInfo.java
  52. 29 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/dto/ProjectReportInfo.java
  53. 5 5
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/domain/ProgramProjectListInfo.java
  54. 25 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/FreemarkerUtil.java
  55. 61 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/ResponseUtil.java
  56. 221 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/controller/WorkClientController.java
  57. 10 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/CwWorkClientBase.java
  58. 31 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientBank.java
  59. 161 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientInfo.java
  60. 14 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientJobTypeInfo.java
  61. 56 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientLinkman.java
  62. 2 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/mapper/xml/CwWorkClientBaseMapper.xml
  63. 17 4
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/CwWorkClientService.java
  64. 7 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/dto/CwWorkClientBaseDTO.java
  65. BIN
      jeeplus-modules/jeeplus-finance/src/main/resources/dot/批量归档导入模板.xlsx
  66. 9 9
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  67. 2 2
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java
  68. 31 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

+ 15 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FinanceApiFallbackFactory.java

@@ -47,6 +47,21 @@ public class FinanceApiFallbackFactory implements FallbackFactory<IFinanceApi> {
                 return null;
             }
 
+            @Override
+            public String updateQualityOverdueStatus() {
+                return null;
+            }
+
+            @Override
+            public String updateOnlineArchiveStatus() {
+                return null;
+            }
+
+            @Override
+            public String updatePaperArchiveStatus() {
+                return null;
+            }
+
         };
     }
 }

+ 21 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFinanceApi.java

@@ -36,4 +36,25 @@ public interface IFinanceApi {
      */
     @GetMapping(value = "/cwProjectRecords/getPlanDetails")
     String getPlanDetails();
+
+    /**
+     * 修改质量复核超期状态
+     * @return
+     */
+    @GetMapping(value = "/cwProjectReport/updateQualityOverdueStatus")
+    String updateQualityOverdueStatus();
+
+    /**
+     * 修改在线归档超期状态
+     * @return
+     */
+    @GetMapping(value = "/cwProjectReport/updateOnlineArchiveStatus")
+    String updateOnlineArchiveStatus();
+
+    /**
+     * 修改纸质归档超期状态
+     * @return
+     */
+    @GetMapping(value = "/cwProjectReport/updatePaperArchiveStatus")
+    String updatePaperArchiveStatus();
 }

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

@@ -31,10 +31,14 @@ public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {
      * @param companyId
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     List<TreeUserDto> findOfficeListByCompanyId(@Param("companyId")String companyId);
+    @InterceptorIgnore(tenantLine = "true")
+    List<TreeUserDto> findOfficeListByCompanyId2();
 
     List<TreeUserDto> findUserList(@Param("name") String name);
 
+    @InterceptorIgnore(tenantLine = "true")
     List<TreeUserDto> findUserListNew(@Param("name") String name);
 
     List<RetureListDto> findExportList (@Param(Constants.WRAPPER) QueryWrapper queryWrapper);

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

@@ -401,4 +401,8 @@
 			</foreach>
 		</where>
 	</select>
+	<select id="findOfficeListByCompanyId2"
+			resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT id,`name`,parent_id FROM sys_office WHERE del_flag = 0
+	</select>
 </mapper>

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

@@ -774,6 +774,9 @@ public class ReimbursementInfoService {
         List<TreeUserDto> list = new ArrayList<>();
         // 查询部门
         List<TreeUserDto> officeList = infoMapper.findOfficeListByCompanyId(userDTO.getCompanyDTO().getId());
+        if (userDTO.isAdmin()) {
+            officeList = infoMapper.findOfficeListByCompanyId2();
+        }
         List<TreeUserDto> filterList = new ArrayList<>();
         filterList = officeList;
 

+ 7 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml

@@ -224,9 +224,14 @@
     <select id="getBaseList" resultType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceBaseDTO">
         select
         <include refid="FIB_Column_List"></include>
-        ,rpl.report_no
+        ,rpl.report_no,
+        cw_wcb.name as clientName
         from cw_finance_invoice_base fib
-        left join cw_project_report_new_line rpl on fib.program_id=rpl.report_id
+        left join cw_project_report re on re.project_id = fib.program_id
+        left join cw_project_report_new_line rpl on re.id=rpl.report_id
+        left join cw_project_records cwra on fib.program_id = cwra.id
+        left join cw_work_contract_info cw_wci on cw_wci.id = cwra.contract_id and cw_wci.del_flag = '0'
+        left join cw_work_client_base cw_wcb on cw_wci.client_contacts = cw_wcb.id and cw_wcb.del_flag = '0'
         where fib.del_flag = '0' and fib.invoice_id = #{id}
     </select>
     <select id="findList" resultMap="BaseResultMap">

+ 4 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/dto/CwFinanceInvoiceBaseDTO.java

@@ -56,7 +56,10 @@ public class CwFinanceInvoiceBaseDTO extends BaseDTO {
      */
     private String reportNo;
 
-
+    /**
+     * 委托方
+     */
+    private String clientName;
 
 
     private static final long serialVersionUID = 1L;

+ 26 - 32
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectDict/service/ProjectDictService.java

@@ -3,6 +3,7 @@ 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.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.google.common.collect.Lists;
 import com.jeeplus.common.TokenProvider;
@@ -12,6 +13,9 @@ 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.finance.projectReport.domain.CwProjectReport;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNew;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReviewNewMapper;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
@@ -38,6 +42,9 @@ public class ProjectDictService {
     @Resource
     private ProgramFileDictMapper programFileDictMapper;
 
+    @Resource
+    private CwProjectReviewNewMapper reviewNewMapper;
+
     @Value("${config.accessory.aliyun.aliyunUrl}")
     private String aliyunUrl;
 
@@ -62,7 +69,7 @@ public class ProjectDictService {
      * @param id
      * @return
      */
-    public List<FileDictVo> getFileDictList(ProjectDictDto projectDictDto, String projectId, String id) {
+    public List<FileDictVo> getFileDictList(ProjectDictDto projectDictDto, String projectId, String id,String type) {
         //获取当前登陆人信息
         UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
         List<FileDictVo> list = new ArrayList<>();
@@ -79,35 +86,26 @@ public class ProjectDictService {
         }
         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);
+        //判断当前的报告复核处于哪一个节点
+        CwProjectReviewNew reviewNew = reviewNewMapper.selectOne(new QueryWrapper<CwProjectReviewNew>().eq("report_id", id));
         //获取当前节点名称
-//        String currentTaskName = SpringUtil.getBean(IFlowableApi.class).getCurrentTaskName(jyProject.getProcInsIdEia());
+        if (null != reviewNew) {
+            String currentTaskName = SpringUtil.getBean(IFlowableApi.class).getCurrentTaskName(reviewNew.getProcInsId());
+            if (StringUtils.isNotBlank(currentTaskName)) {
+                stage= "1";
+            } else {
+                stage= "1";
+            }
+        }
+        stage= "1";
+        if (StringUtils.isNotBlank(type)) {
+            if (type.equals("归档")) {
+                stage= "2";
+            }
+        }
+
+
 
-//        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)){
@@ -256,10 +254,6 @@ public class ProjectDictService {
         return projectDictMapper.findById(id);
     }
 
-    /**
-     * 阿里云获取临时文件查看url
-     * @param url
-     */
     public String getFileTemporaryLookUrl(String url){
         url = url.replace("amp;","");
         String cons = "";

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

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

+ 26 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/controller/CwProjectRecordsController.java

@@ -93,6 +93,21 @@ public class CwProjectRecordsController {
         result = cwProjectRecordsService.findList (page,cwProjectRecordsDTO);
         return ResponseEntity.ok (result);
     }
+
+    /**
+     * 查询财务项目信息列表(咨询)
+     * @param cwProjectRecordsDTO
+     * @param page
+     * @return
+     */
+    @ApiLog("查询财务项目信息列表(咨询)")
+    // @PreAuthorize("hasAuthority('cwProjectRecords:list')")
+    @GetMapping("zxList")
+    public ResponseEntity<IPage<CwProjectRecordsDTO>> zxData(CwProjectRecordsDTO cwProjectRecordsDTO, Page<CwProjectRecordsDTO> page) throws Exception {
+        IPage<CwProjectRecordsDTO> result = new Page<CwProjectRecordsDTO>();
+        result = cwProjectRecordsService.findZXList (page,cwProjectRecordsDTO);
+        return ResponseEntity.ok (result);
+    }
     /**
      * 查询项目数据集合,和上面list接口是一样的,目的是跳过findList mapper接口的数据规则(比如仅部门可见、仅自己可见之类的)
      */
@@ -177,6 +192,17 @@ public class CwProjectRecordsController {
         String s = cwProjectRecordsService.updateStatusById(dto);
         return ResponseEntity.ok(s);
     }
+    /**
+     * 根据id修改项目等级
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id修改项目等级")
+    @PostMapping(value = "/projectUpgrade")
+    public ResponseEntity<String> projectUpgrade(@RequestParam("id") String id) {
+        String s = cwProjectRecordsService.projectUpgrade(id);
+        return ResponseEntity.ok(s);
+    }
 
     /**
      * 导出项目数据

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

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

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

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

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

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

+ 6 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java

@@ -117,6 +117,11 @@ public interface CwProjectRecordsMapper extends BaseMapper<CwProjectRecords> {
     @InterceptorIgnore(tenantLine = "true")
     List<CwProjectPlanDetails> getPlanDetails();
 
-    CwProjectRecordsDTO getInfoById(@Param("id") String id);
+    /**
+     * 根据id修改项目等级
+     * @param id
+     * @return
+     */
+    void projectUpgrade( @Param("id") String id,@Param("level") String level);
 
 }

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

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

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

@@ -92,7 +92,9 @@
         a.report_type,
         a.report_review,
         a.project_type,
-        a.project_level
+        a.project_level,
+        a.project_start_time,
+        a.project_end_time
     </sql>
     <sql id="File_Column_List">
         wa.id,
@@ -356,7 +358,8 @@
         cw_wci.payer_subject,
         cw_wci.payment_method,
         cw_wcb.name as client_contacts_name,
-        cw_pbt.name as business_type_name
+        cw_pbt.name as business_type_name,
+        cw_re.id as reportId
         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'
@@ -364,6 +367,7 @@
         left join cw_work_contract_info cw_wci on cw_wci.id = a.contract_id and cw_wci.del_flag = '0'
         left join cw_work_client_base cw_wcb on cw_wci.client_contacts = cw_wcb.id and cw_wcb.del_flag = '0'
         left join cw_project_business_type cw_pbt on cw_pbt.id = a.business_type and cw_pbt.del_flag = '0'
+        left join cw_project_report cw_re on cw_re.project_id = a.id and cw_re.del_flag = '0'
         where a.del_flag = '0' and a.id = #{id}
     </select>
 
@@ -464,6 +468,9 @@
             id = #{id}
             AND del_flag = 0
     </update>
+    <update id="projectUpgrade">
+        UPDATE cw_project_records set project_level = #{level} where id = #{id}
+    </update>
 
     <select id="getListByIds" resultType="com.jeeplus.finance.projectRecords.domain.CwProjectRecords">
         SELECT  id,remarks,project_number,project_name,office_id,project_money,audit_year,plan_start_date,plan_end_date,project_master_id,project_leader_id,proc_ins_id,process_definition_id,status,contract_id,business_type,risk_level,real_header,report_type,report_review,create_time,create_by_id,update_time,update_by_id,del_flag,tenant_id  FROM cw_project_records

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

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

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

@@ -81,7 +81,110 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
     @Resource
     private CwProjectPlanDetailsMapper cwProjectPlanDetailsMapper;
 
+    /**
+     * 差选项目列表信息
+     * @param page
+     * @param cwProjectRecordsDTO
+     * @return
+     * @throws Exception
+     */
+    public IPage<CwProjectRecordsDTO> findZXList(Page<CwProjectRecordsDTO> page, CwProjectRecordsDTO cwProjectRecordsDTO) throws Exception{
+        QueryWrapper<CwProjectRecords> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( CwProjectRecordsWrapper.INSTANCE.toEntity(cwProjectRecordsDTO), CwProjectRecords.class );
+        queryWrapper.eq("a.del_flag","0");
+        queryWrapper.eq("a.project_type","2");
+        if (ObjectUtil.isNotEmpty(cwProjectRecordsDTO)) {
+            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());
+            }
+            if (StringUtils.isNotBlank(cwProjectRecordsDTO.getBusinessType())){
+                queryWrapper.eq("a.business_type",cwProjectRecordsDTO.getBusinessType());
+            }
+            if (StringUtils.isNotBlank(cwProjectRecordsDTO.getProjectMasterName2())) {
+                List<User> userList = SpringUtil.getBean ( IUserApi.class ).selectListByName(cwProjectRecordsDTO.getProjectMasterName2());
+                if (CollectionUtils.isNotEmpty(userList)){
+                    List<String> ids = userList.stream().distinct().map(User::getId).collect(Collectors.toList());
+                    if (CollectionUtil.isNotEmpty(ids)) {
+                        queryWrapper.in("a.project_master_id", ids);
+                    } else {
+                        return new Page<>();
+                    }
+                } else {
+                    queryWrapper.in("a.project_master_id", cwProjectRecordsDTO.getProjectMasterName());
+                }
+            }
+            if (StringUtils.isNotBlank(cwProjectRecordsDTO.getRealHeaderName())) {
+                queryWrapper.in("a.real_header", cwProjectRecordsDTO.getRealHeaderName());
+            }
+            if (StringUtils.isNotBlank(cwProjectRecordsDTO.getCreateId())){
+                queryWrapper.eq("a.create_by_id", cwProjectRecordsDTO.getCreateId());
+            }
+            // 创建人
+            if (ObjectUtil.isNotEmpty(cwProjectRecordsDTO.getCreateBy())){
+                if (StringUtils.isNotBlank(cwProjectRecordsDTO.getCreateBy().getName())){
+                    queryWrapper.in("a.create_by_id",cwProjectRecordsDTO.getCreateBy().getName());
+                }
+            }
+        }
 
+        IPage<CwProjectRecordsDTO> list = cwProjectRecordsMapper.findList(page, queryWrapper);
+//        List<UserDTO> allUserInfo = SpringUtil.getBean(IUserApi.class).getAllUserInfo();
+
+        List<UserDTO> allUserInfo = (List<UserDTO>) RedisUtils.getInstance().get(CacheNames.USER_CACHE_USER_ALL_INFO);
+        if (null == allUserInfo || allUserInfo.size() == 0) {
+            allUserInfo = SpringUtil.getBean(IUserApi.class).getAllUserInfo();
+        }
+        List<UserDTO> finalAllUserInfo = allUserInfo;
+        list.getRecords().forEach(li->{
+            if (StringUtils.isBlank(li.getProjectMasterName())){
+                //根据项目经理1的id去查项目经理去名称
+                if (StringUtils.isNotBlank(li.getProjectMasterId())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMasterId().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMasterName(projectMasterName);
+                    }
+                }
+            }
+            if (StringUtils.isBlank(li.getRealHeaderName())) {
+                if (StringUtils.isNotBlank(li.getRealHeader())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getRealHeader().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setRealHeaderName(projectMasterName);
+                    }
+                }
+            }
+            //根据项目id查询项目计划表中的数据
+            CwProjectPlan cwProjectPlan = cwProjectPlanMapper.selectOne(new QueryWrapper<CwProjectPlan>().eq("project_id", li.getId()).eq("del_flag", 0));
+            if (ObjectUtil.isEmpty(cwProjectPlan)){
+                li.setIsHavePlan("0");
+            }else {
+                li.setIsHavePlan("1");
+            }
+
+
+        });
+        return list;
+    }
 
     /**
      * 差选项目列表信息
@@ -93,6 +196,7 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
     public IPage<CwProjectRecordsDTO> findList(Page<CwProjectRecordsDTO> page, CwProjectRecordsDTO cwProjectRecordsDTO) throws Exception{
         QueryWrapper<CwProjectRecords> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( CwProjectRecordsWrapper.INSTANCE.toEntity(cwProjectRecordsDTO), CwProjectRecords.class );
         queryWrapper.eq("a.del_flag","0");
+        queryWrapper.eq("a.project_type","1");
         if (ObjectUtil.isNotEmpty(cwProjectRecordsDTO)) {
             if (ArrayUtil.isNotEmpty(cwProjectRecordsDTO.getCreateDates())) {
                 queryWrapper.between("a.create_time", cwProjectRecordsDTO.getCreateDates()[0], cwProjectRecordsDTO.getCreateDates()[1]);
@@ -900,4 +1004,16 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
         List<CwProjectPlanDetails> list=cwProjectRecordsMapper.getPlanDetails();
         return list;
     }
+
+    /**
+     * 根据id修改项目等级
+     * @param id
+     * @return
+     */
+    public String projectUpgrade(String id) {
+        cwProjectRecordsMapper.projectUpgrade(id,"2");
+        return "ok";
+    }
+
+
 }

+ 209 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/ProjectService.java

@@ -0,0 +1,209 @@
+package com.jeeplus.finance.projectRecords.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+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.jeeplus.common.TokenProvider;
+import com.jeeplus.finance.projectRecords.domain.Project;
+import com.jeeplus.finance.projectRecords.mapper.ProjectMapper;
+import com.jeeplus.finance.projectRecords.service.dto.FileUploadListDTO;
+import com.jeeplus.finance.projectRecords.service.dto.ProjectDTO;
+import com.jeeplus.sys.feign.IRoleApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.RoleDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+//import com.jeeplus.sys.utils.UserUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+@Service
+@Transactional
+public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
+
+    @Autowired
+    private ProjectMapper projectMapper;
+
+    public IPage<Project> selectPage(Page<Project> page, QueryWrapper queryWrapper){
+        queryWrapper.eq ("pr.del_flag", 0 ); // 排除已经删除
+        /*//获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        //获取当前登录人所属角色
+        //若是评估部门主任,则仅展示部门主任信息
+        //若是评估员工,则仅展示自己的数据信息
+        List<RoleDTO> roleDTOList = userDTO.getRoleDTOList();
+        for (RoleDTO roleDTO : roleDTOList) {
+            //根据角色id查询角色信息
+            RoleDTO roleDTOById = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(roleDTO.getId());
+            if("yg".equals(roleDTOById.getEnName()) && "评估员工".equals(roleDTOById.getName())){
+                queryWrapper.eq("pr.project_head", userDTO.getId());
+                break;
+            }else if("bmzr".equals(roleDTOById.getEnName()) && "评估部门主任".equals(roleDTOById.getName())){
+                queryWrapper.eq("su.office_id", userDTO.getOfficeDTO().getId());
+                break;
+            }
+        }*/
+        return projectMapper.findList(page, queryWrapper);
+    }
+
+    /**
+     * 通过项目id查询项目信息
+     * @param projectId
+     * @return
+     */
+    public Project selectByProjectId(String projectId){
+        Project project = projectMapper.selectByProjectId(projectId);
+
+        UserDTO currentUserDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        Boolean bmzrRoleFlag = false;
+        if(null != currentUserDTO.getRoleDTOList() && currentUserDTO.getRoleDTOList().size()>0){
+            for (RoleDTO roleDTO : currentUserDTO.getRoleDTOList()) {
+                if("bmzr".equals(roleDTO.getEnName())){
+                    bmzrRoleFlag = true;
+                    break;
+                }
+            }
+        }
+        if((StringUtils.isNotBlank(project.getProjectHead()) && project.getProjectHead().equals(currentUserDTO.getId())) || bmzrRoleFlag){
+            project.setPermissionFlag(true);
+        }else{
+            project.setPermissionFlag(false);
+        }
+        return project;
+    }
+
+    /**
+     * 用于将ProjectDTO类中的DateUi属性转换为时间格式存储到Project类中的Date属性中
+     * @param project
+     * @param projectDTO
+     * @return
+     */
+    public Project projectDtoToDate(Project project, ProjectDTO projectDTO){
+        SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
+        try {
+            if(StringUtils.isNotBlank(projectDTO.getEvaluationBaseDateUi())){
+                project.setEvaluationBaseDate(sdf.parse(projectDTO.getEvaluationBaseDateUi()));
+            }
+
+            if(StringUtils.isNotBlank(projectDTO.getEvaluationReportDateUi())){
+                project.setEvaluationReportDate(sdf.parse(projectDTO.getEvaluationReportDateUi()));
+            }
+
+            if(StringUtils.isNotBlank(projectDTO.getInvoiceDateUi())){
+                project.setInvoiceDate(sdf.parse(projectDTO.getInvoiceDateUi()));
+            }
+
+            if(StringUtils.isNotBlank(projectDTO.getReimbursementDateUi())){
+                project.setReimbursementDate(sdf.parse(projectDTO.getReimbursementDateUi()));
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return project;
+    }
+
+    /**
+     * mp的update()方法,如果将参数设为null的,mp会默认不修改的
+     * 所以通过这种方式,使用wrapper将你要设置为null的手动set为null,这样update()方法就会按你的想法执行了
+     * @param project
+     * @return
+     */
+    public LambdaUpdateWrapper getLambdaUpdateWrapper(ProjectDTO project){
+        LambdaUpdateWrapper<Project> wrapper = new LambdaUpdateWrapper<Project>();
+
+        if(StringUtils.isNotBlank(project.getId())){
+            wrapper.eq(Project::getId,project.getId());
+        }
+
+        if(StrUtil.isEmpty(project.getEvaluationBaseDateUi())){
+            wrapper.set(Project::getEvaluationBaseDate, null);
+        }
+
+        if(StrUtil.isEmpty(project.getEvaluationReportDateUi())){
+            wrapper.set(Project::getEvaluationReportDate, null);
+        }
+
+        if(StrUtil.isEmpty(project.getInvoiceDateUi())){
+            wrapper.set(Project::getInvoiceDate, null);
+        }
+
+        if(StrUtil.isEmpty(project.getReimbursementDateUi())){
+            wrapper.set(Project::getReimbursementDate, null);
+        }
+
+        return wrapper;
+    }
+
+    /**
+     * 根据文号查询项目信息
+     * @param projectDTO
+     * @return
+     */
+    public Project selectByDocumentNum(ProjectDTO projectDTO){
+        return projectMapper.selectByDocumentNum(projectDTO);
+    }
+
+    /**
+     * 项目文件上传完成比例
+     * @param queryWrapper
+     * @return
+     */
+    public String proportion(QueryWrapper queryWrapper) {
+        // 排除已经删除
+        queryWrapper.eq ("pr.del_flag", 0 );
+        int all = projectMapper.proportion(queryWrapper);
+        if (all == 0) {
+            return "0.00%";
+        }
+        queryWrapper.eq("pr.file_upload_type", "1");
+        int on = projectMapper.proportion(queryWrapper);
+        DecimalFormat df = new DecimalFormat("0.00");
+        String s = df.format((float)on*100/(float)all) + "%";
+        return s;
+    }
+
+    public List<FileUploadListDTO> exportFileUploadList(ProjectDTO projectDTO) {
+        //queryWrapper.eq("su.del_flag", 0);
+        UserDTO currentUserDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        projectDTO.setOfficeDTO(currentUserDTO.getOfficeDTO());
+        List<FileUploadListDTO> allList = projectMapper.projectAllList(projectDTO);
+        //queryWrapper.eq("pr.file_upload_type", "1");
+        List<FileUploadListDTO> list = projectMapper.projectList(projectDTO);
+        if (CollectionUtil.isNotEmpty(allList)) {
+            DecimalFormat df = new DecimalFormat("0.00");
+            for (FileUploadListDTO dto : allList) {
+                if(null != list && list.size()>0){
+                    for (FileUploadListDTO i : list) {
+                        if (dto.getName().equals(i.getName())) {
+                            dto.setNum(i.getNum());
+                            String s = df.format((float) i.getNum() * 100 / (float) dto.getAllNum());
+                            dto.setProportion(s+"%");
+                        }
+                    }
+                }
+            }
+            allList.stream().forEach(i -> {
+                //如果没有找到或没有完成数量,则填入默认完成数量0,完成比例0
+                if (StringUtils.isBlank(i.getProportion())) {
+                    i.setProportion("0.00%");
+                }
+                if (null == i.getNum()) {
+                    i.setNum(0);
+                }
+            });
+        }
+        return allList;
+    }
+}

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

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

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

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

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

@@ -26,6 +26,16 @@ import java.util.List;
 public class CwProjectRecordsDTO extends BaseDTO {
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 项目开始时间
+     */
+    private Date projectStartTime;
+
+    /**
+     * 项目结束时间
+     */
+    private Date projectEndTime;
+
     //项目等级
     private String projectLevel;
 

+ 328 - 29
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java

@@ -3,6 +3,7 @@ package com.jeeplus.finance.projectReport.controller;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.google.common.collect.Lists;
@@ -19,15 +20,14 @@ 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;
-import com.jeeplus.finance.projectReport.domain.CwSignatureAnnotator;
+import com.jeeplus.finance.projectReport.domain.*;
 import com.jeeplus.finance.projectReport.mapper.CwSignatureAnnotatorMapper;
 import com.jeeplus.finance.projectReport.mapper.ProjectReportWorkAttachmentMapper;
 import com.jeeplus.finance.projectReport.service.CwProjectReportService;
 import com.jeeplus.finance.projectReport.service.dto.CwProjectReportDTO;
 import com.jeeplus.finance.projectReport.service.dto.CwProjectReportSignatureDTO;
+import com.jeeplus.finance.projectReport.service.dto.ProjectContactInfo;
+import com.jeeplus.finance.projectReport.service.dto.ProjectReportInfo;
 import com.jeeplus.finance.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.logging.annotation.ApiLog;
@@ -57,10 +57,11 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.Period;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
@@ -87,6 +88,17 @@ public class CwProjectReportController {
     @Resource
     private CwProjectRecordsService projectRecordsService;
 
+    @ApiLog(value = "归档信息导出")
+    @GetMapping("archivedInfoExport")
+    @ApiOperation(value = "归档信息导出")
+    public void archivedInfoExport(CwProjectReportData reportData,ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<ArchivedReportInfo> exportFileDtos = projectReportService.archivedInfoExport(reportData);
+        EasyPoiUtil.exportExcel ( exportFileDtos, fileName,  sheetName, ArchivedReportInfo.class, fileName, response );
+
+    }
+
     /**
      * 保存财务报告信息-流程
      * @param reportData
@@ -135,13 +147,43 @@ public class CwProjectReportController {
     }
 
     /**
+     * 将复核超期的数据状态改为超期未复核
+     * @return
+     */
+    @ApiLog("将复核超期的数据状态改为超期未复核")
+    @GetMapping("updateQualityOverdueStatus")
+    public void updateQualityOverdueStatus() throws Exception {
+        projectReportService.updateQualityOverdueStatus();
+    }
+
+    /**
+     * 将在线归档超期的数据状态改为超期未归档
+     * @return
+     */
+    @ApiLog("将在线归档超期的数据状态改为超期未归档")
+    @GetMapping("updateOnlineArchiveStatus")
+    public void updateOnlineArchiveStatus() throws Exception {
+        projectReportService.updateOnlineArchiveStatus();
+    }
+
+    /**
+     * 将纸质归档超期的数据状态改为超期未归档
+     * @return
+     */
+    @ApiLog("将纸质归档超期的数据状态改为超期未归档")
+    @GetMapping("updatePaperArchiveStatus")
+    public void updatePaperArchiveStatus() throws Exception {
+        projectReportService.updatePaperArchiveStatus();
+    }
+
+    /**
      * 查询财务项目信息列表
      * @param projectReportData
      * @param page
      * @return
      */
     @ApiLog("查询财务报告信息列表")
-    @PreAuthorize("hasAuthority('cwProjectReport:list')")
+    //@PreAuthorize("hasAuthority('cwProjectReport:list')")
     @GetMapping("list")
     public ResponseEntity<IPage<CwProjectReportData>> data(CwProjectReportData projectReportData, Page<CwProjectReportData> page) throws Exception {
         IPage<CwProjectReportData> result = new Page<CwProjectReportData>();
@@ -173,29 +215,240 @@ public class CwProjectReportController {
                     i.setAuditUserIdsRev(flowTaskService.getTaskAuditUsers(i.getRevTaskId()));  // 获取数据审核人
                 }
             }
-            // 签章
-            if (StringUtils.isNotBlank(i.getSignatureType())) {
-                // 电子章
-                if ("1".equals(i.getSignatureType())) {
-                    if (StringUtils.isNotBlank(i.getSignTaskId1()) && StringUtils.isNotBlank(i.getStatus1())) {
-                        if ("2".equals(i.getStatus1())) { // “审核中”的数据要获取数据审核人
-                            i.setAuditUserIdsSign1(flowTaskService.getTaskAuditUsers(i.getSignTaskId1()));  // 获取数据审核人
+
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+            //在线归档超期天数显示调整  纸质归档超期天数显示
+
+            if (StringUtils.isNotBlank(i.getProjectLevel())) {
+                DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+
+                // 对日期进行空值检查并解析  Optional 对null情况操作
+                Optional<LocalDate> startDateOptional = Optional.ofNullable(i.getIssueCompleteTime()).map(date -> LocalDate.parse(format.format(date), formatter));
+                Optional<LocalDate> startDate2Optional = Optional.ofNullable(i.getCheckCompleteTime()).map(date -> LocalDate.parse(format.format(date), formatter));
+
+                if (startDateOptional.isPresent() && startDate2Optional.isPresent()) {
+                    LocalDate startDate = startDateOptional.get();
+                    LocalDate startDate2 = startDate2Optional.get();
+                    LocalDate currentDate = LocalDate.now();
+
+                    // 计算日期差
+                    Period period = Period.between(startDate, currentDate);
+                    Period period2 = Period.between(startDate2, currentDate);
+
+                    // 获取天数差
+                    int days = period.getDays();
+                    int days2 = period2.getDays();
+
+                    //A级
+                    if (i.getProjectLevel().equals("1")) {
+                        //计算规则:在线-报告签发审核完成40天后设置为超期。 纸质-报告签发审核完成40天后设置为超期
+
+                        //判断是否超期(流程未开始即流程状态为null)
+                        if (days > 40 && null == i.getOnlineArchivingStatus()) {
+                            i.setOnlineOverdueDates(days - 40);
+                        }
+                        if (days2 > 40 && null == i.getPaperArchivingStatus()) {
+                            i.setPaperOverdueDates(days2 - 40);
+                        }
+
+                    } else if (i.getProjectLevel().equals("2")) {
+                        //计算规则:在线-质量复核审核完成40天后设置为超期。 纸质-质量复核审核完成90天后设置为超期
+                        if (days > 40 && null == i.getOnlineArchivingStatus()) {
+                            i.setOnlineOverdueDates(days - 40);
+                        }
+                        if (days2 > 90 && null == i.getPaperArchivingStatus()) {
+                            i.setPaperOverdueDates(days2 - 90);
                         }
                     }
                 }
-                // 公章+执业章
-                if ("2".equals(i.getSignatureType())) {
-                    if (StringUtils.isNotBlank(i.getSignTaskId2()) && StringUtils.isNotBlank(i.getStatus2())) {
-                        if ("2".equals(i.getStatus2())) { // “审核中”的数据要获取数据审核人
-                            i.setAuditUserIdsSign2(flowTaskService.getTaskAuditUsers(i.getSignTaskId2()));  // 获取数据审核人
+            }
+        });
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 查询财务项目信息列表
+     * @param projectReportData
+     * @param page
+     * @return
+     */
+    @ApiLog("查询财务报告信息列表")
+    @PreAuthorize("hasAuthority('cwProjectReport:list')")
+    @GetMapping("list2")
+    public ResponseEntity<IPage<CwProjectReportData>> data2(CwProjectReportData projectReportData, Page<CwProjectReportData> page) throws Exception {
+        IPage<CwProjectReportData> result = new Page<CwProjectReportData>();
+        result = projectReportService.findList2 (page,projectReportData);
+        result.getRecords().stream().forEach(i -> {
+
+            //当项目经理是跨租户的人员时,则特殊处理
+            if (StringUtils.isBlank(i.getProjectMasterName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId());
+                    if(null != byId)
+                        i.setProjectMasterName(byId.getName());
+                }
+            }
+            if (StringUtils.isBlank(i.getRealHeaderName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId2())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId2());
+                    if(null != byId)
+                        i.setRealHeaderName(byId.getName());
+                }
+
+            }
+
+            // 复核
+            if (StringUtils.isNotBlank(i.getRevTaskId()) && StringUtils.isNotBlank(i.getReviewStatus())) {
+                if ("2".equals(i.getReviewStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIdsRev(flowTaskService.getTaskAuditUsers(i.getRevTaskId()));  // 获取数据审核人
+                }
+            }
+
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+            //在线归档超期天数显示调整  纸质归档超期天数显示
+
+            if (StringUtils.isNotBlank(i.getProjectLevel())) {
+                DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+
+                // 对日期进行空值检查并解析  Optional 对null情况操作
+                Optional<LocalDate> startDateOptional = Optional.ofNullable(i.getIssueCompleteTime()).map(date -> LocalDate.parse(format.format(date), formatter));
+                Optional<LocalDate> startDate2Optional = Optional.ofNullable(i.getCheckCompleteTime()).map(date -> LocalDate.parse(format.format(date), formatter));
+
+                if (startDateOptional.isPresent() && startDate2Optional.isPresent()) {
+                    LocalDate startDate = startDateOptional.get();
+                    LocalDate startDate2 = startDate2Optional.get();
+                    LocalDate currentDate = LocalDate.now();
+
+                    // 计算日期差
+                    Period period = Period.between(startDate, currentDate);
+                    Period period2 = Period.between(startDate2, currentDate);
+
+                    // 获取天数差
+                    int days = period.getDays();
+                    int days2 = period2.getDays();
+
+                    //A级
+                    if (i.getProjectLevel().equals("1")) {
+                        //计算规则:在线-报告签发审核完成40天后设置为超期。 纸质-报告签发审核完成40天后设置为超期
+
+                        //判断是否超期(流程未开始即流程状态为null)
+                        if (days > 40 && null == i.getOnlineArchivingStatus()) {
+                            i.setOnlineOverdueDates(days - 40);
+                        }
+                        if (days2 > 40 && null == i.getPaperArchivingStatus()) {
+                            i.setPaperOverdueDates(days2 - 40);
+                        }
+
+                    } else if (i.getProjectLevel().equals("2")) {
+                        //计算规则:在线-质量复核审核完成40天后设置为超期。 纸质-质量复核审核完成90天后设置为超期
+                        if (days > 40 && null == i.getOnlineArchivingStatus()) {
+                            i.setOnlineOverdueDates(days - 40);
+                        }
+                        if (days2 > 90 && null == i.getPaperArchivingStatus()) {
+                            i.setPaperOverdueDates(days2 - 90);
                         }
                     }
                 }
-                // 实体章
-                if ("3".equals(i.getSignatureType())) {
-                    if (StringUtils.isNotBlank(i.getSignTaskId3()) && StringUtils.isNotBlank(i.getStatus3())) {
-                        if ("2".equals(i.getStatus3())) { // “审核中”的数据要获取数据审核人
-                            i.setAuditUserIdsSign3(flowTaskService.getTaskAuditUsers(i.getSignTaskId3()));  // 获取数据审核人
+            }
+        });
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 获取咨询营业收入(万元)的总和
+     * @return
+     */
+    @ApiLog("获取咨询营业收入(万元)的总和")
+    @GetMapping("getTotal")
+    public ResponseEntity getTotal() {
+        String total = projectReportService.getTotal (  );
+        return ResponseEntity.ok (total);
+    }
+
+    /**
+     * 查询财务项目信息列表
+     * @param projectReportData
+     * @param page
+     * @return
+     */
+    @ApiLog("查询财务报告信息列表")
+    @PreAuthorize("hasAuthority('cwProjectReport:list')")
+    @GetMapping("list3")
+    public ResponseEntity<IPage<CwProjectReportData>> data3(CwProjectReportData projectReportData, Page<CwProjectReportData> page) throws Exception {
+        IPage<CwProjectReportData> result = new Page<CwProjectReportData>();
+        result = projectReportService.findList3 (page,projectReportData);
+        result.getRecords().stream().forEach(i -> {
+
+            //当项目经理是跨租户的人员时,则特殊处理
+            if (StringUtils.isBlank(i.getProjectMasterName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId());
+                    if(null != byId)
+                        i.setProjectMasterName(byId.getName());
+                }
+            }
+            if (StringUtils.isBlank(i.getRealHeaderName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId2())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId2());
+                    if(null != byId)
+                        i.setRealHeaderName(byId.getName());
+                }
+
+            }
+
+            // 复核
+            if (StringUtils.isNotBlank(i.getRevTaskId()) && StringUtils.isNotBlank(i.getReviewStatus())) {
+                if ("2".equals(i.getReviewStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIdsRev(flowTaskService.getTaskAuditUsers(i.getRevTaskId()));  // 获取数据审核人
+                }
+            }
+
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+            //在线归档超期天数显示调整  纸质归档超期天数显示
+
+            if (StringUtils.isNotBlank(i.getProjectLevel())) {
+                DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+
+                // 对日期进行空值检查并解析  Optional 对null情况操作
+                Optional<LocalDate> startDateOptional = Optional.ofNullable(i.getIssueCompleteTime()).map(date -> LocalDate.parse(format.format(date), formatter));
+                Optional<LocalDate> startDate2Optional = Optional.ofNullable(i.getCheckCompleteTime()).map(date -> LocalDate.parse(format.format(date), formatter));
+
+                if (startDateOptional.isPresent() && startDate2Optional.isPresent()) {
+                    LocalDate startDate = startDateOptional.get();
+                    LocalDate startDate2 = startDate2Optional.get();
+                    LocalDate currentDate = LocalDate.now();
+
+                    // 计算日期差
+                    Period period = Period.between(startDate, currentDate);
+                    Period period2 = Period.between(startDate2, currentDate);
+
+                    // 获取天数差
+                    int days = period.getDays();
+                    int days2 = period2.getDays();
+
+                    //A级
+                    if (i.getProjectLevel().equals("1")) {
+                        //计算规则:在线-报告签发审核完成40天后设置为超期。 纸质-报告签发审核完成40天后设置为超期
+
+                        //判断是否超期(流程未开始即流程状态为null)
+                        if (days > 40 && null == i.getOnlineArchivingStatus()) {
+                            i.setOnlineOverdueDates(days - 40);
+                        }
+                        if (days2 > 40 && null == i.getPaperArchivingStatus()) {
+                            i.setPaperOverdueDates(days2 - 40);
+                        }
+
+                    } else if (i.getProjectLevel().equals("2")) {
+                        //计算规则:在线-质量复核审核完成40天后设置为超期。 纸质-质量复核审核完成90天后设置为超期
+                        if (days > 40 && null == i.getOnlineArchivingStatus()) {
+                            i.setOnlineOverdueDates(days - 40);
+                        }
+                        if (days2 > 90 && null == i.getPaperArchivingStatus()) {
+                            i.setPaperOverdueDates(days2 - 90);
                         }
                     }
                 }
@@ -203,7 +456,6 @@ public class CwProjectReportController {
         });
         return ResponseEntity.ok (result);
     }
-
     /**
      * 根据id修改状态值status
      * @param data
@@ -239,6 +491,53 @@ public class CwProjectReportController {
     @GetMapping("queryByIdNew")
     public ResponseEntity queryByIdNew(@RequestParam("id") String id) {
         CwProjectReportData projectReportData = projectReportService.queryByIdNew ( id );
+        //查询委托方联系人信息
+        if (null != projectReportData) {
+            List<ProjectContactInfo> contactInfos = projectReportService.getContactInfos(projectReportData.getProjectId());
+            projectReportData.setContactInfos(contactInfos);
+            projectReportData.setConstructionParty(contactInfos);
+            //查询项目报告信息
+            List<ProjectReportInfo> projectReportInfos = projectReportService.getProjectReportInfo(id);
+            projectReportData.setProjectReportInfos(projectReportInfos);
+        }
+
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据报告签发id查询信息
+     * @param id
+     * @return
+     */
+    @ApiLog("根据报告签发id查询信息")
+    // @PreAuthorize ("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
+    @GetMapping("queryBySignAndIssueId")
+    public ResponseEntity queryBySignAndIssueId(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = projectReportService.queryBySignAndIssueId ( id );
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据在线归档id查询信息
+     * @param id
+     * @return
+     */
+    @ApiLog("根据在线归档id查询信息")
+    @GetMapping("queryByOnlineArchivingId")
+    public ResponseEntity queryByOnlineArchivingId(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = projectReportService.queryByOnlineArchivingId ( id );
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据纸质归档id查询信息
+     * @param id
+     * @return
+     */
+    @ApiLog("根据纸质归档id查询信息")
+    @GetMapping("queryByPaperArchivingId")
+    public ResponseEntity queryByPaperArchivingId(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = projectReportService.queryByPaperArchivingId ( id );
         return ResponseEntity.ok (projectReportData);
     }
 
@@ -250,7 +549,7 @@ public class CwProjectReportController {
      */
     @ApiOperation(value = "根据项目id查询外审附件信息")
     @GetMapping(value = "/getAttachmentList")
-    public ResponseEntity<List<FileDictVo>> getAttachmentList(@RequestParam String projectId, @RequestParam String id){
+    public ResponseEntity<List<FileDictVo>> getAttachmentList(@RequestParam String projectId, @RequestParam String id,@RequestParam String type){
         //根据项目id查询项目信息
         CwProjectRecords project = projectRecordsService.getById(projectId);
         ProjectDictDto projectDictDto = new ProjectDictDto();
@@ -266,7 +565,7 @@ public class CwProjectReportController {
         projectDictDto.setProjectLevel(project.getProjectLevel());
         projectDictDto.setAttachmentProjectSort(project.getReportType());
         projectDictDto.setSortList(sortList);
-        List<FileDictVo> list = projectDictService.getFileDictList(projectDictDto,projectId,id);
+        List<FileDictVo> list = projectDictService.getFileDictList(projectDictDto,projectId,id,type);
         return ResponseEntity.ok(list);
     }
     /**

+ 65 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportOnlineArchivingController.java

@@ -0,0 +1,65 @@
+package com.jeeplus.finance.projectReport.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.service.CwProjectReportOnlineArchivingService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-26 14:14
+ */
+@RestController
+@Api("线上归档信息")
+@RequestMapping(value = "/cwProjectReport/onlineArchiving")
+public class CwProjectReportOnlineArchivingController {
+
+    @Resource
+    private CwProjectReportOnlineArchivingService onlineArchivingService;
+
+    /**
+     * 保存财务报告线上归档信息-流程
+     * @param reportData
+     * @return
+     */
+    @ApiLog(value = "保存财务报告线上归档信息", type = LogTypeEnum.SAVE)
+    @PostMapping("saveForm")
+    public ResponseEntity saveForm(@Valid @RequestBody CwProjectReportData reportData) throws Exception {
+        String id = onlineArchivingService.saveForm(reportData);
+        return ResponseUtil.newInstance().add("businessTable", "cw_project_report_online_archiving").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
+     * 根据报告id查询报告签发信息
+     * @param id
+     * @return
+     */
+    @ApiLog("根据报告id查询线上归档信息")
+    @GetMapping("queryByReportId")
+    public ResponseEntity queryByReportId(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = onlineArchivingService.queryByReportId(id);
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据id修改状态值status
+     * @param data
+     * @return
+     */
+    @ApiOperation(value = "根据报告id修改状态值status")
+    @PostMapping(value = "/updateStatusByReportId")
+    public ResponseEntity<String> updateStatusByReportId(@RequestBody CwProjectReportData data) {
+        String s = onlineArchivingService.updateStatusByReportId(data);
+        return ResponseEntity.ok(s);
+    }
+}

+ 67 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportPaperArchivingController.java

@@ -0,0 +1,67 @@
+package com.jeeplus.finance.projectReport.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.service.CwProjectReportPaperArchivingService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+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 javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-31 15:55
+ */
+@RestController
+@Api("纸质归档信息")
+@RequestMapping(value = "/cwProjectReport/paperArchiving")
+public class CwProjectReportPaperArchivingController {
+
+    @Resource
+    private CwProjectReportPaperArchivingService paperArchivingService;
+
+    /**
+     * 保存财务报告纸质归档信息-流程
+     * @param reportData
+     * @return
+     */
+    @ApiLog(value = "保存财务报告纸质归档信息", type = LogTypeEnum.SAVE)
+    @PostMapping("saveForm")
+    public ResponseEntity saveForm(@Valid @RequestBody CwProjectReportData reportData) throws Exception {
+        String id = paperArchivingService.saveForm(reportData);
+        return ResponseUtil.newInstance().add("businessTable", "cw_project_report_paper_archiving").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
+     * 根据报告id查询报告纸质归档信息
+     * @param id
+     * @return
+     */
+    @ApiLog("根据报告id查询纸质归档信息")
+    @GetMapping("queryByReportId")
+    public ResponseEntity queryByReportId(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = paperArchivingService.queryByReportId(id);
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据id修改状态值status
+     * @param data
+     * @return
+     */
+    @ApiOperation(value = "根据报告id修改状态值status")
+    @PostMapping(value = "/updateStatusByReportId")
+    public ResponseEntity<String> updateStatusByReportId(@RequestBody CwProjectReportData data) {
+        String s = paperArchivingService.updateStatusByReportId(data);
+        return ResponseEntity.ok(s);
+    }
+
+}
+
+

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

@@ -101,6 +101,17 @@ public class CwProjectReportReviewController {
         return ResponseEntity.ok (projectReportData);
     }
     /**
+     * 查询陈红星的注册/资格证号,专业信息
+     * @return
+     */
+    @ApiLog("查询陈红星的注册/资格证号,专业信息")
+    @GetMapping("getUserInfo")
+    public ResponseEntity getUserInfo(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = service.getUserInfo(id);
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
      * 查询客户信息数据
      * @param id
      * @return

+ 79 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignAndIssueController.java

@@ -0,0 +1,79 @@
+package com.jeeplus.finance.projectReport.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.service.CwProjectReportSignAndIssueService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.lang.reflect.InvocationTargetException;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-25 14:03
+ */
+@RestController
+@Api("报告签发信息")
+@RequestMapping(value = "/cwProjectReport/signAndIssue")
+public class CwProjectReportSignAndIssueController {
+
+    @Resource
+    private CwProjectReportSignAndIssueService andIssueService;
+
+    /**
+     * 保存财务报告信息-流程
+     * @param reportData
+     * @return
+     */
+    @ApiLog(value = "保存报告签发信息", type = LogTypeEnum.SAVE)
+    @PostMapping("saveForm")
+    public ResponseEntity saveForm(@Valid @RequestBody CwProjectReportData reportData) throws Exception {
+        String id = andIssueService.saveForm(reportData);
+        return ResponseUtil.newInstance().add("businessTable", "cw_project_report_sign_and_issue").add("businessId", id).ok ("操作成功");
+    }
+
+    /**
+     * 根据报告id查询报告签发信息
+     * @param id
+     * @return
+     */
+    @ApiLog("根据报告id查询报告签发信息")
+    @PreAuthorize("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
+    @GetMapping("queryByReportId")
+    public ResponseEntity queryByReportId(@RequestParam("id") String id) {
+        CwProjectReportData projectReportData = andIssueService.queryByReportId(id);
+        return ResponseEntity.ok (projectReportData);
+    }
+
+    /**
+     * 根据id修改状态值status
+     * @param data
+     * @return
+     */
+    @ApiOperation(value = "根据报告id修改状态值status")
+    @PostMapping(value = "/updateStatusByReportId")
+    public ResponseEntity<String> updateStatusByReportId(@RequestBody CwProjectReportData data) {
+        String s = andIssueService.updateStatusByReportId(data);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 删除报告签发信息
+     * @param id
+     * @return
+     */
+    @ApiLog(value = "删除报告签发信息", type = LogTypeEnum.SAVE)
+    @PreAuthorize ("hasAuthority('signAndIssue:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String id) {
+        return andIssueService.deleteById(id);
+    }
+}

+ 105 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/ArchivedReportInfo.java

@@ -0,0 +1,105 @@
+package com.jeeplus.finance.projectReport.domain;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.query.Query;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 归档信息导出类
+ * @author 王强
+ * @version 1.0
+ * @date 2024-02-27 14:33
+ */
+@Data
+public class ArchivedReportInfo extends BaseEntity {
+
+    /**
+     * 报告文号
+     */
+    @Excel(name = "报告文号",width = 12,orderNum = "0")
+    private String reportNo;
+
+    /**
+     * 项目名称
+     */
+    @Excel(name = "项目名称",width = 40,orderNum = "1")
+    private String projectName;
+
+    //项目等级
+    @Excel(name = "项目等级",width = 12,orderNum = "2")
+    private String projectLevel;
+
+    /**
+     * 项目类别
+     */
+    @Excel(name = "项目类别",width = 12,orderNum = "3")
+    private String projectCategory;
+
+    /**
+     * 造价咨询营业收入
+     */
+    @Excel(name = "咨询营业收入(万元)",width = 12,orderNum = "4")
+    private String ziXunShouRu;
+
+    /**
+     * 登记人
+     */
+    @Excel(name = "登记人",width = 12,orderNum = "5")
+    private String projectCreateByName;
+
+    @Excel(name = "登记人部门",width = 20,orderNum = "6")
+    private String departmentName;
+
+    /**
+     * 责任人
+     */
+    @Excel(name = "责任人",width = 20,orderNum = "7")
+    private String personResponsible;
+
+    /**
+     * 登记日期(项目创建日期)
+     */
+    @Excel(name = "登记日期",exportFormat = "yyyy-MM-dd",width = 25,orderNum = "8")
+    private String projectCreateTime;
+
+    /**
+     * 质量复核日期
+     */
+    @Excel(name = "质量复核日期",exportFormat = "yyyy-MM-dd",width = 25,orderNum = "9")
+    private String checkCompleteTime; //报告复核流程结束修改时间
+
+    /**
+     * 报告签发日期
+     */
+    @Excel(name = "报告签发日期",exportFormat = "yyyy-MM-dd",width = 25,orderNum = "10")
+    private String issueCompleteTime;
+
+    /**
+     * 归档发起日期(电子归档)
+     */
+    @Excel(name = "归档发起日期",exportFormat = "yyyy-MM-dd",width = 25,orderNum = "11")
+    private String onlineStartTime;
+
+    /**
+     * 电子归档状态
+     */
+    @Excel(name = "电子归档状态",width = 20,orderNum = "12")
+    private String onlineArchivingStatus;
+
+    /**
+     * 超期未归档天数
+     */
+    @Excel(name = "超期未归档天数",width = 20,orderNum = "13")
+    private String onlineOverdueDates;
+
+    /**
+     * 超期归档天数
+     */
+    @Excel(name = "超期归档天数",width = 20,orderNum = "14")
+    private String onlineDates;
+
+}

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

@@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.core.query.Query;
 import com.jeeplus.core.service.dto.BaseDTO;
 import com.jeeplus.finance.common.flowable.dto.CommitParamDTO;
+import com.jeeplus.finance.projectReport.service.dto.ProjectContactInfo;
+import com.jeeplus.finance.projectReport.service.dto.ProjectReportInfo;
 import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import lombok.Data;
@@ -21,8 +23,102 @@ import java.util.List;
 @Data
 public class CwProjectReportData extends BaseDTO {
 
+    private String[] archivingStatus;
+
+    /**
+     * 总的咨询营业收入
+     */
+    private String ziXunShouRuAll;
+    /**
+     * 项目类型(用来区分造价审核项目与工程咨询项目,1:造价审核。2:工程咨询)
+     */
+    private String projectType;
+    /**
+     * 项目类别
+     */
+    private String projectCategory;
+
+    private int onlineOverdueDates; //在线归档超期天数
+
+    private int paperOverdueDates; //纸质归档超期天数
+
+    private Date issueCompleteTime; //报告签发流程结束修改时间
+    private Date checkCompleteTime; //报告复核流程结束修改时间
+
+    private String mark;  //标记
+
+    //案卷号
+    private String filedNo;
+    //确认案卷号
+    private String confirmFiledNo;
+    //合同金额
+    private String contractAmount;
+    //合同类型
+    private String contractType;
+    //纸质归档流程id
+    private String paperArchivingTaskId;
+    //纸质归档流程状态
+    private String paperArchivingStatus;
+    //纸质归档流程procinsid
+    private String paperArchivingProcInsId;
+    //纸质归档id
+    private String paperArchivingId;
+
+    private String remarks;
+
+    private List<ProjectContactInfo> contactInfos;
+
+    private List<ProjectContactInfo> constructionParty;
+
+    private List<ProjectReportInfo> projectReportInfos;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planStartDate;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planEndDate;
+
+    //委托方
+    private String clientName;
+    //项目金额
+    private String projectMoney;
+    //合同编号
+    private String contractNo;
+
+    //归档申请人名称
+    private String applyUserName;
+    //归档申请人id
+    private String applyUserId;
+
+    //线上归档流程id
+    private String onlineArchivingTaskId;
+    //线上归档流程状态
+    private String onlineArchivingStatus;
+    //线上归档流程procinsid
+    private String onlineArchivingProcInsId;
+    //线上归档id
+    private String onlineArchivingId;
+    private String onlineRemarks;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date applyDates;
+
+    //报告签发流程id
+    private String signAndIssueTaskId;
+    //报告签发流程状态
+    private String signAndIssueStatus;
+    //报告签发
+    private String procInsId4;
+    //报告签发id
+    private String signAndIssueId;
+
     private List<CwProjectReviewNewTeam> detailInfos;
 
+    //下一节点审核人名称
+    private String reviewByName;
+
     private String reviewNewId;
 
     //项目等级
@@ -601,6 +697,11 @@ public class CwProjectReportData extends BaseDTO {
     private String contractName;
 
     /**
+     * 合同id
+     */
+    private String contractId;
+
+    /**
      * 签字注师审核状态
      */
 

+ 32 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportOnlineArchiving.java

@@ -0,0 +1,32 @@
+package com.jeeplus.finance.projectReport.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 报告-线上归档
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-26 10:57
+ */
+@Data
+@TableName(value = "cw_project_report_online_archiving")
+public class CwProjectReportOnlineArchiving extends BaseEntity {
+
+    private String mark;  //标记
+
+    private String reportId;  //报告id
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    private String processDefinitionId;
+
+    private String status;
+
+    private String applyUserId;
+
+    private String onlineRemarks;
+}

+ 32 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportPaperArchiving.java

@@ -0,0 +1,32 @@
+package com.jeeplus.finance.projectReport.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 报告-纸质归档
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-26 10:57
+ */
+@Data
+@TableName(value = "cw_project_report_paper_archiving")
+public class CwProjectReportPaperArchiving extends BaseEntity {
+
+    private String mark; //标记
+
+    private String reportId;  //报告id
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    private String processDefinitionId;
+
+    private String status;
+    //案卷号
+    private String filedNo;
+    //确认案卷号
+    private String confirmFiledNo;
+}

+ 34 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectReportSignAndIssue.java

@@ -0,0 +1,34 @@
+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;
+
+import java.util.Date;
+
+/**
+ * 报告签发
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-25 13:52
+ */
+@Data
+@TableName(value = "cw_project_report_sign_and_issue")
+public class CwProjectReportSignAndIssue extends BaseEntity {
+
+    /**
+     * 复核通过时间
+     */
+    private Date issueCompleteTime;
+
+    private String reportId;  //报告id
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    private String processDefinitionId;
+
+    private String status;
+}

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

@@ -17,6 +17,13 @@ import java.util.Date;
 @TableName(value = "cw_project_report_review_new")
 public class CwProjectReviewNew extends BaseEntity {
 
+    private String mark;  //标记
+
+    /**
+     * 复核通过时间
+     */
+    private Date checkCompleteTime;
+
     /**
      * 流程id
      */

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

@@ -19,6 +19,9 @@ public class CwProjectReviewNewTeam extends BaseEntity {
     private String content;  //本人负责内容
     private String opinion;  //审核意见
 
+    //编号
+    private String detailNumber;
+
     @TableField(exist = false)
     private String memberName;  //成员名称
     @TableField(exist = false)

+ 34 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.finance.projectReport.domain.*;
+import com.jeeplus.finance.projectReport.service.dto.ProjectContactInfo;
+import com.jeeplus.finance.projectReport.service.dto.ProjectReportInfo;
 import com.jeeplus.finance.workClientInfo.domain.CwWorkClientBase;
 import com.jeeplus.finance.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
@@ -25,6 +27,8 @@ import java.util.List;
 //@InterceptorIgnore(tenantLine = "true")
 public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
 
+    String getTotal();
+
     /**
      * 查询报告数据集合
      * @param page
@@ -226,13 +230,41 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
      * 数据导入(临时)
      * @param reportNoList
      * @return
-     *
      */
     @InterceptorIgnore(tenantLine = "true")
     List<CwProjectReport> getReportInfoByNoList(@Param("reportNoList") List<String> reportNoList);
 
     void updatesigStatusById(CwProjectReport report);
 
-    String getIdByNo(@Param("reportNo")String reportNo);
+    /**
+     * 根据项目id获取委托方联系人信息
+     * @param projectId
+     * @return
+     */
+    List<ProjectContactInfo> getContactInfos(@Param("projectId") String projectId);
+
+    /**
+     * 将复核超期的数据状态改为超期未复核
+     */
+    void updateQualityOverdueStatus();
 
+    /**
+     * 将在线归档超期的数据状态改为超期未归档
+     */
+    void updateOnlineArchiveStatus();
+
+    /**
+     * 将纸质归档超期的数据状态改为超期未归档
+     */
+    void updatePaperArchiveStatus();
+
+    List<String> getAllInfo();
+
+    List<ProjectReportInfo> getProjectReportInfo(@Param("id") String id);
+
+    /**
+     * 归档信息导出数据查询
+     * @return
+     */
+    List<ArchivedReportInfo> archivedInfoExport(@Param(Constants.WRAPPER) QueryWrapper<ArchivedReportInfo> queryWrapper);
 }

+ 22 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportOnlineArchivingMapper.java

@@ -0,0 +1,22 @@
+package com.jeeplus.finance.projectReport.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportOnlineArchiving;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-26 14:36
+ */
+@Mapper
+public interface CwProjectReportOnlineArchivingMapper extends BaseMapper<CwProjectReportOnlineArchiving> {
+
+    /**
+     * 根据id修改状态
+     * @param id
+     * @param status
+     */
+    void updateStatusById(@Param("id") String id, @Param("status") String status);
+}

+ 22 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportPaperArchivingMapper.java

@@ -0,0 +1,22 @@
+package com.jeeplus.finance.projectReport.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportPaperArchiving;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-31 15:52
+ */
+@Mapper
+public interface CwProjectReportPaperArchivingMapper extends BaseMapper<CwProjectReportPaperArchiving> {
+
+    /**
+     * 根据id修改状态
+     * @param id
+     * @param status
+     */
+    void updateStatusById(@Param("id") String id, @Param("status") String status);
+}

+ 6 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportReviewMapper.java

@@ -62,4 +62,10 @@ public interface CwProjectReportReviewMapper extends BaseMapper<CwProjectReview>
      */
     CwProjectReportData selectProjectReportById(String id);
 
+    /**
+     * 查询陈红星的注册/资格证号,专业信息
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    CwProjectReportData getUserInfo();
 }

+ 23 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportSignAndIssueMapper.java

@@ -0,0 +1,23 @@
+package com.jeeplus.finance.projectReport.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportSignAndIssue;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-25 13:54
+ */
+@Mapper
+public interface CwProjectReportSignAndIssueMapper extends BaseMapper<CwProjectReportSignAndIssue> {
+
+    /**
+     * 根据id修改状态
+     * @param id
+     * @param status
+     */
+    void updateStatusById(@Param("id") String id, @Param("status") String status);
+}

+ 261 - 6
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -61,7 +61,7 @@
 
     <select id="queryByIdNew" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
         SELECT
-         a.id,
+          a.id,
         a.create_by_id AS createById,
         a.create_time,
         a.update_by_id,
@@ -94,6 +94,12 @@
         b.project_name AS projectName,
         b.project_number AS projectNumber,
         b.project_level AS projectLevel,
+        b.office_id AS officeId,
+        b.report_type AS reportType,
+        b.project_money,
+        b.plan_start_date as planStartDate,
+        b.plan_end_date as planEndDate,
+        b.create_time as createDate,
         su3.NAME AS projectManager,
         su3.id AS projectManagerId,
         su3.NAME AS memberName,
@@ -105,7 +111,28 @@
         a.industry,
         a.business_objects,
         a.report_name,
-        <include refid="Cw_Re_Column_List"></include>
+        <include refid="Cw_Re_Column_List"></include>,
+        suser2.name as reviewByName,
+        cw_sai.id as signAndIssueId,
+        new_line.report_no as reportNo,
+        cw_re.update_time as reportDate,
+        cwinfo.contract_no,
+        cwinfo.contract_name,
+        cwinfo.contract_amount as contractAmount,
+        cwinfo.contract_type as contractType,
+        cwcp.customer_name as clientName,
+        roa.id as onlineArchivingId,
+        roa.online_remarks,
+        roa.create_time as applyDates,
+        roa.proc_ins_id as onlineArchivingProcInsId,
+        suser3.name as applyUserName,
+        suser3.id as applyUserId,
+        roaart.ID_ as onlineArchivingTaskId,
+        rpa.id as paperArchivingId,
+        rpa.filed_no,
+        rpa.confirm_filed_no,
+        rpa.status as paperArchivingStatus
+
     FROM
         cw_project_report a
         LEFT JOIN cw_project_records b ON a.project_id = b.id
@@ -126,6 +153,19 @@
         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'
+        LEFT JOIN cw_project_report_sign_and_issue cw_sai ON a.id = cw_sai.report_id
+        AND cw_sai.del_flag = '0'
+        LEFT JOIN sys_user suser2 ON cw_re.review_by = suser2.id
+        AND suser2.del_flag = '0'
+        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_work_contract_info cwinfo on b.contract_id = cwinfo.id and cwinfo.del_flag = '0'
+        LEFT JOIN cw_work_contract_participant cwcp on cwinfo.id = cwcp.contract_info_id and cwcp.del_flag = '0'
+        left join cw_project_report_online_archiving roa on a.id = roa.report_id and roa.del_flag = '0'
+        left join act_ru_task roaart ON roa.proc_ins_id = roaart.PROC_INST_ID_
+        left join cw_project_report_paper_archiving rpa on a.id = rpa.report_id and rpa.del_flag = '0'
+
+        LEFT JOIN sys_user suser3 ON roa.create_by_id = suser3.id
+        AND suser3.del_flag = '0'
     WHERE
         a.id = #{id}
 				AND a.del_flag = '0'
@@ -191,9 +231,25 @@
         ifnull(cw_rev.review_status,'0') as reviewStatus,
         cw_rev.proc_ins_id as procInsId3,
         cw_rev.id as reviewNewId,
+        cw_rev.check_complete_time as checkCompleteTime,
+        cw_rev.zi_xun_shou_ru,
+        ifnull(sai.status,'0') as signAndIssueStatus,
+        sai.proc_ins_id as procInsId4,
+        sai.id as signAndIssueId,
+        sai.issue_complete_time as issueCompleteTime,
+        ifnull(roa.status,'0') as onlineArchivingStatus,
+        roa.proc_ins_id as onlineArchivingProcInsId,
+        roa.id as onlineArchivingId,
+        roaart.ID_ as onlineArchivingTaskId,
+        ifnull(rpa.status,'0') as paperArchivingStatus,
+        rpa.proc_ins_id as paperArchivingProcInsId,
+        rpa.id as paperArchivingId,
+        rpaart.ID_ as paperArchivingTaskId,
+
         new_line.report_no as reportNo,
         cwcb.name as servedUnitName,
         art.ID_ as rev_task_id,
+        artart.ID_ as signAndIssueTaskId,
         arta.ID_ as rev_task_id2,
         art1.ID_ as sign_task_id1,
         art2.ID_ as sign_task_id2,
@@ -212,7 +268,11 @@
         cw_nra.process_definition_id as applyReviewProcDefId,
         ifnull(cw_nra.review_status,'0') as applyReviewStatus,
         cw_ci.contract_name,
-        b.project_level
+        cw_ci.id as contractId,
+        cwcp.customer_name as clientName,
+        b.project_level,
+        b.project_type,
+        b.report_type
         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
@@ -229,6 +289,13 @@
 
         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_new cw_rev on a.id = cw_rev.report_id and cw_rev.del_flag = '0'
+        left join cw_project_report_sign_and_issue sai on a.id = sai.report_id and sai.del_flag = '0'
+        left join act_ru_task artart ON sai.proc_ins_id = artart.PROC_INST_ID_
+        left join cw_project_report_online_archiving roa on a.id = roa.report_id and roa.del_flag = '0'
+        left join act_ru_task roaart ON roa.proc_ins_id = roaart.PROC_INST_ID_
+        left join cw_project_report_paper_archiving rpa on a.id = rpa.report_id and rpa.del_flag = '0'
+        left join act_ru_task rpaart ON rpa.proc_ins_id = rpaart.PROC_INST_ID_
+
         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
@@ -236,6 +303,7 @@
         left join sys_user_manage_office sumo on sumo.office_id = sub.office_id
         left join cw_work_client_base cwcb on new_line.served_unit_id = cwcb.id
         LEFT JOIN cw_work_contract_info cw_ci on  b.contract_id=cw_ci.id
+        LEFT JOIN cw_work_contract_participant cwcp on cw_ci.id = cwcp.contract_info_id and cwcp.del_flag = '0'
         LEFT JOIN cw_project_report_number_apply cw_na on  a.id = cw_na.report_id
         LEFT JOIN cw_project_report_number_review_apply cw_nra on  a.id = cw_nra.report_id
          left join act_ru_task arta ON cw_na.proc_ins_id = arta.PROC_INST_ID_
@@ -1052,15 +1120,202 @@
         where
             cw_prnl.report_no=#{reportNo}
     </select>
+    <select id="getContactInfos" resultType="com.jeeplus.finance.projectReport.service.dto.ProjectContactInfo">
+        SELECT
+            cw_wcb.NAME AS clientContactsName,
+            cw_wco.NAME AS NAME,
+            cw_wco.contact_first,
+            cw_wco.contact_second
+        FROM
+            cw_project_client_info cw_pci
+            LEFT JOIN cw_work_client_base cw_wcb ON cw_wcb.id = cw_pci.client_id
+            AND cw_wcb.del_flag = '0'
+            LEFT JOIN cw_work_client_contact cw_wco ON cw_wcb.id = cw_wco.client_id
+            AND cw_wco.del_flag = '0'
+        WHERE
+            cw_pci.project_id = #{projectId}
+    </select>
+    <select id="getAllInfo" resultType="java.lang.String">
+        select id from cw_project_report where del_flag = '0'
+    </select>
+    <select id="getProjectReportInfo"
+            resultType="com.jeeplus.finance.projectReport.service.dto.ProjectReportInfo">
+        select c.project_name,a.create_time,b.report_no,'已完成' as status from cw_project_report a
+        left join cw_project_report_new_line b on a.id = b.report_id and b.del_flag = '0'
+        left join cw_project_records c on c.id = a.project_id and c.del_flag = '0'
+        where a.id = #{id}
+    </select>
 
     <update id="updatesigStatusById">
         update cw_project_report set signature_annotator1=#{signatureAnnotator1},signature_annotator2=#{signatureAnnotator2},signature_annotator_status=#{signatureAnnotatorStatus} where id=#{id}
     </update>
+    <update id="updateQualityOverdueStatus">
+        UPDATE cw_project_report_review_new AS r
+        JOIN (
+            SELECT b.id
+            FROM cw_project_report AS a
+            LEFT JOIN cw_project_report_review_new AS b ON a.id = b.report_id
+            LEFT JOIN cw_project_report_new_line AS c ON a.id = c.report_id
+            WHERE (b.review_status IS NULL OR b.review_status = '')
+            AND a.del_flag = '0'
+            AND c.report_no IS NOT NULL
+            AND DATEDIFF(NOW(), a.create_time) > 60
+            and b.id is not null
+        ) AS sub
+        ON r.id = sub.id
+        SET r.review_status = '6', r.mark = '1';
+    </update>
+    <update id="updateOnlineArchiveStatus">
+        UPDATE cw_project_report_online_archiving AS r
+JOIN (
+	SELECT
+		d.id
+	FROM
+		cw_project_report AS a
+		LEFT JOIN cw_project_report_review_new AS b ON a.id = b.report_id
+		AND b.del_flag = '0'
+		LEFT JOIN cw_project_report_new_line AS c ON a.id = c.report_id
+		AND c.del_flag = '0'
+		AND c.report_no
+		IS NOT NULL LEFT JOIN cw_project_report_online_archiving AS d ON a.id = d.report_id
+		AND d.del_flag = '0'
+		LEFT JOIN cw_project_records AS e ON e.id = a.project_id
+		AND e.del_flag = '0'
+		LEFT JOIN cw_project_report_sign_and_issue AS f ON a.id = f.report_id
+		AND f.del_flag = '0'
+	WHERE
+		e.project_level = 1
+		AND f.STATUS = '5'
+		AND a.del_flag = '0'
+		AND DATEDIFF( NOW(), f.update_time ) > 40
+		AND ( d.STATUS IS NULL OR d.STATUS = '' )
+		AND d.id IS NOT NULL UNION ALL
+	SELECT
+		d.id
+	FROM
+		cw_project_report AS a
+		LEFT JOIN cw_project_report_review_new AS b ON a.id = b.report_id
+		AND b.del_flag = '0'
+		LEFT JOIN cw_project_report_new_line AS c ON a.id = c.report_id
+		AND c.del_flag = '0'
+		AND c.report_no
+		IS NOT NULL LEFT JOIN cw_project_report_online_archiving AS d ON a.id = d.report_id
+		AND d.del_flag = '0'
+		LEFT JOIN cw_project_records AS e ON e.id = a.project_id
+		AND e.del_flag = '0'
+		LEFT JOIN cw_project_report_sign_and_issue AS f ON a.id = f.report_id
+		AND f.del_flag = '0'
+	WHERE
+		e.project_level = 2
+		AND b.review_status IN ( '5', '7' )
+		AND a.del_flag = '0'
+		AND DATEDIFF( NOW(), b.check_complete_time ) > 40
+		AND ( d.STATUS IS NULL OR d.STATUS = '' )
+		AND d.id IS NOT NULL
+	) AS sub ON r.id = sub.id
+	SET r.`status` = '6', r.mark = '1';
+    </update>
+    <update id="updatePaperArchiveStatus">
+        		UPDATE cw_project_report_paper_archiving AS r
+JOIN (
+	SELECT
+		d.id
+	FROM
+		cw_project_report AS a
+		LEFT JOIN cw_project_report_review_new AS b ON a.id = b.report_id
+		AND b.del_flag = '0'
+		LEFT JOIN cw_project_report_new_line AS c ON a.id = c.report_id
+		AND c.del_flag = '0'
+		AND c.report_no
+		IS NOT NULL LEFT JOIN cw_project_report_paper_archiving AS d ON a.id = d.report_id
+		AND d.del_flag = '0'
+		LEFT JOIN cw_project_records AS e ON e.id = a.project_id
+		AND e.del_flag = '0'
+		LEFT JOIN cw_project_report_sign_and_issue AS f ON a.id = f.report_id
+		AND f.del_flag = '0'
+	WHERE
+		e.project_level = 1
+		AND f.STATUS = '5'
+		AND a.del_flag = '0'
+		AND DATEDIFF( NOW(), f.update_time ) > 40
+		AND ( d.STATUS IS NULL OR d.STATUS = '' )
+		AND d.id IS NOT NULL UNION ALL
+	SELECT
+		d.id
+	FROM
+		cw_project_report AS a
+		LEFT JOIN cw_project_report_review_new AS b ON a.id = b.report_id
+		AND b.del_flag = '0'
+		LEFT JOIN cw_project_report_new_line AS c ON a.id = c.report_id
+		AND c.del_flag = '0'
+		AND c.report_no
+		IS NOT NULL LEFT JOIN cw_project_report_paper_archiving AS d ON a.id = d.report_id
+		AND d.del_flag = '0'
+		LEFT JOIN cw_project_records AS e ON e.id = a.project_id
+		AND e.del_flag = '0'
+		LEFT JOIN cw_project_report_sign_and_issue AS f ON a.id = f.report_id
+		AND f.del_flag = '0'
+	WHERE
+		e.project_level = 2
+		AND b.review_status IN ( '5', '7' )
+		AND a.del_flag = '0'
+		AND DATEDIFF( NOW(), b.check_complete_time ) > 90
+		AND ( d.STATUS IS NULL OR d.STATUS = '' )
+		AND d.id IS NOT NULL
+	) AS sub ON r.id = sub.id
+	SET r.`status` = '6';
+    </update>
 
-
-    <select id="getIdByNo" resultType="string">
-        select report_id from cw_project_report_new_line where report_no = #{reportNo}
+    <select id="getTotal" resultType="java.lang.String">
+        SELECT SUM(zi_xun_shou_ru) AS total_zi_xun_shou_ru FROM cw_project_report_review_new where del_flag = '0'
     </select>
+    <select id="archivedInfoExport" resultType="com.jeeplus.finance.projectReport.domain.ArchivedReportInfo">
+        SELECT DISTINCT
+            c.report_no,
+            b.project_name,
+            CASE
+                WHEN b.project_level = 1 THEN 'A级'
+                WHEN b.project_level = 2 THEN 'B级'
+                ELSE '其他级别'
+            END AS project_level,
+            cw_rev.zi_xun_shou_ru,
+            su.NAME AS projectCreateByName,
+            so.NAME AS departmentName,
+            su2.NAME AS personResponsible,
+            b.create_time as projectCreateTime,
+            cw_rev.check_complete_time as checkCompleteTime,
+            sai.issue_complete_time as issueCompleteTime,
+            roa.create_time as onlineStartTime,
+            CASE
+                WHEN roa.status = 1 THEN '暂存'
+                WHEN roa.status = 2 THEN '归档中'
+                WHEN roa.status = 3 THEN '撤回'
+                WHEN roa.status = 4 THEN '驳回'
+                WHEN roa.status = 5 THEN '已归档'
+                WHEN roa.status = 6 THEN '超期未归档'
+                WHEN roa.status = 7 THEN '超期归档'
+                ELSE '未归档'
+            END as onlineArchivingStatus,
+            dictVal.`value`,
+            dictVal.`label` as projectCategory
 
+        FROM cw_project_report a
+        LEFT JOIN cw_project_records b ON a.project_id = b.id
+        LEFT JOIN cw_project_report_new_line c ON a.id = c.report_id
+        LEFT JOIN sys_user su ON b.create_by_id = su.id
+        LEFT JOIN sys_office so ON su.office_id = so.id
+        LEFT JOIN cw_project_report_review_new cw_rev ON a.id = cw_rev.report_id
+        LEFT JOIN sys_user su2 ON b.project_leader_id = su2.id AND su2.del_flag = '0'
+        LEFT JOIN cw_project_report_sign_and_issue sai ON a.id = sai.report_id
+        LEFT JOIN cw_project_report_online_archiving roa ON a.id = roa.report_id
+        LEFT JOIN sys_dict_value dictVal ON b.report_type = dictVal.`value`
+        LEFT JOIN sys_dict_type dict ON (
+            (b.project_type = 1 AND dictVal.dict_type_id = dict.id AND dict.type = 'program_cost_audit_type') OR
+            (b.project_type = 2 AND  dictVal.dict_type_id = dict.id AND dict.type = 'program_engineering_consultation_type')
+        )
+		${ew.customSqlSegment}
+		and dict.id is not null
+        ORDER BY a.create_time DESC
+    </select>
 
 </mapper>

+ 8 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportOnlineArchivingMapper.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.CwProjectReportOnlineArchivingMapper">
+    <update id="updateStatusById">
+         update cw_project_report_online_archiving set status = #{status}
+        where id = #{id}
+    </update>
+</mapper>

+ 8 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportPaperArchivingMapper.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.CwProjectReportPaperArchivingMapper">
+    <update id="updateStatusById">
+        update cw_project_report_paper_archiving set status = #{status}
+        where id = #{id}
+    </update>
+</mapper>

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

@@ -140,5 +140,29 @@
         left join cw_project_report_review b on a.id = b.report_id
         where a.id = #{id}
     </select>
+    <select id="getUserInfo" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
+         select
+            su.id as id,
+            su.name as memberName,
+            cert.type AS professionType,
+            cert.profession AS profession,
+            cert.enroll_cert_no AS enrollCertNo
+            from sys_user su
+            LEFT JOIN sys_cert cert ON su.id = cert.user_id AND cert.del_flag = '0'
+            where su.name= '陈红星' and su.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>

+ 8 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportSignAndIssueMapper.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.CwProjectReportSignAndIssueMapper">
+    <update id="updateStatusById">
+        update cw_project_report_sign_and_issue set status = #{status}
+        where id = #{id}
+    </update>
+</mapper>

+ 11 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReviewNewTeamMapper.xml

@@ -13,7 +13,8 @@
         a.user_id,
         a.user_role,
         a.content,
-        a.opinion
+        a.opinion,
+        a.detail_number
     </sql>
     <delete id="deleteByReportId">
         update cw_project_report_review_new_team set del_flag = '1' where report_id = #{reportId}
@@ -41,6 +42,14 @@
         ) THEN '3'
         ELSE '4'
         END
-        );
+        )
+        ORDER BY
+--         CASE
+--         WHEN a.user_role = '负责人' THEN 1
+--         WHEN a.user_role = '技术负责人' THEN 2
+--         ELSE 3
+--         END,
+        a.detail_number ASC;
     </select>
+
 </mapper>

+ 124 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportOnlineArchivingService.java

@@ -0,0 +1,124 @@
+package com.jeeplus.finance.projectReport.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportOnlineArchiving;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportSignAndIssue;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReportOnlineArchivingMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-26 14:37
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+@Component
+public class CwProjectReportOnlineArchivingService extends ServiceImpl<CwProjectReportOnlineArchivingMapper, CwProjectReportOnlineArchiving> {
+
+    @Resource
+    private CwProjectReportOnlineArchivingMapper onlineArchivingMapper;
+
+    /**
+     * 修改状态
+     * @param data
+     * @return
+     */
+    public String updateStatusByReportId(CwProjectReportData data) {
+        onlineArchivingMapper.updateStatusById(data.getId(),data.getStatus());
+        return "操作成功";
+    }
+
+    public CwProjectReportData queryByReportId(String id) {
+        CwProjectReportOnlineArchiving signAndIssue = onlineArchivingMapper.selectOne(new QueryWrapper<CwProjectReportOnlineArchiving>().eq("report_id", id));
+        CwProjectReportData data = new CwProjectReportData();
+        if (null != signAndIssue) {
+
+            BeanUtils.copyProperties(signAndIssue, data);
+        }
+
+        return data;
+    }
+
+    /**
+     * 保存项目以及其他相关信息
+     * @param reportData
+     * @return
+     * @throws Exception
+     */
+    public String saveForm(CwProjectReportData reportData) throws Exception{
+        if (StringUtils.isNotEmpty(reportData.getId())){
+
+            CwProjectReportOnlineArchiving onlineArchiving = onlineArchivingMapper.selectById(reportData.getOnlineArchivingId());
+            if (onlineArchiving != null){
+                reportData.setCreateBy(reportData.getCreateBy());
+                reportData.setMark(onlineArchiving.getMark());
+                return update(reportData,onlineArchiving);
+            }
+        }
+        return add(reportData);
+
+    }
+
+    public String add(CwProjectReportData dto) throws Exception{
+
+
+        //生成主键id值
+        String id = UUID.randomUUID().toString().replace("-", "");
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        //保存基本信息
+        CwProjectReportOnlineArchiving info = new CwProjectReportOnlineArchiving();
+        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());
+
+        onlineArchivingMapper.insert(info);
+
+        return info.getId();
+    }
+
+
+    /**
+     * 合同登记修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public String update(CwProjectReportData reportData, CwProjectReportOnlineArchiving onlineArchiving) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        CwProjectReportOnlineArchiving review = new CwProjectReportOnlineArchiving();
+        BeanUtils.copyProperties(reportData, review);
+        review.setUpdateById(userDTO.getId());
+        review.setUpdateTime(new Date());
+        review.setId(reportData.getOnlineArchivingId());
+
+        if (StringUtils.isNotBlank(reportData.getMark())) {
+            if (reportData.getMark().equals("1") && reportData.getStatus().equals("5")) {
+                //超期归档
+                review.setStatus("7");
+            }
+        }
+        onlineArchivingMapper.updateById(review);
+
+        return review.getId();
+    }
+}

+ 124 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportPaperArchivingService.java

@@ -0,0 +1,124 @@
+package com.jeeplus.finance.projectReport.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportPaperArchiving;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReportPaperArchivingMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-31 15:54
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+@Component
+public class CwProjectReportPaperArchivingService extends ServiceImpl<CwProjectReportPaperArchivingMapper, CwProjectReportPaperArchiving> {
+
+    @Resource
+    private CwProjectReportPaperArchivingMapper paperArchivingMapper;
+
+    /**
+     * 修改状态
+     * @param data
+     * @return
+     */
+    public String updateStatusByReportId(CwProjectReportData data) {
+        paperArchivingMapper.updateStatusById(data.getId(),data.getStatus());
+        return "操作成功";
+    }
+
+    public CwProjectReportData queryByReportId(String id) {
+        CwProjectReportPaperArchiving signAndIssue = paperArchivingMapper.selectOne(new QueryWrapper<CwProjectReportPaperArchiving>().eq("report_id", id));
+        CwProjectReportData data = new CwProjectReportData();
+        if (null != signAndIssue) {
+
+            BeanUtils.copyProperties(signAndIssue, data);
+        }
+
+        return data;
+    }
+
+    /**
+     * 保存项目以及其他相关信息
+     * @param reportData
+     * @return
+     * @throws Exception
+     */
+    public String saveForm(CwProjectReportData reportData) throws Exception{
+        if (StringUtils.isNotEmpty(reportData.getId())){
+
+            CwProjectReportPaperArchiving onlineArchiving = paperArchivingMapper.selectById(reportData.getPaperArchivingId());
+            if (onlineArchiving != null){
+                reportData.setCreateBy(reportData.getCreateBy());
+                reportData.setMark(onlineArchiving.getMark());
+                return update(reportData,onlineArchiving);
+            }
+        }
+        return add(reportData);
+
+    }
+
+    public String add(CwProjectReportData dto) throws Exception{
+
+
+        //生成主键id值
+        String id = UUID.randomUUID().toString().replace("-", "");
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        //保存基本信息
+        CwProjectReportPaperArchiving info = new CwProjectReportPaperArchiving();
+        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());
+
+        paperArchivingMapper.insert(info);
+
+        return info.getId();
+    }
+
+
+    /**
+     * 合同登记修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public String update(CwProjectReportData reportData, CwProjectReportPaperArchiving onlineArchiving) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        CwProjectReportPaperArchiving review = new CwProjectReportPaperArchiving();
+        BeanUtils.copyProperties(reportData, review);
+        review.setUpdateById(userDTO.getId());
+        review.setUpdateTime(new Date());
+        review.setId(reportData.getPaperArchivingId());
+
+        if (StringUtils.isNotBlank(reportData.getMark())) {
+            if (reportData.getMark().equals("1") && reportData.getStatus().equals("5")) {
+                //超期归档
+                review.setStatus("7");
+            }
+        }
+
+        paperArchivingMapper.updateById(review);
+
+        return review.getId();
+    }
+}

+ 25 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java

@@ -27,6 +27,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import javax.annotation.Resource;
 import java.lang.reflect.InvocationTargetException;
@@ -76,17 +77,27 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
     @Resource
     private CwProjectReportReviewMapper cwProjectReportReviewMapper;
 
-    public CwProjectReportData queryByReportId(String id) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
+    public CwProjectReportData queryByReportId(String id) {
         CwProjectReportData data = mapper.selectByPortId(id);
         //查询复核相关信息
 
         return data;
     }
-    public CwProjectReportData queryByReportIdNew(String id) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
+
+    public CwProjectReportData getUserInfo(String id) {
+        CwProjectReportData data = mapper.getUserInfo();
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(id);
+        data.setReviewByName(userDTO.getName());
+
+        return data;
+    }
+    public CwProjectReportData queryByReportIdNew(String id) {
         CwProjectReviewNew reviewNew = reviewNewMapper.selectOne(new QueryWrapper<CwProjectReviewNew>().eq("report_id", id));
         CwProjectReportData data = new CwProjectReportData();
-        BeanUtils.copyProperties(reviewNew, data);
-        //查询复核相关信息
+        if (null != reviewNew) {
+
+            BeanUtils.copyProperties(reviewNew, data);
+        }
 
         return data;
     }
@@ -198,6 +209,7 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
             CwProjectReviewNew detail = reviewNewMapper.selectById(reportData.getReviewNewId());
             if (detail != null){
                 reportData.setCreateBy(reportData.getCreateBy());
+                reportData.setMark(detail.getMark());
                 return updateNew(reportData,detail);
             }
         }
@@ -218,6 +230,15 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
         review.setUpdateTime(new Date());
         review.setId(reportData.getReviewNewId());
 
+        if (StringUtils.isNotBlank(reportData.getMark())) {
+            if (reportData.getMark().equals("1") && reportData.getReviewStatus().equals("5")) {
+                //超期复核
+                review.setReviewStatus("7");
+            }
+        }
+        if (null == review.getCheckCompleteTime()) {
+            review.setCheckCompleteTime(new Date());
+        }
         reviewNewMapper.updateById(review);
 
         //项目组成员数据处理

+ 459 - 55
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -20,9 +20,7 @@ import com.jeeplus.finance.projectRecords.domain.CwProjectRecords;
 import com.jeeplus.finance.projectRecords.service.CwProjectRecordsService;
 import com.jeeplus.finance.projectReport.domain.*;
 import com.jeeplus.finance.projectReport.mapper.*;
-import com.jeeplus.finance.projectReport.service.dto.CwProjectReportDTO;
-import com.jeeplus.finance.projectReport.service.dto.CwProjectReportSignatureDTO;
-import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
+import com.jeeplus.finance.projectReport.service.dto.*;
 import com.jeeplus.finance.projectReport.service.mapstruct.CwProjectReportFileWrapper;
 import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportArchive;
 import com.jeeplus.finance.projectReportArchive.mapper.CwProjectReportArchiveMapper;
@@ -121,6 +119,22 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     @Resource
     private CwProjectReportNumberApplyMapper applyMapper;
 
+    @Resource
+    private CwProjectReportSignAndIssueMapper signAndIssueMapper;
+
+    @Resource
+    private CwProjectReportOnlineArchivingMapper onlineArchivingMapper;
+
+    @Resource
+    private CwProjectReportPaperArchivingMapper paperArchivingMapper;
+
+    /**
+     * 获取咨询营业收入(万元)的总和
+     * @return
+     */
+    public String getTotal() {
+        return reportMapper.getTotal();
+    }
 
     /**
      * 保存项目以及其他相关信息
@@ -552,6 +566,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     public IPage<CwProjectReportData> findList(Page<CwProjectReportData> page, CwProjectReportData projectReportData) throws Exception{
         QueryWrapper<CwProjectReportData> queryWrapper = QueryWrapperGenerator.buildQueryCondition (projectReportData,CwProjectReportData.class);
         queryWrapper.eq("a.del_flag","0");
+        queryWrapper.eq("b.project_type","1");
 //        queryWrapper.orderByDesc("a.create_date");
         //条件
         if (StringUtils.isNotEmpty(projectReportData.getProjectNumber())) {
@@ -563,81 +578,158 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         if (StringUtils.isNotEmpty(projectReportData.getReportName())) {
             queryWrapper.like("a.report_name", projectReportData.getReportName());
         }
-        if (StringUtils.isNotEmpty(projectReportData.getProjectMasterId())) {
-            queryWrapper.eq("b.project_master_id", projectReportData.getProjectMasterId());
+        if (StringUtils.isNotEmpty(projectReportData.getCreateBy().getId())) {
+            queryWrapper.like("a.create_by_id", projectReportData.getCreateBy().getId()).or().like("d.name", projectReportData.getCreateBy().getId());
         }
-        if (StringUtils.isNotEmpty(projectReportData.getProjectMaster2Id())) {
-            queryWrapper.eq("b.real_header", projectReportData.getProjectMaster2Id());
+        //5、报告文号
+        if (StringUtils.isNotEmpty(projectReportData.getReportNo())) {
+            queryWrapper.like("new_line.report_no", projectReportData.getReportNo());
         }
-        if (StringUtils.isNotEmpty(projectReportData.getProjectMasterName())) { // 项目经理1筛选
-            queryWrapper.like("e.id", projectReportData.getProjectMasterName());
+        if (StringUtils.isNotEmpty(projectReportData.getReviewStatus())) {
+            queryWrapper.eq("cw_rev.review_status", projectReportData.getReviewStatus());
         }
-        if (StringUtils.isNotEmpty(projectReportData.getRealHeaderName())) { // 项目经理2筛选
-            queryWrapper.like("f.id", projectReportData.getRealHeaderName());
+        //项目类型
+        if (StringUtils.isNotEmpty(projectReportData.getProjectType())) {
+            queryWrapper.eq("b.project_type", projectReportData.getProjectType());
         }
-        if (StringUtils.isNotEmpty(projectReportData.getCreateBy().getId())) {
-            queryWrapper.like("a.create_by_id", projectReportData.getCreateBy().getId()).or().like("d.name", projectReportData.getCreateBy().getId());
+        //项目类别
+        if (StringUtils.isNotEmpty(projectReportData.getProjectCategory())) {
+            queryWrapper.eq("b.report_type", projectReportData.getProjectCategory());
         }
-        //4、签约时间(区间)
+        //4、创建时间(区间)
         String[] contractDates = projectReportData.getContractDates();
         if (contractDates != null) {
 
             queryWrapper.between("a.create_time", contractDates[0], contractDates[1]);
         }
-        //5、报告文号
-        if (StringUtils.isNotEmpty(projectReportData.getReportNo())) {
-            queryWrapper.like("new_line.report_no", projectReportData.getReportNo());
-        }
         //6、审计收费
-        String[] contractAmounts = projectReportData.getContractAmounts();
-        if (contractAmounts != null) {
-            if (StringUtils.isNotEmpty(contractAmounts[0])) {
-                queryWrapper.ge("a.audit_fees",contractAmounts[0]);
-            }
-            if (contractAmounts.length>1 && StringUtils.isNotEmpty(contractAmounts[1])) {
-                queryWrapper.le("a.audit_fees", contractAmounts[1]);
-            }
-        }
+//        String[] contractAmounts = projectReportData.getContractAmounts();
+//        if (contractAmounts != null) {
+//            if (StringUtils.isNotEmpty(contractAmounts[0])) {
+//                queryWrapper.ge("a.audit_fees",contractAmounts[0]);
+//            }
+//            if (contractAmounts.length>1 && StringUtils.isNotEmpty(contractAmounts[1])) {
+//                queryWrapper.le("a.audit_fees", contractAmounts[1]);
+//            }
+//        }
         if (StringUtils.isNotEmpty(projectReportData.getReviewStatus())) {
             queryWrapper.eq("cw_rev.review_status", projectReportData.getReviewStatus());
         }
-        //报告号签章状态
-        if (StringUtils.isNotEmpty(projectReportData.getApplyStatus())) {
-            if("0".equals(projectReportData.getApplyStatus())){
-                queryWrapper.isNull("cw_na.review_status");
-                if(StringUtils.isBlank(projectReportData.getReviewStatus())){
-                    queryWrapper.eq("cw_rev.review_status","0");
+        String isBmzr = "0";
+        StringBuilder officeIds = new StringBuilder();
+        //UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+//        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+//        List<String> manageOfficeIdList= Lists.newArrayList();
+
+//        long l1 = System.currentTimeMillis();
+        IPage<CwProjectReportData> list = reportMapper.findList(page,isBmzr, officeIds.toString(), queryWrapper);
+        /*long l2 = System.currentTimeMillis();
+        System.out.println("报告列表查询service方法消耗时间:" + (l2-l1));
+        List<UserDTO> allUserInfo = (List<UserDTO>) RedisUtils.getInstance().get(CacheNames.USER_CACHE_USER_ALL_INFO);
+        if (null == allUserInfo || allUserInfo.size() == 0) {
+            allUserInfo = SpringUtil.getBean(IUserApi.class).getAllUserInfo();
+        }
+        ArrayList<User> users = new ArrayList<>();
+        List<UserDTO> finalAllUserInfo = allUserInfo;
+        list.getRecords().forEach(li->{
+            if (StringUtils.isBlank(li.getProjectMasterName())){
+                //根据项目经理1的id去查项目经理去名称
+                if (StringUtils.isNotBlank(li.getProjectMasterId())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMasterId().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMasterName(projectMasterName);
+                    }
+                }
+            }
+
+            if (StringUtils.isBlank(li.getRealHeaderName())) {
+                if (StringUtils.isNotBlank(li.getProjectMaster2Id())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMaster2Id().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMaster2Name(projectMasterName);
+                    }
                 }
-            }else{
-                queryWrapper.eq("cw_na.review_status", projectReportData.getApplyStatus());
             }
+            if(StringUtils.isEmpty(li.getSignatureAnnotatorStatus())){
+                li.setSignatureAnnotatorStatus("0");
+            }
+            CwSignatureAnnotator sigById = cwSignatureAnnotatorMapper.getSigById(li.getId());
+            if (ObjectUtil.isNotEmpty(sigById)){
+                li.setProcInsSigId(sigById.getProcInsId());
+                li.setSigReason(sigById.getReason());
+                li.setTaskSigId(sigById.getTaskId());
+            }
+        });*/
+        return list;
+
+    }
+
+    /**
+     * 工程咨询-项目管理列表
+     * @param page
+     * @param projectReportData
+     * @return
+     * @throws Exception
+     */
+    public IPage<CwProjectReportData> findList2(Page<CwProjectReportData> page, CwProjectReportData projectReportData) throws Exception{
+        QueryWrapper<CwProjectReportData> queryWrapper = QueryWrapperGenerator.buildQueryCondition (projectReportData,CwProjectReportData.class);
+        queryWrapper.eq("a.del_flag","0");
+        queryWrapper.eq("b.project_type","2");
+//        queryWrapper.orderByDesc("a.create_date");
+        //条件
+        if (StringUtils.isNotEmpty(projectReportData.getProjectNumber())) {
+            queryWrapper.like("b.project_number", projectReportData.getProjectNumber());
         }
-        if (StringUtils.isNotEmpty(projectReportData.getStatus1())) {
-            queryWrapper.eq("cw_prs1.status", projectReportData.getStatus1());
+        if (StringUtils.isNotEmpty(projectReportData.getProjectName())) {
+            queryWrapper.like("b.project_name", projectReportData.getProjectName());
         }
-        if (StringUtils.isNotBlank(projectReportData.getFilingType())) {
-            List<CwProjectRecords> projectList = cwProjectRecordsService.list(new LambdaQueryWrapper<CwProjectRecords>().eq(CwProjectRecords::getReportType, projectReportData.getFilingType()));
-            List<String> projectIdList = projectList.stream().map(CwProjectRecords::getId).collect(Collectors.toList());
-            if (CollectionUtil.isNotEmpty(projectIdList)) {
-                queryWrapper.in("b.id", projectIdList);
-            } else {
-                return new Page<>();
-            }
+        if (StringUtils.isNotEmpty(projectReportData.getReportName())) {
+            queryWrapper.like("a.report_name", projectReportData.getReportName());
         }
-        if (ArrayUtil.isNotEmpty(projectReportData.getCreateDates())) {
-            queryWrapper.between("a.create_time", projectReportData.getCreateDates()[0], projectReportData.getCreateDates()[1]);
+        if (StringUtils.isNotEmpty(projectReportData.getCreateBy().getId())) {
+            queryWrapper.like("a.create_by_id", projectReportData.getCreateBy().getId()).or().like("d.name", projectReportData.getCreateBy().getId());
+        }
+        //5、报告文号
+        if (StringUtils.isNotEmpty(projectReportData.getReportNo())) {
+            queryWrapper.like("new_line.report_no", projectReportData.getReportNo());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getReviewStatus())) {
+            queryWrapper.eq("cw_rev.review_status", projectReportData.getReviewStatus());
+        }
+        //项目类型
+        if (StringUtils.isNotEmpty(projectReportData.getProjectType())) {
+            queryWrapper.eq("b.project_type", projectReportData.getProjectType());
+        }
+        //项目类别
+        if (StringUtils.isNotEmpty(projectReportData.getProjectCategory())) {
+            queryWrapper.eq("b.report_type", projectReportData.getProjectCategory());
+        }
+        //4、创建时间(区间)
+        String[] contractDates = projectReportData.getContractDates();
+        if (contractDates != null) {
+
+            queryWrapper.between("a.create_time", contractDates[0], contractDates[1]);
         }
         String isBmzr = "0";
         StringBuilder officeIds = new StringBuilder();
-        //UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
-//        UserDTO userDTO = UserUtils.getCurrentUserDTO();
-        List<String> manageOfficeIdList= Lists.newArrayList();
-
 
-
-        long l1 = System.currentTimeMillis();
+//        long l1 = System.currentTimeMillis();
         IPage<CwProjectReportData> list = reportMapper.findList(page,isBmzr, officeIds.toString(), queryWrapper);
-        long l2 = System.currentTimeMillis();
+        /*long l2 = System.currentTimeMillis();
         System.out.println("报告列表查询service方法消耗时间:" + (l2-l1));
         List<UserDTO> allUserInfo = (List<UserDTO>) RedisUtils.getInstance().get(CacheNames.USER_CACHE_USER_ALL_INFO);
         if (null == allUserInfo || allUserInfo.size() == 0) {
@@ -687,12 +779,68 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                 li.setSigReason(sigById.getReason());
                 li.setTaskSigId(sigById.getTaskId());
             }
-        });
+        });*/
         return list;
 
     }
 
     /**
+     * 总项目管理列表
+     * @param page
+     * @param projectReportData
+     * @return
+     * @throws Exception
+     */
+    public IPage<CwProjectReportData> findList3(Page<CwProjectReportData> page, CwProjectReportData projectReportData) throws Exception{
+        QueryWrapper<CwProjectReportData> queryWrapper = QueryWrapperGenerator.buildQueryCondition (projectReportData,CwProjectReportData.class);
+        queryWrapper.eq("a.del_flag","0");
+//        queryWrapper.orderByDesc("a.create_date");
+        //条件
+        if (StringUtils.isNotEmpty(projectReportData.getProjectNumber())) {
+            queryWrapper.like("b.project_number", projectReportData.getProjectNumber());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getProjectName())) {
+            queryWrapper.like("b.project_name", projectReportData.getProjectName());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getReportName())) {
+            queryWrapper.like("a.report_name", projectReportData.getReportName());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getCreateBy().getId())) {
+            queryWrapper.like("a.create_by_id", projectReportData.getCreateBy().getId()).or().like("d.name", projectReportData.getCreateBy().getId());
+        }
+        //5、报告文号
+        if (StringUtils.isNotEmpty(projectReportData.getReportNo())) {
+            queryWrapper.like("new_line.report_no", projectReportData.getReportNo());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getReviewStatus())) {
+            queryWrapper.eq("cw_rev.review_status", projectReportData.getReviewStatus());
+        }
+        //项目类型
+        if (StringUtils.isNotEmpty(projectReportData.getProjectType())) {
+            queryWrapper.eq("b.project_type", projectReportData.getProjectType());
+        }
+        //项目类别
+        if (StringUtils.isNotEmpty(projectReportData.getProjectCategory())) {
+            queryWrapper.eq("b.report_type", projectReportData.getProjectCategory());
+        }
+        //4、创建时间(区间)
+        String[] contractDates = projectReportData.getContractDates();
+        if (contractDates != null) {
+
+            queryWrapper.between("a.create_time", contractDates[0], contractDates[1]);
+        }
+
+
+//        if (ArrayUtil.isNotEmpty(projectReportData.getCreateDates())) {
+//            queryWrapper.between("a.create_time", projectReportData.getCreateDates()[0], projectReportData.getCreateDates()[1]);
+//        }
+        String isBmzr = "0";
+        StringBuilder officeIds = new StringBuilder();
+        IPage<CwProjectReportData> list = reportMapper.findList(page,isBmzr, officeIds.toString(), queryWrapper);
+        return list;
+
+    }
+    /**
      * 修改状态
      * @param data
      * @return
@@ -722,6 +870,56 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         return reportData;
     }
 
+    /**
+     * 根据报告签发id查询信息
+     * @param id
+     * @return
+     */
+    public CwProjectReportData queryBySignAndIssueId(String id) {
+
+        CwProjectReportSignAndIssue signAndIssue = signAndIssueMapper.selectById(id);
+
+        CwProjectReportData reportData = reportMapper.queryByIdNew(signAndIssue.getReportId());
+
+        return reportData;
+    }
+
+    /**
+     * 根据报告在线归档id查询信息
+     * @param id
+     * @return
+     */
+    public CwProjectReportData queryByOnlineArchivingId(String id) {
+
+        CwProjectReportOnlineArchiving onlineArchiving = onlineArchivingMapper.selectById(id);
+
+        CwProjectReportData reportData = reportMapper.queryByIdNew(onlineArchiving.getReportId());
+
+        return reportData;
+    }
+    /**
+     * 根据报告纸质归档id查询信息
+     * @param id
+     * @return
+     */
+    public CwProjectReportData queryByPaperArchivingId(String id) {
+
+        CwProjectReportPaperArchiving paperArchiving = paperArchivingMapper.selectById(id);
+
+        CwProjectReportData reportData = reportMapper.queryByIdNew(paperArchiving.getReportId());
+        //查询委托方联系人信息
+        if (null != reportData) {
+            List<ProjectContactInfo> contactInfos = reportMapper.getContactInfos(reportData.getProjectId());
+            reportData.setContactInfos(contactInfos);
+            reportData.setConstructionParty(contactInfos);
+            //查询项目报告信息
+            List<ProjectReportInfo> projectReportInfos = reportMapper.getProjectReportInfo(reportData.getId());
+            reportData.setProjectReportInfos(projectReportInfos);
+        }
+
+        return reportData;
+    }
+
     public CwProjectReportData queryById(String id) {
 
         CwProjectReportData reportData = reportMapper.queryById(id);
@@ -3878,4 +4076,210 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 
 
     }
+
+    public List<ProjectContactInfo> getContactInfos(String projectId) {
+        return reportMapper.getContactInfos(projectId);
+    }
+
+    /**
+     * 将复核超期的数据状态改为超期未复核
+     * @return
+     */
+    public void updateQualityOverdueStatus() {
+        //查询所有的报告信息,生成复核数据,将复核数据的状态改为 超期未复核
+        List<String> reports = reportMapper.getAllInfo();
+        List<CwProjectReviewNew> reviewNews = reviewNewMapper.selectList(new QueryWrapper<CwProjectReviewNew>().eq("del_flag", "0"));
+        //去除掉 已经发起过复核的 报告id数据
+        /*for (CwProjectReviewNew reviewNew : reviewNews) {
+            for (int i = 0; i < reports.size(); i++) {
+                if (reviewNew.getReportId().equals(reports.get(i))) {
+                    reports.remove(i);
+                }
+            }
+        }*/
+        Iterator<String> iterator = reports.iterator();
+        while (iterator.hasNext()) {
+            String reportId = iterator.next();
+            for (CwProjectReviewNew reviewNew : reviewNews) {
+                if (reviewNew.getReportId().equals(reportId)) {
+                    iterator.remove(); // 使用迭代器删除元素
+                    break; // 找到匹配的报告ID后跳出内层循环
+                }
+            }
+        }
+        //添加复核数据,将状态改为6 超期未复核
+        for (int i = 0; i < reports.size(); i++) {
+            //生成主键id值
+            String id = UUID.randomUUID().toString().replace("-", "");
+            //获取当前登录人信息
+            UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+            //保存基本信息
+            CwProjectReviewNew info = new CwProjectReviewNew();
+
+            info.setId(id);
+            info.setCreateById(userDTO.getId());
+            info.setCreateTime(new Date());
+            info.setUpdateById(userDTO.getId());
+            info.setUpdateTime(new Date());
+            info.setReportId(reports.get(i));
+//            info.setMark("1");
+//            info.setReviewStatus("6");
+
+            reviewNewMapper.insert(info);
+        }
+        reportMapper.updateQualityOverdueStatus();
+    }
+
+    public void updateOnlineArchiveStatus() {
+        List<String> reports = reportMapper.getAllInfo();
+        List<CwProjectReportOnlineArchiving> onlineArchivings = onlineArchivingMapper.selectList(new QueryWrapper<CwProjectReportOnlineArchiving>().eq("del_flag", "0"));
+
+        //去除掉 已经在线归档过的的 报告id数据
+        /*for (CwProjectReportOnlineArchiving archiving : onlineArchivings) {
+            for (int i = 0; i < reports.size(); i++) {
+                if (archiving.getReportId().equals(reports.get(i))) {
+                    reports.remove(i);
+                }
+            }
+        }*/
+
+        Iterator<String> iterator = reports.iterator();
+        while (iterator.hasNext()) {
+            String reportId = iterator.next();
+            for (CwProjectReportOnlineArchiving archiving : onlineArchivings) {
+                if (archiving.getReportId().equals(reportId)) {
+                    iterator.remove(); // 使用迭代器删除元素
+                    break; // 找到匹配的报告ID后跳出内层循环
+                }
+            }
+        }
+
+        //添加复核数据,将状态改为6 超期未复核
+        for (int i = 0; i < reports.size(); i++) {
+            //生成主键id值
+            String id = UUID.randomUUID().toString().replace("-", "");
+            //获取当前登录人信息
+            UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+            //保存基本信息
+            CwProjectReportOnlineArchiving info = new CwProjectReportOnlineArchiving();
+
+            info.setId(id);
+            info.setCreateById(userDTO.getId());
+            info.setCreateTime(new Date());
+            info.setUpdateById(userDTO.getId());
+            info.setUpdateTime(new Date());
+            info.setReportId(reports.get(i));
+//            info.setMark("1");
+//            info.setStatus("6");
+
+            onlineArchivingMapper.insert(info);
+        }
+        reportMapper.updateOnlineArchiveStatus();
+    }
+
+    public void updatePaperArchiveStatus() {
+
+        List<String> reports = reportMapper.getAllInfo();
+        List<CwProjectReportPaperArchiving> paperArchivings = paperArchivingMapper.selectList(new QueryWrapper<CwProjectReportPaperArchiving>().eq("del_flag", "0"));
+
+        //去除掉 已经在线归档过的的 报告id数据
+        /*for (CwProjectReportPaperArchiving archiving : paperArchivings) {
+            for (int i = 0; i < reports.size(); i++) {
+                if (archiving.getReportId().equals(reports.get(i))) {
+                    reports.remove(i);
+                }
+            }
+        }*/
+
+        Iterator<String> iterator = reports.iterator();
+        while (iterator.hasNext()) {
+            String reportId = iterator.next();
+            for (CwProjectReportPaperArchiving archiving : paperArchivings) {
+                if (archiving.getReportId().equals(reportId)) {
+                    iterator.remove(); // 使用迭代器删除元素
+                    break; // 找到匹配的报告ID后跳出内层循环
+                }
+            }
+        }
+
+        //添加复核数据,将状态改为6 超期未复核
+        for (int i = 0; i < reports.size(); i++) {
+            //生成主键id值
+            String id = UUID.randomUUID().toString().replace("-", "");
+            //获取当前登录人信息
+            UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+            //保存基本信息
+            CwProjectReportPaperArchiving info = new CwProjectReportPaperArchiving();
+
+            info.setId(id);
+            info.setCreateById(userDTO.getId());
+            info.setCreateTime(new Date());
+            info.setUpdateById(userDTO.getId());
+            info.setUpdateTime(new Date());
+            info.setReportId(reports.get(i));
+
+            paperArchivingMapper.insert(info);
+        }
+        reportMapper.updateOnlineArchiveStatus();
+    }
+
+    /**
+     * 根据id查询项目报告信息
+     * @param id
+     * @return
+     */
+    public List<ProjectReportInfo> getProjectReportInfo(String id) {
+        return reportMapper.getProjectReportInfo(id);
+    }
+
+    /**
+     * 归档信息导出
+     * @return
+     */
+    public List<ArchivedReportInfo> archivedInfoExport(CwProjectReportData reportData) {
+        QueryWrapper<ArchivedReportInfo> queryWrapper = new QueryWrapper<>();
+        QueryWrapper<ArchivedReportInfo> queryWrapperNew = new QueryWrapper<>();
+        queryWrapper.eq("a.del_flag",0);
+        queryWrapper.eq("dictVal.del_flag",0);
+        queryWrapperNew.eq("a.del_flag",0);
+        queryWrapperNew.eq("dictVal.del_flag",0);
+
+        String[] contractDates = reportData.getContractDates();
+        if (contractDates != null) {
+
+            queryWrapper.between("a.create_time", contractDates[0], contractDates[1]);
+            queryWrapperNew.between("a.create_time", contractDates[0], contractDates[1]);
+        }
+        List<ArchivedReportInfo> archivedReportInfo = new ArrayList<>();
+        if (null != reportData.getArchivingStatus()) {
+            if (reportData.getArchivingStatus().length == 1 && reportData.getArchivingStatus()[0].equals("0")) {
+                queryWrapper.isNull("roa.status");
+            } else if (reportData.getArchivingStatus().length == 0){
+                queryWrapper.eq("roa.status",reportData.getArchivingStatus()[0]);
+            } else {
+                boolean containsZero = false;
+                List<String> nonZeroStatusList = new ArrayList<>();
+                for (String status : reportData.getArchivingStatus()) {
+                    if ("0".equals(status)) {
+                        containsZero = true;
+                    } else {
+                        nonZeroStatusList.add(status);
+                    }
+                }
+                queryWrapper.in("roa.status",nonZeroStatusList);
+
+                //单独处理
+                if (containsZero) {
+
+                    queryWrapperNew.isNull("roa.status");
+                    archivedReportInfo = reportMapper.archivedInfoExport(queryWrapperNew);
+
+                }
+            }
+
+        }
+        List<ArchivedReportInfo> archivedReportInfos = reportMapper.archivedInfoExport(queryWrapper);
+        archivedReportInfos.addAll(archivedReportInfo);
+        return archivedReportInfos;
+    }
 }

+ 127 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportSignAndIssueService.java

@@ -0,0 +1,127 @@
+package com.jeeplus.finance.projectReport.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
+import com.jeeplus.finance.projectReport.domain.CwProjectReportSignAndIssue;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNew;
+import com.jeeplus.finance.projectReport.domain.CwProjectReviewNewTeam;
+import com.jeeplus.finance.projectReport.mapper.CwProjectReportSignAndIssueMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-25 14:00
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+@Component
+public class CwProjectReportSignAndIssueService extends ServiceImpl<CwProjectReportSignAndIssueMapper, CwProjectReportSignAndIssue> {
+
+    @Resource
+    private CwProjectReportSignAndIssueMapper signAndIssueMapper;
+
+    /**
+     * 修改状态
+     * @param data
+     * @return
+     */
+    public String updateStatusByReportId(CwProjectReportData data) {
+        signAndIssueMapper.updateStatusById(data.getId(),data.getStatus());
+        return "操作成功";
+    }
+
+    public CwProjectReportData queryByReportId(String id) {
+        CwProjectReportSignAndIssue signAndIssue = signAndIssueMapper.selectOne(new QueryWrapper<CwProjectReportSignAndIssue>().eq("report_id", id));
+        CwProjectReportData data = new CwProjectReportData();
+        if (null != signAndIssue) {
+
+            BeanUtils.copyProperties(signAndIssue, data);
+        }
+
+        return data;
+    }
+
+    /**
+     * 保存项目以及其他相关信息
+     * @param reportData
+     * @return
+     * @throws Exception
+     */
+    public String saveForm(CwProjectReportData reportData) throws Exception{
+        if (StringUtils.isNotEmpty(reportData.getId())){
+
+            CwProjectReportSignAndIssue signAndIssue = signAndIssueMapper.selectById(reportData.getSignAndIssueId());
+            if (signAndIssue != null){
+                reportData.setCreateBy(reportData.getCreateBy());
+                return update(reportData,signAndIssue);
+            }
+        }
+        return add(reportData);
+
+    }
+
+    /**
+     * 合同登记修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public String update(CwProjectReportData reportData,CwProjectReportSignAndIssue signAndIssue) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        CwProjectReportSignAndIssue review = new CwProjectReportSignAndIssue();
+        BeanUtils.copyProperties(reportData, review);
+        review.setUpdateById(userDTO.getId());
+        review.setUpdateTime(new Date());
+        review.setId(reportData.getSignAndIssueId());
+        if (null == review.getIssueCompleteTime()) {
+            review.setIssueCompleteTime(new Date());
+        }
+
+        signAndIssueMapper.updateById(review);
+
+        return review.getId();
+    }
+
+    public String add(CwProjectReportData dto) throws Exception{
+
+
+        //生成主键id值
+        String id = UUID.randomUUID().toString().replace("-", "");
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        //保存基本信息
+        CwProjectReportSignAndIssue info = new CwProjectReportSignAndIssue();
+        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());
+
+        signAndIssueMapper.insert(info);
+
+        return info.getId();
+    }
+
+    public ResponseEntity deleteById(String id) {
+        signAndIssueMapper.deleteById(id);
+        return ResponseEntity.ok ("删除成功");
+    }
+}

+ 22 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/dto/ProjectContactInfo.java

@@ -0,0 +1,22 @@
+package com.jeeplus.finance.projectReport.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-01-31 15:08
+ */
+@Data
+public class ProjectContactInfo extends BaseDTO {
+
+    //委托方
+    private String clientContactsName;
+    //联系人姓名
+    private String name;
+    //联系方式1
+    private String contactFirst;
+    //联系方式2
+    private String contactSecond;
+}

+ 29 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/dto/ProjectReportInfo.java

@@ -0,0 +1,29 @@
+package com.jeeplus.finance.projectReport.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2024-02-20 9:21
+ */
+@Data
+public class ProjectReportInfo extends BaseDTO {
+
+    /**
+     * 报告编号
+     */
+    private String reportNo;
+
+    /**
+     * 报告名称
+     */
+    private String projectName;
+
+    private Date createTime;
+
+    private String status;
+}

+ 5 - 5
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/domain/ProgramProjectListInfo.java

@@ -27,26 +27,26 @@ public class ProgramProjectListInfo {
     @TableField(fill = FieldFill.INSERT)
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     @Excel(name = "创建时间", width = 30, orderNum = "6")
-    private Date createDate;
+    private Date createTime;
 
     /**
      * 创建人
      */
-    @Query(tableColumn = "a.create_by")
+    @Query(tableColumn = "a.create_by_id")
     @TableField(fill = FieldFill.INSERT)
-    private String createBy;
+    private String createById;
 
     /**
      * 更新日期
      */
     @TableField(fill = FieldFill.INSERT_UPDATE)
-    private Date updateDate;
+    private Date updateTime;
 
     /**
      * 更新人
      */
     @TableField(fill = FieldFill.INSERT_UPDATE)
-    private String updateBy;
+    private String updateById;
 
     /**
      * 逻辑删除标记

+ 25 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/FreemarkerUtil.java

@@ -0,0 +1,25 @@
+package com.jeeplus.finance.utils;
+
+import freemarker.template.Template;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.Map;
+
+public class FreemarkerUtil {
+    public static void generateFile(Map<?, ?> dataMap, Template template, File file){
+
+        Template t = template;
+        try {
+            // 这个地方不能使用FileWriter因为需要指定编码类型否则生成的Word文档会因为有无法识别的编码而无法打开
+            Writer w = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
+            t.process(dataMap, w);
+            w.close();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException(ex);
+        }
+    }
+}

+ 61 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/ResponseUtil.java

@@ -0,0 +1,61 @@
+package com.jeeplus.finance.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.Calendar;
+
+public class ResponseUtil {
+    private static Logger logger = LoggerFactory.getLogger(ResponseUtil.class);
+
+    public static void docResponse(String fileName, File file, HttpServletResponse response) {
+        ServletOutputStream out = null;
+        FileInputStream fin = null;
+        try {
+            fin = new FileInputStream(file);
+            response.setCharacterEncoding("utf-8");
+            response.setContentType("application/octet-stream; charset=UTF-8");
+            // 设置浏览器以下载的方式处理该文件名
+            response.setHeader("Content-Disposition", "attachment;filename="
+                    .concat(String.valueOf(URLEncoder.encode(fileName, "UTF-8"))));
+            out = response.getOutputStream();
+            byte[] buffer = new byte[1024];  // 缓冲区
+            int bytesToRead = -1;
+            // 通过循环将读入的Word文件的内容输出到浏览器中
+            while ((bytesToRead = fin.read(buffer)) != -1) {
+                out.write(buffer, 0, bytesToRead);
+            }
+        } catch (Exception e) {
+            logger.error("导出模板文件发生错误!",e);
+        } finally {
+            try {
+                out.flush();
+                if (fin != null) fin.close();
+                if (out != null) out.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+
+        }
+    }
+
+
+    /**
+     * 获取当前时间年月日
+     * @return
+     */
+    public static String datePath(){
+        Calendar date = Calendar.getInstance();
+        String year = String.valueOf(date.get(Calendar.YEAR));
+        String month = String.valueOf(date.get(Calendar.MONTH)+1);
+        String day = String.valueOf(date.get(Calendar.DAY_OF_MONTH));
+        String path = "/"+year+"/"+month+"/"+day;
+        return path;
+    }
+}

+ 221 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/controller/WorkClientController.java

@@ -0,0 +1,221 @@
+package com.jeeplus.finance.workClientInfo.controller;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.finance.workClientInfo.domain.WorkClientInfo;
+import com.jeeplus.finance.workClientInfo.domain.dto.WorkClientInfosDto;
+import com.jeeplus.finance.workClientInfo.service.WorkClientService;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+//import com.jeeplus.sys.utils.TicketQueryUtils;
+//import com.jeeplus.sys.utils.UserUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Api(tags ="workClientInfo")
+@RestController
+@RequestMapping(value = "/workClientInfo/workClientInfo")
+public class WorkClientController {
+
+    @Resource
+    private WorkClientService workClientService;
+
+    /**
+     * 客户信息列表
+     */
+    @ApiOperation(value = "客户信息列表")
+    @GetMapping(value = "list")
+    public ResponseEntity<IPage<WorkClientInfo>> list(WorkClientInfo workClientInfo, Page<WorkClientInfo> page) throws Exception {
+        QueryWrapper<WorkClientInfo> workClientInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(workClientInfo, WorkClientInfo.class);
+        if (ObjectUtil.isNotEmpty(workClientInfo)) {
+            if (ObjectUtil.isNotEmpty(workClientInfo.getCreateDates())) {
+                workClientInfoQueryWrapper.between("a.create_time",workClientInfo.getCreateDates()[0], workClientInfo.getCreateDates()[1]);
+            }
+            if (StringUtils.isNotBlank(workClientInfo.getCreateById())) {
+                workClientInfoQueryWrapper.eq("a.create_by_id",workClientInfo.getCreateById());
+            }
+        }
+        IPage<WorkClientInfo> list = workClientService.list(page,workClientInfoQueryWrapper);
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        Integer postCount = 0;
+        if(null != userDTO && StringUtils.isNotBlank(userDTO.getId())){
+            //查询当前用户是否存在部门主任岗位信息(部门主任可调整所有客户信息)
+            postCount = SpringUtil.getBean ( IUserApi.class ).getUserPostCountById(userDTO.getId());
+        }
+        //判定当前登录人是否为部门主任
+        for (WorkClientInfo info: list.getRecords()) {
+            if(userDTO.getName().equals(info.getCreateById()) || userDTO.isAdmin() || postCount > 0){
+                info.setCreateFlag("1");
+            }else{
+                info.setCreateFlag("0");
+            }
+        }
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 客户信息新增/修改
+     */
+    @ApiOperation(value = "客户信息新增/修改")
+    @PostMapping(value = "save")
+    public ResponseEntity save(@RequestBody WorkClientInfosDto workClientInfosDto) {
+        if(ObjectUtil.isNotEmpty(workClientInfosDto)){
+            if(ObjectUtil.isNotEmpty(workClientInfosDto.getWorkClientInfo())){
+                if(StringUtils.isBlank(workClientInfosDto.getWorkClientInfo().getName())){
+                    return ResponseEntity.badRequest().body("保存信息失败,没有获取到用户名称");
+                }
+                if(!workClientService.haveWorkClient(workClientInfosDto)){
+                    return ResponseEntity.badRequest().body("用户已存在,保存失败");
+                }
+                if(!workClientService.haveUscCode(workClientInfosDto)){
+                    return ResponseEntity.badRequest().body("统一社会信用代码已存在,保存失败");
+                }
+                if(StringUtils.isNotBlank(workClientInfosDto.getWorkClientInfo().getId())){
+                    return ResponseEntity.ok(workClientService.update(workClientInfosDto));
+                }else{
+                    return ResponseEntity.ok(workClientService.save(workClientInfosDto));
+                }
+            }else{
+                return ResponseEntity.badRequest().body("保存信息失败,没有获取到数据");
+            }
+        }
+        return ResponseEntity.badRequest().body("保存信息失败,没有获取到数据");
+    }
+
+    /**
+     * 新建或修改  判断统一社会信用代码是否重复
+     */
+    @ApiOperation(value = "判断统一社会信用代码是否重复")
+    @GetMapping(value = "haveUscCode")
+    public boolean haveUscCode(@RequestParam String id,@RequestParam String uscCode) {
+        WorkClientInfosDto workClientInfosDto = new WorkClientInfosDto();
+        WorkClientInfo workClientInfo = new WorkClientInfo();
+        workClientInfo.setId(id);
+        workClientInfo.setUscCode(uscCode);
+        workClientInfosDto.setWorkClientInfo(workClientInfo);
+        return workClientService.haveUscCode(workClientInfosDto);
+    }
+
+    /**
+     * 新建或修改  判断客户是否重复
+     */
+    @ApiOperation(value = "判断客户是否重复")
+    @GetMapping(value = "haveWorkClient")
+    public boolean haveWorkClient(@RequestParam String id,@RequestParam String name) {
+        WorkClientInfosDto workClientInfosDto = new WorkClientInfosDto();
+        WorkClientInfo workClientInfo = new WorkClientInfo();
+        workClientInfo.setId(id);
+        workClientInfo.setName(name);
+        workClientInfosDto.setWorkClientInfo(workClientInfo);
+        return workClientService.haveWorkClient(workClientInfosDto);
+    }
+
+    /**
+     * 客户信息删除
+     */
+    @ApiOperation(value = "客户信息删除")
+    @GetMapping(value = "remove")
+    public Map<String,Object> remove(@RequestParam String id) {
+        return workClientService.removeById(id);
+    }
+
+    /**
+     * 客户信息查询
+     */
+    @ApiOperation(value = "客户信息查询")
+    @GetMapping(value = "findById")
+    public WorkClientInfosDto findById(@RequestParam String id) {
+        return workClientService.findById(id);
+    }
+
+    /**
+     * 客户信息更新
+     */
+    @ApiOperation(value = "客户信息更新")
+    @PostMapping(value = "update")
+    public String update(@RequestBody WorkClientInfosDto workClientInfosDto) {
+        return workClientService.update(workClientInfosDto);
+    }
+
+    /**
+     * 根据名称模糊搜索客户信息
+     */
+    @ApiOperation(value = "根据名称模糊搜索客户信息")
+    @GetMapping(value = "findListByName")
+    public List<WorkClientInfo> findListByName(@RequestParam String name) {
+        return workClientService.findListByName(name);
+    }
+
+    /**
+     * 根据关键字查询相关企业
+     * @param keyword
+     * @return
+     */
+    @ApiOperation(value = "根据关键字查询相关企业")
+    @PostMapping("enterpriseSearchByName")
+    public String enterpriseSearchByName(@RequestParam String keyword){
+        if(StringUtils.isBlank(keyword)){
+            return null;
+        }
+        return  SpringUtil.getBean ( IUserApi.class ).enterpriseSearchByName(keyword);
+    }
+
+    /**
+     * 根据id查询企业税号
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询企业税号")
+    @PostMapping("enterpriseTicketInfo")
+    public Object enterpriseTicketInfo(String id){
+        if(StringUtils.isBlank(id)){
+            return null;
+        }
+        return SpringUtil.getBean ( IUserApi.class ).enterpriseTicketInfoQueryById(id);
+    }
+
+    /**
+     * 根据名称、统一社会信用代码判断是否存在
+     */
+    @ApiOperation(value = "根据名称、统一社会信用代码判断是否存在")
+    @GetMapping(value = "isExist")
+    public Integer isExist(@RequestParam String param) {
+        return workClientService.isExist(param);
+    }
+
+    /**
+     * 客户信息列表-组件使用
+     */
+    @ApiOperation(value = "客户信息列表-组件使用")
+    @GetMapping(value = "componentList")
+    public ResponseEntity<IPage<WorkClientInfo>> componentList(WorkClientInfo workClientInfo, Page<WorkClientInfo> page) throws Exception {
+        QueryWrapper<WorkClientInfo> workClientInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(workClientInfo, WorkClientInfo.class);
+        IPage<WorkClientInfo> list = workClientService.componentList(page,workClientInfoQueryWrapper);
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 客户信息查询-组件使用
+     */
+    @ApiOperation(value = "客户信息查询-组件使用")
+    @GetMapping(value = "componentById")
+    public WorkClientInfo componentById(@RequestParam String id) {
+        return workClientService.componentById(id);
+    }
+}

+ 10 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/CwWorkClientBase.java

@@ -2,7 +2,9 @@ package com.jeeplus.finance.workClientInfo.domain;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.core.query.Query;
@@ -18,6 +20,14 @@ import lombok.Data;
 public class CwWorkClientBase extends BaseEntity {
 
     /**
+     * 代表方
+     */
+    @TableField(exist = false)
+    private List<String> representativePartys;
+
+    private String representativeParty;
+
+    /**
      * 备注信息
      */
     private String remarks;

+ 31 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientBank.java

@@ -0,0 +1,31 @@
+package com.jeeplus.finance.workClientInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName("work_client_bank")
+public class WorkClientBank extends BaseEntity {
+
+    /**
+     * 开户银行
+     */
+    private String ourBank;
+
+    /**
+     * 开户账号
+     */
+    private String bankNumber;
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 外键关联客户信息表
+     */
+    private String clientId;
+
+}

+ 161 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientInfo.java

@@ -0,0 +1,161 @@
+package com.jeeplus.finance.workClientInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.query.Query;
+import com.jeeplus.core.query.QueryType;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 客户管理Entity
+ */
+@Data
+@TableName("work_client_info")
+public class WorkClientInfo extends BaseEntity {
+
+    /**
+     * 客户名称
+     */
+    @Query(tableColumn = "a.name")
+    private String name;
+
+    /**
+     * 法人代表
+     */
+    private String lawerPresint;
+
+    /**
+     * 组织机构代码
+     */
+    private String orUnicode;
+
+    /**
+     * 客户性质
+     */
+    @Query
+    private String companyType;
+
+    /**
+     * 客户行业
+     */
+    @Query
+    private String companyIndustry;
+
+    /**
+     * 客户类型
+     */
+    @Query
+    private String clientType;
+
+    /**
+     * 信用等级
+     */
+    private String creditRank;
+
+    /**
+     * 地区Id
+     */
+    @Query(type = QueryType.EQ)
+    private String areaId;
+
+    /**
+     * 地区名称
+     */
+    @TableField(exist = false)
+    private String areaName;
+
+    /**
+     * 邮政编码
+     */
+    private String zipCode;
+
+    /**
+     * 传真
+     */
+    private String fax;
+
+    /**
+     * 税务号
+     */
+    private String taxId;
+
+    /**
+     * 电子邮箱
+     */
+    private String email;
+
+    /**
+     * 详细地址
+     */
+    private String address;
+
+    /**
+     * 注册地址
+     */
+    private String registerAddress;
+
+    /**
+     * 公司网址
+     */
+    private String companyUrl;
+
+    /**
+     * 单位简介
+     */
+    private String remarks;
+
+    /**
+     * 创建人所属公司id
+     */
+    private String companyId;
+
+    /**
+     * 创建人所属部门id
+     */
+    private String officeId;
+
+    /**
+     * 地区父节点
+     */
+    private String areaParentIds;
+
+    /**
+     * 公司电话
+     */
+    private String telephone;
+
+    /**
+     * 是否拥有统一社会信用代码  1:有,2无
+     */
+    private Integer hasUscc;
+
+    /**
+     * 统一社会信用代码
+     */
+    @Query
+    private String uscCode;
+
+    /**
+     * 客户编号
+     */
+    private String number;
+
+    /**
+     * 代表方(以逗号分割)
+     */
+    @TableField(exist = false)
+    @Query(type = QueryType.EQ, tableColumn = "f.job_type_id")
+    private String deputy;
+
+    @TableField(exist = false)
+    private String[] createDates;
+
+    @TableField(exist = false)
+    private String createFlag;  //创建状态
+
+    @TableField(exist = false)
+    private List<WorkClientBank> backs;
+}

+ 14 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientJobTypeInfo.java

@@ -0,0 +1,14 @@
+package com.jeeplus.finance.workClientInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+@Data
+@TableName("work_client_job_type_info")
+public class WorkClientJobTypeInfo {
+
+    private String workClientId;
+
+    private String jobTypeId;
+
+}

+ 56 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/domain/WorkClientLinkman.java

@@ -0,0 +1,56 @@
+package com.jeeplus.finance.workClientInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName("work_client_linkman")
+public class WorkClientLinkman extends BaseEntity {
+
+    /**
+     * 联系人姓名
+     */
+    private String name;
+
+    /**
+     * 部门
+     */
+    private String office;
+
+    /**
+     * 职务
+     */
+    private String position;
+
+    /**
+     * QQ
+     */
+    private String qq;
+
+    /**
+     * 联系人电话
+     */
+    private String linkPhone;
+
+    /**
+     * 联系人手机
+     */
+    private String linkMobile;
+
+    /**
+     * E-mail
+     */
+    private String email;
+
+    /**
+     * 是否默认联系人
+     */
+    private String isDefault;
+
+    /**
+     * 外键关联客户信息表
+     */
+    private String clientId;
+
+}

+ 2 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/mapper/xml/CwWorkClientBaseMapper.xml

@@ -110,7 +110,8 @@
         cw_wcb.is_usc_code,
         cw_wcb.update_request_id,
         cw_wcb.update_user,
-        cw_wcb.request_user_id
+        cw_wcb.request_user_id,
+        cw_wcb.representative_party
     </sql>
     <sql id="File_Column_List">
         wa.id,

+ 17 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/CwWorkClientService.java

@@ -46,10 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.sql.Array;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
@@ -231,6 +228,10 @@ public class CwWorkClientService extends ServiceImpl<CwWorkClientBaseMapper, CwW
     public CwWorkClientBaseDTO queryById(String id) {
 
         CwWorkClientBaseDTO cwWorkClientBaseDTO = cwWorkClientBaseMapper.queryById(id);
+        if (StringUtils.isNotBlank(cwWorkClientBaseDTO.getRepresentativeParty())){
+            List<String> representativePartyList = Arrays.asList(cwWorkClientBaseDTO.getRepresentativeParty().split(","));
+            cwWorkClientBaseDTO.setRepresentativePartys(representativePartyList);
+        }
 
         return cwWorkClientBaseDTO;
     }
@@ -242,6 +243,18 @@ public class CwWorkClientService extends ServiceImpl<CwWorkClientBaseMapper, CwW
             }
         }
         CwWorkClientBase cwWorkClientBase = CwWorkClientBaseWrapper.INSTANCE.toEntity(cwWorkClientBaseDTO);
+        if (null == cwWorkClientBase.getRepresentativeParty()) {
+            StringBuilder builder = new StringBuilder();
+            for (int i = 0; i < cwWorkClientBaseDTO.getRepresentativePartys().size(); i++) {
+                if (i > 0) {
+                    builder.append(",");
+                }
+                builder.append(cwWorkClientBaseDTO.getRepresentativePartys().get(i));
+            }
+            String value = builder.toString();
+
+            cwWorkClientBase.setRepresentativeParty(value);
+        }
         if(ObjectUtil.isNotEmpty(cwWorkClientBase)){
             if(StringUtils.isBlank(cwWorkClientBase.getId())){
                 UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());

+ 7 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/dto/CwWorkClientBaseDTO.java

@@ -25,6 +25,13 @@ public class CwWorkClientBaseDTO extends BaseDTO {
     public static final String BIZ_CODE = "11";
 
     /**
+     * 代表方
+     */
+    private List<String> representativePartys;
+
+    private String representativeParty;
+
+    /**
      * 客户分类表id
      */
     private String clientId;

BIN
jeeplus-modules/jeeplus-finance/src/main/resources/dot/批量归档导入模板.xlsx


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

@@ -1182,7 +1182,7 @@ public class UserController {
     @ApiLog("获取财务部门用户数据")
     @GetMapping("treeUserDataFinanceOffice")
     public ResponseEntity treeUserDataFinanceOffice(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
-        officeName = "ccpm项目子公司";
+        officeName = "苏州分公司";
         List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
         if(list.size()>0){
             List<String> officeIds = Lists.newArrayList();
@@ -1335,9 +1335,9 @@ public class UserController {
     public ResponseEntity treeFinanceOffice(@RequestParam(required = false) String tenantId,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
         UserDTO userDTO = UserUtils.getCurrentUserDTO();
         String id = userDTO.getTenantDTO().getId();
-        if(id.equals("10005")){
-            String officeName="ccpm项目子公司";
-            List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
+        if(id.equals("10003")){
+//            String officeName="苏州分公司";
+            List<OfficeDTO> list = officeService.getOfficeAllByOfficeName ("");
             if(list.size()>0){
                 List<String> officeIds = Lists.newArrayList();
                 for (OfficeDTO info : list) {
@@ -1366,8 +1366,8 @@ public class UserController {
             List rootTree = officeService.getFinanceTree (objects1, extId, type, showAll, "1");
             return ResponseEntity.ok (rootTree);
         }else if (id.equals("10002")){
-            String officeName="ccpm项目子公司";
-            List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
+//            String officeName="苏州分公司";
+            List<OfficeDTO> list = officeService.getOfficeAllByOfficeName ("");
             if(list.size()>0){
                 List<String> officeIds = Lists.newArrayList();
                 for (OfficeDTO info : list) {
@@ -1397,7 +1397,7 @@ public class UserController {
             return ResponseEntity.ok (rootTree);
 
         }else if (id.equals("10006")){
-            String officeName="ccpm项目子公司";
+            String officeName="苏州分公司";
             List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
             if(list.size()>0){
                 List<String> officeIds = Lists.newArrayList();
@@ -1428,7 +1428,7 @@ public class UserController {
             return ResponseEntity.ok (rootTree);
 
         }else if (id.equals("10004")){
-            String officeName="ccpm项目子公司";
+            String officeName="苏州分公司";
             List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
             if(list.size()>0){
                 List<String> officeIds = Lists.newArrayList();
@@ -1459,7 +1459,7 @@ public class UserController {
             return ResponseEntity.ok (rootTree);
 
         }else {
-            String officeName="ccpm项目子公司";
+            String officeName="苏州分公司";
             List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
             if(list.size()>0){
                 List<String> officeIds = Lists.newArrayList();

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

@@ -78,7 +78,7 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
             if (userDTO.getCompanyDTO().getName().contains("评估")) {
                 queryWrapper.like ( "a.name", "%评估%" );
             }else if (userDTO.getCompanyDTO().getName().contains("会计")){
-                //获取ccpm项目子公司的子集id
+                //获取苏州分公司的子集id
                 List<String> ids = baseMapper.getIds(userDTO.getCompanyDTO().getId());
                 ids.add(userDTO.getCompanyDTO().getId());
                 queryWrapper.in ( "a.id", ids );
@@ -248,7 +248,7 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
         List<Office> children = new ArrayList<>();
         UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
         if (!SecurityUtils.getCurrentUserDTO ( ).isAdmin ( )){
-            if (userDTO.getCompanyDTO().getName().contains("评估")||userDTO.getCompanyDTO().getName().contains("会计")){
+            if (userDTO.getCompanyDTO().getName().contains("子公司")||userDTO.getCompanyDTO().getName().contains("综合管理")){
                 children = officeMapper.getChildren(OfficeDTO.getRootId(),userDTO.getCompanyDTO().getId());
             } else {
                 children = officeMapper.getChildren(OfficeDTO.getRootId(),"");

+ 31 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

@@ -48,6 +48,37 @@ import java.util.stream.Collectors;
 public class SampleXxlJob {
     private static Logger logger = LoggerFactory.getLogger ( SampleXxlJob.class );
 
+
+    /**
+     * 修改质量复核超期状态
+     */
+    @XxlJob("qualityOverdue")
+    public void qualityOverdue() throws Exception {
+        //查询所有的有报告号的 报告信息 60天后定义为超期(修改状态改为超期未复核)
+        SpringUtil.getBean ( FinanceFeignApi.class ).updateQualityOverdueStatus();
+
+    }
+
+    /**
+     * 修改在线归档超期状态
+     */
+    @XxlJob("onlineArchive")
+    public void onlineArchive() throws Exception {
+        //查询所有的有报告号的 报告信息 60天后定义为超期(修改状态改为超期未复核)
+        SpringUtil.getBean ( FinanceFeignApi.class ).updateOnlineArchiveStatus();
+
+    }
+
+    /**
+     * 修改纸质归档超期状态
+     */
+    @XxlJob("paperArchive")
+    public void paperArchive() throws Exception {
+        //查询所有的有报告号的 报告信息 60天后定义为超期(修改状态改为超期未归档)
+        SpringUtil.getBean ( FinanceFeignApi.class ).updatePaperArchiveStatus();
+
+    }
+
     /**
      * 1、简单任务示例(Bean模式)
      */