|
@@ -2139,7 +2139,8 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
{
|
|
{
|
|
DeleteUserId = dto.DeleteUserId,
|
|
DeleteUserId = dto.DeleteUserId,
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
- IsDel = 1
|
|
|
|
|
|
+ IsDel = 1,
|
|
|
|
+ Remark = $"公务出访-->删除"
|
|
})
|
|
})
|
|
.Where(x => x.OfficialDutyId == dto.Id)
|
|
.Where(x => x.OfficialDutyId == dto.Id)
|
|
.ExecuteCommandAsync();
|
|
.ExecuteCommandAsync();
|
|
@@ -2979,22 +2980,25 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
if (id > 0) {
|
|
if (id > 0) {
|
|
|
|
|
|
#region 新增(公务信息关联翻译人员) 关联信息
|
|
#region 新增(公务信息关联翻译人员) 关联信息
|
|
- var officialDutyLinkTranslators = new List<Grp_OfficialDutyLinkTranslator>();
|
|
|
|
- foreach (var officialDutyId in dto.officialDutyIdItem)
|
|
|
|
|
|
+
|
|
|
|
+ if (dto.officialDutyIdItem != null && dto.officialDutyIdItem.Length > 0)
|
|
{
|
|
{
|
|
- officialDutyLinkTranslators.Add(new Grp_OfficialDutyLinkTranslator()
|
|
|
|
|
|
+ var officialDutyLinkTranslators = new List<Grp_OfficialDutyLinkTranslator>();
|
|
|
|
+ foreach (var officialDutyId in dto.officialDutyIdItem)
|
|
{
|
|
{
|
|
- TranslatorId = id,
|
|
|
|
- OfficialDutyId = officialDutyId,
|
|
|
|
- CreateUserId = currUserInfo.UserId,
|
|
|
|
- Remark = $"翻译人员库-->添加"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (officialDutyLinkTranslators.Count > 0)
|
|
|
|
- {
|
|
|
|
- await _sqlSugar.Insertable(officialDutyLinkTranslators).ExecuteCommandAsync();
|
|
|
|
|
|
+ officialDutyLinkTranslators.Add(new Grp_OfficialDutyLinkTranslator()
|
|
|
|
+ {
|
|
|
|
+ TranslatorId = id,
|
|
|
|
+ OfficialDutyId = officialDutyId,
|
|
|
|
+ CreateUserId = currUserInfo.UserId,
|
|
|
|
+ Remark = $"翻译人员库-->添加"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (officialDutyLinkTranslators.Count > 0)
|
|
|
|
+ {
|
|
|
|
+ await _sqlSugar.Insertable(officialDutyLinkTranslators).ExecuteCommandAsync();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
#endregion
|
|
#endregion
|
|
_sqlSugar.CommitTran();
|
|
_sqlSugar.CommitTran();
|
|
return Ok(JsonView(true));
|
|
return Ok(JsonView(true));
|
|
@@ -3057,29 +3061,34 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
{
|
|
{
|
|
DeleteUserId = currUserInfo.UserId,
|
|
DeleteUserId = currUserInfo.UserId,
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
- IsDel = 1
|
|
|
|
|
|
+ IsDel = 1,
|
|
|
|
+ Remark = $"翻译人员库-->删除"
|
|
})
|
|
})
|
|
.Where(x => officialDutyLinkTranslatorIds.Contains(x.Id))
|
|
.Where(x => officialDutyLinkTranslatorIds.Contains(x.Id))
|
|
.ExecuteCommandAsync();
|
|
.ExecuteCommandAsync();
|
|
}
|
|
}
|
|
|
|
|
|
- //添加
|
|
|
|
- var officialDutyLinkTranslators = new List<Grp_OfficialDutyLinkTranslator>();
|
|
|
|
- foreach (var officialDutyId in dto.officialDutyIdItem)
|
|
|
|
|
|
+
|
|
|
|
+ if (dto.officialDutyIdItem != null && dto.officialDutyIdItem.Length > 0)
|
|
{
|
|
{
|
|
- officialDutyLinkTranslators.Add(new Grp_OfficialDutyLinkTranslator()
|
|
|
|
|
|
+ //添加
|
|
|
|
+ var officialDutyLinkTranslators = new List<Grp_OfficialDutyLinkTranslator>();
|
|
|
|
+ foreach (var officialDutyId in dto.officialDutyIdItem)
|
|
{
|
|
{
|
|
- TranslatorId = dto.Id,
|
|
|
|
- OfficialDutyId = officialDutyId,
|
|
|
|
- CreateUserId = currUserInfo.UserId,
|
|
|
|
- Remark = $"翻译人员库-->更新"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (officialDutyLinkTranslators.Count > 0)
|
|
|
|
- {
|
|
|
|
- await _sqlSugar.Insertable(officialDutyLinkTranslators).ExecuteCommandAsync();
|
|
|
|
|
|
+ officialDutyLinkTranslators.Add(new Grp_OfficialDutyLinkTranslator()
|
|
|
|
+ {
|
|
|
|
+ TranslatorId = dto.Id,
|
|
|
|
+ OfficialDutyId = officialDutyId,
|
|
|
|
+ CreateUserId = currUserInfo.UserId,
|
|
|
|
+ Remark = $"翻译人员库-->更新"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (officialDutyLinkTranslators.Count > 0)
|
|
|
|
+ {
|
|
|
|
+ await _sqlSugar.Insertable(officialDutyLinkTranslators).ExecuteCommandAsync();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
#endregion
|
|
#endregion
|
|
_sqlSugar.CommitTran();
|
|
_sqlSugar.CommitTran();
|
|
return Ok(JsonView(true));
|
|
return Ok(JsonView(true));
|
|
@@ -3117,7 +3126,8 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
.SetColumns(x => new Grp_OfficialDutyLinkTranslator() {
|
|
.SetColumns(x => new Grp_OfficialDutyLinkTranslator() {
|
|
DeleteUserId = currUserInfo.UserId,
|
|
DeleteUserId = currUserInfo.UserId,
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
- IsDel = 1
|
|
|
|
|
|
+ IsDel = 1,
|
|
|
|
+ Remark = $"翻译人员库-->删除"
|
|
})
|
|
})
|
|
.Where(x => x.TranslatorId == id)
|
|
.Where(x => x.TranslatorId == id)
|
|
.ExecuteCommandAsync();
|
|
.ExecuteCommandAsync();
|