Kaynağa Gözat

优化

master
747575620@qq.com 6 ay önce
ebeveyn
işleme
261ae65add
5 değiştirilmiş dosya ile 38 ekleme ve 4 silme
  1. +15
    -0
      backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml
  2. +15
    -1
      backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkBatchDto.cs
  3. +3
    -0
      backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkBatchService.cs
  4. +3
    -3
      frontend/src/pages/workInfo/index.tsx
  5. +2
    -0
      frontend/src/types/WorkInfo.d.ts

+ 15
- 0
backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml Dosyayı Görüntüle

@@ -7415,6 +7415,21 @@
分页 分页
</summary> </summary>
</member> </member>
<member name="P:BPA.MES.Base.Application.Services.WorkBatchQueryPageInput.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.WorkBatchQueryPageInput.StartTime">
<summary>
起始时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.WorkBatchQueryPageInput.EndTime">
<summary>
结束时间
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.WorkBatchOutput"> <member name="T:BPA.MES.Base.Application.Services.WorkBatchOutput">
<summary> <summary>
输出 输出


+ 15
- 1
backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkBatchDto.cs Dosyayı Görüntüle

@@ -62,7 +62,21 @@
/// </summary> /// </summary>
public class WorkBatchQueryPageInput : RequestPage public class WorkBatchQueryPageInput : RequestPage
{ {
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }

public string Id { get; set; }

/// <summary>
/// 起始时间
/// </summary>
public DateTime? StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndTime { get; set; }
} }
/// <summary> /// <summary>
/// 输出 /// 输出


+ 3
- 0
backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkBatchService.cs Dosyayı Görüntüle

@@ -51,6 +51,9 @@
public async Task<SqlSugarPagedList<WorkBatchOutput>> PagedList(WorkBatchQueryPageInput input) public async Task<SqlSugarPagedList<WorkBatchOutput>> PagedList(WorkBatchQueryPageInput input)
{ {
var entity = await _dbContext.Queryable<WorkBatchEntity>() var entity = await _dbContext.Queryable<WorkBatchEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Id),x=>x.Id.Contains(input.Id))
.WhereIF(input.StartTime != null, x => input.StartTime <= Convert.ToDateTime(x.CreateTime))
.WhereIF(input.EndTime != null, x => input.EndTime.Value.AddHours(23).AddMinutes(59).AddSeconds(59) >= Convert.ToDateTime(x.CreateTime))
.OrderByDescending(x => x.CreateTime) .OrderByDescending(x => x.CreateTime)
.Select((x)=>new WorkBatchOutput .Select((x)=>new WorkBatchOutput
{ {


+ 3
- 3
frontend/src/pages/workInfo/index.tsx Dosyayı Görüntüle

@@ -700,9 +700,9 @@ const OnBatchSubmit= async (values:any)=>{
const jsonData: WorkInfoTypes.Page = { const jsonData: WorkInfoTypes.Page = {
pageIndex: params.current || 1, pageIndex: params.current || 1,
pageSize: params.pageSize || 10, pageSize: params.pageSize || 10,
name: params.name || '',
code: params.code,
batchId: ''
id: params.id,
endTime: params.createTime ? dayjs(params.createTime[1]) : null,
startTime: params.createTime ? dayjs(params.createTime[0]) : null
}; };
const response = await WorkInfoAPI.WorkBatchPagedList(jsonData); const response = await WorkInfoAPI.WorkBatchPagedList(jsonData);
if (response.statusCode === 200) { if (response.statusCode === 200) {


+ 2
- 0
frontend/src/types/WorkInfo.d.ts Dosyayı Görüntüle

@@ -25,6 +25,8 @@
name:string, name:string,
code:string, code:string,
batchId:string, batchId:string,
endTime:any,
startTime:any
} }
type BatchAdd = Info type BatchAdd = Info
interface WorkMaterialsRecordQueryPageInput { interface WorkMaterialsRecordQueryPageInput {


Yükleniyor…
İptal
Kaydet