Commit 853b014c by jiawei.su

someupdate

parent 92b52ceb
......@@ -2109,6 +2109,8 @@ export default {
'3000174': '储位不存在',
'3000175': '工序加工未完成',
'3000176': '工序未开始加工',
'3000177': '同步报表记录失败',
'3000178': '请勿重复提交任务',
'400000': '设备状态',
'400002': '更改状态',
......
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
IIS configuration sections.
......@@ -163,7 +163,7 @@
</site>
<site name="Siger.ApiConfig" id="2">
<application path="/" applicationPool="Siger.ApiConfig AppPool">
<virtualDirectory path="/" physicalPath="E:\gitlabcode\Laisi_AutoMES2\Server\Apis\Siger.ApiConfig" />
<virtualDirectory path="/" physicalPath="D:\Code\20210208\Laisi_AutoMES2\Server\Apis\Siger.ApiConfig" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:9002:localhost" />
......@@ -171,7 +171,7 @@
</site>
<site name="Siger.ApiQMS" id="3">
<application path="/" applicationPool="Siger.ApiQMS AppPool">
<virtualDirectory path="/" physicalPath="D:\Code\20201209\siger-main\Server\Apis\Siger.ApiQMS" />
<virtualDirectory path="/" physicalPath="D:\Code\20210208\Laisi_AutoMES2\Server\Apis\Siger.ApiQMS" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:9013:localhost" />
......@@ -179,7 +179,7 @@
</site>
<site name="Siger.ApiACC" id="4">
<application path="/" applicationPool="Siger.ApiACC AppPool">
<virtualDirectory path="/" physicalPath="D:\Code\20201209\siger-main\Server\Apis\Siger.ApiACC" />
<virtualDirectory path="/" physicalPath="D:\Code\20210208\Laisi_AutoMES2\Server\Apis\Siger.ApiACC" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:9003:localhost" />
......@@ -187,7 +187,7 @@
</site>
<site name="Siger.ApiCNC" id="5">
<application path="/" applicationPool="Siger.ApiCNC AppPool">
<virtualDirectory path="/" physicalPath="D:\Code\20201209\siger-main\Server\Apis\Siger.ApiCNC" />
<virtualDirectory path="/" physicalPath="D:\Code\20210208\Laisi_AutoMES2\Server\Apis\Siger.ApiCNC" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:9008:localhost" />
......@@ -1030,7 +1030,7 @@
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" hostingModel="InProcess" startupTimeLimit="3600" requestTimeout="23:00:00" />
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" hostingModel="InProcess" startupTimeLimit="3600" requestTimeout="23:00:00" arguments="%LAUNCHER_ARGS%" />
<httpCompression>
<dynamicTypes>
<add mimeType="text/event-stream" enabled="false" />
......
......@@ -290,9 +290,6 @@ namespace Siger.ApiACC.Controllers
}
}
//PLC 反馈结束.
if (status == (int)TaskResultStatus.Complated)
{
......@@ -312,10 +309,8 @@ namespace Siger.ApiACC.Controllers
// 业务入口: 上料位-》 入库 如果是上料工装 安装完成 ,绑定 储位与装配
if (sectionProperty.propertytype == 1)
{
var download = false;
if (sectionProperty.down > 2)
if (sectionProperty.down > 1)
{
// 是拆卸
download = true;
......@@ -377,15 +372,19 @@ namespace Siger.ApiACC.Controllers
machineStatusObj.status = (int)Automation.MachineStatus.Produce;
_automationMachineStatus.Update(machineStatusObj);
}
location.status = (int)LocationStatus.Out;
_automationLocation.Update(location);
}
////准备下料 不经过抽检台
if (sectionProperty.down != 0)
{
sectionProperty.down += 1;
_automationSectionProperty.Update(sectionProperty);
}
//if (sectionProperty.down != 0)
//{
// sectionProperty.down += 1;
// _automationSectionProperty.Update(sectionProperty);
//}
}
// CNC 设备
......@@ -464,11 +463,11 @@ namespace Siger.ApiACC.Controllers
}
//准备下料,经过抽检台
if (_Property.down != 0)
{
_Property.down += 1;
_automationSectionProperty.Update(_Property);
}
//if (_Property.down != 0)
//{
// _Property.down += 1;
// _automationSectionProperty.Update(_Property);
//}
}
......@@ -497,6 +496,7 @@ namespace Siger.ApiACC.Controllers
location.routeid = route;
location.route = route.ToString();
location.status = (int)LocationStatus.In;
location.updatetime = DateTime.Now;
_automationLocation.Update(location);
Logger.WriteLineInfo($"PlCfeeback 工装储位{taskObj.locationid} 工序{location.routeid} 下一工序{route}更新完成");
}
......@@ -548,16 +548,16 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(AccEnum.MachineDisable);
}
//上料中
if (_Property.upload != 0)
{
_Property.upload += 1;
_automationSectionProperty.Update(_Property);
}
if (_Property.down != 0)
{
_Property.down += 1;
_automationSectionProperty.Update(_Property);
}
//if (_Property.upload != 0)
//{
// _Property.upload += 1;
// _automationSectionProperty.Update(_Property);
//}
//if (_Property.down != 0)
//{
// _Property.down += 1;
// _automationSectionProperty.Update(_Property);
//}
}
//添加当前监控
......
......@@ -305,6 +305,11 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(AccEnum.FixtureOrderNulll);
}
var machineStaus = _automationMachineStatus.Get(f => f.section == section);
if (machineStaus.status==(int)Automation.MachineStatus.Produce)
{
return new ObjectResult(CommonEnum.Succefull);
}
var sn = _automationTaskList.CreateRandonSn(result.ProductCode);
result.Sn = sn;
result.status = monitor != null ? monitor.status : 1;
......@@ -340,7 +345,7 @@ namespace Siger.ApiACC.Controllers
}
if (upload.upload!=0)
{
throw new BadRequestException(AccEnum.TaskProcessing);
throw new BadRequestException(AccEnum.TaskCreateDone);
}
var location = _automationLocation.Get(f => f.locationid == loading.locationid);
if (location==null)
......@@ -469,9 +474,9 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(AccEnum.MachineOnFree);
}
if (upload.upload !=2 )
if (upload.upload >1 )
{
throw new BadRequestException(AccEnum.TaskProcessing);
throw new BadRequestException(AccEnum.TaskCreateDone);
}
upload.upload += 1;
_sectionPropertyRepository.Update(upload);
......@@ -561,7 +566,7 @@ namespace Siger.ApiACC.Controllers
}
if (upload.down != 0)
{
throw new BadRequestException(AccEnum.TaskProcessing);
throw new BadRequestException(AccEnum.TaskCreateDone);
}
upload.down += 1;
_sectionPropertyRepository.Update(upload);
......@@ -571,7 +576,7 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
if (string.IsNullOrEmpty( location.sn))
if (string.IsNullOrEmpty(location.sn))
{
throw new BadRequestException(AccEnum.LocationNoSn);
}
......@@ -680,7 +685,7 @@ namespace Siger.ApiACC.Controllers
productname=location.productname,
processid = 0,
programnumber = "",
remark =lineMode.inspect==1? "准备下料-》抽检台":"准备下料",
remark =EnumHelper.GetEnumDesc(action)+"准备下料",
extend1 = upload.sectionid.ToString()
});
......@@ -718,9 +723,9 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(AccEnum.MachineOnFree);
}
if (upload.down < 2)
if (upload.down >1)
{
throw new BadRequestException(AccEnum.TaskProcessing);
throw new BadRequestException(AccEnum.TaskCreateDone);
}
upload.down += 1;
_sectionPropertyRepository.Update(upload);
......@@ -762,7 +767,7 @@ namespace Siger.ApiACC.Controllers
productname=monitor.productName,
processid = 0,
programnumber = "",
remark = "手动任务-拆卸完成",
remark =EnumHelper.GetEnumDesc(TaskAction.Step_SXLW_LK)+ "-拆卸完成",
extend1= disassemble.section.ToStr()
});
......
......@@ -273,12 +273,14 @@ namespace Siger.ApiACC.Controllers
// return new ObjectResult(CommonEnum.Succefull);
//}
var lastTask = _automationTaskList.GetList(f => f.projectId == ProjectId && f.action == TaskAction.Step_CJT_SXLW, "id", true).FirstOrDefault();
if ( lastTask.status != (int)TaskResultStatus.Complated)
if (lastTask != null)
{
Logger.WriteLineError($"重复检验提交数据,无需创建Task任务");
return new ObjectResult(CommonEnum.Succefull);
if (lastTask.status != (int)TaskResultStatus.Complated)
{
Logger.WriteLineError($"重复检验提交数据,无需创建Task任务");
return new ObjectResult(CommonEnum.Succefull);
}
}
var tasklist = _automationTaskList.GetList(f => f.sectionid == req.sectionid && f.action == Automation.TaskAction.Step_LK_CJT).LastOrDefault();
if (tasklist == null)
{
......
......@@ -359,7 +359,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[Description("工序未开始加工")]
RouteNotStart,
[Description("同步报工记录失败")]
SyncSnReportErro
SyncSnReportErro,
[Description("请勿重复提交任务")]
TaskCreateDone
}
public enum SeriNumCfg
......
......@@ -19,11 +19,11 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary>
public int propertytype { get; set; }
/// <summary>
/// 上料状态 1 当前是上料 2 上料中 3 安装完成
/// 上料状态 1 当前是上料 2 安装完成
/// </summary>
public int upload { get; set; }
/// <summary>
/// 下料状态 1 当前是下料 2 下料中 3 拆卸完成
/// 下料状态 1 当前是下料 2 拆卸完成
/// </summary>
public int down { get; set; }
......
......@@ -251,7 +251,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
join r in _context.siger_project_product_route on q.routeid equals r.id into rtemp
from r in rtemp.DefaultIfEmpty()
where q.projectId == projectId
&& q.status == (int)RowState.Valid && t.status == (int)RowState.Valid
&& q.status == (int)RowState.Valid
&& t.status == (int)RowState.Valid
&& l.status == (int)RowState.Valid && w.status == (int)RowState.Valid
select new ResponseAutomationLocationList
......
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