|
@@ -29,6 +29,7 @@ using TEAMModelBI.Models;
|
|
|
using TEAMModelBI.DI.BIAzureStorage;
|
|
|
using TEAMModelOS.SDK;
|
|
|
using TEAMModelOS.SDK.Context.BI;
|
|
|
+using TEAMModelOS.SDK.Context.Constant;
|
|
|
|
|
|
namespace TEAMModelBI.Controllers.BISchool
|
|
|
{
|
|
@@ -326,10 +327,15 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
//保存操作记录
|
|
|
//await _azureStorage.SaveBILog("school-batchAdd", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
|
|
|
await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "school-batchAdd", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
|
|
|
- if (schools.Count > 0 || userScs.Count > 0 || cutArea.Count >0)
|
|
|
- return Ok(new { state = 201, message = "已有部分学校批量创建成功;学校已经重复/或者学校信息有误!请检查学校信息!", schools, userScs });
|
|
|
+ if (schools.Count == foundSchools.biSchools.Count || userScs.Count == foundSchools.biSchools.Count)
|
|
|
+ return Ok(new { state = RespondCode.CreateFailed, message = "已有部分学校批量创建成功;学校已经重复/或者学校信息有误!请检查学校信息!", schools, userScs });
|
|
|
else
|
|
|
- return Ok(new { state = 200, message = "批量创校已全部完成" });
|
|
|
+ {
|
|
|
+ if (schools.Count > 0 || userScs.Count > 0 || cutArea.Count > 0)
|
|
|
+ return Ok(new { state = RespondCode.Created, message = "已有部分学校批量创建成功;学校已经重复/或者学校信息有误!请检查学校信息!", schools, userScs });
|
|
|
+ else
|
|
|
+ return Ok(new { state = RespondCode.Ok, message = "批量创校已全部完成" });
|
|
|
+ }
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|