bug
This commit is contained in:
@@ -101,7 +101,9 @@ namespace Tnb.QcMgr
|
|||||||
{ "temporarily", "暂控" }
|
{ "temporarily", "暂控" }
|
||||||
};
|
};
|
||||||
|
|
||||||
PositionEntity positionEntity = await db.Queryable<PositionEntity>().Where(x=>x.Id==_userManager.User.PositionId).FirstAsync();
|
string positionId = _userManager.User != null && !string.IsNullOrEmpty(_userManager.User.PositionId) ? _userManager.User.PositionId : "";
|
||||||
|
PositionEntity positionEntity = await db.Queryable<PositionEntity>().Where(x=>x.Id==positionId).FirstAsync();
|
||||||
|
string positionCode = positionEntity != null ? positionEntity.EnCode : "";
|
||||||
Dictionary<string, string>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson) : new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson) : new Dictionary<string, string>();
|
||||||
string materialid = queryJson.ContainsKey("materialid") ? queryJson["materialid"].ToString() : "";
|
string materialid = queryJson.ContainsKey("materialid") ? queryJson["materialid"].ToString() : "";
|
||||||
string checktype = queryJson.ContainsKey("checktype") ? queryJson["checktype"].ToString() : "";
|
string checktype = queryJson.ContainsKey("checktype") ? queryJson["checktype"].ToString() : "";
|
||||||
@@ -122,7 +124,7 @@ namespace Tnb.QcMgr
|
|||||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>f.eqp_id==g.id)
|
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>f.eqp_id==g.id)
|
||||||
.LeftJoin<OrganizeEntity>((a,b,c,d,e,f,g,h)=>d.OrganizeIdTree.Contains(h.Id) && h.Category == DictConst.RegionCategoryWorkshopCode)
|
.LeftJoin<OrganizeEntity>((a,b,c,d,e,f,g,h)=>d.OrganizeIdTree.Contains(h.Id) && h.Category == DictConst.RegionCategoryWorkshopCode)
|
||||||
.LeftJoin<PositionEntity>((a,b,c,d,e,f,g,h,i)=>h.Id==i.OrganizeId)
|
.LeftJoin<PositionEntity>((a,b,c,d,e,f,g,h,i)=>h.Id==i.OrganizeId)
|
||||||
.WhereIF(_userManager.LoginType=="app" && !_userManager.IsAdministrator,(a,b,c,d,e,f,g,h,i)=>i.EnCode==positionEntity.EnCode)
|
.WhereIF(_userManager.LoginType=="app" && !_userManager.IsAdministrator,(a,b,c,d,e,f,g,h,i)=>i.EnCode==positionCode)
|
||||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||||
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||||
|
|||||||
@@ -89,7 +89,13 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
if (input.data.ContainsKey(nameof(WmsDelivery.endlocation_id)))
|
if (input.data.ContainsKey(nameof(WmsDelivery.endlocation_id)))
|
||||||
{
|
{
|
||||||
endLocationId = input.data[nameof(WmsDelivery.endlocation_id)]?.ToString()!;
|
BasLocation endLocation = await _db.Queryable<BasLocation>().Where(x=>x.location_code==input.data[nameof(WmsDelivery.endlocation_id)].ToString()).FirstAsync();
|
||||||
|
if (endLocation == null)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("未找到目标库位");
|
||||||
|
}
|
||||||
|
|
||||||
|
endLocationId = endLocation.id;
|
||||||
}
|
}
|
||||||
string[] locIds = new[] { startLocationId, endLocationId };
|
string[] locIds = new[] { startLocationId, endLocationId };
|
||||||
List<BasLocation> locs = await _basLocationService?.GetLocationInfobyIds(locIds)!;
|
List<BasLocation> locs = await _basLocationService?.GetLocationInfobyIds(locIds)!;
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
// BasWarehouse scWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.scwarehouse_id);
|
// BasWarehouse scWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.scwarehouse_id);
|
||||||
// BasWarehouse kcWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.warehouse_id);
|
// BasWarehouse kcWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.warehouse_id);
|
||||||
PrdReport prdReport = await _db.Queryable<PrdReport>().SingleAsync(x => x.id == instock.prd_report_id);
|
PrdReport prdReport = await _db.Queryable<PrdReport>().SingleAsync(x => x.id == instock.prd_report_id);
|
||||||
|
if (prdReport == null) return;
|
||||||
PrdMoTask prdMoTask = await _db.Queryable<PrdMoTask>().SingleAsync(x => x.id == prdReport.mo_task_id);
|
PrdMoTask prdMoTask = await _db.Queryable<PrdMoTask>().SingleAsync(x => x.id == prdReport.mo_task_id);
|
||||||
PrdMo prdMo = await _db.Queryable<PrdMo>().SingleAsync(x => x.id == prdMoTask.mo_id);
|
PrdMo prdMo = await _db.Queryable<PrdMo>().SingleAsync(x => x.id == prdMoTask.mo_id);
|
||||||
//来源erp才产成品入库
|
//来源erp才产成品入库
|
||||||
|
|||||||
Reference in New Issue
Block a user