考试调整
This commit is contained in:
@@ -101,14 +101,31 @@ namespace WebAPI.Controllers
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (CommonService.IsMainUnitOrAdmin(trainingPlan.DesignerId))
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
APITrainingPlanService.SaveTrainingPlan(trainingPlan);
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "非本单位用户,不能制定培训计划!";
|
||||
bool result = false;
|
||||
if (trainingPlan.DesignerId == Const.sysglyId || trainingPlan.DesignerId == Const.hfnbdId)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var user = db.Sys_User.FirstOrDefault(e => e.UserId == trainingPlan.DesignerId);
|
||||
if (user != null && user.UnitId == Const.UnitId_CD)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
if (result)
|
||||
// if (CommonService.IsMainUnitOrAdmin(trainingPlan.DesignerId))
|
||||
{
|
||||
APITrainingPlanService.SaveTrainingPlan(trainingPlan);
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "非本单位用户,不能制定培训计划!";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user