|
@@ -11,6 +11,7 @@ import com.simuwang.base.mapper.FundInfoMapper;
|
|
|
import com.simuwang.base.pojo.dos.FundAndCompanyInfoDO;
|
|
|
import com.simuwang.base.pojo.dto.report.ParseResult;
|
|
|
import com.simuwang.base.pojo.dto.report.ReportData;
|
|
|
+import com.simuwang.base.pojo.dto.report.ReportParseStatus;
|
|
|
import com.simuwang.base.pojo.dto.report.ReportParserParams;
|
|
|
import com.simuwang.daq.components.PythonReportConverter;
|
|
|
import com.simuwang.daq.components.report.parser.ReportParser;
|
|
@@ -63,6 +64,9 @@ public abstract class AbstractPyReportParser<T extends ReportData> implements Re
|
|
|
}
|
|
|
String body = HttpUtil.post(pyBaseUrl + api, JSONUtil.toJsonStr(params));
|
|
|
ParseResult<T> result = PythonReportConverter.convert(JSONUtil.parseObj(body), reportType);
|
|
|
+ if (result.getStatus() == null) {
|
|
|
+ throw new ReportParseException(ReportParseStatus.PARSE_FAIL, "资源文件不存在");
|
|
|
+ }
|
|
|
if (!Objects.equals(1, result.getStatus())) {
|
|
|
this.logger.error("报告{} 解析失败:{}", params, result.getMsg());
|
|
|
throw new ReportParseException(result.getStatus(), result.getMsg());
|