Browse Source

11482-【CR】【投资系统】增加审批流程-项目投决

hxy 3 months ago
parent
commit
1108ff5f50
25 changed files with 7405 additions and 177 deletions
  1. 0 15
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ApprovalController.java
  2. 129 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/DecisionController.java
  3. 58 0
      ruoyi-flowable/src/main/java/com/ruoyi/flowable/listener/DecisionTaskListener.java
  4. 45 0
      ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IDecisionService.java
  5. 387 0
      ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/DecisionServiceImpl.java
  6. 9 0
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectDecision.java
  7. 13 0
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/dto/DecisionDto.java
  8. 199 0
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/vo/ProjectDecisionVo.java
  9. 29 0
      ruoyi-system/src/main/java/com/ruoyi/invest/mapper/DecisionMapper.java
  10. 189 0
      ruoyi-system/src/main/resources/mapper/invest/DecisionMapper.xml
  11. 4 0
      ruoyi-system/src/main/resources/mapper/invest/TProjectDecisionMapper.xml
  12. 96 0
      ruoyi-ui/src/api/project/decision/pool.js
  13. 38 0
      ruoyi-ui/src/router/index.js
  14. 3 8
      ruoyi-ui/src/views/project/approval/audit.vue
  15. 6 28
      ruoyi-ui/src/views/project/approval/detail.vue
  16. 2 69
      ruoyi-ui/src/views/project/approval/edit.vue
  17. 1 49
      ruoyi-ui/src/views/project/approval/list.vue
  18. 4 4
      ruoyi-ui/src/views/project/approval/meetingList.vue
  19. 587 0
      ruoyi-ui/src/views/project/decision/applyList.vue
  20. 2069 0
      ruoyi-ui/src/views/project/decision/audit.vue
  21. 333 0
      ruoyi-ui/src/views/project/decision/detail.vue
  22. 385 0
      ruoyi-ui/src/views/project/decision/edit.vue
  23. 1081 0
      ruoyi-ui/src/views/project/decision/myTask.vue
  24. 11 4
      ruoyi-ui/src/views/project/flowBase.vue
  25. 1727 0
      ruoyi-ui/src/views/project/meetingList.vue

+ 0 - 15
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ApprovalController.java

@@ -38,21 +38,6 @@ public class ApprovalController extends BaseController {
     @Autowired
     private IApprovalService approvalService;
 
-    @Autowired
-    private ITProjectCompanyService tProjectCompanyService;
-
-    @Autowired
-    private ITProjectContactsService tProjectContactsService;
-
-    @Autowired
-    private ITProjectCirculationService tProjectCirculationService;
-
-    @Autowired
-    private ITUnifyFileService tUnifyFileService;
-
-    @Autowired
-    private ITProjectPoolService tProjectPoolService;
-
 
     //我的待办任务
     @ApiOperation("我的待办任务列表")

+ 129 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/DecisionController.java

@@ -0,0 +1,129 @@
+package com.ruoyi.web.controller.project;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.flowable.service.IApprovalService;
+import com.ruoyi.flowable.service.IDecisionService;
+import com.ruoyi.invest.domain.*;
+import com.ruoyi.invest.domain.dto.ApprovalDto;
+import com.ruoyi.invest.domain.dto.DecisionDto;
+import com.ruoyi.invest.domain.vo.ProjectApprovalVo;
+import com.ruoyi.invest.domain.vo.ProjectDecisionVo;
+import com.ruoyi.invest.service.ITProjectCirculationService;
+import com.ruoyi.invest.service.ITProjectCompanyService;
+import com.ruoyi.invest.service.ITProjectContactsService;
+import com.ruoyi.invest.service.ITProjectPoolService;
+import com.ruoyi.tool.service.ITUnifyFileService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * 项目立项Controller
+ * 
+ * @author ruoyi
+ * @date 2025-08-08
+ */
+@Api(tags = "项目投决")
+@RestController
+@RequestMapping("/project/decision")
+public class DecisionController extends BaseController {
+    @Autowired
+    private IDecisionService decisionService;
+
+
+    //我的待办任务
+    @ApiOperation("我的待办任务列表")
+    @PreAuthorize("@ss.hasPermi('invest:pool:list')")
+    @GetMapping("/getMyTaskList")
+    public TableDataInfo getMyTaskList(TProjectDecision tProjectDecision)
+    {
+        startPage();
+        //tProjectPool.setProjectStage("1");
+        List<ProjectDecisionVo> list=decisionService.getMyTaskList(getUserId().toString(),tProjectDecision);
+        return getDataTable(list);
+    }
+    //我的已办任务
+    @ApiOperation("我的已办任务列表")
+    @PreAuthorize("@ss.hasPermi('invest:pool:list')")
+    @GetMapping("/getMyDoneTaskList")
+    public TableDataInfo getMyDoneTaskList(TProjectDecision tProjectDecision)
+    {
+        startPage();
+        //tProjectPool.setProjectStage("1");
+        List<ProjectDecisionVo> list=decisionService.getMyDoneTaskList(getUserId().toString(),tProjectDecision);
+        return getDataTable(list);
+    }
+    //我的待办任务
+    @ApiOperation("我的单据列表")
+    @PreAuthorize("@ss.hasPermi('invest:pool:list')")
+    @GetMapping("/getMyList")
+    public TableDataInfo getMyList(TProjectDecision tProjectDecision)
+    {
+        startPage();
+        //tProjectPool.setProjectStage("1");
+        List<ProjectDecisionVo> list=decisionService.getMyList(getUserId().toString(),tProjectDecision);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取项目池详细信息
+     */
+    @ApiOperation("获取项目池详细信息")
+    @PreAuthorize("@ss.hasPermi('invest:pool:query')")
+    @GetMapping(value = "/{pInstId}")
+    public AjaxResult getInfo(@PathVariable("pInstId") String pInstId)
+    {
+        return success(decisionService.selectTProjectDecisionByProcInstId(pInstId));
+    }
+    //发起流程
+    @ApiOperation(value = "投资机会申请发起流程")
+    @Log(title = "发起流程", businessType = BusinessType.INSERT)
+    @PostMapping("/start")
+    public AjaxResult start(@RequestBody TProjectDecision tProjectDecision) {
+
+       //return decisionService.set
+        return decisionService.start(tProjectDecision);
+    }
+    @ApiOperation(value = "审批任务")
+    @PutMapping(value = "/complete")
+    public AjaxResult complete(@RequestBody DecisionDto dto, HttpServletRequest request) {
+        // 从 DTO 中拆分参数
+        TProjectDecision tProjectDecision= dto.getProjectDecision();
+        TProjectMeeting tProjectMeeting = dto.getProjectMeeting();
+        TProjectScoring tProjectScoring =dto.getProjectScoring();
+        FlowBaseInfo flowBaseInfo= dto.getFlowBaseInfo();
+        return decisionService.complete(tProjectDecision,tProjectMeeting,tProjectScoring,flowBaseInfo,request);
+    }
+    /**
+     * 获取通过流程id会议记录详细信息 (会议投决)
+     */
+    @ApiOperation("获取会议记录详细信息")
+    @GetMapping(value = "/getMeetingInfo/{pInstId}")
+    public AjaxResult getMeetingInfo(@PathVariable("pInstId") String pInstId) {
+
+        return success(decisionService.selectTProjectMeetingByProcInstId(pInstId));
+    }
+    /**
+     * 根据流程Id查询汇总分数和平均分数 (总裁室)
+     */
+    @ApiOperation("根据会议ID查询汇总分数和平均分数")
+    @GetMapping(value = "/getSumScore/{pInstId}")
+    public AjaxResult getSumScore(@PathVariable("pInstId") String pInstId)
+    {
+        if (StringUtils.isEmpty(pInstId))
+        {
+            return error("查询打分数据'" + getNickName() + "'失败,请选择会议!");
+        }
+        return success(decisionService.selectSumScore(pInstId));
+    }
+}

+ 58 - 0
ruoyi-flowable/src/main/java/com/ruoyi/flowable/listener/DecisionTaskListener.java

@@ -0,0 +1,58 @@
+package com.ruoyi.flowable.listener;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.system.mapper.SysDeptMapper;
+import com.ruoyi.system.service.ISysUserService;
+import lombok.extern.slf4j.Slf4j;
+import org.flowable.engine.delegate.TaskListener;
+import org.flowable.task.service.delegate.DelegateTask;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 任务监听器
+ *
+ * create(创建):在任务被创建且所有的任务属性设置完成后才触发
+ * assignment(指派):在任务被分配给某个办理人之后触发
+ * complete(完成):在配置了监听器的上一个任务完成时触发
+ * delete(删除):在任务即将被删除前触发。请注意任务由completeTask正常完成时也会触发
+ *
+ * @author Tony
+ * @date 2021/4/20
+ */
+@Slf4j
+@Component
+public class DecisionTaskListener implements TaskListener{
+    private static ISysUserService sysUserService;
+    private static SysDeptMapper sysDeptMapper;
+    @Autowired
+    public void setSysUserService(ISysUserService sysUserService) {
+        DecisionTaskListener.sysUserService = sysUserService;
+    }
+    @Autowired
+    public void setSysDeptMapper(SysDeptMapper sysDeptMapper) {
+        DecisionTaskListener.sysDeptMapper = sysDeptMapper;
+    }
+    @Override
+    public void notify(DelegateTask delegateTask) {
+
+        log.info("任务监听器:{}", delegateTask);
+        // TODO  获取事件类型 delegateTask.getEventName(),可以通过监听器给任务执行人发送相应的通知消息
+        String eventName= delegateTask.getEventName();
+        String taskDefKey= delegateTask.getTaskDefinitionKey();
+        Object obj = delegateTask.getVariable("INITIATOR");
+        SysUser user = sysUserService.selectUserById((Long) obj);
+        if("deptLeader".equals(taskDefKey)) {//部门负责人、
+            //部门负责人
+            String leader=sysDeptMapper.selectDeptLeader("投资部");
+            SysUser leaderUser=sysUserService.selectUserByUserName(leader);
+            delegateTask.setAssignee(leaderUser.getUserId().toString());
+        }else if("meeting".equals(taskDefKey)){
+            delegateTask.setAssignee(user.getUserId().toString());
+        }else if("file".equals(taskDefKey)){
+            delegateTask.setAssignee(user.getUserId().toString());
+        }
+
+    }
+
+}

+ 45 - 0
ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IDecisionService.java

@@ -0,0 +1,45 @@
+package com.ruoyi.flowable.service;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.invest.domain.*;
+import com.ruoyi.invest.domain.vo.ProjectApprovalVo;
+import com.ruoyi.invest.domain.vo.ProjectDecisionVo;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 项目池Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+public interface IDecisionService
+{
+    List<ProjectDecisionVo> getMyTaskList(String userId, TProjectDecision tProjectDecision);
+    List<ProjectDecisionVo> getMyDoneTaskList(String userId, TProjectDecision tProjectDecision);
+    List<ProjectDecisionVo> getMyList(String userId,TProjectDecision tProjectDecision);
+
+    TProjectDecision selectTProjectDecisionByProcInstId(String pInstId);
+    /**
+     * 新增投决申请
+     *
+     * @param tProjectDecision 投决申请
+     * @return 结果
+     */
+
+    AjaxResult start(TProjectDecision tProjectDecision);
+    AjaxResult complete(TProjectDecision tProjectDecision, TProjectMeeting tProjectMeeting,TProjectScoring tProjectScoring, FlowBaseInfo flow, HttpServletRequest request);
+
+    TProjectMeeting selectTProjectMeetingByProcInstId(String pInstId);
+
+    /**
+     * 根据pInstId查询汇总分数和平均分数
+     * @param pInstId
+     * @return
+     */
+    Map<String,String> selectSumScore(String pInstId);
+
+
+}

+ 387 - 0
ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/DecisionServiceImpl.java

@@ -0,0 +1,387 @@
+package com.ruoyi.flowable.service.impl;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.enums.FileType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.sms.SmsSenderUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.flowable.common.constant.ProcessConstants;
+import com.ruoyi.flowable.common.constant.UUIDGenerator;
+import com.ruoyi.flowable.common.enums.FlowStatusEnum;
+import com.ruoyi.flowable.factory.FlowServiceFactory;
+import com.ruoyi.flowable.service.IApprovalService;
+import com.ruoyi.flowable.service.IDecisionService;
+import com.ruoyi.flowable.service.IFlowInstanceService;
+import com.ruoyi.flowable.service.IFlowService;
+import com.ruoyi.invest.domain.*;
+import com.ruoyi.invest.domain.vo.ProjectApprovalVo;
+import com.ruoyi.invest.domain.vo.ProjectDecisionVo;
+import com.ruoyi.invest.mapper.ApprovalMapper;
+import com.ruoyi.invest.mapper.DecisionMapper;
+import com.ruoyi.invest.mapper.TProjectPoolMapper;
+import com.ruoyi.invest.mapper.TProjectScoringMapper;
+import com.ruoyi.invest.service.*;
+import com.ruoyi.system.mapper.SysDeptMapper;
+import com.ruoyi.system.service.ISysUserService;
+import com.ruoyi.tool.service.ITUnifyFileService;
+import org.flowable.engine.repository.ProcessDefinition;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.flowable.task.api.Task;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * 项目池Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+@Service
+public class DecisionServiceImpl extends FlowServiceFactory implements IDecisionService
+{
+    @Autowired
+    private DecisionMapper decisionMapper;
+    @Autowired
+    private ITProjectDecisionService tProjectDecisionService;
+    @Autowired
+    private TProjectPoolMapper tProjectPoolMapper;
+    @Autowired
+    private ITProjectPoolService tProjectPoolService;
+
+    @Autowired
+    private ITProjectCompanyService tProjectCompanyService;
+
+    @Autowired
+    private ITProjectContactsService tProjectContactsService;
+
+    @Autowired
+    private ITProjectCirculationService tProjectCirculationService;
+
+    @Autowired
+    private ITUnifyFileService tUnifyFileService;
+
+    @Autowired
+    private IFlowBaseInfoService activitiBaseInfoService;
+    @Autowired
+    private IFlowInstanceService flowInstanceService;
+    @Autowired
+    private ISysUserService sysUserService;
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
+    @Autowired
+    private ITProjectReviewService tProjectReviewService;
+
+    @Autowired
+    private IFlowService flowService;
+    @Autowired
+    private ITProjectMeetingService tProjectMeetingService;
+    @Autowired
+    private ITProjectScoringService tProjectScoringService;
+    @Autowired
+    private TProjectScoringMapper tProjectScoringMapper;
+    @Override
+    public List<ProjectDecisionVo> getMyTaskList(String userId, TProjectDecision tProjectDecision){
+        return decisionMapper.getMyTaskList(userId, tProjectDecision);
+    }
+    @Override
+    public List<ProjectDecisionVo> getMyDoneTaskList(String userId, TProjectDecision tProjectDecision){
+        return decisionMapper.getMyDoneTaskList(userId, tProjectDecision);
+    }
+    @Override
+    public List<ProjectDecisionVo> getMyList(String userId,TProjectDecision tProjectDecision){
+        return decisionMapper.getMyList(userId, tProjectDecision);
+    }
+
+
+    /**
+     * 查询项目池
+     * 
+     * @param pInstId 流程实例Id
+     * @return 项目池
+     */
+    @Override
+    public TProjectDecision selectTProjectDecisionByProcInstId(String pInstId)
+    {
+        return decisionMapper.selectTProjectDecisionByProcInstId(pInstId);
+    }
+
+    @Override
+    public AjaxResult start(TProjectDecision tProjectDecision) {
+
+        // 根据key值获取最新的流程部署id
+        String pDefId = null;
+        ProcessInstance pInst = null;
+        try {
+            List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery()
+                    .processDefinitionKey("dgt-decision-workflow")
+                    .orderByProcessDefinitionVersion().desc().list();
+            if(list.size()==0){
+                return AjaxResult.error("未找到该流程,无法开启流程!");
+            }
+            pDefId = list.get(0).getId();
+            ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(pDefId)
+                    .latestVersion().singleResult();
+            if (Objects.nonNull(processDefinition) && processDefinition.isSuspended()) {
+                return AjaxResult.error("流程已被挂起,请先激活流程");
+            }
+            if(StringUtils.isNotBlank(pDefId)){
+
+                //设置参数
+                Map<String, Object> formProperties = new HashMap<String, Object>();
+                // 设置流程发起人Id到流程中
+                SysUser sysUser = SecurityUtils.getLoginUser().getUser();
+                identityService.setAuthenticatedUserId(sysUser.getUserId().toString());
+                formProperties.put("auditPass",tProjectDecision.isFlag()?true:false);
+                //暂存
+                formProperties.put(ProcessConstants.PROCESS_INITIATOR, sysUser.getUserId());
+                //投资部负责人
+                String leader=sysDeptMapper.selectDeptLeader("投资部");
+                formProperties.put("MANAGER",sysUserService.selectUserByUserName(leader).getUserId());
+                pInst = runtimeService.startProcessInstanceById(pDefId, formProperties);
+               // ProcessInstance p = runtimeService.startProcessInstanceById(procDefId, variables);
+                if(pInst!=null){
+                    String nickName= SecurityUtils.getLoginUser().getUser().getNickName();
+                    String userId=SecurityUtils.getLoginUser().getUserId().toString();
+                    //保存信息
+                    tProjectDecision.setId(IdUtils.fastSimpleUUID());
+                    tProjectDecision.setProcInstId(pInst.getProcessInstanceId());
+                    tProjectDecision.setCreateBy(userId);
+
+                    // todo 保存投决资料
+                    tUnifyFileService.insertTUnifyFileList(tProjectDecision.getListFile(),
+                            tProjectDecision.getProjectPoolId(),
+                            tProjectDecision.getId(),
+                            String.valueOf(FileType.DECISION.ordinal()),
+                            nickName);
+
+                    // todo 更改投决状态
+                    tProjectPoolService.updateTProjectPoolByDecisionFlag(tProjectDecision.getProjectPoolId(),"1");
+
+                    // todo 短信提醒
+                    /*if(StringUtils.isNotEmpty(tProjectDecision.getParticipantsId())){
+                        StringUtils.str2List(tProjectDecision.getParticipantsId(),",",true,true).stream().forEach(str -> {
+                            SysUser user = sysUserService.selectUserById(Long.valueOf(str));
+                            String contents = "您好,"+user.getNickName()+"," + tProjectDecision.getProjectName() + "已发起投决申请。";
+                            try {
+                                SmsSenderUtils.sendSms(user.getPhonenumber(),contents);
+                            } catch (IOException e) {
+                                logger.error("短信发送失败"+e.getMessage());
+                            }
+                        });
+                    }*/
+
+                    // todo 增加项目创建记录
+                    tProjectCirculationService.insertTProjectCirculation(tProjectDecision.getProjectPoolId(),"投决申请",nickName);
+
+                    tProjectDecisionService.insertTProjectDecision(tProjectDecision);
+
+
+                    FlowBaseInfo flowBaseInfo = new FlowBaseInfo();
+                    flowBaseInfo.setCreateBy(userId);
+                    flowBaseInfo.setId(UUIDGenerator.uuid());
+                    flowBaseInfo.setFormProperties(flowInstanceService.getFormProperties(pInst));
+                    flowBaseInfo.setProcDefId(pDefId);
+                    flowBaseInfo.setProcInsId(pInst.getId());
+                    flowBaseInfo.setTaskName("申请人");
+                    flowBaseInfo.setFlag(true);
+                    flowBaseInfo.setComment("[提交申请]");
+                    flowBaseInfo.setStatus(FlowStatusEnum.STARTED.getName());
+
+                    activitiBaseInfoService.addActivitiBaseInfo(flowBaseInfo);
+                    TProjectPool tProjectPool=new TProjectPool();
+                    tProjectPool.setId(tProjectDecision.getProjectPoolId());
+                    tProjectPool.setProjectStage("5");//项目阶段-项目投决
+                    tProjectPool.setProjectState("h");//项目状态-准备项目投决材料
+                    tProjectPoolService.updateTProjectPool(tProjectPool);
+                    return AjaxResult.success();
+                }
+                return AjaxResult.error();
+            }
+            return AjaxResult.error();
+        } catch (Exception e) {
+            /*res.put("status",false);
+            res.put("msg", "流程定义id为空, 无法开启流程!");*/
+            e.printStackTrace();
+            return AjaxResult.error("msg", "流程定义id为空, 无法开启流程!");
+
+        }
+
+
+    }
+    @Override
+    public AjaxResult complete(TProjectDecision tProjectDecision, TProjectMeeting tProjectMeeting,TProjectScoring tProjectScoring, FlowBaseInfo flow,HttpServletRequest request){
+        //Task task=taskService.createTaskQuery().processInstanceId(tProjectApproval.getProcInstId()).singleResult();
+        Task task = taskService.createTaskQuery().taskId(flow.getTaskId()).singleResult();
+        if (Objects.isNull(task)) {
+            return AjaxResult.error("任务不存在");
+        }
+        //当前你登录人
+        SysUser userInfo=SecurityUtils.getLoginUser().getUser();
+        Map<String, Object> rs = new HashMap<String, Object>();
+        rs.put("status",true);
+        Map<String, Object> formProperties = new HashMap<>();
+        formProperties.put("auditPass", tProjectDecision.isFlag());
+        //会议投决人
+        if("meeting".equals(task.getTaskDefinitionKey())) {
+            //立项审批人
+            List<String> userIds = Arrays.asList(tProjectDecision.getParticipantsId().split(","));
+            //List<String> userIds = Arrays.asList(tProjectMeeting.getParticipantsId().split(","));//会议人
+            formProperties.put("decisionList", userIds);
+        }
+
+        Map<String, Object> fpMap = flowService.getFormProperties(task.getProcessDefinitionId(), task.getId());
+        try {
+            rs = flowService.taskComplete( task.getId(), tProjectDecision.isFlag(), formProperties, userInfo.getUserId().toString());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rs.put("status", false);
+            rs.put("msg", "流程审批失败");
+        }
+        boolean status = (boolean) rs.get("status");
+        // 审核成功, 则记录审核信息
+        if (status) {
+            TProjectPool tProjectPool=new TProjectPool();
+            tProjectPool.setId(tProjectDecision.getProjectPoolId());
+            //发起会议
+            if ("meeting".equals(task.getTaskDefinitionKey())) {
+                tProjectMeeting.setId(IdUtils.fastSimpleUUID());
+                tProjectMeeting.setCreateBy(userInfo.getNickName());
+                tProjectMeeting.setProjectPoolId(tProjectDecision.getProjectPoolId());
+                if(tProjectMeeting.getMeetingType().equals("LX")||tProjectMeeting.getMeetingType().equals("TJ")){
+                    int number = tProjectMeetingService.selectTProjectMeetingCode(DateUtils.lastTwoDigits()+"-");
+                    tProjectMeeting.setMeetingCode(tProjectMeeting.getProjectGroup()+"-"+ DateUtils.lastTwoDigits() +"-"+tProjectMeeting.getMeetingType()+"-"+ String.format("%03d",number+1));
+                }else{
+                    int number = tProjectMeetingService.selectTProjectMeetingCode(DateUtils.dateTimeNow("YYYY"));
+                    tProjectMeeting.setMeetingCode(DateUtils.dateNow()+ String.format("%03d",number+1));
+                }
+                // todo 保存附件信息
+                tUnifyFileService.insertTUnifyFileList(tProjectMeeting.getListFile(),
+                        tProjectMeeting.getProjectPoolId(),
+                        tProjectMeeting.getId(),//会议ID
+                        String.valueOf(FileType.MEETING.ordinal()),//文件类型:会议
+                        userInfo.getNickName());
+
+                // todo 增加会议创建记录
+                tProjectCirculationService.insertTProjectCirculation(tProjectMeeting.getProjectPoolId(),tProjectMeeting.getMeetingTheme()+"(会议)",userInfo.getNickName());
+
+                // todo 发送短信-参与人-发起人
+                if(tProjectMeeting.getMeetingType().equals("LX") || tProjectMeeting.getMeetingType().equals("TJ")){
+                    // todo 参与人
+                    /*if(StringUtils.isNotEmpty(tProjectMeeting.getParticipantsId())){
+                        StringUtils.str2List(tProjectMeeting.getParticipantsId(),",",true,true).stream().forEach(str -> {
+                            SysUser user = sysUserService.selectUserById(Long.valueOf(str));
+                            String contents = "您好," + user.getNickName() + ",兹定于 " +
+                                    DateUtils.parseDateToStr("yyyy/MM/dd HH:mm",tProjectMeeting.getStartTime()) + "至" + DateUtils.parseDateToStr("yyyy/MM/dd HH:mm",tProjectMeeting.getEndTime()) +
+                                    "在" + tProjectMeeting.getPlace() + "召开" + tProjectMeeting.getMeetingTheme() + "会议,请提前做好准备按时参加。";
+                            try {
+                                SmsSenderUtils.sendSms(user.getPhonenumber(),contents);
+                            } catch (IOException e) {
+                                logger.error("短信发送失败"+e.getMessage());
+                            }
+                        });
+                    }*/
+
+                    // todo 发起人
+                    /*if(StringUtils.isNotEmpty(tProjectMeeting.getPromoterId())){
+                        SysUser user = sysUserService.selectUserById(Long.valueOf(tProjectMeeting.getPromoterId()));
+                        String contents = "您好," + user.getNickName() + ",兹定于 " +
+                                DateUtils.parseDateToStr("yyyy/MM/dd HH:mm",tProjectMeeting.getStartTime()) + "至" + DateUtils.parseDateToStr("yyyy/MM/dd HH:mm",tProjectMeeting.getEndTime()) +
+                                "在" + tProjectMeeting.getPlace() + "召开" + tProjectMeeting.getMeetingTheme() + "会议,请提前做好准备按时参加。";
+                        try {
+                            SmsSenderUtils.sendSms(user.getPhonenumber(),contents);
+                        } catch (IOException e) {
+                            logger.error("短信发送失败"+e.getMessage());
+                        }
+                    }*/
+                }
+
+                tProjectMeetingService.insertTProjectMeeting(tProjectMeeting);
+            }
+            //上传打分表
+            if("decision".equals(task.getTaskDefinitionKey())){
+                tProjectScoring.setCreateBy(userInfo.getNickName());
+                tProjectScoring.setProjectPoolId(tProjectDecision.getProjectPoolId());
+                // todo 增加项目创建记录
+                tProjectCirculationService.insertTProjectCirculation(tProjectScoring.getProjectPoolId(),"上传打分表", userInfo.getNickName());
+
+                tProjectScoringService.insertTProjectScoring(tProjectScoring);
+            }
+            if("president".equals(task.getTaskDefinitionKey())){
+                tProjectPool.setProjectStage("5");//项目阶段-项目投决
+                tProjectPool.setProjectState("i");//项目状态-项目投决通过
+                tProjectPool.setProjectDate(new Date());//立项通过日期
+            }
+            //FlowBaseInfo flow = new FlowBaseInfo();
+            if(flow==null){
+                flow = new FlowBaseInfo();
+            }
+            flow.setId(UUIDGenerator.uuid());
+            flow.setFormProperties(flowService.getFormProperties(fpMap, request.getParameterMap()));
+            flow.setStatus(FlowStatusEnum.RUNNING.getName());
+            flow.setProcDefId(task.getProcessDefinitionId());
+            flow.setProcInsId(task.getProcessInstanceId());
+            flow.setTaskDefKey(task.getTaskDefinitionKey());
+            String isOk = tProjectDecision.isFlag() ? "[同意]" : "[驳回]";
+            if ("modifyApply".equals(task.getTaskDefinitionKey())) {
+                //tProjectPool.setStatus(tProjectPool.isFlag() ? 1 : 4);
+                isOk = tProjectDecision.isFlag() ? "[提交]" : "[关闭]";
+            } else {
+                //tProjectPool.setStatus(tProjectPool.isFlag() ? 2 : 0);
+            }
+            if (null != flow.getComment()) {
+                flow.setComment(isOk + flow.getComment());
+            } else {
+                flow.setComment(isOk);
+            }
+            flow.setTaskName(task.getName());
+            flow.setCreateBy(SecurityUtils.getLoginUser().getUserId().toString());
+
+            ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).active().singleResult();
+            // 表示流程已经审批结束了
+            if (processInstance == null) {
+                flow.setStatus(FlowStatusEnum.ENDED.getName());
+                if (!"modifyApply".equals(task.getTaskDefinitionKey())) {
+                    tProjectPool.setProjectStage("6");//项目阶段-项目终止
+                    tProjectPool.setProjectState("j");//项目状态-签约协议沟通中
+                    tProjectPool.setUpdateBy(userInfo.getNickName());
+                    tProjectPoolService.updateTProjectPool(tProjectPool);
+                }
+            }
+
+            tProjectDecisionService.updateTProjectDecision(tProjectDecision);
+            activitiBaseInfoService.addActivitiBaseInfo(flow);
+        }
+        return AjaxResult.success();
+    }
+    public TProjectMeeting selectTProjectMeetingByProcInstId(String pInstId){
+        TProjectDecision tProjectDecision=this.selectTProjectDecisionByProcInstId(pInstId);
+        TProjectMeeting tProjectMeeting=null;
+        if(tProjectDecision!=null){
+            tProjectMeeting=tProjectMeetingService.selectTProjectMeetingByProjectPoolId(tProjectDecision.getProjectPoolId());
+        }
+        return tProjectMeeting;
+    }
+    /**
+     * 根据流程Id查询汇总分数和平均分数
+     * @param pInstId
+     * @return
+     */
+    @Override
+    public Map<String, String> selectSumScore(String pInstId) {
+        TProjectDecision tProjectDecision=this.selectTProjectDecisionByProcInstId(pInstId);
+        Map<String, String> sumScore=new HashMap<>();
+        if(tProjectDecision!=null){
+            TProjectMeeting tProjectMeeting=tProjectMeetingService.selectTProjectMeetingByProjectPoolId(tProjectDecision.getProjectPoolId());
+            sumScore=tProjectScoringMapper.selectMeetingId(tProjectMeeting.getId());
+        }
+        return sumScore;
+    }
+
+}

+ 9 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectDecision.java

@@ -1,6 +1,7 @@
 package com.ruoyi.invest.domain;
 
 import com.ruoyi.tool.domain.TUnifyFile;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -14,6 +15,7 @@ import java.util.List;
  * @author zjc
  * @date 2024-04-02
  */
+@Data
 public class TProjectDecision extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -48,6 +50,13 @@ public class TProjectDecision extends BaseEntity
      */
     private List<TUnifyFile> listFile;
 
+    //表外
+    private String procInstId;//流程实例Id
+    private String taskName;
+    private String taskDefKey;
+
+    private boolean flag; // true - 同意; false - 驳回
+
     public void setId(String id) 
     {
         this.id = id;

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/dto/DecisionDto.java

@@ -0,0 +1,13 @@
+package com.ruoyi.invest.domain.dto;
+
+import com.ruoyi.invest.domain.*;
+import lombok.Data;
+
+@Data
+public class DecisionDto {
+    private TProjectPool projectPool;   // 嵌套对象
+    private TProjectDecision projectDecision;
+    private TProjectMeeting projectMeeting;
+    private TProjectScoring projectScoring;
+    private FlowBaseInfo flowBaseInfo;
+}

+ 199 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/vo/ProjectDecisionVo.java

@@ -0,0 +1,199 @@
+package com.ruoyi.invest.domain.vo;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.tool.domain.TUnifyFile;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.List;
+
+/**
+ * 投决申请对象 t_project_decision
+ * 
+ * @author zjc
+ * @date 2024-04-02
+ */
+@Data
+public class ProjectDecisionVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    private String id;
+
+    /** 项目ID */
+    @Excel(name = "项目ID")
+    private String projectPoolId;
+
+    /** 项目名称 */
+    //private String projectName;
+
+    /** 参与人ID */
+    @Excel(name = "参与人ID")
+    private String participantsId;
+
+    /** 参与人 */
+    @Excel(name = "参与人")
+    private String participants;
+
+    /** 股权/其他合作商务条款 */
+    @Excel(name = "股权/其他合作商务条款")
+    private String provision;
+
+    /** 状态 */
+    private String delFlag;
+
+    /**
+     * 附件信息
+     */
+    private List<TUnifyFile> listFile;
+
+    //表外
+    /*private String procInstId;//流程实例Id
+    private String taskName;
+    private String taskDefKey;*/
+
+
+    //投资机会信息
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+    /** 项目所属行业 */
+    @Excel(name = "项目所属行业")
+    private String industry;
+    /** 项目阶段 */
+    @Excel(name = "项目阶段")
+    private String projectStage;
+    /** 项目状态 */
+    @Excel(name = "项目状态")
+    private String projectState;
+    /** 投资负责人 */
+    @Excel(name = "投资负责人")
+    private String investHead;
+
+
+    //流程信息
+    @ApiModelProperty("流程实例ID")
+    private String procInstId;
+    @ApiModelProperty("流程ID")
+    private String procDefId;
+    //private String processDefName;
+    @ApiModelProperty("流程部署编号")
+    private String deployId;
+    //流程任务信息
+    @ApiModelProperty("任务编号")
+    private String taskId;
+    @ApiModelProperty("任务执行编号")
+    private String executionId;// 运行id
+    @ApiModelProperty("任务名称")
+    private String taskName;
+    @ApiModelProperty("任务Key")
+    private String taskDefKey;
+    private String taskCreateTiem; // 当前节点创建时间
+    //private String taskUserId; // 当前处理人
+    //private String status; // 流程状态
+    @ApiModelProperty("任务执行人Id")
+    private String assignee; // 该值未空表示 可签收,不未空表示 可处理
+    @ApiModelProperty("任务执行人名称")
+    private String assigneeName;
+    //流程发起人信息
+    @ApiModelProperty("流程发起人Id")
+    private String startUserId;
+    @ApiModelProperty("流程发起人名称")
+    private String startUserName;
+    @ApiModelProperty("流程发起人部门名称")
+    private String startDeptName;
+
+    private boolean flag; // true - 同意; false - 驳回
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setProjectPoolId(String projectPoolId) 
+    {
+        this.projectPoolId = projectPoolId;
+    }
+
+    public String getProjectPoolId() 
+    {
+        return projectPoolId;
+    }
+    public void setParticipantsId(String participantsId) 
+    {
+        this.participantsId = participantsId;
+    }
+
+    public String getParticipantsId() 
+    {
+        return participantsId;
+    }
+    public void setParticipants(String participants) 
+    {
+        this.participants = participants;
+    }
+
+    public String getParticipants() 
+    {
+        return participants;
+    }
+    public void setProvision(String provision) 
+    {
+        this.provision = provision;
+    }
+
+    public String getProvision() 
+    {
+        return provision;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    public List<TUnifyFile> getListFile() {
+        return listFile;
+    }
+
+    public void setListFile(List<TUnifyFile> listFile) {
+        this.listFile = listFile;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("projectPoolId", getProjectPoolId())
+            .append("participantsId", getParticipantsId())
+            .append("participants", getParticipants())
+            .append("provision", getProvision())
+            .append("remark", getRemark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 29 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/DecisionMapper.java

@@ -0,0 +1,29 @@
+package com.ruoyi.invest.mapper;
+
+import com.ruoyi.invest.domain.TProjectApproval;
+import com.ruoyi.invest.domain.TProjectDecision;
+import com.ruoyi.invest.domain.vo.ProjectApprovalVo;
+import com.ruoyi.invest.domain.vo.ProjectDecisionVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 项目池Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+public interface DecisionMapper {
+
+    /*待办任务*/
+    List<ProjectDecisionVo> getMyTaskList(@Param("userId") String userId, @Param("projectDecision") TProjectDecision tProjectDecision);
+    /*已办任务*/
+    List<ProjectDecisionVo> getMyDoneTaskList(@Param("userId") String userId, @Param("projectDecision")TProjectDecision tProjectDecision);
+    /*我的单据*/
+    List<ProjectDecisionVo> getMyList(@Param("userId") String userId, @Param("projectDecision")TProjectDecision tProjectDecision);
+    /*详情*/
+    public TProjectDecision selectTProjectDecisionByProcInstId(String ProcInstId);
+
+
+}

+ 189 - 0
ruoyi-system/src/main/resources/mapper/invest/DecisionMapper.xml

@@ -0,0 +1,189 @@
+<?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.ruoyi.invest.mapper.DecisionMapper">
+
+    <resultMap type="TProjectDecision" id="TProjectDecisionResult">
+        <result property="id"    column="id"    />
+        <result property="procInstId" column="proc_inst_id"/>
+        <result property="projectPoolId"    column="project_pool_id"    />
+        <result property="participantsId"    column="participants_id"    />
+        <result property="participants"    column="participants"    />
+        <result property="provision"    column="provision"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+    <resultMap type="ProjectDecisionVo" id="ProjectDecisionVoResult">
+        <result property="id"    column="id"    />
+        <result property="procInstId" column="proc_inst_id"/>
+        <result property="projectPoolId"    column="project_pool_id"    />
+        <result property="participantsId"    column="participants_id"    />
+        <result property="participants"    column="participants"    />
+        <result property="provision"    column="provision"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+
+        <result property="projectName"    column="project_name"    />
+        <result property="industry"    column="industry"    />
+        <result property="investHead"    column="invest_head"    />
+        <result property="projectStage"    column="project_stage"    />
+        <result property="projectState"    column="project_state"    />
+
+        <result property="taskName" column="taskName"/>
+        <result property="taskId" column="taskId"/>
+        <result property="taskCreateTiem" column="taskCreateTiem"/>
+        <result property="assignee" column="assignee"/>
+        <result property="assigneeName" column="assigneeName"/>
+        <result property="taskDefKey" column="taskDefKey"/>
+        <result property="procDefId" column="procDefId"/>
+        <result property="procInstId" column="procInstId"/>
+        <result property="startUserId" column="startUserId"/>
+        <result property="startUserName" column="startUserName"/>
+        <result property="startDeptName" column="startDeptName"/>
+        <result property="executionId" column="executionId"/>
+        <result property="deployId" column="deployId"/>
+    </resultMap>
+    <sql id="selectTProjectDecisionVo">
+        select id, project_pool_id, participants_id, participants, provision, remark, del_flag, create_by, create_time, update_by, update_time from t_project_decision
+    </sql>
+    <sql id="where_sql">
+        <if test="projectDecision.projectPoolId != null  and projectDecision.projectPoolId != ''"> and a.project_pool_id = #{projectDecision.projectPoolId}</if>
+        <if test="projectDecision.provision != null  and projectDecision.provision != ''"> and a.provision = #{projectDecision.provision}</if>
+    </sql>
+    <select id="getMyTaskList" resultMap="ProjectDecisionVoResult">
+        select a.id,a.proc_inst_id, a.project_pool_id,tp.project_name, tp.industry,tp.project_stage,
+        tp.project_state,tp.invest_head, a.participants_id,a.participants,
+        a.provision, a.remark, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time ,
+        p.PROC_INST_ID_ as 'procInsId',
+        p.PROC_DEF_ID_ as 'procDefId',
+        date_format(p.START_TIME_, '%Y-%m-%d %H:%i:%s') as 'applyTime',
+        date_format(p.END_TIME_, '%Y-%m-%d %H:%i:%s') as 'endTime',
+        p.START_USER_ID_ AS 'startUserId',
+        uu.nick_name AS 'startUserName',
+        dd.dept_name AS 'startDeptName',
+        t.NAME_ as 'taskName',
+        t.TASK_DEF_KEY_ as 'taskDefKey',
+        DATE_FORMAT(t.CREATE_TIME_ ,'%Y-%m-%d %H:%i') as 'taskCreateTiem',
+        t.ASSIGNEE_ AS 'assignee',
+        ui.nick_name AS 'assigneeName',
+        t.ID_ as 'taskId',
+        t.EXECUTION_ID_ AS 'executionId',
+        rp.DEPLOYMENT_ID_ AS 'deployId'
+        from t_project_decision a
+        left join t_project_pool tp on tp.id=a.project_pool_id
+        left join ACT_HI_PROCINST p on a.proc_inst_id = p.PROC_INST_ID_
+        LEFT JOIN (SELECT * FROM sys_user LIMIT 100000) uu ON p.START_USER_ID_ = uu.user_id
+        LEFT JOIN (SELECT * FROM sys_dept LIMIT 100000) dd ON uu.dept_id = dd.dept_id
+        left join ACT_RU_TASK t on a.proc_inst_id = t.PROC_INST_ID_
+        left join (select * from sys_user limit 100000) ui on t.ASSIGNEE_ = ui.user_id
+        left join ACT_RU_IDENTITYLINK ru on ru.TASK_ID_ = t.ID_
+        left join ACT_ID_MEMBERSHIP m on m.GROUP_ID_ = ru.GROUP_ID_ and m.USER_ID_ = #{userId}
+        LEFT JOIN act_re_procdef rp ON t.PROC_DEF_ID_ = rp.ID_
+        where
+        (t.ASSIGNEE_ = #{userId}
+        or (t.ASSIGNEE_ is null AND ru.TYPE_ = 'candidate'
+        AND (ru.USER_ID_ = #{userId}
+        OR ru.GROUP_ID_ IN (
+        select g.ID_ from ACT_ID_GROUP g, ACT_ID_MEMBERSHIP membership where g.ID_ = membership.GROUP_ID_ AND
+        membership.USER_ID_ = #{userId} )
+        )
+        )
+        )
+        and a.del_flag="0"
+        <include refid="where_sql"></include>
+    </select>
+    <select id="getMyDoneTaskList" resultMap="ProjectDecisionVoResult">
+        select a.id,a.proc_inst_id, a.project_pool_id,tp.project_name, tp.industry,tp.project_stage,
+        tp.project_state,tp.invest_head,a.participants_id,a.participants,
+        a.provision, a.remark, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time ,
+        p.PROC_INST_ID_ as 'procInsId',
+        p.PROC_DEF_ID_ as 'procDefId',
+        date_format(p.START_TIME_, '%Y-%m-%d %H:%i:%s') as 'applyTime',
+        date_format(p.END_TIME_, '%Y-%m-%d %H:%i:%s') as 'endTime',
+        p.START_USER_ID_ AS 'startUserId',
+        uu.nick_name AS 'startUserName',
+        dd.dept_name AS 'startDeptName',
+        ht.ID_ AS 'taskId',
+        ht.NAME_ AS 'taskName',
+        ht.ASSIGNEE_ AS 'assignee',
+        ui.nick_name AS 'assigneeName',
+        rp.DEPLOYMENT_ID_ AS 'deployId'
+        from t_project_decision a
+        left join t_project_pool tp on tp.id=a.project_pool_id
+        left join ACT_HI_TASKINST ht on a.proc_inst_id = ht.PROC_INST_ID_
+        left join ACT_HI_PROCINST p on a.proc_inst_id = p.PROC_INST_ID_
+        LEFT JOIN (SELECT * FROM sys_user LIMIT 100000) uu ON p.START_USER_ID_ = uu.user_id
+        LEFT JOIN (SELECT * FROM sys_dept LIMIT 100000) dd ON uu.dept_id = dd.dept_id
+        left join (select * from sys_user limit 100000) ui on ht.ASSIGNEE_ = ui.user_id
+        left join ACT_RU_TASK t on a.proc_inst_id = t.PROC_INST_ID_
+        left join act_re_procdef rp ON t.PROC_DEF_ID_ = rp.ID_
+        where
+        ht.ASSIGNEE_ =  #{userId}
+        AND ht.END_TIME_ IS NOT NULL
+        and a.del_flag="0"
+        <include refid="where_sql"></include>
+        GROUP BY a.id
+        ORDER BY ht.END_TIME_ DESC;
+    </select>
+    <select id="getMyList" resultMap="ProjectDecisionVoResult">
+        select a.id,a.proc_inst_id, a.project_pool_id,tp.project_name, tp.industry,tp.project_stage,
+        tp.project_state,tp.invest_head, a.participants_id, a.participants,
+        a.provision, a.remark, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time ,
+        u.nick_name as 'applyUserName',
+        p.PROC_INST_ID_ as 'procInsId',
+        p.PROC_DEF_ID_ as 'procDefId',
+        date_format(p.START_TIME_, '%Y-%m-%d %H:%i:%s') as 'applyTime',
+        date_format(p.END_TIME_, '%Y-%m-%d %H:%i:%s') as 'endTime',
+        p.START_USER_ID_ AS 'startUserId',
+        uu.nick_name AS 'startUserName',
+        dd.dept_name AS 'startDeptName',
+        t.NAME_ as 'taskName',
+        t.TASK_DEF_KEY_ as 'taskDefKey',
+        DATE_FORMAT(t.CREATE_TIME_ ,'%Y-%m-%d %H:%i') as 'taskCreateTiem',
+        t.ASSIGNEE_ as 'assignee',
+        GROUP_CONCAT(DISTINCT ui.nick_name SEPARATOR '\r\n') as 'assigneeName',
+        t.ID_ as 'taskId',
+        t.EXECUTION_ID_ AS 'executionId',
+        rp.DEPLOYMENT_ID_ AS 'deployId'
+        from t_project_decision a
+        left join t_project_pool tp on tp.id=a.project_pool_id
+        left join ACT_HI_PROCINST p on a.proc_inst_id = p.PROC_INST_ID_
+        LEFT JOIN (SELECT * FROM sys_user LIMIT 100000) uu ON p.START_USER_ID_ = uu.user_id
+        LEFT JOIN (SELECT * FROM sys_dept LIMIT 100000) dd ON uu.dept_id = dd.dept_id
+        left join sys_user u on a.create_by = u.user_id
+        left join ACT_RU_TASK t on a.proc_inst_id = t.PROC_INST_ID_
+        left join (select * from sys_user limit 100000) ui on t.ASSIGNEE_ = ui.user_id
+        left join ACT_RU_IDENTITYLINK ru on ru.TASK_ID_ = t.ID_
+        left join ACT_ID_MEMBERSHIP m on m.GROUP_ID_ = ru.GROUP_ID_ and m.USER_ID_ = #{userId}
+        left join act_re_procdef rp ON t.PROC_DEF_ID_ = rp.ID_
+        where a.create_by = #{userId} and a.proc_inst_id is not null and a.proc_inst_id != ''
+        and a.del_flag="0"
+        <include refid="where_sql"></include>
+        GROUP BY a.id
+    </select>
+    <!--<select id="selectTProjectPoolById" parameterType="String" resultMap="TProjectPoolResult">
+        <include refid="selectTProjectPoolVo"/>
+        where a.id = #{id}
+    </select>-->
+    <select id="selectTProjectDecisionByProcInstId" parameterType="java.lang.String" resultMap="TProjectDecisionResult">
+        select a.id,a.proc_inst_id, a.project_pool_id, a.participants_id,a.participants,
+               a.provision, a.remark, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time ,
+               t.TASK_DEF_KEY_ as 'taskDefKey'
+        from t_project_decision a
+        left join ACT_RU_TASK t on a.proc_inst_id = t.PROC_INST_ID_
+        left join (select * from sys_user limit 100000) ui on t.ASSIGNEE_ = ui.user_id
+        left join sys_user u on a.create_by = u.user_id
+        where a.proc_inst_id = #{procInstId,jdbcType=VARCHAR}
+        GROUP BY a.id
+    </select>
+
+</mapper>

+ 4 - 0
ruoyi-system/src/main/resources/mapper/invest/TProjectDecisionMapper.xml

@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into t_project_decision
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
+            <if test="procInstId != null">proc_inst_id,</if>
             <if test="projectPoolId != null">project_pool_id,</if>
             <if test="participantsId != null">participants_id,</if>
             <if test="participants != null">participants,</if>
@@ -51,9 +52,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="needMeeting != null">need_meeting,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
+            <if test="procInstId != null">#{procInstId},</if>
             <if test="projectPoolId != null">#{projectPoolId},</if>
             <if test="participantsId != null">#{participantsId},</if>
             <if test="participants != null">#{participants},</if>
@@ -64,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="needMeeting != null">#{needMeeting},</if>
          </trim>
     </insert>
 

+ 96 - 0
ruoyi-ui/src/api/project/decision/pool.js

@@ -0,0 +1,96 @@
+import request from '@/utils/request'
+// 我的待办任务列表
+export function getMyTaskList(query) {
+  return request({
+    url: '/project/decision/getMyTaskList',
+    method: 'get',
+    params: query
+  })
+}
+//我的已办任务列表
+export function getMyDoneTaskList(query) {
+  return request({
+    url: '/project/decision/getMyDoneTaskList',
+    method: 'get',
+    params: query
+  })
+}
+//我的单据列表
+export function getMyList(query) {
+  return request({
+    url: '/project/decision/getMyList',
+    method: 'get',
+    params: query
+  })
+}
+//启动流程
+export function decisionStart(data) {
+  return request({
+    //url: '/invest/pool',
+    url:'/project/decision/start',
+    method: 'post',
+    data: data
+  })
+}
+//审批流程
+export function decisionComplete(data) {
+  return request({
+    url:'/project/decision/complete',
+    method: 'put',
+    data: data,
+  })
+}
+// 查询项目池详细
+export function getPool(id) {
+  return request({
+    url: '/invest/pool/' + id,
+    method: 'get'
+  })
+}
+/*export function getInvestInfo(pInstId) {
+  return request({
+    url: '/project/approval/' + pInstId,
+    method: 'get'
+  })
+}*/
+export function getDecisionInfo(pInstId) {
+  return request({
+    url: '/project/decision/' + pInstId,
+    method: 'get'
+  })
+}
+//查询会议投决节点  会议详情
+export function getMeetingInfo(pInstId) {
+  return request({
+    url: '/project/decision/getMeetingInfo/' + pInstId,
+    method: 'get',
+  })
+}
+
+// 根据会议ID查询汇总分数和平均分数
+export function getSumScore(pInstId) {
+  return request({
+    url: '/project/decision/getSumScore/' + pInstId,
+    method: 'get',
+  })
+}
+// 新增项目池
+
+
+// 修改项目池
+/*export function updatePool(data) {
+  return request({
+    url: '/invest/pool',
+    method: 'put',
+    data: data
+  })
+}*/
+
+// 删除项目池
+/*export function delPool(id) {
+  return request({
+    url: '/invest/pool/' + id,
+    method: 'delete'
+  })
+}*/
+

+ 38 - 0
ruoyi-ui/src/router/index.js

@@ -111,6 +111,44 @@ export const constantRoutes = [
         component: () => import('@/views/project/approval/detail'),
         meta: { title: '项目立项详情' }
       },
+      //项目投决
+      {
+        path: "decision/edit",
+        name: 'decisionEdit',
+        component: () => import('@/views/project/decision/edit'),
+        meta: { title: '修改项目投决' }
+      },
+      {
+        path: "decision/audit",
+        name: 'decisionAudit',
+        component: () => import('@/views/project/decision/audit'),
+        meta: { title: '审批项目投决' }
+      },
+      {
+        path: "decision/detail",
+        name: 'decisionDetail',
+        component: () => import('@/views/project/decision/detail'),
+        meta: { title: '项目投决详情' }
+      },
+      //项目终止
+      {
+        path: "decision/edit",
+        name: 'decisionEdit',
+        component: () => import('@/views/project/decision/edit'),
+        meta: { title: '修改项目终止' }
+      },
+      {
+        path: "decision/audit",
+        name: 'decisionAudit',
+        component: () => import('@/views/project/decision/audit'),
+        meta: { title: '审批项目终止' }
+      },
+      {
+        path: "decision/detail",
+        name: 'decisionDetail',
+        component: () => import('@/views/project/decision/detail'),
+        meta: { title: '项目终止详情' }
+      },
       // {
       //   path: "record/index",
       //   name: 'investRecordIndex',

+ 3 - 8
ruoyi-ui/src/views/project/approval/audit.vue

@@ -66,8 +66,7 @@
       </el-tabs>
       <section>
         <div v-if="activeName === '0'" class="public-padded-20 detail-meeting">
-          <el-tabs type="border-card"   :formType="parentFormType"
-                   @updateFormType="val => parentFormType = val" >
+          <el-tabs type="border-card" >
             <el-tab-pane label="项目立项申请表">
               <el-form
                 v-if="formLXApply.id"
@@ -1448,8 +1447,6 @@ export default {
       },
       activeName: "0",
       formType:1,
-      parentFormType: 1 ,// 父组件自己的 formType 变量
-     // localFormType: this.formType, // 👉 用 data 存副本
       // 人员选择器
       checkType: "multiple",
       // 数据回显
@@ -1465,8 +1462,8 @@ export default {
         listFile: null,
         participants: null,
         participantsId: null,
-        needMeeting:'0',
         taskDefKey:null,
+        needMeeting:'0',
       },
       // 会议表单参数-开始
       meetingForm: {
@@ -1673,10 +1670,9 @@ export default {
   },
   created() {
     this.id = this.$route.query.id;
+    this.flowBaseInfo.taskId=this.$route.query.taskId;
     this.getDetail();
     this.getlistProjectPoolIdNewApproval();
-    this.flowBaseInfo.taskId=this.$route.query.taskId;
-    //this.getDueList();
     if (this.$route.query.activeName) {
       this.activeName = this.$route.query.activeName;
     }
@@ -1705,7 +1701,6 @@ export default {
       getApprovalInfo(this.$route.query.pInstId).then((response) => {
         if (response && response.data) {
           that.formLXApply = response.data;
-          console.log(response.data.taskDefKey+"-----------");
           if(response.data.taskDefKey==='decision'){
             this.formType=1;
           }else if(response.data.taskDefKey==='president'){

+ 6 - 28
ruoyi-ui/src/views/project/approval/detail.vue

@@ -151,18 +151,18 @@
         <div v-show="activeName === '1'">
           <poolForm :type="type" :id="id"></poolForm>
         </div>
-        <div v-if="activeName === '3'" class="public-padded-20 detail-meeting">
-
-        </div>
       </section>
     </section>
+    <section>
+      <flowBase :procInstId="formLXApply.procInstId" v-if="formLXApply.procInstId"></flowBase>
+    </section>
   </div>
 </template>
 <script>
 import poolForm from "../../invest/components/poolForm";
 import tableForm from "../../invest/components/tableForm";
 import fileItem from "../../invest/components/fileItem";
-
+import flowBase from "../flowBase.vue";
 import {
   getPool,
   listProjectPoolId,
@@ -183,6 +183,7 @@ export default {
     poolForm,
     tableForm,
     fileItem,
+    flowBase
   },
   data() {
     return {
@@ -195,23 +196,9 @@ export default {
         projectName: "",
       },
       activeName: "0",
-      /*activities: [
-        {
-          content: "活动按期开始",
-          timestamp: "2018-04-15",
-        },
-        {
-          content: "通过审核",
-          timestamp: "2018-04-13",
-        },
-        {
-          content: "创建成功",
-          timestamp: "2018-04-11",
-        },
-      ],*/
-
       formLXApply: {
         id: null,
+        procInstId:null,
         projectPoolId: null,
         projectName: null,
         projectOverview: null,
@@ -220,15 +207,6 @@ export default {
         participants: null,
         participantsId: null,
       },
-      /*formTJApply: {
-        id: null,
-        projectPoolId: null,
-        projectName: null,
-        provision: null,
-        listFile: null,
-        participants: null,
-        participantsId: null,
-      },*/
     };
   },
   computed: {

+ 2 - 69
ruoyi-ui/src/views/project/approval/edit.vue

@@ -174,20 +174,9 @@
 </template>
 <script>
 import poolForm from "../../invest/components/poolForm";
-/*import poolForm from "../components/poolForm";
-import contractList from "../components/contractList";
-import fileList from "../components/fileList";
-import followList from "../components/followList";
-import meetingList from "../components/meetingList";
-import projectList from "../components/projectList";
-import tableForm from "../components/tableForm";
-import listAllfile from "../components/listAllfile";
-import dueDiligenceList from "../components/dueDiligenceList";*/
 import fileItem from "../../invest/components/fileItem";
 
-import {
-  getPool
-} from "@/api/invest/pool";
+import {getPool} from "@/api/invest/pool";
 import {
   listMeeting,
   listProjectPoolIdNewApproval
@@ -224,20 +213,6 @@ export default {
         projectName: "",
       },
       activeName: "0",
-      /*activities: [
-        {
-          content: "活动按期开始",
-          timestamp: "2018-04-15",
-        },
-        {
-          content: "通过审核",
-          timestamp: "2018-04-13",
-        },
-        {
-          content: "创建成功",
-          timestamp: "2018-04-11",
-        },
-      ],*/
       formLXApply: {
         id: null,
         procInstId:null,
@@ -263,41 +238,14 @@ export default {
   },
   created() {
     this.id = this.$route.query.id;
+    this.flowBaseInfo.taskId=this.$route.query.taskId;
     this.getlistProjectPoolIdNewApproval();
     this.getDetail();
-    this.flowBaseInfo.taskId=this.$route.query.taskId;
-    //this.getListProjectPoolId();
-    //this.getDueList();
     if (this.$route.query.activeName) {
       this.activeName = this.$route.query.activeName;
     }
   },
   methods: {
-    /** 查询列表 */
-    /*changeShowDueApply(showDueApply) {
-      this.showDueApply = showDueApply === "1";
-    },*/
-    /*getDueList() {
-      //   this.loading = true;
-      let queryParams = {
-        orderByColumn: "createTime",
-        isAsc: "desc",
-        projectPoolId: this.id,
-      };
-      getInvestigatelist(queryParams).then((response) => {
-        let list = response.rows,
-          showDueApply;
-        // 如果尽调全部完成,才能显示发起尽调;
-        if (list && list.length > 0) {
-          showDueApply = list.every(function (item) {
-            return item.status === "1";
-          });
-        } else {
-          showDueApply = true;
-        }
-        this.showDueApply = showDueApply;
-      });
-    },*/
     getMettingId(type) {
       let queryParams = {
         pageNum: 1,
@@ -376,27 +324,12 @@ export default {
 
     /** 加载审批任务弹框 */
     handleComplete(flag) {
-      /*this.completeOpen = true;
-      this.completeTitle = "流程审批";*/
-      ///his.submitForm(flag);
-
       this.taskComplete(flag);
     },
     /** 用户审批任务 */
     taskComplete(flag) {
-      /*if (!this.flowBaseInfo.comment) {
-        this.$modal.msgError("请输入审批意见!");
-        return;
-      }
-      if (this.form.taskDefKey=='softwareDept'&&!this.formAssess.context) {
-        this.$modal.msgError("请输入评估意见!");
-        return;
-      }*/
       this.formLXApply.flag=flag;
       const params={
-        /*projectPool: this.form,  // 拆分明确字段
-        projectReview: this.formAssess,
-        flowBaseInfo: this.flowBaseInfo*/
         projectApproval:this.formLXApply,
         flowBaseInfo: this.flowBaseInfo
       }

+ 1 - 49
ruoyi-ui/src/views/project/approval/list.vue

@@ -98,54 +98,6 @@
           >立项申请</el-button
         >
       </el-col>
-<!--      <el-col :span="1.5">
-        <el-button
-          plain
-          :disabled="multiple"
-          type="warning"
-          size="mini"
-          icon="el-icon-chat-line-round"
-          @click="handleSelectData(7, 'LX')"
-          v-hasPermi="['invest:pool:lx:meeting']"
-          >发起立项会议</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          plain
-          :disabled="multiple"
-          type="primary"
-          size="mini"
-          icon="el-icon-document-checked"
-          @click="handleSelectData(8)"
-          >上传打分表</el-button
-        >
-      </el-col>
-
-      <el-col :span="1.5">
-        <el-button
-          :disabled="multiple"
-          plain
-          type="success"
-          size="mini"
-          icon="el-icon-setting"
-          v-hasPermi="['invest:pool:stage']"
-          @click="handleSelectData(3)"
-          >设置项目阶段</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          @click="handleSelectData(4)"
-          type="danger"
-          plain
-          icon="el-icon-switch-button"
-          size="mini"
-          :disabled="multiple"
-          v-hasPermi="['invest:pool:remove']"
-          >终止</el-button
-        >
-      </el-col>-->
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
@@ -361,7 +313,7 @@
 <script>
 import { listApprovalList, delPool, editStage } from "@/api/invest/pool";
 import { listChannel } from "@/api/invest/channel";
-import meetingList from "./meetingList";
+import meetingList from "./meetingList.vue";
 import businessUpdate from "../../invest/components/businessUpdate";
 import { mapGetters } from "vuex";
 export default {

+ 4 - 4
ruoyi-ui/src/views/project/approval/meetingList.vue

@@ -797,10 +797,10 @@ import {
   updateDecision,
 } from "@/api/invest/meeting";
 import {approvalStart} from "@/api/project/approval/pool";
-import projectItem from "../../invest/components/projectItem";
-import fileItem from "../../invest/components/fileItem";
-import selecDept from "../../invest/components/selecDept";
-import selecUser from "../../invest/components/selecUser";
+import projectItem from "../../invest/components/projectItem.vue";
+import fileItem from "../../invest/components/fileItem.vue";
+import selecDept from "../../invest/components/selecDept.vue";
+import selecUser from "../../invest/components/selecUser.vue";
 import { mapGetters } from "vuex";
 
 export default {

+ 587 - 0
ruoyi-ui/src/views/project/decision/applyList.vue

@@ -0,0 +1,587 @@
+<template>
+  <div class="app-container">
+    <!-- 项目投决 -->
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="90px"
+      style="margin-left: -22px"
+    >
+      <el-form-item label="项目名称" prop="projectName">
+        <el-input
+          v-model.trim="queryParams.projectName"
+          placeholder="请输入项目名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="项目负责人" prop="investHead">
+        <el-input
+          v-model.trim="queryParams.investHead"
+          placeholder="请输入项目负责人"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="公司联系人" prop="projectContacts">
+        <el-input
+          v-model.trim="queryParams.projectContacts"
+          placeholder="请输入公司联系人"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="渠道" prop="channel">
+        <el-select v-model="queryParams.channel" placeholder="全部" clearable>
+          <el-option
+            v-for="item in channelList"
+            :key="item.id"
+            :label="item.channelName"
+            :value="item.id"
+          />
+          <el-option
+            label="无"
+            value="-1"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属组别" prop="projectGroup">
+        <el-select
+          v-model="queryParams.projectGroup"
+          placeholder="全部"
+          clearable
+        >
+          <el-option
+            v-for="dict in dict.type.project_group"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="项目公司" prop="company">
+        <el-input
+          v-model.trim="queryParams.company"
+          placeholder="请输入项目所属公司"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item class="searchWrapper">
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          plain
+          :disabled="multiple"
+          type="warning"
+          size="mini"
+          icon="el-icon-document"
+          @click="handleSelectData(11)"
+          v-hasPermi="['invest:pool:tj:apply']"
+          >投决申请</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+    <el-table
+      ref="dataTable"
+      @row-click="clickRow"
+      class="tableWrapper"
+      v-loading="loading"
+      border
+      :data="poolList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="40" align="center" />
+      <el-table-column
+        type="index"
+        label="序号"
+        width="50"
+        align="center"
+      ></el-table-column>
+      <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
+      <el-table-column label="项目名称" align="center" prop="projectName">
+        <template slot-scope="scope">
+          <div
+            :title="scope.row.projectName"
+            class="public-text-blue public-cursor"
+            @click.stop="handleDetail(scope.row)"
+          >
+            {{ scope.row.projectName }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="公司名称"
+        align="center"
+        prop="tProjectCompany.companyName"
+      >
+        <template slot-scope="scope">
+          <div :title="scope.row.tProjectCompany.companyName">
+            {{ scope.row.tProjectCompany.companyName }}
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
+        label="项目所属城市"
+        align="center"
+        prop="tProjectCompany.registeredAddress"
+      >
+        <template slot-scope="scope">
+          <div :title="scope.row.tProjectCompany.registeredAddress">
+            {{ scope.row.tProjectCompany.registeredAddress }}
+          </div>
+        </template>
+      </el-table-column> -->
+      <el-table-column label="所属行业" align="center" prop="industry"
+        ><template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.CUSTOMER_TRADE"
+            :value="scope.row.industry"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="项目阶段" align="center" prop="projectStage">
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.project_stage"
+            :value="scope.row.projectStage"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="项目状态"
+        align="center"
+        prop="projectState"
+        width="120"
+      >
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.project_state"
+            :value="scope.row.projectState"
+          />
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="备案时间" align="center" prop="tProjectCompany.filingTime">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.tProjectCompany.filingTime, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column> -->
+      <el-table-column label="立项通过日期" align="center" prop="projectDate">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.projectDate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="投决通过日期" align="center" prop="decisionDate">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.decisionDate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="已发起投决申请"
+        align="center"
+        prop="decisionFlag"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.decisionFlag === "1" ? "是" : "否" }}
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="项目负责人" align="center" prop="investHead">
+        <template slot-scope="scope">
+          <div :title="scope.row.investHead">
+            {{ scope.row.investHead }}
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="项目编号" align="center" prop="projectCode" /> -->
+      <el-table-column
+        label="渠道"
+        align="center"
+        prop="tProjectChannel.channelName"
+      >
+        <template slot-scope="scope">
+          <div
+            v-if="
+              scope.row.tProjectChannel && scope.row.tProjectChannel.channelName
+            "
+            :title="scope.row.tProjectChannel.channelName"
+          >
+            {{ scope.row.tProjectChannel.channelName }}
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
+        label="所属组别"
+        align="center"
+        prop="tProjectChannel.channelGroup"
+      >
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.project_group"
+            :value="scope.row.tProjectChannel.channelGroup"
+          />
+        </template>
+      </el-table-column> -->
+
+      <!-- <el-table-column
+        label="项目联系人"
+        align="center"
+        prop="tProjectContacts.name"
+      >
+        <template slot-scope="scope">
+          <div :title="scope.row.tProjectContacts.name">
+            {{ scope.row.tProjectContacts.name }}
+          </div>
+        </template>
+      </el-table-column> -->
+
+      <!--<el-table-column
+        label="创建人"
+        width="120"
+        align="center"
+        prop="createBy"
+      />
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="createTime"
+        width="160"
+      /> -->
+      <!-- delFlag -->
+      <el-table-column
+        label="状态"
+        align="center"
+        prop="investHead"
+        width="50px"
+      >
+        <template slot-scope="scope">
+          <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
+            {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 会议管理组件 -->
+    <meetingList
+      :type="'3'"
+      ref="meetingList"
+      :projectId="projectId"
+      @getList="getList"
+    ></meetingList>
+    <!-- 设置项目状态对话框 -->
+    <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
+  </div>
+</template>
+
+<script>
+import {
+  listDecisionList,
+  delPool,
+  editStage,
+  addDecision,
+} from "@/api/invest/pool";
+import { listChannel } from "@/api/invest/channel";
+import meetingList from "../meetingList.vue";
+import businessUpdate from "../../invest/components/businessUpdate";
+import { mapGetters } from "vuex";
+export default {
+  name: "Pool5",
+  dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
+  components: {
+    meetingList,
+    businessUpdate,
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+
+      // 选中id数组
+      ids: [],
+      idsName: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 选中数组
+      selectRowList: [],
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 项目池表格数据
+      poolList: [],
+      // 查询参数
+      queryParams: {
+        id: null,
+        pageNum: 1,
+        pageSize: 10,
+        projectName: null,
+        projectGroup: "",
+        projectCode: null,
+        channel: null,
+        contactDate: null,
+        projectDate: null,
+        decisionDate: null,
+        industry: null,
+        company: null,
+        projectContacts: null,
+        investHead: null,
+        previousFinancing: null,
+        financingStage: null,
+        financingMoney: null,
+        financingDate: null,
+        investValuation: null,
+        investMoney: null,
+        investType: null,
+        investPloy: null,
+        investWorth: null,
+        projectStage: null,
+        projectState: null,
+        orderByColumn: "createTime",
+        isAsc: "desc",
+        createTime: null,
+      },
+      channelList: [],
+      projectId: "",
+    };
+  },
+  computed: {
+    ...mapGetters(["user"]),
+  },
+  created() {},
+  mounted() {
+    this.getList();
+    // 渠道
+    listChannel({
+      pageNum: 1,
+      pageSize: 100,
+    }).then((response) => {
+      this.channelList = response.rows;
+    });
+  },
+  methods: {
+    /** 查询项目池列表 */
+    getList() {
+      this.loading = true;
+      listDecisionList(this.queryParams).then((response) => {
+        this.poolList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.queryParams.orderByColumn = "createTime";
+      this.queryParams.isAsc = "desc";
+      this.handleQuery();
+    },
+
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      if (selection.length > 1) {
+        //移除上一次选中行数据
+        selection.shift();
+        //修改选中图标为未选中状态
+        this.$refs.dataTable.clearSelection();
+        //将当前选中行改为选中状态
+        this.$refs.dataTable.toggleRowSelection(selection[0]);
+      }
+      this.idsName = selection.map((item) => item.projectName);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+      this.selectRowList = selection;
+    },
+
+    clickRow(row) {
+      this.$refs.dataTable.toggleRowSelection(row);
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.$router.push({ path: "/invest/pool/add" });
+    },
+    handleSelectData(type, otherData) {
+      // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
+      // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
+      // 9=尽调申请 10=上传尽调报告
+      // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
+      if (this.selectRowList.length == 1) {
+        const row = this.selectRowList[0];
+        // 1.单条数据 2.项目是否终止  3.是否能操作
+        if (row.delFlag === "1") {
+          this.$message({
+            message: "项目已终止",
+            duration: 1500,
+            type: "error",
+          });
+        } else if (type === 13) {
+          // 有立项会议
+          if (row.tProjectMeeting) {
+            // 参与人
+            if (
+              row.tProjectMeeting.participants.indexOf(this.user.nickName) > -1
+            ) {
+              // 是否打过分
+              if (row.tProjectScoring) {
+                this.$message.warning("您已打分,无需重复操作");
+              } else {
+                // 投决-去打分
+                this.$refs.meetingList.handleMark(
+                  row.tProjectMeeting,
+                  "3",
+                  false
+                );
+              }
+            } else {
+              this.$message.warning("无权限");
+            }
+          } else {
+            if (row.investHead === this.user.nickName) {
+              this.$message({
+                message: "请先发起投决会议",
+                duration: 1500,
+                type: "warning",
+              });
+            } else {
+              this.$message.warning("无权限");
+            }
+          }
+        } else if (row.investHead === this.user.nickName) {
+          if (type === 2) {
+            // 详情
+            this.handleDetail(row);
+          } else if (type === 3) {
+            // 设置项目阶段
+            this.$refs.businessUpdate.handleBusinessUpdate(row);
+          } else if (type === 4) {
+            this.handleDelete(row);
+          } else if (type === 11) {
+            if (row.decisionFlag === "0") {
+              // 投决申请
+              this.$refs.meetingList.showTJApplyPop(row);
+            } else {
+              this.$message({
+                message: "您已发起投决申请,无需重复操作",
+                duration: 1500,
+                type: "warning",
+              });
+            }
+          } else if (type === 12) {
+            // 发起投决会议
+            this.handleMeeting(row, otherData);
+          }
+        } else {
+          this.$message({
+            message: "无权限",
+            duration: 1500,
+            type: "error",
+          });
+        }
+      } else {
+        this.$message({
+          message: "只能选择一条数据",
+          duration: 1500,
+          type: "warning",
+        });
+      }
+    },
+    // 发起会议
+    handleMeeting(row, meetingType) {
+      this.$store.commit("SET_PROJECTITEMMESSAGE", row);
+      this.$refs.meetingList.handleAdd(row.id, meetingType);
+    },
+    handleDetail(row) {
+      const id = row.id || this.ids;
+      this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
+    },
+    /**终止按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      const idsName = row.projectName ? row.projectName : this.idsName;
+      this.$modal
+        .confirm('是否终止"' + idsName + '"项目?')
+        .then(function () {
+          return delPool(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("已终止");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        "invest/pool/export",
+        {
+          ...this.queryParams,
+        },
+        `pool_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.tableWrapper {
+  font-size: 12px;
+  color: #000;
+  ::v-deep .el-table__header-wrapper th {
+    font-size: 12px;
+    font-weight: bolder;
+    color: #000;
+  }
+
+  ::v-deep td.el-table__cell:not(:last-child) div {
+    text-overflow: -o-ellipsis-lastline;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 1;
+    line-clamp: 1;
+    -webkit-box-orient: vertical;
+  }
+}
+/**找到表头那一行,然后把里面的复选框隐藏掉**/
+.tableWrapper::v-deep .el-table__header-wrapper .el-table__header .el-checkbox {
+  display: none;
+}
+</style>

File diff suppressed because it is too large
+ 2069 - 0
ruoyi-ui/src/views/project/decision/audit.vue


+ 333 - 0
ruoyi-ui/src/views/project/decision/detail.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="detailWrapper">
+    <section class="section1 public-flex">
+      <div class="public-margin-r-20">
+        <h4>
+          投资项目
+          <span class="alreadyStop" v-if="detailInfo.delFlag === '1'"
+            >已终止</span
+          >
+        </h4>
+        <p class="projectNameTit">{{ detailInfo.projectName }}</p>
+      </div>
+
+    </section>
+    <el-divider></el-divider>
+    <section>
+      <!-- :space="200" -->
+      <el-divider></el-divider>
+      <div
+        class="public-flex-between basicsInfo"
+        v-if="detailInfo.projectState != '1'"
+      >
+        <div class="public-flex-center-column">
+          <div>项目公司名称</div>
+          <p
+            style="width: 250px; text-align: center"
+            class="yichu1"
+            v-if="
+              detailInfo.tProjectCompany &&
+              detailInfo.tProjectCompany.companyName
+            "
+          >
+            {{ detailInfo.tProjectCompany.companyName }}
+          </p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>渠道</div>
+          <p
+            v-if="
+              detailInfo.tProjectChannel &&
+              detailInfo.tProjectChannel.channelName
+            "
+          >
+            {{ detailInfo.tProjectChannel.channelName }}
+          </p>
+          <p v-else>无</p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>项目负责人</div>
+          <p>{{ detailInfo.investHead }}</p>
+        </div>
+        <div class="public-flex-center-column" v-if="detailInfo.projectDate">
+          <div>立项通过日期</div>
+          <p>{{ detailInfo.projectDate }}</p>
+        </div>
+        <div class="public-flex-center-column" v-if="detailInfo.decisionDate">
+          <div>投决通过日期</div>
+          <p>{{ detailInfo.decisionDate }}</p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>投前估值(万元)</div>
+          <p>{{ detailInfo.investValuation }}</p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>预计投资金额(万元)</div>
+          <p>{{ detailInfo.investMoney }}</p>
+        </div>
+      </div>
+    </section>
+    <section class="section3">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="投决申请信息" name="0"></el-tab-pane>
+        <el-tab-pane label="项目基本信息" name="1"></el-tab-pane>
+      </el-tabs>
+      <section>
+        <div v-if="activeName === '0'" class="public-padded-20 detail-meeting">
+          <el-tabs type="border-card">
+            <el-tab-pane label="项目投决申请表">
+              <el-form
+                v-if="formTJApply.id"
+                class="special-el-form public-padded-t-20"
+                ref="formTJApply"
+                :model="formTJApply"
+                label-width="120px"
+              >
+                <el-form-item
+                  label="股权/其他合作商务条款"
+                  prop="provision"
+                  class="special-el-form-item"
+                >
+                  <el-input
+                    rows="4"
+                    type="textarea"
+                    maxlength="200"
+                    v-model="formTJApply.provision"
+                    disabled
+                  />
+                </el-form-item>
+                <el-form-item
+                  label="投决资料"
+                  prop="listFile"
+                  class="special-el-form-item"
+                >
+                  <fileItem
+                    ref="fileItemTJApply"
+                    :id="formTJApply.id"
+                  ></fileItem>
+                </el-form-item>
+<!--                <el-form-item
+                  label="通知名单"
+                  prop="participants"
+                  class="special-el-form-item"
+                >
+                  <el-input
+                    rows="4"
+                    type="textarea"
+                    v-model="formTJApply.participants"
+                    disabled
+                  />
+                </el-form-item>-->
+              </el-form>
+              <div
+                v-else
+                class="public-flex-center public-padded-20"
+                style="color: #909399"
+              >
+                暂无数据
+              </div>
+            </el-tab-pane>
+            <el-tab-pane label="项目投决评估评审汇总表">
+              <tableForm
+                :formType="4"
+                ref="voteTableForm"
+                :readonly="true"
+                :showBack="false"
+              ></tableForm>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+        <div v-show="activeName === '1'">
+          <poolForm :type="type" :id="id"></poolForm>
+        </div>
+      </section>
+    </section>
+    <section>
+      <flowBase :procInstId="formTJApply.procInstId" v-if="formTJApply.procInstId"></flowBase>
+    </section>
+  </div>
+</template>
+<script>
+import poolForm from "../../invest/components/poolForm";
+import tableForm from "../../invest/components/tableForm";
+import fileItem from "../../invest/components/fileItem";
+import flowBase from "../flowBase.vue";
+
+import {
+  getPool,
+  listProjectPoolId,
+  getInvestigatelist,
+  getInvestReviewList,
+} from "@/api/invest/pool";
+import {
+  listMeeting,
+  listProjectPoolIdNewDecision,
+} from "@/api/invest/meeting";
+
+import { mapGetters } from "vuex";
+
+export default {
+  name: "decisionDetail",
+  components: {
+    poolForm,
+    tableForm,
+    fileItem,
+    flowBase
+  },
+  data() {
+    return {
+      meetingId: "0",
+      type: "2",
+      id: "",
+      active: 0,
+      detailInfo: {
+        projectName: "",
+      },
+      activeName: "0",
+      formTJApply: {
+        id: null,
+        procInstId:null,
+        projectPoolId: null,
+        projectName: null,
+        provision: null,
+        listFile: null,
+        participants: null,
+        participantsId: null,
+      },
+    };
+  },
+  computed: {
+    ...mapGetters(["user"]),
+  },
+  created() {
+    this.id = this.$route.query.id;
+    this.getDetail();
+    this.getlistProjectPoolIdNewDecision();
+    if (this.$route.query.activeName) {
+      this.activeName = this.$route.query.activeName;
+    }
+  },
+  methods: {
+    getMettingId(type) {
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        meetingType: type,
+        orderByColumn: "createTime",
+        isAsc: "desc",
+        projectPoolId: this.id,
+      };
+      listMeeting(queryParams).then((response) => {
+        let meetingList = response.rows;
+        if (meetingList.length > 0) {
+          let meetingId = meetingList[0].id;
+          if (type === "LX") {
+            this.$refs.approvalTableForm.initialize(meetingId);
+          } else if (type === "TJ") {
+            this.$refs.voteTableForm.initialize(meetingId);
+          }
+        } else {
+          if (type === "LX") {
+            this.$refs.approvalTableForm.showNodata();
+          } else if (type === "TJ") {
+            this.$refs.voteTableForm.showNodata();
+          }
+        }
+      });
+    },
+    handleClick(tab, event) {
+      let that = this;
+      if (this.activeName === "0") {
+        // 项目投决
+        this.getMettingId("TJ");
+        this.getlistProjectPoolIdNewDecision();
+      } else if (this.activeName === "1") {
+        // 项目报备
+        this.getDetail();
+      }
+    },
+
+    // 获取投决申请
+    getlistProjectPoolIdNewDecision() {
+      let that = this;
+      listProjectPoolIdNewDecision(this.id).then((response) => {
+        if (response && response.data) {
+          that.formTJApply = response.data;
+          setTimeout(() => {
+            that.$refs.fileItemTJApply.handleButton();
+            that.$refs.fileItemTJApply.fileList = [];
+            that.$refs.fileItemTJApply.getListFileBusinessId(
+              that.formTJApply.id
+            );
+          }, 300);
+        }
+      });
+    },
+    getDetail() {
+      getPool(this.id).then((response) => {
+        this.detailInfo = response.data;
+        // 项目退出完成n
+        if (response.data.projectState === "n") {
+          this.active = parseInt(response.data.projectStage);
+        } else {
+          this.active = parseInt(response.data.projectStage) - 1;
+        }
+      });
+    },
+
+  },
+};
+</script>
+<style lang="scss" scoped>
+.detailWrapper {
+  padding: 20px 0;
+  width: 92%;
+  margin: 0 auto;
+  .section1 {
+    p {
+      font-size: 24px;
+      font-weight: bold;
+      margin: 0;
+    }
+    > div:first-child {
+      // width: calc(100% - 700px);
+      width: 100%;
+    }
+    .btnList {
+      width: 700px;
+      display: flex;
+      justify-content: flex-end;
+    }
+  }
+  .basicsInfo {
+    font-size: 14px;
+    background: #f1f1f1;
+    margin-top: -24px;
+    width: 100%;
+    padding: 30px 20px 10px;
+    div {
+      color: #7e7d7d;
+    }
+    p {
+      font-size: 16px;
+      color: #333;
+      font-weight: bold;
+    }
+  }
+  .section3 {
+    margin-top: 40px;
+  }
+}
+.projectNameTit {
+}
+.alreadyStop {
+  font-weight: normal;
+  font-size: 12px;
+  background: #ff0000;
+  color: #fff;
+  border-radius: 5px;
+  padding: 5px 10px;
+  margin-left: 10px;
+}
+
+</style>

+ 385 - 0
ruoyi-ui/src/views/project/decision/edit.vue

@@ -0,0 +1,385 @@
+<template>
+  <div class="detailWrapper">
+    <section class="section1 public-flex">
+      <div class="public-margin-r-20">
+        <h4>
+          投资项目
+          <span class="alreadyStop" v-if="detailInfo.delFlag === '1'"
+            >已终止</span
+          >
+        </h4>
+        <p class="projectNameTit">{{ detailInfo.projectName }}</p>
+      </div>
+    </section>
+    <el-divider></el-divider>
+    <section>
+      <!-- :space="200" -->
+      <el-divider></el-divider>
+      <div
+        class="public-flex-between basicsInfo"
+        v-if="detailInfo.projectState != '1'"
+      >
+        <div class="public-flex-center-column">
+          <div>项目公司名称</div>
+          <p
+            style="width: 250px; text-align: center"
+            class="yichu1"
+            v-if="
+              detailInfo.tProjectCompany &&
+              detailInfo.tProjectCompany.companyName
+            "
+          >
+            {{ detailInfo.tProjectCompany.companyName }}
+          </p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>渠道</div>
+          <p
+            v-if="
+              detailInfo.tProjectChannel &&
+              detailInfo.tProjectChannel.channelName
+            "
+          >
+            {{ detailInfo.tProjectChannel.channelName }}
+          </p>
+          <p v-else>无</p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>项目负责人</div>
+          <p>{{ detailInfo.investHead }}</p>
+        </div>
+        <div class="public-flex-center-column" v-if="detailInfo.projectDate">
+          <div>立项通过日期</div>
+          <p>{{ detailInfo.projectDate }}</p>
+        </div>
+        <div class="public-flex-center-column" v-if="detailInfo.decisionDate">
+          <div>投决通过日期</div>
+          <p>{{ detailInfo.decisionDate }}</p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>投前估值(万元)</div>
+          <p>{{ detailInfo.investValuation }}</p>
+        </div>
+        <div class="public-flex-center-column">
+          <div>预计投资金额(万元)</div>
+          <p>{{ detailInfo.investMoney }}</p>
+        </div>
+      </div>
+    </section>
+    <section class="section3">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="投决申请信息" name="0"></el-tab-pane>
+        <el-tab-pane label="项目基本信息" name="1"></el-tab-pane>
+      </el-tabs>
+      <section>
+        <div v-if="activeName === '0'" class="public-padded-20 detail-meeting">
+          <el-tabs type="border-card">
+            <el-tab-pane label="项目投决申请表">
+              <el-form
+                v-if="formTJApply.id"
+                class="special-el-form public-padded-t-20"
+                ref="formTJApply"
+                :model="formTJApply"
+                label-width="120px"
+              >
+                <el-form-item
+                  label="股权/其他合作商务条款"
+                  prop="provision"
+                  class="special-el-form-item"
+                >
+                  <el-input
+                    rows="4"
+                    type="textarea"
+                    maxlength="200"
+                    v-model="formTJApply.provision"
+                    disabled
+                  />
+                </el-form-item>
+                <el-form-item
+                  label="投决资料"
+                  prop="listFile"
+                  class="special-el-form-item"
+                >
+                  <fileItem
+                    ref="fileItemTJApply"
+                    :id="formTJApply.id"
+                  ></fileItem>
+                </el-form-item>
+<!--                <el-form-item
+                  label="通知名单"
+                  prop="participants"
+                  class="special-el-form-item"
+                >
+                  <el-input
+                    rows="4"
+                    type="textarea"
+                    v-model="formTJApply.participants"
+                    disabled
+                  />
+                </el-form-item>-->
+              </el-form>
+              <div
+                v-else
+                class="public-flex-center public-padded-20"
+                style="color: #909399"
+              >
+                暂无数据
+              </div>
+            </el-tab-pane>
+<!--            <el-tab-pane label="项目投决评估评审汇总表">
+              <tableForm
+                :formType="4"
+                ref="voteTableForm"
+                :readonly="true"
+                :showBack="false"
+              ></tableForm>
+            </el-tab-pane>-->
+          </el-tabs>
+        </div>
+        <div v-show="activeName === '1'">
+          <poolForm :type="type" :id="id"></poolForm>
+        </div>
+      </section>
+    </section>
+    <section class="approveBtn">
+      <el-form
+        ref="flowBaseInfo"
+        :model="flowBaseInfo"
+        :rules="rulesFlow"
+        label-width="120px"
+      >
+        <el-form-item class="btnList">
+          <el-button @click="goBack">返 回</el-button>
+          <el-button type="primary" @click="handleComplete(true)">提交</el-button>
+          <el-button type="warning" @click="handleComplete(false)">关闭</el-button>
+        </el-form-item>
+      </el-form>
+    </section>
+  </div>
+</template>
+<script>
+import poolForm from "../../invest/components/poolForm";
+//import tableForm from "../../invest/components/tableForm";
+import fileItem from "../../invest/components/fileItem";
+
+import {
+  getPool
+} from "@/api/invest/pool";
+import {
+  listMeeting,
+  listProjectPoolIdNewDecision,
+} from "@/api/invest/meeting";
+import{
+  decisionComplete
+} from "@/api/project/decision/pool"
+
+import { mapGetters } from "vuex";
+
+export default {
+  name: "investPoolDetail",
+  components: {
+    poolForm,
+    //tableForm,
+    fileItem,
+  },
+  data() {
+    return {
+      showDueApply: false,
+      meetingId: "0",
+      type: "2",
+      id: "",
+      active: 0,
+      detailInfo: {
+        projectName: "",
+      },
+      activeName: "0",
+      formTJApply: {
+        id: null,
+        projectPoolId: null,
+        projectName: null,
+        provision: null,
+        listFile: null,
+        participants: null,
+        participantsId: null,
+        flag:null,
+      },
+      flowBaseInfo:{
+        comment:null,
+        taskId:null
+      },
+      rulesFlow:{
+        comment: [{ required: true, trigger: "blur", message: "请输入" }],
+      }
+    };
+  },
+  computed: {
+    ...mapGetters(["user"]),
+  },
+  created() {
+    this.id = this.$route.query.id;
+    this.flowBaseInfo.taskId=this.$route.query.taskId;
+    this.getlistProjectPoolIdNewDecision();
+    this.getDetail();
+    if (this.$route.query.activeName) {
+      this.activeName = this.$route.query.activeName;
+    }
+  },
+  methods: {
+
+    getMettingId(type) {
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        meetingType: type,
+        orderByColumn: "createTime",
+        isAsc: "desc",
+        projectPoolId: this.id,
+      };
+      listMeeting(queryParams).then((response) => {
+        let meetingList = response.rows;
+        if (meetingList.length > 0) {
+          let meetingId = meetingList[0].id;
+          if (type === "LX") {
+            this.$refs.approvalTableForm.initialize(meetingId);
+          } else if (type === "TJ") {
+            this.$refs.voteTableForm.initialize(meetingId);
+          }
+        } else {
+          if (type === "LX") {
+            this.$refs.approvalTableForm.showNodata();
+          } else if (type === "TJ") {
+            this.$refs.voteTableForm.showNodata();
+          }
+        }
+      });
+    },
+    handleClick(tab, event) {
+      let that = this;
+      if (this.activeName === "0") {
+        // 项目投决
+        this.getMettingId("TJ");
+        this.getlistProjectPoolIdNewDecision();
+      } else if (this.activeName === "1") {
+        // 项目报备
+        this.getDetail();
+      }
+    },
+
+    // 获取投决申请
+    getlistProjectPoolIdNewDecision() {
+      let that = this;
+      listProjectPoolIdNewDecision(this.id).then((response) => {
+        if (response && response.data) {
+          that.formTJApply = response.data;
+          setTimeout(() => {
+            //that.$refs.fileItemTJApply.handleButton();
+            that.$refs.fileItemTJApply.fileList = [];
+            that.$refs.fileItemTJApply.getListFileBusinessId(
+              that.formTJApply.id
+            );
+          }, 300);
+        }
+      });
+    },
+    //项目报备
+    getDetail() {
+      getPool(this.id).then((response) => {
+        this.detailInfo = response.data;
+        // 项目退出完成n
+        if (response.data.projectState === "n") {
+          this.active = parseInt(response.data.projectStage);
+        } else {
+          this.active = parseInt(response.data.projectStage) - 1;
+        }
+      });
+    },
+    /** 加载审批任务弹框 */
+    handleComplete(flag) {
+      this.taskComplete(flag);
+    },
+    /** 用户审批任务 */
+    taskComplete(flag) {
+      this.formTJApply.flag=flag;
+      const params={
+        projectDecision:this.formTJApply,
+        flowBaseInfo: this.flowBaseInfo
+      }
+      decisionComplete(params).then(response => {
+        this.$modal.msgSuccess(response.msg);
+        this.goMyTask();
+      });
+    },
+    /*返回*/
+    goBack() {
+      this.$router.go(-1);
+    },
+    //跳转到我的任务-投资机会
+    goMyTask(){
+      this.$router.push({ path: "/myTask/project/decision/myTask"});
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.detailWrapper {
+  padding: 20px 0;
+  width: 92%;
+  margin: 0 auto;
+  .section1 {
+    p {
+      font-size: 24px;
+      font-weight: bold;
+      margin: 0;
+    }
+    > div:first-child {
+      // width: calc(100% - 700px);
+      width: 100%;
+    }
+    .btnList {
+      width: 700px;
+      display: flex;
+      justify-content: flex-end;
+    }
+  }
+  .basicsInfo {
+    font-size: 14px;
+    background: #f1f1f1;
+    margin-top: -24px;
+    width: 100%;
+    padding: 30px 20px 10px;
+    div {
+      color: #7e7d7d;
+    }
+    p {
+      font-size: 16px;
+      color: #333;
+      font-weight: bold;
+    }
+  }
+  .section3 {
+    margin-top: 40px;
+  }
+  .approveBtn {
+    margin-top: 30px;
+    .btnList {
+      display: flex;
+      justify-content: flex-end;
+      /* 让内部元素(按钮)整体靠右 */
+      gap: 10px; /* 替代 margin,给按钮之间加间距,可选 */
+      padding-right: 50px;
+    }
+  }
+}
+.projectNameTit {
+}
+.alreadyStop {
+  font-weight: normal;
+  font-size: 12px;
+  background: #ff0000;
+  color: #fff;
+  border-radius: 5px;
+  padding: 5px 10px;
+  margin-left: 10px;
+}
+
+</style>

File diff suppressed because it is too large
+ 1081 - 0
ruoyi-ui/src/views/project/decision/myTask.vue


+ 11 - 4
ruoyi-ui/src/views/project/flowBase.vue

@@ -7,7 +7,7 @@
         <th>审批人</th>
         <th>审批结果</th>
         <th>审批时间</th>
-        <th v-if="procDefId && procDefId.includes('dgt-project')">打分表</th>
+        <th v-if="procDefId && (procDefId.includes('dgt-project') || procDefId.includes('dgt-decision'))">打分表</th>
       </tr>
       </thead>
       <tbody>
@@ -16,7 +16,7 @@
         <td>{{ item.createBy }}</td>
         <td>{{ item.comment }}</td>
         <td>{{ item.createDate }}</td>
-        <td v-if="procDefId && procDefId.includes('dgt-project')">
+        <td v-if="procDefId && (procDefId.includes('dgt-project') || procDefId.includes('dgt-decision'))">
           <el-button v-if="item.taskDefKey==='decision' " class="custom-blue-color" size="mini"
                      type="text" icon="el-icon-search" @click="handleDetail(item.createBy,scoringList)">查看</el-button>
         </td>
@@ -54,7 +54,7 @@ export default {
   created() {
     // 组件创建时调用接口获取数据
     this.fetchApprovalData();
-    this.getMettingId();
+    //this.getMettingId();
   },
   methods: {
     fetchApprovalData() {
@@ -65,6 +65,7 @@ export default {
           // 获取第一条数据的某个字段,先判断数组是否有数据
           if (response.rows && response.rows.length > 0) {
             this.procDefId = response.rows[0].procDefId;
+            this.getMettingId()
           }
           console.log('接收到的 信息:', response.rows);
         })
@@ -76,11 +77,17 @@ export default {
       let queryParams = {
         pageNum: 1,
         pageSize: 10,
-        meetingType: "LX",
+        meetingType: "",
         orderByColumn: "createTime",
         isAsc: "desc",
         projectPoolId: this.id,
       };
+      console.log(this.procDefId);
+      if(this.procDefId.includes('dgt-project')){
+        queryParams.meetingType="LX";
+      }else if(this.procDefId.includes('dgt-decision')){
+        queryParams.meetingType="TJ";
+      }
       listMeeting(queryParams).then((response) => {
         let meetingList = response.rows;
         if (meetingList.length > 0) {

File diff suppressed because it is too large
+ 1727 - 0
ruoyi-ui/src/views/project/meetingList.vue