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
c9140752
Commit
c9140752
authored
May 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
523d014f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
3 deletions
+107
-3
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+36
-0
RB_Class_Check.cs
Edu.Model/Entity/Course/RB_Class_Check.cs
+5
-1
RB_Order_Guest.cs
Edu.Model/Entity/Course/RB_Order_Guest.cs
+20
-0
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+1
-1
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+16
-1
EducationContractController.cs
Edu.WebApi/Controllers/Course/EducationContractController.cs
+25
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+4
-0
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
c9140752
...
@@ -344,5 +344,41 @@ namespace Edu.Common
...
@@ -344,5 +344,41 @@ namespace Edu.Common
builder
.
AppendFormat
(
@"<span style='text-decoration: underline;'>{1}{0}{1}</span>"
,
value
,
(
isAddNbsp
?
" "
:
""
));
builder
.
AppendFormat
(
@"<span style='text-decoration: underline;'>{1}{0}{1}</span>"
,
value
,
(
isAddNbsp
?
" "
:
""
));
return
builder
.
ToString
();
return
builder
.
ToString
();
}
}
/// <summary>
/// 根据出生日期计算年龄
/// </summary>
/// <param name="birthdate"></param>
/// <returns></returns>
public
static
int
GetAgeByBirthdate
(
object
birthdate
)
{
int
age
=
0
;
DateTime
now
=
DateTime
.
Now
;
if
(
birthdate
!=
null
)
{
try
{
var
timeStr
=
Convert
.
ToDateTime
(
birthdate
.
ToString
()).
ToString
(
"yyyy-MM-dd"
);
if
(
timeStr
==
"0001-01-01"
)
{
timeStr
=
""
;
}
if
(!
string
.
IsNullOrEmpty
(
timeStr
))
{
var
newBirth
=
Convert
.
ToDateTime
(
timeStr
);
age
=
now
.
Year
-
newBirth
.
Year
;
if
(
now
.
Month
<
newBirth
.
Month
||
(
now
.
Month
==
newBirth
.
Month
&&
now
.
Day
<
newBirth
.
Day
))
{
age
--;
}
}
}
catch
{
}
}
return
age
<
0
?
0
:
age
;
}
}
}
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Class_Check.cs
View file @
c9140752
...
@@ -67,6 +67,7 @@ namespace Edu.Model.Entity.Course
...
@@ -67,6 +67,7 @@ namespace Edu.Model.Entity.Course
/// 学习分钟数(单位:分钟)
/// 学习分钟数(单位:分钟)
/// </summary>
/// </summary>
public
int
StudyNum
{
get
;
set
;
}
public
int
StudyNum
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 创建人
/// 创建人
/// </summary>
/// </summary>
...
@@ -77,6 +78,9 @@ namespace Edu.Model.Entity.Course
...
@@ -77,6 +78,9 @@ namespace Edu.Model.Entity.Course
/// </summary>
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 补课状态(1-正常,2-已处理,3-未处理)
/// </summary>
public
int
MakeUpStatus
{
get
;
set
;
}
}
}
}
}
Edu.Model/Entity/Course/RB_Order_Guest.cs
View file @
c9140752
...
@@ -170,5 +170,25 @@ namespace Edu.Model.Entity.Course
...
@@ -170,5 +170,25 @@ namespace Edu.Model.Entity.Course
/// 留学就业备注
/// 留学就业备注
/// </summary>
/// </summary>
public
string
StudyRemark
{
get
;
set
;
}
public
string
StudyRemark
{
get
;
set
;
}
/// <summary>
/// 出生日期
/// </summary>
public
DateTime
BirthDate
{
get
;
set
;
}
/// <summary>
/// 总课时
/// </summary>
public
int
TotalHours
{
get
;
set
;
}
/// <summary>
/// 完成课时
/// </summary>
public
int
CompleteHours
{
get
;
set
;
}
/// <summary>
/// 补课课时
/// </summary>
public
int
MakeUpHours
{
get
;
set
;
}
}
}
}
}
Edu.Module.Course/EducationContractModule.cs
View file @
c9140752
...
@@ -92,7 +92,7 @@ namespace Edu.Module.Course
...
@@ -92,7 +92,7 @@ namespace Edu.Module.Course
obj
=
new
obj
=
new
{
{
StudentName
=
guestModel
?.
GuestName
??
""
,
StudentName
=
guestModel
?.
GuestName
??
""
,
StuBirth
=
""
,
StuBirth
=
Common
.
ConvertHelper
.
FormatDate
(
guestModel
?.
BirthDate
)
,
StuSex
=(
guestModel
?.
Sex
??
0
)==
1
?
0
:
1
,
StuSex
=(
guestModel
?.
Sex
??
0
)==
1
?
0
:
1
,
StuAddress
=
guestModel
?.
ContactAddress
??
""
,
StuAddress
=
guestModel
?.
ContactAddress
??
""
,
StuTel
=
guestModel
?.
Mobile
??
""
,
StuTel
=
guestModel
?.
Mobile
??
""
,
...
...
Edu.Module.Course/OrderModule.cs
View file @
c9140752
...
@@ -1372,6 +1372,10 @@ namespace Edu.Module.Course
...
@@ -1372,6 +1372,10 @@ namespace Edu.Module.Course
public
virtual
bool
SetOrderGuestInfo
(
RB_Order_Guest_ViewModel
dmodel
,
out
string
message
)
public
virtual
bool
SetOrderGuestInfo
(
RB_Order_Guest_ViewModel
dmodel
,
out
string
message
)
{
{
bool
flag
=
false
;
bool
flag
=
false
;
if
(
dmodel
.
BirthDate
!=
null
)
{
dmodel
.
Age
=
Common
.
ConvertHelper
.
GetAgeByBirthdate
(
dmodel
.
BirthDate
);
}
message
=
""
;
message
=
""
;
if
(
dmodel
.
Id
>
0
)
if
(
dmodel
.
Id
>
0
)
{
{
...
@@ -1491,6 +1495,17 @@ namespace Edu.Module.Course
...
@@ -1491,6 +1495,17 @@ namespace Edu.Module.Course
}
}
gModel
.
StudyRemark
=
dmodel
.
StudyRemark
;
gModel
.
StudyRemark
=
dmodel
.
StudyRemark
;
if
(
gModel
.
BirthDate
!=
dmodel
.
BirthDate
)
{
LogContent
+=
",出身日期由【"
+
gModel
.
BirthDate
+
"】修改为【"
+
dmodel
.
BirthDate
+
"】"
;
}
gModel
.
BirthDate
=
dmodel
.
BirthDate
;
if
(
gModel
.
TotalHours
!=
dmodel
.
TotalHours
)
{
LogContent
+=
",总课时由【"
+
gModel
.
TotalHours
+
"】修改为【"
+
dmodel
.
TotalHours
+
"】"
;
}
gModel
.
TotalHours
=
dmodel
.
TotalHours
;
gModel
.
UpdateTime
=
dmodel
.
UpdateTime
;
gModel
.
UpdateTime
=
dmodel
.
UpdateTime
;
flag
=
order_GuestRepository
.
Update
(
gModel
);
flag
=
order_GuestRepository
.
Update
(
gModel
);
if
(
flag
)
if
(
flag
)
...
@@ -1566,7 +1581,7 @@ namespace Edu.Module.Course
...
@@ -1566,7 +1581,7 @@ namespace Edu.Module.Course
ProviceId
=
0
,
ProviceId
=
0
,
School_Id
=
classmodel
.
School_Id
,
School_Id
=
classmodel
.
School_Id
,
Status
=
DateStateEnum
.
Normal
,
Status
=
DateStateEnum
.
Normal
,
StuBirth
=
null
,
StuBirth
=
dmodel
.
BirthDate
,
StuIcon
=
""
,
StuIcon
=
""
,
StuName
=
dmodel
.
GuestName
,
StuName
=
dmodel
.
GuestName
,
StuSex
=
dmodel
.
Sex
-
1
,
StuSex
=
dmodel
.
Sex
-
1
,
...
...
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
c9140752
...
@@ -195,6 +195,31 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -195,6 +195,31 @@ namespace Edu.WebApi.Controllers.Course
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// 复制合同
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetEducationContractCopy
()
{
var
userInfo
=
base
.
UserInfo
;
int
ContractId
=
base
.
ParmJObj
.
GetInt
(
"ContractId"
,
0
);
//合同id
if
(
ContractId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递合同id"
);
}
var
model
=
educationContractModule
.
GetEducationContractModule
(
ContractId
);
model
.
Id
=
0
;
model
.
Group_Id
=
userInfo
.
Group_Id
;
model
.
CreateBy
=
userInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
UpdateBy
=
userInfo
.
Id
;
model
.
UpdateTime
=
DateTime
.
Now
;
model
.
Status
=
0
;
bool
flag
=
educationContractModule
.
SetEducationContractModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// <summary>
/// 合同签字
/// 合同签字
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
c9140752
...
@@ -861,6 +861,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -861,6 +861,8 @@ namespace Edu.WebApi.Controllers.Course
x
.
Sex
,
x
.
Sex
,
SexStr
=
x
.
Sex
==
1
?
"男"
:
"女"
,
SexStr
=
x
.
Sex
==
1
?
"男"
:
"女"
,
x
.
Age
,
x
.
Age
,
BirthDate
=
Common
.
ConvertHelper
.
FormatDate
(
x
.
BirthDate
),
x
.
TotalHours
,
x
.
Mobile
,
x
.
Mobile
,
x
.
Basics
,
x
.
Basics
,
x
.
Education
,
x
.
Education
,
...
@@ -917,6 +919,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -917,6 +919,8 @@ namespace Edu.WebApi.Controllers.Course
VolunteerMajor
=
base
.
ParmJObj
.
GetStringValue
(
"VolunteerMajor"
),
VolunteerMajor
=
base
.
ParmJObj
.
GetStringValue
(
"VolunteerMajor"
),
Price
=
base
.
ParmJObj
.
GetDecimal
(
"Price"
),
Price
=
base
.
ParmJObj
.
GetDecimal
(
"Price"
),
StudyRemark
=
base
.
ParmJObj
.
GetStringValue
(
"StudyRemark"
),
StudyRemark
=
base
.
ParmJObj
.
GetStringValue
(
"StudyRemark"
),
BirthDate
=
base
.
ParmJObj
.
GetDateTime
(
"BirthDate"
),
TotalHours
=
base
.
ParmJObj
.
GetInt
(
"TotalHours"
)
};
};
if
(
dmodel
.
OrderId
<=
0
)
if
(
dmodel
.
OrderId
<=
0
)
{
{
...
...
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