huangxingxing 3 bulan lalu
induk
melakukan
b30d6179ff
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/main/resources/templates/pipenet.ftl

+ 2 - 2
src/main/resources/templates/pipenet.ftl

@@ -9,10 +9,10 @@
 </Nodes>
 <Components>
  <#list coms as c>
-    <${c.com.code} type="${c.com.type}" ID="${c.pcom.idCode}${c.pcom.ser}">
+    <${c.com.code}<#if c.com.type??> type="${c.com.type}"</#if> ID="${c.pcom.idCode}${c.pcom.ser}">
       <#list c.atts as a>
        <#if a.unit??||a.value??>
-        <${a.code} <#if a.unitType??&&a.unitType!="无">unit="${a.unit!""}"<#else></#if>>${a.value!""}</${a.code}>
+        <${a.code}<#if a.unitType??&&a.unitType!="无"> unit="${a.unit!""}"<#else></#if>>${a.value!""}</${a.code}>
        </#if>
       </#list>
        <#list c.datas as d>