47cb7170 by 冯轩

Merge remote-tracking branch 'origin/fix/20240424'

2 parents 1eb06fcb 6992b281
......@@ -1675,15 +1675,30 @@ SE_FSM_MSI_MAP = {
'签单日期': (2, '签单日期'),
}
def get_page_customer_sign(page_no):
return (page_no, '客户签名')
def get_page_sign_date(page_no):
return (page_no, '签单日期')
SE_FSM_SC_MAP = {
'姓名': (1, '姓名'),
'证件类型': (1, '证件类型'),
'证件号码': (1, '证件号码'),
'总价': (1, '总价'),
'客户签名': (12, '客户签名'),
'签单日期': (12, '签单日期'),
'客户签名': get_page_customer_sign,
'签单日期': get_page_sign_date,
}
# SE_FSM_SC_MAP = {
# '姓名': (1, '姓名'),
# '证件类型': (1, '证件类型'),
# '证件号码': (1, '证件号码'),
# '总价': (1, '总价'),
# '客户签名': (12, '客户签名'),
# '签单日期': (12, '签单日期'),
# }
SE_FSM_SC2_MAP = {
'姓名': (1, '姓名'),
'证件类型': (1, '证件类型'),
......
......@@ -1030,11 +1030,24 @@ class Command(BaseCommand, LoggerMixin):
elif classify in consts.SE_FSM_CON_MAP:
res = {}
for key, (pno1, key1) in consts.SE_FSM_CON_MAP[classify].items():
res[key] = page_info_dict.get(str(pno1), {}).get(key1)
res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(pno1), {}).get(
consts.IMG_PATH_KEY, '')
license_summary[classify] = [res]
# for key, (pno1, key1) in consts.SE_FSM_CON_MAP[classify].items():
# res[key] = page_info_dict.get(str(pno1), {}).get(key1)
# res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(pno1), {}).get(
# consts.IMG_PATH_KEY, '')
# license_summary[classify] = [res]
for key, value in consts.SE_FSM_CON_MAP[classify].items():
if callable(value):
for page_no in page_info_dict.keys():
if page_no != 'is_asp' and page_no != '1':
pno1, key1 = value(int(page_no))
res[key] = page_info_dict.get(str(pno1), {}).get(key1)
res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(pno1), {}).get(consts.IMG_PATH_KEY, '')
else:
pno1, key1 = value
res[key] = page_info_dict.get(str(pno1), {}).get(key1)
res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(pno1), {}).get(consts.IMG_PATH_KEY, '')
license_summary[classify] = [res]
def rebuild_bs_summary(self, bs_summary, unknown_summary):
# bs_summary = {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!