同步代码
This commit is contained in:
parent
74c5b9851e
commit
71558528c9
@ -202,7 +202,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var admiId = this.GetEntity<T_FM_USER>(t => t.CODE.Contains("admin") && t.ENABLE_STATUS == 0)?.ID;
|
||||
var currDep = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID.Value;
|
||||
var tempDep = GetEntity<T_FM_DEPARTMENT>(currDep);
|
||||
if (tempDep.DEPARTMENT_TYPE == (int)FMDepartmentType.班组)
|
||||
if (tempDep!=null&& tempDep.DEPARTMENT_TYPE == (int)FMDepartmentType.班组)
|
||||
{
|
||||
currDep = (Guid)tempDep.PARENT_ID;
|
||||
}
|
||||
|
||||
@ -50,12 +50,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
T_FM_NOTIFICATION_TASK finishNotice = null;
|
||||
List<T_FM_NOTIFICATION_TASK> sendNotices = null;
|
||||
var isRepeat = GetCount<T_FO_PRE_SHIFT_MEETING_RECORD>(t => t.NAME == entity.NAME && t.PRE_MEETING_STATUS > 0 && t.CLASS_ID == entity.CLASS_ID, new BaseFilter(entity.ORG_ID));
|
||||
if (isRepeat > 0)
|
||||
{
|
||||
throw new Exception("检测到班前会议数据重复,请联系管理员!");
|
||||
}
|
||||
|
||||
if (entity.PRE_MEETING_STATUS >= FOPreMeetingStatusEnum.签到中)
|
||||
{
|
||||
throw new Exception("你已提交,请勿重复提交!");
|
||||
@ -90,6 +84,11 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
{
|
||||
entity.NAME = DateTime.Now.Date.ToString("yyyyMMdd") + TeamName + "-班前会议";
|
||||
}
|
||||
var isRepeat = GetCount<T_FO_PRE_SHIFT_MEETING_RECORD>(t => t.NAME == entity.NAME && t.PRE_MEETING_STATUS > 0 && t.CLASS_ID == entity.CLASS_ID&&t.USER_ID==entity.USER_ID, new BaseFilter(entity.ORG_ID));
|
||||
if (isRepeat > 0)
|
||||
{
|
||||
throw new Exception("检测到班前会议数据重复,请联系管理员!");
|
||||
}
|
||||
//20230913新增同步人员排班
|
||||
List<T_FM_DEPARTMENT_SCHEDULING_DETAIL> addSchedulings = new List<T_FM_DEPARTMENT_SCHEDULING_DETAIL>();
|
||||
List<Guid> delSchedulings = new List<Guid>();
|
||||
|
||||
@ -199,6 +199,15 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
{
|
||||
try
|
||||
{
|
||||
string telnetCode = Request.Headers["Tenant"];
|
||||
if (string.IsNullOrEmpty(telnetCode))
|
||||
{
|
||||
throw new Exception("企业信息未成功加载,请重试!");
|
||||
}
|
||||
if (filter == null)
|
||||
{
|
||||
throw new Exception("参数为空,请重试!");
|
||||
}
|
||||
var md5SuperPwd = DataHelper.MD5(SUPER_PASSWORD);
|
||||
UserLoginBaseModel result = new UserLoginModel();
|
||||
string userId = filter == null ? string.Empty : filter.Keyword;
|
||||
|
||||
@ -69,7 +69,6 @@ namespace APT.PF.WebApi.Controllers.Api.FM
|
||||
return BadRequest(new { error = "error VERIFY_CODE ", error_description = "验证码不正确" });
|
||||
}
|
||||
}
|
||||
filter.OrgId = new Guid(request.orgId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -966,6 +966,13 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
notify.Nav_LaunchUser = null;
|
||||
notify.Nav_RecordUser = null;
|
||||
};
|
||||
var notifyids = notifys.Select(t=>t.ID).ToList();
|
||||
var finishNotifys1 = GetEntities<T_FM_NOTIFICATION_TASK>(t => notifyids.Contains((Guid)t.SOURCE_DATA_ID)&&t.NOTICE_STATUS==0, new BaseFilter(orgId));
|
||||
|
||||
foreach (var notify1 in finishNotifys1)
|
||||
{
|
||||
notify1.NOTICE_STATUS = 4;
|
||||
}
|
||||
SendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, orgId, allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(10), (int)FMNoticeTypeEnum.消息, "SE018");
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
@ -979,6 +986,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
BantchAddEntityNoCommit(joinUsers);
|
||||
if (files.Any())
|
||||
BantchAddEntityNoCommit(files);
|
||||
if(finishNotifys1.Any())
|
||||
BantchUpdateEntity(finishNotifys1);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user