Commit a3993cc5 by yiyu.li
parents 06281e07 1d7315b5
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<div>正在上传...</div> <div>正在上传...</div>
</Spin> </Spin>
<div class="filter"> <div class="filter">
<label>父工装类</label> <label>父工装类</label>
<Cascader <Cascader
class="searchSelect" class="searchSelect"
:data="typeTree" :data="typeTree"
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<div style="padding-left: 50px"> <div style="padding-left: 50px">
<div class="filter"> <div class="filter">
<label>子工装类</label> <label>子工装类</label>
<Cascader <Cascader
class="searchSelect" class="searchSelect"
:data="typeTree" :data="typeTree"
...@@ -432,35 +432,6 @@ export default { ...@@ -432,35 +432,6 @@ export default {
}, },
}, },
{ {
title: "备注",
key: "remark",
},
{
title: "附件",
key: "filename",
render: (h, params) => {
return h(
"span",
{
style: {
color: "#2b85e4",
cursor: "pointer",
},
on: {
click: () => {
let name = params.row.filename;
let url = params.row.fileurl;
if (url) {
this.downFile(url, name);
}
},
},
},
params.row.filename
);
},
},
{
title: "维护人", title: "维护人",
key: "updator", key: "updator",
}, },
......
...@@ -19,6 +19,7 @@ using Siger.Middlelayer.Share.Enum.ModuleEnum; ...@@ -19,6 +19,7 @@ using Siger.Middlelayer.Share.Enum.ModuleEnum;
using static Siger.Middlelayer.Share.Enum.ModuleEnum.Automation; using static Siger.Middlelayer.Share.Enum.ModuleEnum.Automation;
using Siger.Middlelayer.Repository.Entities; using Siger.Middlelayer.Repository.Entities;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using Siger.Middlelayer.AccRepository.Response;
namespace Siger.ApiACC.Controllers namespace Siger.ApiACC.Controllers
{ {
...@@ -82,6 +83,7 @@ namespace Siger.ApiACC.Controllers ...@@ -82,6 +83,7 @@ namespace Siger.ApiACC.Controllers
exitsObj.enable = request.enable; exitsObj.enable = request.enable;
exitsObj.status = request.status; exitsObj.status = request.status;
exitsObj.updatetime = DateTime.Now; exitsObj.updatetime = DateTime.Now;
_automationMachineStatus.Update(exitsObj);
} }
...@@ -92,20 +94,29 @@ namespace Siger.ApiACC.Controllers ...@@ -92,20 +94,29 @@ namespace Siger.ApiACC.Controllers
{ {
if (request.status == (int)Automation.MachineStatus.Waiting || request.status == (int)Automation.MachineStatus.Complated) if (request.status == (int)Automation.MachineStatus.Waiting || request.status == (int)Automation.MachineStatus.Complated)
{ {
var tasklist = _automationTaskList.GetList(f => f.projectId == PID && f.status >= (int)TaskResultStatus.Cancel && f.status < (int)TaskResultStatus.Complated);
if (!tasklist.Any()) var stationDicts = _sigerDict.GetDataByCat(AccDictCost.Automation, PID);
if (!stationDicts.Any())
{ {
var stationDicts = _sigerDict.GetDataByCat(AccDictCost.Automation, PID); Logger.WriteLineInfo($"AutoProcess 未配置设备类型字典");
if (!stationDicts.Any()) throw new BadRequestException(AccEnum.AutomationDictNotfound);
{ }
Logger.WriteLineInfo($"AutoProcess 未配置设备类型字典");
throw new BadRequestException(AccEnum.AutomationDictNotfound);
} var uploadStation = stationDicts.Where(f => f.dkey == DictKeyValConst.UploadloadStation);
var section = _sigerProjectLevelSection.Get(f => f.id == machineAttr.station); var uploadStations = uploadStation.Select(f => f.dval.ToInt()).ToList();
if (section != null)
if (!uploadStations.Contains(machineAttr.station))
{
var tasklist = _automationTaskList.GetList(f => f.projectId == PID && f.status < (int)TaskResultStatus.Complated);
if (!tasklist.Any())
{ {
Logger.WriteLineInfo($"MachineStatus 设备状态 触发自动任务检查"); var section = _sigerProjectLevelSection.Get(f => f.id == machineAttr.station);
AutoProcess(section.parentid, stationDicts); if (section != null)
{
Logger.WriteLineInfo($"MachineStatus 设备状态 触发自动任务检查");
AutoProcess(section.parentid, stationDicts);
}
} }
} }
} }
...@@ -161,7 +172,7 @@ namespace Siger.ApiACC.Controllers ...@@ -161,7 +172,7 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(AccEnum.AutomationDictNotfound); throw new BadRequestException(AccEnum.AutomationDictNotfound);
} }
var tasklist = _automationTaskList.GetList(f => f.projectId == PID && f.status >= (int)TaskResultStatus.Cancel && f.status < (int)TaskResultStatus.Complated); var tasklist = _automationTaskList.GetList(f => f.projectId == PID && f.status < (int)TaskResultStatus.Complated);
if (!tasklist.Any()) if (!tasklist.Any())
{ {
Logger.WriteLineInfo($"LineMode Mode=1 触发自动任务检查"); Logger.WriteLineInfo($"LineMode Mode=1 触发自动任务检查");
...@@ -231,7 +242,7 @@ namespace Siger.ApiACC.Controllers ...@@ -231,7 +242,7 @@ namespace Siger.ApiACC.Controllers
} }
//是否还有未完成任务 //是否还有未完成任务
var taskDone = _automationTaskList.Get(f => f.projectId == PID && f.status > (int)TaskResultStatus.Cancel && f.status < (int)TaskResultStatus.Complated); var taskDone = _automationTaskList.Get(f => f.projectId == PID && f.status < (int)TaskResultStatus.Complated);
if(taskDone!=null) if(taskDone!=null)
{ {
//还有未完成任务 退出 等待任务下发 //还有未完成任务 退出 等待任务下发
...@@ -248,6 +259,14 @@ namespace Siger.ApiACC.Controllers ...@@ -248,6 +259,14 @@ namespace Siger.ApiACC.Controllers
var section = _sigerProjectLevelSection.Get(f => f.id == taskObj.sectionid); var section = _sigerProjectLevelSection.Get(f => f.id == taskObj.sectionid);
if (section != null) if (section != null)
{ {
var updownDic = stationDicts.Where(s => s.dkey == DictKeyValConst.UploadloadStation);
var uploadStations = updownDic.Select(f => f.dval.ToInt()).ToList();
var uploadPostion = uploadStations.Contains(taskObj.sectionid);
if (uploadPostion)
{
Logger.WriteLineInfo($"AutoProcess 上料料工站 无需自动创建任务 ");
break;
}
AutoProcess(section.parentid, stationDicts); AutoProcess(section.parentid, stationDicts);
} }
break; break;
...@@ -292,9 +311,14 @@ namespace Siger.ApiACC.Controllers ...@@ -292,9 +311,14 @@ namespace Siger.ApiACC.Controllers
var location = _automationLocation.Get(f => f.fixturetools == taskObj.fixtureguid); var location = _automationLocation.Get(f => f.fixturetools == taskObj.fixtureguid);
if (location == null) if (location == null)
{ {
location.ordernumber = taskObj.ordercode; Logger.WriteLineInfo($"PlCfeeback 未找到该工装储位信息");
location.sn = taskObj.sn; throw new BadRequestException(AccEnum.MachineDisable);
} }
location.ordernumber = taskObj.ordercode;
location.productcode = taskObj.productcode;
location.productid = taskObj.productid;
location.sn = taskObj.sn;
_automationLocation.Update(location);
} }
} }
else if (taskObj.action == TaskAction.Step_LK_CJT || taskObj.action == TaskAction.Step_LK_JGZX || taskObj.action == TaskAction.Step_LK_SXLW) else if (taskObj.action == TaskAction.Step_LK_CJT || taskObj.action == TaskAction.Step_LK_JGZX || taskObj.action == TaskAction.Step_LK_SXLW)
...@@ -304,6 +328,8 @@ namespace Siger.ApiACC.Controllers ...@@ -304,6 +328,8 @@ namespace Siger.ApiACC.Controllers
if (location == null) if (location == null)
{ {
location.ordernumber = ""; location.ordernumber = "";
location.productcode = "";
location.productid =0;
location.sn = ""; location.sn = "";
} }
...@@ -372,7 +398,7 @@ namespace Siger.ApiACC.Controllers ...@@ -372,7 +398,7 @@ namespace Siger.ApiACC.Controllers
var updownDic= stationDicts.Where(s => s.dkey == DictKeyValConst.UploadloadStation); var updownDic= stationDicts.Where(s => s.dkey == DictKeyValConst.UploadloadStation);
var uploadStations = updownDic.Select(f => f.dval).ToList(); var uploadStations = updownDic.Select(f => f.dval.ToInt()).ToList();
/* 自动任务创建只有CNC 设备;排除上料设备(手动任务) */ /* 自动任务创建只有CNC 设备;排除上料设备(手动任务) */
...@@ -384,8 +410,8 @@ namespace Siger.ApiACC.Controllers ...@@ -384,8 +410,8 @@ namespace Siger.ApiACC.Controllers
return; return;
} }
// 获取可用 设备状态列表 // 获取可用 设备状态列表 排除上料工位
var machineStatusList = _automationMachineStatus.GetList(f => f.projectId == PID && f.enable == 1); var machineStatusList = _automationMachineStatus.GetList(f => f.projectId == PID && !uploadStations.Contains(f.section) && f.enable == 1);
if (!machineStatusList.Any()) if (!machineStatusList.Any())
{ {
Logger.WriteLineInfo($"AutoProcess 无可用状态的设备"); Logger.WriteLineInfo($"AutoProcess 无可用状态的设备");
...@@ -398,19 +424,15 @@ namespace Siger.ApiACC.Controllers ...@@ -398,19 +424,15 @@ namespace Siger.ApiACC.Controllers
if (cleanMachine.status == (int)Automation.MachineStatus.Complated) if (cleanMachine.status == (int)Automation.MachineStatus.Complated)
{ {
Logger.WriteLineInfo($"AutoProcess 有清洗机完成,创建清洗机Task"); Logger.WriteLineInfo($"AutoProcess 有清洗机完成,创建清洗机Task");
var uploadPostion = uploadStations.Exists(f => f.Contains(cleanMachine.section.ToString()));
if (uploadPostion)
{
Logger.WriteLineInfo($"AutoProcess 上料料工站 无需自动创建任务 ");
return;
}
var monitor = _automationFixtureMonitor.Get(f => f.section == cleanMachine.section); var monitor = _automationFixtureMonitor.Get(f => f.section == cleanMachine.section);
if (monitor==null) if (monitor==null)
{ {
Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息"); Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息");
return; return;
} }
CreateTask(cleanMachine,TaskActionType.Unload, TaskAction.Step_QXJ_LK,monitor.fixtureguid,monitor.ordernumber,monitor.sn,monitor.productCode,monitor.locationId); CreateTask(cleanMachine,TaskActionType.Unload, TaskAction.Step_QXJ_LK,monitor.fixtureguid,monitor.ordernumber,monitor.sn,"无程序",monitor.productCode,monitor.locationId);
return; //完成当前任务 退出 return; //完成当前任务 退出
} }
} }
...@@ -421,19 +443,15 @@ namespace Siger.ApiACC.Controllers ...@@ -421,19 +443,15 @@ namespace Siger.ApiACC.Controllers
if (freeMachine != null) if (freeMachine != null)
{ {
Logger.WriteLineInfo($"AutoProcess 普通空闲,创建普通设备上料Task"); Logger.WriteLineInfo($"AutoProcess 普通空闲,创建普通设备上料Task");
var uploadPostion = uploadStations.Exists(f => f.Contains(freeMachine.section.ToString()));
if (uploadPostion)
{
Logger.WriteLineInfo($"AutoProcess 上料料工站 无需自动创建任务 ");
return;
}
var location = SelectLocation(freeMachine.machineid); var location = SelectLocation(freeMachine.machineid);
if (location==null) if (location==null)
{ {
Logger.WriteLineInfo($"AutoProcess 找不到储位信息"); Logger.WriteLineInfo($"AutoProcess 找不到储位信息");
return; return;
} }
CreateTask(freeMachine,TaskActionType.Load ,TaskAction.Step_LK_JGZX,location.guid,location.ordernumber,location.sn,location.productcode,location.locationid); CreateTask(freeMachine,TaskActionType.Load ,TaskAction.Step_LK_JGZX,location.fixture,location.ordernumber,location.sn,location.pn,location.productCode,location.location);
return; //完成当前任务 退出 return; //完成当前任务 退出
} }
//优先级3:其他设备下料 (加工中心 ->立库) //优先级3:其他设备下料 (加工中心 ->立库)
...@@ -443,19 +461,15 @@ namespace Siger.ApiACC.Controllers ...@@ -443,19 +461,15 @@ namespace Siger.ApiACC.Controllers
if (fullMachine != null && cleanMachine.status==(int)Automation.MachineStatus.Waiting) if (fullMachine != null && cleanMachine.status==(int)Automation.MachineStatus.Waiting)
{ {
Logger.WriteLineInfo($"AutoProcess 普通空闲,创建普通设备下料Task "); Logger.WriteLineInfo($"AutoProcess 普通空闲,创建普通设备下料Task ");
var uploadPostion = uploadStations.Exists(f => f.Contains(cleanMachine.section.ToString()));
if (uploadPostion)
{
Logger.WriteLineInfo($"AutoProcess 上料料工站 无需自动创建任务 ");
return;
}
var monitor = _automationFixtureMonitor.Get(f => f.section == cleanMachine.section); var monitor = _automationFixtureMonitor.Get(f => f.section == cleanMachine.section);
if (monitor == null) if (monitor == null)
{ {
Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息"); Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息");
return; return;
} }
CreateTask(fullMachine,TaskActionType.Unload, TaskAction.Step_JGZX_QXJ, monitor.fixtureguid, monitor.ordernumber, monitor.sn, monitor.productCode, monitor.locationId); CreateTask(fullMachine,TaskActionType.Unload, TaskAction.Step_JGZX_QXJ, monitor.fixtureguid, monitor.ordernumber, monitor.sn,"无程序", monitor.productCode, monitor.locationId);
return; //完成当前任务 退出 return; //完成当前任务 退出
} }
...@@ -475,11 +489,12 @@ namespace Siger.ApiACC.Controllers ...@@ -475,11 +489,12 @@ namespace Siger.ApiACC.Controllers
/// <param name="sn">工件</param> /// <param name="sn">工件</param>
/// <param name="productCode">产品CODE</param> /// <param name="productCode">产品CODE</param>
/// <param name="locationid">储位ID</param> /// <param name="locationid">储位ID</param>
void CreateTask(siger_automation_machine_status machineStatus,TaskActionType actionType, TaskAction taskAction,string guid,string orderno,string sn,string productCode,int locationid) void CreateTask(siger_automation_machine_status machineStatus,TaskActionType actionType, TaskAction taskAction,string guid,string orderno,string sn,string program,string productCode,int locationid)
{ {
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Auto);
_automationTaskList.Insert(new siger_automation_task_list _automationTaskList.Insert(new siger_automation_task_list
{ {
no= taskNo,
projectId = PID, projectId = PID,
sectionid = machineStatus.section, sectionid = machineStatus.section,
trigger = TaskTrigerType.Auto, trigger = TaskTrigerType.Auto,
...@@ -494,6 +509,7 @@ namespace Siger.ApiACC.Controllers ...@@ -494,6 +509,7 @@ namespace Siger.ApiACC.Controllers
status = 1, status = 1,
fixtureguid= guid, fixtureguid= guid,
productcode= productCode, productcode= productCode,
programnumber=program,
locationid= locationid, locationid= locationid,
ordercode= orderno, ordercode= orderno,
sn= sn, sn= sn,
...@@ -510,11 +526,11 @@ namespace Siger.ApiACC.Controllers ...@@ -510,11 +526,11 @@ namespace Siger.ApiACC.Controllers
/// <summary> /// <summary>
/// 自动匹配储位 储位 ->CNC /// 自动匹配储位 储位 ->CNC
/// </summary> /// </summary>
siger_automation_location SelectLocation(int machine) ResponseAutomationLocationRouteInfo SelectLocation(int machine)
{ {
// 当前空闲设备能加工的产品 // 当前空闲设备能加工的产品
var beats = _productionBeatSet.GetList(f => f.projectID == PID && f.machineID == machine); var beats = _productionBeatSet.GetList(f => f.projectID == PID && f.machineID == machine);
var productIds = beats.Select(f => f.product_name.ToInt()).ToList(); var productIds = beats.Select(f => f.product_name.ToInt()).Distinct().ToList();
// 取产品交期最近的订单 // 取产品交期最近的订单
var planOrder = _automationFixtureToolsProduct.GetDeliveryOrder(productIds, PID); var planOrder = _automationFixtureToolsProduct.GetDeliveryOrder(productIds, PID);
...@@ -525,19 +541,41 @@ namespace Siger.ApiACC.Controllers ...@@ -525,19 +541,41 @@ namespace Siger.ApiACC.Controllers
} }
var order = planOrder.FirstOrDefault(); var order = planOrder.FirstOrDefault();
//TODO 20210126
var beatset = beats.Where(f => f.product_name == order.productId.ToString()); var beatset = beats.Where(f => f.product_name == order.productId.ToString());
//var location = _automationLocation.GetList(f => f.projectId == PID && f.ordernumber == order.ordernumber && productIds.Contains(f.productid));
//if (!location.Any())
//{
// Logger.WriteLineInfo($"SelectLocation 未找到最近交期订单号{order.ordernumber} 对应产品 {order.productName}的储位信息");
// return null;
//}
//储位有SN 工件
var location = _automationLocation.GetList(f => f.projectId == PID && productIds.Contains(f.productid));
var hasSnloaction = location.Where(f =>!string.IsNullOrEmpty(f.sn));
if (!hasSnloaction.Any())
return null;
//var routeIds = beatset.Select(s => s.id).ToList(); var result = location.FirstOrDefault();
var location = _automationLocation.GetList(f => f.projectId == PID && f.ordernumber== order.ordernumber && productIds.Contains(f.productid));
if (location==null) var valiateBeat = beatset.FirstOrDefault(f=>f.route_number.ToInt()>result.routenum);
if (valiateBeat==null)
{ {
Logger.WriteLineInfo($"SelectLocation 未找到最近交期订单号{order.ordernumber} 对应产品 {order.productName}的储位信息"); Logger.WriteLineInfo($"SelectLocation 未找到产品的工艺顺序");
return null; return null;
} }
return location.FirstOrDefault(); return new ResponseAutomationLocationRouteInfo
{
fixture = result.fixturetools,
ordernumber=result.ordernumber,
location=result.locationid,
productCode=result.productcode,
sn=result.sn,
pn= valiateBeat.process_number,
route=valiateBeat.route_name
};
} }
......
...@@ -103,7 +103,7 @@ namespace Siger.ApiACC.Controllers ...@@ -103,7 +103,7 @@ namespace Siger.ApiACC.Controllers
var machintAttr = _sigerProjectMachineAttribution.Get(f => f.station == section.id); var machintAttr = _sigerProjectMachineAttribution.Get(f => f.station == section.id);
if(machintAttr==null) if(machintAttr==null)
{ {
Logger.WriteLineInfo($"GetloadStation 未配置清洗工站字典"); Logger.WriteLineInfo($"GetloadStation 未配置工站字典");
continue; continue;
} }
var loadStatus = (int)Automation.MachineStatus.Waiting; var loadStatus = (int)Automation.MachineStatus.Waiting;
...@@ -118,8 +118,10 @@ namespace Siger.ApiACC.Controllers ...@@ -118,8 +118,10 @@ namespace Siger.ApiACC.Controllers
section=section.id, section=section.id,
updatetime=DateTime.Now updatetime=DateTime.Now
}); });
}else }else
{ {
loadStatus = machineStatus.status; loadStatus = machineStatus.status;
} }
data.Add(new ResponseLoadStation { data.Add(new ResponseLoadStation {
...@@ -128,6 +130,8 @@ namespace Siger.ApiACC.Controllers ...@@ -128,6 +130,8 @@ namespace Siger.ApiACC.Controllers
status=loadStatus status=loadStatus
}); });
} }
_unitOfWork.Commit();
return new ObjectResult(data); return new ObjectResult(data);
} }
...@@ -145,14 +149,14 @@ namespace Siger.ApiACC.Controllers ...@@ -145,14 +149,14 @@ namespace Siger.ApiACC.Controllers
var monitor = _automationFixtureMonitor.Get(f => f.section == section); var monitor = _automationFixtureMonitor.Get(f => f.section == section);
var result = new ResponsePlanlFixtureInfo var result = new ResponsePlanlFixtureInfo
{ {
OrderNumber = monitor.ordernumber, OrderNumber = monitor!=null? monitor.ordernumber:"",
FixtureGuid=monitor.fixtureguid, FixtureGuid = monitor != null ? monitor.fixtureguid:"",
FixtureName=monitor.fixturename, FixtureName = monitor != null ? monitor.fixturename:"",
ProductCode=monitor.productCode, ProductCode = monitor != null ? monitor.productCode:"",
ProductName=monitor.productName, ProductName = monitor != null ? monitor.productName:"",
Sn=monitor.sn, Sn = monitor != null ? monitor.sn:"",
status=monitor.status, status = monitor != null ? monitor.status:(int)Automation.MachineStatus.Waiting,
Location=monitor.locationId, Location = monitor != null ? monitor.locationId:0,
}; };
return new ObjectResult(result); return new ObjectResult(result);
} }
...@@ -200,7 +204,7 @@ namespace Siger.ApiACC.Controllers ...@@ -200,7 +204,7 @@ namespace Siger.ApiACC.Controllers
section = loading.section, section = loading.section,
machineid = machineAttr.machine, machineid = machineAttr.machine,
projectId = ProjectId, projectId = ProjectId,
status = (int)Automation.MachineStatus.Produce, status = (int)Automation.MachineStatus.Waiting,
updatetime = DateTime.Now updatetime = DateTime.Now
}); });
} }
...@@ -281,6 +285,7 @@ namespace Siger.ApiACC.Controllers ...@@ -281,6 +285,7 @@ namespace Siger.ApiACC.Controllers
createtime=DateTime.Now, createtime=DateTime.Now,
updatetime=DateTime.Now, updatetime=DateTime.Now,
status=(int)Automation.MachineStatus.Produce, status=(int)Automation.MachineStatus.Produce,
productId=plan.product_id,
productCode=plan.product_code, productCode=plan.product_code,
productName=plan.product_name, productName=plan.product_name,
ordernumber=plandts.OrderNumber, ordernumber=plandts.OrderNumber,
...@@ -293,6 +298,7 @@ namespace Siger.ApiACC.Controllers ...@@ -293,6 +298,7 @@ namespace Siger.ApiACC.Controllers
monitor.section = loading.section; monitor.section = loading.section;
monitor.updatetime = DateTime.Now; monitor.updatetime = DateTime.Now;
monitor.status = (int)Automation.MachineStatus.Produce; monitor.status = (int)Automation.MachineStatus.Produce;
monitor.productId = plan.product_id;
monitor.productName = plan.product_name; monitor.productName = plan.product_name;
monitor.productCode = plan.product_code; monitor.productCode = plan.product_code;
monitor.ordernumber = plandts.OrderNumber; monitor.ordernumber = plandts.OrderNumber;
...@@ -334,10 +340,10 @@ namespace Siger.ApiACC.Controllers ...@@ -334,10 +340,10 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(AccEnum.MachineOnFree); throw new BadRequestException(AccEnum.MachineOnFree);
} }
if (machineStatus.status == (int)Automation.MachineStatus.Complated) //if (machineStatus.status == (int)Automation.MachineStatus.Complated)
{ //{
throw new BadRequestException(AccEnum.MachineProCompalate); // throw new BadRequestException(AccEnum.MachineProCompalate);
} //}
if (!_automationTaskList.CanTask(ProjectId, assemble.section)) if (!_automationTaskList.CanTask(ProjectId, assemble.section))
{ {
...@@ -349,6 +355,8 @@ namespace Siger.ApiACC.Controllers ...@@ -349,6 +355,8 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(AccEnum.MonitorNotfound); throw new BadRequestException(AccEnum.MonitorNotfound);
} }
//移出 上料位
monitor.status = (int)Automation.MachineStatus.Waiting;
...@@ -368,7 +376,7 @@ namespace Siger.ApiACC.Controllers ...@@ -368,7 +376,7 @@ namespace Siger.ApiACC.Controllers
completetime = DateTime.MinValue, completetime = DateTime.MinValue,
trigger = Automation.TaskTrigerType.Manual, trigger = Automation.TaskTrigerType.Manual,
projectId = ProjectId, projectId = ProjectId,
productid = 0, productid = monitor.productId,
sn = monitor.sn, sn = monitor.sn,
ordercode = monitor.ordernumber, ordercode = monitor.ordernumber,
fixtureguid = monitor.fixtureguid, fixtureguid = monitor.fixtureguid,
......
...@@ -69,6 +69,7 @@ namespace Siger.ApiACC.Controllers ...@@ -69,6 +69,7 @@ namespace Siger.ApiACC.Controllers
item.sn = fixture.sn; item.sn = fixture.sn;
item.fixtureCode = fixture.fixtureguid; item.fixtureCode = fixture.fixtureguid;
item.fixtureName = fixture.fixturename; item.fixtureName = fixture.fixturename;
item.status = fixture.status;
} }
result.Add(item); result.Add(item);
......
...@@ -41,7 +41,7 @@ namespace Siger.ApiACC.Controllers ...@@ -41,7 +41,7 @@ namespace Siger.ApiACC.Controllers
[HttpGet] [HttpGet]
public IActionResult GetPageList(string category, string code, string name, string state, int page, int pagesize, string toexcel = "") public IActionResult GetPageList(string category, string code, string name, string state, int page, int pagesize, string toexcel = "")
{ {
var data = _toolsAssemblyRepository.GetPagedList(category.ToInt(), code, name,state.ToInt(), ProjectId, page, pagesize, toexcel); var data = _toolsAssemblyRepository.GetPagedList(category.ToInt(), code, name, state, ProjectId, page, pagesize, toexcel);
var categorys = _toolsCategoryRepository.GetList(q => q.projectId == ProjectId && q.status == (int)RowState.Valid).ToList(); var categorys = _toolsCategoryRepository.GetList(q => q.projectId == ProjectId && q.status == (int)RowState.Valid).ToList();
var list = new List<ResponseAumationFixtureToolsAssembly>(); var list = new List<ResponseAumationFixtureToolsAssembly>();
foreach(var item in data.Data) foreach(var item in data.Data)
...@@ -69,6 +69,9 @@ namespace Siger.ApiACC.Controllers ...@@ -69,6 +69,9 @@ namespace Siger.ApiACC.Controllers
var parentcateIds1 = parentcates1.Select(q => q.id).ToList(); var parentcateIds1 = parentcates1.Select(q => q.id).ToList();
parentcateIds1.Reverse(); parentcateIds1.Reverse();
model.parentcategoryids = parentcateIds1; model.parentcategoryids = parentcateIds1;
model.fileurl = item.fileurl;
model.filename = item.filename;
model.remark = item.remark;
models.Add(model); models.Add(model);
} }
item.childrens = models; item.childrens = models;
...@@ -101,6 +104,7 @@ namespace Siger.ApiACC.Controllers ...@@ -101,6 +104,7 @@ namespace Siger.ApiACC.Controllers
ParentPartNumber = item.partnumber, ParentPartNumber = item.partnumber,
ParentFixtureTool = item.name, ParentFixtureTool = item.name,
ParentSpecfication = item.specfication, ParentSpecfication = item.specfication,
ParentCode = item.code,
Category = "", Category = "",
FixtureTool = "", FixtureTool = "",
PartNumber = "", PartNumber = "",
...@@ -120,10 +124,12 @@ namespace Siger.ApiACC.Controllers ...@@ -120,10 +124,12 @@ namespace Siger.ApiACC.Controllers
ParentPartNumber = son.parentpartnumber, ParentPartNumber = son.parentpartnumber,
ParentFixtureTool = son.parentname, ParentFixtureTool = son.parentname,
ParentSpecfication = son.parentspecfication, ParentSpecfication = son.parentspecfication,
ParentCode = item.parentcode,
Category = son.category, Category = son.category,
FixtureTool = son.name, FixtureTool = son.name,
PartNumber = son.partnumber, PartNumber = son.partnumber,
Specfication = son.specfication, Specfication = son.specfication,
Code = son.code,
Status = son.status == (int)RowState.Valid ? "可用" : "停用", Status = son.status == (int)RowState.Valid ? "可用" : "停用",
Remark = son.remark, Remark = son.remark,
Updator = son.updator, Updator = son.updator,
...@@ -204,7 +210,28 @@ namespace Siger.ApiACC.Controllers ...@@ -204,7 +210,28 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(RequestEnum.LevelCountError); throw new BadRequestException(RequestEnum.LevelCountError);
} }
if (_toolsAssemblyRepository.Get(q => q.projectId == ProjectId && q.son == parentGuid) == null) if (parentExsit != null)
{
parentExsit.filename = req.filename;
parentExsit.attachment = req.fileurl;
parentExsit.remark = req.remark;
parentExsit.updator = UserId;
parentExsit.updatetime = DateTime.Now;
//var sons = _toolsAssemblyRepository.GetList(q => q.parent == parentExsit.son && q.projectId == ProjectId).ToList();
//if (req.status.ToInt() == (int)RowState.Invalid && sons.Count(q => q.status == (int)RowState.Invalid) == sons.Count)
//{
// parentExsit.status = (int)RowState.Invalid;
//}
//else
//{
// parentExsit.status = (int)RowState.Valid;
//}
_toolsAssemblyRepository.Update(parentExsit);
}
if (parentExsit == null)
{ {
var parentEntity = new siger_automation_fixture_tools_assembly var parentEntity = new siger_automation_fixture_tools_assembly
{ {
...@@ -221,6 +248,7 @@ namespace Siger.ApiACC.Controllers ...@@ -221,6 +248,7 @@ namespace Siger.ApiACC.Controllers
status = req.status.ToInt() == (int)RowState.Valid ? (int)RowState.Valid : (int)RowState.Invalid, status = req.status.ToInt() == (int)RowState.Valid ? (int)RowState.Valid : (int)RowState.Invalid,
remark = req.remark remark = req.remark
}; };
_toolsAssemblyRepository.Insert(parentEntity); _toolsAssemblyRepository.Insert(parentEntity);
} }
...@@ -289,7 +317,28 @@ namespace Siger.ApiACC.Controllers ...@@ -289,7 +317,28 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(RequestEnum.LevelCountError); throw new BadRequestException(RequestEnum.LevelCountError);
} }
if (_toolsAssemblyRepository.Get(q => q.projectId == ProjectId && q.son == parentGuid) == null) if (parentExsit != null)
{
parentExsit.filename = req.filename;
parentExsit.attachment = req.fileurl;
parentExsit.remark = req.remark;
parentExsit.updator = UserId;
parentExsit.updatetime = DateTime.Now;
//var sons = _toolsAssemblyRepository.GetList(q => q.parent == parentExsit.son && q.projectId == ProjectId).ToList();
//if (req.status.ToInt() == (int)RowState.Invalid && sons.Count(q => q.status == (int)RowState.Invalid) == sons.Count)
//{
// parentExsit.status = (int)RowState.Invalid;
//}
//else
//{
// parentExsit.status = (int)RowState.Valid;
//}
_toolsAssemblyRepository.Update(parentExsit);
}
if (parentExsit == null)
{ {
var parentEntity = new siger_automation_fixture_tools_assembly var parentEntity = new siger_automation_fixture_tools_assembly
{ {
......
...@@ -79,6 +79,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities ...@@ -79,6 +79,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public class FixtureToolsProductTemplate : ImportBase public class FixtureToolsProductTemplate : ImportBase
{ {
[ExcelColumn("工装类型")]
public string Categroy { get; set; }
[ExcelColumn("*工装名称")] [ExcelColumn("*工装名称")]
public string FixtureTool { get; set; } public string FixtureTool { get; set; }
...@@ -121,9 +124,15 @@ namespace Siger.Middlelayer.Utility.ImportEntities ...@@ -121,9 +124,15 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public class FixtureToolsAssmeblyTemplate : ImportBase public class FixtureToolsAssmeblyTemplate : ImportBase
{ {
[ExcelColumn("父工装类型")]
public string ParentCategory { get; set; }
[ExcelColumn("*父工装名称")] [ExcelColumn("*父工装名称")]
public string ParentFixtureTool { get; set; } public string ParentFixtureTool { get; set; }
[ExcelColumn("子工装类型")]
public string Category { get; set; }
[ExcelColumn("*子工装名称")] [ExcelColumn("*子工装名称")]
public string FixtureTool { get; set; } public string FixtureTool { get; set; }
...@@ -148,6 +157,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities ...@@ -148,6 +157,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[ExcelColumn("父工装规格")] [ExcelColumn("父工装规格")]
public string ParentSpecfication { get; set; } public string ParentSpecfication { get; set; }
[ExcelColumn("父工装编号")]
public string ParentCode { get; set; }
[ExcelColumn("子工装类型")] [ExcelColumn("子工装类型")]
public string Category { get; set; } public string Category { get; set; }
...@@ -160,6 +172,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities ...@@ -160,6 +172,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[ExcelColumn("子工装规格")] [ExcelColumn("子工装规格")]
public string Specfication { get; set; } public string Specfication { get; set; }
[ExcelColumn("子工装编号")]
public string Code { get; set; }
[ExcelColumn("状态")] [ExcelColumn("状态")]
public string Status { get; set; } public string Status { get; set; }
......
...@@ -40,6 +40,10 @@ namespace Siger.Middlelayer.AccRepository.Entities ...@@ -40,6 +40,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
public DateTime updatetime { get; set; } public DateTime updatetime { get; set; }
public string ordernumber { get; set; } public string ordernumber { get; set; }
/// <summary> /// <summary>
/// 产品ID
/// </summary>
public int productId { get; set; }
/// <summary>
/// ///
/// </summary> /// </summary>
public string productCode { get; set; } public string productCode { get; set; }
......
...@@ -38,6 +38,11 @@ namespace Siger.Middlelayer.AccRepository.Entities ...@@ -38,6 +38,11 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 每加工CNC 设备 经过的工序: 标准节拍表 /// 每加工CNC 设备 经过的工序: 标准节拍表
/// </summary> /// </summary>
public string route { get; set; } public string route { get; set; }
/// <summary>
/// 工序顺序
/// </summary>
public int routenum { get; set; }
/// <summary> /// <summary>
/// 附件 /// 附件
/// </summary> /// </summary>
......
...@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
_context = context; _context = context;
} }
public IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int state, int projectid, int page, int pagesize, string toexcel = "") public IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, string state, int projectid, int page, int pagesize, string toexcel = "")
{ {
var query = from q in _context.siger_automation_fixture_tools_assembly var query = from q in _context.siger_automation_fixture_tools_assembly
join t1 in _context.siger_automation_fixture_tools on q.parent equals t1.guid into tt1 join t1 in _context.siger_automation_fixture_tools on q.parent equals t1.guid into tt1
...@@ -61,7 +61,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -61,7 +61,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
parentcategoryid = c1 == null ? 0 : c1.id, parentcategoryid = c1 == null ? 0 : c1.id,
parentcategory = c1.name ?? "", parentcategory = c1.name ?? "",
parentpartnumber = t1.partnumber ?? "", parentpartnumber = t1.partnumber ?? "",
parentspecfication = t1.specification ?? "" parentspecfication = t1.specification ?? "",
parentcode = t1.code ?? ""
}; };
Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> categoryExpression = f => true; Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> categoryExpression = f => true;
if (category > 0) if (category > 0)
...@@ -79,9 +80,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -79,9 +80,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
nameExpression = q => q.name.Contains(name); nameExpression = q => q.name.Contains(name);
} }
Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> stateExpression = f => true; Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> stateExpression = f => true;
if (state > 0) if (!string.IsNullOrEmpty(state))
{ {
stateExpression = q => q.status == state; stateExpression = q => q.status == state.ToInt();
} }
var expression = categoryExpression.And(codeExpression).And(nameExpression).And(stateExpression); var expression = categoryExpression.And(codeExpression).And(nameExpression).And(stateExpression);
if (toexcel.ToInt() == 1) if (toexcel.ToInt() == 1)
......
...@@ -33,9 +33,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -33,9 +33,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
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()
join m in _context.siger_automation_fixture_tools_moniter on q.fixturetools equals m.fixtureguid into mm join r in _context.siger_project_beat_set on q.routeid equals r.id into rr
from m in mm.DefaultIfEmpty()
join r in _context.siger_project_beat_set on m.route equals r.id into rr
from r in rr.DefaultIfEmpty() from r in rr.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseAutomationLocation select new ResponseAutomationLocation
...@@ -57,7 +55,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -57,7 +55,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
updator = u.name ?? "", updator = u.name ?? "",
status = q.status, status = q.status,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : "", updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : "",
sn = m.sn ?? "", sn = q.sn ?? "",
route = r.route_name ?? "", route = r.route_name ?? "",
routenumber = r == null ? "" : r.route_number.ToString(), routenumber = r == null ? "" : r.route_number.ToString(),
cate_guid = c.guid ?? "", cate_guid = c.guid ?? "",
...@@ -104,8 +102,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -104,8 +102,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories
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.locationid join l in _context.siger_wms_storage_location on q.locationid equals l.locationid
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 m in _context.siger_automation_fixture_tools_moniter on q.fixturetools equals m.fixtureguid into mm
from m in mm.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseAutomationLocationList select new ResponseAutomationLocationList
{ {
...@@ -120,7 +116,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -120,7 +116,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
fixturetoolid = t.id, fixturetoolid = t.id,
code = t.code, code = t.code,
name = t.name, name = t.name,
materialsn = m.sn ?? "", materialsn = q.sn ?? "",
categoryid = c == null ? 0 : c.id categoryid = c == null ? 0 : c.id
}; };
var entities = query.AsNoTracking().ToList(); var entities = query.AsNoTracking().ToList();
......
...@@ -27,7 +27,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -27,7 +27,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public bool CanTask(int projectId,int section) public bool CanTask(int projectId,int section)
{ {
var taskObj = _context.siger_automation_task_list.FirstOrDefault(f => f.projectId == projectId && f.status >= (int)TaskResultStatus.Cancel && f.status < (int)TaskResultStatus.Complated); var taskObj = _context.siger_automation_task_list.FirstOrDefault(f => f.projectId == projectId && f.status < (int)TaskResultStatus.Complated);
if (taskObj==null) if (taskObj==null)
return true; return true;
......
...@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface ...@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{ {
public interface IAutomationFixtureToolsAssemblyRepository : IAccRepositoryBase<siger_automation_fixture_tools_assembly> public interface IAutomationFixtureToolsAssemblyRepository : IAccRepositoryBase<siger_automation_fixture_tools_assembly>
{ {
IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int state, int projectid, int page, int pagesize, string toexcel = ""); IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, string state, int projectid, int page, int pagesize, string toexcel = "");
IEnumerable<ResponseAumationFixtureToolsAssembly> GetDetailList(string parent, int projectid); IEnumerable<ResponseAumationFixtureToolsAssembly> GetDetailList(string parent, int projectid);
......
...@@ -152,5 +152,6 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -152,5 +152,6 @@ namespace Siger.Middlelayer.AccRepository.Response
public string parentcategory { get; set; } public string parentcategory { get; set; }
public string parentpartnumber { get; set; } public string parentpartnumber { get; set; }
public string parentspecfication { get; set; } public string parentspecfication { get; set; }
public string parentcode { get; set; }
} }
} }
...@@ -28,4 +28,16 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -28,4 +28,16 @@ namespace Siger.Middlelayer.AccRepository.Response
/// </summary> /// </summary>
public string fixture { get; set; } public string fixture { get; set; }
} }
public class ResponseAutomationLocationRouteInfo
{
public string fixture { get; set; }
public string ordernumber { get; set; }
public string sn { get; set; }
public int location { get; set; }
public string productCode { get; set; }
public string route { get; set; }
public string pn { get; set; }
}
} }
...@@ -267,6 +267,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` ( ...@@ -267,6 +267,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` (
-- ---------------------------- -- ----------------------------
CREATE TABLE IF NOT EXISTS `siger_automation_location` ( CREATE TABLE IF NOT EXISTS `siger_automation_location` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置', `locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID', `fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID', `productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
...@@ -275,6 +276,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_location` ( ...@@ -275,6 +276,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_location` (
`sn` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工件', `sn` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工件',
`routeid` int(11) NULL DEFAULT 0, `routeid` int(11) NULL DEFAULT 0,
`route` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工序', `route` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工序',
`routenum` int(11) NULL DEFAULT 0 COMMENT '工序顺序',
`attachment` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件', `attachment` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件',
`filename` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件名称', `filename` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件名称',
`remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
...@@ -401,7 +403,7 @@ CREATE TABLE `siger_automation_produce_history` ( ...@@ -401,7 +403,7 @@ CREATE TABLE `siger_automation_produce_history` (
`statusid` int(11) NOT NULL DEFAULT 0 COMMENT '设备状态ID', `statusid` int(11) NOT NULL DEFAULT 0 COMMENT '设备状态ID',
`section` int(11) NOT NULL DEFAULT 0 COMMENT '产线ID', `section` int(11) NOT NULL DEFAULT 0 COMMENT '产线ID',
`projectid` int(11) NOT NULL DEFAULT 0, `projectid` int(11) NOT NULL DEFAULT 0,
`productid` int(1) NOT NULL DEFAULT 1 COMMENT '产品ID', `productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品编号', `productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品编号',
`productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称', `productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位ID', `locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位ID',
...@@ -432,6 +434,7 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` ( ...@@ -432,6 +434,7 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
`createtime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', `createtime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间', `updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
`ordernumber` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工令单', `ordernumber` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工令单',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productCode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品CODE', `productCode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品CODE',
`productName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称', `productName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`locationId` int(11) NOT NULL DEFAULT 0, `locationId` int(11) NOT NULL DEFAULT 0,
......
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