bug + +字段
This commit is contained in:
@@ -6,12 +6,14 @@ using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.EquipMgr.Entities.Dto;
|
||||
using Tnb.EquipMgr.Interfaces;
|
||||
@@ -105,6 +107,19 @@ namespace Tnb.EquipMgr
|
||||
EqpMaintainRecordH eqpSpotInsRecordH = await _repository.GetSingleAsync(x => x.id == id);
|
||||
List<EqpMaintainRecordD> eqpSpotInsRecordDs = await _repository.AsSugarClient().Queryable<EqpMaintainRecordD>()
|
||||
.Where(x => x.maintain_record_id == id).ToListAsync();
|
||||
Dictionary<string, object> typeDic = await _repository.AsSugarClient().Queryable<DictionaryTypeEntity>()
|
||||
.LeftJoin<DictionaryDataEntity>((a, b) => a.Id == b.DictionaryTypeId)
|
||||
.Where((a, b) => a.EnCode == DictConst.EqpMaintainType)
|
||||
.Select((a, b) => new
|
||||
{
|
||||
b.EnCode, b.FullName
|
||||
})
|
||||
.MergeTable()
|
||||
.ToDictionaryAsync(it => it.EnCode, it => it.FullName);
|
||||
eqpSpotInsRecordDs.ForEach(x =>
|
||||
{
|
||||
x.maintain_type = typeDic.ContainsKey(x.maintain_type) ? typeDic[x.maintain_type]+"" : x.maintain_type;
|
||||
});
|
||||
MaintainRecordRepeatOutput output = new MaintainRecordRepeatOutput()
|
||||
{
|
||||
model = eqpSpotInsRecordH,
|
||||
|
||||
@@ -73,8 +73,8 @@ namespace Tnb.EquipMgr
|
||||
result = a.result=="1" ? "合格" : "不合格",
|
||||
repeat_result = a.repeat_result=="1" ? "合格" : "不合格",
|
||||
create_time = a.create_time==null ? "" : a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
spot_record_date_time = a.spot_record_date_time==null ? "" : a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
repeat_time = a.repeat_time==null ? "" : a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
spot_record_date_time = a.spot_record_date_time==null ? "" : a.spot_record_date_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
repeat_time = a.repeat_time==null ? "" : a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
spot_record_user_id = c.RealName,
|
||||
spot_record_user_id_id = a.spot_record_user_id,
|
||||
repeat_user_id = d.RealName,
|
||||
|
||||
Reference in New Issue
Block a user