diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs
new file mode 100644
index 00000000..aaa52ab4
--- /dev/null
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs
@@ -0,0 +1,89 @@
+namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
+{
+ public class PADPackageTaskPageOutput
+ {
+ public string id { get; set; }
+
+ ///
+ /// 生产任务编号
+ ///
+ public string? mo_task_code { get; set; }
+
+ ///
+ /// 工单Id
+ ///
+ public string? mo_id { get; set; }
+
+ ///
+ /// 物料Id
+ ///
+ public string material_id { get; set; }
+
+ public string material_code { get; set; }
+ public string material_name { get; set; }
+
+ ///
+ /// 产线id
+ ///
+ public string? workline_id { get; set; }
+
+ public string? workline_name { get; set; }
+
+ ///
+ /// 生产bom id
+ ///
+ public string? bom_id { get; set; }
+
+ ///
+ /// 任务单状态
+ ///
+ public string? mo_task_status { get; set; }
+
+
+
+ ///
+ /// 已完工数量
+ ///
+ public int? complete_qty { get; set; }
+
+ ///
+ /// 报废数量
+ ///
+ public int? scrap_qty { get; set; }
+
+ ///
+ /// 已排产数量
+ ///
+ public int? scheduled_qty { get; set; }
+
+ ///
+ /// 排产类型:1、注塑、挤出2、组装、包装
+ ///
+ public int? schedule_type { get; set; }
+
+ public int? reported_work_qty { get; set; }
+
+ ///
+ /// 计划开始时间
+ ///
+ public string? estimated_start_date { get; set; }
+
+ ///
+ /// 计划结束时间
+ ///
+ public string? estimated_end_date { get; set; }
+ ///
+ /// 父任务Id
+ ///
+ public string? parent_id { get; set; }
+
+ ///
+ /// 工序id
+ ///
+ public string process_id { get; set; }
+
+ public string process_name { get; set; }
+
+ public string mbom_process_id { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs
index 81854de2..4e6f5fb3 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs
@@ -10,6 +10,7 @@ using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Systems.Entitys.Permission;
+using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using Mapster;
using Microsoft.AspNetCore.Mvc;
@@ -239,5 +240,55 @@ namespace Tnb.ProductionMgr
}
}
}
+
+ ///
+ /// pda端根据工位获取组装包装列表
+ ///
+ ///
+ [HttpPost]
+ public async Task GetPadList(PrdPackReportQueryInput input)
+ {
+ if (string.IsNullOrEmpty(input.stationId))
+ {
+ return new
+ {
+ pagination = new PageResult(),
+ list = Array.Empty()
+ };
+ }
+
+ var result = await _db.Queryable()
+ .LeftJoin((a, b) => a.material_id == b.id)
+ .LeftJoin((a, b, c) => a.process_id == c.id)
+ .LeftJoin((a, b, c, d) => a.workline_id == d.Id)
+ .LeftJoin((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
+ .Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode && a.schedule_type==2)
+ .OrderByDescending((a, b) => a.create_time)
+ .Select((a, b, c, d, e) => new PADPackageTaskPageOutput
+ {
+ id = a.id,
+ mo_task_code = a.mo_task_code,
+ mo_id = a.mo_id,
+ material_id = a.material_id,
+ material_code = b.code,
+ material_name = b.name,
+ workline_id = a.workline_id,
+ workline_name = d.FullName,
+ bom_id = a.bom_id,
+ mo_task_status = e.FullName,
+ complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0),
+ scrap_qty = a.scrap_qty,
+ scheduled_qty = a.scheduled_qty,
+ reported_work_qty = a.reported_work_qty,
+ estimated_start_date = a.estimated_start_date==null ? "" : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
+ estimated_end_date = a.estimated_end_date==null ? "" : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
+ parent_id = a.parent_id,
+ process_id = a.process_id,
+ process_name = c.process_name,
+ mbom_process_id = a.mbom_process_id,
+ }).ToPagedListAsync(input.currentPage, input.pageSize);
+
+ return PageResult.SqlSugarPageResult(result);
+ }
}
}