新增涉疑交易明细查询导出并补充对手方证件信息
This commit is contained in:
@@ -138,6 +138,8 @@ class BankStatementItem(BaseModel):
|
||||
customerId: int = Field(-1, description="客户ID")
|
||||
customerName: str = Field(..., description="客户名称")
|
||||
customerReference: str = Field("", description="客户参考")
|
||||
customerCertNo: str = Field("", description="客户证件号")
|
||||
customerSocialCreditCode: str = Field("", description="客户统一社会信用代码")
|
||||
downPaymentFlag: int = Field(0, description="首付标志")
|
||||
drAmount: float = Field(0, description="借方金额")
|
||||
exceptionType: str = Field("", description="异常类型")
|
||||
|
||||
@@ -85,6 +85,8 @@ def _build_statement(
|
||||
customer_account_mask_no: str = "9558800000000001",
|
||||
bank_comments: str = "",
|
||||
customer_bank: str = "",
|
||||
customer_cert_no: str = "",
|
||||
customer_social_credit_code: str = "",
|
||||
) -> Dict:
|
||||
trans_amount = round(dr_amount if dr_amount > 0 else cr_amount, 2)
|
||||
balance_amount = round(80000000 + cr_amount - dr_amount, 2)
|
||||
@@ -114,6 +116,8 @@ def _build_statement(
|
||||
"customerId": -1,
|
||||
"customerName": customer_name,
|
||||
"customerReference": "",
|
||||
"customerCertNo": customer_cert_no,
|
||||
"customerSocialCreditCode": customer_social_credit_code,
|
||||
"downPaymentFlag": 0,
|
||||
"drAmount": round(dr_amount, 2),
|
||||
"exceptionType": "",
|
||||
|
||||
@@ -109,6 +109,8 @@ class StatementService:
|
||||
"customerId": -1,
|
||||
"customerName": customer_name,
|
||||
"customerReference": "",
|
||||
"customerCertNo": rng.choice(allowed_identity_cards),
|
||||
"customerSocialCreditCode": "",
|
||||
"downPaymentFlag": 0,
|
||||
"drAmount": dr_amount,
|
||||
"exceptionType": "",
|
||||
|
||||
@@ -258,6 +258,25 @@ def test_generate_statements_should_stay_within_single_employee_scope_per_log_id
|
||||
assert {item["cretNo"] for item in statements}.issubset(allowed_id_cards)
|
||||
|
||||
|
||||
def test_get_bank_statement_should_include_counterparty_identity_fields():
|
||||
service = StatementService()
|
||||
|
||||
response = service.get_bank_statement(
|
||||
{
|
||||
"groupId": 1000,
|
||||
"logId": 20001,
|
||||
"pageNow": 1,
|
||||
"pageSize": 5,
|
||||
}
|
||||
)
|
||||
|
||||
statements = response["data"]["bankStatementList"]
|
||||
|
||||
assert statements
|
||||
assert all("customerCertNo" in item for item in statements)
|
||||
assert all("customerSocialCreditCode" in item for item in statements)
|
||||
|
||||
|
||||
def test_all_mode_monthly_fixed_income_log_should_keep_monthly_income_stable(monkeypatch):
|
||||
monkeypatch.setattr("services.file_service.settings.RULE_HIT_MODE", "all")
|
||||
file_service = FileService(staff_identity_repository=FakeStaffIdentityRepository())
|
||||
|
||||
Reference in New Issue
Block a user