Files
keinasystem/backend/apps/reports/templates/reports/chusankan_template.html
Akira d70b5ee551 E-1 完了サマリー
実施内容
#	変更内容	ファイル
1	OfficialChusankanField に 11 フィールド追加(17列化)	models.py
2	中山間インポート: 17 列すべて読み込み対応	views.py
3	共済インポート: 面積カラム名不一致バグ修正 + a→m2 変換(×100)	views.py
4	シリアライザに 11 フィールド追加	serializers.py
5	共済 PDF: A4 縦、表形式、@page 設定、ページ番号、中国語除去	kyosai_template.html
6	中山間 PDF: A4 横、表形式、@page 設定、ページ番号、中国語除去	chusankan_template.html
7	PDF 生成ロジック: フラットテーブル、null 安全、prefetch_related	reports/views.py
8	既存データ再インポート(共済面積修正 + 中山間 17 列埋め)	—
9	Playwright E2E テスト 11 件全 PASS	verify-fixes.spec.ts
追加発見・修正したバグ
共済 ODS の 本地面積 (m2) カラム名にスペースが含まれ、インポート時に面積が全件 0 になっていた
面積の単位がアール(a)であることが判明。m2 への変換 (×100) を追加
PDF は http://localhost:3000/reports からダウンロードして確認できます。
2026-02-17 15:27:14 +09:00

86 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>中山間地域等直接支払交付金({{ year }}年度)</title>
<style>
@page {
size: A4 landscape;
margin: 10mm;
@bottom-center {
content: counter(page) " / " counter(pages);
font-size: 8pt;
color: #666;
}
}
body {
font-family: "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", sans-serif;
font-size: 8pt;
line-height: 1.3;
margin: 0;
}
h1 {
text-align: center;
font-size: 13pt;
margin: 0 0 8pt 0;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 1px solid #333;
padding: 2pt 4pt;
vertical-align: top;
}
th {
background-color: #f0f0f0;
font-size: 7pt;
text-align: center;
white-space: nowrap;
}
td {
font-size: 7.5pt;
}
.num {
text-align: right;
}
.empty {
color: #999;
}
</style>
</head>
<body>
<h1>中山間地域等直接支払交付金({{ year }}年度)</h1>
<table>
<thead>
<tr>
<th>所在地</th>
<th>植栽面積(m2)</th>
<th>作付品目(元)</th>
<th>協定管理者</th>
<th>所有者</th>
<th>作物</th>
<th>品種</th>
<th>圃場名称</th>
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr>
<td>{{ row.location }}</td>
<td class="num">{{ row.planting_area|default:"—" }}</td>
<td>{{ row.original_crop|default:"—" }}</td>
<td>{{ row.manager|default:"—" }}</td>
<td>{{ row.owner|default:"—" }}</td>
<td>{% if row.crop %}{{ row.crop }}{% else %}<span class="empty"></span>{% endif %}</td>
<td>{% if row.variety %}{{ row.variety }}{% else %}<span class="empty"></span>{% endif %}</td>
<td>{% if row.field_name %}{{ row.field_name }}{% else %}<span class="empty"></span>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>