Merge remote-tracking branch 'origin/main'

This commit is contained in:
方亮 2025-10-21 13:20:24 +08:00
commit e9ce5d7e8a
4 changed files with 23 additions and 9 deletions

View File

@ -70,7 +70,16 @@ public class WorkerStatisticsServiceImpl implements WorkerStatisticsService {
*/ */
@Override @Override
public List<BmWorkerEinDayRecordVo> getWorkerEinDayRecordDetail(PmWorker pmWorker) { public List<BmWorkerEinDayRecordVo> getWorkerEinDayRecordDetail(PmWorker pmWorker) {
return mapper.getWorkerEinDayRecordDetail(pmWorker); List<BmWorkerEinDayRecordVo> list = mapper.getWorkerEinDayRecordDetail(pmWorker);
//因为补卡的时候deviceCode存的是补卡这里直接置空
if (list.size()>0){
for (BmWorkerEinDayRecordVo bmWorkerEinDayRecordVo:list) {
if ("1".equals(bmWorkerEinDayRecordVo.getIsRepair())){
bmWorkerEinDayRecordVo.setDeviceCode(null);
}
}
}
return list;
} }
/** /**

View File

@ -77,7 +77,8 @@
is_repair, is_repair,
device_code, device_code,
id, id,
create_time create_time,
att_time
</trim> </trim>
VALUES VALUES
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -94,6 +95,7 @@
1, 1,
'补卡', '补卡',
#{idCode}, #{idCode},
sysdate(),
sysdate() sysdate()
</trim> </trim>
</insert> </insert>

View File

@ -26,7 +26,7 @@
</select> </select>
<select id="getEinNumByHis" resultType="com.bonus.bmw.domain.vo.ProStatisticsPo"> <select id="getEinNumByHis" resultType="com.bonus.bmw.domain.vo.ProStatisticsPo">
SELECT SELECT
count(pp.worker_id) AS einNumHis, count(Distinct pp.worker_id) AS einNumHis,
min(pp.ein_time) as einTime, min(pp.ein_time) as einTime,
max(pp.exit_time) as exitTime, max(pp.exit_time) as exitTime,
sum(if(ein_status=2 and is_upload_file = 1,1,0)) as exitUploadFile, sum(if(ein_status=2 and is_upload_file = 1,1,0)) as exitUploadFile,
@ -59,11 +59,12 @@
</select> </select>
<select id="getProRepairNum" resultType="java.lang.Integer"> <select id="getProRepairNum" resultType="java.lang.Integer">
SELECT SELECT
count(bap.worker_id) AS proRepairNum count(pp.id) AS proRepairNum
FROM FROM
bm_att_person bap bm_repair_card_apply pp
left join bm_sub_contract bsc on pp.pro_id = bsc.pro_id
WHERE WHERE
bap.sub_id = #{subId} bsc.sub_id = #{subId} and pp.check_status = 1
</select> </select>
<select id="getWorkerWage" resultType="com.bonus.bmw.domain.vo.ProStatisticsPo"> <select id="getWorkerWage" resultType="com.bonus.bmw.domain.vo.ProStatisticsPo">
SELECT SELECT

View File

@ -39,6 +39,7 @@
<if test="workerName != null"> <if test="workerName != null">
AND locate(#{workerName},pw.name) AND locate(#{workerName},pw.name)
</if> </if>
GROUP BY pw.id
</select> </select>
<select id="getWorkerDetail" resultType="com.bonus.bmw.domain.vo.PmWorkerVo"> <select id="getWorkerDetail" resultType="com.bonus.bmw.domain.vo.PmWorkerVo">
select id,name,id_number,sex,birthday,issuing_authority,nation,start_time,end_time,address,phone select id,name,id_number,sex,birthday,issuing_authority,nation,start_time,end_time,address,phone
@ -79,9 +80,9 @@
bap.dev_name, bap.dev_name,
bap.device_code, bap.device_code,
case when bap.att_time is null then 0 else 1 end as attStatus case when bap.att_time is null then 0 else 1 end as attStatus
from bm_worker_ein_day_record bwedr from bm_worker_ein_day_record bwedr
left join bm_att_person bap on bwedr.ein_day = bap.att_day and bwedr.worker_id = bap.worker_id left join bm_att_person bap on bwedr.ein_day = bap.att_day and bwedr.worker_id = bap.worker_id and bwedr.pro_id = bap.pro_id
where bwedr.worker_id = #{workerId} where bwedr.worker_id = #{workerId}
<if test="startTime!=null and endTime!=null"> <if test="startTime!=null and endTime!=null">
and bwedr.ein_day between #{startTime} and #{endTime} and bwedr.ein_day between #{startTime} and #{endTime}
</if> </if>
@ -91,6 +92,7 @@
<if test="subId != null"> <if test="subId != null">
AND bwedr.sub_id = #{subId} AND bwedr.sub_id = #{subId}
</if> </if>
Order by bwedr.ein_day desc
</select> </select>
<select id="getMonthTableDetail" resultType="com.bonus.bmw.domain.vo.ProMonthTable"> <select id="getMonthTableDetail" resultType="com.bonus.bmw.domain.vo.ProMonthTable">
select tpmt.table_month, select tpmt.table_month,