Commit 5e46fcc5 authored by wangxl's avatar wangxl

Merge remote-tracking branch 'origin/master'

parents 6bea9dc4 649d72c7
...@@ -2,11 +2,14 @@ package com.yiboshi.science.dao; ...@@ -2,11 +2,14 @@ package com.yiboshi.science.dao;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yiboshi.science.base.BaseDAO; import com.yiboshi.science.base.BaseDAO;
import com.yiboshi.science.entity.ComExpert; import com.yiboshi.science.entity.ComExpert;
import com.yiboshi.science.entity.SystemMenu; import com.yiboshi.science.entity.SystemMenu;
import com.yiboshi.science.param.dto.ComExpertDTO; import com.yiboshi.science.param.dto.ComExpertDTO;
import com.yiboshi.science.param.dto.ComProjectAuditDTO;
import com.yiboshi.science.param.query.ComExpertQueryVO; import com.yiboshi.science.param.query.ComExpertQueryVO;
import com.yiboshi.science.param.query.ComProjectAuditQueryVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -18,4 +21,6 @@ public interface ComExpertDAO extends BaseMapper<ComExpert>, BaseDAO<ComExpertQu ...@@ -18,4 +21,6 @@ public interface ComExpertDAO extends BaseMapper<ComExpert>, BaseDAO<ComExpertQu
ComExpertDTO getExpertByCertId(String certId); ComExpertDTO getExpertByCertId(String certId);
List<ComExpertDTO> getExpertListByIdList(@Param("ew") Wrapper<SystemMenu> queryWrapper); List<ComExpertDTO> getExpertListByIdList(@Param("ew") Wrapper<SystemMenu> queryWrapper);
Page<ComExpertDTO> getEcaluationStatisticListByPage(Page<ComExpertQueryVO> page, @Param("ew") Wrapper<ComExpertQueryVO> queryWrapper);
} }
...@@ -138,4 +138,10 @@ public class ComExpertDTO extends BaseDTO { ...@@ -138,4 +138,10 @@ public class ComExpertDTO extends BaseDTO {
/** 是否财务专家 */ /** 是否财务专家 */
@ApiModelProperty(value = "是否财务专家", position = 30) @ApiModelProperty(value = "是否财务专家", position = 30)
private Integer isFinance; private Integer isFinance;
/** 年度 */
@ApiModelProperty(value = "年度", position = 30)
private Integer groupYear;
/** 评审项目数 */
@ApiModelProperty(value = "评审项目数", position = 30)
private Integer projectCount;
} }
...@@ -203,6 +203,12 @@ public class ComProjectAuditDTO extends BaseDTO { ...@@ -203,6 +203,12 @@ public class ComProjectAuditDTO extends BaseDTO {
/** 审核结果 */ /** 审核结果 */
@ApiModelProperty(value = "单位名称", position = 41) @ApiModelProperty(value = "单位名称", position = 41)
private String auditResultName; private String auditResultName;
/** 项目总经费(万元) */
@ApiModelProperty(value = "项目总经费(万元)", position = 39)
private BigDecimal totalFunding;
/** 申请科技经费(万元) */
@ApiModelProperty(value = "申请科技经费(万元)", position = 40)
private BigDecimal govFunding;
/** 项目分配信息 */ /** 项目分配信息 */
List<ComProjectAssignDTO> assignList; List<ComProjectAssignDTO> assignList;
/** 批量审核Id */ /** 批量审核Id */
......
...@@ -119,4 +119,7 @@ public class ComExpertQueryVO extends PaginationVO { ...@@ -119,4 +119,7 @@ public class ComExpertQueryVO extends PaginationVO {
/** 角色Id */ /** 角色Id */
@ApiModelProperty(value = "角色Id", position = 7) @ApiModelProperty(value = "角色Id", position = 7)
private String roleId; private String roleId;
/** 年度 */
@ApiModelProperty(value = "年度", position = 30)
private Integer groupYear;
} }
...@@ -64,7 +64,10 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp ...@@ -64,7 +64,10 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
List<ComExpertSpecDTO> ExpertSpecList = comExpertSpecService.getListByExpertId(e.getId()); List<ComExpertSpecDTO> ExpertSpecList = comExpertSpecService.getListByExpertId(e.getId());
e.setSpecList(ExpertSpecList); e.setSpecList(ExpertSpecList);
ExpertSpecList.forEach((p) -> { ExpertSpecList.forEach((p) -> {
e.setSpecName(e.getSpecName() + p.getSpecName() + "、"); if (Objects.isNull(e.getSpecName()))
e.setSpecName(p.getSpecName() + "、");
else
e.setSpecName(e.getSpecName() + p.getSpecName() + "、");
}); });
if (StringUtils.isNotBlank(e.getSpecName())) if (StringUtils.isNotBlank(e.getSpecName()))
e.setSpecName(e.getSpecName().substring(0, e.getSpecName().length() - 1)); e.setSpecName(e.getSpecName().substring(0, e.getSpecName().length() - 1));
...@@ -73,6 +76,30 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp ...@@ -73,6 +76,30 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
return ResponseDataModel.ok(page); return ResponseDataModel.ok(page);
} }
@ApiOperation(value = "获取专家评审统计列表", httpMethod = "GET", notes = "获取专家评审统计列表")
@GetMapping
@RequestMapping("/getEcaluationStatisticListByPage")
@PreAuthorize("hasAnyRole('GOV')")
public ResponseDataModel<Pagination<ComExpertDTO>> getEcaluationStatisticListByPage(@Validated ComExpertQueryVO vo, BindingResult bindingResult) {
Pagination<ComExpertDTO> page = comExpertService.getEcaluationStatisticListByPage(vo);
if (null != page && null != page.getDataList() && page.getDataList().size() != 0) {
page.getDataList().forEach((e) -> {
e.setExpertStateName(CommonEnum.loginState.getEnum(e.getExpertState()).getDescription());
List<ComExpertSpecDTO> ExpertSpecList = comExpertSpecService.getListByExpertId(e.getId());
ExpertSpecList.forEach((p) -> {
if (Objects.isNull(e.getSpecName()))
e.setSpecName(p.getSpecName() + "、");
else
e.setSpecName(e.getSpecName() + p.getSpecName() + "、");
});
if (StringUtils.isNotBlank(e.getSpecName()))
e.setSpecName(e.getSpecName().substring(0, e.getSpecName().length() - 1));
});
}
return ResponseDataModel.ok(page);
}
@ApiOperation(value = "获取专家列表(分页)", httpMethod = "GET", notes = "获取专家列表(分页)") @ApiOperation(value = "获取专家列表(分页)", httpMethod = "GET", notes = "获取专家列表(分页)")
@GetMapping @GetMapping
@RequestMapping("/getAssignExpertList") @RequestMapping("/getAssignExpertList")
......
package com.yiboshi.science.service; package com.yiboshi.science.service;
import com.yiboshi.science.base.BaseService; import com.yiboshi.science.base.BaseService;
import com.yiboshi.science.base.Pagination;
import com.yiboshi.science.entity.ComExpert; import com.yiboshi.science.entity.ComExpert;
import com.yiboshi.science.entity.SelectListItem; import com.yiboshi.science.entity.SelectListItem;
import com.yiboshi.science.param.dto.ComExpertDTO; import com.yiboshi.science.param.dto.ComExpertDTO;
...@@ -69,4 +70,10 @@ public interface ComExpertService extends BaseService<ComExpertQueryVO, ComExper ...@@ -69,4 +70,10 @@ public interface ComExpertService extends BaseService<ComExpertQueryVO, ComExper
*/ */
List<SelectListItem> getExpertListByIdList(Map<String, Object> idList); List<SelectListItem> getExpertListByIdList(Map<String, Object> idList);
/**
* 获取专家列表
* @param vo
* @return
*/
Pagination<ComExpertDTO> getEcaluationStatisticListByPage(ComExpertQueryVO vo);
} }
...@@ -44,6 +44,9 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper ...@@ -44,6 +44,9 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
@Override @Override
protected void setCriteriaForQuery(ComExpertQueryVO vo, QueryWrapper<ComExpertQueryVO> criteria) { protected void setCriteriaForQuery(ComExpertQueryVO vo, QueryWrapper<ComExpertQueryVO> criteria) {
if (Objects.nonNull(vo.getGroupYear())) {
criteria.eq("g.group_year", vo.getGroupYear());
}
if (Objects.nonNull(vo.getUnitId())) { if (Objects.nonNull(vo.getUnitId())) {
criteria.eq("e.unit_id", vo.getUnitId()); criteria.eq("e.unit_id", vo.getUnitId());
} }
...@@ -94,6 +97,14 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper ...@@ -94,6 +97,14 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
return new Pagination<>(dtoList, page.getTotal(), vo.getPageSize()); return new Pagination<>(dtoList, page.getTotal(), vo.getPageSize());
} }
public Pagination<ComExpertDTO> getEcaluationStatisticListByPage(ComExpertQueryVO vo) {
QueryWrapper criteria = new QueryWrapper();
setCriteriaForQuery(vo, criteria);
Page<ComExpertQueryVO> page = new Page<>(vo.getPageIndex(), vo.getPageSize());
List<ComExpertDTO> dtoList = comExpertDAO.getEcaluationStatisticListByPage(page, criteria).getRecords();
return new Pagination<>(dtoList, page.getTotal(), vo.getPageSize());
}
public ComExpertDTO getExpertById(String id) { public ComExpertDTO getExpertById(String id) {
ComExpertDTO dto = comExpertDAO.getExpertById(id); ComExpertDTO dto = comExpertDAO.getExpertById(id);
if (null != dto) { if (null != dto) {
......
...@@ -28,6 +28,26 @@ ...@@ -28,6 +28,26 @@
</where> </where>
ORDER BY d.tree_code ASC ORDER BY d.tree_code ASC
</select> </select>
<select id="getEcaluationStatisticListByPage" resultType="com.yiboshi.science.param.dto.ComExpertDTO">
SELECT a.id, e.person_name,e.cert_id,e.mobile,e.email,e.unit_id,e.work_unit,d.unit_name,d.unit_type,i.name title_name,f.username,f.password,
g.group_year, count(c.proj_id) as projectCount
FROM com_expert a
left join com_project_group_assign b on a.id = b.expert_id
left join com_project_group_detail c on b.group_id = c.group_id
left join com_project_group g on b.group_id = g.id
left join com_person e on a.person_id = e.id
left join com_unit d on e.unit_id = d.id
left join system_user f on f.person_id = e.id
left join system_parameter i on e.title=i.id and i.type_id=7
left join com_expert_spec p on a.id=p.expert_id
left join system_parameter j on p.spec_id=j.id
left join system_parameter k on j.parent_id = k.id
left join system_parameter m on k.parent_id = m.id
<where>
${ew.sqlSegment}
</where>
group by a.id, g.group_year
</select>
<select id="getExpertById" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComExpertDTO"> <select id="getExpertById" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComExpertDTO">
SELECT x.*,a.person_name,a.cert_id,a.sex,a.birthday,a.mobile,a.email,a.education,a.title,a.unit_id,a.work_unit,a.degree SELECT x.*,a.person_name,a.cert_id,a.sex,a.birthday,a.mobile,a.email,a.education,a.title,a.unit_id,a.work_unit,a.degree
,b.tree_code,b.unit_name,d.name education_name,e.name title_name,f.name degree_name ,b.tree_code,b.unit_name,d.name education_name,e.name title_name,f.name degree_name
......
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
SELECT SELECT
a.*,c.id proj_id,c.proj_name,c.proj_no,c.version_no,c.app_no,c.proj_class,c.start_date,c.end_date,c.proj_state,c.knowledge_id, a.*,c.id proj_id,c.proj_name,c.proj_no,c.version_no,c.app_no,c.proj_class,c.start_date,c.end_date,c.proj_state,c.knowledge_id,
c.total_score,c.average_score,c.technology_score,c.technology_average_score,c.economy_score,c.economy_average_score,c.calculate_score, c.total_score,c.average_score,c.technology_score,c.technology_average_score,c.economy_score,c.economy_average_score,c.calculate_score,
d.unit_name app_unit_name,e.person_name app_person_name,p.name as knowledgeName,p1.name as knowledgeParentName, d.unit_name app_unit_name,e.person_name app_person_name,p.name as knowledgeName,p1.name as knowledgeParentName, f.total_funding, f.gov_funding,
(case when g.unit_name = d.unit_name then '直属' else REPLACE(g.unit_name,'卫生健康局','') end) as upUnitName (case when g.unit_name = d.unit_name then '直属' else REPLACE(g.unit_name,'卫生健康局','') end) as upUnitName
FROM com_project_audit a FROM com_project_audit a
left join com_project c on a.audit_object_id=c.id left join com_project c on a.audit_object_id=c.id
left join com_project_basic f on c.id = f.proj_id
left join com_unit d on c.app_unit_id=d.id left join com_unit d on c.app_unit_id=d.id
left join com_unit g on substring(d.tree_code, 1, 10) = g.tree_code left join com_unit g on substring(d.tree_code, 1, 10) = g.tree_code
left join com_person e on c.app_person_id=e.id left join com_person e on c.app_person_id=e.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment