Sfoglia il codice sorgente

添加项目文件。

林豪 左 2 anni fa
parent
commit
a9ca3cc8b5
100 ha cambiato i file con 7303 aggiunte e 0 eliminazioni
  1. 61 0
      wms.api.sln
  2. 5 0
      wms.api/.config/dotnet-tools.json
  3. 140 0
      wms.api/Controllers/BaseController.cs
  4. 265 0
      wms.api/Controllers/CpController.cs
  5. 68 0
      wms.api/Controllers/DBInitController.cs
  6. 419 0
      wms.api/Controllers/FjController.cs
  7. 1273 0
      wms.api/Controllers/HjController.cs
  8. 486 0
      wms.api/Controllers/PtController.cs
  9. 242 0
      wms.api/Controllers/SxController.cs
  10. 70 0
      wms.api/Controllers/WmsController.cs
  11. 75 0
      wms.api/Filter/LogFilter.cs
  12. 104 0
      wms.api/Job/JobScheduler.cs
  13. 30 0
      wms.api/Job/PostJob.cs
  14. 76 0
      wms.api/Program.cs
  15. 31 0
      wms.api/Properties/launchSettings.json
  16. 8 0
      wms.api/appsettings.Development.json
  17. 93 0
      wms.api/appsettings.json
  18. 38 0
      wms.api/autofac/AutofacModuleRegister.cs
  19. 25 0
      wms.api/wms.api.csproj
  20. 11 0
      wms.dataservice/DataService/CPDataService.cs
  21. 12 0
      wms.dataservice/DataService/FJDataService.cs
  22. 119 0
      wms.dataservice/DataService/HJDataService.cs
  23. 99 0
      wms.dataservice/DataService/PTDataService.cs
  24. 11 0
      wms.dataservice/DataService/SXDataService.cs
  25. 10 0
      wms.dataservice/IDataSetvice/ICPDataService.cs
  26. 11 0
      wms.dataservice/IDataSetvice/IFJDataService.cs
  27. 22 0
      wms.dataservice/IDataSetvice/IHJDataService.cs
  28. 15 0
      wms.dataservice/IDataSetvice/IPTDataService.cs
  29. 10 0
      wms.dataservice/IDataSetvice/ISXDataService.cs
  30. 14 0
      wms.dataservice/wms.dataservice.csproj
  31. 11 0
      wms.dto/attribute/SwaggerIgnoreAttribute.cs
  32. 47 0
      wms.dto/const/Const.cs
  33. 879 0
      wms.dto/const/EnumClass.cs
  34. 26 0
      wms.dto/request/cp/ComPushApiResInfoRequest.cs
  35. 57 0
      wms.dto/request/cp/CpStockChangeRequest.cs
  36. 18 0
      wms.dto/request/cp/ErrorMaterialStockOutFeedBackRequest.cs
  37. 22 0
      wms.dto/request/cp/ErrorMaterialStockOutRequest.cs
  38. 26 0
      wms.dto/request/cp/MoveStockLocationFeedBackRequest.cs
  39. 18 0
      wms.dto/request/cp/SalesDocTransFeedBackRequest.cs
  40. 42 0
      wms.dto/request/cp/SalesDocTransRequest.cs
  41. 34 0
      wms.dto/request/cp/SalesLeftDocTransFeedBackRequest.cs
  42. 10 0
      wms.dto/request/cp/SpoolMaterialInfoTransRequest.cs
  43. 44 0
      wms.dto/request/cp/StockChangeFeedBackRequest.cs
  44. 42 0
      wms.dto/request/cp/StockStateChangeRequest.cs
  45. 18 0
      wms.dto/request/fj/AllocationConveyorSortRequest.cs
  46. 11 0
      wms.dto/request/fj/AllocationWarehouseSortRequest.cs
  47. 28 0
      wms.dto/request/fj/BGradeMaterialStockOutFeedBackRequest.cs
  48. 31 0
      wms.dto/request/fj/BGradeMaterialStockOutRequest.cs
  49. 37 0
      wms.dto/request/fj/BomInfoTransRequest.cs
  50. 11 0
      wms.dto/request/fj/CurtainOrderStartCheckRequest.cs
  51. 103 0
      wms.dto/request/fj/CurtainProductionOrderRequest.cs
  52. 42 0
      wms.dto/request/fj/CurtainProductionStockOutFeedBackRequest.cs
  53. 34 0
      wms.dto/request/fj/CurtainProductionStockOutRequest.cs
  54. 39 0
      wms.dto/request/fj/ErrorMaterialStockOutFeedBackRequest.cs
  55. 37 0
      wms.dto/request/fj/FjErrorMaterialStockOutRequest.cs
  56. 81 0
      wms.dto/request/fj/FjProductionBackRequest.cs
  57. 54 0
      wms.dto/request/fj/FjStockChangeRequest.cs
  58. 75 0
      wms.dto/request/fj/ManualBuildStockTransRequest.cs
  59. 49 0
      wms.dto/request/fj/ProductionLeftFeedBackRequest.cs
  60. 74 0
      wms.dto/request/fj/SpoolMaterialInfoTransRequest.cs
  61. 40 0
      wms.dto/request/fj/StockChangeFeedBackRequest.cs
  62. 42 0
      wms.dto/request/fj/StockChangeStockInFeedBackRequest.cs
  63. 34 0
      wms.dto/request/fj/SyncMachineInfoRequest.cs
  64. 38 0
      wms.dto/request/fj/WetProductStockInFeedBackRequest.cs
  65. 46 0
      wms.dto/request/hj/AddJobRequest.cs
  66. 12 0
      wms.dto/request/hj/AddWcsMoveTaskRequest.cs
  67. 22 0
      wms.dto/request/hj/ApplyEmptySpoolRequest.cs
  68. 25 0
      wms.dto/request/hj/ApplyStockInLocRequest.cs
  69. 46 0
      wms.dto/request/hj/ApplyStockInRequest.cs
  70. 17 0
      wms.dto/request/hj/ApplyStockOutRequest.cs
  71. 40 0
      wms.dto/request/hj/ApplyStockOutTaskRequest.cs
  72. 62 0
      wms.dto/request/hj/CopperLineAgvTaskStockInToIWmsRequest.cs
  73. 82 0
      wms.dto/request/hj/CopperLineAgvTaskStockOutToIWmsRequest.cs
  74. 22 0
      wms.dto/request/hj/CopperLineAgvTaskToRcsRequest.cs
  75. 87 0
      wms.dto/request/hj/CopperLineRequest.cs
  76. 53 0
      wms.dto/request/hj/CopperLineStockInFeedBackRequest.cs
  77. 28 0
      wms.dto/request/hj/CreateMoveWcsTaskRequest.cs
  78. 40 0
      wms.dto/request/hj/CreateStockInWcsTaskRequest.cs
  79. 65 0
      wms.dto/request/hj/CreateStockOutWcsTaskRequest.cs
  80. 39 0
      wms.dto/request/hj/DetailCodeRequest.cs
  81. 11 0
      wms.dto/request/hj/DetailRequest2Str.cs
  82. 14 0
      wms.dto/request/hj/GetBarCodeInfoRequest.cs
  83. 35 0
      wms.dto/request/hj/GetCurStockListRequest.cs
  84. 16 0
      wms.dto/request/hj/GetSysJobListRequest.cs
  85. 10 0
      wms.dto/request/hj/GetTunnelEmptyConCountRequest.cs
  86. 24 0
      wms.dto/request/hj/GetTunnelListRequest.cs
  87. 104 0
      wms.dto/request/hj/HjMaterialStockInRequest.cs
  88. 40 0
      wms.dto/request/hj/MoveStockFeedBackRequest.cs
  89. 44 0
      wms.dto/request/hj/RfidCheckDiffRequest.cs
  90. 39 0
      wms.dto/request/hj/SpecialPickMaterApplyRequest.cs
  91. 29 0
      wms.dto/request/hj/SpecialPickMaterFeedBackRequest.cs
  92. 16 0
      wms.dto/request/hj/SrmPickOutCompletedRequest.cs
  93. 50 0
      wms.dto/request/hj/StockChangeFeedBackRequest.cs
  94. 63 0
      wms.dto/request/hj/StockChangeRequest.cs
  95. 11 0
      wms.dto/request/hj/SyncMaterRequest.cs
  96. 14 0
      wms.dto/request/hj/SysJobDto.cs
  97. 17 0
      wms.dto/request/hj/TunnelRequest.cs
  98. 19 0
      wms.dto/request/hj/TunnelStatusEntity.cs
  99. 42 0
      wms.dto/request/hj/WcsTaskCallBackRequest.cs
  100. 22 0
      wms.dto/request/hj/WcsUploadInfoRequest.cs

+ 61 - 0
wms.api.sln

@@ -0,0 +1,61 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32317.152
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wms.api", "wms.api\wms.api.csproj", "{1E7DF4AC-CBDC-403D-AAB4-9052B2E4F5A0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wms.dto", "wms.dto\wms.dto.csproj", "{D5759FC4-E48E-44F7-8438-E310F8D85CB3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wms.service", "wms.service\wms.service.csproj", "{992E7508-C77A-40D7-A2DE-73C3CB3BCA61}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wms.sqlsugar", "wms.sqlsugar\wms.sqlsugar.csproj", "{55B67A19-AA9F-4C8E-9F5C-D66E4004A027}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wms.util", "wms.util\wms.util.csproj", "{A9E41092-7425-4315-8744-84C655A0D45F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wms.package", "wms.package\wms.package.csproj", "{9E536B81-F8CA-4E7E-AB6E-E0937F5A43F9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wms.dataservice", "wms.dataservice\wms.dataservice.csproj", "{74BDF377-75EA-4496-A848-5C5F0CAF0388}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1E7DF4AC-CBDC-403D-AAB4-9052B2E4F5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1E7DF4AC-CBDC-403D-AAB4-9052B2E4F5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1E7DF4AC-CBDC-403D-AAB4-9052B2E4F5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1E7DF4AC-CBDC-403D-AAB4-9052B2E4F5A0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D5759FC4-E48E-44F7-8438-E310F8D85CB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D5759FC4-E48E-44F7-8438-E310F8D85CB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D5759FC4-E48E-44F7-8438-E310F8D85CB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D5759FC4-E48E-44F7-8438-E310F8D85CB3}.Release|Any CPU.Build.0 = Release|Any CPU
+		{992E7508-C77A-40D7-A2DE-73C3CB3BCA61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{992E7508-C77A-40D7-A2DE-73C3CB3BCA61}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{992E7508-C77A-40D7-A2DE-73C3CB3BCA61}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{992E7508-C77A-40D7-A2DE-73C3CB3BCA61}.Release|Any CPU.Build.0 = Release|Any CPU
+		{55B67A19-AA9F-4C8E-9F5C-D66E4004A027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{55B67A19-AA9F-4C8E-9F5C-D66E4004A027}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{55B67A19-AA9F-4C8E-9F5C-D66E4004A027}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{55B67A19-AA9F-4C8E-9F5C-D66E4004A027}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A9E41092-7425-4315-8744-84C655A0D45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A9E41092-7425-4315-8744-84C655A0D45F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A9E41092-7425-4315-8744-84C655A0D45F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A9E41092-7425-4315-8744-84C655A0D45F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9E536B81-F8CA-4E7E-AB6E-E0937F5A43F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9E536B81-F8CA-4E7E-AB6E-E0937F5A43F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9E536B81-F8CA-4E7E-AB6E-E0937F5A43F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9E536B81-F8CA-4E7E-AB6E-E0937F5A43F9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{74BDF377-75EA-4496-A848-5C5F0CAF0388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{74BDF377-75EA-4496-A848-5C5F0CAF0388}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{74BDF377-75EA-4496-A848-5C5F0CAF0388}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{74BDF377-75EA-4496-A848-5C5F0CAF0388}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {5AD891A7-A985-4CBD-9C50-36F2E79D8E82}
+	EndGlobalSection
+EndGlobal

+ 5 - 0
wms.api/.config/dotnet-tools.json

@@ -0,0 +1,5 @@
+{
+  "version": 1,
+  "isRoot": true,
+  "tools": {}
+}

+ 140 - 0
wms.api/Controllers/BaseController.cs

@@ -0,0 +1,140 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using System.Diagnostics;
+using wms.dto.request;
+using wms.dto.response;
+using wms.service;
+using wms.service.IService;
+using wms.util.Check;
+using wms.util.Ext;
+using wms.util.Http;
+
+namespace wms.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class BaseController : ControllerBase
+    {
+        private readonly IHJService _hJService;
+        private readonly IPTService _ptService;
+        private readonly IFJService _fjService;
+        private readonly ISXService _sxService;
+        private readonly ICPService _cpService;
+        private readonly ILogger<BaseController> _logger;
+        public BaseController(IHJService hJService ,ILogger<BaseController> logger)
+        {
+            _hJService = hJService;
+            _logger = logger;
+        }
+        public BaseController(IPTService ptService)
+        {
+            _ptService = ptService;
+        }
+        public BaseController(IFJService fjService)
+        {
+            _fjService = fjService;
+        }
+        public BaseController(ISXService sxService)
+        {
+            _sxService = sxService;
+        }
+        public BaseController(ICPService cpService)
+        {
+            _cpService = cpService;
+        }
+        /// <summary>
+        /// 发送ESB请求统一出口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        internal string WmsServiceExportApi(object strReqBody)
+        {
+            var res = new SRes();
+            //var aa = (new StackTrace()).GetFrame(0).GetMethod().Name;//当前方法名
+            var methodName = (new StackTrace()).GetFrame(1).GetMethod().Name;//调用的方法名称                                                 
+            string methodcode = "";
+            if (_ptService != null)
+            {
+                methodcode = _ptService.GetSysConfigContentByCode(methodName);
+            }
+            else if (_hJService != null)
+            {
+                methodcode = _hJService.GetSysConfigContentByCode(methodName);
+            }
+
+            if (string.IsNullOrEmpty(methodcode))
+            {
+                return new SRes() { ResCode = 0, ResMsg = "数据表没有配置" }.ToCamelCaseString();
+            }
+            methodcode = RedisHelper.Get("sys_config" + methodName);
+            var reqid = Guid.NewGuid().ToString();
+            var req = new EsbReq() { headers = new HeadersReq() { serviceCode = methodcode.Split("|")[0],requestId = reqid,TrackId = reqid } };
+            //req.Body = strReqBody;
+            string sysname = methodcode.Split("|")[1];
+            var apiurl = "";
+            if (sysname == "mes")
+            {
+                apiurl = wms.util.AppSettings.GetConfig("EsbMesPushUrl");
+            }
+            else
+            {
+                apiurl = wms.util.AppSettings.GetConfig("EsbErpPushUrl");
+            }
+            var strEsbRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(strReqBody), 30000, "UTF-8", "application/json", reqid, req.headers.sourceCode, req.headers.serviceCode);
+            if (!string.IsNullOrEmpty(strEsbRes))
+            {
+                //res = JsonConvert.DeserializeObject<SRes>(strEsbRes);
+                return strEsbRes;
+            }
+            else
+            {
+                res = new SRes() { ResMsg = "MES没有返回任务数据",ResCode = 500,Memo1 = apiurl,Memo2 = req.ToJsonString(),Memo3 = strEsbRes };
+            }
+            return res.ToCamelCaseString();
+        }
+        /// <summary>
+        /// 并发管控
+        /// </summary>
+        /// <typeparam name="T">方法请求参数类型</typeparam>
+        /// <typeparam name="U">方法响应参数类型</typeparam>
+        /// <param name="lockobj">方法锁</param>
+        /// <param name="key">并发管控关键key</param>
+        /// <param name="equNo">管控设备号</param>
+        /// <param name="reqparam">请求参数</param>
+        /// <param name="fun">管控方法</param>
+        /// <returns></returns>
+        public U ConcurrencyReqControl<T, U>(object lockobj, string key, string equNo, BaseRequest reqparam, Func<T, U> fun) where T : BaseRequest where U : SRes, new()
+        {
+            var res = new U();
+            try
+            {
+                lock (lockobj)
+                {
+                    //并发管控
+                    var sign = RedisHelper.Get(key);
+                    if (!string.IsNullOrEmpty(sign) && sign == "1")
+                    {
+                        //不可通行
+                        res.ResCode = 0;
+                        res.ResMsg = equNo + "并发重复请求";
+                        return res;
+                    }
+                    //加状态
+                    RedisHelper.Set(key, "1");
+                }
+                var resulttemp = fun((T)reqparam);
+                RedisHelper.Set(key, "0");
+                return resulttemp;
+            }
+            catch (Exception ex)
+            {
+                RedisHelper.Set(key, "0");
+                res.ResCode = 500;
+                res.ResMsg = ex.Message;
+                return res;
+            }
+        }
+
+    }
+}

+ 265 - 0
wms.api/Controllers/CpController.cs

@@ -0,0 +1,265 @@
+using AutoMapper;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using wms.dto;
+using wms.dto.request;
+using wms.dto.request.cp;
+using wms.dto.response;
+using wms.dto.response.cp;
+using wms.service.IService;
+using wms.sqlsugar.model.cp;
+using wms.util.Ext;
+
+namespace wms.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class CpController : BaseController
+    {
+        private readonly ICPService _cpService;
+        private readonly ILogger<CpController> _logger;
+        private readonly IMapper _mapper;
+        static object lockerSalesDocTrans = new object();
+        static object lockerSalesBackDocTrans = new object();
+        static object lockerComPushApiResInfo = new object();
+        static object lockerStockChange = new object();
+        static object lockerStockStateChange = new object();
+        
+
+
+
+
+        public CpController(ICPService cpService, ILogger<CpController> logger, IMapper mapper) : base(cpService)
+        {
+            _cpService = cpService;
+            _logger = logger;
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 同步物料基础信息
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string SyncMaterInfo(SyncMaterInfoRequest reqBody)
+        {
+            var result = new SRes();
+            //_logger.LogInformation("请求参数:{@reqBody},{aa}", reqBody,1);
+            CPSyncMaterInfoResponse resbody = JsonConvert.DeserializeObject<CPSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+            if (reqBody.SyncType == 1)
+            {
+                reqBody.PageIndex = 1;
+                while (resbody.ResData.Any())
+                {
+                    _cpService.SyncMaterInfo(resbody.ResData);
+                    reqBody.PageIndex++;
+                    resbody = JsonConvert.DeserializeObject<CPSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                }
+            }
+            else if (reqBody.SyncType == 2)
+            {
+                //拿到增量
+                var increconf = _cpService.GetSysConfigByCode(Const.MESMaterialInitIncrement);
+                if (increconf != null)
+                {
+                    reqBody.StartTime = DateTime.Parse(increconf.SContent);
+                    //reqBody.Count = int.Parse(increconf.Remark);
+                    resbody = JsonConvert.DeserializeObject<CPSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_cpService.SyncMaterInfo(resbody.ResData))
+                        {
+                            var lastdata = resbody.ResData.OrderBy(p => p.UpdatedTime).Last();
+                            _cpService.UpdateSysConfigModelColumns(new sqlsugar.model.UpdateModelColumns<cpSysConfig>()
+                            {
+                                Columns = it => new cpSysConfig { SContent = lastdata.UpdatedTime.ToString("yyyy-MM-dd HH:mm:ss.fff") },
+                                WhereExpression = it => it.Code == Const.MESMaterialInitIncrement
+                            });
+                        }
+                    }
+                    else
+                    {
+                        result.ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode();
+                        result.ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription();
+                    }
+                }
+                else
+                {
+                    result.ResCode = ResponseStatusCodeEnum.AccountError.GetHashCode();
+                    result.ResMsg = "没有配置信息" + Const.MESMaterialInitIncrement;
+                }
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(reqBody.MatCode))
+                {
+                    resbody = JsonConvert.DeserializeObject<CPSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_cpService.SyncMaterInfo(resbody.ResData))
+                        {
+
+                        }
+                    }
+                }
+            }
+            return result.ToCamelCaseString();
+        }
+        /// <summary>
+        /// 销售单信息传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SalesDocTrans(SalesDocTransRequest reqDto)
+        {
+            return ConcurrencyReqControl<SalesDocTransRequest, SRes>(lockerSalesDocTrans, "SalesDocTrans" + reqDto.BillCode, reqDto.BillCode, reqDto, _cpService.SalesDocTrans);
+        }
+        /// <summary>
+        /// 销售出库信息反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SalesDocTransFeedBack(string doccode)
+        {
+            var list = _cpService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<SalesDocTransFeedBackRequest>>(list);
+            //var dto = new SalesDocTransFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dtolist));
+            return resbody;
+        }
+        /// <summary>
+        /// 退售单信息传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SalesBackDocTrans(SalesDocTransRequest reqDto)
+        {
+            return ConcurrencyReqControl<SalesDocTransRequest, SRes>(lockerSalesBackDocTrans, "SalesBackDocTrans" + reqDto.BillCode, reqDto.BillCode, reqDto, _cpService.SalesBackDocTrans);
+        }
+        /// <summary>
+        /// 销售退货入库信息反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SalesBackDocTransFeedBack(string doccode)
+        {
+            var list = _cpService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<SalesDocTransFeedBackRequest>>(list);
+            //var dto = new SalesDocTransFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dtolist));
+            return resbody;
+        }
+        /// <summary>
+        /// 销售余料回库入库信息反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SalesLeftDocTransFeedBack(string doccode)
+        {
+            var list = _cpService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<SalesLeftDocTransFeedBackRequest>>(list);
+            //var dto = new SalesDocTransFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dtolist));
+            return resbody;
+        }
+        /// <summary>
+        /// 接收回馈接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ComPushApiResInfo(ComPushApiResInfoRequest reqDto)
+        {
+            return ConcurrencyReqControl<ComPushApiResInfoRequest, SRes>(lockerComPushApiResInfo, "ComPushApiResInfo" + reqDto.ApiId, reqDto.ApiId, reqDto, _cpService.ComPushApiResInfo);
+        }
+        /// <summary>
+        /// 呆滞料/异常料出库接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ErrorMaterialStockOut(ErrorMaterialStockOutRequest reqDto)
+        {
+            return ConcurrencyReqControl<ErrorMaterialStockOutRequest, SRes>(lockerComPushApiResInfo, "ErrorMaterialStockOut" + reqDto.BillCode, reqDto.BillCode, reqDto, _cpService.ErrorMaterialStockOut);
+        }
+        /// <summary>
+        /// 呆滞料_异常料出库反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ErrorMaterialStockOutFeedBack(string doccode)
+        {
+            var list = _cpService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<ErrorMaterialStockOutFeedBackRequest>>(list);
+            //var dto = new SalesDocTransFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dtolist));
+            return resbody;
+        }
+        /// <summary>
+        /// 库存改判
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChange(CpStockChangeRequest reqDto)
+        {
+            return ConcurrencyReqControl<CpStockChangeRequest, SRes>(lockerStockChange, "StockChange" + reqDto.BillCode, reqDto.BillCode, reqDto, _cpService.StockChange);
+        }
+        /// <summary>
+        /// 改判反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChangeFeedBack(string doccode)
+        {
+            var list = _cpService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<StockChangeFeedBackRequestItem>>(list);
+            var dto = new StockChangeFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 实时库存查询接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetCurStockList(string reqDto)
+        {
+            return null;
+        }
+        /// <summary>
+        /// 移库货位上报MES接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes MoveStockLocationFeedBack(string doccode)
+        {
+            var list = _cpService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<MoveStockLocationFeedBackRequest>(list);
+            //var dto = new MoveStockLocationFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dtolist));
+            return resbody;
+        }
+        /// <summary>
+        /// 放行/冻结单传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public StockStateChangeResponse StockStateChange(StockStateChangeRequest reqDto)
+        {
+            return ConcurrencyReqControl<StockStateChangeRequest, StockStateChangeResponse>(lockerStockStateChange, "StockStateChange" + reqDto.BillCode, reqDto.BillCode, reqDto, _cpService.StockStateChange);
+        }
+    }
+}

+ 68 - 0
wms.api/Controllers/DBInitController.cs

@@ -0,0 +1,68 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using wms.service;
+using wms.service.IService;
+
+namespace wms.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class DBInitController : ControllerBase
+    {
+        private readonly IDBService _dBService;
+        public DBInitController(IDBService dBService)
+        {
+            _dBService = dBService;
+        }
+        /// <summary>
+        /// 初始化盘条库
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet(Name = "InitPtDB")]
+        public string InitPtDB()
+        {
+            _dBService.InitPtDB();
+            return "";
+        }
+        /// <summary>
+        /// 初始化合金库
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet(Name = "InitHjDB")]
+        public string InitHjDB()
+        {
+             _dBService.InitHjDB();
+            return "";
+        }
+        /// <summary>
+        /// 初始化分拣库
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet(Name = "InitFjDB")]
+        public string InitFjDB()
+        {
+             _dBService.InitFjDB();
+            return "";
+        }
+        /// <summary>
+        /// 初始化时效库
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet(Name = "InitSxDB")]
+        public string InitSxDB()
+        {
+             _dBService.InitSxDB();
+            return "";
+        }
+        /// <summary>
+        /// 初始化成品库
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet(Name = "InitCpDB")]
+        public string InitCpDB()
+        {
+             _dBService.InitCpDB();
+            return "";
+        }
+    }
+}

+ 419 - 0
wms.api/Controllers/FjController.cs

@@ -0,0 +1,419 @@
+using AutoMapper;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using wms.dto;
+using wms.dto.request;
+using wms.dto.request.fj;
+using wms.dto.request.share;
+using wms.dto.response;
+using wms.dto.response.fj;
+using wms.service.IService;
+using wms.sqlsugar.model.fj;
+using wms.util.Ext;
+
+namespace wms.api.Controllers
+{
+    /// <summary>
+    /// 分拣库控制器
+    /// </summary>
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class FjController : BaseController
+    {
+        private readonly IFJService _fjService;
+        private readonly ILogger<FjController> _logger;
+        private readonly IMapper _mapper;
+        static object lockerCurtainProductionOrder = new object();
+        static object lockerCurtainOrderStartCheck = new object();
+        static object lockerSpoolMaterialInfoTrans = new object();
+        static object lockerCurtainProductionStockOut = new object();
+        static object lockerProductionBack = new object();
+        static object lockerErrorMaterialStockOut = new object();
+        static object lockerBGradeMaterialStockOut = new object();
+        static object lockerlockerStockChange = new object();
+        static object lockerManualBuildStockTrans = new object();
+        static object lockerBomInfoTrans = new object();
+
+
+
+        public FjController(IFJService fjService, ILogger<FjController> logger, IMapper mapper) : base(fjService)
+        {
+            _fjService = fjService;
+            _logger = logger;
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 同步物料基础信息
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string SyncMaterInfo(SyncMaterInfoRequest reqBody)
+        {
+            var result = new SRes();
+            //_logger.LogInformation("请求参数:{@reqBody},{aa}", reqBody,1);
+            FJSyncMaterInfoResponse resbody = JsonConvert.DeserializeObject<FJSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+            if (reqBody.SyncType == 1)
+            {
+                reqBody.PageIndex = 1;
+                while (resbody.ResData !=null && resbody.ResData.Any())
+                {
+                    _fjService.SyncMaterInfo(resbody.ResData);
+                    reqBody.PageIndex++;
+                    resbody = JsonConvert.DeserializeObject<FJSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                }
+            }
+            else if (reqBody.SyncType == 2)
+            {
+                //拿到增量
+                var increconf = _fjService.GetSysConfigByCode(Const.MESMaterialInitIncrement);
+                if (increconf != null)
+                {
+                    reqBody.StartTime = DateTime.Parse(increconf.SContent);
+                    //reqBody.Count = int.Parse(increconf.Remark);
+                    resbody = JsonConvert.DeserializeObject<FJSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_fjService.SyncMaterInfo(resbody.ResData))
+                        {
+                            var lastdata = resbody.ResData.OrderBy(p => p.UpdatedTime).Last();
+                            _fjService.UpdateSysConfigModelColumns(new sqlsugar.model.UpdateModelColumns<fjSysConfig>()
+                            {
+                                Columns = it => new fjSysConfig { SContent = lastdata.UpdatedTime.ToString("yyyy-MM-dd HH:mm:ss.fff") },
+                                WhereExpression = it => it.Code == Const.MESMaterialInitIncrement
+                            });
+                        }
+                    }
+                    else
+                    {
+                        result.ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode();
+                        result.ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription();
+                    }
+                }
+                else
+                {
+                    result.ResCode = ResponseStatusCodeEnum.AccountError.GetHashCode();
+                    result.ResMsg = "没有配置信息" + Const.MESMaterialInitIncrement;
+                }
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(reqBody.MatCode))
+                {
+                    resbody = JsonConvert.DeserializeObject<FJSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_fjService.SyncMaterInfo(resbody.ResData))
+                        {
+
+                        }
+                    }
+                }
+            }
+            return result.ToCamelCaseString();
+        }
+
+        /// <summary>
+        /// 物料主数据推送接口
+        /// </summary>
+        /// <param name="reqBody"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SyncMaterInfoList(FJSyncMaterInfoListRequest reqBody)
+        {
+            var res = new SRes();
+            if (reqBody.ListInfo == null || !reqBody.ListInfo.Any())
+            {
+                res.ResCode = ResponseStatusCodeEnum.DocDetailNotExist.GetHashCode();
+                res.ResMsg = ResponseStatusCodeEnum.DocDetailNotExist.GetDescription();
+                return res;
+            }
+            _fjService.SyncMaterInfo(_mapper.Map<List<FJSyncMaterInfoResponseItem>>(reqBody.ListInfo));
+            return res;
+        }
+        /// <summary>
+        /// 机台信息同步接口
+        /// </summary>
+        /// <param name=""></param>
+        /// <returns></returns>
+        [HttpPost(Name = "SyncMachineInfo")]
+        public SyncMachineInfoResponse SyncMachineInfo(SyncMachineInfoRequest reqDto)
+        {
+            SyncMachineInfoResponse resbody = JsonConvert.DeserializeObject<SyncMachineInfoResponse>(WmsServiceExportApi(reqDto));
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode() && resbody.ResData != null && resbody.ResData.Any())
+            {
+                _fjService.SyncMachineInfo(resbody.ResData);
+            }
+
+            return resbody;
+        }
+        /// <summary>
+        /// 帘线生产工单信息传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes CurtainProductionOrder(CurtainProductionOrderRequest reqDto)
+        {
+            return ConcurrencyReqControl<CurtainProductionOrderRequest, SRes>(lockerCurtainProductionOrder, "CurtainProductionOrder" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.CurtainProductionOrder);
+        }
+
+        /// <summary>
+        /// 工单启动验证
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes CurtainOrderStartCheck(CurtainOrderStartCheckRequest reqDto)
+        {
+            return ConcurrencyReqControl<CurtainOrderStartCheckRequest, SRes>(lockerCurtainOrderStartCheck, "CurtainOrderStartCheck" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.CurtainOrderStartCheck);
+        }
+
+        /// <summary>
+        /// 湿拉工字轮/芯股信息传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SpoolMaterialInfoTrans(SpoolMaterialInfoTransRequest reqDto)
+        {
+            return ConcurrencyReqControl<SpoolMaterialInfoTransRequest, SRes>(lockerSpoolMaterialInfoTrans, "SpoolMaterialInfoTrans" + reqDto.SpoolCode, reqDto.SpoolCode, reqDto, _fjService.SpoolMaterialInfoTrans);
+        }
+        /// <summary>
+        /// 湿拉工字轮入库反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "WetProductStockInFeedBack")]
+        public SRes WetProductStockInFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<WetProductStockInFeedBackRequestItem>>(list);
+            var dto = new WetProductStockInFeedBackRequest() { ListInfo = dtolist};
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.BillCode).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _fjService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<fjBillFeedbackPush>()
+                {
+                    Columns = it => new fjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+                //删除单据表数据
+                _fjService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
+            }
+            else
+            {
+                //更新推送表数据
+                _fjService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<fjBillFeedbackPush>()
+                {
+                    Columns = it => new fjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+        /// <summary>
+        /// 帘线叫料接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "CurtainProductionStockOut")]
+        public SRes CurtainProductionStockOut(CurtainProductionStockOutRequest reqDto)
+        {
+            return ConcurrencyReqControl<CurtainProductionStockOutRequest, SRes>(lockerCurtainProductionStockOut, "CurtainProductionStockOut" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.CurtainProductionStockOut);
+        }
+        /// <summary>
+        /// 叫料信息反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "CurtainProductionStockOutFeedBack")]
+        public SRes CurtainProductionStockOutFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode &&  p.ApiCode == "CurtainProductionStockOutFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostNum < 5));
+            var dtolist = _mapper.Map<List<CurtainProductionStockOutFeedBackRequestItem>>(list);
+            var dto = new CurtainProductionStockOutFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.BillCode).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _fjService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<fjBillFeedbackPush>()
+                {
+                    Columns = it => new fjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+                //删除单据表数据
+                _fjService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
+            }
+            else
+            {
+                //更新推送表数据
+                _fjService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<fjBillFeedbackPush>()
+                {
+                    Columns = it => new fjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+        /// <summary>
+        /// 生产退料/余料接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ProductionBack(FjProductionBackRequest reqDto)
+        {
+            return ConcurrencyReqControl<FjProductionBackRequest, SRes>(lockerProductionBack, "ProductionBack" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.ProductionBack);
+        }
+        /// <summary>
+        /// 余料反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ProductionLeftFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<ProductionLeftFeedBackRequestItem>>(list);
+            var dto = new ProductionLeftFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 异常料出库单传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ErrorMaterialStockOut(FjErrorMaterialStockOutRequest reqDto)
+        {
+            return ConcurrencyReqControl<FjErrorMaterialStockOutRequest, SRes>(lockerErrorMaterialStockOut, "ErrorMaterialStockOut" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.ErrorMaterialStockOut);
+        }
+        /// <summary>
+        /// 异常料出库反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ErrorMaterialStockOutFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<ErrorMaterialStockOutFeedBackRequestItem>>(list);
+            var dto = new ErrorMaterialStockOutFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// B站叫料单传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes BGradeMaterialStockOut(BGradeMaterialStockOutRequest reqDto)
+        {
+            return ConcurrencyReqControl<BGradeMaterialStockOutRequest, SRes>(lockerBGradeMaterialStockOut, "BGradeMaterialStockOut" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.BGradeMaterialStockOut);
+        }
+        /// <summary>
+        /// B站出库反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes BGradeMaterialStockOutFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<BGradeMaterialStockOutFeedBackRequestItem>>(list);
+            var dto = new BGradeMaterialStockOutFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+
+        /// <summary>
+        /// 库存改判
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChange(FjStockChangeRequest reqDto)
+        {
+            return ConcurrencyReqControl<FjStockChangeRequest, SRes>(lockerlockerStockChange, "StockChange" + reqDto.BillCode, reqDto.BillCode, reqDto, _fjService.StockChange);
+        }
+        /// <summary>
+        /// 改判反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChangeFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<StockChangeFeedBackRequestItem>>(list);
+            var dto = new StockChangeFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 实时库存查询接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetCurStockList(string reqDto)
+        {
+            return null;
+        }
+
+        /// <summary>
+        /// 回库反馈接口(出库途中改判的,入库之后再次上传入库信息)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChangeStockInFeedBack(string doccode)
+        {
+            var list = _fjService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<StockChangeStockInFeedBackRequestItem>>(list);
+            var dto = new StockChangeStockInFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 人工组盘传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ManualBuildStockTrans(ManualBuildStockTransRequest reqDto)
+        {
+            return ConcurrencyReqControl<ManualBuildStockTransRequest, SRes>(lockerManualBuildStockTrans, "ManualBuildStockTrans" + reqDto.PalletCode, reqDto.PalletCode, reqDto, _fjService.ManualBuildStockTrans);
+        }
+        /// <summary>
+        /// 条码信息查询接口
+        /// </summary>
+        /// <param name="req"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetMesBarCodeInfo(string req)
+        {
+            return "";
+        }
+        /// <summary>
+        /// BOM信息传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes BomInfoTrans(BomInfoTransRequest reqDto)
+        {
+            return ConcurrencyReqControl<BomInfoTransRequest, SRes>(lockerBomInfoTrans, "BomInfoTrans" + reqDto.BomCode, reqDto.BomCode, reqDto, _fjService.BomInfoTrans);
+        }
+    }
+}

+ 1273 - 0
wms.api/Controllers/HjController.cs

@@ -0,0 +1,1273 @@
+using AutoMapper;
+using CSRedis;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using Org.BouncyCastle.Crypto;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using wms.api.Job;
+using wms.dto;
+using wms.dto.request;
+using wms.dto.request.hj;
+using wms.dto.request.hj.dto;
+using wms.dto.request.share;
+using wms.dto.response;
+using wms.dto.response.hj;
+using wms.dto.response.share;
+using wms.service;
+using wms.service.IService;
+using wms.sqlsugar;
+using wms.sqlsugar.model.hj;
+using wms.util;
+using wms.util.Check;
+using wms.util.Ext;
+using wms.util.Http;
+
+namespace wms.api.Controllers
+{
+    /// <summary>
+    /// 合金库控制器
+    /// </summary>
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class HjController : BaseController
+    {
+        private readonly IHJService _hJService;
+        private readonly ILogger<HjController> _logger;
+        private readonly IMapper _mapper;
+        static object lockerCopperLineReceiveInstr = new object();
+        static object lockerWetLineBackInApply = new object();
+        static object lockerStockChange = new object();
+        static object lockerSpecialPickMaterApply = new object();
+        static object lockerSyncMaterInfoList = new object();
+        static object lockerApplyStockOutTask = new object();
+        static object lockerWetLinePickMaterApply = new object();
+        static object lockerCompleteTask = new object();
+        static object lockerApplyStockInLoc = new object();
+        static object lockerMoveTask = new object();
+        static object lockerSrmPickOutCompleted = new object();
+        static object lockWcsUploadInfo = new object();
+        static object lockerMannel = new object();
+        static object lockerCarryTask = new object();
+        static object lockerStockInfo = new object();
+        static object lockerPdaTaskInfo = new object();
+        static object lockerCancelOrComplet = new object();
+        
+        Repository<SysJob> _sysJobrepository => new Repository<SysJob>();
+        public HjController(IHJService hJService, ILogger<HjController> logger, IMapper mapper) :base(hJService, logger)
+        {
+            _hJService = hJService;
+            _logger= logger;
+            _mapper = mapper;
+        }
+
+        #region 业务方法
+
+        /// <summary>
+        /// 更新任务进程
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<int> WcsTaskCallBack(WcsTaskCallBackRequest reqEntity)
+        {
+           return  _hJService.WcsTaskCallBack(reqEntity);
+        }
+        /// <summary>
+        /// 获取巷道
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<string> GetTunnelPriorityList(GetTunnelPriorityListRequest reqEntity)
+        {
+            return _hJService.GetTunnelPriorityList(reqEntity);
+        }
+        /// <summary>
+        /// 分配货位
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<ApplyStockInLocResponse> ApplyStockInLoc(ApplyStockInLocRequest reqEntity)
+        {
+            return ConcurrencyReqControl<ApplyStockInLocRequest, SRes<ApplyStockInLocResponse>>(lockerApplyStockInLoc, "ApplyStockInLoc" + reqEntity.TunnelNum, "分配货位" + reqEntity.PickUpEquipmentNo, reqEntity, _hJService.ApplyStockInLoc);
+        }
+        /// <summary>
+        /// 完成任务
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<int> CompleteTask(CompleteTaskRequest reqDto)
+        {
+            lock (lockerCompleteTask)
+            {
+                return _hJService.CompleteTask(reqDto);
+            }
+        }
+        /// <summary>
+        /// 申请移库任务
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<AddWcsMoveTaskResponse> AddWcsMoveTask(AddWcsMoveTaskRequest reqEntity)
+        {
+            lock (lockerMoveTask)
+            {
+                return _hJService.AddWcsMoveTask(reqEntity);
+            }
+        }
+        /// <summary>
+        /// 堆垛机出库放货完成
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public  SRes<int> SrmPickOutCompleted(SrmPickOutCompletedRequest reqDto)
+        {
+            lock (lockerSrmPickOutCompleted)
+            {
+                return _hJService.SrmPickOutCompleted(reqDto);
+            }
+        }
+
+        /// <summary>
+        /// WCS信息上传
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes WcsUploadInfo(WcsUploadInfoRequest reqDto)
+        {
+            lock (lockWcsUploadInfo)
+            {
+                //if (reqDto.Weight > 1)
+                //{
+                //    var webBaseUrl = AppSettings.GetConfig("maxweight");
+                //}
+                return _hJService.WcsUploadInfo(reqDto);
+            }
+        }
+
+        /// <summary>
+        /// 物料主数据推送接口
+        /// </summary>
+        /// <param name="reqBody"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes SyncMaterInfoList(HJSyncMaterInfoListRequest reqDto)
+        {
+            var res = new SRes();
+            if (string.IsNullOrEmpty(reqDto.ReqId))
+            {
+                res.ResCode = ResponseStatusCodeEnum.NotReqId.GetHashCode();
+                res.ResMsg = ResponseStatusCodeEnum.NotReqId.GetDescription();
+                return res;
+            }
+            if (reqDto.ListInfo == null || !reqDto.ListInfo.Any())
+            {
+                res.ResCode = ResponseStatusCodeEnum.DocDetailNotExist.GetHashCode();
+                res.ResMsg = ResponseStatusCodeEnum.DocDetailNotExist.GetDescription();
+                return res;
+            }
+            return ConcurrencyReqControl<HJSyncMaterInfoListRequest, SRes>(lockerSyncMaterInfoList, "SyncMaterInfoList", "物料主数据推送" + reqDto.ReqId, reqDto, _hJService.SyncMaterInfo);
+        }
+
+        /// <summary>
+        /// 镀铜满轮入库/550工字轮入库反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "CopperLineStockInFeedBack")]
+        public CopperLineStockInFeedBackResponse CopperLineStockInFeedBack(string billcode)
+        {
+            var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode && p.ApiCode == "CopperLineStockInFeedBack" && p.PostResult == 0 ||( p.PostResult == 2 && p.PostNum < 5));
+            if (!list.Any())
+            {
+                return new CopperLineStockInFeedBackResponse() { ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode(), ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription() };
+            }
+            var dtolist = _mapper.Map<List<CopperLineStockInFeedBackItem>>(list);
+            CopperLineStockInFeedBackRequest dto = new CopperLineStockInFeedBackRequest();
+            dto.ListInfo = dtolist;
+            CopperLineStockInFeedBackResponse resbody = JsonConvert.DeserializeObject<CopperLineStockInFeedBackResponse>(WmsServiceExportApi(dto));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.BillCode).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+                //删除单据表数据
+                _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
+            }
+            else
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+        /// <summary>
+        /// 湿拉生产退料/余料反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "WetLineBackInFeedBack")]
+        public WetLineBackInFeedBackResponse WetLineBackInFeedBack(string billcode)
+        {
+            var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode && p.ApiCode == "WetLineBackInFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostNum < 5));
+            var dtolist = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
+            var dto = new WetLineBackInFeedBackRequest() { ListInfo = dtolist };
+            WetLineBackInFeedBackResponse resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(dtolist));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.BillCode).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+                //删除单据表数据
+                _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
+            }
+            else
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+
+        /// <summary>
+        /// 改判反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "StockChangeFeedBack")]
+        public StockChangeFeedBackResponse StockChangeFeedBack(string billcode)
+        {
+            var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode);
+            var dtolist = _mapper.Map<List<StockChangeRequestItem>>(list);
+            StockChangeFeedBackRequest dto = new StockChangeFeedBackRequest() { BillCode = billcode };
+            dto.ListInfo = dtolist;
+            StockChangeFeedBackResponse resbody = JsonConvert.DeserializeObject<StockChangeFeedBackResponse>(WmsServiceExportApi(dto));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.BillCode).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+                //删除单据表数据
+                _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
+            }
+            else
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+
+        /// <summary>
+        /// 特殊料反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "SpecialPickMaterFeedBack")]
+        public SpecialPickMaterFeedBackResponse SpecialPickMaterFeedBack(string billcode)
+        {
+            var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode && p.ApiCode == "SpecialPickMaterFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostNum < 5));
+            var dtolist = _mapper.Map<List<SpecialPickMaterFeedBackRequestItem>>(list);
+            SpecialPickMaterFeedBackRequest dto = new SpecialPickMaterFeedBackRequest() { ListInfo = dtolist };
+            SpecialPickMaterFeedBackResponse resbody = JsonConvert.DeserializeObject<SpecialPickMaterFeedBackResponse>(WmsServiceExportApi(dtolist));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.BillCode).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+                //删除单据表数据
+                _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
+            }
+            else
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+
+        /// <summary>
+        /// 移库货位上报MES接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "MoveStockFeedBack")]
+        public MoveStockFeedBackResponse MoveStockFeedBack(string billcode)
+        {
+            var list = _hJService.GetBillFeedbackList1(p => p.DocsNo == billcode && p.TypeCode == "MoveStockFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostQty < 5));
+            var dtolist = _mapper.Map<List<MoveStockFeedBackRequestItem>>(list);
+            MoveStockFeedBackRequest dto = new MoveStockFeedBackRequest() { ListInfo = dtolist };
+            MoveStockFeedBackResponse resbody = JsonConvert.DeserializeObject<MoveStockFeedBackResponse>(WmsServiceExportApi(dto));
+            List<long> ids = list.Select(p => p.Id).ToList();
+            List<string> doccodelist = list.Select(p => p.DocsNo).ToList();
+            if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            else
+            {
+                //更新推送表数据
+                _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
+                {
+                    Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
+                    WhereExpression = it => ids.Contains(it.Id)
+                });
+            }
+            return resbody;
+        }
+
+        /// <summary>
+        /// 条码信息查询接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "GetBarCodeInfo")]
+        public GetBarCodeInfoResponse GetBarCodeInfo(GetBarCodeInfoRequest barcode)
+        {
+            GetBarCodeInfoResponse resbody = JsonConvert.DeserializeObject<GetBarCodeInfoResponse>(WmsServiceExportApi(barcode));
+            return resbody;
+        }
+        /// <summary>
+        /// 镀铜补空/取满指令接收接口(包含550工字轮)
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "CopperLineReceiveInstr")]
+        public SRes CopperLineReceiveInstr(CopperLineNewRequest reqDtoList)
+        {
+            var res = new SRes();
+            if (reqDtoList != null && reqDtoList.data!= null && reqDtoList.data.Any())
+            {
+                foreach (var reqDto in reqDtoList.data)
+                {
+                    res = ConcurrencyReqControl<CopperLineRequest, SRes>(lockerCopperLineReceiveInstr, "CopperLineReceiveInstr" + reqDto.WbCode, reqDto.WbCode, reqDto, _hJService.CopperLineReceiveInstr);
+                    if (res.ResCode != ResponseStatusCodeEnum.Sucess.GetHashCode())
+                    {
+                        continue;
+                    }
+                }
+            }
+           return res;
+        }
+
+        /// <summary>
+        /// 镀铜补空/取满指令接收接口(手持机用)
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "PdaCopperLineReceiveInstr")]
+        public SRes PdaCopperLineReceiveInstr(CopperLineRequest reqDto)
+        {
+            return  ConcurrencyReqControl<CopperLineRequest, SRes>(lockerCopperLineReceiveInstr, "CopperLineReceiveInstr" + reqDto.WbCode, reqDto.WbCode, reqDto, _hJService.PdaCopperLineReceiveInstr);
+        }
+
+
+        /// <summary>
+        /// 申请出库任务
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public ApplyStockOutTaskResponse ApplyStockOutTask(ApplyStockOutTaskRequest reqDto)
+        {
+            var result = new ApplyStockOutTaskResponse();
+            if (reqDto.OutType == 2)
+            {
+                if (string.IsNullOrEmpty(reqDto.Tunnel))
+                {
+                    return new ApplyStockOutTaskResponse()
+                    {
+                       ResCode = ResponseStatusCodeEnum.ErrParam.GetHashCode(),
+                       ResMsg = "巷道值没有传值"
+                    };
+                }
+                var req = new ApplyEmptySpoolRequest() { Tunnel = int.Parse(reqDto.Tunnel),OutEndPostion = reqDto.OutEndPostion };
+                return ConcurrencyReqControl<ApplyEmptySpoolRequest, ApplyStockOutTaskResponse>(lockerApplyStockOutTask, "ApplyStockOutTask" + reqDto.OutEndPostion, reqDto.OutEndPostion, req, _hJService.ApplyEmptySpoolService);
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 获取巷道空轮数量
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<GetTunnelEmptyConResponse> GetTunnelEmptyConCount(GetTunnelEmptyConCountRequest reqDto)
+        {
+            return _hJService.GetTunnelEmptyConCount(reqDto);
+        }
+
+        /// <summary>
+        /// 库存改判
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "StockChange")]
+        public StockChangeResponse StockChange(StockChangeRequest reqDto)
+        {
+            return ConcurrencyReqControl<StockChangeRequest, StockChangeResponse>(lockerStockChange, "StockChange" + reqDto.BillCode, reqDto.BillCode, reqDto, _hJService.StockChange);
+        }
+
+        /// <summary>
+        /// 特殊出库领料申请接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "SpecialPickMaterApply")]
+        public SpecialPickMaterApplyResponse SpecialPickMaterApply(SpecialPickMaterApplyRequest reqDto)
+        {
+            return ConcurrencyReqControl<SpecialPickMaterApplyRequest, SpecialPickMaterApplyResponse>(lockerSpecialPickMaterApply, "SpecialPickMaterApply" + reqDto.MatBarCode, reqDto.MatBarCode, reqDto, _hJService.SpecialPickMaterApply);
+
+        }
+
+        /// <summary>
+        /// 实时库存查询接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public GetCurStockListResponse GetCurStockList(GetCurStockListRequest reqDto)
+        {
+            return _hJService.GetCurStockList(reqDto);
+        }
+        #endregion
+
+        #region RCS调用接口
+      
+        /// <summary>
+        /// 镀铜一楼res下任务
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public GenAgvSchedulingTaskResponse CopperLineAgvTaskToRcs(GenAgvSchedulingTaskRequest reqDto)
+        {
+            var result = new GenAgvSchedulingTaskResponse();
+            //GenAgvSchedulingTaskRequest resReq = new GenAgvSchedulingTaskRequest();
+            var apiurl = wms.util.AppSettings.GetConfig("RcsCreateTaskPushUrl");
+            var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
+            if (string.IsNullOrEmpty(strRes))
+            {
+                result.message = "返回空";
+                return result;
+            }
+            return JsonConvert.DeserializeObject<GenAgvSchedulingTaskResponse>(strRes);
+        }
+        /// <summary>
+        /// 镀铜一楼res继续任务
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public GenAgvSchedulingTaskResponse CopperLineContinueTaskToRcs(GenAgvSchedulingTaskRequest reqDto)
+        {
+            var result = new GenAgvSchedulingTaskResponse();
+            //GenAgvSchedulingTaskRequest resReq = new GenAgvSchedulingTaskRequest()
+            //{ };
+            var apiurl = wms.util.AppSettings.GetConfig("RcsContinuePushUrl");
+            var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
+            if (string.IsNullOrEmpty(strRes))
+            {
+                result.message = "返回空";
+                return result;
+            }
+            return JsonConvert.DeserializeObject<GenAgvSchedulingTaskResponse>(strRes);
+        }
+        /// <summary>
+        /// 镀铜二楼IWMS下发满轮出库
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes CopperLineAgvTaskStockOutToIWms(CopperLineAgvTaskStockOutToIWmsRequest reqDto)
+        {
+            var result = new SRes();
+            CopperLineAgvTaskStockOutToIWmsRequest resReq = new CopperLineAgvTaskStockOutToIWmsRequest()
+            { 
+                matCode = "",
+                wbCode = "满轮接驳口",
+                inSpoolFull = "1",
+                wetInto = true,
+                wetIntoSpec = false,
+                isSurplus = "",
+                isRework = "",
+                matNo = "",
+                spoolNo = "",
+                gradeCode = "",
+                taskNo = Guid.NewGuid().ToString(),
+
+            };
+            var apiurl = wms.util.AppSettings.GetConfig("IWmsStockOutPushUrl");
+            var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
+            if (string.IsNullOrEmpty(strRes))
+            {
+                //result.message = "返回空";
+                return result;
+            }
+            return JsonConvert.DeserializeObject<SRes>(strRes);
+        }
+        /// <summary>
+        /// 镀铜二楼IWMS下发空轮/退料/余料入库
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes CopperLineAgvTaskStockInToIWms(CopperLineAgvTaskStockInToIWmsRequest reqDto)
+        {
+            var result = new SRes();
+            CopperLineAgvTaskStockInToIWmsRequest resReq = new CopperLineAgvTaskStockInToIWmsRequest()
+            {
+                matCode = "",
+                workAreaCode = "11",
+                outSpoolFull = "1",
+                taskNo = Guid.NewGuid().ToString()
+            };
+            var apiurl = wms.util.AppSettings.GetConfig("IWmsStockInPushUrl");
+            var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
+            if (string.IsNullOrEmpty(strRes))
+            {
+                //result.message = "返回空";
+                return result;
+            }
+            return JsonConvert.DeserializeObject<SRes>(strRes);
+        }
+
+        /// <summary>
+        /// AGV执行回调
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public agvCallbackResponse agvCallback(agvCallbackRequest reqDto)
+        {
+            var res = new agvCallbackResponse() { code = "0",message = "成功" };
+
+            return res;
+        }
+
+
+
+        /// <summary>
+        /// 复核异常上报接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public RfidCheckDiffResponse RfidCheckDiff(RfidCheckDiffRequest request)
+        {
+            var res = new RfidCheckDiffResponse();
+            //异常
+            _hJService.RfidCheckDiffService(request);
+            _logger.LogInformation("复核异常上报接口RfidCheckDiff接收数据:" + JsonConvert.SerializeObject(request));
+            return res;
+        }
+
+        /// <summary>
+        /// 湿拉生产退料/余料/空轮申请接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes WetLineBackInApply(WetLineBackInApplyRequest reqDto)
+        {
+            return ConcurrencyReqControl<WetLineBackInApplyRequest, SRes>(lockerWetLineBackInApply, "WetLineBackInApply" + reqDto.MatBarCode, reqDto.MatBarCode, reqDto, _hJService.WetLineBackInApplyService);
+            //接收指令
+            //入库逻辑
+            //下发wcs任务
+        }
+
+        /// <summary>
+        /// 湿拉产线领料申请接口WetLinePickMaterApply
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes WetLinePickMaterApply(WetLinePickMaterApplyRequest reqDto)
+        {
+            return ConcurrencyReqControl<WetLinePickMaterApplyRequest, SRes>(lockerWetLinePickMaterApply, "WetLinePickMaterApply" + reqDto.MatCode, reqDto.MatCode, reqDto, _hJService.WetLinePickMaterApplyService);
+        }
+        #endregion
+
+        #region 定时任务业务
+        /// <summary>
+        /// 添加定时任务
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string AddJob(AddJobRequest request)
+        {
+            request.Id = IdFactory.NewId();
+            return _hJService.AddJob(request);
+        }
+        /// <summar y>
+        /// 编辑定时任务
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public string UpdateJobEntity(AddJobRequest request)
+        {
+            return _hJService.UpdateJobEntity(request);
+        }
+        /// <summary>
+        /// 获取job根据id
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetSysJobById(long id)
+        {
+            return JsonConvert.SerializeObject(_hJService.GetSysJobById(id));
+        }
+        /// <summary>
+        /// 启用job
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string StartJob(DetailRequest2Str req)
+        {
+            var res = new SRes();
+            var sysjob = _sysJobrepository.GetById(req.Id);
+            if (sysjob == null)
+            {
+                res.ResCode = 0;
+                res.ResMsg = "没有找到对应的定时任务";
+                return res.ToCamelCaseString();
+            }
+            JobScheduler.Start(sysjob.Code, Type.GetType("wms.api.Job.PostJob"), sysjob.CronExpression);
+            return res.ToCamelCaseString();
+        }
+        /// <summary>
+        /// 执行job
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string ExecuteJob(DetailCodeRequest reqEntity)
+        {
+            var res = new SRes();
+            if (string.IsNullOrEmpty(reqEntity.Code))
+            {
+                res.ResCode = 0;
+                res.ResMsg = "参数错误";
+                return res.ToCamelCaseString();
+            }
+            var jobEntity = _sysJobrepository.GetSingle(p => p.Code == reqEntity.Code);
+            if (jobEntity == null)
+            {
+                res.ResCode = 0;
+                res.ResMsg = "没有找到该编码";
+                return res.ToCamelCaseString();
+            }
+            var jobapilist = _hJService.GetSysApiDetail(jobEntity.Id);
+            if (jobapilist.Any())
+            {
+                foreach (var item in jobapilist)
+                {
+                    Task.Run(() => { HttpUtil.PostRequest(item.ApiUrl, item.RequestBody); });
+                }
+            }
+            return res.ToCamelCaseString();
+        }
+        /// <summary>
+        /// 分页Job列表
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public List<dto.response.hj.SysJobDto> GetSysJobList(GetSysJobListRequest reqEntity)
+        {
+            var list = _sysJobrepository.GetList();
+            var listdto = _mapper.Map<List<dto.response.hj.SysJobDto>>(list);
+            if (listdto != null && listdto.Any())
+            {
+                for (int i = 0; i < list.Count; i++)
+                {
+                    listdto[i].JobExecuteStatus = GetExecuteStatus(new DetailCodeRequest() { Code = listdto[i].Code });
+                }
+                return listdto;
+            }
+            return new List<dto.response.hj.SysJobDto>();
+        }
+        /// <summary>
+        /// 获取执行状态
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetExecuteStatus(DetailCodeRequest reqEntity)
+        {
+            var jobInfo = _sysJobrepository.GetFirst(p=>p.Code == reqEntity.Code);
+            var jobs = JobScheduler.GetJobList(Const.JobGroupName).Result;
+            if (jobs != null)
+            {
+                var temp = jobs.Where(p => p.JobName == jobInfo.Code);
+                if (temp.Any())
+                {
+                    return temp.First().JobStatus;
+                }
+                else
+                {
+                    return "Stop";
+                }
+            }
+            else
+            {
+                return "Stop";
+            }
+        }
+        [HttpPost]
+        public string GetId()
+        {
+            return IdFactory.NewId().ToString();
+        }
+        #endregion
+
+        #region 库存管理
+        /// <summary>
+        /// 手动出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string ManualTask(ManualTaskRequest request)
+        {
+            lock (lockerMannel)
+            {
+                return _hJService.ManualTask(request);
+            }
+        }
+        #endregion
+
+        #region 合金PDA
+        /// <summary>
+        /// 合金解绑
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<int> Unbounding(UnboundRequest request)
+        {
+            return _hJService.Unbounding(request);
+        }
+        #region pda出库
+        /// <summary>
+        /// pda指定出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaManualTask(ManualTaskRequest request)
+        {
+            request.BusType = TaskBusType.TaskBusType_HJ_PdaManualOut.GetHashCode().ToString();
+            return _hJService.ManualTask(request);
+        }
+        /// <summary>
+        /// pda质检领料出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaQualityTask(ManualTaskRequest request)
+        {
+            request.BusType = TaskBusType.TaskBusType_HJ_QualityOut.GetHashCode().ToString();
+            return _hJService.ManualTask(request);
+        }
+        /// <summary>
+        /// pda呆滞料出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaInactionStockTask(ManualTaskRequest request)
+        {
+            request.BusType = TaskBusType.TaskBusType_HJ_DullMaterOut.GetHashCode().ToString();
+            return _hJService.ManualTask(request);
+        }
+        #endregion
+
+        /// <summary>
+        /// pda单据查询
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetDocumentsAll(DocumentsRequest request)
+        {
+            return _hJService.GetPageDocumentsList(request).ToCamelCaseString();
+        }
+        /// <summary>
+        /// pda单据明细查询(传单号)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetDocumentDetails(DocumentsRequest request)
+        {
+            return _hJService.GetDocumentDetailListByDocsNo(request).ToCamelCaseString();
+        }
+        /// <summary>
+        /// 获取物料信息,根据RFID
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<MaterInfo> GetMaterInfoByRfid(PdaRfidRequest request)
+        {
+            return _hJService.MaterInfoByRfid(request);
+        }
+        /// <summary>
+        /// 提交(组盘)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaGroupStock(PdaRfidRequest request)
+        {
+            lock (lockerStockInfo)
+            {
+                return _hJService.PdaGroupStock(request);
+            }
+        }
+        /// <summary>
+        /// pda 下发任务
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaInsterInTask(PdaRfidRequest request)
+        {
+            lock (lockerPdaTaskInfo)
+            {
+                return _hJService.PdaInsertTask(request);
+            }
+            
+        }
+        /// <summary>
+        /// 获取设备报警信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetEquipErrorInfo(ErrorInfoRequest request)
+        {
+            var it = RedisHelper.Get("equoneRGV3");
+            return it;
+        }
+        /// <summary>
+        /// 获取物料报警信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetMaterErrorInfo(ErrorInfoRequest request)
+        {
+            return "";
+        }
+        /// <summary>
+        /// 获取业务报警信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetBusinessErrorInfo(ErrorInfoRequest request)
+        {
+            return "";
+        }
+        /// <summary>
+        /// agv空轮搬运任务(一楼空轮初始化)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string AgvTaskInfo(AgvTaskInfoRequest request)
+        {
+            return _hJService.AgvCarryTaskInfo(request);
+        }
+        #endregion
+        /// <summary>
+        /// 取消/完成任务验证(只验证不做业务处理,开放wcs系统调用)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes CancelTaskVerify(CancelTaskRequest request)
+        {
+            lock (lockerCancelOrComplet)
+            {
+                return _hJService.CancelTaskVerify(request);
+            }
+        }
+        /// <summary>
+        /// 执行任务(开放wcs调用,前端不调用)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes CarryTaskInfo(CancelTaskRequest request)
+        {
+            lock (lockerCarryTask)
+            {
+                return _hJService.CarryTaskInfo(request);
+            }
+        }
+        /// <summary>du
+        /// 异常任务的库存处理
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes GetErrorTaskInfo()
+        {
+            var res = new SRes();
+            //获取货位锁是出库锁,当前时间差大于等于1 
+            var list = _hJService.GetOutStateList();
+            //根据条码捞取历史任务表中的数据
+            var barcode = list.Select(p => p.ContGrpBarCode).ToList();
+            var task = _hJService.GetTaskHistoryByCode(barcode);
+            if (task.Any())
+            {
+                foreach (var item in task)
+                {
+                    if (item.Type != TaskType.OutDepot)
+                    {
+                        continue;
+                    }
+                    if (item.Status != dto.TaskStatus.Finish)
+                    {
+                        continue;
+                    }
+                    var info = CompleteTask(new CompleteTaskRequest() { TaskNum = item.ID, OperationType = 2, WCSUpdateName = "wcs" });
+                    if (info.ResCode != ResponseStatusCodeEnum.Sucess.GetHashCode())
+                    {
+                        res.ResCode = ResponseStatusCodeEnum.Fail.GetHashCode();
+                        res.ResMsg = ResponseStatusCodeEnum.Fail.GetDescription();
+                        return res;
+                    }
+                }
+            }
+            return res;
+        }
+        #region 推送数据
+        /// <summary>
+        /// 数据推送接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public PushResponse PushErpDate(PushDate request)
+        {
+            var result = new PushResponse();
+            if (request.init == 1)
+            {
+                //手动推送
+                if (!request.CLBarCode.Any())
+                {
+                    result.ResCode = ResponseStatusCodeEnum.ErrParam.GetHashCode();
+                    result.ResMsg = ResponseStatusCodeEnum.ErrParam.GetDescription();
+                    return result;
+                }
+                var list = _hJService.GetPushDatelistMannel(request);
+                if (!list.Any())
+                {
+                    result.ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode();
+                    result.ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription();
+                    return result;
+                }
+                if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList().Any())
+                {
+                    PushRequest push = new PushRequest();
+                    var onefloor = list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList();
+                    var info = _mapper.Map<List<ListInfo>>(onefloor);
+                    push.list = info;
+                    var resbody = JsonConvert.DeserializeObject<PushResponse>(WmsServiceExportApi(push));
+                    var matBarCode = info.Select(p => p.MatBarCode).ToList();
+                    if (resbody.success == true)
+                    {
+                        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                        {
+                            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "手动推送成功", EditTime = DateTime.Now },
+                            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
+                        });
+                    }
+                    else
+                    {
+                        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                        {
+                            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1, ResDesc = "手动推送失败", EditTime = DateTime.Now },
+                            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
+                        });
+                    }
+                }
+                //退料
+                //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_BackStockIn.ToString()).ToList().Any())
+                //{
+                //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
+                //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
+                //    back.ForEach(p =>
+                //    {
+                //        p.BusType = "1";
+                //        p.WareName = "合金库";
+                //    });
+                //    wetLineBack.ListInfo = back;
+                //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
+                //    var rfid = back.Select(p => p.RFID).ToList();
+                //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "手动推送" },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //    else
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //}
+                ////余料
+                //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_LeftStockIn.ToString()).ToList().Any())
+                //{
+                //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
+                //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
+                //    back.ForEach(p =>
+                //    {
+                //        p.BusType = "2";
+                //        p.WareName = "合金库";
+                //    });
+                //    wetLineBack.ListInfo = back;
+                //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
+                //    var rfid = back.Select(p => p.RFID).ToList();
+                //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "手动推送" },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //    else
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //}
+            }
+            else
+            {
+                //自动推送
+                var list = _hJService.GetPushDatelistAuto(request);
+                if (!list.Any())
+                {
+                    return new PushResponse() { ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode(), ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription() };
+                }
+
+                if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList().Any())
+                {
+                    var onefloor = list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList();
+                    PushRequest push = new PushRequest();
+                    var info = _mapper.Map<List<ListInfo>>(onefloor);
+                    push.list = info;
+                    var resbody = JsonConvert.DeserializeObject<PushResponse>(WmsServiceExportApi(push));
+                    var matBarCode = info.Select(p => p.MatBarCode).ToList();
+                    if (resbody.success == true)
+                    {
+                        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                        {
+                            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送" ,EditTime = DateTime.Now},
+                            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
+                        });
+                    }
+                    else
+                    {
+                        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                        {
+                            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1, EditTime = DateTime.Now },
+                            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
+                        });
+                    }
+                }
+                //退料
+                //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_BackStockIn.ToString()).ToList().Any())
+                //{
+                //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
+                //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
+                //    back.ForEach(p =>
+                //    {
+                //        p.BusType = "1";
+                //        p.WareName = "合金库";
+                //    });
+                //    wetLineBack.ListInfo = back;
+                //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
+                //    var rfid = back.Select(p => p.RFID).ToList();
+                //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送" },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //    else
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //}
+                ////余料
+                //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_LeftStockIn.ToString()).ToList().Any())
+                //{
+                //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
+                //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
+                //    back.ForEach(p =>
+                //    {
+                //        p.BusType = "2";
+                //        p.WareName = "合金库";
+                //    });
+                //    wetLineBack.ListInfo = back;
+                //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
+                //    var rfid = back.Select(p => p.RFID).ToList();
+                //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送" },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //    else
+                //    {
+                //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
+                //        {
+                //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
+                //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
+                //        });
+                //    }
+                //}
+            }
+            return result;
+        }
+        #endregion
+
+        #region 异常处理
+        /// <summary>
+        /// 强制取消任务
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ForceCancelTask(WebErrorRequest request)
+        {
+            return _hJService.ForceCancelTask(request);
+        }
+        /// <summary>
+        /// 删除库存信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes DeleteStockInfo(DetailCodeRequest request)
+        {
+            return _hJService.DeleteStockInfo(request);
+        }
+        /// <summary>
+        /// 修改库存状态
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes UpdateStockState(DetailCodeRequestdto request)
+        {
+            return _hJService.UpdateStockState(request);
+        }
+        /// <summary>
+        /// 修改货位状态
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes UpdateCellState(DetailCodeRequestdto request)
+        {
+            return _hJService.UpdateCellState(request);
+        }
+        /// <summary>
+        /// 货位数据互换
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes DataSwapCell(DataSwapCellRequest request)
+        {
+            return _hJService.DataSwapCell(request);
+        }
+        /// <summary>
+        /// 补数据
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes DataBasePatch(DetailCodeRequest request)
+        {
+            return _hJService.DataBasePatch(request);
+        }
+        #endregion
+    }
+}

+ 486 - 0
wms.api/Controllers/PtController.cs

@@ -0,0 +1,486 @@
+using AutoMapper;
+using MathNet.Numerics.Distributions;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using System.Reflection.Emit;
+using wms.dto;
+using wms.dto.request;
+using wms.dto.request.pt;
+using wms.dto.request.pt.dto;
+using wms.dto.request.share;
+using wms.dto.response;
+using wms.dto.response.pt;
+using wms.service.IService;
+using wms.sqlsugar;
+using wms.sqlsugar.model.pt;
+using wms.util.Ext;
+
+namespace wms.api.Controllers
+{
+    /// <summary>
+    /// 盘条库控制器
+    /// </summary>
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class PtController : BaseController
+    {
+        private readonly IPTService _ptService;
+        private readonly ILogger<PtController> _logger;
+        private readonly IMapper _mapper;
+        static object lockerPurchaseBillTrans = new object();
+        static object lockerErpUnlockStock = new object();
+        static object lockerProductionStockOut = new object();
+        static object lockerProductionFeedBack = new object();
+        static object lockerStockChange = new object();
+        static object lockerProductionBack = new object();
+        static object lockerPtPurchTaskIn = new object();
+        static object lockerPtApplyStockInLoc = new object();
+        static object lockerPtCompleteTask = new object();
+        static object lockerPtSrmPickOutCompleted = new object();
+        static object lockerSyncMaterInfoList = new object();
+        static object lockerPtWcsProductionOutTask = new object();
+        static object lockerGetPtTunnelList = new object();
+
+
+        public PtController(IPTService ptService, ILogger<PtController> logger, IMapper mapper) : base(ptService)
+        {
+            _ptService = ptService;
+            _logger = logger;
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 同步物料基础信息
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string SyncMaterInfo(SyncMaterInfoRequest reqBody)
+        {
+            var result = new SRes();
+            //_logger.LogInformation("请求参数:{@reqBody},{aa}", reqBody,1);
+            PTSyncMaterInfoResponse resbody = JsonConvert.DeserializeObject<PTSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+            if (reqBody.SyncType == 1)
+            {
+                reqBody.PageIndex = 1;
+                while (resbody.ResData.Any())
+                {
+                    _ptService.SyncMaterInfo(resbody.ResData);
+                    reqBody.PageIndex++;
+                    resbody = JsonConvert.DeserializeObject<PTSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                }
+            }
+            else if (reqBody.SyncType == 2)
+            {
+                //拿到增量
+                var increconf = _ptService.GetSysConfigByCode(Const.MESMaterialInitIncrement);
+                if (increconf != null)
+                {
+                    reqBody.StartTime = DateTime.Parse(increconf.SContent);
+                    //reqBody.Count = int.Parse(increconf.Remark);
+                    resbody = JsonConvert.DeserializeObject<PTSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_ptService.SyncMaterInfo(resbody.ResData))
+                        {
+                            var lastdata = resbody.ResData.OrderBy(p => p.UpdatedTime).Last();
+                            _ptService.UpdateSysConfigModelColumns(new sqlsugar.model.UpdateModelColumns<ptSysConfig>()
+                            {
+                                Columns = it => new ptSysConfig { SContent = lastdata.UpdatedTime.ToString("yyyy-MM-dd HH:mm:ss.fff") },
+                                WhereExpression = it => it.Code == Const.MESMaterialInitIncrement
+                            });
+                        }
+                    }
+                    else
+                    {
+                        result.ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode();
+                        result.ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription();
+                    }
+                }
+                else
+                {
+                    result.ResCode = ResponseStatusCodeEnum.AccountError.GetHashCode();
+                    result.ResMsg = "没有配置信息" + Const.MESMaterialInitIncrement;
+                }
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(reqBody.MatCode))
+                {
+                    resbody = JsonConvert.DeserializeObject<PTSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_ptService.SyncMaterInfo(resbody.ResData))
+                        {
+
+                        }
+                    }
+                }
+            }
+
+
+            return result.ToCamelCaseString();
+        }
+        /// <summary>
+        /// 采购到货单/采购退货单/到货重挂清单接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes PurchaseBillTrans(PurchaseBillTransReqest reqDto)
+        {
+            return ConcurrencyReqControl<PurchaseBillTransReqest, SRes>(lockerPurchaseBillTrans, "PurchaseBillTrans" + reqDto.BillCode, reqDto.BillCode, reqDto, _ptService.PurchaseBillTrans);
+        }
+        /// <summary>
+        /// 盘条主数据接收
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes PtSyncMaterInfoList(PtSyncMaterInfoListRequest reqDto)
+        {
+            var res = new SRes();
+            return ConcurrencyReqControl<PtSyncMaterInfoListRequest, SRes>(lockerSyncMaterInfoList, "PtSyncMaterInfoList", "物料主数据推送", reqDto, _ptService.GetSyncMaterInfo);
+        }
+        /// <summary>
+        /// 采购到货单入库反馈/采购退货出库反馈/异常出库重挂反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes PurchaseBillTransFeedBack(PtAutoPurchData request)
+        {
+            var res = new SRes();
+            //自动推送
+            if (request.Type == "1")
+            {
+                var list = _ptService.GetBillFeedbackList();
+                if (!list.Any())
+                {
+                    res.ResCode = ResponseStatusCodeEnum.Fail.GetHashCode();
+                    res.ResMsg = "没有取到数据" + ResponseStatusCodeEnum.Fail.GetDescription();
+                }
+                //采购入库单
+                if (list.Where(p => p.TypeCode == PtFackbeekType.InterfaceType_PT_PurchaseStockIn.ToString()).ToList().Any())
+                {
+                    var purch = list.Where(p => p.TypeCode == PtFackbeekType.InterfaceType_PT_PurchaseStockIn.ToString()).ToList();
+                    PurchaseBillTransFeedBackRequest purchaseBill = new PurchaseBillTransFeedBackRequest();
+                    var dtolist = _mapper.Map<List<PurchaseBillTransFeedBackRequestItem>>(purch);
+                    var purchs = purch.First();
+                    purchaseBill.ListInfo = dtolist;
+                    purchaseBill.BillCode = purchs.DocsNo;
+                    purchaseBill.BillType = purchs.TypeCode;
+                    purchaseBill.ReqId = purchs.ReqNo;
+                    var resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(purchaseBill));
+                    var ids = purch.Select(p => p.Id).ToList();
+                    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+                    {
+                        _ptService.UpdatePuchinfoModelColumns(new sqlsugar.model.UpdateModelColumns<ptBillPushinfo>()
+                        {
+                            Columns = it => new ptBillPushinfo() { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送", EditTime = DateTime.Now },
+                            WhereExpression = it => ids.Contains(it.Id)
+                        });
+                    }
+                    else
+                    {
+                        _ptService.UpdatePuchinfoModelColumns(new sqlsugar.model.UpdateModelColumns<ptBillPushinfo>()
+                        {
+                            Columns = it => new ptBillPushinfo() { PostResult = 2, PostQty = it.PostQty + 1, ResDesc = "自动推送", EditTime = DateTime.Now },
+                            WhereExpression = it => ids.Contains(it.Id)
+                        });
+                    }
+                }
+                //重挂
+                else if (list.Where(p => p.TypeCode == PtFackbeekType.InterfaceType_PT_AnewStockIn.ToString()).ToList().Any())
+                {
+                    var purch = list.Where(p => p.TypeCode == PtFackbeekType.InterfaceType_PT_AnewStockIn.ToString()).ToList();
+                    PurchaseBillTransFeedBackRequest purchaseBill = new PurchaseBillTransFeedBackRequest();
+                    var dtolist = _mapper.Map<List<PurchaseBillTransFeedBackRequestItem>>(purch);
+                    var purchs = purch.First();
+                    purchaseBill.ListInfo = dtolist;
+                    purchaseBill.BillCode = purchs.DocsNo;
+                    purchaseBill.BillType = purchs.TypeCode;
+                    purchaseBill.ReqId = purchs.ReqNo;
+                    var resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(purchaseBill));
+                    var ids = purch.Select(p => p.Id).ToList();
+                    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
+                    {
+                        _ptService.UpdatePuchinfoModelColumns(new sqlsugar.model.UpdateModelColumns<ptBillPushinfo>()
+                        {
+                            Columns = it => new ptBillPushinfo() { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送", EditTime = DateTime.Now },
+                            WhereExpression = it => ids.Contains(it.Id)
+                        });
+                    }
+                    else
+                    {
+                        _ptService.UpdatePuchinfoModelColumns(new sqlsugar.model.UpdateModelColumns<ptBillPushinfo>()
+                        {
+                            Columns = it => new ptBillPushinfo() { PostResult = 2, PostQty = it.PostQty + 1, ResDesc = "自动推送", EditTime = DateTime.Now },
+                            WhereExpression = it => ids.Contains(it.Id)
+                        });
+                    }
+                }
+            }
+
+            return res;
+        }
+        /// <summary>
+        /// 放行单传输接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public ErpUnlockStockResponse ErpUnlockStock(ErpUnlockStockRequest reqDto)
+        {
+            return ConcurrencyReqControl<ErpUnlockStockRequest, ErpUnlockStockResponse>(lockerErpUnlockStock, "ErpUnlockStock" + reqDto.BillCode, reqDto.BillCode, reqDto, _ptService.ErpUnlockStock);
+        }
+        /// <summary>
+        /// 生产领料单传输接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ProductionStockOut(ProductionStockOutRequest reqDto)
+        {
+            return ConcurrencyReqControl<ProductionStockOutRequest, SRes>(lockerProductionStockOut, "ProductionStockOut" + reqDto.BillCode, reqDto.BillCode, reqDto, _ptService.ProductionStockOut);
+        }
+        /// <summary>
+        /// 自动叫料
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes WcsProductionOutRequest(WcsProductionOutRequest request)
+        {
+            return ConcurrencyReqControl<WcsProductionOutRequest, SRes>(lockerPtWcsProductionOutTask, "WcsProductionOutRequest" + request.Endquip, request.Endquip, request, _ptService.WcsProductionOutRequest);
+        }
+        /// <summary>
+        /// 生产领料/退料/改判反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ProductionFeedBack(ProductionFeedBackRequest reqDto)
+        {
+            return ConcurrencyReqControl<ProductionFeedBackRequest, SRes>(lockerProductionFeedBack, "ProductionFeedBack" + reqDto.BillCode, reqDto.BillCode, reqDto, _ptService.ProductionFeedBack);
+        }
+
+        /// <summary>
+        /// 库存改判
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChange(PtStockChangeRequest reqDto)
+        {
+            return ConcurrencyReqControl<PtStockChangeRequest, SRes>(lockerStockChange, "ProductionFeedBack" + reqDto.BillCode, reqDto.BillCode, reqDto, _ptService.StockChange);
+        }
+        /// <summary>
+        /// 生产退料单接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ProductionBack(ProductionBackRequest reqDto)
+        {
+            return ConcurrencyReqControl<ProductionBackRequest, SRes>(lockerProductionBack, "ProductionBack" + reqDto.BillCode, reqDto.BillCode, reqDto, _ptService.ProductionBack);
+        }
+        [HttpPost]
+        public SRes WareCellInit(int row, int col, int deot, int rowcount, int tun)
+        {
+            return _ptService.WareCellInit(row, col, deot, rowcount, tun);
+        }
+        /// <summary>
+        /// 实时库存查询接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public PTGetCurStockListResponse GetPtCurStockList(PtGetCurStockListRequest reqDto)
+        {
+            return _ptService.GetCurStockList(reqDto);
+        }
+    
+        #region 盘条PDA功能
+        /// <summary>
+        /// 盘条解绑
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<int> Unbounding(PtUnboundRequest request)
+        {
+            return _ptService.Unbounding(request);
+        }
+        /// <summary>
+        /// pda单据查询
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetDocumentsAll(PtDocumentsRequest request)
+        {
+            return _ptService.GetPageDocumentsList(request).ToCamelCaseString();
+        }
+        /// <summary>
+        /// pda单据明细查询(传单号)
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetDocumentDetails(PtDocumentsRequest request)
+        {
+            return _ptService.GetDocumentDetailListByDocsNo(request).ToCamelCaseString();
+        }
+        /// <summary>
+        /// pda指定出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaManualTask(PtManualTaskRequest request)
+        {
+            request.BusType = TaskBusType.TaskBusType_HJ_PdaManualOut.GetDescription();
+            return _ptService.ManualTask(request);
+        }
+        /// <summary>
+        /// pda质检领料出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaQualityTask(PtManualTaskRequest request)
+        {
+            request.BusType = TaskBusType.TaskBusType_HJ_QualityOut.GetDescription();
+            return _ptService.ManualTask(request);
+        }
+        /// <summary>
+        /// pda重挂出库确定
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaInactionStockTask(PtManualTaskRequest request)
+        {
+            request.BusType = TaskBusType.TaskBusType_HJ_AnewOut.GetDescription();
+            return _ptService.ManualTask(request);
+        }
+        /// <summary>
+        /// 获取设备报警信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetEquipErrorInfo(PtErrorInfoRequest request)
+        {
+            return "";
+        }
+        /// <summary>
+        /// 获取物料报警信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetMaterErrorInfo(PtErrorInfoRequest request)
+        {
+            return "";
+        }
+        /// <summary>
+        /// 获取业务报警信息
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetBusinessErrorInfo(PtErrorInfoRequest request)
+        {
+            return "";
+        }
+        /// <summary>
+        /// 组盘
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaGroupStock(PtGroupInTaskRequest request)
+        {
+            return _ptService.PdaGroupStock(request);
+        }
+        /// <summary>
+        /// 生成入库任务
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string PdaInsterInTask(PtGroupInTaskRequest request)
+        {
+            return _ptService.PdaInsterInTask(request);
+        }
+        #endregion
+        /// <summary>
+        /// PDA 采购入库
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes PdaPurchaseTask(PtUnboundRequest request)
+        {
+            lock (lockerPtPurchTaskIn)
+            {
+                return _ptService.PtPurchaseTask(request);
+            }
+        }
+        #region WCS调用
+        /// <summary>
+        /// 获取巷道
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<string> GetTunnelPriorityList(GetTunnelPriorityListRequest reqEntity)
+        {
+            lock (lockerGetPtTunnelList)
+            {
+                return _ptService.GetPtTunnelPriorityList(reqEntity);
+            } 
+        }
+        /// <summary>
+        /// 分配货位
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<PtApplyStockInLocResponse> ApplyStockInLoc(PtApplyStockInLocRequest reqEntity)
+        {
+            return ConcurrencyReqControl<PtApplyStockInLocRequest, SRes<PtApplyStockInLocResponse>>(lockerPtApplyStockInLoc, "PtApplyStockInLoc" + reqEntity.TunnelNum, "分配货位" + reqEntity.PickUpEquipmentNo, reqEntity, _ptService.PtApplyStockInLoc);
+        }
+        /// <summary>
+        /// 完成任务
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<int> CompleteTask(CompleteTaskRequest reqDto)
+        {
+            lock (lockerPtCompleteTask)
+            {
+                return _ptService.PtCompleteTask(reqDto);
+            }
+        }
+
+        /// <summary>
+        /// 堆垛机出库放货完成
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes<int> SrmPickOutCompleted(PtSrmPickOutCompletedRequest reqDto)
+        {
+            lock (lockerPtSrmPickOutCompleted)
+            {
+                return _ptService.PtSrmPickOutCompleted(reqDto);
+            }
+        }
+        #endregion
+    }
+}

+ 242 - 0
wms.api/Controllers/SxController.cs

@@ -0,0 +1,242 @@
+using AutoMapper;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using wms.dto;
+using wms.dto.request;
+using wms.dto.request.sx;
+using wms.dto.response;
+using wms.dto.response.sx;
+using wms.service.IService;
+using wms.sqlsugar.model.sx;
+using wms.util.Ext;
+
+namespace wms.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class SxController : BaseController
+    {
+        private readonly ISXService _sxService;
+        private readonly ILogger<PtController> _logger;
+        private readonly IMapper _mapper;
+        static object lockerCurtainProductionOrder = new object();
+        static object lockerSpoolMaterialInfoTrans = new object();
+        static object lockerCurtainProductionStockOut = new object();
+        static object lockerProductionBack = new object();
+        static object lockerErrorMaterialStockOut = new object();
+        static object lockerBGradeMaterialStockOut = new object();
+        static object lockerlockerStockChange = new object();
+        static object lockerManualBuildStockTrans = new object();
+        static object lockerBomInfoTrans = new object();
+
+
+
+        public SxController(ISXService sxService, ILogger<PtController> logger, IMapper mapper) : base(sxService)
+        {
+            _sxService = sxService;
+            _logger = logger;
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 同步物料基础信息
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string SyncMaterInfo(SyncMaterInfoRequest reqBody)
+        {
+            var result = new SRes();
+            //_logger.LogInformation("请求参数:{@reqBody},{aa}", reqBody,1);
+            SXSyncMaterInfoResponse resbody = JsonConvert.DeserializeObject<SXSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+            if (reqBody.SyncType == 1)
+            {
+                reqBody.PageIndex = 1;
+                while (resbody.ResData.Any())
+                {
+                    _sxService.SyncMaterInfo(resbody.ResData);
+                    reqBody.PageIndex++;
+                    resbody = JsonConvert.DeserializeObject<SXSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                }
+            }
+            else if (reqBody.SyncType == 2)
+            {
+                //拿到增量
+                var increconf = _sxService.GetSysConfigByCode(Const.MESMaterialInitIncrement);
+                if (increconf != null)
+                {
+                    reqBody.StartTime = DateTime.Parse(increconf.SContent);
+                    //reqBody.Count = int.Parse(increconf.Remark);
+                    resbody = JsonConvert.DeserializeObject<SXSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_sxService.SyncMaterInfo(resbody.ResData))
+                        {
+                            var lastdata = resbody.ResData.OrderBy(p => p.UpdatedTime).Last();
+                            _sxService.UpdateSysConfigModelColumns(new sqlsugar.model.UpdateModelColumns<sxSysConfig>()
+                            {
+                                Columns = it => new sxSysConfig { SContent = lastdata.UpdatedTime.ToString("yyyy-MM-dd HH:mm:ss.fff") },
+                                WhereExpression = it => it.Code == Const.MESMaterialInitIncrement
+                            });
+                        }
+                    }
+                    else
+                    {
+                        result.ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode();
+                        result.ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription();
+                    }
+                }
+                else
+                {
+                    result.ResCode = ResponseStatusCodeEnum.AccountError.GetHashCode();
+                    result.ResMsg = "没有配置信息" + Const.MESMaterialInitIncrement;
+                }
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(reqBody.MatCode))
+                {
+                    resbody = JsonConvert.DeserializeObject<SXSyncMaterInfoResponse>(WmsServiceExportApi(reqBody));
+                    if (resbody.ResData.Any())
+                    {
+                        if (_sxService.SyncMaterInfo(resbody.ResData))
+                        {
+
+                        }
+                    }
+                }
+            }
+            return result.ToCamelCaseString();
+        }
+        /// <summary>
+        /// 帘线工字轮信息传输接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "SpoolMaterialInfoTrans")]
+        public SRes SpoolMaterialInfoTrans(SxSpoolMaterialInfoTransRequest reqDto)
+        {
+            return ConcurrencyReqControl<SxSpoolMaterialInfoTransRequest, SRes>(lockerSpoolMaterialInfoTrans, "SpoolMaterialInfoTrans" + reqDto.SpoolCode, reqDto.SpoolCode, reqDto, _sxService.SpoolMaterialInfoTrans);
+        }
+        /// <summary>
+        /// 时效库入库工字轮反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "SXProductStockInFeedBack")]
+        public SRes SXProductStockInFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<SXProductStockInFeedBackRequestItem>>(list);
+            var dto = new SXProductStockInFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 扭转检测结果值上传接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "TorsChkValFeedBack")]
+        public SRes TorsChkValFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<TorsChkValFeedBackRequestItem>>(list);
+            var dto = new TorsChkValFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 时效库出库装箱工字轮信息反馈接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes EnchaseStockOutFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<EnchaseStockOutFeedBackRequestItem>>(list);
+            var dto = new EnchaseStockOutFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 工字轮装箱位置信息上传接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes EnchaseCoordPosFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<EnchaseCoordPosFeedBackRequestItem>>(list);
+            var dto = new EnchaseCoordPosFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 装箱称重信息上传接口
+        /// </summary>
+        /// <param name="billcode"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes ProBoxWeightFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<ProBoxWeightFeedBackRequestItem>>(list);
+            var dto = new ProBoxWeightFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+
+        /// <summary>
+        /// 库存改判
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChange(SxStockChangeRequest reqDto)
+        {
+            return ConcurrencyReqControl<SxStockChangeRequest, SRes>(lockerlockerStockChange, "StockChange" + reqDto.BillCode, reqDto.BillCode, reqDto, _sxService.StockChange);
+        }
+        /// <summary>
+        /// 改判反馈接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes StockChangeFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<StockChangeFeedBackRequestItem>>(list);
+            var dto = new StockChangeFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+        /// <summary>
+        /// 实时库存查询接口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public string GetCurStockList(string reqDto)
+        {
+            return null;
+        }
+        /// <summary>
+        /// 移库货位上报MES接口
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public SRes MoveStockLocationFeedBack(string doccode)
+        {
+            var list = _sxService.GetBillFeedbackList(p => p.BillCode == doccode);
+            var dtolist = _mapper.Map<List<MoveStockLocationFeedBackRequestItem>>(list);
+            var dto = new MoveStockLocationFeedBackRequest() { ListInfo = dtolist };
+            SRes resbody = JsonConvert.DeserializeObject<SRes>(WmsServiceExportApi(dto));
+            return resbody;
+        }
+    }
+}

+ 70 - 0
wms.api/Controllers/WmsController.cs

@@ -0,0 +1,70 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using System.Diagnostics;
+using wms.dto.request;
+using wms.dto.request.hj;
+using wms.dto.response;
+using wms.dto.response.hj;
+using wms.service;
+using wms.service.IService;
+using wms.util.Ext;
+using wms.util.Http;
+
+namespace wms.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class WmsController : ControllerBase
+    {
+        static object lockerCopperLineReceiveInstr = new object();
+        private readonly IHJService _hJService;
+        public WmsController(IHJService hJService)
+        {
+            _hJService = hJService;
+        }
+        /// <summary>
+        /// 接收ESB请求统一入口
+        /// </summary>
+        /// <param name="reqDto"></param>
+        /// <returns></returns>
+        [HttpPost(Name = "WmsServiceEntrance")]
+        public EsbRes WmsServiceEntrance(EsbReq reqDto)
+        {
+            var result = new EsbRes() { HTTPResponseHeader = new HeadersRes() };
+            //var methodname = RedisHelper.Get("ESBServiceCode" + reqDto.headers.serviceCode);
+            //if (string.IsNullOrEmpty(methodname))
+            //{
+            //    var conf = _hJService.GetSysConfigByExpression(p => p.SContent == reqDto.headers.serviceCode);
+            //    if (conf == null)
+            //    {
+            //        throw new Exception("没有找到该编码的配置信息"+ reqDto.headers.serviceCode);
+            //    }
+            //    methodname = conf.Code;
+            //    RedisHelper.Set("ESBServiceCode" + reqDto.headers.serviceCode, methodname);
+            //}
+            //switch (methodname)
+            //{
+            //    case "CopperLineReceiveInstr"://镀铜补空/取满指令接收接口(包含550工字轮)
+            //        var req = JsonConvert.DeserializeObject<CopperLineRequest>(reqDto.Body);
+            //        result.Body = ConcurrencyReqControl<CopperLineRequest>(lockerCopperLineReceiveInstr, "CopperLineReceiveInstr"+ req.WbCode, req.WbCode, req, _hJService.CopperLineReceiveInstr) .ToCamelCaseString();
+            //        break;
+            //    case "StockChange"://库存改判
+            //        result.Body = _hJService.StockChange(JsonConvert.DeserializeObject<StockChangeRequest>(reqDto.Body)).ToCamelCaseString();
+            //        break;
+            //    case "GetCurStockList"://实时库存查询接口
+            //        result.Body = _hJService.GetCurStockList(JsonConvert.DeserializeObject<GetCurStockListRequest>(reqDto.Body)).ToCamelCaseString();
+            //        break;
+            //    case "SpecialPickMaterApply"://特殊出库领料申请接口
+            //        result.Body = _hJService.SpecialPickMaterApply(JsonConvert.DeserializeObject<SpecialPickMaterApplyRequest>(reqDto.Body)).ToCamelCaseString();
+            //        break;
+            //    default:
+            //        break;
+            //}
+         
+            return result;
+        }
+      
+      
+    }
+}

+ 75 - 0
wms.api/Filter/LogFilter.cs

@@ -0,0 +1,75 @@
+using Microsoft.AspNetCore.Mvc.Abstractions;
+using Microsoft.AspNetCore.Mvc.Filters;
+using Microsoft.Extensions.DependencyInjection;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Claims;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Controllers;
+using Newtonsoft.Json;
+
+namespace wms.api.Filter
+{
+    /// <summary>
+    /// 日志
+    /// </summary>
+    public class LogFilter : ActionFilterAttribute
+    {
+
+        public override void OnActionExecuting(ActionExecutingContext context)
+        {
+            ILogger _logUtil = context.HttpContext.RequestServices.GetRequiredService<ILogger<LogFilter>>();
+            var requestParam = context.ActionArguments;
+            object methodname = "";
+            var method = context.ActionDescriptor.DisplayName;
+            var controllerActionDescriptor = context.ActionDescriptor as ControllerActionDescriptor;
+            var actionName = controllerActionDescriptor.ActionName;
+            if (!actionName.StartsWith("Get"))
+            {
+                if (actionName == "I_WCS_PutTaskStep" || actionName == "I_WCS_PutDevInfo" || actionName == "ExecuteJob" || actionName == "StartJob")
+                {
+                    //_logUtil.Debug(method + "请求参数:" + JilH.JilToJson(requestParam));
+                }
+                else
+                {
+                    _logUtil.LogInformation(method + context.HttpContext.Connection.RemoteIpAddress.ToString()+ "请求参数:{@requestParam}",requestParam);
+                    
+                }
+            }
+            base.OnActionExecuting(context);
+
+        }
+        public override void OnActionExecuted(ActionExecutedContext context)
+        {
+            string resContent = "";
+            if (context.Result is ObjectResult result)
+                resContent = JsonConvert.SerializeObject(result.Value);
+            ILogger _logUtil = context.HttpContext.RequestServices.GetRequiredService<ILogger<LogFilter>>();
+            var controllerActionDescriptor = context.ActionDescriptor as ControllerActionDescriptor;
+            var actionName = controllerActionDescriptor.ActionName;
+            if (!actionName.StartsWith("Get"))
+            {
+                if (actionName == "I_WCS_PutTaskStep" || actionName == "I_WCS_PutDevInfo" || actionName == "ExecuteJob" || actionName == "StartJob")
+                {
+                    //_logUtil.Debug(context.ActionDescriptor.DisplayName + "响应结果:" + resContent.JilToJson());
+                }
+                else
+                {
+                  
+                       _logUtil.LogInformation(context.ActionDescriptor.DisplayName + "响应结果:{@resContent}" , resContent);
+                    
+                }
+            }
+            base.OnActionExecuted(context);
+        }
+
+        public override Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next)
+        {
+            return base.OnResultExecutionAsync(context, next);
+        }
+
+  
+    }
+}

+ 104 - 0
wms.api/Job/JobScheduler.cs

@@ -0,0 +1,104 @@
+using wms.dto.request.hj;
+using wms.dto;
+using Quartz;
+using Quartz.Impl;
+using Quartz.Impl.Matchers;
+using Quartz.Impl.Triggers;
+
+namespace wms.api.Job
+{
+    /// <summary>
+    /// 任务调度器
+    /// </summary>
+    public class JobScheduler
+    {
+        public static IScheduler InitScheduler()
+        {
+            //创建调度器工厂
+            ISchedulerFactory factory = new StdSchedulerFactory();
+            //创建调度器对象
+            IScheduler scheduler = factory.GetScheduler().Result;
+            ////创建任务
+            //IJobDetail job = JobBuilder.Create<PostJob>().Build();
+            ////创建触发器
+            //ITrigger trigger = TriggerBuilder.Create().WithIdentity("TimeTrigger", "TimeGroup").WithSimpleSchedule(p => p.WithIntervalInMinutes(1).RepeatForever()).Build();
+            ////任务、触发器添至调度器对象
+            //scheduler.ScheduleJob(job, trigger);
+            //scheduler.Start();
+            return scheduler;
+        }
+
+        public static void Start(string jobName, Type jobType, string timeCorn)
+        {
+            var sched = InitScheduler();
+            var jobList = GetJobList(Const.JobGroupName).Result;
+            var job = jobList.Where(p => jobName == p.JobName);
+            if (job.Count() > 0)
+            {
+                //if (job.First().JobStatus == "Stop")
+                {
+                    sched.DeleteJob(new JobKey(jobName, Const.JobGroupName));
+                    StartJob(jobName, jobType, timeCorn);
+                }
+                //else
+                //{
+                //    ResumeAsync(jobName, Const.JobGroupName);
+                //}
+            }
+            else
+            {
+                StartJob(jobName, jobType, timeCorn);
+            }
+        }
+        public static async Task<List<SysJobDto>> GetJobList(string jobGroup)
+        {
+            var result = new List<SysJobDto>();
+            try
+            {
+                var group = await InitScheduler().GetJobGroupNames();
+                var currentlyExecutingJobs = await InitScheduler().GetCurrentlyExecutingJobs();
+
+
+                var matcher = GroupMatcher<JobKey>.GroupEquals(jobGroup);
+                var jobs = await InitScheduler().GetJobKeys(matcher);
+                foreach (var item in jobs)
+                {
+                    var triggers = await InitScheduler().GetTriggersOfJob(item);
+                    var state = await InitScheduler().GetTriggerState(triggers.First().Key);
+
+                    var job = InitScheduler().GetJobDetail(item).Result;
+                    result.Add(new SysJobDto()
+                    {
+                        JobName = job.Key.Name,
+                        JobDesc = job.Description,
+                        JobStatus = state.ToString(),
+                        JobGroup = job.Key.Group
+                    });
+                }
+                return result;
+            }
+            catch (Exception ex)
+            { return result; }
+        }
+        public static void StartJob(string jobName, Type jobType, string timeCorn)
+        {
+            var scheduler = InitScheduler(); //获取对象
+            //创建任务
+            JobDetailImpl jobDetail = new JobDetailImpl();
+            jobDetail.Name = jobName;
+            jobDetail.JobType = jobType;
+            jobDetail.Group = Const.JobGroupName;
+            //创建触发器
+            CronTriggerImpl trigger = new CronTriggerImpl();
+            trigger.Name = jobName;
+            trigger.Group = Const.TiggerGroupName;
+            trigger.CronExpressionString = timeCorn;
+            //任务、触发器添至调度器对象
+            scheduler.ScheduleJob(jobDetail, trigger);
+            if (!scheduler.IsShutdown)
+            {
+                scheduler.Start();
+            }
+        }
+    }
+}

+ 30 - 0
wms.api/Job/PostJob.cs

@@ -0,0 +1,30 @@
+using Newtonsoft.Json;
+using Quartz;
+using wms.dto.request.hj;
+using wms.util;
+using wms.util.Http;
+
+namespace wms.api.Job
+{
+    /// <summary>
+    /// 创建任务
+    /// </summary>
+    public class PostJob : IJob
+    {
+        public Task Execute(IJobExecutionContext context)
+        {
+            string jobCode = context.JobDetail.Key.Name;
+            Action<string> action = new Action<string>(PostRequest);
+            return Task.Run(() =>
+            {
+                PostRequest(jobCode);
+            });
+        }
+        public void PostRequest(string jobCode)
+        {
+
+            var webBaseUrl = AppSettings.GetConfig("webapi");
+            HttpUtil.PostRequest(webBaseUrl + "/api/Hj/ExecuteJob", JsonConvert.SerializeObject(new DetailCodeRequest { Code = jobCode }));
+        }
+    }
+}

+ 76 - 0
wms.api/Program.cs

@@ -0,0 +1,76 @@
+using Autofac;
+using Autofac.Extensions.DependencyInjection;
+using CSRedis;
+using Microsoft.OpenApi.Models;
+using Serilog;
+using wms.api.autofac;
+using wms.api.Filter;
+using wms.service.mapper;
+
+var builder = WebApplication.CreateBuilder(args);
+
+// Add services to the container.
+
+builder.Services.AddControllers();
+// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddCors(options =>
+{
+    options.AddPolicy(name: "cors", builders => builders.AllowAnyOrigin().AllowAnyHeader().WithMethods("GET", "POST", "HEAD", "PUT", "DELETE", "OPTIONS"));
+});
+builder.Services.AddSwaggerGen(c =>
+{
+    c.SwaggerDoc("v1", new OpenApiInfo
+    {
+        Title = "WMS接口文档",
+        Version = "1.0",
+        Description = "WMS接口文档"
+    });
+    var file = Path.Combine(AppContext.BaseDirectory, "wms.api.xml");  // xml文档绝对路径
+    var file1 = Path.Combine(AppContext.BaseDirectory, "wms.dto.xml");
+    var path = Path.Combine(AppContext.BaseDirectory, file); 
+    var path1 = Path.Combine(AppContext.BaseDirectory, file1);
+    c.IncludeXmlComments(path, true); // true : 显示控制器层注释
+    c.IncludeXmlComments(path1, true); // true : 显示dto注释
+    c.OrderActionsBy(o => o.RelativePath);
+
+});
+builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory());
+
+builder.Host.ConfigureContainer<ContainerBuilder>(containerBuilder =>
+{
+    containerBuilder.RegisterModule(new AutofacModuleRegister());
+});
+builder.Host.UseSerilog((context, logger) =>
+{
+    logger.ReadFrom.Configuration(context.Configuration);
+    logger.Enrich.FromLogContext();
+});
+
+builder.Services.AddControllersWithViews(options =>
+{
+    options.Filters.Add<LogFilter>();
+});
+
+builder.Services.AddSingleton(new wms.util.AppSettings(builder.Configuration));
+RedisHelper.Initialization(new CSRedisClient(builder.Configuration.GetConnectionString("CSRedisConnectString")));
+builder.Services.AddAutoMapper(typeof(WmsPrifile));
+var app = builder.Build();
+
+// Configure the HTTP request pipeline.
+if (app.Environment.IsDevelopment())
+{
+    
+}
+app.UseSwagger();
+app.UseSwaggerUI();
+
+//app.UseHttpsRedirection();
+app.UseCors("cors");
+app.UseRouting();
+app.UseAuthorization();
+
+app.MapControllers();
+
+app.Run();
+

+ 31 - 0
wms.api/Properties/launchSettings.json

@@ -0,0 +1,31 @@
+{
+  "$schema": "https://json.schemastore.org/launchsettings.json",
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:10539",
+      "sslPort": 44314
+    }
+  },
+  "profiles": {
+    "wms.api": {
+      "commandName": "Project",
+      "dotnetRunMessages": true,
+      "launchBrowser": true,
+      "launchUrl": "swagger",
+      "applicationUrl": "https://localhost:7044;http://localhost:5044",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "launchUrl": "swagger",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    }
+  }
+}

+ 8 - 0
wms.api/appsettings.Development.json

@@ -0,0 +1,8 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  }
+}

+ 93 - 0
wms.api/appsettings.json

@@ -0,0 +1,93 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  },
+  "AllowedHosts": "*",
+  "ConnectionConfigs": [
+    {
+      "ConnectionString": "Data Source=10.30.44.50;User ID=sa;Password=P@ssw0rd;Initial Catalog=Ztest",
+      //"ConnectionString": "Data Source=.;User ID=sa;Password=Aa123456;Initial Catalog=WMS_ZT_01HJ",
+      "DbType": 1,
+      "ConfigId": "hj",
+      "IsAutoCloseConnection": true
+    },
+    {
+      "ConnectionString": "Data Source=.;User ID=sa;Password=Aa123456;Initial Catalog=ptwms",
+      "DbType": 1,
+      "ConfigId": "pt",
+      "IsAutoCloseConnection": true
+    },
+    {
+      "ConnectionString": "Data Source=.;User ID=sa;Password=Aa123456;Initial Catalog=fjwms",
+      "DbType": 1,
+      "ConfigId": "fj",
+      "IsAutoCloseConnection": true
+    },
+    {
+      "ConnectionString": "Data Source=.;User ID=sa;Password=Aa123456;Initial Catalog=sxwms",
+      "DbType": 1,
+      "ConfigId": "sx",
+      "IsAutoCloseConnection": true
+    },
+    {
+      "ConnectionString": "Data Source=.;User ID=sa;Password=Aa123456;Initial Catalog=cpwms",
+      "DbType": 1,
+      "ConfigId": "cp",
+      "IsAutoCloseConnection": true
+    }
+  ],
+  "CSRedisConnectString": "127.0.0.1[:6379],password=123456,defaultDatabase=0",
+  "Serilog": {
+    "MinimumLevel": {
+      "Default": "Debug", //最小记录日志级别
+      "Override": {
+        "Default": "Warning",
+        "System": "Warning",
+        "Microsoft": "Warning"
+      }
+    },
+    "Enrich": [ "FromLogContext", "WithThreadId" ],
+    "WriteTo": [
+      {
+        "Name": "Console",
+        "Args": {
+          "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {SourceContext} {ThreadId} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
+        }
+      },
+      {
+        "Name": "Debug",
+        "Args": {
+          "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {SourceContext} {ThreadId} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
+        }
+      },
+      {
+        "Name": "File",
+        "Args": {
+          "path": "Logs/log.txt",
+          "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter",
+          "rollingInterval": "Day",
+          "outputTemplate": "{ClientIP}{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {SourceContext} {ThreadId} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
+          "shared": true,
+          "rollOnFileSizeLimit": true,
+          "fileSizeLimitBytes": 102400000,
+          "retainedFileCountLimit": 365
+        }
+      }
+    ]
+  },
+  //"EsbMesPushUrl": "http://esb-pre.zt.net.cn:18080/esb/comm/api",
+  "EsbMesPushUrl": "http://esb.zt.net.cn:18080/esb/comm/api",
+  "EsbErpPushUrl": "",
+  "RcsCreateTaskPushUrl": "",
+  "RcsContinuePushUrl": "",
+
+  "IWmsStockInPushUrl": "databus/publish/zhongTianOutStock",
+  "IWmsStockOutPushUrl": "databus/publish/zhongTianIntoStock",
+  "MoveReservedLocationCount": "1",
+  "CopperLineToEmptyAreaCode": "21",
+  "webapi": "https://localhost:7044",
+  "maxweight": "950"
+}

+ 38 - 0
wms.api/autofac/AutofacModuleRegister.cs

@@ -0,0 +1,38 @@
+using Autofac;
+using Autofac.Extras.Quartz;
+using System.Reflection;
+using wms.api.Job;
+
+namespace wms.api.autofac
+{
+    public class AutofacModuleRegister : Autofac.Module
+    {
+        //重写Autofac管道Load方法,在这里注册注入
+        protected override void Load(ContainerBuilder builder)
+        {
+            builder.RegisterAssemblyTypes(GetAssemblyByName("wms.service")).Where(a => a.Name.EndsWith("Service")).AsImplementedInterfaces().PropertiesAutowired();
+            builder.RegisterAssemblyTypes(GetAssemblyByName("wms.dataservice")).Where(a => a.Name.EndsWith("DataService")).AsImplementedInterfaces().PropertiesAutowired();
+
+            //builder.RegisterModule(new QuartzAutofacFactoryModule());
+            builder.RegisterModule(new QuartzAutofacJobsModule(typeof(PostJob).Assembly));
+            ////单一注册
+
+            //builder.RegisterType<NlogUtil>().Named<ILogUtil>(typeof(NlogUtil).Name);
+
+
+            //var controllersTypesInAssembly = typeof(Startup).Assembly.GetExportedTypes()
+            //.Where(type => typeof(Microsoft.AspNetCore.Mvc.ControllerBase).IsAssignableFrom(type)).ToArray();
+            //builder.RegisterTypes(controllersTypesInAssembly).PropertiesAutowired();
+
+        }
+        /// <summary>
+          /// 根据程序集名称获取程序集
+          /// </summary>
+          /// <param name="AssemblyName">程序集名称</param>
+        public static Assembly GetAssemblyByName(String AssemblyName)
+        {
+            return Assembly.Load(AssemblyName);
+        }
+    }
+
+}

+ 25 - 0
wms.api/wms.api.csproj

@@ -0,0 +1,25 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+  <PropertyGroup>
+    <TargetFramework>net6.0</TargetFramework>
+    <Nullable>enable</Nullable>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <GenerateDocumentationFile>True</GenerateDocumentationFile>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Autofac.Extras.Quartz" Version="8.2.0" />
+    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
+    <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
+    <PackageReference Include="Quartz" Version="3.6.2" />
+    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\wms.dto\wms.dto.csproj" />
+    <ProjectReference Include="..\wms.package\wms.package.csproj" />
+    <ProjectReference Include="..\wms.service\wms.service.csproj" />
+    <ProjectReference Include="..\wms.util\wms.util.csproj" />
+  </ItemGroup>
+
+</Project>

+ 11 - 0
wms.dataservice/DataService/CPDataService.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using wms.dataservice.IDataSetvice;
+
+namespace wms.dataservice.DataService
+{
+    public class CPDataService: ICPDataService
+    {
+    }
+}

+ 12 - 0
wms.dataservice/DataService/FJDataService.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using wms.dataservice.IDataSetvice;
+
+namespace wms.dataservice.DataService
+{
+    public class FJDataService: IFJDataService
+    {
+
+    }
+}

+ 119 - 0
wms.dataservice/DataService/HJDataService.cs

@@ -0,0 +1,119 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using wms.dataservice.IDataSetvice;
+using wms.dto;
+using wms.dto.request;
+using wms.dto.request.hj.dto;
+using wms.sqlsugar;
+using wms.sqlsugar.model.hj;
+
+namespace wms.dataservice.DataService
+{
+    public class HJDataService: IHJDataService
+    {
+        Repository<hjBaseWareLocation> _baseWareLocationrepository => new Repository<hjBaseWareLocation>();
+        Repository<hjBillDocument> _billDocument => new Repository<hjBillDocument>();
+
+        /// <summary>
+        /// 二升位有出库任务的一升位有货(无任务)货位
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        public List<hjBaseWareLocation> GetLocationDept1WithDept2Stock(ApplyStockOutRequest reqEntity)
+        {
+            //var list = _baseWareLocationrepository.Context.Queryable<hjBaseWareLocation, hjBaseWareLocation, hjBaseEquipment>((location1, location2, equipment) => new object[] {
+            //     JoinType.Inner,location1.ShelfCode == location2.ShelfCode && location1.LogicCol == location2.LogicCol && location1.LogicLayer == location2.LogicLayer && location1.ZoneId == location2.ZoneId,
+            //     JoinType.Inner,house.Id  == equipment.WarehouseId && location1.Tunnel == equipment.Tunnel && equipment.EquipType == BaseDictionaryConst.EquipType_PlierCode
+            //     })
+            //   .Where((location1, zone, house, location2, equipment) => location1.Status == 1 && location1.IsDelete == 0 && location2.Status == 1 && location2.IsDelete == 0 && zone.IsDelete == 0 && zone.Status == 1 && house.IsDelete == 0 && house.Status == 1)
+            //   .Where((location1, zone, house, location2, equipment) => location1.LocationType == DictionaryConst.LocationTypeStorageCode && location1.LocationState == DictionaryConst.LocationStateStockCode && (string.IsNullOrEmpty(location1.LocationLock) || location1.LocationLock == DictionaryConst.LocationLockNoneCode))
+            //   .Where((location1, zone, house, location2, equipment) => location2.LocationType == DictionaryConst.LocationTypeStorageCode && location2.LocationState == DictionaryConst.LocationStateStockCode && location2.LocationLock == DictionaryConst.LocationLockStockOutCode)
+            //   .WhereIF(!string.IsNullOrEmpty(reqEntity.LocationType), (location1, zone, house, location2, equipment) => reqEntity.LocationType == location1.LocationType)
+            //   .WhereIF(!string.IsNullOrEmpty(reqEntity.Tunnel), (location1, zone, house, location2, equipment) => location1.Tunnel == reqEntity.Tunnel)
+            //   .WhereIF(!string.IsNullOrEmpty(reqEntity.Size), (location1, zone, house, location2, equipment) => int.Parse(location1.Size) >= int.Parse(reqEntity.Size))
+            //   .WhereIF(reqEntity.ZoneId > 0, (location1, zone, house, location2, equipment) => zone.Id == reqEntity.ZoneId)
+            //   .WhereIF(reqEntity.WarehouseId > 0, (location1, zone, house, location2, equipment) => zone.WarehouseId == reqEntity.WarehouseId)
+            //   .WhereIF(reqEntity.LocationId > 0, (location1, zone, house, location2, equipment) => location1.Id == reqEntity.LocationId)
+            //   .WhereIF(!string.IsNullOrEmpty(reqEntity.ShelfCode), (location1, zone, house, location2, equipment) => location1.ShelfCode == reqEntity.ShelfCode)
+            //   .WhereIF(reqEntity.IsExceptErrorPlier, (location1, zone, house, location2, equipment) => equipment.EquipState != BaseDictionaryConst.PlierRuningState_ErrorCode)
+            //.Select((location1, zone, house, location2, equipment) => location1);
+            // return list.ToList();
+            return null;
+        }
+        public (List<DocumentsResponse>, int) GetPageDocumentsList(DocumentsRequest request)
+        {
+            int count = 0;
+            var list = _billDocument.Context.Queryable<BillDocsinfo, BaseWarehouse>((document, house) => new object[]
+            {
+                JoinType.Left, document.WarehouseId == house.Id
+            })
+            .WhereIF(!string.IsNullOrEmpty(request.DocsNo), (document, house) => document.DocsNo.Contains(request.DocsNo))
+            .WhereIF(!string.IsNullOrEmpty(request.ReqNo), (document, house) => document.ReqNo.Contains(request.ReqNo))
+            .WhereIF(!string.IsNullOrEmpty(request.StateCode), (document, house) => document.StateNum == int.Parse(request.StateCode))
+            .WhereIF(!string.IsNullOrEmpty(request.TypeCode), (document, house) => document.TypeNum == int.Parse(request.TypeCode))
+            .Select((document, house) => new DocumentsResponse()
+            {
+                Id = document.Id,
+                WarehouseCode = house.Code,
+                DocNo = document.DocsNo,
+                ReqNo = document.ReqNo,
+                TypeCode = document.TypeNum.ToString(),
+                StateCode = document.StateNum.ToString(),
+                DownQty = document.DownQty,
+                //DownErrReason = document.DownErrReason,
+                //Remark = document.Remark,
+                AddWho = document.AddWho,
+                EditWho = document.EditWho,
+                AddTime = document.AddTime,
+                EditTime = document.EditTime
+            })
+            .ToPageList(request.PageIndex, request.PageSize, ref count);
+            //list = list.Skip((request.PageIndex - 1) * request.PageSize).Take(request.PageSize).ToList();
+            return (list.ToList(), count);
+        }
+        public List<string> GetStockByEquip(string code)
+        {
+            var list = _baseWareLocationrepository.Context.Queryable<hjBaseWareLocation, hjBillContainer>((location, stock) => new object[]
+            {
+                JoinType.Inner, stock.ContGrpId == location.ContGrpID,
+            })
+            .Where((location, stock) => stock.ExecState == InvState.InvEcecState_BuildUp.GetHashCode())
+            .WhereIF(!string.IsNullOrEmpty(code), (location, stock) => location.Code.Contains(code))
+            .Select((location, stock) => stock.HWBarCode).ToList();
+            return list;
+        }
+        public (List<DocumentsdetailList>, int) GetDocumentDetailListByDocsNo(DocumentsRequest request)
+        {
+            int count = 0;
+            var list = _billDocument.Context.Queryable<hjBillDocument, hjBillBarcode, hjBaseMater, hjBillContainer, hjBaseWareLocation>((document, barcode, mater, container, location) => new object[]
+            {
+                JoinType.Inner, document.DocNo == barcode.InDocsNo,
+                JoinType.Inner, barcode.MatId == mater.Id,
+                JoinType.Inner, barcode.RFIDBarCode == container.RFIDBarCode,
+                JoinType.Inner, container.ContGrpId == location.ContGrpID
+            })
+            .Where((document, barcode, mater, container, location) => container.ExecState == InvState.InvEcecState_In.GetHashCode() && location.LocationState == LocationState.LocationState_Full.GetHashCode()
+             )
+            .WhereIF(!string.IsNullOrEmpty(request.DocsNo), (document, barcode, mater, container, location) => document.DocNo.Contains(request.DocsNo))
+            .WhereIF(!string.IsNullOrEmpty(request.Rfid), (document, barcode, mater, container, location) => container.RFIDBarCode.Contains(request.Rfid))
+            .WhereIF(!string.IsNullOrEmpty(request.location), (document, barcode, mater, container, location) => location.Code.Contains(request.location))
+            .Select((document, barcode, mater, container, location) => new DocumentsdetailList()
+            {
+                WarehouseCode = location.WareCode,
+                MatCode = mater.Code,
+                MatName = mater.Name,
+                Location = location.Code,
+                RFIDBarCode = barcode.RFIDBarCode,
+                HWSpec = barcode.HWSpec,
+                IsFast = barcode.IsFast,
+                Grade = barcode.Grade
+            })
+            .ToPageList(request.PageIndex, request.PageSize, ref count);
+            //list = list.Skip((request.PageIndex - 1) * request.PageSize).Take(request.PageSize).ToList();
+            return (list.ToList(), count);
+        }
+    }
+}

+ 99 - 0
wms.dataservice/DataService/PTDataService.cs

@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using wms.dataservice.IDataSetvice;
+using wms.sqlsugar.model.pt;
+using wms.sqlsugar;
+using SqlSugar;
+using wms.dto.request.pt.dto;
+using wms.dto.response.pt.dto;
+using wms.dto;
+using System.Linq;
+
+namespace wms.dataservice.DataService
+{
+    public class PTDataService: IPTDataService
+    {
+        Repository<ptBaseWareLocation> _baseWareLocationrepository => new Repository<ptBaseWareLocation>();
+        Repository<ptBillDocsinfo> _billDocument => new Repository<ptBillDocsinfo>();
+
+        public List<string> GetStockByEquip(string code)
+        {
+            var list = _baseWareLocationrepository.Context.Queryable<ptBaseWareLocation, ptBillInvnow>((location, stock) => new object[]
+            {
+                JoinType.Inner, stock.ContGrpId == location.ContGrpId,
+            })
+            .Where((location, stock) => stock.InvStateCode == InvState.InvEcecState_BuildUp.ToString())
+            .WhereIF(!string.IsNullOrEmpty(code), (location, stock) => location.Code.Contains(code))
+            .Select((location, stock) => stock.HWBarCode).ToList();
+            return list;
+        }
+        public (List<PtDocumentsResponse>, int) GetPageDocumentsList(PtDocumentsRequest request)
+        {
+            int count = 0;
+            var list = _billDocument.Context.Queryable<ptBillDocsinfo, ptBaseWarehouse>((document, house) => new object[]
+            {
+                JoinType.Left, document.WarehouseId == house.Id
+            })
+            .WhereIF(!string.IsNullOrEmpty(request.DocsNo), (document, house) => document.DocsNo.Contains(request.DocsNo))
+            .WhereIF(!string.IsNullOrEmpty(request.ReqNo), (document, house) => document.ReqNo.Contains(request.ReqNo))
+            .WhereIF(!string.IsNullOrEmpty(request.StateCode), (document, house) => document.StateNum == int.Parse(request.StateCode))
+            .WhereIF(!string.IsNullOrEmpty(request.TypeCode), (document, house) => document.Type == request.TypeCode)
+            .Select((document, house) => new PtDocumentsResponse()
+            {
+                Id = document.Id,
+                WarehouseCode = house.Code,
+                DocNo = document.DocsNo,
+                ReqNo = document.ReqNo,
+                TypeCode = document.Type.ToString(),
+                StateCode = document.StateNum.ToString(),
+                DownQty = document.DownQty,
+                //DownErrReason = document.DownErrReason,
+                //Remark = document.Remark,
+                AddWho = document.AddWho,
+                EditWho = document.EditWho,
+                AddTime = document.AddTime,
+                EditTime = document.EditTime
+            })
+            .ToPageList(request.PageIndex, request.PageSize, ref count);
+            //list = list.Skip((request.PageIndex - 1) * request.PageSize).Take(request.PageSize).ToList();
+            return (list.ToList(), count);
+        }
+        public (List<PtDocumentsdetailList>, int) GetDocumentDetailListByDocsNo(PtDocumentsRequest request)
+        {
+            int count = 0;
+            var list = _billDocument.Context.Queryable<ptBillDocument, ptBillBarcode, ptBaseMater, ptBillInvnow, ptBaseWareLocation>((document, barcode, mater, container, location) => new object[]
+            {
+                JoinType.Inner, document.DocNo == barcode.InDocsNo,
+                JoinType.Inner, barcode.MatId == mater.Id,
+                JoinType.Inner, barcode.RFIDBarCode == container.RFIDBarCode,
+                JoinType.Inner, container.ContGrpId == location.ContGrpId
+            })
+            .Where((document, barcode, mater, container, location) => container.InvStateCode == InvState.InvEcecState_In.ToString() && location.StateNum == LocationState.LocationState_Full.GetHashCode()
+            )
+            .WhereIF(!string.IsNullOrEmpty(request.DocsNo), (document, barcode, mater, container, location) => document.DocNo.Contains(request.DocsNo))
+            .WhereIF(!string.IsNullOrEmpty(request.Rfid), (document, barcode, mater, container, location) => container.RFIDBarCode.Contains(request.Rfid))
+            .WhereIF(!string.IsNullOrEmpty(request.location), (document, barcode, mater, container, location) => location.Code.Contains(request.location))
+            .Select((document, barcode, mater, container, location) => new PtDocumentsdetailList()
+            {
+                WarehouseCode = location.WarehouseCode,
+                MatCode = mater.Code,
+                MatName = mater.Name,
+                Location = location.Code,
+                RFIDBarCode = barcode.RFIDBarCode,
+                RodBarCode = container.RodBarCode,
+                IsFast = barcode.IsFast,
+                InvBarCode = container.InvBarCode,
+                BoilerNo = container.BoilerNo,
+                PackNo = container.PackNo,
+                ProductTime = barcode.ProductTime,
+                CaQty = barcode.CaQty,
+                State = container.ExecStateCode,
+                Qty = barcode.TotalWtQty
+            })
+            .ToPageList(request.PageIndex, request.PageSize, ref count);
+            //list = list.Skip((request.PageIndex - 1) * request.PageSize).Take(request.PageSize).ToList();
+            return (list.ToList(), count);
+        }
+    }
+}

+ 11 - 0
wms.dataservice/DataService/SXDataService.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using wms.dataservice.IDataSetvice;
+
+namespace wms.dataservice.DataService
+{
+    public class SXDataService: ISXDataService
+    {
+    }
+}

+ 10 - 0
wms.dataservice/IDataSetvice/ICPDataService.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dataservice.IDataSetvice
+{
+    public interface ICPDataService
+    {
+    }
+}

+ 11 - 0
wms.dataservice/IDataSetvice/IFJDataService.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dataservice.IDataSetvice
+{
+    public interface IFJDataService
+    {
+
+    }
+}

+ 22 - 0
wms.dataservice/IDataSetvice/IHJDataService.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using wms.dto.request;
+using wms.dto.request.hj.dto;
+using wms.sqlsugar.model.hj;
+
+namespace wms.dataservice.IDataSetvice
+{
+    public interface IHJDataService
+    {
+        public List<hjBaseWareLocation> GetLocationDept1WithDept2Stock(ApplyStockOutRequest reqEntity);
+        /// <summary>
+        /// 获取单据集合
+        /// </summary>
+        /// <param name="request"></param>
+        /// <returns></returns>
+        (List<DocumentsResponse>, int) GetPageDocumentsList(DocumentsRequest request);
+        List<string> GetStockByEquip(string code);
+        (List<DocumentsdetailList>, int) GetDocumentDetailListByDocsNo(DocumentsRequest request);
+    }
+}

+ 15 - 0
wms.dataservice/IDataSetvice/IPTDataService.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using wms.dto.request.pt.dto;
+using wms.dto.response.pt.dto;
+
+namespace wms.dataservice.IDataSetvice
+{
+    public interface IPTDataService
+    {
+        List<string> GetStockByEquip(string code);
+        (List<PtDocumentsResponse>, int) GetPageDocumentsList(PtDocumentsRequest request);
+        (List<PtDocumentsdetailList>, int) GetDocumentDetailListByDocsNo(PtDocumentsRequest request);
+    }
+}

+ 10 - 0
wms.dataservice/IDataSetvice/ISXDataService.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dataservice.IDataSetvice
+{
+    public class ISXDataService
+    {
+    }
+}

+ 14 - 0
wms.dataservice/wms.dataservice.csproj

@@ -0,0 +1,14 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.1</TargetFramework>
+    <Nullable>enable</Nullable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\wms.dto\wms.dto.csproj" />
+    <ProjectReference Include="..\wms.package\wms.package.csproj" />
+    <ProjectReference Include="..\wms.sqlsugar\wms.sqlsugar.csproj" />
+  </ItemGroup>
+
+</Project>

+ 11 - 0
wms.dto/attribute/SwaggerIgnoreAttribute.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.attribute
+{
+    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
+    public class SwaggerIgnoreAttribute : Attribute
+    {
+    }
+}

+ 47 - 0
wms.dto/const/Const.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto
+{
+    public class Const
+    {
+        /// <summary>
+        /// MES基础数据数据同步增量类型-物料
+        /// </summary>
+        public const string MESMaterialInitIncrement = "MESMaterialInitIncrement";
+        /// <summary>
+        /// 任务组名
+        /// </summary>
+        public static readonly string JobGroupName = "DefaultGroup";
+        /// <summary>
+        /// 触发器组名
+        /// </summary>
+        public static readonly string TiggerGroupName = "DefaultGroupTrigger";
+
+
+        /// <summary>
+        /// 合金库接驳口类型
+        /// </summary>
+        public const string HJLocPortType = "HJLocPortType";
+        public const int Zero = 0;
+        public const int One = 1;
+        public const int MinOne = -1;
+        /// <summary>
+        /// 合金仓库
+        /// </summary>
+        public const string HjWareHouse = "";
+        /// <summary>
+        /// 盘条仓库
+        /// </summary>
+        public const string PtWareHouse = "pthouse";
+        /// <summary>
+        /// 二楼出库站台设备号,手动出库使用,用于区分一、二楼任务
+        /// </summary>
+        public static readonly string[] FloorEquip = { "1022", "1024", "1026" };
+        /// <summary>
+        /// 生产叫料区6个缓存架
+        /// </summary>
+        public const string Type = "Pt_6_Production";
+    }
+}

+ 879 - 0
wms.dto/const/EnumClass.cs

@@ -0,0 +1,879 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+
+namespace wms.dto
+{
+    public class EnumClass
+    { 
+
+    
+    }
+    /// <summary>
+    /// 货位类型
+    /// </summary>
+    public enum LocationType
+    {
+        /// <summary>
+        /// 立库货位
+        /// </summary>
+        LocationType_StorageLocation = 1,
+        /// <summary>
+        /// 平库货位
+        /// </summary>
+        LocationType_GroudLocation = 2,
+        /// <summary>
+        /// 虚拟货位
+        /// </summary>
+        LocationType_VirtualLocation1 = 3,
+    }
+    /// <summary>
+    /// 货位是否启用
+    /// </summary>
+    public enum LocationStop
+    {
+        /// <summary>
+        /// 启用
+        /// </summary>
+        LocationInvoke = 0,
+        /// <summary>
+        /// 停用
+        /// </summary>
+        LocationStopped = 1
+    }
+    /// <summary>
+    /// 货位状态
+    /// </summary>
+    public enum LocationState
+    {
+        /// <summary>
+        /// 货位空
+        /// </summary>
+        LocationState_Empty = 1,
+        /// <summary>
+        /// 货位有货
+        /// </summary>
+        LocationState_Full = 2,
+        /// <summary>
+        /// 入库锁
+        /// </summary>
+        LocationState_StockIn = 3,
+        /// <summary>
+        /// 出库锁
+        /// </summary>
+        LocationState_StockOut = 4,
+        /// <summary>
+        /// 移库锁
+        /// </summary>
+        LocationState_StockMove = 5,
+    }
+
+
+    public enum ResponseStatusCodeEnum
+    {
+        /// <summary>
+        /// 成功
+        /// </summary>
+        [Description("成功")]
+        Sucess = 200,
+
+        /// <summary>
+        /// 已存在
+        /// </summary>
+        [Description("已存在")]
+        Exist = 201,
+
+        /// <summary>
+        /// 执行成功但未取得任何数据
+        /// </summary>
+        [Description("执行成功但未取得任何数据")]
+        NoResult = 202,
+
+        /// <summary>
+        /// 参数错误
+        /// </summary>
+        [Description("参数错误")]
+        ErrParam = 203,
+        /// <summary>
+        /// 语法异常
+        /// </summary>
+        [Description("语法异常")]
+        InnerServerErr = 204,
+
+        /// <summary>
+        /// 参数不可为空
+        /// </summary>
+        [Description("参数不可为空")]
+        ErrParamNotNull = 205,
+
+        /// <summary>
+        /// 失败
+        /// </summary>
+        [Description("失败")]
+        Fail = 206,
+        /// <summary>
+        /// 账号密码错误或账号不存在
+        /// </summary>
+        [Description("账号密码错误或账号不存在")]
+        AccountError = 1001,
+
+        /// <summary>
+        /// 数据保存失败
+        /// </summary>
+        [Description("数据保存失败")]
+        DataSaveErr = 1002,
+
+        /// <summary>
+        /// 没有传过账凭证号
+        /// </summary>
+        [Description("没有传过账凭证号")]
+        NotReqId = 1003,
+
+
+        /// <summary>
+        /// 仓库编码不存在
+        /// </summary>
+        [Description("仓库编码不存在")]
+        WarehouseCodeNotExist = 2001,
+        /// <summary>
+        /// 容器码不能为空
+        /// </summary>
+        [Description("容器码不能为空")]
+        ContainerCodeNotEmpty = 2002,
+        /// <summary>
+        /// 该托盘号已在库中,请检查托盘号是否贴重复
+        /// </summary>
+        [Description("该托盘号已在库中,请检查托盘号是否贴重复")]
+        BarcodeContainerRepeat = 2003,
+        /// <summary>
+        /// 物料条码重复组盘
+        /// </summary>
+        [Description("物料条码重复组盘")]
+        GroupStockDetailMaterialBarCodeExist = 2004,
+        /// <summary>
+        /// 物料编码信息不存在
+        /// </summary>
+        [Description("物料编码信息不存在")]
+        MaterInfoNotExist = 2005,
+        /// <summary>
+        /// 不存在该任务
+        /// </summary>
+        [Description("不存在该任务")]
+        WcsTaskNotExist = 2006,
+        /// <summary>
+        /// 组盘信息不存在
+        /// </summary>
+        [Description("组盘信息不存在")]
+        StockNotExist = 2007,
+        /// <summary>
+        /// 没有可用库位
+        /// </summary>
+        [Description("没有可用库位")]
+        NotEnoughLocation = 2008,
+        /// <summary>
+        /// 库区编码不存在
+        /// </summary>
+        [Description("库区编码不存在")]
+        WareZoneCodeNotExist = 2009,
+        /// <summary>
+        /// 货位编码不存在
+        /// </summary>
+        [Description("货位编码不存在")]
+        WareLocationCodeNotExist = 2010,
+        /// <summary>
+        /// 物料编码不存在
+        /// </summary>
+        [Description("物料编码不存在")]
+        BaseMaterCodeNotExist = 2011,
+        /// <summary>
+        /// 单位编码不存在
+        /// </summary>
+        [Description("单位编码不存在")]
+        BaseUnitCodeNotExist = 2012,
+        /// <summary>
+        /// 条码不存在
+        /// </summary>
+        [Description("条码不存在")]
+        BaseBarcodeNotExist = 2013,
+        /// <summary>
+        /// 明细数据必须传参
+        /// </summary>
+        [Description("明细数据必须传参")]
+        DocDetailNotExist = 2014,
+     
+        /// <summary>
+        /// 当前组盘状态不是已组盘,不允许取消
+        /// </summary>
+        [Description("当前组盘状态不是已组盘,不允许取消")]
+        StockStateNotBuildUp = 2015,
+        /// <summary>
+        /// 当前任务是已完成或已取消状态
+        /// </summary>
+        [Description("当前任务是已完成或已取消状态")]
+        WcsTaskStateIsComplete = 2016,
+        /// <summary>
+        /// 组盘状态是已出库或已入库
+        /// </summary>
+        [Description("组盘状态是已出库或已入库")]
+        StockStateFail = 2017,
+        /// <summary>
+        /// 当前入库任务还未分配货位,不允许完成
+        /// </summary>
+        [Description("当前入库任务还未分配货位,不允许完成")]
+        InTaskNotLocation = 2018,
+        /// <summary>
+        /// 当前任务不是新建状态,只能取消新建状态的任务
+        /// </summary>
+        [Description("当前任务不是新建状态,只能取消新建状态的任务")]
+        WcsTaskStateNotCreate = 2019,
+        /// <summary>
+        /// 单据不存在
+        /// </summary>
+        [Description("单据不存在")]
+        DocNoCodeNotExist = 2019,
+        /// <summary>
+        /// 单据状态不是新增或执行,不允许结单
+        /// </summary>
+        [Description("单据状态不是新增或执行,不允许结单")]
+        DocumentStateNotFinish = 2020,
+        /// <summary>
+        /// 单据存在新建或执行中的任务,不允许结单
+        /// </summary>
+        [Description("单据存在新建或执行中的任务,不允许结单")]
+        IsTaskNotFinish = 2021,
+        /// <summary>
+        /// 存在进行中任务,不允许解绑
+        /// </summary>
+        [Description("存在进行中任务,不允许解绑")]
+        IsTaskNotUnbounding = 2022,
+        /// <summary>
+        /// 没有当前设备信息,请进行维护
+        /// </summary>
+        [Description("没有当前设备信息,请进行维护")]
+        EquipInfoNotExist = 2023,
+        /// <summary>
+        /// 存在当前任务
+        /// </summary>
+        [Description("存在当前任务")]
+        WcsTaskExist = 2024,
+        /// <summary>
+        /// 组盘状态不对,请检查当前的组盘状态
+        /// </summary>
+        [Description("组盘状态不对,请检查当前的组盘状态")]
+        RFIDStockStateFail = 2025,
+
+        /// <summary>
+        /// 该接口只允许出库任务调用
+        /// </summary>
+        [Description("该接口只允许出库任务调用")]
+        OnlyStockOutAvil = 2026,
+        /// <summary>
+        /// 当前单据状态不支持修改
+        /// </summary>
+        [Description("当前状态不支持修改")]
+        StateNotUpdate = 2027,
+        /// <summary>
+        /// 库存不足
+        /// </summary>
+        [Description("库存不足")]
+        NotEnoughStock = 2028,
+        /// <summary>
+        /// 没有传巷道号
+        /// </summary>
+        [Description("没有传巷道号")]
+        NotTunnelNum = 2029,
+    }
+    /// <summary>
+    /// 单据类型
+    /// </summary>
+    public enum DocType
+    {
+        /// <summary>
+        /// 合金满轮入库
+        /// </summary>
+        [Description("合金镀铜满轮入库单")]
+        DocType_HJ_CopperProductStockIn = 1,
+        /// <summary>
+        /// 湿拉产线领料
+        /// </summary>
+        [Description("湿拉产线领料")]
+        DocType_HJ_WetLinePickMaterApply= 2,
+        /// <summary>
+        /// 湿拉产线退料
+        /// </summary>
+        [Description("湿拉产线退料单")]
+        DocType_HJ_WetLineBack = 3,
+        /// <summary>
+        /// 湿拉产线余料
+        /// </summary>
+        [Description("湿拉产线余料单")]
+        DocType_HJ_WetLineLeft = 4,
+        /// <summary>
+        /// 合金库库存改判
+        /// </summary>
+        [Description("合金库库存改判")]
+        DocType_HJ_WetLineStockChange = 5,
+        /// <summary>
+        /// 特殊出库领料
+        /// </summary>
+        [Description("特殊出库领料")]
+        DocType_HJ_SpecialStockOut = 6,
+
+        /// <summary>
+        /// 湿拉入库单
+        /// </summary>
+        [Description("湿拉入库单")]
+        DocType_FJ_WetStockIn = 7,
+        /// <summary>
+        /// 合金空轮初始化入库单
+        /// </summary>
+        [Description("合金空轮初始化入库单")]
+        DocType_HJ_EmptyContStockIn = 8,
+
+
+        /// <summary>
+        /// 帘线领料单
+        /// </summary>
+        [Description("帘线领料单")]
+        DocType_FJ_CurtainProductionStockOut = 11,
+        /// <summary>
+        /// 帘线工序工单
+        /// </summary>
+        [Description("帘线工序工单")]
+        DocType_FJ_CurtainProduction = 12,
+
+    }
+    /// <summary>
+    /// 盘条单据类型
+    /// </summary>
+    public enum PtDocType
+    {
+        /// <summary>
+        /// 采购到货单
+        /// </summary>
+        [Description("采购到货单")]
+        Purchase = 1,
+        /// <summary>
+        /// 采购退货单
+        /// </summary>
+        [Description("采购退货单")]
+        PurReturn = 2,
+        /// <summary>
+        /// 到货重挂清单
+        /// </summary>
+        [Description("到货重挂清单")]
+        PurError = 3,
+        /// <summary>
+        /// 生产领料单
+        /// </summary>
+        [Description("生产领料单")]
+        DocType_PT_ProductionStockOut = 4,
+    }
+    /// <summary>
+    /// 单据状态
+    /// </summary>
+    public enum DocState
+    {
+        /// <summary>
+        /// 新增
+        /// </summary>
+        [Description("新增")]
+        DocState_Create = 1,
+        /// <summary>
+        /// 执行中
+        /// </summary>
+        [Description("执行中")]
+        DocState_Execute = 2,
+        /// <summary>
+        /// 完成
+        /// </summary>
+        [Description("完成")]
+        DocState_Complete = 3,
+        /// <summary>
+        /// 停止
+        /// </summary>
+        [Description("停止")]
+        DocState_Stop = 4,
+    }
+    /// <summary>
+    /// 容器类型
+    /// </summary>
+    public enum ContainerType
+    {
+        /// <summary>
+        /// RFID
+        /// </summary>
+        [Description("RFID")]
+        ContainerType_RFID = 1,
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        [Description("Spool")]
+        ContainerType_Spool = 2,
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        [Description("Pallet")]
+        ContainerType_Pallet = 3,
+    }
+
+
+    /// <summary>
+    /// 任务类型
+    /// </summary>
+    public enum TaskType
+    {
+        /// <summary>
+        /// 组盘
+        /// </summary>
+        [Description("组盘")]
+        SetPlate = 0,
+
+        /// <summary>
+        /// 入库
+        /// </summary>
+        [Description("入库")]
+        EnterDepot = 1,
+
+        /// <summary>
+        /// 出库
+        /// </summary>
+        [Description("出库")]
+        OutDepot = 2,
+
+        /// <summary>
+        /// 移库
+        /// </summary>
+        [Description("移库")]
+        TransferDepot = 3,
+
+     
+        /// <summary>
+        /// 输送
+        /// </summary>
+        [Description("输送")]
+        Delivery = 5,
+        /// <summary>
+        ///  空轮初始化
+        /// </summary>
+        [Description("空轮初始化")]
+        EmptyInit = 6,
+    }
+
+    /// <summary>
+    /// 任务状态
+    /// </summary>
+    public enum TaskStatus
+    {
+        /// <summary>
+        /// 新建
+        /// </summary>
+        [Description("新建")]
+        NewBuild = 0,
+
+        /// <summary>
+        /// 待执行
+        /// </summary>
+        [Description("待执行")]
+        WaitingToExecute = 1,
+
+        /// <summary>
+        /// 输送机执行中
+        /// </summary>
+        [Description("输送机执行中")]
+        ConveyorExecution = 10,
+
+        /// <summary>
+        /// 堆垛机执行
+        /// </summary>
+        [Description("堆垛机执行")]
+        StackerExecution = 20,
+
+        /// <summary>
+        /// 堆垛机完成
+        /// </summary>
+        [Description("堆垛机完成")]
+        StackerCompleted = 30,
+
+        /// <summary>
+        /// AGV执行中
+        /// </summary>
+        [Description("AGV执行中")]
+        AGVExecution = 40,
+
+        /// <summary>
+        /// 已完成
+        /// </summary>
+        [Description("已完成")]
+        Finish = 99,
+
+        /// <summary>
+        /// 已取消
+        /// </summary>
+        [Description("已取消")]
+        Cancel = 106
+    }
+    ///// <summary>
+    ///// 任务类型
+    ///// </summary>
+    //public enum TaskType
+    //{
+    //    /// <summary>
+    //    /// 入库任务
+    //    /// </summary>
+    //    [Description("入库任务")]
+    //    TaskType_StockIn = 1,
+    //    /// <summary>
+    //    /// 出库任务
+    //    /// </summary>
+    //    [Description("出库任务")]
+    //    TaskType_StockOut = 2,
+    //    /// <summary>
+    //    /// 移库任务
+    //    /// </summary>
+    //    [Description("移库任务")]
+    //    TaskType_StockTrans = 3,
+    //    /// <summary>
+    //    /// 移动任务
+    //    /// </summary>
+    //    [Description("移动任务")]
+    //    TaskType_Move = 4,
+    //}
+    ///// <summary>
+    ///// 任务状态
+    ///// </summary>
+    //public enum TaskStateEnum
+    //{
+    //    /// <summary>
+    //    /// 新建
+    //    /// </summary>
+    //    [Description("新建")]
+    //    TaskState_Create = 1,
+    //    /// <summary>
+    //    /// 执行中
+    //    /// </summary>
+    //    [Description("执行中")]
+    //    TaskState_Execute = 2,
+    //    /// <summary>
+    //    /// 已完成
+    //    /// </summary>
+    //    [Description("已完成")]
+    //    TaskState_Complete = 3,
+    //    /// <summary>
+    //    /// 已取消
+    //    /// </summary>
+    //    [Description("已取消")]
+    //    TaskState_Cancel = 4,
+    //}
+
+    /// <summary>
+    /// 库存状态
+    /// </summary>
+    public enum InvState
+    {
+        /// <summary>
+        /// 已组盘
+        /// </summary>
+        [Description("已组盘")]
+        InvEcecState_BuildUp = 1,
+        ///// <summary>
+        ///// 入库中
+        ///// </summary>
+        //[Description("入库中")]
+        //InvEcecState_InGoing = 2,
+        /// <summary>
+        /// 已入库
+        /// </summary>
+        [Description("已入库")]
+        InvEcecState_In = 3,
+        /// <summary>
+        /// 出库中
+        /// </summary>
+        [Description("出库中")]
+        InvEcecState_OutGoing = 4,
+        /// <summary>
+        /// 已出库
+        /// </summary>
+        [Description("已出库")]
+        InvEcecState_Out = 5,
+    }
+    /// <summary>
+    ///  出库任务类型
+    /// </summary>
+    public enum OutTypeEnum
+    {
+        /// <summary>
+        ///  自动出库任务
+        /// </summary>
+        自动出库任务 = 0,
+
+        /// <summary>
+        ///  全自动手动出库任务
+        /// </summary>
+        全自动手动出库任务 = 1,
+
+        /// <summary>
+        ///  半自动手动出库任务
+        /// </summary>
+        半自动手动出库任务 = 2
+    }
+    /// <summary>
+    /// 库存锁定状态
+    /// </summary>
+    public enum InvLockState
+    {
+        /// <summary>
+        /// 正常
+        /// </summary>
+        [Description("正常")]
+        InvState_Normal,
+        /// <summary>
+        /// 锁定
+        /// </summary>
+        [Description("锁定")]
+        InvState_Lock,
+    }
+
+    /// <summary>
+    /// 任务业务类型
+    /// </summary>
+    public enum TaskBusType
+    {
+        /// <summary>
+        /// 默认
+        /// </summary>
+        [Description("默认")]
+        TaskBusType_HJ_Def = 0,
+        /// <summary>
+        /// 镀铜一楼取满
+        /// </summary>
+        [Description("镀铜一楼取满")]
+        TaskBusType_HJ_OneFloorLineStockIn = 1,
+        /// <summary>
+        /// 一楼立库出空轮
+        /// </summary>
+        [Description("一楼立库出空轮")]
+        TaskBusType_HJ_OneFloorEmptySpoolOut = 2,
+        /// <summary>
+        /// 镀铜线补空轮
+        /// </summary>
+        [Description("镀铜线补空轮")]
+        TaskBusType_HJ_OneFloorEmptySpoolToLine = 3,
+        /// <summary>
+        /// 手动出库
+        /// </summary>
+        [Description("手动出库")]
+        TaskBusType_HJ_ManualOut = 4,
+        /// <summary>
+        /// 二楼空轮初始化入库
+        /// </summary>
+        [Description("二楼空轮初始化入库")]
+        TaskBusType_HJ_EmptySpoolStockIn = 5,
+        /// <summary>
+        /// 二楼湿拉线退料回立库
+        /// </summary>
+        [Description("二楼湿拉线退料回立库")]
+        TaskBusType_HJ_WetBack = 6,
+        /// <summary>
+        /// 二楼湿拉线余料回立库
+        /// </summary>
+        [Description("二楼湿拉线余料回立库")]
+        TaskBusType_HJ_WetLeft = 7,
+        /// <summary>
+        /// 二楼湿拉空轮回立库
+        /// </summary>
+        [Description("二楼湿拉空轮回立库")]
+        TaskBusType_HJ_WetEmpty = 8,
+
+        /// <summary>
+        /// 二楼湿拉自动叫料出库
+        /// </summary>
+        [Description("二楼湿拉自动叫料出库")]
+        TaskBusType_HJ_TwoFloorStockOut = 9,
+
+        /// <summary>
+        /// 质检回库
+        /// </summary>
+        [Description("质检回库")]
+        TaskBusType_HJ_QualityStockIn = 10,
+        /// <summary>
+        /// 其他入库
+        /// </summary>
+        [Description("其他入库")]
+        TaskBusType_HJ_OtherStockIn = 11,
+        /// <summary>
+        /// 采购550工字轮入库
+        /// </summary>
+        [Description("采购550工字轮入库")]
+        TaskBusType_HJ_PurchaseSpoolStockIn = 11,
+        /// <summary>
+        /// 重挂入库
+        /// </summary>
+        [Description("重挂入库")]
+        TaskBusType_HJ_AnewStockIn = 12,
+        /// <summary>
+        /// 质检领料
+        /// </summary>
+        [Description("质检领料")]
+        TaskBusType_HJ_QualityOut = 13,
+        /// <summary>
+        /// 呆滞料出库
+        /// </summary>
+        [Description("呆滞料出库")]
+        TaskBusType_HJ_DullMaterOut = 14,
+        /// <summary>
+        /// 重挂出库
+        /// </summary>
+        [Description("重挂出库")]
+        TaskBusType_HJ_AnewOut = 15,
+        /// <summary>
+        /// PDA指定出库
+        /// </summary>
+        [Description("PDA指定出库")]
+        TaskBusType_HJ_PdaManualOut = 15,
+
+        /// <summary>
+        /// 一楼空轮初始化入库
+        /// </summary>
+        [Description("一楼空轮初始化入库")]
+        TaskBusType_HJ_OneFloorEmptySpoolStockIn = 16,
+
+        /// <summary>
+        /// 移库
+        /// </summary>
+        [Description("移库")]
+        TaskBusType_HJ_Move = 100,
+    }
+    public enum PtTaskBusType
+    {
+        /// <summary>
+        /// 质检回库
+        /// </summary>
+        [Description("质检回库")]
+        TaskBusType_PT_QualityStockIn = 1,
+        /// <summary>
+        /// 其他入库
+        /// </summary>
+        [Description("其他入库")]
+        TaskBusType_PT_OtherStockIn = 2,
+        /// <summary>
+        /// 采购入库单
+        /// </summary>
+        [Description("采购入库单")]
+        TaskBusType_PT_PurchaseStockIn = 3,
+        /// <summary>
+        /// 重挂入库
+        /// </summary>
+        [Description("重挂入库")]
+        TaskBusType_PT_AnewStockIn = 4,
+        /// <summary>
+        /// 生产领料
+        /// </summary>
+        [Description("生产领料")]
+        TaskBusType_PT_ProductionStockOut = 5,
+    }
+    public enum FackbeekType
+    {
+        /// <summary>
+        /// 合金一楼满轮入库反馈
+        /// </summary>
+        [Description("合金一楼满轮入库反馈")]
+        InterfaceType_HJ_1F_StockIn,
+        /// <summary>
+        /// 合金二楼退料入库反馈
+        /// </summary>
+        [Description("合金二楼退料入库反馈")]
+        InterfaceType_HJ_2F_BackStockIn,
+        /// <summary>
+        /// 合金二楼余料入库反馈
+        /// </summary>
+        [Description("合金二楼余料入库反馈")]
+        InterfaceType_HJ_2F_LeftStockIn,
+        /// <summary>
+        /// 改判反馈
+        /// </summary>
+        [Description("改判反馈")]
+        InterfaceType_HJ_StockChanage,
+    }
+
+    public enum PtFackbeekType
+    {
+        /// <summary>
+        /// 采购到货单入库反馈
+        /// </summary>
+        [Description("采购到货单入库反馈")]
+        InterfaceType_PT_PurchaseStockIn,
+        /// <summary>
+        /// 采购退货出库反馈
+        /// </summary>
+        [Description("采购退货出库反馈")]
+        InterfaceType_PT_PurchaseBack,
+        /// <summary>
+        /// 重挂反馈接口
+        /// </summary>
+        [Description("重挂反馈接口")]
+        InterfaceType_PT_AnewStockIn,
+        /// <summary>
+        /// 改判反馈
+        /// </summary>
+        [Description("改判反馈")]
+        InterfaceType_PT_StockChanage,
+    }
+
+    public enum InvInOutType
+    {
+        /// <summary>
+        /// 入库
+        /// </summary>
+        [Description("入库")]
+        In = 1,
+
+        /// <summary>
+        /// 出库
+        /// </summary>
+        [Description("出库")]
+        Out = 2,
+    }
+    public enum ContGrpType
+    {
+        /// <summary>
+        /// 物料盘
+        /// </summary>
+        [Description("入库")]
+        Material = 1,
+
+        /// <summary>
+        /// 空盘
+        /// </summary>
+        [Description("出库")]
+        EmptyCon = 2,
+    }
+    /// <summary>
+    /// 移库返回
+    /// </summary>
+    public enum WcsContractWcsMoveTaskEnum
+    {
+        /// <summary>
+        /// 失败
+        /// </summary>
+        [Description("失败")]
+        失败 = 0,
+        /// <summary>
+        /// 允许2升位执行
+        /// </summary>
+        [Description("允许2升位执行")]
+        允许2升位执行 = 1,
+        /// <summary>
+        /// 执行移库任务
+        /// </summary>
+        [Description("执行移库任务")]
+        执行移库任务 = 2,
+
+        /// <summary>
+        /// 一深位有出库任务
+        /// </summary>
+        [Description("一深位有出库任务")]
+        一深位有出库任务 = 3,
+    }
+}

+ 26 - 0
wms.dto/request/cp/ComPushApiResInfoRequest.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class ComPushApiResInfoRequest:BaseRequest
+    {
+        /// <summary>
+        /// 接口编号
+        /// </summary>
+        public string ApiId { get; set; }
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 处理结果编码
+        /// </summary>
+        public string ResCode { get; set; }
+        /// <summary>
+        /// 描述(失败原因)
+        /// </summary>
+        public string ResMsg { get; set; }
+    }
+}

+ 57 - 0
wms.dto/request/cp/CpStockChangeRequest.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class CpStockChangeRequest:BaseRequest
+    {
+        /// <summary>
+        /// 单号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 改判信息列表
+        /// </summary>
+        public List<CpStockChangeRequestItem> ListInfo { get; set; }
+    }
+    public class CpStockChangeRequestItem
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 改判状态(锁定/放行/快投/取消快投:Lock/Normal/Fast/UnFast)
+        /// </summary>
+        public string State { get; set; }
+        /// <summary>
+        /// 原因
+        /// </summary>
+        public string Reason { get; set; }
+        /// <summary>
+        /// 箱号
+        /// </summary>
+        public string BoxNo { get; set; }
+    }
+}

+ 18 - 0
wms.dto/request/cp/ErrorMaterialStockOutFeedBackRequest.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class ErrorMaterialStockOutFeedBackRequest
+    {
+        /// <summary>
+        /// 发货单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 箱号清单
+        /// </summary>
+        public List<string> BoxList { get; set; }
+    }
+}

+ 22 - 0
wms.dto/request/cp/ErrorMaterialStockOutRequest.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class ErrorMaterialStockOutRequest:BaseRequest
+    {
+        /// <summary>
+        /// 发货单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 箱号清单
+        /// </summary>
+        public List<string> BoxList { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+    }
+}

+ 26 - 0
wms.dto/request/cp/MoveStockLocationFeedBackRequest.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class MoveStockLocationFeedBackRequest
+    {
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 箱号
+        /// </summary>
+        public string BoxNo { get; set; }
+        /// <summary>
+        /// 起点货位
+        /// </summary>
+        public string StartLoc { get; set; }
+        /// <summary>
+        /// 目标货位
+        /// </summary>
+        public string EndLoc { get; set; }
+    }
+}

+ 18 - 0
wms.dto/request/cp/SalesDocTransFeedBackRequest.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class SalesDocTransFeedBackRequest
+    {
+        /// <summary>
+        /// 发货单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 箱号清单
+        /// </summary>
+        public List<string> BoxList { get; set; }
+    }
+}

+ 42 - 0
wms.dto/request/cp/SalesDocTransRequest.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class SalesDocTransRequest:BaseRequest 
+    {
+        /// <summary>
+        /// 发货单号/退货单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 客户编码
+        /// </summary>
+        public string CustCode { get; set; }
+        /// <summary>
+        /// 客户名称
+        /// </summary>
+        public string CustName { get; set; }
+        /// <summary>
+        /// 发货日期/退货时间
+        /// </summary>
+        public DateTime Date { get; set; }
+        /// <summary>
+        /// 箱号清单
+        /// </summary>
+        public List<string> BoxList { get; set; }
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 是否返工
+        /// </summary>
+        public bool IsReWork { get; set; }
+    }
+}

+ 34 - 0
wms.dto/request/cp/SalesLeftDocTransFeedBackRequest.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class SalesLeftDocTransFeedBackRequest
+    {
+        /// <summary>
+        /// 发货单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 箱号清单
+        /// </summary>
+        public List<string> BoxList { get; set; }
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+        /// <summary>
+        /// 货位编码
+        /// </summary>
+        public string LocCode { get; set; }
+    }
+}

+ 10 - 0
wms.dto/request/cp/SpoolMaterialInfoTransRequest.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class SpoolMaterialInfoTransRequest
+    {
+    }
+}

+ 44 - 0
wms.dto/request/cp/StockChangeFeedBackRequest.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class StockChangeFeedBackRequest
+    {
+
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 单号
+        /// </summary>
+        public string BillCode { get; set; }
+
+        public List<StockChangeFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class StockChangeFeedBackRequestItem
+    {
+        /// <summary>
+        /// 箱号
+        /// </summary>
+        public string BoxNo { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 改判结果
+        /// </summary>
+        public string ResState { get; set; }
+        /// <summary>
+        /// 原因
+        /// </summary>
+        public string ResDesc { get; set; }
+    }
+}

+ 42 - 0
wms.dto/request/cp/StockStateChangeRequest.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.cp
+{
+    public class StockStateChangeRequest:BaseRequest
+    {
+        /// <summary>
+        /// 单号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 改判信息列表
+        /// </summary>
+        public List<StockStateChangeRequestItem> ListInfo { get; set; }
+    }
+    public class StockStateChangeRequestItem
+    {
+
+        /// <summary>
+        /// 1放行/2冻结
+        /// </summary>
+        public string State { get; set; }
+        /// <summary>
+        /// 箱号
+        /// </summary>
+        public string BoxNo { get; set; }
+    }
+}

+ 18 - 0
wms.dto/request/fj/AllocationConveyorSortRequest.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class AllocationConveyorSortRequest
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string BarCode { get; set; }
+        /// <summary>
+        /// 扫码设备号
+        /// </summary>
+        public string EquNo { get; set; }
+    }
+}

+ 11 - 0
wms.dto/request/fj/AllocationWarehouseSortRequest.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class AllocationWarehouseSortRequest
+    {
+        public int TaskCount { get; set; }
+    }
+}

+ 28 - 0
wms.dto/request/fj/BGradeMaterialStockOutFeedBackRequest.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class BGradeMaterialStockOutFeedBackRequest
+    {
+
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+     
+        public List<BGradeMaterialStockOutFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class BGradeMaterialStockOutFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+    }
+}

+ 31 - 0
wms.dto/request/fj/BGradeMaterialStockOutRequest.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class BGradeMaterialStockOutRequest:BaseRequest
+    {
+        /// <summary>
+        /// 位置
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 单号
+        /// </summary>
+        public string BillCode { get; set; }
+    }
+   
+}

+ 37 - 0
wms.dto/request/fj/BomInfoTransRequest.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class BomInfoTransRequest:BaseRequest
+    {
+        /// <summary>
+        /// 总生产工单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 帘线物料编码
+        /// </summary>
+        public string ProMatCode { get; set; }
+        /// <summary>
+        /// BOM编码
+        /// </summary>
+        public string BomCode { get; set; }
+        /// <summary>
+        /// 湿拉物料信息列表
+        /// </summary>
+        public List<BomInfoTransRequestItem> MaterList { get; set; }
+    }
+    public class BomInfoTransRequestItem
+    {
+        /// <summary>
+        /// 湿拉物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 轮子个数
+        /// </summary>
+        public int Count { get; set; }
+    }
+}

+ 11 - 0
wms.dto/request/fj/CurtainOrderStartCheckRequest.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class CurtainOrderStartCheckRequest:BaseRequest
+    {
+        public string BillCode { get; set; }
+    }
+}

+ 103 - 0
wms.dto/request/fj/CurtainProductionOrderRequest.cs

@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class CurtainProductionOrderRequest:BaseRequest
+    {
+        /// <summary>
+        /// 生产订单
+        /// </summary>
+        public string WorkOrder { get; set; }
+        /// <summary>
+        /// 帘线生产工序单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 帘线物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// BOM编码
+        /// </summary>
+        public string BomInfo { get; set; }
+        /// <summary>
+        /// 开始时间
+        /// </summary>
+        public DateTime StartTime { get; set; }
+        /// <summary>
+        /// 码垛总箱数
+        /// </summary>
+        public int BoxCount { get; set; }
+        /// <summary>
+        /// 机台号列表
+        /// </summary>
+        public List<string> WbList { get; set; }
+        /// <summary>
+        /// 帘线工字轮计划总数
+        /// </summary>
+        public int PlanQty { get; set; }
+        /// <summary>
+        /// 装箱规则(1:层配;2:SPC)
+        /// </summary>
+        public string PackRule { get; set; }
+        /// <summary>
+        /// 厂区编号
+        /// </summary>
+        public string FactoryNo { get; set; }
+        /// <summary>
+        /// 单据状态
+        /// </summary>
+        public string BillState { get; set; }
+        /// <summary>
+        /// 箱子信息列表
+        /// </summary>
+        public List<ListBoxInfoItem> ListBoxInfo { get; set; }
+
+    }
+
+    public class ListBoxInfoItem
+    {
+        /// <summary>
+        /// 箱号
+        /// </summary>
+        public string BoxNo { get; set; }
+        /// <summary>
+        /// 每箱满轮子数
+        /// </summary>
+        public int FullCount { get; set; }
+        /// <summary>
+        /// 每箱空轮子数
+        /// </summary>
+        public int EmptyCount { get; set; }
+        /// <summary>
+        /// 是否允许焊点盘
+        /// </summary>
+        public string IsSolder { get; set; }
+        /// <summary>
+        /// 成套目标扭转值上限
+        /// </summary>
+        public decimal TorsionMax { get; set; }
+        /// <summary>
+        /// 成套目标扭转值下限
+        /// </summary>
+        public decimal TorsionMin { get; set; }
+        /// <summary>
+        /// 子托盘编码
+        /// </summary>
+        public string TrayCode { get; set; }
+        /// <summary>
+        /// 干燥剂
+        /// </summary>
+        public string Dryer { get; set; }
+        /// <summary>
+        /// 中间隔板
+        /// </summary>
+        public string Bulkhead { get; set; }
+        /// <summary>
+        /// 抽真空
+        /// </summary>
+        public string Vacuum { get; set; }
+    }
+}

+ 42 - 0
wms.dto/request/fj/CurtainProductionStockOutFeedBackRequest.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class CurtainProductionStockOutFeedBackRequest
+    {
+        /// <summary>
+        /// 帘线工单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 货位
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+        public List<CurtainProductionStockOutFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class CurtainProductionStockOutFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+    }
+}

+ 34 - 0
wms.dto/request/fj/CurtainProductionStockOutRequest.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class CurtainProductionStockOutRequest:BaseRequest
+    {
+        /// <summary>
+        /// 帘线工单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 机台编号
+        /// </summary>
+        public string WbCode { get; set; }
+        /// <summary>
+        /// 推荐消耗等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 快投标记
+        /// </summary>
+        public bool IsFast { get; set; }
+    }
+}

+ 39 - 0
wms.dto/request/fj/ErrorMaterialStockOutFeedBackRequest.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class ErrorMaterialStockOutFeedBackRequest
+    {
+      
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 货位
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+        public List<ErrorMaterialStockOutFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class ErrorMaterialStockOutFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+    }
+}

+ 37 - 0
wms.dto/request/fj/FjErrorMaterialStockOutRequest.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class FjErrorMaterialStockOutRequest:BaseRequest
+    {
+        /// <summary>
+        /// 出库货位
+        /// </summary>
+        public string FromLocCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 出库口
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 单号
+        /// </summary>
+        public string BillCode { get; set; }
+    }
+    public class FjErrorMaterialStockOutRequestItem
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+    }
+}

+ 81 - 0
wms.dto/request/fj/FjProductionBackRequest.cs

@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class FjProductionBackRequest:BaseRequest
+    {
+        /// <summary>
+        /// 退料单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 操作类型(1退料/2余料(退料不传工字轮信息,只传点位))
+        /// </summary>
+        public string BusType { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 机台号
+        /// </summary>
+        public string WbCode { get; set; }
+    }
+    public class FjProductionBackRequestItem
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 类型
+        /// </summary>
+        public string BusType { get; set; }
+        /// <summary>
+        /// 工字轮型号
+        /// </summary>
+        public string SpoolType { get; set; }
+        /// <summary>
+        /// 生产日期
+        /// </summary>
+        public DateTime ProductDate { get; set; }
+        /// <summary>
+        /// 时效期
+        /// </summary>
+        public decimal HoldDuration { get; set; }
+        /// <summary>
+        /// 等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 长度
+        /// </summary>
+        public decimal Length { get; set; }
+        /// <summary>
+        /// 重量
+        /// </summary>
+        public decimal Weight { get; set; }
+        /// <summary>
+        /// 高度
+        /// </summary>
+        public decimal Height { get; set; }
+        /// <summary>
+        /// 是否快投
+        /// </summary>
+        public bool IsFast { get; set; }
+        /// <summary>
+        /// 单/双丝
+        /// </summary>
+        public string SilkType { get; set; }
+    }
+}

+ 54 - 0
wms.dto/request/fj/FjStockChangeRequest.cs

@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class FjStockChangeRequest:BaseRequest
+    {
+        /// <summary>
+        /// 单号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 改判信息列表
+        /// </summary>
+        public List<FjStockChangeRequestItem> ListInfo { get; set; }
+    }
+    public class FjStockChangeRequestItem
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 改判状态(锁定/放行/快投/取消快投:Lock/Normal/Fast/UnFast)
+        /// </summary>
+        public string State { get; set; }
+        /// <summary>
+        /// 原因
+        /// </summary>
+        public string Reason { get; set; }
+
+    }
+}

+ 75 - 0
wms.dto/request/fj/ManualBuildStockTransRequest.cs

@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class ManualBuildStockTransRequest:BaseRequest
+    {
+        /// <summary>
+        /// 托盘号
+        /// </summary>
+        public string PalletCode { get; set; }
+        /// <summary>
+        /// 货位
+        /// </summary>
+        public string LocCode { get; set; }
+        public List<ManualBuildStockTransRequestItem> ListInfo { get; set; }
+    }
+    public class ManualBuildStockTransRequestItem
+    { 
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 类型
+        /// </summary>
+        public string BusType { get; set; }
+        /// <summary>
+        /// 工字轮型号
+        /// </summary>
+        public string SpoolType { get; set; }
+        /// <summary>
+        /// 生产日期
+        /// </summary>
+        public DateTime ProductDate { get; set; }
+        /// <summary>
+        /// 时效期
+        /// </summary>
+        public decimal HoldDuration { get; set; }
+        /// <summary>
+        /// 等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 长度
+        /// </summary>
+        public decimal Length { get; set; }
+        /// <summary>
+        /// 重量
+        /// </summary>
+        public decimal Weight { get; set; }
+        /// <summary>
+        /// 高度
+        /// </summary>
+        public decimal Height { get; set; }
+        /// <summary>
+        /// 是否快投
+        /// </summary>
+        public bool IsFast { get; set; }
+        /// <summary>
+        /// 单/双丝
+        /// </summary>
+        public string SilkType { get; set; }
+
+    }
+}

+ 49 - 0
wms.dto/request/fj/ProductionLeftFeedBackRequest.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class ProductionLeftFeedBackRequest
+    {
+        /// <summary>
+        /// 退料单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 操作类型(/2余料(退料不传工字轮信息,只传点位))
+        /// </summary>
+        public string BusType { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+        /// <summary>
+        /// 货位
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 集合
+        /// </summary>
+        public List<ProductionLeftFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class ProductionLeftFeedBackRequestItem
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+    }
+}

+ 74 - 0
wms.dto/request/fj/SpoolMaterialInfoTransRequest.cs

@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class SpoolMaterialInfoTransRequest:BaseRequest
+    {
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 类型(1:湿拉半成品;2:芯股)
+        /// </summary>
+        public string BusType { get; set; }
+        /// <summary>
+        /// 工字轮型号
+        /// </summary>
+        public string SpoolType { get; set; }
+        /// <summary>
+        /// 生产日期
+        /// </summary>
+        public DateTime ProductDate { get; set; }
+        /// <summary>
+        /// 时效期
+        /// </summary>
+        public decimal HoldDuration { get; set; }
+        /// <summary>
+        /// 等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 长度
+        /// </summary>
+        public decimal Length { get; set; }
+        /// <summary>
+        /// 重量
+        /// </summary>
+        public decimal Weight { get; set; }
+        /// <summary>
+        /// 高度
+        /// </summary>
+        public decimal Height { get; set; }
+        /// <summary>
+        /// 是否快投
+        /// </summary>
+        public bool IsFast { get; set; }
+        /// <summary>
+        /// 是否退料
+        /// </summary>
+        public bool IsBack { get; set; }
+        /// <summary>
+        /// 单/双丝
+        /// </summary>
+        public string SilkType { get; set; }
+        /// <summary>
+        /// 湿拉工序工单号
+        /// </summary>
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 生产订单号
+        /// </summary>
+        public string WorkOrder { get; set; }
+    }
+}

+ 40 - 0
wms.dto/request/fj/StockChangeFeedBackRequest.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class StockChangeFeedBackRequest
+    {
+
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 单号
+        /// </summary>
+        public string BillCode { get; set; }
+     
+        public List<StockChangeFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class StockChangeFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+        /// <summary>
+        /// 改判结果
+        /// </summary>
+        public string ResState { get; set; }
+        /// <summary>
+        /// 原因
+        /// </summary>
+        public string ResDesc { get; set; }
+    }
+}

+ 42 - 0
wms.dto/request/fj/StockChangeStockInFeedBackRequest.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class StockChangeStockInFeedBackRequest
+    {
+        /// <summary>
+        /// 托盘号
+        /// </summary>
+        public string PalletCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        /// <summary>
+        /// 货位
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+        public List<StockChangeStockInFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class StockChangeStockInFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+    }
+}

+ 34 - 0
wms.dto/request/fj/SyncMachineInfoRequest.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class SyncMachineInfoRequest
+    {
+        /// <summary>
+        /// 机台编号
+        /// </summary>
+        public string MacCode { get; set; }
+        /// <summary>
+        /// 机台组号
+        /// </summary>
+        public string MacGroup { get; set; }
+        /// <summary>
+        /// 当前页
+        /// </summary>
+        public int PageIndex { get; set; }
+        /// <summary>
+        /// 每页条数
+        /// </summary>
+        public int PageSize { get; set; }
+        /// <summary>
+        /// 开始时间
+        /// </summary>
+        public DateTime StartTime { get; set; }
+        /// <summary>
+        /// 结束时间
+        /// </summary>
+        public DateTime EndTime { get; set; }
+    }
+}

+ 38 - 0
wms.dto/request/fj/WetProductStockInFeedBackRequest.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.fj
+{
+    public class WetProductStockInFeedBackRequest
+    {
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+        /// <summary>
+        /// 货位编码
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 过账凭证号
+        /// </summary>
+        public string ReqId { get; set; }
+        public List<WetProductStockInFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class WetProductStockInFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 工字轮条码
+        /// </summary>
+        public string SpoolCode { get; set; }
+    }
+}

+ 46 - 0
wms.dto/request/hj/AddJobRequest.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class AddJobRequest
+    {
+        public long Id { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
+        [MaxLength(200, ErrorMessage = "{0} 长度不可超过{1}")]
+        public string Code { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
+        [MaxLength(200, ErrorMessage = "{0} 长度不可超过{1}")]
+        public string Name { get; set; }
+        public string JobGroupName { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
+        [MaxLength(100, ErrorMessage = "{0} 长度不可超过{1}")]
+        public string JobType { get; set; }
+        public string JobDescription { get; set; }
+        public string TriggerName { get; set; }
+        public string TriggerGroupName { get; set; }
+        public string TriggerDescription { get; set; }
+        public string CronExpression { get; set; }
+        /// <summary>
+        /// 接口地址列
+        /// </summary>
+        public List<JobApiRelation> JobList { get; set; }
+    }
+    public class JobApiRelation
+    {
+        public long Id { get; set; }
+        public long JobId { get; set; }
+        /// <summary>
+        /// 接口地址
+        /// </summary>
+        [Required(ErrorMessage = "接口地址必须填写")]
+        public string ApiUrl { get; set; }
+        /// <summary>
+        /// 请求体
+        /// </summary>
+        [Required(ErrorMessage = "请求体必须填写")]
+        public string RequestBody { get; set; }
+    }
+}

+ 12 - 0
wms.dto/request/hj/AddWcsMoveTaskRequest.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class AddWcsMoveTaskRequest:BaseRequest
+    {
+
+        public int TaskNum { get; set; }
+    }
+}

+ 22 - 0
wms.dto/request/hj/ApplyEmptySpoolRequest.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 补空轮申请请求实体
+    /// </summary>
+    public class ApplyEmptySpoolRequest:BaseRequest
+    {
+        /// <summary>
+        /// 巷道
+        /// </summary>
+        public int Tunnel { get; set; }
+        /// <summary>
+        /// 出库位置
+        /// </summary>
+        public string OutEndPostion { get; set; }
+    }
+}

+ 25 - 0
wms.dto/request/hj/ApplyStockInLocRequest.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class ApplyStockInLocRequest:BaseRequest
+    {
+        /// <summary>
+        /// WMS任务号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public int TaskNum { get; set; }
+        /// <summary>
+        /// 巷道号
+        /// </summary>
+        public int TunnelNum { get; set; }
+        /// <summary>
+        /// 取货地点设备编号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string PickUpEquipmentNo { get; set; }
+    }
+}

+ 46 - 0
wms.dto/request/hj/ApplyStockInRequest.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request
+{
+    public class ApplyStockInRequestDto
+    {
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        public int TaskNum { get; set; }
+        /// <summary>
+        /// 巷道号
+        /// </summary>
+        public int TunnelNum { get; set; }
+        /// <summary>
+        /// 取货地点设备编号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string PickUpEquipmentNo { get; set; }
+
+    }
+
+    public class ApplyStockInRequest
+    {
+        public long MaterialId { get; set; }
+        public long MaterialGroupId { get; set; }
+        public LocationType LocationType { get; set; }
+        public int Tunnel { get; set; }
+        public int Size { get; set; }
+        public string Grade { get; set; }
+        public long BatchId { get; set; }
+        public string MaterialState { get; set; }
+        public long WarehouseId { get; set; }
+        /// <summary>
+        /// 是否移库
+        /// </summary>
+        public bool IsMove { get; set; } = false;
+
+        public int IsAlreadyProduct { get; set; } = 0;
+        public string ShelfCode { get; set; }
+        public decimal Diameter { get; set; }
+    }
+}

+ 17 - 0
wms.dto/request/hj/ApplyStockOutRequest.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+using wms.dto.attribute;
+
+namespace wms.dto.request
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class ApplyStockOutRequest
+    {
+        
+
+    }
+}

+ 40 - 0
wms.dto/request/hj/ApplyStockOutTaskRequest.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class ApplyStockOutTaskRequest
+    {
+
+        /// <summary>
+        /// 出库位置
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string OutEndPostion { get; set; }
+        /// <summary>
+        /// 出库类型(0.无效参数;1.物料出库;2.空托盘出库;)
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public int OutType { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WarehouseCode { get; set; }
+
+        /// <summary>
+        /// 巷道
+        /// </summary>
+        public string Tunnel { get; set; }
+        /// <summary>
+        /// 备用
+        /// </summary>
+        public string Memo1 { get; set; }
+        /// <summary>
+        /// 备用
+        /// </summary>
+        public string Memo2 { get; set; }
+    }
+}

+ 62 - 0
wms.dto/request/hj/CopperLineAgvTaskStockInToIWmsRequest.cs

@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class CopperLineAgvTaskStockInToIWmsRequest
+    {
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string matCode { get; set; }
+        /// <summary>
+        /// 工作站编号
+        /// </summary>
+        public string workAreaCode { get; set; }
+        /// <summary>
+        /// 空/满工字轮标记(满工字轮:1空工字轮:0)
+        /// </summary>
+        public string outSpoolFull { get; set; }
+        /// <summary>
+        /// 取空补满标记
+        /// </summary>
+        public bool intoEmpty { get; set; }
+        /// <summary>
+        /// 湿拉出库标记
+        /// </summary>
+        public string wetOut { get; set; }
+        /// <summary>
+        /// 湿拉退料出库标记
+        /// </summary>
+        public string wetOutReturn { get; set; }
+        /// <summary>
+        /// 改手盘标记
+        /// </summary>
+        public string isSurplus { get; set; }
+        /// <summary>
+        /// 返工标记
+        /// </summary>
+        public string isRework { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string matNo { get; set; }
+        /// <summary>
+        /// RFID号
+        /// </summary>
+        public string spoolNo { get; set; }
+        /// <summary>
+        /// 质量状态标记
+        /// </summary>
+        public string gradeCode { get; set; }
+        /// <summary>
+        /// 快投标记
+        /// </summary>
+        public string matFast { get; set; }
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        public string taskNo { get; set; }
+    }
+}

+ 82 - 0
wms.dto/request/hj/CopperLineAgvTaskStockOutToIWmsRequest.cs

@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class CopperLineAgvTaskStockOutToIWmsRequest
+    {
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string matCode { get; set; }
+        /// <summary>
+        /// 工作站编号(机台号、立库点位编号)
+        /// </summary>
+        public string wbCode { get; set; }
+        /// <summary>
+        /// 空/满工字轮入库标记(空工字轮:0,满工字轮:1,半工字轮:2)
+        /// </summary>
+        public string inSpoolFull { get; set; }
+        /// <summary>
+        /// 取满补空标记
+        /// </summary>
+        public bool getOutEmpty { get; set; }
+        /// <summary>
+        /// 湿拉上线标记
+        /// </summary>
+        public bool wetInto { get; set; }
+        /// <summary>
+        /// 湿拉特殊上线标记
+        /// </summary>
+        public bool wetIntoSpec { get; set; }
+        /// <summary>
+        /// 湿拉退料入库标记
+        /// </summary>
+        public bool wetIntoReturn { get; set; }
+        /// <summary>
+        /// 湿拉特殊上线点位号
+        /// </summary>
+        public string wetSpecWbCode { get; set; }
+        /// <summary>
+        /// 改手盘标记
+        /// </summary>
+        public string isSurplus { get; set; }
+        /// <summary>
+        /// 返工标记
+        /// </summary>
+        public string isRework { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string matNo { get; set; }
+        /// <summary>
+        /// RFID号
+        /// </summary>
+        public string spoolNo { get; set; }
+        /// <summary>
+        /// 质量状态标记
+        /// </summary>
+        public string gradeCode { get; set; }
+        /// <summary>
+        /// 快投标记
+        /// </summary>
+        public string matFast { get; set; }
+        /// <summary>
+        /// 长度
+        /// </summary>
+        public string orderProcessLenOut { get; set; }
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        public string taskNo { get; set; }
+        /// <summary>
+        /// 退料原因
+        /// </summary>
+        public string returnDesc { get; set; }
+        /// <summary>
+        /// 是否锁定
+        /// </summary>
+        public string lockFlag { get; set; }
+    }
+}

+ 22 - 0
wms.dto/request/hj/CopperLineAgvTaskToRcsRequest.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class CopperLineAgvTaskToRcsRequest
+    {
+        /// <summary>
+        /// RFID
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 起点位置
+        /// </summary>
+        public string StartPos { get; set; }
+        /// <summary>
+        /// 目标点位置
+        /// </summary>
+        public string EndPos { get; set; }
+    }
+}

+ 87 - 0
wms.dto/request/hj/CopperLineRequest.cs

@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request
+{
+    /// <summary>
+    /// 镀铜补空/取满指令请求实体(包含550工字轮)
+    /// </summary>
+    public class CopperLineRequest:BaseRequest
+    {
+        /// <summary>
+        /// 机台号(AGV站台号)
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WbCode { get; set; }
+        /// <summary>
+        /// 指令类型(1补空;2取满;3补空取满;4:550工字轮;5:空轮初始化)
+        /// </summary>
+        public int BusType { get; set; }
+        /// <summary>
+        /// 满轮RFID
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string? MatBarCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string? MatCode { get; set; }
+        /// <summary>
+        /// 生产日期
+        /// </summary>
+        public string? ProductDate { get; set; }
+        /// <summary>
+        /// 是否快投
+        /// </summary>
+        public string? IsFast { get; set; }
+        /// <summary>
+        /// 工字轮类型
+        /// </summary>
+        public string? SpoolType { get; set; }
+        /// <summary>
+        /// 产线编码
+        /// </summary>
+        public string? ProductCode { get; set; }
+        /// <summary>
+        /// 订单号
+        /// </summary>
+        public string? OrderCode { get; set; }
+        /// <summary>
+        /// 工序订单号
+        /// </summary>
+        public string? WorkOrder { get; set; }
+        /// <summary>
+        /// 质量等级
+        /// </summary>
+        public string? Grade { get; set; }
+        /// <summary>
+        /// 长度
+        /// </summary>
+        public decimal? Length { get; set; }
+        /// <summary>
+        /// 更新时间
+        /// </summary>
+        public string? UpdatedTime { get; set; }
+        /// <summary>
+        /// 返工标记
+        /// </summary>
+        public string? IsRework { get; set; }
+
+    }
+
+    public class CopperLineNewRequest
+    {
+        public List<CopperLineRequest> data { get; set; }
+    }
+}

+ 53 - 0
wms.dto/request/hj/CopperLineStockInFeedBackRequest.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 镀铜满轮入库/550工字轮入库反馈请求
+    /// </summary>
+    public class CopperLineStockInFeedBackRequest
+    {
+        public List<CopperLineStockInFeedBackItem> ListInfo { get; set; }
+    }
+    public class CopperLineStockInFeedBackItem
+    {
+        /// <summary>
+        /// 满轮RFID值
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 总重量
+        /// </summary>
+        public decimal TolWeight { get; set; }
+        /// <summary>
+        /// 净重
+        /// </summary>
+        public decimal NetWeight { get; set; }
+        /// <summary>
+        /// 皮重
+        /// </summary>
+        public decimal TareWeight { get; set; }
+        /// <summary>
+        /// 货位编码
+        /// </summary>
+        public string LocCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 仓库名称
+        /// </summary>
+        public string WareName { get; set; }
+    }
+}

+ 28 - 0
wms.dto/request/hj/CreateMoveWcsTaskRequest.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class CreateMoveWcsTaskRequest
+    {
+        /// <summary>
+        /// 容器条码
+        /// </summary>
+        public string ContGrpBarCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WarehouseCode { get; set; }
+        public decimal Qty { get; set; }
+
+        /// <summary>
+        /// 目标点位
+        /// </summary>
+        public string EndCellNo { get; set; }
+        public string Tunnel { get; set; }
+        public string FromCellNo { get; set; }
+        public string BusType { get; set; }
+
+    }
+}

+ 40 - 0
wms.dto/request/hj/CreateStockInWcsTaskRequest.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request
+{
+    public class CreateStockInWcsTaskRequest
+    {
+        /// <summary>
+        /// 容器条码
+        /// </summary>
+        public string ContGrpBarCode { get; set; }
+        /// <summary>
+        /// 主盘主表ID
+        /// </summary>
+        public long ContGrpId { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WarehouseCode { get; set; }
+        public decimal Qty { get; set; }
+        /// <summary>
+        /// 单据号
+        /// </summary>
+        public string DocCode { get; set; }
+        public long DocId { get; set; }
+        /// <summary>
+        /// 设备编号
+        /// </summary>
+        public string EquCode { get; set; }
+        /// <summary>
+        /// 业务类型
+        /// </summary>
+        public string BusType { get; set; }
+        public int Floor { get; set; }
+        public string ProLine { get; set; }
+        public string MatCode { get; set; }
+        public string MaterialCode { get; set; }
+    }
+}

+ 65 - 0
wms.dto/request/hj/CreateStockOutWcsTaskRequest.cs

@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class CreateStockOutWcsTaskRequest
+    {
+        /// <summary>
+        /// 容器条码
+        /// </summary>
+        public string ContGrpBarCode { get; set; }
+        /// <summary>
+        /// 主盘主表ID
+        /// </summary>
+        public long ContGrpId { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WarehouseCode { get; set; }
+        public decimal Qty { get; set; }
+
+        /// <summary>
+        /// 设备编号
+        /// </summary>
+        public string EquCode { get; set; }
+        /// <summary>
+        /// 业务类型
+        /// </summary>
+        public TaskBusType BusType { get; set; }
+        public int Floor { get; set; }
+        public string ProLine { get; set; }
+        public string Tunnel { get; set; }
+        public string CellNo { get; set; }
+
+        public string WorkBench { get; set; }
+
+
+        /// <summary> 
+        /// MatCode
+        /// </summary> 
+        public string MatCode { get; set; }
+
+        /// <summary> 
+        /// InvBarCode
+        /// </summary> 
+        public string InvBarCode { get; set; }
+        /// <summary> 
+        /// IsFast
+        /// </summary> 
+        public bool IsFast { get; set; }
+        /// <summary> 
+        /// Grade
+        /// </summary> 
+        public string Grade { get; set; }
+        /// <summary> 
+        /// IsSurplus
+        /// </summary> 
+        public bool IsSurplus { get; set; }
+        /// <summary> 
+        /// IsRework
+        /// </summary> 
+        public bool IsRework { get; set; }
+    }
+}

+ 39 - 0
wms.dto/request/hj/DetailCodeRequest.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class DetailCodeRequest
+    {
+        public string Code { get; set; }
+        public string? Cell { get; set; }
+    }
+    public class WebErrorRequest
+    {
+        public string TaskNo { get; set; }
+    }
+    public class DetailCodeRequestdto
+    {
+        public string Code { get; set; }
+        public int State { get; set; }
+    }
+    /// <summary>
+    /// 货位数据互换
+    /// </summary>
+    public class DataSwapCellRequest
+    {
+        /// <summary>
+        /// 起始货位
+        /// </summary>
+        [Required(ErrorMessage = "{0} 起始货位不可为空")]
+        public string StatEquip { get; set; }
+        /// <summary>
+        /// 目标货位
+        /// </summary>
+        [Required(ErrorMessage = "{0} 目标货位不可为空")]
+        public string EndEquip { get; set; }
+    }
+}

+ 11 - 0
wms.dto/request/hj/DetailRequest2Str.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class DetailRequest2Str
+    {
+        public string Id { get; set; } = "0";
+    }
+}

+ 14 - 0
wms.dto/request/hj/GetBarCodeInfoRequest.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 条码信息查询请求
+    /// </summary>
+    public class GetBarCodeInfoRequest
+    {
+        public List<string> BarCodeList { get; set; }
+    }
+}

+ 35 - 0
wms.dto/request/hj/GetCurStockListRequest.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 实时库存查询请求实体
+    /// </summary>
+    public class GetCurStockListRequest
+    {
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 物料名称
+        /// </summary>
+        public string MatName { get; set; }
+        /// <summary>
+        /// 请求条数
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public int ReqCount { get; set; }
+        /// <summary>
+        /// 当前页
+        /// </summary>
+        public int PageIndex { get; set; }
+        /// <summary>
+        /// 每页条数
+        /// </summary>
+        public int PageSize { get; set; }
+    }
+}

+ 16 - 0
wms.dto/request/hj/GetSysJobListRequest.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class GetSysJobListRequest:BaseRequest
+    {
+        public string Code { get; set; } = "";
+        public string Name { get; set; } = "";
+        public string JobGroupName { get; set; } = "";
+        public string JobType { get; set; } = "";
+        public string TriggerName { get; set; } = "";
+        public string CronExpression { get; set; } = "";
+    }
+}

+ 10 - 0
wms.dto/request/hj/GetTunnelEmptyConCountRequest.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class GetTunnelEmptyConCountRequest
+    {
+    }
+}

+ 24 - 0
wms.dto/request/hj/GetTunnelListRequest.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class GetTunnelListRequest
+    {
+        /// <summary>
+        /// WMS任务号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public int TaskNum { get; set; }
+        /// <summary>
+        /// 备用
+        /// </summary>
+        public string Memo1 { get; set; }
+        /// <summary>
+        /// 备用
+        /// </summary>
+        public string Memo2 { get; set; }
+    }
+}

+ 104 - 0
wms.dto/request/hj/HjMaterialStockInRequest.cs

@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class HjMaterialStockInRequest
+    {
+        /// <summary>
+        /// 楼层
+        /// </summary>
+        public int Floor { get; set; }
+
+        /// <summary>
+        /// 机台号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WbCode { get; set; }
+        /// <summary>
+        /// 指令类型(1补空;2取满;3补空取满;4:550工字轮)----镀铜入库
+        /// 指令类型 1退料2余料3空轮----湿拉退料
+        /// </summary>
+        public int BusType { get; set; }
+        /// <summary>
+        /// 满轮RFID
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 生产日期
+        /// </summary>
+        public string ProductDate { get; set; }
+        /// <summary>
+        /// 是否快投
+        /// </summary>
+        public string IsFast { get; set; }
+        /// <summary>
+        /// 工字轮类型
+        /// </summary>
+        public string SpoolType { get; set; }
+        /// <summary>
+        /// 产线编码
+        /// </summary>
+        public string ProductCode { get; set; }
+        /// <summary>
+        /// 订单号
+        /// </summary>
+        public string OrderCode { get; set; }
+        /// <summary>
+        /// 工序订单号
+        /// </summary>
+        public string WorkOrder { get; set; }
+        /// <summary>
+        /// 质量等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 长度
+        /// </summary>
+        public decimal Length { get; set; }
+        /// <summary>
+        /// 更新时间
+        /// </summary>
+        public string UpdatedTime { get; set; }
+        /// <summary>
+        /// 返工标记
+        /// </summary>
+        public string IsRework { get; set; }
+ 
+        /// <summary>
+        /// 起始点位 指令类型1,2时必传
+        /// </summary>
+        public string StartLoc { get; set; }
+ 
+        /// <summary>
+        /// 退料原因 连断/夹丝/锈蚀;指令类型1时必传
+        /// </summary>
+        public string Reason { get; set; }
+ 
+        /// <summary>
+        /// 是否锁定
+        /// </summary>
+        public string IsLock { get; set; }
+        /// <summary>
+        /// 数量
+        /// </summary>
+        public decimal Qty { get; set; }
+
+    }
+}

+ 40 - 0
wms.dto/request/hj/MoveStockFeedBackRequest.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 移库货位上报MES请求
+    /// </summary>
+    public class MoveStockFeedBackRequest
+    {
+        /// <summary>
+        /// 列表
+        /// </summary>
+        public List<MoveStockFeedBackRequestItem> ListInfo { get; set; }
+        public string WareCode { get; set; }
+    }
+    public class MoveStockFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// RFID值
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 起点货位
+        /// </summary>
+        public string StartLoc { get; set; }
+        /// <summary>
+        /// 目标货位
+        /// </summary>
+        public string EndLoc { get; set; }
+        public string WareCode { get; set; }
+
+
+    }
+}

+ 44 - 0
wms.dto/request/hj/RfidCheckDiffRequest.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 复核异常上报请求实体
+    /// </summary>
+    public class RfidCheckDiffRequest
+    {
+        /// <summary>
+        /// RFID
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string RFID { get; set; }
+        /// <summary>
+        /// OrgRFID
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string OrgRFID { get;set; }
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string TaskNo { get; set; }
+        /// <summary>
+        /// 异常信息
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string ErrMsg { get; set; }
+        /// <summary>
+        /// 异常点位
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string ErrLoc { get; set; }
+        /// <summary>
+        /// 起始点位
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string StartLoc { get; set; }
+    }
+}

+ 39 - 0
wms.dto/request/hj/SpecialPickMaterApplyRequest.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 特殊出库领料申请请求实体
+    /// </summary>
+    public class SpecialPickMaterApplyRequest:BaseRequest
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// RFID值
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string RFID { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string MatCode { get; set; }
+        /// <summary>
+        /// 目标位号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WbCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+    }
+}

+ 29 - 0
wms.dto/request/hj/SpecialPickMaterFeedBackRequest.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 特殊出库领料反馈请求
+    /// </summary>
+    public class SpecialPickMaterFeedBackRequest
+    {
+       public List<SpecialPickMaterFeedBackRequestItem> ListInfo { get; set; }
+    }
+    public class SpecialPickMaterFeedBackRequestItem
+    {
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// RFID值
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string MatCode { get; set; }
+    }
+}

+ 16 - 0
wms.dto/request/hj/SrmPickOutCompletedRequest.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class SrmPickOutCompletedRequest
+    {
+        /// <summary>
+        /// WMS任务号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public int TaskNum { get; set; }
+    }
+}

+ 50 - 0
wms.dto/request/hj/StockChangeFeedBackRequest.cs

@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 库存改判反馈请求实体
+    /// </summary>
+    public class StockChangeFeedBackRequest
+    {
+        /// <summary>
+        /// 单号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 改判结果列表
+        /// </summary>
+        public List<StockChangeRequestItem> ListInfo { get; set; } 
+    }
+    //public class ListInfoItem
+    //{
+    //    /// <summary>
+    //    /// RFID值
+    //    /// </summary>
+    //    public string RFID { get; set; }
+    //    /// <summary>
+    //    /// 材料号
+    //    /// </summary>
+    //    public string MatBarCode { get; set; }
+    //    /// <summary>
+    //    /// 改判状态
+    //    /// </summary>
+    //    public string State { get; set; }
+    //    /// <summary>
+    //    /// 等级
+    //    /// </summary>
+    //    public string Grade { get; set; }
+    //    /// <summary>
+    //    /// 原因
+    //    /// </summary>
+    //    public string Reason { get; set; }
+    //    /// <summary>
+    //    /// 仓库编码
+    //    /// </summary>
+    //    public string WareCode { get; set; }
+    //}
+}

+ 63 - 0
wms.dto/request/hj/StockChangeRequest.cs

@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    /// <summary>
+    /// 库存改判请求实体
+    /// </summary>
+    public class StockChangeRequest:BaseRequest
+    {
+        /// <summary>
+        /// 单号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string BillCode { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 改判信息列表
+        /// </summary>
+        public List<StockChangeRequestItem> ListInfo { get; set; } 
+    }
+    public class StockChangeRequestItem
+    {
+        /// <summary>
+        /// RFID值
+        /// </summary>
+        public string RFID { get; set; }
+        /// <summary>
+        /// 材料号
+        /// </summary>
+        public string MatBarCode { get; set; }
+        /// <summary>
+        /// 改判状态
+        /// </summary>
+        public string State { get; set; }
+        /// <summary>
+        /// 等级
+        /// </summary>
+        public string Grade { get; set; }
+        /// <summary>
+        /// 原因
+        /// </summary>
+        public string Reason { get; set; }
+        /// <summary>
+        /// 仓库编码
+        /// </summary>
+        public string WareCode { get; set; }
+        /// <summary>
+        /// 改判结果(反馈时使用)
+        /// </summary>
+        public string ResState { get; set; }
+        /// <summary>
+        /// 原因 (反馈时使用)
+        /// </summary>
+        public string ResDesc { get; set; }
+    }
+}

+ 11 - 0
wms.dto/request/hj/SyncMaterRequest.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class SyncMaterRequest
+    {
+
+    }
+}

+ 14 - 0
wms.dto/request/hj/SysJobDto.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class SysJobDto
+    {
+        public string JobName { get; set; }
+        public string JobDesc { get; set; }
+        public string JobStatus { get; set; }
+        public string JobGroup { get; set; }
+    }
+}

+ 17 - 0
wms.dto/request/hj/TunnelRequest.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class TunnelRequest
+    {
+        public string WareHouse { get; set; }
+        public string Tunnel { get; set; }
+        public string type { get; set; }
+    }
+    public class UpdateTunStatu : TunnelRequest
+    {
+        public int statu { get; set; }
+    }
+}

+ 19 - 0
wms.dto/request/hj/TunnelStatusEntity.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class TunnelStatusEntity
+    {
+        public string Code { get; set; }
+        public string Name { get; set; }
+        public string Tunnel { get; set; }
+        public string Statu { get; set; }
+        public string StatuName { get; set; }
+        public string Remark { get; set; }
+        public DateTime CreateTime { get; set; }
+        public DateTime UpdateTime { get; set; }
+
+    }
+}

+ 42 - 0
wms.dto/request/hj/WcsTaskCallBackRequest.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace wms.dto.request
+{
+    public class WcsTaskCallBackRequest
+    {
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string TaskNum { get; set; }
+        /// <summary>
+        /// 任务状态(0.未下发;1.未执行;2~98.WCS任务进程状态,数据存入缓存)
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public int TaskStatus { get; set; }
+        /// <summary>
+        /// WCS操作人名称
+        /// </summary>
+        [Required(ErrorMessage = "{0} 不可为空")]
+        public string WCSUpdateName { get; set; }
+        /// <summary>
+        /// 当前地址
+        /// </summary>
+        public string CurPosition { get; set; }
+        /// <summary>
+        /// 下个地址
+        /// </summary>
+        public string NextPosition { get; set; }
+        /// <summary>
+        /// 备用
+        /// </summary>
+        public string Memo1 { get; set; }
+        /// <summary>
+        /// 备用
+        /// </summary>
+        public string Memo2 { get; set; }
+    }
+}

+ 22 - 0
wms.dto/request/hj/WcsUploadInfoRequest.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace wms.dto.request.hj
+{
+    public class WcsUploadInfoRequest
+    {
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        public int TaskCode { get; set; }
+        /// <summary>
+        /// 重量
+        /// </summary>
+        public decimal Weight { get; set; }
+        /// <summary>
+        /// RFID
+        /// </summary>
+        public string RFID { get; set; }
+    }
+}

Some files were not shown because too many files changed in this diff