|
@@ -269,7 +269,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
CurrentNode currentNode = this.tec.getCurrentNode();
|
|
CurrentNode currentNode = this.tec.getCurrentNode();
|
|
List<Map<String,Object>> tableNamePkIdsMaps= this.jdbcTemplate.queryForList("select c.init_table_name tableName,c.p_key_id pkId,c.html_url url from (select b.id from (select * from m_wbs_tree_contract where p_key_id="+currentNode.getPkId()+") a join m_wbs_tree_contract b on b.parent_id=a.parent_id where b.contract_id="+this.tec.getContractId()+" and b.is_deleted=0) k join m_wbs_tree_contract c on c.parent_id = k.id where c.contract_id="+this.tec.getContractId()+" and c.is_deleted=0 ");
|
|
List<Map<String,Object>> tableNamePkIdsMaps= this.jdbcTemplate.queryForList("select c.init_table_name tableName,c.p_key_id pkId,c.html_url url from (select b.id from (select * from m_wbs_tree_contract where p_key_id="+currentNode.getPkId()+") a join m_wbs_tree_contract b on b.parent_id=a.parent_id where b.contract_id="+this.tec.getContractId()+" and b.is_deleted=0) k join m_wbs_tree_contract c on c.parent_id = k.id where c.contract_id="+this.tec.getContractId()+" and c.is_deleted=0 ");
|
|
if(Func.isNotEmpty(tableNamePkIdsMaps)){
|
|
if(Func.isNotEmpty(tableNamePkIdsMaps)){
|
|
- removeList.clear();
|
|
|
|
|
|
+ // removeList.clear();
|
|
missingList.forEach(miss->{
|
|
missingList.forEach(miss->{
|
|
Map<String,Object> elementInfo= (Map<String, Object>) elementInfoMap.get(miss);
|
|
Map<String,Object> elementInfo= (Map<String, Object>) elementInfoMap.get(miss);
|
|
String tn = miss.substring(0,miss.indexOf(StringPool.COLON));
|
|
String tn = miss.substring(0,miss.indexOf(StringPool.COLON));
|
|
@@ -733,11 +733,15 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
this.wbsTreeContractService.save(target);
|
|
this.wbsTreeContractService.save(target);
|
|
Long pkeyId=origin.getPKeyId();
|
|
Long pkeyId=origin.getPKeyId();
|
|
List<KeyMapper> allInTable=tec.getKeyMappers().stream().filter(e->e.getPkId().equals(pkeyId)).collect(Collectors.toList());
|
|
List<KeyMapper> allInTable=tec.getKeyMappers().stream().filter(e->e.getPkId().equals(pkeyId)).collect(Collectors.toList());
|
|
|
|
+ List<String> removeKeys=new ArrayList<>();
|
|
allInTable.forEach(e->{
|
|
allInTable.forEach(e->{
|
|
KeyMapper km = new KeyMapper();
|
|
KeyMapper km = new KeyMapper();
|
|
BeanUtil.copy(e,km);
|
|
BeanUtil.copy(e,km);
|
|
km.setPkId(target.getPKeyId());
|
|
km.setPkId(target.getPKeyId());
|
|
tec.getKeyMappers().add(km);
|
|
tec.getKeyMappers().add(km);
|
|
|
|
+ if(StringUtils.handleNull(tec.getCoordinateMap().get(e.getCode())).contains(";")){
|
|
|
|
+ removeKeys.add(e.getField());
|
|
|
|
+ }
|
|
});
|
|
});
|
|
tec.getTableInfoList().stream().filter(o->StringUtils.isEquals(o.getPkeyId(),pkeyId)).findFirst().ifPresent(tb->{
|
|
tec.getTableInfoList().stream().filter(o->StringUtils.isEquals(o.getPkeyId(),pkeyId)).findFirst().ifPresent(tb->{
|
|
/*表单数据复制*/
|
|
/*表单数据复制*/
|
|
@@ -746,6 +750,10 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
tableInfo.setPkeyId(target.getPKeyId().toString());
|
|
tableInfo.setPkeyId(target.getPKeyId().toString());
|
|
tableInfo.setDataMap(new LinkedHashMap<>(tb.getDataMap()));
|
|
tableInfo.setDataMap(new LinkedHashMap<>(tb.getDataMap()));
|
|
tableInfo.getDataMap().put("p_key_id",tableInfo.getPkeyId());
|
|
tableInfo.getDataMap().put("p_key_id",tableInfo.getPkeyId());
|
|
|
|
+ if(removeKeys.size()>0){
|
|
|
|
+ /*删除实测值*/
|
|
|
|
+ removeKeys.forEach(k->tableInfo.getDataMap().remove(k));
|
|
|
|
+ }
|
|
tec.getTableInfoList().add(tec.getTableInfoList().indexOf(tb)+1,tableInfo);
|
|
tec.getTableInfoList().add(tec.getTableInfoList().indexOf(tb)+1,tableInfo);
|
|
});
|
|
});
|
|
origin=target;
|
|
origin=target;
|