From f7341d71e8995f05c4e766846d2ea63b9918f3a8 Mon Sep 17 00:00:00 2001 From: "xiaowei.song" Date: Tue, 11 Jun 2024 16:51:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=82=E8=A3=85=E5=AE=9E=E9=AA=8C=E5=AE=A4?= =?UTF-8?q?=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/mes/ql/PainLab02Controller.cs | 137 ++++++++++++++ .../Controllers/mes/ql/PainLab03Controller.cs | 140 ++++++++++++++ .../Controllers/mes/ql/PainLabController.cs | 132 +++++++++++++ server/ZR.Model/MES/ql/DTO/PLBatchDto.cs | 152 +++++++++++++++ .../ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs | 111 +++++++++++ server/ZR.Model/MES/ql/DTO/PLTestDto.cs | 135 ++++++++++++++ server/ZR.Model/MES/ql/PLBatch.cs | 174 ++++++++++++++++++ server/ZR.Model/MES/ql/PLRawMaterial.cs | 130 +++++++++++++ server/ZR.Model/MES/ql/PLTest.cs | 157 ++++++++++++++++ .../mes/ql/IService/IPLBatchService.cs | 24 +++ .../mes/ql/IService/IPLRawMaterialService.cs | 24 +++ .../mes/ql/IService/IPLTestService.cs | 24 +++ server/ZR.Service/mes/ql/PLBatchService.cs | 128 +++++++++++++ .../ZR.Service/mes/ql/PLRawMaterialService.cs | 146 +++++++++++++++ server/ZR.Service/mes/ql/PLTestService.cs | 125 +++++++++++++ 15 files changed, 1739 insertions(+) create mode 100644 server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs create mode 100644 server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs create mode 100644 server/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs create mode 100644 server/ZR.Model/MES/ql/DTO/PLBatchDto.cs create mode 100644 server/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs create mode 100644 server/ZR.Model/MES/ql/DTO/PLTestDto.cs create mode 100644 server/ZR.Model/MES/ql/PLBatch.cs create mode 100644 server/ZR.Model/MES/ql/PLRawMaterial.cs create mode 100644 server/ZR.Model/MES/ql/PLTest.cs create mode 100644 server/ZR.Service/mes/ql/IService/IPLBatchService.cs create mode 100644 server/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs create mode 100644 server/ZR.Service/mes/ql/IService/IPLTestService.cs create mode 100644 server/ZR.Service/mes/ql/PLBatchService.cs create mode 100644 server/ZR.Service/mes/ql/PLRawMaterialService.cs create mode 100644 server/ZR.Service/mes/ql/PLTestService.cs diff --git a/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs b/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs new file mode 100644 index 00000000..68cc4ce6 --- /dev/null +++ b/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs @@ -0,0 +1,137 @@ +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.Model.MES.qc.DTO; +using ZR.Model.MES.ql; +using ZR.Model.MES.ql.DTO; +using ZR.Service.mes.pro; +using ZR.Service.mes.pro.IService; +using ZR.Service.mes.ql; +using ZR.Service.mes.ql.IService; +using ZR.Service.mes.qu.IService; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace ZR.Admin.WebApi.Controllers.mes.ql +{ + [Route("mes/ql/PaintLab")] + public class PainLab02Controller : BaseController + { + private readonly IPLTestService plTestService; + + public PainLab02Controller(IPLTestService pltestservice) + { + this.plTestService = pltestservice; + } + + /// + /// 获取测试数据 + /// + /// + /// + /// + /// + /// + [HttpGet("gettestlist")] + public IActionResult GetTestlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize) + { + starttime = starttime.AddHours(8); + endTime = endTime.AddHours(8); + + // 时间要增加,8个小时 + (List, int) lst = plTestService.GetPLTestTable(starttime, endTime, pageNum, pageSize); + + return ToResponse(new ApiResult(200, "success", lst)); + } + + /// + /// 增加测试数据记录 + /// + /// + /// + [HttpGet("addtestlist")] + public IActionResult AddTestlist(int num) + { + + int ret = plTestService.AddPLTestRecords(1, 5); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + /// + /// 删除测试数据记录 + /// + /// + /// + [HttpGet("deltestlist")] + public IActionResult DelTestlist(string idGroup) + { + + int ret = plTestService.DelPLTestRecords(idGroup); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + /// + /// 更新测试数据记录 + /// + /// + /// + [HttpPost("updatetestlist")] + [Log(Title = "更新测试数据记录", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateTestlist([FromBody] List list) + { + + List lstDest = new List(); + foreach (PLTestDto dto in list) + { + lstDest.Add(ConvertDTO2PLTest(dto)); + } + int ret = plTestService.UpdatePLTestRecords(lstDest); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + public PLTest ConvertDTO2PLTest(PLTestDto pLTestDto) + { + PLTest pLTest = new PLTest(); + pLTest.Id = pLTestDto.Id; + pLTest.IdGroup = pLTestDto.plIdGroup; + pLTest.Code = pLTestDto.plCode; + pLTest.Dt = pLTestDto.plDt; + pLTest.Value01 = pLTestDto.plValue01; + pLTest.Value02 = pLTestDto.plValue02; + pLTest.Value03 = pLTestDto.plValue03; + pLTest.Value04 = pLTestDto.plValue04; + pLTest.Value05 = pLTestDto.plValue05; + pLTest.Value06 = pLTestDto.plValue06; + pLTest.Value07 = pLTestDto.plValue07; + pLTest.Value08 = pLTestDto.plValue08; + pLTest.Value09 = pLTestDto.plValue09; + pLTest.Value10 = pLTestDto.plValue10; + pLTest.Value11 = pLTestDto.plValue11; + pLTest.Value12 = pLTestDto.plValue12; + pLTest.Value13 = pLTestDto.plValue13; + pLTest.Value14 = pLTestDto.plValue14; + pLTest.Value15 = pLTestDto.plValue15; + pLTest.Value16 = pLTestDto.plValue16; + + pLTest.CreatedBy = pLTestDto.plCreatedBy; + pLTest.UpdatedBy = pLTestDto.plUpdatedBy; + + try + { + pLTest.CreatedTime = Convert.ToDateTime(pLTestDto.plCreatedTime); + pLTest.UpdatedTime = Convert.ToDateTime(pLTestDto.plUpdatedTime); + } + catch { } + + return pLTest; + } + } +} diff --git a/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs b/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs new file mode 100644 index 00000000..0bfb97a5 --- /dev/null +++ b/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs @@ -0,0 +1,140 @@ +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.Model.MES.qc.DTO; +using ZR.Model.MES.ql; +using ZR.Model.MES.ql.DTO; +using ZR.Service.mes.pro; +using ZR.Service.mes.pro.IService; +using ZR.Service.mes.ql; +using ZR.Service.mes.ql.IService; +using ZR.Service.mes.qu.IService; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace ZR.Admin.WebApi.Controllers.mes.ql +{ + [Route("mes/ql/PaintLab")] + public class PainLab03Controller : BaseController + { + private readonly IPLBatchService plBatchService; + + public PainLab03Controller(IPLBatchService plbatchservice) + { + this.plBatchService = plbatchservice; + } + + /// + /// 获取批处理数据 + /// + /// + /// + /// + /// + /// + [HttpGet("getbatchlist")] + public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize) + { + + starttime = starttime.AddHours(8); + endTime = endTime.AddHours(8); + // 时间要增加,8个小时 + (List, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, pageNum, pageSize); + + return ToResponse(new ApiResult(200, "success", lst)); + } + + /// + /// 增加批处理数据记录 + /// + /// + /// + [HttpGet("addbatchlist")] + public IActionResult AddBatchlist(int num) + { + + int ret = plBatchService.AddPLBatchRecords(1, 5); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + /// + /// 删除测试数据记录 + /// + /// + /// + [HttpGet("delbatchlist")] + public IActionResult DelBatchlist(string idGroup) + { + + int ret = plBatchService.DelPLBatchRecords(idGroup); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + /// + /// 更新批处理数据记录 + /// + /// + /// + [HttpPost("updatebatchlist")] + [Log(Title = "更新批处理数据记录", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateTestlist([FromBody] List list) + { + + List lstDest = new List(); + foreach (PLBatchDto dto in list) + { + lstDest.Add(ConvertDTO2PLBatch(dto)); + } + int ret = plBatchService.UpdatePLBatchRecords(lstDest); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + public PLBatch ConvertDTO2PLBatch(PLBatchDto pLBatchDto) + { + PLBatch pLBatch = new PLBatch(); + pLBatch.Id = pLBatchDto.Id; + pLBatch.IdGroup = pLBatchDto.plIdGroup; + pLBatch.Code = pLBatchDto.plCode; + pLBatch.Dt = pLBatchDto.plDt; + pLBatch.Value01 = pLBatchDto.plValue01; + pLBatch.Value02 = pLBatchDto.plValue02; + pLBatch.Value03 = pLBatchDto.plValue03; + pLBatch.Value04 = pLBatchDto.plValue04; + pLBatch.Value05 = pLBatchDto.plValue05; + pLBatch.Value06 = pLBatchDto.plValue06; + pLBatch.Value07 = pLBatchDto.plValue07; + pLBatch.Value08 = pLBatchDto.plValue08; + pLBatch.Value09 = pLBatchDto.plValue09; + pLBatch.Value10 = pLBatchDto.plValue10; + pLBatch.Value11 = pLBatchDto.plValue11; + pLBatch.Value12 = pLBatchDto.plValue12; + pLBatch.Value13 = pLBatchDto.plValue13; + pLBatch.Value14 = pLBatchDto.plValue14; + pLBatch.Value15 = pLBatchDto.plValue15; + pLBatch.Value16 = pLBatchDto.plValue16; + pLBatch.Value17 = pLBatchDto.plValue17; + pLBatch.Value18 = pLBatchDto.plValue18; + pLBatch.Value19 = pLBatchDto.plValue19; + + pLBatch.CreatedBy = pLBatchDto.plCreatedBy; + pLBatch.UpdatedBy = pLBatchDto.plUpdatedBy; + + try + { + pLBatch.CreatedTime = Convert.ToDateTime(pLBatchDto.plCreatedTime); + pLBatch.UpdatedTime = Convert.ToDateTime(pLBatchDto.plUpdatedTime); + } + catch { } + + return pLBatch; + } + } +} diff --git a/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs b/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs new file mode 100644 index 00000000..19bb486b --- /dev/null +++ b/server/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs @@ -0,0 +1,132 @@ +using Aliyun.OSS; +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.Admin.WebApi.Filters; +using ZR.Model.mes.pro; +using ZR.Model.MES.qc; +using ZR.Model.MES.ql.DTO; +using ZR.Model.MES.ql; +using ZR.Service.mes.pro; +using ZR.Service.mes.pro.IService; +using ZR.Service.mes.ql.IService; +using ZR.Service.mes.qu.IService; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace ZR.Admin.WebApi.Controllers.mes.ql +{ + [Route("mes/ql/PaintLab")] + public class PainLabController : BaseController + { + private readonly IPLRawMaterialService plRawMaterialService; + + public PainLabController(IPLRawMaterialService plrawmaterialservice) + { + this.plRawMaterialService = plrawmaterialservice; + } + + /// + /// 查询原材料记录表 + /// + /// + /// + /// + /// + /// + [HttpGet("getrawmateriallist")] + public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, int pageNum, int pageSize) + { + starttime = starttime.AddHours(8); + endTime = endTime.AddHours(8); + + // 时间要增加,8个小时 + (List, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, pageNum, pageSize); + + return ToResponse(new ApiResult(200, "success", lst)); + } + + /// + /// 增加原材料记录 + /// + /// + /// + [HttpGet("addrawmateriallist")] + public IActionResult AddRawMateriallist(int num) + { + + int ret = plRawMaterialService.AddRawMaterialRecords(1, 5); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + /// + /// 删除原材料记录 + /// + /// + /// + [HttpGet("delrawmateriallist")] + public IActionResult DelRawMateriallist(string idGroup) + { + + int ret = plRawMaterialService.DelRawMaterialRecords(idGroup); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + /// + /// 更新原材料记录 + /// + /// + /// + [HttpPost("updaterawmateriallist")] + [Log(Title = "更新原材料记录", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateRawMateriallist([FromBody] List list) + { + + List lstDest = new List(); + foreach (PLRawMaterialDto dto in list) + { + lstDest.Add(ConvertDTO2PLRawMaterial(dto)); + } + int ret = plRawMaterialService.UpdateRawMaterialRecords(lstDest); + + return ToResponse(new ApiResult(200, "success", ret)); + } + + public PLRawMaterial ConvertDTO2PLRawMaterial(PLRawMaterialDto pLRawMaterialDto) + { + PLRawMaterial pLRawMaterial = new PLRawMaterial(); + pLRawMaterial.Id = pLRawMaterialDto.Id; + pLRawMaterial.IdGroup = pLRawMaterialDto.plIdGroup; + pLRawMaterial.Code = pLRawMaterialDto.plCode; + pLRawMaterial.Pci = pLRawMaterialDto.plPci; + pLRawMaterial.Value01 = pLRawMaterialDto.plValue01; + pLRawMaterial.Value02 = pLRawMaterialDto.plValue02; + pLRawMaterial.Value03 = pLRawMaterialDto.plValue03; + pLRawMaterial.Value04 = pLRawMaterialDto.plValue04; + pLRawMaterial.Value05 = pLRawMaterialDto.plValue05; + pLRawMaterial.Value06 = pLRawMaterialDto.plValue06; + pLRawMaterial.Value07 = pLRawMaterialDto.plValue07; + pLRawMaterial.Value08 = pLRawMaterialDto.plValue08; + pLRawMaterial.Value09 = pLRawMaterialDto.plValue09; + pLRawMaterial.Value10 = pLRawMaterialDto.plValue10; + pLRawMaterial.Value11 = pLRawMaterialDto.plValue11; + pLRawMaterial.CreatedBy = pLRawMaterialDto.plCreatedBy; + pLRawMaterial.UpdatedBy = pLRawMaterialDto.plUpdatedBy; + + try + { + pLRawMaterial.CreatedTime = Convert.ToDateTime(pLRawMaterialDto.plCreatedTime); + pLRawMaterial.UpdatedTime = Convert.ToDateTime(pLRawMaterialDto.plUpdatedTime); + } + catch { } + + return pLRawMaterial; + } + } +} diff --git a/server/ZR.Model/MES/ql/DTO/PLBatchDto.cs b/server/ZR.Model/MES/ql/DTO/PLBatchDto.cs new file mode 100644 index 00000000..f399880d --- /dev/null +++ b/server/ZR.Model/MES/ql/DTO/PLBatchDto.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; + +namespace ZR.Model.MES.ql.DTO +{ + /// + /// 当前工单 + /// + public class PLBatchDto + { + + /// + /// 流水号 + /// + public int Id { get; set; } + + /// + /// 组识别号 + /// + public string plIdGroup { get; set; } + + /// + /// 颜色/代号 + /// + public string plCode { get; set; } + + /// + /// 批次号 + /// + public string plDt { get; set; } + + /// + /// 温度 + /// + public string plValue01 { get; set; } + + /// + /// △L + /// + public string plValue02 { get; set; } + + /// + /// △A + /// + public string plValue03 { get; set; } + + /// + /// △B + /// + public string plValue04 { get; set; } + + /// + /// △E + /// + public string plValue05 { get; set; } + + /// + /// mDE + /// + public string plValue06 { get; set; } + + /// + /// 膜厚-名称 + /// + public string plValue07 { get; set; } + + /// + /// 膜厚-结果 + /// + public string plValue08 { get; set; } + + /// + /// 粘度 + /// + public string plValue09 { get; set; } + + /// + /// 固含量 + /// + public string plValue10 { get; set; } + + /// + /// 电阻值 + /// + public string plValue11 { get; set; } + + /// + /// 电阻值 + /// + public string plValue12 { get; set; } + + /// + /// 电阻值 + /// + public string plValue13 { get; set; } + + /// + /// 电阻值 + /// + public string plValue14 { get; set; } + + /// + /// 电阻值 + /// + public string plValue15 { get; set; } + + /// + /// 电阻值 + /// + public string plValue16 { get; set; } + + /// + /// 电阻值 + /// + public string plValue17 { get; set; } + + /// + /// 电阻值 + /// + public string plValue18 { get; set; } + + /// + /// 电阻值 + /// + public string plValue19 { get; set; } + + + /// + /// 创建人 + /// + public string plCreatedBy { get; set; } + + /// + /// 创建时间 + /// + public string plCreatedTime { get; set; } + + /// + /// 更新人 + /// + public string plUpdatedBy { get; set; } + + /// + /// 更新时间 + /// + public string plUpdatedTime { get; set; } + } +} diff --git a/server/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs b/server/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs new file mode 100644 index 00000000..a0b8b6ea --- /dev/null +++ b/server/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; + +namespace ZR.Model.MES.ql.DTO +{ + /// + /// 当前工单 + /// + public class PLRawMaterialDto + { + + /// + /// 流水号 + /// + public int Id { get; set; } + + /// + /// 组识别号 + /// + public string plIdGroup { get; set; } + + /// + /// 颜色/代号 + /// + public string plCode { get; set; } + + /// + /// 批次号 + /// + public string plPci { get; set; } + + /// + /// 温度 + /// + public string plValue01 { get; set; } + + /// + /// △L + /// + public string plValue02 { get; set; } + + /// + /// △A + /// + public string plValue03 { get; set; } + + /// + /// △B + /// + public string plValue04 { get; set; } + + /// + /// △E + /// + public string plValue05 { get; set; } + + /// + /// mDE + /// + public string plValue06 { get; set; } + + /// + /// 膜厚-名称 + /// + public string plValue07 { get; set; } + + /// + /// 膜厚-结果 + /// + public string plValue08 { get; set; } + + /// + /// 粘度 + /// + public string plValue09 { get; set; } + + /// + /// 固含量 + /// + public string plValue10 { get; set; } + + /// + /// 电阻值 + /// + public string plValue11 { get; set; } + + /// + /// 创建人 + /// + public string plCreatedBy { get; set; } + + /// + /// 创建时间 + /// + public string plCreatedTime { get; set; } + + /// + /// 更新人 + /// + public string plUpdatedBy { get; set; } + + /// + /// 更新时间 + /// + public string plUpdatedTime { get; set; } + } +} diff --git a/server/ZR.Model/MES/ql/DTO/PLTestDto.cs b/server/ZR.Model/MES/ql/DTO/PLTestDto.cs new file mode 100644 index 00000000..bafd3d13 --- /dev/null +++ b/server/ZR.Model/MES/ql/DTO/PLTestDto.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; + +namespace ZR.Model.MES.ql.DTO +{ + /// + /// 当前工单 + /// + public class PLTestDto + { + + /// + /// 流水号 + /// + public int Id { get; set; } + + /// + /// 组识别号 + /// + public string plIdGroup { get; set; } + + /// + /// 颜色/代号 + /// + public string plCode { get; set; } + + /// + /// 批次号 + /// + public string plDt { get; set; } + + /// + /// 温度 + /// + public string plValue01 { get; set; } + + /// + /// △L + /// + public string plValue02 { get; set; } + + /// + /// △A + /// + public string plValue03 { get; set; } + + /// + /// △B + /// + public string plValue04 { get; set; } + + /// + /// △E + /// + public string plValue05 { get; set; } + + /// + /// mDE + /// + public string plValue06 { get; set; } + + /// + /// 膜厚-名称 + /// + public string plValue07 { get; set; } + + /// + /// 膜厚-结果 + /// + public string plValue08 { get; set; } + + /// + /// 粘度 + /// + public string plValue09 { get; set; } + + /// + /// 固含量 + /// + public string plValue10 { get; set; } + + /// + /// 电阻值 + /// + public string plValue11 { get; set; } + + /// + /// 电阻值 + /// + public string plValue12 { get; set; } + + /// + /// 电阻值 + /// + public string plValue13 { get; set; } + + /// + /// 电阻值 + /// + public string plValue14 { get; set; } + + /// + /// 电阻值 + /// + public string plValue15 { get; set; } + + /// + /// 电阻值 + /// + public string plValue16 { get; set; } + /// + /// 创建人 + /// + public string plCreatedBy { get; set; } + + /// + /// 创建时间 + /// + public string plCreatedTime { get; set; } + + /// + /// 更新人 + /// + public string plUpdatedBy { get; set; } + + /// + /// 更新时间 + /// + public string plUpdatedTime { get; set; } + } +} diff --git a/server/ZR.Model/MES/ql/PLBatch.cs b/server/ZR.Model/MES/ql/PLBatch.cs new file mode 100644 index 00000000..e59843de --- /dev/null +++ b/server/ZR.Model/MES/ql/PLBatch.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZR.Model.MES.ql +{ + + /// + /// 批处理数据 + /// + [SugarTable("ql_batch")] + public class PLBatch + { + /// + /// 流水号 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public int Id { get; set; } + + /// + /// 组识别号 + /// + [SugarColumn(ColumnName = "id_group")] + public string IdGroup { get; set; } + + /// + /// 日期 + /// + [SugarColumn(ColumnName = "dt")] + public string Dt { get; set; } + + /// + /// 颜色/代号 + /// + [SugarColumn(ColumnName = "code")] + public string Code { get; set; } + + /// + /// 温度 + /// + [SugarColumn(ColumnName = "value01")] + public string Value01 { get; set; } + + /// + /// △L + /// + [SugarColumn(ColumnName = "value02")] + public string Value02 { get; set; } + + /// + /// △A + /// + [SugarColumn(ColumnName = "value03")] + public string Value03 { get; set; } + + /// + /// △B + /// + [SugarColumn(ColumnName = "value04")] + public string Value04 { get; set; } + + /// + /// △E + /// + [SugarColumn(ColumnName = "value05")] + public string Value05 { get; set; } + + /// + /// mDE + /// + [SugarColumn(ColumnName = "value06")] + public string Value06 { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "value07")] + public string Value07 { get; set; } + + /// + /// 调整配方 + /// + [SugarColumn(ColumnName = "value08")] + public string Value08 { get; set; } + + /// + /// R值 + /// + [SugarColumn(ColumnName = "value09")] + public string Value09 { get; set; } + + /// + /// 流量 + /// + [SugarColumn(ColumnName = "value10")] + public string Value10 { get; set; } + + /// + /// 雾化 + /// + [SugarColumn(ColumnName = "value11")] + public string Value11 { get; set; } + + /// + /// 扇面 + /// + [SugarColumn(ColumnName = "value12")] + public string Value12 { get; set; } + + /// + /// 高压 + /// + [SugarColumn(ColumnName = "value13")] + public string Value13 { get; set; } + + /// + /// 名称 + /// + [SugarColumn(ColumnName = "value14")] + public string Value14 { get; set; } + + /// + /// 值 + /// + [SugarColumn(ColumnName = "value15")] + public string Value15 { get; set; } + + /// + /// 橘皮 + /// + [SugarColumn(ColumnName = "value16")] + public string Value16 { get; set; } + + /// + /// 附着力 + /// + [SugarColumn(ColumnName = "value17")] + public string Value17 { get; set; } + + /// + /// 判定 + /// + [SugarColumn(ColumnName = "value18")] + public string Value18 { get; set; } + + /// + /// 检验员 + /// + [SugarColumn(ColumnName = "value19")] + public string Value19 { get; set; } + /// + /// 创建人 + /// + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } + /// + /// 更新人 + /// + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } + /// + /// 更新时间 + /// + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } + } +} \ No newline at end of file diff --git a/server/ZR.Model/MES/ql/PLRawMaterial.cs b/server/ZR.Model/MES/ql/PLRawMaterial.cs new file mode 100644 index 00000000..776055a0 --- /dev/null +++ b/server/ZR.Model/MES/ql/PLRawMaterial.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZR.Model.MES.ql +{ + + /// + /// 原材料数据 + /// + [SugarTable("ql_rawmaterial")] + public class PLRawMaterial + { + /// + /// 流水号 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public int Id { get; set; } + + /// + /// 组识别号 + /// + [SugarColumn(ColumnName = "id_group")] + public string IdGroup { get; set; } + + /// + /// 颜色/代号 + /// + [SugarColumn(ColumnName = "code")] + public string Code { get; set; } + + /// + /// 批次号 + /// + [SugarColumn(ColumnName = "pci")] + public string Pci { get; set; } + + /// + /// 温度 + /// + [SugarColumn(ColumnName = "value01")] + public string Value01 { get; set; } + + /// + /// △L + /// + [SugarColumn(ColumnName = "value02")] + public string Value02 { get; set; } + + /// + /// △A + /// + [SugarColumn(ColumnName = "value03")] + public string Value03 { get; set; } + + /// + /// △B + /// + [SugarColumn(ColumnName = "value04")] + public string Value04 { get; set; } + + /// + /// △E + /// + [SugarColumn(ColumnName = "value05")] + public string Value05 { get; set; } + + /// + /// mDE + /// + [SugarColumn(ColumnName = "value06")] + public string Value06 { get; set; } + + /// + /// 膜厚-名称 + /// + [SugarColumn(ColumnName = "value07")] + public string Value07 { get; set; } + + /// + /// 膜厚-结果 + /// + [SugarColumn(ColumnName = "value08")] + public string Value08 { get; set; } + + /// + /// 粘度 + /// + [SugarColumn(ColumnName = "value09")] + public string Value09 { get; set; } + + /// + /// 固含量 + /// + [SugarColumn(ColumnName = "value10")] + public string Value10 { get; set; } + + /// + /// 电阻值 + /// + [SugarColumn(ColumnName = "value11")] + public string Value11 { get; set; } + + + /// + /// 创建人 + /// + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } + /// + /// 更新人 + /// + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } + /// + /// 更新时间 + /// + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } + } + + +} diff --git a/server/ZR.Model/MES/ql/PLTest.cs b/server/ZR.Model/MES/ql/PLTest.cs new file mode 100644 index 00000000..fb505da7 --- /dev/null +++ b/server/ZR.Model/MES/ql/PLTest.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZR.Model.MES.ql +{ + + /// + /// 调试数据 + /// + [SugarTable("ql_test")] + public class PLTest + { + /// + /// 流水号 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public int Id { get; set; } + + /// + /// 组识别号 + /// + [SugarColumn(ColumnName = "id_group")] + public string IdGroup { get; set; } + + /// + /// 日期 + /// + [SugarColumn(ColumnName = "dt")] + public string Dt { get; set; } + + /// + /// 颜色/代号 + /// + [SugarColumn(ColumnName = "code")] + public string Code { get; set; } + + /// + /// 温度 + /// + [SugarColumn(ColumnName = "value01")] + public string Value01 { get; set; } + + /// + /// △L + /// + [SugarColumn(ColumnName = "value02")] + public string Value02 { get; set; } + + /// + /// △A + /// + [SugarColumn(ColumnName = "value03")] + public string Value03 { get; set; } + + /// + /// △B + /// + [SugarColumn(ColumnName = "value04")] + public string Value04 { get; set; } + + /// + /// △E + /// + [SugarColumn(ColumnName = "value05")] + public string Value05 { get; set; } + + /// + /// mDE + /// + [SugarColumn(ColumnName = "value06")] + public string Value06 { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "value07")] + public string Value07 { get; set; } + + /// + /// 调整配方 + /// + [SugarColumn(ColumnName = "value08")] + public string Value08 { get; set; } + + /// + /// R值 + /// + [SugarColumn(ColumnName = "value09")] + public string Value09 { get; set; } + + /// + /// 流量 + /// + [SugarColumn(ColumnName = "value10")] + public string Value10 { get; set; } + + /// + /// 雾化 + /// + [SugarColumn(ColumnName = "value11")] + public string Value11 { get; set; } + + /// + /// 扇面 + /// + [SugarColumn(ColumnName = "value12")] + public string Value12 { get; set; } + + /// + /// 高压 + /// + [SugarColumn(ColumnName = "value13")] + public string Value13 { get; set; } + + /// + /// 名称 + /// + [SugarColumn(ColumnName = "value14")] + public string Value14 { get; set; } + + /// + /// 值 + /// + [SugarColumn(ColumnName = "value15")] + public string Value15 { get; set; } + + /// + /// 质量判定 + /// + [SugarColumn(ColumnName = "value16")] + public string Value16 { get; set; } + + /// + /// 创建人 + /// + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } + /// + /// 更新人 + /// + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } + /// + /// 更新时间 + /// + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } + } +} \ No newline at end of file diff --git a/server/ZR.Service/mes/ql/IService/IPLBatchService.cs b/server/ZR.Service/mes/ql/IService/IPLBatchService.cs new file mode 100644 index 00000000..02a98da6 --- /dev/null +++ b/server/ZR.Service/mes/ql/IService/IPLBatchService.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.MES.ql; + + +namespace ZR.Service.mes.ql.IService +{ + public interface IPLBatchService + { + + public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize); + + public int AddPLBatchRecords(int num, int size); + + public int DelPLBatchRecords(string idGroup); + + public int UpdatePLBatchRecords(List list); + + + } +} diff --git a/server/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs b/server/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs new file mode 100644 index 00000000..0763dbad --- /dev/null +++ b/server/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.MES.qc; +using ZR.Model.MES.ql; + + +namespace ZR.Service.mes.ql.IService +{ + public interface IPLRawMaterialService + { + + public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize); + + public int AddRawMaterialRecords(int num,int size); + + public int DelRawMaterialRecords(string idGroup); + + public int UpdateRawMaterialRecords(List list); + + } +} diff --git a/server/ZR.Service/mes/ql/IService/IPLTestService.cs b/server/ZR.Service/mes/ql/IService/IPLTestService.cs new file mode 100644 index 00000000..3819f0b5 --- /dev/null +++ b/server/ZR.Service/mes/ql/IService/IPLTestService.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.MES.ql; + + +namespace ZR.Service.mes.ql.IService +{ + public interface IPLTestService + { + + public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize); + + public int AddPLTestRecords(int num, int size); + + public int DelPLTestRecords(string idGroup); + + public int UpdatePLTestRecords(List list); + + + } +} diff --git a/server/ZR.Service/mes/ql/PLBatchService.cs b/server/ZR.Service/mes/ql/PLBatchService.cs new file mode 100644 index 00000000..4d9ed2be --- /dev/null +++ b/server/ZR.Service/mes/ql/PLBatchService.cs @@ -0,0 +1,128 @@ +using Infrastructure.Attribute; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.IdentityModel.Tokens; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Security.AccessControl; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.MES.ql; +using ZR.Service.mes.ql.IService; + +namespace ZR.Service.mes.ql +{ + /// + /// 查询报表 + /// + [AppService(ServiceType = typeof(IPLBatchService), ServiceLifetime = LifeTime.Transient)] + public class PLBatchService : BaseService, IPLBatchService + { + /// + /// 增加批处理数据 + /// + /// + /// + /// + /// + public int AddPLBatchRecords(int num, int size) + { + PLBatch t1 = GetDefaultPLBatch(); + PLBatch t2 = GetDefaultPLBatch(); + PLBatch t3 = GetDefaultPLBatch(); + PLBatch t4 = GetDefaultPLBatch(); + PLBatch t5 = GetDefaultPLBatch(); + t1.Value01 = "15°"; t1.Value07 = "加浆"; t1.Value09 = "R1"; t1.Value14 = "底漆"; + t2.Value01 = "25°"; t2.Value07 = "加浆"; t2.Value09 = "R2"; t2.Value14 = "色漆"; + t3.Value01 = "45°"; t3.Value07 = "加浆"; t3.Value09 = "R3"; t3.Value14 = "云母"; + t4.Value01 = "75°"; t4.Value07 = "加浆"; t4.Value09 = "R4"; t4.Value14 = "清漆"; + t5.Value01 = "110°"; t5.Value07 = "加浆"; t5.Value09 = "R5"; t5.Value14 = "总膜厚"; + t2.IdGroup = t1.IdGroup; + t3.IdGroup = t1.IdGroup; + t4.IdGroup = t1.IdGroup; + t5.IdGroup = t1.IdGroup; + + List lst = new List(); + lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5); + + int ret = Context.Insertable(lst).ExecuteReturnIdentity(); + + return ret; + } + + /// + /// 删除批处理数据 + /// + /// + /// + /// + public int DelPLBatchRecords(string idGroup) + { + return Context.Deleteable().Where(it => it.IdGroup.Equals(idGroup)).ExecuteCommand(); + } + + /// + /// 获取批处理数据 + /// + /// + /// + /// + /// + /// + /// + public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize) + { + int totalNum = 0; + List data = Context.Queryable().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum); + return (data, totalNum); + } + + /// + /// 更新批处理数据 + /// + /// + /// + /// + public int UpdatePLBatchRecords(List list) + { + return Context.Updateable(list).ExecuteCommand(); + } + + private PLBatch GetDefaultPLBatch() + { + return new PLBatch() + { + Id = 0, + IdGroup = DateTime.Now.ToString("yyyyMMddHHmmssfff"), + Dt = "", + Code = "", + Value01 = "", + Value02 = "", + Value03 = "", + Value04 = "", + Value05 = "", + Value06 = "", + Value07 = "", + Value08 = "", + Value09 = "", + Value10 = "", + Value11 = "", + Value12 = "", + Value13 = "", + Value14 = "", + Value15 = "", + Value16 = "", + Value17 = "", + Value18 = "", + Value19 = "", + CreatedBy = "user", + CreatedTime = DateTime.Now, + UpdatedBy = "user", + UpdatedTime = DateTime.Now, + }; + } + } +} diff --git a/server/ZR.Service/mes/ql/PLRawMaterialService.cs b/server/ZR.Service/mes/ql/PLRawMaterialService.cs new file mode 100644 index 00000000..c3e3c4a8 --- /dev/null +++ b/server/ZR.Service/mes/ql/PLRawMaterialService.cs @@ -0,0 +1,146 @@ +using Infrastructure.Attribute; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.IdentityModel.Tokens; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Security.AccessControl; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.MES.qc; +using ZR.Model.MES.ql; +using ZR.Service.mes.ql.IService; + +namespace ZR.Service.mes.ql +{ + /// + /// 查询报表 + /// + [AppService(ServiceType = typeof(IPLRawMaterialService), ServiceLifetime = LifeTime.Transient)] + public class PLRawMaterialService : BaseService, IPLRawMaterialService + { + /// + /// 增加一组,数据记录 + /// + /// + /// + /// + public int AddRawMaterialRecords(int num, int size) + { + PLRawMaterial t1 = GetDefaultPLRawMaterial(); + PLRawMaterial t2 = GetDefaultPLRawMaterial(); + PLRawMaterial t3 = GetDefaultPLRawMaterial(); + PLRawMaterial t4 = GetDefaultPLRawMaterial(); + PLRawMaterial t5 = GetDefaultPLRawMaterial(); + t1.Value01 = "15°"; t1.Value07 = "底漆"; + t2.Value01 = "25°"; t2.Value07 = "色漆"; + t3.Value01 = "45°"; t3.Value07 = "云母"; + t4.Value01 = "75°"; t4.Value07 = "清漆"; + t5.Value01 = "110°"; t5.Value07 = "总膜厚"; + t2.IdGroup = t1.IdGroup; + t3.IdGroup = t1.IdGroup; + t4.IdGroup = t1.IdGroup; + t5.IdGroup = t1.IdGroup; + + List lst = new List(); + lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5); + + int ret = Context.Insertable(lst).ExecuteReturnIdentity(); + + return ret; + } + + /// + /// 删除数据记录 + /// + /// + /// + /// + public int DelRawMaterialRecords(string idGroup) + { + return Context.Deleteable().Where(it => it.IdGroup.Equals(idGroup)).ExecuteCommand(); + } + + /// + /// 查询数据记录,要改成分页查询 + /// + /// + public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize) + { + //starttime = starttime.ToLocalTime(); + //endTime = endTime.ToLocalTime(); + //int totalNum = 0; + //var predicate = Expressionable.Create() + // //XXX:修改查询日期查询的字段 + // .AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime.ToLocalTime()) + // .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime <= endTime.ToLocalTime()) + // .AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Contains(workorderid)) + // .AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Contains(partnumber)) + // .AndIF(!string.IsNullOrEmpty(team), it => it.Team.Equals(team)) + // .AndIF(!string.IsNullOrEmpty(product_description), it => it.ProductDescription.Contains(product_description)) + // .ToExpression(); + + + //List data = Context.Queryable().Where(predicate).OrderBy(it => it.WorkorderId).OrderBy(it => it.Remark2).ToPageList(pageNum, pageSize, ref totalNum); + //foreach (QcQualityStatisticsAgain item in data) + //{ + // WmMaterial material = Context.Queryable() + // .Where(it => it.Partnumber == item.FinishedPartNumber) + // .First(); + // if (material == null) + // { + // item.ProductDescription = "此零件号不在物料清单内!"; + // continue; + // } + // item.ProductDescription = !string.IsNullOrEmpty(material.Description) ? material.Description : material.ProductName; + //} + + //return (data, totalNum); + + int totalNum = 0; + List data = Context.Queryable().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum); + return (data, totalNum); + //return (Context.Queryable().Where(it => it.Id > 0).ToList(),100); + } + + /// + /// 更新数据记录 + /// + /// + /// + /// + public int UpdateRawMaterialRecords(List list) + { + return Context.Updateable(list).ExecuteCommand(); + } + + private PLRawMaterial GetDefaultPLRawMaterial() + { + return new PLRawMaterial() + { + Id = 0, + IdGroup=DateTime.Now.ToString("yyyyMMddHHmmssfff"), + Code="", + Pci="", + Value01="", + Value02 = "", + Value03 = "", + Value04 = "", + Value05 = "", + Value06 = "", + Value07 = "", + Value08 = "", + Value09 = "", + Value10 = "", + Value11 = "", + CreatedBy="user", + CreatedTime=DateTime.Now, + UpdatedBy="user", + UpdatedTime=DateTime.Now, + }; + } + } +} diff --git a/server/ZR.Service/mes/ql/PLTestService.cs b/server/ZR.Service/mes/ql/PLTestService.cs new file mode 100644 index 00000000..2267558a --- /dev/null +++ b/server/ZR.Service/mes/ql/PLTestService.cs @@ -0,0 +1,125 @@ +using Infrastructure.Attribute; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.IdentityModel.Tokens; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Security.AccessControl; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.MES.ql; +using ZR.Service.mes.ql.IService; + +namespace ZR.Service.mes.ql +{ + /// + /// 查询报表 + /// + [AppService(ServiceType = typeof(IPLTestService), ServiceLifetime = LifeTime.Transient)] + public class PLTestService : BaseService, IPLTestService + { + /// + /// 增加调试数据记录 + /// + /// + /// + /// + /// + public int AddPLTestRecords(int num, int size) + { + PLTest t1 = GetDefaultPLTest(); + PLTest t2 = GetDefaultPLTest(); + PLTest t3 = GetDefaultPLTest(); + PLTest t4 = GetDefaultPLTest(); + PLTest t5 = GetDefaultPLTest(); + t1.Value01 = "15°"; t1.Value07 = "加浆"; t1.Value09 = "R1"; t1.Value14 = "底漆"; + t2.Value01 = "25°"; t2.Value07 = "加浆"; t2.Value09 = "R2"; t2.Value14 = "色漆"; + t3.Value01 = "45°"; t3.Value07 = "加浆"; t3.Value09 = "R3"; t3.Value14 = "云母"; + t4.Value01 = "75°"; t4.Value07 = "加浆"; t4.Value09 = "R4"; t4.Value14 = "清漆"; + t5.Value01 = "110°"; t5.Value07 = "加浆"; t5.Value09 = "R5"; t5.Value14 = "总膜厚"; + t2.IdGroup = t1.IdGroup; + t3.IdGroup = t1.IdGroup; + t4.IdGroup = t1.IdGroup; + t5.IdGroup = t1.IdGroup; + + List lst = new List(); + lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5); + + int ret = Context.Insertable(lst).ExecuteReturnIdentity(); + + return ret; + } + + /// + /// 删除调试数据记录 + /// + /// + /// + /// + public int DelPLTestRecords(string idGroup) + { + return Context.Deleteable().Where(it => it.IdGroup.Equals(idGroup)).ExecuteCommand(); + } + + /// + /// 获取调试数据记录 + /// + /// + /// + /// + /// + /// + /// + public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize) + { + int totalNum = 0; + List data = Context.Queryable().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum); + return (data, totalNum); + } + + /// + /// 更新调试数据记录 + /// + /// + /// + /// + public int UpdatePLTestRecords(List list) + { + return Context.Updateable(list).ExecuteCommand(); + } + + private PLTest GetDefaultPLTest() + { + return new PLTest() + { + Id = 0, + IdGroup = DateTime.Now.ToString("yyyyMMddHHmmssfff"), + Dt = "", + Code = "", + Value01 = "", + Value02 = "", + Value03 = "", + Value04 = "", + Value05 = "", + Value06 = "", + Value07 = "", + Value08 = "", + Value09 = "", + Value10 = "", + Value11 = "", + Value12 = "", + Value13 = "", + Value14 = "", + Value15 = "", + Value16 = "", + CreatedBy = "user", + CreatedTime = DateTime.Now, + UpdatedBy = "user", + UpdatedTime = DateTime.Now, + }; + } + } +}