Commit a9fa0b60 by lcx

路由修改

parent 40b261fb
......@@ -233,7 +233,7 @@ public ApiResponse SingleAwards([FromBody]WorkloadRequest request)
/// 二次绩效工作量类型列表
/// </summary>
/// <returns></returns>
[Route("api/second/single/list")]
[Route("api/second/worktype/list")]
[HttpPost]
public ApiResponse WorkTypeList([FromBody]WorkloadRequest request)
{
......
......@@ -10,7 +10,7 @@ public class SecondResponse
public List<BodyItem> BodyItems { get; set; }
}
public class HeadItem
public class HeadItem : ICloneable
{
public string FiledId { get; set; }
public string FiledName { get; set; }
......@@ -23,6 +23,11 @@ public class HeadItem
/// <summary> 1 value相加值为1 </summary>
public Nullable<int> SpecialAttr { get; set; }
public Nullable<int> WorkType { get; set; }
public object Clone()
{
return MemberwiseClone();
}
}
public class BodyItem : HeadItem
......
......@@ -298,7 +298,10 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
{
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
result.BodyItems = GetBringItems(request, headItems);
result.BodyItems.AddRange(Mapper.Map<List<BodyItem>>(headItems.Where(t => t.Type == 1)));
var bodys = Mapper.Map<List<BodyItem>>(headItems.Where(t => t.Type == 1));
if (bodys != null && bodys.Any())
bodys.ToList().ForEach(t => t.RowNumber = -1);
result.BodyItems.AddRange(bodys);
}
}
......@@ -475,7 +478,7 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul
for (int i = 0; i < headers.Length; i++)
{
var headItem = headers[i];
var headItem = (HeadItem)headers[i].Clone();
headItem.FiledName = (i % 2 == 0) ? item.TypeName : item.TypeName.Replace("占比", "金额");
headItem.FiledId += item.Id;
headItem.Sort = maxSortValue + sortindex;
......
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