1.th:text 赋值
<td th:text="${balanceRepair.workOrderInfo.userPhone}"></td>
2. #dates.format(date,'yyyy-MM-dd') 日期格式化
th:text="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd')}" ;
${#dates.format(new java.util.Date().getTime(), 'yyyy年MM月dd日HH时mm分')}"
3. 金额格式化
th:text="${workOrderProject.workingPrice} ? ${#numbers.formatDecimal(workOrderProject.workingPrice,1,'COMMA',2,'POINT')}:''"
4.遍历 th:each="workOrderPart,workOrderPartStat : ${balanceRepair.workOrderParts}" workOrderPartStat 固定 workOrderPart参数+Stat
<tr th:each="workOrderPart,workOrderPartStat : ${balanceRepair.workOrderParts}">
<td th:text="${workOrderPartStat.index+1}"></td>
<td th:text="${workOrderPart.partName}"></td>
<td th:text="${workOrderPart.brandName}"></td>
<td th:text="${workOrderPart.count}"></td>
<td th:text="${workOrderPart.unitPrice} ? ${#numbers.formatDecimal(workOrderPart.unitPrice,1,'COMMA',2,'POINT')}:''"></td>
<td th:text="${workOrderPart.partAmount} ? ${#numbers.formatDecimal(workOrderPart.partAmount,1,'COMMA',2,'POINT')}:''"></td>
</tr>