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
8e25bb45
Commit
8e25bb45
authored
Apr 14, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1089ce94
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
474 additions
and
459 deletions
+474
-459
ContractTypeEnum.cs
Edu.Common/Enum/Course/ContractTypeEnum.cs
+2
-2
RB_Education_Contract.cs
Edu.Model/Entity/Course/RB_Education_Contract.cs
+321
-151
RB_Education_Contract_ViewModel.cs
...Model/ViewModel/Course/RB_Education_Contract_ViewModel.cs
+0
-30
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+48
-124
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+67
-67
RB_Education_ContractRepository.cs
Edu.Repository/Course/RB_Education_ContractRepository.cs
+8
-8
EducationContractController.cs
Edu.WebApi/Controllers/Course/EducationContractController.cs
+28
-77
No files found.
Edu.Common/Enum/Course/ContractTypeEnum.cs
View file @
8e25bb45
...
...
@@ -17,9 +17,9 @@ namespace Edu.Common.Enum.Course
Train
=
1
,
/// <summary>
/// 留学
/// 留学
就业
/// </summary>
[
EnumField
(
"留学"
)]
[
EnumField
(
"留学
就业
"
)]
StudyAbroad
=
2
}
}
Edu.Model/Entity/Course/RB_Education_Contract.cs
View file @
8e25bb45
...
...
@@ -15,7 +15,7 @@ namespace Edu.Model.Entity.Course
public
class
RB_Education_Contract
{
/// <summary>
///
Id
///
合同主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
...
...
@@ -29,6 +29,11 @@ namespace Edu.Model.Entity.Course
/// </summary>
public
int
OrderId
{
get
;
set
;
}
/// <summary>
/// 学生名单id
/// </summary>
public
int
GuestId
{
get
;
set
;
}
/// <summary>
/// 合同编号
/// </summary>
...
...
@@ -40,138 +45,303 @@ namespace Edu.Model.Entity.Course
public
string
StudentName
{
get
;
set
;
}
/// <summary>
/// 学校名称
/// 学生生日
/// </summary>
public
string
SchoolName
{
get
;
set
;
}
public
DateTime
StuBirth
{
get
;
set
;
}
/// <summary>
/// 学生性别(0-男,1-女)
/// </summary>
public
int
StuSex
{
get
;
set
;
}
/// <summary>
/// 学生地址
/// </summary>
public
string
StuAddress
{
get
;
set
;
}
/// <summary>
/// 学生电话
/// </summary>
public
string
StuTel
{
get
;
set
;
}
/// <summary>
/// 学生邮箱
/// </summary>
public
string
StuEmail
{
get
;
set
;
}
/// <summary>
/// 家长姓名
/// </summary>
public
string
ParentName
{
get
;
set
;
}
/// <summary>
/// 家长与学员关系
/// </summary>
public
string
ParentRelation
{
get
;
set
;
}
/// <summary>
/// 家长电话
/// </summary>
public
string
ParentTel
{
get
;
set
;
}
/// <summary>
/// 家长邮箱
/// </summary>
public
string
ParentEmail
{
get
;
set
;
}
/// <summary>
/// 紧急联系人姓名
/// </summary>
public
string
UrgentName
{
get
;
set
;
}
/// <summary>
/// 紧急联系人与学生关系
/// </summary>
public
string
UrgentRelation
{
get
;
set
;
}
/// <summary>
/// 紧急联系人电话
/// </summary>
public
string
UrgentTel
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// 紧急联系人邮箱
/// </summary>
public
string
UrgentEmail
{
get
;
set
;
}
/// <summary>
/// 监护人身份证后4位
/// </summary>
public
string
GuardianIDCard
{
get
;
set
;
}
/// <summary>
/// 培训课程内容
/// </summary>
public
string
CourseName
{
get
;
set
;
}
/// <summary>
/// 课程内容
/// 校区名称
/// </summary>
public
string
CourseContent
{
get
;
set
;
}
public
string
SchoolName
{
get
;
set
;
}
/// <summary>
/// 大写金额
/// 校区负责人
/// </summary>
public
string
CNYCaps
{
get
;
set
;
}
public
string
SchoolPrincipal
{
get
;
set
;
}
/// <summary>
/// 金额
/// 起始级别
/// </summary>
public
string
Money
{
get
;
set
;
}
public
string
StartLevel
{
get
;
set
;
}
/// <summary>
/// 乙方当前选择考试
/// 课程顾问
/// </summary>
public
string
Exam
{
get
;
set
;
}
public
string
CourseConsultant
{
get
;
set
;
}
/// <summary>
/// 旅游代表签名
/// 收款人
/// </summary>
public
string
Sign
{
get
;
set
;
}
public
string
Payee
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// 第一期-培训课时数
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
public
int
FirstClassHours
{
get
;
set
;
}
/// <summary>
/// 学校id
/// 第一期-培训课程费
/// </summary>
public
int
School_Id
{
get
;
set
;
}
public
decimal
FirstCourseFee
{
get
;
set
;
}
/// <summary>
/// 创建人
/// 第一期-培训教材费
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
public
decimal
FirstBookFee
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// 第一期-培训课件费
/// </summary>
public
DateTime
CreateTim
e
{
get
;
set
;
}
public
decimal
FirstClassFe
e
{
get
;
set
;
}
/// <summary>
/// 修改人
/// 第一期-折让价格
/// </summary>
public
int
UpdateB
y
{
get
;
set
;
}
public
decimal
FirstDiscountMone
y
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// 第一期-费用总计
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
public
decimal
FirstMoney
{
get
;
set
;
}
/// <summary>
/// 状态(0-草稿,1-提交审核,2-审核通过,3-驳回,4-取消)
/// 第一期-支付日期
/// </summary>
public
int
Status
{
get
;
set
;
}
public
DateTime
FirstPayDate
{
get
;
set
;
}
/// <summary>
/// 是否盖章(0-未盖章,1-已盖章)
/// 第二期-培训课时数
/// </summary>
public
int
IsCompanySeal
{
get
;
set
;
}
public
int
SecondClassHours
{
get
;
set
;
}
/// <summary>
/// 审核时间
/// 第二期-培训课程费
/// </summary>
public
decimal
SecondCourseFee
{
get
;
set
;
}
/// <summary>
/// 第二期-培训教材费
/// </summary>
public
decimal
SecondBookFee
{
get
;
set
;
}
/// <summary>
/// 第二期-培训课件费
/// </summary>
public
decimal
SecondClassFee
{
get
;
set
;
}
/// <summary>
/// 第二期-折让价格
/// </summary>
public
DateTime
?
AuditDate
{
get
;
set
;
}
public
decimal
SecondDiscountMoney
{
get
;
set
;
}
/// <summary>
/// 第二期-费用总计
/// </summary>
public
decimal
SecondMoney
{
get
;
set
;
}
/// <summary>
/// 第二期-支付日期
/// </summary>
public
DateTime
SecondPayDate
{
get
;
set
;
}
/// <summary>
/// 第三期-培训课时数
/// </summary>
public
int
ThirdClassHours
{
get
;
set
;
}
/// <summary>
/// 第三期-培训课程费
/// </summary>
public
decimal
ThirdCourseFee
{
get
;
set
;
}
/// <summary>
/// 第三期-培训教材费
/// </summary>
public
decimal
ThirdBookFee
{
get
;
set
;
}
/// <summary>
/// 第三期-培训课件费
/// </summary>
public
decimal
ThirdClassFee
{
get
;
set
;
}
/// <summary>
/// 第三期-折让价格
/// </summary>
public
decimal
ThirdDiscountMoney
{
get
;
set
;
}
/// <summary>
/// 第三期-费用总计
/// </summary>
public
decimal
ThirdMoney
{
get
;
set
;
}
/// <summary>
/// 第三期-支付日期
/// </summary>
public
DateTime
ThirdPayDate
{
get
;
set
;
}
/// <summary>
/// 人民币大写金额
/// </summary>
public
string
CNYCaps
{
get
;
set
;
}
/// <summary>
/// 金额
/// </summary>
public
decimal
Money
{
get
;
set
;
}
/// <summary>
/// 乙方当前选择考试
/// </summary>
public
string
Exam
{
get
;
set
;
}
/// <summary>
/// 是否有补充协议(1-有)
/// </summary>
public
int
IsSupplement
{
get
;
set
;
}
/// <summary>
/// 学生签名
/// </summary>
public
string
Sign
{
get
;
set
;
}
/// <summary>
/// 签名时间
/// </summary>
public
DateTime
?
SignDate
{
get
;
set
;
}
public
DateTime
SignDate
{
get
;
set
;
}
/// <summary>
/// 盖章时间
/// 监护人签字
/// </summary>
public
DateTime
?
SealDate
{
get
;
set
;
}
public
string
GuardianSign
{
get
;
set
;
}
/// <summary>
/// 审核人
/// 监护人签字时间
/// </summary>
public
DateTime
GuardianSignDate
{
get
;
set
;
}
/// <summary>
/// 审核时间
/// </summary>
public
DateTime
AuditDate
{
get
;
set
;
}
/// <summary>
/// 审核人id
/// </summary>
public
int
AuditEmpId
{
get
;
set
;
}
/// <summary>
/// 学生名单id
/// 是否盖章(0-未盖章,1-已盖章)
/// </summary>
public
int
GuestId
{
get
;
set
;
}
public
int
IsCompanySeal
{
get
;
set
;
}
/// <summary>
/// 性别 1男 2女 0未设置
/// 盖章时间
/// </summary>
public
int
Sex
{
get
;
set
;
}
public
DateTime
SealDate
{
get
;
set
;
}
/// <summary>
/// 身份证
/// 集团编号
/// </summary>
public
string
IDCar
d
{
get
;
set
;
}
public
int
Group_I
d
{
get
;
set
;
}
/// <summary>
/// 身份证居住地
/// 学校id
/// </summary>
public
string
Domicile
{
get
;
set
;
}
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 联系地址
/// 创建人
/// </summary>
public
string
ContactAddress
{
get
;
set
;
}
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 联系电话
/// 创建时间
/// </summary>
public
string
ContactMobil
e
{
get
;
set
;
}
public
DateTime
CreateTim
e
{
get
;
set
;
}
/// <summary>
/// 紧急联系
人
/// 修改
人
/// </summary>
public
string
EmergencyContact
{
get
;
set
;
}
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 紧急联系电话
/// 修改时间
/// </summary>
public
string
EmergencyMobile
{
get
;
set
;
}
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 状态(0-草稿,1-提交审核,2-审核通过,3-驳回,4-取消)
/// </summary>
public
int
Status
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Education_Contract_ViewModel.cs
View file @
8e25bb45
...
...
@@ -18,36 +18,6 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
string
CreateByPhoto
{
get
;
set
;
}
/// <summary>
/// 公司章
/// </summary>
public
string
CompanySealImage
{
get
;
set
;
}
/// <summary>
/// 合同公司名称
/// </summary>
public
string
ContractBranch
{
get
;
set
;
}
/// <summary>
/// 合同电话
/// </summary>
public
string
ContractTel
{
get
;
set
;
}
/// <summary>
/// 公司名称
/// </summary>
public
string
BranchName
{
get
;
set
;
}
/// <summary>
/// 法人代表
/// </summary>
public
string
LegalPerson
{
get
;
set
;
}
/// <summary>
/// 公司列表
/// </summary>
public
List
<
string
>
BranchNList
{
get
;
set
;
}
/// <summary>
/// 学生名单ids
/// </summary>
...
...
Edu.Module.Course/EducationContractModule.cs
View file @
8e25bb45
This diff is collapsed.
Click to expand it.
Edu.Module.Course/OrderModule.cs
View file @
8e25bb45
...
...
@@ -1656,73 +1656,73 @@ namespace Edu.Module.Course
/// <returns></returns>
public
bool
SetOrderReceiveContract
(
int
orderId
,
int
guestId
,
UserInfo
userInfo
)
{
var
glist
=
order_GuestRepository
.
GetList
(
new
RB_Order_Guest_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Id
=
guestId
,
OrderId
=
orderId
,
GuestState
=
1
});
if
(
glist
.
Any
())
{
//订单信息
var
omodel
=
orderRepository
.
GetEntity
(
orderId
);
decimal
Money
=
(
omodel
.
PreferPrice
-
omodel
.
DiscountMoney
)
/
glist
.
Count
();
//平均每人费用 (看是否根据订单单价)
string
dxMoney
=
StringHelper
.
MoneyToUpper
(
Money
.
ToString
());
//班级信息
var
classmodel
=
classRepository
.
GetClassAndCourseListRepository
(
new
RB_Class_ViewModel
()
{
ClassId
=
omodel
.
ClassId
}).
FirstOrDefault
();
string
newContractNum
=
"JH-CD0018"
;
var
totalCount
=
education_ContractRepository
.
GetContractCount
(
new
RB_Education_Contract_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
});
//查询已有合同的
string
guestIds
=
string
.
Join
(
","
,
glist
.
Select
(
x
=>
x
.
Id
));
var
clist
=
education_ContractRepository
.
GetList
(
new
RB_Education_Contract_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
OrderId
=
orderId
,
GuestIds
=
guestIds
,
Status
=
-
1
}).
Where
(
x
=>
x
.
Status
!=
4
).
ToList
();
foreach
(
var
item
in
glist
)
{
var
cmodel
=
clist
.
Where
(
x
=>
x
.
GuestId
==
item
.
Id
).
FirstOrDefault
();
if
(
cmodel
==
null
)
{
totalCount
+=
1
;
string
num
=
totalCount
.
ToString
();
switch
(
num
.
Length
)
{
case
1
:
num
=
"00000"
+
num
;
break
;
case
2
:
num
=
"0000"
+
num
;
break
;
case
3
:
num
=
"000"
+
num
;
break
;
case
4
:
num
=
"00"
+
num
;
break
;
case
5
:
num
=
"0"
+
num
;
break
;
}
string
ContractNo
=
newContractNum
+
num
;
education_ContractRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Education_Contract
()
{
Id
=
0
,
GuestId
=
item
.
Id
,
ContractNo
=
ContractNo
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CType
=
ContractTypeEnum
.
Train
,
Exam
=
""
,
Group_Id
=
userInfo
.
Group_Id
,
IsCompanySeal
=
0
,
CNYCaps
=
dxMoney
,
Money
=
Money
.
ToString
(),
OrderId
=
orderId
,
CourseName
=
classmodel
.
CateName
,
CourseContent
=
classmodel
.
CourseName
,
SchoolName
=
classmodel
.
SchoolName
,
School_Id
=
classmodel
.
School_Id
,
Sign
=
""
,
Status
=
0
,
StudentName
=
item
.
GuestName
,
UpdateBy
=
userInfo
.
Id
,
UpdateTime
=
DateTime
.
Now
,
ContactAddress
=
item
.
ContactAddress
,
Domicile
=
item
.
Domicile
,
IDCard
=
item
.
IDCard
,
ContactMobile
=
item
.
Mobile
,
EmergencyContact
=
item
.
Contact
,
EmergencyMobile
=
item
.
ContactMobile
,
Sex
=
item
.
Sex
});
}
}
}
//
var glist = order_GuestRepository.GetList(new RB_Order_Guest_ViewModel() { Group_Id = userInfo.Group_Id, Id = guestId, OrderId = orderId, GuestState = 1 });
//
if (glist.Any())
//
{
//
//订单信息
//
var omodel = orderRepository.GetEntity(orderId);
//
decimal Money = (omodel.PreferPrice - omodel.DiscountMoney) / glist.Count();//平均每人费用 (看是否根据订单单价)
//
string dxMoney = StringHelper.MoneyToUpper(Money.ToString());
//
//班级信息
//
var classmodel = classRepository.GetClassAndCourseListRepository(new RB_Class_ViewModel() { ClassId = omodel.ClassId }).FirstOrDefault();
//
string newContractNum = "JH-CD0018";
//
var totalCount = education_ContractRepository.GetContractCount(new RB_Education_Contract_ViewModel() { Group_Id = userInfo.Group_Id });
//
//查询已有合同的
//
string guestIds = string.Join(",", glist.Select(x => x.Id));
//
var clist = education_ContractRepository.GetList(new RB_Education_Contract_ViewModel() { Group_Id = userInfo.Group_Id, OrderId = orderId, GuestIds = guestIds, Status = -1 }).Where(x => x.Status != 4).ToList();
//
foreach (var item in glist) {
//
var cmodel = clist.Where(x => x.GuestId == item.Id).FirstOrDefault();
//
if (cmodel == null) {
//
totalCount += 1;
//
string num = totalCount.ToString();
//
switch (num.Length)
//
{
//
case 1:
//
num = "00000" + num; break;
//
case 2:
//
num = "0000" + num; break;
//
case 3:
//
num = "000" + num; break;
//
case 4:
//
num = "00" + num; break;
//
case 5:
//
num = "0" + num; break;
//
}
//
string ContractNo = newContractNum + num;
//
education_ContractRepository.Insert(new Model.Entity.Course.RB_Education_Contract()
//
{
//
Id = 0,
//
GuestId = item.Id,
//
ContractNo = ContractNo,
//
CreateBy = userInfo.Id,
//
CreateTime = DateTime.Now,
//
CType = ContractTypeEnum.Train,
//
Exam = "",
//
Group_Id = userInfo.Group_Id,
//
IsCompanySeal = 0,
//
CNYCaps = dxMoney,
//
Money = Money.ToString(),
//
OrderId = orderId,
//
CourseName = classmodel.CateName,
//
CourseContent = classmodel.CourseName,
//
SchoolName = classmodel.SchoolName,
//
School_Id = classmodel.School_Id,
//
Sign = "",
//
Status = 0,
//
StudentName = item.GuestName,
//
UpdateBy = userInfo.Id,
//
UpdateTime = DateTime.Now,
//
ContactAddress = item.ContactAddress,
//
Domicile = item.Domicile,
//
IDCard = item.IDCard,
//
ContactMobile = item.Mobile,
//
EmergencyContact = item.Contact,
//
EmergencyMobile = item.ContactMobile,
//
Sex = item.Sex
//
});
//
}
//
}
//
}
return
true
;
}
#
endregion
...
...
Edu.Repository/Course/RB_Education_ContractRepository.cs
View file @
8e25bb45
...
...
@@ -39,10 +39,10 @@ namespace Edu.Repository.Course
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(
demodel
.
CType
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
CType
)}
=
{(
int
)
demodel
.
CType
}
"
;
}
//
if (demodel.CType > 0)
//
{
//
where += $@" and {nameof(RB_Education_Contract_ViewModel.CType)} ={(int)demodel.CType}";
//
}
if
(
demodel
.
Status
>=
0
)
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
...
...
@@ -89,10 +89,10 @@ namespace Edu.Repository.Course
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
GuestId
)}
in(
{
demodel
.
GuestIds
}
)"
;
}
if
(
demodel
.
CType
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
CType
)}
=
{(
int
)
demodel
.
CType
}
"
;
}
//
if (demodel.CType > 0)
//
{
//
where += $@" and {nameof(RB_Education_Contract_ViewModel.CType)} ={(int)demodel.CType}";
//
}
if
(
demodel
.
Status
>=
0
)
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
...
...
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
8e25bb45
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Log
;
using
Edu.Module.Course
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
...
...
@@ -28,7 +26,6 @@ namespace Edu.WebApi.Controllers.Course
/// </summary>
private
readonly
EducationContractModule
educationContractModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
EducationContractModule
>();
#
region
合同列表
/// <summary>
...
...
@@ -42,20 +39,17 @@ namespace Edu.WebApi.Controllers.Course
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Education_Contract_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
var
list
=
educationContractModule
.
GetEducationContractPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
CType
,
CTypeName
=
x
.
CType
.
ToName
(),
x
.
OrderId
,
x
.
ContractNo
,
x
.
StudentName
,
x
.
SchoolName
,
x
.
CourseName
,
x
.
CourseContent
,
x
.
CNYCaps
,
x
.
Money
,
x
.
Exam
,
...
...
@@ -66,13 +60,6 @@ namespace Edu.WebApi.Controllers.Course
x
.
CreateBy
,
x
.
CreateByName
,
x
.
CreateByPhoto
,
x
.
Sex
,
x
.
IDCard
,
x
.
Domicile
,
x
.
ContactAddress
,
x
.
ContactMobile
,
x
.
EmergencyContact
,
x
.
EmergencyMobile
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm"
)
});
return
ApiResult
.
Success
(
""
,
pageModel
);
...
...
@@ -84,23 +71,23 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetEducationContractInfo
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
public
ApiResult
GetEducationContractInfo
()
{
int
ContractId
=
base
.
ParmJObj
.
GetInt
(
"ContractId"
,
0
);
//合同id
var
model
=
educationContractModule
.
GetEducationContractInfo
(
ContractId
);
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"合同不存在"
);
}
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"合同不存在"
);
}
return
ApiResult
.
Success
(
""
,
new
{
model
.
Id
,
model
.
CType
,
CTypeName
=
model
.
CType
.
ToName
(),
model
.
OrderId
,
model
.
ContractNo
,
model
.
StudentName
,
model
.
SchoolName
,
model
.
CourseName
,
model
.
CourseContent
,
model
.
CNYCaps
,
model
.
Money
,
model
.
Exam
,
...
...
@@ -108,21 +95,7 @@ namespace Edu.WebApi.Controllers.Course
model
.
Status
,
model
.
StatusStr
,
model
.
IsCompanySeal
,
model
.
CompanySealImage
,
model
.
ContractBranch
,
model
.
ContractTel
,
model
.
BranchNList
,
model
.
BranchName
,
model
.
Sex
,
model
.
IDCard
,
model
.
Domicile
,
model
.
ContactAddress
,
model
.
ContactMobile
,
model
.
EmergencyContact
,
model
.
EmergencyMobile
,
model
.
LegalPerson
,
SignDate
=
model
.
SignDate
.
HasValue
?
model
.
SignDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
SealDate
=
model
.
SealDate
.
HasValue
?
model
.
SealDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
});
}
...
...
@@ -135,24 +108,24 @@ namespace Edu.WebApi.Controllers.Course
{
var
userInfo
=
base
.
UserInfo
;
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Education_Contract_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
dmodel
.
StudentName
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
StudentName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入学生姓名"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
SchoolName
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
SchoolName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入学校名称"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CourseName
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CourseName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入课程名称"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CourseContent
))
{
return
ApiResult
.
ParamIsNull
(
"请输入课程内容"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CNYCaps
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CNYCaps
))
{
return
ApiResult
.
ParamIsNull
(
"请输入大写金额"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
Money
))
{
return
ApiResult
.
ParamIsNull
(
"请输入金额"
);
}
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
School_Id
=
userInfo
.
School_Id
;
...
...
@@ -167,7 +140,8 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
Success
();
}
else
{
else
{
return
ApiResult
.
Failed
();
}
}
...
...
@@ -183,36 +157,12 @@ namespace Edu.WebApi.Controllers.Course
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
int
State
=
parms
.
GetInt
(
"State"
,
1
);
// 状态 1提交审核 2通过 3驳回 4取消 5盖章
if
(
ContractId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递合同id"
);
}
bool
flag
=
educationContractModule
.
SetEducationContractAudit
(
ContractId
,
State
,
userInfo
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 合同复制
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetEducationContractCopy
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
if
(
ContractId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递合同id"
);
}
bool
flag
=
educationContractModule
.
SetEducationContract
Copy
(
ContractId
,
userInfo
);
bool
flag
=
educationContractModule
.
SetEducationContract
Audit
(
ContractId
,
State
,
userInfo
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
@@ -229,7 +179,8 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
SetEducationContractSign
()
{
public
ApiResult
SetEducationContractSign
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
string
Sign
=
parms
.
GetStringValue
(
"Sign"
);
//签名
...
...
@@ -263,7 +214,7 @@ namespace Edu.WebApi.Controllers.Course
var
ID
=
parms
.
GetInt
(
"ContractId"
);
var
CType
=
parms
.
GetInt
(
"CType"
);
string
curl
=
Common
.
Config
.
UploadSiteUrl
+
string
.
Format
(
@"/Home/EducationContractInfo?ID={0}&CType={1}"
,
ID
,
CType
);
//string curl = "http://localhost:50034"+ string.Format(@"/Home/EducationContractInfo?ID={0}&CType={1}", ID, CType);
var
flag
=
new
ToPdfHelper
().
HtmlWJtoPdf
(
tempPath
,
curl
);
return
ApiResult
.
Success
(
""
,
path
);
}
...
...
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