涂装实验室输入
This commit is contained in:
137
server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs
Normal file
137
server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs
Normal file
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取测试数据
|
||||
/// </summary>
|
||||
/// <param name="starttime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("gettestlist")]
|
||||
public IActionResult GetTestlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
|
||||
{
|
||||
starttime = starttime.AddHours(8);
|
||||
endTime = endTime.AddHours(8);
|
||||
|
||||
// 时间要增加,8个小时
|
||||
(List<PLTest>, int) lst = plTestService.GetPLTestTable(starttime, endTime, pageNum, pageSize);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", lst));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加测试数据记录
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("addtestlist")]
|
||||
public IActionResult AddTestlist(int num)
|
||||
{
|
||||
|
||||
int ret = plTestService.AddPLTestRecords(1, 5);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除测试数据记录
|
||||
/// </summary>
|
||||
/// <param name="idGroup"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("deltestlist")]
|
||||
public IActionResult DelTestlist(string idGroup)
|
||||
{
|
||||
|
||||
int ret = plTestService.DelPLTestRecords(idGroup);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新测试数据记录
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updatetestlist")]
|
||||
[Log(Title = "更新测试数据记录", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateTestlist([FromBody] List<PLTestDto> list)
|
||||
{
|
||||
|
||||
List<PLTest> lstDest = new List<PLTest>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
140
server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs
Normal file
140
server/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs
Normal file
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取批处理数据
|
||||
/// </summary>
|
||||
/// <param name="starttime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getbatchlist")]
|
||||
public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
|
||||
{
|
||||
|
||||
starttime = starttime.AddHours(8);
|
||||
endTime = endTime.AddHours(8);
|
||||
// 时间要增加,8个小时
|
||||
(List<PLBatch>, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, pageNum, pageSize);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", lst));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加批处理数据记录
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("addbatchlist")]
|
||||
public IActionResult AddBatchlist(int num)
|
||||
{
|
||||
|
||||
int ret = plBatchService.AddPLBatchRecords(1, 5);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除测试数据记录
|
||||
/// </summary>
|
||||
/// <param name="idGroup"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("delbatchlist")]
|
||||
public IActionResult DelBatchlist(string idGroup)
|
||||
{
|
||||
|
||||
int ret = plBatchService.DelPLBatchRecords(idGroup);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新批处理数据记录
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updatebatchlist")]
|
||||
[Log(Title = "更新批处理数据记录", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateTestlist([FromBody] List<PLBatchDto> list)
|
||||
{
|
||||
|
||||
List<PLBatch> lstDest = new List<PLBatch>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
132
server/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs
Normal file
132
server/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs
Normal file
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询原材料记录表
|
||||
/// </summary>
|
||||
/// <param name="starttime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getrawmateriallist")]
|
||||
public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
|
||||
{
|
||||
starttime = starttime.AddHours(8);
|
||||
endTime = endTime.AddHours(8);
|
||||
|
||||
// 时间要增加,8个小时
|
||||
(List<PLRawMaterial>, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, pageNum, pageSize);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", lst));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加原材料记录
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("addrawmateriallist")]
|
||||
public IActionResult AddRawMateriallist(int num)
|
||||
{
|
||||
|
||||
int ret = plRawMaterialService.AddRawMaterialRecords(1, 5);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除原材料记录
|
||||
/// </summary>
|
||||
/// <param name="idGroup"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("delrawmateriallist")]
|
||||
public IActionResult DelRawMateriallist(string idGroup)
|
||||
{
|
||||
|
||||
int ret = plRawMaterialService.DelRawMaterialRecords(idGroup);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新原材料记录
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updaterawmateriallist")]
|
||||
[Log(Title = "更新原材料记录", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateRawMateriallist([FromBody] List<PLRawMaterialDto> list)
|
||||
{
|
||||
|
||||
List<PLRawMaterial> lstDest = new List<PLRawMaterial>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
152
server/ZR.Model/MES/ql/DTO/PLBatchDto.cs
Normal file
152
server/ZR.Model/MES/ql/DTO/PLBatchDto.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前工单
|
||||
/// </summary>
|
||||
public class PLBatchDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
///</summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组识别号
|
||||
/// </summary>
|
||||
public string plIdGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 颜色/代号
|
||||
///</summary>
|
||||
public string plCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次号
|
||||
///</summary>
|
||||
public string plDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 温度
|
||||
///</summary>
|
||||
public string plValue01 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △L
|
||||
///</summary>
|
||||
public string plValue02 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △A
|
||||
///</summary>
|
||||
public string plValue03 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △B
|
||||
///</summary>
|
||||
public string plValue04 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △E
|
||||
///</summary>
|
||||
public string plValue05 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mDE
|
||||
///</summary>
|
||||
public string plValue06 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-名称
|
||||
///</summary>
|
||||
public string plValue07 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-结果
|
||||
///</summary>
|
||||
public string plValue08 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 粘度
|
||||
///</summary>
|
||||
public string plValue09 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 固含量
|
||||
///</summary>
|
||||
public string plValue10 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue11 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue12 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue13 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue14 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue15 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue16 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue17 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue18 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue19 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
public string plCreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
public string plCreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
///</summary>
|
||||
public string plUpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
///</summary>
|
||||
public string plUpdatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
111
server/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs
Normal file
111
server/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前工单
|
||||
/// </summary>
|
||||
public class PLRawMaterialDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
///</summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组识别号
|
||||
/// </summary>
|
||||
public string plIdGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 颜色/代号
|
||||
///</summary>
|
||||
public string plCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次号
|
||||
///</summary>
|
||||
public string plPci { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 温度
|
||||
///</summary>
|
||||
public string plValue01 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △L
|
||||
///</summary>
|
||||
public string plValue02 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △A
|
||||
///</summary>
|
||||
public string plValue03 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △B
|
||||
///</summary>
|
||||
public string plValue04 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △E
|
||||
///</summary>
|
||||
public string plValue05 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mDE
|
||||
///</summary>
|
||||
public string plValue06 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-名称
|
||||
///</summary>
|
||||
public string plValue07 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-结果
|
||||
///</summary>
|
||||
public string plValue08 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 粘度
|
||||
///</summary>
|
||||
public string plValue09 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 固含量
|
||||
///</summary>
|
||||
public string plValue10 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue11 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
public string plCreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
public string plCreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
///</summary>
|
||||
public string plUpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
///</summary>
|
||||
public string plUpdatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
135
server/ZR.Model/MES/ql/DTO/PLTestDto.cs
Normal file
135
server/ZR.Model/MES/ql/DTO/PLTestDto.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前工单
|
||||
/// </summary>
|
||||
public class PLTestDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
///</summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组识别号
|
||||
/// </summary>
|
||||
public string plIdGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 颜色/代号
|
||||
///</summary>
|
||||
public string plCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次号
|
||||
///</summary>
|
||||
public string plDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 温度
|
||||
///</summary>
|
||||
public string plValue01 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △L
|
||||
///</summary>
|
||||
public string plValue02 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △A
|
||||
///</summary>
|
||||
public string plValue03 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △B
|
||||
///</summary>
|
||||
public string plValue04 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △E
|
||||
///</summary>
|
||||
public string plValue05 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mDE
|
||||
///</summary>
|
||||
public string plValue06 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-名称
|
||||
///</summary>
|
||||
public string plValue07 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-结果
|
||||
///</summary>
|
||||
public string plValue08 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 粘度
|
||||
///</summary>
|
||||
public string plValue09 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 固含量
|
||||
///</summary>
|
||||
public string plValue10 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue11 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue12 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue13 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue14 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue15 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
public string plValue16 { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
public string plCreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
public string plCreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
///</summary>
|
||||
public string plUpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
///</summary>
|
||||
public string plUpdatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
174
server/ZR.Model/MES/ql/PLBatch.cs
Normal file
174
server/ZR.Model/MES/ql/PLBatch.cs
Normal file
@@ -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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 批处理数据
|
||||
///</summary>
|
||||
[SugarTable("ql_batch")]
|
||||
public class PLBatch
|
||||
{
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组识别号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "id_group")]
|
||||
public string IdGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日期
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "dt")]
|
||||
public string Dt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 颜色/代号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 温度
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value01")]
|
||||
public string Value01 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △L
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value02")]
|
||||
public string Value02 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △A
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value03")]
|
||||
public string Value03 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △B
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value04")]
|
||||
public string Value04 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △E
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value05")]
|
||||
public string Value05 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mDE
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value06")]
|
||||
public string Value06 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value07")]
|
||||
public string Value07 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 调整配方
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value08")]
|
||||
public string Value08 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// R值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value09")]
|
||||
public string Value09 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value10")]
|
||||
public string Value10 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 雾化
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value11")]
|
||||
public string Value11 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扇面
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value12")]
|
||||
public string Value12 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高压
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value13")]
|
||||
public string Value13 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value14")]
|
||||
public string Value14 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value15")]
|
||||
public string Value15 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 橘皮
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value16")]
|
||||
public string Value16 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 附着力
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value17")]
|
||||
public string Value17 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 判定
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value18")]
|
||||
public string Value18 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检验员
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value19")]
|
||||
public string Value19 { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
130
server/ZR.Model/MES/ql/PLRawMaterial.cs
Normal file
130
server/ZR.Model/MES/ql/PLRawMaterial.cs
Normal file
@@ -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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 原材料数据
|
||||
///</summary>
|
||||
[SugarTable("ql_rawmaterial")]
|
||||
public class PLRawMaterial
|
||||
{
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组识别号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "id_group")]
|
||||
public string IdGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 颜色/代号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "pci")]
|
||||
public string Pci { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 温度
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value01")]
|
||||
public string Value01 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △L
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value02")]
|
||||
public string Value02 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △A
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value03")]
|
||||
public string Value03 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △B
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value04")]
|
||||
public string Value04 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △E
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value05")]
|
||||
public string Value05 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mDE
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value06")]
|
||||
public string Value06 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value07")]
|
||||
public string Value07 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 膜厚-结果
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value08")]
|
||||
public string Value08 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 粘度
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value09")]
|
||||
public string Value09 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 固含量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value10")]
|
||||
public string Value10 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电阻值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value11")]
|
||||
public string Value11 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
157
server/ZR.Model/MES/ql/PLTest.cs
Normal file
157
server/ZR.Model/MES/ql/PLTest.cs
Normal file
@@ -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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 调试数据
|
||||
///</summary>
|
||||
[SugarTable("ql_test")]
|
||||
public class PLTest
|
||||
{
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组识别号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "id_group")]
|
||||
public string IdGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日期
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "dt")]
|
||||
public string Dt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 颜色/代号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 温度
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value01")]
|
||||
public string Value01 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △L
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value02")]
|
||||
public string Value02 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △A
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value03")]
|
||||
public string Value03 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △B
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value04")]
|
||||
public string Value04 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// △E
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value05")]
|
||||
public string Value05 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mDE
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value06")]
|
||||
public string Value06 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value07")]
|
||||
public string Value07 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 调整配方
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value08")]
|
||||
public string Value08 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// R值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value09")]
|
||||
public string Value09 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value10")]
|
||||
public string Value10 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 雾化
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value11")]
|
||||
public string Value11 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扇面
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value12")]
|
||||
public string Value12 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高压
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value13")]
|
||||
public string Value13 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value14")]
|
||||
public string Value14 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value15")]
|
||||
public string Value15 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 质量判定
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "value16")]
|
||||
public string Value16 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
24
server/ZR.Service/mes/ql/IService/IPLBatchService.cs
Normal file
24
server/ZR.Service/mes/ql/IService/IPLBatchService.cs
Normal file
@@ -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<PLBatch>, 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<PLBatch> list);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
24
server/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs
Normal file
24
server/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs
Normal file
@@ -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<PLRawMaterial>, 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<PLRawMaterial> list);
|
||||
|
||||
}
|
||||
}
|
||||
24
server/ZR.Service/mes/ql/IService/IPLTestService.cs
Normal file
24
server/ZR.Service/mes/ql/IService/IPLTestService.cs
Normal file
@@ -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<PLTest>, 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<PLTest> list);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
128
server/ZR.Service/mes/ql/PLBatchService.cs
Normal file
128
server/ZR.Service/mes/ql/PLBatchService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报表
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IPLBatchService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class PLBatchService : BaseService<PLBatch>, IPLBatchService
|
||||
{
|
||||
/// <summary>
|
||||
/// 增加批处理数据
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="size"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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<PLBatch> lst = new List<PLBatch>();
|
||||
lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5);
|
||||
|
||||
int ret = Context.Insertable<PLBatch>(lst).ExecuteReturnIdentity();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除批处理数据
|
||||
/// </summary>
|
||||
/// <param name="idGroup"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public int DelPLBatchRecords(string idGroup)
|
||||
{
|
||||
return Context.Deleteable<PLBatch>().Where(it => it.IdGroup.Equals(idGroup)).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取批处理数据
|
||||
/// </summary>
|
||||
/// <param name="starttime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public (List<PLBatch>, int) GetPLBatchTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
|
||||
{
|
||||
int totalNum = 0;
|
||||
List<PLBatch> data = Context.Queryable<PLBatch>().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
return (data, totalNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新批处理数据
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public int UpdatePLBatchRecords(List<PLBatch> list)
|
||||
{
|
||||
return Context.Updateable<PLBatch>(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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
146
server/ZR.Service/mes/ql/PLRawMaterialService.cs
Normal file
146
server/ZR.Service/mes/ql/PLRawMaterialService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报表
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IPLRawMaterialService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class PLRawMaterialService : BaseService<PLRawMaterial>, IPLRawMaterialService
|
||||
{
|
||||
/// <summary>
|
||||
/// 增加一组,数据记录
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="size"></param>
|
||||
/// <returns></returns>
|
||||
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<PLRawMaterial> lst = new List<PLRawMaterial>();
|
||||
lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5);
|
||||
|
||||
int ret = Context.Insertable<PLRawMaterial>(lst).ExecuteReturnIdentity();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据记录
|
||||
/// </summary>
|
||||
/// <param name="idGroup"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public int DelRawMaterialRecords(string idGroup)
|
||||
{
|
||||
return Context.Deleteable<PLRawMaterial>().Where(it => it.IdGroup.Equals(idGroup)).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据记录,要改成分页查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public (List<PLRawMaterial>, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
|
||||
{
|
||||
//starttime = starttime.ToLocalTime();
|
||||
//endTime = endTime.ToLocalTime();
|
||||
//int totalNum = 0;
|
||||
//var predicate = Expressionable.Create<QcQualityStatisticsAgain>()
|
||||
// //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<QcQualityStatisticsAgain> data = Context.Queryable<QcQualityStatisticsAgain>().Where(predicate).OrderBy(it => it.WorkorderId).OrderBy(it => it.Remark2).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
//foreach (QcQualityStatisticsAgain item in data)
|
||||
//{
|
||||
// WmMaterial material = Context.Queryable<WmMaterial>()
|
||||
// .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<PLRawMaterial> data = Context.Queryable<PLRawMaterial>().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
return (data, totalNum);
|
||||
//return (Context.Queryable<PLRawMaterial>().Where(it => it.Id > 0).ToList(),100);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新数据记录
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public int UpdateRawMaterialRecords(List<PLRawMaterial> list)
|
||||
{
|
||||
return Context.Updateable<PLRawMaterial>(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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
125
server/ZR.Service/mes/ql/PLTestService.cs
Normal file
125
server/ZR.Service/mes/ql/PLTestService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报表
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IPLTestService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class PLTestService : BaseService<PLTest>, IPLTestService
|
||||
{
|
||||
/// <summary>
|
||||
/// 增加调试数据记录
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="size"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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<PLTest> lst = new List<PLTest>();
|
||||
lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5);
|
||||
|
||||
int ret = Context.Insertable<PLTest>(lst).ExecuteReturnIdentity();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除调试数据记录
|
||||
/// </summary>
|
||||
/// <param name="idGroup"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public int DelPLTestRecords(string idGroup)
|
||||
{
|
||||
return Context.Deleteable<PLTest>().Where(it => it.IdGroup.Equals(idGroup)).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取调试数据记录
|
||||
/// </summary>
|
||||
/// <param name="starttime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public (List<PLTest>, int) GetPLTestTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
|
||||
{
|
||||
int totalNum = 0;
|
||||
List<PLTest> data = Context.Queryable<PLTest>().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
return (data, totalNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新调试数据记录
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public int UpdatePLTestRecords(List<PLTest> list)
|
||||
{
|
||||
return Context.Updateable<PLTest>(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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user