浏览代码

增加已评审项目列表、未评审项目列表

master
WendyYang 1年前
父节点
当前提交
208d103014
共有 8 个文件被更改,包括 192 次插入0 次删除
  1. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +62
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ReviewProjectDTO.java
  3. +37
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ReviewProjectListReq.java
  4. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  5. +12
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.java
  6. +50
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml
  7. +12
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingExpertService.java
  8. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingExpertServiceImpl.java

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java 查看文件

@@ -4,6 +4,7 @@ package com.ningdatech.pmapi.meeting.controller;
import com.ningdatech.basic.model.IdVo;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO;
import com.ningdatech.pmapi.meeting.entity.req.*;
import com.ningdatech.pmapi.meeting.entity.vo.*;
import com.ningdatech.pmapi.meeting.manage.MeetingManage;
@@ -165,4 +166,10 @@ public class MeetingController {
meetingManage.confirmedRoster(req.getMeetingId());
}

@GetMapping("/listReviewProject")
@ApiOperation("评审会议列表")
public PageVo<ReviewProjectDTO> listReviewProject(ReviewProjectListReq req){
return meetingManage.pageReviewProject(req);
}

}

+ 62
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ReviewProjectDTO.java 查看文件

@@ -0,0 +1,62 @@
package com.ningdatech.pmapi.meeting.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
* <p>
* ReviewProjectDTO
* </p>
*
* @author WendyYang
* @since 10:27 2023/3/8
*/
@Data
public class ReviewProjectDTO {

@ApiModelProperty("会议ID")
private Long meetingId;

@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("项目类型")
private Integer projectType;

@ApiModelProperty("预算年度")
private Integer projectYear;

@ApiModelProperty("申报金额")
private BigDecimal declaredAmount;

@ApiModelProperty("申报单位")
private String buildOrgName;

@ApiModelProperty("评审时间")
private LocalDateTime reviewTime;

@ApiModelProperty("评审类型")
private Integer reviewType;

@ApiModelProperty("联系人")
private String connecter;

@ApiModelProperty("联系方式")
private String contact;

@ApiModelProperty("业务领域")
private String bizDomain;

@ApiModelProperty("是否是专家组长")
private Boolean isHeadman;

@ApiModelProperty("是否已评价:0 未自评、1 已自评、2 已终评")
private Integer reviewed;

}

+ 37
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ReviewProjectListReq.java 查看文件

@@ -0,0 +1,37 @@
package com.ningdatech.pmapi.meeting.entity.req;

import com.ningdatech.basic.model.PagePo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
* <p>
* ReviewProjectListReq
* </p>
*
* @author WendyYang
* @since 10:54 2023/3/8
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class ReviewProjectListReq extends PagePo {

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("建设单位")
private String buildOrgName;

private Long userId;

@ApiModelProperty("是否已评审")
private Boolean reviewed;

private LocalDateTime reviewTimeMin;

private LocalDateTime reviewTimeMax;

}

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java 查看文件

@@ -696,4 +696,9 @@ public class MeetingManage {
}
}

public PageVo<ReviewProjectDTO> pageReviewProject(ReviewProjectListReq req) {
Page<ReviewProjectDTO> page = meetingExpertService.pageReviewProjectList(req);
return PageVo.of(page.getRecords(), page.getTotal());
}

}

+ 12
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.java 查看文件

@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert;
import com.ningdatech.pmapi.meeting.entity.dto.MeetingAndAttendStatusDTO;
import com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.entity.req.ReviewProjectListReq;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
@@ -78,4 +80,14 @@ public interface MeetingExpertMapper extends BaseMapper<MeetingExpert> {
**/
List<MeetingExpert> listExpertLastByMeetingIds(@Param("meetingIds") Collection<Long> meetingIds);

/**
* 查询专家待评审项目
*
* @param page 分页
* @param req 查询参数
* @return 待评审项目分页数据
* @author WendyYang
**/
Page<ReviewProjectDTO> pageReviewProjectList(Page<ReviewProjectDTO> page, @Param("p") ReviewProjectListReq req);

}

+ 50
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml 查看文件

@@ -72,4 +72,54 @@
#{item}</foreach>) em WHERE rowNumber = 1
</select>

<sql id="reviewedByHeadman">
<if test="p.reviewed">
and exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by =
me.expert_id and is_final = true)
</if>
<if test="!p.reviewed">
and not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by =
me.expert_id and is_final = true)
</if>
</sql>

<sql id="reviewedByNotHeadman">
<if test="p.reviewed">
and exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by =
me.expert_id)
</if>
<if test="!p.reviewed">
and not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by =
me.expert_id)
</if>
</sql>

<select id="pageReviewProjectList" resultType="com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO">
select mip.project_id, np.project_name, np.project_type, np.project_year, np.build_org_name,
np.biz_domain, np.declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,
m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where ner.project_id = np.id
and ner.create_by = me.expert_id) reviewed
from nd_project np inner join meeting_inner_project mip on mip.project_id = np.id
inner join meeting m on m.id = mip.meeting_id
inner join meeting_expert me on m.id = me.meeting_id
where m.is_inner_project = true
<if test="p.reviewed != null">
if(me.is_headman,<include refid="reviewedByHeadman"/>,<include refid="reviewedByNotHeadman"/>)
</if>
and me.expert_id = #{p.userId}
<if test="p.projectName != null and p.projectName.length > 0">
and np.project_name like concat('%', #{p.projectName}, '%')
</if>
<if test="p.buildOrgName != null and p.buildOrgName.length > 0">
and np.build_org_name like concat('%', #{buildOrgName}, '%')
</if>
<if test="p.reviewTimeMin != null">
and m.start_time &gt;= #{p.reviewTimeMin}
</if>
<if test="p.reviewTimeMax != null">
and m.start_time &lt;= #{p.reviewTimeMax}
</if>
order by m.start_time desc
</select>

</mapper>

+ 12
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingExpertService.java 查看文件

@@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert;
import com.ningdatech.pmapi.meeting.entity.dto.CountConfirmByMeetingIdDTO;
import com.ningdatech.pmapi.meeting.entity.dto.MeetingAndAttendStatusDTO;
import com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum;
import com.ningdatech.pmapi.meeting.entity.req.ReviewProjectListReq;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Collections;
@@ -143,4 +146,13 @@ public interface IMeetingExpertService extends IService<MeetingExpert> {
return listExpertLastByMeetingIds(Collections.singletonList(meetingId));
}

/**
* 查询专家待评审项目
*
* @param req {@link ReviewProjectListReq}
* @return 待评审项目分页数据
* @author WendyYang
**/
Page<ReviewProjectDTO> pageReviewProjectList(ReviewProjectListReq req);

}

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingExpertServiceImpl.java 查看文件

@@ -9,8 +9,10 @@ import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteRule;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert;
import com.ningdatech.pmapi.meeting.entity.dto.CountConfirmByMeetingIdDTO;
import com.ningdatech.pmapi.meeting.entity.dto.MeetingAndAttendStatusDTO;
import com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum;
import com.ningdatech.pmapi.meeting.entity.req.ReviewProjectListReq;
import com.ningdatech.pmapi.meeting.mapper.ExpertInviteRuleMapper;
import com.ningdatech.pmapi.meeting.mapper.MeetingExpertMapper;
import com.ningdatech.pmapi.meeting.service.IMeetingExpertService;
@@ -127,4 +129,9 @@ public class MeetingExpertServiceImpl extends ServiceImpl<MeetingExpertMapper, M
return baseMapper.listExpertLastByMeetingIds(meetingIds);
}

@Override
public Page<ReviewProjectDTO> pageReviewProjectList(ReviewProjectListReq req) {
return baseMapper.pageReviewProjectList(req.page(), req);
}

}

正在加载...
取消
保存