稻花香仓库初始化
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package com.seeyon.apps.daohuaxiangSys.jkts.node;
|
||||
|
||||
import com.seeyon.apps.common.config.ICstConfigApi;
|
||||
import com.seeyon.apps.common.workflow.constants.WorkFlowType;
|
||||
import com.seeyon.apps.common.workflow.node.ACommonSuperNode;
|
||||
import com.seeyon.apps.daohuaxiangSys.jkts.constants.DaohuaxiangConstants;
|
||||
import com.seeyon.apps.daohuaxiangSys.jkts.service.NewTongYongService;
|
||||
import com.seeyon.apps.ext.workflow.vo.FormDataVo;
|
||||
import com.seeyon.apps.ext.workflow.vo.SuperNodeContext;
|
||||
import com.seeyon.cap4.form.bean.FormDataMasterBean;
|
||||
import com.seeyon.ctp.common.AppContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class NewTongYongNode extends ACommonSuperNode {
|
||||
|
||||
private ICstConfigApi cstConfigApi;
|
||||
|
||||
public ICstConfigApi getICstConfigApi() {
|
||||
if (cstConfigApi == null) {
|
||||
cstConfigApi = (ICstConfigApi) AppContext.getBean("cstConfigApi");
|
||||
}
|
||||
return cstConfigApi;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
NewTongYongService newTongYongService;
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return DaohuaxiangConstants.getPluginId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFormParse() {
|
||||
return "json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorkFlowType[] getTypes() {
|
||||
return new WorkFlowType[] { WorkFlowType.superNode };
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuperNodeContext proceed(String request, FormDataVo formDataVo, FormDataMasterBean formDataMasterBean) throws Exception {
|
||||
// 获取数据
|
||||
SuperNodeContext context = new SuperNodeContext();
|
||||
context.setNeedSave(true);
|
||||
Map<String, Object> map = newTongYongService.sendInter(formDataVo);
|
||||
context.setRequest(map.get("request").toString());
|
||||
context.setResponse(map.get("response").toString());
|
||||
Object code = map.get("code");
|
||||
if ("200".equals(code.toString())) {
|
||||
context.success(map.get("msg").toString(), false);
|
||||
} else {
|
||||
context.back(map.get("msg").toString());
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNodeId() {
|
||||
return "newTongYongNode";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNodeName() {
|
||||
return "新平台通用节点";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user