Commit edc17ee4 by xin.yang

fix bug

parent 45ae8c92
...@@ -937,6 +937,10 @@ namespace Siger.ApiWMS.Controllers ...@@ -937,6 +937,10 @@ namespace Siger.ApiWMS.Controllers
foreach (var Location in req.storeArr) foreach (var Location in req.storeArr)
{ {
if (req.storeArr.Count(q => q.val == Location.val) > 1)
{
throw new BadRequestException(RequestEnum.DataExist);
}
var loca = location.Get(q => q.realname == Location.val && q.projectid == ProjectId); var loca = location.Get(q => q.realname == Location.val && q.projectid == ProjectId);
if (loca != null) if (loca != null)
{ {
...@@ -1056,6 +1060,10 @@ namespace Siger.ApiWMS.Controllers ...@@ -1056,6 +1060,10 @@ namespace Siger.ApiWMS.Controllers
foreach (var Location in req.storeArr) foreach (var Location in req.storeArr)
{ {
if (req.storeArr.Count(q => q.val == Location.val) > 1)
{
throw new BadRequestException(RequestEnum.DataExist);
}
var loca = location.Get(q => q.realname == Location.val && q.projectid == ProjectId && q.id != Location.locationid.ToInt()); var loca = location.Get(q => q.realname == Location.val && q.projectid == ProjectId && q.id != Location.locationid.ToInt());
if (loca != null) if (loca != null)
{ {
......
...@@ -39,7 +39,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -39,7 +39,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
productid = q.productid, productid = q.productid,
productname = p.name, productname = p.name,
remark = q.remark, remark = q.remark,
updator = q.updator, 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) : ""
}; };
Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true; Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true;
......
...@@ -103,7 +103,7 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -103,7 +103,7 @@ namespace Siger.Middlelayer.AccRepository.Response
/// </summary> /// </summary>
public string remark { get; set; } public string remark { get; set; }
public int updator { get; set; } public string updator { get; set; }
public string updatetime { get; set; } public string updatetime { get; set; }
} }
......
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