任务类型int->String

version1
anthonywj 2 years ago
parent 3cdd36deb6
commit fe086ce317

@ -24,16 +24,16 @@ public class BasicProcessStatus {
//导出数据类型
public static final int BASIC_UDI = 1; //耗材字典
public static final int BASIC_INV = 2; //仓库字典
public static final int BASIC_CORP = 3; //往来单位
public static final int BASIC_THIRD_PRODUCTS = 4; //往来单位
public static final int BASIC_THIRD_CORP = 5; //往来单位
public static final int BASIC_THIRD_ORDER = 6; //往来单位
public static final int NEW_ALL_DATA = 7;
public static final int NEW_ALL_BUS = 8;
public static final int NEW_ALL_ORDER = 9;
public static final int NEW_ALL_UDIS = 10;
public static final String BASIC_UDI = "1"; //耗材字典
public static final String BASIC_INV = "2"; //仓库字典
public static final String BASIC_CORP = "3"; //往来单位
public static final String BASIC_THIRD_PRODUCTS = "4"; //往来单位
public static final String BASIC_THIRD_CORP = "5"; //往来单位
public static final String BASIC_THIRD_ORDER = "6"; //往来单位
public static final String NEW_ALL_DATA = "7";
public static final String NEW_ALL_BUS = "8";
public static final String NEW_ALL_ORDER = "9";
public static final String NEW_ALL_UDIS = "10";
public static final int IMPORT_LOG_TYPE_ORDER = 1;//单据

@ -74,37 +74,37 @@ public class BasicDownloadController {
@PostMapping("/spssync/basic/udiinfo/downloadByStatus")
public BaseResponse downloadByStatus(@RequestBody BasicExportStatusRequest basicExportStatusRequest) {
log.info("查询下载未更新信息");
if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_UDI) {//基础信息下载
if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_UDI)) {//基础信息下载
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
UdiRelevanceExportJsonResponse udiRelevanceExportJsonResponse = JSONObject.parseObject(data, new TypeReference<UdiRelevanceExportJsonResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(udiRelevanceExportJsonResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_CORP) {//基础信息下载
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_CORP)) {//基础信息下载
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
BasicUnitMaintainExportResponse basicUnitMaintainExportResponse = JSONObject.parseObject(data, new TypeReference<BasicUnitMaintainExportResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(basicUnitMaintainExportResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_INV) {//基础信息下载
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_INV)) {//基础信息下载
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
InvWarehouseExportResponse invWarehouseExportResponse = JSONObject.parseObject(data, new TypeReference<InvWarehouseExportResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(invWarehouseExportResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_DATA) {//基础信息下载
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_DATA)) {//基础信息下载
SpsSyncDataResponse spsSyncDataResponse = (SpsSyncDataResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spsSyncDataResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_BUS) {//单据类型
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_BUS)) {//单据类型
SpsSyncBusResponse spsSyncDataResponse = (SpsSyncBusResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spsSyncDataResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_ORDER) {//单据
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_ORDER)) {//单据
SpsSyncOrderResponse spsSyncDataResponse = (SpsSyncOrderResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spsSyncDataResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_UDIS) {//国家库信息
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_UDIS)) {//国家库信息
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findById(basicExportStatusRequest.getId());
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
SpSyncUdiResponse spSyncUdiResponse = null;
@ -131,4 +131,4 @@ public class BasicDownloadController {
return ResultVOUtils.error(500, "更新成功!");
}
}
}

@ -10,7 +10,7 @@ public class BasicExportStatusEntity {
private String taskId;
private String idDatas;
private Integer status;
private Integer type;
private String type;
/**
* 1. 2.
*/

@ -13,7 +13,7 @@ public class BasicUploadStatusEntity {
private String taskId;
private String idDatas;
private Integer status;
private Integer type;
private String type;
/**
* 1. 2.
*/

@ -7,7 +7,7 @@ import lombok.Data;
public class BasicExportStatusRequest extends ListPageRequest {
private String id;
private Integer status;
private Integer type;
private String type;
private Integer scheduleType;
private String idDatas;
private String taskId;

Loading…
Cancel
Save