|
@@ -1739,7 +1739,9 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
|
|
|
//构造表数据
|
|
|
List<InsertDataVO> resultData = new LinkedList<>();
|
|
|
- this.syncTabDataImpl(sgTabMaps, jlTabMaps, resultData);
|
|
|
+ //坐标
|
|
|
+ Map<String,Set<String>> coordinateMap = new HashMap<>();
|
|
|
+ this.syncTabDataImpl(sgTabMaps, jlTabMaps, resultData,coordinateMap);
|
|
|
|
|
|
//入库处理
|
|
|
if (resultData.size() > 0) {
|
|
@@ -1899,6 +1901,16 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
continue;
|
|
|
}
|
|
|
List<String> list = new ArrayList<>();
|
|
|
+
|
|
|
+ //获取当前key对应的坐标
|
|
|
+ Set<String> strings = coordinateMap.get(initTabName);
|
|
|
+ String index = null;
|
|
|
+ for (String string : strings) {
|
|
|
+ String[] split = string.split("__");
|
|
|
+ if(Objects.equals(split[0],actualElevationNew)){
|
|
|
+ index = split[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
//按照最小行数来计算
|
|
|
for (int i = rowMin; i <= rowMax; i++) {
|
|
|
BigDecimal designed = designedElevationNewMap.get(i);
|
|
@@ -1908,9 +1920,12 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
continue;
|
|
|
}
|
|
|
BigDecimal v = designed.add(height.divide(new BigDecimal(100)));
|
|
|
-
|
|
|
//第5列,索引为4
|
|
|
- list.add(v.doubleValue() + "_^_"+ i + "_4");
|
|
|
+ list.add(v.doubleValue() + "_^_"+ i + "_" + index);
|
|
|
+ }
|
|
|
+ //未获取到当前key的坐标就不设置值
|
|
|
+ if(index == null){
|
|
|
+ continue;
|
|
|
}
|
|
|
//设置实际标高的值
|
|
|
values.set(keys.indexOf(actualElevationNew), String.join("☆",list));
|
|
@@ -1978,6 +1993,15 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
continue;
|
|
|
}
|
|
|
List<String> list = new ArrayList<>();
|
|
|
+ //获取当前key对应的坐标
|
|
|
+ Set<String> strings = coordinateMap.get(initTabName);
|
|
|
+ String index = null;
|
|
|
+ for (String string : strings) {
|
|
|
+ String[] split = string.split("__");
|
|
|
+ if(Objects.equals(split[0],deviationNew)){
|
|
|
+ index = split[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
//按照最小行数来计算
|
|
|
for (int i = rowMin; i <= rowMax; i++) {
|
|
|
BigDecimal x = differenceNewXMap.get(i);
|
|
@@ -1988,8 +2012,12 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
}
|
|
|
BigDecimal sqrt = sqrt(x.multiply(x).add(y.multiply(y)), 0);
|
|
|
|
|
|
- //第5列,索引为4
|
|
|
- list.add(sqrt.intValue() + "_^_"+ i + "_8");
|
|
|
+ //第9列,索引为8
|
|
|
+ list.add(sqrt.intValue() + "_^_"+ i + "_" + index);
|
|
|
+ }
|
|
|
+ //未获取到当前key的坐标就不设置值
|
|
|
+ if(index == null){
|
|
|
+ continue;
|
|
|
}
|
|
|
//设置实际标高的值
|
|
|
values.set(keys.indexOf(deviationNew), String.join("☆",list));
|
|
@@ -2137,7 +2165,7 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
private void syncTabDataImpl
|
|
|
- (Map<String, String> sgData, Map<String, String> jlData, List<InsertDataVO> resultData) throws
|
|
|
+ (Map<String, String> sgData, Map<String, String> jlData, List<InsertDataVO> resultData, Map<String,Set<String>> coordinateMap) throws
|
|
|
Exception {
|
|
|
for (Map.Entry<String, String> sgTab : sgData.entrySet()) { //质检表
|
|
|
String[] split = sgTab.getKey().split("---");
|
|
@@ -2156,6 +2184,22 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
//表的代码名称相同,就复制数据,例如:G10=G10
|
|
|
if (nodeNameRe.equals(nodeNameReJL)) {
|
|
|
String htmlStringJL = this.getHtmlString(pKeyIdJL);
|
|
|
+
|
|
|
+ //解析html坐标,生成key与keyName的映射关系
|
|
|
+ if (StringUtils.isNotEmpty(htmlStringJL)) {
|
|
|
+ Document doc = Jsoup.parse(htmlStringJL);
|
|
|
+ Elements select = doc.select("[id]");
|
|
|
+ HashSet<String> strings = new HashSet<>();
|
|
|
+ for (Element element : select) {
|
|
|
+ String id = element.id();
|
|
|
+ String[] split1 = id.split("__");
|
|
|
+ String s = split1[1].split("_")[1];
|
|
|
+
|
|
|
+ strings.add(split1[0] + "__" + s);
|
|
|
+ }
|
|
|
+ coordinateMap.put(initTabName, strings);
|
|
|
+ }
|
|
|
+
|
|
|
//获取质检实体表对应数据
|
|
|
List<Map<String, Object>> mapsList = jdbcTemplate.queryForList("select * from " + initTabName + " where p_key_id = " + pKeyId);
|
|
|
if (mapsList.size() > 0) {
|