1
This commit is contained in:
@@ -198,7 +198,8 @@ namespace Tnb.ProductionMgr
|
||||
codeqty = Convert.ToInt32(item.ContainsKey("quantity") ? item["quantity"] : "0"),
|
||||
});
|
||||
}
|
||||
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -275,11 +276,20 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
EqpEquipment equipment = await db.Queryable<EqpEquipment>()
|
||||
.LeftJoin<EqpDaq>((x,y)=>x.id==y.equip_id)
|
||||
.Where((x,y) => y.equip_code==equip_code && y.label_name==label_code && y.label_point=="提报装箱称重点位")
|
||||
.Select((x,y)=>x)
|
||||
.FirstAsync();
|
||||
EqpEquipment equipment = null;
|
||||
try
|
||||
{
|
||||
equipment = await db.Queryable<EqpEquipment>()
|
||||
.LeftJoin<EqpDaq>((x,y)=>x.id==y.equip_id)
|
||||
.Where((x,y) => y.equip_code==equip_code && y.label_name==label_code && y.label_point=="提报装箱称重点位")
|
||||
.Select((x,y)=>x)
|
||||
.FirstAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
if (equipment == null)
|
||||
{
|
||||
throw Oops.Bah("未找到机台");
|
||||
@@ -299,6 +309,7 @@ namespace Tnb.ProductionMgr
|
||||
PrdReport prdReport = await db.Queryable<PrdReport>()
|
||||
.Where(x => x.equip_id == equipment.id && x.status == 0).OrderByDescending(x => x.create_time)
|
||||
.FirstAsync();
|
||||
string create_id = prdReport.create_id;
|
||||
if (prdReport == null)
|
||||
{
|
||||
throw Oops.Bah("未找到提报记录");
|
||||
@@ -317,14 +328,14 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
||||
bill_date = DateTime.Now,
|
||||
create_id = _userManager.UserId,
|
||||
create_id = create_id,
|
||||
location_code = basLocation.location_code,
|
||||
carry_code = prdReport.material_box_code,
|
||||
is_check = 1,
|
||||
station_id = prdReport.station,
|
||||
workline_id = workline?.Id ?? "",
|
||||
workshop_id = workshop?.Id ?? "",
|
||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||
// org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||
// warehouse_id = basLocation?.wh_id,
|
||||
warehouse_id = warehouse_id,
|
||||
status = 0,
|
||||
@@ -349,13 +360,13 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
instock = new MESWmsInstockHInput()
|
||||
{
|
||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||
// org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||
bill_date = DateTime.Now,
|
||||
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
||||
// warehouse_id = basLocation?.wh_id,
|
||||
warehouse_id = warehouse_id,
|
||||
source_id = prdInstockH.id,
|
||||
create_id = _userManager.UserId,
|
||||
create_id = create_id,
|
||||
carry_code = prdReport.material_box_code,
|
||||
location_code = basLocation.location_code,
|
||||
is_check = 1,
|
||||
@@ -381,10 +392,11 @@ namespace Tnb.ProductionMgr
|
||||
code_batch = prdReport.barcode + "0001",
|
||||
codeqty = (int)prdReport.reported_qty,
|
||||
});
|
||||
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
// ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
};
|
||||
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
||||
Log.Information(sendResult);
|
||||
@@ -488,7 +500,8 @@ namespace Tnb.ProductionMgr
|
||||
code_batch = prdReport.barcode + "0001",
|
||||
codeqty = (int)prdReport.reported_qty,
|
||||
});
|
||||
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -598,7 +611,8 @@ namespace Tnb.ProductionMgr
|
||||
code_batch = prdReport.barcode + "0001",
|
||||
codeqty = (int)prdReport.reported_qty,
|
||||
});
|
||||
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
@@ -782,7 +796,8 @@ namespace Tnb.ProductionMgr
|
||||
});
|
||||
}
|
||||
|
||||
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
string domain = "http://tnb.tuotong-tech.com";
|
||||
Dictionary<string, object> header = new()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
|
||||
Reference in New Issue
Block a user