Commit eacd146c by xin.yang

fix bug

parent ac84e1b6
...@@ -24,6 +24,7 @@ namespace Siger.ApiACC.Controllers ...@@ -24,6 +24,7 @@ namespace Siger.ApiACC.Controllers
private readonly IAutomationFixtureToolsRepository _toolsRepository; private readonly IAutomationFixtureToolsRepository _toolsRepository;
private readonly IAutomationLocationRepository _autoLocationRepository; private readonly IAutomationLocationRepository _autoLocationRepository;
private readonly ISigerTrMaterialsRepository _materialsRepository; private readonly ISigerTrMaterialsRepository _materialsRepository;
pr
public AutomationLocationController(IUnitOfWork unitOfWork, IAutomationFixtureToolsCategoryRepository toolsCategoryRepository, public AutomationLocationController(IUnitOfWork unitOfWork, IAutomationFixtureToolsCategoryRepository toolsCategoryRepository,
IAutomationFixtureToolsRepository toolsRepository, IAutomationLocationRepository autoLocationRepository, IAutomationFixtureToolsRepository toolsRepository, IAutomationLocationRepository autoLocationRepository,
...@@ -39,7 +40,11 @@ namespace Siger.ApiACC.Controllers ...@@ -39,7 +40,11 @@ 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);
var list = new List<ResponseAutomationLocation>();
foreach(var item in data.Data)
{
}
return new PagedObjectResult(data.Data, data.Total, page, pagesize); return new PagedObjectResult(data.Data, data.Total, page, pagesize);
} }
...@@ -90,9 +95,6 @@ namespace Siger.ApiACC.Controllers ...@@ -90,9 +95,6 @@ namespace Siger.ApiACC.Controllers
guid = Guid.NewGuid().ToString(), guid = Guid.NewGuid().ToString(),
locationid = req.locationid.ToInt(), locationid = req.locationid.ToInt(),
fixturetools = fixturetool.guid, fixturetools = fixturetool.guid,
//materialid = req.materialid.ToInt(),
//processid = req.processid.ToInt(),
//materialstate = state,
attachment = req.fileurl, attachment = req.fileurl,
filename = req.filename, filename = req.filename,
remark = req.remark, remark = req.remark,
...@@ -136,29 +138,8 @@ namespace Siger.ApiACC.Controllers ...@@ -136,29 +138,8 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(RequestEnum.DataExist); throw new BadRequestException(RequestEnum.DataExist);
} }
var state = 1;
if (fixturetool != null && material == null)
{
state = 1;//有工装 无工件
}
else if (fixturetool != null && material != null)
{
state = 2;//有工装 有工件
}
else if (fixturetool == null && material == null)
{
state = 3;//无工装 无工件
}
else if (fixturetool == null && material != null)
{
state = 4;//无工装 有工件
}
entity.locationid = req.locationid.ToInt(); entity.locationid = req.locationid.ToInt();
entity.fixturetools = fixturetool.guid; entity.fixturetools = fixturetool.guid;
//entity.materialid = req.materialid.ToInt();
//entity.processid = req.processid.ToInt();
//entity.materialstate = state;
entity.attachment = req.fileurl; entity.attachment = req.fileurl;
entity.filename = req.filename; entity.filename = req.filename;
entity.remark = req.remark; entity.remark = req.remark;
......
...@@ -42,7 +42,10 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -42,7 +42,10 @@ namespace Siger.Middlelayer.AccRepository.Repositories
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, fileurl = q.attachment,
filename = q.filename filename = q.filename,
partnumber = t.partnumber,
specfication = t.specification,
productcode = p.code
}; };
Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true; Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true;
if (category > 0) if (category > 0)
......
...@@ -93,11 +93,14 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -93,11 +93,14 @@ namespace Siger.Middlelayer.AccRepository.Response
/// </summary> /// </summary>
public int fixturetoolid { get; set; } public int fixturetoolid { get; set; }
public string fixturetool { get; set; } public string fixturetool { get; set; }
public string partnumber { get; set; }
public string specfication { get; set; }
/// <summary> /// <summary>
/// 产品ID /// 产品ID
/// </summary> /// </summary>
public int productid { get; set; } public int productid { get; set; }
public string productname { get; set; } public string productname { get; set; }
public string productcode { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
......
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