Commit 3c964f38 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 9482b733 3a79cad0
......@@ -210,7 +210,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
if (!ObjectUtils.isEmpty(delAttendRecords)) {
Long[] delIds = delAttendRecords.stream().map(i -> i.getId()).toArray(Long[]::new);
performAttendRecordService.remove(delIds, context);
log.info("删除考勤记录成功,size:{}", delIds.length);
//log.info("删除考勤记录成功,size:{}", delIds.length);
}
}
}
......
......@@ -244,14 +244,15 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
ListProcessInstanceIdsResponse rsp = client.listProcessInstanceIdsWithOptions(listProcessInstanceIdsRequest, listProcessInstanceIdsHeaders, runtimeOptions);
if (rsp.getBody().getSuccess()) {
// log.info("获取审批实例id列表成功->" + JSONObject.toJSONString(rsp.getBody().getResult()));
return Rest.ok(rsp.getBody().getResult());
} else {
log.info("获取审批实例列表失败->" + JSONObject.toJSONString(rsp));
log.info("获取审批实例id列表失败->" + JSONObject.toJSONString(rsp));
return Rest.fail("查询失败:" + rsp.getBody().getSuccess());
}
} catch (Exception _err) {
TeaException err = new TeaException(_err.getMessage(), _err);
log.error("获取审批实例列表失败->",_err);
log.error("获取审批实例id列表失败->",_err);
if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) {
// err 中含有 code 和 message 属性,可帮助开发定位问题
log.error("code = " + com.aliyun.teautil.Common.empty(err.code) + " message = " + com.aliyun.teautil.Common.empty(err.message));
......@@ -341,7 +342,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult result = rest.getData();
log.info("审批详情:" + JSONObject.toJSONString(result));
if (result.getTitle().contains("请假") || result.getTitle().contains("外出")) { //只处理请假的审批单
if (result.getTitle().contains("请假") || result.getTitle().contains("外出") || result.getTitle().contains("出差")) { //只处理请假、外出、出差 的审批单
AttendanceLeaveRecordEntity leaveRecordEntity = new AttendanceLeaveRecordEntity();
leaveRecordEntity.initAttrValue();
......@@ -504,8 +505,8 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
leaveRecordEntity.setEndTime(endTime1);
break;
case "时长":
leaveRecordEntity.setDuration(Integer.parseInt(componentValues.getValue()) * 60 * 60 * 8); //天转换成秒 一天工作时间9小时
leaveRecordEntity.setSourceDingTime(Integer.parseInt(componentValues.getValue()) + "天");
leaveRecordEntity.setDuration((int) (Float.parseFloat(componentValues.getValue()) * 60 * 60 * 8)); //天转换成秒 一天工作时间9小时
leaveRecordEntity.setSourceDingTime(Float.parseFloat(componentValues.getValue()) + "天");
break;
case "外出事由":
leaveRecordEntity.setReason(componentValues.getValue());
......@@ -915,9 +916,9 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
}
} catch (DingCallbackCrypto.DingTalkEncryptException e) {
e.printStackTrace();
// log.error("钉钉回调解密失败" + e.toString()");
} catch (Exception e) {
log.info("请假记录表操作异常->" + e.toString());
log.error("请假记录表操作异常->" ,e);
throw new RuntimeException(e);
}
......@@ -983,6 +984,8 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
}
}
// public static void main(String[] args) {
// String result = "{\"attachedProcessInstanceIds\":[],\"bizAction\":\"NONE\",\"businessId\":\"202401161705000413779\",\"ccUserIds\":[\"2359336301844466\",\"2352352656711393\",\"254868153920685466\"],\"createTime\":\"2024-01-16T17:05Z\",\"finishTime\":\"2024-01-17T10:15Z\",\"formComponentValues\":[{\"bizAlias\":\"type\",\"componentType\":\"DDSelectField\",\"id\":\"DDSelectField-K2BJK0RV\",\"name\":\"外出类型\"},{\"bizAlias\":\"startTime\",\"componentType\":\"DDDateField\",\"id\":\"DDDateField-K2BJK0RW\",\"name\":\"开始时间\",\"value\":\"2024-01-17\"},{\"bizAlias\":\"finishTime\",\"componentType\":\"DDDateField\",\"id\":\"DDDateField-K2BJK0RX\",\"name\":\"结束时间\",\"value\":\"2024-01-17\"},{\"bizAlias\":\"duration\",\"componentType\":\"NumberField\",\"extValue\":\"{\\\"compressedValue\\\":\\\"1f8b08000000000000009550cb4ec33010fc973d1b94422222df2a2244257a81704088c3ca76a9851b475e1b5445f977d669a141ea05dfe6a1d9f10ca0d0a9e4309ab5d706e442803611ad7bb01441be0ea053c0687db7ea1adcb3e1b228c48cbcf72980ac27766330a66008e400d8f76e7f17fcaeb5bb9c7b535465b5288bfcc4416dfd4cabafeba3a61c123d1995f3e94f85b5cd4455b2c9747aa98227c60774368a228638f34df84ca1f14d80a54793bfbc414746c0a709c4274102ff1846015ba4dbdcecd7d13bec561ae4056ff6e5c347c3231e73af8a9f0659c807b97a8a7999b29eaefd63d5133b0f39f1cf9de5dad02c5f804b25dab6f8ce18c66f8db64c7edd010000\\\",\\\"extension\\\":\\\"{\\\\\\\"tag\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"unit\\\":\\\"DAY\\\",\\\"_from\\\":\\\"2024-01-17\\\",\\\"_overTimeApplyUserId\\\":\\\"01575932040926359398\\\",\\\"pushTag\\\":\\\"\\\",\\\"detailList\\\":[{\\\"classInfo\\\":{\\\"restSections\\\":[],\\\"hasClass\\\":false,\\\"sections\\\":[{\\\"endAcross\\\":0,\\\"startTime\\\":1705451400000,\\\"endTime\\\":1705483800000,\\\"startAcross\\\":0}]},\\\"workDate\\\":1705420800000,\\\"isRest\\\":false,\\\"workTimeMinutes\\\":480,\\\"approveInfo\\\":{\\\"fromAcross\\\":0,\\\"toAcross\\\":0,\\\"fromTime\\\":1705451400000,\\\"durationInDay\\\":1,\\\"durationInHour\\\":8,\\\"toTime\\\":1705483800000}}],\\\"durationInDay\\\":1,\\\"_to\\\":\\\"2024-01-17\\\",\\\"isModifiable\\\":true,\\\"durationInHour\\\":8}\",\"id\":\"NumberField-K2BJK0RY\",\"name\":\"时长\",\"value\":\"1\"},{\"componentType\":\"TextareaField\",\"id\":\"外出事由\",\"name\":\"外出事由\",\"value\":\"市局有事\"},{\"componentType\":\"DDPhotoField\",\"id\":\"图片\",\"name\":\"图片\"}],\"operationRecords\":[{\"date\":\"2024-01-16T17:05Z\",\"result\":\"NONE\",\"type\":\"START_PROCESS_INSTANCE\",\"userId\":\"01575932040926359398\"},{\"date\":\"2024-01-17T09:24Z\",\"result\":\"AGREE\",\"type\":\"EXECUTE_TASK_NORMAL\",\"userId\":\"0355254921955583\"},{\"date\":\"2024-01-17T10:15Z\",\"result\":\"AGREE\",\"type\":\"EXECUTE_TASK_NORMAL\",\"userId\":\"31102532391173290\"},{\"ccUserIds\":[\"2352352656711393\",\"2359336301844466\"],\"date\":\"2024-01-17T10:15Z\",\"remark\":\"\",\"result\":\"NONE\",\"type\":\"PROCESS_CC\",\"userId\":\"01575932040926359398\"},{\"ccUserIds\":[\"254868153920685466\"],\"date\":\"2024-01-17T10:15Z\",\"remark\":\"\",\"result\":\"NONE\",\"type\":\"PROCESS_CC\",\"userId\":\"01575932040926359398\"}],\"originatorDeptId\":\"895306500\",\"originatorDeptName\":\"2B税务大厅-劳务外包人员咨询组\",\"originatorUserId\":\"01575932040926359398\",\"result\":\"agree\",\"status\":\"COMPLETED\",\"tasks\":[{\"activityId\":\"1ebf_7ae5\",\"createTime\":\"2024-01-16T17:05Z\",\"finishTime\":\"2024-01-17T09:24Z\",\"mobileUrl\":\"aflow.dingtalk.com?procInsId=9HLoKgFLTNiz1KO08qc85A07481705395941&taskId=84557347599&businessId=202401161705000413779\",\"pcUrl\":\"aflow.dingtalk.com?procInsId=9HLoKgFLTNiz1KO08qc85A07481705395941&taskId=84557347599&businessId=202401161705000413779\",\"result\":\"AGREE\",\"status\":\"COMPLETED\",\"taskId\":84557347599,\"userId\":\"0355254921955583\"},{\"activityId\":\"075a_e01a\",\"createTime\":\"2024-01-17T09:24Z\",\"finishTime\":\"2024-01-17T10:15Z\",\"mobileUrl\":\"aflow.dingtalk.com?procInsId=9HLoKgFLTNiz1KO08qc85A07481705395941&taskId=84566067197&businessId=202401161705000413779\",\"pcUrl\":\"aflow.dingtalk.com?procInsId=9HLoKgFLTNiz1KO08qc85A07481705395941&taskId=84566067197&businessId=202401161705000413779\",\"result\":\"AGREE\",\"status\":\"COMPLETED\",\"taskId\":84566067197,\"userId\":\"31102532391173290\"}],\"title\":\"李玉洁提交的外出\"}";
// new DingPersonServiceImpl().test(result);
......
......@@ -295,7 +295,7 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
if (!ObjectUtils.isEmpty(checkAttendRecordEntities)) {
Long[] checkIds = checkAttendRecordEntities.stream().map(i -> i.getId()).toArray(Long[]::new);
checkAttendRecordService.remove(checkIds,context);
log.info("删除考勤核查记录成功,size:{}",checkIds.length);
// log.info("删除考勤核查记录成功,size:{}",checkIds.length);
}
}
}
......
......@@ -25,7 +25,7 @@
<fileNamePattern>${logFilePath}/${springApplicationName:-default}/${springApplicationName:-default}-info.log.%d{yyyyMMdd}</fileNamePattern>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
<!--日志文件保留天数-->
<MaxHistory>15</MaxHistory>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
</appender>
<!-- 异常文件输出策略-->
......
......@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "2024-02-01",
"attendanceDateEnd": "2024-02-29"
"attendanceDateStart": "2024-03-01",
"attendanceDateEnd": "2024-03-31"
}
###海康考勤打卡记录计算1
......@@ -79,8 +79,8 @@ POST {{baseUrl}}/attendance/stat/summary
Content-Type: application/json
{
"summaryTimeStart": "2024-03-15",
"summaryTimeEnd": "2024-03-15"
"summaryTimeStart": "2024-03-01",
"summaryTimeEnd": "2024-03-31"
}
......@@ -133,8 +133,8 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"startTimeStart": "2024-03-08",
"endTimeEnd": "2024-03-09"
"startTimeStart": "2024-03-01",
"endTimeEnd": "2024-04-09"
}
......
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