|
|
@@ -6,9 +6,7 @@ import com.dderp.common.base.BaseService;
|
|
|
import com.dderp.common.datas.ERPHeader;
|
|
|
import com.dderp.common.datas.ERPModule;
|
|
|
import com.dderp.common.datas.HttpCode;
|
|
|
-import com.dderp.common.entity.base.IdValueItem;
|
|
|
-import com.dderp.common.entity.base.ProcessSearchItem;
|
|
|
-import com.dderp.common.entity.base.ScriptContent;
|
|
|
+import com.dderp.common.entity.base.*;
|
|
|
import com.dderp.common.entity.doc.BusinessScript;
|
|
|
import com.dderp.common.entity.inquire.InquireCondition;
|
|
|
import com.dderp.common.entity.inquire.InquireExecRecord;
|
|
|
@@ -31,6 +29,7 @@ import java.util.stream.Collectors;
|
|
|
@AutoLoad(false)
|
|
|
@Local
|
|
|
@RestService(name = "doc", moduleid = 0, comment = "基础档案模块")
|
|
|
+@SuppressWarnings("rawtypes")
|
|
|
public class DocInfoRest extends BaseService {
|
|
|
@Resource
|
|
|
private DocInfoService docInfoService;
|
|
|
@@ -38,6 +37,23 @@ public class DocInfoRest extends BaseService {
|
|
|
@Resource
|
|
|
private SystemService systemService;
|
|
|
|
|
|
+ @RestMapping(name = "callDoc", auth = false, sort = 1, logging = 4, comment = "基础档案接口", methods = {"POST"})
|
|
|
+ public CompletableFuture<InvokeCallResult> callDoc(
|
|
|
+ @RestBody(comment = "提交数据") InvokeCallParams callParams,
|
|
|
+ @RestParam(name = "&", comment = "登录用户,无需传入") ERPTokenUser currentUser,
|
|
|
+ @RestHeader(name = ERPHeader.HTTPHEADER_DATASOURCE) String dataSourceId,
|
|
|
+ @RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
|
|
|
+ return CompletableFuture.supplyAsync(
|
|
|
+ () -> {
|
|
|
+ RetResult<InvokeCallResult> infoResult = docInfoService.callDoc(callParams, currentUser, dataSourceId, Long.parseLong(supplierCode));
|
|
|
+ if (infoResult.isSuccess()) {
|
|
|
+ return infoResult.getResult();
|
|
|
+ }
|
|
|
+ return InvokeCallResult.error(HttpCode.BAD_REQUEST.value(), infoResult.getRetinfo());
|
|
|
+ }, getExecutor()
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
//region 业务执行脚本
|
|
|
@RestMapping(name = "getBusinessScriptList", auth = true, sort = 500, comment = "获取业务脚本列表", methods = {"GET", "POST"})
|
|
|
@WebApiBean(result = true, type = BusinessScript.class)
|