bug修复

This commit is contained in:
Administrator 2023-07-07 15:58:47 +08:00
parent 0a4d175176
commit 27df1993ec
6 changed files with 61 additions and 22 deletions

View File

@ -54,7 +54,8 @@
<select id="sumConsumeList" resultMap="MaterialDetailsMap">
select zmt.name,
IFNULL(sum(zmd.consume_value), 0) as consume_value
IFNULL(sum(zmd.consume_value), 0) as consume_value,
IFNULL(sum(zmd.plan_value), 0) as plan_value
from zjsj_material_type zmt
left join zjsj_material_details zmd on zmt.id = zmd.type_id
where zmt.project_sn = #{projectSn}

View File

@ -44,13 +44,49 @@
<select id="selectAttendanceDetailByPage"
resultType="com.zhgd.xmgl.modules.realnamestatistics.entity.vo.WorkerMonthAttendanceStatisticsVo">
SELECT i.worker_name worker_name,i.person_sn,day1, day2, day3,
day4, day5, day6, day7, day8, day9, day10, day11, day12, day13, day14, day15, day16,
day17, day18, day19, day20, day21, day22, day23, day24, day25, day26, day27, day28,
day29, day30, day31,p.project_name,i.id_card_big_photo_url,ei.enterprise_name
SELECT i.worker_name worker_name,i.person_sn,
IFNULL(day1,0) day1,
IFNULL(day2,0) day2,
IFNULL(day3,0) day3,
IFNULL(day4,0) day4,
IFNULL(day5,0) day5,
IFNULL(day6,0) day6,
IFNULL(day7,0) day7,
IFNULL(day8,0) day8,
IFNULL(day9,0) day9,
IFNULL(day10,0) day10,
IFNULL(day11,0) day11,
IFNULL(day12,0) day12,
IFNULL(day13,0) day13,
IFNULL(day14,0) day14,
IFNULL(day15,0) day15,
IFNULL(day16,0) day16,
IFNULL(day17,0) day17,
IFNULL(day18,0) day18,
IFNULL(day19,0) day19,
IFNULL(day20,0) day20,
IFNULL(day21,0) day21,
IFNULL(day22,0) day22,
IFNULL(day23,0) day23,
IFNULL(day24,0) day24,
IFNULL(day25,0) day25,
IFNULL(day26,0) day26,
IFNULL(day27,0) day27,
IFNULL(day28,0) day28,
IFNULL(day29,0) day29,
IFNULL(day30,0) day30,
IFNULL(day31,0) day31,
p.project_name,i.id_card_big_photo_url,ei.enterprise_name
from worker_info i
INNER JOIN project p on i.project_sn=p.project_sn
INNER JOIN worker_month_attendance_statistics s on i.person_sn=s.person_sn
LEFT JOIN worker_month_attendance_statistics s on (i.person_sn=s.person_sn
<if test="queryTime != null and queryTime != ''">
AND s.query_time=#{queryTime}
</if>
<if test="time != null and time != ''">
AND s.query_time=#{time}
</if>
)
LEFT JOIN team_info tm on tm.id=i.team_id
LEFT JOIN worker_type t on t.id=tm.worker_type_id
LEFT JOIN department_info d on d.id=i.department_id
@ -69,9 +105,6 @@
<if test="personType != null and personType != ''">
AND i.person_type=#{personType}
</if>
<if test="time != null and time != ''">
AND s.query_time=#{time}
</if>
<if test="groupId != null and groupId != ''">
AND i.team_id = #{groupId}
</if>
@ -81,9 +114,6 @@
<if test="workerName != null and workerName != ''">
AND i.worker_name like concat ('%',#{workerName},'%')
</if>
<if test="queryTime != null and queryTime != ''">
AND s.query_time=#{queryTime}
</if>
<if test="personSn != null and personSn != ''">
AND i.person_sn=#{personSn}
</if>

View File

@ -1,5 +1,7 @@
package com.zhgd.xmgl.modules.video.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.tree.TreeNode;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap;

View File

@ -16,6 +16,9 @@ public class PersonnelSituationVO {
@ApiModelProperty(value = "今日出勤")
private Long todayAtte;
@ApiModelProperty(value = "今日劳务人员出勤人数")
private Long todayWorkerAtte;
@ApiModelProperty(value = "在场")
private Long bePresent;

View File

@ -2271,21 +2271,24 @@
<select id="getPersonnelSituation" resultType="com.zhgd.xmgl.modules.worker.entity.vo.PersonnelSituationVO">
select
-- 今日出勤
<!-- 今日出勤-->
IFNULL(sum(if(to_days(temp.create_time) = to_days(now()), 1, 0)), 0) todayAtte,
-- 在场
<!-- 今日劳务人员出勤人数-->
IFNULL(sum(if(to_days(temp.create_time) = to_days(now()) and temp.person_type=1, 1, 0)), 0) todayWorkerAtte,
<!-- 在场-->
IFNULL(sum(if(temp.inService_type = 1, 1, 0)), 0) bePresent,
-- 现场
<!-- 现场-->
IFNULL(sum(if(temp.pass_type = 1, 1, 0)), 0) scene,
-- 今日进场
<!-- 今日进场-->
IFNULL(sum(if(temp.enter_date = current_date, 1, 0)), 0) todayMobilization,
-- 今日退场
<!-- 今日退场-->
IFNULL(sum(if(to_days(temp.exit_date) = to_days(now()), 1, 0)), 0) todayExit
from (select wa.create_time,
wi.inService_type,
wa.pass_type,
wi.enter_date,
wi.exit_date
wi.exit_date,
wi.person_type
from worker_info wi
left join
(
@ -2384,7 +2387,7 @@
FROM worker_info w
RIGHT JOIN team_info t ON w.team_id = t.id
RIGHT JOIN worker_type wt ON t.worker_type_id = wt.id
WHERE wt.id = 11
WHERE wt.type_name = '特殊工种' and wt.project_sn = #{projectSn}
and w.project_sn = #{projectSn}
</select>
</mapper>

View File

@ -143,7 +143,7 @@
LEFT JOIN (SELECT DISTINCT wp.project_sn
FROM worker_wages_payment wp
JOIN project p1 on wp.project_sn=p1.project_sn
where wp.pay_month = #{param.payMonth}) t ON t.project_sn = p.project_sn
where wp.pay_month = #{payMonth}) t ON t.project_sn = p.project_sn
where 1=1
<if test="projectSnList != null and projectSnList != ''">
and p.project_sn in
@ -159,7 +159,7 @@
ifnull(sum(if(wp.pay_status = 0 or wp.pay_status is null, 1, 0)), 0) unpaidUserNum
from worker_info a
LEFT JOIN worker_wages_payment wp ON (a.person_sn = wp.person_sn and a.project_sn = wp.project_sn and
wp.pay_month = #{param.payMonth})
wp.pay_month = #{payMonth})
where a.inService_type = 1
<if test="projectSnList != null and projectSnList != ''">
and a.project_sn in