Commit ea9cb43a by 李承祥

report_original_income删除历史数据,二次绩效模板列表异常

parent efe9bd8a
...@@ -25,8 +25,11 @@ public bool UpdateAllotStates(int allotId, int states, string remark) ...@@ -25,8 +25,11 @@ public bool UpdateAllotStates(int allotId, int states, string remark)
public int ImportData(int allotId) public int ImportData(int allotId)
{ {
string sql = @" string sql = @"
delete from report_allot_summary where allotid=@allotId;
insert into report_allot_summary(allotid,year,month,hospitalid,realgivefee) insert into report_allot_summary(allotid,year,month,hospitalid,realgivefee)
select allotid,year,month,hospitalid,realgivefee from view_report_allot_summary where allotid=@allotId; select allotid,year,month,hospitalid,realgivefee from view_report_allot_summary where allotid=@allotId;
delete from report_original_income where allotid=@allotId;
insert into report_original_income(allotid,year,month,hospitalid,sourcetype,accountingunit,department,typename,cellvalue) insert into report_original_income(allotid,year,month,hospitalid,sourcetype,accountingunit,department,typename,cellvalue)
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;";
return Execute(sql, new { allotId }); return Execute(sql, new { allotId });
......
...@@ -139,7 +139,8 @@ public List<SecondTempResponse> GetTemp(int hospitalid) ...@@ -139,7 +139,8 @@ public List<SecondTempResponse> GetTemp(int hospitalid)
{ {
var useTemp = perforAgusetempRepository.GetEntity(t => t.HospitalId == hospitalid); var useTemp = perforAgusetempRepository.GetEntity(t => t.HospitalId == hospitalid);
var secondTemps = Mapper.Map<List<SecondTempResponse>>(temps); var secondTemps = Mapper.Map<List<SecondTempResponse>>(temps);
secondTemps.ForEach(t => t.IsSelected = t.Id == useTemp.UseTempId); if (useTemp != null)
secondTemps.ForEach(t => t.IsSelected = t.Id == useTemp.UseTempId);
return secondTemps; return secondTemps;
} }
return new List<SecondTempResponse>(); return new List<SecondTempResponse>();
......
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