Commit 5fb4a0ab by ruyun.zhang

手工数据录入调整

parent cd1acd9b
......@@ -1592,10 +1592,10 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
sheetHeads = sheetHeads.Where(w => !takeOut.Contains(w.HeadName));
result = sheetHeads.GroupBy(t => t.ModuleName).Select(s => new GatherDropResponse
{
Value = Regex.Replace(s.Key.Replace(" ", "").Replace(".", ""), "[0-9]", ""),
Value = s.Key,
Children = sheetHeads.Where(t => t.ModuleName == s.Key).Select(t => new GatherDropResponse()
{
Value = Regex.Replace(t.HeadName.Replace(" ", "").Replace(".", ""), "[0-9]", "")
Value = t.HeadName
}).ToList()
}).ToList();
}
......@@ -1606,10 +1606,10 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
result = permissions.GroupBy(t => t.SheetName).Select(s => new GatherDropResponse
{
Value = Regex.Replace(s.Key.Replace(" ", "").Replace(".", ""), "[0-9]", ""),
Value = s.Key,
Children = permissions.Where(t => t.SheetName == s.Key).Select(t => new GatherDropResponse()
{
Value = Regex.Replace(t.HeadName.Replace(" ", "").Replace(".", ""), "[0-9]", "")
Value = t.HeadName
}).ToList()
}).ToList();
}
......@@ -1680,7 +1680,7 @@ public GatherInfo GetGather(Gather gather)
var result = datas.Select(t => new GatherInfoRequest
{
Source = Regex.Replace(t.Source.Replace(" ", "").Replace(".", ""), "[0-9]", ""),
Source = t.Source,
CreateTime = t.CreateTime.ToString("d"),
Department = t.Department,
UserId = t.Submitter,
......@@ -1719,7 +1719,7 @@ public GatherResponse GetGatherTotal(Gather gather)
var userLogin = user.FirstOrDefault(t => t.ID == gather.UserId);
var userSource = perforcollectpermissionRepository.GetEntities(t => t.UserId == gather.UserId)
.Select(s => Regex.Replace(s.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", ""))
.Select(s => s.SheetName)
.Distinct().ToList();
var userrole = userroleRepository.GetEntity(t => t.UserID == gather.UserId);
......@@ -1873,7 +1873,8 @@ public ApiResponse SaveGatherHands(int allotId, SaveGatherData saveGather)
var sheets = perforPersheetRepository.GetEntities(w => w.AllotID == allotId);
if (sheets != null && sheets.Any())
{
if (!sheets.Select(t => t.SheetName).Any(t => t.Contains(saveGather.Source)))
var tempSourceName = Regex.Replace(saveGather.Source.Replace(" ", "").Replace(".", ""), "[0-9]", "");
if (!sheets.Select(t => t.SheetName).Any(t => t.Contains(tempSourceName)))
throw new PerformanceException($"来源错误[{saveGather.Source}]");
}
......
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