报表调整 灭菌转库调整
This commit is contained in:
@@ -107,7 +107,7 @@ public partial class WmsPurchaseQcrecord : BaseEntity<string>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string? material_specification { get; set; }
|
||||
public string? container_no { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace Tnb.WarehouseMgr
|
||||
is_lock = 0,
|
||||
is_end = 0,
|
||||
require_id = WmsOutsourceD.id,
|
||||
require_code = WmsOutsourceH.outsource_order,
|
||||
require_code = WmsOutsourceH.bill_code,
|
||||
create_id = _userManager.UserId,
|
||||
create_time = DateTime.Now,
|
||||
required_type = WmsWareHouseConst.BILLTYPE_OUTSOURCE_ID,
|
||||
|
||||
@@ -430,7 +430,7 @@ namespace Tnb.WarehouseMgr
|
||||
case WmsWareHouseConst.BILLTYPE_OUTSOURCE_ID:
|
||||
{
|
||||
bill_type = WmsWareHouseConst.BILLTYPE_OUTSOURCEINSTOCK_ID;
|
||||
source_main_id = (await _dbScanInStockByRedis.Queryable<WmsOutsourceD>().FirstAsync(it => it.id == source_id)).erp_outsource_order_d_pk;
|
||||
source_main_id = (await _dbScanInStockByRedis.Queryable<WmsOutsourceD>().FirstAsync(it => it.id == source_id)).fk_wms_outsource_order_id;
|
||||
break;
|
||||
}
|
||||
case WmsWareHouseConst.BILLTYPE_RAWMATTRANSFERINSTOCK_ID:
|
||||
|
||||
@@ -91,9 +91,9 @@ namespace Tnb.WarehouseMgr
|
||||
var _start_time = time.Count > 0 ? (long)time[0] : 0;
|
||||
var _end_time = time.Count > 1 ? (long)time[1] : 0;
|
||||
|
||||
DateTimeOffset _start_timeofs = DateTimeOffset.FromUnixTimeSeconds((long)_start_time);
|
||||
DateTimeOffset _start_timeofs = DateTimeOffset.FromUnixTimeMilliseconds((long)_start_time);
|
||||
DateTime start_time = _start_timeofs.DateTime;
|
||||
DateTimeOffset _end_timeofs = DateTimeOffset.FromUnixTimeSeconds((long)_end_time);
|
||||
DateTimeOffset _end_timeofs = DateTimeOffset.FromUnixTimeMilliseconds((long)_end_time);
|
||||
DateTime end_time = _end_timeofs.DateTime;
|
||||
|
||||
var data = await _db.Queryable<WmsPurchaseQcrecord>()
|
||||
@@ -112,7 +112,8 @@ namespace Tnb.WarehouseMgr
|
||||
material_id = a.material_id,
|
||||
material_code = a.material_code,
|
||||
material_name = a.material_name,
|
||||
material_specification = b.material_specification,
|
||||
container_no = b.material_standard,
|
||||
material_spec = b.material_specification,
|
||||
unit_id = c.FullName,
|
||||
purchase_qty = a.purchase_qty,
|
||||
purchase_prqty = a.purchase_prqty,
|
||||
|
||||
Reference in New Issue
Block a user