Commit 9aecca80 authored by 徐俊's avatar 徐俊

xujun

parent 203f9325
...@@ -50,4 +50,6 @@ public interface ComProjectAuditDAO extends BaseMapper<ComProjectAudit>, BaseDAO ...@@ -50,4 +50,6 @@ public interface ComProjectAuditDAO extends BaseMapper<ComProjectAudit>, BaseDAO
List<EvaluationStatisticDTO> getEvaluationStatistic(Integer reportYear); List<EvaluationStatisticDTO> getEvaluationStatistic(Integer reportYear);
List<ProjectGroupScoreOrderDTO> getProjectGroupScoreOrder(Integer reportYear); List<ProjectGroupScoreOrderDTO> getProjectGroupScoreOrder(Integer reportYear);
List<TalentEvaluationStatisticDTO> getTalentEvaluationStatistic(Integer reportYear);
} }
package com.yiboshi.science.param.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class TalentEvaluationExportExcelDTO implements Serializable {
public List<TalentEvaluationStatisticDTO> evaluationList;
public List<String> mergeList;
}
package com.yiboshi.science.param.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class TalentEvaluationStatisticDTO implements Serializable {
/** 人才申报Id */
private String talentId;
/** 人才Id */
private String personId;
/** 证件号 */
private String certId;
/** 姓名 */
private String personName;
/** 人才类别Id */
private String talentCategory;
/** 人才类别名称 */
private String talentCategoryName;
/** 人才单位 */
private String unitName;
/** 专家证件号 */
private String expertCertId;
/** 专家姓名 */
private String expertName;
/** 专家单位 */
private String expertUnitName;
/** 专家手机好 */
private String mobile;
/** 专家评分 */
private BigDecimal evaluationScore;
/** 评审内容 */
private String remark;
/** 审核状态名称 */
private String auditStateName;
/** 总分 */
private BigDecimal totalScore;
/** 平均分 */
private BigDecimal averageScore;
}
...@@ -278,4 +278,15 @@ public class StatisticalController { ...@@ -278,4 +278,15 @@ public class StatisticalController {
return ResponseDataModel.ok(comProjectAuditService.getProjectGroupScoreOrder(reportYear, startRow, rowMarkList)); return ResponseDataModel.ok(comProjectAuditService.getProjectGroupScoreOrder(reportYear, startRow, rowMarkList));
} }
@ApiOperation(value = "导出excel数据列表", httpMethod = "GET", notes = "导出excel数据列表")
@GetMapping
@RequestMapping("/getTalentEvaluationStatistic")
@PreAuthorize("hasAnyRole('GOV')")
public ResponseDataModel<TalentEvaluationExportExcelDTO> getTalentEvaluationStatistic(Integer reportYear, Integer startRow, String rowMarks) {
String[] split = rowMarks.split(",");
List<String> rowMarkList = Arrays.asList(split);
return ResponseDataModel.ok(comProjectAuditService.getTalentEvaluationStatistic(reportYear, startRow, rowMarkList));
}
} }
...@@ -214,4 +214,11 @@ public interface ComProjectAuditService extends BaseService<ComProjectAuditQuery ...@@ -214,4 +214,11 @@ public interface ComProjectAuditService extends BaseService<ComProjectAuditQuery
* @return * @return
*/ */
EvaluationExportExcelDTO getProjectGroupScoreOrder(Integer reportYear, Integer startRow, List<String> rowMarkList); EvaluationExportExcelDTO getProjectGroupScoreOrder(Integer reportYear, Integer startRow, List<String> rowMarkList);
/**
* 人才评审结果统计
* @param reportYear
* @return
*/
TalentEvaluationExportExcelDTO getTalentEvaluationStatistic(Integer reportYear, Integer startRow, List<String> rowMarkList);
} }
...@@ -700,4 +700,35 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD ...@@ -700,4 +700,35 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
dto.setMergeList(mergeList); dto.setMergeList(mergeList);
return dto; return dto;
} }
public TalentEvaluationExportExcelDTO getTalentEvaluationStatistic(Integer reportYear, Integer startRow, List<String> rowMarkList) {
List<TalentEvaluationStatisticDTO> list = comProjectAuditDAO.getTalentEvaluationStatistic(reportYear);
//按申请编号排序
list = list.stream().sorted(Comparator.comparing(TalentEvaluationStatisticDTO::getCertId)).collect(Collectors.toList());
TalentEvaluationExportExcelDTO dto = new TalentEvaluationExportExcelDTO();
dto.setEvaluationList(list);
list.forEach(e -> {
if (Objects.nonNull(e.getTalentCategory()))
e.setTalentCategoryName(systemParameterService.getParameterById(e.getTalentCategory()).getName());
});
Map<String, List<TalentEvaluationStatisticDTO>> evaluationdMap = list.stream()
.collect(Collectors.groupingBy(TalentEvaluationStatisticDTO::getCertId));
SortedMap<String, List<TalentEvaluationStatisticDTO>> sortedMap = new TreeMap<>(evaluationdMap);
AtomicInteger rowCount = new AtomicInteger(startRow);
List<String> mergeList = new ArrayList<>();
sortedMap.forEach((k, v) -> {
rowMarkList.forEach(e -> {
mergeList.add(e + rowCount.get() + ":" + e + (rowCount.get() + v.size() - 1));
});
rowCount.set(rowCount.get() + v.size());
});
dto.setMergeList(mergeList);
return dto;
}
} }
...@@ -360,4 +360,17 @@ ...@@ -360,4 +360,17 @@
left join com_unit h on substring(g.tree_code, 1, 10) = h.tree_code and h.unit_type = 0 left join com_unit h on substring(g.tree_code, 1, 10) = h.tree_code and h.unit_type = 0
where a.group_year = #{reportYear} order by a.display_order, a.group_name, c.calculate_score desc where a.group_year = #{reportYear} order by a.display_order, a.group_name, c.calculate_score desc
</select> </select>
<select id="getTalentEvaluationStatistic" resultType="com.yiboshi.science.param.dto.TalentEvaluationStatisticDTO">
select b.id as talentId, a.person_id, c.cert_id, c.person_name, a.talent_category, f.unit_name, e.cert_id as expertCertId, e.person_name as expertName, g.unit_name as expertUnitName, e.mobile,
b.total_score as evaluation_score, b.remark,
case when b.audit_state is null or b.audit_state = 0 then '未评审' when b.audit_state = 1 then '评审中' else '已评审' end as audit_state_name, a.total_score, a.average_score
from com_talent_assign b left join com_talent_apply a on a.id = b.talent_id
left join com_person c on a.person_id = c.id
left join com_expert d on b.expert_id = d.id
left join com_person e on d.person_id = e.id
left join com_unit f on a.app_unit_id = f.id
left join com_unit g on e.unit_id = g.id
where b.assign_year = #{reportYear}
order by c.cert_id, c.person_name
</select>
</mapper> </mapper>
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