初期表示対応
This commit is contained in:
parent
5359486197
commit
2880d75c25
@ -34,8 +34,6 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
||||
WHERE
|
||||
{where_clause}
|
||||
AND (length(com_inst.abolish_ymd) = 0 OR com_inst.abolish_ymd IS NULL)
|
||||
AND (length(com_dr.abolish_ymd) = 0 OR com_dr.abolish_ymd IS NULL)
|
||||
GROUP BY com_dr.dcf_pcf_dr_cd, com_inst.dcf_dsf_inst_cd, com_blng_sec.blng_sec_cd
|
||||
ORDER BY
|
||||
com_dr.dcf_pcf_dr_cd,
|
||||
@ -129,6 +127,13 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
parameter.grad_y = f'%{parameter.grad_y}%'
|
||||
where_clauses.append(SQLCondition('grad_y', condition.LIKE, 'grad_y'))
|
||||
|
||||
# 廃業除外
|
||||
if where_clauses:
|
||||
where_clauses.append(SQLCondition(
|
||||
'', '', '(length(com_inst.abolish_ymd) = 0 OR com_inst.abolish_ymd IS NULL)', literal=True))
|
||||
where_clauses.append(SQLCondition(
|
||||
'', '', '(length(com_dr.abolish_ymd) = 0 OR com_dr.abolish_ymd IS NULL)', literal=True))
|
||||
|
||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||
|
||||
return where_clauses_str
|
||||
|
||||
@ -100,10 +100,6 @@ class UltmarcInstRepository(BaseRepository):
|
||||
# 論理和での検索
|
||||
where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
||||
|
||||
# 検索条件が入力されていない場合
|
||||
# if not where_clauses:
|
||||
# where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
||||
|
||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||
|
||||
return where_clauses_str
|
||||
|
||||
@ -162,9 +162,7 @@
|
||||
let searchResultString = '{{ultmarc.ultmarc_data_json_str()}}'
|
||||
// {% endautoescape%}
|
||||
const searchResultData = JSON.parse(searchResultString)
|
||||
if (searchResultData.length == 0) {
|
||||
return
|
||||
}else if(searchResultData.length > 500){
|
||||
if(searchResultData.length > 500){
|
||||
return
|
||||
}
|
||||
// 検索条件をセッションに入れる
|
||||
|
||||
@ -161,9 +161,6 @@
|
||||
let searchResultString = '{{ultmarc.ultmarc_data_json_str()}}'
|
||||
// {% endautoescape%}
|
||||
const searchResultData = JSON.parse(searchResultString)
|
||||
if (searchResultData.length == 0) {
|
||||
return
|
||||
}
|
||||
if (searchResultData.length > 500) {
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user