|
@@ -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();
|