diff --git a/htmlweb/web/backstage/oa/ocr/prevailcloudlog/list.html b/htmlweb/web/backstage/oa/ocr/prevailcloudlog/list.html
index 869135a3..e650d5ce 100644
--- a/htmlweb/web/backstage/oa/ocr/prevailcloudlog/list.html
+++ b/htmlweb/web/backstage/oa/ocr/prevailcloudlog/list.html
@@ -4,6 +4,9 @@
数据拉取日志
+
+
+
<#include "/head/headlist.html" />
@@ -138,7 +141,21 @@
},
{width: 80, valign: "middle", field: 'responseParam', title: '响应参数', sortable: true},
{width: 80, valign: "middle", field: 'requestParam', title: '请求参数', sortable: true},
-
+ {
+ width:200,
+ field: 'id',
+ title: '操作',
+ formatter:function(value,oData,index) {
+ var listOperation = "";
+ $(jspOperation).each(function (i, toolbar) {
+ console.log(toolbar);
+ if (toolbar.text === '修改' && oData.status !== 100) {
+ listOperation = listOperation + " " + "重试" + " ";
+ }
+ });
+ return listOperation;
+ }
+ }
]
});
}
@@ -149,5 +166,26 @@
function refreshTable(sourceid){
_tableListPost.bootstrapTable('refreshOptions',{pageNumber:1});
}
+
+ function updateData(jframeid,str){
+ $(document).ready(function() {
+ // Encode the parameter string to be URL-safe
+ // Make an AJAX GET request
+ $.ajax({
+ url: '${ctx}/test/api/pullPictureByParameter', // Replace with your server endpoint
+ type: 'GET',
+ headers: {"logintoken": parent.getLoginToken()},
+ data: { parameterString: str },
+ success: function(response) {
+ console.log(response);
+ toastr.success('Request was successful!');
+ },
+ error: function(xhr, status, error) {
+ console.log(error);
+ toastr.error('Request was failed!');
+ }
+ });
+ });
+ }
diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/PrevailCloudApiController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/PrevailCloudApiController.java
index 545353e8..8e9d85dd 100644
--- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/PrevailCloudApiController.java
+++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/PrevailCloudApiController.java
@@ -16,6 +16,7 @@ import cn.jyjz.xiaoyao.ocr.api.utils.ApiPage;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrPrevailCloudLogService;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
+import cn.jyjz.xiaoyao.ocr.util.RequestParameterFormat;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Maps;
import lombok.extern.flogger.Flogger;
@@ -24,6 +25,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.nio.ch.ThreadPool;
@@ -276,6 +278,32 @@ public class PrevailCloudApiController {
return "处理成功";
}
+ @GetMapping("/pullPictureByParameter")
+ public Boolean pullPictureByParameter(String parameterString) {
+ PictureSourceParameter pictureSourceParameter = RequestParameterFormat.fromString(parameterString);
+ List resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter);
+ if (CollectionUtils.isEmpty(resultList)) {
+ return false;
+ }
+
+ for (PictureSourceResult pictureSourceResult : resultList) {
+ //1.如果不存在图片默认一个默认图片,方便走测试。
+ if (pictureSourceResult.getLivePhoto() == null) {
+ List