瀏覽代碼

优化

master
747575620@qq.com 6 月之前
父節點
當前提交
261ae65add
共有 5 個文件被更改,包括 38 次插入4 次删除
  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 查看文件

@@ -7415,6 +7415,21 @@
分页
</summary>
</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">
<summary>
输出


+ 15
- 1
backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkBatchDto.cs 查看文件

@@ -62,7 +62,21 @@
/// </summary>
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>
/// 输出


+ 3
- 0
backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkBatchService.cs 查看文件

@@ -51,6 +51,9 @@
public async Task<SqlSugarPagedList<WorkBatchOutput>> PagedList(WorkBatchQueryPageInput input)
{
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)
.Select((x)=>new WorkBatchOutput
{


+ 3
- 3
frontend/src/pages/workInfo/index.tsx 查看文件

@@ -700,9 +700,9 @@ const OnBatchSubmit= async (values:any)=>{
const jsonData: WorkInfoTypes.Page = {
pageIndex: params.current || 1,
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);
if (response.statusCode === 200) {


+ 2
- 0
frontend/src/types/WorkInfo.d.ts 查看文件

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


Loading…
取消
儲存