解决代码冲突
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"]
|
||||||
@@ -264,22 +265,31 @@ namespace Tnb.ProductionMgr
|
|||||||
string equip_code = input.equip_code;
|
string equip_code = input.equip_code;
|
||||||
string label_code = input.label_code;
|
string label_code = input.label_code;
|
||||||
string warehouse_id = "2";
|
string warehouse_id = "2";
|
||||||
if (!string.IsNullOrEmpty(equip_code))
|
if (string.IsNullOrEmpty(equip_code))
|
||||||
{
|
{
|
||||||
throw Oops.Bah("请传机台号");
|
throw Oops.Bah("请传机台号");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(label_code))
|
if (string.IsNullOrEmpty(label_code))
|
||||||
{
|
{
|
||||||
throw Oops.Bah("请传标签号");
|
throw Oops.Bah("请传标签号");
|
||||||
}
|
}
|
||||||
|
|
||||||
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,9 @@ 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;
|
||||||
|
UserEntity user = await db.Queryable<UserEntity>().SingleAsync(x => x.Id == create_id);
|
||||||
|
string org_id = user.OrganizeId;
|
||||||
if (prdReport == null)
|
if (prdReport == null)
|
||||||
{
|
{
|
||||||
throw Oops.Bah("未找到提报记录");
|
throw Oops.Bah("未找到提报记录");
|
||||||
@@ -317,14 +330,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 = org_id,
|
||||||
// warehouse_id = basLocation?.wh_id,
|
// warehouse_id = basLocation?.wh_id,
|
||||||
warehouse_id = warehouse_id,
|
warehouse_id = warehouse_id,
|
||||||
status = 0,
|
status = 0,
|
||||||
@@ -338,7 +351,7 @@ namespace Tnb.ProductionMgr
|
|||||||
material_code = basMaterial.code,
|
material_code = basMaterial.code,
|
||||||
unit_id = prdReport.unit_id,
|
unit_id = prdReport.unit_id,
|
||||||
barcode = prdReport.barcode,
|
barcode = prdReport.barcode,
|
||||||
code_batch = prdReport.barcode + "0001",
|
code_batch = prdReport.mo_task_code,
|
||||||
quantity = (int)prdReport.reported_qty,
|
quantity = (int)prdReport.reported_qty,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -349,13 +362,13 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
instock = new MESWmsInstockHInput()
|
instock = new MESWmsInstockHInput()
|
||||||
{
|
{
|
||||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
org_id = org_id,
|
||||||
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,
|
||||||
@@ -368,7 +381,7 @@ namespace Tnb.ProductionMgr
|
|||||||
material_id = prdReport.material_id,
|
material_id = prdReport.material_id,
|
||||||
material_code = basMaterial.code,
|
material_code = basMaterial.code,
|
||||||
unit_id = prdReport.unit_id,
|
unit_id = prdReport.unit_id,
|
||||||
code_batch = prdReport.barcode,
|
code_batch = prdReport.mo_task_code,
|
||||||
pr_qty = (int)prdReport.reported_qty,
|
pr_qty = (int)prdReport.reported_qty,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -378,18 +391,20 @@ namespace Tnb.ProductionMgr
|
|||||||
material_code = basMaterial.code,
|
material_code = basMaterial.code,
|
||||||
unit_id = prdReport.unit_id,
|
unit_id = prdReport.unit_id,
|
||||||
barcode = prdReport.barcode,
|
barcode = prdReport.barcode,
|
||||||
code_batch = prdReport.barcode + "0001",
|
code_batch = prdReport.mo_task_code,
|
||||||
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://localhost:9232";
|
||||||
|
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);
|
||||||
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
||||||
result2 = authResponse.code != 200 || !authResponse.data.ObjToBool()
|
result2 = authResponse.code != 200 || !(bool)authResponse.data
|
||||||
? throw Oops.Bah(authResponse.msg)
|
? throw Oops.Bah(authResponse.msg)
|
||||||
: await db.Ado.UseTranAsync(async () =>
|
: await db.Ado.UseTranAsync(async () =>
|
||||||
{
|
{
|
||||||
@@ -488,7 +503,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 +614,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 +799,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"]
|
||||||
|
|||||||
@@ -1500,10 +1500,12 @@ namespace Tnb.ProductionMgr
|
|||||||
report = input.Adapt<PrdReport>();
|
report = input.Adapt<PrdReport>();
|
||||||
report.id = SnowflakeIdHelper.NextId();
|
report.id = SnowflakeIdHelper.NextId();
|
||||||
report.reported_qty = input.reported_qty;
|
report.reported_qty = input.reported_qty;
|
||||||
|
report.material_box_code = input.material_box_qrcode;
|
||||||
report.create_id = _userManager.UserId;
|
report.create_id = _userManager.UserId;
|
||||||
report.create_time = DateTime.Now;
|
report.create_time = DateTime.Now;
|
||||||
// report.batch = input.mo_task_code + DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
|
// report.batch = input.mo_task_code + DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
|
||||||
report.barcode = input.mo_task_code + DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
|
report.barcode = input.mo_task_code + DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
|
||||||
|
// report.barcode = input.mo_task_code+"0001";
|
||||||
report.equip_id = prdMoTask.eqp_id;
|
report.equip_id = prdMoTask.eqp_id;
|
||||||
report.mbom_process_id = prdMoTask.mbom_process_id;
|
report.mbom_process_id = prdMoTask.mbom_process_id;
|
||||||
report.station = input.station;
|
report.station = input.station;
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ namespace Tnb.ProductionMgr
|
|||||||
.LeftJoin<PrdMo>((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id)
|
.LeftJoin<PrdMo>((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id)
|
||||||
.LeftJoin<BasMaterialUnit>((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg")
|
.LeftJoin<BasMaterialUnit>((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg")
|
||||||
.LeftJoin<EqpDaq>((a, b, c, d, e, f, g, h, i, j, k, l) => a.eqp_id == l.equip_id && l.enabled == 1 && l.label_point == "提报装箱称重点位")
|
.LeftJoin<EqpDaq>((a, b, c, d, e, f, g, h, i, j, k, l) => a.eqp_id == l.equip_id && l.enabled == 1 && l.label_point == "提报装箱称重点位")
|
||||||
.Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode))
|
.Where((a, b) => a.workstation_id == input.stationId)
|
||||||
.WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code))
|
.WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code))
|
||||||
//.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status)
|
//.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status)
|
||||||
.WhereIF(statusList.Count > 0, a => statusList.Contains(a.mo_task_status))
|
.WhereIF(statusList.Count > 0, a => statusList.Contains(a.mo_task_status))
|
||||||
|
|||||||
@@ -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.FromSeconds(5));
|
Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(300));
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
public Task StopAsync(CancellationToken cancellationToken)
|
public Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
x.bill_code = $"{groupCode}-1";
|
x.bill_code = $"{groupCode}-1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((moveNum >= areaPreTasks.Count && areaPreTasks.Count > 1) || moveNum < areaPreTasks.Count)
|
else if ((moveNum >= areaPreTasks.Count && areaPreTasks.Count > 1) || moveNum <= areaPreTasks.Count)
|
||||||
{
|
{
|
||||||
string groupCode = await _billRullService.GetBillNumber(WmsWareHouseConst.WMS_TASK_EXECUTE_ENCODE);
|
string groupCode = await _billRullService.GetBillNumber(WmsWareHouseConst.WMS_TASK_EXECUTE_ENCODE);
|
||||||
items.ForEach(x => x.is_chain = 1);
|
items.ForEach(x => x.is_chain = 1);
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
endlocation_id = ePoint?.location_id!,
|
endlocation_id = ePoint?.location_id!,
|
||||||
endlocation_code = ePoint?.location_code!,
|
endlocation_code = ePoint?.location_code!,
|
||||||
startpoint_id = sPoint?.id!,
|
startpoint_id = sPoint?.id!,
|
||||||
|
startpoint_code = sPoint?.point_code!,
|
||||||
endpoint_id = ePoint?.id!,
|
endpoint_id = ePoint?.id!,
|
||||||
endpoint_code = ePoint?.point_code!,
|
endpoint_code = ePoint?.point_code!,
|
||||||
start_floor = sPoint?.floor.ToString(),
|
start_floor = sPoint?.floor.ToString(),
|
||||||
@@ -391,7 +392,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
var carryCodes = await _db.Queryable<BasLocation>().InnerJoin<WmsCarryCode>((a, b) => a.id == b.location_id)
|
var carryCodes = await _db.Queryable<BasLocation>().InnerJoin<WmsCarryCode>((a, b) => a.id == b.location_id)
|
||||||
.InnerJoin<WmsCarryH>((a, b, c) => b.carry_id == c.id)
|
.InnerJoin<WmsCarryH>((a, b, c) => b.carry_id == c.id)
|
||||||
.Where(filterExp)
|
.Where(filterExp)
|
||||||
.Select((a, b, c) => new WmsCarryCode { carry_code = c.carry_code }, true)
|
.Select<WmsCarryCode>()
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
List<WmsCheckstockD> outputs = carryCodes.GroupBy(g => new { g.material_code, g.code_batch, g.location_code, g.carry_id }).Select(x => new WmsCheckstockD
|
List<WmsCheckstockD> outputs = carryCodes.GroupBy(g => new { g.material_code, g.code_batch, g.location_code, g.carry_id }).Select(x => new WmsCheckstockD
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -308,8 +310,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
instock.location_id = loc.id;
|
instock.location_id = loc.id;
|
||||||
instock.biz_type = WmsWareHouseConst.BIZTYPE_WMSINSTOCK_ID;
|
instock.biz_type = WmsWareHouseConst.BIZTYPE_WMSINSTOCK_ID;
|
||||||
instock.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_INSTOCK_ENCODE).GetAwaiter().GetResult();
|
instock.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_INSTOCK_ENCODE).GetAwaiter().GetResult();
|
||||||
instock.generate_type = "1";// 自动
|
instock.generate_type = "0";// 人工
|
||||||
instock.sync_status = WmsWareHouseConst.SYNC_STATUS__NOTSYNC;//未同步
|
instock.sync_status = WmsWareHouseConst.SYNC_STATUS_NONEEDSYNC;//无需同步
|
||||||
instock.print_status = WmsWareHouseConst.PRINT_STATUS_PRINTCOMPLETE;//已打印
|
instock.print_status = WmsWareHouseConst.PRINT_STATUS_PRINTCOMPLETE;//已打印
|
||||||
instock.status = WmsWareHouseConst.BILLSTATUS_ADD_ID;// 新增
|
instock.status = WmsWareHouseConst.BILLSTATUS_ADD_ID;// 新增
|
||||||
instock.create_time = DateTime.Now;
|
instock.create_time = DateTime.Now;
|
||||||
@@ -347,7 +349,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
instockCOdes.Add(c);
|
instockCOdes.Add(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string orgId = _userManager.User.OrganizeId;
|
string orgId = _userManager.User?.OrganizeId ?? input.instock.org_id;
|
||||||
_ = await _db.Insertable(instockCOdes).CallEntityMethod(it => it.Create(orgId)).ExecuteCommandAsync();
|
_ = await _db.Insertable(instockCOdes).CallEntityMethod(it => it.Create(orgId)).ExecuteCommandAsync();
|
||||||
|
|
||||||
//生成预任务申请
|
//生成预任务申请
|
||||||
@@ -370,7 +372,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
WmsPretaskH preTask = new()
|
WmsPretaskH preTask = new()
|
||||||
{
|
{
|
||||||
org_id = _userManager.User.OrganizeId,
|
org_id = orgId,
|
||||||
startlocation_id = sPoint?.location_id ?? string.Empty,
|
startlocation_id = sPoint?.location_id ?? string.Empty,
|
||||||
startlocation_code = sPoint?.location_code ?? string.Empty,
|
startlocation_code = sPoint?.location_code ?? string.Empty,
|
||||||
endlocation_id = ePoint?.location_id ?? string.Empty,
|
endlocation_id = ePoint?.location_id ?? string.Empty,
|
||||||
@@ -387,7 +389,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
area_code = it.Key,
|
area_code = it.Key,
|
||||||
require_id = instock?.id ?? string.Empty,
|
require_id = instock?.id ?? string.Empty,
|
||||||
require_code = instock?.bill_code ?? string.Empty,
|
require_code = instock?.bill_code ?? string.Empty,
|
||||||
create_id = _userManager.UserId,
|
create_id = instock.create_id,
|
||||||
create_time = DateTime.Now
|
create_time = DateTime.Now
|
||||||
};
|
};
|
||||||
return preTask;
|
return preTask;
|
||||||
@@ -446,9 +448,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
WmsHandleCode handleCode = jo.Adapt<WmsHandleCode>();
|
WmsHandleCode handleCode = jo.Adapt<WmsHandleCode>();
|
||||||
handleCode.id = SnowflakeIdHelper.NextId();
|
handleCode.id = SnowflakeIdHelper.NextId();
|
||||||
handleCode.org_id = _userManager.User.OrganizeId;
|
handleCode.org_id = orgId;
|
||||||
handleCode.bill_id = operBillId;
|
handleCode.bill_id = operBillId;
|
||||||
handleCode.create_id = _userManager.UserId;
|
handleCode.create_id = instock.create_id;
|
||||||
handleCode.create_time = DateTime.Now;
|
handleCode.create_time = DateTime.Now;
|
||||||
preTaskUpInput.PreTaskHandleCodes.Add(handleCode);
|
preTaskUpInput.PreTaskHandleCodes.Add(handleCode);
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
@@ -574,8 +576,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
outstock.location_id = location.id;
|
outstock.location_id = location.id;
|
||||||
outstock.biz_type = WmsWareHouseConst.BIZTYPE_WMSOUTSTOCK_ID;
|
outstock.biz_type = WmsWareHouseConst.BIZTYPE_WMSOUTSTOCK_ID;
|
||||||
outstock.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_OUTSTOCK_ENCODE).GetAwaiter().GetResult();
|
outstock.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_OUTSTOCK_ENCODE).GetAwaiter().GetResult();
|
||||||
outstock.generate_type = "1";// 自动
|
outstock.generate_type = "0";// 自动
|
||||||
outstock.sync_status = WmsWareHouseConst.SYNC_STATUS__NOTSYNC;//未同步
|
outstock.sync_status = WmsWareHouseConst.SYNC_STATUS_NONEEDSYNC;//未同步
|
||||||
outstock.status = WmsWareHouseConst.BILLSTATUS_ADD_ID;// 新增
|
outstock.status = WmsWareHouseConst.BILLSTATUS_ADD_ID;// 新增
|
||||||
outstock.create_id = _userManager.UserId;
|
outstock.create_id = _userManager.UserId;
|
||||||
outstock.create_time = DateTime.Now;
|
outstock.create_time = DateTime.Now;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class Startup : AppStartup
|
|||||||
|
|
||||||
//定时任务
|
//定时任务
|
||||||
services.AddHostedService<TimedTaskBackgroundService>();
|
services.AddHostedService<TimedTaskBackgroundService>();
|
||||||
//services.AddHostedService<RedisBackGround>();
|
services.AddHostedService<RedisBackGround>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user