人员统计
This commit is contained in:
parent
bcfb0e5a7e
commit
55c090af2d
|
|
@ -1,9 +1,7 @@
|
|||
package com.bonus.bmw.controller;
|
||||
|
||||
import com.bonus.bmw.domain.po.HomePagePo;
|
||||
import com.bonus.bmw.domain.vo.HomePageSubProVo;
|
||||
import com.bonus.bmw.domain.vo.PmWorker;
|
||||
import com.bonus.bmw.domain.vo.PmWorkerVo;
|
||||
import com.bonus.bmw.domain.vo.*;
|
||||
import com.bonus.bmw.service.WorkerStatisticsService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -71,23 +69,43 @@ public class WorkerStatisticsController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
/* *//**
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*//*
|
||||
*/
|
||||
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:statistics:query"))
|
||||
@GetMapping("/getWorkerEinDayRecordDetail")
|
||||
@SysLog(title = "考勤信息", businessType = OperaType.QUERY, logType = 0, module = "人员统计->考勤信息", details = "考勤信息")
|
||||
public AjaxResult getWorkerEinDayRecordDetail(PmWorker pmWorker) {
|
||||
public TableDataInfo getWorkerEinDayRecordDetail(PmWorker pmWorker) {
|
||||
try {
|
||||
PmWorkerVo pmWorkerVo = service.getWorkerEinDayRecordDetail(pmWorker);
|
||||
return success(pmWorkerVo);
|
||||
startPage();
|
||||
List<BmWorkerEinDayRecordVo> bmWorkerEinDayRecordList = service.getWorkerEinDayRecordDetail(pmWorker);
|
||||
return getDataTable(bmWorkerEinDayRecordList);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
return error("查询身份证信息失败!");
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:statistics:query"))
|
||||
@GetMapping("/getMonthTableDetail")
|
||||
@SysLog(title = "考勤信息", businessType = OperaType.QUERY, logType = 0, module = "人员统计->考勤信息", details = "考勤信息")
|
||||
public TableDataInfo getMonthTableDetail(PmWorker pmWorker) {
|
||||
try {
|
||||
startPage();
|
||||
List<ProMonthTable> bmWorkerEinDayRecordList = service.getMonthTableDetail(pmWorker);
|
||||
return getDataTable(bmWorkerEinDayRecordList);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package com.bonus.bmw.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/10/11
|
||||
*/
|
||||
@Data
|
||||
public class BmWorkerEinDayRecordVo {
|
||||
|
||||
/**
|
||||
|
|
@ -12,7 +15,7 @@ public class BmWorkerEinDayRecordVo {
|
|||
public String attDay;
|
||||
|
||||
/**
|
||||
* 考勤状态
|
||||
* 考勤状态 0 未打卡 1已打卡
|
||||
*/
|
||||
public String attStatus;
|
||||
|
||||
|
|
@ -20,4 +23,24 @@ public class BmWorkerEinDayRecordVo {
|
|||
* 考勤时间
|
||||
*/
|
||||
public String attTime;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
public String proName;
|
||||
|
||||
/**
|
||||
* 考勤机设备名称
|
||||
*/
|
||||
public String devName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
public String deviceCode;
|
||||
|
||||
/**
|
||||
* 是否补卡 0 不是 1 是
|
||||
*/
|
||||
public String isRepair;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,4 +136,8 @@ public class PmWorkerVo {
|
|||
|
||||
private String facePhotoBase64;
|
||||
|
||||
private String proId;
|
||||
|
||||
private String subId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,14 +10,53 @@ import java.util.List;
|
|||
public interface WorkerStatisticsMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 人员统计
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<HomePageSubProVo> getWorkerStatisticsTable(HomePagePo o);
|
||||
|
||||
/**
|
||||
* 身份证信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
PmWorkerVo getWorkerDetail(PmWorker pmWorker);
|
||||
|
||||
/**
|
||||
* 出入场信息
|
||||
* @param pmWorkerVo
|
||||
* @return
|
||||
*/
|
||||
List<BmWorkerEinProRecord> getBmWorkerEinProRecordList(PmWorkerVo pmWorkerVo);
|
||||
|
||||
/**
|
||||
* 获取合同信息
|
||||
* @param pmWorkerVo
|
||||
* @return
|
||||
*/
|
||||
List<BmWorkerContract> getBmWorkerContractList(PmWorkerVo pmWorkerVo);
|
||||
|
||||
/**
|
||||
* 工资卡信息
|
||||
* @param pmWorkerVo
|
||||
* @return
|
||||
*/
|
||||
BmWorkerWageCard getBmWorkerWageCard(PmWorkerVo pmWorkerVo);
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
List<BmWorkerEinDayRecordVo> getWorkerEinDayRecordDetail(PmWorker pmWorker);
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
List<ProMonthTable> getMonthTableDetail(PmWorker pmWorker);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package com.bonus.bmw.service;
|
||||
|
||||
import com.bonus.bmw.domain.po.HomePagePo;
|
||||
import com.bonus.bmw.domain.vo.HomePageSubProVo;
|
||||
import com.bonus.bmw.domain.vo.PmWorker;
|
||||
import com.bonus.bmw.domain.vo.PmWorkerVo;
|
||||
import com.bonus.bmw.domain.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -16,5 +14,24 @@ public interface WorkerStatisticsService {
|
|||
*/
|
||||
List<HomePageSubProVo> getWorkerStatisticsTable(HomePagePo o);
|
||||
|
||||
/**
|
||||
* 身份证信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
PmWorkerVo getWorkerDetail(PmWorker pmWorker);
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
List<BmWorkerEinDayRecordVo> getWorkerEinDayRecordDetail(PmWorker pmWorker);
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
List<ProMonthTable> getMonthTableDetail(PmWorker pmWorker);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,21 @@ public class WorkerStatisticsServiceImpl implements WorkerStatisticsService {
|
|||
@Resource
|
||||
private FileUploadUtils fileUploadUtils;
|
||||
|
||||
/**
|
||||
* 人员统计
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<HomePageSubProVo> getWorkerStatisticsTable(HomePagePo o) {
|
||||
return mapper.getWorkerStatisticsTable(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份证信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PmWorkerVo getWorkerDetail(PmWorker pmWorker) {
|
||||
PmWorkerVo pmWorkerVo = mapper.getWorkerDetail(pmWorker);
|
||||
|
|
@ -32,10 +42,10 @@ public class WorkerStatisticsServiceImpl implements WorkerStatisticsService {
|
|||
if(pmWorkerVo != null){
|
||||
pmWorkerVo.setFiles(fileUploadUtils.getFileList("", pmWorkerVo.getId().toString(), Constants.FILE_UPLOAD_WORKER, ""));
|
||||
}
|
||||
//获取合同信息
|
||||
//出入场信息
|
||||
List<BmWorkerEinProRecord> bmWorkerEinProRecordList = mapper.getBmWorkerEinProRecordList(pmWorkerVo);
|
||||
pmWorkerVo.setBmWorkerEinProRecordList(bmWorkerEinProRecordList);
|
||||
//获取合同信息
|
||||
//
|
||||
List<BmWorkerContract> bmWorkerContractList = mapper.getBmWorkerContractList(pmWorkerVo);
|
||||
if (bmWorkerContractList.size()>0){
|
||||
for (BmWorkerContract bmWorkerContract:bmWorkerContractList) {
|
||||
|
|
@ -53,4 +63,24 @@ public class WorkerStatisticsServiceImpl implements WorkerStatisticsService {
|
|||
return pmWorkerVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BmWorkerEinDayRecordVo> getWorkerEinDayRecordDetail(PmWorker pmWorker) {
|
||||
return mapper.getWorkerEinDayRecordDetail(pmWorker);
|
||||
}
|
||||
|
||||
/**
|
||||
* 考勤信息
|
||||
* @param pmWorker
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProMonthTable> getMonthTableDetail(PmWorker pmWorker) {
|
||||
return mapper.getMonthTableDetail(pmWorker);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,15 +47,59 @@
|
|||
<select id="getBmWorkerEinProRecordList" resultType="com.bonus.bmw.domain.vo.BmWorkerEinProRecord">
|
||||
select ein_time,exit_time,pro_name,sub_name,team_name,post_name,#{phone},ein_status,is_upload_file
|
||||
from bm_worker_ein_pro_record where worker_id = #{id}
|
||||
<if test="proId != null">
|
||||
AND pro_id = #{proId}
|
||||
</if>
|
||||
<if test="subId != null">
|
||||
AND sub_id = #{subId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getBmWorkerContractList" resultType="com.bonus.bmw.domain.vo.BmWorkerContract">
|
||||
select id,contract_code,contract_term_type,is_active,contract_start_date,contract_stop_date,wage_approved_way,
|
||||
wage_criterion,contract_upload_date
|
||||
from bm_worker_contract where worker_id =#{id}
|
||||
select bwc.id,bwc.contract_code,bwc.contract_term_type,bwc.is_active,bwc.contract_start_date,
|
||||
bwc.contract_stop_date,bwc.wage_approved_way,bwc.wage_criterion,bwc.contract_upload_date
|
||||
from bm_worker_contract bwc
|
||||
left join bm_worker_ein_pro_record bwepr on bwc.id = bwepr.worker_id
|
||||
where worker_id =#{id}
|
||||
<if test="proId != null">
|
||||
AND bwepr.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="subId != null">
|
||||
AND bwepr.sub_id = #{subId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getBmWorkerWageCard" resultType="com.bonus.bmw.domain.vo.BmWorkerWageCard">
|
||||
select id,bank_card_code,bank_name,bank_branch_name,create_time
|
||||
from bm_worker_wage_card where worker_id = #{id}
|
||||
</select>
|
||||
<select id="getWorkerEinDayRecordDetail" resultType="com.bonus.bmw.domain.vo.BmWorkerEinDayRecordVo">
|
||||
select bwedr.ein_day as attDay,
|
||||
bap.att_time,
|
||||
bap.is_repair,
|
||||
bwedr.pro_name,
|
||||
bap.dev_name,
|
||||
bap.device_code,
|
||||
case when bap.att_time is null then 0 else 1 end as attStatus
|
||||
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
|
||||
where bwedr.worker_id = #{workerId}
|
||||
<if test="startTime!=null and endTime!=null">
|
||||
and bwedr.ein_day between #{startTime} and #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getMonthTableDetail" resultType="com.bonus.bmw.domain.vo.ProMonthTable">
|
||||
select tpmt.table_month,
|
||||
tpmtr.pro_name,
|
||||
tpmtr.actual_money,
|
||||
tpmt.refund_status
|
||||
from tb_pro_month_table tpmt
|
||||
left join tb_pro_month_table_roster tpmtr on tpmt.id = tpmtr.month_id
|
||||
where tpmtr.user_id = #{workerId}
|
||||
<if test="proId != null">
|
||||
AND pro_id = #{proId}
|
||||
</if>
|
||||
<if test="subId != null">
|
||||
AND sub_id = #{subId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue