Commit a0311ab0 authored by 赵啸非's avatar 赵啸非

修改部门同步

parent 2b175369
...@@ -87,7 +87,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -87,7 +87,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if (ObjectUtils.isEmpty(deptEntity)) { if (ObjectUtils.isEmpty(deptEntity)) {
deptEntity = new DeptEntity(); deptEntity = new DeptEntity();
deptEntity.initAttrValue(); deptEntity.initAttrValue();
if (ObjectUtils.isEmpty(deptEntityParent)) { if (!ObjectUtils.isEmpty(deptEntityParent)) {
deptEntity.setParentId(deptEntityParent.getId()); deptEntity.setParentId(deptEntityParent.getId());
} }
deptEntity.setDeptName(orgInfo.getOrgName()); deptEntity.setDeptName(orgInfo.getOrgName());
......
...@@ -352,7 +352,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract { ...@@ -352,7 +352,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
errorEntity.setShiftsName(recordDetailEntity.getShiftsName()); errorEntity.setShiftsName(recordDetailEntity.getShiftsName());
errorEntity.setProcessStatus(YesNoEnum.NO.getValue()); errorEntity.setProcessStatus(YesNoEnum.NO.getValue());
errorEntity.setCreateTime(new Date()); errorEntity.setCreateTime(new Date());
errorEntity.setCreateUserId(context.getUser().getId()); errorEntity.setCreateUserId(1L);
Date goWorkDate = attendanceClassDetailEntity.getGoWorkDate(); Date goWorkDate = attendanceClassDetailEntity.getGoWorkDate();
errorEntity.setGoOffDateTime(DateUtil.parseDateTime(dateStr + " " + DateUtil.formatTime(goWorkDate)).toJdkDate()); errorEntity.setGoOffDateTime(DateUtil.parseDateTime(dateStr + " " + DateUtil.formatTime(goWorkDate)).toJdkDate());
if (!ObjectUtils.isEmpty(recordDetailEntity.getGoWorkDate())) { if (!ObjectUtils.isEmpty(recordDetailEntity.getGoWorkDate())) {
...@@ -382,7 +382,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract { ...@@ -382,7 +382,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
errorEntity.setShiftsName(recordDetailEntity.getShiftsName()); errorEntity.setShiftsName(recordDetailEntity.getShiftsName());
errorEntity.setProcessStatus(YesNoEnum.NO.getValue()); errorEntity.setProcessStatus(YesNoEnum.NO.getValue());
errorEntity.setCreateTime(new Date()); errorEntity.setCreateTime(new Date());
errorEntity.setCreateUserId(context.getUser().getId()); errorEntity.setCreateUserId(context==null?1L:context.getUser().getId());
Date offWorkDate = attendanceClassDetailEntity.getOffWorkDate(); Date offWorkDate = attendanceClassDetailEntity.getOffWorkDate();
errorEntity.setGoOffDateTime(DateUtil.parseDateTime(dateStr + " " + DateUtil.formatTime(offWorkDate)).toJdkDate()); errorEntity.setGoOffDateTime(DateUtil.parseDateTime(dateStr + " " + DateUtil.formatTime(offWorkDate)).toJdkDate());
if (!ObjectUtils.isEmpty(recordDetailEntity.getOffWorkDate())) { if (!ObjectUtils.isEmpty(recordDetailEntity.getOffWorkDate())) {
......
...@@ -146,7 +146,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -146,7 +146,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffQuery.setStatusNotList(Arrays.asList(StaffSatusEnum.离职.getValue())); staffQuery.setStatusNotList(Arrays.asList(StaffSatusEnum.离职.getValue()));
Map<String, StaffEntity> staffCollect = this.find(staffQuery).stream().collect(Collectors.toMap(x -> x.getWorkNum(), y -> y, (o, n) -> n)); Map<String, StaffEntity> staffCollect = this.find(staffQuery).stream().collect(Collectors.toMap(x -> x.getWorkNum(), y -> y, (o, n) -> n));
List<PersonInfo> personInfoList = personRest.getData().getList(); List<PersonInfo> personInfoList = personRest.getData().getList();
for (PersonInfo personInfo : personInfoList) { for (PersonInfo personInfo : personInfoList) {
if (ObjectUtils.isEmpty(personInfo.getJobNo())) { if (ObjectUtils.isEmpty(personInfo.getJobNo())) {
...@@ -155,7 +154,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -155,7 +154,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
} }
if (staffCollect.containsKey(personInfo.getJobNo())) { if (staffCollect.containsKey(personInfo.getJobNo())) {
staffCollect.remove(personInfo.getJobNo()); staffCollect.remove(personInfo.getJobNo());
} }
StaffEntity staffEntity = this.getExtCache(StrUtil.padPre(personInfo.getJobNo(), 8, "0")); StaffEntity staffEntity = this.getExtCache(StrUtil.padPre(personInfo.getJobNo(), 8, "0"));
...@@ -179,7 +177,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -179,7 +177,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffEntity.setCreateUserId(1L); staffEntity.setCreateUserId(1L);
staffEntity.setCreateTime(new Date()); staffEntity.setCreateTime(new Date());
this.save(staffEntity); this.save(staffEntity);
} else { } else {
//更新 //更新
if (!ObjectUtils.isEmpty(deptEntity)) { if (!ObjectUtils.isEmpty(deptEntity)) {
...@@ -202,7 +199,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -202,7 +199,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
if (staffCollect.size() > 0) { if (staffCollect.size() > 0) {
//需要将此人员变更为离职 //需要将此人员变更为离职
staffCollect.entrySet().stream().forEach(item -> { staffCollect.entrySet().stream().forEach(item -> {
String key = item.getKey(); String key = item.getKey();
if (!ObjectUtils.isEmpty(key)) { if (!ObjectUtils.isEmpty(key)) {
StaffEntity staff = item.getValue(); StaffEntity staff = item.getValue();
......
...@@ -24,6 +24,15 @@ Content-Type: application/json ...@@ -24,6 +24,15 @@ Content-Type: application/json
{} {}
###海康考勤打卡记录计算
POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Authorization: {{authToken}}
Content-Type: application/json
{
"attendanceDateStart":"2023-12-11",
"attendanceDateEnd":"2023-12-11"
}
...@@ -43,7 +52,7 @@ POST {{baseUrl}}//attendance/stat/summary ...@@ -43,7 +52,7 @@ POST {{baseUrl}}//attendance/stat/summary
Authorization: {{authToken}} Authorization: {{authToken}}
Content-Type: application/json Content-Type: application/json
{"summaryTimeStart":"2024-01-01","summaryTimeEnd":"2024-01-03"} {"summaryTimeStart":"2023-12-01","summaryTimeEnd":"2023-12-31"}
###短信设置编辑 ###短信设置编辑
......
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