Commit 79cce1d0 by jiawei.su

someupdate

parent e8eb7746
......@@ -315,10 +315,13 @@ namespace Siger.ApiACC.Controllers
_automationLocation.Update(location);
var monitor = _automationFixtureMonitor.Get(f => f.section == taskObj.sectionid);
if (monitor != null)
{
monitor.section = 0;
_automationFixtureMonitor.Update(monitor);
}
}
}
}
......
......@@ -268,7 +268,7 @@ namespace Siger.ApiACC.Controllers
[HttpGet]
public IActionResult ScanCode(string code,int id)
{
if (string.IsNullOrEmpty(code))
if (!string.IsNullOrEmpty(code))
{
var result = _automationFixtureToolsProduct.GetPlanFixtureInfo(ProjectId, code);
if (result == null)
......@@ -471,7 +471,7 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(AccEnum.MonitorNotfound);
}
//移出 上料位
monitor.section = 0;
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
_automationTaskList.Insert(new siger_automation_task_list
{
......
......@@ -50,7 +50,7 @@ namespace Siger.ApiACC.Controllers
var item = new ResponseAutomationMachineStatus
{
sectionid=d.sectionid,
section=$"{ d.section}({d.linemode})",
section=$"{ d.section} {d.linemode}",
enable=d.enable,
product="",
location=0,
......
......@@ -22,7 +22,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
var data = from atr in _context.siger_project_machine_attribution
join lv in _context.siger_project_level_section on atr.station equals lv.id
join lm in _context.siger_automation_line_mode on lv.parentid equals lm.id
join lm in _context.siger_automation_line_mode on lv.parentid equals lm.id into lstemp
from lm in lstemp.DefaultIfEmpty()
join ms in _context.siger_automation_machine_status on lv.id equals ms.section into mstemp
join plv in _context.siger_project_level_section on lv.parentid equals plv.id
from ms in mstemp.DefaultIfEmpty()
......@@ -33,7 +34,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
lastupdate = ms != null ? ms.updatetime.ToString() : "",
enable = ms != null ? ms.enable : 1,
status = ms != null ? ms.status : 1,
linemode = lm.mode == 0 ? "手动模式" : "自动模式",
linemode =lm!=null? lm.mode == 0 ? "手动模式" : "自动模式":"",
};
Expression<Func<ResponseAutomationMachineStatus, bool>> sectionsExpression = f => true;
......
......@@ -49,15 +49,15 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public string CrateTaskNumber(TaskTrigerType trigerType)
{
var date = DateTime.Now;
var lable = date.Year+date.Day+date.Hour + date.Minute + date.Second;
var lableUnix = UnixTimeHelper.GetNow();
var serinum = date.DayOfYear+date.Month +date.Day+ date.Hour + date.Minute + date.Second + date.Millisecond;
var dayofyear = GetDayOfYear(date);
if (trigerType== TaskTrigerType.Auto)
{
return $"{date.Year}{date.DayOfYear}A{lable}";
}else
return $"A{date.Year}{dayofyear}{serinum}";
}
else
{
return $"{date.Year}{date.DayOfYear}M{lable}";
return $"M{date.Year}{dayofyear}{serinum}";
}
}
/// <summary>
......@@ -68,7 +68,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public string CreateRandonSn(string productCode)
{
var date = DateTime.Now;
var serinum = date.DayOfYear+date.Hour + date.Minute + date.Second + date.Millisecond;
var serinum = date.DayOfYear + date.Month + date.Day + date.Hour + date.Minute + date.Second + date.Millisecond;
var dayofyear = GetDayOfYear(date);
var lable = $"{date.Year}{dayofyear}{serinum}";
return lable;
......
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