Merge pull request #274 feature-NEWDWH2021-1234 into develop
This commit is contained in:
commit
45a29d61fd
Binary file not shown.
@ -62,9 +62,9 @@ class BioViewModel(BaseModel):
|
||||
part_size = 500
|
||||
for i in range(0, search_data_len, part_size):
|
||||
json_str = json.dumps(search_data_list[i:i + part_size], ensure_ascii=False, default=date_handler)
|
||||
# JavaScriptに埋め込むため、クォートをエスケープ
|
||||
json_str = json_str.replace("'", "\\'")
|
||||
json_str = json_str.replace('\\"', '\\\\"')
|
||||
# JavaScriptに埋め込むため、バックスラッシュ、バッククォートをエスケープ
|
||||
json_str = json_str.replace('\\', '\\\\')
|
||||
json_str = json_str.replace("`", "\\`")
|
||||
yield json_str
|
||||
|
||||
def make_whs_name(self):
|
||||
|
||||
@ -28,9 +28,9 @@ class UltmarcDoctorSearchViewModel(BaseModel):
|
||||
part_size = 50
|
||||
for i in range(0, search_data_len, part_size):
|
||||
json_str = json.dumps(search_data_list[i:i + part_size], ensure_ascii=False, default=date_handler)
|
||||
# JavaScriptに埋め込むため、クォートをエスケープ
|
||||
json_str = json_str.replace("'", "\\'")
|
||||
json_str = json_str.replace('\\"', '\\\\"')
|
||||
# JavaScriptに埋め込むため、バックスラッシュ、バッククォートをエスケープ
|
||||
json_str = json_str.replace('\\', '\\\\')
|
||||
json_str = json_str.replace("`", "\\`")
|
||||
yield json_str
|
||||
|
||||
# ページネーションのページ番号
|
||||
|
||||
@ -30,9 +30,9 @@ class UltmarcInstSearchViewModel(BaseModel):
|
||||
part_size = 50
|
||||
for i in range(0, search_data_len, part_size):
|
||||
json_str = json.dumps(search_data_list[i:i + part_size], ensure_ascii=False, default=date_handler)
|
||||
# JavaScriptに埋め込むため、クォートをエスケープ
|
||||
json_str = json_str.replace("'", "\\'")
|
||||
json_str = json_str.replace('\\"', '\\\\"')
|
||||
# JavaScriptに埋め込むため、バックスラッシュ、バッククォートをエスケープ
|
||||
json_str = json_str.replace('\\', '\\\\')
|
||||
json_str = json_str.replace("`", "\\`")
|
||||
yield json_str
|
||||
|
||||
# ページネーションのページ番号
|
||||
|
||||
@ -45,10 +45,11 @@ class BioSalesLotRepository(BaseRepository):
|
||||
inst_name_form,
|
||||
address,
|
||||
tel_num,
|
||||
v_whs_cd,
|
||||
v_whsorg_cd,
|
||||
-- Excel出力のため、数値型のコード値を文字列として取得(Veeva卸コード、Veeva卸組織コード、Veeva取引区分コード)
|
||||
CAST(v_whs_cd AS CHAR) AS v_whs_cd,
|
||||
CAST(v_whsorg_cd AS CHAR) AS v_whsorg_cd,
|
||||
whs_org_name,
|
||||
v_tran_cd,
|
||||
CAST(v_tran_cd AS CHAR) AS v_tran_cd,
|
||||
iko_flg
|
||||
FROM
|
||||
src05.bio_sales_lot
|
||||
|
||||
@ -152,12 +152,13 @@ class BioViewService(BaseService):
|
||||
# DF内のヘッダと連番を書き込みたくない場合、`header`と`index`をFalseに指定する。
|
||||
# `startrow`と`startcol`で、Excelの書き込み位置を決定する。省略した場合はA1セルから書く。
|
||||
|
||||
data_frame_chunk_size = 2000 # 各部分データフレームのサイズ
|
||||
is_first = True # ループの初回
|
||||
data_frame_range = len(data_frame)
|
||||
data_frame_chunk_size = 2000 # 1回あたりの書き出し行数
|
||||
is_first = True # ループの初回
|
||||
# 指定行数ごとにデータを分割して処理
|
||||
for i in range(0, data_frame_range, data_frame_chunk_size):
|
||||
chunk_df = data_frame.iloc[i:i + data_frame_chunk_size]
|
||||
|
||||
start_row = i + 1
|
||||
# 1回目の分割では、ヘッダ部分を上書きしないようにする
|
||||
if is_first:
|
||||
|
||||
@ -370,7 +370,8 @@
|
||||
// {% autoescape False%}
|
||||
// ジェネレータですこしずつ取得してリストに詰める
|
||||
// {% for bio_data_json_str in bio.bio_data_json_str() %}
|
||||
searchResultData.push(...JSON.parse('{{bio_data_json_str}}'))
|
||||
// unicode制御文字をエスケープしてからJSON.parseする
|
||||
searchResultData.push(...JSON.parse(`{{bio_data_json_str}}`.replace(/[\u0000-\u001F]+/g, " ")))
|
||||
// {% endfor %}
|
||||
// {% endautoescape%}
|
||||
// {% endif %}
|
||||
|
||||
@ -273,7 +273,8 @@
|
||||
// {% autoescape False%}
|
||||
// ジェネレータですこしずつ取得してリストに詰める
|
||||
// {% for ultmarc_data_json_str in ultmarc.ultmarc_data_json_str() %}
|
||||
searchResultData.push(...JSON.parse('{{ultmarc_data_json_str}}'))
|
||||
// unicode制御文字をエスケープしてからJSON.parseする
|
||||
searchResultData.push(...JSON.parse(`{{ultmarc_data_json_str}}`.replace(/[\u0000-\u001F]+/g, " ")))
|
||||
// {% endfor %}
|
||||
// {% endautoescape%}
|
||||
// {% endif %}
|
||||
|
||||
@ -257,7 +257,8 @@
|
||||
// {% autoescape False%}
|
||||
// ジェネレータですこしずつ取得してリストに詰める
|
||||
// {% for ultmarc_data_json_str in ultmarc.ultmarc_data_json_str() %}
|
||||
searchResultData.push(...JSON.parse('{{ultmarc_data_json_str}}'))
|
||||
// unicode制御文字をエスケープしてからJSON.parseする
|
||||
searchResultData.push(...JSON.parse(`{{ultmarc_data_json_str}}`.replace(/[\u0000-\u001F]+/g, " ")))
|
||||
// {% endfor %}
|
||||
// {% endautoescape%}
|
||||
// {% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user