报表调整 灭菌转库调整

This commit is contained in:
2024-10-18 17:09:33 +08:00
parent f365035a89
commit 7865fd5c2d
6 changed files with 22 additions and 21 deletions

View File

@@ -550,16 +550,16 @@ namespace Tnb.WarehouseMgr
BasLocation startLocation = item.Item4;
WmsSterilizationInstockH wmsSterilizationInstockH = await _db.Queryable<WmsSterilizationInstockH>().Where(r => r.carry_id == wmsCarryH.id
&& r.status == WmsWareHouseConst.BILLSTATUS_ADD_ID && r.origin == "外协调拨入库").FirstAsync();
if (wmsSterilizationInstockH == null)
{
throw new Exception($"【四楼静置仓到成品库】载具{wmsCarryH.carry_code}没有找到新增状态且来源是外协调拨入库的灭菌入库记录!");
}
if (wmsCarryH.location_id != wmsSterilizationInstockH.location_id)
{
throw new Exception($"【四楼静置仓到成品库】载具{wmsCarryH.carry_code}实际位置与灭菌入库记录位置不一致");
}
//WmsSterilizationInstockH wmsSterilizationInstockH = await _db.Queryable<WmsSterilizationInstockH>().Where(r => r.carry_id == wmsCarryH.id
//&& r.status == WmsWareHouseConst.BILLSTATUS_ADD_ID && r.origin == "外协调拨入库").FirstAsync();
//if (wmsSterilizationInstockH == null)
//{
// throw new Exception($"【四楼静置仓到成品库】载具{wmsCarryH.carry_code}没有找到新增状态且来源是外协调拨入库的灭菌入库记录!");
//}
//if (wmsCarryH.location_id != wmsSterilizationInstockH.location_id)
//{
// throw new Exception($"【四楼静置仓到成品库】载具{wmsCarryH.carry_code}实际位置与灭菌入库记录位置不一致");
//}
BasLocation startlocation = await _db.Queryable<BasLocation>().Where(r => r.id == wmsCarryH.location_id).FirstAsync();
@@ -568,11 +568,11 @@ namespace Tnb.WarehouseMgr
throw new Exception($"【四楼静置仓到成品库】 起点库位{startlocation.location_code}已锁定");
}
wmsSterilizationInstockH.status = WmsWareHouseConst.BILLSTATUS_ON_ID;
wmsSterilizationInstockH.cp_location_id = endLocations[instockLocIndex].id;
wmsSterilizationInstockH.cp_location_code = endLocations[instockLocIndex].location_code;
//wmsSterilizationInstockH.status = WmsWareHouseConst.BILLSTATUS_ON_ID;
//wmsSterilizationInstockH.cp_location_id = endLocations[instockLocIndex].id;
//wmsSterilizationInstockH.cp_location_code = endLocations[instockLocIndex].location_code;
await _db.Updateable(wmsSterilizationInstockH).UpdateColumns(r => new { r.status, r.cp_location_id, r.cp_location_code }).ExecuteCommandAsync();
//await _db.Updateable(wmsSterilizationInstockH).UpdateColumns(r => new { r.status, r.cp_location_id, r.cp_location_code }).ExecuteCommandAsync();
// 转库单载具子表
WmsMaterialTransferCarry wmsMaterialTransferCarry = new WmsMaterialTransferCarry();