|
|
@@ -2,30 +2,12 @@ package com.cloud.sa.demo;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.cloud.sa.flow.commom.aspect.EventProgram;
|
|
|
-import com.cloud.sa.flow.commom.common.model.StResult;
|
|
|
-import com.cloud.sa.flow.commom.common.system.StUserInfo;
|
|
|
import com.cloud.sa.flow.commom.common.utils.StConvert;
|
|
|
import com.cloud.sa.flow.commom.common.utils.StString;
|
|
|
-import com.cloud.sa.flow.commom.domain.entity.*;
|
|
|
-import com.cloud.sa.flow.commom.domain.entity.setting.StEventAdditive;
|
|
|
-import com.cloud.sa.flow.commom.domain.entity.setting.StEventMain;
|
|
|
-import com.cloud.sa.flow.commom.domain.entity.setting.StQueryMain;
|
|
|
-import com.cloud.sa.flow.commom.domain.virentity.TreeNode;
|
|
|
-import com.cloud.sa.flow.commom.service.StMenuService;
|
|
|
-import com.cloud.sa.flow.commom.service.StOrganizeService;
|
|
|
-import com.cloud.sa.flow.commom.service.setting.StAdmitService;
|
|
|
-import com.cloud.sa.flow.commom.service.setting.StSettingService;
|
|
|
-import com.cloud.sa.flow.commom.service.setting.StTaskAgentService;
|
|
|
-import com.cloud.sa.flow.engine.service.StFlowService;
|
|
|
-import com.wx.blink.base.common.annoation.NoNeedLogin;
|
|
|
-import com.wx.blink.base.common.domain.ResponseDTO;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import com.cloud.sa.flow.commom.domain.virentity.StInstanceEvent;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author lc
|
|
|
@@ -52,4 +34,22 @@ public class DemoEngineController {
|
|
|
}
|
|
|
return jsonArray;
|
|
|
}
|
|
|
+ @PostMapping("/eventTest")
|
|
|
+ public JSONArray eventTest(@RequestBody StInstanceEvent event) {
|
|
|
+ if (StString.isNotEmpty(event.toString())) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
+ for (int i = 0; i < 10; i++) {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonArray.add(jsonObject);
|
|
|
+ //所有值必须是字符串,否则前端无法获取
|
|
|
+ jsonObject.put("code", StConvert.toStr(i));
|
|
|
+ jsonObject.put("name", i + "name");
|
|
|
+ jsonObject.put("address", LocalDateTime.now().toString());
|
|
|
+ jsonObject.put("address3", i + "address");
|
|
|
+ jsonObject.put("address2", null);
|
|
|
+ }
|
|
|
+ return jsonArray;
|
|
|
+ }
|
|
|
}
|