Commit 589f117c by xin.yang

fix bug

parent 445bc2a3
...@@ -71,7 +71,7 @@ namespace Siger.ApiACC.Controllers ...@@ -71,7 +71,7 @@ namespace Siger.ApiACC.Controllers
item.materialstate = 4;//无工装有工件 item.materialstate = 4;//无工装有工件
} }
var loca = locations.FirstOrDefault(q => q.locationid == item.locaid); var loca = locations.FirstOrDefault(q => q.id == item.locationid);
if(loca != null) if(loca != null)
{ {
var locas = GetParentLocations(loca.id, locations); var locas = GetParentLocations(loca.id, locations);
...@@ -211,7 +211,8 @@ namespace Siger.ApiACC.Controllers ...@@ -211,7 +211,8 @@ namespace Siger.ApiACC.Controllers
var entity = new siger_automation_location var entity = new siger_automation_location
{ {
guid = Guid.NewGuid().ToString(), guid = Guid.NewGuid().ToString(),
locationid = location.id, locationid = location.locationid,
location_cid = location.id,
fixturetools = fixturetool.guid, fixturetools = fixturetool.guid,
productid= fixturetoolProduct != null ? fixturetoolProduct.productid : 0, productid= fixturetoolProduct != null ? fixturetoolProduct.productid : 0,
productcode = fixturetoolProduct!=null? fixturetoolProduct.productcode:"", productcode = fixturetoolProduct!=null? fixturetoolProduct.productcode:"",
...@@ -263,7 +264,8 @@ namespace Siger.ApiACC.Controllers ...@@ -263,7 +264,8 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(RequestEnum.DataExist); throw new BadRequestException(RequestEnum.DataExist);
} }
entity.locationid = location.id; entity.locationid = location.locationid;
entity.location_cid = location.id;
entity.fixturetools = fixturetool.guid; entity.fixturetools = fixturetool.guid;
entity.attachment = req.fileurl; entity.attachment = req.fileurl;
entity.filename = req.filename; entity.filename = req.filename;
......
...@@ -11,6 +11,10 @@ namespace Siger.Middlelayer.AccRepository.Entities ...@@ -11,6 +11,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
{ {
public string guid { get; set; } public string guid { get; set; }
/// <summary> /// <summary>
/// 储位自增ID
/// </summary>
public int location_cid { get; set; }
/// <summary>
/// 储位位置 /// 储位位置
/// </summary> /// </summary>
public int locationid { get; set; } public int locationid { get; set; }
......
...@@ -29,7 +29,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -29,7 +29,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
var query = from q in _context.siger_automation_location var query = from q in _context.siger_automation_location
join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid
join c in _context.siger_automation_fixture_tools_category on t.category equals c.guid join c in _context.siger_automation_fixture_tools_category on t.category equals c.guid
join l in _context.siger_wms_storage_location on q.locationid equals l.id join l in _context.siger_wms_storage_location on q.location_cid equals l.id
join w in _context.siger_wms_storage on l.storageid equals w.id join w in _context.siger_wms_storage on l.storageid equals w.id
join u in _context.siger_project_user on q.updator equals u.mid into uu join u in _context.siger_project_user on q.updator equals u.mid into uu
from u in uu.DefaultIfEmpty() from u in uu.DefaultIfEmpty()
...@@ -100,14 +100,14 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -100,14 +100,14 @@ namespace Siger.Middlelayer.AccRepository.Repositories
var query = from q in _context.siger_automation_location var query = from q in _context.siger_automation_location
join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid
join c in _context.siger_automation_fixture_tools_category on t.category equals c.guid join c in _context.siger_automation_fixture_tools_category on t.category equals c.guid
join l in _context.siger_wms_storage_location on q.locationid equals l.id join l in _context.siger_wms_storage_location on q.location_cid equals l.id
join w in _context.siger_wms_storage on l.storageid equals w.id join w in _context.siger_wms_storage on l.storageid equals w.id
where q.projectId == projectid && q.status == (int)RowState.Valid where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseAutomationLocationList select new ResponseAutomationLocationList
{ {
id = q.id, id = q.id,
fixtureguid = t.guid, fixtureguid = t.guid,
locationid = l.id, locationid = l.locationid,
location = l.realname, location = l.realname,
locationcode = l.serial_number, locationcode = l.serial_number,
wavehouseid = w.id, wavehouseid = w.id,
......
...@@ -8,9 +8,12 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -8,9 +8,12 @@ namespace Siger.Middlelayer.AccRepository.Response
{ {
public int id { get; set; } public int id { get; set; }
/// <summary> /// <summary>
/// 储位位置 /// 储位自增ID
/// </summary> /// </summary>
public int locationid { get; set; } public int locationid { get; set; }
/// <summary>
/// 储位填写ID
/// </summary>
public int locaid { get; set; } public int locaid { get; set; }
public string location { get; set; } public string location { get; set; }
public int wavehouseid { get; set; } public int wavehouseid { get; set; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment