修改
This commit is contained in:
@@ -14,6 +14,7 @@ using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Domain.Share.Management;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -278,12 +279,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
try
|
||||
{
|
||||
if (datefirst.DateType == "Date")
|
||||
if (datefirst.DateType == FrontAuditDateType.Date.GetDescription())
|
||||
{
|
||||
jsonDataDic[item] = DateTime.Parse(jsonDataDic[item].ToString()).ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
if (datefirst.DateType == "DateTime")
|
||||
if (datefirst.DateType == FrontAuditDateType.DateTime.GetDescription())
|
||||
{
|
||||
jsonDataDic[item] = DateTime.Parse(jsonDataDic[item].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
@@ -425,7 +426,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (value.GetType() == typeof(JArray))
|
||||
{
|
||||
JArray arrays = (JArray)value;
|
||||
if (item.Type.ToLower() == "id".ToLower())
|
||||
if (item.Type.ToLower() == FrontAudit.Id.GetDescription().ToLower())
|
||||
{
|
||||
List<Guid> guids = new List<Guid>();
|
||||
arrays.ForEach(x =>
|
||||
@@ -434,7 +435,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
jsonDataDic[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync());
|
||||
}
|
||||
else if (item.Type.ToLower() == "ChildGroup".ToLower())
|
||||
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
|
||||
{
|
||||
List<string> guids = new List<string>();
|
||||
arrays.ForEach(x =>
|
||||
@@ -473,12 +474,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.Type.ToLower() == "id".ToLower())
|
||||
if (item.Type.ToLower() == FrontAudit.Id.GetDescription().ToLower())
|
||||
{
|
||||
Guid guid = Guid.Parse(value.ToString());
|
||||
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => guid == x.Id).Select(x => x.ValueCN).FirstOrDefaultAsync();
|
||||
}
|
||||
else if (item.Type.ToLower() == "ChildGroup".ToLower())
|
||||
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
|
||||
{
|
||||
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.ChildGroup == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
{
|
||||
@@ -528,12 +529,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
try
|
||||
{
|
||||
if (datefirst.DateType == "Date")
|
||||
if (datefirst.DateType == FrontAuditDateType.Date.GetDescription())
|
||||
{
|
||||
JsonData[item] = DateTime.Parse(JsonData[item].ToString()).ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
if (datefirst.DateType == "DateTime")
|
||||
if (datefirst.DateType == FrontAuditDateType.DateTime.GetDescription())
|
||||
{
|
||||
JsonData[item] = DateTime.Parse(JsonData[item].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user