@@ -468,10 +468,8 @@ namespace Tnb.QcMgr
|
|||||||
//}, db);
|
//}, db);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//载具需要在中储仓和暂存仓才需要暂控
|
List<PrdReport> prdReports= await db.Queryable<PrdReport>().Where(x => x.mo_task_id == prdMoTask.id && x.create_time >= CheckTaskInput.startEndTime[0].TimeStampToDateTime() && x.create_time <= CheckTaskInput.startEndTime[1].TimeStampToDateTime()).ToListAsync();
|
||||||
List<PrdReport> prdReports = await db.Queryable<PrdReport>().LeftJoin<WmsCarryH>((a, b) => a.material_box_code == b.carry_code).LeftJoin<BasLocation>((a, b, c) => b.location_id == c.id).LeftJoin<BasWarehouse>((a, b, c, d) => c.wh_id == d.id).Where((a, b, c, d) => a.mo_task_id == prdMoTask.id && a.create_time >= CheckTaskInput.startEndTime[0].TimeStampToDateTime() && a.create_time <= CheckTaskInput.startEndTime[1].TimeStampToDateTime() && (c.wh_id == WmsWareHouseConst.WAREHOUSE_ZC_ID || c.wh_id == WmsWareHouseConst.WAREHOUSE_ZCC_ID)).ToListAsync();
|
//List<string> carryCodes = await db.Queryable<PrdReport>().Where(x => x.mo_task_id == prdMoTask.id && x.create_time >= CheckTaskInput.startEndTime[0].TimeStampToDateTime() && x.create_time <= CheckTaskInput.startEndTime[1].TimeStampToDateTime()).Select(x => x.material_box_code).Distinct().ToListAsync();
|
||||||
if (prdReports != null)
|
|
||||||
{
|
|
||||||
var carryCodes= prdReports.Select(r=>r.material_box_code).Distinct().ToList();
|
var carryCodes= prdReports.Select(r=>r.material_box_code).Distinct().ToList();
|
||||||
if (carryCodes != null && carryCodes.Count > 0)
|
if (carryCodes != null && carryCodes.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -596,7 +594,7 @@ namespace Tnb.QcMgr
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -140,21 +140,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
wmsMaterialSignH.biz_type = wmsDistaskH.biz_type;
|
wmsMaterialSignH.biz_type = wmsDistaskH.biz_type;
|
||||||
|
|
||||||
//已记录的物料签收记录表
|
|
||||||
var wmsMaterialSignDs_ed = await _db.Queryable<WmsMaterialSignD>().Where(r => r.source_id == wmsDistaskH.source_id).ToListAsync();
|
|
||||||
if (wmsMaterialSignDs_ed != null && wmsMaterialSignDs_ed.Count > 0)
|
|
||||||
{
|
|
||||||
//已下发数量
|
|
||||||
var wmsRawmatOutstockD = await _db.Queryable<WmsRawmatOutstockD>().Where(r => r.id == wmsDistaskH.source_id).FirstAsync();
|
|
||||||
var signed_qty = wmsMaterialSignDs_ed.Sum(r => r.sign_qty);//已签收数量
|
|
||||||
var nowSign_qty = input.details.Sum(r => r.sign_qty);//当前需要签收数量
|
|
||||||
//总签收数量不能大于总的下发数量
|
|
||||||
if (signed_qty + nowSign_qty > wmsRawmatOutstockD.actual_outstock_qty)
|
|
||||||
{
|
|
||||||
throw new AppFriendlyException($"已签收数量{signed_qty},当前签收数量{nowSign_qty},总签收数量{signed_qty + nowSign_qty}不能大于已下发数量{wmsRawmatOutstockD.actual_outstock_qty}", 500);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// wms其它出库记录主表
|
// wms其它出库记录主表
|
||||||
OtherOutstockAddDetailInput otherOutstockAddDetailInput = new OtherOutstockAddDetailInput();
|
OtherOutstockAddDetailInput otherOutstockAddDetailInput = new OtherOutstockAddDetailInput();
|
||||||
switch (wmsDistaskH.biz_type)
|
switch (wmsDistaskH.biz_type)
|
||||||
@@ -212,7 +197,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
wmsMaterialSignD.code_batch = wmsCarryCode.code_batch;
|
wmsMaterialSignD.code_batch = wmsCarryCode.code_batch;
|
||||||
wmsMaterialSignD.qty = wmsCarryCode.codeqty;
|
wmsMaterialSignD.qty = wmsCarryCode.codeqty;
|
||||||
wmsMaterialSignD.sign_qty = item.sign_qty;
|
wmsMaterialSignD.sign_qty = item.sign_qty;
|
||||||
wmsMaterialSignD.source_id = wmsDistaskH.source_id;
|
|
||||||
wmsMaterialSignDs.Add(wmsMaterialSignD);
|
wmsMaterialSignDs.Add(wmsMaterialSignD);
|
||||||
wmsCarryCode.codeqty = wmsCarryCode.codeqty - item.sign_qty;
|
wmsCarryCode.codeqty = wmsCarryCode.codeqty - item.sign_qty;
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
"Cache": {
|
"Cache": {
|
||||||
"CacheType": "RedisCache", //MemoryCache
|
"CacheType": "RedisCache", //MemoryCache
|
||||||
"ip": "127.0.0.1",
|
"ip": "127.0.0.1",
|
||||||
"port": 6378,
|
"port": 6379,
|
||||||
"password": "05jWEoJa8v",
|
"password": "05jWEoJa8v",
|
||||||
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0"
|
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"ip": "127.0.0.1",
|
"ip": "127.0.0.1",
|
||||||
"port": 6378,
|
"port": 6379,
|
||||||
"password": "05jWEoJa8v",
|
"password": "05jWEoJa8v",
|
||||||
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0"
|
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0"
|
||||||
},
|
},
|
||||||
"Redis2": {
|
"Redis2": {
|
||||||
"ip": "127.0.0.1",
|
"ip": "127.0.0.1",
|
||||||
"port": 6378,
|
"port": 6379,
|
||||||
"password": "05jWEoJa8v",
|
"password": "05jWEoJa8v",
|
||||||
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=1"
|
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
"DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite;
|
"DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite;
|
||||||
//"Host": "192.168.11.109",
|
//"Host": "192.168.11.109",
|
||||||
"Host": "127.0.0.1",
|
"Host": "127.0.0.1",
|
||||||
"Port": "5431",
|
"Port": "5432",
|
||||||
//"DBName": "tianyi_db",
|
//"DBName": "tianyi_db",
|
||||||
//"UserName": "postgres",
|
//"UserName": "postgres",
|
||||||
//"Password": "pass@word123",
|
//"Password": "pass@word123",
|
||||||
"DBName": "tianyi_cwk2",
|
"DBName": "tianyi",
|
||||||
"UserName": "totong",
|
"UserName": "postgres",
|
||||||
"Password": "IPANyxGSKxIXg0dBM",
|
"Password": "pass@word123",
|
||||||
//SqlServer
|
//SqlServer
|
||||||
//"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true"
|
//"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true"
|
||||||
//Kdbndp
|
//Kdbndp
|
||||||
|
|||||||
Reference in New Issue
Block a user