CrazyIter_Bin 1 rok temu
rodzic
commit
6b1cfe7ec3

+ 62 - 63
TEAMModelBI/Controllers/BINormal/BatchAreaController.cs

@@ -598,31 +598,27 @@ namespace TEAMModelBI.Controllers.BINormal
                 #endregion
 
                 //执行复制操作
-                BatchCopyFile batchCopyFile = new BatchCopyFile();
-                batchCopyFile.blobCntr = "teammodelos";
-                batchCopyFile.oldFileName = $"{oldStandard}";
-                batchCopyFile.newFileName = $"{standard}";
-                batchCopyFile.tmdid = $"{_tmdId}";
-                batchCopyFile.tmdIds = new List<string> { $"{ _tmdId}" };
-                batchCopyFile.codeKey = partitionCode;
-                batchCopyFile.tmdName = $"{_tmdName}";
-                var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
-                messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
-                //var activeTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
-
-                try
-                {
-                    //await  _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);
-                    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);
-                }
-                catch (Exception)
-                {
-                    return Ok(new { state = 201, msg = "能力点复制成功,复制能力点的文件失败," });
-                }
- 
-
-            
-              
+                //去除新建区,复制能力点文件
+                //BatchCopyFile batchCopyFile = new BatchCopyFile();
+                //batchCopyFile.blobCntr = "teammodelos";
+                //batchCopyFile.oldFileName = $"{oldStandard}";
+                //batchCopyFile.newFileName = $"{standard}";
+                //batchCopyFile.tmdid = $"{_tmdId}";
+                //batchCopyFile.tmdIds = new List<string> { $"{ _tmdId}" };
+                //batchCopyFile.codeKey = partitionCode;
+                //batchCopyFile.tmdName = $"{_tmdName}";
+                //var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
+
+                //messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
+
+                //try
+                //{
+                //    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);
+                //}
+                //catch (Exception)
+                //{
+                //    return Ok(new { state = 201, msg = "能力点复制成功,复制能力点的文件失败," });
+                //}
                 //保存操作记录
                 //await _azureStorage.SaveBILog("area-add", $"{_tmdName}【{_tmdId}】已操作创区功能模块:{name},当前标准【{standard}】,复制的微能力点:{tempStandard}", _dingDing, httpContext: HttpContext);
                 await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "area-add", $"{_tmdName}【{_tmdId}】已操作创区功能模块:{name},当前标准【{standard}】,复制的微能力点:{tempStandard}", _dingDing, httpContext: HttpContext);
@@ -953,25 +949,27 @@ namespace TEAMModelBI.Controllers.BINormal
                 _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, "copy-file_area", Constant.NotifyType_IES5_Management, new Dictionary<string, object> { { "tmdname", $"{_tmdName}" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
 
                 //执行复制操作
-                BatchCopyFile batchCopyFile = new();
-                batchCopyFile.blobCntr = "teammodelos";
-                batchCopyFile.oldFileName = $"{_newStandard}";
-                batchCopyFile.newFileName = $"{_oldStandard}";
-                batchCopyFile.tmdid = $"{_tmdId}";
-                batchCopyFile.tmdIds = new List<string> { $"{ _tmdId}" };
-                batchCopyFile.codeKey = partitionCode;
-                batchCopyFile.tmdName = $"{_tmdName}";
-                var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
-                messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");  
-                try
-                {
-                    //await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制  单一
-                    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制
-                }
-                catch (Exception)
-                {
-                    return Ok(new { state = 201 ,msg = "能力点复制成功,复制能力点的文件失败," });
-                }
+
+                //去除新建区,复制能力点文件
+                //BatchCopyFile batchCopyFile = new();
+                //batchCopyFile.blobCntr = "teammodelos";
+                //batchCopyFile.oldFileName = $"{_newStandard}";
+                //batchCopyFile.newFileName = $"{_oldStandard}";
+                //batchCopyFile.tmdid = $"{_tmdId}";
+                //batchCopyFile.tmdIds = new List<string> { $"{ _tmdId}" };
+                //batchCopyFile.codeKey = partitionCode;
+                //batchCopyFile.tmdName = $"{_tmdName}";
+                //var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
+                //messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");  
+                //try
+                //{
+                     
+                //    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制
+                //}
+                //catch (Exception)
+                //{
+                //    return Ok(new { state = 201 ,msg = "能力点复制成功,复制能力点的文件失败," });
+                //}
 
               
                 //保存操作记录
@@ -1287,25 +1285,26 @@ namespace TEAMModelBI.Controllers.BINormal
                         string partitionCode = "DelBeforeCopyAbility-mark";
 
                         //执行复制操作
-                        BatchCopyFile batchCopyFile = new();
-                        batchCopyFile.blobCntr = "teammodelos";
-                        batchCopyFile.oldFileName = $"{newstand.standard}";
-                        batchCopyFile.newFileName = $"{area.standard}";
-                        batchCopyFile.tmdid = $"{_tmdId}";
-                        batchCopyFile.tmdIds = new List<string> { $"{_tmdId}" };
-                        batchCopyFile.codeKey = partitionCode;
-                        batchCopyFile.tmdName = $"{_tmdName}";
-                        var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
-                        messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
-                        try
-                        {
-                            //await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制  单一
-                            await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制
-                        }
-                        catch (Exception)
-                        {
-                            return Ok(new { state = 201, msg = "能力点复制成功,复制能力点的文件失败," });
-                        }
+                        //去除新建区,复制能力点文件
+                        //BatchCopyFile batchCopyFile = new();
+                        //batchCopyFile.blobCntr = "teammodelos";
+                        //batchCopyFile.oldFileName = $"{newstand.standard}";
+                        //batchCopyFile.newFileName = $"{area.standard}";
+                        //batchCopyFile.tmdid = $"{_tmdId}";
+                        //batchCopyFile.tmdIds = new List<string> { $"{_tmdId}" };
+                        //batchCopyFile.codeKey = partitionCode;
+                        //batchCopyFile.tmdName = $"{_tmdName}";
+                        //var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
+                        //messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
+                        //try
+                        //{
+                        //    //await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制  单一
+                        //    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);  //先执行删除操作,在执行复制
+                        //}
+                        //catch (Exception)
+                        //{
+                        //    return Ok(new { state = 201, msg = "能力点复制成功,复制能力点的文件失败," });
+                        //}
                     }
 
                     StandardFile saveFile = new();

+ 20 - 21
TEAMModelBI/Controllers/RepairApi/InitialAreaController.cs

@@ -262,27 +262,26 @@ namespace TEAMModelBI.Controllers.RepairApi
                 }
 
                 //执行复制操作
-                BatchCopyFile batchCopyFile = new();
-                batchCopyFile.blobCntr = "teammodelos";
-                batchCopyFile.oldFileName = $"{area.standard}";
-                batchCopyFile.newFileName = $"{standard}";
-                batchCopyFile.tmdid = $"{_tmdId}";
-                batchCopyFile.tmdIds = new List<string> { $"{_tmdId}" };
-                batchCopyFile.codeKey = partitionCode;
-                batchCopyFile.tmdName = $"{_tmdName}";
-                var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
-                messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
-                //var activeTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
-
-                try
-                {
-                    await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);
-                    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);
-                }
-                catch (Exception)
-                {
-                    return Ok(new { state = 201, msg = "能力点复制成功,复制能力点的文件失败," });
-                }
+                //BatchCopyFile batchCopyFile = new();
+                //batchCopyFile.blobCntr = "teammodelos";
+                //batchCopyFile.oldFileName = $"{area.standard}";
+                //batchCopyFile.newFileName = $"{standard}";
+                //batchCopyFile.tmdid = $"{_tmdId}";
+                //batchCopyFile.tmdIds = new List<string> { $"{_tmdId}" };
+                //batchCopyFile.codeKey = partitionCode;
+                //batchCopyFile.tmdName = $"{_tmdName}";
+                //去除新建区,复制能力点文件
+                //var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
+                //messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
+                //try
+                //{
+                //    await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);
+                //    await serBusClient.SendMessageAsync(activeTask, messageBatchCopyFile);
+                //}
+                //catch (Exception)
+                //{
+                //    return Ok(new { state = 201, msg = "能力点复制成功,复制能力点的文件失败," });
+                //}
  
             }
 

+ 2 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs

@@ -334,6 +334,8 @@ namespace TEAMModelOS.SDK.Models
         ///  "name",   "phone",   "period",   "subject",  "school", "contestType",  "job"
         /// </summary>
         public string field { get; set; }
+
+        public string label { get; set; }
         /// <summary>
         /// text select radio checkbox  password  file  textarea
         /// </summary>