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",
}, },
......
...@@ -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