Commit b558fa43 by 李承祥

删除无效的绩效数据

parent efd0ac30
...@@ -28,6 +28,11 @@ public IEnumerable<TEntity> DapperQuery(string sql, object param) ...@@ -28,6 +28,11 @@ public IEnumerable<TEntity> DapperQuery(string sql, object param)
return context.Database.GetDbConnection().Query<TEntity>(sql, param); return context.Database.GetDbConnection().Query<TEntity>(sql, param);
} }
public int Execute(string sql, object param)
{
return context.Database.GetDbConnection().Execute(sql, param);
}
public bool Add(TEntity entity) public bool Add(TEntity entity)
{ {
context.Set<TEntity>().Add(entity); context.Set<TEntity>().Add(entity);
......
...@@ -17,5 +17,21 @@ public class PerforCofdirectorRepository : PerforRepository<cof_director> ...@@ -17,5 +17,21 @@ public class PerforCofdirectorRepository : PerforRepository<cof_director>
public PerforCofdirectorRepository(PerformanceDbContext context) : base(context) public PerforCofdirectorRepository(PerformanceDbContext context) : base(context)
{ {
} }
public int DeleteData(int allotId)
{
return Execute("delete from im_accountbasic where allotid=@allotid;" +
"delete from im_data where allotid=@allotid;" +
"delete from im_employee where allotid=@allotid;" +
"delete from im_header where allotid=@allotid;" +
"delete from im_specialunit where allotid=@allotid;" +
"delete from per_allot where allotid=@allotid;" +
"delete from per_sheet where allotid=@allotid;" +
"delete from res_accountdoctor where allotid=@allotid;" +
"delete from res_accountnurse where allotid=@allotid;" +
"delete from res_baiscnorm where allotid=@allotid;" +
"delete from res_compute where allotid=@allotid;" +
"delete from res_specialunit where allotid=@allotid;"
, new { allotid = allotId });
}
} }
} }
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