Commit b94eaca4 by xin.yang

fix bug

parent da24be25
...@@ -39,6 +39,7 @@ namespace Siger.ApiACC.Controllers ...@@ -39,6 +39,7 @@ namespace Siger.ApiACC.Controllers
public IActionResult GetPageList(string wavehouseid, string locationid, int page, int pagesize) public IActionResult GetPageList(string wavehouseid, string locationid, int page, int pagesize)
{ {
var data = _autoLocationRepository.GetPagedList(wavehouseid.ToInt(), locationid.ToInt(), ProjectId, page, pagesize); var data = _autoLocationRepository.GetPagedList(wavehouseid.ToInt(), locationid.ToInt(), ProjectId, page, pagesize);
return new PagedObjectResult(data.Data, data.Total, page, pagesize); return new PagedObjectResult(data.Data, data.Total, page, pagesize);
} }
......
...@@ -70,13 +70,15 @@ namespace Siger.ApiACC.Controllers ...@@ -70,13 +70,15 @@ namespace Siger.ApiACC.Controllers
{ {
guid = Guid.NewGuid().ToString(), guid = Guid.NewGuid().ToString(),
fixturetools = fixtureTool.guid, fixturetools = fixtureTool.guid,
remark=req.remark, remark = req.remark,
productid=req.productid.ToInt(), productid = req.productid.ToInt(),
projectId = ProjectId, projectId = ProjectId,
createtime = DateTime.Now, createtime = DateTime.Now,
updatetime = DateTime.Now, updatetime = DateTime.Now,
creator = UserId, creator = UserId,
updator = UserId, updator = UserId,
attachment = req.fileurl,
filename = req.filename
}; };
_toolsProductRepository.Insert(entity); _toolsProductRepository.Insert(entity);
if (_unitOfWork.Commit() > 0) if (_unitOfWork.Commit() > 0)
...@@ -123,6 +125,8 @@ namespace Siger.ApiACC.Controllers ...@@ -123,6 +125,8 @@ namespace Siger.ApiACC.Controllers
entity.productid = req.productid.ToInt(); entity.productid = req.productid.ToInt();
entity.updatetime = DateTime.Now; entity.updatetime = DateTime.Now;
entity.updator = UserId; entity.updator = UserId;
entity.filename = req.filename;
entity.attachment = req.fileurl;
_toolsProductRepository.Insert(entity); _toolsProductRepository.Insert(entity);
if (_unitOfWork.Commit() > 0) if (_unitOfWork.Commit() > 0)
{ {
......
...@@ -32,5 +32,8 @@ namespace Siger.Middlelayer.AccRepository.Entities ...@@ -32,5 +32,8 @@ namespace Siger.Middlelayer.AccRepository.Entities
public DateTime? updatetime { get; set; } public DateTime? updatetime { get; set; }
public string extend1 { get; set; } public string extend1 { get; set; }
public string attachment { get; set; }
public string filename { get; set; }
} }
} }
...@@ -19,18 +19,6 @@ namespace Siger.Middlelayer.AccRepository.Entities ...@@ -19,18 +19,6 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary> /// </summary>
public string fixturetools { get; set; } public string fixturetools { get; set; }
/// <summary> /// <summary>
/// 物料ID
/// </summary>
public int materialid { get; set; }
/// <summary>
/// 工序ID
/// </summary>
public int processid { get; set; }
/// <summary>
/// 物料状态
/// </summary>
public int materialstate { get; set; }
/// <summary>
/// 附件 /// 附件
/// </summary> /// </summary>
public string attachment { get; set; } public string attachment { get; set; }
......
...@@ -32,15 +32,17 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -32,15 +32,17 @@ namespace Siger.Middlelayer.AccRepository.Repositories
select new ResponseAumationFixtureToolsProduct select new ResponseAumationFixtureToolsProduct
{ {
id = q.id, id = q.id,
categoryid=c.id, categoryid = c.id,
categoryname=c.name, categoryname = c.name,
fixturetoolid = t.id, fixturetoolid = t.id,
fixturetool = t.name, fixturetool = t.name,
productid = q.productid, productid = q.productid,
productname = p.name, productname = p.name,
remark = q.remark, remark = q.remark,
updator = u.name ?? "", updator = u.name ?? "",
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) : ""
fileurl = q.attachment,
filename = q.filename
}; };
Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true; Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true;
if (category > 0) if (category > 0)
......
...@@ -28,9 +28,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -28,9 +28,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_tr_assist_materials on q.materialid equals m.id
join p in _context.siger_project_process on q.processid equals p.id into pp
from p in pp.DefaultIfEmpty()
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()
where q.projectId == projectid && q.status == (int)RowState.Valid where q.projectId == projectid && q.status == (int)RowState.Valid
...@@ -46,12 +43,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -46,12 +43,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
category = c.name, category = c.name,
code = t.code, code = t.code,
specfication = t.specification, specfication = t.specification,
materialid = q.materialid, //materialid = q.materialid,
materialcode = m.pn, //materialcode = m.pn,
processid = q.processid, //processid = q.processid,
processnumber = p == null ? 0 : p.Process_Seq, //processnumber = p == null ? 0 : p.Process_Seq,
processname = p.Process_name ?? "", //processname = p.Process_name ?? "",
materialstate = q.materialstate, //materialstate = q.materialstate,
fileurl = q.attachment ?? "", fileurl = q.attachment ?? "",
filename = q.filename ?? "", filename = q.filename ?? "",
remark = q.remark, remark = q.remark,
......
...@@ -87,6 +87,8 @@ namespace Siger.Middlelayer.AccRepository.Request ...@@ -87,6 +87,8 @@ namespace Siger.Middlelayer.AccRepository.Request
/// 备注 /// 备注
/// </summary> /// </summary>
public string remark { get; set; } public string remark { get; set; }
public string fileurl { get; set; }
public string filename { get; set; }
} }
public class RequestUpdateFixtureToolsProduct : RequestAddFixtureToolsProduct public class RequestUpdateFixtureToolsProduct : RequestAddFixtureToolsProduct
......
...@@ -106,6 +106,8 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -106,6 +106,8 @@ namespace Siger.Middlelayer.AccRepository.Response
public string updator { get; set; } public string updator { get; set; }
public string updatetime { get; set; } public string updatetime { get; set; }
public string fileurl { get; set; }
public string filename { get; set; }
} }
public class ResponseAumationFixtureToolsAssembly public class ResponseAumationFixtureToolsAssembly
......
...@@ -248,6 +248,8 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` ( ...@@ -248,6 +248,8 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` (
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'siger_automation_fixture_tools.guid', `fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'siger_automation_fixture_tools.guid',
`productid` int(11) NOT NULL DEFAULT 0 COMMENT '产品ID', `productid` int(11) NOT NULL DEFAULT 0 COMMENT '产品ID',
`remark` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', `remark` varchar(45) 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 '附件名称',
`projectid` int(11) NOT NULL DEFAULT 0, `projectid` int(11) NOT NULL DEFAULT 0,
`status` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1,
`creator` int(11) NOT NULL DEFAULT 0, `creator` 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