1
This commit is contained in:
@@ -553,7 +553,7 @@ namespace Tnb.ProductionMgr
|
||||
.LeftJoin<UserEntity>((a, b) => a.create_id == b.Id)
|
||||
.LeftJoin<WmsKittingoutH>((a,b,c)=>a.id==c.source_id)
|
||||
.LeftJoin<DictionaryTypeEntity>((a,b,c,d)=>d.EnCode==DictConst.DOCUMENTSTATU)
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e)=>e.DictionaryTypeId==d.Id && c.status==e.Id)
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e)=>e.DictionaryTypeId==d.Id && a.status==e.EnCode)
|
||||
.Where((a,b)=>a.workstation_id==input.stationId)
|
||||
.WhereIF(statusList.Count>0,(a,b,c,d,e)=>statusList.Contains(e.EnCode))
|
||||
.Select((a, b,c,d,e) => new FeedingRecordListOutput()
|
||||
@@ -571,7 +571,7 @@ namespace Tnb.ProductionMgr
|
||||
.LeftJoin<UserEntity>((a, b) => a.create_id == b.Id)
|
||||
.LeftJoin<WmsOutstockH>((a,b,c)=>a.id==c.source_id)
|
||||
.LeftJoin<DictionaryTypeEntity>((a,b,c,d)=>d.EnCode==DictConst.DOCUMENTSTATU)
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e)=>e.DictionaryTypeId==d.Id && c.status==e.Id)
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e)=>e.DictionaryTypeId==d.Id && a.status==e.EnCode)
|
||||
.Where((a,b)=>a.workstation_id==input.stationId)
|
||||
.WhereIF(statusList.Count>0,(a,b,c,d,e)=>statusList.Contains(e.EnCode))
|
||||
.Select((a, b,c,d,e) => new FeedingRecordListOutput()
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Tnb.ProductionMgr
|
||||
});
|
||||
}
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
string domain = _userManager.Domain;
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -397,7 +397,7 @@ namespace Tnb.ProductionMgr
|
||||
});
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = "http://localhost:9232";
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
string domain = _userManager.Domain;
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
// ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -508,7 +508,7 @@ namespace Tnb.ProductionMgr
|
||||
// codeqty = (int)prdReport.reported_qty,
|
||||
// });
|
||||
// // string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = "http://tnb.tuotong-tech.com";
|
||||
// string domain = _userManager.Domain;
|
||||
// Dictionary<string, object> header = new()
|
||||
// {
|
||||
// // ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -588,7 +588,8 @@ namespace Tnb.ProductionMgr
|
||||
string location_code = basLocation.location_code;
|
||||
|
||||
PrdReport prdReport = await db.Queryable<PrdReport>()
|
||||
.Where(x => x.equip_id == equipment.id && x.status == 0).OrderByDescending(x => x.create_time)
|
||||
.LeftJoin<BasMaterial>((x,y)=>x.material_id==y.id)
|
||||
.Where((x,y) => y.category_id.Contains("\"DGJCJ\"") && x.status == 0).OrderByDescending(x => x.create_time)
|
||||
.FirstAsync();
|
||||
|
||||
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdReport.material_id);
|
||||
@@ -653,7 +654,7 @@ namespace Tnb.ProductionMgr
|
||||
material_id = prdReport.material_id,
|
||||
material_code = basMaterial.code,
|
||||
unit_id = prdReport.unit_id,
|
||||
code_batch = prdReport.barcode,
|
||||
code_batch = prdReport.mo_task_code,
|
||||
pr_qty = (int)prdReport.reported_qty,
|
||||
});
|
||||
|
||||
@@ -667,7 +668,9 @@ namespace Tnb.ProductionMgr
|
||||
codeqty = (int)prdReport.reported_qty,
|
||||
});
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
// string domain = _userManager.Domain;
|
||||
// string domain = "http://localhost:9232";
|
||||
string domain = _userManager.Domain;
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
// ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -781,7 +784,7 @@ namespace Tnb.ProductionMgr
|
||||
codeqty = (int)prdReport.reported_qty,
|
||||
});
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
string domain = _userManager.Domain;
|
||||
// string domain = "http://localhost:9232";
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
@@ -971,7 +974,7 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
string domain = _userManager.Domain;
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
// ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
|
||||
@@ -161,4 +161,9 @@ public interface IUserManager
|
||||
/// 获取管理员用户id.
|
||||
/// </summary>
|
||||
string GetAdminUserId();
|
||||
|
||||
/// <summary>
|
||||
/// 域名
|
||||
/// </summary>
|
||||
string Domain{ get; }
|
||||
}
|
||||
@@ -6,5 +6,36 @@
|
||||
public partial class UserManager
|
||||
{
|
||||
public static string AsscessToken { get; set; }
|
||||
|
||||
public string Domain
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
string host = "";
|
||||
if (App.HttpContext != null)
|
||||
{
|
||||
host = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
}
|
||||
else
|
||||
{
|
||||
var datatable = _repository.AsSugarClient().Ado
|
||||
.GetDataTable("select * from bas_factory_config where key='domain' limit 1");
|
||||
if (datatable.Rows.Count > 0)
|
||||
{
|
||||
host = datatable.Rows[0]["value"].ToString();
|
||||
Console.WriteLine(host);
|
||||
}
|
||||
}
|
||||
return host;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return "http://tnb.tuotong-tech.com";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user