Commit 22cc76a4 by jiawei.su
parents c93d78c5 708e002d
......@@ -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: "维护人",
key: "updator",
},
......
......@@ -69,6 +69,9 @@ namespace Siger.ApiACC.Controllers
var parentcateIds1 = parentcates1.Select(q => q.id).ToList();
parentcateIds1.Reverse();
model.parentcategoryids = parentcateIds1;
model.fileurl = item.fileurl;
model.filename = item.filename;
model.remark = item.remark;
models.Add(model);
}
item.childrens = models;
......@@ -101,6 +104,7 @@ namespace Siger.ApiACC.Controllers
ParentPartNumber = item.partnumber,
ParentFixtureTool = item.name,
ParentSpecfication = item.specfication,
ParentCode = item.code,
Category = "",
FixtureTool = "",
PartNumber = "",
......@@ -120,10 +124,12 @@ namespace Siger.ApiACC.Controllers
ParentPartNumber = son.parentpartnumber,
ParentFixtureTool = son.parentname,
ParentSpecfication = son.parentspecfication,
ParentCode = item.parentcode,
Category = son.category,
FixtureTool = son.name,
PartNumber = son.partnumber,
Specfication = son.specfication,
Code = son.code,
Status = son.status == (int)RowState.Valid ? "可用" : "停用",
Remark = son.remark,
Updator = son.updator,
......@@ -204,7 +210,28 @@ namespace Siger.ApiACC.Controllers
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
{
......@@ -221,6 +248,7 @@ namespace Siger.ApiACC.Controllers
status = req.status.ToInt() == (int)RowState.Valid ? (int)RowState.Valid : (int)RowState.Invalid,
remark = req.remark
};
_toolsAssemblyRepository.Insert(parentEntity);
}
......@@ -289,7 +317,28 @@ namespace Siger.ApiACC.Controllers
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
{
......
......@@ -148,6 +148,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[ExcelColumn("父工装规格")]
public string ParentSpecfication { get; set; }
[ExcelColumn("父工装编号")]
public string ParentCode { get; set; }
[ExcelColumn("子工装类型")]
public string Category { get; set; }
......@@ -160,6 +163,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[ExcelColumn("子工装规格")]
public string Specfication { get; set; }
[ExcelColumn("子工装编号")]
public string Code { get; set; }
[ExcelColumn("状态")]
public string Status { get; set; }
......
......@@ -61,7 +61,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
parentcategoryid = c1 == null ? 0 : c1.id,
parentcategory = c1.name ?? "",
parentpartnumber = t1.partnumber ?? "",
parentspecfication = t1.specification ?? ""
parentspecfication = t1.specification ?? "",
parentcode = t1.code ?? ""
};
Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> categoryExpression = f => true;
if (category > 0)
......
......@@ -152,5 +152,6 @@ namespace Siger.Middlelayer.AccRepository.Response
public string parentcategory { get; set; }
public string parentpartnumber { get; set; }
public string parentspecfication { get; set; }
public string parentcode { get; set; }
}
}
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