Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修正发票信息实体,区分开票平台提交的发票信息实体与报销方获取的发票信息实体 #1454

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; }
}
}