Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -79,10 +79,10 @@ namespace Tnb.WarehouseMgr
|
||||
JArray jArr = null;
|
||||
if (input.data.ContainsKey("tablefield115"))
|
||||
{
|
||||
jArr = JArray.Parse(input.data["tablefield115"].ToString());
|
||||
jArr = JArray.Parse(input.data["tablefield115"].ToString()!);
|
||||
}
|
||||
//入库取终点 //出库起点
|
||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString()!, Size = 1 };
|
||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||
WmsPointH sPoint = null;
|
||||
WmsPointH ePoint = null;
|
||||
@@ -109,19 +109,19 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
WmsPretaskH preTask = new();
|
||||
preTask.org_id = _userManager.User.OrganizeId;
|
||||
preTask.startlocation_id = sPoint?.location_id;
|
||||
preTask.startlocation_code = sPoint?.location_code;
|
||||
preTask.endlocation_id = ePoint?.location_id;
|
||||
preTask.endlocation_code = ePoint?.location_code;
|
||||
preTask.startlocation_id = sPoint?.location_id!;
|
||||
preTask.startlocation_code = sPoint?.location_code!;
|
||||
preTask.endlocation_id = ePoint?.location_id!;
|
||||
preTask.endlocation_code = ePoint?.location_code!;
|
||||
preTask.start_floor = sPoint?.floor.ToString();
|
||||
preTask.end_floor = ePoint?.floor.ToString();
|
||||
preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult();
|
||||
preTask.status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID;
|
||||
preTask.biz_type = input.data[nameof(WmsPretaskH.biz_type)]?.ToString();
|
||||
preTask.biz_type = input.data[nameof(WmsPretaskH.biz_type)]?.ToString()!;
|
||||
preTask.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
|
||||
preTask.carry_id = input.data[nameof(preTask.carry_id)]?.ToString()!;
|
||||
preTask.carry_code = input.data[nameof(preTask.carry_code)]?.ToString()!;
|
||||
preTask.area_id = sPoint?.area_id;
|
||||
preTask.area_id = sPoint?.area_id!;
|
||||
preTask.area_code = it.Key;
|
||||
preTask.require_id = input.data[nameof(WmsHandleH.require_id)].ToString();
|
||||
preTask.require_code = input.data[nameof(WmsHandleH.require_code)]?.ToString()!;
|
||||
@@ -140,11 +140,11 @@ namespace Tnb.WarehouseMgr
|
||||
var ptc = pt.Adapt<WmsPretaskCode>();
|
||||
ptc.id = SnowflakeIdHelper.NextId();
|
||||
ptc.bill_id = pt.id;
|
||||
ptc.material_id = jo.Value<string>(nameof(WmsPretaskCode.material_id));
|
||||
ptc.material_code = jo.Value<string>(nameof(WmsPretaskCode.material_code));
|
||||
ptc.barcode = jo.Value<string>(nameof(WmsPretaskCode.barcode));
|
||||
ptc.material_id = jo.Value<string>(nameof(WmsPretaskCode.material_id))!;
|
||||
ptc.material_code = jo.Value<string>(nameof(WmsPretaskCode.material_code))!;
|
||||
ptc.barcode = jo.Value<string>(nameof(WmsPretaskCode.barcode))!;
|
||||
ptc.codeqty = jo.Value<int>(nameof(WmsPretaskCode.codeqty));
|
||||
ptc.unit_id = jo.Value<string>(nameof(WmsPretaskCode.unit_id));
|
||||
ptc.unit_id = jo.Value<string>(nameof(WmsPretaskCode.unit_id))!;
|
||||
ptc.code_batch = jo.Value<string>(nameof(WmsPretaskCode.code_batch));
|
||||
pretaskCodes.Add(ptc);
|
||||
}
|
||||
@@ -158,11 +158,11 @@ namespace Tnb.WarehouseMgr
|
||||
var requireIdField = "require_id";
|
||||
|
||||
var preTaskUpInput = new GenPreTaskUpInput();
|
||||
preTaskUpInput.RquireId = input.data[nameof(WmsHandleH.require_id)].ToString();
|
||||
preTaskUpInput.RquireId = input.data[nameof(WmsHandleH.require_id)].ToString()!;
|
||||
preTaskUpInput.CarryId = input.data[nameof(WmsCarryD.carry_id)]?.ToString()!;
|
||||
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault().location_id;
|
||||
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault().location_code;
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
|
||||
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()!.location_id!;
|
||||
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()!.location_code!;
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList()!;
|
||||
if (input.data.ContainsKey(requireIdField) && input.data[requireIdField].IsNotEmptyOrNull())
|
||||
{
|
||||
//创建预任务操作记录
|
||||
@@ -172,9 +172,9 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
var handleH = instockH.Adapt<WmsHandleH>();
|
||||
operBillId = handleH.id = SnowflakeIdHelper.NextId();
|
||||
handleH.startlocation_id = input.data[nameof(WmsHandleH.startlocation_id)]?.ToString();
|
||||
handleH.carry_id = input.data[nameof(WmsHandleH.carry_id)]?.ToString();
|
||||
handleH.carry_code = input.data[nameof(WmsHandleH.carry_code)]?.ToString();
|
||||
handleH.startlocation_id = input.data[nameof(WmsHandleH.startlocation_id)]?.ToString()!;
|
||||
handleH.carry_id = input.data[nameof(WmsHandleH.carry_id)]?.ToString()!;
|
||||
handleH.carry_code = input.data[nameof(WmsHandleH.carry_code)]?.ToString()!;
|
||||
preTaskUpInput.PreTaskRecord = handleH;
|
||||
}
|
||||
//创建预任务条码操作记录
|
||||
@@ -187,7 +187,7 @@ namespace Tnb.WarehouseMgr
|
||||
WmsHandleCode handleCode = new();
|
||||
handleCode.org_id = _userManager.User.OrganizeId;
|
||||
handleCode.bill_id = operBillId;
|
||||
handleCode.material_id = materialId;
|
||||
handleCode.material_id = materialId!;
|
||||
handleCode.material_code = jo.Value<string>(nameof(WmsHandleCode.material_code))!;
|
||||
handleCode.barcode = jo.Value<string>(nameof(WmsHandleCode.barcode))!;
|
||||
handleCode.code_batch = jo.Value<string>(nameof(WmsHandleCode.code_batch));
|
||||
|
||||
@@ -998,6 +998,7 @@ public class RunService : IRunService, ITransient
|
||||
if (childTable != null)
|
||||
{
|
||||
if (!model.Any(x => x.ContainsKey("id"))) mainSql.Add(string.Format("delete from {0} where {1}='{2}';", childTable?.table, childTable.tableField, id));
|
||||
else mainSql.Add(string.Format("delete from {0} where {1} not in ('{2}') and {3}='{4}';", childTable?.table, childTable.fields.First(x => x.PrimaryKey.Equals(1)).Field, string.Join("','", model.Where(x => x.ContainsKey("id")).Select(x => x["id"]).ToList()), childTable.tableField, id));
|
||||
tableList = new List<DbTableFieldModel>();
|
||||
tableList = _databaseService.GetFieldList(link, childTable?.table);
|
||||
DbTableFieldModel? childPrimary = tableList.Find(t => t.primaryKey);
|
||||
|
||||
Reference in New Issue
Block a user