|
@@ -51,11 +51,12 @@ public class PlatformRest extends BaseService {
|
|
|
@WebApiBean(result = true, type = PlatformInfo.class)
|
|
@WebApiBean(result = true, type = PlatformInfo.class)
|
|
|
public CompletableFuture<RMap> getPlatformInfo(
|
|
public CompletableFuture<RMap> getPlatformInfo(
|
|
|
@RestParam(name = "idPlatform", comment = "平台档案id") long idPlatform,
|
|
@RestParam(name = "idPlatform", comment = "平台档案id") long idPlatform,
|
|
|
|
|
+ @RestParam(name = "withDetail", comment = "是否返回属性明细") boolean withDetail,
|
|
|
@RestHeader(name = ERPHeader.HTTPHEADER_DATASOURCE) String dataSourceId,
|
|
@RestHeader(name = ERPHeader.HTTPHEADER_DATASOURCE) String dataSourceId,
|
|
|
@RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
|
|
@RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
|
|
|
return CompletableFuture.supplyAsync(
|
|
return CompletableFuture.supplyAsync(
|
|
|
() -> {
|
|
() -> {
|
|
|
- PlatformInfo platformInfo = platformService.getPlatformInfo(idPlatform, false, Long.parseLong(supplierCode));
|
|
|
|
|
|
|
+ PlatformInfo platformInfo = platformService.getPlatformInfo(idPlatform, withDetail, Long.parseLong(supplierCode));
|
|
|
if (platformInfo == null) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), "平台档案不存在");
|
|
if (platformInfo == null) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), "平台档案不存在");
|
|
|
return RMapUtils.successV2(platformInfo, null, null);
|
|
return RMapUtils.successV2(platformInfo, null, null);
|
|
|
}, getExecutor()
|
|
}, getExecutor()
|
|
@@ -80,7 +81,6 @@ public class PlatformRest extends BaseService {
|
|
|
|
|
|
|
|
|
|
|
|
|
@RestMapping(name = "updatePlatformInfo", auth = true, sort = 4, comment = "修改平台档案", methods = {"POST"})
|
|
@RestMapping(name = "updatePlatformInfo", auth = true, sort = 4, comment = "修改平台档案", methods = {"POST"})
|
|
|
- @WebApiBean(result = true, type = PlatformInfo.class)
|
|
|
|
|
public CompletableFuture<RMap> updatePlatformInfo(
|
|
public CompletableFuture<RMap> updatePlatformInfo(
|
|
|
@RestParam(name = "platformInfo", comment = "平台档案") PlatformInfo platformInfo,
|
|
@RestParam(name = "platformInfo", comment = "平台档案") PlatformInfo platformInfo,
|
|
|
@RestParam(name = "&", comment = "当前用户,不需要传入") ERPTokenUser currentUser,
|
|
@RestParam(name = "&", comment = "当前用户,不需要传入") ERPTokenUser currentUser,
|
|
@@ -90,13 +90,12 @@ public class PlatformRest extends BaseService {
|
|
|
() -> {
|
|
() -> {
|
|
|
RetResult<PlatformInfo> result = platformService.updatePlatformInfo(platformInfo, currentUser, dataSourceId, Long.parseLong(supplierCode));
|
|
RetResult<PlatformInfo> result = platformService.updatePlatformInfo(platformInfo, currentUser, dataSourceId, Long.parseLong(supplierCode));
|
|
|
if (!result.isSuccess()) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
|
|
if (!result.isSuccess()) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
|
|
|
- return RMapUtils.successV2(result.getResult(), null, null);
|
|
|
|
|
|
|
+ return RMapUtils.success();
|
|
|
}, getExecutor()
|
|
}, getExecutor()
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@RestMapping(name = "voidPlatformInfo", auth = true, sort = 5, comment = "禁用平台档案", methods = {"POST"})
|
|
@RestMapping(name = "voidPlatformInfo", auth = true, sort = 5, comment = "禁用平台档案", methods = {"POST"})
|
|
|
- @WebApiBean(result = true, type = PlatformInfo.class)
|
|
|
|
|
public CompletableFuture<RMap> voidPlatformInfo(
|
|
public CompletableFuture<RMap> voidPlatformInfo(
|
|
|
@RestParam(name = "platformInfo", comment = "平台档案") PlatformInfo platformInfo,
|
|
@RestParam(name = "platformInfo", comment = "平台档案") PlatformInfo platformInfo,
|
|
|
@RestParam(name = "&", comment = "当前用户,不需要传入") ERPTokenUser currentUser,
|
|
@RestParam(name = "&", comment = "当前用户,不需要传入") ERPTokenUser currentUser,
|
|
@@ -106,7 +105,7 @@ public class PlatformRest extends BaseService {
|
|
|
() -> {
|
|
() -> {
|
|
|
RetResult<PlatformInfo> result = platformService.voidPlatformInfo(platformInfo, currentUser, dataSourceId, Long.parseLong(supplierCode));
|
|
RetResult<PlatformInfo> result = platformService.voidPlatformInfo(platformInfo, currentUser, dataSourceId, Long.parseLong(supplierCode));
|
|
|
if (!result.isSuccess()) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
|
|
if (!result.isSuccess()) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
|
|
|
- return RMapUtils.successV2(result.getResult(), null, null);
|
|
|
|
|
|
|
+ return RMapUtils.success();
|
|
|
}, getExecutor()
|
|
}, getExecutor()
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|