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
Hide 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
...
@@ -17,9 +17,9 @@ namespace Edu.Common.Enum.Course
Train
=
1
,
Train
=
1
,
/// <summary>
/// <summary>
/// 留学
/// 留学
就业
/// </summary>
/// </summary>
[
EnumField
(
"留学"
)]
[
EnumField
(
"留学
就业
"
)]
StudyAbroad
=
2
StudyAbroad
=
2
}
}
}
}
Edu.Model/Entity/Course/RB_Education_Contract.cs
View file @
8e25bb45
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/Course/RB_Education_Contract_ViewModel.cs
View file @
8e25bb45
...
@@ -18,36 +18,6 @@ namespace Edu.Model.ViewModel.Course
...
@@ -18,36 +18,6 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
/// </summary>
public
string
CreateByPhoto
{
get
;
set
;
}
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>
/// <summary>
/// 学生名单ids
/// 学生名单ids
/// </summary>
/// </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
...
@@ -1656,73 +1656,73 @@ namespace Edu.Module.Course
/// <returns></returns>
/// <returns></returns>
public
bool
SetOrderReceiveContract
(
int
orderId
,
int
guestId
,
UserInfo
userInfo
)
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
});
//
var glist = order_GuestRepository.GetList(new RB_Order_Guest_ViewModel() { Group_Id = userInfo.Group_Id, Id = guestId, OrderId = orderId, GuestState = 1 });
if
(
glist
.
Any
())
//
if (glist.Any())
{
//
{
//订单信息
//
//订单信息
var
omodel
=
orderRepository
.
GetEntity
(
orderId
);
//
var omodel = orderRepository.GetEntity(orderId);
decimal
Money
=
(
omodel
.
PreferPrice
-
omodel
.
DiscountMoney
)
/
glist
.
Count
();
//平均每人费用 (看是否根据订单单价)
//
decimal Money = (omodel.PreferPrice - omodel.DiscountMoney) / glist.Count();//平均每人费用 (看是否根据订单单价)
string
dxMoney
=
StringHelper
.
MoneyToUpper
(
Money
.
ToString
());
//
string dxMoney = StringHelper.MoneyToUpper(Money.ToString());
//班级信息
//
//班级信息
var
classmodel
=
classRepository
.
GetClassAndCourseListRepository
(
new
RB_Class_ViewModel
()
{
ClassId
=
omodel
.
ClassId
}).
FirstOrDefault
();
//
var classmodel = classRepository.GetClassAndCourseListRepository(new RB_Class_ViewModel() { ClassId = omodel.ClassId }).FirstOrDefault();
string
newContractNum
=
"JH-CD0018"
;
//
string newContractNum = "JH-CD0018";
var
totalCount
=
education_ContractRepository
.
GetContractCount
(
new
RB_Education_Contract_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
});
//
var totalCount = education_ContractRepository.GetContractCount(new RB_Education_Contract_ViewModel() { Group_Id = userInfo.Group_Id });
//查询已有合同的
//
//查询已有合同的
string
guestIds
=
string
.
Join
(
","
,
glist
.
Select
(
x
=>
x
.
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
();
//
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
)
{
//
foreach (var item in glist) {
var
cmodel
=
clist
.
Where
(
x
=>
x
.
GuestId
==
item
.
Id
).
FirstOrDefault
();
//
var cmodel = clist.Where(x => x.GuestId == item.Id).FirstOrDefault();
if
(
cmodel
==
null
)
{
//
if (cmodel == null) {
totalCount
+=
1
;
//
totalCount += 1;
string
num
=
totalCount
.
ToString
();
//
string num = totalCount.ToString();
switch
(
num
.
Length
)
//
switch (num.Length)
{
//
{
case
1
:
//
case 1:
num
=
"00000"
+
num
;
break
;
//
num = "00000" + num; break;
case
2
:
//
case 2:
num
=
"0000"
+
num
;
break
;
//
num = "0000" + num; break;
case
3
:
//
case 3:
num
=
"000"
+
num
;
break
;
//
num = "000" + num; break;
case
4
:
//
case 4:
num
=
"00"
+
num
;
break
;
//
num = "00" + num; break;
case
5
:
//
case 5:
num
=
"0"
+
num
;
break
;
//
num = "0" + num; break;
}
//
}
string
ContractNo
=
newContractNum
+
num
;
//
string ContractNo = newContractNum + num;
education_ContractRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Education_Contract
()
//
education_ContractRepository.Insert(new Model.Entity.Course.RB_Education_Contract()
{
//
{
Id
=
0
,
//
Id = 0,
GuestId
=
item
.
Id
,
//
GuestId = item.Id,
ContractNo
=
ContractNo
,
//
ContractNo = ContractNo,
CreateBy
=
userInfo
.
Id
,
//
CreateBy = userInfo.Id,
CreateTime
=
DateTime
.
Now
,
//
CreateTime = DateTime.Now,
CType
=
ContractTypeEnum
.
Train
,
//
CType = ContractTypeEnum.Train,
Exam
=
""
,
//
Exam = "",
Group_Id
=
userInfo
.
Group_Id
,
//
Group_Id = userInfo.Group_Id,
IsCompanySeal
=
0
,
//
IsCompanySeal = 0,
CNYCaps
=
dxMoney
,
//
CNYCaps = dxMoney,
Money
=
Money
.
ToString
(),
//
Money = Money.ToString(),
OrderId
=
orderId
,
//
OrderId = orderId,
CourseName
=
classmodel
.
CateName
,
//
CourseName = classmodel.CateName,
CourseContent
=
classmodel
.
CourseName
,
//
CourseContent = classmodel.CourseName,
SchoolName
=
classmodel
.
SchoolName
,
//
SchoolName = classmodel.SchoolName,
School_Id
=
classmodel
.
School_Id
,
//
School_Id = classmodel.School_Id,
Sign
=
""
,
//
Sign = "",
Status
=
0
,
//
Status = 0,
StudentName
=
item
.
GuestName
,
//
StudentName = item.GuestName,
UpdateBy
=
userInfo
.
Id
,
//
UpdateBy = userInfo.Id,
UpdateTime
=
DateTime
.
Now
,
//
UpdateTime = DateTime.Now,
ContactAddress
=
item
.
ContactAddress
,
//
ContactAddress = item.ContactAddress,
Domicile
=
item
.
Domicile
,
//
Domicile = item.Domicile,
IDCard
=
item
.
IDCard
,
//
IDCard = item.IDCard,
ContactMobile
=
item
.
Mobile
,
//
ContactMobile = item.Mobile,
EmergencyContact
=
item
.
Contact
,
//
EmergencyContact = item.Contact,
EmergencyMobile
=
item
.
ContactMobile
,
//
EmergencyMobile = item.ContactMobile,
Sex
=
item
.
Sex
//
Sex = item.Sex
});
//
});
}
//
}
}
//
}
}
//
}
return
true
;
return
true
;
}
}
#
endregion
#
endregion
...
...
Edu.Repository/Course/RB_Education_ContractRepository.cs
View file @
8e25bb45
...
@@ -39,10 +39,10 @@ namespace Edu.Repository.Course
...
@@ -39,10 +39,10 @@ namespace Edu.Repository.Course
{
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
}
if
(
demodel
.
CType
>
0
)
//
if (demodel.CType > 0)
{
//
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
CType
)}
=
{(
int
)
demodel
.
CType
}
"
;
//
where += $@" and {nameof(RB_Education_Contract_ViewModel.CType)} ={(int)demodel.CType}";
}
//
}
if
(
demodel
.
Status
>=
0
)
if
(
demodel
.
Status
>=
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
...
@@ -89,10 +89,10 @@ namespace Edu.Repository.Course
...
@@ -89,10 +89,10 @@ namespace Edu.Repository.Course
{
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
GuestId
)}
in(
{
demodel
.
GuestIds
}
)"
;
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
GuestId
)}
in(
{
demodel
.
GuestIds
}
)"
;
}
}
if
(
demodel
.
CType
>
0
)
//
if (demodel.CType > 0)
{
//
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
CType
)}
=
{(
int
)
demodel
.
CType
}
"
;
//
where += $@" and {nameof(RB_Education_Contract_ViewModel.CType)} ={(int)demodel.CType}";
}
//
}
if
(
demodel
.
Status
>=
0
)
if
(
demodel
.
Status
>=
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
where
+=
$@" and
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
...
...
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
8e25bb45
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Plugin
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Log
;
using
Edu.Module.Course
;
using
Edu.Module.Course
;
using
Edu.WebApi.Filter
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Authorization
;
...
@@ -28,7 +26,6 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -28,7 +26,6 @@ namespace Edu.WebApi.Controllers.Course
/// </summary>
/// </summary>
private
readonly
EducationContractModule
educationContractModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
EducationContractModule
>();
private
readonly
EducationContractModule
educationContractModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
EducationContractModule
>();
#
region
合同列表
#
region
合同列表
/// <summary>
/// <summary>
...
@@ -42,20 +39,17 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -42,20 +39,17 @@ namespace Edu.WebApi.Controllers.Course
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Education_Contract_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Education_Contract_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
var
list
=
educationContractModule
.
GetEducationContractPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
var
list
=
educationContractModule
.
GetEducationContractPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
{
x
.
Id
,
x
.
Id
,
x
.
CType
,
x
.
CType
,
CTypeName
=
x
.
CType
.
ToName
(),
x
.
OrderId
,
x
.
OrderId
,
x
.
ContractNo
,
x
.
ContractNo
,
x
.
StudentName
,
x
.
StudentName
,
x
.
SchoolName
,
x
.
SchoolName
,
x
.
CourseName
,
x
.
CourseName
,
x
.
CourseContent
,
x
.
CNYCaps
,
x
.
CNYCaps
,
x
.
Money
,
x
.
Money
,
x
.
Exam
,
x
.
Exam
,
...
@@ -66,13 +60,6 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -66,13 +60,6 @@ namespace Edu.WebApi.Controllers.Course
x
.
CreateBy
,
x
.
CreateBy
,
x
.
CreateByName
,
x
.
CreateByName
,
x
.
CreateByPhoto
,
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"
)
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm"
)
});
});
return
ApiResult
.
Success
(
""
,
pageModel
);
return
ApiResult
.
Success
(
""
,
pageModel
);
...
@@ -84,23 +71,23 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -84,23 +71,23 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
public
ApiResult
GetEducationContractInfo
()
{
public
ApiResult
GetEducationContractInfo
()
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
{
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
int
ContractId
=
base
.
ParmJObj
.
GetInt
(
"ContractId"
,
0
);
//合同id
var
model
=
educationContractModule
.
GetEducationContractInfo
(
ContractId
);
var
model
=
educationContractModule
.
GetEducationContractInfo
(
ContractId
);
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"合同不存在"
);
}
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"合同不存在"
);
}
return
ApiResult
.
Success
(
""
,
new
return
ApiResult
.
Success
(
""
,
new
{
{
model
.
Id
,
model
.
Id
,
model
.
CType
,
model
.
CType
,
CTypeName
=
model
.
CType
.
ToName
(),
model
.
OrderId
,
model
.
OrderId
,
model
.
ContractNo
,
model
.
ContractNo
,
model
.
StudentName
,
model
.
StudentName
,
model
.
SchoolName
,
model
.
SchoolName
,
model
.
CourseName
,
model
.
CourseName
,
model
.
CourseContent
,
model
.
CNYCaps
,
model
.
CNYCaps
,
model
.
Money
,
model
.
Money
,
model
.
Exam
,
model
.
Exam
,
...
@@ -108,21 +95,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -108,21 +95,7 @@ namespace Edu.WebApi.Controllers.Course
model
.
Status
,
model
.
Status
,
model
.
StatusStr
,
model
.
StatusStr
,
model
.
IsCompanySeal
,
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"
)
:
""
});
});
}
}
...
@@ -133,26 +106,26 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -133,26 +106,26 @@ namespace Edu.WebApi.Controllers.Course
[
HttpPost
]
[
HttpPost
]
public
ApiResult
SetEducationContractInfo
()
public
ApiResult
SetEducationContractInfo
()
{
{
var
userInfo
=
base
.
UserInfo
;
var
userInfo
=
base
.
UserInfo
;
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Education_Contract_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Education_Contract_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
dmodel
.
StudentName
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
StudentName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入学生姓名"
);
return
ApiResult
.
ParamIsNull
(
"请输入学生姓名"
);
}
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
SchoolName
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
SchoolName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入学校名称"
);
return
ApiResult
.
ParamIsNull
(
"请输入学校名称"
);
}
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CourseName
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CourseName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入课程名称"
);
return
ApiResult
.
ParamIsNull
(
"请输入课程名称"
);
}
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CourseContent
))
{
return
ApiResult
.
ParamIsNull
(
"请输入课程内容"
);
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CNYCaps
))
}
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
CNYCaps
))
{
return
ApiResult
.
ParamIsNull
(
"请输入大写金额"
);
return
ApiResult
.
ParamIsNull
(
"请输入大写金额"
);
}
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
Money
))
{
return
ApiResult
.
ParamIsNull
(
"请输入金额"
);
}
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
School_Id
=
userInfo
.
School_Id
;
dmodel
.
School_Id
=
userInfo
.
School_Id
;
...
@@ -167,7 +140,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -167,7 +140,8 @@ namespace Edu.WebApi.Controllers.Course
{
{
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
}
}
else
{
else
{
return
ApiResult
.
Failed
();
return
ApiResult
.
Failed
();
}
}
}
}
...
@@ -183,36 +157,12 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -183,36 +157,12 @@ namespace Edu.WebApi.Controllers.Course
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
int
State
=
parms
.
GetInt
(
"State"
,
1
);
// 状态 1提交审核 2通过 3驳回 4取消 5盖章
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
)
if
(
ContractId
<=
0
)
{
{
return
ApiResult
.
ParamIsNull
(
"请传递合同id"
);
return
ApiResult
.
ParamIsNull
(
"请传递合同id"
);
}
}
bool
flag
=
educationContractModule
.
SetEducationContract
Copy
(
ContractId
,
userInfo
);
bool
flag
=
educationContractModule
.
SetEducationContract
Audit
(
ContractId
,
State
,
userInfo
);
if
(
flag
)
if
(
flag
)
{
{
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
...
@@ -229,7 +179,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -229,7 +179,8 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
public
ApiResult
SetEducationContractSign
()
{
public
ApiResult
SetEducationContractSign
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
int
ContractId
=
parms
.
GetInt
(
"ContractId"
,
0
);
//合同id
string
Sign
=
parms
.
GetStringValue
(
"Sign"
);
//签名
string
Sign
=
parms
.
GetStringValue
(
"Sign"
);
//签名
...
@@ -263,7 +214,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -263,7 +214,7 @@ namespace Edu.WebApi.Controllers.Course
var
ID
=
parms
.
GetInt
(
"ContractId"
);
var
ID
=
parms
.
GetInt
(
"ContractId"
);
var
CType
=
parms
.
GetInt
(
"CType"
);
var
CType
=
parms
.
GetInt
(
"CType"
);
string
curl
=
Common
.
Config
.
UploadSiteUrl
+
string
.
Format
(
@"/Home/EducationContractInfo?ID={0}&CType={1}"
,
ID
,
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
);
var
flag
=
new
ToPdfHelper
().
HtmlWJtoPdf
(
tempPath
,
curl
);
return
ApiResult
.
Success
(
""
,
path
);
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