Commit 7aac8d82 by guanzhenshan

解决退款数据导出和报表不一致的问题

parent 8fa6ba9e
...@@ -4660,14 +4660,14 @@ namespace Bailun.DC.Services ...@@ -4660,14 +4660,14 @@ namespace Bailun.DC.Services
/// <param name="orderno">平台订单号</param> /// <param name="orderno">平台订单号</param>
/// <param name="total">符合条件的记录数</param> /// <param name="total">符合条件的记录数</param>
/// <returns></returns> /// <returns></returns>
public List<dc_base_crm_refund> ListOrderReturn(DateTime? start, DateTime? end, DateTime? paytimestart, DateTime? paytimeend, int? companyid, string platform, string website, string orderno) public List<dc_base_crm_refund> ListOrderReturn(DateTime? start, DateTime? end, DateTime? paytimestart, DateTime? paytimeend, int? companyid, string platform, string website, string orderno, int? shippingstatus)
{ {
var sqlparam = new DynamicParameters(); var sqlparam = new DynamicParameters();
#region 订单表版本 #region 订单表版本
//var sql = "select t1.platform_type,t1.website,t1.origin_order_id,t1.seller_account,t1.amount_refund,(t1.seller_order_exchange_rate*t1.amount_refund) as refundrmb,t1.refund_time,t1.refund_reference_id from dc_base_oms_order t1 "; //var sql = "select t1.platform_type,t1.website,t1.origin_order_id,t1.seller_account,t1.amount_refund,(t1.seller_order_exchange_rate*t1.amount_refund) as refundrmb,t1.refund_time,t1.refund_reference_id from dc_base_oms_order t1 ";
//sql += " where t1.amount_refund>0 "; //sql += " where t1.amount_refund>0 ";
//if (companyid.HasValue && companyid.Value > 0) //if (companyid.HasValue && companyid.Value > 0)
//{ //{
...@@ -4760,7 +4760,7 @@ namespace Bailun.DC.Services ...@@ -4760,7 +4760,7 @@ namespace Bailun.DC.Services
if (companyid.HasValue && companyid.Value != 0) if (companyid.HasValue && companyid.Value != 0)
{ {
//sql += " and t1.company_id=" + companyid.Value; //sql += " and t1.company_id="+companyid.Value;
} }
if (!string.IsNullOrWhiteSpace(platform)) if (!string.IsNullOrWhiteSpace(platform))
...@@ -4779,7 +4779,18 @@ namespace Bailun.DC.Services ...@@ -4779,7 +4779,18 @@ namespace Bailun.DC.Services
sql += " and t1.origin_order_id=@orderno"; sql += " and t1.origin_order_id=@orderno";
sqlparam.Add("orderno", orderno); sqlparam.Add("orderno", orderno);
} }
if (shippingstatus.HasValue)
{
if (shippingstatus.Value == 1)
{
sql += " and t1.shipping_status!='UnShipping'";
}
else
{
sql += " and t1.shipping_status='UnShipping'";
}
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString)) using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment