Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
ffe4ce65
Commit
ffe4ce65
authored
Mar 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
4e915e96
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
116 additions
and
63 deletions
+116
-63
CustomerStatusEnum.cs
Edu.Common/Enum/Sale/CustomerStatusEnum.cs
+25
-0
RB_Course_Offer.cs
Edu.Model/Entity/Course/RB_Course_Offer.cs
+1
-1
AppIndexController.cs
Edu.WebApi/Controllers/APP/AppIndexController.cs
+3
-3
SystemLogController.cs
Edu.WebApi/Controllers/APP/SystemLogController.cs
+1
-1
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+20
-16
CourseOfferController.cs
Edu.WebApi/Controllers/Course/CourseOfferController.cs
+30
-13
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+4
-4
OKRPeriodController.cs
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
+22
-18
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+5
-6
WorkFlowController.cs
Edu.WebApi/Controllers/User/WorkFlowController.cs
+5
-1
No files found.
Edu.Common/Enum/Sale/CustomerStatusEnum.cs
0 → 100644
View file @
ffe4ce65
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Sale
{
/// <summary>
/// 客户确认状态
/// </summary>
public
enum
CustomerStatusEnum
{
/// <summary>
/// 待确认
/// </summary>
[
EnumField
(
"待确认"
)]
NoSure
=
1
,
/// <summary>
/// 已确认
/// </summary>
[
EnumField
(
"已确认"
)]
Sure
=
2
,
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Course_Offer.cs
View file @
ffe4ce65
...
...
@@ -61,7 +61,7 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 客户确认状态(1-待确认,2-已确认)
/// </summary>
public
int
CustomerStatus
{
get
;
set
;
}
public
CustomerStatusEnum
CustomerStatus
{
get
;
set
;
}
/// <summary>
/// 客户微信信息
...
...
Edu.WebApi/Controllers/APP/AppIndexController.cs
View file @
ffe4ce65
...
...
@@ -23,9 +23,9 @@ namespace Edu.WebApi.Controllers.APP
public
class
AppIndexController
:
AppBaseController
{
private
StudentModule
studentModule
=
new
StudentModule
();
private
ClassModule
classModule
=
new
ClassModule
();
private
TeacherModule
teacherModule
=
new
TeacherModule
();
private
readonly
StudentModule
studentModule
=
new
StudentModule
();
private
readonly
ClassModule
classModule
=
new
ClassModule
();
private
readonly
TeacherModule
teacherModule
=
new
TeacherModule
();
private
readonly
AppHomePageModule
appHomePageModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
AppHomePageModule
>();
#
region
首次登录后填写兴趣爱好
...
...
Edu.WebApi/Controllers/APP/SystemLogController.cs
View file @
ffe4ce65
...
...
@@ -19,7 +19,7 @@ namespace Edu.WebApi.Controllers.APP
[
EnableCors
(
"AllowCors"
)]
public
class
SystemLogController
:
AppBaseController
{
private
MsgLogModule
msgLogModule
=
new
MsgLogModule
();
private
readonly
MsgLogModule
msgLogModule
=
new
MsgLogModule
();
/// <summary>
/// 获取自己的系统消息
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
ffe4ce65
...
...
@@ -844,9 +844,11 @@ namespace Edu.WebApi.Controllers.Course
}
else
{
model
.
LessonPlanList
=
new
List
<
RB_Class_LessonPlan_ViewModel
>();
model
.
LessonPlanList
.
Add
(
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"活動編"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
});
model
.
LessonPlanList
.
Add
(
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"理解編"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
});
model
.
LessonPlanList
=
new
List
<
RB_Class_LessonPlan_ViewModel
>
{
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"活動編"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
},
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"理解編"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
}
};
}
return
ApiResult
.
Success
(
""
,
model
);
}
...
...
@@ -872,19 +874,21 @@ namespace Edu.WebApi.Controllers.Course
foreach
(
var
classPlanItem
in
lessonPlanList
.
GroupBy
(
x
=>
x
.
ClassPlanId
))
{
Class_LessonPlan_ViewModel
model
=
new
Class_LessonPlan_ViewModel
();
model
.
ClassId
=
extModel
.
ClassId
;
model
.
ClassPlanId
=
classPlanItem
.
Key
;
model
.
School_Id
=
extModel
.
School_Id
;
model
.
Group_Id
=
extModel
.
Group_Id
;
model
.
CourseNum
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
CourseNum
??
0
;
model
.
LessonPlan
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
LessonPlan
;
model
.
CreateBy
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
CreateBy
??
0
;
model
.
UpdateBy
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
UpdateBy
??
0
;
model
.
CreateTime
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
CreateTime
??
System
.
DateTime
.
Now
;
model
.
UpdateTime
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
UpdateTime
??
System
.
DateTime
.
Now
;
model
.
IsTemplate
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
IsTemplate
??
0
;
model
.
LessonPlanList
=
new
List
<
RB_Class_LessonPlan_ViewModel
>();
Class_LessonPlan_ViewModel
model
=
new
Class_LessonPlan_ViewModel
{
ClassId
=
extModel
.
ClassId
,
ClassPlanId
=
classPlanItem
.
Key
,
School_Id
=
extModel
.
School_Id
,
Group_Id
=
extModel
.
Group_Id
,
CourseNum
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
CourseNum
??
0
,
LessonPlan
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
LessonPlan
,
CreateBy
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
CreateBy
??
0
,
UpdateBy
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
UpdateBy
??
0
,
CreateTime
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
CreateTime
??
System
.
DateTime
.
Now
,
UpdateTime
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
UpdateTime
??
System
.
DateTime
.
Now
,
IsTemplate
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
FirstOrDefault
()?.
IsTemplate
??
0
,
LessonPlanList
=
new
List
<
RB_Class_LessonPlan_ViewModel
>()
};
model
.
LessonPlanList
=
lessonPlanList
.
Where
(
x
=>
x
.
ClassPlanId
==
classPlanItem
.
Key
).
ToList
();
foreach
(
var
item
in
model
.
LessonPlanList
)
{
...
...
Edu.WebApi/Controllers/Course/CourseOfferController.cs
View file @
ffe4ce65
...
...
@@ -44,7 +44,7 @@ namespace Edu.WebApi.Controllers.Course
CustomerInfo
=
base
.
ParmJObj
.
GetStringValue
(
"CustomerInfo"
),
CustomerSource
=
(
CustomerSourceEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerSource"
),
CustomerType
=
(
CustomerTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerType"
),
CustomerStatus
=
base
.
ParmJObj
.
GetInt
(
"CustomerStatus"
)
CustomerStatus
=
(
CustomerStatusEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerStatus"
)
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
...
...
@@ -91,26 +91,26 @@ namespace Edu.WebApi.Controllers.Course
{
var
extModel
=
new
RB_Course_Offer_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
EffectiveStart
=
base
.
ParmJObj
.
GetDateTime
(
"EffectiveStart"
),
EffectiveEnd
=
base
.
ParmJObj
.
GetDateTime
(
"EffectiveEnd"
),
CustomerType
=(
CustomerTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerType"
),
CustomerSource
=
(
CustomerSourceEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerSource"
),
TotalOriginalPrice
=
base
.
ParmJObj
.
GetDecimal
(
"TotalOriginalPrice"
),
TotalPrice
=
base
.
ParmJObj
.
GetDecimal
(
"TotalPrice"
),
TotalDiscountPrice
=
base
.
ParmJObj
.
GetDecimal
(
"TotalDiscountPrice"
),
CustomerInfo
=
base
.
ParmJObj
.
GetStringValue
(
"CustomerInfo"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
EffectiveStart
=
base
.
ParmJObj
.
GetDateTime
(
"EffectiveStart"
),
EffectiveEnd
=
base
.
ParmJObj
.
GetDateTime
(
"EffectiveEnd"
),
CustomerType
=
(
CustomerTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerType"
),
CustomerSource
=
(
CustomerSourceEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerSource"
),
TotalOriginalPrice
=
base
.
ParmJObj
.
GetDecimal
(
"TotalOriginalPrice"
),
TotalPrice
=
base
.
ParmJObj
.
GetDecimal
(
"TotalPrice"
),
TotalDiscountPrice
=
base
.
ParmJObj
.
GetDecimal
(
"TotalDiscountPrice"
),
CustomerInfo
=
base
.
ParmJObj
.
GetStringValue
(
"CustomerInfo"
),
};
try
{
extModel
.
OfferDetails
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Course_OfferDetails_ViewModel
>>(
base
.
ParmJObj
.
GetStringValue
(
"OfferDetails"
));
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetCourseCategory"
);
}
extModel
.
CustomerStatus
=
1
;
extModel
.
CustomerStatus
=
CustomerStatusEnum
.
NoSure
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
UserInfo
.
Id
;
extModel
.
UpdateBy
=
UserInfo
.
Id
;
...
...
@@ -177,6 +177,23 @@ namespace Edu.WebApi.Controllers.Course
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取枚举相关列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetCustomerEnum
()
{
var
CustomerTypeList
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
CustomerTypeEnum
));
var
CustomerSourceList
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
CustomerSourceEnum
));
var
CustomerStatusList
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
CustomerStatusEnum
));
var
data
=
new
{
CustomerTypeList
,
CustomerSourceList
,
CustomerStatusList
,
};
return
ApiResult
.
Success
(
data
:
data
);
}
#
endregion
}
}
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
ffe4ce65
...
...
@@ -1010,7 +1010,7 @@ namespace Edu.WebApi.Controllers.Course
}
if
(!
string
.
IsNullOrEmpty
(
f_answer
))
{
f_answer
=
f_answer
.
Substring
(
1
)
;
f_answer
=
f_answer
[
1.
.]
;
}
model
.
Answer
=
f_answer
;
model
.
QuestionContent
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
fillInList
);
...
...
@@ -1174,7 +1174,7 @@ namespace Edu.WebApi.Controllers.Course
}
if
(!
string
.
IsNullOrEmpty
(
f_answer
))
{
f_answer
=
f_answer
.
Substring
(
1
)
;
f_answer
=
f_answer
[
1.
.]
;
}
model
.
Answer
=
f_answer
;
model
.
QuestionContent
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
fillInList
);
...
...
@@ -1238,7 +1238,7 @@ namespace Edu.WebApi.Controllers.Course
}
if
(!
string
.
IsNullOrEmpty
(
f_answer
))
{
f_answer
=
f_answer
.
Substring
(
1
)
;
f_answer
=
f_answer
[
1.
.]
;
}
model
.
Answer
=
f_answer
;
model
.
QuestionContent
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
fillInList
);
...
...
@@ -1501,7 +1501,7 @@ namespace Edu.WebApi.Controllers.Course
}
if
(!
string
.
IsNullOrEmpty
(
answer
))
{
answer
=
answer
.
Substring
(
1
)
;
answer
=
answer
[
1.
.]
;
}
model
.
Answer
=
answer
;
model
.
QuestionContent
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
multipleList
);
...
...
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
View file @
ffe4ce65
...
...
@@ -1942,7 +1942,7 @@ namespace Edu.WebApi.Controllers.OKR
{
RangeType
=
0
;
}
var
obj
=
okrPeriodModule
.
GetOKRGRDateDistribution
(
PeriodId
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
obj
=
okrPeriodModule
.
GetOKRGRDateDistribution
(
PeriodId
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
return
ApiResult
.
Success
(
""
,
obj
);
}
...
...
@@ -1974,7 +1974,7 @@ namespace Edu.WebApi.Controllers.OKR
{
RangeType
=
0
;
}
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionDetail
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
Type
,
StartValue
,
EndValue
,
OrderBy
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionDetail
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
Type
,
StartValue
,
EndValue
,
OrderBy
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -2017,7 +2017,7 @@ namespace Edu.WebApi.Controllers.OKR
RangeType
=
0
;
}
OrderByNum
=
OrderByNum
==
0
?
1
:
OrderByNum
;
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionDetail_V2
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
UserName
,
Type
,
OrderBy
,
OrderByNum
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
object
list
=
okrPeriodModule
.
GetOKRGRDateDistributionDetail_V2
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
UserName
,
Type
,
OrderBy
,
OrderByNum
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
""
,
pageModel
);
...
...
@@ -2044,7 +2044,7 @@ namespace Edu.WebApi.Controllers.OKR
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionForDepartment
(
PeriodId
,
Type
,
OrderBy
,
OrderByNum
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionForDepartment
(
PeriodId
,
Type
,
OrderBy
,
OrderByNum
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
return
ApiResult
.
Success
(
""
,
list
);
}
...
...
@@ -2066,7 +2066,7 @@ namespace Edu.WebApi.Controllers.OKR
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
okrPeriodModule
.
GetOKRMatterList
(
PeriodId
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
object
list
=
okrPeriodModule
.
GetOKRMatterList
(
PeriodId
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
return
ApiResult
.
Success
(
""
,
list
);
}
...
...
@@ -2152,7 +2152,7 @@ namespace Edu.WebApi.Controllers.OKR
{
RangeType
=
0
;
}
var
obj
=
okrPeriodModule
.
GetOKRProbabilityInfo
(
PeriodId
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
obj
=
okrPeriodModule
.
GetOKRProbabilityInfo
(
PeriodId
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
return
ApiResult
.
Success
(
""
,
obj
);
}
...
...
@@ -2182,7 +2182,7 @@ namespace Edu.WebApi.Controllers.OKR
{
RangeType
=
0
;
}
var
list
=
okrPeriodModule
.
GetOKRProbabilityPageListForEmp
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
SelectType
,
OrderBy
,
UserName
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
list
=
okrPeriodModule
.
GetOKRProbabilityPageListForEmp
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
SelectType
,
OrderBy
,
UserName
,
RangeType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -2215,7 +2215,7 @@ namespace Edu.WebApi.Controllers.OKR
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
okrPeriodModule
.
GetOKRProbabilityPageListForDept
(
PeriodId
,
SelectType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
list
=
okrPeriodModule
.
GetOKRProbabilityPageListForDept
(
PeriodId
,
SelectType
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
return
ApiResult
.
Success
(
""
,
list
);
}
#
endregion
...
...
@@ -2253,7 +2253,7 @@ namespace Edu.WebApi.Controllers.OKR
{
RangeType
=
0
;
}
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionPage
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
EmployeeName
,
PeriodId
,
Type
,
StartValue
,
EndValue
,
OrderBy
,
RangeType
,
DepartIds
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionPage
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
EmployeeName
,
PeriodId
,
Type
,
StartValue
,
EndValue
,
OrderBy
,
RangeType
,
DepartIds
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -2292,7 +2292,7 @@ namespace Edu.WebApi.Controllers.OKR
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionForDept
(
PeriodId
,
Type
,
OrderBy
,
OrderByNum
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
object
list
=
okrPeriodModule
.
GetOKRGRDateDistributionForDept
(
PeriodId
,
Type
,
OrderBy
,
OrderByNum
,
DepartId
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
);
return
ApiResult
.
Success
(
""
,
list
);
}
...
...
@@ -2421,10 +2421,12 @@ namespace Edu.WebApi.Controllers.OKR
List
<
OKRPersonalDimension
>
listResult
=
new
List
<
OKRPersonalDimension
>();
foreach
(
var
item
in
list
.
Where
(
x
=>
x
.
DataType
==
1
))
{
OKRPersonalDimension
model
=
new
OKRPersonalDimension
();
model
.
DeptName
=
item
.
DeptName
;
model
.
DeptPersonName
=
string
.
IsNullOrWhiteSpace
(
item
.
ManagerIds
)
?
""
:
string
.
Join
(
","
,
okrPersonalList
.
Where
(
x
=>
item
.
ManagerIds
.
Contains
(
x
.
AccountId
.
ToString
())).
Select
(
x
=>
x
.
EmployeeName
));
model
.
ChildrenNum
=
list
.
Where
(
x
=>
x
.
DataType
==
2
&&
x
.
DeptId
==
item
.
DeptId
).
Count
();
OKRPersonalDimension
model
=
new
OKRPersonalDimension
{
DeptName
=
item
.
DeptName
,
DeptPersonName
=
string
.
IsNullOrWhiteSpace
(
item
.
ManagerIds
)
?
""
:
string
.
Join
(
","
,
okrPersonalList
.
Where
(
x
=>
item
.
ManagerIds
.
Contains
(
x
.
AccountId
.
ToString
())).
Select
(
x
=>
x
.
EmployeeName
)),
ChildrenNum
=
list
.
Where
(
x
=>
x
.
DataType
==
2
&&
x
.
DeptId
==
item
.
DeptId
).
Count
()
};
ChildrenNum
+=
model
.
ChildrenNum
;
if
(
model
.
ChildrenNum
>
0
)
{
...
...
@@ -2462,10 +2464,12 @@ namespace Edu.WebApi.Controllers.OKR
List
<
OKRPersonalDimension
>
listResult
=
new
List
<
OKRPersonalDimension
>();
foreach
(
var
item
in
list
.
Where
(
x
=>
x
.
DataType
==
1
))
{
OKRPersonalDimension
model
=
new
OKRPersonalDimension
();
model
.
DeptName
=
item
.
DeptName
;
model
.
DeptPersonName
=
string
.
IsNullOrWhiteSpace
(
item
.
ManagerIds
)
?
""
:
string
.
Join
(
","
,
okrPersonalList
.
Where
(
x
=>
item
.
ManagerIds
.
Contains
(
x
.
AccountId
.
ToString
())).
Select
(
x
=>
x
.
EmployeeName
));
model
.
ChildrenNum
=
list
.
Where
(
x
=>
x
.
DataType
==
2
&&
x
.
DeptId
==
item
.
DeptId
).
Count
();
OKRPersonalDimension
model
=
new
OKRPersonalDimension
{
DeptName
=
item
.
DeptName
,
DeptPersonName
=
string
.
IsNullOrWhiteSpace
(
item
.
ManagerIds
)
?
""
:
string
.
Join
(
","
,
okrPersonalList
.
Where
(
x
=>
item
.
ManagerIds
.
Contains
(
x
.
AccountId
.
ToString
())).
Select
(
x
=>
x
.
EmployeeName
)),
ChildrenNum
=
list
.
Where
(
x
=>
x
.
DataType
==
2
&&
x
.
DeptId
==
item
.
DeptId
).
Count
()
};
if
(
model
.
ChildrenNum
>
0
)
{
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
ffe4ce65
...
...
@@ -889,7 +889,7 @@ namespace Edu.WebApi.Controllers.User
TimeStr
+=
"到"
+
itemt
.
EndTime
.
Value
.
ToString
(
"MM-dd HH:mm:ss"
)
+
"<br/>"
+
itemt
.
Duration
+
" 天<br/>"
;
}
if
(
TimeStr
!=
""
)
TimeStr
=
TimeStr
.
Substring
(
0
,
TimeStr
.
Length
-
5
)
;
TimeStr
=
TimeStr
[
0.
.^
5
]
;
}
break
;
case
(
int
)
WFTTemplateTypeEnum
.
Goout
:
...
...
@@ -1685,7 +1685,7 @@ namespace Edu.WebApi.Controllers.User
TimeStr
+=
"到"
+
itemt
.
EndTime
.
Value
.
ToString
(
"MM-dd HH:mm:ss"
)
+
"\r\n "
+
itemt
.
Duration
+
" 天\r\n"
;
}
if
(
TimeStr
!=
""
)
TimeStr
=
TimeStr
.
Substring
(
0
,
TimeStr
.
Length
-
4
)
;
TimeStr
=
TimeStr
[
0.
.^
4
]
;
}
break
;
case
(
int
)
WFTTemplateTypeEnum
.
Goout
:
...
...
@@ -1965,7 +1965,7 @@ namespace Edu.WebApi.Controllers.User
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
List
<
RB_Attendance_Way_Extend
>
wayList
=
new
List
<
RB_Attendance_Way_Extend
>();
wifiMac
=
GetMdifyWifiMac
(
wifiMac
);
bool
isNotVerifyVifi
=
JudgeNotVerifyVifi
(
version
,
empId
);
bool
isNotVerifyVifi
=
JudgeNotVerifyVifi
(
version
);
bool
isRang
=
isNotVerifyVifi
?
isNotVerifyVifi
:
attendRecodeModule
.
VerifyPunchCard
(
empId
,
latAndLong
,
wifiMac
,
oldWifiMac
,
out
wayList
);
var
attendWay
=
wayList
.
Select
(
t
=>
new
{
type
=
t
.
Type
,
name
=
t
.
Name
,
address
=
t
.
Address
,
targetAddress
=
t
.
TargetAddress
,
scope
=
t
.
Scope
});
var
result
=
new
{
isLegal
=
isRang
,
attendWay
};
...
...
@@ -1997,7 +1997,7 @@ namespace Edu.WebApi.Controllers.User
UserInfo
userInfo
=
UserReidsCache
.
GetUserLoginInfo
(
RequestParm
.
Uid
);
wifiMac
=
GetMdifyWifiMac
(
wifiMac
);
LogHelper
.
WriteInfo
(
$"打卡信息:
{
JsonConvert
.
SerializeObject
(
RequestParm
)}
-->更新后的mac:
{
wifiMac
}
"
);
bool
isNotVerifyVifi
=
JudgeNotVerifyVifi
(
version
,
userInfo
.
Id
);
bool
isNotVerifyVifi
=
JudgeNotVerifyVifi
(
version
);
string
result
=
attendRecodeModule
.
PunchCard
(
userInfo
.
Id
,
userInfo
.
DeptId
,
latAndLong
,
wifiMac
,
oldWifiMac
,
phoneId
,
address
,
PhoneName
,
out
int
PunchCardType
,
isNotVerifyVifi
);
var
resultData
=
new
{
punchCardType
=
PunchCardType
};
if
(
result
.
Equals
(
"ok"
))
...
...
@@ -2018,9 +2018,8 @@ namespace Edu.WebApi.Controllers.User
/// 不打卡wifi版本
/// </summary>
/// <param name="version"></param>
/// <param name="EmpId"></param>
/// <returns></returns>
private
bool
JudgeNotVerifyVifi
(
string
version
,
int
EmpId
)
private
bool
JudgeNotVerifyVifi
(
string
version
)
{
bool
isNotVerifyVifi
=
false
;
if
(!
string
.
IsNullOrWhiteSpace
(
version
))
...
...
Edu.WebApi/Controllers/User/WorkFlowController.cs
View file @
ffe4ce65
...
...
@@ -1314,12 +1314,16 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
string
GetStatusColor
(
WFRrocessStatus
?
status
)
{
string
color
;
string
color
=
""
;
switch
(
status
)
{
case
WFRrocessStatus
.
NotAudit
:
color
=
"#257BF1"
;
break
;
case
WFRrocessStatus
.
AuditNotThrough
:
color
=
"#F73939"
;
break
;
case
WFRrocessStatus
.
AuditThrough
:
color
=
"#00B06C"
;
break
;
case
WFRrocessStatus
.
Rejected
:
break
;
case
WFRrocessStatus
.
OtherHaveAudit
:
break
;
default
:
color
=
"#257BF1"
;
break
;
}
return
color
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment