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
716c3170
Commit
716c3170
authored
Sep 06, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同调整
parent
7a323319
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
189 additions
and
16 deletions
+189
-16
RB_Education_Contract.cs
Edu.Model/Entity/Contract/RB_Education_Contract.cs
+20
-0
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+37
-15
RB_ClassRepository.cs
Edu.Repository/Grade/RB_ClassRepository.cs
+0
-1
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+128
-0
EducationContractController.cs
Edu.WebApi/Controllers/Course/EducationContractController.cs
+4
-0
No files found.
Edu.Model/Entity/Contract/RB_Education_Contract.cs
View file @
716c3170
...
...
@@ -367,5 +367,25 @@ namespace Edu.Model.Entity.Contract
/// </summary>
public
string
StuIDCard
{
get
;
set
;
}
/// <summary>
/// 教材包括
/// </summary>
public
string
TextbookIncludes
{
get
;
set
;
}
/// <summary>
/// 课时单价
/// </summary>
public
decimal
ClassHours
{
get
;
set
;
}
/// <summary>
/// 身份证地址
/// </summary>
public
string
IDCardAddress
{
get
;
set
;
}
/// <summary>
/// 法定代表人
/// </summary>
public
string
LegalPerson
{
get
;
set
;
}
}
}
Edu.Module.Course/EducationContractModule.cs
View file @
716c3170
...
...
@@ -106,7 +106,10 @@ namespace Edu.Module.Course
private
readonly
RB_User_ReturnComissionRepository
userReturnComissionRepository
=
new
RB_User_ReturnComissionRepository
();
private
readonly
RB_Student_OrderGuestRepository
student_OrderGuestRepository
=
new
RB_Student_OrderGuestRepository
();
/// <summary>
/// 订单课程仓储层对象
/// </summary>
private
readonly
RB_Order_CourseRepository
order_CourseRepository
=
new
RB_Order_CourseRepository
();
/// <summary>
/// 获取学员信息
/// </summary>
...
...
@@ -116,19 +119,31 @@ namespace Edu.Module.Course
public
object
GetStudentInfoModule
(
int
OrderId
,
int
GuestId
)
{
var
obj
=
new
object
();
var
orderModel
=
orderRepository
.
Get
Entity
(
OrderId
);
var
orderModel
=
orderRepository
.
Get
OrderListRepository_V2
(
new
RB_Order_ViewModel
{
OrderId
=
OrderId
})?.
FirstOrDefault
()
??
new
RB_Order_ViewModel
(
);
var
guestModel
=
order_GuestRepository
.
GetEntity
<
RB_Order_Guest_ViewModel
>(
GuestId
);
var
classModel
=
new
RB_Class_ViewModel
();
var
courseModel
=
new
RB_Course_ViewModel
();
decimal
PreferPrice
=
0
;
//总金额
decimal
DiscountMoney
=
0
;
//优惠金额
decimal
Money
=
0
;
//实际金额
List
<
RB_Class_ViewModel
>
classList
=
new
List
<
RB_Class_ViewModel
>();
if
(
orderModel
!=
null
&&
orderModel
.
OrderId
>
0
)
{
if
(
orderModel
.
OrderType
==
Common
.
Enum
.
Sale
.
OrderTypeEnum
.
CourseOrder
)
{
classModel
=
classRepository
.
GetClassAndCourseListRepository
(
new
RB_Class_ViewModel
()
{
ClassId
=
orderModel
.
ClassId
,
ClassScrollType
=
0
})?.
FirstOrDefault
();
courseModel
=
courseRepository
.
GetEntity
<
RB_Course_ViewModel
>(
orderModel
.
CourseId
);
//获取订单的课程信息
var
orderCourseList
=
order_CourseRepository
.
GetOrderCourseListRepository
(
new
RB_Order_Course_ViewModel
{
OrderId
=
OrderId
});
List
<
int
>
courseIdList
=
new
List
<
int
>();
courseIdList
.
Add
(
orderModel
.
ClassId
);
if
(
orderCourseList
!=
null
&&
orderCourseList
.
Any
())
{
courseIdList
.
AddRange
(
orderCourseList
.
Where
(
x
=>
x
.
ClassId
>
0
).
Select
(
x
=>
x
.
ClassId
));
}
if
(
courseIdList
!=
null
&&
courseIdList
.
Any
(
x
=>
x
>
0
))
{
classList
=
classRepository
.
GetClassListRepository
(
new
RB_Class_ViewModel
{
Q_ClassIds
=
string
.
Join
(
","
,
courseIdList
.
Select
(
x
=>
x
)),
ClassScrollType
=
0
});
}
}
}
var
qids
=
(
classModel
?.
ManagerId
??
0
).
ToString
()
+
","
+
(
orderModel
?.
EnterID
??
0
).
ToString
();
...
...
@@ -145,22 +160,23 @@ namespace Edu.Module.Course
StuBirth
=
Common
.
ConvertHelper
.
FormatDate
(
guestModel
?.
BirthDate
),
StuSex
=
(
guestModel
?.
Sex
??
0
)
==
1
?
0
:
1
,
StuAddress
=
guestModel
?.
ContactAddress
??
""
,
StuTel
=
guestModel
?.
Mobile
??
""
,
StuTel
=
guestModel
?.
Contact
Mobile
??
""
,
StuEmail
=
""
,
CourseName
=
courseModel
?.
CourseName
??
""
,
CourseName
=
orderModel
?.
CourseSubjectName
??
""
,
StartLevel
=
string
.
Join
(
"、"
,
classList
.
Select
(
x
=>
x
.
CourseName
)),
// guestModel?.Basics ?? "",
// FirstCourseFee = orderModel.PreferPrice - orderModel.DiscountMoney,
Money
,
FirstClassHours
=
(
orderModel
.
PreferPrice
-
orderModel
.
DiscountMoney
-
orderModel
.
TextbookFee
-
orderModel
.
CoursewareFee
),
ClassHours
=
Math
.
Round
(((
orderModel
.
PreferPrice
-
orderModel
.
DiscountMoney
-
orderModel
.
TextbookFee
-
orderModel
.
CoursewareFee
)
/
orderModel
.
GuestNum
/
orderModel
.
TotalClassHours
),
2
),
FirstBookFee
=
orderModel
.
TextbookFee
,
FirstClassFee
=
orderModel
.
CoursewareFee
,
FirstDiscountMoney
=
DiscountMoney
,
FirstMoney
=
Money
,
CNYCaps
=
dxMoney
,
SchoolName
=
classModel
?.
SchoolName
??
""
,
SchoolPrincipal
=
empList
?.
Where
(
qitem
=>
qitem
.
Id
==
(
classModel
?.
ManagerId
??
0
))?.
FirstOrDefault
()?.
EmployeeName
??
""
,
StartLevel
=
guestModel
?.
Basics
??
""
,
CourseConsultant
=
empList
?.
Where
(
qitem
=>
qitem
.
Id
==
(
orderModel
?.
EnterID
??
0
))?.
FirstOrDefault
()?.
EmployeeName
??
""
,
Payee
=
empList
?.
Where
(
qitem
=>
qitem
.
Id
==
(
orderModel
?.
EnterID
??
0
))?.
FirstOrDefault
()?.
EmployeeName
??
""
,
FirstClassHours
=
(
courseModel
?.
ClassHours
??
0
)
-
(
orderModel
?.
StartClassHours
??
0
),
FirstCourseFee
=
PreferPrice
,
FirstBookFee
=
0
,
FirstClassFee
=
0
,
FirstDiscountMoney
=
DiscountMoney
,
FirstMoney
=
Money
,
CNYCaps
=
dxMoney
,
Money
,
};
return
obj
;
}
...
...
@@ -484,6 +500,12 @@ namespace Edu.Module.Course
{
nameof
(
RB_Education_Contract_ViewModel
.
Exam
),
model
.
Exam
},
{
nameof
(
RB_Education_Contract_ViewModel
.
IsSupplement
),
model
.
IsSupplement
},
{
nameof
(
RB_Education_Contract_ViewModel
.
StuIDCard
),
model
.
StuIDCard
},
{
nameof
(
RB_Education_Contract_ViewModel
.
TextbookIncludes
),
model
.
TextbookIncludes
},
{
nameof
(
RB_Education_Contract_ViewModel
.
ClassHours
),
model
.
ClassHours
},
{
nameof
(
RB_Education_Contract_ViewModel
.
IDCardAddress
),
model
.
IDCardAddress
},
{
nameof
(
RB_Education_Contract_ViewModel
.
LegalPerson
),
model
.
LegalPerson
},
};
flag
=
education_ContractRepository
.
Update
(
keyValues
,
new
WhereHelper
(
nameof
(
RB_Education_Contract_ViewModel
.
Id
),
model
.
Id
));
}
...
...
@@ -976,7 +998,7 @@ namespace Edu.Module.Course
if
(
contractList
!=
null
&&
contractList
.
Count
>
0
)
{
string
orderIds
=
string
.
Join
(
","
,
contractList
.
Select
(
qitem
=>
qitem
.
OrderId
).
Distinct
());
var
orderList
=
orderRepository
.
GetOrderListRepository
(
new
RB_Order_ViewModel
()
{
QOrderIds
=
orderIds
});
var
orderList
=
orderRepository
.
GetOrderListRepository
(
new
RB_Order_ViewModel
()
{
QOrderIds
=
orderIds
});
foreach
(
var
item
in
contractList
)
{
var
orderModel
=
orderList
.
FirstOrDefault
(
qitem
=>
qitem
.
OrderId
==
item
.
OrderId
);
...
...
Edu.Repository/Grade/RB_ClassRepository.cs
View file @
716c3170
...
...
@@ -87,7 +87,6 @@ WHERE 1=1
}
/// <summary>
/// 获取班级课程名称以及老师信息列表
/// </summary>
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
716c3170
...
...
@@ -142,6 +142,134 @@ ORDER BY {orderBy}
return
Get
<
RB_Order_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetOrderListRepository_V2
(
RB_Order_ViewModel
demodel
)
{
string
where
=
$@" 1=1 "
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
OrderId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
QOrderIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderId
)}
IN(
{
demodel
.
QOrderIds
}
)"
;
}
if
(
demodel
.
OrderType
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderType
)}
=
{(
int
)
demodel
.
OrderType
}
"
;
}
if
(
demodel
.
ClassId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(
demodel
.
SourceId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
SourceId
)}
=
{
demodel
.
SourceId
}
"
;
}
if
(
demodel
.
CourseId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
CourseId
)}
=
{
demodel
.
CourseId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
ClassId
)}
in(
{
demodel
.
ClassIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
SourceIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
SourceId
)}
in(
{
demodel
.
SourceIds
}
)"
;
}
if
(
demodel
.
OrderState
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderState
)}
=
{(
int
)
demodel
.
OrderState
}
"
;
}
if
(
demodel
.
OrderSource
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderSource
)}
=
{(
int
)
demodel
.
OrderSource
}
"
;
}
if
(
demodel
.
OrderForm
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderForm
)}
=
{(
int
)
demodel
.
OrderForm
}
"
;
}
if
(
demodel
.
EnterID
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
EnterID
)}
=
{
demodel
.
EnterID
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
QEnterIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
EnterID
)}
IN(
{
demodel
.
EnterID
}
) "
;
}
if
(
demodel
.
Dept_Id
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
Dept_Id
)}
=
{
demodel
.
Dept_Id
}
"
;
}
if
(
demodel
.
Q_OrderState
>
0
)
{
if
(
demodel
.
Q_OrderState
==
1
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderState
)}
in(1,2)"
;
}
else
if
(
demodel
.
Q_OrderState
==
2
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
OrderState
)}
=3"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ConfirmSTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
LXConfirmDate
)}
>='
{
demodel
.
ConfirmSTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
StartTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
CreateTime
)}
>='
{
demodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
EndTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
CreateTime
)}
<='
{
demodel
.
EndTime
}
23:59:59'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ConfirmETime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
LXConfirmDate
)}
<='
{
demodel
.
ConfirmETime
}
23:59:59'"
;
}
if
(
demodel
.
JoinType
==
OrderJoinTypeEnum
.
InsertClass
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
JoinType
)}
=
{(
int
)
OrderJoinTypeEnum
.
InsertClass
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Q_EffectTime
))
{
where
+=
string
.
Format
(
" and DATE_FORMAT(o.EffectTime,'%y/%m/%d')=DATE_FORMAT('{0}','%y/%m/%d') "
,
demodel
.
Q_EffectTime
);
}
string
orderBy
=
" o.OrderId asc"
;
if
(
demodel
.
Q_OrderBy
==
1
)
{
orderBy
=
" o.OrderId asc"
;
}
else
if
(
demodel
.
Q_OrderBy
==
2
)
{
orderBy
=
" o.CreateTime desc"
;
}
string
sql
=
$@" SELECT o.*,c.ClassName,c.ClassNo,c.School_Id as ClassSchoolId,IFNULL(course.CourseName,'') AS CourseName
,C.OpenTime,course.CourseSubject,IFNULL(csubject.SubjectName,'') AS CourseSubjectName
,IFNULL(c.ClassStatus,0) AS ClassStatus,IFNULL(course.CoverImg,'') AS CourseImg,IFNULL(course.B2BBackground,'') AS B2BBackground
,IFNULL(course.B2BIcon,'') AS B2BIcon,cu.CustomerName,cu.ContactNumber as CustomerTel,c.ClassScrollType
FROM RB_Order o LEFT JOIN rb_class c on o.ClassId = c.ClassId
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
LEFT JOIN rb_course_subject AS csubject ON course.CourseSubject=csubject.Id
LEFT JOIN rb_customer cu on cu.CustomerId = o.CustomerId
WHERE
{
where
}
ORDER BY
{
orderBy
}
"
;
return
Get
<
RB_Order_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取课程班级订单分页列表
/// </summary>
...
...
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
716c3170
...
...
@@ -302,6 +302,10 @@ namespace Edu.WebApi.Controllers.Course
Exam
=
base
.
ParmJObj
.
GetStringValue
(
"Exam"
),
IsSupplement
=
base
.
ParmJObj
.
GetInt
(
"IsSupplement"
),
StuIDCard
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCard"
),
TextbookIncludes
=
base
.
ParmJObj
.
GetStringValue
(
"TextbookIncludes"
),
ClassHours
=
base
.
ParmJObj
.
GetDecimal
(
"ClassHours"
),
IDCardAddress
=
base
.
ParmJObj
.
GetStringValue
(
"IDCardAddress"
),
LegalPerson
=
base
.
ParmJObj
.
GetStringValue
(
"LegalPerson"
),
};
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
CreateBy
=
userInfo
.
Id
;
...
...
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