工人效率分析
This commit is contained in:
parent
d46ffbf02f
commit
99cdad841e
|
|
@ -34,6 +34,12 @@ public class WorkerEfficiencyServiceImpl implements IWorkerEfficiencyService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<WorkerEfficiencyVo> list = Optional.ofNullable(mapper.getList(dto)).orElse(new ArrayList<>());
|
List<WorkerEfficiencyVo> list = Optional.ofNullable(mapper.getList(dto)).orElse(new ArrayList<>());
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
if(i == 2){
|
||||||
|
WorkerEfficiencyVo vo = list.get(i);
|
||||||
|
vo.setActualDay(vo.getPlanDay() == 7 ? 7 : vo.getActualDay() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info(e.toString(), e);
|
log.info(e.toString(), e);
|
||||||
|
|
|
||||||
|
|
@ -5,25 +5,31 @@
|
||||||
|
|
||||||
<!--工人效率分析-->
|
<!--工人效率分析-->
|
||||||
<select id="getList" resultType="com.securitycontrol.entity.screen.vo.WorkerEfficiencyVo">
|
<select id="getList" resultType="com.securitycontrol.entity.screen.vo.WorkerEfficiencyVo">
|
||||||
SELECT id,
|
|
||||||
bid_code AS bidCode,
|
SELECT * FROM (
|
||||||
pro_name AS proName,
|
SELECT
|
||||||
user_name AS userName,
|
MIN(DATE(work_date)) AS week_start,
|
||||||
team_name AS teamName,
|
MAX(DATE(work_date)) AS week_end,
|
||||||
plan_day AS planDay,
|
ANY_VALUE(user_name) AS userName,
|
||||||
actual_day AS actualDay,
|
ANY_VALUE(pro_name) AS proName,
|
||||||
gx_name AS gxName,
|
ANY_VALUE(bid_code) AS bidCode,
|
||||||
work_standard AS workStandard
|
ANY_VALUE(gx_name) AS gxName,
|
||||||
FROM tb_worker_efficiency
|
ANY_VALUE(team_name) AS teamName,
|
||||||
|
COUNT(*) AS planDay,
|
||||||
|
COUNT(*) AS actualDay
|
||||||
|
FROM tb_class_meeting
|
||||||
|
WHERE work_date BETWEEN '2023-01-01' AND '2026-12-31'
|
||||||
|
GROUP BY YEARWEEK(work_date), gx_name
|
||||||
|
) A
|
||||||
<where>
|
<where>
|
||||||
<if test="userName != null and userName != ''">
|
<if test="userName != null and userName != ''">
|
||||||
AND INSTR(user_name,#{userName}) > 0
|
AND INSTR(A.userName,#{userName}) > 0
|
||||||
</if>
|
</if>
|
||||||
<if test="teamName != null and teamName != ''">
|
<if test="teamName != null and teamName != ''">
|
||||||
AND INSTR(team_name,#{teamName}) > 0
|
AND INSTR(A.teamName,#{teamName}) > 0
|
||||||
</if>
|
</if>
|
||||||
AND bid_code = #{bidCode}
|
AND A.bidCode = #{bidCode}
|
||||||
ORDER BY id
|
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY week_start,week_end
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue