Browse Source

修复比价统计错误

master
feng 2 years ago
parent
commit
dcd066fb9d
  1. 2
      src/Coldairarrow.Api/Controllers/HuiYan/teamitemsController.cs
  2. 9
      src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs
  3. 1
      src/Coldairarrow.Entity/DTO/TaskInfoDto.cs
  4. 3
      客户端/齐越慧眼/齐越慧眼/ApiHelper.cs
  5. 2
      客户端/齐越慧眼/齐越慧眼/MainWindow.xaml
  6. 8
      客户端/齐越慧眼/齐越慧眼/UserControls/ItemControl.xaml.cs

2
src/Coldairarrow.Api/Controllers/HuiYan/teamitemsController.cs

@ -122,7 +122,7 @@ namespace Coldairarrow.Api.Controllers.HuiYan
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[HttpGet,AllowAnonymous]
public AjaxResult GetTjInfo(DateTime start, DateTime end)
{
return _teamitemsBus.GetTjInfo(start,end);

9
src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs

@ -371,6 +371,8 @@ namespace Coldairarrow.Business.HuiYan
var list = await q.Where(where).ToListAsync();
list = list.Where(c => !string.IsNullOrEmpty(c.Id)).ToList();
var model = new PriceTaskInfo()
{
AuditCount = list.Count(c => c.State == PriceTaskState.),
@ -395,6 +397,7 @@ namespace Coldairarrow.Business.HuiYan
{
IsPass = b.IsQualified == null ? null : b.IsQualified.Value,
TeamId = b.TeamId,
TeamItemId=b.ItemId,
TeamUserId = b.UserId,
TeamDate = b.CreateTime,
TeamOverDate = b.UpdateDate==null?null:b.UpdateDate.Value,
@ -416,11 +419,12 @@ namespace Coldairarrow.Business.HuiYan
start = new DateTime(start.Year, start.Month, start.Day);
end = new DateTime(end.Year, end.Month, end.Day, 23, 59, 59);
//where = where.And(c => c.PriceTaskCreateDate >= start && c.PriceTaskCreateDate <= end);
var list = q.Where(where).ToList();
list = list.Where(c => !string.IsNullOrEmpty(c.Id)).ToList();
int waitOver = list.Count(c => c.TeamItemState == TeamItemState. && !string.IsNullOrEmpty(c.PriceTaskUserId) && c.State != PriceTaskState.);
int waitCheck = list.Count(c => c.TeamItemState == TeamItemState. && string.IsNullOrEmpty(c.PriceTaskUserId));
@ -457,7 +461,8 @@ namespace Coldairarrow.Business.HuiYan
list = q3.ToList();
var passList = list.Where(c => c.IsPass == true).ToList();
var overList = list.Where(c => c.State == PriceTaskState.).ToList();
var jtInfo = new PriceTaskInfo()
{

1
src/Coldairarrow.Entity/DTO/TaskInfoDto.cs

@ -31,6 +31,7 @@ namespace Coldairarrow.Entity.DTO
public string UserName { get; set; }
public DateTime? PriceTaskCreateDate { get; set; }
}
public class PriceTaskInfoDto:HuiYan.teamitems

3
客户端/齐越慧眼/齐越慧眼/ApiHelper.cs

@ -350,8 +350,9 @@ namespace 齐越慧眼
{
HttpClient http = new HttpClient();
http.DefaultRequestHeaders.Add("Cookie", App.JdCookie);
http.DefaultRequestHeaders.Add("referer", "https://item.jd.com/");
http.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1.0");
http.DefaultRequestHeaders.Add("referer", "https://item.jd.com/");
string url = $"https://api.m.jd.com/api?appid=pc-item-soa&functionId=pc_detailpage_wareBusiness&client=pc&clientVersion=1.0.0&loginType=3&body=%7B%22skuId%22%3A%20%22{skuId}%22%2C%22num%22%3A%201%7D&jsonp=jQuery9509423&_=1678871818560";
html = http.GetStringAsync(url).Result;

2
客户端/齐越慧眼/齐越慧眼/MainWindow.xaml

@ -11,7 +11,7 @@
WindowStartupLocation="CenterScreen"
ActiveGlowColor="{DynamicResource PrimaryColor}"
Height="780"
Title="慧眼 V1.0.1.8"
Title="慧眼 V1.0.1.9"
Width="1468" Icon="/icon.ico"
>
<Border Padding="0 10" Background="#EEEEEE">

8
客户端/齐越慧眼/齐越慧眼/UserControls/ItemControl.xaml.cs

@ -119,13 +119,17 @@ namespace 齐越慧眼.UserControls
public string getItemInfoByUrl(string url)
{
// https://item.jd.com/10030884795783.html
url = url.Trim();
if (url.EndsWith("/"))
{
url=url.Remove(url.Length - 1,1);
}
if (string.IsNullOrEmpty(App.JdCookie))
{
Application.Current.Dispatcher.Invoke(() =>
{
BrowerTabPanelControl.Main.NewTab("https://passport.jd.com/uc/login?ltype=logout&ReturnUrl=https://item.jd.com/10067296719254.html");
BrowerTabPanelControl.Main.NewTab($"https://passport.jd.com/uc/login?ltype=logout&ReturnUrl={url}");
MainWindow.Main.tab.SelectedIndex = 2;
});

Loading…
Cancel
Save