|
@@ -22,9 +22,9 @@ import org.springblade.core.tool.utils.*;
|
|
|
import org.springblade.manager.bean.TableInfo;
|
|
|
import org.springblade.manager.dto.*;
|
|
|
import org.springblade.manager.entity.*;
|
|
|
-import org.springblade.manager.formula.FormulaStrategyFactory;
|
|
|
-import org.springblade.manager.formula.KeyMapper;
|
|
|
+import org.springblade.manager.formula.*;
|
|
|
import org.springblade.manager.formula.impl.CompositeDataAccess;
|
|
|
+import org.springblade.manager.formula.impl.Measurement;
|
|
|
import org.springblade.manager.formula.impl.SubTable;
|
|
|
import org.springblade.manager.formula.impl.TableElementConverter;
|
|
|
import org.springblade.manager.mapper.FormulaMapper;
|
|
@@ -41,6 +41,7 @@ import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
import java.io.FileNotFoundException;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
@@ -68,7 +69,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
private final IWbsTreeService wbsTreeService;
|
|
|
private final JdbcTemplate jdbcTemplate;
|
|
|
private final IFormulaOptionService formulaOptionService;
|
|
|
- private final ITextdictInfoService textdictInfoService;
|
|
|
+ private final ITextdictInfoService textDictInfoService;
|
|
|
+ private final IFormulaDataBlockService formulaDataBlockService;
|
|
|
|
|
|
/** private final Container env;*/
|
|
|
private TableElementConverter tec;
|
|
@@ -190,9 +192,147 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/*数据格式 {tablename:{keyxxx:{option:[1|0]}}}*/
|
|
|
this.constantMap.put(FMOT,JSON.parseObject(formulaOption.getVal(),LinkedHashMap.class));
|
|
|
}
|
|
|
+ /*评定表*/
|
|
|
+ assessmentForm();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ public void assessmentForm(){
|
|
|
+ if(tec.getTableAll().stream().anyMatch(e->StringUtils.isEquals(e.getTableType(),5))){
|
|
|
+ /*评定节点*/
|
|
|
+ AppWbsTreeContractVO one =tec.getTableAll().get(0);
|
|
|
+ List<String> ancestor=new ArrayList<>(Arrays.asList(one.getAncestors().split(",")));
|
|
|
+ Collections.reverse(ancestor);
|
|
|
+ FormulaDataBlock fdb = this.formulaDataBlockService.queryOption(Long.parseLong(one.getContractId()),Long.parseLong(ancestor.get(1)),0);
|
|
|
+ if(fdb!=null&&Func.isNotBlank(fdb.getVal())){
|
|
|
+ List<ElementBlock> elementBlockList =JSON.parseArray(fdb.getVal(),ElementBlock.class);
|
|
|
+ Map<String, Measurement> itemsMap = new HashMap<>();
|
|
|
+ this.formDataMap.values().forEach(e->{
|
|
|
+ String eName=e.getEName();
|
|
|
+ if(eName.contains("实测")&&!eName.contains("平均")){
|
|
|
+ String point =FormulaUtils.parseItemName(eName);
|
|
|
+ Measurement measurement = itemsMap.computeIfAbsent(point,k->new Measurement(point));
|
|
|
+ if(eName.contains("偏差")){
|
|
|
+ measurement.setValue(e);
|
|
|
+ }else if(eName.contains("率")){
|
|
|
+ measurement.setPass(e);
|
|
|
+ }else if(eName.contains("判")){
|
|
|
+ measurement.setJudge(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(itemsMap.size()>0){
|
|
|
+ AtomicBoolean update= new AtomicBoolean(false);
|
|
|
+ itemsMap.values().stream().filter(Measurement::isMatching).forEach(t->{
|
|
|
+ elementBlockList.stream().filter(w->FormulaUtils.similarity(w.getEName(),t.getPoint())>0.6).reduce((a, b) -> Comparator.<Double>reverseOrder().compare(FormulaUtils.similarity(a.getEName(),t.getPoint()), FormulaUtils.similarity(b.getEName(),t.getPoint())) <= 0 ? a : b).ifPresent(g->{
|
|
|
+ List<ItemBlock> itemBlockList =g.getList();
|
|
|
+ int originSize=itemBlockList.size();
|
|
|
+ List<Long> ids = this.jdbcTemplate.queryForList("select b.p_key_id from m_wbs_tree_contract a join m_wbs_tree_contract b on (a.parent_id=b.parent_id and a.contract_id=b.contract_id) where a.p_key_id="+tec.getCurrentNode().getPkId()+" and b.is_deleted=0 and b.node_type=6",Long.class);
|
|
|
+ itemBlockList.removeIf(ik->!ids.contains(ik.getPkeyId()));
|
|
|
+ if(itemBlockList.size()>0){
|
|
|
+ int total=itemBlockList.stream().mapToInt(ItemBlock::getSubTotal).sum();
|
|
|
+ int passNum=itemBlockList.stream().mapToInt(ItemBlock::getSubPass).sum();
|
|
|
+ double passRate=100*(double)passNum/(double) total;
|
|
|
+ FormulaUtils.write(t.getPass(),StringUtils.number2String(passRate,1),null);
|
|
|
+ if(passRate>=60){
|
|
|
+ FormulaUtils.write(t.getJudge(),"合格",null);
|
|
|
+ }
|
|
|
+ itemBlockList.sort(Comparator.comparingInt(a->ids.indexOf(a.getPkeyId())));
|
|
|
+ FormulaUtils.write(t.getValue(),itemBlockList.stream().map(ItemBlock::getData).flatMap(v->v.stream().flatMap(Collection::stream)).collect(Collectors.toList()),true);
|
|
|
+
|
|
|
+// if(t.getValue().getEName().contains("±")){
|
|
|
+// /*存在偏差范围则获取的是偏差值:实测-设计*/
|
|
|
+// FormulaUtils.write(t.getValue(),itemBlockList.stream().flatMap(b->{
|
|
|
+// List<Double> result=new ArrayList<>();
|
|
|
+// List<List<Double>> datas=b.getData();
|
|
|
+// List<Double> designs=b.getDesigns();
|
|
|
+// for(int i=0;i<datas.size();i++){
|
|
|
+// int j=Math.min(designs.size()-1,i);
|
|
|
+// double des=designs.get(j);
|
|
|
+// datas.get(i).forEach(d->result.add(d-des));
|
|
|
+// }
|
|
|
+// return result.stream();
|
|
|
+// }).collect(Collectors.toList()),true);
|
|
|
+// }else{
|
|
|
+// FormulaUtils.write(t.getValue(),itemBlockList.stream().map(ItemBlock::getData).flatMap(v->v.stream().flatMap(Collection::stream)).collect(Collectors.toList()),true);
|
|
|
+// }
|
|
|
+ }
|
|
|
+ t.flush();
|
|
|
+ if(originSize>0&&originSize!=itemBlockList.size()){
|
|
|
+ g.setList(itemBlockList);
|
|
|
+ update.set(true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ if(update.get()){
|
|
|
+ this.formulaDataBlockService.saveOrUpdate(fdb);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**评定表自动匹配*/
|
|
|
+// public void doForAssessmentForm(){
|
|
|
+// try {
|
|
|
+// List<String> tableNames = tec.getTableAll().stream().filter(e->StringUtils.isEquals(e.getTableType(),5)).map(AppWbsTreeContractVO::getInitTableName).collect(Collectors.toList());
|
|
|
+// if(Func.isNotEmpty(tableNames)){
|
|
|
+// List<Map<String,Object>> mapList=this.jdbcTemplate.queryForList("select k.node_name nodeName,k.p_key_id nodeId ,c.node_name tabName,c.sort,c.init_table_name initTableName,c.p_key_id tabId,c.html_url url from (select b.id,b.node_name,b.sort ,b.p_key_id from (select * from m_wbs_tree_contract where p_key_id="+tec.getCurrentNode().getPkId()+") a join m_wbs_tree_contract b on b.parent_id=a.parent_id where b.contract_id="+tec.getContractId()+" and b.is_deleted=0 and b.node_type=6 ) k join m_wbs_tree_contract c on c.parent_id = k.id where c.contract_id="+tec.getContractId()+" and c.is_deleted=0 and c.table_owner in(1,2,3) ORDER BY k.sort ,c.sort,c.p_key_id");
|
|
|
+// if(Func.isNotEmpty(mapList)){
|
|
|
+// List<NodeTable> nodeTables =mapList.stream().map(e->BeanUtil.toBean(e,NodeTable.class)).collect(Collectors.toList());
|
|
|
+// List<String> exclude=tec.getTableAll().stream().map(AppWbsTreeContractVO::getInitTableName).collect(Collectors.toList());
|
|
|
+// List<Map<String,Object>> keyMapList= this.jdbcTemplate.queryForList("select a.tab_ch_name tabName,a.tab_en_name initTableName,b.e_name eName,b.id elementId,b.e_key eKey from m_table_info a join m_wbs_form_element b on b.f_id=a.id where a.tab_en_name in ('"+nodeTables.stream().map(NodeTable::getInitTableName).distinct().filter(e->!exclude.contains(e)).collect(Collectors.joining("','"))+"') and b.is_deleted=0");
|
|
|
+// List<TableEleKey> tableEleKeys=keyMapList.stream().map(e->BeanUtil.toBean(e,TableEleKey.class)).collect(Collectors.toList());
|
|
|
+// Map<String, Measurement> itemsMap = new HashMap<>();
|
|
|
+// this.formDataMap.values().forEach(e->{
|
|
|
+// String eName=e.getEName();
|
|
|
+// if(eName.contains("实测")&&!eName.contains("平均")){
|
|
|
+// String point =FormulaUtils.parseItemName(eName);
|
|
|
+// Measurement measurement = itemsMap.computeIfAbsent(point,k->new Measurement(point));
|
|
|
+// if(eName.contains("偏差")){
|
|
|
+// measurement.setValue(e);
|
|
|
+// }else if(eName.contains("率")){
|
|
|
+// measurement.setPass(e);
|
|
|
+// }else if(eName.contains("判")){
|
|
|
+// measurement.setJudge(e);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// });
|
|
|
+//
|
|
|
+// Map<Boolean,List<TableEleKey>> tmpMap= tableEleKeys.stream().collect(Collectors.partitioningBy(t->t.getTabName().contains("质量检验")));
|
|
|
+// List<TableEleKey> tableEleKeysA= tmpMap.get(false);
|
|
|
+// List<TableEleKey> tableEleKeysB=tmpMap.get(true);
|
|
|
+// itemsMap.values().forEach(e->{
|
|
|
+// //tableEleKeys.stream().filter(tk -> !tk.getTabName().contains("质量检验")).reduce((a, b) -> FormulaUtils.getJaccardSimilarity(e.getValue().getEName(), a.getEName()) - FormulaUtils.getJaccardSimilarity(e.getValue().getEName(), b.getEName()) >= 0 ? a : b).ifPresent(source -> e.setValueCode(source.getCode()));
|
|
|
+// List<TableEleKey> target=tableEleKeysA.stream().sorted(Comparator.comparingDouble(tk->FormulaUtils.getJaccardSimilarity(e.getPoint(),FormulaUtils.parseItemName(tk.getEName())))).collect(Collectors.toList());
|
|
|
+// //List<TableEleKey> target1=tableEleKeysA.stream().sorted(Comparator.comparingDouble(TableEleKey::getDegree).reversed()).collect(Collectors.toList());
|
|
|
+// Collections.reverse(target);
|
|
|
+// target=target.stream().limit(3).collect(Collectors.toList());
|
|
|
+// target.forEach(g->{
|
|
|
+// String eName=g.getEName();
|
|
|
+// String code =g.getCode();
|
|
|
+// if(eName.contains("实测")&&!eName.contains("设计")&&!eName.contains("偏")){
|
|
|
+// e.setValueCode(code);
|
|
|
+// e.setValueName(eName);
|
|
|
+// }else if(eName.contains("设计")&&!eName.contains("偏")){
|
|
|
+// e.setDesignCode(code);
|
|
|
+// e.setDesignName(eName);
|
|
|
+// }else if(eName.contains("偏")){
|
|
|
+//
|
|
|
+// }
|
|
|
+// });
|
|
|
+// });
|
|
|
+// tec.getLog().append("【评定表实测项目匹配度】");
|
|
|
+// System.out.println();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }catch (Exception e){
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
public void missingFill(List<String> missingList){
|
|
|
/*数据池里面没有任何元素匹配和当前依赖匹配*/
|
|
|
if(Func.isNotEmpty(missingList)){
|
|
@@ -200,7 +340,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
Map<String, Object> elementInfoMap=this.getElementInfoByCodes(String.join(",",missingList));
|
|
|
/*1从当前节点其它表格中查找匹配的元素*/
|
|
|
List<String> removeList=new ArrayList<>();
|
|
|
- if(false) {//全加载后,关闭当前节的搜索,假如后期改成依赖加载可以再次利用
|
|
|
+ if(false) {/*全加载后,关闭当前节的搜索,假如后期改成依赖加载可以再次利用*/
|
|
|
for (String r : missingList) {
|
|
|
String tn = r.substring(0, r.indexOf(StringPool.COLON));
|
|
|
String key = r.substring(r.indexOf(StringPool.COLON) + 1);
|
|
@@ -396,7 +536,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
|
|
|
/*汇总阶段执行的公式*/
|
|
|
public void summaryPre(){
|
|
|
- this.formDataList.stream().filter(e->StringUtils.isEquals("CKI",e.getFormula().getNumber())||StringUtils.isEquals("CKD",e.getFormula().getNumber())).forEach(t->this.summary.add(t));
|
|
|
+ this.formDataList.stream().filter(FormData::executable).filter(e->StringUtils.isEquals("CKI",e.getFormula().getNumber())||StringUtils.isEquals("CKD",e.getFormula().getNumber())).forEach(t->this.summary.add(t));
|
|
|
this.formDataList.removeAll(this.summary);
|
|
|
/*监表的处理*/
|
|
|
Optional<AppWbsTreeContractVO> aop=tec.getTableAll().stream().filter(e->e.getNodeName().contains("A15")).findAny();
|
|
@@ -586,6 +726,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
try {
|
|
|
/*检验单附表处理*/
|
|
|
List<FormData> inspectionList = new ArrayList<>();
|
|
|
+ /*0检验表1评定表*/
|
|
|
this.tec.getTableAll().stream().filter(e -> e.getNodeName().contains("检验单") || e.getNodeName().contains("评定表")).forEach(e -> {
|
|
|
/*获取所有挂在表里的元素映射关系*/
|
|
|
this.tec.getKeyMappers().stream().filter(p -> p.getPkId().equals(e.getPKeyId())).forEach(k -> {
|
|
@@ -654,6 +795,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
String values=subTableInfo.stream().map(TableInfo::getDataMap).map(m->m.get(StringUtils.handleNull(e.get("ekey")))).filter(StringUtils::isNotEmpty).collect(Collectors.joining(";;"));
|
|
|
FormData tmp= createFormDataFast(StringUtils.handleNull(e.get("ename")),StringUtils.handleNull(e.get("code")),values);
|
|
|
if(tmp!=null){
|
|
|
+ tmp.setIsCurrentNodeElement(true);
|
|
|
this.formDataMap.put(tmp.getCode(),tmp);
|
|
|
this.formDataList.add(tmp);
|
|
|
}
|
|
@@ -697,11 +839,15 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
sta.flush();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
this.tec.getLog().append("【").append("附表异常").append("】");
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**汇总处理*/
|
|
|
public void summaryCalc(){
|
|
|
if(this.summary.size()>0){
|
|
@@ -720,6 +866,101 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
e.setUpdate(1);
|
|
|
}
|
|
|
});
|
|
|
+ /*分项汇总*/
|
|
|
+ doForDataBlock();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**分项汇总数据*/
|
|
|
+ public void doForDataBlock(){
|
|
|
+ try {
|
|
|
+ AppWbsTreeContractVO one =tec.getTableAll().get(0);
|
|
|
+ List<String> ancestor=new ArrayList<>(Arrays.asList(one.getAncestors().split(",")));
|
|
|
+ Collections.reverse(ancestor);
|
|
|
+ FormulaDataBlock fdb = this.formulaDataBlockService.queryOption(Long.parseLong(one.getContractId()),Long.parseLong(ancestor.get(1)),0);
|
|
|
+ List<ElementBlock> elementBlockList=new ArrayList<>();
|
|
|
+ Map<String,ElementBlock> elementBlockMap =new HashMap<>();
|
|
|
+ Map<String,ItemBlock>itemBlockMap =new HashMap<>();
|
|
|
+ if(fdb==null){
|
|
|
+ fdb=new FormulaDataBlock();
|
|
|
+ fdb.setContractId(tec.getContractId());
|
|
|
+ fdb.setSwId(Long.parseLong(ancestor.get(1)));
|
|
|
+ fdb.setType(0);
|
|
|
+ fdb.setVal("[]");
|
|
|
+ }
|
|
|
+ if(Func.isNotBlank(fdb.getVal())) {
|
|
|
+ elementBlockList = JSON.parseArray(fdb.getVal(), ElementBlock.class);
|
|
|
+ elementBlockList.forEach(eb->{
|
|
|
+ elementBlockMap.put(eb.getCode(),eb);
|
|
|
+ List<ItemBlock> itemBlockList =eb.getList();
|
|
|
+ if(itemBlockList.size()>0){
|
|
|
+ itemBlockList.forEach(ib->{
|
|
|
+ ib.setCode(eb.getCode());
|
|
|
+ itemBlockMap.put(ib.getKey(),ib);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ List<ElementBlock> finalElementBlockList = elementBlockList;
|
|
|
+ this.checkItems.stream().filter(e->!e.empty()).forEach(c->{
|
|
|
+ ElementBlock eb =elementBlockMap.get(c.getCode());
|
|
|
+ ItemBlock targetItem=itemBlockMap.get(c.getCode()+":"+tec.getCurrentNode().getPkId());
|
|
|
+ List<Object> list = c.getValues().stream().map(ElementData::getValue).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
|
|
|
+ /*1.无任何记录,当前页无数据,则不需要处理 2.存在记录当前无数据,则要消除 3.没有记录当前有数据,则需要增加 4.有记录有当前记录,则需更新*/
|
|
|
+ if(Func.isNotEmpty(list)||targetItem!=null){
|
|
|
+ FormData designList=tec.getFormDataMap().values().stream().filter(t->StringUtils.isEquals(FormulaUtils.parseItemName(t.getEName()),FormulaUtils.parseItemName(c.getEName()))&&t.getEName().contains("设计")&&StringUtils.isEquals(t.getTableName(),c.getTableName())).collect(Collectors.toList()).get(0);
|
|
|
+ FormData pass=tec.getFormDataMap().values().stream().filter(t->StringUtils.isEquals(FormulaUtils.parseItemName(t.getEName()),FormulaUtils.parseItemName(c.getEName()))&&t.getEName().contains("合格")&&StringUtils.isEquals(t.getTableName(),c.getTableName())).collect(Collectors.toList()).get(0);
|
|
|
+ if(targetItem==null){
|
|
|
+ if(eb==null){
|
|
|
+ eb=new ElementBlock();
|
|
|
+ eb.setCode(c.getCode());
|
|
|
+ eb.setEName(c.getEName());
|
|
|
+ eb.setList(new ArrayList<>());
|
|
|
+ finalElementBlockList.add(eb);
|
|
|
+ elementBlockMap.put(eb.getCode(),eb);
|
|
|
+ }
|
|
|
+ targetItem = new ItemBlock();
|
|
|
+ targetItem.setCode(c.getCode());
|
|
|
+ targetItem.setPkeyId(tec.getCurrentNode().getPkId());
|
|
|
+ eb.getList().add(targetItem);
|
|
|
+ itemBlockMap.put(targetItem.getKey(),targetItem);
|
|
|
+ }
|
|
|
+ if(Func.isNotEmpty(list)){
|
|
|
+ targetItem.setSubTotal(list.size());
|
|
|
+ targetItem.setDesigns(designList.getValues().stream().map(ElementData::getValue).flatMap(e->CustomFunction.obj2ListNe(e).stream()).filter(StringUtils::isNumber).map(StringUtils::obj2Double).collect(Collectors.toList()));
|
|
|
+ AtomicInteger index= new AtomicInteger();
|
|
|
+ int len=targetItem.getDesigns().size();
|
|
|
+ if(len>0){
|
|
|
+ targetItem.setData(new ArrayList<>(list.stream().map(StringUtils::obj2Double).collect(Collectors.groupingBy(k -> index.getAndIncrement() / len,LinkedHashMap::new,Collectors.toList())).values()));
|
|
|
+ }else{
|
|
|
+ targetItem.setData(Collections.singletonList(list.stream().map(StringUtils::obj2Double).collect(Collectors.toList())));
|
|
|
+ }
|
|
|
+ if(pass!=null&&!pass.empty()){
|
|
|
+ targetItem.setSubPass((int)Math.round(list.size()*StringUtils.obj2Double(pass.getValues().get(0).getValue())/100));
|
|
|
+ }else{
|
|
|
+ targetItem.setSubPass(list.size());
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ eb.getList().remove(targetItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+// if(c.executable()){
|
|
|
+// /*主要是获取实测值,合格率,合格数量*/
|
|
|
+// List<String> relyCode = c.getFormula().getRelyList();
|
|
|
+// if(Func.isNotEmpty(relyCode)){
|
|
|
+// List<FormData> designList= tec.getFormDataMap().values().stream().filter(t->relyCode.contains(t.getCode())&&t.getEName().contains("设计")).collect(Collectors.toList());
|
|
|
+// if(designList.size()>0){
|
|
|
+// FormData design =designList.get(0);
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+ });
|
|
|
+ fdb.setVal(JSON.toJSONString(elementBlockList));
|
|
|
+ this.formulaDataBlockService.saveOrUpdate(fdb);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -824,7 +1065,7 @@ public List<ElementData> setScale(Integer scale,List<ElementData> data){
|
|
|
}
|
|
|
}
|
|
|
/*检查超页情况*/
|
|
|
- this.formDataMap.values().stream().filter(e->e.getUpdate()==1&&e.getAddPages()>0).sorted(Comparator.comparing(FormData::getAddPages).reversed())
|
|
|
+ this.formDataMap.values().stream().filter(e->e.getIsCurrentNodeElement()&&e.getUpdate()==1&&e.getAddPages()>0).sorted(Comparator.comparing(FormData::getAddPages).reversed())
|
|
|
.collect(Collectors.groupingBy(FormData::getTableName,LinkedHashMap::new,Collectors.toList())).values()
|
|
|
.forEach(l->copy(l.get(0)));
|
|
|
}
|
|
@@ -1409,7 +1650,7 @@ public List<ElementData> setScale(Integer scale,List<ElementData> data){
|
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("type", 4);
|
|
|
queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
|
|
|
- final List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
+ final List<TextdictInfo> textdictInfos = textDictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
if (!textdictInfos.isEmpty()) {
|
|
|
for (TextdictInfo textdictInfo : textdictInfos) {
|
|
|
if (reData.containsKey(textdictInfo.getColKey())) {
|