diff --git a/Infrastructure/App/App.cs b/Infrastructure/App/App.cs index 49a5b6a1..354a2c20 100644 --- a/Infrastructure/App/App.cs +++ b/Infrastructure/App/App.cs @@ -5,8 +5,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using System; using System.Security.Claims; -using System.Security.Principal; -using System.Xml.Linq; namespace Infrastructure { @@ -36,7 +34,7 @@ namespace Infrastructure /// /// 获取Web主机环境 /// - public static IWebHostEnvironment WebHostEnvironment => InternalApp.WebHostEnvironment; + public static IWebHostEnvironment WebHostEnvironment => InternalApp.WebHostEnvironment; /// /// 获取全局配置 /// diff --git a/Infrastructure/Constant/HttpStatus.cs b/Infrastructure/Constant/HttpStatus.cs index 34fe7dc4..5336ba67 100644 --- a/Infrastructure/Constant/HttpStatus.cs +++ b/Infrastructure/Constant/HttpStatus.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Infrastructure.Constant +namespace Infrastructure.Constant { public class HttpStatus { diff --git a/Infrastructure/Constant/HubsConstant.cs b/Infrastructure/Constant/HubsConstant.cs index 7bb8430e..e779a050 100644 --- a/Infrastructure/Constant/HubsConstant.cs +++ b/Infrastructure/Constant/HubsConstant.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Infrastructure.Constant +namespace Infrastructure.Constant { public class HubsConstant { @@ -13,6 +7,6 @@ namespace Infrastructure.Constant public static string OnlineNum = "onlineNum"; public static string MoreNotice = "moreNotice"; public static string OnlineUser = "onlineUser"; - + } } diff --git a/Infrastructure/CustomException/CustomException.cs b/Infrastructure/CustomException/CustomException.cs index 19f8fc5b..815e58b4 100644 --- a/Infrastructure/CustomException/CustomException.cs +++ b/Infrastructure/CustomException/CustomException.cs @@ -7,7 +7,7 @@ namespace Infrastructure public int Code { get; set; } public string Msg { get; set; } public string LogMsg { get; set; } - + public CustomException(string msg) : base(msg) { } diff --git a/Infrastructure/Extensions/Extension.Convert.cs b/Infrastructure/Extensions/Extension.Convert.cs index 4710dfd0..9e8227ef 100644 --- a/Infrastructure/Extensions/Extension.Convert.cs +++ b/Infrastructure/Extensions/Extension.Convert.cs @@ -1,9 +1,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Infrastructure.Extensions { diff --git a/Infrastructure/Extensions/Extension.Exception.cs b/Infrastructure/Extensions/Extension.Exception.cs index 4af781d7..32a1dae1 100644 --- a/Infrastructure/Extensions/Extension.Exception.cs +++ b/Infrastructure/Extensions/Extension.Exception.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Infrastructure.Extensions { diff --git a/Infrastructure/Extensions/Extension.Linq.cs b/Infrastructure/Extensions/Extension.Linq.cs index 0c23a710..49816919 100644 --- a/Infrastructure/Extensions/Extension.Linq.cs +++ b/Infrastructure/Extensions/Extension.Linq.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; namespace Infrastructure.Extensions { diff --git a/Infrastructure/Extensions/StringExtension.cs b/Infrastructure/Extensions/StringExtension.cs index e04a4bb9..d7e52c14 100644 --- a/Infrastructure/Extensions/StringExtension.cs +++ b/Infrastructure/Extensions/StringExtension.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; diff --git a/Infrastructure/Helper/AssemblyUtils.cs b/Infrastructure/Helper/AssemblyUtils.cs index 3934851e..202e29d9 100644 --- a/Infrastructure/Helper/AssemblyUtils.cs +++ b/Infrastructure/Helper/AssemblyUtils.cs @@ -3,8 +3,6 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Text; -using System.Threading.Tasks; namespace Infrastructure.Helper { diff --git a/Infrastructure/Helper/ComputerHelper.cs b/Infrastructure/Helper/ComputerHelper.cs index 52fa3184..94bdba8e 100644 --- a/Infrastructure/Helper/ComputerHelper.cs +++ b/Infrastructure/Helper/ComputerHelper.cs @@ -3,9 +3,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; namespace Infrastructure { diff --git a/Infrastructure/Helper/DateTimeHelper.cs b/Infrastructure/Helper/DateTimeHelper.cs index 72076c4d..b8740c9f 100644 --- a/Infrastructure/Helper/DateTimeHelper.cs +++ b/Infrastructure/Helper/DateTimeHelper.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace Infrastructure { diff --git a/Infrastructure/Helper/FileUtil.cs b/Infrastructure/Helper/FileUtil.cs index c6d6c7b5..90cce6dc 100644 --- a/Infrastructure/Helper/FileUtil.cs +++ b/Infrastructure/Helper/FileUtil.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Runtime.InteropServices; diff --git a/Infrastructure/Helper/HttpHelper.cs b/Infrastructure/Helper/HttpHelper.cs index b1f3c804..2a967ce8 100644 --- a/Infrastructure/Helper/HttpHelper.cs +++ b/Infrastructure/Helper/HttpHelper.cs @@ -23,7 +23,7 @@ namespace Infrastructure { ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true //忽略掉证书异常 }; - + using HttpClient client = new HttpClient(httpClientHandler); client.Timeout = new TimeSpan(0, 0, timeOut); if (headers != null) @@ -38,11 +38,12 @@ namespace Infrastructure try { response = client.PostAsync(url, httpContent).Result; - }catch (Exception ex) - { - return "异常:"+ex.Message; } - + catch (Exception ex) + { + return "异常:" + ex.Message; + } + return response.Content.ReadAsStringAsync().Result; } diff --git a/Infrastructure/Helper/ShellHelper.cs b/Infrastructure/Helper/ShellHelper.cs index 6c56ad11..912be411 100644 --- a/Infrastructure/Helper/ShellHelper.cs +++ b/Infrastructure/Helper/ShellHelper.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Text; +using System.Diagnostics; namespace Infrastructure { diff --git a/Infrastructure/Helper/XmlCommentHelper.cs b/Infrastructure/Helper/XmlCommentHelper.cs index 984b8ef6..baef14b8 100644 --- a/Infrastructure/Helper/XmlCommentHelper.cs +++ b/Infrastructure/Helper/XmlCommentHelper.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Reflection; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Xml.XPath; namespace Infrastructure.Helper diff --git a/Infrastructure/OptionsSetting.cs b/Infrastructure/OptionsSetting.cs index e451fee8..4ab071ce 100644 --- a/Infrastructure/OptionsSetting.cs +++ b/Infrastructure/OptionsSetting.cs @@ -1,6 +1,4 @@ - -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace Infrastructure { diff --git a/ZR.Admin.WebApi/AutoMapperProfile/AutoMapperProfile.cs b/ZR.Admin.WebApi/AutoMapperProfile/AutoMapperProfile.cs index 2d82960d..8a5066f1 100644 --- a/ZR.Admin.WebApi/AutoMapperProfile/AutoMapperProfile.cs +++ b/ZR.Admin.WebApi/AutoMapperProfile/AutoMapperProfile.cs @@ -4,9 +4,10 @@ namespace ZR.Admin.WebApi.AutoMapperProfile { public class AutoMapperProfile : Profile { - public AutoMapperProfile() { - - + public AutoMapperProfile() + { + + } } } diff --git a/ZR.Admin.WebApi/Controllers/BaseController.cs b/ZR.Admin.WebApi/Controllers/BaseController.cs index 5aa0e5f6..544dff05 100644 --- a/ZR.Admin.WebApi/Controllers/BaseController.cs +++ b/ZR.Admin.WebApi/Controllers/BaseController.cs @@ -64,8 +64,8 @@ namespace ZR.Admin.WebApi.Controllers var stream = Io.File.OpenRead(path); //创建文件流 Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition"); - return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", HttpUtility.UrlEncode(fileName)); - // return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileName); + return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", HttpUtility.UrlEncode(fileName)); + // return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileName); } #region 方法 diff --git a/ZR.Admin.WebApi/Controllers/System/ArticleCategoryController.cs b/ZR.Admin.WebApi/Controllers/System/ArticleCategoryController.cs index edab4b6d..27c8c944 100644 --- a/ZR.Admin.WebApi/Controllers/System/ArticleCategoryController.cs +++ b/ZR.Admin.WebApi/Controllers/System/ArticleCategoryController.cs @@ -60,7 +60,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetArticleCategory(int CategoryId) { var response = _ArticleCategoryService.GetFirst(x => x.CategoryId == CategoryId); - + return SUCCESS(response); } diff --git a/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs b/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs index 92187a78..67273ad2 100644 --- a/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs +++ b/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs @@ -1,8 +1,4 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Extensions; -using Mapster; +using Infrastructure.Extensions; using Microsoft.AspNetCore.Mvc; using SqlSugar; using ZR.Admin.WebApi.Extensions; @@ -10,7 +6,6 @@ using ZR.Admin.WebApi.Filters; using ZR.CodeGenerator; using ZR.CodeGenerator.Model; using ZR.CodeGenerator.Service; -using ZR.Common; using ZR.Model; using ZR.Model.System.Dto; using ZR.Model.System.Generate; diff --git a/ZR.Admin.WebApi/Controllers/System/SysFileController.cs b/ZR.Admin.WebApi/Controllers/System/SysFileController.cs index 8900235b..af52c19f 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysFileController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysFileController.cs @@ -1,13 +1,9 @@ using Microsoft.AspNetCore.Mvc; using SqlSugar; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; using ZR.Admin.WebApi.Filters; -using ZR.Common; using ZR.Model.System; -using ZR.Service.System.IService; using ZR.Model.System.Dto; +using ZR.Service.System.IService; namespace ZR.Admin.WebApi.Controllers { diff --git a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs index 184f88cd..40d6be9e 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs @@ -203,7 +203,7 @@ namespace ZR.Admin.WebApi.Controllers.System { return ToResponse(ResultCode.CAPTCHA_ERROR, "验证码错误"); } - + SysUser user = sysUserService.Register(dto); if (user.UserId > 0) { diff --git a/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs b/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs index c5a5ef04..642da99d 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs @@ -80,7 +80,7 @@ namespace ZR.Admin.WebApi.Controllers.System public IActionResult AddSysNotice([FromBody] SysNoticeDto parm) { var modal = parm.Adapt().ToCreate(HttpContext); - + int result = _SysNoticeService.Insert(modal, it => new { it.NoticeTitle, diff --git a/ZR.Admin.WebApi/Controllers/System/SysPostController.cs b/ZR.Admin.WebApi/Controllers/System/SysPostController.cs index b99d9e99..cd53a93c 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysPostController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysPostController.cs @@ -68,7 +68,7 @@ namespace ZR.Admin.WebApi.Controllers.System throw new CustomException($"修改岗位{post.PostName}失败,岗位编码已存在"); } post.ToCreate(HttpContext); - + return ToResponse(PostService.Add(post)); } @@ -122,7 +122,7 @@ namespace ZR.Admin.WebApi.Controllers.System /// 岗位导出 /// /// - [Log(BusinessType = BusinessType.EXPORT, IsSaveResponseData = false, Title= "岗位导出")] + [Log(BusinessType = BusinessType.EXPORT, IsSaveResponseData = false, Title = "岗位导出")] [HttpGet("export")] [ActionPermissionFilter(Permission = "system:post:export")] public IActionResult Export() diff --git a/ZR.Admin.WebApi/Controllers/System/TasksLogController.cs b/ZR.Admin.WebApi/Controllers/System/TasksLogController.cs index 115db6bf..6d758d74 100644 --- a/ZR.Admin.WebApi/Controllers/System/TasksLogController.cs +++ b/ZR.Admin.WebApi/Controllers/System/TasksLogController.cs @@ -1,11 +1,7 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Extensions; +using Infrastructure.Extensions; using Microsoft.AspNetCore.Mvc; using SqlSugar; using ZR.Admin.WebApi.Filters; -using ZR.Common; using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Admin.WebApi/Controllers/System/monitor/MonitorController.cs b/ZR.Admin.WebApi/Controllers/System/monitor/MonitorController.cs index 4dc50093..47c951b2 100644 --- a/ZR.Admin.WebApi/Controllers/System/monitor/MonitorController.cs +++ b/ZR.Admin.WebApi/Controllers/System/monitor/MonitorController.cs @@ -1,11 +1,6 @@ -using Infrastructure; using Infrastructure.Extensions; -using Infrastructure.Model; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; -using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/ZR.Admin.WebApi/Controllers/System/monitor/SysLogininforController.cs b/ZR.Admin.WebApi/Controllers/System/monitor/SysLogininforController.cs index 9a935571..c497fe1e 100644 --- a/ZR.Admin.WebApi/Controllers/System/monitor/SysLogininforController.cs +++ b/ZR.Admin.WebApi/Controllers/System/monitor/SysLogininforController.cs @@ -40,7 +40,7 @@ namespace ZR.Admin.WebApi.Controllers.monitor /// 清空登录日志 /// /// - [Log(Title = "清空登录日志", BusinessType= BusinessType.CLEAN)] + [Log(Title = "清空登录日志", BusinessType = BusinessType.CLEAN)] [ActionPermissionFilter(Permission = "monitor:logininfor:remove")] [HttpDelete("clean")] public IActionResult CleanLoginInfo() diff --git a/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs b/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs index 7b608480..fdd81b4d 100644 --- a/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs +++ b/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs @@ -65,7 +65,7 @@ namespace ZR.Admin.WebApi.Controllers.monitor { if (!HttpContextExtension.IsAdmin(HttpContext)) { - return ToResponse(Infrastructure.ResultCode.CUSTOM_ERROR,"操作失败"); + return ToResponse(Infrastructure.ResultCode.CUSTOM_ERROR, "操作失败"); } sysOperLogService.CleanOperLog(); diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdBOMController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdBOMController.cs index 2748dd1d..f5f6d759 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdBOMController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdBOMController.cs @@ -1,18 +1,12 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Service.mes.md; -using ZR.Service.MES.md; using ZR.Service.MES.md.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.MES.md { [Route("mes/md/BOM")] - public class MdBOMController :BaseController + public class MdBOMController : BaseController { IMdBOMService mdBOMService; public MdBOMController(IMdBOMService mdBOMService) @@ -29,7 +23,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.md /// 产品名称 /// [HttpGet("list")] - public IActionResult List(int pageNum, int pageSize, string productCode = "", string productName = "") + public IActionResult List(int pageNum, int pageSize, string productCode = "", string productName = "") { (int, List) data = mdBOMService.GetAll(productCode, productName, pageNum, pageSize); @@ -42,7 +36,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.md /// productCode码 /// [HttpGet("queryBOM")] - public IActionResult List(string queryString="") + public IActionResult List(string queryString = "") { List data = mdBOMService.QueryBOM(queryString); @@ -54,7 +48,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.md /// /// [HttpGet("getunitList")] - public IActionResult GetAllunitList() + public IActionResult GetAllunitList() { List data = mdBOMService.GetAllunitList(); return ToResponse(new ApiResult(200, "success", data)); @@ -67,21 +61,21 @@ namespace ZR.Admin.WebApi.Controllers.MES.md /// /// [HttpPost("addBom")] - public IActionResult AddBOM([FromBody] MdBom bomItem) + public IActionResult AddBOM([FromBody] MdBom bomItem) { - if(bomItem!=null&&bomItem.Id!=null) + if (bomItem != null && bomItem.Id != null) bomItem.ToCreate(HttpContext); if (bomItem.ParentProductId == 0) bomItem.ParentProductId = null; - int result=mdBOMService.AddBom(bomItem); + int result = mdBOMService.AddBom(bomItem); return ToResponse(new ApiResult(200, "success", result)); } - /// - /// 修改bom数据 - /// - /// - /// + /// + /// 修改bom数据 + /// + /// + /// [HttpPost("updateBom")] public IActionResult UpdateBOM([FromBody] MdBom bomItem) { diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdDeviceController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdDeviceController.cs index e864dcab..af7dc73f 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdDeviceController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdDeviceController.cs @@ -1,9 +1,6 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics.CodeAnalysis; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Service.mes.md; using ZR.Service.mes.md.IService; namespace ZR.Admin.WebApi.Controllers.mes.md { @@ -12,9 +9,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md public class MdDeviceController : BaseController { IMdDeviceService deviceService; - public MdDeviceController(IMdDeviceService deviceService) + public MdDeviceController(IMdDeviceService deviceService) { - this.deviceService = deviceService; + this.deviceService = deviceService; } @@ -33,9 +30,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md return ToResponse(new ApiResult(200, "success", data)); } - + [HttpPost("addDevice")] - public IActionResult AddDevice([FromBody]MdDevice device) + public IActionResult AddDevice([FromBody] MdDevice device) { if (device != null) device.ToCreate(HttpContext); @@ -44,7 +41,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md } [HttpPost("updateDevice")] - public IActionResult UpdateDevice([FromBody]MdDevice device) + public IActionResult UpdateDevice([FromBody] MdDevice device) { if (device != null) { @@ -65,15 +62,15 @@ namespace ZR.Admin.WebApi.Controllers.mes.md return ToResponse(result); } return null; - + } - + [HttpGet("getworkstationList")] public IActionResult GetworkstationList() { - List workstations= deviceService.getworkstationList(); - return SUCCESS(workstations); + List workstations = deviceService.getworkstationList(); + return SUCCESS(workstations); } diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdProductDefineController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdProductDefineController.cs index c66eff13..f326bae6 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdProductDefineController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdProductDefineController.cs @@ -1,16 +1,7 @@ -using CSRedis; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Hosting; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System.Collections.Generic; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Model.mes.md.DTO; -using ZR.Service.mes.md; using ZR.Service.mes.md.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.md { diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdTechnologicalProrouteController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdTechnologicalProrouteController.cs index e0424a47..7aea4363 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdTechnologicalProrouteController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdTechnologicalProrouteController.cs @@ -1,9 +1,6 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics.CodeAnalysis; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Service.mes.md; using ZR.Service.mes.md.IService; namespace ZR.Admin.WebApi.Controllers.mes.md @@ -17,9 +14,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md { this.workproroute = workproroute; } - + [HttpGet("list")] - public IActionResult List(int pageNum, int pageSize, string ProrouteCode="", string ProrouteName="") + public IActionResult List(int pageNum, int pageSize, string ProrouteCode = "", string ProrouteName = "") { (int, List) data = workproroute.GetAll(ProrouteCode, ProrouteName, pageNum, pageSize); diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdUnitController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdUnitController.cs index 06902430..c3787410 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdUnitController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdUnitController.cs @@ -1,8 +1,4 @@ using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Hosting; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System.Collections.Generic; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; using ZR.Model.mes.md.DTO; @@ -55,7 +51,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.md [HttpPost("addUnit")] public IActionResult AddUnitmeasure([FromBody] MdUnit paramss) { - if(paramss == null) { + if (paramss == null) + { return ToResponse(new ApiResult((int)ResultCode.NO_DATA, "null")); } paramss.ToCreate(HttpContext); @@ -117,7 +114,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md } - + } diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdWorklineController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdWorklineController.cs index 25614500..0c47aad4 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdWorklineController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdWorklineController.cs @@ -1,10 +1,6 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics.CodeAnalysis; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Service.mes.md; -using ZR.Service.mes.md.IService; using ZR.Service.MES.md.IService; namespace ZR.Admin.WebApi.Controllers.mes.md @@ -70,11 +66,11 @@ namespace ZR.Admin.WebApi.Controllers.mes.md } - + [HttpGet("getWorkshopList")] - public IActionResult GetWorkshopList(int worklineId=0) + public IActionResult GetWorkshopList(int worklineId = 0) { - List MdWorkshopList= worklineService.GetMdWorkshops(worklineId); + List MdWorkshopList = worklineService.GetMdWorkshops(worklineId); return SUCCESS(MdWorkshopList); } diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdWorkshopController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdWorkshopController.cs index bec8c7ec..948b6cf9 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdWorkshopController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdWorkshopController.cs @@ -1,10 +1,6 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics.CodeAnalysis; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Model.System.Dto; -using ZR.Service.mes.md; using ZR.Service.mes.md.IService; namespace ZR.Admin.WebApi.Controllers.mes.md @@ -58,7 +54,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md [HttpPost("updateWorkshop")] public IActionResult UpdateWorkshop([FromBody] MdWorkshop workshop) { - if(workshop!=null) + if (workshop != null) workshop.ToUpdate(HttpContext); int result = mdWorkshopService.UpdateWorkshop(workshop); return SUCCESS(result); @@ -73,7 +69,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md int result = mdWorkshopService.deleteWorkshop(ids.ToArray()); return ToResponse(result); } - return null; + return null; } diff --git a/ZR.Admin.WebApi/Controllers/mes/md/MdWorkstationController.cs b/ZR.Admin.WebApi/Controllers/mes/md/MdWorkstationController.cs index 96799e71..f6b8567e 100644 --- a/ZR.Admin.WebApi/Controllers/mes/md/MdWorkstationController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/md/MdWorkstationController.cs @@ -1,11 +1,7 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics.CodeAnalysis; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Model.mes.md; -using ZR.Service.mes.md; using ZR.Service.mes.md.IService; -using ZR.Service.MES.md; namespace ZR.Admin.WebApi.Controllers.mes.md { @@ -61,7 +57,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md } return null; } - + [HttpGet("getworkLineList")] public IActionResult GetworkLineList() diff --git a/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs b/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs index 92febbb0..96d9c6fb 100644 --- a/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/mm/MaterialInputController.cs @@ -1,10 +1,7 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; -using ZR.Model; using ZR.Model.MES.mm; using ZR.Model.MES.mm.Dto; -using ZR.Service.mes.mm; using ZR.Service.mes.mm.IService; namespace ZR.Admin.WebApi.Controllers.mes.mm @@ -58,7 +55,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm { SUCCESS(null); } - + var response = materialInputService.Getworkorderlist(query); return SUCCESS(response); } @@ -133,9 +130,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm /// /// [HttpGet("go_workshop")] - public IActionResult GoWorkshop(string start_point, string end_point, string agvCode ) + public IActionResult GoWorkshop(string start_point, string end_point, string agvCode) { - if (string.IsNullOrEmpty(start_point) || string.IsNullOrEmpty(end_point)||string.IsNullOrEmpty(agvCode)) + if (string.IsNullOrEmpty(start_point) || string.IsNullOrEmpty(end_point) || string.IsNullOrEmpty(agvCode)) { SUCCESS(null); } @@ -154,7 +151,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm { if (string.IsNullOrEmpty(reqCode)) { - return SUCCESS(null); + return SUCCESS(null); } var response = materialInputService.EmergencyStopAgv(reqCode); @@ -206,13 +203,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm /// /// [HttpGet("emptycarreturn")] - public IActionResult Emptycarreturn(string start_point, string end_point, string agvCode = "1743 ") + public IActionResult Emptycarreturn(string start_point, string end_point, string agvCode = "1743 ") { if (string.IsNullOrEmpty(start_point) || string.IsNullOrEmpty(end_point)) { SUCCESS(null); } - var response = materialInputService.AGV_schedule(start_point, end_point,agvCode); + var response = materialInputService.AGV_schedule(start_point, end_point, agvCode); return SUCCESS(response); } diff --git a/ZR.Admin.WebApi/Controllers/mes/mm/MmAgvLocationController.cs b/ZR.Admin.WebApi/Controllers/mes/mm/MmAgvLocationController.cs index 80dd3464..90ff2d0f 100644 --- a/ZR.Admin.WebApi/Controllers/mes/mm/MmAgvLocationController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/mm/MmAgvLocationController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.mm.IService; +using ZR.Model.Dto; using ZR.Model.MES.mm; +using ZR.Service.mes.mm.IService; //创建时间:2024-04-26 namespace ZR.Admin.WebApi.Controllers @@ -121,7 +121,8 @@ namespace ZR.Admin.WebApi.Controllers if (status == 0) { status = 1; - }else if (status == 1) + } + else if (status == 1) { status = 0; } @@ -144,7 +145,7 @@ namespace ZR.Admin.WebApi.Controllers return SUCCESS(null); } - var response= _MmAgvLocationService.CallagvStatus(agvCode); + var response = _MmAgvLocationService.CallagvStatus(agvCode); return SUCCESS(response); } diff --git a/ZR.Admin.WebApi/Controllers/mes/mm/MmFinishedwarehouseController.cs b/ZR.Admin.WebApi/Controllers/mes/mm/MmFinishedwarehouseController.cs index 4fbc3b5d..a86770e3 100644 --- a/ZR.Admin.WebApi/Controllers/mes/mm/MmFinishedwarehouseController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/mm/MmFinishedwarehouseController.cs @@ -1,6 +1,5 @@ -using ZR.Admin.WebApi.Filters; -using Microsoft.AspNetCore.Mvc; -using ZR.Service.mes.mm; +using Microsoft.AspNetCore.Mvc; +using ZR.Admin.WebApi.Filters; using ZR.Service.mes.mm.IService; namespace ZR.Admin.WebApi.Controllers.mes.mm @@ -16,7 +15,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.mm IMmFinishedwarehouseService finishedwarehouseService; public MmFinishedwarehouseController(IMmFinishedwarehouseService finishedwarehouseService) { - this. finishedwarehouseService=finishedwarehouseService; + this.finishedwarehouseService = finishedwarehouseService; } diff --git a/ZR.Admin.WebApi/Controllers/mes/op/OperationController.cs b/ZR.Admin.WebApi/Controllers/mes/op/OperationController.cs index 1960d4f8..cb86ce1b 100644 --- a/ZR.Admin.WebApi/Controllers/mes/op/OperationController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/op/OperationController.cs @@ -1,19 +1,6 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.SignalR; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using ZR.Admin.WebApi.Extensions; -using ZR.Admin.WebApi.Hubs; -using ZR.Model.mes.md; +using Microsoft.AspNetCore.Mvc; using ZR.Model.MES.op.DTO; -using ZR.Model.MES.op.ZR.Model.mes.md; -using ZR.Service.mes.md; -using ZR.Service.MES.md; -using ZR.Service.MES.md.IService; -using ZR.Service.MES.op; using ZR.Service.MES.op.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.MES.md { @@ -21,10 +8,11 @@ namespace ZR.Admin.WebApi.Controllers.MES.md public class OperationController : BaseController { private readonly IOperationService operationService; - - public OperationController(IOperationService operationService) { - this.operationService= operationService; - + + public OperationController(IOperationService operationService) + { + this.operationService = operationService; + } /// /// 获取所有统计信息 @@ -32,12 +20,12 @@ namespace ZR.Admin.WebApi.Controllers.MES.md /// 车间id /// [HttpGet("getOperation")] - public IActionResult GetActionResult(string WorkerID = "1") + public IActionResult GetActionResult(string WorkerID = "1") { - List OpStatisticsList= operationService.GetAllData(WorkerID); + List OpStatisticsList = operationService.GetAllData(WorkerID); return ToResponse(new ApiResult(200, "success", OpStatisticsList)); } - + } } diff --git a/ZR.Admin.WebApi/Controllers/mes/op/quality/QualityStatisticsController.cs b/ZR.Admin.WebApi/Controllers/mes/op/quality/QualityStatisticsController.cs index 3928afdc..d5e219e0 100644 --- a/ZR.Admin.WebApi/Controllers/mes/op/quality/QualityStatisticsController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/op/quality/QualityStatisticsController.cs @@ -1,7 +1,5 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.mes.pro; using ZR.Model.MES.op.DTO; -using ZR.Service.mes.pro; using ZR.Service.MES.op.IService; namespace ZR.Admin.WebApi.Controllers.mes.op.quality @@ -31,12 +29,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.op.quality [HttpGet("gueryQualityStatisticsTable")] public IActionResult GueryQualityStatisticsTable(int pageNum, int pageSize, int year = -1, int week = -1, int date = -1, string workorderid = "") { - (List, int) data = operationService.GueryQualityStatistics(workorderid,pageNum, pageSize, year, week, date); + (List, int) data = operationService.GueryQualityStatistics(workorderid, pageNum, pageSize, year, week, date); return ToResponse(new ApiResult(200, "success", data)); } - + /// /// 获取缺陷项详情 /// @@ -44,9 +42,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.op.quality /// 缺陷项类型 /// [HttpGet("QueryDetailsOfDetectionItems")] - public IActionResult QueryDetailsOfDetectionItems(string fkWorkorderId,int index) + public IActionResult QueryDetailsOfDetectionItems(string fkWorkorderId, int index) { - List data= operationService.QueryDetailsOfDetection(fkWorkorderId, index); + List data = operationService.QueryDetailsOfDetection(fkWorkorderId, index); return ToResponse(new ApiResult(200, "success", data)); } diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderController.cs b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderController.cs index 8a466e66..df276fce 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderController.cs @@ -1,18 +1,7 @@ -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.md; +using Microsoft.AspNetCore.Mvc; using ZR.Model.mes.pro; using ZR.Model.MES.pro.DTO; -using ZR.Service.mes.pro; using ZR.Service.mes.pro.IService; -using ZR.Service.MES.md; namespace ZR.Admin.WebApi.Controllers.MES.pro @@ -53,7 +42,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro /// /// /// - + [HttpGet("GetGanttList")] public IActionResult GetGanttList(int year = -1, int week = -1, int date = -1) { @@ -141,7 +130,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro int sum = 0; foreach (ProWorkorderSortDTO item in parameter) { - if(!string.IsNullOrEmpty(item.id)) + if (!string.IsNullOrEmpty(item.id)) { int data = proWorkorderService.SortWorkorderSchedule(item.id, item.order); sum += data; diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderV2Controller.cs b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderV2Controller.cs index bafa4189..8291fd19 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderV2Controller.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkorderV2Controller.cs @@ -1,21 +1,11 @@ -using Infrastructure.Extensions; -using JinianNet.JNTemplate; -using Microsoft.AspNetCore.Mvc; -using Microsoft.IdentityModel.Tokens; +using Microsoft.AspNetCore.Mvc; using MiniExcelLibs; -using Model.DBModel; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using SqlSugar; -using System.Text.Json; using ZR.Admin.WebApi.Extensions; -using ZR.Admin.WebApi.Filters; using ZR.Model.MES.pro; using ZR.Model.MES.pro.DTO; -using ZR.Service.mes.pro; using ZR.Service.mes.pro.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.pro { @@ -44,7 +34,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro return ToResponse(new ApiResult(200, "success", data)); } - + [HttpGet("getWorkoderList_piliang")] @@ -148,7 +138,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro item.Date = date; } var final_list = list.Where(it => !it.BlankNumber.Contains("圈数")) - .Where(it => !(it.BlankNumber == "" && it.FinishedPartNumber == "" && it.ProductDescription == "" && it.Specifications == "" && it.CylinderNumber == "" && it.Remark1 == "" && it.Remark2== "" && it.Remark3 == "" && it.Remark4== ""&&it.ClientWorkorder=="")) + .Where(it => !(it.BlankNumber == "" && it.FinishedPartNumber == "" && it.ProductDescription == "" && it.Specifications == "" && it.CylinderNumber == "" && it.Remark1 == "" && it.Remark2 == "" && it.Remark3 == "" && it.Remark4 == "" && it.ClientWorkorder == "")) .ToList(); string result = proWorkorderService.ImportExceldata(final_list); @@ -271,8 +261,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro { data = proWorkorderService.UpdateworkorderSort(id, (int)sort); - - + + } return ToResponse(new ApiResult(200, "success", data)); @@ -290,7 +280,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro public IActionResult UpdateSort2(string oldId, int oldSort, string newId, int newSort) { int result = 0; - if (string.IsNullOrEmpty(oldId)&& string.IsNullOrEmpty(newId)) + if (string.IsNullOrEmpty(oldId) && string.IsNullOrEmpty(newId)) { return ToResponse(new ApiResult(400, "updateSortError", "排序参数异常")); } diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs index 8138212b..b9e5bfec 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs @@ -1,10 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using Microsoft.IdentityModel.Tokens; using ZR.Admin.WebApi.Extensions; -using ZR.Model.mes.md; using ZR.Model.mes.pro; using ZR.Service.mes.pro.IService; -using ZR.Service.MES.md; namespace ZR.Admin.WebApi.Controllers.MES.pro { @@ -30,9 +27,9 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro /// 颜色 /// [HttpGet("list")] - public IActionResult List(int pageNum, int pageSize, int year=-1, int week=-1, string partNumber = "", string color = "") + public IActionResult List(int pageNum, int pageSize, int year = -1, int week = -1, string partNumber = "", string color = "") { - (List,int) data = proWorkplanService.GetAllData(pageNum, pageSize, year, week, partNumber, color); + (List, int) data = proWorkplanService.GetAllData(pageNum, pageSize, year, week, partNumber, color); return ToResponse(new ApiResult(200, "success", data)); } @@ -46,7 +43,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro public IActionResult AddWorkPlan([FromBody] ProWorkplan proWorkplan) { int data = 0; - if (proWorkplan!=null) + if (proWorkplan != null) { proWorkplan.ToCreate(HttpContext); data = proWorkplanService.AddWorkPlan(proWorkplan); @@ -68,7 +65,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro { proWorkplan.ToUpdate(HttpContext); data = proWorkplanService.UpdateWorkPlan(proWorkplan); - + } return ToResponse(new ApiResult(200, "success", data)); @@ -137,7 +134,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro List lstWorkorder = proWorkplanService.GetWorkorderListByPlanId(workPlanId); // 计算所有工单的数量和,生产计划的数量:比较 - if(lstWorkplan!=null && lstWorkplan.Count==1) + if (lstWorkplan != null && lstWorkplan.Count == 1) { int countWorkplan = int.Parse(lstWorkplan[0].ActualplanNumber.Trim()); @@ -152,7 +149,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro countWorkorder += proWorkorder.Actualnumber.GetValueOrDefault(); // 计划数>0 计划数要大于等于当前工单总数 - if(countWorkplan > 0 && (countWorkplan>= countWorkorder)) + if (countWorkplan > 0 && (countWorkplan >= countWorkorder)) { proWorkorder.Partnumber = lstWorkplan[0].Partnumber; proWorkorder.ToCreate(HttpContext); @@ -197,7 +194,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro ProWorkorder currentWorkorder = null; foreach (ProWorkorder item in lstWorkorder) { - if(item.Id.Equals(workorderId)) // 找到当前工单ID的对象 + if (item.Id.Equals(workorderId)) // 找到当前工单ID的对象 { //if(!string.IsNullOrEmpty(item.Wrokerorder_status)) isArrange = item.Isarrange; isArrange = item.Wrokerorder_status.ToString(); @@ -223,7 +220,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro { countWorkorder += item.Actualnumber.GetValueOrDefault(); } - if(currentWorkorder!=null) countWorkorder -= currentWorkorder.Actualnumber.GetValueOrDefault(); // 减去当前工单的数值 + if (currentWorkorder != null) countWorkorder -= currentWorkorder.Actualnumber.GetValueOrDefault(); // 减去当前工单的数值 // 再加上要更新的值 countWorkorder += proWorkorder.Actualnumber.GetValueOrDefault(); @@ -241,7 +238,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro } } else data = 3; - + } } @@ -277,7 +274,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro } else data = 3; } - + } return ToResponse(new ApiResult(200, "success", data)); diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanV2Controller.cs b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanV2Controller.cs index 627ee1aa..0587613c 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanV2Controller.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanV2Controller.cs @@ -1,21 +1,8 @@ -using Aliyun.OSS; -using AutoMapper.Configuration.Conventions; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Hosting.Internal; -using MimeKit; +using Microsoft.AspNetCore.Mvc; using MiniExcelLibs; -using MiniExcelLibs.OpenXml; using Model.DBModel; -using Org.BouncyCastle.Crypto.IO; -using System.IO; using ZR.Admin.WebApi.Extensions; -using ZR.Admin.WebApi.Filters; -using ZR.Model; -using ZR.Model.mes.pro; using ZR.Model.MES.pro.DTO; -using ZR.Model.System; -using ZR.Model.System.Dto; -using ZR.Service.mes.pro; using ZR.Service.mes.pro.IService; namespace ZR.Admin.WebApi.Controllers.mes.pro @@ -90,13 +77,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro /// /// [HttpGet("deleteAll")] - public IActionResult DeleteAllItem(int? year,int? week) + public IActionResult DeleteAllItem(int? year, int? week) { int data = 0; - if (week!=null&&week>0) + if (week != null && week > 0) { if (year != null && year > 0) - data = proWorkplanService.DeleteAllWorkPlan((int)year,(int)week); + data = proWorkplanService.DeleteAllWorkPlan((int)year, (int)week); } return ToResponse(new ApiResult(200, "success", data)); @@ -185,7 +172,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro targetFileStream.Write(buffer, 0, bytesRead); } - + //读取列表数据 @@ -214,7 +201,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro } catch (Exception ex) { - return ToResponse(ResultCode.GLOBAL_ERROR,"内容错误,请仔细检测格式,并联系管理员"+ex.Message); + return ToResponse(ResultCode.GLOBAL_ERROR, "内容错误,请仔细检测格式,并联系管理员" + ex.Message); } } return SUCCESS(null); @@ -257,7 +244,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro return ToResponse(new ApiResult(500, ex.Message, 0)); } - + } } diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/WmPackingrecordController.cs b/ZR.Admin.WebApi/Controllers/mes/pro/WmPackingrecordController.cs index 5d68fe54..aa4b93f0 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/WmPackingrecordController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/WmPackingrecordController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.pro.IService; -using ZR.Model.MES.pro.DTO; using ZR.Model.mes.pro; +using ZR.Model.MES.pro.DTO; +using ZR.Service.mes.pro.IService; //创建时间:2024-05-20 namespace ZR.Admin.WebApi.Controllers @@ -49,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmPackingrecord(long Id) { var response = _WmPackingrecordService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CRUD/QcQualityStatisticsFirstController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CRUD/QcQualityStatisticsFirstController.cs index 3792017a..e096af5a 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CRUD/QcQualityStatisticsFirstController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CRUD/QcQualityStatisticsFirstController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.qc.IService; -using ZR.Model.MES.qc.DTO; using ZR.Model.MES.qc; +using ZR.Model.MES.qc.DTO; +using ZR.Service.mes.qc.IService; //创建时间:2024-04-11 namespace ZR.Admin.WebApi.Controllers @@ -49,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetQcQualityStatisticsFirst(string Id) { var response = _QcQualityStatisticsFirstService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CommonFQCController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CommonFQCController.cs new file mode 100644 index 00000000..35356761 --- /dev/null +++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/CommonFQCController.cs @@ -0,0 +1,101 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.SignalR; +using ZR.Admin.WebApi.Extensions; +using ZR.Admin.WebApi.Hubs; +using ZR.Model.MES.qc.DTO; +using ZR.Service.mes.qc.IService; + +namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC +{ + + + [Route("mes/qc/FQC/common")] + public class CommonFQCController : BaseController + { + private readonly ICommonFQCService _commonFQCService; + + public CommonFQCController(ICommonFQCService commonFQCService) + { + this._commonFQCService = commonFQCService; + } + + /// + /// 检查工单状态 + /// + /// + /// 0-未完成 1-已上线 2-已完成 + [HttpGet("checkPackageWorkOrderStatus")] + public IActionResult CheckPackageWorkOrderStatus(string workOrderId) + { + if (string.IsNullOrEmpty(workOrderId)) + { + return ToResponse(new ApiResult(500, "工单号传入异常!", "工单号传入异常!")); + } + int result = _commonFQCService.CheckPackageWorkOrderStatus(workOrderId); + if (result == -1) + { + return ToResponse(new ApiResult(500, "获取工单状态异常-01", result)); + } + return ToResponse(new ApiResult(200, "ok", result)); + } + + /// + /// 检查工单在当日计划中的状态 + /// + /// + /// -1 -未知异常 0-正常 1-前边有未完成工单 2-最开始一个工单 3-最后一个工单 + [HttpGet("checkPackageWorkOrderInListStatus")] + public IActionResult CheckPackageWorkOrderInListStatus(string workOrderId) + { + if (string.IsNullOrEmpty(workOrderId)) + { + return ToResponse(new ApiResult(500, "工单号传入异常!", "工单号传入异常!")); + } + int result = _commonFQCService.CheckPackageWorkOrderInListStatus(workOrderId); + if (result == -1) + { + return ToResponse(new ApiResult(500, "获取工单状态异常-02", result)); + } + return ToResponse(new ApiResult(200, "ok", result)); + } + /// + /// 检查工单在当日未完成的工单计划中是第几个 + /// + /// 工单号 + /// [1当前位置,2总数, 3包装已完成, 4包装未完成] + [HttpGet("checkWorkOrderInDayListNum")] + public IActionResult CheckWorkOrderInDayListNum(string workOrderId) + { + if (string.IsNullOrEmpty(workOrderId)) + { + return ToResponse(new ApiResult(500, "工单号传入异常!", "工单号传入异常!")); + } + var result = _commonFQCService.CheckWorkOrderInDayListNum(workOrderId); + if (result == null) + { + return ToResponse(new ApiResult(500, "获取工单计划编号异常-01", result)); + } + return ToResponse(new ApiResult(200, "ok", result)); + } + + /// + /// 获取工单质量检测,首检,包装看板数据 + /// + /// 工单号 + /// QcCommonFqcBoardDto 看板数据 + [HttpGet("getWorkOrderBoardData")] + public IActionResult GetWorkOrderBoardData(string workOrderId) + { + if (string.IsNullOrEmpty(workOrderId)) + { + return ToResponse(new ApiResult(500, "工单号传入异常!", "工单号传入异常!")); + } + var result = _commonFQCService.GetWorkOrderBoardData(workOrderId); + if (result == null) + { + return ToResponse(new ApiResult(500, "获取看板数据异常-01:返回值为空", result)); + } + return ToResponse(new ApiResult(200, "ok", result)); + } + } +} diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs index 173e78c1..7ba93b6c 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs @@ -1,21 +1,9 @@ -using Infrastructure.Constant; -using Infrastructure.Extensions; -using JinianNet.JNTemplate; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SignalR; -using Microsoft.IdentityModel.Tokens; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using NPOI.POIFS.Crypt.Dsig; -using Org.BouncyCastle.Asn1.X509; -using System.Text.Json; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Hubs; using ZR.Model.MES.qc.DTO; -using ZR.Model.MES.qu; using ZR.Service.mes.qc.IService; -using ZR.Service.System; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC { @@ -42,7 +30,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC /// /// [HttpGet("getcheckItemTable__first")] - public IActionResult GetcheckItemTable__first(string workorderID) + public IActionResult GetcheckItemTable__first(string workorderID) { CheckItemTableDTO itemTableDTO = fQCService.GetCheckItemTable_first(workorderID); @@ -50,13 +38,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC return SUCCESS(itemTableDTO); } - + /// /// 写入工序时间 (首检) /// /// [HttpGet("writeProcessFlow_first")] - public IActionResult WriteProcessFlow_first(string workorderID,DateTime time) + public IActionResult WriteProcessFlow_first(string workorderID, DateTime time) { int result = fQCService.WriteProcessFlow_first(workorderID, time); @@ -102,7 +90,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC public IActionResult GetcurrentWorkorder_first() { - QcCurrentWorkorderDto workorder= fQCService.GetcurrentWorkorder_first(); + QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_first(); return SUCCESS(workorder); } @@ -171,7 +159,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC Console.WriteLine("workorder" + workorder); - + return SUCCESS(workorder); } @@ -222,11 +210,11 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC /// 要累加的值 /// [HttpGet("accumulator_query_first")] - public IActionResult Accumulator_first(string workorder_id,int checkid,int number, string inspectionModule) + public IActionResult Accumulator_first(string workorder_id, int checkid, int number, string inspectionModule) { - int result= fQCService.Accumulator_first(workorder_id, checkid, number, inspectionModule, HttpContext.GetName()); - + int result = fQCService.Accumulator_first(workorder_id, checkid, number, inspectionModule, HttpContext.GetName()); + return SUCCESS(result); } @@ -287,7 +275,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC /// /// [HttpGet("calculate_packagingInvestment")] - public IActionResult CalculatePackagingInvestment(string workorder_id) + public IActionResult CalculatePackagingInvestment(string workorder_id) { int AllNumber = fQCService.CalculatePackagingInvestment(workorder_id); return SUCCESS(AllNumber); @@ -297,16 +285,16 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC // 更改工单状态为完成态 [HttpGet("update_workorder_status")] - public IActionResult UpdateWorkorderStatus(string workorderID) + public IActionResult UpdateWorkorderStatus(string workorderID) { - int result= fQCService.UpdateWorkorderStatus(workorderID); + int result = fQCService.UpdateWorkorderStatus(workorderID); return SUCCESS(result); } - + // 生成质量统计报表 [HttpGet("generateQualityStatisticsTable")] - public IActionResult GenerateQualityStatisticsTable(string workorderID,string team, DateTime firstQuality_time) + public IActionResult GenerateQualityStatisticsTable(string workorderID, string team, DateTime firstQuality_time) { int result = fQCService.GenerateQualityStatisticsTable(workorderID, team, firstQuality_time.ToLocalTime()); diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs index 7762fb8b..f4cada1b 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs @@ -1,18 +1,10 @@ -using Microsoft.AspNetCore.SignalR; -using ZR.Admin.WebApi.Controllers; -using ZR.Admin.WebApi.Hubs; -using ZR.Service.mes.qc.IService; -using Microsoft.AspNetCore.Mvc; -using ZR.Model.MES.qc; -using System.Collections.Generic; -using ZR.Model.MES.qc.DTO; -using NPOI.HSSF.UserModel; -using NPOI.XSSF.UserModel; +using Microsoft.AspNetCore.Mvc; using NPOI.SS.UserModel; -using ZR.Model.MES.wms; -using SqlSugar; using NPOI.SS.Util; -using NPOI.HSSF.Util; +using NPOI.XSSF.UserModel; +using ZR.Model.MES.qc; +using ZR.Model.MES.qc.DTO; +using ZR.Service.mes.qc.IService; namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC { @@ -112,11 +104,11 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC style.Alignment = HorizontalAlignment.Center; style.VerticalAlignment = VerticalAlignment.Center; // 标题列表 - string[] titleDict = { "工单号", "零件号", "颜色", "描述", "生产投入数", "班次", "合格数", "合格率", "抛光总数", "打磨总数", "报废总数", "开始时间", "结束时间"}; - string[] titleGroupDict = {"油漆", "设备", "毛坯", "程序", "班组操作" }; + string[] titleDict = { "工单号", "零件号", "颜色", "描述", "生产投入数", "班次", "合格数", "合格率", "抛光总数", "打磨总数", "报废总数", "开始时间", "结束时间" }; + string[] titleGroupDict = { "油漆", "设备", "毛坯", "程序", "班组操作" }; int[] titleGroupIndex = { 14, 20, 27, 33, 38 }; - string[] titleDetailDict = { - "备注", + string[] titleDetailDict = { + "备注", "缩孔", "针孔", "失光","色差","点子","其他", "水斑", "脏点", "变形","油珠","脱落","撞伤","其他", "毛刺", "缩印", "擦伤","砂印","脏点","打磨", @@ -132,7 +124,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC var titleCell1 = groupTitle.CreateCell(0); titleCell1.SetCellValue("工单信息"); titleCell1.CellStyle = style; - for (int i = 0; i < titleGroupDict.Length;i++) + for (int i = 0; i < titleGroupDict.Length; i++) { var cell = groupTitle.CreateCell(titleGroupIndex[i]); cell.SetCellValue(titleGroupDict[i]); @@ -142,7 +134,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC titleDict = titleDict.Concat(titleDetailDict).ToArray(); // 合并标题列 - CellRangeAddress titleRange1 = new(0, 0, 0, titleGroupIndex[0]-1); + CellRangeAddress titleRange1 = new(0, 0, 0, titleGroupIndex[0] - 1); sheet.AddMergedRegion(titleRange1); CellRangeAddress titleRange2 = new(0, 0, titleGroupIndex[0], titleGroupIndex[1] - 1); sheet.AddMergedRegion(titleRange2); @@ -165,9 +157,10 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC string _lastWorkOrderId = ""; // 数据开始行 int rowIndex = startTitle + 1; - for (int i = 0;i< excelDataList.Count;i++) { + for (int i = 0; i < excelDataList.Count; i++) + { var item = excelDataList[i]; - if (!isShowDetail &&_lastWorkOrderId == item.WorkorderId) + if (!isShowDetail && _lastWorkOrderId == item.WorkorderId) { continue; } @@ -215,7 +208,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC var cell13 = row.CreateCell(12); cell13.SetCellValue(item.EndTime.ToString()); cell13.CellStyle = style; - if(isShowDetail) + if (isShowDetail) { // 备注 var cell14 = row.CreateCell(13); @@ -223,7 +216,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC cell14.CellStyle = style; // 油漆 var cell15 = row.CreateCell(14); - cell15.SetCellValue(item.PaintSuokong.ToString() == "0"? "": item.PaintSuokong.ToString()); + cell15.SetCellValue(item.PaintSuokong.ToString() == "0" ? "" : item.PaintSuokong.ToString()); cell15.CellStyle = style; var cell16 = row.CreateCell(15); cell16.SetCellValue(item.PaintZhengkong.ToString() == "0" ? "" : item.PaintZhengkong.ToString()); @@ -341,12 +334,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC } } } - + } _lastWorkOrderId = item.WorkorderId; rowIndex++; } - + // 导出 diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/QcRoughController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/QcRoughController.cs index 4f891906..3ba7bd8a 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/QcRoughController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/QcRoughController.cs @@ -1,17 +1,6 @@ -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 Microsoft.AspNetCore.Mvc; using ZR.Model.MES.qc.DTO; -using ZR.Service.mes.pro; -using ZR.Service.mes.pro.IService; using ZR.Service.mes.qu.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.qu { @@ -47,12 +36,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.qu /// [HttpGet("updateStatisticsTable")] - public IActionResult UpdateStatisticsTable(string id, int actualNumber, int randomRate, int ngs, int oks, decimal oksRatio,int Isqualified) + public IActionResult UpdateStatisticsTable(string id, int actualNumber, int randomRate, int ngs, int oks, decimal oksRatio, int Isqualified) { - if (string.IsNullOrEmpty(id)) + if (string.IsNullOrEmpty(id)) return ToResponse(new ApiResult(200, "success", 0)); - int result = quRoughService.UpdateStatisticsTable(id, actualNumber, randomRate, ngs, oks, oksRatio,Isqualified); + int result = quRoughService.UpdateStatisticsTable(id, actualNumber, randomRate, ngs, oks, oksRatio, Isqualified); return ToResponse(new ApiResult(200, "success", result)); } } diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/QcinspectionItemController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/QcinspectionItemController.cs index 8cbb5020..c7dd055e 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/QcinspectionItemController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/QcinspectionItemController.cs @@ -1,14 +1,6 @@ -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 Microsoft.AspNetCore.Mvc; using ZR.Model.MES.qu; using ZR.Service.mes.qc.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.qc { @@ -32,8 +24,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc /// /// [HttpGet("getinspectionItemList")] - public IActionResult GetinspectionItemList(string inspectionModule="",string inspectionType="") - { + public IActionResult GetinspectionItemList(string inspectionModule = "", string inspectionType = "") + { List data = qcinspection.GetinspectionItemList(inspectionModule, inspectionType); return ToResponse(new ApiResult(200, "success", data)); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WMExitwarehouseController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WMExitwarehouseController.cs index 7a0520d6..779e1dff 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WMExitwarehouseController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WMExitwarehouseController.cs @@ -1,16 +1,5 @@ -using Infrastructure.Extensions; -using JinianNet.JNTemplate; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.IdentityModel.Tokens; -using ZR.Admin.WebApi.Extensions; -using ZR.Model.Dto; -using ZR.Model.MES.qu; -using ZR.Model.MES.wms; -using ZR.Model.MES.wms.Dto; -using ZR.Service.mes.wms; +using Microsoft.AspNetCore.Mvc; using ZR.Service.mes.wms.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.wms { @@ -23,7 +12,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms public class WMExitwarehouseController : BaseController { private readonly IWMExitwarehouseService Exitwarehouse; - public WMExitwarehouseController(IWMExitwarehouseService Exitwarehouse) { + public WMExitwarehouseController(IWMExitwarehouseService Exitwarehouse) + { this.Exitwarehouse = Exitwarehouse; } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WMentryWarehousing_productController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WMentryWarehousing_productController.cs index 8a130d11..4c202de7 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WMentryWarehousing_productController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WMentryWarehousing_productController.cs @@ -173,7 +173,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms } return ToResponse(new ApiResult(200, "success", data)); } - catch(Exception ex) + catch (Exception ex) { return ToResponse(new ApiResult(500, ex.Message, "外标签解析异常")); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WMlocationInfoController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WMlocationInfoController.cs index 40d413cc..42740198 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WMlocationInfoController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WMlocationInfoController.cs @@ -1,11 +1,6 @@ -using Infrastructure.Extensions; -using JinianNet.JNTemplate; -using Microsoft.AspNetCore.Mvc; -using Microsoft.IdentityModel.Tokens; -using ZR.Model.MES.qu; +using Microsoft.AspNetCore.Mvc; using ZR.Model.MES.wms; using ZR.Service.mes.wms.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers.mes.wms { @@ -29,9 +24,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms /// /// [HttpGet("production_warehouse_info")] - public IActionResult Queryproduction_warehouse_info(string shelf , int? layer , int pageNum = 0, int pageSize = 0) + public IActionResult Queryproduction_warehouse_info(string shelf, int? layer, int pageNum = 0, int pageSize = 0) { - (List, int) data = wm_locationInfoService.Getwminfo_product(shelf, layer??0, pageNum, pageSize); + (List, int) data = wm_locationInfoService.Getwminfo_product(shelf, layer ?? 0, pageNum, pageSize); return ToResponse(new ApiResult(200, "success", data)); } @@ -42,12 +37,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms public IActionResult Querylocationinfo(int warehouse_num, string locationcode = "") { - WmInfo wmInfo= wm_locationInfoService.Getlocationinfo(warehouse_num, locationcode); + WmInfo wmInfo = wm_locationInfoService.Getlocationinfo(warehouse_num, locationcode); return ToResponse(new ApiResult(200, "success", wmInfo)); } } - + } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmAGVController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmAGVController.cs index a72e418f..43e0a23d 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmAGVController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmAGVController.cs @@ -1,14 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using System.ComponentModel; -using ZR.Admin.WebApi.Extensions; -using ZR.Admin.WebApi.Filters; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; -using ZR.Service.Business; -using ZR.Service.Business.IBusinessService; -using ZR.Service.mes.wms; using ZR.Service.mes.wms.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Admin.WebApi.Controllers @@ -36,7 +29,7 @@ namespace ZR.Admin.WebApi.Controllers [HttpGet("get_workorder_list")] public IActionResult QueryWmAGV_list([FromQuery] QueryAGVparam parm) { - if(parm == null) + if (parm == null) { return SUCCESS(null); } @@ -50,14 +43,14 @@ namespace ZR.Admin.WebApi.Controllers /// /// [HttpGet("GetTask")] - public IActionResult QueryAGVTask(string workorder_id) + public IActionResult QueryAGVTask(string workorder_id) { - if(string.IsNullOrEmpty(workorder_id)) + if (string.IsNullOrEmpty(workorder_id)) { return SUCCESS(null); } - var response= _WmAGVService.QueryAGVTask(workorder_id); + var response = _WmAGVService.QueryAGVTask(workorder_id); return SUCCESS(response); } @@ -68,20 +61,21 @@ namespace ZR.Admin.WebApi.Controllers /// /// [HttpPost("add_task")] - public IActionResult AddAGVTask([FromBody] AgvTask task) + public IActionResult AddAGVTask([FromBody] AgvTask task) { string msg = null; - if(task == null) + if (task == null) { return SUCCESS(null); } - // task.ToCreate(); - int result= _WmAGVService.AddAGVTask(task); - if(result == 0) + // task.ToCreate(); + int result = _WmAGVService.AddAGVTask(task); + if (result == 0) { msg = "插入失败"; - }else if(result == 1) + } + else if (result == 1) { msg = "新增成功"; } @@ -98,10 +92,10 @@ namespace ZR.Admin.WebApi.Controllers /// /// [HttpGet("deleteTask")] - public IActionResult DeleteTask(string taskId) + public IActionResult DeleteTask(string taskId) { - if(string.IsNullOrEmpty(taskId)) + if (string.IsNullOrEmpty(taskId)) { return SUCCESS(null); } @@ -116,13 +110,13 @@ namespace ZR.Admin.WebApi.Controllers /// /// [HttpGet("get_agv_position")] - public IActionResult GetAGV_position_list(AgvLocation location) + public IActionResult GetAGV_position_list(AgvLocation location) { - if(location == null) + if (location == null) { return SUCCESS(null); } - var response= _WmAGVService.GetAGV_position_list(location); + var response = _WmAGVService.GetAGV_position_list(location); return SUCCESS(response); } @@ -135,26 +129,26 @@ namespace ZR.Admin.WebApi.Controllers /// [HttpGet("generate_agv_task")] [Log(Title = "AGV调度")] - public IActionResult GenerateAgvTask(string taskid,int flag) + public IActionResult GenerateAgvTask(string taskid, int flag) { string msg = "任务调度成功"; - if(string.IsNullOrEmpty(taskid)) - { - + if (string.IsNullOrEmpty(taskid)) + { + return SUCCESS(null); } - string status = _WmAGVService.GenerateAgvTask(taskid,flag); + string status = _WmAGVService.GenerateAgvTask(taskid, flag); return ToResponse(new ApiResult(200, msg, status)); } // cancelTask [HttpGet("cancel_agv_task")] - public IActionResult CancelAGVTask(string taskId, int flag) + public IActionResult CancelAGVTask(string taskId, int flag) { string msg = "取消任务成功"; - if(string.IsNullOrEmpty(taskId)) + if (string.IsNullOrEmpty(taskId)) { return SUCCESS(null); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankInventoryController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankInventoryController.cs index a2ec44c1..b0e426f4 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankInventoryController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankInventoryController.cs @@ -1,11 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms.Dto; using ZR.Model.MES.wms; +using ZR.Model.MES.wms.Dto; +using ZR.Service.mes.wms.IService; //创建时间:2024-05-13 namespace ZR.Admin.WebApi.Controllers @@ -51,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmBlankInventory(string Id) { var response = _WmBlankInventoryService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } @@ -77,7 +75,7 @@ namespace ZR.Admin.WebApi.Controllers { return ToResponse(new ApiResult(500, ex.Message, null)); } - + } /// @@ -130,7 +128,7 @@ namespace ZR.Admin.WebApi.Controllers return ToResponse(new ApiResult(200, "同步成功,已同步:" + successNum + "组毛坯记录!", "同步成功")); } - catch(Exception ex) + catch (Exception ex) { return ToResponse(new ApiResult(500, ex.Message, "同步失败")); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankRecordController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankRecordController.cs index cc5a8d01..f71bebb7 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankRecordController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmBlankRecordController.cs @@ -1,11 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms.Dto; using ZR.Model.MES.wms; +using ZR.Model.MES.wms.Dto; +using ZR.Service.mes.wms.IService; //创建时间:2024-05-13 namespace ZR.Admin.WebApi.Controllers @@ -51,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmBlankRecord(string Id) { var response = _WmBlankRecordService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } @@ -81,7 +79,7 @@ namespace ZR.Admin.WebApi.Controllers /// 备注 /// [HttpGet("add_inventory")] - public IActionResult AddInventory(string fkBlankInventoryId, string blankNum, int changeQuantity,string remark) + public IActionResult AddInventory(string fkBlankInventoryId, string blankNum, int changeQuantity, string remark) { try { @@ -93,14 +91,14 @@ namespace ZR.Admin.WebApi.Controllers { return ToResponse(new ApiResult(500, "毛坯号为空!", "毛坯号为空!")); } - var response = _WmBlankRecordService.AddInventory(fkBlankInventoryId, blankNum, changeQuantity, HttpContext.GetName(),remark); + var response = _WmBlankRecordService.AddInventory(fkBlankInventoryId, blankNum, changeQuantity, HttpContext.GetName(), remark); return SUCCESS(response); } catch (Exception ex) { return ToResponse(new ApiResult(500, ex.Message, "添加记录失败")); } - + } /// @@ -131,7 +129,7 @@ namespace ZR.Admin.WebApi.Controllers { return ToResponse(new ApiResult(500, ex.Message, "添加记录失败")); } - + } /// diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmCheckLogController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmCheckLogController.cs index 9162e463..fde3fb16 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmCheckLogController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmCheckLogController.cs @@ -50,7 +50,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmCheckLog(int Id) { var response = _WmCheckLogService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmCustomController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmCustomController.cs index 340450d9..e33b4d7b 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmCustomController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmCustomController.cs @@ -1,11 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; - using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms.Dto; using ZR.Model.MES.wms; +using ZR.Model.MES.wms.Dto; +using ZR.Service.mes.wms.IService; //创建时间:2024-03-17 namespace ZR.Admin.WebApi.Controllers.mes.wms @@ -51,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms public IActionResult GetWmCustom(int Id) { var response = _WmCustomService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs index 66f46002..120d579a 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs @@ -1,12 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; -using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms.Dto; using ZR.Model.MES.wms; -using Aliyun.OSS; +using ZR.Model.MES.wms.Dto; +using ZR.Service.mes.wms.IService; //创建时间:2024-04-17 namespace ZR.Admin.WebApi.Controllers @@ -35,9 +32,9 @@ namespace ZR.Admin.WebApi.Controllers [HttpGet("transform")] [AllowAnonymous] [Log(Title = "把包装数据转换为检验数据", BusinessType = BusinessType.INSERT)] - public IActionResult Transform(string workorder) + public IActionResult Transform(string workorder) { - if(string.IsNullOrEmpty(workorder) == null) + if (string.IsNullOrEmpty(workorder) == null) { return SUCCESS(workorder); } @@ -95,7 +92,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmFgentryInspect(int Id) { var response = _WmFgentryInspectService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } @@ -153,7 +150,7 @@ namespace ZR.Admin.WebApi.Controllers /// /// [HttpPost("batchQualified")] - public IActionResult BatchQualified([FromBody]string[] packcode_select) + public IActionResult BatchQualified([FromBody] string[] packcode_select) { if (packcode_select == null || packcode_select.Length <= 0) { diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsActionController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsActionController.cs index edbf7792..4afb8197 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsActionController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsActionController.cs @@ -1,11 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; -using ZR.Admin.WebApi.Extensions; -using ZR.Admin.WebApi.Filters; +using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms; //创建时间:2024-04-18 namespace ZR.Admin.WebApi.Controllers @@ -45,7 +41,8 @@ namespace ZR.Admin.WebApi.Controllers return ToResponse(new ApiResult(500, "拼箱异常!", "拼箱异常!")); } return SUCCESS(response); - }catch (Exception ex) + } + catch (Exception ex) { return ToResponse(new ApiResult(500, ex.Message, "拼箱异常!")); } @@ -72,7 +69,7 @@ namespace ZR.Admin.WebApi.Controllers { return ToResponse(new ApiResult(500, ex.Message, "拆箱异常!")); } - + } } } \ No newline at end of file diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsBatchSearchController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsBatchSearchController.cs index 22546d8c..20cea4b6 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsBatchSearchController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsBatchSearchController.cs @@ -1,12 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; -using ZR.Admin.WebApi.Extensions; -using ZR.Admin.WebApi.Filters; +using ZR.Model; using ZR.Model.MES.wms.Dto; using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms; -using ZR.Model; //创建时间:2024-04-26 namespace ZR.Admin.WebApi.Controllers diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsChangeLogController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsChangeLogController.cs index 7fc239f2..e3ef7404 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsChangeLogController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsChangeLogController.cs @@ -1,11 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; +using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms; //创建时间:2024-04-18 namespace ZR.Admin.WebApi.Controllers @@ -51,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmGoodsChangeLog(int Id) { var response = _WmGoodsChangeLogService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs index 99121a3c..97c28fed 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs @@ -1,5 +1,4 @@ using Microsoft.AspNetCore.Mvc; -using System.Reflection.Metadata; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; using ZR.Model.MES.wms; diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsOutProductionController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsOutProductionController.cs index cd8c3d37..59d7ad9f 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsOutProductionController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsOutProductionController.cs @@ -51,7 +51,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult GetWmGoodsOutProduction(string Id) { var response = _WmGoodsOutProductionService.GetInfo(Id); - + var info = response.Adapt(); return SUCCESS(info); } @@ -77,7 +77,7 @@ namespace ZR.Admin.WebApi.Controllers { return ToResponse(new ApiResult(500, ex.Message, "error")); } - + } /// @@ -121,7 +121,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult DoPatchOutProduction([FromBody] WmBatchGoodsOutProductionDto parm) { string response = _WmGoodsOutProductionService.DoPatchOutProduction(parm); - if(response == "ok") + if (response == "ok") { return ToResponse(new ApiResult(200, response, response)); } @@ -129,7 +129,7 @@ namespace ZR.Admin.WebApi.Controllers { return ToResponse(new ApiResult(500, response, response)); } - + } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmMaterialController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmMaterialController.cs index 59e71546..3080d0cf 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmMaterialController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmMaterialController.cs @@ -1,11 +1,7 @@ -using Microsoft.AspNetCore.Http.HttpResults; using Microsoft.AspNetCore.Mvc; -using Microsoft.IdentityModel.Tokens; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using SqlSugar; -using System.Collections.Generic; -using System.Linq.Expressions; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; using ZR.Model.MES.wms; @@ -178,7 +174,7 @@ namespace ZR.Admin.WebApi.Controllers { if (row.GetCell(0) != null && row.GetCell(0).ToString() != "") { - + WmMaterial material = new WmMaterial(); // SnowFlakeSingle.Instance.NextId().ToString(); material.Id = SnowFlakeSingle.Instance.NextId().ToString(); @@ -194,6 +190,7 @@ namespace ZR.Admin.WebApi.Controllers material.Remarks = row.GetCell(9)?.ToString(); material.Search1 = row.GetCell(10)?.ToString(); material.Search2 = row.GetCell(11)?.ToString(); + material.Type = int.Parse(row.GetCell(12).ToString()); material.Status = 1; material.Sort = i; material.CreatedBy = "Excel导入"; @@ -213,7 +210,7 @@ namespace ZR.Admin.WebApi.Controllers } catch (Exception ex) { - return ToResponse(new ApiResult(210, "文件异常"+ex.Message)); + return ToResponse(new ApiResult(210, "文件异常" + ex.Message)); } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmOutOrderController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmOutOrderController.cs index 9494e870..dfe1efc1 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmOutOrderController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmOutOrderController.cs @@ -69,7 +69,7 @@ namespace ZR.Admin.WebApi.Controllers var modal = parm.ToCreate(HttpContext); var response = _WmOutOrderService.AddWmOutOrder(modal); - if(response == null) + if (response == null) { return ToResponse(new ApiResult(500, "数据存在异常请检查", "数据存在异常请检查")); } @@ -178,14 +178,14 @@ namespace ZR.Admin.WebApi.Controllers /// /// [HttpGet("persistenceOutorderplan")] - public IActionResult PersistenceOutorderplan(string shipment_num) + public IActionResult PersistenceOutorderplan(string shipment_num) { if (shipment_num == null) { return SUCCESS(null); } - int result= _WmOutOrderService.PersistenceOutorderplan(shipment_num); - return SUCCESS(result); + int result = _WmOutOrderService.PersistenceOutorderplan(shipment_num); + return SUCCESS(result); } /// @@ -226,14 +226,14 @@ namespace ZR.Admin.WebApi.Controllers /// 物料号(零件号) /// [HttpGet("getOutOrderPlanAndOutProductionNum")] - public IActionResult GetOutOrderPlanAndOutProductionNum(string shipment_num,string partnumber) + public IActionResult GetOutOrderPlanAndOutProductionNum(string shipment_num, string partnumber) { if (shipment_num == null) { return ToResponse(new ApiResult(500, "传入工单号为空!", "传入工单号为空!")); } var result = _WmOutOrderService.GetOutOrderPlanAndOutProductionNum(shipment_num, partnumber); - if(result == null) + if (result == null) { return ToResponse(new ApiResult(500, "获取计划异常!", "获取计划异常!")); } @@ -286,21 +286,22 @@ namespace ZR.Admin.WebApi.Controllers /// 出库单号 /// [HttpGet("checkProductionOut")] - public IActionResult CheckProductionOut( string partnumber,string production_packcode = "", string shipment_num = "") + public IActionResult CheckProductionOut(string partnumber, string production_packcode = "", string shipment_num = "") { - if(string.IsNullOrEmpty(partnumber)) { - return ToResponse(new ApiResult(200, "请选择物料号", false)); + if (string.IsNullOrEmpty(partnumber)) + { + return ToResponse(new ApiResult(200, "请选择物料号", false)); } string msg = ""; msg = _WmOutOrderService.CheckProductionOut(partnumber, production_packcode, shipment_num); - if(msg !="ok") + if (msg != "ok") { return ToResponse(new ApiResult(200, msg, false)); } else { return ToResponse(new ApiResult(200, msg, true)); - } + } } } diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmPackageLclController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmPackageLclController.cs index 5c186abf..0752d595 100644 --- a/ZR.Admin.WebApi/Controllers/mes/wms/WmPackageLclController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmPackageLclController.cs @@ -1,11 +1,9 @@ using Microsoft.AspNetCore.Mvc; -using ZR.Model.Dto; -using ZR.Service.Business.IBusinessService; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; +using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms; //创建时间:2024-04-18 namespace ZR.Admin.WebApi.Controllers diff --git a/ZR.Admin.WebApi/Extensions/AppServiceExtensions.cs b/ZR.Admin.WebApi/Extensions/AppServiceExtensions.cs index 466f3723..9ee35c3e 100644 --- a/ZR.Admin.WebApi/Extensions/AppServiceExtensions.cs +++ b/ZR.Admin.WebApi/Extensions/AppServiceExtensions.cs @@ -1,6 +1,4 @@ -using Infrastructure; -using Infrastructure.Attribute; -using System.Reflection; +using System.Reflection; namespace ZR.Admin.WebApi.Extensions { diff --git a/ZR.Admin.WebApi/Extensions/DataPermi.cs b/ZR.Admin.WebApi/Extensions/DataPermi.cs index a313987d..efbcdf5e 100644 --- a/ZR.Admin.WebApi/Extensions/DataPermi.cs +++ b/ZR.Admin.WebApi/Extensions/DataPermi.cs @@ -1,6 +1,5 @@ -using Infrastructure; +using SqlSugar; using SqlSugar.IOC; -using SqlSugar; using ZR.Admin.WebApi.Framework; using ZR.Model.System; diff --git a/ZR.Admin.WebApi/Extensions/DbExtension.cs b/ZR.Admin.WebApi/Extensions/DbExtension.cs index 4aacff9c..f40c84d1 100644 --- a/ZR.Admin.WebApi/Extensions/DbExtension.cs +++ b/ZR.Admin.WebApi/Extensions/DbExtension.cs @@ -1,4 +1,3 @@ -using Infrastructure; using Infrastructure.Extensions; using SqlSugar; using SqlSugar.IOC; diff --git a/ZR.Admin.WebApi/Extensions/HttpContextExtension.cs b/ZR.Admin.WebApi/Extensions/HttpContextExtension.cs index 542065ce..83df4d79 100644 --- a/ZR.Admin.WebApi/Extensions/HttpContextExtension.cs +++ b/ZR.Admin.WebApi/Extensions/HttpContextExtension.cs @@ -1,5 +1,4 @@ -using Infrastructure; -using Infrastructure.Extensions; +using Infrastructure.Extensions; using System.Security.Claims; using System.Text; using System.Text.RegularExpressions; @@ -202,7 +201,7 @@ namespace ZR.Admin.WebApi.Extensions public static void GetRequestValue(this HttpContext context, SysOperLog operLog) { string reqMethod = operLog.RequestMethod; - string param= string.Empty; + string param = string.Empty; if (HttpMethods.IsPost(reqMethod) || HttpMethods.IsPut(reqMethod) || HttpMethods.IsDelete(reqMethod)) { diff --git a/ZR.Admin.WebApi/Extensions/InitTable.cs b/ZR.Admin.WebApi/Extensions/InitTable.cs index 2a6ad3ce..e2e1c12f 100644 --- a/ZR.Admin.WebApi/Extensions/InitTable.cs +++ b/ZR.Admin.WebApi/Extensions/InitTable.cs @@ -68,7 +68,7 @@ namespace ZR.Admin.WebApi.Extensions db.CodeFirst.InitTables(typeof(OpStatistics)); db.CodeFirst.InitTables(typeof(ProWorkorder)); db.CodeFirst.InitTables(typeof(ProWorkplan)); - + diff --git a/ZR.Admin.WebApi/Extensions/LogoExtension.cs b/ZR.Admin.WebApi/Extensions/LogoExtension.cs index e9dc7421..4a99123c 100644 --- a/ZR.Admin.WebApi/Extensions/LogoExtension.cs +++ b/ZR.Admin.WebApi/Extensions/LogoExtension.cs @@ -1,6 +1,5 @@ using JinianNet.JNTemplate; using System.Net.NetworkInformation; -using ZR.Common; namespace ZR.Admin.WebApi.Extensions { @@ -11,7 +10,7 @@ namespace ZR.Admin.WebApi.Extensions Console.ForegroundColor = ConsoleColor.Blue; var contentTpl = JnHelper.ReadTemplate("", "logo.txt"); var content = contentTpl?.Render(); - + Console.WriteLine(content); Console.ForegroundColor = ConsoleColor.Blue; @@ -32,7 +31,7 @@ namespace ZR.Admin.WebApi.Extensions // 输出IPv4地址 if (ipAddress.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { - Console.WriteLine("本机ip: "+ipAddress.Address.ToString()); + Console.WriteLine("本机ip: " + ipAddress.Address.ToString()); } } } diff --git a/ZR.Admin.WebApi/Extensions/SqlSugarCache.cs b/ZR.Admin.WebApi/Extensions/SqlSugarCache.cs index 3e6ccdae..52d6fd79 100644 --- a/ZR.Admin.WebApi/Extensions/SqlSugarCache.cs +++ b/ZR.Admin.WebApi/Extensions/SqlSugarCache.cs @@ -1,6 +1,4 @@ -using ZR.Common; - -namespace ZR.Admin.WebApi.Extensions +namespace ZR.Admin.WebApi.Extensions { public class SqlSugarCache : SqlSugar.ICacheService { diff --git a/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs b/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs index c083f40e..107ce424 100644 --- a/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs +++ b/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs @@ -1,5 +1,4 @@ -using Infrastructure; -using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.Filters; using System.Reflection; diff --git a/ZR.Admin.WebApi/Filters/ActionPermissionFilter.cs b/ZR.Admin.WebApi/Filters/ActionPermissionFilter.cs index b37d2664..9ee7ee16 100644 --- a/ZR.Admin.WebApi/Filters/ActionPermissionFilter.cs +++ b/ZR.Admin.WebApi/Filters/ActionPermissionFilter.cs @@ -1,6 +1,4 @@ -using Infrastructure; -using Infrastructure.Model; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using ZR.Model.System.Dto; diff --git a/ZR.Admin.WebApi/Filters/GlobalActionMonitor.cs b/ZR.Admin.WebApi/Filters/GlobalActionMonitor.cs index b5740f70..b279bcf2 100644 --- a/ZR.Admin.WebApi/Filters/GlobalActionMonitor.cs +++ b/ZR.Admin.WebApi/Filters/GlobalActionMonitor.cs @@ -1,7 +1,4 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Model; -using IPTools.Core; +using IPTools.Core; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; @@ -42,7 +39,7 @@ namespace ZR.Admin.WebApi.Filters */ var values = context.ModelState.Values; - // return next(); + // return next(); foreach (var item in values) { @@ -131,7 +128,7 @@ namespace ZR.Admin.WebApi.Filters } LogEventInfo ei = new(NLog.LogLevel.Info, "GlobalActionMonitor", ""); - + ei.Properties["jsonResult"] = !HttpMethods.IsGet(method) ? jsonResult : ""; ei.Properties["requestParam"] = sysOperLog.OperParam; ei.Properties["user"] = userName; diff --git a/ZR.Admin.WebApi/Filters/VerifyAttribute.cs b/ZR.Admin.WebApi/Filters/VerifyAttribute.cs index feef4e1c..f58f84aa 100644 --- a/ZR.Admin.WebApi/Filters/VerifyAttribute.cs +++ b/ZR.Admin.WebApi/Filters/VerifyAttribute.cs @@ -1,12 +1,7 @@ -using Infrastructure; -using Infrastructure.Model; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using NLog; -using System; -using System.Linq; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Framework; using ZR.Model.System.Dto; diff --git a/ZR.Admin.WebApi/Framework/JwtUtil.cs b/ZR.Admin.WebApi/Framework/JwtUtil.cs index 4479bd50..584a93ec 100644 --- a/ZR.Admin.WebApi/Framework/JwtUtil.cs +++ b/ZR.Admin.WebApi/Framework/JwtUtil.cs @@ -1,5 +1,4 @@ -using Infrastructure; -using Infrastructure.Extensions; +using Infrastructure.Extensions; using Microsoft.IdentityModel.Tokens; using Newtonsoft.Json; using System.IdentityModel.Tokens.Jwt; @@ -133,7 +132,7 @@ namespace ZR.Admin.WebApi.Framework loginUser = JsonConvert.DeserializeObject(userData); //todo 从缓存拿到权限,如果拿不到权限说明非法用户 var permissions = CacheService.GetUserPerms(GlobalConstant.UserPermKEY + loginUser?.UserId); - + if (loginUser?.UserName == GlobalConstant.AdminRole) { permissions = new List() { GlobalConstant.AdminPerm }; diff --git a/ZR.Admin.WebApi/GlobalUsing.cs b/ZR.Admin.WebApi/GlobalUsing.cs index 4d4888ff..f455cbac 100644 --- a/ZR.Admin.WebApi/GlobalUsing.cs +++ b/ZR.Admin.WebApi/GlobalUsing.cs @@ -1,7 +1,7 @@ -global using ZR.Common; -global using Microsoft.AspNetCore.Authorization; -global using Infrastructure; +global using Infrastructure; global using Infrastructure.Attribute; global using Infrastructure.Enums; global using Infrastructure.Model; -global using Mapster; \ No newline at end of file +global using Mapster; +global using Microsoft.AspNetCore.Authorization; +global using ZR.Common; diff --git a/ZR.Admin.WebApi/Hubs/MessageHub.cs b/ZR.Admin.WebApi/Hubs/MessageHub.cs index e5725ec8..975e34b4 100644 --- a/ZR.Admin.WebApi/Hubs/MessageHub.cs +++ b/ZR.Admin.WebApi/Hubs/MessageHub.cs @@ -1,13 +1,8 @@ -using Infrastructure; -using Infrastructure.Constant; -using Infrastructure.Model; +using Infrastructure.Constant; using IPTools.Core; using Microsoft.AspNetCore.SignalR; -using System.ComponentModel; -using System.Diagnostics.Metrics; using UAParser; using ZR.Admin.WebApi.Extensions; -using ZR.Service.mes.qc; using ZR.Service.mes.qc.IService; using ZR.Service.System.IService; @@ -118,22 +113,22 @@ namespace ZR.Admin.WebApi.Hubs public async Task SaveCacheInformation_v1(string workorderid, string Moudle, string checkid) { //缓存key - string checkid_Key =checkid + "_" + workorderid + "_v1"; + string checkid_Key = checkid + "_" + workorderid + "_v1"; if (CacheHelper.Exists(checkid_Key)) { int sum = Convert.ToInt32(CacheHelper.GetCache(checkid_Key)) + 1; logger.Info($"当前保存工单号{workorderid},检测项{checkid_Key},累加的数为{sum}"); CacheHelper.SetCache(checkid_Key, sum); - - await firstFQCService.SaveinspectItem_v1(workorderid,Moudle, checkid_Key, sum); + + await firstFQCService.SaveinspectItem_v1(workorderid, Moudle, checkid_Key, sum); await Clients.All.SendAsync("GetCache_v1", Moudle, checkid_Key, sum); } else { CacheHelper.SetCache(checkid_Key, 1); logger.Info($"当前保存工单号{workorderid},检测项{checkid_Key},累加的数为1"); - await firstFQCService.SaveinspectItem_v1(workorderid, Moudle, checkid_Key, 1); + await firstFQCService.SaveinspectItem_v1(workorderid, Moudle, checkid_Key, 1); await Clients.All.SendAsync("GetCache_v1", Moudle, checkid_Key, 1); } } diff --git a/ZR.Admin.WebApi/Hubs/OnlineUsers.cs b/ZR.Admin.WebApi/Hubs/OnlineUsers.cs index cdfce13b..81febb63 100644 --- a/ZR.Admin.WebApi/Hubs/OnlineUsers.cs +++ b/ZR.Admin.WebApi/Hubs/OnlineUsers.cs @@ -21,7 +21,7 @@ /// /// 判断用户唯一 /// - public string? Uuid{ get; set; } + public string? Uuid { get; set; } /// /// 浏览器 /// diff --git a/ZR.Admin.WebApi/Middleware/GlobalExceptionMiddleware.cs b/ZR.Admin.WebApi/Middleware/GlobalExceptionMiddleware.cs index 3ee7baaa..a25ad5d1 100644 --- a/ZR.Admin.WebApi/Middleware/GlobalExceptionMiddleware.cs +++ b/ZR.Admin.WebApi/Middleware/GlobalExceptionMiddleware.cs @@ -1,14 +1,9 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Model; -using IPTools.Core; +using IPTools.Core; using Microsoft.AspNetCore.Http.Features; using NLog; -using System.Diagnostics; using System.Text.Encodings.Web; using System.Text.Json; using ZR.Admin.WebApi.Extensions; -using ZR.Common; using ZR.Model.System; using ZR.Service.System.IService; @@ -118,13 +113,13 @@ namespace ZR.Admin.WebApi.Middleware Logger.Log(ei); context.Response.ContentType = "text/json;charset=utf-8"; await context.Response.WriteAsync(responseResult, System.Text.Encoding.UTF8); - + string errorMsg = $"> 操作人:{sysOperLog.OperName}" + $"\n> 操作地区:{sysOperLog.OperIp}({sysOperLog.OperLocation})" + $"\n> 操作模块:{sysOperLog.Title}" + $"\n> 操作地址:{sysOperLog.OperUrl}" + $"\n> 错误信息:{msg}\n\n> {error}"; - + WxNoticeHelper.SendMsg("系统出错", errorMsg, "", WxNoticeHelper.MsgType.markdown); SysOperLogService.InsertOperlog(sysOperLog); } diff --git a/ZR.Admin.WebApi/Program.cs b/ZR.Admin.WebApi/Program.cs index ddc59da6..5836a6b1 100644 --- a/ZR.Admin.WebApi/Program.cs +++ b/ZR.Admin.WebApi/Program.cs @@ -1,5 +1,4 @@ using AspNetCoreRateLimit; -using Infrastructure; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Mvc; diff --git a/ZR.CodeGenerator/CodeGenerateTemplate.cs b/ZR.CodeGenerator/CodeGenerateTemplate.cs index a0cc9788..55b4a56a 100644 --- a/ZR.CodeGenerator/CodeGenerateTemplate.cs +++ b/ZR.CodeGenerator/CodeGenerateTemplate.cs @@ -1,9 +1,4 @@ -using System; -using System.Linq; -using System.Text; -using ZR.Model.System.Generate; - -namespace ZR.CodeGenerator +namespace ZR.CodeGenerator { /// /// 代码生成模板 @@ -15,33 +10,33 @@ namespace ZR.CodeGenerator { if (queryType.Equals("EQ")) { - return $"it => it.{ propertyName} == parm.{propertyName})"; + return $"it => it.{propertyName} == parm.{propertyName})"; } if (queryType.Equals("GTE")) { - return $"it => it.{ propertyName} >= parm.{propertyName})"; + return $"it => it.{propertyName} >= parm.{propertyName})"; } if (queryType.Equals("GT")) { - return $"it => it.{ propertyName} > parm.{propertyName})"; + return $"it => it.{propertyName} > parm.{propertyName})"; } if (queryType.Equals("LT")) { - return $"it => it.{ propertyName} < parm.{propertyName})"; + return $"it => it.{propertyName} < parm.{propertyName})"; } if (queryType.Equals("LTE")) { - return $"it => it.{ propertyName} <= parm.{propertyName})"; + return $"it => it.{propertyName} <= parm.{propertyName})"; } if (queryType.Equals("NE")) { - return $"it => it.{ propertyName} != parm.{propertyName})"; + return $"it => it.{propertyName} != parm.{propertyName})"; } if (queryType.Equals("LIKE")) { - return $"it => it.{ propertyName}.Contains(parm.{propertyName}))"; + return $"it => it.{propertyName}.Contains(parm.{propertyName}))"; } - return $"it => it.{ propertyName} == parm.{propertyName})"; + return $"it => it.{propertyName} == parm.{propertyName})"; } } diff --git a/ZR.CodeGenerator/Model/ReplaceDto.cs b/ZR.CodeGenerator/Model/ReplaceDto.cs index 3719e491..bee24823 100644 --- a/ZR.CodeGenerator/Model/ReplaceDto.cs +++ b/ZR.CodeGenerator/Model/ReplaceDto.cs @@ -11,7 +11,7 @@ namespace ZR.CodeGenerator.Model /// /// 首字母小写主键 /// - public string FistLowerPk{ get; set; } + public string FistLowerPk { get; set; } /// /// 主键类型 /// diff --git a/ZR.Common/AliyunOssHelper.cs b/ZR.Common/AliyunOssHelper.cs index b45c87a2..8ca8ee1e 100644 --- a/ZR.Common/AliyunOssHelper.cs +++ b/ZR.Common/AliyunOssHelper.cs @@ -7,12 +7,12 @@ using System.IO; namespace ZR.Common { public class AliyunOssHelper - { + { static string accessKeyId = AppSettings.GetConfig("ALIYUN_OSS:KEY"); static string accessKeySecret = AppSettings.GetConfig("ALIYUN_OSS:SECRET"); static string endpoint = AppSettings.GetConfig("ALIYUN_OSS:REGIONID"); static string bucketName1 = AppSettings.GetConfig("ALIYUN_OSS:bucketName"); - + /// /// 上传到阿里云 /// diff --git a/ZR.Common/Cache/CacheHelper.cs b/ZR.Common/Cache/CacheHelper.cs index 5fa7d328..e6e5753d 100644 --- a/ZR.Common/Cache/CacheHelper.cs +++ b/ZR.Common/Cache/CacheHelper.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Caching.Memory; using System; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Reflection; namespace ZR.Common diff --git a/ZR.Common/ExcelHelper.cs b/ZR.Common/ExcelHelper.cs index 309b7257..157fef82 100644 --- a/ZR.Common/ExcelHelper.cs +++ b/ZR.Common/ExcelHelper.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.IO; using System.Linq; using System.Reflection; diff --git a/ZR.Common/MailHelper.cs b/ZR.Common/MailHelper.cs index 79b8b3d3..ad554e9a 100644 --- a/ZR.Common/MailHelper.cs +++ b/ZR.Common/MailHelper.cs @@ -19,7 +19,7 @@ namespace ZR.Common public MailHelper() { AppSettings.Bind("MailOptions", mailOptions); - FromEmail= mailOptions.FromEmail; + FromEmail = mailOptions.FromEmail; } public MailHelper(MailOptions _mailOptions) { diff --git a/ZR.Common/Tools.cs b/ZR.Common/Tools.cs index 05b40a0e..980aba75 100644 --- a/ZR.Common/Tools.cs +++ b/ZR.Common/Tools.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Text.RegularExpressions; namespace ZR.Common @@ -30,7 +28,7 @@ namespace ZR.Common return infoIdss; } - + /// /// 根据日期获取星期几 diff --git a/ZR.Common/WxHelper.cs b/ZR.Common/WxHelper.cs index 5063c8e2..6ddacd85 100644 --- a/ZR.Common/WxHelper.cs +++ b/ZR.Common/WxHelper.cs @@ -110,7 +110,7 @@ namespace ZR.Common Array.Sort(arr); //使用URL键值对的格式拼接成字符串 var temp = string.Join("&", arr); - + var sha1Arr = SHA1.HashData(Encoding.UTF8.GetBytes(temp)); return BitConverter.ToString(sha1Arr).Replace("-", "").ToLower(); diff --git a/ZR.Model/GlobalUsing.cs b/ZR.Model/GlobalUsing.cs index 98457054..032add13 100644 --- a/ZR.Model/GlobalUsing.cs +++ b/ZR.Model/GlobalUsing.cs @@ -1,4 +1,4 @@ -global using System.Collections.Generic; -global using System; +global using Newtonsoft.Json; global using SqlSugar; -global using Newtonsoft.Json; \ No newline at end of file +global using System; +global using System.Collections.Generic; diff --git a/ZR.Model/MES/mm/AGVstatus.cs b/ZR.Model/MES/mm/AGVstatus.cs index a098ef6a..93eacaeb 100644 --- a/ZR.Model/MES/mm/AGVstatus.cs +++ b/ZR.Model/MES/mm/AGVstatus.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.mm +namespace ZR.Model.MES.mm { public enum AGVstatus { diff --git a/ZR.Model/MES/mm/Dto/IngredientTaskDto.cs b/ZR.Model/MES/mm/Dto/IngredientTaskDto.cs index 90f71add..c0d56e3b 100644 --- a/ZR.Model/MES/mm/Dto/IngredientTaskDto.cs +++ b/ZR.Model/MES/mm/Dto/IngredientTaskDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.mm.Dto +namespace ZR.Model.MES.mm.Dto { public class IngredientTaskDto { @@ -18,12 +12,12 @@ namespace ZR.Model.MES.mm.Dto { public string workorder { set; get; } - public string blanknumber { set; get; } - + public string blanknumber { set; get; } + public int previousNumber { set; get; } public int previousNumbered { set; get; } } - public class IngredientTaskQueryDto : PagerInfo + public class IngredientTaskQueryDto : PagerInfo { public DateTime datetimespan { set; get; } } diff --git a/ZR.Model/MES/mm/Dto/MmAgvLocationDto.cs b/ZR.Model/MES/mm/Dto/MmAgvLocationDto.cs index b79e89df..028b46c6 100644 --- a/ZR.Model/MES/mm/Dto/MmAgvLocationDto.cs +++ b/ZR.Model/MES/mm/Dto/MmAgvLocationDto.cs @@ -5,7 +5,7 @@ namespace ZR.Model.Dto /// /// agv位置表查询对象 /// - public class MmAgvLocationQueryDto : PagerInfo + public class MmAgvLocationQueryDto : PagerInfo { public int areaCode { get; set; } diff --git a/ZR.Model/MES/mm/Dto/WorkorderqueryDto.cs b/ZR.Model/MES/mm/Dto/WorkorderqueryDto.cs index e90bf0ba..9daa7d45 100644 --- a/ZR.Model/MES/mm/Dto/WorkorderqueryDto.cs +++ b/ZR.Model/MES/mm/Dto/WorkorderqueryDto.cs @@ -1,17 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.mm.Dto +namespace ZR.Model.MES.mm.Dto { public class WorkorderqueryDto { - public DateTime datetimespan { set; get; } + public DateTime datetimespan { set; get; } - public int? pageNum { set; get; } - public int? pageSize { set; get; } + public int? pageNum { set; get; } + public int? pageSize { set; get; } } diff --git a/ZR.Model/MES/mm/MmAgvLocation.cs b/ZR.Model/MES/mm/MmAgvLocation.cs index e6e75d9b..2655a99d 100644 --- a/ZR.Model/MES/mm/MmAgvLocation.cs +++ b/ZR.Model/MES/mm/MmAgvLocation.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.mm +namespace ZR.Model.MES.mm { /// /// agv位置表 diff --git a/ZR.Model/MES/mm/MmFkWorkorderIngredient.cs b/ZR.Model/MES/mm/MmFkWorkorderIngredient.cs index fe0a9c69..7527cbbd 100644 --- a/ZR.Model/MES/mm/MmFkWorkorderIngredient.cs +++ b/ZR.Model/MES/mm/MmFkWorkorderIngredient.cs @@ -1,11 +1,4 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Service.mes.mm +namespace ZR.Service.mes.mm { /// /// @@ -29,7 +22,7 @@ namespace ZR.Service.mes.mm /// 毛坯号 /// [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "fk_blanknumber")] - public string FkBlanknumber { get; set; } + public string FkBlanknumber { get; set; } /// /// 是否完成配料 diff --git a/ZR.Model/MES/mm/MmIngredientTask.cs b/ZR.Model/MES/mm/MmIngredientTask.cs index cde4a646..aba7e417 100644 --- a/ZR.Model/MES/mm/MmIngredientTask.cs +++ b/ZR.Model/MES/mm/MmIngredientTask.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.mm +namespace ZR.Model.MES.mm { /// /// 配料任务清单 @@ -53,7 +47,7 @@ namespace ZR.Model.MES.mm - public int? Isfinal { get; set; } + public int? Isfinal { get; set; } /// /// 创建人 diff --git a/ZR.Model/MES/op/DTO/DetailsOfDetectionDTO.cs b/ZR.Model/MES/op/DTO/DetailsOfDetectionDTO.cs index 7f78e073..213aa816 100644 --- a/ZR.Model/MES/op/DTO/DetailsOfDetectionDTO.cs +++ b/ZR.Model/MES/op/DTO/DetailsOfDetectionDTO.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.op.DTO +namespace ZR.Model.MES.op.DTO { public class DetailsOfDetectionDTO { diff --git a/ZR.Model/MES/op/DTO/QcFqcDTO.cs b/ZR.Model/MES/op/DTO/QcFqcDTO.cs index f81bbd48..6f1b963a 100644 --- a/ZR.Model/MES/op/DTO/QcFqcDTO.cs +++ b/ZR.Model/MES/op/DTO/QcFqcDTO.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.op.DTO +namespace ZR.Model.MES.op.DTO { public class QcFqcDTO { diff --git a/ZR.Model/MES/op/OpWorkorderSchedule.cs b/ZR.Model/MES/op/OpWorkorderSchedule.cs index a15db61c..c3ea37dd 100644 --- a/ZR.Model/MES/op/OpWorkorderSchedule.cs +++ b/ZR.Model/MES/op/OpWorkorderSchedule.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.op +namespace ZR.Model.MES.op { /// /// 工单生产进度表 diff --git a/ZR.Model/MES/pro/DTO/GanttTaskDTO.cs b/ZR.Model/MES/pro/DTO/GanttTaskDTO.cs index d51762be..be583829 100644 --- a/ZR.Model/MES/pro/DTO/GanttTaskDTO.cs +++ b/ZR.Model/MES/pro/DTO/GanttTaskDTO.cs @@ -1,22 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.pro.DTO +namespace ZR.Model.MES.pro.DTO { public class GanttTaskDTO { - public List Data { get; set; } - public List Links { get; set; } + public List Data { get; set; } + public List Links { get; set; } } - public class GanttTask_data + public class GanttTask_data { // id - public string id { set; get; } + public string id { set; get; } /// /// 文字 /// @@ -49,11 +43,11 @@ namespace ZR.Model.MES.pro.DTO /// /// 计划开始时间 /// - public string planned_start { set; get; } + public string planned_start { set; get; } + + - - public bool? show { set; get; } @@ -63,11 +57,11 @@ namespace ZR.Model.MES.pro.DTO public string type { set; get; } } - public class GanttTask_link - { + public class GanttTask_link + { public int? id { set; get; } public int? source { set; get; } - public int? target { set; get; } + public int? target { set; get; } public int? type { set; get; } } diff --git a/ZR.Model/MES/pro/DTO/ProWorkOrder.cs b/ZR.Model/MES/pro/DTO/ProWorkOrder.cs index d08a33e7..39a5ffa8 100644 --- a/ZR.Model/MES/pro/DTO/ProWorkOrder.cs +++ b/ZR.Model/MES/pro/DTO/ProWorkOrder.cs @@ -1,11 +1,4 @@ -using MiniExcelLibs.Attributes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.pro.DTO +namespace ZR.Model.MES.pro.DTO { public class ProWorkOrder { diff --git a/ZR.Model/MES/pro/DTO/ProWorklplanDto.cs b/ZR.Model/MES/pro/DTO/ProWorklplanDto.cs index 72b74a0c..c174721a 100644 --- a/ZR.Model/MES/pro/DTO/ProWorklplanDto.cs +++ b/ZR.Model/MES/pro/DTO/ProWorklplanDto.cs @@ -1,11 +1,4 @@ -using MiniExcelLibs.Attributes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.pro.DTO +namespace ZR.Model.MES.pro.DTO { public class ProWorklplanDto { diff --git a/ZR.Model/MES/pro/DTO/ProWorkorderSortDTO.cs b/ZR.Model/MES/pro/DTO/ProWorkorderSortDTO.cs index d98ed121..c003bb9c 100644 --- a/ZR.Model/MES/pro/DTO/ProWorkorderSortDTO.cs +++ b/ZR.Model/MES/pro/DTO/ProWorkorderSortDTO.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.pro.DTO +namespace ZR.Model.MES.pro.DTO { public class ProWorkorderSortDTO { diff --git a/ZR.Model/MES/pro/DTO/WmPackingrecordDto.cs b/ZR.Model/MES/pro/DTO/WmPackingrecordDto.cs index 53557fca..52c6687f 100644 --- a/ZR.Model/MES/pro/DTO/WmPackingrecordDto.cs +++ b/ZR.Model/MES/pro/DTO/WmPackingrecordDto.cs @@ -5,7 +5,7 @@ namespace ZR.Model.MES.pro.DTO /// /// 包装记录查询对象 /// - public class WmPackingrecordQueryDto : PagerInfo + public class WmPackingrecordQueryDto : PagerInfo { public string PartNum { get; set; } @@ -21,8 +21,8 @@ namespace ZR.Model.MES.pro.DTO /// public class WmPackingrecordDto { - public long Id { get; set; } - + public long Id { get; set; } + public string PartNum { get; set; } diff --git a/ZR.Model/MES/pro/DTO/WorkplanSummaryDto.cs b/ZR.Model/MES/pro/DTO/WorkplanSummaryDto.cs index 632830b3..1bb372d7 100644 --- a/ZR.Model/MES/pro/DTO/WorkplanSummaryDto.cs +++ b/ZR.Model/MES/pro/DTO/WorkplanSummaryDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.pro.DTO +namespace ZR.Model.MES.pro.DTO { public class WorkplanSummaryDto { diff --git a/ZR.Model/MES/pro/ProWorklplan_v2.cs b/ZR.Model/MES/pro/ProWorklplan_v2.cs index 2e86fe48..472a5293 100644 --- a/ZR.Model/MES/pro/ProWorklplan_v2.cs +++ b/ZR.Model/MES/pro/ProWorklplan_v2.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using MiniExcelLibs.Attributes; -using SqlSugar; +using MiniExcelLibs.Attributes; /* * @author : xkdong@163.com @@ -21,7 +18,7 @@ namespace Model.DBModel /// /// WP2024030001 /// - [SugarColumn(ColumnName = "id",IsPrimaryKey = true)] + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] [ExcelIgnore] public string Id { get; set; } @@ -49,7 +46,7 @@ namespace Model.DBModel public string Specification { get; set; } - + /// /// 颜色代码 @@ -61,7 +58,7 @@ namespace Model.DBModel /// /// 本周要货数量 /// - + [SugarColumn(ColumnName = "require_num")] [ExcelColumn(Name = "本周要货数量", IndexName = "G")] public int RequireNum { get; set; } @@ -73,7 +70,7 @@ namespace Model.DBModel [SugarColumn(ColumnName = "qualification_rate")] [ExcelColumnIndex("H")] [ExcelColumnName("产品合格率")] - + public double QualificationRate { get; set; } /// @@ -137,7 +134,7 @@ namespace Model.DBModel [SugarColumn(ColumnName = "no_schedule")] [ExcelIgnore] - public int NoSchedule { get; set; } + public int NoSchedule { get; set; } /// /// 毛坯号 @@ -145,7 +142,7 @@ namespace Model.DBModel [SugarColumn(ColumnName = "blank_num")] [ExcelColumnIndex("B")] [ExcelColumnName("毛坯号")] - public string BlankNum { get; set; } + public string BlankNum { get; set; } /// /// 来源:手动插入,excel导入 @@ -154,7 +151,7 @@ namespace Model.DBModel [ExcelIgnore] public string Remark { get; set; } - + diff --git a/ZR.Model/MES/pro/ProWorkorderSchedule.cs b/ZR.Model/MES/pro/ProWorkorderSchedule.cs index 25fae5e1..fa9ac358 100644 --- a/ZR.Model/MES/pro/ProWorkorderSchedule.cs +++ b/ZR.Model/MES/pro/ProWorkorderSchedule.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.pro +namespace ZR.Model.MES.pro { /// /// 生产工单排产表 diff --git a/ZR.Model/MES/pro/ProWorkorder_v2.cs b/ZR.Model/MES/pro/ProWorkorder_v2.cs index 0231dbea..bf157005 100644 --- a/ZR.Model/MES/pro/ProWorkorder_v2.cs +++ b/ZR.Model/MES/pro/ProWorkorder_v2.cs @@ -1,9 +1,4 @@ using MiniExcelLibs.Attributes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace ZR.Model.MES.pro { @@ -16,7 +11,7 @@ namespace ZR.Model.MES.pro /// /// 工单号WO20240301001 /// - [SugarColumn(IsPrimaryKey = true,ColumnName ="id")] + [SugarColumn(IsPrimaryKey = true, ColumnName = "id")] [ExcelIgnore] public string Id { get; set; } @@ -124,7 +119,7 @@ namespace ZR.Model.MES.pro /// [SugarColumn(ColumnName = "sort")] [ExcelIgnore] - public int Sort { get; set; } + public int Sort { get; set; } /// /// 客户工单号 @@ -147,7 +142,7 @@ namespace ZR.Model.MES.pro /// [SugarColumn(ColumnName = "year")] [ExcelIgnore] - public int Year { get; set; } + public int Year { get; set; } /// /// 周 diff --git a/ZR.Model/MES/pro/ProWorkordertimeStep.cs b/ZR.Model/MES/pro/ProWorkordertimeStep.cs index 635206a8..269d8868 100644 --- a/ZR.Model/MES/pro/ProWorkordertimeStep.cs +++ b/ZR.Model/MES/pro/ProWorkordertimeStep.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.pro +namespace ZR.Model.MES.pro { /// /// 工单时间流转表 diff --git a/ZR.Model/MES/pro/ProWorkplan.cs b/ZR.Model/MES/pro/ProWorkplan.cs index 14400df6..85d75a41 100644 --- a/ZR.Model/MES/pro/ProWorkplan.cs +++ b/ZR.Model/MES/pro/ProWorkplan.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.mes.pro +namespace ZR.Model.mes.pro { /// /// 生产计划 diff --git a/ZR.Model/MES/qc/DTO/CheckItemTableDTO.cs b/ZR.Model/MES/qc/DTO/CheckItemTableDTO.cs index 8eaa7d6f..66523cd2 100644 --- a/ZR.Model/MES/qc/DTO/CheckItemTableDTO.cs +++ b/ZR.Model/MES/qc/DTO/CheckItemTableDTO.cs @@ -1,19 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.qu; +using ZR.Model.MES.qu; namespace ZR.Model.MES.qc.DTO { public class CheckItemTableDTO { - public List Paint { set; get; } + public List Paint { set; get; } public List device { set; get; } public List Blank { set; get; } public List program { set; get; } - public List Team { set; get; } + public List Team { set; get; } } } diff --git a/ZR.Model/MES/qc/DTO/Mr_QuRoughDTO.cs b/ZR.Model/MES/qc/DTO/Mr_QuRoughDTO.cs index c8569ddf..47ff4b98 100644 --- a/ZR.Model/MES/qc/DTO/Mr_QuRoughDTO.cs +++ b/ZR.Model/MES/qc/DTO/Mr_QuRoughDTO.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc.DTO +namespace ZR.Model.MES.qc.DTO { public class Mr_QuRoughDTO { diff --git a/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs b/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs new file mode 100644 index 00000000..04f33751 --- /dev/null +++ b/ZR.Model/MES/qc/DTO/QcCommonFqcDto.cs @@ -0,0 +1,80 @@ +namespace ZR.Model.MES.qc.DTO +{ + public class QcCommonFqcDto + { + public string Name { get; set; } + } + /// + /// 首检,包装数据看板 + /// + public class QcCommonFqcBoardDto + { + /// + /// 当前工单号 + /// + public string WorkOrderId { get; set; } + + /// + /// 上一个工单号 + /// + public string LastWorkOrderId { get; set; } + + /// + /// 工单位于列表的位置(当天工单) + /// + public int? WorkOrderIndex { get; set; } = 0; + /// + /// 工单列表总数(当天工单) + /// + public int? WorkOrderDayListCount { get; set; } = 0; + + /// + /// 工单已完成数(当天工单) + /// + public int? WorkOrderFinishNum { get; set; } = 0; + + /// + /// 工单未完成数(当天工单) + /// + public int? WorkOrderNotFinishNum { get; set; } = 0; + + /// + /// 工单理论需要打标签的数量 + /// + public int? WorkOrderPackageCount { get; set; } = 0; + + /// + /// 工单已打标签数量 + /// + public int? WorkOrderFinishPackageNum { get; set; } = 0; + + /// + /// 工单未打标签数量 + /// + public int? WorkOrderNotFinishPackageNum { get; set; } = 0; + + /// + /// 上一个工单理论需要打标签的数量 + /// + public int? LastWorkOrderPackageCount { get; set; } = 0; + + /// + /// 上一个工单已打标签数量 + /// + public int? LastWorkOrderFinishPackageNum { get; set; } = 0; + + /// + /// 上一个工单未打标签数量 + /// + public int? LastWorkOrderNotFinishPackageNum { get; set; } = 0; + + /// + /// 更新时间 + /// + public DateTime? UpdatedTime { get; set; } = default; + } +} + + + + diff --git a/ZR.Model/MES/qc/DTO/QcCurrentWorkorderDto.cs b/ZR.Model/MES/qc/DTO/QcCurrentWorkorderDto.cs index ad1de46e..d94fd221 100644 --- a/ZR.Model/MES/qc/DTO/QcCurrentWorkorderDto.cs +++ b/ZR.Model/MES/qc/DTO/QcCurrentWorkorderDto.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc.DTO +namespace ZR.Model.MES.qc.DTO { /// /// 当前工单 diff --git a/ZR.Model/MES/qc/DTO/QcInspectionitem_Record.cs b/ZR.Model/MES/qc/DTO/QcInspectionitem_Record.cs index 095ec4eb..61cb1343 100644 --- a/ZR.Model/MES/qc/DTO/QcInspectionitem_Record.cs +++ b/ZR.Model/MES/qc/DTO/QcInspectionitem_Record.cs @@ -1,14 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc.DTO +namespace ZR.Model.MES.qc.DTO { public class QcInspectionitem_Record { - + /// /// 工单id /// diff --git a/ZR.Model/MES/qc/DTO/QcQualityStatisticsFirstDto.cs b/ZR.Model/MES/qc/DTO/QcQualityStatisticsFirstDto.cs index bc3e621d..23606263 100644 --- a/ZR.Model/MES/qc/DTO/QcQualityStatisticsFirstDto.cs +++ b/ZR.Model/MES/qc/DTO/QcQualityStatisticsFirstDto.cs @@ -114,7 +114,7 @@ namespace ZR.Model.MES.qc.DTO /// /// 质量统计-首检查询对象 /// - public class QcQualityStatisticsFirstQueryDto : PagerInfo + public class QcQualityStatisticsFirstQueryDto : PagerInfo { public string WorkorderId { get; set; } @@ -124,9 +124,9 @@ namespace ZR.Model.MES.qc.DTO public string Team { get; set; } - public DateTime starttime { get; set; } - public DateTime endtime { get; set; } + public DateTime starttime { get; set; } + public DateTime endtime { get; set; } } - + } \ No newline at end of file diff --git a/ZR.Model/MES/qc/QcAgaininspectionPolish.cs b/ZR.Model/MES/qc/QcAgaininspectionPolish.cs index 12ab0b56..55430e7b 100644 --- a/ZR.Model/MES/qc/QcAgaininspectionPolish.cs +++ b/ZR.Model/MES/qc/QcAgaininspectionPolish.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 二检打磨表 diff --git a/ZR.Model/MES/qc/QcAgaininspectionRecord.cs b/ZR.Model/MES/qc/QcAgaininspectionRecord.cs index a22fa900..39687225 100644 --- a/ZR.Model/MES/qc/QcAgaininspectionRecord.cs +++ b/ZR.Model/MES/qc/QcAgaininspectionRecord.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 二检实时记录表 diff --git a/ZR.Model/MES/qc/QcAgaininspectionUselessnum.cs b/ZR.Model/MES/qc/QcAgaininspectionUselessnum.cs index 9961253d..00a4a6e4 100644 --- a/ZR.Model/MES/qc/QcAgaininspectionUselessnum.cs +++ b/ZR.Model/MES/qc/QcAgaininspectionUselessnum.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 二检报废表 diff --git a/ZR.Model/MES/qc/QcFinalinspectionRecord.cs b/ZR.Model/MES/qc/QcFinalinspectionRecord.cs index c412b7b0..b9a935cb 100644 --- a/ZR.Model/MES/qc/QcFinalinspectionRecord.cs +++ b/ZR.Model/MES/qc/QcFinalinspectionRecord.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 三检实时记录表 diff --git a/ZR.Model/MES/qc/QcFirstinspectionDefault.cs b/ZR.Model/MES/qc/QcFirstinspectionDefault.cs index 68982920..3478b30c 100644 --- a/ZR.Model/MES/qc/QcFirstinspectionDefault.cs +++ b/ZR.Model/MES/qc/QcFirstinspectionDefault.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 初检瑕疵 diff --git a/ZR.Model/MES/qc/QcFirstinspectionRecord.cs b/ZR.Model/MES/qc/QcFirstinspectionRecord.cs index d784aecd..706891f8 100644 --- a/ZR.Model/MES/qc/QcFirstinspectionRecord.cs +++ b/ZR.Model/MES/qc/QcFirstinspectionRecord.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Principal; -using SqlSugar; -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 初检实时记录表 @@ -15,7 +10,7 @@ namespace ZR.Model.MES.qc /// 流水号 /// [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] - public string Id { get; set; } + public string Id { get; set; } /// /// 工单id /// diff --git a/ZR.Model/MES/qc/QcFirstinspectionUselessnum.cs b/ZR.Model/MES/qc/QcFirstinspectionUselessnum.cs index 04596305..cdf51af8 100644 --- a/ZR.Model/MES/qc/QcFirstinspectionUselessnum.cs +++ b/ZR.Model/MES/qc/QcFirstinspectionUselessnum.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 初检报废表 diff --git a/ZR.Model/MES/qc/QcFqc.cs b/ZR.Model/MES/qc/QcFqc.cs index cf8238d3..b2bd7224 100644 --- a/ZR.Model/MES/qc/QcFqc.cs +++ b/ZR.Model/MES/qc/QcFqc.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// diff --git a/ZR.Model/MES/qc/QcInspectionitem.cs b/ZR.Model/MES/qc/QcInspectionitem.cs index 35b13eb1..152482eb 100644 --- a/ZR.Model/MES/qc/QcInspectionitem.cs +++ b/ZR.Model/MES/qc/QcInspectionitem.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.qu +namespace ZR.Model.MES.qu { /// /// 检测项 @@ -77,7 +73,7 @@ namespace ZR.Model.MES.qu /// /// 检测数量 /// - [SugarColumn(IsIgnore =true)] - public int? Counter { get; set; } + [SugarColumn(IsIgnore = true)] + public int? Counter { get; set; } } } diff --git a/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs b/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs index c934eb4f..287a7775 100644 --- a/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs +++ b/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs @@ -1,9 +1,4 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 质量统计-二检 diff --git a/ZR.Model/MES/qc/QcQualityStatisticsFinal.cs b/ZR.Model/MES/qc/QcQualityStatisticsFinal.cs index b6607671..26f0fc20 100644 --- a/ZR.Model/MES/qc/QcQualityStatisticsFinal.cs +++ b/ZR.Model/MES/qc/QcQualityStatisticsFinal.cs @@ -1,9 +1,4 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 质量统计-三检 diff --git a/ZR.Model/MES/qc/QcQualityStatisticsTotal.cs b/ZR.Model/MES/qc/QcQualityStatisticsTotal.cs index da86ecfa..7b15599d 100644 --- a/ZR.Model/MES/qc/QcQualityStatisticsTotal.cs +++ b/ZR.Model/MES/qc/QcQualityStatisticsTotal.cs @@ -1,9 +1,4 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.qc +namespace ZR.Model.MES.qc { /// /// 质量统计-总 diff --git a/ZR.Model/MES/qc/QcRough.cs b/ZR.Model/MES/qc/QcRough.cs index c87cbcff..b81d8696 100644 --- a/ZR.Model/MES/qc/QcRough.cs +++ b/ZR.Model/MES/qc/QcRough.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.qu +namespace ZR.Model.MES.qu { /// diff --git a/ZR.Model/MES/wms/AGVtask_third.cs b/ZR.Model/MES/wms/AGVtask_third.cs index 55935d21..cce0aa43 100644 --- a/ZR.Model/MES/wms/AGVtask_third.cs +++ b/ZR.Model/MES/wms/AGVtask_third.cs @@ -1,26 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 对接agv 第三方 /// public class AGVtask_third { - public string reqCode { get; set; } - public string msg {get; set; } - public string taskTyp { get; set; } + public string reqCode { get; set; } + public string msg { get; set; } + public string taskTyp { get; set; } public List positionCodePath { get; set; } - public string podDir { get; set; } - public string priority { get; set; } + public string podDir { get; set; } + public string priority { get; set; } public string agvCode { get; set; } } - public class AGV_location_third + public class AGV_location_third { public string positionCode { get; set; } public string type { get; set; } @@ -30,13 +24,13 @@ namespace ZR.Model.MES.wms /// 生成任务单 第三方 返回值 /// public class AGV_task_third - { + { - public string code { get; set;} + public string code { get; set; } - public string message { get; set;} + public string message { get; set; } - public string reqCode { get;set;} + public string reqCode { get; set; } public string data { get; set; } @@ -47,9 +41,9 @@ namespace ZR.Model.MES.wms /// agv 取消任务 /// public class AGVtask_cancel_third - { - public string reqCode { get; set;} - public string forceCancel { get; set;} + { + public string reqCode { get; set; } + public string forceCancel { get; set; } public string taskCode { get; set; } } diff --git a/ZR.Model/MES/wms/AgvConfig.cs b/ZR.Model/MES/wms/AgvConfig.cs index 25bb10a8..b2a7c57a 100644 --- a/ZR.Model/MES/wms/AgvConfig.cs +++ b/ZR.Model/MES/wms/AgvConfig.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// AGV配置 diff --git a/ZR.Model/MES/wms/AgvLocation.cs b/ZR.Model/MES/wms/AgvLocation.cs index 43bb769b..3d492e34 100644 --- a/ZR.Model/MES/wms/AgvLocation.cs +++ b/ZR.Model/MES/wms/AgvLocation.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// agv位置表 @@ -21,7 +16,7 @@ namespace ZR.Model.MES.wms /// /// 区域 /// - [SugarColumn(ColumnName = "area_code")] + [SugarColumn(ColumnName = "area_code")] public int? AreaCode { get; set; } diff --git a/ZR.Model/MES/wms/AgvTask.cs b/ZR.Model/MES/wms/AgvTask.cs index bda9651f..7df9dfce 100644 --- a/ZR.Model/MES/wms/AgvTask.cs +++ b/ZR.Model/MES/wms/AgvTask.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// agv任务 @@ -48,7 +43,7 @@ namespace ZR.Model.MES.wms [SugarColumn(ColumnName = "go_task_id")] public string GoTaskId { get; set; } - + /// /// 数量 @@ -71,7 +66,7 @@ namespace ZR.Model.MES.wms /// 回程 /// [SugarColumn(ColumnName = "back_task_id")] - public string BackTaskId{ get; set; } + public string BackTaskId { get; set; } /// /// 创建人 diff --git a/ZR.Model/MES/wms/Dto/AGVtaskDto.cs b/ZR.Model/MES/wms/Dto/AGVtaskDto.cs index d1ef975f..6b22e863 100644 --- a/ZR.Model/MES/wms/Dto/AGVtaskDto.cs +++ b/ZR.Model/MES/wms/Dto/AGVtaskDto.cs @@ -1,14 +1,7 @@ -using MiniExcelLibs.Attributes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.wms.Dto +namespace ZR.Model.MES.wms.Dto { - public class QueryAGVPosition + public class QueryAGVPosition { @@ -21,9 +14,9 @@ namespace ZR.Model.MES.wms.Dto /// /// 查询参数 /// - public class QueryAGVparam + public class QueryAGVparam { - public int year { get; set; } + public int year { get; set; } public int week { get; set; } public int day { get; set; } public int status { get; set; } @@ -31,7 +24,7 @@ namespace ZR.Model.MES.wms.Dto /// /// 工单 /// - public class AGVWorkorderDto + public class AGVWorkorderDto { /// /// 工单id(内部) diff --git a/ZR.Model/MES/wms/Dto/WmBlankInventoryDto.cs b/ZR.Model/MES/wms/Dto/WmBlankInventoryDto.cs index 59aa346f..d943b544 100644 --- a/ZR.Model/MES/wms/Dto/WmBlankInventoryDto.cs +++ b/ZR.Model/MES/wms/Dto/WmBlankInventoryDto.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// diff --git a/ZR.Model/MES/wms/Dto/WmBlankRecordDto.cs b/ZR.Model/MES/wms/Dto/WmBlankRecordDto.cs index 382ca55f..d5f1462f 100644 --- a/ZR.Model/MES/wms/Dto/WmBlankRecordDto.cs +++ b/ZR.Model/MES/wms/Dto/WmBlankRecordDto.cs @@ -5,7 +5,7 @@ namespace ZR.Model.MES.wms.Dto /// /// 毛坯库存库存变动记录表查询对象 /// - public class WmBlankRecordQueryDto : PagerInfo + public class WmBlankRecordQueryDto : PagerInfo { public string Id { get; set; } public string FkBlankInventoryId { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmCheckLogDto.cs b/ZR.Model/MES/wms/Dto/WmCheckLogDto.cs index de222317..4a37cfc7 100644 --- a/ZR.Model/MES/wms/Dto/WmCheckLogDto.cs +++ b/ZR.Model/MES/wms/Dto/WmCheckLogDto.cs @@ -1,11 +1,9 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// /// 盘点记录查询对象 /// - public class WmCheckLogQueryDto : PagerInfo + public class WmCheckLogQueryDto : PagerInfo { } diff --git a/ZR.Model/MES/wms/Dto/WmCustomDto.cs b/ZR.Model/MES/wms/Dto/WmCustomDto.cs index 69fa44d8..4521ba27 100644 --- a/ZR.Model/MES/wms/Dto/WmCustomDto.cs +++ b/ZR.Model/MES/wms/Dto/WmCustomDto.cs @@ -5,7 +5,7 @@ namespace ZR.Model.MES.wms.Dto /// /// 客户信息查询对象 /// - public class WmCustomQueryDto : PagerInfo + public class WmCustomQueryDto : PagerInfo { public string CustomNo { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs b/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs index a3432479..43286aea 100644 --- a/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs +++ b/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs @@ -1,23 +1,21 @@ -using MiniExcelLibs.Attributes; using System.ComponentModel.DataAnnotations; -using System.Xml.Linq; namespace ZR.Model.MES.wms.Dto { /// /// 成品入库检验查询对象 /// - public class WmFgentryInspectQueryDto : PagerInfo + public class WmFgentryInspectQueryDto : PagerInfo { public string Workorder { get; set; } - + public string Packcode { get; set; } public string Partnumber { get; set; } - public DateTime starttime { get; set; } + public DateTime starttime { get; set; } public DateTime endtime { get; set; } @@ -28,12 +26,12 @@ namespace ZR.Model.MES.wms.Dto /// public class WmFgentryInspect_parentDto { - + public int Id { get; set; } public string Workorder { get; set; } - + public string Packcode { get; set; } public string Machine { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmGoodsActionDto.cs b/ZR.Model/MES/wms/Dto/WmGoodsActionDto.cs index 6d6cc224..81b0ac61 100644 --- a/ZR.Model/MES/wms/Dto/WmGoodsActionDto.cs +++ b/ZR.Model/MES/wms/Dto/WmGoodsActionDto.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// diff --git a/ZR.Model/MES/wms/Dto/WmGoodsBatchSearchDto.cs b/ZR.Model/MES/wms/Dto/WmGoodsBatchSearchDto.cs index ab09879c..abaaccc2 100644 --- a/ZR.Model/MES/wms/Dto/WmGoodsBatchSearchDto.cs +++ b/ZR.Model/MES/wms/Dto/WmGoodsBatchSearchDto.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// diff --git a/ZR.Model/MES/wms/Dto/WmGoodsChangeLogDto.cs b/ZR.Model/MES/wms/Dto/WmGoodsChangeLogDto.cs index a5f6ceba..141a9bd4 100644 --- a/ZR.Model/MES/wms/Dto/WmGoodsChangeLogDto.cs +++ b/ZR.Model/MES/wms/Dto/WmGoodsChangeLogDto.cs @@ -1,11 +1,9 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// /// 仓库操作日志查询对象 /// - public class WmGoodsChangeLogQueryDto : PagerInfo + public class WmGoodsChangeLogQueryDto : PagerInfo { public int Id { get; set; } public int Type { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmGoodsNowProductionDto.cs b/ZR.Model/MES/wms/Dto/WmGoodsNowProductionDto.cs index 15c0232e..7075a4a1 100644 --- a/ZR.Model/MES/wms/Dto/WmGoodsNowProductionDto.cs +++ b/ZR.Model/MES/wms/Dto/WmGoodsNowProductionDto.cs @@ -1,11 +1,9 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// /// 成品库当前货物表查询对象 /// - public class WmGoodsNowProductionQueryDto : PagerInfo + public class WmGoodsNowProductionQueryDto : PagerInfo { public string Id { get; set; } @@ -44,18 +42,18 @@ namespace ZR.Model.MES.wms.Dto /// public class WmGoodsNowProductionDto { - + public string Id { get; set; } - + public string PackageCode { get; set; } - + public string PackageCodeClient { get; set; } public string PackageCodeOriginal { get; set; } - + public string LocationCode { get; set; } public string Partnumber { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmGoodsOutProductionDto.cs b/ZR.Model/MES/wms/Dto/WmGoodsOutProductionDto.cs index 4465dc11..d85a1e2e 100644 --- a/ZR.Model/MES/wms/Dto/WmGoodsOutProductionDto.cs +++ b/ZR.Model/MES/wms/Dto/WmGoodsOutProductionDto.cs @@ -1,13 +1,11 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// /// 出库货物记录表查询对象 /// - public class WmGoodsOutProductionQueryDto : PagerInfo + public class WmGoodsOutProductionQueryDto : PagerInfo { - + public string Id { get; set; } public string FkNowProductionId { get; set; } @@ -16,7 +14,7 @@ namespace ZR.Model.MES.wms.Dto public string PackageCode { get; set; } - + public string PackageCodeClient { get; set; } public string PackageCodeOriginal { get; set; } @@ -51,22 +49,22 @@ namespace ZR.Model.MES.wms.Dto /// public class WmGoodsOutProductionDto { - + public string Id { get; set; } public string FkNowProductionId { get; set; } public string FkOutOrderId { get; set; } - + public string PackageCode { get; set; } - + public string PackageCodeClient { get; set; } public string PackageCodeOriginal { get; set; } - + public string LocationCode { get; set; } public string Partnumber { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs b/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs index 53a4d3a2..65d47bf8 100644 --- a/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs +++ b/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.wms.Dto +namespace ZR.Model.MES.wms.Dto { /// /// 当前仓库货物节点表 @@ -21,7 +15,7 @@ namespace ZR.Model.MES.wms.Dto /// 父节点 就是短批次号 /// public string PackageCodeClient_short_parent { get; set; } - + /// /// 子节点 (主键) /// @@ -30,7 +24,7 @@ namespace ZR.Model.MES.wms.Dto /// /// 箱数 /// - public int Pack_num { get; set; } + public int Pack_num { get; set; } public string PackageCodeOriginal { get; set; } diff --git a/ZR.Model/MES/wms/Dto/WmMaterialDto.cs b/ZR.Model/MES/wms/Dto/WmMaterialDto.cs index 1fe7347b..68caba79 100644 --- a/ZR.Model/MES/wms/Dto/WmMaterialDto.cs +++ b/ZR.Model/MES/wms/Dto/WmMaterialDto.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// @@ -69,11 +67,11 @@ namespace ZR.Model.MES.wms.Dto /// 出货单中物料信息打印 /// public class WmMaterialQuery_print - { - + { + /// - /// 物料号 - /// + /// 物料号 + /// public string Partnumber { get; set; } /// /// 产品名称 @@ -98,7 +96,7 @@ namespace ZR.Model.MES.wms.Dto - + } diff --git a/ZR.Model/MES/wms/Dto/WmOutOrderDto.cs b/ZR.Model/MES/wms/Dto/WmOutOrderDto.cs index b81049ff..fff7c3b6 100644 --- a/ZR.Model/MES/wms/Dto/WmOutOrderDto.cs +++ b/ZR.Model/MES/wms/Dto/WmOutOrderDto.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace ZR.Model.MES.wms.Dto { /// diff --git a/ZR.Model/MES/wms/Dto/WmPackageLclDto.cs b/ZR.Model/MES/wms/Dto/WmPackageLclDto.cs index be1cceda..d92799e3 100644 --- a/ZR.Model/MES/wms/Dto/WmPackageLclDto.cs +++ b/ZR.Model/MES/wms/Dto/WmPackageLclDto.cs @@ -23,7 +23,7 @@ namespace ZR.Model.MES.wms.Dto [Required(ErrorMessage = "零件号不能为空")] public string Partnumber { get; set; } - + public string Description { get; set; } [Required(ErrorMessage = "外箱标签;外箱标签(外箱批次号)不能为空")] diff --git a/ZR.Model/MES/wms/Dto/WmgoodsDto.cs b/ZR.Model/MES/wms/Dto/WmgoodsDto.cs index 33eabfab..471bf195 100644 --- a/ZR.Model/MES/wms/Dto/WmgoodsDto.cs +++ b/ZR.Model/MES/wms/Dto/WmgoodsDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.wms.Dto +namespace ZR.Model.MES.wms.Dto { /// /// 待入库货物 diff --git a/ZR.Model/MES/wms/WmCheckLog.cs b/ZR.Model/MES/wms/WmCheckLog.cs index 3048eedd..255fdf9c 100644 --- a/ZR.Model/MES/wms/WmCheckLog.cs +++ b/ZR.Model/MES/wms/WmCheckLog.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; namespace ZR.Model.MES.wms { /// diff --git a/ZR.Model/MES/wms/WmCustom.cs b/ZR.Model/MES/wms/WmCustom.cs index 76cb175d..30e345f0 100644 --- a/ZR.Model/MES/wms/WmCustom.cs +++ b/ZR.Model/MES/wms/WmCustom.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; namespace ZR.Model.MES.wms { /// @@ -37,7 +33,7 @@ namespace ZR.Model.MES.wms /// /// 备注 /// - [SugarColumn(ColumnName = "remark")] + [SugarColumn(ColumnName = "remark")] public string Remark { get; set; } /// diff --git a/ZR.Model/MES/wms/WmGoodsNowProduction.cs b/ZR.Model/MES/wms/WmGoodsNowProduction.cs index 38753efc..6d69e583 100644 --- a/ZR.Model/MES/wms/WmGoodsNowProduction.cs +++ b/ZR.Model/MES/wms/WmGoodsNowProduction.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 成品库当前货物表 @@ -24,7 +20,7 @@ namespace ZR.Model.MES.wms /// 箱子编号 (批次号) /// [SugarColumn(ColumnName = "package_code_client")] - public string PackageCodeClient { get; set; } + public string PackageCodeClient { get; set; } /// /// 箱子编号 (原始) diff --git a/ZR.Model/MES/wms/WmGoodsOutProduction.cs b/ZR.Model/MES/wms/WmGoodsOutProduction.cs index 8ce77552..42cda43f 100644 --- a/ZR.Model/MES/wms/WmGoodsOutProduction.cs +++ b/ZR.Model/MES/wms/WmGoodsOutProduction.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; namespace ZR.Model.MES.wms { /// diff --git a/ZR.Model/MES/wms/WmGoodsOutRecord.cs b/ZR.Model/MES/wms/WmGoodsOutRecord.cs index 49c51062..0381cb73 100644 --- a/ZR.Model/MES/wms/WmGoodsOutRecord.cs +++ b/ZR.Model/MES/wms/WmGoodsOutRecord.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; namespace ZR.Model.MES.wms { /// diff --git a/ZR.Model/MES/wms/WmInLog.cs b/ZR.Model/MES/wms/WmInLog.cs index 07471ebb..e5ed57a5 100644 --- a/ZR.Model/MES/wms/WmInLog.cs +++ b/ZR.Model/MES/wms/WmInLog.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 入库日志(U8上传) @@ -13,52 +9,52 @@ namespace ZR.Model.MES.wms /// /// 主键(雪花生产) /// - [SugarColumn(ColumnName="id" )] - public string Id { get; set; } + [SugarColumn(ColumnName = "id")] + public string Id { get; set; } /// /// u8库存编码 /// - [SugarColumn(ColumnName="u8_inventory_code" )] - public string U8InventoryCode { get; set; } + [SugarColumn(ColumnName = "u8_inventory_code")] + public string U8InventoryCode { get; set; } /// /// 仓库编号 /// - [SugarColumn(ColumnName="wm_info_id" )] - public string WmInfoId { get; set; } + [SugarColumn(ColumnName = "wm_info_id")] + public string WmInfoId { get; set; } /// /// mes内码 /// - [SugarColumn(ColumnName="package_code" )] - public string PackageCode { get; set; } + [SugarColumn(ColumnName = "package_code")] + public string PackageCode { get; set; } /// /// 批次号 /// - [SugarColumn(ColumnName="code" )] - public string Code { get; set; } + [SugarColumn(ColumnName = "code")] + public string Code { get; set; } /// /// 数量 /// - [SugarColumn(ColumnName="number" )] - public string Number { get; set; } + [SugarColumn(ColumnName = "number")] + public string Number { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/MES/wms/WmInfo.cs b/ZR.Model/MES/wms/WmInfo.cs index 33f2e16a..9a630c83 100644 --- a/ZR.Model/MES/wms/WmInfo.cs +++ b/ZR.Model/MES/wms/WmInfo.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 仓库信息 @@ -46,7 +42,7 @@ namespace ZR.Model.MES.wms /// 备注 /// [SugarColumn(ColumnName = "remark")] - public string Remark { get; set; } + public string Remark { get; set; } diff --git a/ZR.Model/MES/wms/WmMaterial.cs b/ZR.Model/MES/wms/WmMaterial.cs index 6d74097b..d02f2210 100644 --- a/ZR.Model/MES/wms/WmMaterial.cs +++ b/ZR.Model/MES/wms/WmMaterial.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 物料记录表 @@ -13,73 +9,73 @@ namespace ZR.Model.MES.wms /// /// 主键G /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true )] - public string Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public string Id { get; set; } /// /// 物料号(零件号) /// - [SugarColumn(ColumnName="partnumber")] - public string Partnumber { get; set; } + [SugarColumn(ColumnName = "partnumber")] + public string Partnumber { get; set; } /// /// U8库存编码 /// - [SugarColumn(ColumnName="u8_inventory_code")] - public string U8InventoryCode { get; set; } + [SugarColumn(ColumnName = "u8_inventory_code")] + public string U8InventoryCode { get; set; } /// /// 毛坯号 /// - [SugarColumn(ColumnName="blank_num" )] - public string BlankNum { get; set; } + [SugarColumn(ColumnName = "blank_num")] + public string BlankNum { get; set; } /// /// 单位 /// - [SugarColumn(ColumnName="unit" )] - public string Unit { get; set; } + [SugarColumn(ColumnName = "unit")] + public string Unit { get; set; } /// /// 产品描述(产品名称) /// - [SugarColumn(ColumnName="product_name" )] - public string ProductName { get; set; } + [SugarColumn(ColumnName = "product_name")] + public string ProductName { get; set; } /// /// 产品颜色 /// - [SugarColumn(ColumnName="color" )] - public string Color { get; set; } + [SugarColumn(ColumnName = "color")] + public string Color { get; set; } /// /// 规格(左右脚) /// - [SugarColumn(ColumnName="specification" )] - public string Specification { get; set; } + [SugarColumn(ColumnName = "specification")] + public string Specification { get; set; } /// /// 显示描述(产品描述+颜色+规格) /// - [SugarColumn(ColumnName="description" )] - public string Description { get; set; } + [SugarColumn(ColumnName = "description")] + public string Description { get; set; } /// /// 版本号 /// - [SugarColumn(ColumnName="version" )] - public string Version { get; set; } + [SugarColumn(ColumnName = "version")] + public string Version { get; set; } /// /// 备注 /// - [SugarColumn(ColumnName="remarks" )] - public string Remarks { get; set; } + [SugarColumn(ColumnName = "remarks")] + public string Remarks { get; set; } /// /// 排序(特殊排序) /// - [SugarColumn(ColumnName="sort" )] - public int? Sort { get; set; } + [SugarColumn(ColumnName = "sort")] + public int? Sort { get; set; } /// /// 便捷搜索字段1 /// - [SugarColumn(ColumnName="search1" )] - public string Search1 { get; set; } + [SugarColumn(ColumnName = "search1")] + public string Search1 { get; set; } /// /// 便捷搜索字段2 /// - [SugarColumn(ColumnName="search2" )] - public string Search2 { get; set; } + [SugarColumn(ColumnName = "search2")] + public string Search2 { get; set; } /// /// 类别(1-成品 2-毛坯) @@ -89,27 +85,27 @@ namespace ZR.Model.MES.wms /// /// 状态(0-不可见 1-可见) /// - [SugarColumn(ColumnName="status" )] - public int? Status { get; set; } + [SugarColumn(ColumnName = "status")] + public int? Status { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/MES/wms/WmOutOrderPlan.cs b/ZR.Model/MES/wms/WmOutOrderPlan.cs index 28653559..ebb157fa 100644 --- a/ZR.Model/MES/wms/WmOutOrderPlan.cs +++ b/ZR.Model/MES/wms/WmOutOrderPlan.cs @@ -1,11 +1,4 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 出库计划 diff --git a/ZR.Model/MES/wms/WmPackingrecord.cs b/ZR.Model/MES/wms/WmPackingrecord.cs index fa3bc5b4..28af4597 100644 --- a/ZR.Model/MES/wms/WmPackingrecord.cs +++ b/ZR.Model/MES/wms/WmPackingrecord.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.wms +namespace ZR.Model.MES.wms { /// /// 包装记录 diff --git a/ZR.Model/PagedInfo.cs b/ZR.Model/PagedInfo.cs index b483b146..589dd0ed 100644 --- a/ZR.Model/PagedInfo.cs +++ b/ZR.Model/PagedInfo.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace ZR.Model +namespace ZR.Model { /// /// 分页参数 diff --git a/ZR.Model/ProteryConstant.cs b/ZR.Model/ProteryConstant.cs index 382c4598..78935a82 100644 --- a/ZR.Model/ProteryConstant.cs +++ b/ZR.Model/ProteryConstant.cs @@ -1,6 +1,4 @@ -using System; - -namespace ZR.Model +namespace ZR.Model { public enum ProteryConstant { diff --git a/ZR.Model/System/ArticleCategory.cs b/ZR.Model/System/ArticleCategory.cs index 934b2571..ee30d471 100644 --- a/ZR.Model/System/ArticleCategory.cs +++ b/ZR.Model/System/ArticleCategory.cs @@ -1,9 +1,4 @@ -using Newtonsoft.Json; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 文章目录 diff --git a/ZR.Model/System/CommonLang.cs b/ZR.Model/System/CommonLang.cs index 883e46e1..e8162fd3 100644 --- a/ZR.Model/System/CommonLang.cs +++ b/ZR.Model/System/CommonLang.cs @@ -1,6 +1,3 @@ -using Newtonsoft.Json; -using SqlSugar; -using System; using System.ComponentModel; namespace ZR.Model.Models diff --git a/ZR.Model/System/Dto/ArticleCategoryDto.cs b/ZR.Model/System/Dto/ArticleCategoryDto.cs index c109a19b..dc7133d2 100644 --- a/ZR.Model/System/Dto/ArticleCategoryDto.cs +++ b/ZR.Model/System/Dto/ArticleCategoryDto.cs @@ -1,4 +1,3 @@ -using System; using System.ComponentModel.DataAnnotations; namespace ZR.Model.Dto @@ -19,7 +18,7 @@ namespace ZR.Model.Dto /// /// 文章目录查询对象 /// - public class ArticleCategoryQueryDto : PagerInfo + public class ArticleCategoryQueryDto : PagerInfo { } } diff --git a/ZR.Model/System/Dto/ArticleDto.cs b/ZR.Model/System/Dto/ArticleDto.cs index fd60a895..5fafb5b1 100644 --- a/ZR.Model/System/Dto/ArticleDto.cs +++ b/ZR.Model/System/Dto/ArticleDto.cs @@ -1,5 +1,4 @@ -using System; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace ZR.Model.System.Dto { diff --git a/ZR.Model/System/Dto/CommonLangDto.cs b/ZR.Model/System/Dto/CommonLangDto.cs index 1e70d809..b1f015aa 100644 --- a/ZR.Model/System/Dto/CommonLangDto.cs +++ b/ZR.Model/System/Dto/CommonLangDto.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; - namespace ZR.Model.Dto { /// @@ -21,7 +18,7 @@ namespace ZR.Model.Dto /// /// 多语言配置查询对象 /// - public class CommonLangQueryDto : PagerInfo + public class CommonLangQueryDto : PagerInfo { public string LangCode { get; set; } public string LangKey { get; set; } diff --git a/ZR.Model/System/Dto/GenTableDto.cs b/ZR.Model/System/Dto/GenTableDto.cs index ca73d066..ea26e0f5 100644 --- a/ZR.Model/System/Dto/GenTableDto.cs +++ b/ZR.Model/System/Dto/GenTableDto.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model.System.Generate; +using ZR.Model.System.Generate; namespace ZR.Model.System.Dto { diff --git a/ZR.Model/System/Dto/LoginUser.cs b/ZR.Model/System/Dto/LoginUser.cs index 8bf08d70..c06f7427 100644 --- a/ZR.Model/System/Dto/LoginUser.cs +++ b/ZR.Model/System/Dto/LoginUser.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Linq; +using System.Linq; namespace ZR.Model.System.Dto { diff --git a/ZR.Model/System/Dto/MenuDto.cs b/ZR.Model/System/Dto/MenuDto.cs index 32ffaedb..ff0bbb00 100644 --- a/ZR.Model/System/Dto/MenuDto.cs +++ b/ZR.Model/System/Dto/MenuDto.cs @@ -1,6 +1,4 @@ using MiniExcelLibs.Attributes; -using System; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace ZR.Model.System.Dto @@ -26,7 +24,7 @@ namespace ZR.Model.System.Dto /// /// 路由地址 /// - [ExcelColumn(Name = "路由地址")] + [ExcelColumn(Name = "路由地址")] public string Path { get; set; } = "#"; /// diff --git a/ZR.Model/System/Dto/RoleMenuExportDto.cs b/ZR.Model/System/Dto/RoleMenuExportDto.cs index b2e83ea6..b4968169 100644 --- a/ZR.Model/System/Dto/RoleMenuExportDto.cs +++ b/ZR.Model/System/Dto/RoleMenuExportDto.cs @@ -1,5 +1,4 @@ using MiniExcelLibs.Attributes; -using SqlSugar.DbConvert; using ZR.Model.System.Enums; namespace ZR.Model.System.Dto diff --git a/ZR.Model/System/Dto/RoleUserDto.cs b/ZR.Model/System/Dto/RoleUserDto.cs index a3362896..e1681efb 100644 --- a/ZR.Model/System/Dto/RoleUserDto.cs +++ b/ZR.Model/System/Dto/RoleUserDto.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace ZR.Model.System.Dto { diff --git a/ZR.Model/System/Dto/SysConfigDto.cs b/ZR.Model/System/Dto/SysConfigDto.cs index 8a57b53f..10642aa1 100644 --- a/ZR.Model/System/Dto/SysConfigDto.cs +++ b/ZR.Model/System/Dto/SysConfigDto.cs @@ -1,5 +1,3 @@ -using System; - namespace ZR.Model.System.Dto { /// diff --git a/ZR.Model/System/Dto/SysFileQueryDto.cs b/ZR.Model/System/Dto/SysFileQueryDto.cs index 40e4f957..3e749c1c 100644 --- a/ZR.Model/System/Dto/SysFileQueryDto.cs +++ b/ZR.Model/System/Dto/SysFileQueryDto.cs @@ -1,6 +1,4 @@ -using System; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { /// /// 文件存储输入对象 diff --git a/ZR.Model/System/Dto/SysOperLogDto.cs b/ZR.Model/System/Dto/SysOperLogDto.cs index 36c69378..83b1d4ef 100644 --- a/ZR.Model/System/Dto/SysOperLogDto.cs +++ b/ZR.Model/System/Dto/SysOperLogDto.cs @@ -1,6 +1,4 @@ -using System; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { public class SysOperLogQueryDto : PagerInfo { diff --git a/ZR.Model/System/Dto/SysRoleDto.cs b/ZR.Model/System/Dto/SysRoleDto.cs index 8ad68667..3fdcee19 100644 --- a/ZR.Model/System/Dto/SysRoleDto.cs +++ b/ZR.Model/System/Dto/SysRoleDto.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { public class SysRoleDto : SysBase { diff --git a/ZR.Model/System/Dto/SysRoleMenuDto.cs b/ZR.Model/System/Dto/SysRoleMenuDto.cs index fd801f13..44482cbb 100644 --- a/ZR.Model/System/Dto/SysRoleMenuDto.cs +++ b/ZR.Model/System/Dto/SysRoleMenuDto.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { public class SysRoleMenuDto { @@ -13,6 +10,6 @@ namespace ZR.Model.System.Dto public string RoleName { get; set; } public string RoleKey { get; set; } public string Create_by { get; set; } - public DateTime Create_time{ get; set; } + public DateTime Create_time { get; set; } } } diff --git a/ZR.Model/System/Dto/SysUserDto.cs b/ZR.Model/System/Dto/SysUserDto.cs index 2dc0b955..c822da7f 100644 --- a/ZR.Model/System/Dto/SysUserDto.cs +++ b/ZR.Model/System/Dto/SysUserDto.cs @@ -1,6 +1,4 @@ -using System; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { public class SysUserDto { diff --git a/ZR.Model/System/Dto/SysdictDataDto.cs b/ZR.Model/System/Dto/SysdictDataDto.cs index 471a3f81..b820ec62 100644 --- a/ZR.Model/System/Dto/SysdictDataDto.cs +++ b/ZR.Model/System/Dto/SysdictDataDto.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { public class SysdictDataDto { diff --git a/ZR.Model/System/Dto/TasksDto.cs b/ZR.Model/System/Dto/TasksDto.cs index 6da320b0..126370f5 100644 --- a/ZR.Model/System/Dto/TasksDto.cs +++ b/ZR.Model/System/Dto/TasksDto.cs @@ -1,5 +1,4 @@ -using System; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace ZR.Model.System.Dto { diff --git a/ZR.Model/System/Dto/TasksLogDto.cs b/ZR.Model/System/Dto/TasksLogDto.cs index 2567dc78..90a8cc0c 100644 --- a/ZR.Model/System/Dto/TasksLogDto.cs +++ b/ZR.Model/System/Dto/TasksLogDto.cs @@ -1,13 +1,11 @@ -using System; - -namespace ZR.Model.System.Dto +namespace ZR.Model.System.Dto { public class TasksLogQueryDto { /// /// 查询字符串 /// - public string Name{ get; set; } + public string Name { get; set; } public string JobName { get; set; } public string JobId { get; set; } public string JobGroup { get; set; } diff --git a/ZR.Model/System/Generate/GenTable.cs b/ZR.Model/System/Generate/GenTable.cs index 6e3199e0..5bbb4561 100644 --- a/ZR.Model/System/Generate/GenTable.cs +++ b/ZR.Model/System/Generate/GenTable.cs @@ -1,7 +1,4 @@ -using SqlSugar; -using System.Collections.Generic; - -namespace ZR.Model.System.Generate +namespace ZR.Model.System.Generate { /// /// 代码生成表 diff --git a/ZR.Model/System/Generate/GenTableColumn.cs b/ZR.Model/System/Generate/GenTableColumn.cs index 917fc78c..389139f3 100644 --- a/ZR.Model/System/Generate/GenTableColumn.cs +++ b/ZR.Model/System/Generate/GenTableColumn.cs @@ -1,6 +1,4 @@ -using SqlSugar; -using System; -using System.Linq; +using System.Linq; namespace ZR.Model.System.Generate { diff --git a/ZR.Model/System/SysBase.cs b/ZR.Model/System/SysBase.cs index b46ce8ec..3c07885a 100644 --- a/ZR.Model/System/SysBase.cs +++ b/ZR.Model/System/SysBase.cs @@ -1,7 +1,4 @@ using MiniExcelLibs.Attributes; -using Newtonsoft.Json; -using SqlSugar; -using System; namespace ZR.Model.System { diff --git a/ZR.Model/System/SysConfig.cs b/ZR.Model/System/SysConfig.cs index 764cf522..0d2e1e6b 100644 --- a/ZR.Model/System/SysConfig.cs +++ b/ZR.Model/System/SysConfig.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 参数配置,数据实体对象 diff --git a/ZR.Model/System/SysDictData.cs b/ZR.Model/System/SysDictData.cs index 9dbccae7..b871b7ca 100644 --- a/ZR.Model/System/SysDictData.cs +++ b/ZR.Model/System/SysDictData.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 字典数据表 diff --git a/ZR.Model/System/SysDictType.cs b/ZR.Model/System/SysDictType.cs index c323a636..9d4a9ec8 100644 --- a/ZR.Model/System/SysDictType.cs +++ b/ZR.Model/System/SysDictType.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 字典类型表 diff --git a/ZR.Model/System/SysFile.cs b/ZR.Model/System/SysFile.cs index cc8eb1df..53bacc88 100644 --- a/ZR.Model/System/SysFile.cs +++ b/ZR.Model/System/SysFile.cs @@ -1,8 +1,4 @@ -using Newtonsoft.Json; -using SqlSugar; -using System; - -namespace ZR.Model.System +namespace ZR.Model.System { [Tenant("0")] [SugarTable("sys_file", "文件存储表")] diff --git a/ZR.Model/System/SysLogininfor.cs b/ZR.Model/System/SysLogininfor.cs index 79b979cd..9bd54942 100644 --- a/ZR.Model/System/SysLogininfor.cs +++ b/ZR.Model/System/SysLogininfor.cs @@ -1,7 +1,4 @@ -using SqlSugar; -using System; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// sys_logininfor 表 diff --git a/ZR.Model/System/SysMenu.cs b/ZR.Model/System/SysMenu.cs index 59f590f2..eef2dfbb 100644 --- a/ZR.Model/System/SysMenu.cs +++ b/ZR.Model/System/SysMenu.cs @@ -1,7 +1,4 @@ -using SqlSugar; -using System.Collections.Generic; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// Sys_menu表 diff --git a/ZR.Model/System/SysNotice.cs b/ZR.Model/System/SysNotice.cs index 0010e54d..31831484 100644 --- a/ZR.Model/System/SysNotice.cs +++ b/ZR.Model/System/SysNotice.cs @@ -1,5 +1,3 @@ -using SqlSugar; - namespace ZR.Model.System { /// @@ -26,7 +24,7 @@ namespace ZR.Model.System /// 公告类型 (1通知 2公告) /// [SugarColumn(ColumnName = "notice_type", ExtendedAttribute = ProteryConstant.NOTNULL)] - public char NoticeType { get; set; } + public char NoticeType { get; set; } /// /// 公告内容 /// diff --git a/ZR.Model/System/SysOperLog.cs b/ZR.Model/System/SysOperLog.cs index 3eed2894..97e059ea 100644 --- a/ZR.Model/System/SysOperLog.cs +++ b/ZR.Model/System/SysOperLog.cs @@ -1,7 +1,4 @@ using MiniExcelLibs.Attributes; -using SqlSugar; -using System; -using System.ComponentModel; namespace ZR.Model.System { diff --git a/ZR.Model/System/SysPost.cs b/ZR.Model/System/SysPost.cs index 26edfcfe..a9116e19 100644 --- a/ZR.Model/System/SysPost.cs +++ b/ZR.Model/System/SysPost.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { [SugarTable("sys_post", "岗位表")] [Tenant("0")] diff --git a/ZR.Model/System/SysRole.cs b/ZR.Model/System/SysRole.cs index 3f489466..8bc83bc4 100644 --- a/ZR.Model/System/SysRole.cs +++ b/ZR.Model/System/SysRole.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 角色表 sys_role diff --git a/ZR.Model/System/SysRoleDept.cs b/ZR.Model/System/SysRoleDept.cs index 168d048b..d160b014 100644 --- a/ZR.Model/System/SysRoleDept.cs +++ b/ZR.Model/System/SysRoleDept.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { [SugarTable("sys_role_dept", "角色部门")] [Tenant(0)] diff --git a/ZR.Model/System/SysRoleMenu.cs b/ZR.Model/System/SysRoleMenu.cs index 9a037a41..ed5c59fa 100644 --- a/ZR.Model/System/SysRoleMenu.cs +++ b/ZR.Model/System/SysRoleMenu.cs @@ -1,7 +1,4 @@ -using Newtonsoft.Json; -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 角色菜单 diff --git a/ZR.Model/System/SysTasks.cs b/ZR.Model/System/SysTasks.cs index b1a413cf..0eadae4e 100644 --- a/ZR.Model/System/SysTasks.cs +++ b/ZR.Model/System/SysTasks.cs @@ -1,6 +1,4 @@ -using SqlSugar; -using System; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace ZR.Model.System { diff --git a/ZR.Model/System/SysTasksLog.cs b/ZR.Model/System/SysTasksLog.cs index 88fbcfc8..98bf8591 100644 --- a/ZR.Model/System/SysTasksLog.cs +++ b/ZR.Model/System/SysTasksLog.cs @@ -1,7 +1,4 @@ -using SqlSugar; -using System; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 任务日志 diff --git a/ZR.Model/System/SysUser.cs b/ZR.Model/System/SysUser.cs index ff55b72d..a1a9931c 100644 --- a/ZR.Model/System/SysUser.cs +++ b/ZR.Model/System/SysUser.cs @@ -1,8 +1,4 @@ using MiniExcelLibs.Attributes; -using Newtonsoft.Json; -using SqlSugar; -using System; -using System.Collections.Generic; namespace ZR.Model.System { diff --git a/ZR.Model/System/SysUserPost.cs b/ZR.Model/System/SysUserPost.cs index 7eadfd0d..c01bab0a 100644 --- a/ZR.Model/System/SysUserPost.cs +++ b/ZR.Model/System/SysUserPost.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 用户岗位 diff --git a/ZR.Model/System/SysUserRole.cs b/ZR.Model/System/SysUserRole.cs index c1570dc9..f22c5ccd 100644 --- a/ZR.Model/System/SysUserRole.cs +++ b/ZR.Model/System/SysUserRole.cs @@ -1,6 +1,4 @@ -using SqlSugar; - -namespace ZR.Model.System +namespace ZR.Model.System { /// /// 用户角色关联表 用户N-1 角色 diff --git a/ZR.Model/System/Vo/RouterVo.cs b/ZR.Model/System/Vo/RouterVo.cs index e0756c2d..465c8d76 100644 --- a/ZR.Model/System/Vo/RouterVo.cs +++ b/ZR.Model/System/Vo/RouterVo.cs @@ -1,7 +1,4 @@ -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace ZR.Model.System.Vo +namespace ZR.Model.System.Vo { /// /// 路由展示 diff --git a/ZR.Model/System/Vo/TreeSelectVo.cs b/ZR.Model/System/Vo/TreeSelectVo.cs index b002e443..b3d57de7 100644 --- a/ZR.Model/System/Vo/TreeSelectVo.cs +++ b/ZR.Model/System/Vo/TreeSelectVo.cs @@ -1,7 +1,4 @@ -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace ZR.Model.System.Vo +namespace ZR.Model.System.Vo { /// /// Treeselect树结构实体类 diff --git a/ZR.Model/mes/md/DTO/MdProductDefineDTO.cs b/ZR.Model/mes/md/DTO/MdProductDefineDTO.cs index e64dd107..c168dabb 100644 --- a/ZR.Model/mes/md/DTO/MdProductDefineDTO.cs +++ b/ZR.Model/mes/md/DTO/MdProductDefineDTO.cs @@ -1,12 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.mes.md.DTO +namespace ZR.Model.mes.md.DTO { - public class MdProductDefineDTO + public class MdProductDefineDTO { public List list { set; get; } public int Total { set; get; } diff --git a/ZR.Model/mes/md/DTO/SearchOptionDTO.cs b/ZR.Model/mes/md/DTO/SearchOptionDTO.cs index 8b1b9f13..a199d5d0 100644 --- a/ZR.Model/mes/md/DTO/SearchOptionDTO.cs +++ b/ZR.Model/mes/md/DTO/SearchOptionDTO.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.mes.md.DTO +namespace ZR.Model.mes.md.DTO { public class SearchOptionDTO { diff --git a/ZR.Model/mes/md/MdBom.cs b/ZR.Model/mes/md/MdBom.cs index 007a62f8..4583edbf 100644 --- a/ZR.Model/mes/md/MdBom.cs +++ b/ZR.Model/mes/md/MdBom.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 物料清单 diff --git a/ZR.Model/mes/md/MdDevice.cs b/ZR.Model/mes/md/MdDevice.cs index c27dcf71..f4810e1d 100644 --- a/ZR.Model/mes/md/MdDevice.cs +++ b/ZR.Model/mes/md/MdDevice.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 设备 @@ -13,55 +9,55 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 设备编号 /// - [SugarColumn(ColumnName="device_code" )] - public string DeviceCode { get; set; } + [SugarColumn(ColumnName = "device_code")] + public string DeviceCode { get; set; } /// /// 设备名称 /// - [SugarColumn(ColumnName="device_name" )] - public string DeviceName { get; set; } + [SugarColumn(ColumnName = "device_name")] + public string DeviceName { get; set; } /// /// 设备所属工位id /// - [SugarColumn(ColumnName="fk_workstation_id" )] - public int? FkWorkstationId { get; set; } + [SugarColumn(ColumnName = "fk_workstation_id")] + public int? FkWorkstationId { get; set; } [Navigate(NavigateType.OneToOne, nameof(FkWorkstationId))] - public MdWorkstation Workstation { get; set; } + public MdWorkstation Workstation { get; set; } /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/md/MdPallet.cs b/ZR.Model/mes/md/MdPallet.cs index a78b9534..09e7a474 100644 --- a/ZR.Model/mes/md/MdPallet.cs +++ b/ZR.Model/mes/md/MdPallet.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 托盘 @@ -13,52 +9,52 @@ namespace ZR.Model.mes.md /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 托盘code /// - [SugarColumn(ColumnName="pallet_code" )] - public string PalletCode { get; set; } + [SugarColumn(ColumnName = "pallet_code")] + public string PalletCode { get; set; } /// /// 托盘name /// - [SugarColumn(ColumnName="pallet_name" )] - public string PalletName { get; set; } + [SugarColumn(ColumnName = "pallet_name")] + public string PalletName { get; set; } /// /// fk_线体id /// - [SugarColumn(ColumnName="fk_workline_id" )] - public int? FkWorklineId { get; set; } + [SugarColumn(ColumnName = "fk_workline_id")] + public int? FkWorklineId { get; set; } } } diff --git a/ZR.Model/mes/md/MdProductDefine.cs b/ZR.Model/mes/md/MdProductDefine.cs index add19b36..2c69952a 100644 --- a/ZR.Model/mes/md/MdProductDefine.cs +++ b/ZR.Model/mes/md/MdProductDefine.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 产品定义 @@ -13,77 +9,77 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 产品编号 /// - [SugarColumn(ColumnName="product_code" )] - public string ProductCode { get; set; } + [SugarColumn(ColumnName = "product_code")] + public string ProductCode { get; set; } /// /// 产品名称 /// - [SugarColumn(ColumnName="product_name" )] - public string ProductName { get; set; } + [SugarColumn(ColumnName = "product_name")] + public string ProductName { get; set; } /// /// 单位id /// - [SugarColumn(ColumnName="product_unit" )] - public int? ProductUnit { get; set; } - - [SugarColumn(IsIgnore =true)] + [SugarColumn(ColumnName = "product_unit")] + public int? ProductUnit { get; set; } + + [SugarColumn(IsIgnore = true)] public string ProductUnitName { get; set; } /// /// 产线json /// - [SugarColumn(ColumnName= "worklineArray")] - public string WorklineArray { get; set; } - + [SugarColumn(ColumnName = "worklineArray")] + public string WorklineArray { get; set; } + /// /// 预留字段1 /// - [SugarColumn(ColumnName="attre1" )] - public string Attre1 { get; set; } + [SugarColumn(ColumnName = "attre1")] + public string Attre1 { get; set; } /// /// 预留字段2 /// - [SugarColumn(ColumnName="attre2" )] - public string Attre2 { get; set; } + [SugarColumn(ColumnName = "attre2")] + public string Attre2 { get; set; } /// /// 预留字段3 /// - [SugarColumn(ColumnName="attre3" )] - public string Attre3 { get; set; } + [SugarColumn(ColumnName = "attre3")] + public string Attre3 { get; set; } /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/md/MdProrouteSort.cs b/ZR.Model/mes/md/MdProrouteSort.cs index c66a63eb..b4559edc 100644 --- a/ZR.Model/mes/md/MdProrouteSort.cs +++ b/ZR.Model/mes/md/MdProrouteSort.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 工艺组成表 @@ -13,52 +9,52 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 工艺路线id /// - [SugarColumn(ColumnName="fk_proroute_id" )] - public int? FkProrouteId { get; set; } + [SugarColumn(ColumnName = "fk_proroute_id")] + public int? FkProrouteId { get; set; } /// /// 工序 /// - [SugarColumn(ColumnName="fk_worksort_id" )] - public int? FkWorksortId { get; set; } + [SugarColumn(ColumnName = "fk_worksort_id")] + public int? FkWorksortId { get; set; } /// /// 排序 /// - [SugarColumn(ColumnName="sort" )] - public int? Sort { get; set; } + [SugarColumn(ColumnName = "sort")] + public int? Sort { get; set; } /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/md/MdTechnologicalProroute.cs b/ZR.Model/mes/md/MdTechnologicalProroute.cs index 32076c9c..22238257 100644 --- a/ZR.Model/mes/md/MdTechnologicalProroute.cs +++ b/ZR.Model/mes/md/MdTechnologicalProroute.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 工艺路线 @@ -13,47 +9,47 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 工艺流程code /// - [SugarColumn(ColumnName="proroute_code" )] - public string ProrouteCode { get; set; } + [SugarColumn(ColumnName = "proroute_code")] + public string ProrouteCode { get; set; } /// /// 工艺流程name /// - [SugarColumn(ColumnName="proroute_name" )] - public string ProrouteName { get; set; } + [SugarColumn(ColumnName = "proroute_name")] + public string ProrouteName { get; set; } /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/md/MdUnit.cs b/ZR.Model/mes/md/MdUnit.cs index 37c4efa1..a9c8d9eb 100644 --- a/ZR.Model/mes/md/MdUnit.cs +++ b/ZR.Model/mes/md/MdUnit.cs @@ -1,100 +1,100 @@ namespace ZR.Model.mes.md { - /// - /// 计量单位 - /// - [SugarTable("md_unit")] - public class MdUnit - { - /// - /// 单位ID - /// - [SugarColumn(ColumnName = "measure_id", IsPrimaryKey = true, IsIdentity = true)] - public int? MeasureId { get; set; } + /// + /// 计量单位 + /// + [SugarTable("md_unit")] + public class MdUnit + { + /// + /// 单位ID + /// + [SugarColumn(ColumnName = "measure_id", IsPrimaryKey = true, IsIdentity = true)] + public int? MeasureId { get; set; } - /// - /// 单位编码 - /// - [SugarColumn(ColumnName = "measure_code")] - public string MeasureCode { get; set; } + /// + /// 单位编码 + /// + [SugarColumn(ColumnName = "measure_code")] + public string MeasureCode { get; set; } - /// - /// 单位名称 - /// - [SugarColumn(ColumnName = "measure_name")] - public string MeasureName { get; set; } + /// + /// 单位名称 + /// + [SugarColumn(ColumnName = "measure_name")] + public string MeasureName { get; set; } - /// - /// 是否启用(不启用N,启用Y) - /// - [SugarColumn(ColumnName = "enable_flag")] - public char EnableFlag { get; set; } + /// + /// 是否启用(不启用N,启用Y) + /// + [SugarColumn(ColumnName = "enable_flag")] + public char EnableFlag { get; set; } - /// - /// 备注 - /// - [SugarColumn(ColumnName = "remark")] - public string Remark { get; set; } + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public string Remark { get; set; } - /// - /// 预留字段 - /// - [SugarColumn(ColumnName = "attr1")] - public string Attr1 { get; set; } + /// + /// 预留字段 + /// + [SugarColumn(ColumnName = "attr1")] + public string Attr1 { get; set; } - /// - /// 预留字段 - /// - [SugarColumn(ColumnName = "attr2")] - public string Attr2 { get; set; } + /// + /// 预留字段 + /// + [SugarColumn(ColumnName = "attr2")] + public string Attr2 { get; set; } - /// - /// 预留字段 - /// - [SugarColumn(ColumnName = "attr3")] - public int? Attr3 { get; set; } + /// + /// 预留字段 + /// + [SugarColumn(ColumnName = "attr3")] + public int? Attr3 { get; set; } - /// - /// 预留字段 - /// - [SugarColumn(ColumnName = "attr4")] - public string Attr4 { get; set; } + /// + /// 预留字段 + /// + [SugarColumn(ColumnName = "attr4")] + public string Attr4 { get; set; } - /// - /// 租户号 - /// - [SugarColumn(ColumnName = "TENANT_ID")] - public string TenantId { get; set; } + /// + /// 租户号 + /// + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } - /// - /// 乐观锁 - /// - [SugarColumn(ColumnName = "REVISION")] - public int? Revision { get; set; } + /// + /// 乐观锁 + /// + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } - /// - /// 创建人 - /// - [SugarColumn(ColumnName = "CREATED_BY")] - public string CreatedBy { get; set; } + /// + /// 创建人 + /// + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } - /// - /// 创建时间 - /// - [SugarColumn(ColumnName = "CREATED_TIME")] - public DateTime? CreatedTime { get; set; } + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } - /// - /// 更新人 - /// - [SugarColumn(ColumnName = "UPDATED_BY")] - public string UpdatedBy { get; set; } + /// + /// 更新人 + /// + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } - /// - /// 更新时间 - /// - [SugarColumn(ColumnName = "UPDATED_TIME")] - public DateTime? UpdatedTime { get; set; } + /// + /// 更新时间 + /// + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } public bool Contains() { diff --git a/ZR.Model/mes/md/MdWorkline.cs b/ZR.Model/mes/md/MdWorkline.cs index ef0196e0..18202221 100644 --- a/ZR.Model/mes/md/MdWorkline.cs +++ b/ZR.Model/mes/md/MdWorkline.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 线体 @@ -13,56 +9,56 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 线体code /// - [SugarColumn(ColumnName="line_code" )] - public string LineCode { get; set; } + [SugarColumn(ColumnName = "line_code")] + public string LineCode { get; set; } /// /// 线体名称 /// - [SugarColumn(ColumnName="line_name" )] - public string LineName { get; set; } + [SugarColumn(ColumnName = "line_name")] + public string LineName { get; set; } /// /// fk_工作车间 /// - [SugarColumn(ColumnName= "pk_workshop_id")] - public int? FkWorkShopId { get; set; } + [SugarColumn(ColumnName = "pk_workshop_id")] + public int? FkWorkShopId { get; set; } [Navigate(NavigateType.OneToOne, nameof(FkWorkShopId))]//一对一 SchoolId是StudentA类里面的 - public MdWorkshop Workshop { get; set; } //不能赋值只能是null + public MdWorkshop Workshop { get; set; } //不能赋值只能是null /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/md/MdWorkshop.cs b/ZR.Model/mes/md/MdWorkshop.cs index 0606e760..d655eda2 100644 --- a/ZR.Model/mes/md/MdWorkshop.cs +++ b/ZR.Model/mes/md/MdWorkshop.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 车间 @@ -13,52 +9,52 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 车间id /// - [SugarColumn(ColumnName="workshop_id" )] - public string WorkshopId { get; set; } + [SugarColumn(ColumnName = "workshop_id")] + public string WorkshopId { get; set; } /// /// 车间名称 /// - [SugarColumn(ColumnName="workshop_name" )] - public string WorkshopName { get; set; } + [SugarColumn(ColumnName = "workshop_name")] + public string WorkshopName { get; set; } /// /// 车间位置 /// - [SugarColumn(ColumnName="workshop_position" )] - public string WorkshopPosition { get; set; } + [SugarColumn(ColumnName = "workshop_position")] + public string WorkshopPosition { get; set; } /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/md/MdWorksort.cs b/ZR.Model/mes/md/MdWorksort.cs index 411be885..10aa2e61 100644 --- a/ZR.Model/mes/md/MdWorksort.cs +++ b/ZR.Model/mes/md/MdWorksort.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 工序 @@ -13,52 +9,52 @@ namespace ZR.Model.mes.md /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 工序code /// - [SugarColumn(ColumnName="worksort_code" )] - public string WorksortCode { get; set; } + [SugarColumn(ColumnName = "worksort_code")] + public string WorksortCode { get; set; } /// /// 工序名称 /// - [SugarColumn(ColumnName="worksort_name" )] - public string WorksortName { get; set; } + [SugarColumn(ColumnName = "worksort_name")] + public string WorksortName { get; set; } /// /// fk_线体id /// - [SugarColumn(ColumnName="fk_workline_id" )] - public int? FkWorklineId { get; set; } + [SugarColumn(ColumnName = "fk_workline_id")] + public int? FkWorklineId { get; set; } } } diff --git a/ZR.Model/mes/md/MdWorkstation.cs b/ZR.Model/mes/md/MdWorkstation.cs index 2385a46d..b78ca517 100644 --- a/ZR.Model/mes/md/MdWorkstation.cs +++ b/ZR.Model/mes/md/MdWorkstation.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -namespace ZR.Model.mes.md +namespace ZR.Model.mes.md { /// /// 工位 @@ -13,57 +9,57 @@ namespace ZR.Model.mes.md /// /// 流水号 /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )] - public int Id { get; set; } + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 工位code /// - [SugarColumn(ColumnName="station_code" )] - public string StationCode { get; set; } + [SugarColumn(ColumnName = "station_code")] + public string StationCode { get; set; } /// /// 工位name /// - [SugarColumn(ColumnName="station_name" )] - public string StationName { get; set; } + [SugarColumn(ColumnName = "station_name")] + public string StationName { get; set; } /// /// fk_工序id /// - [SugarColumn(ColumnName= "fk_workline_id")] - public int? FkWorklineId { get; set; } + [SugarColumn(ColumnName = "fk_workline_id")] + public int? FkWorklineId { get; set; } [Navigate(NavigateType.OneToOne, nameof(FkWorklineId))] - public MdWorkline Workline { get; set; } + public MdWorkline Workline { get; set; } /// /// 租户号 /// - [SugarColumn(ColumnName="TENANT_ID" )] - public string TenantId { get; set; } + [SugarColumn(ColumnName = "TENANT_ID")] + public string TenantId { get; set; } /// /// 乐观锁 /// - [SugarColumn(ColumnName="REVISION" )] - public int? Revision { get; set; } + [SugarColumn(ColumnName = "REVISION")] + public int? Revision { get; set; } /// /// 创建人 /// - [SugarColumn(ColumnName="CREATED_BY" )] - public string CreatedBy { get; set; } + [SugarColumn(ColumnName = "CREATED_BY")] + public string CreatedBy { get; set; } /// /// 创建时间 /// - [SugarColumn(ColumnName="CREATED_TIME" )] - public DateTime? CreatedTime { get; set; } + [SugarColumn(ColumnName = "CREATED_TIME")] + public DateTime? CreatedTime { get; set; } /// /// 更新人 /// - [SugarColumn(ColumnName="UPDATED_BY" )] - public string UpdatedBy { get; set; } + [SugarColumn(ColumnName = "UPDATED_BY")] + public string UpdatedBy { get; set; } /// /// 更新时间 /// - [SugarColumn(ColumnName="UPDATED_TIME" )] - public DateTime? UpdatedTime { get; set; } + [SugarColumn(ColumnName = "UPDATED_TIME")] + public DateTime? UpdatedTime { get; set; } } } diff --git a/ZR.Model/mes/op/DTO/OpStatisticsDTO.cs b/ZR.Model/mes/op/DTO/OpStatisticsDTO.cs index fb31a916..14b7d43d 100644 --- a/ZR.Model/mes/op/DTO/OpStatisticsDTO.cs +++ b/ZR.Model/mes/op/DTO/OpStatisticsDTO.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Model.MES.op.DTO +namespace ZR.Model.MES.op.DTO { public class OpStatisticsDTO { @@ -16,7 +10,7 @@ namespace ZR.Model.MES.op.DTO /// /// 工作车间 /// - + public string WorkshopName { get; set; } /// /// 生产日期 @@ -26,18 +20,18 @@ namespace ZR.Model.MES.op.DTO /// /// 计划数量 /// - + public int? PlanNum { get; set; } /// /// 已经生产数量 /// - + public int? ProductedNum { get; set; } /// /// 生产进度 :ProductedNum/PlanNum*100 /// - public int ProductProgressRate { get; set; } + public int ProductProgressRate { get; set; } /// /// 良品数量 /// @@ -49,33 +43,33 @@ namespace ZR.Model.MES.op.DTO /// /// 品质率: 良品数量/不良品数量*100 /// - public string QualityRate { get; set; } + public string QualityRate { get; set; } /// /// 生产开始时间 /// - + public DateTime? ProductStarttime { get; set; } /// /// 生产结束时间 /// - + public DateTime? ProductEndtime { get; set; } /// /// 是否正在生产 /// - public bool isProducting { get; set; } + public bool isProducting { get; set; } /// /// 线体id /// - + public string LineId { get; set; } /// /// 排序序号 /// - public int numSort { get; set; } + public int numSort { get; set; } /// /// 线体名称 /// @@ -84,22 +78,22 @@ namespace ZR.Model.MES.op.DTO /// /// /// - + public string CreatedBy { get; set; } /// /// /// - + public string CreatedTime { get; set; } /// /// /// - + public string UpdatedBy { get; set; } /// /// /// - + public string UpdatedTime { get; set; } /// /// diff --git a/ZR.Model/mes/op/OpStatistics.cs b/ZR.Model/mes/op/OpStatistics.cs index 17f2200f..38656fea 100644 --- a/ZR.Model/mes/op/OpStatistics.cs +++ b/ZR.Model/mes/op/OpStatistics.cs @@ -1,10 +1,4 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; - -namespace ZR.Model.MES.op +namespace ZR.Model.MES.op { namespace ZR.Model.mes.md { diff --git a/ZR.Model/mes/pro/ProWorkorder.cs b/ZR.Model/mes/pro/ProWorkorder.cs index e1a99f05..02fe373a 100644 --- a/ZR.Model/mes/pro/ProWorkorder.cs +++ b/ZR.Model/mes/pro/ProWorkorder.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.pro; - -namespace ZR.Model.mes.pro +namespace ZR.Model.mes.pro { /// /// 生产工单 diff --git a/ZR.Service/System/ArticleCategoryService.cs b/ZR.Service/System/ArticleCategoryService.cs index 9f33e26e..a5f42dcd 100644 --- a/ZR.Service/System/ArticleCategoryService.cs +++ b/ZR.Service/System/ArticleCategoryService.cs @@ -1,6 +1,5 @@ using Infrastructure.Attribute; using SqlSugar; -using System.Collections.Generic; using ZR.Model; using ZR.Model.Dto; using ZR.Model.System; diff --git a/ZR.Service/System/CacheService.cs b/ZR.Service/System/CacheService.cs index 1b5a3365..5aed9707 100644 --- a/ZR.Service/System/CacheService.cs +++ b/ZR.Service/System/CacheService.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using ZR.Common; -using ZR.Common.Cache; +using ZR.Common; namespace ZR.Service.System { diff --git a/ZR.Service/System/GenTableService.cs b/ZR.Service/System/GenTableService.cs index 47e398dc..a7742136 100644 --- a/ZR.Service/System/GenTableService.cs +++ b/ZR.Service/System/GenTableService.cs @@ -2,7 +2,6 @@ using Infrastructure.Extensions; using SqlSugar; using System; -using System.Collections.Generic; using System.Linq; using ZR.Model; using ZR.Model.System.Generate; diff --git a/ZR.Service/System/IService/IArticleCategoryService.cs b/ZR.Service/System/IService/IArticleCategoryService.cs index 9ee2bc53..7f2c2985 100644 --- a/ZR.Service/System/IService/IArticleCategoryService.cs +++ b/ZR.Service/System/IService/IArticleCategoryService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model; +using ZR.Model; using ZR.Model.Dto; using ZR.Model.System; diff --git a/ZR.Service/System/IService/ICommonLangService.cs b/ZR.Service/System/IService/ICommonLangService.cs index 5af554ae..7afd4d59 100644 --- a/ZR.Service/System/IService/ICommonLangService.cs +++ b/ZR.Service/System/IService/ICommonLangService.cs @@ -1,9 +1,6 @@ -using System; using ZR.Model; using ZR.Model.Dto; using ZR.Model.Models; -using System.Collections.Generic; -using JinianNet.JNTemplate; namespace ZR.Service.System.IService { diff --git a/ZR.Service/System/IService/IGenTableService.cs b/ZR.Service/System/IService/IGenTableService.cs index eaafa58e..d565f30f 100644 --- a/ZR.Service/System/IService/IGenTableService.cs +++ b/ZR.Service/System/IService/IGenTableService.cs @@ -1,6 +1,4 @@ -using SqlSugar; -using System.Collections.Generic; -using ZR.Model; +using ZR.Model; using ZR.Model.System.Generate; namespace ZR.Service.System.IService diff --git a/ZR.Service/System/IService/ISysConfigService.cs b/ZR.Service/System/IService/ISysConfigService.cs index ba8ddec0..87fdc221 100644 --- a/ZR.Service/System/IService/ISysConfigService.cs +++ b/ZR.Service/System/IService/ISysConfigService.cs @@ -1,4 +1,3 @@ -using System; using ZR.Model.System; namespace ZR.Service.System.IService diff --git a/ZR.Service/System/IService/ISysDeptService.cs b/ZR.Service/System/IService/ISysDeptService.cs index 0559ee56..307897bc 100644 --- a/ZR.Service/System/IService/ISysDeptService.cs +++ b/ZR.Service/System/IService/ISysDeptService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model.System; +using ZR.Model.System; using ZR.Model.System.Dto; using ZR.Model.System.Vo; diff --git a/ZR.Service/System/IService/ISysDictDataService.cs b/ZR.Service/System/IService/ISysDictDataService.cs index b0db87db..9744dd6e 100644 --- a/ZR.Service/System/IService/ISysDictDataService.cs +++ b/ZR.Service/System/IService/ISysDictDataService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model; +using ZR.Model; using ZR.Model.System; namespace ZR.Service.System.IService diff --git a/ZR.Service/System/IService/ISysDictService.cs b/ZR.Service/System/IService/ISysDictService.cs index 331d5f7f..188ce7c5 100644 --- a/ZR.Service/System/IService/ISysDictService.cs +++ b/ZR.Service/System/IService/ISysDictService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Text; -using ZR.Model; +using ZR.Model; using ZR.Model.System; namespace ZR.Service.System.IService diff --git a/ZR.Service/System/IService/ISysFileService.cs b/ZR.Service/System/IService/ISysFileService.cs index 2482bc78..19f13443 100644 --- a/ZR.Service/System/IService/ISysFileService.cs +++ b/ZR.Service/System/IService/ISysFileService.cs @@ -1,7 +1,5 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using System.Threading.Tasks; -using ZR.Model.Models; using ZR.Model.System; namespace ZR.Service.System.IService diff --git a/ZR.Service/System/IService/ISysLoginService.cs b/ZR.Service/System/IService/ISysLoginService.cs index 3043962a..074dd7b5 100644 --- a/ZR.Service/System/IService/ISysLoginService.cs +++ b/ZR.Service/System/IService/ISysLoginService.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Text; -using ZR.Model; -using ZR.Model.System.Dto; +using ZR.Model; using ZR.Model.System; +using ZR.Model.System.Dto; namespace ZR.Service.System.IService { - public interface ISysLoginService: IBaseService + public interface ISysLoginService : IBaseService { /// /// 登录 diff --git a/ZR.Service/System/IService/ISysMenuService.cs b/ZR.Service/System/IService/ISysMenuService.cs index 5896af80..b0c28663 100644 --- a/ZR.Service/System/IService/ISysMenuService.cs +++ b/ZR.Service/System/IService/ISysMenuService.cs @@ -1,8 +1,7 @@ -using System.Collections.Generic; +using ZR.Model.System; using ZR.Model.System.Dto; -using ZR.Model.System; -using ZR.Model.System.Vo; using ZR.Model.System.Generate; +using ZR.Model.System.Vo; namespace ZR.Service.System.IService { diff --git a/ZR.Service/System/IService/ISysNoticeService.cs b/ZR.Service/System/IService/ISysNoticeService.cs index 2544aa86..2bd86789 100644 --- a/ZR.Service/System/IService/ISysNoticeService.cs +++ b/ZR.Service/System/IService/ISysNoticeService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Service/System/IService/ISysPermissionService.cs b/ZR.Service/System/IService/ISysPermissionService.cs index f0ea8337..8efabca7 100644 --- a/ZR.Service/System/IService/ISysPermissionService.cs +++ b/ZR.Service/System/IService/ISysPermissionService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.System; +using ZR.Model.System; namespace ZR.Service.System.IService { diff --git a/ZR.Service/System/IService/ISysPostService.cs b/ZR.Service/System/IService/ISysPostService.cs index e65092a0..2e771838 100644 --- a/ZR.Service/System/IService/ISysPostService.cs +++ b/ZR.Service/System/IService/ISysPostService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using ZR.Model.System; -using ZR.Repository; +using ZR.Model.System; namespace ZR.Service.System.IService { diff --git a/ZR.Service/System/IService/ISysRoleService.cs b/ZR.Service/System/IService/ISysRoleService.cs index 300ba377..bf47bf1b 100644 --- a/ZR.Service/System/IService/ISysRoleService.cs +++ b/ZR.Service/System/IService/ISysRoleService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model; +using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Service/System/IService/ISysTasksLogService.cs b/ZR.Service/System/IService/ISysTasksLogService.cs index 381796aa..a09ad0d4 100644 --- a/ZR.Service/System/IService/ISysTasksLogService.cs +++ b/ZR.Service/System/IService/ISysTasksLogService.cs @@ -1,6 +1,5 @@ using System.Threading.Tasks; using ZR.Model.System; -using ZR.Repository; namespace ZR.Service.System.IService { diff --git a/ZR.Service/System/IService/ISysUserPostService.cs b/ZR.Service/System/IService/ISysUserPostService.cs index dc871a2b..93d8ceef 100644 --- a/ZR.Service/System/IService/ISysUserPostService.cs +++ b/ZR.Service/System/IService/ISysUserPostService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model.System; +using ZR.Model.System; namespace ZR.Service.System.IService { diff --git a/ZR.Service/System/IService/ISysUserRoleService.cs b/ZR.Service/System/IService/ISysUserRoleService.cs index e9de810c..141f7480 100644 --- a/ZR.Service/System/IService/ISysUserRoleService.cs +++ b/ZR.Service/System/IService/ISysUserRoleService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model; +using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Service/System/IService/ISysUserService.cs b/ZR.Service/System/IService/ISysUserService.cs index 75feef10..03944180 100644 --- a/ZR.Service/System/IService/ISysUserService.cs +++ b/ZR.Service/System/IService/ISysUserService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using ZR.Model; +using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Service/System/SeedDataService.cs b/ZR.Service/System/SeedDataService.cs index 62bd9a44..a80fc445 100644 --- a/ZR.Service/System/SeedDataService.cs +++ b/ZR.Service/System/SeedDataService.cs @@ -1,7 +1,6 @@ using Infrastructure.Extensions; using MiniExcelLibs; using SqlSugar.IOC; -using System.Collections.Generic; using System.Linq; using ZR.Common; using ZR.Model.System; @@ -54,7 +53,7 @@ namespace ZR.Service.System .WhereColumns(it => it.MenuId)//如果不是主键可以这样实现(多字段it=>new{it.x1,it.x2}) .ToStorage(); var result = x.AsInsertable.OffIdentity().ExecuteCommand();//插入可插入部分; - + string msg = $"[菜单数据] 插入{x.InsertList.Count} 错误数据{x.ErrorList.Count} 总共{x.TotalList.Count}"; return (msg, x.ErrorList, x.IgnoreList); } diff --git a/ZR.Service/System/SysDeptService.cs b/ZR.Service/System/SysDeptService.cs index 0d021611..034f78ee 100644 --- a/ZR.Service/System/SysDeptService.cs +++ b/ZR.Service/System/SysDeptService.cs @@ -3,7 +3,6 @@ using Infrastructure.Attribute; using Infrastructure.Extensions; using SqlSugar; using System; -using System.Collections.Generic; using System.Linq; using ZR.Common; using ZR.Model.System; diff --git a/ZR.Service/System/SysDictDataService.cs b/ZR.Service/System/SysDictDataService.cs index 2d4796d5..4d363fae 100644 --- a/ZR.Service/System/SysDictDataService.cs +++ b/ZR.Service/System/SysDictDataService.cs @@ -1,7 +1,6 @@ using Infrastructure.Attribute; using SqlSugar; using System; -using System.Collections.Generic; using System.Linq; using ZR.Common; using ZR.Model; diff --git a/ZR.Service/System/SysDictService.cs b/ZR.Service/System/SysDictService.cs index 53e77858..3a9826ba 100644 --- a/ZR.Service/System/SysDictService.cs +++ b/ZR.Service/System/SysDictService.cs @@ -2,7 +2,6 @@ using Infrastructure.Attribute; using SqlSugar; using System; -using System.Collections.Generic; using System.Linq; using ZR.Model; using ZR.Model.System; diff --git a/ZR.Service/System/SysLoginService.cs b/ZR.Service/System/SysLoginService.cs index 90a5612c..12e574cc 100644 --- a/ZR.Service/System/SysLoginService.cs +++ b/ZR.Service/System/SysLoginService.cs @@ -15,7 +15,7 @@ namespace ZR.Service.System /// 登录 /// [AppService(ServiceType = typeof(ISysLoginService), ServiceLifetime = LifeTime.Transient)] - public class SysLoginService: BaseService, ISysLoginService + public class SysLoginService : BaseService, ISysLoginService { private readonly ISysUserService SysUserService; @@ -45,7 +45,7 @@ namespace ZR.Service.System { logininfor.Msg = "用户名或密码错误"; AddLoginInfo(logininfor); - throw new CustomException(ResultCode.LOGIN_ERROR ,logininfor.Msg); + throw new CustomException(ResultCode.LOGIN_ERROR, logininfor.Msg); } if (user.Status == 1) { diff --git a/ZR.Service/System/SysMenuService.cs b/ZR.Service/System/SysMenuService.cs index ee7369cb..3dbcfdfa 100644 --- a/ZR.Service/System/SysMenuService.cs +++ b/ZR.Service/System/SysMenuService.cs @@ -2,7 +2,6 @@ using Infrastructure.Attribute; using Infrastructure.Extensions; using SqlSugar; using System; -using System.Collections.Generic; using System.Linq; using ZR.Common; using ZR.Model.System; diff --git a/ZR.Service/System/SysNoticeService.cs b/ZR.Service/System/SysNoticeService.cs index 9cd7048e..67295a24 100644 --- a/ZR.Service/System/SysNoticeService.cs +++ b/ZR.Service/System/SysNoticeService.cs @@ -1,6 +1,5 @@ using Infrastructure.Attribute; using SqlSugar; -using System.Collections.Generic; using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Service/System/SysPermissionService.cs b/ZR.Service/System/SysPermissionService.cs index 00beb93d..ff154fb3 100644 --- a/ZR.Service/System/SysPermissionService.cs +++ b/ZR.Service/System/SysPermissionService.cs @@ -1,6 +1,5 @@ using Infrastructure; using Infrastructure.Attribute; -using System.Collections.Generic; using ZR.Model.System; using ZR.Service.System.IService; diff --git a/ZR.Service/System/SysPostService.cs b/ZR.Service/System/SysPostService.cs index 245519d2..d026487f 100644 --- a/ZR.Service/System/SysPostService.cs +++ b/ZR.Service/System/SysPostService.cs @@ -1,5 +1,4 @@ using Infrastructure.Attribute; -using System.Collections.Generic; using ZR.Model.System; using ZR.Service.System.IService; diff --git a/ZR.Service/System/SysRoleMenuService.cs b/ZR.Service/System/SysRoleMenuService.cs index bebdee26..88e77b7f 100644 --- a/ZR.Service/System/SysRoleMenuService.cs +++ b/ZR.Service/System/SysRoleMenuService.cs @@ -1,5 +1,4 @@ using Infrastructure.Attribute; -using System.Collections.Generic; using System.Linq; using ZR.Model.System; using ZR.Service.System.IService; diff --git a/ZR.Service/System/SysRoleService.cs b/ZR.Service/System/SysRoleService.cs index 874e95e9..45bab8f5 100644 --- a/ZR.Service/System/SysRoleService.cs +++ b/ZR.Service/System/SysRoleService.cs @@ -3,7 +3,6 @@ using Infrastructure.Attribute; using SqlSugar; using System; using System.Collections; -using System.Collections.Generic; using System.Linq; using ZR.Model; using ZR.Model.System; @@ -199,7 +198,7 @@ namespace ZR.Service RoleMenuService.DeleteRoleMenuByRoleIdMenuIds(sysRoleDto.RoleId, delMenuIds); sysRoleDto.MenuIds = addMenuIds.ToList(); - sysRoleDto.DelMenuIds= delMenuIds.ToList(); + sysRoleDto.DelMenuIds = delMenuIds.ToList(); InsertRoleMenu(sysRoleDto); Console.WriteLine($"减少了{delMenuIds.Length},增加了{addMenuIds.Length}菜单"); }); diff --git a/ZR.Service/System/SysTasksLogService.cs b/ZR.Service/System/SysTasksLogService.cs index 61c9ec61..835736c2 100644 --- a/ZR.Service/System/SysTasksLogService.cs +++ b/ZR.Service/System/SysTasksLogService.cs @@ -1,10 +1,7 @@ using Infrastructure.Attribute; using System; -using System.Linq.Expressions; using System.Threading.Tasks; -using ZR.Model; using ZR.Model.System; -using ZR.Repository; using ZR.Service.System.IService; namespace ZR.Service.System diff --git a/ZR.Service/System/SysTasksQzService.cs b/ZR.Service/System/SysTasksQzService.cs index 0d12a87a..40a3f16c 100644 --- a/ZR.Service/System/SysTasksQzService.cs +++ b/ZR.Service/System/SysTasksQzService.cs @@ -1,5 +1,4 @@ -using Infrastructure; -using Infrastructure.Attribute; +using Infrastructure.Attribute; using Infrastructure.Extensions; using SqlSugar; using System; diff --git a/ZR.Service/System/SysUserRoleService.cs b/ZR.Service/System/SysUserRoleService.cs index 40b70fd3..f373818a 100644 --- a/ZR.Service/System/SysUserRoleService.cs +++ b/ZR.Service/System/SysUserRoleService.cs @@ -1,7 +1,6 @@ using Infrastructure.Attribute; using Infrastructure.Extensions; using SqlSugar; -using System.Collections.Generic; using ZR.Model; using ZR.Model.System; using ZR.Model.System.Dto; diff --git a/ZR.Service/System/SysUserService.cs b/ZR.Service/System/SysUserService.cs index 940bef80..3a4e5325 100644 --- a/ZR.Service/System/SysUserService.cs +++ b/ZR.Service/System/SysUserService.cs @@ -4,7 +4,6 @@ using Infrastructure.Extensions; using SqlSugar; using System; using System.Collections; -using System.Collections.Generic; using System.Linq; using ZR.Common; using ZR.Model; diff --git a/ZR.Service/Utils/MaterialUtils.cs b/ZR.Service/Utils/MaterialUtils.cs index 51b182e9..4cef6830 100644 --- a/ZR.Service/Utils/MaterialUtils.cs +++ b/ZR.Service/Utils/MaterialUtils.cs @@ -1,21 +1,16 @@ -using JinianNet.JNTemplate; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.wms.Dto; +using System; using ZR.Model.MES.wms; +using ZR.Model.MES.wms.Dto; namespace ZR.Service.Utils { - public class MaterialUtils:BaseService + public class MaterialUtils : BaseService { private NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); //解析外箱标签码 public ResultionPackageCodeDto ResolutionPackage(string code) { - if(code.Contains("^")) + if (code.Contains("^")) { // 初步进行解析检测,增加解析成功率 string[] splitstr = code.Split('^'); @@ -34,7 +29,7 @@ namespace ZR.Service.Utils return ResolutionPackagecode2(code); } } - + // 解析失败 return null; } diff --git a/ZR.Service/mes/md/IService/IMdBOMService.cs b/ZR.Service/mes/md/IService/IMdBOMService.cs index 532abcde..7585c48c 100644 --- a/ZR.Service/mes/md/IService/IMdBOMService.cs +++ b/ZR.Service/mes/md/IService/IMdBOMService.cs @@ -1,14 +1,8 @@ -using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.MES.md.IService { - public interface IMdBOMService + public interface IMdBOMService { int AddBom(MdBom bomItem); @@ -16,7 +10,7 @@ namespace ZR.Service.MES.md.IService public int UpdateBOM(MdBom mdBom); public int deleteBOM(int[] ids); - public List QueryBOM(string queryString); + public List QueryBOM(string queryString); public List GetAllunitList(); diff --git a/ZR.Service/mes/md/IService/IMdDeviceService.cs b/ZR.Service/mes/md/IService/IMdDeviceService.cs index b3efc88a..2bd80f83 100644 --- a/ZR.Service/mes/md/IService/IMdDeviceService.cs +++ b/ZR.Service/mes/md/IService/IMdDeviceService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.mes.md.IService { diff --git a/ZR.Service/mes/md/IService/IMdProductDefineService.cs b/ZR.Service/mes/md/IService/IMdProductDefineService.cs index 8540f0ad..78754205 100644 --- a/ZR.Service/mes/md/IService/IMdProductDefineService.cs +++ b/ZR.Service/mes/md/IService/IMdProductDefineService.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md.DTO; using ZR.Model.mes.md; +using ZR.Model.mes.md.DTO; namespace ZR.Service.mes.md.IService { diff --git a/ZR.Service/mes/md/IService/IMdTechnologicalProrouteService.cs b/ZR.Service/mes/md/IService/IMdTechnologicalProrouteService.cs index 7756b504..fbeb57ed 100644 --- a/ZR.Service/mes/md/IService/IMdTechnologicalProrouteService.cs +++ b/ZR.Service/mes/md/IService/IMdTechnologicalProrouteService.cs @@ -1,13 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.mes.md.IService { - public interface IMdTechnologicalProrouteService + public interface IMdTechnologicalProrouteService { int AddWorkProroute(MdTechnologicalProroute proroute); diff --git a/ZR.Service/mes/md/IService/IMdUnitService.cs b/ZR.Service/mes/md/IService/IMdUnitService.cs index 70ca8c2a..dfe4592f 100644 --- a/ZR.Service/mes/md/IService/IMdUnitService.cs +++ b/ZR.Service/mes/md/IService/IMdUnitService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using Newtonsoft.Json.Linq; -using ZR.Model.mes.md; +using ZR.Model.mes.md; using ZR.Model.mes.md.DTO; namespace ZR.Service.mes.md.IService; @@ -14,4 +12,3 @@ public interface IMdUnitService public int InsertUnit(MdUnit jo); public int Updateunit(MdUnit paramss); } - \ No newline at end of file diff --git a/ZR.Service/mes/md/IService/IMdWorklineService.cs b/ZR.Service/mes/md/IService/IMdWorklineService.cs index ea5866a0..4fd6d097 100644 --- a/ZR.Service/mes/md/IService/IMdWorklineService.cs +++ b/ZR.Service/mes/md/IService/IMdWorklineService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.MES.md.IService { @@ -17,7 +12,7 @@ namespace ZR.Service.MES.md.IService public int deleteWorkline(int[] ids); - public List GetMdWorkshops(int lineCode=0); + public List GetMdWorkshops(int lineCode = 0); } diff --git a/ZR.Service/mes/md/IService/IMdWorkshopService.cs b/ZR.Service/mes/md/IService/IMdWorkshopService.cs index 37ab9afc..b63dd130 100644 --- a/ZR.Service/mes/md/IService/IMdWorkshopService.cs +++ b/ZR.Service/mes/md/IService/IMdWorkshopService.cs @@ -1,18 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.mes.md.IService { - public interface IMdWorkshopService + public interface IMdWorkshopService { int AddWorkshop(MdWorkshop workshop); public (int, List) GetAll(string workshopId, string workshopName, string workshopPosition, int pageNum, int pageSize); - public int UpdateWorkshop(MdWorkshop workshop); + public int UpdateWorkshop(MdWorkshop workshop); public int deleteWorkshop(int[] ids); } diff --git a/ZR.Service/mes/md/IService/IMdWorksortService.cs b/ZR.Service/mes/md/IService/IMdWorksortService.cs index f29cc42d..16f8fa7d 100644 --- a/ZR.Service/mes/md/IService/IMdWorksortService.cs +++ b/ZR.Service/mes/md/IService/IMdWorksortService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.mes.md.IService { diff --git a/ZR.Service/mes/md/IService/IMdWorkstationService.cs b/ZR.Service/mes/md/IService/IMdWorkstationService.cs index 25b9125d..d07b8e1d 100644 --- a/ZR.Service/mes/md/IService/IMdWorkstationService.cs +++ b/ZR.Service/mes/md/IService/IMdWorkstationService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; +using ZR.Model.mes.md; namespace ZR.Service.mes.md.IService { diff --git a/ZR.Service/mes/md/MdBOMService.cs b/ZR.Service/mes/md/MdBOMService.cs index f9695932..ba83da7f 100644 --- a/ZR.Service/mes/md/MdBOMService.cs +++ b/ZR.Service/mes/md/MdBOMService.cs @@ -1,16 +1,8 @@ using Infrastructure.Attribute; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.md; -using ZR.Service.mes.md.IService; using ZR.Service.MES.md.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Service.MES.md { @@ -26,12 +18,12 @@ namespace ZR.Service.MES.md public List GetAllunitList() { - return Context.Queryable().Where(it=>it.EnableFlag=='Y').ToList(); + return Context.Queryable().Where(it => it.EnableFlag == 'Y').ToList(); } public int UpdateBOM(MdBom mdBom) { - return Context.Updateable(mdBom).WhereColumns(it => new {it.Id, it.ProductCode }).ExecuteCommand(); + return Context.Updateable(mdBom).WhereColumns(it => new { it.Id, it.ProductCode }).ExecuteCommand(); } int IMdBOMService.AddBom(MdBom bom) @@ -39,7 +31,7 @@ namespace ZR.Service.MES.md return Insert(bom); } - + (int, List) IMdBOMService.GetAll(string productCode, string productName, int pageNum, int pageSize) { @@ -60,7 +52,7 @@ namespace ZR.Service.MES.md var predicate = Expressionable.Create() .AndIF(!string.IsNullOrEmpty(productCode), it => it.ProductCode.Contains(productCode)) .AndIF(!string.IsNullOrEmpty(productName), it => it.ProductName.Contains(productName)) - .And(it=>it.ParentProductId==null) + .And(it => it.ParentProductId == null) .ToExpression(); List data = Context.Queryable().Where(predicate).ToList(); @@ -71,7 +63,7 @@ namespace ZR.Service.MES.md foreach (var item in data) { List data1 = Context.Queryable().ToTree(it => it.Child, it => it.ParentProductId, item.Id); - item.Child=data1; + item.Child = data1; } } data = data.Skip(pageSize * (pageNum - 1)).Take(pageSize).ToList(); @@ -90,10 +82,10 @@ namespace ZR.Service.MES.md var predicate = Expressionable.Create() .AndIF(!string.IsNullOrEmpty(queryString), it => it.ProductCode.Contains(queryString)) .ToExpression(); - return Context.Queryable().Where(predicate).ToList(); + return Context.Queryable().Where(predicate).ToList(); } - + } } diff --git a/ZR.Service/mes/md/MdDeviceService.cs b/ZR.Service/mes/md/MdDeviceService.cs index c3b3b782..ae3acf68 100644 --- a/ZR.Service/mes/md/MdDeviceService.cs +++ b/ZR.Service/mes/md/MdDeviceService.cs @@ -1,24 +1,17 @@ using Infrastructure.Attribute; -using JinianNet.JNTemplate; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.md; using ZR.Service.mes.md.IService; namespace ZR.Service.mes.md { [AppService(ServiceType = typeof(IMdDeviceService), ServiceLifetime = LifeTime.Transient)] - public class MdDeviceService :BaseService, IMdDeviceService + public class MdDeviceService : BaseService, IMdDeviceService { public int AddDevice(MdDevice workshop) { - return Insert(workshop); + return Insert(workshop); } public int deleteDevice(int[] ids) @@ -26,7 +19,7 @@ namespace ZR.Service.mes.md return Delete(ids); } - + public (int, List) GetAll(string deviceCode, string deviceName, int pageNum, int pageSize) { @@ -47,7 +40,7 @@ namespace ZR.Service.mes.md public List getworkstationList() { - return Context.Queryable().ToList(); + return Context.Queryable().ToList(); } } } diff --git a/ZR.Service/mes/md/MdProductDefineService.cs b/ZR.Service/mes/md/MdProductDefineService.cs index 3f8e1fa6..eda0d37c 100644 --- a/ZR.Service/mes/md/MdProductDefineService.cs +++ b/ZR.Service/mes/md/MdProductDefineService.cs @@ -1,19 +1,10 @@ using Infrastructure.Attribute; using Infrastructure.Extensions; -using JinianNet.JNTemplate; -using Microsoft.AspNetCore.Mvc.Formatters.Xml; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; using ZR.Model.mes.md; using ZR.Model.mes.md.DTO; using ZR.Service.mes.md.IService; -using static Org.BouncyCastle.Crypto.Engines.SM2Engine; namespace ZR.Service.mes.md { @@ -57,27 +48,27 @@ namespace ZR.Service.mes.md var predicate = Expressionable.Create() .AndIF(productCode.IsNotEmpty(), pro => pro.ProductCode.Contains(productCode)) .AndIF(productName.IsNotEmpty(), pro => pro.ProductName.Contains(productName)) - .AndIF(starttime.IsNotEmpty(), pro => pro.CreatedTime>=starttime) - .AndIF(endtime.IsNotEmpty(), pro => pro.CreatedTime>=endtime) + .AndIF(starttime.IsNotEmpty(), pro => pro.CreatedTime >= starttime) + .AndIF(endtime.IsNotEmpty(), pro => pro.CreatedTime >= endtime) .ToExpression(); - return Context.Queryable().Where(predicate).ToList(); + return Context.Queryable().Where(predicate).ToList(); } public MdProductDefine GetProductDefinebyPK(int measure) { - MdProductDefine product=GetId(measure); - MdUnit unit = Context.Queryable().Where(it=>it.MeasureId == product.ProductUnit).First(); + MdProductDefine product = GetId(measure); + MdUnit unit = Context.Queryable().Where(it => it.MeasureId == product.ProductUnit).First(); if (unit != null) { product.ProductUnitName = unit.MeasureName; } - + return product; } public List GetProductDefineList(string name) { - return Context.Queryable().Where(it=>it.MeasureName.Contains(name)).ToList(); + return Context.Queryable().Where(it => it.MeasureName.Contains(name)).ToList(); } public List GetProductDefineList() @@ -85,7 +76,7 @@ namespace ZR.Service.mes.md return Context.Queryable().ToList(); } - + public List GetWorklineList() { return Context.Queryable().ToList(); @@ -103,10 +94,10 @@ namespace ZR.Service.mes.md public int UpdateProductDefine(MdProductDefine paramss) { - return Update(paramss,true); + return Update(paramss, true); } - + } diff --git a/ZR.Service/mes/md/MdTechnologicalProrouteService.cs b/ZR.Service/mes/md/MdTechnologicalProrouteService.cs index 238f4d7d..7026ba6d 100644 --- a/ZR.Service/mes/md/MdTechnologicalProrouteService.cs +++ b/ZR.Service/mes/md/MdTechnologicalProrouteService.cs @@ -1,11 +1,5 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.md; using ZR.Service.mes.md.IService; @@ -24,7 +18,7 @@ namespace ZR.Service.mes.md return Delete(ids); } - public (int, List) GetAll(string ProrouteCode, string ProrouteName, int pageNum, int pageSize) + public (int, List) GetAll(string ProrouteCode, string ProrouteName, int pageNum, int pageSize) { int totalNum = 0; var predicate = Expressionable.Create() @@ -38,7 +32,7 @@ namespace ZR.Service.mes.md return (totalNum, data); } - + public int UpdateWorkProroute(MdTechnologicalProroute proroute) { diff --git a/ZR.Service/mes/md/MdUnitService.cs b/ZR.Service/mes/md/MdUnitService.cs index 33cad434..8701370d 100644 --- a/ZR.Service/mes/md/MdUnitService.cs +++ b/ZR.Service/mes/md/MdUnitService.cs @@ -1,14 +1,9 @@ -using System.Collections.Generic; -using Infrastructure.Attribute; +using Infrastructure.Attribute; using Infrastructure.Extensions; -using Newtonsoft.Json.Linq; using SqlSugar; using ZR.Model.mes.md; using ZR.Model.mes.md.DTO; -using ZR.Model.System; using ZR.Service.mes.md.IService; -using ZR.Service.System.IService; -using NotImplementedException = System.NotImplementedException; namespace ZR.Service.mes.md; @@ -29,19 +24,19 @@ public class MdUnitService : BaseService, IMdUnitService /// /// /// - public MdUnitPageDTO GetList(string name,string code,int pageNum,int pageSize) + public MdUnitPageDTO GetList(string name, string code, int pageNum, int pageSize) { int totalNum = 0; var predicate = Expressionable.Create() - .AndIF(name.IsNotEmpty(),it=>it.MeasureName.Contains(name)) - .AndIF(code.IsNotEmpty(),it=>it.MeasureCode.Contains(code)).ToExpression(); - + .AndIF(name.IsNotEmpty(), it => it.MeasureName.Contains(name)) + .AndIF(code.IsNotEmpty(), it => it.MeasureCode.Contains(code)).ToExpression(); + List data = Context.Queryable().Where(predicate).ToPageList(pageNum, pageSize, ref totalNum); MdUnitPageDTO unitPageDto = new MdUnitPageDTO(); unitPageDto.list = data; unitPageDto.Total = totalNum; - return unitPageDto ; + return unitPageDto; } public List GetList(SearchOptionDTO searchOption) @@ -52,7 +47,7 @@ public class MdUnitService : BaseService, IMdUnitService .AndIF(searchOption.measureCode.IsNotEmpty(), it => it.MeasureCode.Contains(searchOption.measureCode)) .AndIF(searchOption.measureName.IsNotEmpty(), it => it.MeasureCode.Contains(searchOption.measureName)) .ToExpression(); - return Context.Queryable().Where(predicate).ToList(); + return Context.Queryable().Where(predicate).ToList(); } /// @@ -70,5 +65,5 @@ public class MdUnitService : BaseService, IMdUnitService return Insert(jo); } - public int Updateunit(MdUnit jo) => Update(jo,false); + public int Updateunit(MdUnit jo) => Update(jo, false); } \ No newline at end of file diff --git a/ZR.Service/mes/md/MdWorklineService.cs b/ZR.Service/mes/md/MdWorklineService.cs index 26dd1c35..1a4cce70 100644 --- a/ZR.Service/mes/md/MdWorklineService.cs +++ b/ZR.Service/mes/md/MdWorklineService.cs @@ -1,13 +1,6 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.md; -using ZR.Service.mes.md.IService; using ZR.Service.MES.md.IService; namespace ZR.Service.MES.md @@ -47,10 +40,10 @@ namespace ZR.Service.MES.md public List GetMdWorkshops(int lineCode = 0) { - if(lineCode == 0) + if (lineCode == 0) return Context.Queryable().ToList(); else - return Context.Queryable().Where(it=>it.Equals(lineCode)).ToList(); + return Context.Queryable().Where(it => it.Equals(lineCode)).ToList(); } } } diff --git a/ZR.Service/mes/md/MdWorkshopService.cs b/ZR.Service/mes/md/MdWorkshopService.cs index 03a47c92..2cb55f26 100644 --- a/ZR.Service/mes/md/MdWorkshopService.cs +++ b/ZR.Service/mes/md/MdWorkshopService.cs @@ -1,16 +1,7 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; using ZR.Model.mes.md; -using ZR.Model.mes.md.DTO; using ZR.Service.mes.md.IService; -using static Org.BouncyCastle.Crypto.Engines.SM2Engine; namespace ZR.Service.mes.md { @@ -48,6 +39,6 @@ namespace ZR.Service.mes.md { return Update(workshop, true); } - + } } diff --git a/ZR.Service/mes/md/MdWorksortService.cs b/ZR.Service/mes/md/MdWorksortService.cs index d1736db1..9d28a0a2 100644 --- a/ZR.Service/mes/md/MdWorksortService.cs +++ b/ZR.Service/mes/md/MdWorksortService.cs @@ -1,11 +1,5 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.md; using ZR.Service.mes.md.IService; diff --git a/ZR.Service/mes/md/MdWorkstationService.cs b/ZR.Service/mes/md/MdWorkstationService.cs index 546a9fae..f1d32f23 100644 --- a/ZR.Service/mes/md/MdWorkstationService.cs +++ b/ZR.Service/mes/md/MdWorkstationService.cs @@ -1,18 +1,12 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.md; using ZR.Service.mes.md.IService; namespace ZR.Service.mes.md { [AppService(ServiceType = typeof(IMdWorkstationService), ServiceLifetime = LifeTime.Transient)] - public class MdWorkstationService : BaseService, IMdWorkstationService + public class MdWorkstationService : BaseService, IMdWorkstationService { public int AddWorkshop(MdWorkstation workshop) { diff --git a/ZR.Service/mes/mm/IService/IMaterialInputService.cs b/ZR.Service/mes/mm/IService/IMaterialInputService.cs index 5c2b1880..7197c5b3 100644 --- a/ZR.Service/mes/mm/IService/IMaterialInputService.cs +++ b/ZR.Service/mes/mm/IService/IMaterialInputService.cs @@ -1,11 +1,4 @@ -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model; -using ZR.Model.MES.mm; +using ZR.Model.MES.mm; using ZR.Model.MES.mm.Dto; using ZR.Model.MES.pro; @@ -26,7 +19,7 @@ namespace ZR.Service.mes.mm.IService string[] Getfabgopoints(); - string AGV_schedule(string start_point, string end_point,string agvCode); + string AGV_schedule(string start_point, string end_point, string agvCode); string EmergencyStopAgv(string reqCode); int FinishBatchingTask(string start_point, string end_point, string taskId); diff --git a/ZR.Service/mes/mm/IService/IMmAgvLocationService.cs b/ZR.Service/mes/mm/IService/IMmAgvLocationService.cs index 539edcd1..88b768ca 100644 --- a/ZR.Service/mes/mm/IService/IMmAgvLocationService.cs +++ b/ZR.Service/mes/mm/IService/IMmAgvLocationService.cs @@ -1,8 +1,5 @@ -using System; using ZR.Model; using ZR.Model.Dto; - -using System.Collections.Generic; using ZR.Model.MES.mm; namespace ZR.Service.mes.mm.IService @@ -20,11 +17,11 @@ namespace ZR.Service.mes.mm.IService int UpdateMmAgvLocation(MmAgvLocation parm); - List<(int,string)> ListAreaOptions(); + List<(int, string)> ListAreaOptions(); int Updatestatus(int index, int status); - AGVstatus CallagvStatus(int agvCode); + AGVstatus CallagvStatus(int agvCode); } } diff --git a/ZR.Service/mes/mm/IService/IMmFinishedwarehouseService.cs b/ZR.Service/mes/mm/IService/IMmFinishedwarehouseService.cs index 76f5131e..c030e1a2 100644 --- a/ZR.Service/mes/mm/IService/IMmFinishedwarehouseService.cs +++ b/ZR.Service/mes/mm/IService/IMmFinishedwarehouseService.cs @@ -1,14 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Service.mes.mm.IService +namespace ZR.Service.mes.mm.IService { public interface IMmFinishedwarehouseService { string[] Finish_point(); string[] Finish_point_pack(); - } + } } diff --git a/ZR.Service/mes/mm/MaterialInputService.cs b/ZR.Service/mes/mm/MaterialInputService.cs index cdfb040d..d198d1a6 100644 --- a/ZR.Service/mes/mm/MaterialInputService.cs +++ b/ZR.Service/mes/mm/MaterialInputService.cs @@ -1,29 +1,15 @@ -using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.op.ZR.Model.mes.md; -using ZR.Service.MES.op.IService; -using ZR.Service; -using ZR.Service.mes.mm.IService; - -using ZR.Model.MES.mm; -using ZR.Model.MES.pro; -using System.Globalization; -using static System.Runtime.InteropServices.JavaScript.JSType; -using ZR.Model.MES.mm.Dto; +using Infrastructure; +using Infrastructure.Attribute; using SqlSugar; -using Microsoft.Extensions.Hosting; -using ZR.Model; -using ZR.Model.MES.wms; +using System; +using System.Globalization; +using System.Linq; using System.Text.Json; -using Infrastructure; -using ZR.Repository; -using System.Numerics; -using ZR.Model.mes.pro; +using ZR.Model.MES.mm; +using ZR.Model.MES.mm.Dto; +using ZR.Model.MES.pro; +using ZR.Model.MES.wms; +using ZR.Service.mes.mm.IService; namespace ZR.Service.mes.mm { @@ -80,7 +66,7 @@ namespace ZR.Service.mes.mm /// public (List, int) Getworkorderlist(WorkorderqueryDto query) { - + DateTime datetimespan = new DateTime(query.datetimespan.Year, query.datetimespan.Month, query.datetimespan.Day, 0, 0, 0); // 获取年份和周数 @@ -91,7 +77,7 @@ namespace ZR.Service.mes.mm // 获取这一周中的第几天 DayOfWeek dayOfWeek = datetimespan.DayOfWeek; int dayOfWeekNumber = (int)dayOfWeek; // 将 DayOfWeek 枚举转换为从 1 开始的数字 - Console.WriteLine("<-获取工单列表-> "+ year+"年"+week+"周"+ dayOfWeekNumber+"日"); + Console.WriteLine("<-获取工单列表-> " + year + "年" + week + "周" + dayOfWeekNumber + "日"); logger.Error("<-获取工单列表-> " + year + "年" + week + "周" + dayOfWeekNumber + "日"); //todo 已经和正在配料的工单号和毛坯号不能变?????? int total = 0; @@ -147,7 +133,7 @@ namespace ZR.Service.mes.mm int skip = ((query.pageNum ?? 1) - 1) * (query.pageSize ?? 10); var returndata = WorkorderList - .OrderBy(it=>it.Sort) + .OrderBy(it => it.Sort) .Skip(skip) .Take(query.pageSize ?? 10) .ToList(); @@ -271,7 +257,7 @@ namespace ZR.Service.mes.mm /// /// /// - public string AGV_schedule(string start_point, string end_point,string agvCode= "1743") + public string AGV_schedule(string start_point, string end_point, string agvCode = "1743") { // Context.Updateable().Where(it => it.Coordinate == start_point).SetColumns(it => it.Status == 0).ExecuteCommand(); // Context.Updateable().Where(it => it.Coordinate == end_point).SetColumns(it => it.Status == 1).ExecuteCommand(); @@ -288,7 +274,7 @@ namespace ZR.Service.mes.mm if (end_point == "R1" || start_point == "R1") { task.taskTyp = "KLC"; - + } task.positionCodePath = new List @@ -379,8 +365,8 @@ namespace ZR.Service.mes.mm if (!string.IsNullOrEmpty(task.Blanknumber)) { //1 扣除库存 - Context.Updateable().SetColumns(it=>it.Quantity== it.Quantity-task.PreviousNumbered) - .Where(it=>it.BlankNum==task.Blanknumber).ExecuteCommand(); + Context.Updateable().SetColumns(it => it.Quantity == it.Quantity - task.PreviousNumbered) + .Where(it => it.BlankNum == task.Blanknumber).ExecuteCommand(); //2 增加库存记录 WmBlankRecord res = new WmBlankRecord(); res.Id = SnowFlakeSingle.Instance.NextId().ToString(); diff --git a/ZR.Service/mes/mm/MmAgvLocationService.cs b/ZR.Service/mes/mm/MmAgvLocationService.cs index 155b8a4c..1507dd00 100644 --- a/ZR.Service/mes/mm/MmAgvLocationService.cs +++ b/ZR.Service/mes/mm/MmAgvLocationService.cs @@ -1,14 +1,10 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; +using System.Linq; using ZR.Model; using ZR.Model.Dto; - -using ZR.Repository; - -using System.Linq; using ZR.Model.MES.mm; +using ZR.Repository; using ZR.Service.mes.mm.IService; namespace ZR.Service.Business @@ -27,7 +23,7 @@ namespace ZR.Service.Business public PagedInfo GetList(MmAgvLocationQueryDto parm) { var predicate = Expressionable.Create() - .AndIF(parm.areaCode!=0,it=>it.AreaCode==parm.areaCode); + .AndIF(parm.areaCode != 0, it => it.AreaCode == parm.areaCode); var response = Queryable() .Where(predicate.ToExpression()) @@ -89,7 +85,7 @@ namespace ZR.Service.Business /// 获取地域选择 /// /// - public List<(int, string)> ListAreaOptions() + public List<(int, string)> ListAreaOptions() { // 使用 LINQ 查询获取结果 var queryResult = Context.Queryable() @@ -118,7 +114,7 @@ namespace ZR.Service.Business /// public int Updatestatus(int index, int status) { - return Context.Updateable().Where(it=>it.Id==index).SetColumns(it=>it.Status==status).ExecuteCommand(); + return Context.Updateable().Where(it => it.Id == index).SetColumns(it => it.Status == status).ExecuteCommand(); } /// diff --git a/ZR.Service/mes/mm/MmFinishedwarehouseService.cs b/ZR.Service/mes/mm/MmFinishedwarehouseService.cs index c7fe57c6..2561e227 100644 --- a/ZR.Service/mes/mm/MmFinishedwarehouseService.cs +++ b/ZR.Service/mes/mm/MmFinishedwarehouseService.cs @@ -1,10 +1,4 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.MES.mm; using ZR.Service.mes.mm.IService; @@ -19,7 +13,7 @@ namespace ZR.Service.mes.mm public string[] Finish_point() { List positions = Context.Queryable() - .Where(it => it.AreaCode == 4|| it.AreaCode == 5|| it.AreaCode == 8) + .Where(it => it.AreaCode == 4 || it.AreaCode == 5 || it.AreaCode == 8) .ToList(); string[] cors = new string[positions.Count]; diff --git a/ZR.Service/mes/op/IService/IOperationService.cs b/ZR.Service/mes/op/IService/IOperationService.cs index b98d4156..e167f603 100644 --- a/ZR.Service/mes/op/IService/IOperationService.cs +++ b/ZR.Service/mes/op/IService/IOperationService.cs @@ -1,20 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.op.DTO; -using ZR.Model.MES.op.ZR.Model.mes.md; -using ZR.Model.MES.qc; +using ZR.Model.MES.op.DTO; namespace ZR.Service.MES.op.IService { - public interface IOperationService + public interface IOperationService { public List GetAllData(string workshopID); - public (List,int) GueryQualityStatistics(string workorderid, int pageNum, int pageSize, int year = -1, int week = -1, int date = -1); + public (List, int) GueryQualityStatistics(string workorderid, int pageNum, int pageSize, int year = -1, int week = -1, int date = -1); public List QueryDetailsOfDetection(string fkWorkorderId, int order); } diff --git a/ZR.Service/mes/op/OperationService.cs b/ZR.Service/mes/op/OperationService.cs index 42766764..afd1f277 100644 --- a/ZR.Service/mes/op/OperationService.cs +++ b/ZR.Service/mes/op/OperationService.cs @@ -1,27 +1,13 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; -using ZR.Model.MES.op.ZR.Model.mes.md; -using ZR.Service.MES.md.IService; -using ZR.Service; -using ZR.Service.MES.op.IService; -using ZR.Model.MES.op.DTO; -using Microsoft.AspNetCore.Http.HttpResults; -using Org.BouncyCastle.Asn1.Esf; -using ZR.Model.MES.qc; using SqlSugar; -using ZR.Model.mes.pro; -using static System.Runtime.InteropServices.JavaScript.JSType; -using System.Drawing; -using Newtonsoft.Json; -using ZR.Model.MES.qu; -using static Microsoft.Extensions.Logging.EventSource.LoggingEventSource; +using System; +using ZR.Model.MES.op.DTO; +using ZR.Model.MES.op.ZR.Model.mes.md; using ZR.Model.MES.pro; +using ZR.Model.MES.qc; +using ZR.Model.MES.qc.DTO; +using ZR.Model.MES.qu; +using ZR.Service.MES.op.IService; namespace ZR.Service.MES.op { @@ -33,25 +19,25 @@ namespace ZR.Service.MES.op decimal myDecimal = 123.456789m; string formattedDecimal = myDecimal.ToString("0.00"); // 保留两位小数 - List OpStatisticsDTOList= new List(); - List OpStatisticsList =Queryable().Where(it => it.WorkshopId == workshopID ).ToList(); + List OpStatisticsDTOList = new List(); + List OpStatisticsList = Queryable().Where(it => it.WorkshopId == workshopID).ToList(); foreach (var OpStatistics in OpStatisticsList) { - OpStatisticsDTO opStatisticsDTO=new OpStatisticsDTO(); + OpStatisticsDTO opStatisticsDTO = new OpStatisticsDTO(); opStatisticsDTO.WorkshopId = OpStatistics.WorkshopId; opStatisticsDTO.WorkshopName = OpStatistics.WorkshopName; opStatisticsDTO.ProductDate = OpStatistics.ProductDate; opStatisticsDTO.PlanNum = OpStatistics.PlanNum; opStatisticsDTO.ProductedNum = OpStatistics.ProductedNum; - decimal num1 = (decimal) OpStatistics.ProductedNum / (decimal)OpStatistics.PlanNum*100; - opStatisticsDTO.ProductProgressRate = (int)num1 ; + decimal num1 = (decimal)OpStatistics.ProductedNum / (decimal)OpStatistics.PlanNum * 100; + opStatisticsDTO.ProductProgressRate = (int)num1; opStatisticsDTO.GoodproductsNum = OpStatistics.GoodproductsNum; opStatisticsDTO.DefectiveProductsNum = OpStatistics.DefectiveProductsNum; decimal num2 = (decimal)OpStatistics.DefectiveProductsNum / (decimal)(OpStatistics.GoodproductsNum + OpStatistics.DefectiveProductsNum); opStatisticsDTO.QualityRate = num2.ToString("f2"); opStatisticsDTO.ProductStarttime = OpStatistics.ProductStarttime; opStatisticsDTO.ProductEndtime = OpStatistics.ProductEndtime; - if(DateTime.Now> opStatisticsDTO.ProductStarttime&& DateTime.Now < opStatisticsDTO.ProductEndtime) + if (DateTime.Now > opStatisticsDTO.ProductStarttime && DateTime.Now < opStatisticsDTO.ProductEndtime) { opStatisticsDTO.isProducting = true; @@ -84,7 +70,7 @@ namespace ZR.Service.MES.op /// /// /// - public (List,int) GueryQualityStatistics(string workorderid ,int pageNum, int pageSize, int year = -1, int week = -1, int date = -1) + public (List, int) GueryQualityStatistics(string workorderid, int pageNum, int pageSize, int year = -1, int week = -1, int date = -1) { var predicate = Expressionable.Create() .AndIF(year > 0, p => p.Year == year) @@ -94,15 +80,16 @@ namespace ZR.Service.MES.op var predicate2 = Expressionable.Create() - .AndIF(!string.IsNullOrEmpty(workorderid),q=>q.FkWorkorderId== workorderid) + .AndIF(!string.IsNullOrEmpty(workorderid), q => q.FkWorkorderId == workorderid) .ToExpression(); int totalCount = 0; - + var query5 = Context.Queryable() .LeftJoin((q, p) => q.FkWorkorderId == p.Id) .Where(predicate2) - .Select((q, p) => new QcFqcDTO { + .Select((q, p) => new QcFqcDTO + { Year = p.Year, Week = p.Week, Date = p.Date, @@ -123,14 +110,14 @@ namespace ZR.Service.MES.op QualifiedNum03 = q.QualifiedNum03, PolishNum03 = q.PolishNum03, ScrapNum03 = q.ScrapNum03, - FirstgoodNum=q.FirstgoodNum, - FirstgoodRate=q.FirstgoodRate, - FinalgoodRate=q.FinalgoodRate, - FinalgoodNum=q.FinalgoodNum, + FirstgoodNum = q.FirstgoodNum, + FirstgoodRate = q.FirstgoodRate, + FinalgoodRate = q.FinalgoodRate, + FinalgoodNum = q.FinalgoodNum, }).MergeTable(); - List QcFqcDTOList = query5.Where(predicate).ToPageList(pageNum, pageSize,ref totalCount); + List QcFqcDTOList = query5.Where(predicate).ToPageList(pageNum, pageSize, ref totalCount); return (QcFqcDTOList, totalCount); } @@ -143,11 +130,11 @@ namespace ZR.Service.MES.op public List QueryDetailsOfDetection(string fkWorkorderId, int order) { List detailsList = null; - switch(order) + switch (order) { case 1: // 首检抛光数量 - detailsList = Context.Queryable().LeftJoin((f, i) => SqlFunc.ToInt32(f.FKInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FKInpectionId, "_1_")).Where(f=>f.FKWorkorderId== fkWorkorderId) + detailsList = Context.Queryable().LeftJoin((f, i) => SqlFunc.ToInt32(f.FKInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FKInpectionId, "_1_")).Where(f => f.FKWorkorderId == fkWorkorderId) .Select((f, i) => new DetailsOfDetectionDTO { InspectionName = i.InspectionName, @@ -164,11 +151,11 @@ namespace ZR.Service.MES.op }).ToList(); break; - + case 3: // 首检报废数量 detailsList = Context.Queryable().LeftJoin((f, i) => SqlFunc.ToInt32(f.FKInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FKInpectionId, "_3_")) - + .Select((f, i) => new DetailsOfDetectionDTO { InspectionName = i.InspectionName, @@ -176,7 +163,7 @@ namespace ZR.Service.MES.op }).ToList(); break; - + case 4: // 二检打磨数量 detailsList = Context.Queryable().LeftJoin((f, i) => SqlFunc.ToInt32(f.FkInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FkInpectionId, "_2_")) @@ -218,8 +205,8 @@ namespace ZR.Service.MES.op }).ToList(); break; - - default:break; + + default: break; } diff --git a/ZR.Service/mes/pro/IService/IProWorkorderService.cs b/ZR.Service/mes/pro/IService/IProWorkorderService.cs index 86702bca..c2de2f37 100644 --- a/ZR.Service/mes/pro/IService/IProWorkorderService.cs +++ b/ZR.Service/mes/pro/IService/IProWorkorderService.cs @@ -1,20 +1,13 @@ using Microsoft.AspNetCore.Http; -using Microsoft.VisualBasic; using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.pro; -using ZR.Model.MES.op.DTO; using ZR.Model.MES.pro.DTO; namespace ZR.Service.mes.pro.IService { public interface IProWorkorderService { - public (List, int) GetWorkorderList(int pageNum, int pageSize, int year, int week,int date, int isSchedule); + public (List, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, int isSchedule); public int SetWorkorderSechedule(string id, DateTime arrange_starttime, DateTime arrange_endtime); @@ -25,7 +18,7 @@ namespace ZR.Service.mes.pro.IService public int ReleaseProduction(string id, HttpContext httpContext); - public GanttTaskDTO GetGanttList(int year,int week,int date); + public GanttTaskDTO GetGanttList(int year, int week, int date); } } diff --git a/ZR.Service/mes/pro/IService/IProWorkorderServiceV2.cs b/ZR.Service/mes/pro/IService/IProWorkorderServiceV2.cs index ebe07319..9ef4ee46 100644 --- a/ZR.Service/mes/pro/IService/IProWorkorderServiceV2.cs +++ b/ZR.Service/mes/pro/IService/IProWorkorderServiceV2.cs @@ -1,16 +1,4 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.VisualBasic; -using Model.DBModel; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ZR.Model.MES.op.DTO; -using ZR.Model.MES.pro; +using ZR.Model.MES.pro; using ZR.Model.MES.pro.DTO; namespace ZR.Service.mes.pro.IService @@ -31,14 +19,14 @@ namespace ZR.Service.mes.pro.IService public int DeleteAllWorkorder(int year, int week, int date); - public int AddWorkOrder(ProWorkorder_v2 workorder); + public int AddWorkOrder(ProWorkorder_v2 workorder); public int DeleteWorkOrder(string id); public int UpdateWorkOrder(ProWorkorder_v2 workorder); - public int UpdateworkorderSort(string id ,int sort); - public int UpdateworkorderSort2(string oldId,int oldSort, string newId,int newSort); + public int UpdateworkorderSort(string id, int sort); + public int UpdateworkorderSort2(string oldId, int oldSort, string newId, int newSort); public int StartWorkOrder(string id); diff --git a/ZR.Service/mes/pro/IService/IProWorkplanService.cs b/ZR.Service/mes/pro/IService/IProWorkplanService.cs index fe371233..200cd8b8 100644 --- a/ZR.Service/mes/pro/IService/IProWorkplanService.cs +++ b/ZR.Service/mes/pro/IService/IProWorkplanService.cs @@ -1,18 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.pro; -using ZR.Model.MES.op.DTO; +using ZR.Model.mes.pro; namespace ZR.Service.mes.pro.IService { public interface IProWorkplanService { - public (List,int) GetAllData(int pageNum, int pageSize, int year, int week, string partNumber, string color); + public (List, int) GetAllData(int pageNum, int pageSize, int year, int week, string partNumber, string color); /// /// 根据计划ID,获取对象 diff --git a/ZR.Service/mes/pro/IService/IProWorkplanServiceV2.cs b/ZR.Service/mes/pro/IService/IProWorkplanServiceV2.cs index 0ff4cdc2..8b272bf9 100644 --- a/ZR.Service/mes/pro/IService/IProWorkplanServiceV2.cs +++ b/ZR.Service/mes/pro/IService/IProWorkplanServiceV2.cs @@ -1,15 +1,6 @@ using Model.DBModel; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.pro; -using ZR.Model.MES.op.DTO; using ZR.Model.MES.pro.DTO; -using ZR.Model.mes.pro; namespace ZR.Service.mes.pro.IService { @@ -30,11 +21,11 @@ namespace ZR.Service.mes.pro.IService public int UpdateWorkPlan(ProWorklplan_v2 proWorkplan); public int DeleteWorkPlan(string id); - public int DeleteAllWorkPlan(int year,int week); + public int DeleteAllWorkPlan(int year, int week); - public string ImportExceldata(List proWorklplans); + public string ImportExceldata(List proWorklplans); - public (string,string) ExportExceldata(int year, int week); + public (string, string) ExportExceldata(int year, int week); /// /// 生产计划字段数据检查 @@ -43,7 +34,7 @@ namespace ZR.Service.mes.pro.IService /// 0-正常 1-物料号不存在 2-物料号与描述不匹配 public int CheckWorkPlan(ProWorklplan_v2 proWorkplan); - public WorkplanSummaryDto GetWeekSummary(int year ,int week); + public WorkplanSummaryDto GetWeekSummary(int year, int week); /// /// 根据生产计划ID,获取工单列表 diff --git a/ZR.Service/mes/pro/IService/IWmPackingrecordService.cs b/ZR.Service/mes/pro/IService/IWmPackingrecordService.cs index 5c350f6b..67512f83 100644 --- a/ZR.Service/mes/pro/IService/IWmPackingrecordService.cs +++ b/ZR.Service/mes/pro/IService/IWmPackingrecordService.cs @@ -1,6 +1,4 @@ -using System; using ZR.Model; -using System.Collections.Generic; using ZR.Model.mes.pro; using ZR.Model.MES.pro.DTO; diff --git a/ZR.Service/mes/pro/ProWorkorderServiceV2.cs b/ZR.Service/mes/pro/ProWorkorderServiceV2.cs index fae8337a..f1b4cb21 100644 --- a/ZR.Service/mes/pro/ProWorkorderServiceV2.cs +++ b/ZR.Service/mes/pro/ProWorkorderServiceV2.cs @@ -1,32 +1,15 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.DependencyInjection; - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; -using ZR.Common; -using ZR.Service.mes.pro.IService; -using ZR.Service.MES.md.IService; -using static System.Net.WebRequestMethods; -using JinianNet.JNTemplate; -using static Aliyun.OSS.Model.LiveChannelStat; -using ZR.Model.MES.pro.DTO; -using ZR.Model.MES.qu; -using ZR.Model.MES.pro; -using Model.DBModel; -using Infrastructure; +using Infrastructure; +using Infrastructure.Attribute; using Microsoft.AspNetCore.Hosting; using MiniExcelLibs; -using System.IO; -using SqlSugar.Extensions; -using ZR.Model.mes.pro; +using Model.DBModel; using SqlSugar; +using System; +using System.IO; +using ZR.Model.MES.pro; +using ZR.Model.MES.pro.DTO; using ZR.Model.MES.wms; +using ZR.Service.mes.pro.IService; namespace ZR.Service.mes.pro { @@ -53,7 +36,7 @@ namespace ZR.Service.mes.pro Id = item.Id, Week = item.Week, Year = item.Year, - Date = item.Date, + Date = item.Date, BlankNumber = item.BlankNumber, ClientWorkorder = item.ClientWorkorder, FinishedPartNumber = item.FinishedPartNumber, @@ -90,10 +73,10 @@ namespace ZR.Service.mes.pro .AndIF(year > 0, it => it.Year == year) .AndIF(week > 0, it => it.Week == week) .AndIF(date > 0, it => it.Date == date) - .ToExpression(); + .ToExpression(); int totalCount = 0; - List proWorkorderList = Context.Queryable().Where(predicate).Where(it=>it.Remark3=="是").OrderBy(it => it.Sort).ToPageList(pageNum, pageSize, ref totalCount); + List proWorkorderList = Context.Queryable().Where(predicate).Where(it => it.Remark3 == "是").OrderBy(it => it.Sort).ToPageList(pageNum, pageSize, ref totalCount); return (proWorkorderList, totalCount); } @@ -305,7 +288,7 @@ namespace ZR.Service.mes.pro workorder.Remark3 = "是"; } - return Context.Updateable(workorder).IgnoreColumns(it => new { it.CreatedBy, it.CreatedTime,it.Remark4,it.Sort }).ExecuteCommand(); + return Context.Updateable(workorder).IgnoreColumns(it => new { it.CreatedBy, it.CreatedTime, it.Remark4, it.Sort }).ExecuteCommand(); } /// @@ -317,14 +300,14 @@ namespace ZR.Service.mes.pro /// public int UpdateworkorderSort(string id, int sort) { - if(sort > 0) + if (sort > 0) { int finalreuslt = 0; int max = Convert.ToInt32(sort.ToString().Substring(0, 6) + "999"); int result = Context.Updateable().Where(it => it.Sort >= sort && it.Sort <= max).SetColumns(it => it.Sort == it.Sort + 1).ExecuteCommand(); - + if (result > 0) { finalreuslt = Context.Updateable().Where(it => it.Id == id).SetColumns(it => it.Sort == sort).ExecuteCommand(); @@ -344,7 +327,7 @@ namespace ZR.Service.mes.pro /// /// public int StartWorkOrder(string id) - { + { return Context.Updateable().Where(it => it.Id == id) .SetColumns(it => it.Status == 1).ExecuteCommand(); } @@ -359,7 +342,7 @@ namespace ZR.Service.mes.pro /// public int CancelWorkOrder(string id) { - + return Context.Updateable().Where(it => it.Id == id) .SetColumns(it => it.Status == 0).ExecuteCommand(); } @@ -376,25 +359,26 @@ namespace ZR.Service.mes.pro public int GenerateWorkorder(int year, int week, int date) { - if (year > 0 && week > 0 && date >0) + if (year > 0 && week > 0 && date > 0) { DateTime week_first = GetWeekStartTime(year, week); - string date_now = week_first.AddDays(date-1).ToString("yyMMdd"); + string date_now = week_first.AddDays(date - 1).ToString("yyMMdd"); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine($"生成工单号前缀{date_now}"); - List workorderList= Context.Queryable().Where(it => it.Year == year && it.Week == week && it.Date == date).Where(it=>it.Remark3=="是").ToList(); - - foreach(ProWorkorder_v2 item in workorderList) { + List workorderList = Context.Queryable().Where(it => it.Year == year && it.Week == week && it.Date == date).Where(it => it.Remark3 == "是").ToList(); + + foreach (ProWorkorder_v2 item in workorderList) + { int index = workorderList.IndexOf(item) + 1; - item.ClientWorkorder = date_now + index.ToString("000"); + item.ClientWorkorder = date_now + index.ToString("000"); } - - return Context.Updateable(workorderList).ExecuteCommand(); + + return Context.Updateable(workorderList).ExecuteCommand(); } - return 0; + return 0; } /// @@ -407,9 +391,9 @@ namespace ZR.Service.mes.pro static DateTime GetDateFromWeek(int year, int weekNumber, DayOfWeek dayOfWeek) { DateTime jan1 = new DateTime(year, 1, 1); - int daysOffset = (int)dayOfWeek- (int)jan1.DayOfWeek; + int daysOffset = (int)dayOfWeek - (int)jan1.DayOfWeek; - DateTime firstDayOfWeek = jan1.AddDays(7 * (weekNumber - 1) - daysOffset+2); + DateTime firstDayOfWeek = jan1.AddDays(7 * (weekNumber - 1) - daysOffset + 2); return firstDayOfWeek; } @@ -418,13 +402,13 @@ namespace ZR.Service.mes.pro /// /// 周数,格式:yyyywww /// - private DateTime GetWeekStartTime(int year,int weekNum) + private DateTime GetWeekStartTime(int year, int weekNum) { - + //本年1月1日 DateTime firstOfYear = new DateTime(year, 1, 1); //周数 - + //本年1月1日与本周星期一相差的天数 int dayDiff = (firstOfYear.DayOfWeek == DayOfWeek.Sunday ? 7 : Convert.ToInt32(firstOfYear.DayOfWeek)) - 1; //第一周的星期一 @@ -439,7 +423,7 @@ namespace ZR.Service.mes.pro int finalreuslt = 0; int result1 = Context.Updateable().Where(it => it.Id == oldId).SetColumns(it => it.Sort == newSort).ExecuteCommand(); int result2 = Context.Updateable().Where(it => it.Id == newId).SetColumns(it => it.Sort == oldSort).ExecuteCommand(); - if (result1 > 0 && result2 >0) + if (result1 > 0 && result2 > 0) { finalreuslt = 1; } diff --git a/ZR.Service/mes/pro/ProWorkplanService.cs b/ZR.Service/mes/pro/ProWorkplanService.cs index fc08846a..1f76e8f5 100644 --- a/ZR.Service/mes/pro/ProWorkplanService.cs +++ b/ZR.Service/mes/pro/ProWorkplanService.cs @@ -1,16 +1,8 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.md; using ZR.Model.mes.pro; using ZR.Service.mes.pro.IService; -using ZR.Service.MES.md.IService; namespace ZR.Service.mes.pro { @@ -18,13 +10,13 @@ namespace ZR.Service.mes.pro [AppService(ServiceType = typeof(IProWorkplanService), ServiceLifetime = LifeTime.Transient)] public class ProWorkplanService : BaseService, IProWorkplanService { - + public (List, int) GetAllData(int pageNum, int pageSize, int year, int week, string partNumber, string color) { var predicate = Expressionable.Create() .AndIF(year > 0, it => it.Year == year) .AndIF(week > 0, it => it.Week == week) - .AndIF(!string.IsNullOrEmpty(partNumber), it => it.Partnumber.Contains( partNumber)) + .AndIF(!string.IsNullOrEmpty(partNumber), it => it.Partnumber.Contains(partNumber)) .AndIF(!string.IsNullOrEmpty(color), it => it.Color.Contains(color)) .ToExpression(); int totalCount = 0; @@ -32,7 +24,7 @@ namespace ZR.Service.mes.pro return (proWorkplanList, totalCount); } - + public List GetProWorkplanById(string id) { return Context.Queryable().Where(it => it.Id == id).ToList(); @@ -67,7 +59,7 @@ namespace ZR.Service.mes.pro public int AddWorkorder(ProWorkorder proWorkorder) { - + return Context.Insertable(proWorkorder).ExecuteCommand(); } @@ -81,6 +73,6 @@ namespace ZR.Service.mes.pro return Context.Deleteable().In(id).ExecuteCommand(); } - + } } diff --git a/ZR.Service/mes/pro/ProWorkplanServiceV2.cs b/ZR.Service/mes/pro/ProWorkplanServiceV2.cs index be8e0175..9ea18056 100644 --- a/ZR.Service/mes/pro/ProWorkplanServiceV2.cs +++ b/ZR.Service/mes/pro/ProWorkplanServiceV2.cs @@ -1,24 +1,15 @@ using Infrastructure; using Infrastructure.Attribute; -using Mapster.Utils; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Routing.Template; -using Microsoft.Extensions.DependencyInjection; using MiniExcelLibs; using Model.DBModel; using SqlSugar; using System; -using System.Collections.Generic; -using System.Drawing; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.mes.pro; using ZR.Model.MES.pro.DTO; using ZR.Model.MES.wms; using ZR.Service.mes.pro.IService; -using ZR.Service.MES.md.IService; namespace ZR.Service.mes.pro { @@ -276,7 +267,7 @@ namespace ZR.Service.mes.pro /// /// /// - public int DeleteAllWorkPlan(int year,int week) + public int DeleteAllWorkPlan(int year, int week) { return Context.Deleteable().Where(it => it.Year == year && it.Week == week).ExecuteCommand(); } @@ -294,22 +285,23 @@ namespace ZR.Service.mes.pro .Where(it => it.Status == 1) .First(); // 物料号不存在 - if(material == null) + if (material == null) { return 1; } // 规格与颜色异常 - if(material.Specification != proWorkplan.Specification || material.Color != proWorkplan.ColorCode) + if (material.Specification != proWorkplan.Specification || material.Color != proWorkplan.ColorCode) { return 2; } return 0; - }catch (Exception ex) + } + catch (Exception ex) { throw new Exception(ex.Message); } - + } } } diff --git a/ZR.Service/mes/pro/WmPackingrecordService.cs b/ZR.Service/mes/pro/WmPackingrecordService.cs index ca963a97..bebd5e0c 100644 --- a/ZR.Service/mes/pro/WmPackingrecordService.cs +++ b/ZR.Service/mes/pro/WmPackingrecordService.cs @@ -1,14 +1,10 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; +using System; using ZR.Model; - -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; using ZR.Model.mes.pro; using ZR.Model.MES.pro.DTO; +using ZR.Repository; namespace ZR.Service.mes.pro.IService { diff --git a/ZR.Service/mes/qc/CommonFQCService.cs b/ZR.Service/mes/qc/CommonFQCService.cs new file mode 100644 index 00000000..a86b18bb --- /dev/null +++ b/ZR.Service/mes/qc/CommonFQCService.cs @@ -0,0 +1,291 @@ +using Infrastructure.Attribute; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Reflection; +using ZR.Model.MES.pro; +using ZR.Model.MES.qc; +using ZR.Model.MES.qc.DTO; +using ZR.Model.MES.qu; +using ZR.Model.MES.wms; +using ZR.Service.mes.qc.IService; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace ZR.Service.mes.qc +{ + + + [AppService(ServiceType = typeof(ICommonFQCService), ServiceLifetime = LifeTime.Transient)] + public class CommonFQCService : BaseService, ICommonFQCService + { + public int CheckPackageWorkOrderStatus(string workOrderId) + { + try + { + // 检查对应工单是否存在 + ProWorkorder_v2 proWorkorder = Context.Queryable() + .Where(it => it.ClientWorkorder == workOrderId) + .First(); + if (proWorkorder == null) + { + return -1; + } + return proWorkorder.Status; + } + catch (Exception ex) + { + return -1; + } + } + /// + /// 根据年周日生成当日全部工单列表 + /// + /// 年 + /// 周 + /// 日 + /// 0-不读取status 1-读取status 2- 查询status为1,2时 + /// -1-全部 0-初态 1-上线 2-包装完成 + /// + public List GenerateWorkOrderListUtil(int year, int week, int date,int type = 0,int status = -1) + { + try + { + var predicate = Expressionable.Create() + .And(it => it.Year == year) + .And(it => it.Week == week) + .And(it => it.Date == date) + .And(it => it.Remark3 == "是") + .AndIF(type == 1, it => it.Status == status) + .AndIF(type == 2, it => it.Status == 1 || it.Status == 2) + .ToExpression(); + return Context.Queryable() + .Where(predicate) + .OrderBy(it => it.Sort) + .ToList(); + } + catch (Exception ex) + { + return null; + } + + } + public int CheckPackageWorkOrderInListStatus(string workOrderId) + { + try + { + // 检查对应工单是否存在 + ProWorkorder_v2 proWorkOrder = Context.Queryable().Where(it => it.ClientWorkorder == workOrderId).First(); + if (proWorkOrder == null) + { + return -1; + } + // 提取工单年周日,组成数组 + int year = proWorkOrder.Year; + int week = proWorkOrder.Week; + int date = proWorkOrder.Date; + List < ProWorkorder_v2 > proWorkorders = GenerateWorkOrderListUtil(year, week, date,2); + if (proWorkorders == null) + { + return -1; + } + // 提取目标工单号所在工单列表的位置 + int index = -1; + for (int i = 0; i < proWorkorders.Count; i++) + { + if (workOrderId == proWorkorders[i].ClientWorkorder) + { + index = i; break; + } + } + if (index == 0) + { + return 2; + } + + for (int i = 0;i < index; i++) + { + if(proWorkorders[i].Status == 1) + { + return 1; + } + } + + if (index == proWorkorders.Count - 1) + { + return 3; + } + return 0; + } + catch (Exception ex) + { + return -1; + } + } + + public int[] CheckWorkOrderInDayListNum(string workOrderId) + { + try + { + int[] result = new int[4]; + // 工单总数 + int workOrderTotal = 0; + // 当前位置 + int index = 0; + // 已完成 + int finishNum = 0; + // 未完成 + int noFinishNum = 0; + // 检查对应工单是否存在 + ProWorkorder_v2 proWorkOrder = Context.Queryable().Where(it => it.ClientWorkorder == workOrderId).First(); + if (proWorkOrder == null) + { + return result; + } + // 提取工单年周日,组成数组 + int year = proWorkOrder.Year; + int week = proWorkOrder.Week; + int date = proWorkOrder.Date; + List proWorkorders = GenerateWorkOrderListUtil(year, week, date,2); + if (proWorkorders == null) + { + return result; + } + workOrderTotal = proWorkorders.Count; + // 提取目标工单号所在工单列表的位置 + for (int i = 0; i < proWorkorders.Count; i++) + { + if (workOrderId == proWorkorders[i].ClientWorkorder) + { + index = i + 1; break; + } + } + List finishWorkorders = GenerateWorkOrderListUtil(year, week, date,1,2); + if (finishWorkorders == null) + { + return result; + } + finishNum = finishWorkorders.Count; + noFinishNum = workOrderTotal - finishNum; + + // 最终赋值 + result.SetValue(index, 0); + result.SetValue(workOrderTotal, 1); + result.SetValue(finishNum, 2); + result.SetValue(noFinishNum, 3); + return result; + } + catch (Exception ex) + { + return null; + } + } + /// + /// 工单需要打印标签总数 + /// + /// 工单号 + /// 上件数 + /// + public int GetWorkOrderNeedPackingTotal(string workOrderId) + { + try + { + ProWorkorder_v2 workOrder = Context.Queryable().Where(it => it.ClientWorkorder == workOrderId).First(); + var res = Context.Queryable() + .Where(it => it.FKWorkorderId.Equals(workOrderId)) + .GroupBy(it => it.FKWorkorderId) + .Select(it => new + { + sum = SqlFunc.AggregateSum(it.Counter ?? 0) + }).First(); + if(res == null) + { + return workOrder.PreviousNumber; + } + else + { + return workOrder.PreviousNumber - res.sum; + } + } + catch (Exception ex) + { + return 0; + } + } + /// + /// 工单已打印标签数 + /// + /// + /// + public int GetWorkOrderPackingrecordCount(string workOrderId) + { + try + { + return Context.Queryable() + .Where(it => it.WorkOrderNum == workOrderId) + .OrderBy(it => it.Id) + .Count(); + } + catch (Exception ex) + { + return 0; + } + } + public QcCommonFqcBoardDto GetWorkOrderBoardData(string workOrderId) + { + try + { + // 检查对应工单是否存在 + ProWorkorder_v2 proWorkOrder = Context.Queryable().Where(it => it.ClientWorkorder == workOrderId).First(); + if (proWorkOrder == null) + { + return null; + } + // + QcCommonFqcBoardDto boardData = new QcCommonFqcBoardDto(); + boardData.WorkOrderId = workOrderId; + // 提取工单年周日,组成数组 + int year = proWorkOrder.Year; + int week = proWorkOrder.Week; + int date = proWorkOrder.Date; + List proWorkorders = GenerateWorkOrderListUtil(year, week, date, 2); + if (proWorkorders == null) + { + return null; + } + boardData.WorkOrderDayListCount = proWorkorders.Count; + // 提取目标工单号所在工单列表的位置 + for (int i = 0; i < proWorkorders.Count; i++) + { + if (workOrderId == proWorkorders[i].ClientWorkorder) + { + boardData.WorkOrderIndex = i + 1; break; + } + } + boardData.WorkOrderPackageCount = GetWorkOrderNeedPackingTotal(workOrderId); + boardData.WorkOrderFinishPackageNum = GetWorkOrderPackingrecordCount(workOrderId); + boardData.WorkOrderNotFinishPackageNum = boardData.WorkOrderPackageCount - boardData.WorkOrderFinishPackageNum; + // 如果不是第一个工单,找到上一个工单号 + if (boardData.WorkOrderIndex > 1) + { + boardData.LastWorkOrderId = proWorkorders[(boardData.WorkOrderIndex - 2) ?? 0].ClientWorkorder; + boardData.LastWorkOrderPackageCount = GetWorkOrderNeedPackingTotal(boardData.LastWorkOrderId); + boardData.LastWorkOrderFinishPackageNum = GetWorkOrderPackingrecordCount(boardData.LastWorkOrderId); + boardData.LastWorkOrderNotFinishPackageNum = boardData.LastWorkOrderPackageCount - boardData.LastWorkOrderFinishPackageNum; + } + List finishWorkorders = GenerateWorkOrderListUtil(year, week, date, 1,2); + if (finishWorkorders == null) + { + return null; + } + boardData.WorkOrderFinishNum = finishWorkorders.Count; + boardData.WorkOrderNotFinishNum = boardData.WorkOrderDayListCount - boardData.WorkOrderFinishNum; + boardData.UpdatedTime = DateTime.Now; + return boardData; + } + catch (Exception ex) + { + return null; + } + } + } +} diff --git a/ZR.Service/mes/qc/FirstFQCService.cs b/ZR.Service/mes/qc/FirstFQCService.cs index 3eed8b92..76fc65ed 100644 --- a/ZR.Service/mes/qc/FirstFQCService.cs +++ b/ZR.Service/mes/qc/FirstFQCService.cs @@ -1,27 +1,13 @@ -using AutoMapper.Configuration.Conventions; -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.DependencyInjection; +using Infrastructure.Attribute; using SqlSugar; using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; using System.Linq; -using System.Text; using System.Threading.Tasks; -using ZR.Common; -using ZR.Model.mes.pro; using ZR.Model.MES.pro; using ZR.Model.MES.qc; using ZR.Model.MES.qc.DTO; using ZR.Model.MES.qu; using ZR.Service.mes.qc.IService; -using ZR.Service.mes.qu.IService; -using static Microsoft.Extensions.Logging.EventSource.LoggingEventSource; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Service.mes.qc { @@ -1398,7 +1384,7 @@ namespace ZR.Service.mes.qc QcQualityStatisticsFirst first = new QcQualityStatisticsFirst(); first.Id = SnowFlakeSingle.Instance.NextId().ToString(); first.WorkorderId = workorderID; - + ProWorkorder_v2 workorder_item = Context.Queryable().Where(it => it.ClientWorkorder == workorderID).First(); if (workorder_item != null) @@ -1415,7 +1401,7 @@ namespace ZR.Service.mes.qc { first.StartTime = null; } - + } @@ -1610,7 +1596,7 @@ namespace ZR.Service.mes.qc QcQualityStatisticsFirst first2 = new QcQualityStatisticsFirst(); first2.Id = SnowFlakeSingle.Instance.NextId().ToString(); first2.WorkorderId = workorderID; - + ProWorkorder_v2 workorder_item2 = Context.Queryable().Where(it => it.ClientWorkorder == workorderID).First(); if (workorder_item2 != null) @@ -1619,7 +1605,7 @@ namespace ZR.Service.mes.qc first2.FinishedPartNumber = workorder_item2.FinishedPartNumber; first2.ProductDescription = workorder_item2.ProductDescription; first2.RequireNumber = workorder_item2.PreviousNumber; - + if (step != null) { first2.StartTime = step.FirstInspectTime;//这地方是不妥的 @@ -1628,7 +1614,7 @@ namespace ZR.Service.mes.qc { first2.StartTime = null; } - + } @@ -1828,7 +1814,7 @@ namespace ZR.Service.mes.qc first3.WorkorderId = workorderID; ProWorkorder_v2 workorder3 = Context.Queryable().Where(it => it.Id == first.WorkorderId).First(); - + ProWorkorder_v2 workorder_item3 = Context.Queryable().Where(it => it.ClientWorkorder == workorderID).First(); @@ -2557,7 +2543,7 @@ namespace ZR.Service.mes.qc again3.DamoTotal = damo_total_again; again3.BaofeiTotal = baofei_total_again3; - + var x_again_3 = Context.Storageable(again3).WhereColumns(it => new { it.WorkorderId, it.Remark2 }).ToStorage(); x_again_3.AsInsertable.ExecuteCommand();//不存在插入 @@ -2796,7 +2782,8 @@ namespace ZR.Service.mes.qc ProWorkorder_v2 workorder_final3 = Context.Queryable().Where(it => it.ClientWorkorder == workorderID).First(); if (workorder_again3 != null) - { final3.Color = workorder_final3.Colour; + { + final3.Color = workorder_final3.Colour; final3.FinishedPartNumber = workorder_final3.FinishedPartNumber; final3.ProductDescription = workorder_final3.ProductDescription; // XXX:三检(包装投入数)生产投入数为(首检合格数 + 抛光合格数) diff --git a/ZR.Service/mes/qc/IService/ICommonFQCService.cs b/ZR.Service/mes/qc/IService/ICommonFQCService.cs new file mode 100644 index 00000000..84499406 --- /dev/null +++ b/ZR.Service/mes/qc/IService/ICommonFQCService.cs @@ -0,0 +1,35 @@ +using ZR.Model.MES.qc.DTO; + +namespace ZR.Service.mes.qc.IService +{ + public interface ICommonFQCService + { + /// + /// 检查工单状态 + /// + /// + /// 0-未完成 1-已上线 2-已完成 + public int CheckPackageWorkOrderStatus(string workOrderId); + /// + /// 检查工单在当日计划中的状态 + /// + /// + /// -1 -未知异常 0-正常 1-前边有未完成工单 2-最开始一个工单 3-最后一个工单 + public int CheckPackageWorkOrderInListStatus(string workOrderId); + + /// + /// 检查工单在当日未完成的工单计划中是第几个 + /// + /// + /// [当前位置,总数, 包装已完成, 包装未完成] + public int[] CheckWorkOrderInDayListNum(string workOrderId); + + /// + /// 获取工单质量检测,首检,包装看板数据 + /// + /// 工单号 + /// QcCommonFqcBoardDto 看板数据 + public QcCommonFqcBoardDto GetWorkOrderBoardData(string workOrderId); + + } +} diff --git a/ZR.Service/mes/qc/IService/IFirstFQCService.cs b/ZR.Service/mes/qc/IService/IFirstFQCService.cs index 01fe5141..79a25e6c 100644 --- a/ZR.Service/mes/qc/IService/IFirstFQCService.cs +++ b/ZR.Service/mes/qc/IService/IFirstFQCService.cs @@ -1,12 +1,6 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.HttpResults; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System; using System.Threading.Tasks; using ZR.Model.MES.qc.DTO; -using ZR.Model.MES.qu; namespace ZR.Service.mes.qc.IService { @@ -17,13 +11,13 @@ namespace ZR.Service.mes.qc.IService public CheckItemTableDTO GetCheckItemTable_thirty(string workorderID); public int WriteProcessFlow_first(string workorderID, DateTime time); - public Task SaveinspectItem_v1(string workorder_id, string InspectionModule, string checkid, int counter); - public Task SaveinspectItem_v2(string workorder_id, string InspectionModule, string checkid, int counter); - public Task SaveinspectItem_v3(string workorder_id, string InspectionModule, string checkid, int counter); + public Task SaveinspectItem_v1(string workorder_id, string InspectionModule, string checkid, int counter); + public Task SaveinspectItem_v2(string workorder_id, string InspectionModule, string checkid, int counter); + public Task SaveinspectItem_v3(string workorder_id, string InspectionModule, string checkid, int counter); - public QcCurrentWorkorderDto GetcurrentWorkorder_first(); - public QcCurrentWorkorderDto GetcurrentWorkorder_next_first(); - public QcCurrentWorkorderDto GetcurrentWorkorder_previous_first(); + public QcCurrentWorkorderDto GetcurrentWorkorder_first(); + public QcCurrentWorkorderDto GetcurrentWorkorder_next_first(); + public QcCurrentWorkorderDto GetcurrentWorkorder_previous_first(); public QcCurrentWorkorderDto GetcurrentWorkorder_again(); public QcCurrentWorkorderDto GetcurrentWorkorder_next_again(); @@ -44,7 +38,7 @@ namespace ZR.Service.mes.qc.IService public int UpdateWorkorderStatus(string workorder_id); - public int GenerateQualityStatisticsTable(string workorderID, string team,DateTime firstQuality_time); + public int GenerateQualityStatisticsTable(string workorderID, string team, DateTime firstQuality_time); } diff --git a/ZR.Service/mes/qc/IService/IQCStatisticsService.cs b/ZR.Service/mes/qc/IService/IQCStatisticsService.cs index 72abaefa..61f98074 100644 --- a/ZR.Service/mes/qc/IService/IQCStatisticsService.cs +++ b/ZR.Service/mes/qc/IService/IQCStatisticsService.cs @@ -1,8 +1,4 @@ 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.qc.DTO; @@ -19,15 +15,15 @@ namespace ZR.Service.mes.qc.IService #region 获取统计表 //获取 首检 - (List,int) GetQualityStatisticsTable_first(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); + (List, int) GetQualityStatisticsTable_first(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); //获取 二检 - - ( List,int) GetQualityStatisticsTable_again(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); + + (List, int) GetQualityStatisticsTable_again(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); //获取 三检 - (List,int) GetQualityStatisticsTable_final(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); + (List, int) GetQualityStatisticsTable_final(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); //获取 总检 - (List,int) GetQualityStatisticsTable_total(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); + (List, int) GetQualityStatisticsTable_total(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize); #endregion public int DeleteStatisticsTable(string workorderid); diff --git a/ZR.Service/mes/qc/IService/IQcQualityStatisticsFirstService.cs b/ZR.Service/mes/qc/IService/IQcQualityStatisticsFirstService.cs index 13557bfe..2d3bee89 100644 --- a/ZR.Service/mes/qc/IService/IQcQualityStatisticsFirstService.cs +++ b/ZR.Service/mes/qc/IService/IQcQualityStatisticsFirstService.cs @@ -1,7 +1,5 @@ using System; using ZR.Model; -using ZR.Model.Dto; -using System.Collections.Generic; using ZR.Model.MES.qc; using ZR.Model.MES.qc.DTO; diff --git a/ZR.Service/mes/qc/IService/IQcRoughService.cs b/ZR.Service/mes/qc/IService/IQcRoughService.cs index 76041bd7..7e2f3a72 100644 --- a/ZR.Service/mes/qc/IService/IQcRoughService.cs +++ b/ZR.Service/mes/qc/IService/IQcRoughService.cs @@ -1,11 +1,4 @@ -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.pro; -using ZR.Model.MES.qc.DTO; -using ZR.Model.MES.qu; +using ZR.Model.MES.qc.DTO; namespace ZR.Service.mes.qu.IService @@ -13,6 +6,6 @@ namespace ZR.Service.mes.qu.IService public interface IQcRoughService { public (List, int) GetStatisticslist(int pageNum, int pageSize, int year, int week, int date, int isSchedule); - public int UpdateStatisticsTable(string id, int actualNumber, int randomRate, int ngs, int oks, decimal oksRatio,int Isqualified); + public int UpdateStatisticsTable(string id, int actualNumber, int randomRate, int ngs, int oks, decimal oksRatio, int Isqualified); } } diff --git a/ZR.Service/mes/qc/IService/IQcinspectionItemService.cs b/ZR.Service/mes/qc/IService/IQcinspectionItemService.cs index 7f7c45ed..7e671f78 100644 --- a/ZR.Service/mes/qc/IService/IQcinspectionItemService.cs +++ b/ZR.Service/mes/qc/IService/IQcinspectionItemService.cs @@ -1,14 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.qu; +using ZR.Model.MES.qu; namespace ZR.Service.mes.qc.IService { - public interface IQcinspectionItemService + public interface IQcinspectionItemService { - public List GetinspectionItemList(string inspectionModule, string inspectionType ); + public List GetinspectionItemList(string inspectionModule, string inspectionType); } } diff --git a/ZR.Service/mes/qc/QCStatisticsService.cs b/ZR.Service/mes/qc/QCStatisticsService.cs index e3d2b944..c24107c9 100644 --- a/ZR.Service/mes/qc/QCStatisticsService.cs +++ b/ZR.Service/mes/qc/QCStatisticsService.cs @@ -1,21 +1,10 @@ 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.md; using ZR.Model.MES.qc; using ZR.Model.MES.qc.DTO; -using ZR.Model.MES.qu; using ZR.Model.MES.wms; -using ZR.Model.MES.wms.Dto; using ZR.Service.mes.qc.IService; namespace ZR.Service.mes.qc @@ -62,7 +51,11 @@ namespace ZR.Service.mes.qc .ToExpression(); - List data = Context.Queryable().Where(predicate).OrderBy(it => it.WorkorderId).OrderBy(it => it.Remark2).ToPageList(pageNum, pageSize, ref totalNum); + List data = Context.Queryable() + .Where(predicate) + .OrderBy(it => it.StartTime) + .OrderBy(it => it.Remark2) + .ToPageList(pageNum, pageSize, ref totalNum); foreach (QcQualityStatisticsFirst item in data) { @@ -265,11 +258,11 @@ namespace ZR.Service.mes.qc { throw new Exception(ex.Message); } - + } public List DoFirstExcel(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize) { - + List list = GetQualityStatisticsTable_first(starttime, endTime, workorderid, partnumber, product_description, team, pageNum, pageSize).Item1; List newList = list.Select(item => new QcQualityStatisticsFirstDto() { @@ -442,7 +435,7 @@ namespace ZR.Service.mes.qc } public List DoTotalExcel(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize) { - List list = GetQualityStatisticsTable_total(starttime, endTime, workorderid, partnumber, product_description, team, pageNum, pageSize).Item1; + List list = GetQualityStatisticsTable_total(starttime, endTime, workorderid, partnumber, product_description, team, pageNum, pageSize).Item1; List newList = list.Select(item => new QcQualityStatisticsFirstDto() { WorkorderId = item.WorkorderId, @@ -511,10 +504,11 @@ namespace ZR.Service.mes.qc } else { - return !string.IsNullOrEmpty(material.Description) ? material.Description : material.ProductName; + return !string.IsNullOrEmpty(material.Description) ? material.Description : material.ProductName; } - }catch(Exception ex) + } + catch (Exception ex) { return "获取描述异常!"; } diff --git a/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs b/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs index 8243bfb5..39a4f80c 100644 --- a/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs +++ b/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs @@ -1,15 +1,12 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; - -using ZR.Repository; -using System.Linq; -using ZR.Service.mes.qc.IService; -using ZR.Model.MES.qc; -using ZR.Model.MES.qc.DTO; +using SqlSugar; +using System; using ZR.Model; using ZR.Model.MES.pro; +using ZR.Model.MES.qc; +using ZR.Model.MES.qc.DTO; +using ZR.Repository; +using ZR.Service.mes.qc.IService; namespace ZR.Service.mes.qc { @@ -31,8 +28,8 @@ namespace ZR.Service.mes.qc .AndIF(!string.IsNullOrEmpty(parm.FinishedPartNumber), it => it.FinishedPartNumber == parm.FinishedPartNumber) .AndIF(!string.IsNullOrEmpty(parm.ProductDescription), it => it.ProductDescription.Contains(parm.ProductDescription)) .AndIF(!string.IsNullOrEmpty(parm.Team), it => it.Team == parm.Team) - .AndIF(parm.starttime> new DateTime(2000, 1, 1), it => it.CreatedTime>=parm.starttime) - .AndIF(parm.endtime> new DateTime(2000, 1, 1), it => it.CreatedTime<=parm.endtime) + .AndIF(parm.starttime > new DateTime(2000, 1, 1), it => it.CreatedTime >= parm.starttime) + .AndIF(parm.endtime > new DateTime(2000, 1, 1), it => it.CreatedTime <= parm.endtime) ; var response = Queryable() @@ -64,10 +61,10 @@ namespace ZR.Service.mes.qc /// public QcQualityStatisticsFirst AddQcQualityStatisticsFirst(QcQualityStatisticsFirst model) { - if(string.IsNullOrEmpty(model.Id)) + if (string.IsNullOrEmpty(model.Id)) { - model.Id= SnowFlakeSingle.Instance.NextId().ToString(); + model.Id = SnowFlakeSingle.Instance.NextId().ToString(); } return Context.Insertable(model).ExecuteReturnEntity(); } @@ -140,9 +137,9 @@ namespace ZR.Service.mes.qc try { ProWorkordertimeStep proWorkordertime = Context.Queryable() - .Where(it=>it.WorkoderId == workOrderId) + .Where(it => it.WorkoderId == workOrderId) .First(); - if(proWorkordertime == null) + if (proWorkordertime == null) { return "工单无开始时间!"; } @@ -153,7 +150,7 @@ namespace ZR.Service.mes.qc { return "工单无开始时间!"; } - + } } } \ No newline at end of file diff --git a/ZR.Service/mes/qc/QcinspectionItemService.cs b/ZR.Service/mes/qc/QcinspectionItemService.cs index 638dc6ae..e4693d79 100644 --- a/ZR.Service/mes/qc/QcinspectionItemService.cs +++ b/ZR.Service/mes/qc/QcinspectionItemService.cs @@ -1,16 +1,7 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.mes.pro; using ZR.Model.MES.qu; using ZR.Service.mes.qc.IService; -using ZR.Service.mes.qu.IService; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace ZR.Service.mes.qc { diff --git a/ZR.Service/mes/wms/IService/IWMExitwarehouseService.cs b/ZR.Service/mes/wms/IService/IWMExitwarehouseService.cs index d329acc0..5fddb998 100644 --- a/ZR.Service/mes/wms/IService/IWMExitwarehouseService.cs +++ b/ZR.Service/mes/wms/IService/IWMExitwarehouseService.cs @@ -1,12 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZR.Service.mes.wms.IService +namespace ZR.Service.mes.wms.IService { - public interface IWMExitwarehouseService + public interface IWMExitwarehouseService { /// /// 一般退库 diff --git a/ZR.Service/mes/wms/IService/IWMlocationInfoService.cs b/ZR.Service/mes/wms/IService/IWMlocationInfoService.cs index c6a7ae14..e8725381 100644 --- a/ZR.Service/mes/wms/IService/IWMlocationInfoService.cs +++ b/ZR.Service/mes/wms/IService/IWMlocationInfoService.cs @@ -1,19 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.qc.DTO; -using ZR.Model.MES.wms; +using ZR.Model.MES.wms; namespace ZR.Service.mes.wms.IService { - public interface IWMlocationInfoService + public interface IWMlocationInfoService { // 获取成品库信息 - public (List,int) Getwminfo_product(string shelf , int layer, int pageNum , int pageSize); + public (List, int) Getwminfo_product(string shelf, int layer, int pageNum, int pageSize); // 获取库位信息 public WmInfo Getlocationinfo(int warehouse_num, string locationcode); diff --git a/ZR.Service/mes/wms/IService/IWmAGVService.cs b/ZR.Service/mes/wms/IService/IWmAGVService.cs index 656a2342..6f2b1ed2 100644 --- a/ZR.Service/mes/wms/IService/IWmAGVService.cs +++ b/ZR.Service/mes/wms/IService/IWmAGVService.cs @@ -1,12 +1,8 @@ -using System; -using ZR.Model; - -using System.Collections.Generic; -using ZR.Model.MES.wms; +using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; namespace ZR.Service.mes.wms.IService { - public interface IWmAGVService + public interface IWmAGVService { List GetList(QueryAGVparam param); @@ -20,7 +16,7 @@ namespace ZR.Service.mes.wms.IService List GetAGV_position_list(AgvLocation location); - string GenerateAgvTask(string taskid,int flag); + string GenerateAgvTask(string taskid, int flag); string CancelAGVTask(string taskId, int flag); } } diff --git a/ZR.Service/mes/wms/IService/IWmBlankInventoryService.cs b/ZR.Service/mes/wms/IService/IWmBlankInventoryService.cs index b1602124..a43cf9c4 100644 --- a/ZR.Service/mes/wms/IService/IWmBlankInventoryService.cs +++ b/ZR.Service/mes/wms/IService/IWmBlankInventoryService.cs @@ -1,8 +1,5 @@ -using System; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using System.Collections.Generic; using ZR.Model.MES.wms.Dto; namespace ZR.Service.mes.wms.IService diff --git a/ZR.Service/mes/wms/IService/IWmBlankRecordService.cs b/ZR.Service/mes/wms/IService/IWmBlankRecordService.cs index f9b6b764..53447178 100644 --- a/ZR.Service/mes/wms/IService/IWmBlankRecordService.cs +++ b/ZR.Service/mes/wms/IService/IWmBlankRecordService.cs @@ -1,7 +1,4 @@ -using System; using ZR.Model; -using ZR.Model.Dto; -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; diff --git a/ZR.Service/mes/wms/IService/IWmCheckLogService.cs b/ZR.Service/mes/wms/IService/IWmCheckLogService.cs index 2bc42c6f..95554677 100644 --- a/ZR.Service/mes/wms/IService/IWmCheckLogService.cs +++ b/ZR.Service/mes/wms/IService/IWmCheckLogService.cs @@ -1,7 +1,4 @@ -using System; using ZR.Model; - -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; diff --git a/ZR.Service/mes/wms/IService/IWmCustomService.cs b/ZR.Service/mes/wms/IService/IWmCustomService.cs index 775dd726..52875a45 100644 --- a/ZR.Service/mes/wms/IService/IWmCustomService.cs +++ b/ZR.Service/mes/wms/IService/IWmCustomService.cs @@ -1,7 +1,4 @@ -using System; using ZR.Model; - -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; diff --git a/ZR.Service/mes/wms/IService/IWmFgentryInspectService.cs b/ZR.Service/mes/wms/IService/IWmFgentryInspectService.cs index 2f5de6aa..7effe162 100644 --- a/ZR.Service/mes/wms/IService/IWmFgentryInspectService.cs +++ b/ZR.Service/mes/wms/IService/IWmFgentryInspectService.cs @@ -1,10 +1,6 @@ -using System; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using System.Collections.Generic; using ZR.Model.MES.wms.Dto; -using Microsoft.AspNetCore.Mvc; namespace ZR.Service.mes.wms.IService { @@ -19,18 +15,18 @@ namespace ZR.Service.mes.wms.IService PagedInfo GetList_first(WmFgentryInspectQueryDto parm); PagedInfo GetList_second(WmFgentryInspectQueryDto parm); - + WmFgentryInspect GetInfo(int Id); WmFgentryInspect AddWmFgentryInspect(WmFgentryInspect parm); int UpdateWmFgentryInspect(WmFgentryInspect parm); - int BatchQualified(string[] packcode_select,string updateby); + int BatchQualified(string[] packcode_select, string updateby); int SetAllQualified(string workorder_selected, string updateby); int SetAllUnQualified(string workorder_selected, string updateby); - int BatchUnQualified(string[] packcode_select,string updateby); + int BatchUnQualified(string[] packcode_select, string updateby); } } diff --git a/ZR.Service/mes/wms/IService/IWmGoodsActionService.cs b/ZR.Service/mes/wms/IService/IWmGoodsActionService.cs index 1fc9eadf..b1def539 100644 --- a/ZR.Service/mes/wms/IService/IWmGoodsActionService.cs +++ b/ZR.Service/mes/wms/IService/IWmGoodsActionService.cs @@ -1,8 +1,4 @@ -using System; -using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using System.Collections.Generic; using ZR.Model.MES.wms.Dto; namespace ZR.Service.mes.wms.IService diff --git a/ZR.Service/mes/wms/IService/IWmGoodsBatchSearchService.cs b/ZR.Service/mes/wms/IService/IWmGoodsBatchSearchService.cs index cc9ea4ee..20e3f137 100644 --- a/ZR.Service/mes/wms/IService/IWmGoodsBatchSearchService.cs +++ b/ZR.Service/mes/wms/IService/IWmGoodsBatchSearchService.cs @@ -1,8 +1,4 @@ -using System; using ZR.Model; -using ZR.Model.Dto; -using ZR.Model.MES.wms; -using System.Collections.Generic; using ZR.Model.MES.wms.Dto; namespace ZR.Service.mes.wms.IService diff --git a/ZR.Service/mes/wms/IService/IWmGoodsChangeLogService.cs b/ZR.Service/mes/wms/IService/IWmGoodsChangeLogService.cs index c80b45b3..b70451e5 100644 --- a/ZR.Service/mes/wms/IService/IWmGoodsChangeLogService.cs +++ b/ZR.Service/mes/wms/IService/IWmGoodsChangeLogService.cs @@ -1,8 +1,5 @@ -using System; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using System.Collections.Generic; using ZR.Model.MES.wms.Dto; namespace ZR.Service.mes.wms.IService diff --git a/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs b/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs index 46845926..75fad20b 100644 --- a/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs +++ b/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs @@ -1,11 +1,6 @@ -using System; using ZR.Model; -using ZR.Model.Dto; - -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; -using Aliyun.OSS; namespace ZR.Service.mes.wms.IService { diff --git a/ZR.Service/mes/wms/IService/IWmGoodsOutProductionService.cs b/ZR.Service/mes/wms/IService/IWmGoodsOutProductionService.cs index a9f9f168..025556b3 100644 --- a/ZR.Service/mes/wms/IService/IWmGoodsOutProductionService.cs +++ b/ZR.Service/mes/wms/IService/IWmGoodsOutProductionService.cs @@ -1,7 +1,3 @@ -using System; -using ZR.Model; -using ZR.Model.Dto; -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; diff --git a/ZR.Service/mes/wms/IService/IWmMaterialService.cs b/ZR.Service/mes/wms/IService/IWmMaterialService.cs index 0426d4c1..fc1ce106 100644 --- a/ZR.Service/mes/wms/IService/IWmMaterialService.cs +++ b/ZR.Service/mes/wms/IService/IWmMaterialService.cs @@ -1,7 +1,4 @@ -using System; using ZR.Model; -using ZR.Model.Dto; -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; @@ -23,7 +20,7 @@ namespace ZR.Service.mes.wms.IService WmGoodsNowProduction GetInfoByPatchCode(string patchCode); - (int,int) ExcelADD(List materials); + (int, int) ExcelADD(List materials); } } diff --git a/ZR.Service/mes/wms/IService/IWmOutOrderService.cs b/ZR.Service/mes/wms/IService/IWmOutOrderService.cs index d2dbf414..319062aa 100644 --- a/ZR.Service/mes/wms/IService/IWmOutOrderService.cs +++ b/ZR.Service/mes/wms/IService/IWmOutOrderService.cs @@ -1,8 +1,4 @@ -using System; using ZR.Model; -using ZR.Model.Dto; - -using System.Collections.Generic; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; @@ -47,8 +43,8 @@ namespace ZR.Service.mes.wms.IService /// List GetOutOrderPlanAndOutProductionNum(string shipment_num, string partnumber); // 检查是否可出库 - string CheckProductionOut(string parnumber,string production_packcode, string shipment_num); - + string CheckProductionOut(string parnumber, string production_packcode, string shipment_num); + } } diff --git a/ZR.Service/mes/wms/IService/IWmPackageLclService.cs b/ZR.Service/mes/wms/IService/IWmPackageLclService.cs index cb7633b5..e5a26001 100644 --- a/ZR.Service/mes/wms/IService/IWmPackageLclService.cs +++ b/ZR.Service/mes/wms/IService/IWmPackageLclService.cs @@ -1,8 +1,5 @@ -using System; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using System.Collections.Generic; using ZR.Model.MES.wms.Dto; namespace ZR.Service.mes.wms.IService diff --git a/ZR.Service/mes/wms/WMExitwarehouseService.cs b/ZR.Service/mes/wms/WMExitwarehouseService.cs index c5de5806..c0465c93 100644 --- a/ZR.Service/mes/wms/WMExitwarehouseService.cs +++ b/ZR.Service/mes/wms/WMExitwarehouseService.cs @@ -1,10 +1,5 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ZR.Model.MES.pro; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; diff --git a/ZR.Service/mes/wms/WMentryWarehousing_productService.cs b/ZR.Service/mes/wms/WMentryWarehousing_productService.cs index 656d11cb..79bcf944 100644 --- a/ZR.Service/mes/wms/WMentryWarehousing_productService.cs +++ b/ZR.Service/mes/wms/WMentryWarehousing_productService.cs @@ -1,13 +1,8 @@ using Infrastructure.Attribute; -using MimeKit.Utils; -using Org.BouncyCastle.Utilities.IO.Pem; using SqlSugar; using System; -using System.Collections.Generic; using System.Linq; -using System.Text.Json; using System.Text.RegularExpressions; -using ZR.Model.MES.pro; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; using ZR.Service.mes.wms.IService; diff --git a/ZR.Service/mes/wms/WMlocationInfoService.cs b/ZR.Service/mes/wms/WMlocationInfoService.cs index dfed8e5d..80cd9c4b 100644 --- a/ZR.Service/mes/wms/WMlocationInfoService.cs +++ b/ZR.Service/mes/wms/WMlocationInfoService.cs @@ -1,14 +1,7 @@ using Infrastructure.Attribute; -using Microsoft.Extensions.DependencyInjection; using SqlSugar; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZR.Model.MES.qu; using ZR.Model.MES.wms; -using ZR.Service.mes.qc.IService; using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms @@ -25,7 +18,7 @@ namespace ZR.Service.mes.wms /// public WmInfo Getlocationinfo(int warehouse_num, string locationcode) { - return Context.Queryable().Where(it=>it.WarehouseNum== warehouse_num && it.Location==locationcode).First(); + return Context.Queryable().Where(it => it.WarehouseNum == warehouse_num && it.Location == locationcode).First(); } /// diff --git a/ZR.Service/mes/wms/WmAGVService.cs b/ZR.Service/mes/wms/WmAGVService.cs index 395507dd..8e592873 100644 --- a/ZR.Service/mes/wms/WmAGVService.cs +++ b/ZR.Service/mes/wms/WmAGVService.cs @@ -1,20 +1,13 @@ -using System; -using SqlSugar; +using Infrastructure; using Infrastructure.Attribute; -using Infrastructure.Extensions; -using ZR.Model; - -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; +using Mapster; +using SqlSugar; +using System; +using System.Text.Json; +using ZR.Model.MES.pro; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; using ZR.Service.mes.wms.IService; -using ZR.Model.MES.pro; -using Mapster; -using Infrastructure; -using System.Text.Json; -using System.Threading.Tasks; namespace ZR.Service.Business { @@ -128,28 +121,29 @@ namespace ZR.Service.Business /// /// /// - public string GenerateAgvTask(string taskid,int flag) + public string GenerateAgvTask(string taskid, int flag) { - AgvTask agvTask= Context.Queryable().Where(it => it.Id == taskid).First(); + AgvTask agvTask = Context.Queryable().Where(it => it.Id == taskid).First(); // 保存当前控制台文本颜色 ConsoleColor originalColor = Console.ForegroundColor; - + // 设置文本颜色为红色 Console.ForegroundColor = ConsoleColor.Red; - + string url = "http://192.168.60.1:8182/rcms/services/rest/hikRpcService/genAgvSchedulingTask"; Console.WriteLine("=======》打印请求URL:" + url); string start_point = ""; string end_point = ""; - if (flag==1) { - start_point =agvTask.GoStartPoint; + if (flag == 1) + { + start_point = agvTask.GoStartPoint; end_point = agvTask.GoEndPoint; } - else if (flag==2) + else if (flag == 2) { start_point = agvTask.BackStartPoint; end_point = agvTask.BackEndPoint; @@ -178,18 +172,19 @@ namespace ZR.Service.Business Console.WriteLine("=======》打印请求数据:" + postData); - string response= HttpHelper.HttpPost(url, postData); - + string response = HttpHelper.HttpPost(url, postData); + // 设置文本颜色为红色 Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("=======》打印请求数据返回:"+response); + Console.WriteLine("=======》打印请求数据返回:" + response); Console.ForegroundColor = originalColor; - AGV_task_third res_data= JsonSerializer.Deserialize(response); + AGV_task_third res_data = JsonSerializer.Deserialize(response); Console.WriteLine("=======》打印请求数据返回2:" + res_data.ToString()); - if (res_data!=null &&res_data.code=="0") { + if (res_data != null && res_data.code == "0") + { if (flag == 1) { @@ -211,31 +206,32 @@ namespace ZR.Service.Business /// /// /// - public string CancelAGVTask(string taskId, int flag) + public string CancelAGVTask(string taskId, int flag) { - if(flag!=1||flag!=2) + if (flag != 1 || flag != 2) { return null; } AgvTask agvTask = Context.Queryable().Where(it => it.Id == taskId).First(); - if(agvTask!=null) + if (agvTask != null) { string task_id = null; if (flag == 1) { // task_id = agvTask.GoTaskId; - }else if (flag == 2) + } + else if (flag == 2) { task_id = agvTask.BackTaskId; } - + string url = "http://192.168.60.1:8182/rcms/services/rest/hikRpcService/cancelTask"; AGVtask_cancel_third req = new AGVtask_cancel_third(); req.reqCode = SnowFlakeSingle.Instance.NextId().ToString(); req.forceCancel = "1"; req.taskCode = task_id; - string postData= JsonSerializer.Serialize(req); + string postData = JsonSerializer.Serialize(req); @@ -244,7 +240,7 @@ namespace ZR.Service.Business return response; } - return null; + return null; } } diff --git a/ZR.Service/mes/wms/WmBlankInventoryService.cs b/ZR.Service/mes/wms/WmBlankInventoryService.cs index b1d6b332..2ea28f13 100644 --- a/ZR.Service/mes/wms/WmBlankInventoryService.cs +++ b/ZR.Service/mes/wms/WmBlankInventoryService.cs @@ -1,15 +1,12 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; -using ZR.Model; -using ZR.Model.Dto; -using ZR.Model.MES.wms; -using ZR.Repository; +using SqlSugar; +using System; using System.Linq; -using ZR.Service.mes.wms.IService; +using ZR.Model; +using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; -using Microsoft.AspNetCore.Http.HttpResults; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { @@ -156,7 +153,7 @@ namespace ZR.Service.mes.wms result = AddBlankInventory(item.BlankNum, 1, parm.CreatedBy, parm.CreatedTime); } } - if(result > 0) + if (result > 0) { num++; } diff --git a/ZR.Service/mes/wms/WmBlankRecordService.cs b/ZR.Service/mes/wms/WmBlankRecordService.cs index db6321db..b60ff70e 100644 --- a/ZR.Service/mes/wms/WmBlankRecordService.cs +++ b/ZR.Service/mes/wms/WmBlankRecordService.cs @@ -1,15 +1,11 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; +using System; using ZR.Model; -using ZR.Model.Dto; -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { @@ -39,7 +35,7 @@ namespace ZR.Service.mes.wms var response = Queryable() .Where(predicate.ToExpression()) - .OrderByDescending(it=>it.CreatedTime) + .OrderByDescending(it => it.CreatedTime) .ToPage(parm); if (response.Result.Count > 0) { diff --git a/ZR.Service/mes/wms/WmCheckLogService.cs b/ZR.Service/mes/wms/WmCheckLogService.cs index 46b6c819..fd9f9461 100644 --- a/ZR.Service/mes/wms/WmCheckLogService.cs +++ b/ZR.Service/mes/wms/WmCheckLogService.cs @@ -1,14 +1,10 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; using ZR.Model; - -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; +using ZR.Repository; +using ZR.Service.Business.IBusinessService; namespace ZR.Service.Business { diff --git a/ZR.Service/mes/wms/WmCustomService.cs b/ZR.Service/mes/wms/WmCustomService.cs index c466d777..6af48233 100644 --- a/ZR.Service/mes/wms/WmCustomService.cs +++ b/ZR.Service/mes/wms/WmCustomService.cs @@ -1,16 +1,10 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; using ZR.Model; -using ZR.Model.Dto; - -using ZR.Repository; - -using System.Linq; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { diff --git a/ZR.Service/mes/wms/WmFgentryInspectService.cs b/ZR.Service/mes/wms/WmFgentryInspectService.cs index 7a8afb06..fbbbf9a8 100644 --- a/ZR.Service/mes/wms/WmFgentryInspectService.cs +++ b/ZR.Service/mes/wms/WmFgentryInspectService.cs @@ -1,20 +1,13 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; -using ZR.Model; -using ZR.Model.Dto; - -using ZR.Repository; +using SqlSugar; +using System; using System.Linq; -using ZR.Service.mes.wms.IService; +using ZR.Model; +using ZR.Model.MES.pro; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; -using Mapster; -using System.Reflection.PortableExecutable; -using Microsoft.AspNetCore.Http.HttpResults; -using ZR.Model.MES.pro; -using System.Drawing; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { @@ -51,11 +44,11 @@ namespace ZR.Service.mes.wms CreatedTime = DateTime.Now, }).ToList(); - + var x = Context.Storageable(inpects) - .WhereColumns(it =>new { it.Packcode ,it.Workorder}) + .WhereColumns(it => new { it.Packcode, it.Workorder }) .ToStorage(); - sum= x.AsInsertable.ExecuteCommand();//不存在插入 + sum = x.AsInsertable.ExecuteCommand();//不存在插入 x.AsUpdateable.ExecuteCommand();//存在更新 return sum; @@ -109,19 +102,19 @@ namespace ZR.Service.mes.wms ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0), Packnum = SqlFunc.AggregateCount(it.Workorder), Partnumber = SqlFunc.AggregateMax(it.Partnumber), - CreatedTime= SqlFunc.AggregateMax(it.CreatedTime), - - }) - .LeftJoin((s, w) => s.Workorder==w.ClientWorkorder) - .Select((s,w)=>new WmFgentryInspect_parentDto + CreatedTime = SqlFunc.AggregateMax(it.CreatedTime), + + }) + .LeftJoin((s, w) => s.Workorder == w.ClientWorkorder) + .Select((s, w) => new WmFgentryInspect_parentDto { - Workorder= s.Workorder, - ProductionNum=s.ProductionNum, - Partnumber=s.Partnumber, + Workorder = s.Workorder, + ProductionNum = s.ProductionNum, + Partnumber = s.Partnumber, CreatedTime = s.CreatedTime, Packnum = s.Packnum, - ProductDescription =w.ProductDescription, - Specifications=w.Specifications, + ProductDescription = w.ProductDescription, + Specifications = w.Specifications, PreviousNumber = w.PreviousNumber, Colour = w.Colour, Status = w.Status @@ -156,8 +149,8 @@ namespace ZR.Service.mes.wms { PageSize = parm.PageSize, PageIndex = parm.PageNum, - TotalNum= inspects.Count, - + TotalNum = inspects.Count, + Result = pageProducts }; @@ -173,7 +166,7 @@ namespace ZR.Service.mes.wms var predicate = Expressionable.Create() .AndIF(!string.IsNullOrEmpty(parm.Workorder), s => s.Workorder.Contains(parm.Workorder)) .AndIF(!string.IsNullOrEmpty(parm.Packcode), s => s.Packcode.Contains(parm.Packcode)) - .AndIF(!string.IsNullOrEmpty(parm.Partnumber), s=> s.Partnumber.Contains(parm.Partnumber)) + .AndIF(!string.IsNullOrEmpty(parm.Partnumber), s => s.Partnumber.Contains(parm.Partnumber)) .AndIF(parm.starttime != null && parm.starttime > new DateTime(1999, 1, 1), s => s.CreatedTime > parm.starttime) .AndIF(parm.endtime != null && parm.endtime > new DateTime(1999, 1, 1), s => s.CreatedTime < parm.endtime) ; @@ -185,13 +178,13 @@ namespace ZR.Service.mes.wms { Workorder = s.Workorder, ProductionNum = s.ProductionNum, - Packcode=s.Packcode, - Machine=s.Machine, - Bfilled=s.Bfilled, + Packcode = s.Packcode, + Machine = s.Machine, + Bfilled = s.Bfilled, Partnumber = s.Partnumber, - Result=s.Result, - CreatedBy=s.CreatedBy, - CreatedTime=s.CreatedTime, + Result = s.Result, + CreatedBy = s.CreatedBy, + CreatedTime = s.CreatedTime, ProductDescription = w.ProductDescription, Specifications = w.Specifications, Colour = w.Colour diff --git a/ZR.Service/mes/wms/WmGoodsActionService.cs b/ZR.Service/mes/wms/WmGoodsActionService.cs index 84779105..399f904f 100644 --- a/ZR.Service/mes/wms/WmGoodsActionService.cs +++ b/ZR.Service/mes/wms/WmGoodsActionService.cs @@ -1,22 +1,11 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; -using ZR.Model; -using ZR.Model.Dto; -using ZR.Model.MES.wms; -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; -using ZR.Service.mes.wms.IService; -using ZR.Model.MES.wms.Dto; -using System.Text.Json; using MimeKit.Utils; -using System.Collections.Generic; -using Org.BouncyCastle.Crypto; -using static System.Runtime.InteropServices.JavaScript.JSType; -using Microsoft.AspNetCore.Http.HttpResults; -using System.Text.Json.Nodes; +using SqlSugar; +using System; +using System.Text.Json; +using ZR.Model.MES.wms; +using ZR.Model.MES.wms.Dto; +using ZR.Service.mes.wms.IService; namespace ZR.Service.Business { @@ -55,11 +44,11 @@ namespace ZR.Service.Business if (num == 1) { - description = "\n主箱:" + package.PatchCode+" 数量:"+ package.Quantity + ",\n次箱:"; + description = "\n主箱:" + package.PatchCode + " 数量:" + package.Quantity + ",\n次箱:"; quantityCount += package.Quantity; continue; } - if(num==2) + if (num == 2) { secondId = check1.Id; description += package.PatchCode + " 数量:" + package.Quantity + ","; @@ -100,7 +89,7 @@ namespace ZR.Service.Business .ToExpression(); WmPackingrecord lastPackingrecord = Context.Queryable() .Where(packingrecordExp) - .OrderBy(it=>it.PackingCode, OrderByType.Desc) + .OrderBy(it => it.PackingCode, OrderByType.Desc) .First(); // 优先处理箱打印有历史数据情况 if (lastPackingrecord != null) @@ -249,7 +238,7 @@ namespace ZR.Service.Business if (isDelete) { // 删除次箱 - Context.Deleteable().Where(it=>it.Id == secondId).ExecuteCommand(); + Context.Deleteable().Where(it => it.Id == secondId).ExecuteCommand(); } else { @@ -324,7 +313,7 @@ namespace ZR.Service.Business throw new Exception("生成标签数据异常:" + lastPackingrecord.PackingCode); } } - if(lastConsolidationPackage != null ) + if (lastConsolidationPackage != null) { if (int.TryParse(lastConsolidationPackage.PackageCodeClient.Split('_')[1], out int lastConsolidationPackageCode)) { @@ -473,11 +462,12 @@ namespace ZR.Service.Business return log; } // 添加包装箱标签记录(暂不使用) - public void AddPackingrecord(WmGoodsNowProduction production,string workOrderId, bool isFill = false) + public void AddPackingrecord(WmGoodsNowProduction production, string workOrderId, bool isFill = false) { try { - if(int.TryParse(production.PackageCodeClient.Split('_')[1], out int packageNum)) { + if (int.TryParse(production.PackageCodeClient.Split('_')[1], out int packageNum)) + { WmPackingrecord packingrecord = new() { PartNum = production.Partnumber, @@ -495,7 +485,7 @@ namespace ZR.Service.Business { throw new Exception("包装箱标签批次号数量解析失败!"); } - + } catch (Exception ex) { diff --git a/ZR.Service/mes/wms/WmGoodsBatchSearchService.cs b/ZR.Service/mes/wms/WmGoodsBatchSearchService.cs index 4ed787fb..56bd07c3 100644 --- a/ZR.Service/mes/wms/WmGoodsBatchSearchService.cs +++ b/ZR.Service/mes/wms/WmGoodsBatchSearchService.cs @@ -1,21 +1,10 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms.Dto; -using System.Text.Json; -using MimeKit.Utils; -using System.Collections.Generic; -using Org.BouncyCastle.Crypto; -using static System.Runtime.InteropServices.JavaScript.JSType; -using JinianNet.JNTemplate; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.Business { @@ -64,7 +53,7 @@ namespace ZR.Service.Business foreach (WmGoodsBatchTableDto item in result.Result) { WmMaterial material = Context.Queryable() - .Where(it => it.Partnumber==item.Partnumber) + .Where(it => it.Partnumber == item.Partnumber) .First(); if (material == null) { diff --git a/ZR.Service/mes/wms/WmGoodsChangeLogService.cs b/ZR.Service/mes/wms/WmGoodsChangeLogService.cs index 9fa418fd..1108c44d 100644 --- a/ZR.Service/mes/wms/WmGoodsChangeLogService.cs +++ b/ZR.Service/mes/wms/WmGoodsChangeLogService.cs @@ -1,15 +1,11 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; +using System; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms.Dto; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.Business { @@ -32,13 +28,13 @@ namespace ZR.Service.Business .AndIF(parm.Type > 0, it => it.Type == parm.Type) .AndIF(!string.IsNullOrEmpty(parm.Description), it => it.Description.Contains(parm.Description)) // 当天0点 - .AndIF(DateTime.TryParse(parm.StartTimeStr,out searchStartTime), it => it.CreatedTime > searchStartTime) + .AndIF(DateTime.TryParse(parm.StartTimeStr, out searchStartTime), it => it.CreatedTime > searchStartTime) // 当天23点59分59秒 .AndIF(DateTime.TryParse(parm.EndTimeStr, out searchEndTime), it => it.CreatedTime < searchEndTime.AddDays(1).AddTicks(-1)) ; var response = Queryable() .Where(predicate.ToExpression()) - .OrderBy(it=>it.CreatedTime,OrderByType.Desc) + .OrderBy(it => it.CreatedTime, OrderByType.Desc) .ToPage(parm); return response; } diff --git a/ZR.Service/mes/wms/WmGoodsNowProductionService.cs b/ZR.Service/mes/wms/WmGoodsNowProductionService.cs index 1375279c..7b53ab9d 100644 --- a/ZR.Service/mes/wms/WmGoodsNowProductionService.cs +++ b/ZR.Service/mes/wms/WmGoodsNowProductionService.cs @@ -1,17 +1,12 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; -using ZR.Model; -using ZR.Repository; - +using SqlSugar; +using System; using System.Linq; +using ZR.Model; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; +using ZR.Repository; using ZR.Service.mes.wms.IService; -using System.Collections.Generic; -using Mapster; -using System.Reflection; namespace ZR.Service.mes.wms { @@ -36,13 +31,13 @@ namespace ZR.Service.mes.wms var response = Queryable() .Where(predicate.ToExpression()) - .OrderByDescending(x=>x.EntryWarehouseTime) + .OrderByDescending(x => x.EntryWarehouseTime) .ToPage(parm); foreach (WmGoodsNowProductionDto item in response.Result) { WmMaterial material = Context.Queryable() - .Where(it => it.Partnumber==item.Partnumber) + .Where(it => it.Partnumber == item.Partnumber) .First(); if (material == null) { @@ -128,7 +123,7 @@ namespace ZR.Service.mes.wms .Where(predicate.ToExpression()) .OrderByDescending(it => it.PackageCodeClient) .ToList(); - + // 聚合数据 resultList = wmGoodsNowsList.GroupBy(it => it.PackageCodeClient.Split('_')[0]) .Select(group => new WmGoodShortPackageCodeDto @@ -137,7 +132,7 @@ namespace ZR.Service.mes.wms Partnumber = group.Max(item => item.Partnumber), EntryWarehouseTime = group.Max(item => item.EntryWarehouseTime), PackageNumber = group.Count(), - PartnumberNumber = group.Sum(item=>item.GoodsNumAction) + PartnumberNumber = group.Sum(item => item.GoodsNumAction) }).ToList(); // 结果数据处理 //每页多少条 @@ -178,7 +173,7 @@ namespace ZR.Service.mes.wms Partnumber = it.Partnumber, GoodsNumAction = it.GoodsNumAction, EntryWarehouseTime = it.EntryWarehouseTime, - Remark = (!string.IsNullOrEmpty(it.Remark)? it.Remark:"无备注"), + Remark = (!string.IsNullOrEmpty(it.Remark) ? it.Remark : "无备注"), }) .ToList(); foreach (WmGoodsNowProductionDto item in response) @@ -330,7 +325,7 @@ namespace ZR.Service.mes.wms }; item.Value = value; item.Label = label; - + } return response; } diff --git a/ZR.Service/mes/wms/WmGoodsOutProductionService.cs b/ZR.Service/mes/wms/WmGoodsOutProductionService.cs index 8f8373cc..def6c2d1 100644 --- a/ZR.Service/mes/wms/WmGoodsOutProductionService.cs +++ b/ZR.Service/mes/wms/WmGoodsOutProductionService.cs @@ -1,17 +1,9 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; -using ZR.Model; -using ZR.Model.Dto; - -using ZR.Repository; -using System.Linq; -using ZR.Service.mes.wms.IService; +using SqlSugar; +using System; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; -using static System.Runtime.InteropServices.JavaScript.JSType; -using System.Collections.Generic; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { @@ -26,7 +18,7 @@ namespace ZR.Service.mes.wms /// /// /// - public (List,int) GetList(WmGoodsOutProductionQueryDto parm) + public (List, int) GetList(WmGoodsOutProductionQueryDto parm) { int total = 0; var predicate = Expressionable.Create() @@ -40,10 +32,10 @@ namespace ZR.Service.mes.wms .Where(predicate.ToExpression()) .Select((wgo, wml) => new WmGoodsOutProductionDto { Description = wml.Description }, true) .MergeTable() - .OrderBy(wml => wml.OutTime,OrderByType.Desc) - .ToPageList(parm.PageNum, parm.PageSize,ref total); - - return (response,total); + .OrderBy(wml => wml.OutTime, OrderByType.Desc) + .ToPageList(parm.PageNum, parm.PageSize, ref total); + + return (response, total); } @@ -81,9 +73,9 @@ namespace ZR.Service.mes.wms } if (string.IsNullOrEmpty(model.Id)) { - model.Id= SnowFlakeSingle.Instance.NextId().ToString();//也可以在程序中直接获取ID + model.Id = SnowFlakeSingle.Instance.NextId().ToString();//也可以在程序中直接获取ID } - + //2. 根据成品仓库id修改记录 WmGoodsNowProduction updateModel = new WmGoodsNowProduction(); updateModel.Id = model.FkNowProductionId; @@ -142,7 +134,7 @@ namespace ZR.Service.mes.wms { WmGoodsNowProduction nowProduction = Context.Queryable() .Where(it => it.Id == list[i]).First(); - if(nowProduction == null) + if (nowProduction == null) { continue; } @@ -168,7 +160,7 @@ namespace ZR.Service.mes.wms Context.Deleteable().Where(it => it.Id == nowProduction.Id).ExecuteCommand(); } } - else if(type == 2) + else if (type == 2) { if (parm.PackageCodeClient == "" || parm.PackageCodeClient == null) { @@ -176,7 +168,7 @@ namespace ZR.Service.mes.wms } // 短批次号 string shortPackageCode = parm.PackageCodeClient.Split('_')[0]; - if (shortPackageCode.Length<8) + if (shortPackageCode.Length < 8) { return "请输入至少8位批次号编码,以保证正确批次出库!"; } diff --git a/ZR.Service/mes/wms/WmMaterialService.cs b/ZR.Service/mes/wms/WmMaterialService.cs index 04113be9..2ad66e9d 100644 --- a/ZR.Service/mes/wms/WmMaterialService.cs +++ b/ZR.Service/mes/wms/WmMaterialService.cs @@ -1,16 +1,11 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; +using System; using ZR.Model; -using ZR.Model.Dto; - -using ZR.Repository; - -using System.Linq; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { @@ -34,15 +29,15 @@ namespace ZR.Service.mes.wms .AndIF(parm.Color != null, it => it.Color.Contains(parm.Color)) .AndIF(parm.Specification != null, it => it.Specification.Contains(parm.Specification)) .AndIF(parm.Description != null, it => it.Description.Contains(parm.Description)) - .AndIF(!string.IsNullOrEmpty( parm.Search1), it => it.Search1.Contains(parm.Search1) || it.Search1.Contains(parm.Search2)) + .AndIF(!string.IsNullOrEmpty(parm.Search1), it => it.Search1.Contains(parm.Search1) || it.Search1.Contains(parm.Search2)) .AndIF(parm.Type > 0, it => it.Type == parm.Type) .AndIF(parm.Status > -1, it => it.Status == parm.Status); var response = Queryable() - .Where(predicate.ToExpression()).OrderByDescending(it=>it.CreatedTime) + .Where(predicate.ToExpression()).OrderByDescending(it => it.CreatedTime) .ToPage(parm); - + return response; } @@ -69,7 +64,7 @@ namespace ZR.Service.mes.wms /// public WmMaterial AddWmMaterial(WmMaterial model) { - model.Id= SnowFlakeSingle.Instance.NextId().ToString(); + model.Id = SnowFlakeSingle.Instance.NextId().ToString(); return Context.Insertable(model).ExecuteReturnEntity(); } @@ -115,25 +110,25 @@ namespace ZR.Service.mes.wms { return Context.Queryable() .Where(it => it.PackageCodeClient == patchCode).First(); - + } /// /// excel 插入或者更新 /// /// /// - public (int, int) ExcelADD(List materials) + public (int, int) ExcelADD(List materials) { - if(materials == null || materials.Count == 0) + if (materials == null || materials.Count == 0) { - return (-1,-1); + return (-1, -1); } - var x=Context.Storageable(materials) + var x = Context.Storageable(materials) .WhereColumns(it => it.Id) .ToStorage(); - int insert= x.AsInsertable.ExecuteCommand(); //执行插入 - int update= x.AsUpdateable.ExecuteCommand(); //执行更新  + int insert = x.AsInsertable.ExecuteCommand(); //执行插入 + int update = x.AsUpdateable.ExecuteCommand(); //执行更新  return (insert, update); } diff --git a/ZR.Service/mes/wms/WmOutOrderService.cs b/ZR.Service/mes/wms/WmOutOrderService.cs index 48e48079..1680a543 100644 --- a/ZR.Service/mes/wms/WmOutOrderService.cs +++ b/ZR.Service/mes/wms/WmOutOrderService.cs @@ -1,24 +1,15 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; +using Mapster; +using SqlSugar; +using System; +using System.Data; +using System.Linq; using ZR.Model; -using ZR.Repository; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; -using Mapster; -using System.Collections.Generic; -using System.Data; -using JinianNet.JNTemplate.Dynamic; -using System.Linq; -using System.Security.Cryptography.Xml; -using System.Collections; -using Infrastructure.Model; -using ZR.Service; +using ZR.Repository; +using ZR.Service.mes.wms.IService; using ZR.Service.Utils; -using Aliyun.OSS; -using Microsoft.AspNetCore.Hosting.Server; -using System.Numerics; namespace ZR.Service.mes.wms { diff --git a/ZR.Service/mes/wms/WmPackageLclService.cs b/ZR.Service/mes/wms/WmPackageLclService.cs index 43a38f6a..a187023c 100644 --- a/ZR.Service/mes/wms/WmPackageLclService.cs +++ b/ZR.Service/mes/wms/WmPackageLclService.cs @@ -1,16 +1,10 @@ -using System; -using SqlSugar; using Infrastructure.Attribute; -using Infrastructure.Extensions; +using SqlSugar; using ZR.Model; -using ZR.Model.Dto; using ZR.Model.MES.wms; -using ZR.Repository; -using ZR.Service.Business.IBusinessService; -using System.Linq; -using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms.Dto; -using System.Collections.Generic; +using ZR.Repository; +using ZR.Service.mes.wms.IService; namespace ZR.Service.mes.wms { @@ -39,7 +33,7 @@ namespace ZR.Service.mes.wms .Where(predicate.ToExpression()) .OrderByDescending(it => it.CreatedTime) .ToPage(parm); - if( response.Result.Count > 0) + if (response.Result.Count > 0) { foreach (WmPackageLclDto item in response.Result) { diff --git a/ZR.Tasks/ITaskSchedulerServer.cs b/ZR.Tasks/ITaskSchedulerServer.cs index f8f040e0..3ea83f59 100644 --- a/ZR.Tasks/ITaskSchedulerServer.cs +++ b/ZR.Tasks/ITaskSchedulerServer.cs @@ -1,28 +1,25 @@ using Infrastructure.Model; -using System; -using System.Collections.Generic; -using System.Text; using System.Threading.Tasks; using ZR.Model.System; namespace ZR.Tasks { - public interface ITaskSchedulerServer - { - Task StartTaskScheduleAsync(); + public interface ITaskSchedulerServer + { + Task StartTaskScheduleAsync(); - Task StopTaskScheduleAsync(); + Task StopTaskScheduleAsync(); - Task AddTaskScheduleAsync(SysTasks tasksQz); + Task AddTaskScheduleAsync(SysTasks tasksQz); - Task PauseTaskScheduleAsync(SysTasks tasksQz); + Task PauseTaskScheduleAsync(SysTasks tasksQz); - Task ResumeTaskScheduleAsync(SysTasks tasksQz); + Task ResumeTaskScheduleAsync(SysTasks tasksQz); - Task DeleteTaskScheduleAsync(SysTasks tasksQz); + Task DeleteTaskScheduleAsync(SysTasks tasksQz); - Task RunTaskScheduleAsync(SysTasks tasksQz); + Task RunTaskScheduleAsync(SysTasks tasksQz); - Task UpdateTaskScheduleAsync(SysTasks tasksQz); - } + Task UpdateTaskScheduleAsync(SysTasks tasksQz); + } } diff --git a/ZR.Tasks/TaskScheduler/Job_HttpRequest.cs b/ZR.Tasks/TaskScheduler/Job_HttpRequest.cs index e96b7ca0..1ea38e3a 100644 --- a/ZR.Tasks/TaskScheduler/Job_HttpRequest.cs +++ b/ZR.Tasks/TaskScheduler/Job_HttpRequest.cs @@ -7,7 +7,6 @@ using SqlSugar.IOC; using System; using System.Threading.Tasks; using ZR.Model.System; -using ZR.Service.System.IService; namespace ZR.Tasks.TaskScheduler { diff --git a/ZR.Tasks/TaskScheduler/Job_SqlExecute.cs b/ZR.Tasks/TaskScheduler/Job_SqlExecute.cs index 4296aef0..72fa6582 100644 --- a/ZR.Tasks/TaskScheduler/Job_SqlExecute.cs +++ b/ZR.Tasks/TaskScheduler/Job_SqlExecute.cs @@ -5,7 +5,6 @@ using Quartz; using Quartz.Impl; using Quartz.Impl.Triggers; using SqlSugar.IOC; -using System; using System.Threading.Tasks; using ZR.Service.System.IService; @@ -28,7 +27,7 @@ namespace ZR.Tasks.TaskScheduler public async Task Run(IJobExecutionContext context) { AbstractTrigger trigger = (context as JobExecutionContextImpl).Trigger as AbstractTrigger; - + var info = await tasksQzService.GetByIdAsync(trigger.JobName); if (info != null && info.SqlText.IsNotEmpty()) diff --git a/ZR.Tasks/TaskScheduler/Job_SyncTest.cs b/ZR.Tasks/TaskScheduler/Job_SyncTest.cs index 5494c43f..4ee94706 100644 --- a/ZR.Tasks/TaskScheduler/Job_SyncTest.cs +++ b/ZR.Tasks/TaskScheduler/Job_SyncTest.cs @@ -15,7 +15,7 @@ namespace ZR.Tasks.TaskScheduler public async Task Execute(IJobExecutionContext context) { - await ExecuteJob(context, async () => await Run()); + await ExecuteJob(context, async () => await Run()); } public async Task Run()