Commit b94eaca4 by xin.yang

fix bug

parent da24be25
......@@ -39,6 +39,7 @@ namespace Siger.ApiACC.Controllers
public IActionResult GetPageList(string wavehouseid, string locationid, int page, int pagesize)
{
var data = _autoLocationRepository.GetPagedList(wavehouseid.ToInt(), locationid.ToInt(), ProjectId, page, pagesize);
return new PagedObjectResult(data.Data, data.Total, page, pagesize);
}
......
......@@ -70,13 +70,15 @@ namespace Siger.ApiACC.Controllers
{
guid = Guid.NewGuid().ToString(),
fixturetools = fixtureTool.guid,
remark=req.remark,
productid=req.productid.ToInt(),
remark = req.remark,
productid = req.productid.ToInt(),
projectId = ProjectId,
createtime = DateTime.Now,
updatetime = DateTime.Now,
creator = UserId,
updator = UserId,
attachment = req.fileurl,
filename = req.filename
};
_toolsProductRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
......@@ -123,6 +125,8 @@ namespace Siger.ApiACC.Controllers
entity.productid = req.productid.ToInt();
entity.updatetime = DateTime.Now;
entity.updator = UserId;
entity.filename = req.filename;
entity.attachment = req.fileurl;
_toolsProductRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
{
......
......@@ -32,5 +32,8 @@ namespace Siger.Middlelayer.AccRepository.Entities
public DateTime? updatetime { 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
/// </summary>
public string fixturetools { get; set; }
/// <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>
public string attachment { get; set; }
......
......@@ -32,15 +32,17 @@ namespace Siger.Middlelayer.AccRepository.Repositories
select new ResponseAumationFixtureToolsProduct
{
id = q.id,
categoryid=c.id,
categoryname=c.name,
categoryid = c.id,
categoryname = c.name,
fixturetoolid = t.id,
fixturetool = t.name,
productid = q.productid,
productname = p.name,
remark = q.remark,
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;
if (category > 0)
......
......@@ -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 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 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
from u in uu.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid
......@@ -46,12 +43,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
category = c.name,
code = t.code,
specfication = t.specification,
materialid = q.materialid,
materialcode = m.pn,
processid = q.processid,
processnumber = p == null ? 0 : p.Process_Seq,
processname = p.Process_name ?? "",
materialstate = q.materialstate,
//materialid = q.materialid,
//materialcode = m.pn,
//processid = q.processid,
//processnumber = p == null ? 0 : p.Process_Seq,
//processname = p.Process_name ?? "",
//materialstate = q.materialstate,
fileurl = q.attachment ?? "",
filename = q.filename ?? "",
remark = q.remark,
......
......@@ -87,6 +87,8 @@ namespace Siger.Middlelayer.AccRepository.Request
/// 备注
/// </summary>
public string remark { get; set; }
public string fileurl { get; set; }
public string filename { get; set; }
}
public class RequestUpdateFixtureToolsProduct : RequestAddFixtureToolsProduct
......
......@@ -106,6 +106,8 @@ namespace Siger.Middlelayer.AccRepository.Response
public string updator { get; set; }
public string updatetime { get; set; }
public string fileurl { get; set; }
public string filename { get; set; }
}
public class ResponseAumationFixtureToolsAssembly
......
......@@ -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',
`productid` int(11) NOT NULL DEFAULT 0 COMMENT '产品ID',
`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,
`status` int(11) NOT NULL DEFAULT 1,
`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