Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -119,5 +119,6 @@ namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
|
|||||||
/// 辅助属性
|
/// 辅助属性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string auxprop_xph { get; set; }
|
public string auxprop_xph { get; set; }
|
||||||
|
public string udi_code { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,5 +135,6 @@ public partial class WmsTransferInstockD : BaseEntity<string>
|
|||||||
/// 辅助属性 小批号
|
/// 辅助属性 小批号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string auxprop_xph { get; set; }
|
public string auxprop_xph { get; set; }
|
||||||
|
public string udi_code { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1808,7 +1808,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到!", 500);
|
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到!", 500);
|
||||||
}
|
}
|
||||||
wmsTransferInstockD.auxprop_xph = detail.auxprop_xph;
|
wmsTransferInstockD.auxprop_xph = detail.auxprop_xph;
|
||||||
|
wmsTransferInstockD.udi_code = detail.udi_code;
|
||||||
|
|
||||||
wmsTransferInstockDs.Add(wmsTransferInstockD);
|
wmsTransferInstockDs.Add(wmsTransferInstockD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1175,6 +1175,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
getdic.Add("ZZ-01-02", new string[] { "外包装箱码垛线", "WBZX_x1_take_mtp", "true" });
|
getdic.Add("ZZ-01-02", new string[] { "外包装箱码垛线", "WBZX_x1_take_mtp", "true" });
|
||||||
getdic.Add("ZZ-02-02", new string[] { "外包装箱码垛线", "WBZX_x2_take_mtp", "true" });
|
getdic.Add("ZZ-02-02", new string[] { "外包装箱码垛线", "WBZX_x2_take_mtp", "true" });
|
||||||
|
|
||||||
|
getdic.Add("ZZ-01-01", new string[] { "外包装箱码垛线", "WBZX_x1_put_mtp", "true" });
|
||||||
|
getdic.Add("ZZ-02-01", new string[] { "外包装箱码垛线", "WBZX_x2_put_mtp", "true" });
|
||||||
|
|
||||||
|
|
||||||
getdic.Add("ZSSSXCTU02", new string[] { "YTCS", "右输送线上层允许出箱3", "true" });
|
getdic.Add("ZSSSXCTU02", new string[] { "YTCS", "右输送线上层允许出箱3", "true" });
|
||||||
getdic.Add("ZSSSXCTU01", new string[] { "YTCS", "左输送线上层允许出箱1", "true" });
|
getdic.Add("ZSSSXCTU01", new string[] { "YTCS", "左输送线上层允许出箱1", "true" });
|
||||||
@@ -3159,17 +3162,19 @@ namespace Tnb.WarehouseMgr
|
|||||||
carry.carrystd_id == WmsWareHouseConst.CARRY_ZYLJSTD_ID)
|
carry.carrystd_id == WmsWareHouseConst.CARRY_ZYLJSTD_ID)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID)
|
||||||
{
|
{
|
||||||
memberCarryIds = await db.Queryable<WmsCarryD>().Where(x=>x.carry_id==carry.id).Select(x=>x.membercarry_id).ToListAsync();
|
memberCarryIds = await db.Queryable<WmsCarryD>().Where(x=>x.carry_id==carry.id).Select(x=>x.membercarry_id).ToListAsync();
|
||||||
clearCarryIds.AddRange(memberCarryIds);
|
clearCarryIds.AddRange(memberCarryIds);
|
||||||
|
|
||||||
|
await db.Updateable<WmsCarryH>()
|
||||||
|
.SetColumns(x => x.carry_status == carryStatus)
|
||||||
|
.SetColumns(x => x.is_check == isCheck)
|
||||||
|
.Where(x => clearCarryIds.Contains(x.id))
|
||||||
|
.ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
await db.Updateable<WmsCarryH>()
|
|
||||||
.SetColumns(x => x.carry_status == carryStatus)
|
|
||||||
.SetColumns(x => x.is_check == isCheck)
|
|
||||||
.Where(x => clearCarryIds.Contains(x.id))
|
|
||||||
.ExecuteCommandAsync();
|
|
||||||
}
|
}
|
||||||
else if (dt.biz_type == "erp_qtrk")
|
else if (dt.biz_type == "erp_qtrk")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
if (wmsCarryH.carry_status != "1")
|
if (wmsCarryH.carry_status != "1")
|
||||||
{
|
{
|
||||||
throw new AppFriendlyException($"【ArtificialInstock】载具{input.carry_code}未绑定物料", 500);
|
throw new AppFriendlyException($"【ArtificialInstock】载具{input.carry_code}未绑定物料,托盘状态不是占用状态", 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
BasLocation carryLoc = await _db.Queryable<BasLocation>().Where(r => r.id == wmsCarryH.location_id).FirstAsync();
|
BasLocation carryLoc = await _db.Queryable<BasLocation>().Where(r => r.id == wmsCarryH.location_id).FirstAsync();
|
||||||
|
|||||||
@@ -667,7 +667,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
.InnerJoin<WmsMaterialTransferD>((a, b, c) => b.source_detail_id == c.id)
|
.InnerJoin<WmsMaterialTransferD>((a, b, c) => b.source_detail_id == c.id)
|
||||||
.InnerJoin<OtherOutstockD>((a, b, c, d) => b.id == d.fk_id)
|
.InnerJoin<OtherOutstockD>((a, b, c, d) => b.id == d.fk_id)
|
||||||
.WhereIF(!string.IsNullOrEmpty(input.warehouse_outstock), (a, b, c) => a.warehouse_outstock == input.warehouse_outstock)
|
.WhereIF(!string.IsNullOrEmpty(input.warehouse_outstock), (a, b, c) => a.warehouse_outstock == input.warehouse_outstock)
|
||||||
.WhereIF(!string.IsNullOrEmpty(input.warehouse_instock), (a, b, c) => a.warehouse_instock == input.warehouse_instock)
|
.WhereIF(!string.IsNullOrEmpty(input.warehouse_instock) && input.warehouse_instock != WmsWareHouseConst.WAREHOUSE_ZZXBK_ID, (a, b, c) => a.warehouse_instock == input.warehouse_instock)
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(input.warehouse_instock) && input.warehouse_instock == WmsWareHouseConst.WAREHOUSE_ZZXBK_ID, (a, b, c) => a.type == WmsWareHouseConst.MATERIALTRANSFER_CROSSLAYER_CODE)
|
||||||
.Where((a, b, c, d) => d.rk_qty < d.actual_outstock_qty)
|
.Where((a, b, c, d) => d.rk_qty < d.actual_outstock_qty)
|
||||||
.OrderBy((a, b, c, d) => b.create_time)
|
.OrderBy((a, b, c, d) => b.create_time)
|
||||||
.Select((a, b, c, d) => new
|
.Select((a, b, c, d) => new
|
||||||
@@ -2876,7 +2877,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
carryMaterialDetails.Add(carryMaterialDetail);
|
carryMaterialDetails.Add(carryMaterialDetail);
|
||||||
carryMaterialBindInput.details = carryMaterialDetails;
|
carryMaterialBindInput.details = carryMaterialDetails;
|
||||||
await _wmsCarryBindService.CarryMaterialBind(carryMaterialBindInput, _db);
|
await _wmsCarryBindService.CarryMaterialBind(carryMaterialBindInput, _db);
|
||||||
await _db.Updateable<WmsCarryH>().SetColumns(r => r.carry_status == "3").Where(r => r.id == wmsCarryH.id).ExecuteCommandAsync();
|
await _db.Updateable<WmsCarryH>().SetColumns(r => new WmsCarryH { carry_status = "3", work_station = wmsMaterialTransferD.station_code }).Where(r => r.id == wmsCarryH.id).ExecuteCommandAsync();
|
||||||
|
|
||||||
// 更新子表已下发数量
|
// 更新子表已下发数量
|
||||||
await _db.Updateable<WmsMaterialTransferD>().SetColumns(r => r.yxfqty_rk == r.yxfqty_rk + input.qty).Where(r => r.id == materialtransferdid).ExecuteCommandAsync();
|
await _db.Updateable<WmsMaterialTransferD>().SetColumns(r => r.yxfqty_rk == r.yxfqty_rk + input.qty).Where(r => r.id == materialtransferdid).ExecuteCommandAsync();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.CodeAnalysis;
|
using Microsoft.CodeAnalysis;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using NPOI.HSSF.Record;
|
using NPOI.HSSF.Record;
|
||||||
using NPOI.SS.Formula;
|
using NPOI.SS.Formula;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
@@ -500,11 +501,24 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
throw new AppFriendlyException($"转移托盘{new_wmsCarryH.carry_code}不存在!", 500);
|
throw new AppFriendlyException($"转移托盘{new_wmsCarryH.carry_code}不存在!", 500);
|
||||||
}
|
}
|
||||||
|
await _db.Updateable<BasLocation>().SetColumns(r => new BasLocation
|
||||||
|
{
|
||||||
|
is_lock = 0,
|
||||||
|
is_use = "0"
|
||||||
|
}).Where(r => r.id == new_wmsCarryH.location_id).ExecuteCommandAsync();
|
||||||
|
Logger.Information($"托盘{input.new_carrycode} 原先的库位{new_wmsCarryH.location_code} 状态设置为未锁定 、空闲");
|
||||||
|
|
||||||
|
if (new_wmsCarryH.carry_status != "0")
|
||||||
|
{
|
||||||
|
throw new AppFriendlyException($"转移托盘{new_wmsCarryH.carry_code}上的状态不为空闲,不能转移!", 500);
|
||||||
|
}
|
||||||
new_wmsCarryH.is_lock = 0;
|
new_wmsCarryH.is_lock = 0;
|
||||||
new_wmsCarryH.carry_status = "1";
|
new_wmsCarryH.carry_status = "1";
|
||||||
new_wmsCarryH.location_id = wmsCarryH.location_id;
|
new_wmsCarryH.location_id = wmsCarryH.location_id;
|
||||||
new_wmsCarryH.location_code = wmsCarryH.location_code;
|
new_wmsCarryH.location_code = wmsCarryH.location_code;
|
||||||
|
|
||||||
|
wmsCarryH.is_lock = 0;
|
||||||
|
wmsCarryH.carry_status = "0";
|
||||||
wmsCarryH.location_id = "";
|
wmsCarryH.location_id = "";
|
||||||
wmsCarryH.location_code = "";
|
wmsCarryH.location_code = "";
|
||||||
List<WmsCarryCode> new_wmsCarryCodes = await _db.Queryable<WmsCarryCode>().Where(r => r.carry_id == new_wmsCarryH.id).ToListAsync();
|
List<WmsCarryCode> new_wmsCarryCodes = await _db.Queryable<WmsCarryCode>().Where(r => r.carry_id == new_wmsCarryH.id).ToListAsync();
|
||||||
@@ -516,10 +530,14 @@ namespace Tnb.WarehouseMgr
|
|||||||
WmsCarryCode new_wmsCarryCode = wmsCarryCode.Adapt<WmsCarryCode>();
|
WmsCarryCode new_wmsCarryCode = wmsCarryCode.Adapt<WmsCarryCode>();
|
||||||
if (new_wmsCarryCodes.Count > 0)
|
if (new_wmsCarryCodes.Count > 0)
|
||||||
{
|
{
|
||||||
if (new_wmsCarryCodes[0].material_id != wmsCarryCode.material_id || new_wmsCarryCodes[0].code_batch != wmsCarryCode.code_batch)
|
if (new_wmsCarryCodes.Count > 0)
|
||||||
{
|
{
|
||||||
throw new AppFriendlyException($"转移托盘{new_wmsCarryH.carry_code}上的物料批次数据与分拣托盘上的物料批次数据不一致,不能转移!", 500);
|
throw new AppFriendlyException($"转移托盘{new_wmsCarryH.carry_code}已存在条码,不能转移!", 500);
|
||||||
}
|
}
|
||||||
|
//if (new_wmsCarryCodes[0].material_id != wmsCarryCode.material_id || new_wmsCarryCodes[0].code_batch != wmsCarryCode.code_batch)
|
||||||
|
//{
|
||||||
|
// throw new AppFriendlyException($"转移托盘{new_wmsCarryH.carry_code}上的物料批次数据与分拣托盘上的物料批次数据不一致,不能转移!", 500);
|
||||||
|
//}
|
||||||
new_wmsCarryCode = new_wmsCarryCodes[0];
|
new_wmsCarryCode = new_wmsCarryCodes[0];
|
||||||
new_wmsCarryCode.codeqty = wmsCarryCode.codeqty - wmsSortingtask.qty + new_wmsCarryCodes[0].codeqty;
|
new_wmsCarryCode.codeqty = wmsCarryCode.codeqty - wmsSortingtask.qty + new_wmsCarryCodes[0].codeqty;
|
||||||
await _db.Updateable(new_wmsCarryCode).UpdateColumns(r => new { r.codeqty }).ExecuteCommandAsync();
|
await _db.Updateable(new_wmsCarryCode).UpdateColumns(r => new { r.codeqty }).ExecuteCommandAsync();
|
||||||
@@ -530,12 +548,24 @@ namespace Tnb.WarehouseMgr
|
|||||||
new_wmsCarryCode.carry_id = new_wmsCarryH.id;
|
new_wmsCarryCode.carry_id = new_wmsCarryH.id;
|
||||||
new_wmsCarryCode.barcode = new_wmsCarryH.carry_code;
|
new_wmsCarryCode.barcode = new_wmsCarryH.carry_code;
|
||||||
new_wmsCarryCode.codeqty = wmsCarryCode.codeqty - wmsSortingtask.qty;
|
new_wmsCarryCode.codeqty = wmsCarryCode.codeqty - wmsSortingtask.qty;
|
||||||
await _db.Insertable(new_wmsCarryCode).ExecuteCommandAsync();
|
if (new_wmsCarryCode.codeqty > 0)
|
||||||
|
{
|
||||||
|
Logger.Information($"托盘{new_wmsCarryH.carry_code} 新增条码数据{JsonConvert.SerializeObject(new_wmsCarryCode)}");
|
||||||
|
await _db.Insertable(new_wmsCarryCode).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.Information($"托盘{new_wmsCarryH.carry_code} 分拣数量{wmsSortingtask.qty}与条码数量{wmsCarryCode.codeqty}相同 无需新增新托盘的条码数据");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _db.Updateable<WmsCarryCode>().SetColumns(r => r.codeqty == wmsSortingtask.qty).Where(r => r.carry_id == wmsSortingtask.carry_id).ExecuteCommandAsync();
|
//await _db.Updateable<WmsCarryCode>().SetColumns(r => r.codeqty == wmsSortingtask.qty).Where(r => r.carry_id == wmsSortingtask.carry_id).ExecuteCommandAsync();
|
||||||
await _db.Updateable(new_wmsCarryH).UpdateColumns(r => new { r.is_lock, r.carry_status, r.location_id, r.location_code }).ExecuteCommandAsync();
|
await _db.Updateable(new_wmsCarryH).UpdateColumns(r => new { r.is_lock, r.carry_status, r.location_id, r.location_code }).ExecuteCommandAsync();
|
||||||
await _db.Updateable(wmsCarryH).UpdateColumns(r => new { r.location_id, r.location_code }).ExecuteCommandAsync();
|
await _db.Updateable(wmsCarryH).UpdateColumns(r => new { r.is_lock, r.carry_status, r.location_id, r.location_code }).ExecuteCommandAsync();
|
||||||
|
await _db.Deleteable<WmsCarryCode>().Where(r => r.carry_id == wmsSortingtask.carry_id).ExecuteCommandAsync();
|
||||||
|
Logger.Information($"新托盘{new_wmsCarryH.carry_code} 更新数据: 锁定状态{new_wmsCarryH.is_lock} 占用状态{new_wmsCarryH.carry_status} 库位id{new_wmsCarryH.location_id} 库位编码{new_wmsCarryH.location_code}");
|
||||||
|
Logger.Information($"老托盘{wmsCarryH.carry_code} 更新数据为 锁定状态{wmsCarryH.is_lock} 占用状态{wmsCarryH.carry_status} 库位id{wmsCarryH.location_id} 库位编码{wmsCarryH.location_code} ");
|
||||||
|
Logger.Information($"老托盘{wmsSortingtask.carry_code} 在转移新托盘时清除条码数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _db.Updateable<WmsSortingtask>().SetColumns(r => new WmsSortingtask
|
await _db.Updateable<WmsSortingtask>().SetColumns(r => new WmsSortingtask
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"AgvRequestUrls": {
|
"AgvRequestUrls": {
|
||||||
"CreateTaskChainUrl": "http://10.147.19.104:5013/api/task-chain/create",
|
"CreateTaskChainUrl": "http://192.168.11.104:1880/api/task-chain/create",
|
||||||
"CancelTaskChainUrl": "http://192.168.11.104:1880/api/task-chain/cancel",
|
"CancelTaskChainUrl": "http://192.168.11.104:1880/api/task-chain/cancel",
|
||||||
"thirdFloorUrl": "http://192.168.11.104:1880/api/lift/thirdFloor"
|
"thirdFloorUrl": "http://192.168.11.104:1880/api/lift/thirdFloor"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user