仮コミット2
This commit is contained in:
parent
5b5ef19425
commit
97771bd6ac
@ -14,5 +14,6 @@ class UltmarcDoctorInfoDBModel(BaseDBModel):
|
||||
alma: Optional[str]
|
||||
hometown: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
use_stop_div: Optional[str]
|
||||
drday_y: Optional[str]
|
||||
estab_y: Optional[str]
|
||||
|
||||
@ -11,3 +11,4 @@ class UltmarcDoctorWrkplaceDBModel(BaseDBModel):
|
||||
univ_post_name: Optional[str]
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[date]
|
||||
notdm_flg: Optional[str]
|
||||
|
||||
@ -11,3 +11,4 @@ class UltmarcDoctorWrkplaceHisDBModel(BaseDBModel):
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[str]
|
||||
aply_end_ymd: Optional[str]
|
||||
notdm_flg: Optional[str]
|
||||
|
||||
@ -45,6 +45,24 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
def is_input_birthday_format(self):
|
||||
return self._format_date_string(self.doctor_info_data.birthday)
|
||||
|
||||
# 利用停止区分
|
||||
def is_input_use_stop_div_category_name(self):
|
||||
if self.doctor_info_data.use_stop_div:
|
||||
use_stop_div = self.doctor_info_data.use_stop_div
|
||||
# 利用停止区分の文言設定
|
||||
# 01:全面的に利用停止
|
||||
# 03:特定の項目について利用停止
|
||||
# 04:全てのDM等利用停止
|
||||
if (use_stop_div == '01'):
|
||||
return '全面的に利用停止'
|
||||
if (use_stop_div == '03'):
|
||||
return '特定の項目について利用停止'
|
||||
if (use_stop_div == '04'):
|
||||
return '全てのDM等利用停止'
|
||||
return ''
|
||||
else:
|
||||
return ''
|
||||
|
||||
# 開始年月日
|
||||
def is_input_aply_start_ymd_format(self, aply_start_date: datetime):
|
||||
if aply_start_date:
|
||||
@ -70,6 +88,13 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
else:
|
||||
return ''
|
||||
|
||||
# DM不可フラグ
|
||||
def is_input_notdm_flg_name(self, notdm_flg: str):
|
||||
if notdm_flg and notdm_flg == '1':
|
||||
return '不可'
|
||||
else:
|
||||
return ''
|
||||
|
||||
def is_input_trt_course_data_size(self):
|
||||
return len(self.trt_coursed_data)
|
||||
|
||||
|
||||
@ -113,11 +113,32 @@ class UltmarcDoctorSearchViewModel(BaseModel):
|
||||
return self.form_data.grad_y or ''
|
||||
|
||||
# 利用停止区分
|
||||
def is_use_stop_div(self):
|
||||
def is_checked_use_stop_div(self):
|
||||
if not self.is_form_submitted():
|
||||
return 'checked'
|
||||
return self._checked_value(self.form_data.use_stop_div)
|
||||
|
||||
def is_input_use_stop_div(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.use_stop_div or ''
|
||||
|
||||
def is_input_use_stop_div_category_name(self, use_stop_div: str):
|
||||
if use_stop_div:
|
||||
# 利用停止区分の文言設定
|
||||
# 01:全面停止
|
||||
# 03:特定項目停止
|
||||
# 04:全DM停止
|
||||
if (use_stop_div == '01'):
|
||||
return '全面停止'
|
||||
if (use_stop_div == '03'):
|
||||
return '特定項目停止'
|
||||
if (use_stop_div == '04'):
|
||||
return '全DM停止'
|
||||
return ''
|
||||
else:
|
||||
return ''
|
||||
|
||||
def disabled_button(self):
|
||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
clone_parameter = UltmarcDoctorSearchModel(**parameter.model_dump())
|
||||
where_clause = self.__build_condition(clone_parameter)
|
||||
query = self.FETCH_SQL.format(where_clause=where_clause)
|
||||
result = self._database.execute_select(query, clone_parameter.model_dump())
|
||||
result = self._database.execute_select(query, parameter.model_dump())
|
||||
models = [UltmarcDoctorDBModel(**r) for r in result]
|
||||
|
||||
return models
|
||||
@ -142,6 +142,11 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
parameter.grad_y = f'%{parameter.grad_y}%'
|
||||
where_clauses.append(SQLCondition('grad_y', condition.LIKE, 'grad_y'))
|
||||
|
||||
# 利用停止区分
|
||||
if is_not_empty(parameter.use_stop_div) is False:
|
||||
# 01・03・04を対象外とする
|
||||
where_clauses.append(SQLCondition('', '', "(use_stop_div NOT IN ('01','03','04'))", literal=True))
|
||||
|
||||
# 廃業除外
|
||||
if where_clauses:
|
||||
where_clauses.append(SQLCondition(
|
||||
@ -163,6 +168,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
com_alma.alma,
|
||||
com_hometown.hometown,
|
||||
com_dr.grad_y,
|
||||
com_dr.use_stop_div,
|
||||
com_dr.drday_y,
|
||||
com_dr.estab_y
|
||||
FROM src05.com_dr
|
||||
|
||||
@ -16,7 +16,8 @@ class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
||||
univ_post.form_post_name as univ_post_name,
|
||||
post.form_post_name as post_name,
|
||||
com_dr_wrkplace_his.aply_start_ymd,
|
||||
com_dr_wrkplace_his.aply_end_ymd
|
||||
com_dr_wrkplace_his.aply_end_ymd,
|
||||
com_dr_wrkplace_his.notdm_flg
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace_his ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace_his.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace_his.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
|
||||
@ -16,7 +16,8 @@ class UltmarcDoctorWrkplaceRepository(BaseRepository):
|
||||
com_blng_sec.blng_sec_name,
|
||||
univ_post.form_post_name AS univ_post_name,
|
||||
post.form_post_name AS post_name,
|
||||
com_dr_wrkplace.aply_start_ymd
|
||||
com_dr_wrkplace.aply_start_ymd,
|
||||
com_dr_wrkplace.notdm_flg
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
|
||||
@ -94,6 +94,8 @@
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.sex or ''}}"></td>
|
||||
<td>生年月日:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_birthday_format()}}"></td>
|
||||
<td>利用停止区分:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_use_stop_div_category_name()}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="docInfoTd">
|
||||
@ -185,6 +187,7 @@
|
||||
<th>職位</th>
|
||||
<th>開始年月日</th>
|
||||
<th>終了年月日</th>
|
||||
<th>DM不可</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script>
|
||||
@ -205,6 +208,7 @@
|
||||
<td>{{doctor_wrkplace_data.post_name or ''}}</td>
|
||||
<td>{{ultmarc.is_input_aply_start_ymd_format(doctor_wrkplace_data.aply_start_ymd)}}</td>
|
||||
<td>9999/99/99</td>
|
||||
<td>{{ultmarc.is_input_notdm_flg_name(doctor_wrkplace_data.notdm_flg)}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@ -219,6 +223,7 @@
|
||||
<td>{{doctor_wrkplace_his_data.post_name or ''}}</td>
|
||||
<td>{{ultmarc.is_input_his_aply_start_ymd_format(doctor_wrkplace_his_data.aply_start_ymd)}}</td>
|
||||
<td>{{ultmarc.is_input_his_aply_end_ymd_format(doctor_wrkplace_his_data.aply_end_ymd)}}</td>
|
||||
<td>{{ultmarc.is_input_notdm_flg_name(doctor_wrkplace_his_data.notdm_flg)}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
<input class="text docSearchTextbox" style="ime-mode:disabled;" type="text" name="ctrl_grad_y"
|
||||
value="{{ultmarc.is_input_grad_y()}}" maxlength='4' oninput="formBtDisabled()"></td>
|
||||
<td class="docSearchColumnTd"><label><input type="checkbox" name="use_stop_div_ctrl" value="true"
|
||||
{{ultmarc.is_use_stop_div()}}> 利用停止区分を含む</label></td>
|
||||
{{ultmarc.is_checked_use_stop_div()}}> 利用停止区分を含む</label></td>
|
||||
<td class="search_btTd">
|
||||
<input class="text ult_bt search_bt" id="clear" type="button" name="clear_bt" value="クリア" onclick="clr();">
|
||||
<input class="ult_bt search_bt" id="search_bt" name="search_bt" value="検索" type="submit">
|
||||
@ -184,7 +184,7 @@
|
||||
sessionStorage.setItem('ctrl_trt_course_name','{{ultmarc.is_input_trt_course_name()}}');
|
||||
sessionStorage.setItem('ctrl_alma','{{ultmarc.is_input_alma()}}');
|
||||
sessionStorage.setItem('ctrl_grad_y','{{ultmarc.is_input_grad_y()}}');
|
||||
sessionStorage.setItem('use_stop_div_ctrl','{{ultmarc.is_use_stop_div()}}');
|
||||
sessionStorage.setItem('use_stop_div_ctrl','{{ultmarc.is_input_use_stop_div()}}');
|
||||
|
||||
// ページネーションのページ番号取得
|
||||
let pagination_page_number = Number('{{ultmarc.init_pagination_page_number()}}');
|
||||
@ -246,7 +246,8 @@
|
||||
inner_content = `<a href="/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
||||
if(key=='dcf_dsf_inst_cd')
|
||||
inner_content = `<a href="/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}" onclick="OnLinkClick()">${data['form_inst_name_kanji'] || ''}</a>`;
|
||||
return `<td>${inner_content || ''}</td>`
|
||||
if(key=='use_stop_div')
|
||||
inner_content = "{{ultmarc.is_input_use_stop_div_category_name(inner_content)}}"
|
||||
});
|
||||
return `
|
||||
<tr class="result_data">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user