parent
8d9b3591d2
commit
2d5ff46caa
|
|
@ -198,7 +198,7 @@ if __name__ == "__main__":
|
||||||
] # 将保险起期和保险止期转为日期(datetime对象)
|
] # 将保险起期和保险止期转为日期(datetime对象)
|
||||||
raise
|
raise
|
||||||
# TODO: 若根据保险分公司、被保险人、证件类型、证件号码和出险时间查询被保险人发生异常则流转至主数据人工处理
|
# TODO: 若根据保险分公司、被保险人、证件类型、证件号码和出险时间查询被保险人发生异常则流转至主数据人工处理
|
||||||
except Exception:
|
except:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# noinspection PyShadowingNames
|
# noinspection PyShadowingNames
|
||||||
|
|
@ -1499,7 +1499,7 @@ if __name__ == "__main__":
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
# 基于影像件识别使能规则评估
|
# 基于影像件识别使能规则评估影像件是否识别
|
||||||
if not rule_engine.evaluate(
|
if not rule_engine.evaluate(
|
||||||
decision="影像件识别使能",
|
decision="影像件识别使能",
|
||||||
inputs={
|
inputs={
|
||||||
|
|
@ -1540,13 +1540,14 @@ if __name__ == "__main__":
|
||||||
"insurer_company": (
|
"insurer_company": (
|
||||||
insurer_company := "中银保险有限公司苏州分公司"
|
insurer_company := "中银保险有限公司苏州分公司"
|
||||||
), # 指定保险分公司
|
), # 指定保险分公司
|
||||||
"report_time": datetime(2025, 7, 25, 12, 0, 0), # 指定报案时间
|
"report_time": datetime(2005, 7, 25, 12, 0, 0), # 指定报案时间
|
||||||
"case_number": case_path.stem, # 设定:赔案目录名称为赔案号
|
"case_number": case_path.stem, # 设定:赔案目录名称为赔案号
|
||||||
}, # 报案层
|
}, # 报案层
|
||||||
"images_layer": [], # 影像件层
|
"images_layer": [], # 影像件层
|
||||||
"insured_person_layer": {}, # 出险人层
|
"insured_person_layer": {}, # 出险人层
|
||||||
"person_policies_layer": [], # 个单层
|
"person_policies_layer": [], # 个单层
|
||||||
"receipts_layer": [], # 票据层
|
"receipts_layer": [], # 票据层
|
||||||
|
"claim_layer": {}, # 理赔层
|
||||||
}
|
}
|
||||||
|
|
||||||
# 遍历赔案目录中影像件
|
# 遍历赔案目录中影像件
|
||||||
|
|
@ -1591,7 +1592,21 @@ if __name__ == "__main__":
|
||||||
# 就票据层按照事故止期和票据号顺序排序
|
# 就票据层按照事故止期和票据号顺序排序
|
||||||
dossier["receipts_layer"].sort(key=lambda x: (x["end_date"], x["number"]))
|
dossier["receipts_layer"].sort(key=lambda x: (x["end_date"], x["number"]))
|
||||||
|
|
||||||
# 就
|
# 根据拒付规则评估结果匹配处理方法
|
||||||
|
match result := rule_engine.evaluate(decision="拒付", inputs=dossier):
|
||||||
|
case _ if result.get("conclusion") == "拒付":
|
||||||
|
dossier["claim_layer"].update(
|
||||||
|
{
|
||||||
|
"conclusion": result["conclusion"],
|
||||||
|
"explanation": result["explanation"],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
case _ if result.get("conclusion") == "赔付":
|
||||||
|
pass
|
||||||
|
case _:
|
||||||
|
raise RuntimeError("未匹配到规则")
|
||||||
|
|
||||||
|
print(result)
|
||||||
|
|
||||||
for receipt in dossier["receipts_layer"]:
|
for receipt in dossier["receipts_layer"]:
|
||||||
print(receipt)
|
print(receipt)
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
{
|
{
|
||||||
"id": "b2b97b2a-5e59-4c23-a116-7e49e59e65c3",
|
"id": "b2b97b2a-5e59-4c23-a116-7e49e59e65c3",
|
||||||
"name": "拒付",
|
"name": "拒付",
|
||||||
"field": "refuse"
|
"field": "conclusion"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "bd0ca899-7c74-40e4-9b61-1c058ef5e83f",
|
"id": "bd0ca899-7c74-40e4-9b61-1c058ef5e83f",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue