Commit 69a3ae0d by 阳浪

培训测试统计

parent 8b850a02
...@@ -37,4 +37,7 @@ public interface EventTrackApiClients { ...@@ -37,4 +37,7 @@ public interface EventTrackApiClients {
@GetMapping("/api/eventTrack/queryListByType") @GetMapping("/api/eventTrack/queryListByType")
List<EventTrackVo> queryListByType(@RequestParam("type") Integer type, @RequestParam("accountId") Long accountId); List<EventTrackVo> queryListByType(@RequestParam("type") Integer type, @RequestParam("accountId") Long accountId);
@GetMapping("/api/eventTrack/getExamTotal")
Integer getExamTotal(@RequestParam("subType") String subType,@RequestParam("year") String year);
} }
package com.yizhi.site.application.vo.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* com.yizhi.site.application.vo.domain
* 培训测试统计
* @author yanglang
* @create 2025-02-18 16:29:21
*/
@Data
public class ExamStaVo {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "培训总人数")
private Integer examNum;
@ApiModelProperty(value = "参加总人数")
private Integer joinNum;
@ApiModelProperty(value = "补考合格率")
private String qualifidNum;
@ApiModelProperty(value = "一次合格率")
private String qualifiedNumFrist;
}
...@@ -58,4 +58,9 @@ public class EventTrackController { ...@@ -58,4 +58,9 @@ public class EventTrackController {
public List<EventTrackVo> queryListByType(@RequestParam("type") Integer type, @RequestParam("accountId") Long accountId){ public List<EventTrackVo> queryListByType(@RequestParam("type") Integer type, @RequestParam("accountId") Long accountId){
return eventTrackService.queryListByType(type,accountId); return eventTrackService.queryListByType(type,accountId);
} }
@GetMapping("/api/eventTrack/getExamTotal")
public Integer getExamTotal(@RequestParam("subType") String subType,@RequestParam("year") String year){
return eventTrackService.getExamTotal(subType,year);
}
} }
...@@ -30,4 +30,6 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> { ...@@ -30,4 +30,6 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
Integer getNum(@Param("type")Integer type, @Param("businessId")Long businessId); Integer getNum(@Param("type")Integer type, @Param("businessId")Long businessId);
List<EventTrackDeptNumVo> queryGropByList(); List<EventTrackDeptNumVo> queryGropByList();
Integer getExamTotal(@Param("subType")String subType,@Param("year")String year);
} }
...@@ -31,4 +31,6 @@ public interface EventTrackService extends IService<EventTrack> { ...@@ -31,4 +31,6 @@ public interface EventTrackService extends IService<EventTrack> {
List<EventTrackDeptNumVo> queryDeptByType(String date, List<Integer> types); List<EventTrackDeptNumVo> queryDeptByType(String date, List<Integer> types);
List<EventTrackVo> queryListByType(Integer type, Long accountId); List<EventTrackVo> queryListByType(Integer type, Long accountId);
Integer getExamTotal(String subType,String year);
} }
...@@ -286,6 +286,11 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr ...@@ -286,6 +286,11 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
return eventTrackVoList; return eventTrackVoList;
} }
@Override
public Integer getExamTotal(String subType,String year) {
return this.baseMapper.getExamTotal(subType,year);
}
public String getDateString(String date) { public String getDateString(String date) {
String dateString = DateUtil.toDay(new Date()); String dateString = DateUtil.toDay(new Date());
String[] dateArrays = dateString.split("-"); String[] dateArrays = dateString.split("-");
......
...@@ -123,4 +123,8 @@ ...@@ -123,4 +123,8 @@
0 as num 0 as num
FROM cloud_system.authz_user_group aug FROM cloud_system.authz_user_group aug
</select> </select>
<select id="getExamTotal" resultType="java.lang.Integer">
SELECT COUNT(DISTINCT create_by_id) FROM cloud_portal.event_track
WHERE sub_type =#{subType} and DATE_FORMAT(create_time,'%Y') = #{year}
</select>
</mapper> </mapper>
\ No newline at end of file
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