@@ -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> | ||||
输出 | 输出 | ||||
@@ -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> | ||||
/// 输出 | /// 输出 | ||||
@@ -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 | ||||
{ | { | ||||
@@ -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) { | ||||
@@ -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 { | ||||