带出上次配置时取消开关限制

parent 651fab28
......@@ -670,10 +670,11 @@ public void Copy(per_allot allot)
if (orgDurgprop == null || orgDurgprop.Count == 0)
{
var durgprop = _drugpropRepository.GetEntities(t => t.AllotID == allotId) ?? _drugpropRepository.GetEntities(t => t.AllotID == -1);
var newDurgprops = durgprop.Select(t => new cof_drugprop { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value });
if (hospital != null && hospital?.IsOpenDrugprop == 2)
newDurgprops = new List<cof_drugprop> { new cof_drugprop { AllotID = allot.ID, MaxRange = 1000, MinRange = 0, Value = 1 } };
_drugpropRepository.AddRange(newDurgprops.ToArray());
var newDurgprops = durgprop?.Select(t => new cof_drugprop { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value });
//if (hospital != null && hospital?.IsOpenDrugprop == 2)
// newDurgprops = new List<cof_drugprop> { new cof_drugprop { AllotID = allot.ID, MaxRange = 1000, MinRange = 0, Value = 1 } };
if (durgprop != null && durgprop.Any())
_drugpropRepository.AddRange(newDurgprops.ToArray());
}
logger.LogInformation($"workItem");
......
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