diff --git a/ZR.Admin.WebApi/Controllers/mes/qu/QuRoughController.cs b/ZR.Admin.WebApi/Controllers/mes/qu/QuRoughController.cs
new file mode 100644
index 00000000..6b6985bb
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/mes/qu/QuRoughController.cs
@@ -0,0 +1,43 @@
+using Infrastructure.Extensions;
+using JinianNet.JNTemplate;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.IdentityModel.Tokens;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System.Text.Json;
+using ZR.Admin.WebApi.Extensions;
+using ZR.Model.mes.pro;
+using ZR.Service.mes.pro;
+using ZR.Service.mes.pro.IService;
+using ZR.Service.mes.qu.IService;
+
+namespace ZR.Admin.WebApi.Controllers.mes.qu
+{
+ [Route("mes/qu/rough")]
+ public class QuRoughController : BaseController
+ {
+ private readonly IQuRoughService quRoughService;
+
+ public QuRoughController(IQuRoughService quRoughService)
+ {
+ this.quRoughService = quRoughService;
+ }
+
+ ///
+ /// 获取所有排产工单
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("getworkorderList")]
+ public IActionResult GetWorkorderList(int pageNum, int pageSize, int year = -1, int week = -1, int date = -1)
+ {
+ (List, int) data = quRoughService.GetWorkorderList(pageNum, pageSize, year, week, date, "1");
+
+ return ToResponse(new ApiResult(200, "success", data));
+ }
+ }
+}
diff --git a/ZR.Service/mes/qu/IService/IQuRoughService.cs b/ZR.Service/mes/qu/IService/IQuRoughService.cs
index 7335e65f..10882ee0 100644
--- a/ZR.Service/mes/qu/IService/IQuRoughService.cs
+++ b/ZR.Service/mes/qu/IService/IQuRoughService.cs
@@ -3,6 +3,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using ZR.Model.mes.pro;
using ZR.Model.MES.qu;
@@ -10,5 +11,6 @@ namespace ZR.Service.mes.qu.IService
{
public interface IQuRoughService
{
+ public (List, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, string isSchedule);
}
}
diff --git a/ZR.Service/mes/qu/QuRoughService.cs b/ZR.Service/mes/qu/QuRoughService.cs
index d6ba0f55..07530036 100644
--- a/ZR.Service/mes/qu/QuRoughService.cs
+++ b/ZR.Service/mes/qu/QuRoughService.cs
@@ -7,11 +7,30 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using ZR.Model.mes.pro;
using ZR.Model.MES.qu;
+using ZR.Service.mes.pro.IService;
+using ZR.Service.mes.qu.IService;
namespace ZR.Service.mes.qu
{
- public class QuRoughService
+ [AppService(ServiceType = typeof(IQuRoughService), ServiceLifetime = LifeTime.Transient)]
+ public class QuRoughService : BaseService, IQuRoughService
{
+
+ public (List, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, string isSchedule)
+ {
+ var predicate = Expressionable.Create()
+ .AndIF(year > 0, it => it.Year == year)
+ .AndIF(week > 0, it => it.Week == week)
+ .AndIF(date > 0, it => it.Date == date)
+ .AndIF(date > 0, it => it.Isarrange.Equals(isSchedule))
+ .ToExpression();
+
+ int totalCount = 0;
+ List proWorkorderList = Context.Queryable().Where(predicate).ToPageList(pageNum, pageSize, ref totalCount);
+
+ return (proWorkorderList, totalCount);
+ }
}
}