Commit 4d321ea2 authored by 姬鋆屾's avatar 姬鋆屾
parents c7eeea00 a3a9fac5
......@@ -451,10 +451,10 @@ export default {
this.$message.error("开始时间应小于结束时间");
return true;
}
if (datadiff > time) {
this.$message.error("时间间隔大于" + parseInt(compDay) + "天,请检查!");
return true;
}
// if (datadiff > time) {
// this.$message.error("时间间隔大于" + parseInt(compDay) + "天,请检查!");
// return true;
// }
return false;
},
setdialog(i) {
......
......@@ -21,6 +21,6 @@ fi
echo "stoping application $PROJECT_NAME......"
kill -9 ${pid}
kill -15 ${pid}
echo "Send shutdown request to Server $PROJECT_NAME OK"
......@@ -89,7 +89,6 @@ public class CalculateDayAttendTaskImpl implements ITaskExcuteService {
StaffEntity staffCache = staffService.getCache(staffId.toString());
if (!ObjectUtils.isEmpty(staffCache) && StaffSatusEnum.离职.getValue() != staffCache.getStatus()) {
//构建考勤记录 判断当前人是否离职,如果非离职 构建记录
AttendanceRecordHikEntity recordHikEntity = new AttendanceRecordHikEntity();
recordHikEntity.initAttrValue();
recordHikEntity.setStaffId(staffCache.getId());
......
......@@ -812,6 +812,31 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
@Override
public void buildSourceHikRecord(AttendanceRecordHikQuery recordHikQuery, Context context) {
syncDoorEvents(recordHikQuery);
deletFackRecord(recordHikQuery, context);
}
private void deletFackRecord(AttendanceRecordHikQuery recordHikQuery, Context context) {
//重新拉去的考勤记录,判断是否存在虚增的记录
log.info("开始删除虚增的记录!");
recordHikQuery.setEventSource("当日未有记录虚增考勤记录!");
List<AttendanceRecordHikEntity> fackAttendlist = this.find(recordHikQuery);
if(!ObjectUtils.isEmpty(fackAttendlist)){
log.info("虚增的记录:{}",fackAttendlist.size());
for (AttendanceRecordHikEntity recordHikEntity : fackAttendlist) {
//判断是否已经重新有新的当日数据,如果有 则删除当前虚增记录
AttendanceRecordHikQuery query = new AttendanceRecordHikQuery();
query.setStaffId(recordHikEntity.getStaffId());
query.setAttendanceDateStart(recordHikEntity.getAttendanceDateStart());
query.setAttendanceDateEnd(recordHikQuery.getAttendanceDateEnd());
query.setIdNotList(Arrays.asList(recordHikEntity.getId()));
int count = this.count(query, context);
if(count>0){
//删除当前虚增的记录
this.remove(recordHikEntity.getId(), context);
}
}
}
}
private void syncDoorEvents(AttendanceRecordHikQuery recordHikQuery) {
......
......@@ -10,7 +10,7 @@
s.staffName,
s.deptId,
s.deptName,
s.phoneNumer,
MAX(s.phoneNumer) as phoneNumer,
s.salaId,
s.salaName,
count(1) as workDays,
......@@ -69,9 +69,8 @@
s.deptId,
s.deptName,
s.staffId,
s.staffName,
s.phoneNumer
) AS a
s.staffName
) AS a ORDER BY a.salaName,a.deptName,a.staffName
</select>
<select id="getListCountExt" parameterType="com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery" resultType="int">
......@@ -82,7 +81,7 @@
s.staffName,
s.deptId,
s.deptName,
s.phoneNumer,
MAX(s.phoneNumer) as phoneNumer,
s.salaId,
s.salaName,
ROUND(IFNULL(sum(s.goTimes),0)/count(1),4) as attendanceRate,
......@@ -140,8 +139,7 @@
s.deptId,
s.deptName,
s.staffId,
s.staffName,
s.phoneNumer
s.staffName
) AS a
</select>
</mapper>
\ No newline at end of file
......@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_attend_record
WHERE auditStatus = 1
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_complain_record
WHERE auditStatus = 1
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_effect_record
WHERE auditStatus = 1
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_gowork_record
WHERE auditStatus = 1
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_other_record
WHERE auditStatus = 1
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -11,7 +11,7 @@
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_review_record
WHERE auditStatus = 1
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -72,8 +72,8 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"attendanceDateStart":"2024-02-01",
"attendanceDateEnd":"2024-03-01"
"attendanceDateStart":"2024-03-11",
"attendanceDateEnd":"2024-03-11"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment