Commit 607a5b88 by xin.yang
parents e106c4a7 021992cb
......@@ -523,19 +523,8 @@ namespace Siger.ApiACC.Controllers
[HttpPost]
public IActionResult Unloading([FromBody]requestAutomationUnloading unloading)
{
//var monitor = _automationFixtureMonitor.Get(f => f.section == unloading.section);
//if (monitor == null)
//{
// Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息");
// return new ObjectResult(CommonEnum.RecordNotFound);
//}
//if (string.IsNullOrEmpty( monitor.sn))
//{
// Logger.WriteLineInfo($"AutoProcess 找不到CNC监控SN信息");
// return new ObjectResult(CommonEnum.RecordNotFound);
//}
var location = _automationLocation.Get(f => f.id == unloading.locationid);
var location = _automationLocation.Get(f => f.id == unloading.id);
if (location==null)
{
throw new BadRequestException(CommonEnum.RecordNotFound);
......@@ -551,7 +540,10 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(AccEnum.LineModeNotfound);
}
if (!_automationTaskList.CanTask(ProjectId, unloading.section))
{
throw new BadRequestException(AccEnum.TaskProcessing);
}
//TODO
//1. 有检验状态 (立库-》检验工位)
//2. 无检验状态 (立库-》上下料工位)
......
......@@ -240,17 +240,25 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
var query = from q in _context.siger_automation_location
join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid
where q.projectId==projectId && !string.IsNullOrEmpty(q.sn)
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
where q.projectId==projectId
select new ResponseAutomationLocationList
{
id = q.id,
typeid = t.id,
fixtureguid = t.guid,
locationid = q.locationid,
locationid = l.locationid,
location = l.realname,
locationcode = l.serial_number,
wavehouseid = w.id,
wavehouse = w.name,
wavehousecode = w.serial_number,
fixturetoolid = t.id,
code = t.code,
name = t.name,
materialsn =q.sn
materialsn = q.sn ?? ""
};
Expression<Func<ResponseAutomationLocationList, bool>> locationidExpression = f => true;
if (full != 0)
......
......@@ -31,7 +31,7 @@ namespace Siger.Middlelayer.AccRepository.Request
{
public int section { get; set; }
public int locationid { get; set; }
public int id { 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