Commit 8228ebed by lcx

Merge branch 'v2020morge-second' of http://192.168.18.110:8880/zry/performance…

Merge branch 'v2020morge-second' of http://192.168.18.110:8880/zry/performance into v2020morge-second

# Conflicts:
#	performance/Performance.Services/SecondAllot/SecondAllotService.cs
parents 86af1c0c 1be136cc
......@@ -1403,6 +1403,31 @@
</summary>
</member>
<member name="P:Performance.EntityModels.ag_workload_source.UnitType">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.ag_workload_source.ItemId">
<summary>
工作量考核项ID
</summary>
</member>
<member name="P:Performance.EntityModels.ag_workload_source.ItemName">
<summary>
工作量名称
</summary>
</member>
<member name="P:Performance.EntityModels.ag_workload_source.FactorValue">
<summary>
工作量系数
</summary>
</member>
<member name="P:Performance.EntityModels.ag_workload_source.Sort">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.ag_workload_source.Value">
<summary>
......
......@@ -15,6 +15,7 @@ public class SecondAllotResponse
public class Detail
{
public int TempId { get; set; }
public string TempName { get; set; }
/// <summary> 是否归档 </summary>
public int IsArchive { get; set; }
......
......@@ -31,9 +31,11 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
if (!IsAudit(second.Status))
AddWorkTypeDefaultHeadValue(allot.HospitalId, second);
var (tempId, name) = GetUsingTempId(allot.HospitalId, second);
var detail = new Detail()
{
TempId = GetUsingTempId(allot.HospitalId, second),
TempId = tempId,
TempName = name,
IsArchive = allot.States == 8 ? 1 : 0,
States = allot.States,
Status = second.Status ?? 1,
......@@ -310,15 +312,17 @@ private JArray GetBodyResultAfterAudit(int hospitalId, ag_secondallot second, Li
/// <param name="hospitalId"></param>
/// <param name="second"></param>
/// <returns></returns>
private int GetUsingTempId(int hospitalId, ag_secondallot second)
private (int tempId, string name) GetUsingTempId(int hospitalId, ag_secondallot second)
{
int usingTempId = (int)Temp.other;
var usedTemp = agusetempRepository.GetEntity(t => t.HospitalId == hospitalId && t.Department == second.Department && t.UnitType == second.UnitType);
if (usedTemp == null) return usingTempId;
if (IsAudit(second.Status))
usingTempId = (second.UseTempId ?? 0) == 0 ? (int)Temp.other : second.UseTempId.Value;
return usingTempId;
if (usedTemp != null)
{
if (IsAudit(second.Status))
usingTempId = (second.UseTempId ?? 0) == 0 ? (int)Temp.other : second.UseTempId.Value;
}
var temp = agtempRepository.GetEntity(t => t.Id == usingTempId);
return (usingTempId, temp?.TempName);
}
/// <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