|
@@ -4,6 +4,8 @@ import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
+import com.alibaba.fastjson2.JSONArray;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
@@ -13,6 +15,8 @@ import com.ruoyi.execution.produce.dispersed.entity.BpmExecuteProcess;
|
|
|
import com.ruoyi.execution.produce.dispersed.mapper.BpmExecuteProcessMapper;
|
|
|
import com.ruoyi.execution.produce.dispersed.service.IBpmExecuteNodeMiddleService;
|
|
|
import com.ruoyi.system.entity.CommonEntity;
|
|
|
+import com.sun.org.apache.xerces.internal.impl.dtd.models.DFAContentModel;
|
|
|
+import org.springframework.beans.factory.NamedBean;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -144,6 +148,59 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
|
|
|
// intoProduction.getTaskProcessKey();
|
|
|
return AjaxResult.success(ipreExecutionToolClass.ReadyToExecute(commonEntity));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据FormId查询表单结构信息
|
|
|
+ * @param fid
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String getFromInfo(String fid) {
|
|
|
+ Map<String, String> fromInfo = runBpmExecuteProcessMapper.getFromInfo(fid);
|
|
|
+ String jsonString = JSONObject.toJSONString(fromInfo);
|
|
|
+ return jsonString;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据groupKey查询表格组对应的表格信息
|
|
|
+ * @param groupKey
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String getGroupTableInfo(String groupKey) {
|
|
|
+ //存tableInfo信息的Arraylist数组
|
|
|
+ List<HashMap> mapList=new ArrayList<>();
|
|
|
+ //查询表格组信息
|
|
|
+ Map<String, String> groupInfo = runBpmExecuteProcessMapper.getGroupInfo(groupKey);
|
|
|
+ //拿到表格组的TableInfo信息
|
|
|
+ String groupTableInfo = groupInfo.get("groupTableInfo");
|
|
|
+ //json字符传转数组
|
|
|
+ JSONArray jsonArray = JSON.parseArray(groupTableInfo);
|
|
|
+ //循环表格组里的tableInfo信息
|
|
|
+ jsonArray.forEach(item->{
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(item.toString());
|
|
|
+ HashMap hashMap =new HashMap();
|
|
|
+ jsonObject.forEach((k,v)->{
|
|
|
+ hashMap.put(k,v);
|
|
|
+ });
|
|
|
+ String tableKey = jsonObject.get("tableKey").toString();
|
|
|
+ //根据TableKey查询tableInfo
|
|
|
+ Map<String, String> tableInfo = runBpmExecuteProcessMapper.getTableInfo(tableKey);
|
|
|
+ //根据tableInfo信息拿到sqlKey信息
|
|
|
+ String sqlKey = tableInfo.get("sqlKey");
|
|
|
+ //根据sqlKey查询tableSQL信息
|
|
|
+ String tableSqlInfo = runBpmExecuteProcessMapper.getTableSqlInfo(sqlKey);
|
|
|
+ //tableInfo转JSON
|
|
|
+ hashMap.put("tableInfo", tableInfo);
|
|
|
+ hashMap.put("tableSql", tableSqlInfo);
|
|
|
+ //添加到集合里
|
|
|
+ mapList.add(hashMap);
|
|
|
+ });
|
|
|
+ return JSONObject.toJSONString(mapList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|