Commit 27507d13 authored by 赵啸非's avatar 赵啸非

添加考勤核查记录

parent 3a06d248
......@@ -221,7 +221,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
if (CollectionUtils.isNotEmpty(list)) {
log.info("重新生成["+day+"]已处理的绩效考勤核查数据.....");
for (AttendanceRecordErrorEntity entity : list) {
if (YesNoEnum.YES.getValue() == entity.getProcessStatus()) {
// if (YesNoEnum.YES.getValue() == entity.getProcessStatus()) {
//判断后打绩效
String ruleCode = "";
if (ErrorStatusEnum.早退.getValue() == DataUtil.converStr2Int(entity.getProcessResult(), 3)) {
......@@ -287,7 +287,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
}
}
}
// }
}
log.info("从新生成已处理的绩效考勤核查数据,执行完成.....");
}
......
......@@ -334,6 +334,7 @@ public class AttendanceRecordErrorController extends BaseCRUDJsonBodyMappingCont
* @return
*/
@PostMapping({"doReprocess"})
@UnAuth
public Rest<String> doReprocess(@RequestBody AttendanceRecordErrorQuery query) {
Rest<String> ret = new Rest();
Context context = this.getContext();
......
......@@ -13,12 +13,14 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.service.CheckAttendRecordService;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery;
import com.mortals.xhx.module.perform.model.PerformRulesCategoryEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesCategoryService;
import com.mortals.xhx.module.perform.service.PerformRulesService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -55,8 +57,6 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired
private AttendanceGroupFixedworkService fixedworkService;
@Autowired
private AttendanceClassService classService;
@Autowired
private AttendanceClassDetailService classDetailService;
@Autowired
private PerformRulesCategoryService categoryService;
......@@ -235,7 +235,20 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
recordEntity.setWorkNum(staffEntity.getWorkNum());
PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId());
recordEntity.setCategoryName(categoryEntity == null ? "" : categoryEntity.getName());
this.save(recordEntity);
//校验是否已经存在 不存在再添加新记录
PerformAttendRecordQuery query = new PerformAttendRecordQuery();
query.setStaffId(recordEntity.getStaffId());
query.setErrorTime(recordEntity.getErrorTime());
query.setRuleId(recordEntity.getRuleId());
PerformAttendRecordEntity performAttendRecordEntity = this.selectOne(query);
if(ObjectUtils.isEmpty(performAttendRecordEntity)){
this.save(recordEntity);
}else{
log.info("已经存在考勤记录,无需重复添加!");
}
// this.save(recordEntity);
}
private PerformRulesEntity getRule(String ruleCode) {
......
......@@ -13,6 +13,18 @@ client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###考勤打卡记录异常信息列表
POST {{baseUrl}}/attendance/record/error/doReprocess
Content-Type: application/json
{
"errorDateTimeStart":"2024-01-01",
"errorDateTimeEnd":"2024-01-30"
}
###考勤打卡记录异常信息列表
POST {{baseUrl}}/attendance/record/error/list
Authorization: {{authToken}}
......
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