Commit 331ef3b6 authored by hezhuozhi's avatar hezhuozhi

监管业务系统,压力管道使用登记申请时生成的使用登记表中设备数量未正常计算管道长度之和

parent 99b1a2d5
......@@ -2321,10 +2321,10 @@ public class CommonServiceImpl implements ICommonService {
//管道计算的是管道长度
if (formData.containsKey("equListCode") && formData.getString("equListCode").equals("8000")){
double pipeLength = equips.stream().filter(Objects::nonNull)
.filter(map -> map.containsKey("pipeLength") && map.get("pipeLength") instanceof Number)
.mapToDouble(map -> ((Number) map.get("pipeLength")).doubleValue())
.filter(map -> map.containsKey("pipeLength") && StringUtils.isNotEmpty((String)map.get("pipeLength")))
.mapToDouble(map -> Double.parseDouble((String) map.get("pipeLength")))
.sum();
formData.put("equNum",String.valueOf(pipeLength)+"米");
formData.put("equNum", pipeLength +"(m)");
}else {
//设备数量
formData.put("equNum",equipmentLists.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment