Commit 5a1e4b36 authored by liudong1993's avatar liudong1993

1

parent 0e9a6447
......@@ -3860,6 +3860,8 @@ namespace Edu.Module.Course
if (model != null && model.Status == -1)
{
var userModel = userReturnComissionRepository.GetModelBySourceId((int)model.OrderSourceType, model.OrderSourceId, model.CommissionType);
if (userModel != null)
{
userModel.UnSettlementMoney += model.CommissionMoeny;
Dictionary<string, object> userKeyValues = new Dictionary<string, object>()
{
......@@ -3908,6 +3910,7 @@ namespace Edu.Module.Course
};
returnComissionRepository.Update(keyValues, wheres);
}
}
}
......
......@@ -524,6 +524,8 @@ namespace Edu.Module.User
parentWorkDepartId = departmentRepository.GetEntity(extModel.ParentId)?.WorkDepartId ?? 1;
}
//需在微信端创建
try
{
var CDModle = QYWeiXinHelper.CreateDepartment(token, extModel.DeptName, parentWorkDepartId, extModel.DeptSort);
if (CDModle.errcode == Senparc.Weixin.ReturnCode_Work.请求成功)
{
......@@ -545,6 +547,11 @@ namespace Edu.Module.User
{
LogHelper.Write("企业微信部门创建失败DeptId:" + extModel.DeptId + " 消息:" + CDModle.errcode);
}
}
catch (Exception ex)
{
LogHelper.Write("SetDepartmentModule企业微信部门创建失败DeptId:" + extModel.DeptId + " 消息:" + ex.Message);
}
});
}
}
......
......@@ -26,6 +26,10 @@ namespace Edu.WebApi.Controllers.Third
/// </summary>
private readonly EmployeeModule employeeModule = new EmployeeModule();
/// <summary>
/// 部门处理类
/// </summary>
private readonly DepartmentModule departmentModule = new DepartmentModule();
/// <summary>
/// 订单处理类
/// </summary>
private readonly OrderModule orderModule = new OrderModule();
......@@ -33,7 +37,6 @@ namespace Edu.WebApi.Controllers.Third
/// 业绩提成
/// </summary>
private readonly SellAchievementsModule sellAchievementsModule = new SellAchievementsModule();
/// <summary>
/// 员工人头奖励处理类
/// </summary>
......@@ -132,6 +135,51 @@ namespace Edu.WebApi.Controllers.Third
}));
}
/// <summary>
/// 获取部门的负责人
/// </summary>
/// <returns></returns>
[HttpGet]
[HttpPost]
[AllowAnonymous]
public ApiResult GetDepartmentManager() {
JObject jobj = JObject.Parse(RequestParm.Msg.ToString());
int DeptId = jobj.GetInt("DeptId", 0);
if (DeptId <= 0)
{
return ApiResult.ParamIsNull(message: "请传递部门编号!");
}
var dmodel = departmentModule.GetDepartmentModule(DeptId);
string ManagerIds = "";
if (dmodel != null) {
ManagerIds = dmodel.ManagerIds ?? "";
}
var RList = new object();
if (ManagerIds != "")
{
//查询所有的人员
var empList = employeeModule.GetEmployeeListModule(new Model.ViewModel.User.Employee_ViewModel() { QIds = ManagerIds });
var result = empList?.Select(qitem => new
{
qitem.Id,
qitem.EmployeeName,
qitem.Dept_Id,
qitem.DeptName,
qitem.Post_Id,
qitem.PostName,
qitem.School_Id,
qitem.SchoolName,
qitem.Group_Id,
qitem.GroupName
});
return ApiResult.Success(data: result);
}
else
{
return ApiResult.Failed();
}
}
/// <summary>
/// 更新订单实收、退款金额
/// </summary>
......
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