消除warning
This commit is contained in:
@@ -2,8 +2,8 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class DefectOutput
|
public class DefectOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
public string defect_code { get; set; }
|
public string? defect_code { get; set; }
|
||||||
public string defect_name { get; set; }
|
public string? defect_name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
|
|
||||||
public class MbomProcessOutDto
|
public class MbomProcessOutDto
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:生产bomid
|
/// Desc:生产bomid
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
|
|
||||||
public class MbomProcessDto
|
public class MbomProcessDto
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:生产bomid
|
/// Desc:生产bomid
|
||||||
@@ -122,7 +122,7 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺路线子表id
|
/// 工艺路线子表id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_detail_id { get; set; }
|
public string route_detail_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:投产方式
|
/// Desc:投产方式
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ public partial class BasMbomProcess : BaseEntity<string>
|
|||||||
/// 投产方式
|
/// 投产方式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? production_method { get; set; }
|
public string? production_method { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺路线子表id
|
/// 工艺路线子表id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_detail_id { get; set; }
|
public string route_detail_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否时最后一道工序
|
/// 是否时最后一道工序
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace Tnb.BasicData
|
|||||||
string processId = dic["processId"];
|
string processId = dic["processId"];
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
List<string> defectIds = await db.Queryable<BasProcessDefective>().Where(x=>x.process_id==processId).Select(x=>x.defective_id).ToListAsync();
|
List<string> defectIds = await db.Queryable<BasProcessDefective>().Where(x=>x.process_id==processId).Select(x=>x.defective_id).ToListAsync();
|
||||||
List<string> defectTypeIds = await db.Queryable<BasDefect>().Where(x=>defectIds.Contains(x.id) && x.enabled==1).Select(x=>x.defect_type_id).ToListAsync();
|
List<string?> defectTypeIds = await db.Queryable<BasDefect>().Where(x=>defectIds.Contains(x.id) && x.enabled==1).Select(x=>x.defect_type_id).ToListAsync();
|
||||||
return await _repository.AsSugarClient().Queryable<BasDefectType>()
|
return await _repository.AsSugarClient().Queryable<BasDefectType>()
|
||||||
.Where((a) => defectTypeIds.Contains(a.id))
|
.Where((a) => defectTypeIds.Contains(a.id))
|
||||||
.Select(a => new
|
.Select(a => new
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ namespace Tnb.BasicData
|
|||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, object>? queryJson = string.IsNullOrEmpty(input.queryJson) ? null : input.queryJson.ToObject<Dictionary<string, object>>();
|
Dictionary<string, object>? queryJson = string.IsNullOrEmpty(input.queryJson) ? null : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||||
string code = queryJson!=null && queryJson.ContainsKey("code") ? queryJson["code"].ToString() : "";
|
string? code = queryJson!=null && queryJson.ContainsKey("code") ? queryJson["code"].ToString() : "";
|
||||||
string name = queryJson!=null && queryJson.ContainsKey("name") ? queryJson["name"].ToString() : "";
|
string? name = queryJson!=null && queryJson.ContainsKey("name") ? queryJson["name"].ToString() : "";
|
||||||
string version = queryJson!=null && queryJson.ContainsKey("version") ? queryJson["version"].ToString() : "";
|
string? version = queryJson!=null && queryJson.ContainsKey("version") ? queryJson["version"].ToString() : "";
|
||||||
var list = await db.Queryable<BasESop, BasMbom, BasMbomProcess, UserEntity,BasProcess>((a, b, c, d,e) => new object[]
|
var list = await db.Queryable<BasESop, BasMbom, BasMbomProcess, UserEntity,BasProcess>((a, b, c, d,e) => new object[]
|
||||||
{
|
{
|
||||||
JoinType.Left, a.mbom_id == b.id,
|
JoinType.Left, a.mbom_id == b.id,
|
||||||
@@ -60,17 +60,17 @@ namespace Tnb.BasicData
|
|||||||
JoinType.Left, a.create_id == d.Id,
|
JoinType.Left, a.create_id == d.Id,
|
||||||
JoinType.Left, c.process_id == e.id,
|
JoinType.Left, c.process_id == e.id,
|
||||||
})
|
})
|
||||||
.WhereIF(!string.IsNullOrEmpty(code), (a, b, c, d) => a.code.Contains(code))
|
.WhereIF(!string.IsNullOrEmpty(code), (a, b, c, d) => a.code.Contains(code!))
|
||||||
.WhereIF(!string.IsNullOrEmpty(name), (a, b, c, d) => a.name.Contains(name))
|
.WhereIF(!string.IsNullOrEmpty(name), (a, b, c, d) => a.name.Contains(name!))
|
||||||
.WhereIF(!string.IsNullOrEmpty(version), (a, b, c, d) => a.version.Contains(version))
|
.WhereIF(!string.IsNullOrEmpty(version), (a, b, c, d) => a.version.Contains(version!))
|
||||||
.Where((a,b,c)=>a.enabled==1)
|
.Where((a,b,c)=>a.enabled==1)
|
||||||
.Select((a, b, c, d,e) => new ESopListOutput
|
.Select((a, b, c, d,e) => new ESopListOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
code = a.code,
|
code = a.code,
|
||||||
name = a.name,
|
name = a.name,
|
||||||
mbom_id = b.version,
|
mbom_id = b.version!,
|
||||||
mbom_process_id = e.process_name,
|
mbom_process_id = e.process_name!,
|
||||||
version = a.version,
|
version = a.version,
|
||||||
enabled = a.enabled==1 ? "是" : "否",
|
enabled = a.enabled==1 ? "是" : "否",
|
||||||
attachment = a.attachment,
|
attachment = a.attachment,
|
||||||
@@ -106,14 +106,14 @@ namespace Tnb.BasicData
|
|||||||
.WhereIF(!string.IsNullOrEmpty(code), (a, b, c, d) => a.code.Contains(code))
|
.WhereIF(!string.IsNullOrEmpty(code), (a, b, c, d) => a.code.Contains(code))
|
||||||
.WhereIF(!string.IsNullOrEmpty(name), (a, b, c, d) => a.name.Contains(name))
|
.WhereIF(!string.IsNullOrEmpty(name), (a, b, c, d) => a.name.Contains(name))
|
||||||
.WhereIF(!string.IsNullOrEmpty(version), (a, b, c, d) => a.version.Contains(version))
|
.WhereIF(!string.IsNullOrEmpty(version), (a, b, c, d) => a.version.Contains(version))
|
||||||
.Where((a,b,c)=>a.mbom_id==input.mbom_id && a.mbom_process_id==input.mbom_process_id)
|
.Where((a,b,c)=>a.mbom_id==input!.mbom_id && a.mbom_process_id==input!.mbom_process_id)
|
||||||
.Select((a, b, c, d,e) => new ESopListOutput
|
.Select((a, b, c, d,e) => new ESopListOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
code = a.code,
|
code = a.code,
|
||||||
name = a.name,
|
name = a.name,
|
||||||
mbom_id = b.version,
|
mbom_id = b.version!,
|
||||||
mbom_process_id = e.process_name,
|
mbom_process_id = e.process_name!,
|
||||||
version = a.version,
|
version = a.version,
|
||||||
enabled = a.enabled==1 ? "是" : "否",
|
enabled = a.enabled==1 ? "是" : "否",
|
||||||
attachment = a.attachment,
|
attachment = a.attachment,
|
||||||
@@ -135,7 +135,7 @@ namespace Tnb.BasicData
|
|||||||
return await _repository.GetFirstAsync(x => x.mbom_process_id == mbomProcessId && x.enabled == 1);
|
return await _repository.GetFirstAsync(x => x.mbom_process_id == mbomProcessId && x.enabled == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null!;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|||||||
@@ -187,16 +187,16 @@ namespace Tnb.BasicData
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<string> typeList = new List<string>();
|
List<string> typeList = new List<string>();
|
||||||
if(!string.IsNullOrEmpty(input.types))
|
if(!string.IsNullOrEmpty(input!.types))
|
||||||
{
|
{
|
||||||
typeList = JsonConvert.DeserializeObject<List<string>>(input.types);
|
typeList = JsonConvert.DeserializeObject<List<string>>((input?.types??"")) ?? new List<string>();
|
||||||
}
|
}
|
||||||
var query = db.Queryable<BasMaterial>()
|
var query = db.Queryable<BasMaterial>()
|
||||||
.Where(x => x.state == "1")
|
.Where(x => x.state == "1")
|
||||||
.WhereIF(queryJson != null && queryJson.ContainsKey("name"), a => a.name.Contains(queryJson["name"]))
|
.WhereIF(queryJson != null && queryJson.ContainsKey("name"), x => x.name.Contains(queryJson!["name"]))
|
||||||
.WhereIF(queryJson != null && queryJson.ContainsKey("code"), a => a.code.Contains(queryJson["code"]))
|
.WhereIF(queryJson != null && queryJson.ContainsKey("code"), x => x.code.Contains(queryJson!["code"]))
|
||||||
.WhereIF(queryJson != null && queryJson.ContainsKey("material_standard"),
|
.WhereIF(queryJson != null && queryJson.ContainsKey("material_standard"),
|
||||||
a => a.material_standard.Contains(queryJson["material_standard"]))
|
x => x.material_standard!.Contains(queryJson!["material_standard"]))
|
||||||
.Select(x => x);
|
.Select(x => x);
|
||||||
|
|
||||||
var list = new List<ISugarQueryable<BasMaterial>>();
|
var list = new List<ISugarQueryable<BasMaterial>>();
|
||||||
|
|||||||
@@ -297,15 +297,15 @@ namespace Tnb.BasicData
|
|||||||
process_id = process?.process_id ?? "",
|
process_id = process?.process_id ?? "",
|
||||||
preparation_time = process?.preparation_time ?? 0,
|
preparation_time = process?.preparation_time ?? 0,
|
||||||
station = process?.station ?? "",
|
station = process?.station ?? "",
|
||||||
byproduct_status = process.byproduct_status,
|
byproduct_status = process?.byproduct_status ?? 0,
|
||||||
production_method = process.production_method,
|
production_method = process?.production_method,
|
||||||
route_detail_id = process.route_detail_id,
|
route_detail_id = process?.route_detail_id ?? "",
|
||||||
ordinal = ++index,
|
ordinal = ++index,
|
||||||
is_last = index==mbomSaveDataInput.processes.Count ? 1 : 0,
|
is_last = index==mbomSaveDataInput.processes.Count ? 1 : 0,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.inputs != null)
|
if (process!.inputs != null)
|
||||||
{
|
{
|
||||||
foreach (var input in process.inputs)
|
foreach (var input in process.inputs)
|
||||||
{
|
{
|
||||||
@@ -415,12 +415,12 @@ namespace Tnb.BasicData
|
|||||||
decimal preparation_time = process?.preparation_time ?? 0;
|
decimal preparation_time = process?.preparation_time ?? 0;
|
||||||
await _repository.AsSugarClient().Updateable<BasMbomProcess>()
|
await _repository.AsSugarClient().Updateable<BasMbomProcess>()
|
||||||
.SetColumns(x => x.preparation_time == preparation_time)
|
.SetColumns(x => x.preparation_time == preparation_time)
|
||||||
.SetColumns(x => x.station == process.station)
|
.SetColumns(x => x.station == process!.station)
|
||||||
.SetColumns(x => x.byproduct_status == process.byproduct_status)
|
.SetColumns(x => x.byproduct_status == process!.byproduct_status)
|
||||||
.SetColumns(x => x.production_method == process.production_method)
|
.SetColumns(x => x.production_method == process!.production_method)
|
||||||
.Where(x => x.id == process.id).ExecuteCommandAsync();
|
.Where(x => x.id == process!.id).ExecuteCommandAsync();
|
||||||
|
|
||||||
if (process.inputs != null)
|
if (process!.inputs != null)
|
||||||
{
|
{
|
||||||
foreach (var input in process.inputs)
|
foreach (var input in process.inputs)
|
||||||
{
|
{
|
||||||
@@ -572,14 +572,14 @@ namespace Tnb.BasicData
|
|||||||
process_id = process?.process_id ?? "",
|
process_id = process?.process_id ?? "",
|
||||||
preparation_time = process?.preparation_time ?? 0,
|
preparation_time = process?.preparation_time ?? 0,
|
||||||
station = process?.station ?? "",
|
station = process?.station ?? "",
|
||||||
byproduct_status = process.byproduct_status,
|
byproduct_status = process!.byproduct_status,
|
||||||
production_method = process.production_method,
|
production_method = process!.production_method,
|
||||||
route_detail_id = process.route_detail_id,
|
route_detail_id = process!.route_detail_id,
|
||||||
ordinal = ++index,
|
ordinal = ++index,
|
||||||
is_last = index==mbomSaveDataInput.processes.Count ? 1 : 0,
|
is_last = index==mbomSaveDataInput.processes.Count ? 1 : 0,
|
||||||
no = process.no,
|
no = process!.no,
|
||||||
last_process_no = process.last_process_no,
|
last_process_no = process!.last_process_no,
|
||||||
next_process_no = process.next_process_no,
|
next_process_no = process!.next_process_no,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -693,12 +693,12 @@ namespace Tnb.BasicData
|
|||||||
decimal preparation_time = process?.preparation_time ?? 0;
|
decimal preparation_time = process?.preparation_time ?? 0;
|
||||||
await _repository.AsSugarClient().Updateable<BasMbomProcess>()
|
await _repository.AsSugarClient().Updateable<BasMbomProcess>()
|
||||||
.SetColumns(x => x.preparation_time == preparation_time)
|
.SetColumns(x => x.preparation_time == preparation_time)
|
||||||
.SetColumns(x => x.station == process.station)
|
.SetColumns(x => x.station == process!.station)
|
||||||
.SetColumns(x => x.byproduct_status == process.byproduct_status)
|
.SetColumns(x => x.byproduct_status == process!.byproduct_status)
|
||||||
.SetColumns(x => x.production_method == process.production_method)
|
.SetColumns(x => x.production_method == process!.production_method)
|
||||||
.Where(x => x.id == process.id).ExecuteCommandAsync();
|
.Where(x => x.id == process!.id).ExecuteCommandAsync();
|
||||||
|
|
||||||
if (process.inputs != null)
|
if (process!.inputs != null)
|
||||||
{
|
{
|
||||||
foreach (var input in process.inputs)
|
foreach (var input in process.inputs)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,17 +17,11 @@ namespace Tnb.BasicData
|
|||||||
public class BasPushRuleLogService : IBasPushRuleLogService, IDynamicApiController, ITransient
|
public class BasPushRuleLogService : IBasPushRuleLogService, IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarRepository<BasPushRuleLog> _repository;
|
private readonly ISqlSugarRepository<BasPushRuleLog> _repository;
|
||||||
private readonly DataBaseManager _dbManager;
|
|
||||||
private readonly IUserManager _userManager;
|
|
||||||
private readonly IRunService _runService;
|
|
||||||
private readonly IVisualDevService _visualDevService;
|
|
||||||
|
|
||||||
public BasPushRuleLogService(
|
public BasPushRuleLogService(
|
||||||
ISqlSugarRepository<BasPushRuleLog> repository,
|
ISqlSugarRepository<BasPushRuleLog> repository)
|
||||||
IUserManager userManager)
|
|
||||||
{
|
{
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
_userManager = userManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public string? id { get; set; }
|
public string? id { get; set; }
|
||||||
public string? data_source { get; set; }
|
public string? data_source { get; set; }
|
||||||
public string create_id { get; set; }
|
public string create_id { get; set; } = string.Empty;
|
||||||
public string? create_time { get; set; }
|
public string? create_time { get; set; }
|
||||||
public string? data_type { get; set; }
|
public string? data_type { get; set; }
|
||||||
public string? enabled { get; set; }
|
public string? enabled { get; set; }
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipRepairRefuseInput
|
public class EquipRepairRefuseInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
public string reason { get; set; }
|
public string reason { get; set; } = string.Empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class ToolMoldRequisitionListOutput
|
public class ToolMoldRequisitionListOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
public string? code { get; set; } = string.Empty;
|
public string? code { get; set; } = string.Empty;
|
||||||
public string? mold_id { get; set; } = string.Empty;
|
public string? mold_id { get; set; } = string.Empty;
|
||||||
public string? mo_task_id { get; set; } = string.Empty;
|
public string? mo_task_id { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// 工单id
|
/// 工单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string mo_id { get; set; }
|
public string mo_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工单代码
|
/// 工单代码
|
||||||
@@ -32,11 +32,11 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料名称
|
/// 物料名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_name { get; set; }
|
public string material_name { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料规格型号
|
/// 物料规格型号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_standard { get; set; }
|
public string material_standard { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工单类型:1-正常工单、2-返工工单、3-试制工单
|
/// 工单类型:1-正常工单、2-返工工单、3-试制工单
|
||||||
@@ -51,37 +51,37 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计划生产数量
|
/// 计划生产数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string plan_qty { get; set; }
|
public string plan_qty { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 已投入数量
|
/// 已投入数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string input_qty { get; set; }
|
public string input_qty { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 已完工数量
|
/// 已完工数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string complete_qty { get; set; }
|
public string complete_qty { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报废数量
|
/// 报废数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string scrap_qty { get; set; }
|
public string scrap_qty { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计划开始时间
|
/// 计划开始时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string plan_start_date { get; set; }
|
public string plan_start_date { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计划结束时间
|
/// 计划结束时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string plan_end_date { get; set; }
|
public string plan_end_date { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否生派工单
|
/// 是否生派工单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string is_create_dispatch { get; set; }
|
public string is_create_dispatch { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -92,7 +92,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否合并
|
/// 是否合并
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string is_merge { get; set; }
|
public string is_merge { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 组合工单
|
/// 组合工单
|
||||||
@@ -112,7 +112,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string create_time { get; set; }
|
public string create_time { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改用户
|
/// 修改用户
|
||||||
@@ -122,7 +122,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改时间
|
/// 修改时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string modify_time { get; set; }
|
public string modify_time { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料ID
|
/// 物料ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -131,23 +131,23 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 已排产数量
|
/// 已排产数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string scheduled_qty { get; set; }
|
public string scheduled_qty { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 父工单id
|
/// 父工单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string parent_id { get; set; }
|
public string parent_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取节点id.
|
/// 获取节点id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取节点父id.
|
/// 获取节点父id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string parentId { get; set; }
|
public string parentId { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有子级.
|
/// 是否有子级.
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
{
|
{
|
||||||
public class PrdTaskManageListOutput
|
public class PrdTaskManageListOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
public string mo_task_code { get; set; }
|
public string mo_task_code { get; set; } = string.Empty;
|
||||||
public string material_id { get; set; }
|
public string material_id { get; set; } = string.Empty;
|
||||||
public string mold_id { get; set; }
|
public string mold_id { get; set; } = string.Empty;
|
||||||
public string eqp_id { get; set; }
|
public string eqp_id { get; set; } = string.Empty;
|
||||||
public string plan_start_date { get; set; }
|
public string plan_start_date { get; set; } = string.Empty;
|
||||||
public string plan_end_date { get; set; }
|
public string plan_end_date { get; set; } = string.Empty;
|
||||||
public int? plan_qty { get; set; }
|
public int? plan_qty { get; set; }
|
||||||
public int? complete_qty { get; set; }
|
public int? complete_qty { get; set; }
|
||||||
public string mo_task_status { get; set; }
|
public string mo_task_status { get; set; } = string.Empty;
|
||||||
public string schedule_type { get; set; }
|
public string schedule_type { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
|
|
||||||
List<string> ids = _repository.GetList(x => x.status == "0").Select(x => x.equip_id).Distinct()
|
List<string?> ids = _repository.GetList(x => x.status == "0").Select(x => x.equip_id).Distinct()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
List<EqpSpEquipCheckRecord> list = db.Queryable<EqpSpEquipCheckRecord>().GroupBy(x=>new
|
List<EqpSpEquipCheckRecord> list = db.Queryable<EqpSpEquipCheckRecord>().GroupBy(x=>new
|
||||||
@@ -35,7 +35,7 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
|
|
||||||
})
|
})
|
||||||
.MergeTable()
|
.MergeTable()
|
||||||
.LeftJoin<EqpSpEquipCheckRecord>((x,y)=>x.equip_id==y.equip_id && x.create_time.Value.ToString("yyyy-MM-dd")==y.create_time.Value.ToString("yyyy-MM-dd"))
|
.LeftJoin<EqpSpEquipCheckRecord>((x,y)=>x.equip_id==y.equip_id && x.create_time!.Value.ToString("yyyy-MM-dd")==y.create_time!.Value.ToString("yyyy-MM-dd"))
|
||||||
.Select((x,y)=>y)
|
.Select((x,y)=>y)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
{
|
{
|
||||||
if (item.warn_unit == "1")
|
if (item.warn_unit == "1")
|
||||||
{
|
{
|
||||||
if (item.end_time.Value.AddMonths(-item.warm_time.Value).ToString("yyyy-MM-dd") ==
|
if (item.end_time.Value.AddMonths(-item.warm_time!.Value).ToString("yyyy-MM-dd") ==
|
||||||
DateTime.Now.ToString("yyyy-MM-dd"))
|
DateTime.Now.ToString("yyyy-MM-dd"))
|
||||||
{
|
{
|
||||||
insertList.Add(new EqpSpEquipCheckRecord()
|
insertList.Add(new EqpSpEquipCheckRecord()
|
||||||
@@ -61,7 +61,7 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
|
|
||||||
}else if (item.warn_unit == "2")
|
}else if (item.warn_unit == "2")
|
||||||
{
|
{
|
||||||
if (item.end_time.Value.AddDays(-item.warm_time.Value).ToString("yyyy-MM-dd") ==
|
if (item.end_time.Value.AddDays(-item.warm_time!.Value).ToString("yyyy-MM-dd") ==
|
||||||
DateTime.Now.ToString("yyyy-MM-dd"))
|
DateTime.Now.ToString("yyyy-MM-dd"))
|
||||||
{
|
{
|
||||||
insertList.Add(new EqpSpEquipCheckRecord()
|
insertList.Add(new EqpSpEquipCheckRecord()
|
||||||
|
|||||||
@@ -180,13 +180,5 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
Log.Information("----------------------结束生成点巡检计划----------------------");
|
Log.Information("----------------------结束生成点巡检计划----------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 最后一个点巡检记录
|
|
||||||
/// </summary>
|
|
||||||
private class SpotInsRecordLastDTO
|
|
||||||
{
|
|
||||||
public string spot_ins_tem_equip_id { get; set; }
|
|
||||||
public DateTime create_time { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -449,7 +449,6 @@ public class TimeTaskService : ITimeTaskService, IDynamicApiController, ITransie
|
|||||||
})).ToList();
|
})).ToList();
|
||||||
await _cacheManager.SetAsync(CommonConst.CACHEKEYTIMERJOB, taskMethods);
|
await _cacheManager.SetAsync(CommonConst.CACHEKEYTIMERJOB, taskMethods);
|
||||||
return taskMethods;
|
return taskMethods;
|
||||||
return new List<TaskMethodInfo>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user