dbug

parent c24e41ca
......@@ -234,32 +234,32 @@ public void Copy(per_allot allot)
var director = _perforCofdirectorRepository.GetEntities(t => t.AllotID == allotId);
if (director != null)
{
director.ForEach(t => { t.ID = 0; t.AllotID = allot.ID; });
_perforCofdirectorRepository.AddRange(director.ToArray());
var addData = director.Select(t => new cof_director { AllotID = allot.ID, JobTitle = t.JobTitle, TypeName = t.TypeName, Value = t.Value });
_perforCofdirectorRepository.AddRange(addData.ToArray());
}
var durgprop = _perforCofdrugpropRepository.GetEntities(t => t.AllotID == allotId);
if (durgprop != null)
{
durgprop.ForEach(t => { t.ID = 0; t.AllotID = allot.ID; });
_perforCofdrugpropRepository.AddRange(durgprop.ToArray());
var addData = durgprop.Select(t => new cof_drugprop { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value });
_perforCofdrugpropRepository.AddRange(addData.ToArray());
}
var income = _perforCofincomeRepository.GetEntities(t => t.AllotID == allotId);
if (income != null)
{
income.ForEach(t => { t.ID = 0; t.AllotID = allot.ID; });
_perforCofincomeRepository.AddRange(income.ToArray());
var addData = income.Select(t => new cof_income { AllotID = allot.ID, SheetNameKeyword = t.SheetNameKeyword, UnitName = t.UnitName, Value = t.Value });
_perforCofincomeRepository.AddRange(addData.ToArray());
}
var position = _perforCofpositionRepository.GetEntities(t => t.AllotID == allotId);
if (position != null)
{
position.ForEach(t => { t.ID = 0; t.AllotID = allot.ID; });
_perforCofpositionRepository.AddRange(position.ToArray());
var addData = position.Select(t => new cof_position { AllotID = allot.ID, JobTitle = t.JobTitle, ExtraFactor = t.ExtraFactor, JobType = t.JobType, State = t.State });
_perforCofpositionRepository.AddRange(addData.ToArray());
}
var workyear = _perforCofworkyearRepository.GetEntities(t => t.AllotID == allotId);
if (workyear != null)
{
workyear.ForEach(t => { t.ID = 0; t.AllotID = allot.ID; });
_perforCofworkyearRepository.AddRange(workyear.ToArray());
var addData = workyear.Select(t => new cof_workyear { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value });
_perforCofworkyearRepository.AddRange(addData.ToArray());
}
}
}
......
......@@ -27,7 +27,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var row = sheet.GetRow(r);
if (row == null) continue;
var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell).ToString();
var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell).ToString();
if (string.IsNullOrEmpty(accountingUnit))
continue;
PerDataSpecialUnit employee = new PerDataSpecialUnit
......
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