@@ -34,5 +34,21 @@ public int ImportData(int allotId)
...
@@ -34,5 +34,21 @@ public int ImportData(int allotId)
select allotid,year,month,hospitalid,sourcetype,accountingunit,department,typename,cellvalue from view_report_original_income where allotid=@allotId;";
select allotid,year,month,hospitalid,sourcetype,accountingunit,department,typename,cellvalue from view_report_original_income where allotid=@allotId;";
returnExecute(sql,new{allotId});
returnExecute(sql,new{allotId});
}
}
/// <summary>
///
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
publicintSupplyData(intallotId)
{
stringsql=@"
insert into cof_drugtype(charge,allotid) select distinct id.typename charge,
@allotId allotid from im_data id
inner join per_sheet ps on id.sheetid = ps.id
where id.allotid = @allotId and ps.sheettype = 3 and ifnull(id.typename, '') != ''
and id.typename not in (select charge from cof_drugtype where allotid = @allotId);";