修改高级搜索导出功能
This commit is contained in:
+11
-4
@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -124,6 +125,7 @@ public class UnifiedTodoServiceImpl implements PushWorkflowIntegrationAPI {
|
||||
int retries = 0;
|
||||
LawsUnifiedTodoLog lawsUnifiedTodoLog = new LawsUnifiedTodoLog();
|
||||
while (retries < maxRetries) {
|
||||
log.info("==========OA调用");
|
||||
// 远程调用
|
||||
HttpResponse execute = HttpRequest.post(url)
|
||||
.header(Header.CONTENT_TYPE, "application/json;charset=UTF-8")
|
||||
@@ -136,26 +138,29 @@ public class UnifiedTodoServiceImpl implements PushWorkflowIntegrationAPI {
|
||||
if(!CollectionUtils.isEmpty(listJson)) {
|
||||
String operResult = String.valueOf(listJson.get(0).get("operResult"));
|
||||
lawsUnifiedTodoLog.setResponseBody(body);
|
||||
if (Objects.equals(operResult, "0")) {
|
||||
lawsUnifiedTodoLog.setState(2);
|
||||
} else {
|
||||
if (Objects.equals(operResult, "1")) {
|
||||
log.info("统一待办推送成功");
|
||||
lawsUnifiedTodoLog.setState(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
log.info("统一待办推送失败{}",body);
|
||||
lawsUnifiedTodoLog.setState(2);
|
||||
retries++;
|
||||
}else {
|
||||
String body = execute.body();
|
||||
lawsUnifiedTodoLog.setResponseBody(body);
|
||||
List<JSONObject> listJson = JSONArray.parseArray(body,JSONObject.class);
|
||||
if(!CollectionUtils.isEmpty(listJson)){
|
||||
String operResult = String.valueOf(listJson.get(0).get("operResult"));
|
||||
if ("1".equals(operResult)){
|
||||
if (Objects.equals(operResult, "1")) {
|
||||
log.info("统一待办推送成功");
|
||||
lawsUnifiedTodoLog.setState(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
log.info("统一待办推送失败{}",body);
|
||||
lawsUnifiedTodoLog.setState(2);
|
||||
retries++;
|
||||
}
|
||||
}
|
||||
@@ -206,6 +211,8 @@ public class UnifiedTodoServiceImpl implements PushWorkflowIntegrationAPI {
|
||||
queryProcessAll.eq(ProcessAll::getProcessInstanceId,processApprovalRecord.getProcessInstanceId());
|
||||
ProcessAll processAll = processAllService.getOne(queryProcessAll);
|
||||
if(!Objects.isNull(processAll)){
|
||||
unifiedTodo.setCreatedatetime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(processAll.getCreateTime()));
|
||||
unifiedTodo.setReceivedatetime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(processApprovalRecord.getCreateTime()));
|
||||
String processName = ProcessTypeEnum.getNameByValue(processAll.getPrcType());
|
||||
noticeTitle = processName + "(" + sysUser.getRealname() + " " + date + ")";
|
||||
unifiedTodo.setWorkflowname(processName);
|
||||
|
||||
Reference in New Issue
Block a user