Commit 5da68974 by 钟博

HRP保存调整

parent dd4cd599
...@@ -868,14 +868,14 @@ public HandsonTable GetHrpDeptHands(int HospitalId,int AllotId) ...@@ -868,14 +868,14 @@ public HandsonTable GetHrpDeptHands(int HospitalId,int AllotId)
public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData request) public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData request)
{ {
var dicData = CreateDataRow(allotId, request, HrpDept); var dicData = CreateDataRow(hospitalId,allotId, request, HrpDept);
List<cof_hrp_department> depts = new List<cof_hrp_department>(); List<cof_hrp_department> depts = new List<cof_hrp_department>();
foreach (var item in dicData) foreach (var item in dicData)
{ {
var json = JsonHelper.Serialize(item); var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<cof_hrp_department>(json); var data = JsonHelper.Deserialize<cof_hrp_department>(json);
if (!string.IsNullOrEmpty(data.HRPDepartment)) if (!string.IsNullOrEmpty(data.HRPDepartment) && !string.IsNullOrEmpty(data.AccountingUnit))
{ {
data.HospitalId = hospitalId; data.HospitalId = hospitalId;
data.AllotId = allotId; data.AllotId = allotId;
...@@ -888,7 +888,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques ...@@ -888,7 +888,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
perforCofHrpDeptRepository.AddRange(depts.ToArray()); perforCofHrpDeptRepository.AddRange(depts.ToArray());
} }
private List<Dictionary<string, string>> CreateDataRow(int allotId, SaveCollectData request, Dictionary<string, string> config) private List<Dictionary<string, string>> CreateDataRow(int hospitalId, int allotId, SaveCollectData request, Dictionary<string, string> config)
{ {
List<Dictionary<string, string>> allData = new List<Dictionary<string, string>>(); List<Dictionary<string, string>> allData = new List<Dictionary<string, string>>();
...@@ -896,7 +896,8 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques ...@@ -896,7 +896,8 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
{ {
// 创建固定数据列 // 创建固定数据列
Dictionary<string, string> baseData = CreateBaseData(request, config, r); Dictionary<string, string> baseData = CreateBaseData(request, config, r);
baseData.Add(nameof(collect_data.AllotID), allotId.ToString()); baseData.Add(nameof(cof_hrp_department.AllotId), allotId.ToString());
baseData.Add(nameof(cof_hrp_department.HospitalId),hospitalId.ToString());
allData.Add(baseData); allData.Add(baseData);
} }
...@@ -923,7 +924,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques ...@@ -923,7 +924,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
public static Dictionary<string, string> HrpDept { get; } = new Dictionary<string, string> public static Dictionary<string, string> HrpDept { get; } = new Dictionary<string, string>
{ {
{nameof(cof_hrp_department.HRPDepartment), "HRP人员科室"}, {nameof(cof_hrp_department.HRPDepartment), "hrp人员科室"},
{nameof(cof_hrp_department.AccountingUnit), "核算单元"}, {nameof(cof_hrp_department.AccountingUnit), "核算单元"},
}; };
///// <summary> ///// <summary>
......
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