فهرست منبع

调整请求方式

heteng 2 سال پیش
والد
کامیت
923420c1ac

+ 1 - 1
MicroServices/Business/Business.Application.Contracts/ResourceExamineManagement/IResourceExamineAppService.cs

@@ -17,7 +17,7 @@ namespace Business.ResourceExamineManagement
         /// </summary>
         /// <param name="workOrds"></param>
         /// <returns></returns>
-        Task<string> ProductionSchedule(List<string> workOrds);
+        Task<string> ProductionSchedule(string workOrds);
 
         /// <summary>
         /// ×ÊÔ´¼ì²é

+ 10 - 8
MicroServices/Business/Business.Application/ResourceExamineManagement/ResourceExamineAppService.cs

@@ -540,6 +540,9 @@ namespace Business.ResourceExamineManagement
         /// <exception cref="NotImplementedException"></exception>
         public async Task<string> ReceiveResult(ResourceCheckInputDto input)
         {
+            var aa = GetProductStructure(new List<string> { "1.SD1.D.0056-F", "1.SD1.D.0059" });
+            return "OK";
+
             //资源检查入参全局变量赋值
             param.tenantId = input.tenantId;
             param.factoryId = input.factoryId;
@@ -2384,11 +2387,12 @@ namespace Business.ResourceExamineManagement
         /// <summary>
         /// 生产排产
         /// </summary>
-        /// <param name="workOrds"></param>
+        /// <param name="workOrd"></param>
         /// <returns></returns>
         /// <exception cref="NotImplementedException"></exception>
-        public async Task<string> ProductionSchedule(List<string> workOrds)
+        public async Task<string> ProductionSchedule(string workOrd)
         {
+            List<string> workOrds = workOrd.Split(",").ToList();
             if (workOrds.Count() == 0)
             {
                 return "";
@@ -2527,14 +2531,12 @@ namespace Business.ResourceExamineManagement
             //非虚拟件
             var notPhantoms = chdStructures.Where(p => p.StructureType.ToUpper() != "X").ToList();
             //存在非虚拟件
-            if (notPhantoms.Count() > 0)
+            foreach (var item in notPhantoms)
             {
-                notPhantoms.ForEach(p =>
-                {
-                    p.ParentItem = parentItem;
-                });
-                rtnStructures.AddRange(notPhantoms);
+                item.ParentItem = parentItem;
             }
+            rtnStructures.AddRange(notPhantoms);
+
             //虚拟件
             var phantoms = chdStructures.Where(p => p.StructureType.ToUpper() == "X").ToList();
             if (phantoms.Count() > 0)

+ 1 - 1
MicroServices/Business/Business.HttpApi/Controllers/ResourceExamineController.cs

@@ -33,7 +33,7 @@ namespace Business.Controllers
         /// <returns></returns>
         [HttpPost]
         [Route("productionschedule")]
-        public Task<string> ProductionSchedule(List<string> workOrds)
+        public Task<string> ProductionSchedule(string workOrds)
         {
             return _ResourceExamineAppService.ProductionSchedule(workOrds);
         }