9.18考勤记录管理
parent
9118d614a1
commit
546b375ed0
|
@ -87,6 +87,18 @@ public class ProMobileAttendanceData extends BaseEntity
|
|||
@Excel(name = "用户性别")
|
||||
private String userSex;
|
||||
|
||||
/** 考勤设备 */
|
||||
@Excel(name = "考勤设备")
|
||||
private String attDevice;
|
||||
|
||||
public String getAttDevice() {
|
||||
return attDevice;
|
||||
}
|
||||
|
||||
public void setAttDevice(String attDevice) {
|
||||
this.attDevice = attDevice;
|
||||
}
|
||||
|
||||
public String getUserSex() {
|
||||
return userSex;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ public interface ProPlanMapper
|
|||
/**
|
||||
* 查询计划任务数据
|
||||
*/
|
||||
public List<ProPlan> findAllPlanDatasByProId(Long proId);
|
||||
public List<ProPlan> findAllPlanDatasByProId(@Param("proId") Long proId,@Param("noBim") String noBim);
|
||||
|
||||
/**
|
||||
* 查询计划任务数据
|
||||
|
|
|
@ -29,13 +29,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="craftPostName" column="craft_post_name" />
|
||||
<result property="userPost" column="user_post" />
|
||||
<result property="userSex" column="user_sex" />
|
||||
<result property="attDevice" column="att_device" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProMobileAttendanceDataVo">
|
||||
|
||||
select pma.id, pma.user_id, pma.project_id, pma.cfg_id, pma.in_out, pma.longitude, pma.latitude, pma.att_date, pma.att_img, pma.is_del,
|
||||
pma.remark, pma.state, pma.create_by, pma.create_time, pma.update_by, pma.update_time,
|
||||
dic1.dict_label as craft_type_name,dic2.dict_label as craft_post_name,
|
||||
dic1.dict_label as craft_type_name,dic2.dict_label as craft_post_name,pma.att_device,
|
||||
psu.user_name, psu.user_phone,psu.sub_dept_name,psu.sub_dept_group_name,psu.user_post,psu.user_sex
|
||||
from pro_mobile_attendance_data pma
|
||||
left join pro_project_info_subdepts_users psu on pma.user_id=psu.user_id
|
||||
|
@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startDate!=null"> and date(pma.att_date) >= date(#{startDate})</if>
|
||||
<if test="endDate!=null"> and date(pma.att_date) <= date(#{endDate})</if>
|
||||
</where>
|
||||
order by pma.att_date desc,pma.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectProMobileAttendanceDataById" parameterType="Long" resultMap="ProMobileAttendanceDataResult">
|
||||
|
@ -80,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="latitude != null">latitude,</if>
|
||||
<if test="attDate != null">att_date,</if>
|
||||
<if test="attImg != null">att_img,</if>
|
||||
<if test="attDevice != null">att_device,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="state != null">state,</if>
|
||||
|
@ -97,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="latitude != null">#{latitude},</if>
|
||||
<if test="attDate != null">#{attDate},</if>
|
||||
<if test="attImg != null">#{attImg},</if>
|
||||
<if test="attDevice != null">#{attDevice},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
|
@ -118,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="latitude != null">latitude = #{latitude},</if>
|
||||
<if test="attDate != null">att_date = #{attDate},</if>
|
||||
<if test="attImg != null">att_img = #{attImg},</if>
|
||||
<if test="attDevice != null">att_device = #{attDevice},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
|
|
|
@ -419,7 +419,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pp.predecessors,
|
||||
pp.plan_start_date,
|
||||
pp.plan_finish_date,
|
||||
pp.bim_id,
|
||||
<choose>
|
||||
<when test="noBim = null or noBim = ''">
|
||||
left(ifnull(pp.bim_id,''),10) bim_id,
|
||||
</when>
|
||||
<otherwise>
|
||||
pp.bim_id,
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
pp.operator,
|
||||
pp.operator_id,
|
||||
pp.group_id,
|
||||
|
|
|
@ -64,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startDate != null"> and date(pur.create_time) >= date(#{startDate})</if>
|
||||
<if test="endDate != null"> and date(pur.create_time) <= date(#{endDate})</if>
|
||||
</where>
|
||||
order by pur.create_time desc,pur.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectProUserInoutRecordById" parameterType="Long" resultMap="ProUserInoutRecordResult">
|
||||
|
|
|
@ -1028,6 +1028,7 @@ public class AttendanceJgwTask {
|
|||
mobileAttendanceData.setProjectId(quartzProAttendanceDataQuery.getProjectId());
|
||||
mobileAttendanceData.setUserId(quartzProAttendanceDataQuery.getUserId());
|
||||
mobileAttendanceData.setCfgId(it.getId());
|
||||
mobileAttendanceData.setAttDevice("device");
|
||||
|
||||
List<QuartzProAttendanceData> attendanceDataList = quartzProAttendanceDataService.selectProAttendanceDataList(quartzProAttendanceDataQuery);
|
||||
if(attendanceDataList!=null && attendanceDataList.size()>0){
|
||||
|
|
|
@ -244,8 +244,8 @@ public class ProPlanController extends BaseController
|
|||
* 查询任务状态统计
|
||||
*/
|
||||
@GetMapping(value = "/findAllPlanDatas/{proId}")
|
||||
public AjaxResult findAllPlanDatas(@PathVariable("proId") Long proId){
|
||||
List<ProPlan> plans = proPlanService.findAllPlanDatasByProId(proId);
|
||||
public AjaxResult findAllPlanDatas(@PathVariable("proId") Long proId,String noBim){
|
||||
List<ProPlan> plans = proPlanService.findAllPlanDatasByProId(proId,noBim);
|
||||
return success(plans);
|
||||
}
|
||||
|
||||
|
|
|
@ -181,13 +181,13 @@ public class UniCallBackController {
|
|||
attendanceData.setAttDate(showTime);
|
||||
attendanceData.setAttImg(filePath);
|
||||
if(device.getDirection()==0){
|
||||
attendanceData.setInOut("in");
|
||||
proMobileAttendanceDataService.addAttendanceData(attendanceData);
|
||||
//入
|
||||
if(dt1==null || showTime.getTime()<dt1.getTime()){
|
||||
upData.setInPhoto(filePath);
|
||||
upData.setInData(data);
|
||||
upData.setInTime(showTime);
|
||||
attendanceData.setInOut("in");
|
||||
proMobileAttendanceDataService.addAttendanceData(attendanceData);
|
||||
}else{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
@ -197,11 +197,11 @@ public class UniCallBackController {
|
|||
upData.setOutData(data);
|
||||
upData.setOutPhoto(filePath);
|
||||
upData.setOutTime(showTime);
|
||||
attendanceData.setInOut("out");
|
||||
proMobileAttendanceDataService.addAttendanceData(attendanceData);
|
||||
}else {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
attendanceData.setInOut("out");
|
||||
proMobileAttendanceDataService.addAttendanceData(attendanceData);
|
||||
}
|
||||
attendanceUbiDataService.updateAttendanceUbiData(upData);
|
||||
return AjaxResult.success("更新成功");
|
||||
|
|
|
@ -141,6 +141,7 @@ public class ProMobileAttendanceConfigController extends BaseController
|
|||
if (similarity >= threshold) {
|
||||
// 相似度达标,允许考勤
|
||||
int cnt=attendanceUbiDataService.addMobiileAttendanceData(attData);
|
||||
attData.setAttDevice("mobile");
|
||||
cnt+=proMobileAttendanceDataService.insertProMobileAttendanceData(attData);
|
||||
return AjaxResult.success("考勤成功,人脸匹配 (相似度: " + String.format("%.2f", similarity) + ")");
|
||||
} else {
|
||||
|
|
|
@ -96,7 +96,7 @@ public interface IProPlanService
|
|||
/**
|
||||
* 查询计划任务数据
|
||||
*/
|
||||
public List<ProPlan> findAllPlanDatasByProId(Long proId);
|
||||
public List<ProPlan> findAllPlanDatasByProId(Long proId,String noBim);
|
||||
|
||||
/**
|
||||
* 查询计划任务数据
|
||||
|
|
|
@ -104,6 +104,7 @@ public class ProMobileAttendanceDataServiceImpl implements IProMobileAttendanceD
|
|||
attendanceData.setRemark("");
|
||||
attendanceData.setCfgId(0L);
|
||||
attendanceData.setState(0L);
|
||||
attendanceData.setAttDevice("device");
|
||||
return insertProMobileAttendanceData(attendanceData);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,8 +215,8 @@ public class ProPlanServiceImpl implements IProPlanService
|
|||
* 查询计划任务数据
|
||||
*/
|
||||
@Override
|
||||
public List<ProPlan> findAllPlanDatasByProId(Long proId){
|
||||
return proPlanMapper.findAllPlanDatasByProId(proId);
|
||||
public List<ProPlan> findAllPlanDatasByProId(Long proId,String noBim){
|
||||
return proPlanMapper.findAllPlanDatasByProId(proId,noBim);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,13 +46,18 @@
|
|||
<el-table-column label="进出标识" align="center" prop="inOut">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.inOut === 'in'" type="success">进</el-tag>
|
||||
<el-tag v-else type="danger">出</el-tag>
|
||||
<el-tag v-else type="primary">出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打卡设备" align="center" prop="inOut">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.attDevice === 'device'" type="success">人脸机</el-tag>
|
||||
<el-tag v-else type="primary">移动考勤</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考勤时间" align="center" prop="attDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.attDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.attDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考勤照片" align="center" prop="attImg">
|
||||
|
@ -116,9 +121,9 @@
|
|||
|
||||
<script setup name="MobileAttendanceData">
|
||||
import { listMobileAttendanceData, getMobileAttendanceData, delMobileAttendanceData, addMobileAttendanceData, updateMobileAttendanceData } from "@/api/manage/mobileAttendanceData";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const mobileAttendanceDataList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
|
@ -154,6 +159,7 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
/** 查询人员考勤记录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.projectId = userStore.currentPrjId;
|
||||
let postData={
|
||||
...queryParams.value
|
||||
};
|
||||
|
|
|
@ -155,7 +155,9 @@ import {
|
|||
updateUserInOutRecord,
|
||||
} from "@/api/manage/userInOutRecord";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const {
|
||||
sys_use_status,
|
||||
pro_craft_type,
|
||||
|
@ -216,6 +218,7 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
/** 查询员工出入场记录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.projectId = userStore.currentPrjId;
|
||||
let postData={
|
||||
...queryParams.value
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue