代码格式化

parent c6911236
...@@ -1096,7 +1096,7 @@ public void NewCopy(CopyRequest request) ...@@ -1096,7 +1096,7 @@ public void NewCopy(CopyRequest request)
logger.LogInformation($"copy workItems"); logger.LogInformation($"copy workItems");
var workItems = _workitemRepository.GetEntities(t => t.AllotID == allot.ID); var workItems = _workitemRepository.GetEntities(t => t.AllotID == allot.ID);
//先判断是否为空,不为空删除再执行下面的代码 //先判断是否为空,不为空删除再执行下面的代码
if (workItems!=null) if (workItems != null)
{ {
_workitemRepository.RemoveRange(workItems.ToArray()); _workitemRepository.RemoveRange(workItems.ToArray());
} }
...@@ -1110,7 +1110,7 @@ public void NewCopy(CopyRequest request) ...@@ -1110,7 +1110,7 @@ public void NewCopy(CopyRequest request)
case "drugTypes": case "drugTypes":
logger.LogInformation($"copy drugTypes"); logger.LogInformation($"copy drugTypes");
var drugTypes = _drugtypeRepository.GetEntities(t => t.AllotID == allot.ID && t.HospitalId == allot.HospitalId); var drugTypes = _drugtypeRepository.GetEntities(t => t.AllotID == allot.ID && t.HospitalId == allot.HospitalId);
if (drugTypes!=null) if (drugTypes != null)
{ {
_drugtypeRepository.RemoveRange(drugTypes.ToArray()); _drugtypeRepository.RemoveRange(drugTypes.ToArray());
} }
...@@ -1126,7 +1126,7 @@ public void NewCopy(CopyRequest request) ...@@ -1126,7 +1126,7 @@ public void NewCopy(CopyRequest request)
case "drugTypeDisburses": case "drugTypeDisburses":
logger.LogInformation($"copy drugTypeDisburses"); logger.LogInformation($"copy drugTypeDisburses");
var drugTypeDisburses = drugtypeDisburseRepository.GetEntities(t => t.AllotID == allot.ID && t.HospitalId == allot.HospitalId); var drugTypeDisburses = drugtypeDisburseRepository.GetEntities(t => t.AllotID == allot.ID && t.HospitalId == allot.HospitalId);
if (drugTypeDisburses!=null) if (drugTypeDisburses != null)
{ {
drugtypeDisburseRepository.RemoveRange(drugTypeDisburses.ToArray()); drugtypeDisburseRepository.RemoveRange(drugTypeDisburses.ToArray());
} }
...@@ -1140,7 +1140,7 @@ public void NewCopy(CopyRequest request) ...@@ -1140,7 +1140,7 @@ public void NewCopy(CopyRequest request)
case "drugTypeFactors": case "drugTypeFactors":
logger.LogInformation($"copy drugTypeFactors"); logger.LogInformation($"copy drugTypeFactors");
var drugTypeFactors = cofdrugtypefactorRepository.GetEntities(t => t.AllotID == allot.ID); var drugTypeFactors = cofdrugtypefactorRepository.GetEntities(t => t.AllotID == allot.ID);
if (drugTypeFactors!=null) if (drugTypeFactors != null)
{ {
cofdrugtypefactorRepository.RemoveRange(drugTypeFactors.ToArray()); cofdrugtypefactorRepository.RemoveRange(drugTypeFactors.ToArray());
} }
...@@ -1163,7 +1163,7 @@ public void NewCopy(CopyRequest request) ...@@ -1163,7 +1163,7 @@ public void NewCopy(CopyRequest request)
case "deptTypes": case "deptTypes":
logger.LogInformation($"copy deptTypes"); logger.LogInformation($"copy deptTypes");
var deptTypes = perforCofdepttypeRepository.GetEntities(t => t.AllotID == allot.ID); var deptTypes = perforCofdepttypeRepository.GetEntities(t => t.AllotID == allot.ID);
if (deptTypes!=null) if (deptTypes != null)
{ {
perforCofdepttypeRepository.RemoveRange(deptTypes.ToArray()); perforCofdepttypeRepository.RemoveRange(deptTypes.ToArray());
} }
...@@ -1177,7 +1177,7 @@ public void NewCopy(CopyRequest request) ...@@ -1177,7 +1177,7 @@ public void NewCopy(CopyRequest request)
case "agains": case "agains":
logger.LogInformation($"copy agains"); logger.LogInformation($"copy agains");
var agains = _againRepository.GetEntities(t => t.AllotID == allot.ID); var agains = _againRepository.GetEntities(t => t.AllotID == allot.ID);
if (agains!=null) if (agains != null)
{ {
_againRepository.RemoveRange(agains.ToArray()); _againRepository.RemoveRange(agains.ToArray());
} }
...@@ -1192,7 +1192,7 @@ public void NewCopy(CopyRequest request) ...@@ -1192,7 +1192,7 @@ public void NewCopy(CopyRequest request)
case "accountings": case "accountings":
logger.LogInformation($"copy accountings"); logger.LogInformation($"copy accountings");
var accountings = cofaccountingRepository.GetEntities(t => t.AllotId == allot.ID); var accountings = cofaccountingRepository.GetEntities(t => t.AllotId == allot.ID);
if (accountings!=null) if (accountings != null)
{ {
cofaccountingRepository.RemoveRange(accountings.ToArray()); cofaccountingRepository.RemoveRange(accountings.ToArray());
} }
......
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