考核录入修改

parent 83434a8d
......@@ -14,19 +14,7 @@ public class AssessDataRequest : ApiRequest
public class AssessRow
{
public int DataID { get; set; }
public int AssessID { get; set; }
public List<AssessData> AssessData { get; set; }
public AssessRow()
{
AssessData = new List<AssessData>();
}
}
public class AssessData
{
public int ColumnID { get; set; }
public int ColumnName { get; set; }
public decimal ColumnValue { get; set; }
public string DataValue { get; set; }
}
public class AssessDataRequestValidator : AbstractValidator<AssessDataRequest>
......
......@@ -17,11 +17,6 @@ public class AssessDataResponse
/// 科室
/// </summary>
public string Department { get; set; }
public List<AssessData> AssessData { get; set; }
public AssessDataResponse()
{
AssessData = new List<AssessData>();
}
public string RowData { get; set; }
}
}
......@@ -218,9 +218,7 @@ public ApiResponse DataList(int assessID)
ID = t.ID,
AssessID = t.AssessID,
Department = t.Department,
AssessData = string.IsNullOrEmpty(t.RowData)
? new List<AssessData>()
: JsonHelper.Deserialize<List<AssessData>>(t.RowData)
RowData = t.RowData
});
return new ApiResponse(ResponseType.OK, response);
}
......@@ -241,7 +239,7 @@ public ApiResponse EditAssessData(List<AssessRow> request)
var entity = dataList.FirstOrDefault(t => t.ID == item.DataID);
if (entity != null)
{
entity.RowData = JsonHelper.Serialize(item.AssessData);
entity.RowData = item.DataValue;
perforAsdataRepository.Update(entity);
}
}
......
......@@ -31,7 +31,7 @@ public List<HospitalResponse> GetUserHopital(int userid)
throw new PerformanceException($"userid:{userid} 错误");
var joinList = _joinRepository.GetEntities(t => t.UserID == userid);
if (joinList == null && joinList.Count == 0)
if (joinList == null || joinList.Count == 0)
return null;
var hosList = _hospitalRepository.GetEntities(t => joinList.Select(j => j.HospitalID).Contains(t.ID));
......
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