Commit 2933aeb5 by xin.yang

fix bug

parent 26bc8367
...@@ -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",
}, },
......
...@@ -204,7 +204,26 @@ namespace Siger.ApiACC.Controllers ...@@ -204,7 +204,26 @@ 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;
//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 +240,7 @@ namespace Siger.ApiACC.Controllers ...@@ -221,6 +240,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 +309,26 @@ namespace Siger.ApiACC.Controllers ...@@ -289,7 +309,26 @@ 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;
//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
{ {
......
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