|
|
|
|
@ -49,6 +49,7 @@ import org.apache.ibatis.session.SqlSession;
|
|
|
|
|
import org.apache.ibatis.session.SqlSessionFactory;
|
|
|
|
|
import org.apache.ibatis.session.TransactionIsolationLevel;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
|
|
@ -1059,7 +1060,14 @@ public class HeartService {
|
|
|
|
|
.scheduleType(BasicProcessStatus.SCHEDULE_NORMAL)
|
|
|
|
|
.remark(baseResponse.getMessage())
|
|
|
|
|
.build();
|
|
|
|
|
try {
|
|
|
|
|
String fileFullPath = writeFile(filePrefix, exportType.getRemark(), JsonUtils.toJsonString(data));
|
|
|
|
|
exportStatus.setCacheFilePath(fileFullPath);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}finally {
|
|
|
|
|
applicationContext.getBean(this.getClass()).insertExportStatus(exportStatus);
|
|
|
|
|
}
|
|
|
|
|
if (baseResponse.getCode() != 20000) {
|
|
|
|
|
throw new RuntimeException(baseResponse.getMessage());
|
|
|
|
|
}
|
|
|
|
|
@ -1412,6 +1420,8 @@ public class HeartService {
|
|
|
|
|
private final SupManufacturerDao supManufacturerDao;
|
|
|
|
|
private final SupProductDao supProductDao;
|
|
|
|
|
|
|
|
|
|
@Value("${file_path}")
|
|
|
|
|
private String filePrefix;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 从UDI自助平台拉取 统一方法
|
|
|
|
|
@ -1458,6 +1468,12 @@ public class HeartService {
|
|
|
|
|
basicDownloadStatusEntity.setStatus(BasicExportStatusEnum.SUCCESS.getCode()); //下载完成
|
|
|
|
|
basicDownloadStatusEntity.setType(exportType.getRemark());
|
|
|
|
|
basicDownloadStatusEntity.setScheduleType(1);
|
|
|
|
|
try {
|
|
|
|
|
String fileFullPath = writeFile(filePrefix, exportType.getRemark(), bean.getFileContent());
|
|
|
|
|
basicDownloadStatusEntity.setCacheFilePath(fileFullPath);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
basicDownloadService.insertDownloadStatus(basicDownloadStatusEntity);
|
|
|
|
|
//通知自助平台任务已完成
|
|
|
|
|
spGetHttp.finishTask(taskId);
|
|
|
|
|
|