|
@@ -58,6 +58,7 @@ import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.function.BiFunction;
|
|
|
+import java.util.function.BinaryOperator;
|
|
|
import java.util.function.Predicate;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
@@ -2841,10 +2842,10 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
});
|
|
|
abList.forEach(e->{
|
|
|
if(StringUtils.isNotEmpty(e.getNumber())){
|
|
|
- e.setNumber(e.getNumber().split("__")[0]);
|
|
|
+ e.setNumber(e.getNumber().split("_\\^_")[0]);
|
|
|
}
|
|
|
if(StringUtils.isNotEmpty(e.getName())){
|
|
|
- e.setName(e.getName().split("__")[0]);
|
|
|
+ e.setName(e.getName().split("_\\^_")[0]);
|
|
|
}
|
|
|
e.setLevel("合格");
|
|
|
});
|
|
@@ -2865,7 +2866,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/*单位评定表一*/
|
|
|
DW01 dw01 = new DW01(processFds);
|
|
|
if (dw01.checked()){
|
|
|
- List<FormData> fbFds = this.createFormDataByTableName("m_20231027094738_1717719671702028288");
|
|
|
+ List<FormData> fbFds = this.createFormDataByTableName(FB01.TABLE_NAME);
|
|
|
FormData fbName = null,fbNumber = null,fbLevel = null;
|
|
|
for(FormData e:fbFds){
|
|
|
if(e.getEName().startsWith("分部工程名称")){
|
|
@@ -2881,7 +2882,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
String keys = Stream.of(fbName,fbNumber,fbLevel).map(FormData::getKey).map(StringUtils::handleNull).collect(Collectors.joining(",c.","c.",""));
|
|
|
List<Map<String,Object>> mapList = jdbcTemplate.queryForList("select "+keys+" from (select id,tree_code from m_wbs_tree_contract where tree_code like '"+treeCode.getLast()+"%' and contract_id ="+wtcEva.getContractId()+" and major_data_type=2 and is_deleted=0 and node_type=3 ORDER BY tree_code)a join m_wbs_tree_contract b on a.id=b.parent_id" +
|
|
|
- " join m_20231027094738_1717719671702028288 c on b.p_key_id=c.p_key_id where b.contract_id ="+wtcEva.getContractId()+" and b.is_deleted=0 and b.init_table_name='m_20231027094738_1717719671702028288'" +
|
|
|
+ " join "+FB01.TABLE_NAME+" c on b.p_key_id=c.p_key_id where b.contract_id ="+wtcEva.getContractId()+" and b.is_deleted=0 and b.init_table_name='"+FB01.TABLE_NAME+"'" +
|
|
|
"ORDER BY a.tree_code");
|
|
|
if(mapList.size()>0){
|
|
|
List<Item01> abList= new ArrayList<>();
|
|
@@ -2940,7 +2941,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
abList.add(item);
|
|
|
}
|
|
|
/*合并相同分部评定*/
|
|
|
-
|
|
|
+ BinaryOperator<Item02> biOp=(v1, v2)->{
|
|
|
+ if(v1.getScores()>=v2.getScores()) {
|
|
|
+ return v1;
|
|
|
+ }
|
|
|
+ return v2;
|
|
|
+ };
|
|
|
+ abList= new ArrayList<>(abList.stream().collect(Collectors.toMap(Item02::getTreeCode, f -> f,biOp)).values());
|
|
|
dw02.source(abList);
|
|
|
if (dw02.getDatas().size() > 0) {
|
|
|
Map<String, String> tableKeysCoordsMap = FormulaUtils.getElementCell(wtcEva.getHtmlUrl());
|