This commit is contained in:
yang.lee
2023-11-23 17:09:07 +08:00

View File

@@ -80,7 +80,7 @@ namespace Tnb.ProductionMgr
.AnyAsync(x => x.member_carry_code == qrCode && x.is_all_feeding == 0)) .AnyAsync(x => x.member_carry_code == qrCode && x.is_all_feeding == 0))
{ {
FeedingDetailOutput result = await db.Queryable<PrdMaterialReceiptD>() FeedingDetailOutput result = await db.Queryable<PrdMaterialReceiptD>()
.LeftJoin<WmsCarryH>((a, b) => a.carry_id == b.id) .LeftJoin<WmsCarryH>((a, b) => b.carry_code==qrCode)
.Where((a) => a.member_carry_code == qrCode && a.is_all_feeding == 0) .Where((a) => a.member_carry_code == qrCode && a.is_all_feeding == 0)
.Select((a, b) => new FeedingDetailOutput .Select((a, b) => new FeedingDetailOutput
{ {
@@ -95,7 +95,7 @@ namespace Tnb.ProductionMgr
// barcode = c.barcode, // barcode = c.barcode,
// code_batch = c.code_batch, // code_batch = c.code_batch,
code_batch = c.batch, code_batch = c.batch,
codeqty = c.num, codeqty = c.num - SqlFunc.IsNull(c.feeding_num,0),
material_id = c.material_id, material_id = c.material_id,
material_code = d.code, material_code = d.code,
material_name = d.name material_name = d.name
@@ -106,7 +106,7 @@ namespace Tnb.ProductionMgr
else else
{ {
FeedingDetailOutput result = await db.Queryable<PrdMaterialReceiptH>() FeedingDetailOutput result = await db.Queryable<PrdMaterialReceiptH>()
.LeftJoin<WmsCarryH>((a, b) => a.carry_id == b.id) .LeftJoin<WmsCarryH>((a, b) => b.carry_code==qrCode)
.Where((a) => a.carry_code == qrCode) .Where((a) => a.carry_code == qrCode)
.Select((a, b) => new FeedingDetailOutput .Select((a, b) => new FeedingDetailOutput
{ {
@@ -120,7 +120,7 @@ namespace Tnb.ProductionMgr
// barcode = c.barcode, // barcode = c.barcode,
// code_batch = c.code_batch, // code_batch = c.code_batch,
code_batch = c.batch, code_batch = c.batch,
codeqty = c.num, codeqty = c.num - SqlFunc.IsNull(c.feeding_num,0),
material_id = c.material_id, material_id = c.material_id,
material_code = d.code, material_code = d.code,
material_name = d.name material_name = d.name
@@ -344,10 +344,11 @@ namespace Tnb.ProductionMgr
carry_code = input.carry_code ?? "", carry_code = input.carry_code ?? "",
}; };
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 = _userManager.Domain;
Dictionary<string, object> header = new() Dictionary<string, object> header = new()
{ {
["Authorization"] = App.HttpContext.Request.Headers["Authorization"] // ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
}; };
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CARRY_SIGN, JsonConvert.SerializeObject(mesCarrySignInput), header); string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CARRY_SIGN, JsonConvert.SerializeObject(mesCarrySignInput), header);
Log.Information(sendResult); Log.Information(sendResult);