Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -198,7 +198,8 @@ namespace Tnb.ProductionMgr
|
|||||||
codeqty = Convert.ToInt32(item.ContainsKey("quantity") ? item["quantity"] : "0"),
|
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()
|
Dictionary<string, object> header = new()
|
||||||
{
|
{
|
||||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||||
@@ -275,11 +276,20 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
ISqlSugarClient db = _repository.AsSugarClient();
|
ISqlSugarClient db = _repository.AsSugarClient();
|
||||||
EqpEquipment equipment = await db.Queryable<EqpEquipment>()
|
EqpEquipment equipment = null;
|
||||||
.LeftJoin<EqpDaq>((x,y)=>x.id==y.equip_id)
|
try
|
||||||
.Where((x,y) => y.equip_code==equip_code && y.label_name==label_code && y.label_point=="提报装箱称重点位")
|
{
|
||||||
.Select((x,y)=>x)
|
equipment = await db.Queryable<EqpEquipment>()
|
||||||
.FirstAsync();
|
.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)
|
if (equipment == null)
|
||||||
{
|
{
|
||||||
throw Oops.Bah("未找到机台");
|
throw Oops.Bah("未找到机台");
|
||||||
@@ -299,6 +309,7 @@ namespace Tnb.ProductionMgr
|
|||||||
PrdReport prdReport = await db.Queryable<PrdReport>()
|
PrdReport prdReport = await db.Queryable<PrdReport>()
|
||||||
.Where(x => x.equip_id == equipment.id && x.status == 0).OrderByDescending(x => x.create_time)
|
.Where(x => x.equip_id == equipment.id && x.status == 0).OrderByDescending(x => x.create_time)
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
|
string create_id = prdReport.create_id;
|
||||||
if (prdReport == null)
|
if (prdReport == null)
|
||||||
{
|
{
|
||||||
throw Oops.Bah("未找到提报记录");
|
throw Oops.Bah("未找到提报记录");
|
||||||
@@ -317,14 +328,14 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
||||||
bill_date = DateTime.Now,
|
bill_date = DateTime.Now,
|
||||||
create_id = _userManager.UserId,
|
create_id = create_id,
|
||||||
location_code = basLocation.location_code,
|
location_code = basLocation.location_code,
|
||||||
carry_code = prdReport.material_box_code,
|
carry_code = prdReport.material_box_code,
|
||||||
is_check = 1,
|
is_check = 1,
|
||||||
station_id = prdReport.station,
|
station_id = prdReport.station,
|
||||||
workline_id = workline?.Id ?? "",
|
workline_id = workline?.Id ?? "",
|
||||||
workshop_id = workshop?.Id ?? "",
|
workshop_id = workshop?.Id ?? "",
|
||||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
// org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||||
// warehouse_id = basLocation?.wh_id,
|
// warehouse_id = basLocation?.wh_id,
|
||||||
warehouse_id = warehouse_id,
|
warehouse_id = warehouse_id,
|
||||||
status = 0,
|
status = 0,
|
||||||
@@ -349,13 +360,13 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
instock = new MESWmsInstockHInput()
|
instock = new MESWmsInstockHInput()
|
||||||
{
|
{
|
||||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
// org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||||
bill_date = DateTime.Now,
|
bill_date = DateTime.Now,
|
||||||
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
||||||
// warehouse_id = basLocation?.wh_id,
|
// warehouse_id = basLocation?.wh_id,
|
||||||
warehouse_id = warehouse_id,
|
warehouse_id = warehouse_id,
|
||||||
source_id = prdInstockH.id,
|
source_id = prdInstockH.id,
|
||||||
create_id = _userManager.UserId,
|
create_id = create_id,
|
||||||
carry_code = prdReport.material_box_code,
|
carry_code = prdReport.material_box_code,
|
||||||
location_code = basLocation.location_code,
|
location_code = basLocation.location_code,
|
||||||
is_check = 1,
|
is_check = 1,
|
||||||
@@ -381,10 +392,11 @@ namespace Tnb.ProductionMgr
|
|||||||
code_batch = prdReport.barcode + "0001",
|
code_batch = prdReport.barcode + "0001",
|
||||||
codeqty = (int)prdReport.reported_qty,
|
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()
|
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);
|
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
||||||
Log.Information(sendResult);
|
Log.Information(sendResult);
|
||||||
@@ -488,7 +500,8 @@ namespace Tnb.ProductionMgr
|
|||||||
code_batch = prdReport.barcode + "0001",
|
code_batch = prdReport.barcode + "0001",
|
||||||
codeqty = (int)prdReport.reported_qty,
|
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()
|
Dictionary<string, object> header = new()
|
||||||
{
|
{
|
||||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||||
@@ -598,7 +611,8 @@ namespace Tnb.ProductionMgr
|
|||||||
code_batch = prdReport.barcode + "0001",
|
code_batch = prdReport.barcode + "0001",
|
||||||
codeqty = (int)prdReport.reported_qty,
|
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()
|
Dictionary<string, object> header = new()
|
||||||
{
|
{
|
||||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
["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()
|
Dictionary<string, object> header = new()
|
||||||
{
|
{
|
||||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
public Task StartAsync(CancellationToken cancellationToken)
|
public Task StartAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromMinutes(5));
|
Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(60));
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
public Task StopAsync(CancellationToken cancellationToken)
|
public Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using JNPF.EventBus;
|
|||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.BasicData.Entities;
|
using Tnb.BasicData.Entities;
|
||||||
@@ -267,6 +268,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
public async Task<dynamic> MESCreateInstock(MESCreateInstockInput input)
|
public async Task<dynamic> MESCreateInstock(MESCreateInstockInput input)
|
||||||
{
|
{
|
||||||
bool isSuccessFul = false;
|
bool isSuccessFul = false;
|
||||||
@@ -498,6 +500,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
public async Task<dynamic> MesFetchInOutStockInfoByBarCode(MaterialLabelQuery input)
|
public async Task<dynamic> MesFetchInOutStockInfoByBarCode(MaterialLabelQuery input)
|
||||||
{
|
{
|
||||||
if (input.IsNull())
|
if (input.IsNull())
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using JNPF.VisualDev;
|
|||||||
using JNPF.VisualDev.Entitys;
|
using JNPF.VisualDev.Entitys;
|
||||||
using JNPF.VisualDev.Interfaces;
|
using JNPF.VisualDev.Interfaces;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
@@ -551,6 +552,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
//[NonUnify]
|
//[NonUnify]
|
||||||
|
[AllowAnonymous]
|
||||||
public async Task<dynamic> MESCreateOutstock(MESCreateOutstockInput input)
|
public async Task<dynamic> MESCreateOutstock(MESCreateOutstockInput input)
|
||||||
{
|
{
|
||||||
bool isSuccessful = true;
|
bool isSuccessful = true;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.BasicData.Entities;
|
using Tnb.BasicData.Entities;
|
||||||
@@ -114,6 +115,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
public async Task<dynamic> MESCarrySign(MESCarrySignInput input)
|
public async Task<dynamic> MESCarrySign(MESCarrySignInput input)
|
||||||
{
|
{
|
||||||
if (input.IsNull())
|
if (input.IsNull())
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using JNPF.LinqBuilder;
|
|||||||
using JNPF.Logging;
|
using JNPF.Logging;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.BasicData.Entities;
|
using Tnb.BasicData.Entities;
|
||||||
@@ -391,6 +392,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
public async Task<dynamic> MESKittingOutStk(List<MESKittingOutStkInput> input)
|
public async Task<dynamic> MESKittingOutStk(List<MESKittingOutStkInput> input)
|
||||||
{
|
{
|
||||||
bool isSuccessFul = false;
|
bool isSuccessFul = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user