feat(datafill): 试车报表增加设备维护费字段

- 在 FCustomReportDatasetMapper.xml 中添加设备维护费(whfy)字段
- 在 ScybReportHandle.java 中添加设备维护费的字段映射
1 个父辈 1016a38d
......@@ -55,6 +55,7 @@ public class ScybReportHandle implements ICustomHandle{
dataFieldDict.put("depart_id", "厂站编码");
dataFieldDict.put("yddf", "电费");
dataFieldDict.put("wxfy", "设备维修费");
dataFieldDict.put("whfy", "设备维护费");
//获取填报数据
String dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"", departIds, month);
//结果集
......
......@@ -839,13 +839,16 @@
v4.bnsjyh,
v4.yhcyqyy,
c.cost AS yddf,
r.total_cost AS wxfy
r.total_cost AS wxfy,
w.maintenance_cost AS whfy
FROM
sys_depart d
LEFT JOIN ( SELECT * FROM ${dataViewName4411} v WHERE v.time = #{month} ) v4 ON v4.depart_id = d.id
LEFT JOIN ( SELECT cost,depart_id FROM report_electric_cost WHERE month = #{month} ) c ON c.depart_id = d.id
LEFT JOIN ( SELECT ROUND(SUM(total_cost),2) AS total_cost,depart_id FROM equipment_repair
WHERE LEFT(repair_date,7) = #{month} GROUP BY LEFT(repair_date,7),depart_id ) r ON r.depart_id = d.id
LEFT JOIN ( SELECT ROUND(SUM(maintenance_cost),2) AS maintenance_cost,depart_id FROM equipment_maintain_task
WHERE LEFT(maintain_time,7) = #{month} GROUP BY LEFT(maintain_time,7),depart_id ) w ON w.depart_id = d.id
WHERE
d.id IN
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!