diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseDefectController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseDefectController.cs new file mode 100644 index 00000000..bf5a9a53 --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseDefectController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12基础缺陷项 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12BaseDefect")] + public class QcGp12BaseDefectController : BaseController + { + /// + /// 质量GP12基础缺陷项接口 + /// + private readonly IQcGp12BaseDefectService _QcGp12BaseDefectService; + + public QcGp12BaseDefectController(IQcGp12BaseDefectService QcGp12BaseDefectService) + { + _QcGp12BaseDefectService = QcGp12BaseDefectService; + } + + /// + /// 查询质量GP12基础缺陷项列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12basedefect:list")] + public IActionResult QueryQcGp12BaseDefect([FromQuery] QcGp12BaseDefectQueryDto parm) + { + var response = _QcGp12BaseDefectService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12基础缺陷项详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12basedefect:query")] + public IActionResult GetQcGp12BaseDefect(int Id) + { + var response = _QcGp12BaseDefectService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12基础缺陷项 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12basedefect:add")] + [Log(Title = "质量GP12基础缺陷项", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12BaseDefect([FromBody] QcGp12BaseDefectDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12BaseDefectService.AddQcGp12BaseDefect(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12基础缺陷项 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12basedefect:edit")] + [Log(Title = "质量GP12基础缺陷项", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12BaseDefect([FromBody] QcGp12BaseDefectDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12BaseDefectService.UpdateQcGp12BaseDefect(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12基础缺陷项 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12basedefect:delete")] + [Log(Title = "质量GP12基础缺陷项", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12BaseDefect(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12BaseDefectService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseGroupController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseGroupController.cs new file mode 100644 index 00000000..7e0f9c35 --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseGroupController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12班组 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12BaseGroup")] + public class QcGp12BaseGroupController : BaseController + { + /// + /// 质量GP12班组接口 + /// + private readonly IQcGp12BaseGroupService _QcGp12BaseGroupService; + + public QcGp12BaseGroupController(IQcGp12BaseGroupService QcGp12BaseGroupService) + { + _QcGp12BaseGroupService = QcGp12BaseGroupService; + } + + /// + /// 查询质量GP12班组列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12basegroup:list")] + public IActionResult QueryQcGp12BaseGroup([FromQuery] QcGp12BaseGroupQueryDto parm) + { + var response = _QcGp12BaseGroupService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12班组详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12basegroup:query")] + public IActionResult GetQcGp12BaseGroup(int Id) + { + var response = _QcGp12BaseGroupService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12班组 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12basegroup:add")] + [Log(Title = "质量GP12班组", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12BaseGroup([FromBody] QcGp12BaseGroupDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12BaseGroupService.AddQcGp12BaseGroup(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12班组 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12basegroup:edit")] + [Log(Title = "质量GP12班组", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12BaseGroup([FromBody] QcGp12BaseGroupDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12BaseGroupService.UpdateQcGp12BaseGroup(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12班组 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12basegroup:delete")] + [Log(Title = "质量GP12班组", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12BaseGroup(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12BaseGroupService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseLabelAnalysisController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseLabelAnalysisController.cs new file mode 100644 index 00000000..95e1d107 --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseLabelAnalysisController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12基础标签解析 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12BaseLabelAnalysis")] + public class QcGp12BaseLabelAnalysisController : BaseController + { + /// + /// 质量GP12基础标签解析接口 + /// + private readonly IQcGp12BaseLabelAnalysisService _QcGp12BaseLabelAnalysisService; + + public QcGp12BaseLabelAnalysisController(IQcGp12BaseLabelAnalysisService QcGp12BaseLabelAnalysisService) + { + _QcGp12BaseLabelAnalysisService = QcGp12BaseLabelAnalysisService; + } + + /// + /// 查询质量GP12基础标签解析列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12baselabelanalysis:list")] + public IActionResult QueryQcGp12BaseLabelAnalysis([FromQuery] QcGp12BaseLabelAnalysisQueryDto parm) + { + var response = _QcGp12BaseLabelAnalysisService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12基础标签解析详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12baselabelanalysis:query")] + public IActionResult GetQcGp12BaseLabelAnalysis(int Id) + { + var response = _QcGp12BaseLabelAnalysisService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12基础标签解析 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12baselabelanalysis:add")] + [Log(Title = "质量GP12基础标签解析", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12BaseLabelAnalysis([FromBody] QcGp12BaseLabelAnalysisDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12BaseLabelAnalysisService.AddQcGp12BaseLabelAnalysis(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12基础标签解析 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12baselabelanalysis:edit")] + [Log(Title = "质量GP12基础标签解析", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12BaseLabelAnalysis([FromBody] QcGp12BaseLabelAnalysisDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12BaseLabelAnalysisService.UpdateQcGp12BaseLabelAnalysis(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12基础标签解析 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12baselabelanalysis:delete")] + [Log(Title = "质量GP12基础标签解析", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12BaseLabelAnalysis(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12BaseLabelAnalysisService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseSiteController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseSiteController.cs new file mode 100644 index 00000000..691cc006 --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12BaseSiteController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12基础站点 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12BaseSite")] + public class QcGp12BaseSiteController : BaseController + { + /// + /// 质量GP12基础站点接口 + /// + private readonly IQcGp12BaseSiteService _QcGp12BaseSiteService; + + public QcGp12BaseSiteController(IQcGp12BaseSiteService QcGp12BaseSiteService) + { + _QcGp12BaseSiteService = QcGp12BaseSiteService; + } + + /// + /// 查询质量GP12基础站点列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12basesite:list")] + public IActionResult QueryQcGp12BaseSite([FromQuery] QcGp12BaseSiteQueryDto parm) + { + var response = _QcGp12BaseSiteService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12基础站点详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12basesite:query")] + public IActionResult GetQcGp12BaseSite(int Id) + { + var response = _QcGp12BaseSiteService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12基础站点 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12basesite:add")] + [Log(Title = "质量GP12基础站点", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12BaseSite([FromBody] QcGp12BaseSiteDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12BaseSiteService.AddQcGp12BaseSite(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12基础站点 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12basesite:edit")] + [Log(Title = "质量GP12基础站点", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12BaseSite([FromBody] QcGp12BaseSiteDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12BaseSiteService.UpdateQcGp12BaseSite(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12基础站点 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12basesite:delete")] + [Log(Title = "质量GP12基础站点", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12BaseSite(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12BaseSiteService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12Controller.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12Controller.cs new file mode 100644 index 00000000..eff8bf4f --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12Controller.cs @@ -0,0 +1,98 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12业务模块 + /// + [Route("/mes/qc/gp12/QcGp12Controller")] + public class QcGp12Controller : BaseController + { + /// + /// 质量GP12业务模块接口 + /// + private readonly IQcGp12Service _QcGp12Service; + + public QcGp12Controller(IQcGp12Service QcGp12Service) + { + _QcGp12Service = QcGp12Service; + } + /// + /// 获取班组下拉 + /// + /// + [HttpGet("GetGroupOptions")] + [AllowAnonymous] + public IActionResult GetGroupOptions() + { + var response = _QcGp12Service.GetGroupOptions(); + return SUCCESS(response); + } + /// + /// 获取站点下拉 + /// + /// + [HttpGet("GetStieOptions")] + [AllowAnonymous] + public IActionResult GetStieOptions() + { + var response = _QcGp12Service.GetStieOptions(); + return SUCCESS(response); + } + /// + /// 获取缺陷项初始数据 + /// + /// + [HttpGet("GetDefectInitOptions")] + [AllowAnonymous] + public IActionResult GetDefectInitOptions() + { + var response = _QcGp12Service.GetDefectInitOptions(); + return SUCCESS(response); + } + /// + /// 解析标签 + /// + /// 标签内容 + /// 解析方式 + /// + [HttpGet("AnalyzeLabel")] + [AllowAnonymous] + public IActionResult AnalyzeLabel(string label,int type) + { + var response = _QcGp12Service.AnalyzeLabelToDto(label,type); + return SUCCESS(response); + } + /// + /// 查询质量GP12工单业务模块列表 + /// + /// + /// +/* [HttpGet("list")] + public IActionResult QueryQcGp12ServiceWorkorder([FromQuery] QcGp12ServiceWorkorderQueryDto parm) + { + var response = _QcGp12Service.GetList(parm); + return SUCCESS(response); + }*/ + + /// + /// 添加质量GP12工单业务模块 + /// + /// +/* [HttpPost("post")] + public IActionResult AddQcGp12ServiceWorkorder([FromBody] QcGp12ServiceWorkorderDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12ServiceWorkorderService.AddQcGp12ServiceWorkorder(modal); + + return SUCCESS(response); + }*/ + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12LogWorkorderController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12LogWorkorderController.cs new file mode 100644 index 00000000..630941cf --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12LogWorkorderController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12工单操作日志 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12LogWorkorder")] + public class QcGp12LogWorkorderController : BaseController + { + /// + /// 质量GP12工单操作日志接口 + /// + private readonly IQcGp12LogWorkorderService _QcGp12LogWorkorderService; + + public QcGp12LogWorkorderController(IQcGp12LogWorkorderService QcGp12LogWorkorderService) + { + _QcGp12LogWorkorderService = QcGp12LogWorkorderService; + } + + /// + /// 查询质量GP12工单操作日志列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12logworkorder:list")] + public IActionResult QueryQcGp12LogWorkorder([FromQuery] QcGp12LogWorkorderQueryDto parm) + { + var response = _QcGp12LogWorkorderService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12工单操作日志详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12logworkorder:query")] + public IActionResult GetQcGp12LogWorkorder(string Id) + { + var response = _QcGp12LogWorkorderService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12工单操作日志 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12logworkorder:add")] + [Log(Title = "质量GP12工单操作日志", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12LogWorkorder([FromBody] QcGp12LogWorkorderDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12LogWorkorderService.AddQcGp12LogWorkorder(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12工单操作日志 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12logworkorder:edit")] + [Log(Title = "质量GP12工单操作日志", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12LogWorkorder([FromBody] QcGp12LogWorkorderDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12LogWorkorderService.UpdateQcGp12LogWorkorder(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12工单操作日志 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12logworkorder:delete")] + [Log(Title = "质量GP12工单操作日志", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12LogWorkorder(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12LogWorkorderService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12RecordLabelScanController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12RecordLabelScanController.cs new file mode 100644 index 00000000..358e012a --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12RecordLabelScanController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12扫码标签记录 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12RecordLabelScan")] + public class QcGp12RecordLabelScanController : BaseController + { + /// + /// 质量GP12扫码标签记录接口 + /// + private readonly IQcGp12RecordLabelScanService _QcGp12RecordLabelScanService; + + public QcGp12RecordLabelScanController(IQcGp12RecordLabelScanService QcGp12RecordLabelScanService) + { + _QcGp12RecordLabelScanService = QcGp12RecordLabelScanService; + } + + /// + /// 查询质量GP12扫码标签记录列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12recordlabelscan:list")] + public IActionResult QueryQcGp12RecordLabelScan([FromQuery] QcGp12RecordLabelScanQueryDto parm) + { + var response = _QcGp12RecordLabelScanService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12扫码标签记录详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12recordlabelscan:query")] + public IActionResult GetQcGp12RecordLabelScan(string Id) + { + var response = _QcGp12RecordLabelScanService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12扫码标签记录 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12recordlabelscan:add")] + [Log(Title = "质量GP12扫码标签记录", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12RecordLabelScan([FromBody] QcGp12RecordLabelScanDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12RecordLabelScanService.AddQcGp12RecordLabelScan(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12扫码标签记录 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12recordlabelscan:edit")] + [Log(Title = "质量GP12扫码标签记录", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12RecordLabelScan([FromBody] QcGp12RecordLabelScanDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12RecordLabelScanService.UpdateQcGp12RecordLabelScan(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12扫码标签记录 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12recordlabelscan:delete")] + [Log(Title = "质量GP12扫码标签记录", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12RecordLabelScan(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12RecordLabelScanService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12RecordWorkorderDefectController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12RecordWorkorderDefectController.cs new file mode 100644 index 00000000..9896a37f --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12RecordWorkorderDefectController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12工单缺陷项记录 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12RecordWorkorderDefect")] + public class QcGp12RecordWorkorderDefectController : BaseController + { + /// + /// 质量GP12工单缺陷项记录接口 + /// + private readonly IQcGp12RecordWorkorderDefectService _QcGp12RecordWorkorderDefectService; + + public QcGp12RecordWorkorderDefectController(IQcGp12RecordWorkorderDefectService QcGp12RecordWorkorderDefectService) + { + _QcGp12RecordWorkorderDefectService = QcGp12RecordWorkorderDefectService; + } + + /// + /// 查询质量GP12工单缺陷项记录列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12recordworkorderdefect:list")] + public IActionResult QueryQcGp12RecordWorkorderDefect([FromQuery] QcGp12RecordWorkorderDefectQueryDto parm) + { + var response = _QcGp12RecordWorkorderDefectService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12工单缺陷项记录详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12recordworkorderdefect:query")] + public IActionResult GetQcGp12RecordWorkorderDefect(string Id) + { + var response = _QcGp12RecordWorkorderDefectService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12工单缺陷项记录 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12recordworkorderdefect:add")] + [Log(Title = "质量GP12工单缺陷项记录", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12RecordWorkorderDefect([FromBody] QcGp12RecordWorkorderDefectDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12RecordWorkorderDefectService.AddQcGp12RecordWorkorderDefect(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12工单缺陷项记录 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12recordworkorderdefect:edit")] + [Log(Title = "质量GP12工单缺陷项记录", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12RecordWorkorderDefect([FromBody] QcGp12RecordWorkorderDefectDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12RecordWorkorderDefectService.UpdateQcGp12RecordWorkorderDefect(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12工单缺陷项记录 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12recordworkorderdefect:delete")] + [Log(Title = "质量GP12工单缺陷项记录", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12RecordWorkorderDefect(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12RecordWorkorderDefectService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12ServiceStatisticsController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12ServiceStatisticsController.cs new file mode 100644 index 00000000..675e6cb7 --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12ServiceStatisticsController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12统计报表业务模块 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12ServiceStatistics")] + public class QcGp12ServiceStatisticsController : BaseController + { + /// + /// 质量GP12统计报表业务模块接口 + /// + private readonly IQcGp12ServiceStatisticsService _QcGp12ServiceStatisticsService; + + public QcGp12ServiceStatisticsController(IQcGp12ServiceStatisticsService QcGp12ServiceStatisticsService) + { + _QcGp12ServiceStatisticsService = QcGp12ServiceStatisticsService; + } + + /// + /// 查询质量GP12统计报表业务模块列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12servicestatistics:list")] + public IActionResult QueryQcGp12ServiceStatistics([FromQuery] QcGp12ServiceStatisticsQueryDto parm) + { + var response = _QcGp12ServiceStatisticsService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12统计报表业务模块详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12servicestatistics:query")] + public IActionResult GetQcGp12ServiceStatistics(string Id) + { + var response = _QcGp12ServiceStatisticsService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12统计报表业务模块 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12servicestatistics:add")] + [Log(Title = "质量GP12统计报表业务模块", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12ServiceStatistics([FromBody] QcGp12ServiceStatisticsDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12ServiceStatisticsService.AddQcGp12ServiceStatistics(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12统计报表业务模块 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12servicestatistics:edit")] + [Log(Title = "质量GP12统计报表业务模块", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12ServiceStatistics([FromBody] QcGp12ServiceStatisticsDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12ServiceStatisticsService.UpdateQcGp12ServiceStatistics(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12统计报表业务模块 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12servicestatistics:delete")] + [Log(Title = "质量GP12统计报表业务模块", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12ServiceStatistics(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12ServiceStatisticsService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12ServiceWorkorderController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12ServiceWorkorderController.cs new file mode 100644 index 00000000..a37b56bd --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/GP12/QcGp12ServiceWorkorderController.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Mvc; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Service.Business.IBusinessService; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Filters; + +//创建时间:2025-01-02 +namespace ZR.Admin.WebApi.Controllers +{ + /// + /// 质量GP12工单业务模块 + /// + [Verify] + [Route("/mes/qc/gp12/QcGp12ServiceWorkorder")] + public class QcGp12ServiceWorkorderController : BaseController + { + /// + /// 质量GP12工单业务模块接口 + /// + private readonly IQcGp12ServiceWorkorderService _QcGp12ServiceWorkorderService; + + public QcGp12ServiceWorkorderController(IQcGp12ServiceWorkorderService QcGp12ServiceWorkorderService) + { + _QcGp12ServiceWorkorderService = QcGp12ServiceWorkorderService; + } + + /// + /// 查询质量GP12工单业务模块列表 + /// + /// + /// + [HttpGet("list")] + [ActionPermissionFilter(Permission = "business:qcgp12serviceworkorder:list")] + public IActionResult QueryQcGp12ServiceWorkorder([FromQuery] QcGp12ServiceWorkorderQueryDto parm) + { + var response = _QcGp12ServiceWorkorderService.GetList(parm); + return SUCCESS(response); + } + + + /// + /// 查询质量GP12工单业务模块详情 + /// + /// + /// + [HttpGet("{Id}")] + [ActionPermissionFilter(Permission = "business:qcgp12serviceworkorder:query")] + public IActionResult GetQcGp12ServiceWorkorder(string Id) + { + var response = _QcGp12ServiceWorkorderService.GetInfo(Id); + + var info = response.Adapt(); + return SUCCESS(info); + } + + /// + /// 添加质量GP12工单业务模块 + /// + /// + [HttpPost] + [ActionPermissionFilter(Permission = "business:qcgp12serviceworkorder:add")] + [Log(Title = "质量GP12工单业务模块", BusinessType = BusinessType.INSERT)] + public IActionResult AddQcGp12ServiceWorkorder([FromBody] QcGp12ServiceWorkorderDto parm) + { + var modal = parm.Adapt().ToCreate(HttpContext); + + var response = _QcGp12ServiceWorkorderService.AddQcGp12ServiceWorkorder(modal); + + return SUCCESS(response); + } + + /// + /// 更新质量GP12工单业务模块 + /// + /// + [HttpPut] + [ActionPermissionFilter(Permission = "business:qcgp12serviceworkorder:edit")] + [Log(Title = "质量GP12工单业务模块", BusinessType = BusinessType.UPDATE)] + public IActionResult UpdateQcGp12ServiceWorkorder([FromBody] QcGp12ServiceWorkorderDto parm) + { + var modal = parm.Adapt().ToUpdate(HttpContext); + var response = _QcGp12ServiceWorkorderService.UpdateQcGp12ServiceWorkorder(modal); + + return ToResponse(response); + } + + /// + /// 删除质量GP12工单业务模块 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:qcgp12serviceworkorder:delete")] + [Log(Title = "质量GP12工单业务模块", BusinessType = BusinessType.DELETE)] + public IActionResult DeleteQcGp12ServiceWorkorder(string ids) + { + int[] idsArr = Tools.SpitIntArrary(ids); + if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } + + var response = _QcGp12ServiceWorkorderService.Delete(idsArr); + + return ToResponse(response); + } + + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs b/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs index fea4f81e..ac9679f5 100644 --- a/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs +++ b/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs @@ -423,6 +423,11 @@ /// public int StatisticsProductAndPolishQualifiedTotal { get; set; } = 0; + /// + /// 产线维修件(直接记入) + /// + public int StatisticsProductMaintenanceQualifiedTotal { get; set; } = 0; + /// diff --git a/ZR.Model/MES/qc/DTO/QcGp12BaseDefectDto.cs b/ZR.Model/MES/qc/DTO/QcGp12BaseDefectDto.cs new file mode 100644 index 00000000..c4120154 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12BaseDefectDto.cs @@ -0,0 +1,68 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12基础缺陷项查询对象 + /// + public class QcGp12BaseDefectQueryDto : PagerInfo + { + } + + /// + /// 质量GP12基础缺陷项输入输出对象 + /// + public class QcGp12BaseDefectDto + { + [Required(ErrorMessage = "序号不能为空")] + public int Id { get; set; } + + public string Name { get; set; } + + public string Code { get; set; } + + public string Group { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } + + public class QcGp12AlterationDefectDto + { + /// + /// 缺陷项组别 + /// + public string GroupName { get; set; } + public List Children { get; set; } + } + + public class QcGp12ChildrenDefectDto + { + /// + /// 缺陷项名称 + /// + public string Name { get; set; } + /// + /// 缺陷项编号 + /// + public string Code { get; set; } + /// + /// 缺陷项类别 1-抛光 2-打磨 3-报废 + /// + public string Type { get; set; } + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12BaseGroupDto.cs b/ZR.Model/MES/qc/DTO/QcGp12BaseGroupDto.cs new file mode 100644 index 00000000..350f5191 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12BaseGroupDto.cs @@ -0,0 +1,41 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12班组查询对象 + /// + public class QcGp12BaseGroupQueryDto : PagerInfo + { + } + + /// + /// 质量GP12班组输入输出对象 + /// + public class QcGp12BaseGroupDto + { + [Required(ErrorMessage = "主键不能为空")] + public int Id { get; set; } + + public string Name { get; set; } + + public string Code { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12BaseLabelAnalysisDto.cs b/ZR.Model/MES/qc/DTO/QcGp12BaseLabelAnalysisDto.cs new file mode 100644 index 00000000..d883f6b2 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12BaseLabelAnalysisDto.cs @@ -0,0 +1,81 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12基础标签解析查询对象 + /// + public class QcGp12BaseLabelAnalysisQueryDto : PagerInfo + { + } + + /// + /// 质量GP12基础标签解析输入输出对象 + /// + public class QcGp12BaseLabelAnalysisDto + { + [Required(ErrorMessage = "序号不能为空")] + public int Id { get; set; } + + public string Name { get; set; } + + public string Code { get; set; } + + public string Expression { get; set; } + + public int? Sort { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + } + /// + /// GP12标签解析标准模板 + /// + public class QcGp12LabelAnalysisDto + { + /// + /// 解析是否成功 + /// + public bool IsOk { get; set; } + /// + /// 解析结果 + /// + public string Msg { get; set; } + /// + /// 工单号 + /// + public string Workorder { get; set; } + /// + /// 零件号 + /// + public string Partnumber { get; set; } + /// + /// 规格 + /// + public string Specification { get; set; } + /// + /// 颜色 + /// + public string Color { get; set; } + /// + /// 描述 + /// + public string Description { get; set; } + /// + /// 零件数 + /// + public int Number { get; set; } + } +} diff --git a/ZR.Model/MES/qc/DTO/QcGp12BaseSiteDto.cs b/ZR.Model/MES/qc/DTO/QcGp12BaseSiteDto.cs new file mode 100644 index 00000000..b97fb7f0 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12BaseSiteDto.cs @@ -0,0 +1,41 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12基础站点查询对象 + /// + public class QcGp12BaseSiteQueryDto : PagerInfo + { + } + + /// + /// 质量GP12基础站点输入输出对象 + /// + public class QcGp12BaseSiteDto + { + [Required(ErrorMessage = "序号不能为空")] + public int Id { get; set; } + + public string Name { get; set; } + + public string Code { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12LogWorkorderDto.cs b/ZR.Model/MES/qc/DTO/QcGp12LogWorkorderDto.cs new file mode 100644 index 00000000..9079c193 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12LogWorkorderDto.cs @@ -0,0 +1,41 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12工单操作日志查询对象 + /// + public class QcGp12LogWorkorderQueryDto : PagerInfo + { + } + + /// + /// 质量GP12工单操作日志输入输出对象 + /// + public class QcGp12LogWorkorderDto + { + [Required(ErrorMessage = "序号不能为空")] + public string Id { get; set; } + + public string Name { get; set; } + + public string Content { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12RecordLabelScanDto.cs b/ZR.Model/MES/qc/DTO/QcGp12RecordLabelScanDto.cs new file mode 100644 index 00000000..4f94bb41 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12RecordLabelScanDto.cs @@ -0,0 +1,56 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12扫码标签记录查询对象 + /// + public class QcGp12RecordLabelScanQueryDto : PagerInfo + { + } + + /// + /// 质量GP12扫码标签记录输入输出对象 + /// + public class QcGp12RecordLabelScanDto + { + [Required(ErrorMessage = "序号不能为空")] + public string Id { get; set; } + + public string WorkOrder { get; set; } + + public string PartNumber { get; set; } + + public string Team { get; set; } + + public string SiteNo { get; set; } + + public string ComNo { get; set; } + + [Required(ErrorMessage = "标签内容不能为空")] + public string Label { get; set; } + + public int? LabelType { get; set; } + + public int? LabelSort { get; set; } + + public string ScanTime { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12RecordWorkorderDefectDto.cs b/ZR.Model/MES/qc/DTO/QcGp12RecordWorkorderDefectDto.cs new file mode 100644 index 00000000..aefe722a --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12RecordWorkorderDefectDto.cs @@ -0,0 +1,57 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12工单缺陷项记录查询对象 + /// + public class QcGp12RecordWorkorderDefectQueryDto : PagerInfo + { + } + + /// + /// 质量GP12工单缺陷项记录输入输出对象 + /// + public class QcGp12RecordWorkorderDefectDto + { + [Required(ErrorMessage = "序号不能为空")] + public string Id { get; set; } + + public string WorkOrder { get; set; } + + public string PartNumber { get; set; } + + public string Team { get; set; } + + public string SiteNo { get; set; } + + public string ComNo { get; set; } + + public string DefectCode { get; set; } + + public string DefectName { get; set; } + + public string DefectType { get; set; } + + public int? DefectNum { get; set; } + + public string ClickTime { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12ServiceStatisticsDto.cs b/ZR.Model/MES/qc/DTO/QcGp12ServiceStatisticsDto.cs new file mode 100644 index 00000000..8cb64eb8 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12ServiceStatisticsDto.cs @@ -0,0 +1,83 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12统计报表业务模块查询对象 + /// + public class QcGp12ServiceStatisticsQueryDto : PagerInfo + { + } + + /// + /// 质量GP12统计报表业务模块输入输出对象 + /// + public class QcGp12ServiceStatisticsDto + { + [Required(ErrorMessage = "序号不能为空")] + public string Id { get; set; } + + public string WorkOrder { get; set; } + + public string PartNumber { get; set; } + + public string Description { get; set; } + + public string Specification { get; set; } + + public string Color { get; set; } + + public string Team { get; set; } + + public string SiteNo { get; set; } + + public string ComNo { get; set; } + + public int? IsOnetime { get; set; } + + public int? IsBack { get; set; } + + public int? IsPolish { get; set; } + + public int? IsOut { get; set; } + + public DateTime? StartTime { get; set; } + + public DateTime? EndTime { get; set; } + + public string Label { get; set; } + + public int? RequireNumber { get; set; } + + public int? QualifiedNumber { get; set; } + + public string QualifiedRate { get; set; } + + public int? DamoNumber { get; set; } + + public int? BaofeiNumber { get; set; } + + public string GroupCode { get; set; } + + public int? GroupSort { get; set; } + + public string GroupDefectJson { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/DTO/QcGp12ServiceWorkorderDto.cs b/ZR.Model/MES/qc/DTO/QcGp12ServiceWorkorderDto.cs new file mode 100644 index 00000000..e8778fc6 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcGp12ServiceWorkorderDto.cs @@ -0,0 +1,75 @@ +using System.ComponentModel.DataAnnotations; + +namespace ZR.Model.Dto +{ + /// + /// 质量GP12工单业务模块查询对象 + /// + public class QcGp12ServiceWorkorderQueryDto : PagerInfo + { + } + + /// + /// 质量GP12工单业务模块输入输出对象 + /// + public class QcGp12ServiceWorkorderDto + { + [Required(ErrorMessage = "序号不能为空")] + public string Id { get; set; } + + public string WorkOrder { get; set; } + + public string PartNumber { get; set; } + + public string Description { get; set; } + + public string Specification { get; set; } + + public string Color { get; set; } + + public string Team { get; set; } + + public string SiteNo { get; set; } + + public string ComNo { get; set; } + + public int? IsOnetime { get; set; } + + public int? IsBack { get; set; } + + public int? IsPolish { get; set; } + + public int? IsOut { get; set; } + + public DateTime? StartTime { get; set; } + + public DateTime? EndTime { get; set; } + + public string Label { get; set; } + + public int? RequireNumber { get; set; } + + public int? QualifiedNumber { get; set; } + + public int? DamoNumber { get; set; } + + public int? BaofeiNumber { get; set; } + + public string Type { get; set; } + + public string Status { get; set; } + + public string Remark { get; set; } + + public string CreatedBy { get; set; } + + public DateTime? CreatedTime { get; set; } + + public string UpdatedBy { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/ZR.Model/MES/qc/QcGp12BaseDefect.cs b/ZR.Model/MES/qc/QcGp12BaseDefect.cs new file mode 100644 index 00000000..9aa6a12c --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12BaseDefect.cs @@ -0,0 +1,71 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12基础缺陷项 + /// + [SugarTable("qc_gp12_base_defect")] + public class QcGp12BaseDefect + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 编号 + /// + public string Code { get; set; } + + /// + /// 组 + /// + public string Group { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12BaseGroup.cs b/ZR.Model/MES/qc/QcGp12BaseGroup.cs new file mode 100644 index 00000000..583864a7 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12BaseGroup.cs @@ -0,0 +1,66 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12班组 + /// + [SugarTable("qc_gp12_base_group")] + public class QcGp12BaseGroup + { + /// + /// 主键 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 编号 + /// + public string Code { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12BaseLabelAnalysis.cs b/ZR.Model/MES/qc/QcGp12BaseLabelAnalysis.cs new file mode 100644 index 00000000..db9a6bb7 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12BaseLabelAnalysis.cs @@ -0,0 +1,76 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12基础标签解析 + /// + [SugarTable("qc_gp12_base_label_analysis")] + public class QcGp12BaseLabelAnalysis + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 编号 + /// + public string Code { get; set; } + + /// + /// 表达式 + /// + public string Expression { get; set; } + + /// + /// 优先级 + /// + public int? Sort { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12BaseSite.cs b/ZR.Model/MES/qc/QcGp12BaseSite.cs new file mode 100644 index 00000000..c840d418 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12BaseSite.cs @@ -0,0 +1,66 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12基础站点 + /// + [SugarTable("qc_gp12_base_site")] + public class QcGp12BaseSite + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 编号 + /// + public string Code { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12LogWorkorder.cs b/ZR.Model/MES/qc/QcGp12LogWorkorder.cs new file mode 100644 index 00000000..2b1464ac --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12LogWorkorder.cs @@ -0,0 +1,66 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12工单操作日志 + /// + [SugarTable("qc_gp12_log_workorder")] + public class QcGp12LogWorkorder + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 日志名称 + /// + public string Name { get; set; } + + /// + /// 日志内容 + /// + public string Content { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12RecordLabelScan.cs b/ZR.Model/MES/qc/QcGp12RecordLabelScan.cs new file mode 100644 index 00000000..74cba677 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12RecordLabelScan.cs @@ -0,0 +1,108 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12扫码标签记录 + /// + [SugarTable("qc_gp12_record_label_scan")] + public class QcGp12RecordLabelScan + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 工单号 + /// + [SugarColumn(ColumnName = "work_order")] + public string WorkOrder { get; set; } + + /// + /// 零件号 + /// + [SugarColumn(ColumnName = "part_number")] + public string PartNumber { get; set; } + + /// + /// 班组 + /// + public string Team { get; set; } + + /// + /// 站点号 + /// + [SugarColumn(ColumnName = "site_no")] + public string SiteNo { get; set; } + + /// + /// 串口号 + /// + [SugarColumn(ColumnName = "com_no")] + public string ComNo { get; set; } + + /// + /// 标签内容 + /// + public string Label { get; set; } + + /// + /// 标签类别(1-外箱标签 2-内标签) + /// + [SugarColumn(ColumnName = "label_type")] + public int? LabelType { get; set; } + + /// + /// 标签流水号 + /// + [SugarColumn(ColumnName = "label_sort")] + public int? LabelSort { get; set; } + + /// + /// 扫码时间 + /// + [SugarColumn(ColumnName = "scan_time")] + public string ScanTime { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12RecordWorkorderDefect.cs b/ZR.Model/MES/qc/QcGp12RecordWorkorderDefect.cs new file mode 100644 index 00000000..a96195d9 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12RecordWorkorderDefect.cs @@ -0,0 +1,115 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12工单缺陷项记录 + /// + [SugarTable("qc_gp12_record_workorder_defect")] + public class QcGp12RecordWorkorderDefect + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 工单号 + /// + [SugarColumn(ColumnName = "work_order")] + public string WorkOrder { get; set; } + + /// + /// 零件号 + /// + [SugarColumn(ColumnName = "part_number")] + public string PartNumber { get; set; } + + /// + /// 班组 + /// + public string Team { get; set; } + + /// + /// 站点号 + /// + [SugarColumn(ColumnName = "site_no")] + public string SiteNo { get; set; } + + /// + /// 串口号 + /// + [SugarColumn(ColumnName = "com_no")] + public string ComNo { get; set; } + + /// + /// 缺陷编号 + /// + [SugarColumn(ColumnName = "defect_code")] + public string DefectCode { get; set; } + + /// + /// 缺陷名称 + /// + [SugarColumn(ColumnName = "defect_name")] + public string DefectName { get; set; } + + /// + /// 缺陷类别 + /// + [SugarColumn(ColumnName = "defect_type")] + public string DefectType { get; set; } + + /// + /// 缺陷数量 + /// + [SugarColumn(ColumnName = "defect_num")] + public int? DefectNum { get; set; } + + /// + /// 最后点击时间 + /// + [SugarColumn(ColumnName = "click_time")] + public string ClickTime { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12ServiceStatistics.cs b/ZR.Model/MES/qc/QcGp12ServiceStatistics.cs new file mode 100644 index 00000000..81404193 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12ServiceStatistics.cs @@ -0,0 +1,189 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12统计报表业务模块 + /// + [SugarTable("qc_gp12_service_statistics")] + public class QcGp12ServiceStatistics + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 工单号 + /// + [SugarColumn(ColumnName = "work_order")] + public string WorkOrder { get; set; } + + /// + /// 零件号 + /// + [SugarColumn(ColumnName = "part_number")] + public string PartNumber { get; set; } + + /// + /// 零件描述 + /// + public string Description { get; set; } + + /// + /// 规格 + /// + public string Specification { get; set; } + + /// + /// 颜色 + /// + public string Color { get; set; } + + /// + /// 班组 + /// + public string Team { get; set; } + + /// + /// 站点号 + /// + [SugarColumn(ColumnName = "site_no")] + public string SiteNo { get; set; } + + /// + /// 串口号 + /// + [SugarColumn(ColumnName = "com_no")] + public string ComNo { get; set; } + + /// + /// 是否一次合格 + /// + [SugarColumn(ColumnName = "is_onetime")] + public int? IsOnetime { get; set; } + + /// + /// 是否返工件 + /// + [SugarColumn(ColumnName = "is_back")] + public int? IsBack { get; set; } + + /// + /// 是否抛光件 + /// + [SugarColumn(ColumnName = "is_polish")] + public int? IsPolish { get; set; } + + /// + /// 是否外部件 + /// + [SugarColumn(ColumnName = "is_out")] + public int? IsOut { get; set; } + + /// + /// 开始时间 + /// + [SugarColumn(ColumnName = "start_time")] + public DateTime? StartTime { get; set; } + + /// + /// 结束时间 + /// + [SugarColumn(ColumnName = "end_time")] + public DateTime? EndTime { get; set; } + + /// + /// 箱标签记录 + /// + public string Label { get; set; } + + /// + /// 投入数 + /// + [SugarColumn(ColumnName = "require_number")] + public int? RequireNumber { get; set; } + + /// + /// 合格数 + /// + [SugarColumn(ColumnName = "qualified_number")] + public int? QualifiedNumber { get; set; } + + /// + /// 合格率 + /// + [SugarColumn(ColumnName = "qualified_rate")] + public string QualifiedRate { get; set; } + + /// + /// 打磨数 + /// + [SugarColumn(ColumnName = "damo_number")] + public int? DamoNumber { get; set; } + + /// + /// 报废数 + /// + [SugarColumn(ColumnName = "baofei_number")] + public int? BaofeiNumber { get; set; } + + /// + /// 同组标识 + /// + [SugarColumn(ColumnName = "group_code")] + public string GroupCode { get; set; } + + /// + /// 同组顺序 + /// + [SugarColumn(ColumnName = "group_sort")] + public int? GroupSort { get; set; } + + /// + /// 同组缺陷记录 + /// + [SugarColumn(ColumnName = "group_defect_json")] + public string GroupDefectJson { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Model/MES/qc/QcGp12ServiceWorkorder.cs b/ZR.Model/MES/qc/QcGp12ServiceWorkorder.cs new file mode 100644 index 00000000..58320931 --- /dev/null +++ b/ZR.Model/MES/qc/QcGp12ServiceWorkorder.cs @@ -0,0 +1,165 @@ + +namespace ZR.Model.Business +{ + /// + /// 质量GP12工单业务模块 + /// + [SugarTable("qc_gp12_service_workorder")] + public class QcGp12ServiceWorkorder + { + /// + /// 序号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 工单号 + /// + [SugarColumn(ColumnName = "work_order")] + public string WorkOrder { get; set; } + + /// + /// 零件号 + /// + [SugarColumn(ColumnName = "part_number")] + public string PartNumber { get; set; } + + /// + /// 零件描述 + /// + public string Description { get; set; } + + /// + /// 规格 + /// + public string Specification { get; set; } + + /// + /// 颜色 + /// + public string Color { get; set; } + + /// + /// 班组 + /// + public string Team { get; set; } + + /// + /// 站点号 + /// + [SugarColumn(ColumnName = "site_no")] + public string SiteNo { get; set; } + + /// + /// 串口号 + /// + [SugarColumn(ColumnName = "com_no")] + public string ComNo { get; set; } + + /// + /// 是否一次合格 + /// + [SugarColumn(ColumnName = "is_onetime")] + public int? IsOnetime { get; set; } + + /// + /// 是否返工件 + /// + [SugarColumn(ColumnName = "is_back")] + public int? IsBack { get; set; } + + /// + /// 是否抛光件 + /// + [SugarColumn(ColumnName = "is_polish")] + public int? IsPolish { get; set; } + + /// + /// 是否外部件 + /// + [SugarColumn(ColumnName = "is_out")] + public int? IsOut { get; set; } + + /// + /// 开始时间 + /// + [SugarColumn(ColumnName = "start_time")] + public DateTime? StartTime { get; set; } + + /// + /// 结束时间 + /// + [SugarColumn(ColumnName = "end_time")] + public DateTime? EndTime { get; set; } + + /// + /// 箱标签记录 + /// + public string Label { get; set; } + + /// + /// 投入数 + /// + [SugarColumn(ColumnName = "require_number")] + public int? RequireNumber { get; set; } + + /// + /// 合格数 + /// + [SugarColumn(ColumnName = "qualified_number")] + public int? QualifiedNumber { get; set; } + + /// + /// 打磨数 + /// + [SugarColumn(ColumnName = "damo_number")] + public int? DamoNumber { get; set; } + + /// + /// 报废数 + /// + [SugarColumn(ColumnName = "baofei_number")] + public int? BaofeiNumber { get; set; } + + /// + /// 系统类别 + /// + public string Type { get; set; } + + /// + /// 系统状态 + /// + public string Status { get; set; } + + /// + /// 系统备注 + /// + public string Remark { 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/ZR.Service/mes/qc/CommonFQCService.cs b/ZR.Service/mes/qc/CommonFQCService.cs index 6b97c97a..ecc5699b 100644 --- a/ZR.Service/mes/qc/CommonFQCService.cs +++ b/ZR.Service/mes/qc/CommonFQCService.cs @@ -1557,6 +1557,23 @@ namespace ZR.Service.mes.qc boardData.RealOneTimeWarehouseCount -= realOneTimeWarehouseCount2; } + //TODO 20241227 产线维修件 + boardData.StatisticsProductMaintenanceQualifiedTotal = Context + .Queryable() + .WhereIF( + !string.IsNullOrEmpty(query.Partnumber), + it => it.FinishedPartNumber == query.Partnumber + ) + .WhereIF( + query.StartTime != null, + it => it.CreatedTime >= query.StartTime.Value.ToLocalTime() + ) + .WhereIF( + query.EndTime != null, + it => it.CreatedTime <= query.EndTime.Value.ToLocalTime() + ) + .Where(it => it.Remark1.Contains("维修")) + .Sum(it => it.PreviousNumber); return boardData; } diff --git a/ZR.Service/mes/qc/IService/IQcGp12BaseDefectService.cs b/ZR.Service/mes/qc/IService/IQcGp12BaseDefectService.cs new file mode 100644 index 00000000..fc05087e --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12BaseDefectService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12基础缺陷项service接口 + /// + public interface IQcGp12BaseDefectService : IBaseService + { + PagedInfo GetList(QcGp12BaseDefectQueryDto parm); + + QcGp12BaseDefect GetInfo(int Id); + + QcGp12BaseDefect AddQcGp12BaseDefect(QcGp12BaseDefect parm); + + int UpdateQcGp12BaseDefect(QcGp12BaseDefect parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12BaseGroupService.cs b/ZR.Service/mes/qc/IService/IQcGp12BaseGroupService.cs new file mode 100644 index 00000000..2fab8435 --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12BaseGroupService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12班组service接口 + /// + public interface IQcGp12BaseGroupService : IBaseService + { + PagedInfo GetList(QcGp12BaseGroupQueryDto parm); + + QcGp12BaseGroup GetInfo(int Id); + + QcGp12BaseGroup AddQcGp12BaseGroup(QcGp12BaseGroup parm); + + int UpdateQcGp12BaseGroup(QcGp12BaseGroup parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12BaseLabelAnalysisService.cs b/ZR.Service/mes/qc/IService/IQcGp12BaseLabelAnalysisService.cs new file mode 100644 index 00000000..b21f0973 --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12BaseLabelAnalysisService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12基础标签解析service接口 + /// + public interface IQcGp12BaseLabelAnalysisService : IBaseService + { + PagedInfo GetList(QcGp12BaseLabelAnalysisQueryDto parm); + + QcGp12BaseLabelAnalysis GetInfo(int Id); + + QcGp12BaseLabelAnalysis AddQcGp12BaseLabelAnalysis(QcGp12BaseLabelAnalysis parm); + + int UpdateQcGp12BaseLabelAnalysis(QcGp12BaseLabelAnalysis parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12BaseSiteService.cs b/ZR.Service/mes/qc/IService/IQcGp12BaseSiteService.cs new file mode 100644 index 00000000..8bb7e9e9 --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12BaseSiteService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12基础站点service接口 + /// + public interface IQcGp12BaseSiteService : IBaseService + { + PagedInfo GetList(QcGp12BaseSiteQueryDto parm); + + QcGp12BaseSite GetInfo(int Id); + + QcGp12BaseSite AddQcGp12BaseSite(QcGp12BaseSite parm); + + int UpdateQcGp12BaseSite(QcGp12BaseSite parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12LogWorkorderService.cs b/ZR.Service/mes/qc/IService/IQcGp12LogWorkorderService.cs new file mode 100644 index 00000000..31dcf58e --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12LogWorkorderService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12工单操作日志service接口 + /// + public interface IQcGp12LogWorkorderService : IBaseService + { + PagedInfo GetList(QcGp12LogWorkorderQueryDto parm); + + QcGp12LogWorkorder GetInfo(string Id); + + QcGp12LogWorkorder AddQcGp12LogWorkorder(QcGp12LogWorkorder parm); + + int UpdateQcGp12LogWorkorder(QcGp12LogWorkorder parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12RecordLabelScanService.cs b/ZR.Service/mes/qc/IService/IQcGp12RecordLabelScanService.cs new file mode 100644 index 00000000..2f5ad43a --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12RecordLabelScanService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12扫码标签记录service接口 + /// + public interface IQcGp12RecordLabelScanService : IBaseService + { + PagedInfo GetList(QcGp12RecordLabelScanQueryDto parm); + + QcGp12RecordLabelScan GetInfo(string Id); + + QcGp12RecordLabelScan AddQcGp12RecordLabelScan(QcGp12RecordLabelScan parm); + + int UpdateQcGp12RecordLabelScan(QcGp12RecordLabelScan parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12RecordWorkorderDefectService.cs b/ZR.Service/mes/qc/IService/IQcGp12RecordWorkorderDefectService.cs new file mode 100644 index 00000000..e647f411 --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12RecordWorkorderDefectService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12工单缺陷项记录service接口 + /// + public interface IQcGp12RecordWorkorderDefectService : IBaseService + { + PagedInfo GetList(QcGp12RecordWorkorderDefectQueryDto parm); + + QcGp12RecordWorkorderDefect GetInfo(string Id); + + QcGp12RecordWorkorderDefect AddQcGp12RecordWorkorderDefect(QcGp12RecordWorkorderDefect parm); + + int UpdateQcGp12RecordWorkorderDefect(QcGp12RecordWorkorderDefect parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12Service.cs b/ZR.Service/mes/qc/IService/IQcGp12Service.cs new file mode 100644 index 00000000..ee1f3d33 --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12Service.cs @@ -0,0 +1,40 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12工单业务模块service接口 + /// + public interface IQcGp12Service : IBaseService + { + /// + /// 获取班组下拉 + /// + /// + List GetGroupOptions(); + + /// + /// 获取站点下拉 + /// + /// + List GetStieOptions(); + + /// + /// 获取缺陷项渲染数据 + /// + /// + List GetDefectInitOptions(); + + /// + /// 解析标签 + /// + /// 标签内容 + /// 解析方法 + /// + QcGp12LabelAnalysisDto AnalyzeLabelToDto(string label,int type); + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12ServiceStatisticsService.cs b/ZR.Service/mes/qc/IService/IQcGp12ServiceStatisticsService.cs new file mode 100644 index 00000000..1e2276c3 --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12ServiceStatisticsService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12统计报表业务模块service接口 + /// + public interface IQcGp12ServiceStatisticsService : IBaseService + { + PagedInfo GetList(QcGp12ServiceStatisticsQueryDto parm); + + QcGp12ServiceStatistics GetInfo(string Id); + + QcGp12ServiceStatistics AddQcGp12ServiceStatistics(QcGp12ServiceStatistics parm); + + int UpdateQcGp12ServiceStatistics(QcGp12ServiceStatistics parm); + + } +} diff --git a/ZR.Service/mes/qc/IService/IQcGp12ServiceWorkorderService.cs b/ZR.Service/mes/qc/IService/IQcGp12ServiceWorkorderService.cs new file mode 100644 index 00000000..c132126a --- /dev/null +++ b/ZR.Service/mes/qc/IService/IQcGp12ServiceWorkorderService.cs @@ -0,0 +1,23 @@ +using System; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using System.Collections.Generic; + +namespace ZR.Service.Business.IBusinessService +{ + /// + /// 质量GP12工单业务模块service接口 + /// + public interface IQcGp12ServiceWorkorderService : IBaseService + { + PagedInfo GetList(QcGp12ServiceWorkorderQueryDto parm); + + QcGp12ServiceWorkorder GetInfo(string Id); + + QcGp12ServiceWorkorder AddQcGp12ServiceWorkorder(QcGp12ServiceWorkorder parm); + + int UpdateQcGp12ServiceWorkorder(QcGp12ServiceWorkorder parm); + + } +} diff --git a/ZR.Service/mes/qc/QcGp12BaseDefectService.cs b/ZR.Service/mes/qc/QcGp12BaseDefectService.cs new file mode 100644 index 00000000..3baf8ead --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12BaseDefectService.cs @@ -0,0 +1,86 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12基础缺陷项Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12BaseDefectService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12BaseDefectService : BaseService, IQcGp12BaseDefectService + { + /// + /// 查询质量GP12基础缺陷项列表 + /// + /// + /// + public PagedInfo GetList(QcGp12BaseDefectQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12BaseDefect GetInfo(int Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12基础缺陷项 + /// + /// + /// + public QcGp12BaseDefect AddQcGp12BaseDefect(QcGp12BaseDefect model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12基础缺陷项 + /// + /// + /// + public int UpdateQcGp12BaseDefect(QcGp12BaseDefect model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12BaseDefect() + //{ + // Name = model.Name, + // Code = model.Code, + // Group = model.Group, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12BaseGroupService.cs b/ZR.Service/mes/qc/QcGp12BaseGroupService.cs new file mode 100644 index 00000000..f28bdd3a --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12BaseGroupService.cs @@ -0,0 +1,85 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12班组Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12BaseGroupService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12BaseGroupService : BaseService, IQcGp12BaseGroupService + { + /// + /// 查询质量GP12班组列表 + /// + /// + /// + public PagedInfo GetList(QcGp12BaseGroupQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12BaseGroup GetInfo(int Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12班组 + /// + /// + /// + public QcGp12BaseGroup AddQcGp12BaseGroup(QcGp12BaseGroup model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12班组 + /// + /// + /// + public int UpdateQcGp12BaseGroup(QcGp12BaseGroup model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12BaseGroup() + //{ + // Name = model.Name, + // Code = model.Code, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12BaseLabelAnalysisService.cs b/ZR.Service/mes/qc/QcGp12BaseLabelAnalysisService.cs new file mode 100644 index 00000000..9f0c659d --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12BaseLabelAnalysisService.cs @@ -0,0 +1,87 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12基础标签解析Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12BaseLabelAnalysisService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12BaseLabelAnalysisService : BaseService, IQcGp12BaseLabelAnalysisService + { + /// + /// 查询质量GP12基础标签解析列表 + /// + /// + /// + public PagedInfo GetList(QcGp12BaseLabelAnalysisQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12BaseLabelAnalysis GetInfo(int Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12基础标签解析 + /// + /// + /// + public QcGp12BaseLabelAnalysis AddQcGp12BaseLabelAnalysis(QcGp12BaseLabelAnalysis model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12基础标签解析 + /// + /// + /// + public int UpdateQcGp12BaseLabelAnalysis(QcGp12BaseLabelAnalysis model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12BaseLabelAnalysis() + //{ + // Name = model.Name, + // Code = model.Code, + // Expression = model.Expression, + // Sort = model.Sort, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12BaseSiteService.cs b/ZR.Service/mes/qc/QcGp12BaseSiteService.cs new file mode 100644 index 00000000..fe2b6bb6 --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12BaseSiteService.cs @@ -0,0 +1,85 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12基础站点Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12BaseSiteService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12BaseSiteService : BaseService, IQcGp12BaseSiteService + { + /// + /// 查询质量GP12基础站点列表 + /// + /// + /// + public PagedInfo GetList(QcGp12BaseSiteQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12BaseSite GetInfo(int Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12基础站点 + /// + /// + /// + public QcGp12BaseSite AddQcGp12BaseSite(QcGp12BaseSite model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12基础站点 + /// + /// + /// + public int UpdateQcGp12BaseSite(QcGp12BaseSite model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12BaseSite() + //{ + // Name = model.Name, + // Code = model.Code, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12LogWorkorderService.cs b/ZR.Service/mes/qc/QcGp12LogWorkorderService.cs new file mode 100644 index 00000000..dc857681 --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12LogWorkorderService.cs @@ -0,0 +1,85 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12工单操作日志Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12LogWorkorderService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12LogWorkorderService : BaseService, IQcGp12LogWorkorderService + { + /// + /// 查询质量GP12工单操作日志列表 + /// + /// + /// + public PagedInfo GetList(QcGp12LogWorkorderQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12LogWorkorder GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12工单操作日志 + /// + /// + /// + public QcGp12LogWorkorder AddQcGp12LogWorkorder(QcGp12LogWorkorder model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12工单操作日志 + /// + /// + /// + public int UpdateQcGp12LogWorkorder(QcGp12LogWorkorder model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12LogWorkorder() + //{ + // Name = model.Name, + // Content = model.Content, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12RecordLabelScanService.cs b/ZR.Service/mes/qc/QcGp12RecordLabelScanService.cs new file mode 100644 index 00000000..e0a02a95 --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12RecordLabelScanService.cs @@ -0,0 +1,92 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12扫码标签记录Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12RecordLabelScanService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12RecordLabelScanService : BaseService, IQcGp12RecordLabelScanService + { + /// + /// 查询质量GP12扫码标签记录列表 + /// + /// + /// + public PagedInfo GetList(QcGp12RecordLabelScanQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12RecordLabelScan GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12扫码标签记录 + /// + /// + /// + public QcGp12RecordLabelScan AddQcGp12RecordLabelScan(QcGp12RecordLabelScan model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12扫码标签记录 + /// + /// + /// + public int UpdateQcGp12RecordLabelScan(QcGp12RecordLabelScan model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12RecordLabelScan() + //{ + // WorkOrder = model.WorkOrder, + // PartNumber = model.PartNumber, + // Team = model.Team, + // SiteNo = model.SiteNo, + // ComNo = model.ComNo, + // Label = model.Label, + // LabelType = model.LabelType, + // LabelSort = model.LabelSort, + // ScanTime = model.ScanTime, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12RecordWorkorderDefectService.cs b/ZR.Service/mes/qc/QcGp12RecordWorkorderDefectService.cs new file mode 100644 index 00000000..1f1160b9 --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12RecordWorkorderDefectService.cs @@ -0,0 +1,93 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12工单缺陷项记录Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12RecordWorkorderDefectService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12RecordWorkorderDefectService : BaseService, IQcGp12RecordWorkorderDefectService + { + /// + /// 查询质量GP12工单缺陷项记录列表 + /// + /// + /// + public PagedInfo GetList(QcGp12RecordWorkorderDefectQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12RecordWorkorderDefect GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12工单缺陷项记录 + /// + /// + /// + public QcGp12RecordWorkorderDefect AddQcGp12RecordWorkorderDefect(QcGp12RecordWorkorderDefect model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12工单缺陷项记录 + /// + /// + /// + public int UpdateQcGp12RecordWorkorderDefect(QcGp12RecordWorkorderDefect model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12RecordWorkorderDefect() + //{ + // WorkOrder = model.WorkOrder, + // PartNumber = model.PartNumber, + // Team = model.Team, + // SiteNo = model.SiteNo, + // ComNo = model.ComNo, + // DefectCode = model.DefectCode, + // DefectName = model.DefectName, + // DefectType = model.DefectType, + // DefectNum = model.DefectNum, + // ClickTime = model.ClickTime, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12Service.cs b/ZR.Service/mes/qc/QcGp12Service.cs new file mode 100644 index 00000000..7d36bd5c --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12Service.cs @@ -0,0 +1,111 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; +using Aliyun.OSS; +using System.Text.RegularExpressions; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12工单业务模块Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12Service), ServiceLifetime = LifeTime.Transient)] + public class QcGp12Service : BaseService, IQcGp12Service + { + public QcGp12LabelAnalysisDto AnalyzeLabelToDto(string label, int type) + { + QcGp12LabelAnalysisDto labelAnalysisDto = new(); + labelAnalysisDto.IsOk = true; + labelAnalysisDto.Msg = "解析成功!"; + // 零件号抓取 + var predicate = Expressionable.Create() + .And(it => it.Code == "PartNumber") + .And(it => it.Status == "1"); + List analysisList = Context.Queryable() + .Where(predicate.ToExpression()) + .ToList(); + foreach (QcGp12BaseLabelAnalysis analysis in analysisList) + { + if(string.IsNullOrEmpty(analysis.Expression)) + { + continue; + } + // 零件号正则表达式 + Regex pattern = new Regex(@analysis.Expression); + Match match = pattern.Match(label); + if (match.Success && match.Groups.Count > 1) + { + labelAnalysisDto.Partnumber = match.Groups[1].Value; + break; + } + } + if (string.IsNullOrEmpty(labelAnalysisDto.Partnumber)) + { + labelAnalysisDto.IsOk = false; + labelAnalysisDto.Msg = "零件号标签解析异常!"; + } + return labelAnalysisDto; + } + + public List GetDefectInitOptions() + { + List defectList = new(); + var predicate = Expressionable.Create() + .And(it => it.Status == "1"); + List groupList = Context.Queryable() + .Where(predicate.ToExpression()) + .GroupBy(it=>it.Group) + .Select(it => it.Group) + .ToList(); + foreach (string group in groupList) + { + QcGp12AlterationDefectDto defectDto = new(); + defectDto.GroupName = group; + List children = Context.Queryable() + .Where(it=>it.Group == group) + .Where(predicate.ToExpression()) + .Select(it=> new QcGp12ChildrenDefectDto + { + Name = it.Name, + Code = it.Code, + Type = it.Type + }) + .ToList(); + defectDto.Children = children; + defectList.Add(defectDto); + } + return defectList; + } + + public List GetGroupOptions() + { + var predicate = Expressionable.Create() + .And(it=>it.Status == "1"); + + var response = Context.Queryable() + .Where(predicate.ToExpression()) + .Select(it=> new QcGp12BaseGroupDto()) + .ToList(); + return response; + } + + public List GetStieOptions() + { + var predicate = Expressionable.Create() + .And(it => it.Status == "1"); + + var response = Context.Queryable() + .Where(predicate.ToExpression()) + .Select(it => new QcGp12BaseSiteDto()) + .ToList(); + return response; + } + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12ServiceStatisticsService.cs b/ZR.Service/mes/qc/QcGp12ServiceStatisticsService.cs new file mode 100644 index 00000000..7440b4a3 --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12ServiceStatisticsService.cs @@ -0,0 +1,106 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12统计报表业务模块Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12ServiceStatisticsService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12ServiceStatisticsService : BaseService, IQcGp12ServiceStatisticsService + { + /// + /// 查询质量GP12统计报表业务模块列表 + /// + /// + /// + public PagedInfo GetList(QcGp12ServiceStatisticsQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12ServiceStatistics GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12统计报表业务模块 + /// + /// + /// + public QcGp12ServiceStatistics AddQcGp12ServiceStatistics(QcGp12ServiceStatistics model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12统计报表业务模块 + /// + /// + /// + public int UpdateQcGp12ServiceStatistics(QcGp12ServiceStatistics model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12ServiceStatistics() + //{ + // WorkOrder = model.WorkOrder, + // PartNumber = model.PartNumber, + // Description = model.Description, + // Specification = model.Specification, + // Color = model.Color, + // Team = model.Team, + // SiteNo = model.SiteNo, + // ComNo = model.ComNo, + // IsOnetime = model.IsOnetime, + // IsBack = model.IsBack, + // IsPolish = model.IsPolish, + // IsOut = model.IsOut, + // StartTime = model.StartTime, + // EndTime = model.EndTime, + // Label = model.Label, + // RequireNumber = model.RequireNumber, + // QualifiedNumber = model.QualifiedNumber, + // QualifiedRate = model.QualifiedRate, + // DamoNumber = model.DamoNumber, + // BaofeiNumber = model.BaofeiNumber, + // GroupCode = model.GroupCode, + // GroupSort = model.GroupSort, + // GroupDefectJson = model.GroupDefectJson, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcGp12ServiceWorkorderService.cs b/ZR.Service/mes/qc/QcGp12ServiceWorkorderService.cs new file mode 100644 index 00000000..956abce1 --- /dev/null +++ b/ZR.Service/mes/qc/QcGp12ServiceWorkorderService.cs @@ -0,0 +1,102 @@ +using System; +using SqlSugar; +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using ZR.Model; +using ZR.Model.Dto; +using ZR.Model.Business; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; +using System.Linq; + +namespace ZR.Service.Business +{ + /// + /// 质量GP12工单业务模块Service业务层处理 + /// + [AppService(ServiceType = typeof(IQcGp12ServiceWorkorderService), ServiceLifetime = LifeTime.Transient)] + public class QcGp12ServiceWorkorderService : BaseService, IQcGp12ServiceWorkorderService + { + /// + /// 查询质量GP12工单业务模块列表 + /// + /// + /// + public PagedInfo GetList(QcGp12ServiceWorkorderQueryDto parm) + { + var predicate = Expressionable.Create(); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public QcGp12ServiceWorkorder GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加质量GP12工单业务模块 + /// + /// + /// + public QcGp12ServiceWorkorder AddQcGp12ServiceWorkorder(QcGp12ServiceWorkorder model) + { + return Context.Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改质量GP12工单业务模块 + /// + /// + /// + public int UpdateQcGp12ServiceWorkorder(QcGp12ServiceWorkorder model) + { + //var response = Update(w => w.Id == model.Id, it => new QcGp12ServiceWorkorder() + //{ + // WorkOrder = model.WorkOrder, + // PartNumber = model.PartNumber, + // Description = model.Description, + // Specification = model.Specification, + // Color = model.Color, + // Team = model.Team, + // SiteNo = model.SiteNo, + // ComNo = model.ComNo, + // IsOnetime = model.IsOnetime, + // IsBack = model.IsBack, + // IsPolish = model.IsPolish, + // IsOut = model.IsOut, + // StartTime = model.StartTime, + // EndTime = model.EndTime, + // Label = model.Label, + // RequireNumber = model.RequireNumber, + // QualifiedNumber = model.QualifiedNumber, + // DamoNumber = model.DamoNumber, + // BaofeiNumber = model.BaofeiNumber, + // Type = model.Type, + // Status = model.Status, + // Remark = model.Remark, + // CreatedBy = model.CreatedBy, + // CreatedTime = model.CreatedTime, + // UpdatedBy = model.UpdatedBy, + // UpdatedTime = model.UpdatedTime, + //}); + //return response; + return Update(model, true); + } + + } +} \ No newline at end of file