|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
@@ -28,6 +29,7 @@ import org.springblade.manager.dto.*;
|
|
import org.springblade.manager.entity.*;
|
|
import org.springblade.manager.entity.*;
|
|
import org.springblade.manager.enums.ExecuteType;
|
|
import org.springblade.manager.enums.ExecuteType;
|
|
import org.springblade.manager.formula.KeyMapper;
|
|
import org.springblade.manager.formula.KeyMapper;
|
|
|
|
+import org.springblade.manager.formula.impl.CompositeDataAccess;
|
|
import org.springblade.manager.service.*;
|
|
import org.springblade.manager.service.*;
|
|
import org.springblade.manager.service.impl.FormulaServiceImpl;
|
|
import org.springblade.manager.service.impl.FormulaServiceImpl;
|
|
import org.springblade.manager.vo.AppWbsTreeContractVO;
|
|
import org.springblade.manager.vo.AppWbsTreeContractVO;
|
|
@@ -497,6 +499,83 @@ public class FormulaController {
|
|
return R.data(map);
|
|
return R.data(map);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* public R<Object> chartInit(@RequestBody ChartOption option){
|
|
|
|
+ *//*1.获取公式配置,如果存在子公式,则一直查找到最终公式*//*
|
|
|
|
+ *//*2.查找所有依赖元素的所有数据,按表单排序*//*
|
|
|
|
+ *//*3.计算结果*//*
|
|
|
|
+ *//*4.查找当前表对应返回配置模版结合计算结果生成option*//*
|
|
|
|
+ Long pkeyId=option.getPkeyId();
|
|
|
|
+ String id=option.getId();
|
|
|
|
+ WbsTreePrivate wtp = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId,pkeyId));
|
|
|
|
+ if(wtp!=null&&Func.isNotEmpty(id)){
|
|
|
|
+ *//*获取配置*//*
|
|
|
|
+ List<Map<String,Object>> listMap= this.jdbcTemplate.queryForList("select content from m_formula_panel a join m_wbs_tree_private b on a.id=b.init_table_id where b.p_key_id="+pkeyId);
|
|
|
|
+ if(Func.isNotEmpty(listMap)){
|
|
|
|
+ JSONObject job = JSON.parseObject(listMap.get(0).get("content").toString());
|
|
|
|
+ *//*获取关联数据*//*
|
|
|
|
+ List<Map<String,Object>> configList= this.jdbcTemplate.queryForList("select d.rely ,b.e_key ekey from m_wbs_tree_private a join m_wbs_form_element b on a.init_table_id=b.f_id join m_element_formula_mapping c on b.id=c.element_id join m_formula d on c.formula_id=d.id where p_key_id="+wtp.getPKeyId()+" and b.is_deleted=0 and d.formula like 'FC.chart%' limit 1");
|
|
|
|
+ if(Func.isNotEmpty(configList)){
|
|
|
|
+ Map<String,Object> config =configList.get(0);
|
|
|
|
+ String[] rely = Func.toStr(config.get("rely")).split(",");
|
|
|
|
+ String ky=rely[0].split(":")[1];
|
|
|
|
+ String kx=rely[1].split(":")[1];
|
|
|
|
+ Map<String,Map<String,Object>> formMap = option.getData();
|
|
|
|
+ List<Map<String,Object>> dataMap;
|
|
|
|
+ if(formMap!=null&&formMap.size()>0){
|
|
|
|
+ dataMap=new ArrayList<>();
|
|
|
|
+ Map<String,Object> md= new HashMap<>();
|
|
|
|
+ dataMap.add(md);
|
|
|
|
+ StringBuilder sy= new StringBuilder();
|
|
|
|
+ StringBuilder sx = new StringBuilder();
|
|
|
|
+ formMap.forEach((o,t)->{
|
|
|
|
+ t.forEach((k,v)->{
|
|
|
|
+ String[] ka=k.split("__");
|
|
|
|
+ if(ky.equals(ka[0])){
|
|
|
|
+ sy.append(v).append("_^_").append(ka[1]).append("☆");
|
|
|
|
+ }else if(kx.equals(ka[0])){
|
|
|
|
+ sx.append(v).append("_^_").append(ka[1]).append("☆");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ if(sy.length()>1){
|
|
|
|
+ sy.deleteCharAt(sy.length()-1);
|
|
|
|
+ }
|
|
|
|
+ if(sx.length()>1){
|
|
|
|
+ sx.deleteCharAt(sx.length()-1);
|
|
|
|
+ }
|
|
|
|
+ md.put(ky,sy.toString());
|
|
|
|
+ md.put(kx,sx.toString());
|
|
|
|
+ }else{
|
|
|
|
+ dataMap= this.jdbcTemplate.queryForList("select "+ky+","+kx+" from "+wtp.getInitTableName() +" where group_id="+id+" and p_key_id ="+pkeyId);
|
|
|
|
+ }
|
|
|
|
+ if(Func.isNotEmpty(dataMap)){
|
|
|
|
+ Map<String,Object> data = dataMap.get(0);
|
|
|
|
+ String dy= Func.toStr(data.get(ky));
|
|
|
|
+ String dx=Func.toStr(data.get(kx));
|
|
|
|
+ if(dy.length()>0&&dx.length()>0){
|
|
|
|
+ Map<String,String> coordsMap = FormulaUtils.getElementCell(wtp.getHtmlUrl());
|
|
|
|
+ List<ElementData> ly = FormulaUtils.getElementDataList(coordsMap.get(ky),dy);
|
|
|
|
+ List<ElementData> lx = FormulaUtils.getElementDataList(coordsMap.get(kx),dx);
|
|
|
|
+ JSONArray jsonArray =new JSONArray();
|
|
|
|
+ for(int i=0;i< Math.min(ly.size(),lx.size());i++){
|
|
|
|
+ ElementData edy= ly.get(i);
|
|
|
|
+ ElementData edx = lx.get(i);
|
|
|
|
+ if(StringUtils.isNotEmpty(edy.stringValue(),edx.stringValue())){
|
|
|
|
+ jsonArray.add(new JSONArray().fluentAdd(edx.numberValue()).fluentAdd(edy.numberValue()));;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(!jsonArray.isEmpty()){
|
|
|
|
+ JSONObject chartData= job.getJSONArray("series").getJSONObject(0);
|
|
|
|
+ chartData.put("data",jsonArray);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return R.data(job);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return R.data("{}");
|
|
|
|
+ }*/
|
|
@PostMapping("/chart-init")
|
|
@PostMapping("/chart-init")
|
|
@ApiOperationSupport(order = 11)
|
|
@ApiOperationSupport(order = 11)
|
|
public R<Object> chartInit(@RequestBody ChartOption option){
|
|
public R<Object> chartInit(@RequestBody ChartOption option){
|
|
@@ -512,64 +591,10 @@ public class FormulaController {
|
|
List<Map<String,Object>> listMap= this.jdbcTemplate.queryForList("select content from m_formula_panel a join m_wbs_tree_private b on a.id=b.init_table_id where b.p_key_id="+pkeyId);
|
|
List<Map<String,Object>> listMap= this.jdbcTemplate.queryForList("select content from m_formula_panel a join m_wbs_tree_private b on a.id=b.init_table_id where b.p_key_id="+pkeyId);
|
|
if(Func.isNotEmpty(listMap)){
|
|
if(Func.isNotEmpty(listMap)){
|
|
JSONObject job = JSON.parseObject(listMap.get(0).get("content").toString());
|
|
JSONObject job = JSON.parseObject(listMap.get(0).get("content").toString());
|
|
- /*获取关联数据*/
|
|
|
|
- List<Map<String,Object>> configList= this.jdbcTemplate.queryForList("select d.rely ,b.e_key ekey from m_wbs_tree_private a join m_wbs_form_element b on a.init_table_id=b.f_id join m_element_formula_mapping c on b.id=c.element_id join m_formula d on c.formula_id=d.id where p_key_id="+wtp.getPKeyId()+" and b.is_deleted=0 and d.formula like 'FC.chart%' limit 1");
|
|
|
|
- if(Func.isNotEmpty(configList)){
|
|
|
|
- Map<String,Object> config =configList.get(0);
|
|
|
|
- String[] rely = Func.toStr(config.get("rely")).split(",");
|
|
|
|
- String ky=rely[0].split(":")[1];
|
|
|
|
- String kx=rely[1].split(":")[1];
|
|
|
|
- Map<String,Map<String,Object>> formMap = option.getData();
|
|
|
|
- List<Map<String,Object>> dataMap;
|
|
|
|
- if(formMap!=null&&formMap.size()>0){
|
|
|
|
- dataMap=new ArrayList<>();
|
|
|
|
- Map<String,Object> md= new HashMap<>();
|
|
|
|
- dataMap.add(md);
|
|
|
|
- StringBuilder sy= new StringBuilder();
|
|
|
|
- StringBuilder sx = new StringBuilder();
|
|
|
|
- formMap.forEach((o,t)->{
|
|
|
|
- t.forEach((k,v)->{
|
|
|
|
- String[] ka=k.split("__");
|
|
|
|
- if(ky.equals(ka[0])){
|
|
|
|
- sy.append(v).append("_^_").append(ka[1]).append("☆");
|
|
|
|
- }else if(kx.equals(ka[0])){
|
|
|
|
- sx.append(v).append("_^_").append(ka[1]).append("☆");
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- if(sy.length()>1){
|
|
|
|
- sy.deleteCharAt(sy.length()-1);
|
|
|
|
- }
|
|
|
|
- if(sx.length()>1){
|
|
|
|
- sx.deleteCharAt(sx.length()-1);
|
|
|
|
- }
|
|
|
|
- md.put(ky,sy.toString());
|
|
|
|
- md.put(kx,sx.toString());
|
|
|
|
- }else{
|
|
|
|
- dataMap= this.jdbcTemplate.queryForList("select "+ky+","+kx+" from "+wtp.getInitTableName() +" where group_id="+id+" and p_key_id ="+pkeyId);
|
|
|
|
- }
|
|
|
|
- if(Func.isNotEmpty(dataMap)){
|
|
|
|
- Map<String,Object> data = dataMap.get(0);
|
|
|
|
- String dy= Func.toStr(data.get(ky));
|
|
|
|
- String dx=Func.toStr(data.get(kx));
|
|
|
|
- if(dy.length()>0&&dx.length()>0){
|
|
|
|
- Map<String,String> coordsMap = FormulaUtils.getElementCell(wtp.getHtmlUrl());
|
|
|
|
- List<ElementData> ly = FormulaUtils.getElementDataList(coordsMap.get(ky),dy);
|
|
|
|
- List<ElementData> lx = FormulaUtils.getElementDataList(coordsMap.get(kx),dx);
|
|
|
|
- JSONArray jsonArray =new JSONArray();
|
|
|
|
- for(int i=0;i< Math.min(ly.size(),lx.size());i++){
|
|
|
|
- ElementData edy= ly.get(i);
|
|
|
|
- ElementData edx = lx.get(i);
|
|
|
|
- if(StringUtils.isNotEmpty(edy.stringValue(),edx.stringValue())){
|
|
|
|
- jsonArray.add(new JSONArray().fluentAdd(edx.numberValue()).fluentAdd(edy.numberValue()));;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(!jsonArray.isEmpty()){
|
|
|
|
- JSONObject chartData= job.getJSONArray("series").getJSONObject(0);
|
|
|
|
- chartData.put("data",jsonArray);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ JSONArray jsonArray= createSeries(wtp,id);
|
|
|
|
+ if(!jsonArray.isEmpty()){
|
|
|
|
+ JSONObject chartData= job.getJSONArray("series").getJSONObject(0);
|
|
|
|
+ chartData.put("data",jsonArray);
|
|
return R.data(job);
|
|
return R.data(job);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -577,7 +602,9 @@ public class FormulaController {
|
|
return R.data("{}");
|
|
return R.data("{}");
|
|
}
|
|
}
|
|
|
|
|
|
- public Formula formulaAct(Long pkeyId){
|
|
|
|
|
|
+ public JSONArray createSeries(WbsTreePrivate wtp,String groupId){
|
|
|
|
+ Long pkeyId =wtp.getPKeyId();
|
|
|
|
+ JSONArray jsonArray =new JSONArray();
|
|
List<Map<String,Object>> configList= this.jdbcTemplate.queryForList("select d.rely,d.formula ,b.e_key ekey from m_wbs_tree_private a join m_wbs_form_element b on a.init_table_id=b.f_id join m_element_formula_mapping c on b.id=c.element_id join m_formula d on c.formula_id=d.id where p_key_id="+pkeyId+" and b.is_deleted=0 and d.formula like 'FC.chart%' limit 1");
|
|
List<Map<String,Object>> configList= this.jdbcTemplate.queryForList("select d.rely,d.formula ,b.e_key ekey from m_wbs_tree_private a join m_wbs_form_element b on a.init_table_id=b.f_id join m_element_formula_mapping c on b.id=c.element_id join m_formula d on c.formula_id=d.id where p_key_id="+pkeyId+" and b.is_deleted=0 and d.formula like 'FC.chart%' limit 1");
|
|
if(Func.isNotEmpty(configList)) {
|
|
if(Func.isNotEmpty(configList)) {
|
|
Map<String, Object> config = configList.get(0);
|
|
Map<String, Object> config = configList.get(0);
|
|
@@ -585,18 +612,75 @@ public class FormulaController {
|
|
String[] rely = relyStr.split(",");
|
|
String[] rely = relyStr.split(",");
|
|
String ky=rely[0].split(":")[1];
|
|
String ky=rely[0].split(":")[1];
|
|
String kx=rely[1].split(":")[1];
|
|
String kx=rely[1].split(":")[1];
|
|
- Formula formulaY =new Formula();
|
|
|
|
- formulaY.setFormula(config.get("formula").toString());
|
|
|
|
- formulaY.setRely(relyStr);
|
|
|
|
- formulaY.setFormula(nest(formulaY.getFormula(),formulaY.getRely()));
|
|
|
|
- this.service.relyParse(formulaY);
|
|
|
|
|
|
+ Map<String,FormData> dataSource= getDataFromCodes(Arrays.asList(rely),wtp,groupId);
|
|
|
|
+ List<Object> ly= calc(ky,dataSource);
|
|
|
|
+ List<Object> lx= calc(kx,dataSource);
|
|
|
|
+ for(int i=0;i< Math.min(ly.size(),lx.size());i++){
|
|
|
|
+ Object edy= ly.get(i);
|
|
|
|
+ Object edx =lx.get(i);
|
|
|
|
+ if(StringUtils.isNotEmpty(edy,edx)){
|
|
|
|
+ jsonArray.add(new JSONArray().fluentAdd(edx).fluentAdd(edy));;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- return null;
|
|
|
|
|
|
+ return jsonArray;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public List<Object> calc(String formula,Map<String,List<ElementData>> dataSource){
|
|
|
|
- return null;
|
|
|
|
|
|
+ public List<Object> calc(String formula,Map<String,FormData> dataSource){
|
|
|
|
+ List<Object> result = new ArrayList<>();
|
|
|
|
+ Formula formulaY =new Formula();
|
|
|
|
+ formulaY.setFormula(formula);
|
|
|
|
+ this.service.relyParse(formulaY);
|
|
|
|
+ formulaY.setFormula(nest(formulaY.getFormula(),formulaY.getRely()));
|
|
|
|
+ this.service.relyParse(formulaY);
|
|
|
|
+ formula=formulaY.getFormula();
|
|
|
|
+ List<FormData> ele = new ArrayList<>();
|
|
|
|
+ formulaY.getRelyList().forEach(rely->{
|
|
|
|
+ FormData formData= dataSource.get(rely);
|
|
|
|
+ if(!formData.empty()){
|
|
|
|
+ ele.add(formData);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ LinkedHashMap<String,FormData> fdMap =new LinkedHashMap<>();
|
|
|
|
+ FormData maxFormData = Collections.max(ele, Comparator.comparingInt((FormData ef)->ef.getValues().size()));
|
|
|
|
+ FormData minFormData = Collections.min(ele, Comparator.comparingInt((FormData ef)->ef.getValues().size()));
|
|
|
|
+ if (maxFormData.getValues().size() != minFormData.getValues().size()) {
|
|
|
|
+ int baseLength = maxFormData.getValues().size();
|
|
|
|
+ for (FormData formData : ele) {
|
|
|
|
+ formData.setStep(baseLength / formData.getValues().size());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ele.forEach(e->{
|
|
|
|
+ fdMap.put(e.getCode(),e);
|
|
|
|
+ });
|
|
|
|
+ CompositeDataAccess cda = new CompositeDataAccess(fdMap);
|
|
|
|
+ List<LocalVariable> local= new ArrayList<>();
|
|
|
|
+ while (cda.hasNext()){
|
|
|
|
+ LinkedHashMap<String,ElementData> tip= cda.next();
|
|
|
|
+ Map<String, Object> variable = new HashMap<>();
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
+ Map<String,Object> em= (Map<String, Object>) variable.computeIfAbsent("E", k->new HashMap<>());
|
|
|
|
+ int index= new ArrayList<>(tip.values()).get(0).getIndex();
|
|
|
|
+ for(Map.Entry<String,ElementData> se:tip.entrySet()){
|
|
|
|
+ Object value=se.getValue().getValue();
|
|
|
|
+ if(CustomFunction.isNumber(value)){
|
|
|
|
+ if(StringUtils.isDouble(value)||formula.contains("/")){
|
|
|
|
+ em.put(se.getKey(),Double.parseDouble(value.toString()));
|
|
|
|
+ }else{
|
|
|
|
+ em.put(se.getKey(),StringUtils.handleObj2Integer(value));
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ em.put(se.getKey(),value);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ local.add(new LocalVariable(index,formula,variable));
|
|
|
|
+ }
|
|
|
|
+ if(local.size()>0){
|
|
|
|
+ List<Object> values = FormulaUtils.slice(local,formula);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -607,11 +691,11 @@ public class FormulaController {
|
|
* @Author yangyj
|
|
* @Author yangyj
|
|
* @Date 2023.08.01 14:53
|
|
* @Date 2023.08.01 14:53
|
|
**/
|
|
**/
|
|
- public Map<String,List<ElementData>> getDataFromCodes(List<String> codes,WbsTreePrivate wtp,String id){
|
|
|
|
|
|
+ public Map<String,FormData> getDataFromCodes(List<String> codes,WbsTreePrivate wtp,String id){
|
|
String s = codes.stream().collect(Collectors.joining("','","'","'"));
|
|
String s = codes.stream().collect(Collectors.joining("','","'","'"));
|
|
List<Map<String,Object>> listMap = this.jdbcTemplate.queryForList("select a.id elementId,a.e_key ekey,a.e_name eName,b.init_table_name tableName,b.html_url url,b.p_key_id pkeyId,b.node_name nodeName,CONCAT(b.init_table_name,':',a.e_key) tk from m_wbs_form_element a join m_wbs_tree_private b on a.f_id=b.init_table_id where b.parent_id="+wtp.getParentId()
|
|
List<Map<String,Object>> listMap = this.jdbcTemplate.queryForList("select a.id elementId,a.e_key ekey,a.e_name eName,b.init_table_name tableName,b.html_url url,b.p_key_id pkeyId,b.node_name nodeName,CONCAT(b.init_table_name,':',a.e_key) tk from m_wbs_form_element a join m_wbs_tree_private b on a.f_id=b.init_table_id where b.parent_id="+wtp.getParentId()
|
|
+" and b.project_id="+wtp.getProjectId()+" and b.is_deleted=0 and a.is_deleted=0 and CONCAT(b.init_table_name,':',a.e_key) in("+s+") ORDER BY b.sort,b.create_time");
|
|
+" and b.project_id="+wtp.getProjectId()+" and b.is_deleted=0 and a.is_deleted=0 and CONCAT(b.init_table_name,':',a.e_key) in("+s+") ORDER BY b.sort,b.create_time");
|
|
- Map<String,List<ElementData>> result = new HashMap<>();
|
|
|
|
|
|
+ Map<String,FormData> result = new HashMap<>();
|
|
if(listMap.size()>codes.size()){
|
|
if(listMap.size()>codes.size()){
|
|
Map<String,Map<String,String>> coordsMap = new HashMap<>();
|
|
Map<String,Map<String,String>> coordsMap = new HashMap<>();
|
|
for(Map<String,Object> m:listMap){
|
|
for(Map<String,Object> m:listMap){
|
|
@@ -635,15 +719,10 @@ public class FormulaController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- Map<String,FormData> fdMap= codes.stream().map(c->{
|
|
|
|
|
|
+ result= codes.stream().map(c->{
|
|
String[] tc=c.split(":");
|
|
String[] tc=c.split(":");
|
|
return FormulaUtils.createFormDataFast(c,c,codeDataMap.get(c),coordsMap.get(tc[0]).get(tc[1]));
|
|
return FormulaUtils.createFormDataFast(c,c,codeDataMap.get(c),coordsMap.get(tc[0]).get(tc[1]));
|
|
}).filter(Objects::nonNull).collect(Collectors.toMap(FormData::getCode, f->f));
|
|
}).filter(Objects::nonNull).collect(Collectors.toMap(FormData::getCode, f->f));
|
|
- if(fdMap.size()>0){
|
|
|
|
- fdMap.forEach((k,v)->{
|
|
|
|
- result.put(k,v.getValues());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
@@ -683,7 +762,6 @@ public class FormulaController {
|
|
|
|
|
|
|
|
|
|
public R<Object> flushPri(){
|
|
public R<Object> flushPri(){
|
|
- /*刷inittablename*/
|
|
|
|
List<Map<String,Object>> listMap=this.jdbcTemplate.queryForList("select p_key_id nodeId,init_table_id tableId from m_wbs_tree_private where project_id=1630011899725201410 and init_table_id is not null and init_table_name is null and is_deleted=0");
|
|
List<Map<String,Object>> listMap=this.jdbcTemplate.queryForList("select p_key_id nodeId,init_table_id tableId from m_wbs_tree_private where project_id=1630011899725201410 and init_table_id is not null and init_table_name is null and is_deleted=0");
|
|
if(listMap.size()>0){
|
|
if(listMap.size()>0){
|
|
Map<Long,Long> idMap= listMap.stream().collect(Collectors.toMap(m->Long.parseLong(m.get("nodeId").toString()),m->Long.parseLong(m.get("tableId").toString())));
|
|
Map<Long,Long> idMap= listMap.stream().collect(Collectors.toMap(m->Long.parseLong(m.get("nodeId").toString()),m->Long.parseLong(m.get("tableId").toString())));
|
|
@@ -705,4 +783,6 @@ public class FormulaController {
|
|
}
|
|
}
|
|
return R.fail("失败");
|
|
return R.fail("失败");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|