Commit eacd146c by xin.yang

fix bug

parent ac84e1b6
......@@ -24,6 +24,7 @@ namespace Siger.ApiACC.Controllers
private readonly IAutomationFixtureToolsRepository _toolsRepository;
private readonly IAutomationLocationRepository _autoLocationRepository;
private readonly ISigerTrMaterialsRepository _materialsRepository;
pr
public AutomationLocationController(IUnitOfWork unitOfWork, IAutomationFixtureToolsCategoryRepository toolsCategoryRepository,
IAutomationFixtureToolsRepository toolsRepository, IAutomationLocationRepository autoLocationRepository,
......@@ -39,7 +40,11 @@ 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);
var list = new List<ResponseAutomationLocation>();
foreach(var item in data.Data)
{
}
return new PagedObjectResult(data.Data, data.Total, page, pagesize);
}
......@@ -90,9 +95,6 @@ namespace Siger.ApiACC.Controllers
guid = Guid.NewGuid().ToString(),
locationid = req.locationid.ToInt(),
fixturetools = fixturetool.guid,
//materialid = req.materialid.ToInt(),
//processid = req.processid.ToInt(),
//materialstate = state,
attachment = req.fileurl,
filename = req.filename,
remark = req.remark,
......@@ -136,29 +138,8 @@ namespace Siger.ApiACC.Controllers
{
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.fixturetools = fixturetool.guid;
//entity.materialid = req.materialid.ToInt();
//entity.processid = req.processid.ToInt();
//entity.materialstate = state;
entity.attachment = req.fileurl;
entity.filename = req.filename;
entity.remark = req.remark;
......
......@@ -42,7 +42,10 @@ namespace Siger.Middlelayer.AccRepository.Repositories
updator = u.name ?? "",
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : "",
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;
if (category > 0)
......
......@@ -93,11 +93,14 @@ namespace Siger.Middlelayer.AccRepository.Response
/// </summary>
public int fixturetoolid { get; set; }
public string fixturetool { get; set; }
public string partnumber { get; set; }
public string specfication { get; set; }
/// <summary>
/// 产品ID
/// </summary>
public int productid { get; set; }
public string productname { get; set; }
public string productcode { get; set; }
/// <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