Merge branch 'feature-NEWDWH2021-1069' of nds-tyo.git.backlog.com:/NEWDWH2021/newsdwh2021 into feature-NEWDWH2021-1069

# Conflicts:
#	ecs/jskult-webapp/src/controller/master_mainte.py
This commit is contained in:
高木要 2023-07-14 14:36:14 +09:00
commit 774bfbcb6b
3 changed files with 44 additions and 29 deletions

View File

@ -1,11 +1,14 @@
from io import BytesIO, TextIOWrapper
from datetime import datetime
from typing import Optional
import pandas as pd
from fastapi import APIRouter, Depends, HTTPException, Request
from fastapi.responses import HTMLResponse
from starlette import status
from src.error.exceptions import DBException
import pandas as pd
from src.depends.services import get_service
from src.logging.get_logger import get_logger
from src.model.internal.session import UserSession
@ -24,7 +27,7 @@ from src.system_var import constants
from src.templates import templates
from src.model.request.master_mainte_csvup import MasterMainteCsvUpModel
from src.model.request.master_mainte_csvdl import MasterMainteCsvDlModel
from io import TextIOWrapper, BytesIO
logger = get_logger('マスターメンテ')

View File

@ -1,3 +1,9 @@
/* Bootstrap 5.10以降、box-sizingのデフォルト値によってテーブルがずれるため、このページ限定的にリセット */
/* @see https://bootstrap-guide.com/content/reboot#page-defaults */
table {
box-sizing: initial;
}
body{
background-color: LightCyan;
font-family : "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, " Pゴシック", "MS PGothic", sans-serif;
@ -5,6 +11,7 @@ body{
h1{
margin-left : 1%;
font-weight: 700;
}
@ -23,8 +30,12 @@ h1{
width: 20%;
}
.csvup_buttonSize{
width: 85px;
.header_buttonSize{
width: 7rem;
font-size: initial;
}
.buttonSize{
width: 85px;
}
/*////////////////////////*/
@ -97,6 +108,7 @@ h1{
padding-bottom: 1%;
border-bottom: solid 1px gray;
width: 94%;
border-collapse: initial;
}
.inputLabelTd{

View File

@ -12,9 +12,9 @@
document.getElementById("loading").style.display = "block";
document.getElementById("ulMsg").style.display = "none";
}
function Form_Submit_Disp_Dialog(){
var msg = '{{ mainte_csv_up.select_function_message() }}';
var msg = '{{ mainte_csv_up.select_function_message() }}';
if (confirmDialog(msg)) {
document.getElementById("loading").style.display = "block";
document.getElementById("ulMsg").style.display = "none";
@ -31,7 +31,7 @@
formInsertBtDisabled();
};
</script>
{% endif %}
{% endif %}
</head>
<body>
<!-- タイトルと上部ボタン -->
@ -41,9 +41,9 @@
<td class="headerTdLeft">施設担当者データCSVアップロード</td>
<td class="headerTdRight">
{% if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() %}
<input type="button" onclick="location.href='/masterMainte/instEmpCsvUL' " value="戻る">
{% else %}
<button class="csvup_buttonSize" onclick="backToMainteMenu()">メニューへ</button>
<input type="button" class="header_buttonSize" onclick="location.href='/masterMainte/instEmpCsvUL' " value="戻る">
{% else %}
<input type="button" class="header_buttonSize" onclick="backToMainteMenu()" value="メニューへ" />
{% endif %}
</td>
</tr>
@ -54,7 +54,7 @@
method="POST" enctype="multipart/form-data"
{% if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() %}
onsubmit="return Form_Submit_Disp_Dialog();"
{% else %}
{% else %}
onsubmit="Form_Submit();"
{% endif %}
>
@ -65,8 +65,8 @@
<!-- 機能 -->
<td class="inputLabelTd">機能:</td>
<td class="inputTd">
<label>
<input type="radio" name="ctrl_select_function" value="new"
<label>
<input type="radio" name="ctrl_select_function" value="new"
{{ "checked " if mainte_csv_up.select_function == 'new' or mainte_csv_up.is_select_function_empty() }}
{{ "disabled" if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() }}
>
@ -75,11 +75,11 @@
</td>
<td class="inputTd">
<label>
<input type="radio" name="ctrl_select_function" value="change"
<input type="radio" name="ctrl_select_function" value="change"
{{ "checked " if mainte_csv_up.select_function == 'change' }}
{{ "disabled" if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() }}
>
施設担当者変更
施設担当者変更
</label>
</td>
</tr>
@ -89,7 +89,7 @@
<td class="inputLabelTd">登録テーブル:</td>
<td class="inputTd">
<label>
<input type="radio" name="ctrl_select_table" value="dummy"
<input type="radio" name="ctrl_select_table" value="dummy"
{{ "checked " if mainte_csv_up.select_table == 'dummy' or mainte_csv_up.is_select_table_empty() }}
{{ "disabled" if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() }}
>
@ -99,8 +99,8 @@
<td class="inputTd">
<label>
<input type="radio" name="ctrl_select_table" value="real"
{{ "checked " if mainte_csv_up.select_table == 'real' }}
{{ "disabled" if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() }}
{{ "checked " if mainte_csv_up.select_table == 'real' }}
{{ "disabled" if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() }}
>
本番テーブル
</label>
@ -113,7 +113,7 @@
<td class="input_tb" colspan="2">
{% if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() %}
{{mainte_csv_up.csv_file_name}}
{% else %}
{% else %}
<input type="file" id="excelFile" size="50" name="ctrl_csv_file" accept=".csv" onchange="formInsertBtDisabled()">
{% endif %}
</td>
@ -133,11 +133,11 @@
</tr>
</tbody>
</table>
{% if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() %}
{% if mainte_csv_up.is_verified and mainte_csv_up.is_error_message_list_empty() %}
<input name="ctrl_json_upload_data" value="{{mainte_csv_up.json_upload_data}}" type="hidden">
<input name="ctrl_select_function" value="{{mainte_csv_up.select_function}}" type="hidden">
<input name="ctrl_select_table" value="{{mainte_csv_up.select_table}}" type="hidden">
{% endif %}
{% endif %}
</form>
<p>
<!-- 処理中メッセージ表示 -->
@ -146,7 +146,7 @@
</div>
{% if not mainte_csv_up.is_error_message_list_empty() %}
<div id="ulMsg" class="footerMsg errorColor">
{% for error in mainte_csv_up.error_message_list %}
{% for error in mainte_csv_up.error_message_list %}
{{error.error_message}}<br>
{% endfor %}
</div>
@ -157,23 +157,23 @@
<table class="inputData">
<tbody>
<tr>
{% for column_name in mainte_csv_up.upload_data_columns() %}
<th>{{column_name}}</th>
{% for column_name in mainte_csv_up.upload_data_columns() %}
<th>{{column_name}}</th>
{% endfor %}
</tr>
{% for item in mainte_csv_up.csv_upload_list %}
{% for item in mainte_csv_up.csv_upload_list %}
<tr>
{% for key, value in item.csv_row.items() %}
<td>{{value}}</td>
{% endfor %}
<td>{{value}}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% elif mainte_csv_up.is_insert %}
{% elif mainte_csv_up.is_insert %}
<div id="ulMsg" class="footerMsg">
{% for message in mainte_csv_up.result_message_list %}
{% for message in mainte_csv_up.result_message_list %}
{{ message }}<br>
{% endfor %}
</div>