去除warn
This commit is contained in:
@@ -2,15 +2,15 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipDaqQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string data_source { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? data_source { get; set; }
|
||||
public string create_id { get; set; }
|
||||
public string create_time { get; set; }
|
||||
public string data_type { get; set; }
|
||||
public string enabled { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string label_name { get; set; }
|
||||
public string label_point { get; set; }
|
||||
public string remark { get; set; }
|
||||
public string? create_time { get; set; }
|
||||
public string? data_type { get; set; }
|
||||
public string? enabled { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? label_name { get; set; }
|
||||
public string? label_point { get; set; }
|
||||
public string? remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,13 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipFileQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string attachment { get; set; }
|
||||
public string create_id { get; set; }
|
||||
public string create_id_id { get; set; }
|
||||
public string create_time { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string equip_id_id { get; set; }
|
||||
public string file_name { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? attachment { get; set; }
|
||||
public string? create_id { get; set; }
|
||||
public string? create_id_id { get; set; }
|
||||
public string? create_time { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? equip_id_id { get; set; }
|
||||
public string? file_name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,20 +2,20 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipMaintainRecordQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string attachment { get; set; }
|
||||
public string create_time { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string equip_id_id { get; set; }
|
||||
public string execute_time { get; set; }
|
||||
public string execute_user_id { get; set; }
|
||||
public string repeat_remark { get; set; }
|
||||
public string repeat_result { get; set; }
|
||||
public string repeat_time { get; set; }
|
||||
public string repeat_user_id { get; set; }
|
||||
public string result { get; set; }
|
||||
public string result_remark { get; set; }
|
||||
public string maintain_tem_equip_id { get; set; }
|
||||
public string status { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? attachment { get; set; }
|
||||
public string? create_time { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? equip_id_id { get; set; }
|
||||
public string? execute_time { get; set; }
|
||||
public string? execute_user_id { get; set; }
|
||||
public string? repeat_remark { get; set; }
|
||||
public string? repeat_result { get; set; }
|
||||
public string? repeat_time { get; set; }
|
||||
public string? repeat_user_id { get; set; }
|
||||
public string? result { get; set; }
|
||||
public string? result_remark { get; set; }
|
||||
public string? maintain_tem_equip_id { get; set; }
|
||||
public string? status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipQueryInput
|
||||
{
|
||||
public string equip_id { get; set; }
|
||||
public string equip_id { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 当前页码:pageIndex.
|
||||
@@ -14,6 +14,6 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
/// </summary>
|
||||
public virtual int pageSize { get; set; } = 50;
|
||||
|
||||
public string queryJson { get; set; }
|
||||
public string? queryJson { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,15 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipRepairRecordQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string code { get; set; }
|
||||
public string name { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string apply_user_id { get; set; }
|
||||
public string is_ugent { get; set; }
|
||||
public string description { get; set; }
|
||||
public string complete_time { get; set; }
|
||||
public string repairer_id { get; set; }
|
||||
public string repair_description { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? code { get; set; }
|
||||
public string? name { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? apply_user_id { get; set; }
|
||||
public string? is_ugent { get; set; }
|
||||
public string? description { get; set; }
|
||||
public string? complete_time { get; set; }
|
||||
public string? repairer_id { get; set; }
|
||||
public string? repair_description { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipSparePartsInput
|
||||
{
|
||||
public string equip_id { get; set; }
|
||||
public string equip_id { get; set; } = string.Empty;
|
||||
|
||||
public List<string> spare_parts_ids { get; set; }
|
||||
public List<string>? spare_parts_ids { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,12 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipSparePartsQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string type_code { get; set; }
|
||||
public string type_name { get; set; }
|
||||
public string code { get; set; }
|
||||
public string name { get; set; }
|
||||
public string specification { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? type_code { get; set; }
|
||||
public string? type_name { get; set; }
|
||||
public string? code { get; set; }
|
||||
public string? name { get; set; }
|
||||
public string? specification { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipSpotInsRecordQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string attachment { get; set; }
|
||||
public string create_time { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string repeat_remark { get; set; }
|
||||
public string repeat_result { get; set; }
|
||||
public string repeat_time { get; set; }
|
||||
public string repeat_user_id { get; set; }
|
||||
public string result { get; set; }
|
||||
public string result_remark { get; set; }
|
||||
public string spot_ins_tem_equip_id { get; set; }
|
||||
public string spot_record_date_time { get; set; }
|
||||
public string spot_record_user_id { get; set; }
|
||||
public string status { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? attachment { get; set; }
|
||||
public string? create_time { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? repeat_remark { get; set; }
|
||||
public string? repeat_result { get; set; }
|
||||
public string? repeat_time { get; set; }
|
||||
public string? repeat_user_id { get; set; }
|
||||
public string? result { get; set; }
|
||||
public string? result_remark { get; set; }
|
||||
public string? spot_ins_tem_equip_id { get; set; }
|
||||
public string? spot_record_date_time { get; set; }
|
||||
public string? spot_record_user_id { get; set; }
|
||||
public string? status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class EquipTechnologyParameterQueryOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string definition { get; set; }
|
||||
public string remark { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? name { get; set; }
|
||||
public string? definition { get; set; }
|
||||
public string? remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,12 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class MaintainRecordRepeatInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string id { get; set; } = string.Empty;
|
||||
|
||||
public string repeat_result { get; set; } = string.Empty;
|
||||
|
||||
public string repeat_result { get; set; }
|
||||
public string? repeat_remark { get; set; }
|
||||
|
||||
public string repeat_remark { get; set; }
|
||||
|
||||
public List<Dictionary<string,string>> details { get; set; }
|
||||
public List<Dictionary<string,string>>? details { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class MaintainRecordRepeatOutput
|
||||
{
|
||||
public EqpMaintainRecordH model { get; set; }
|
||||
public EqpMaintainRecordH? model { get; set; }
|
||||
|
||||
public List<EqpMaintainRecordD> details { get; set; }
|
||||
public List<EqpMaintainRecordD>? details { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class RepairApplyDetailOutput
|
||||
{
|
||||
public EqpRepairApply eqpRepairApply { get; set; }
|
||||
public EqpRepairOutApply eqpRepairOutApply { get; set; }
|
||||
public EqpRepairApply? eqpRepairApply { get; set; }
|
||||
public EqpRepairOutApply? eqpRepairOutApply { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class RepairApplyOutRegisterInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string? id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实际维修供应商id
|
||||
@@ -37,6 +37,6 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
/// <summary>
|
||||
/// 报修申请id
|
||||
/// </summary>
|
||||
public string repair_apply_id { get; set; }
|
||||
public string? repair_apply_id { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,12 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class RepairApplyRegisterInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string? id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 故障ID
|
||||
/// </summary>
|
||||
public string fault_id { get; set; }
|
||||
public string? fault_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完成
|
||||
|
||||
@@ -2,16 +2,16 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class RepairDelayInput
|
||||
{
|
||||
public string repair_apply_id { get; set; }
|
||||
public string? repair_apply_id { get; set; }
|
||||
|
||||
public string equip_id { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
|
||||
public string repair_request_sender_id { get; set; }
|
||||
public string? repair_request_sender_id { get; set; }
|
||||
|
||||
public string repair_sender_id { get; set; }
|
||||
public string? repair_sender_id { get; set; }
|
||||
|
||||
public DateTime expected_time { get; set; }
|
||||
|
||||
public string delay_reason { get; set; }
|
||||
public string? delay_reason { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,13 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class RepairOutApplyInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string repair_apply_id { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? repair_apply_id { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? supplier_id { get; set; }
|
||||
public decimal? estimated_cost { get; set; }
|
||||
public string? construction_period_requirement { get; set; }
|
||||
public string out_apply_reason { get; set; }
|
||||
public string? out_apply_reason { get; set; }
|
||||
public string? remark { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class SpotInsRecordExecuteInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string? id { get; set; }
|
||||
|
||||
public string attachment { get; set; }
|
||||
public string? attachment { get; set; }
|
||||
|
||||
public string result { get; set; }
|
||||
public string? result { get; set; }
|
||||
|
||||
public string result_remark { get; set; }
|
||||
public string? result_remark { get; set; }
|
||||
|
||||
public List<Dictionary<string,string>> details { get; set; }
|
||||
public List<Dictionary<string,string>>? details { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class SpotInsRecordRepeatInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string? id { get; set; }
|
||||
|
||||
public string repeat_result { get; set; }
|
||||
public string? repeat_result { get; set; }
|
||||
|
||||
public string repeat_remark { get; set; }
|
||||
public string? repeat_remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class SpotInsRecordRepeatOutput
|
||||
{
|
||||
public EqpSpotInsRecordH model { get; set; }
|
||||
public EqpSpotInsRecordH? model { get; set; }
|
||||
|
||||
public List<EqpSpotInsRecordD> details { get; set; }
|
||||
public List<EqpSpotInsRecordD>? details { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class SpotInsTemPublishInput
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string? id { get; set; }
|
||||
|
||||
public string[] equipIds { get; set; }
|
||||
public string[]? equipIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,17 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
public class SubEquipQueryOutput
|
||||
{
|
||||
public string code { get; set; }
|
||||
public string create_id { get; set; }
|
||||
public string create_id_id { get; set; }
|
||||
public string create_time { get; set; }
|
||||
public string equip_id { get; set; }
|
||||
public string equip_id_id { get; set; }
|
||||
public string id { get; set; }
|
||||
public string modify_id { get; set; }
|
||||
public string modify_time { get; set; }
|
||||
public string name { get; set; }
|
||||
public string org_id { get; set; }
|
||||
public string specification { get; set; }
|
||||
public string? code { get; set; }
|
||||
public string? create_id { get; set; }
|
||||
public string? create_id_id { get; set; }
|
||||
public string? create_time { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
public string? equip_id_id { get; set; }
|
||||
public string? id { get; set; }
|
||||
public string? modify_id { get; set; }
|
||||
public string? modify_time { get; set; }
|
||||
public string? name { get; set; }
|
||||
public string? org_id { get; set; }
|
||||
public string? specification { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public partial class EqpEquipSpareParts : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string? create_id { get; set; }
|
||||
public string create_id { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
|
||||
@@ -52,7 +52,7 @@ public partial class EqpEquipment : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 安装日期
|
||||
/// </summary>
|
||||
public string? install_date { get; set; }
|
||||
public string install_date { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 使用日期
|
||||
@@ -82,7 +82,7 @@ public partial class EqpEquipment : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? remark { get; set; }
|
||||
public string remark { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 时间戳
|
||||
@@ -186,6 +186,6 @@ public partial class EqpEquipment : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 工位编码
|
||||
/// </summary>
|
||||
public string station_code { get; set; }
|
||||
public string? station_code { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public partial class EqpMaintainItem : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 保养类型
|
||||
/// </summary>
|
||||
public string maintain_type { get; set; }
|
||||
public string? maintain_type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保养内容
|
||||
|
||||
@@ -102,12 +102,12 @@ public partial class EqpMaintainTemEquipH : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public string is_start { get; set; }
|
||||
public string? is_start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否复核
|
||||
/// </summary>
|
||||
public string is_repeat { get; set; }
|
||||
public string? is_repeat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 复核岗位id
|
||||
|
||||
@@ -57,7 +57,7 @@ public partial class EqpMaintainTemH : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 周期方式 1 单次 2 循环
|
||||
/// </summary>
|
||||
public string plan_cycle_unit { get; set; }
|
||||
public string? plan_cycle_unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计划执行通知提前量
|
||||
|
||||
@@ -47,7 +47,7 @@ public partial class EqpRepairApply : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 设备ID
|
||||
/// </summary>
|
||||
public string equip_id { get; set; }
|
||||
public string? equip_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请用户ID
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string delay_reason { get; set; }
|
||||
public string? delay_reason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建用户
|
||||
|
||||
@@ -97,7 +97,7 @@ public partial class EqpSpEquipCheckRecord : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 状态 0 待检验 1 已检验
|
||||
/// </summary>
|
||||
public string status { get; set; }
|
||||
public string? status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证书名称
|
||||
|
||||
@@ -52,6 +52,6 @@ public partial class ToolMoldsMaterial : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 物料同组标识
|
||||
/// </summary>
|
||||
public string? material_group { get; set; }
|
||||
public string material_group { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
@@ -32,30 +32,30 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetEquipDaqList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (input!=null && !string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
}
|
||||
var result = await db.Queryable<EqpDaq>()
|
||||
.LeftJoin<UserEntity>((a,b)=>a.create_id==b.Id)
|
||||
.Where(a=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson.ContainsKey("data_source"),a=>a.data_source==queryJson["data_source"])
|
||||
.WhereIF(queryJson.ContainsKey("label_name"),a=>a.label_name.Contains(queryJson["label_name"]))
|
||||
.WhereIF(queryJson.ContainsKey("label_point"),a=>a.label_point.Contains(queryJson["label_point"]))
|
||||
.WhereIF(input!=null,a=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("data_source"),a=>a.data_source==queryJson["data_source"])
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("label_name"),a=>a.label_name.Contains(queryJson["label_name"]))
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("label_point"),a=>a.label_point.Contains(queryJson["label_point"]))
|
||||
.Select((a,b) => new EquipDaqQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
data_source = a.data_source,
|
||||
create_id = b.RealName,
|
||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
data_type = a.data_type,
|
||||
enabled = a.enabled==1 ? "是" : "否",
|
||||
equip_id = a.equip_id,
|
||||
label_name = a.label_name,
|
||||
label_point = a.label_point,
|
||||
remark = a.remark
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
}).ToPagedListAsync((input?.currentPage??1), (input?.pageSize??50));
|
||||
|
||||
return PageResult<EquipDaqQueryOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetEquipFileList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
@@ -89,14 +89,14 @@ namespace Tnb.EquipMgr
|
||||
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
||||
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson.ContainsKey("file_name"),(a,b,c,d)=>a.file_name.Contains(queryJson["file_name"]))
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("file_name"),(a,b,c,d)=>a.file_name.Contains(queryJson["file_name"]))
|
||||
.Select((a, b, c,d) => new EquipFileQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
attachment = a.attachment,
|
||||
create_id = b.RealName,
|
||||
create_id_id = a.create_id,
|
||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
equip_id=d.name,
|
||||
equip_id_id= a.equip_id,
|
||||
file_name=a.file_name,
|
||||
|
||||
@@ -14,6 +14,7 @@ using Tnb.EquipMgr.Interfaces;
|
||||
|
||||
namespace Tnb.EquipMgr
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备备品备件
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
|
||||
@@ -34,20 +35,23 @@ namespace Tnb.EquipMgr
|
||||
{
|
||||
List<EqpEquipSpareParts> oldList = await _repository.GetListAsync(x => x.equip_id == input.equip_id);
|
||||
List<EqpEquipSpareParts> list = new List<EqpEquipSpareParts>();
|
||||
string orgId = _userManager.GetUserInfo().Result.organizeId;
|
||||
foreach (var spare_parts_id in input.spare_parts_ids)
|
||||
string orgId = _userManager?.GetUserInfo().Result.organizeId ?? "";
|
||||
if (input != null && input.spare_parts_ids != null)
|
||||
{
|
||||
if (oldList.Any(x => x.spare_parts_id == spare_parts_id))
|
||||
continue;
|
||||
list.Add(new EqpEquipSpareParts()
|
||||
foreach (var spare_parts_id in input.spare_parts_ids)
|
||||
{
|
||||
id = SnowflakeIdHelper.NextId(),
|
||||
equip_id = input.equip_id,
|
||||
spare_parts_id = spare_parts_id,
|
||||
create_id = _userManager.UserId,
|
||||
create_time = DateTime.Now,
|
||||
org_id = orgId,
|
||||
});
|
||||
if (oldList.Any(x => x.spare_parts_id == spare_parts_id))
|
||||
continue;
|
||||
list.Add(new EqpEquipSpareParts()
|
||||
{
|
||||
id = SnowflakeIdHelper.NextId(),
|
||||
equip_id = input.equip_id,
|
||||
spare_parts_id = spare_parts_id,
|
||||
create_id = _userManager.UserId,
|
||||
create_time = DateTime.Now,
|
||||
org_id = orgId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
await _repository.InsertRangeAsync(list);
|
||||
@@ -57,7 +61,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetEquipSparePartsList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
@@ -67,8 +71,8 @@ namespace Tnb.EquipMgr
|
||||
.LeftJoin<DictionaryTypeEntity>((a, b, c) => c.EnCode == Tnb.BasicData.DictConst.SparePartsType && c.DeleteMark == null)
|
||||
.LeftJoin<DictionaryDataEntity>((a, b,c,d) => d.DictionaryTypeId == c.Id && b.type_id == d.EnCode)
|
||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson.ContainsKey("code"),(a,b,c,d)=>b.code.Contains(queryJson["code"]))
|
||||
.WhereIF(queryJson.ContainsKey("name"),(a,b,c,d)=>b.name.Contains(queryJson["name"]))
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("code"),(a,b,c,d)=>b.code.Contains(queryJson["code"]))
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),(a,b,c,d)=>b.name.Contains(queryJson["name"]))
|
||||
.Select((a, b, c,d) => new EquipSparePartsQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 根据模板id发布到设备
|
||||
/// </summary>
|
||||
/// <param name="dic"></param>
|
||||
[HttpPost]
|
||||
public async Task<string> Publish(SpotInsTemPublishInput input)
|
||||
{
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetRepairRecordList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
@@ -156,7 +156,7 @@ namespace Tnb.EquipMgr
|
||||
is_ugent = a.is_ugent==1 ? "是" : "否",
|
||||
description = a.description,
|
||||
repair_description = a.repair_description,
|
||||
complete_time = a.complete_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
complete_time = a.complete_time==null ? null : a.complete_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
repairer_id = c.RealName
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 维修延期
|
||||
/// </summary>
|
||||
/// <param name="dic"></param>
|
||||
[HttpPost]
|
||||
public async Task<string> Delay(RepairDelayInput input)
|
||||
{
|
||||
@@ -43,7 +42,7 @@ namespace Tnb.EquipMgr
|
||||
EqpRepairDelay repairDelay = new EqpRepairDelay()
|
||||
{
|
||||
id = SnowflakeIdHelper.NextId(),
|
||||
equip_id = eqpRepairApply.equip_id,
|
||||
equip_id = eqpRepairApply?.equip_id ?? "",
|
||||
repair_apply_id = input.repair_apply_id,
|
||||
delay_reason = input.delay_reason,
|
||||
expected_time = input.expected_time,
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace Tnb.EquipMgr
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.id))
|
||||
{
|
||||
_flowTaskService.Create(new FlowTaskSubmitModel()
|
||||
await _flowTaskService.Create(new FlowTaskSubmitModel()
|
||||
{
|
||||
flowId = flowId,
|
||||
parentId = "0",
|
||||
@@ -127,26 +127,30 @@ namespace Tnb.EquipMgr
|
||||
else
|
||||
{
|
||||
var entity = await _repository.GetSingleAsync(x=>x.id==input.id);
|
||||
_flowTaskService.Update("",new FlowTaskSubmitModel()
|
||||
if (entity != null)
|
||||
{
|
||||
flowId = flowId,
|
||||
parentId = "0",
|
||||
id = entity.flow_task_id,
|
||||
formData = new JObject()
|
||||
{
|
||||
{"id",id},
|
||||
{"repair_apply_id",input.repair_apply_id},
|
||||
{"equip_id",input.equip_id},
|
||||
{"create_id",_userManager.UserId},
|
||||
{"supplier_id",input.supplier_id},
|
||||
{"estimated_cost",input.estimated_cost},
|
||||
{"construction_period_requirement",input.construction_period_requirement},
|
||||
{"out_apply_reason",input.out_apply_reason},
|
||||
{"remark",input.remark},
|
||||
{"approve_status",RepairOutApplyStatus.TOBEAPPROVE},
|
||||
}
|
||||
|
||||
});
|
||||
await _flowTaskService.Update("",new FlowTaskSubmitModel()
|
||||
{
|
||||
flowId = flowId,
|
||||
parentId = "0",
|
||||
id = entity?.flow_task_id??"",
|
||||
formData = new JObject()
|
||||
{
|
||||
{"id",id},
|
||||
{"repair_apply_id",input.repair_apply_id},
|
||||
{"equip_id",input.equip_id},
|
||||
{"create_id",_userManager.UserId},
|
||||
{"supplier_id",input.supplier_id},
|
||||
{"estimated_cost",input.estimated_cost},
|
||||
{"construction_period_requirement",input.construction_period_requirement},
|
||||
{"out_apply_reason",input.out_apply_reason},
|
||||
{"remark",input.remark},
|
||||
{"approve_status",RepairOutApplyStatus.TOBEAPPROVE},
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.IsSuccess ? "操作成功" : result.ErrorMessage;
|
||||
|
||||
@@ -37,19 +37,22 @@ namespace Tnb.EquipMgr
|
||||
throw Oops.Bah("该设备已存在检验计划");
|
||||
}
|
||||
|
||||
if (entity.warn_unit == "1")//月
|
||||
if (entity != null)
|
||||
{
|
||||
entity.next_check_time = entity.end_time.Value.AddMonths(-entity.warm_time.Value);
|
||||
}else if (entity.warn_unit == "2")//天
|
||||
{
|
||||
entity.next_check_time = entity.end_time.Value.AddDays(-entity.warm_time.Value);
|
||||
}
|
||||
if (entity.warn_unit == "1")//月
|
||||
{
|
||||
entity.next_check_time = entity.end_time?.AddMonths(-entity.warm_time.Value);
|
||||
}else if (entity.warn_unit == "2")//天
|
||||
{
|
||||
entity.next_check_time = entity.end_time?.AddDays(-entity.warm_time.Value);
|
||||
}
|
||||
|
||||
entity.id = SnowflakeIdHelper.NextId();
|
||||
entity.create_time = DateTime.Now;
|
||||
entity.create_id = _userManager.UserId;
|
||||
entity.org_id = _userManager.GetUserInfo().Result.organizeId;
|
||||
await _repository.InsertAsync(entity);
|
||||
entity.id = SnowflakeIdHelper.NextId();
|
||||
entity.create_time = DateTime.Now;
|
||||
entity.create_id = _userManager.UserId;
|
||||
entity.org_id = _userManager.GetUserInfo().Result.organizeId;
|
||||
await _repository.InsertAsync(entity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 根据模板id发布到设备
|
||||
/// </summary>
|
||||
/// <param name="dic"></param>
|
||||
[HttpPost]
|
||||
public async Task<string> Publish(SpotInsTemPublishInput input)
|
||||
{
|
||||
@@ -86,7 +85,7 @@ namespace Tnb.EquipMgr
|
||||
EqpSpotInsTemEquipD eqpSpotInsTemEquipD = new EqpSpotInsTemEquipD()
|
||||
{
|
||||
id = SnowflakeIdHelper.NextId(),
|
||||
spot_ins_item_id = eqpSpotInsTem.spot_ins_item_id,
|
||||
spot_ins_item_id = eqpSpotInsTem?.spot_ins_item_id ?? "",
|
||||
spot_ins_tem_equip_id = id,
|
||||
};
|
||||
insertEqpSpotInsTemEquipDs.Add(eqpSpotInsTemEquipD);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetSubEquipList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
@@ -43,19 +43,19 @@ namespace Tnb.EquipMgr
|
||||
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
||||
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson.ContainsKey("code"),(a,b,c,d)=>a.code.Contains(queryJson["code"]))
|
||||
.WhereIF(queryJson.ContainsKey("name"),(a,b,c,d)=>a.name.Contains(queryJson["name"]))
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("code"),(a,b,c,d)=>a.code.Contains(queryJson["code"]))
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),(a,b,c,d)=>a.name.Contains(queryJson["name"]))
|
||||
.Select((a, b, c,d) => new SubEquipQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
create_id = b.RealName,
|
||||
create_id_id = a.create_id,
|
||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
equip_id=d.name,
|
||||
equip_id_id= a.equip_id,
|
||||
code = a.code,
|
||||
modify_id = c.RealName,
|
||||
modify_time = a.modify_time.Value.ToString("yyyy-MM-dd"),
|
||||
modify_time = a.modify_time==null ? null : a.modify_time.Value.ToString("yyyy-MM-dd"),
|
||||
name = a.name,
|
||||
org_id = a.org_id,
|
||||
specification = a.specification,
|
||||
|
||||
@@ -31,21 +31,21 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetEquipTechnologyParameterList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (input!=null && !string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input?.queryJson ?? "");
|
||||
}
|
||||
var result = await db.Queryable<EqpTechnologyParameter>()
|
||||
.Where(a=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson.ContainsKey("name"),a=>a.name.Contains(queryJson["name"]))
|
||||
.WhereIF(input!=null,a=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),a=>a.name.Contains(queryJson["name"]))
|
||||
.Select(a => new EquipTechnologyParameterQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
name = a.name,
|
||||
definition = a.definition,
|
||||
remark = a.remark
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
}).ToPagedListAsync((input?.currentPage??1), (input?.pageSize??50));
|
||||
|
||||
return PageResult<EquipTechnologyParameterQueryOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 执行设备保养计划
|
||||
/// </summary>
|
||||
/// <param name="pageInput"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> ExecuteMaintain(SpotInsRecordExecuteInput input)
|
||||
@@ -75,13 +74,16 @@ namespace Tnb.EquipMgr
|
||||
execute_user_id = _userManager.UserId
|
||||
}, x => x.id == input.id);
|
||||
|
||||
foreach (var item in input.details)
|
||||
if (input != null && input.details != null)
|
||||
{
|
||||
await _repository.AsSugarClient().Updateable<EqpMaintainRecordD>()
|
||||
.SetColumns(x=>x.result==item["result"])
|
||||
.SetColumnsIF(item.ContainsKey("maintain_descrip"),x=>x.maintain_descrip==item["maintain_descrip"])
|
||||
.Where(x=>x.id==item["id"])
|
||||
.ExecuteCommandAsync();
|
||||
foreach (var item in input.details)
|
||||
{
|
||||
await _repository.AsSugarClient().Updateable<EqpMaintainRecordD>()
|
||||
.SetColumns(x=>x.result==item["result"])
|
||||
.SetColumnsIF(item.ContainsKey("maintain_descrip"),x=>x.maintain_descrip==item["maintain_descrip"])
|
||||
.Where(x=>x.id==item["id"])
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +116,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 复核设备保养计划
|
||||
/// </summary>
|
||||
/// <param name="pageInput"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<string> RepeatMaintain(MaintainRecordRepeatInput input)
|
||||
@@ -123,22 +124,28 @@ namespace Tnb.EquipMgr
|
||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||
{
|
||||
|
||||
foreach (var item in input.details)
|
||||
if (input != null && input.details != null)
|
||||
{
|
||||
await db.Updateable<EqpMaintainRecordD>()
|
||||
.SetColumns(x => x.repeat_descrip == item["repeat_descrip"])
|
||||
.SetColumns(x => x.repeat_result == item["repeat_result"])
|
||||
.Where(x => x.id == item["id"]).ExecuteCommandAsync();
|
||||
foreach (var item in input.details)
|
||||
{
|
||||
await db.Updateable<EqpMaintainRecordD>()
|
||||
.SetColumns(x => x.repeat_descrip == item["repeat_descrip"])
|
||||
.SetColumns(x => x.repeat_result == item["repeat_result"])
|
||||
.Where(x => x.id == item["id"]).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
await _repository.UpdateAsync(x => new EqpMaintainRecordH()
|
||||
|
||||
if (input != null)
|
||||
{
|
||||
repeat_result = input.repeat_result,
|
||||
repeat_remark = input.repeat_remark,
|
||||
repeat_user_id = _userManager.UserId,
|
||||
repeat_time = DateTime.Now,
|
||||
status = SpotInsRecordExecutionStatus.COMPLETED
|
||||
}, x => x.id == input.id);
|
||||
await _repository.UpdateAsync(x => new EqpMaintainRecordH()
|
||||
{
|
||||
repeat_result = input.repeat_result,
|
||||
repeat_remark = input.repeat_remark,
|
||||
repeat_user_id = _userManager.UserId,
|
||||
repeat_time = DateTime.Now,
|
||||
status = SpotInsRecordExecutionStatus.COMPLETED
|
||||
}, x => x.id == input.id);
|
||||
}
|
||||
});
|
||||
|
||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
@@ -149,7 +156,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetMaintainRecordList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
@@ -163,17 +170,17 @@ namespace Tnb.EquipMgr
|
||||
{
|
||||
id = a.id,
|
||||
attachment = a.attachment,
|
||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
equip_id = b.code,
|
||||
equip_id_id = a.equip_id,
|
||||
repeat_remark = a.repeat_remark,
|
||||
repeat_result = a.repeat_result=="1"?"合格":"不合格",
|
||||
repeat_time = a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
repeat_time = a.repeat_time==null ? null : a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
repeat_user_id = d.RealName,
|
||||
result = a.result=="1"?"合格":"不合格",
|
||||
result_remark = a.result_remark,
|
||||
maintain_tem_equip_id = a.maintain_tem_equip_id,
|
||||
execute_time = a.execute_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
execute_time = a.execute_time==null ? null : a.execute_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
execute_user_id = c.RealName,
|
||||
status = SqlFunc.IF(a.status.Equals("1")).Return("待执行").ElseIF(a.status.Equals("2")).Return("待复核").ElseIF(a.status.Equals("3")).Return("已完成").End("")
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 执行点巡检
|
||||
/// </summary>
|
||||
/// <param name="pageInput"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> ExecuteSpotIns(SpotInsRecordExecuteInput input)
|
||||
@@ -75,13 +74,16 @@ namespace Tnb.EquipMgr
|
||||
spot_record_user_id = _userManager.UserId
|
||||
}, x => x.id == input.id);
|
||||
|
||||
foreach (var item in input.details)
|
||||
if(input!=null && input.details!=null)
|
||||
{
|
||||
await _repository.AsSugarClient().Updateable<EqpSpotInsRecordD>().
|
||||
SetColumns(x=>x.result==item["result"])
|
||||
.SetColumnsIF(item["judge_type"]=="1",x=>x.real_value==Convert.ToDouble(item["real_value"]))
|
||||
.Where(x=>x.id==item["id"])
|
||||
.ExecuteCommandAsync();
|
||||
foreach (var item in input.details)
|
||||
{
|
||||
await _repository.AsSugarClient().Updateable<EqpSpotInsRecordD>().
|
||||
SetColumns(x=>x.result==item["result"])
|
||||
.SetColumnsIF(item["judge_type"]=="1",x=>x.real_value==Convert.ToDouble(item["real_value"]))
|
||||
.Where(x=>x.id==item["id"])
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +116,6 @@ namespace Tnb.EquipMgr
|
||||
/// <summary>
|
||||
/// 复核点巡检
|
||||
/// </summary>
|
||||
/// <param name="pageInput"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task RepeatSpotIns(SpotInsRecordRepeatInput input)
|
||||
@@ -133,7 +134,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> GetSpotInsRecordList(EquipQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
||||
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
@@ -145,16 +146,16 @@ namespace Tnb.EquipMgr
|
||||
{
|
||||
id = a.id,
|
||||
attachment = a.attachment,
|
||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
equip_id = a.equip_id,
|
||||
repeat_remark = a.repeat_remark,
|
||||
repeat_result = a.repeat_result=="1"?"合格":"不合格",
|
||||
repeat_time = a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
repeat_time = a.repeat_time==null ? null : a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
repeat_user_id = b.RealName,
|
||||
result = a.result=="1"?"合格":"不合格",
|
||||
result_remark = a.result_remark,
|
||||
spot_ins_tem_equip_id = a.spot_ins_tem_equip_id,
|
||||
spot_record_date_time = a.spot_record_date_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
spot_record_date_time = a.spot_record_date_time==null ? null :a.spot_record_date_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
spot_record_user_id = a.spot_record_user_id,
|
||||
status = SqlFunc.IF(a.status.Equals("1")).Return("待执行").ElseIF(a.status.Equals("2")).Return("待复核").ElseIF(a.status.Equals("3")).Return("已完成").End("")
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
Reference in New Issue
Block a user