|
|
@ -1,5 +1,5 @@ |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using SqlSugar.Extensions; |
|
|
|
using System.IO; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
namespace Tiobon.Core.Services; |
|
|
@ -4242,7 +4242,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case "F_ESS_ExternalTrainApply_Boltone": //外训申请_宝连通 |
|
|
|
case "F_ESS_ExternalTrainApplyOrder_Boltone": //外训申请_宝连通 |
|
|
|
|
|
|
|
|
|
|
|
#region 写入数据,并判断是否有错误 |
|
|
|
#region 写入数据,并判断是否有错误 |
|
|
|
switch (param.doType) |
|
|
|
switch (param.doType) |
|
|
@ -4253,15 +4253,59 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
#region 写入数据,并判断是否有错误 |
|
|
|
#region 写入数据,并判断是否有错误 |
|
|
|
string json = param.jsonParam.ToString(); |
|
|
|
string json = param.jsonParam.ToString(); |
|
|
|
var dict = JsonHelper.JsonToObj<Ghre_ExternalTrainApplyOrder_Boltone>(json); |
|
|
|
var dict = JsonHelper.JsonToObj<Ghre_ExternalTrainApplyOrder_Boltone>(json); |
|
|
|
|
|
|
|
var dict1 = JsonHelper.JsonToObj<Ghre_ExternalTrainApplyOrder_BoltoneBase>(json); |
|
|
|
//dict.RequestNo = await GenerateContinuousSequence("Ghrh_HumanRequest", "RequestNo", "R"); |
|
|
|
//dict.RequestNo = await GenerateContinuousSequence("Ghrh_HumanRequest", "RequestNo", "R"); |
|
|
|
id = await Db.Insertable(dict).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
id = await Db.Insertable(dict).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
|
|
|
|
|
|
|
|
sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghre_ExternalTrainApplyOrder_Boltone WHERE Id !='{id}'"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghre_ExternalTrainApplyOrder_Boltone WHERE Id !='{id}' and len(Id) !=19"; |
|
|
|
var id1 = await Db.Ado.GetLongAsync(sql); |
|
|
|
var id1 = await Db.Ado.GetLongAsync(sql); |
|
|
|
sql = $"UPDATE Ghre_ExternalTrainApplyOrder_Boltone SET Id={id1} WHERE Id ='{id}'"; |
|
|
|
sql = $"UPDATE Ghre_ExternalTrainApplyOrder_Boltone SET Id={id1} WHERE Id ='{id}'"; |
|
|
|
await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
|
|
|
|
|
|
|
id = id1; |
|
|
|
id = id1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dict1.Attachments.Any()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var ids = dict1.Attachments.Select(x => x.AttachmentID).ToList(); |
|
|
|
|
|
|
|
await Db.Updateable<Ghre_Attachment>() |
|
|
|
|
|
|
|
.SetColumns(it => new Ghre_Attachment() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
TableName = "Ghre_ExternalTrainApplyOrder_Boltone", |
|
|
|
|
|
|
|
TableKeyID = id.ObjToInt(), |
|
|
|
|
|
|
|
Reverse1 = "Attachments" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.Where(it => ids.Contains(it.Id)) |
|
|
|
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (dict1.ContractAttachments.Any()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var ids = dict1.ContractAttachments.Select(x => x.AttachmentID).ToList(); |
|
|
|
|
|
|
|
await Db.Updateable<Ghre_Attachment>() |
|
|
|
|
|
|
|
.SetColumns(it => new Ghre_Attachment() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
TableName = "Ghre_ExternalTrainApplyOrder_Boltone", |
|
|
|
|
|
|
|
TableKeyID = id.ObjToInt(), |
|
|
|
|
|
|
|
Reverse1 = "ContractAttachments" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.Where(it => ids.Contains(it.Id)) |
|
|
|
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dict1.ExternalAttachments.Any()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var ids = dict1.ExternalAttachments.Select(x => x.AttachmentID).ToList(); |
|
|
|
|
|
|
|
await Db.Updateable<Ghre_Attachment>() |
|
|
|
|
|
|
|
.SetColumns(it => new Ghre_Attachment() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
TableName = "Ghre_ExternalTrainApplyOrder_Boltone", |
|
|
|
|
|
|
|
TableKeyID = id.ObjToInt(), |
|
|
|
|
|
|
|
Reverse1 = "ExternalAttachments" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.Where(it => ids.Contains(it.Id)) |
|
|
|
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|