|
|
|
@ -109,6 +109,10 @@ public class ApprovalCallbackOperate extends LarkAbstract {
|
|
|
|
|
request.setAppSecret(relation.getSecret());
|
|
|
|
|
LarkApprovalRequest detailRequest = new LarkApprovalRequest(request.getAppId(), request.getAppSecret(), event.getRecordId());
|
|
|
|
|
GetInstanceRespBody approvalInfoDetail = larkApprovalHelper.getApprovalInfoDetail(detailRequest);
|
|
|
|
|
JSONArray objects = JSONArray.parseArray(approvalInfoDetail.getForm());
|
|
|
|
|
if (objects.size() == 1){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
request.setInstanceRespBody(approvalInfoDetail);
|
|
|
|
|
String approvalName = approvalInfoDetail.getApprovalName();
|
|
|
|
|
request.setApproveName(approvalName);
|
|
|
|
@ -119,7 +123,9 @@ public class ApprovalCallbackOperate extends LarkAbstract {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void businessProcessing(RequestVo request) {
|
|
|
|
|
|
|
|
|
|
if (request.getInstanceRespBody() == null){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
for (Map.Entry<String, Long> entry : request.getTableRelationMap().entrySet()) {
|
|
|
|
|
String[] arr = entry.getKey().split("_");
|
|
|
|
|
request.setToAppToken(arr[0]);
|
|
|
|
@ -207,9 +213,7 @@ public class ApprovalCallbackOperate extends LarkAbstract {
|
|
|
|
|
eventLog = new EventLog(event.getId(), request.getApproveName(), request.getMessage());
|
|
|
|
|
} else {
|
|
|
|
|
eventService.updateStatus(event.getId(), EventOperateStatus.PENDING.getCode(), event.getNumbers() + 1);
|
|
|
|
|
if (request.getEventOperateType() != null) {
|
|
|
|
|
new EventLog(event.getId(), request.getApproveName(), request.getMessage(), request.getErrorCode(), request.getErrorMessage());
|
|
|
|
|
}
|
|
|
|
|
eventLog = new EventLog(event.getId(), request.getApproveName(), request.getMessage(), request.getErrorCode(), request.getErrorMessage());
|
|
|
|
|
}
|
|
|
|
|
if (eventLog != null) {
|
|
|
|
|
eventLog.setOperateInfo(request.getOperateInfo());
|
|
|
|
|