bug + +字段
This commit is contained in:
@@ -217,8 +217,10 @@ public static class DictConst
|
||||
/// 设备维修状态
|
||||
/// </summary>
|
||||
public const string RepairStatus = "RepairStatus";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备保养类型
|
||||
/// </summary>
|
||||
public const string EqpMaintainType = "EqpMaintainType";
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -4,6 +4,11 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
||||
{
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单号号
|
||||
/// </summary>
|
||||
public string? mo_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产任务编号
|
||||
/// </summary>
|
||||
|
||||
@@ -377,14 +377,16 @@ namespace Tnb.ProductionMgr
|
||||
.LeftJoin<ToolMolds>((a,b,c,d,e,f,g)=>a.mold_id==g.id)
|
||||
.LeftJoin<PerProcessStandardsH>((a,b,c,d,e,f,g,h)=>a.material_id==h.output_material_id && a.eqp_id==h.equip_id && a.mold_id==h.molds_id && h.enabled==1)
|
||||
.LeftJoin<BasStandardTime>((a,b,c,d,e,f,g,h,i)=>a.process_id==i.process_id && i.enabled==1)
|
||||
.LeftJoin<PrdMo>((a,b,c,d,e,f,g,h,i,j)=>a.mo_id==j.id)
|
||||
.Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode) )
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_task_code),a=>a.mo_task_code.Contains(mo_task_code))
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status)
|
||||
.Select((a, b, c, d, e,f,g,h,i) => new PADPackageTaskPageOutput
|
||||
.Select((a, b, c, d, e,f,g,h,i,j) => new PADPackageTaskPageOutput
|
||||
{
|
||||
id = a.id,
|
||||
mo_task_code = a.mo_task_code,
|
||||
mo_id = a.mo_id,
|
||||
mo_code = j.mo_code,
|
||||
material_id = a.material_id,
|
||||
material_code = b.code,
|
||||
material_name = b.name,
|
||||
|
||||
Reference in New Issue
Block a user