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

添加用户钉钉主动拉取请假记录

parent 43fee905
......@@ -163,7 +163,6 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
}
if (!ObjectUtils.isEmpty(waitSyncLeaveRecords)) {
//todo 同步查询详细记录 并更新
for (AttendanceLeaveRecordEntity waitSyncLeaveRecord : waitSyncLeaveRecords) {
dingPersonService.handleByProcessInstanceId(waitSyncLeaveRecord.getRemark());
}
......
......@@ -98,15 +98,12 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
JSONObject jsonObject = new JSONObject();
String busiDesc = this.getModuleDesc() + "主动同步拉取请假考勤记录";
try {
if(ObjectUtils.isEmpty(query.getStartTimeStart()))throw new AppException("开始时间不能为空");
if(ObjectUtils.isEmpty(query.getStartTimeEnd()))throw new AppException("结束时间不能为空");
long between = DateUtil.between(DateUtil.parseDate(query.getStartTimeStart()), DateUtil.parseDate(query.getStartTimeEnd()), DateUnit.DAY, true);
if(between>120){
throw new AppException("时间范围不能超过120天");
if (ObjectUtils.isEmpty(query.getStartTimeStart())) throw new AppException("开始时间不能为空");
if (ObjectUtils.isEmpty(query.getStartTimeEnd())) {
query.setEndTimeStart(DateUtil.today());
}
long between = DateUtil.between(DateUtil.parseDate(query.getStartTimeStart()), DateUtil.parseDate(query.getStartTimeEnd()), DateUnit.DAY, true);
if (between > 120) throw new AppException("时间范围不能超过120天");
Context context = this.getContext();
Thread thread = new Thread(new Runnable() {
@Override
......@@ -118,6 +115,7 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, busiDesc + " 【成功】");
} catch (Exception e) {
log.error("主动同步拉取请假考勤记录", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
......
......@@ -101,10 +101,17 @@ GET {{baseUrl}}/test/double?processInstanceId=test1
Accept: application/json
###短信设置删除
GET {{baseUrl}}/att/set/delete?id={{SmsSet_id}}
Accept: application/json
###钉钉请假
POST {{baseUrl}}/attendance/leave/record/syncLeaveRecord
Authorization: {{authToken}}
Content-Type: application/json
{
"startTimeStart":"2023-11-01",
"startTimeEnd":"2023-11-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