|
@@ -154,18 +154,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
this.constantMap.put(TABLE_LIST,tableList);
|
|
|
/*通过判断元素名称来确定,加入汇总公式延后执行*/
|
|
|
this.constantMap.put("tableNames",tableList.stream().filter(e->StringUtils.isEquals(e.getIsBussShow(),1)).map(WbsTreeContract::getNodeName).collect(Collectors.toList()));
|
|
|
- /*检查是否有跨节点数据*/
|
|
|
- /*获取type=1的检验单或者type=4的监表*/
|
|
|
-// List<Map<String,Object>> inspectionElementMaps = new ArrayList<>();
|
|
|
-// Optional<AppWbsTreeContractVO> wop=tableList.stream().filter(e->e.getNodeName().contains("检验单")).findAny();
|
|
|
-// if(wop.isPresent()){
|
|
|
-// /*检验单或者监表的*/
|
|
|
-// inspectionElementMaps= this.jdbcTemplate.queryForList(" select c.e_name name ,b.tab_en_name tableName,c.e_key ekey from m_wbs_tree_contract a join m_table_info b on a.init_table_name=b.tab_en_name join m_wbs_form_element c on c.f_id= b.id where a.p_key_id=" + wop.get().getPKeyId());
|
|
|
-// }
|
|
|
+
|
|
|
List<String> missingList = new ArrayList<>();
|
|
|
-// List<Map<String, Object>> finalInspectionElementMaps = inspectionElementMaps;
|
|
|
-// List<String> cki =new ArrayList<>();
|
|
|
-// AtomicReference<String> ckd= new AtomicReference<>("");
|
|
|
this.formDataList.forEach(fd->{
|
|
|
if(fd.executable()){
|
|
|
relyParse(fd.getFormula());
|
|
@@ -178,32 +168,6 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-// if(StringUtils.isEquals("CKI",f.getNumber())){
|
|
|
-// finalInspectionElementMaps.forEach(m->{
|
|
|
-// String name = StringUtils.handleNull(m.get("name"));
|
|
|
-// if(name.contains("实测值")&&name.contains("偏差值")){
|
|
|
-// String ekey = StringUtils.handleNull(m.get("tableName"))+":"+StringUtils.handleNull(m.get("ekey"));
|
|
|
-// cki.add(ekey);
|
|
|
-// if(this.formDataMap.values().stream().map(FormData::getCode).noneMatch(k->StringUtils.isEquals(k,ekey))){
|
|
|
-// missingList.add(ekey);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// });
|
|
|
-// f.setFormula("CKI");
|
|
|
-// }else if(StringUtils.isEquals("CKD",f.getNumber())){
|
|
|
-// finalInspectionElementMaps.forEach(m->{
|
|
|
-// String name = StringUtils.handleNull(m.get("name"));
|
|
|
-// if(name.contains("检验日期")){
|
|
|
-// String ekey = StringUtils.handleNull(m.get("tableName"))+":"+StringUtils.handleNull(m.get("ekey"));
|
|
|
-// ckd.set(ekey);
|
|
|
-// if(!this.formDataMap.containsKey(ekey)&&this.formDataMap.values().stream().map(FormData::getCode).noneMatch(k->StringUtils.isEquals(k,ekey))){
|
|
|
-// missingList.add(ekey);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// });
|
|
|
-// f.setFormula("CKD");
|
|
|
-// }
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -211,26 +175,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
if(Func.isNotEmpty(missingList)){
|
|
|
this.tec.getLog().append("【没有能加载的跨节点数据:").append(missingList.stream().map(e->e.replaceAll("'","")).collect(Collectors.joining(","))).append("】");
|
|
|
}
|
|
|
-// if(Func.isNotEmpty(cki)){
|
|
|
-// /*检验内容*/
|
|
|
-// List<String> sb = new ArrayList<>();
|
|
|
-// for(String s:cki){
|
|
|
-// FormData fdTmp=this.formDataMap.get(s);
|
|
|
-// if(fdTmp!=null&&fdTmp.getValues().stream().map(ElementData::getValue).anyMatch(e->StringUtils.isNotEmpty(e)&&StringUtils.isNotEquals("/",e))){
|
|
|
-// sb.add(FormulaUtils.parseItemName(fdTmp.getEName()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if(sb.size()>0){
|
|
|
-// this.constantMap.put(CHECK_ITEMS,sb.stream().distinct().filter(StringUtils::isNotEmpty).collect(Collectors.joining(",")));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if(Func.isNotBlank(ckd.get())){
|
|
|
-// /*检验时间*/
|
|
|
-// FormData fdTmp = this.formDataMap.get(ckd.get());
|
|
|
-// if(fdTmp!=null){
|
|
|
-// this.constantMap.put("CKD",fdTmp.getValues().stream().map(ElementData::stringValue).collect(Collectors.joining(",")));
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
/*实测值参数*/
|
|
|
List<Map<String,Object>> textInfoMap= this.jdbcTemplate.queryForList("SELECT b.tab_id pkId,b.col_name val ,CONCAT(a.init_table_name,':',b.col_key)code from m_wbs_tree_contract a inner join m_textdict_info b on a.p_key_id=b.tab_id " +
|