Skip to content

Commit

Permalink
Merge pull request JeffreySu#1454 from fdstar/dev
Browse files Browse the repository at this point in the history
修正发票信息实体,区分开票平台提交的发票信息实体与报销方获取的发票信息实体
  • Loading branch information
JeffreySu authored Oct 23, 2018
2 parents c17d7ee + 2f8f56c commit e11935e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ and limitations under the License.
修改标识:Senparc - 20181018
修改描述:【异步方法】批量查询报销发票信息接口去掉无意义参数,更新reimburseStatus为枚举值
修改标识:Senparc - 20181023
修改描述:修正发票信息实体,区分开票平台提交的发票信息实体与报销方获取的发票信息实体
----------------------------------------------------------------*/


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ public class CardExtInfo
/// </summary>
public class UserCard
{
public InvoiceUserData invoice_user_data { get; set; }
public InvoicePlatformUserData invoice_user_data { get; set; }
}

/// <summary>
///
/// 发票信息基础公用信息(开票平台,报销方)
/// </summary>
public class InvoiceUserData
public abstract class InvoiceBaseUseData
{
/// <summary>
/// 发票的金额,以分为单位
Expand Down Expand Up @@ -155,14 +155,6 @@ public class InvoiceUserData
/// </summary>
public int tax { get; set; }
/// <summary>
/// 发票pdf文件上传到微信发票平台后,会生成一个发票
/// </summary>
public string s_pdf_media_id { get; set; }
/// <summary>
/// 其它消费附件的PDF
/// </summary>
public string s_trip_pdf_media_id { get; set; }
/// <summary>
/// 校验码,发票pdf右上角,开票日期下的校验码
/// </summary>
public string check_code { get; set; }
Expand Down Expand Up @@ -204,6 +196,61 @@ public class InvoiceUserData
public string maker { get; set; }
}

/// <summary>
/// 开票平台将电子发票卡券插入用户卡包时的发票信息
/// </summary>
public class InvoicePlatformUserData: InvoiceBaseUseData
{
/// <summary>
/// 发票pdf文件上传到微信发票平台后,会生成一个发票
/// </summary>
public string s_pdf_media_id { get; set; }
/// <summary>
/// 其它消费附件的PDF
/// </summary>
public string s_trip_pdf_media_id { get; set; }
}
/// <summary>
/// 报销方查询报销发票时的发票信息
/// </summary>
public class InvoiceReimburseUserData : InvoiceBaseUseData
{
/// <summary>
/// 这张发票对应的PDF_URL
/// </summary>
public string pdf_url { get; set; }
/// <summary>
/// 其它消费凭证附件对应的URL,如行程单、水单等
/// </summary>
public string trip_pdf_url { get; set; }
/// <summary>
/// 发票报销状态,与<see cref="Reimburse_Status"/>对应
/// </summary>
public string reimburse_status { get; set; }
/// <summary>
/// 尝试转换<see cref="reimburse_status"/>为对应枚举,如果转换失败,则返回null
/// </summary>
public Reimburse_Status? Status
{
get
{
#if !NET35
if (System.Enum.TryParse(this.reimburse_status, out Reimburse_Status status))
{
return status;
}
#else
try
{
return (Reimburse_Status)System.Enum.Parse(typeof(Reimburse_Status), this.reimburse_status);
}
catch { }
#endif
return null;
}
}
}

/// <summary>
/// 商品详情结构
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class GetInvoiceInfoResultJson : WxJsonResult
/// <summary>
/// 用户可在发票票面看到的主要信息
/// </summary>
public InvoiceUserData user_info { get; set; }
public InvoiceReimburseUserData user_info { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -168,6 +168,6 @@ public class InvoiceItemInfo
/// <summary>
/// 用户可在发票票面看到的主要信息
/// </summary>
public InvoiceUserData user_info { get; set; }
public InvoiceReimburseUserData user_info { get; set; }
}
}

0 comments on commit e11935e

Please sign in to comment.