bug修改

master
anthonywj 2 years ago
parent 791578a2fa
commit e58c9f6fdf

@ -41,6 +41,7 @@ public enum BasicExportTypeEnum {
*
*/
SYS_SET_DATA("sys_set_data", "系统设置数据"),
;
private String key;

@ -34,7 +34,7 @@ public class BasicProcessStatus {
public static final String NEW_ALL_BUS = "8";
public static final String NEW_ALL_ORDER = "出入库扫码单据";
public static final String NEW_ALL_UDIS = "10";
public static final String ALL_BUS_ORDER = "11";
public static final String ALL_BUS_ORDER = "业务单据";
public static final int IMPORT_LOG_TYPE_ORDER = 1;//单据

@ -320,9 +320,10 @@ public class SpsSyncDataController {
private JSONObject redirect(HttpServletRequest request, String uri) {
RestTemplate restTemplate = new RestTemplate();
HttpEntity<String> httpEntity = uriUtils.buildHeader(request);
String taskId = request.getHeader("taskId");
ResponseEntity<JSONObject> responseBody = null;
SyncUpLoadRequest bean = JSONUtil.toBean(httpEntity.getBody(), SyncUpLoadRequest.class);
String taskId = bean.getTaskId();
if (request.getMethod().equals("POST")) {
//写入日志
writeUploadLog(taskId, httpEntity.getBody(), bean.getExportType());
@ -346,10 +347,12 @@ public class SpsSyncDataController {
basicUploadStatusEntity.setIdDatas(exportType.getKey());
basicUploadStatusEntity.setType(exportType.getRemark());
basicUploadStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
// basicUploadStatusEntity.setRemark();
FileUtils.makeDirectory(filePath + "upload/");
String fileName = filePath + "upload/" + exportType.getRemark() + "-" + taskId + ".udi";
FileUtils.SaveFileAs(content, fileName);
basicUploadStatusEntity.setCacheFilePath(fileName);
basicUploadStatusEntity.setStatus(1);
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
}

@ -102,7 +102,7 @@ public class SyncController {
if (StrUtil.isNotEmpty(upperServerHost)) {
uri = upperServerHost + "/" + uri;
}
JSONObject jsonObject = redirect(request, uri, ConstantStatus.SYNC_BUS_ORDER, BasicProcessStatus.ALL_BUS_ORDER);
JSONObject jsonObject = redirect(request, uri);
return jsonObject;
}

@ -13,7 +13,7 @@ import lombok.NoArgsConstructor;
public class SyncUpLoadRequest {
private BasicExportTypeEnum exportType;
private String taskId;
private Object data;
}

Loading…
Cancel
Save