Commit 8d6658a9 by tangzhongyang

a

parent bce59136
......@@ -1438,17 +1438,13 @@ public List<string> Cursor(CursorModel model)
{
var dbs = "SELECT ExecOpenLink ,ExecDatabase FROM [DB_SV_Data_Config].[dbo].[SYS_Hospital] where isnull([ExecOpenLink],'')!='' and isnull([ExecDatabase],'')!=''";
List<string> Return = new List<string>();
if (string.IsNullOrEmpty(model.ExecuteSql) || string.IsNullOrEmpty(model.TableName))
Return.Add("请填写流水库表名和待执行sql!");
if (string.IsNullOrEmpty(model.ExecuteSql) || string.IsNullOrEmpty(model.TableName)) Return.Add("请填写流水库表名和待执行sql!");
Return.Add("医院区域:" + (string.IsNullOrEmpty(model.City) ? "全部" : model.City));
Return.Add("医院等级:" + (string.IsNullOrEmpty(model.HosLevel) ? "全部" : model.HosLevel));
Return.Add("医院类型:" + (string.IsNullOrEmpty(model.HosType) ? "全部" : model.HosType));
if (!string.IsNullOrEmpty(model.City))
dbs = dbs + $" and City like '%{model.City}%'";
if (!string.IsNullOrEmpty(model.HosLevel))
dbs = dbs + $" and HosLevel like '%{model.HosLevel}%'";
if (!string.IsNullOrEmpty(model.HosType))
dbs = dbs + $" and HosType like '%{model.HosType}%'";
if (!string.IsNullOrEmpty(model.City)) dbs = dbs + $" and City like '%{model.City}%'";
if (!string.IsNullOrEmpty(model.HosLevel)) dbs = dbs + $" and HosLevel like '%{model.HosLevel}%'";
if (!string.IsNullOrEmpty(model.HosType)) dbs = dbs + $" and HosType like '%{model.HosType}%'";
Return.Add("ExecuteSql:" + model.ExecuteSql);
var hoss = Connection(156).Query<SYS_Hospital>(dbs);
Return.Add("需执行医院数:" + hoss.Count());
......@@ -1474,6 +1470,7 @@ public List<string> Cursor(CursorModel model)
insertInto = insertInto.Substring(0, insertInto.Length - 1) + ")";
Connection(181).Execute(CreateTable);
}
//执行
foreach (var hos in hoss)
{
......
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