Yanko 3 mesi fa
parent
commit
6c900e02c9
7 ha cambiato i file con 53 aggiunte e 1 eliminazioni
  1. +19
    -0
      backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml
  2. +19
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs
  3. +6
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/IFinalsInfoService.cs
  4. +1
    -1
      backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineService.cs
  5. +5
    -0
      backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkPlanDto.cs
  6. +2
    -0
      backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkInfoService.cs
  7. +1
    -0
      backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkPlanService.cs

+ 19
- 0
backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml Vedi File

@@ -5531,6 +5531,13 @@
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.FinalsInfoService.FinishLineList(System.String)">
<summary>
根据成品获取配置完成的产线
</summary>
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.FinalsInfoService.Update(BPA.MES.Base.Application.Services.FinalsInfoUpdateInput)">
<summary>
更新
@@ -5728,6 +5735,13 @@
<param name="finalId"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IFinalsInfoService.FinishLineList(System.String)">
<summary>
配置完成的产线
</summary>
<param name="finalId"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IFinalsInfoService.Detail(System.String)">
<summary>
查询单条
@@ -9676,6 +9690,11 @@
名称
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.WorkPlanQueryPageInput.FinalId">
<summary>
成品Id
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.WorkPlanOutput">
<summary>
输出


+ 19
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs Vedi File

@@ -128,6 +128,25 @@ namespace BPA.MES.Base.Application.Services
return entity;
}
/// <summary>
/// 根据成品获取配置完成的产线
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpGet]
public async Task<dynamic> FinishLineList(string finalId)
{
var entity = await _dbContext.Queryable<FinalLineEntity>()
.LeftJoin<ProductLineEntity>((a, b) => a.LineId==b.Id)
.Where((a, b) => a.FinalId == finalId && a.Status=="1")
.Select((a, b) => new
{
key = a.LineId,
value = b.Name,
status = a.Status
}).ToListAsync();
return entity;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="input"></param>


+ 6
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/IFinalsInfoService.cs Vedi File

@@ -45,6 +45,12 @@
/// <returns></returns>
Task<dynamic> LineList(string finalId);
/// <summary>
/// 配置完成的产线
/// </summary>
/// <param name="finalId"></param>
/// <returns></returns>
Task<dynamic> FinishLineList(string finalId);
/// <summary>
/// 查询单条
/// </summary>
/// <param name="Id"></param>


+ 1
- 1
backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineService.cs Vedi File

@@ -115,7 +115,7 @@ namespace BPA.MES.Base.Application.Services
throw Oops.Bah("名称或编码已存在!");
}
ProductLineEntity entity = input.Adapt<ProductLineEntity>();
var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync();
var res = await _dbContext.Updateable(entity).IgnoreColumns(x=>x.CreateTime).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>


+ 5
- 0
backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkPlanDto.cs Vedi File

@@ -64,6 +64,11 @@ namespace BPA.MES.Base.Application.Services
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 成品Id
/// </summary>

public string FinalId { get; set; }
}
/// <summary>
/// 输出


+ 2
- 0
backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkInfoService.cs Vedi File

@@ -31,7 +31,9 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services
public async Task<bool> Add(WorkInfoAddInput input)
{
bool result = false;
var planEntity =await _dbContext.Queryable<WorkPlanEntity>().Where(x=>x.Id==input.PlanId).FirstAsync();
Pztj_WorkInfoEntity entity = input.Adapt<Pztj_WorkInfoEntity>();
entity.FinalId = planEntity.FinalId;
List<WorkDeviceRecordEntity> workDeviceRecordEntities = new();
foreach (var item in input.WorkDevices)
{


+ 1
- 0
backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkPlanService.cs Vedi File

@@ -91,6 +91,7 @@ namespace BPA.MES.Base.Application.Services
{
var entity = await _dbContext.Queryable<WorkPlanEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Name),x=>x.Name.Contains(input.Name))
.WhereIF(!string.IsNullOrEmpty(input.FinalId),x=>x.FinalId ==input.FinalId)
.ToPagedListAsync(input.PageIndex, input.PageSize);
SqlSugarPagedList<WorkPlanOutput> output = entity.Adapt<SqlSugarPagedList<WorkPlanOutput>>();
return output;


Caricamento…
Annulla
Salva