工伤费用上传.md 6.5 KB

工伤费用上传流程: ┌─────────────────┐ │ 前端调用工伤接口 │ │ /uploadWorkInjuryFees │ └─────────┬───────┘

┌─────────────────┐ │ uploadWorkInjury│ │ FeeDetail │ └─────────┬───────┘

┌─────────────────┐ │ beforeWorkInjury│ │ Upload │ ← 工伤预处理 │ - 修改费用时间 │ │ - 正负相抵逻辑 │ └─────────┬───────┘

┌─────────────────┐ │ getAllFeesNot │ │ Uploaded │ ← 获取未上传费用 │ - 正费用查询 │ │ - 负费用查询 │ └─────────┬───────┘

┌─────────────────┐ │ prepareWorkInjury│ │ UploadFees │ └─────────┬───────┘

┌─────────────────┐ │ 构建工伤请求头 │ │ action: "transaction" │ │ transactionName: "2204" │ │ businessParams: [...] │ └─────────┬───────┘

┌─────────────────┐ │ 处理费用明细 │ │ - 设置医生编码 │ │ - 批量处理(100条) │ │ - 医生编码验证 │ └─────────┬───────┘

┌─────────────────┐ │ executeWorkInjury│ │ UploadFees │ └─────────┬───────┘

┌─────────────────┐ │ exec.executeWorkInjuryTrade │ └─────────┬───────┘

┌─────────────────┐ │ 调用工伤接口 │ │ (2204) │ └─────────┬───────┘

┌─────────────────┐ │ 处理上传结果 │ │ - 解析返回数据 │ │ - 记录成功/失败 │ └─────────┬───────┘

┌─────────────────┐ │ 更新数据库 │ │ - t_si_charge_temp │ │ - 更新trans_flag │ └─────────┬───────┘

┌─────────────────┐ │ 工伤费用撤销 │ │ (2205) │ └─────────┬───────┘

┌─────────────────┐ │ revokeWorkInjury│ │ UploadFees │ └─────────┬───────┘

┌─────────────────┐ │ 遍历撤销明细 │ │ for (detailSn) │ └─────────┬───────┘

┌─────────────────┐ │ 构建撤销请求 │ │ action: "transaction" │ │ transactionName: "2205" │ │ businessParams: {单个对象} │ └─────────┬───────┘

┌─────────────────┐ │ 调用工伤撤销接口│ │ exec.executeWorkInjuryTrade │ └─────────┬───────┘

┌─────────────────┐ │ 处理撤销结果 │ │ - 记录成功明细 │ │ - 记录失败明细 │ └─────────┬───────┘

┌─────────────────┐ │ 精确更新数据库 │ │ - 只更新成功撤销的明细 │ │ - 保持数据一致性 │ └─────────┬───────┘

┌─────────────────┐ │ 工伤预结算 │ │ (2206) │ └─────────┬───────┘

┌─────────────────┐ │ workInjuryPreSettlement │ └─────────┬───────┘

┌─────────────────┐ │ 构建预结算请求 │ │ action: "transaction" │ │ transactionName: "2206" │ │ businessParams: {对象} │ └─────────┬───────┘

┌─────────────────┐ │ 调用工伤预结算接口│ │ exec.executeWorkInjuryTrade │ └─────────┬───────┘

┌─────────────────┐ │ 处理预结算结果 │ │ - 获取报销金额 │ │ - 更新数据库 │ └─────────┬───────┘

┌─────────────────┐ │ 返回成功消息 │ │ "工伤费用预结算成功" │ └─────────────────┘

工伤接口调用详细分析

外部接口调用情况:

  1. 2204 - 工伤费用上传

    • URL: http://130.150.161.72:9206/thyy/api/public/injury/workinjury
    • 请求格式:

      {
      "action": "transaction",
      "transactionName": "2204", 
      "businessParams": [费用明细数组]
      }
      
      • 参数来源: 从 t_fee_dtle 表查询未上传费用
      1. 2205 - 工伤费用撤销
      2. URL: http://130.150.161.72:9206/thyy/api/public/injury/workinjury
      3. 请求格式: json { "action": "transaction", "transactionName": "2205", "businessParams": { "feedetl_sn": "费用明细流水号", "mdtrt_id": "就医ID", "psn_no": "人员编号" } }
    • 特殊处理: 循环调用,每个明细单独撤销

  2. 2206 - 工伤预结算

    • URL: http://130.150.161.72:9206/thyy/api/public/injury/workinjury
    • 请求格式: json { "action": "transaction", "transactionName": "2206", "businessParams": {预结算对象} } - 参数来源: 从 t_zy_pre_setlmt 表查询预结算信息 ### 数据库操作: - 查询表: t_si_pat_info, t_fee_dtle, t_zy_patient_info, t_zy_pre_setlmt - 更新表: t_fee_dtle, t_si_charge_temp, t_zy_ledger_file - 插入表: t_si_charge_temp, t_si_log