Commit 340bfa0b by jiawei.su

fixedbug

parent ae693a98
...@@ -435,7 +435,7 @@ export default { ...@@ -435,7 +435,7 @@ export default {
let data = { let data = {
fillsn: this.tabindex == "1" ? 0 : 1, fillsn: this.tabindex == "1" ? 0 : 1,
// productcode: code, // productcode: code,
productcode: this.tabindex == "1" ? this.code:"", productcode: this.tabindex == "1" ? code:"",
}; };
this.request("/acc/AutomationLocation/GetLocationList", data, "get") this.request("/acc/AutomationLocation/GetLocationList", data, "get")
.then((res) => { .then((res) => {
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
@click="search()" @click="search()"
>{{ $t("1001") }}</Button >{{ $t("1001") }}</Button
> >
<Button <!-- <Button
type="primary" type="primary"
class="twoWord" class="twoWord"
icon="ios-search" icon="ios-search"
@click="exportExcel()" @click="exportExcel()"
>导出</Button >导出</Button
> > -->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<Option :value="1">待执行</Option> <Option :value="1">待执行</Option>
<Option :value="2">执行中</Option> <Option :value="2">执行中</Option>
<Option :value="3">执行完成</Option> <Option :value="3">执行完成</Option>
<Option :value="4">取消</Option>
</Select> </Select>
</div> </div>
<div class="filter"> <div class="filter">
......
...@@ -345,7 +345,7 @@ namespace Siger.ApiACC.Controllers ...@@ -345,7 +345,7 @@ namespace Siger.ApiACC.Controllers
_automationMachineStatus.Update(machineStatusObj); _automationMachineStatus.Update(machineStatusObj);
} }
} }
//从立库储位拿SN 工件到上料位 ////从立库储位拿SN 工件到上料位
if (taskObj.action == TaskAction.Step_LK_SXLW) if (taskObj.action == TaskAction.Step_LK_SXLW)
{ {
location.sn = taskObj.sn; location.sn = taskObj.sn;
...@@ -365,7 +365,7 @@ namespace Siger.ApiACC.Controllers ...@@ -365,7 +365,7 @@ namespace Siger.ApiACC.Controllers
} }
} }
//需要抽检时(准备下料) ,立库到抽检台 //需要抽检时(准备下料) ,立库到抽检台
if(taskObj.action== TaskAction.Step_LK_CJT) if (taskObj.action == TaskAction.Step_LK_CJT)
{ {
if (machineStatusObj != null) if (machineStatusObj != null)
{ {
...@@ -374,17 +374,17 @@ namespace Siger.ApiACC.Controllers ...@@ -374,17 +374,17 @@ namespace Siger.ApiACC.Controllers
} }
} }
//上料中 ////上料中
if (sectionProperty.upload != 0) //if (sectionProperty.upload != 0)
{ //{
sectionProperty.upload += 1; // sectionProperty.upload += 1;
_automationSectionProperty.Update(sectionProperty); // _automationSectionProperty.Update(sectionProperty);
} //}
if (sectionProperty.down != 0) //if (sectionProperty.down != 0)
{ //{
sectionProperty.down += 1; // sectionProperty.down += 1;
_automationSectionProperty.Update(sectionProperty); // _automationSectionProperty.Update(sectionProperty);
} //}
} }
// CNC 设备 // CNC 设备
...@@ -476,7 +476,64 @@ namespace Siger.ApiACC.Controllers ...@@ -476,7 +476,64 @@ namespace Siger.ApiACC.Controllers
Logger.WriteLineInfo($"PlCfeeback 工装储位{taskObj.locationid} 工序{location.routeid} 下一工序{route}更新完成"); Logger.WriteLineInfo($"PlCfeeback 工装储位{taskObj.locationid} 工序{location.routeid} 下一工序{route}更新完成");
} }
} }
//立库
if (sectionProperty.propertytype==5)
{
//上下料位状态 为后台控制
var machineStatusObj = _automationMachineStatus.Get(f => f.section == taskObj.extend1.ToInt());
//从立库储位拿SN 工件到上料位
if (taskObj.action == TaskAction.Step_LK_SXLW)
{
location.sn = taskObj.sn;
location.ordernumber = taskObj.ordercode;
location.productcode = taskObj.productcode;
location.productid = taskObj.productid;
location.productname = taskObj.productname;
location.route = taskObj.route.ToString();
location.routeid = taskObj.route;
location.status = (int)LocationStatus.Out;
_automationLocation.Update(location);
if (machineStatusObj != null)
{
machineStatusObj.status = (int)Automation.MachineStatus.Produce;
_automationMachineStatus.Update(machineStatusObj);
}
}
//需要抽检时(准备下料) ,立库到抽检台
if (taskObj.action == TaskAction.Step_LK_CJT)
{
if (machineStatusObj != null)
{
machineStatusObj.status = (int)Automation.MachineStatus.Produce;
_automationMachineStatus.Update(machineStatusObj);
}
}
if (taskObj.action == TaskAction.Step_LK_JGZX)
{
location.status = (int)LocationStatus.Out;
_automationLocation.Update(location);
}
var _Property = _automationSectionProperty.Get(f => f.sectionid == taskObj.sectionid);
if (_Property==null)
{
Logger.WriteLineInfo($"PlCfeeback 未找到该工装储位信息");
throw new BadRequestException(AccEnum.MachineDisable);
}
//上料中
if (_Property.upload != 0)
{
_Property.upload += 1;
_automationSectionProperty.Update(_Property);
}
if (sectionProperty.down != 0)
{
_Property.down += 1;
_automationSectionProperty.Update(_Property);
}
}
//添加当前监控 //添加当前监控
if (monitor == null) if (monitor == null)
......
...@@ -47,10 +47,11 @@ namespace Siger.ApiACC.Controllers ...@@ -47,10 +47,11 @@ namespace Siger.ApiACC.Controllers
private readonly IAutomationSectionPropertyRepository _sectionPropertyRepository; private readonly IAutomationSectionPropertyRepository _sectionPropertyRepository;
private readonly IAutomationProduceHistoryRepository _automationProduceHistory; private readonly IAutomationProduceHistoryRepository _automationProduceHistory;
private readonly ISigerProjectProductRepository _sigerProjectProduct; private readonly ISigerProjectProductRepository _sigerProjectProduct;
private readonly IProductionBeatSetRepository _productionBeatSet;
public AutomationOperateController(IUnitOfWork unitOfWork,ISigerProjectLevelSectionRepository sigerProjectLevelSection , ISigerDict sigerDict,IAutomationMachineStatus automationMachineStatus,ISigerProjectMachineAttributionRepository sigerProjectMachineAttribution,IAutomationTaskListRepository automationTaskList, public AutomationOperateController(IUnitOfWork unitOfWork,ISigerProjectLevelSectionRepository sigerProjectLevelSection , ISigerDict sigerDict,IAutomationMachineStatus automationMachineStatus,ISigerProjectMachineAttributionRepository sigerProjectMachineAttribution,IAutomationTaskListRepository automationTaskList,
IProductPlanDetails planDetails,IProductPlanRepository productPlan,IAutomationFixtureMonitor automationFixtureMonitor ,IAutomationFixtureToolsProductRepository automationFixtureToolsProduct,IAutomationFixtureToolsRepository automationFixtureTools, IAutomationLocationRepository automationLocation, IProductPlanDetails planDetails,IProductPlanRepository productPlan,IAutomationFixtureMonitor automationFixtureMonitor ,IAutomationFixtureToolsProductRepository automationFixtureToolsProduct,IAutomationFixtureToolsRepository automationFixtureTools, IAutomationLocationRepository automationLocation,
IAutomationLineMode automationLine, IProductRouteRepository productRoute, IAutomationSectionPropertyRepository sectionPropertyRepository,IAutomationProduceHistoryRepository automationProduceHistory,ISigerProjectProductRepository sigerProjectProduct ) IAutomationLineMode automationLine, IProductRouteRepository productRoute, IAutomationSectionPropertyRepository sectionPropertyRepository,IAutomationProduceHistoryRepository automationProduceHistory,ISigerProjectProductRepository sigerProjectProduct,IProductionBeatSetRepository productionBeatSet )
{ {
_unitOfWork = unitOfWork; _unitOfWork = unitOfWork;
_sigerProjectLevelSection = sigerProjectLevelSection; _sigerProjectLevelSection = sigerProjectLevelSection;
...@@ -69,6 +70,7 @@ namespace Siger.ApiACC.Controllers ...@@ -69,6 +70,7 @@ namespace Siger.ApiACC.Controllers
_sectionPropertyRepository = sectionPropertyRepository; _sectionPropertyRepository = sectionPropertyRepository;
_automationProduceHistory = automationProduceHistory; _automationProduceHistory = automationProduceHistory;
_sigerProjectProduct = sigerProjectProduct; _sigerProjectProduct = sigerProjectProduct;
_productionBeatSet = productionBeatSet;
} }
/// <summary> /// <summary>
...@@ -357,6 +359,11 @@ namespace Siger.ApiACC.Controllers ...@@ -357,6 +359,11 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(CncEnum.PlanHasExist); throw new BadRequestException(CncEnum.PlanHasExist);
} }
var beatSets = _productionBeatSet.GetList(f=>f.product_name==plan.product_id.ToString() && f.status==(int)RowState.Valid);
if (!beatSets.Any())
{
throw new BadRequestException(CncEnum.RouteIsEmpty);
}
//检查工装 //检查工装
var fixtureToolsObj = _automationFixtureTools.GetProductFixtureLocation(ProjectId,loading.guid,loading.locationid); var fixtureToolsObj = _automationFixtureTools.GetProductFixtureLocation(ProjectId,loading.guid,loading.locationid);
if (fixtureToolsObj == null) if (fixtureToolsObj == null)
...@@ -418,7 +425,7 @@ namespace Siger.ApiACC.Controllers ...@@ -418,7 +425,7 @@ namespace Siger.ApiACC.Controllers
programnumber="", programnumber="",
remark ="手动任务-准备上料", remark ="手动任务-准备上料",
route=route.id, route=route.id,
extend1= loading.section.ToStr(), extend1= invenProperty.sectionid.ToStr(),
}); });
......
...@@ -160,7 +160,7 @@ namespace Siger.ApiACC.Controllers ...@@ -160,7 +160,7 @@ namespace Siger.ApiACC.Controllers
model.status_value = ""; model.status_value = "";
break; break;
} }
model.send = item.send==0 ? "未下发" : "已下发";
dataList.Add(model); dataList.Add(model);
} }
if (dataList.Any()) if (dataList.Any())
......
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