Commit 59679ba6 authored by 黄奎's avatar 黄奎

页面修改

parent 823fefce
...@@ -275,6 +275,9 @@ namespace Edu.Module.User ...@@ -275,6 +275,9 @@ namespace Edu.Module.User
{ {
var accountModel = accountModule.GetAccountListExtModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Assist, AccountId = model.AId })?.FirstOrDefault(); var accountModel = accountModule.GetAccountListExtModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Assist, AccountId = model.AId })?.FirstOrDefault();
if (string.IsNullOrEmpty(accountModel.WorkUserId) && IsLeave == false) { IsInsert = true; }//走新增方法 if (string.IsNullOrEmpty(accountModel.WorkUserId) && IsLeave == false) { IsInsert = true; }//走新增方法
Common.Plugin.LogHelper.WriteInfo(string.Format("SetAssistModule:: AccountUserType {0} Name {1}", model.AccountUserType, model.AssistName));
if (model.AccountUserType == 1)
{
if (IsInsert) if (IsInsert)
{ {
//成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。 //成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。
...@@ -306,11 +309,14 @@ namespace Edu.Module.User ...@@ -306,11 +309,14 @@ namespace Edu.Module.User
if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功) if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{ {
//更新账户表企业微信id //更新账户表企业微信id
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Account_ViewModel.WorkUserId),userId} { nameof(RB_Account_ViewModel.WorkUserId),userId}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Account_ViewModel.Id), FiledName=nameof(RB_Account_ViewModel.Id),
FiledValue=accountModel.Id, FiledValue=accountModel.Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -337,11 +343,14 @@ namespace Edu.Module.User ...@@ -337,11 +343,14 @@ namespace Edu.Module.User
if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功) if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{ {
//更新账户表企业微信id //更新账户表企业微信id
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Account_ViewModel.WorkUserId),""} { nameof(RB_Account_ViewModel.WorkUserId),""}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Account_ViewModel.Id), FiledName=nameof(RB_Account_ViewModel.Id),
FiledValue=Id, FiledValue=Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -376,6 +385,7 @@ namespace Edu.Module.User ...@@ -376,6 +385,7 @@ namespace Edu.Module.User
} }
} }
} }
}
}); });
} }
} }
......
...@@ -235,11 +235,16 @@ namespace Edu.Module.User ...@@ -235,11 +235,16 @@ namespace Edu.Module.User
DirectSupervisor = model.DirectSupervisor DirectSupervisor = model.DirectSupervisor
}); });
if (flag && !string.IsNullOrEmpty(model.Token) && IsUpdate) { if (flag && !string.IsNullOrEmpty(model.Token) && IsUpdate) {
System.Threading.Tasks.Task.Run(() => System.Threading.Tasks.Task.Run(() =>
{ {
//用户 //用户
var accountModel = accountModule.GetAccountListExtModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Admin, AccountId = model.MId })?.FirstOrDefault(); var accountModel = accountModule.GetAccountListExtModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Admin, AccountId = model.MId })?.FirstOrDefault();
if (string.IsNullOrEmpty(accountModel.WorkUserId) && IsLeave == false) { IsInsert = true; }//走新增方法 if (string.IsNullOrEmpty(accountModel.WorkUserId) && IsLeave == false) { IsInsert = true; }//走新增方法
Common.Plugin.LogHelper.WriteInfo(string.Format("SetManagerModule:: AccountUserType {0} Name {1}", model.AccountUserType, model.MName));
//甲鹤员工才同步企业微信
if (model.AccountUserType == 1)
{
if (IsInsert) if (IsInsert)
{ {
//新增企业微信用户 //新增企业微信用户
...@@ -273,11 +278,14 @@ namespace Edu.Module.User ...@@ -273,11 +278,14 @@ namespace Edu.Module.User
if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功) if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{ {
//更新账户表企业微信id //更新账户表企业微信id
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Account_ViewModel.WorkUserId),userId} { nameof(RB_Account_ViewModel.WorkUserId),userId}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Account_ViewModel.Id), FiledName=nameof(RB_Account_ViewModel.Id),
FiledValue=accountModel.Id, FiledValue=accountModel.Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -308,11 +316,14 @@ namespace Edu.Module.User ...@@ -308,11 +316,14 @@ namespace Edu.Module.User
if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功) if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{ {
//更新账户表企业微信id //更新账户表企业微信id
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Account_ViewModel.WorkUserId),""} { nameof(RB_Account_ViewModel.WorkUserId),""}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Account_ViewModel.Id), FiledName=nameof(RB_Account_ViewModel.Id),
FiledValue=Id, FiledValue=Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -353,6 +364,7 @@ namespace Edu.Module.User ...@@ -353,6 +364,7 @@ namespace Edu.Module.User
} }
} }
} }
}
}); });
} }
} }
......
...@@ -317,6 +317,10 @@ namespace Edu.Module.User ...@@ -317,6 +317,10 @@ namespace Edu.Module.User
{ {
var accountModel = accountModule.GetAccountListExtModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Teacher, AccountId = model.TId })?.FirstOrDefault(); var accountModel = accountModule.GetAccountListExtModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Teacher, AccountId = model.TId })?.FirstOrDefault();
if (string.IsNullOrEmpty(accountModel.WorkUserId) && IsLeave == false) { IsInsert = true; }//走新增方法 if (string.IsNullOrEmpty(accountModel.WorkUserId) && IsLeave == false) { IsInsert = true; }//走新增方法
Common.Plugin.LogHelper.WriteInfo(string.Format("SetTeacherModule:: AccountUserType {0} Name {1}", model.AccountUserType, model.TeacherName));
//甲鹤员工才同步到企业微信
if (model.AccountUserType == 1)
{
if (IsInsert) if (IsInsert)
{ {
//成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。 //成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。
...@@ -348,11 +352,14 @@ namespace Edu.Module.User ...@@ -348,11 +352,14 @@ namespace Edu.Module.User
if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功) if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{ {
//更新账户表企业微信id //更新账户表企业微信id
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Account_ViewModel.WorkUserId),userId} { nameof(RB_Account_ViewModel.WorkUserId),userId}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Account_ViewModel.Id), FiledName=nameof(RB_Account_ViewModel.Id),
FiledValue=accountModel.Id, FiledValue=accountModel.Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -379,11 +386,14 @@ namespace Edu.Module.User ...@@ -379,11 +386,14 @@ namespace Edu.Module.User
if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功) if (cmodel.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{ {
//更新账户表企业微信id //更新账户表企业微信id
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Account_ViewModel.WorkUserId),""} { nameof(RB_Account_ViewModel.WorkUserId),""}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Account_ViewModel.Id), FiledName=nameof(RB_Account_ViewModel.Id),
FiledValue=Id, FiledValue=Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -418,7 +428,7 @@ namespace Edu.Module.User ...@@ -418,7 +428,7 @@ namespace Edu.Module.User
} }
} }
} }
}); } });
} }
} }
return flag; return flag;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment