|
|
|
@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import sun.misc.BASE64Decoder;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.time.ZoneId;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@ -356,13 +358,13 @@ public class AppController extends BaseController
|
|
|
|
|
String URL = RequestParamsUtil.HTTP + ip + RequestParamsUtil.SEPARATOR + port + url;
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
String result;
|
|
|
|
|
long start;
|
|
|
|
|
long end;
|
|
|
|
|
Date start;
|
|
|
|
|
Date end;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
start = System.currentTimeMillis();
|
|
|
|
|
start = new Date();
|
|
|
|
|
result = HttpUtils.sendPost(URL, mapper.writeValueAsString(delNullData(aiPostReq)));
|
|
|
|
|
end = System.currentTimeMillis();
|
|
|
|
|
end = new Date();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
@ -383,9 +385,8 @@ public class AppController extends BaseController
|
|
|
|
|
throw new ServiceException(data.getString("msg"));
|
|
|
|
|
}
|
|
|
|
|
jsonObject = removeBase64Image(data,recordId);
|
|
|
|
|
tRecord.setAiResultReturnTime(new Date());
|
|
|
|
|
tRecord.setUpdateTime(new Date());
|
|
|
|
|
tRecord.setResponseTime((end-start)/1000);
|
|
|
|
|
tRecord.setUploadTime(start);
|
|
|
|
|
tRecord.setAiResultReturnTime(end);
|
|
|
|
|
tRecord.setAiResult(JSONObject.toJSONString(jsonObject, SerializerFeature.WriteMapNullValue));
|
|
|
|
|
tRecord.setAiResult2(JSONObject.toJSONString(jsonObject, SerializerFeature.WriteMapNullValue));
|
|
|
|
|
tRecordService.updateTRecord(tRecord);
|
|
|
|
|