修复 统计日期错误。
消费记录 增加新类型
This commit is contained in:
1 parent
c6b8d3a83a
commit
0f70b5e37c
4 files changed
+677
-667
No files matched your search
@@ -487,7 +487,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
||||
return UserLogin.GetSignPostData(new
|
||||
{
|
||||
StartDate = query.StartDate.Date,
|
||||
EndDate = query.EndDate.Date,
|
||||
EndDate = query.EndDate,
|
||||
ShopIds = shopIds,
|
||||
GroupType = (int)groupType,
|
||||
});
|
||||
|
||||
@@ -276,11 +276,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
||||
/// <summary>组装查询参数(起止日期已保证先后顺序)</summary>
|
||||
private ShopRevenueStatisticsQuery BuildQuery()
|
||||
{
|
||||
if (StartDate == EndDate)
|
||||
{
|
||||
EndDate = EndDate.AddDays(1).AddSeconds(-1);
|
||||
}
|
||||
else if (StartDate > EndDate)
|
||||
if (StartDate > EndDate)
|
||||
{
|
||||
var temp = StartDate;
|
||||
StartDate = EndDate;
|
||||
@@ -291,7 +287,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
||||
return new ShopRevenueStatisticsQuery
|
||||
{
|
||||
StartDate = StartDate,
|
||||
EndDate = EndDate,
|
||||
EndDate = EndDate.AddDays(1).AddSeconds(-1),
|
||||
ShopIds = BuildSelectedShopIds(),
|
||||
StatPackages = StatPackages,
|
||||
};
|
||||
|
||||
+659
-658
File diff suppressed because it is too large.
Load diff
@@ -160,8 +160,10 @@ namespace Work._29Tools.Forms.UserForms
|
||||
data3 += "&type_in=26,38";
|
||||
else if (cmbType.Text == "额外包裹扣费支出/返还")
|
||||
data3 += "&type_in=35,36";
|
||||
else if (cmbType.Text == "云仓退货扣费支出")
|
||||
else if (cmbType.Text == "云仓退货扣费支出/返还")
|
||||
data3 += "&type_in=31,32";
|
||||
else if (cmbType.Text == "额外包裹退货拦截支出/返还")
|
||||
data3 += "&type_in=39,40";
|
||||
else if (cmbType.Text == "超重扣费支出")
|
||||
data3 += "&type_in=24,28,33,37,41";
|
||||
else if (cmbType.Text == "同步物流")
|
||||
@@ -186,7 +188,18 @@ namespace Work._29Tools.Forms.UserForms
|
||||
var result = JObject.Parse(html);
|
||||
count = (int)result["count"];
|
||||
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
|
||||
return JsonConvert.DeserializeObject<List<user_payment_record>>(result["data"]?.ToString() ?? "null") ?? throw new InvalidOperationException($"第 {page} 页缺少消费记录");
|
||||
var userPaymentList = JsonConvert.DeserializeObject<List<user_payment_record>>(result["data"]?.ToString() ?? "null");
|
||||
if(userPaymentList==null) throw new InvalidOperationException($"第 {page} 页缺少消费记录");
|
||||
int[] negativeTypes = [34, 23, 38, 32, 36, 40];
|
||||
foreach (var item in userPaymentList)
|
||||
{
|
||||
if (negativeTypes.Contains(item.type.Value))
|
||||
{
|
||||
item.amount *= -1;
|
||||
}
|
||||
}
|
||||
return userPaymentList;
|
||||
|
||||
}
|
||||
|
||||
public void GetBalanceList()
|
||||
|
||||
Reference in new issue
Block a user