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
7a4404c1
Commit
7a4404c1
authored
May 14, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
cf5f44d8
752e5c15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
828 additions
and
339 deletions
+828
-339
CacheKey.cs
Edu.Cache/CacheKey.cs
+6
-0
UserReidsCache.cs
Edu.Cache/User/UserReidsCache.cs
+22
-2
Config.cs
Edu.Common/Config.cs
+15
-0
FinanceConfigTypeEnum.cs
Edu.Common/Enum/Course/FinanceConfigTypeEnum.cs
+6
-1
WxPayCallbackRespModel.cs
...hatPayAPIv3.Model/WxPayCallback/WxPayCallbackRespModel.cs
+1
-1
WxPayConst.cs
Edu.Common/WeChatPayAPIv3.Model/WxPayConst.cs
+1
-1
WxPayHelper.cs
Edu.Common/WeChatPayAPIv3/WxPayHelper.cs
+4
-0
RB_Class_Check.cs
Edu.Model/Entity/Course/RB_Class_Check.cs
+11
-1
RB_Finance_Config.cs
Edu.Model/Entity/Course/RB_Finance_Config.cs
+5
-0
RB_Order_Guest.cs
Edu.Model/Entity/Course/RB_Order_Guest.cs
+5
-0
RB_Class_Check_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Check_ViewModel.cs
+68
-1
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+148
-62
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+17
-1
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+24
-3
RB_Class_CheckRepository.cs
Edu.Repository/Course/RB_Class_CheckRepository.cs
+135
-19
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+81
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+3
-1
WeChatPayController.cs
Edu.WebApi/Controllers/WeChatPay/WeChatPayController.cs
+196
-168
TimerJobj.cs
Edu.WebApi/Timers/TimerJobj.cs
+7
-7
appsettings.json
Edu.WebApi/appsettings.json
+73
-71
No files found.
Edu.Cache/CacheKey.cs
View file @
7a4404c1
...
@@ -37,5 +37,11 @@ namespace Edu.Cache
...
@@ -37,5 +37,11 @@ namespace Edu.Cache
/// </summary>
/// </summary>
public
static
string
Student_Frozen_Key
=
"Edu_Student_Frozen_"
;
public
static
string
Student_Frozen_Key
=
"Edu_Student_Frozen_"
;
/// <summary>
/// 微信支付回调key
/// </summary>
public
static
string
WeChatPay_Callback_Key
=
"WeChatPay_Callback_Key_"
;
}
}
}
}
Edu.Cache/User/UserReidsCache.cs
View file @
7a4404c1
...
@@ -71,12 +71,32 @@ namespace Edu.Cache.User
...
@@ -71,12 +71,32 @@ namespace Edu.Cache.User
{
{
TimeSpan
ts
=
GetExpirTime
(
JwtExpirTime
);
TimeSpan
ts
=
GetExpirTime
(
JwtExpirTime
);
redis
.
StringSet
(
cacheKey
,
Data
,
ts
);
redis
.
StringSet
(
cacheKey
,
Data
,
ts
);
}
}
catch
(
Exception
)
catch
(
Exception
)
{
{
}
}
}
}
/// <summary>
/// 获取缓存
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="Data"></param>
/// <param name="JwtExpirTime"></param>
public
static
object
Get
(
string
cacheKey
,
object
Data
,
int
JwtExpirTime
)
{
try
{
object
info
=
redis
.
StringGet
<
object
>(
cacheKey
);
return
info
;
}
catch
(
Exception
)
{
return
""
;
}
}
/// <summary>
/// <summary>
/// 账号仓储层对象
/// 账号仓储层对象
/// </summary>
/// </summary>
...
@@ -88,7 +108,7 @@ namespace Edu.Cache.User
...
@@ -88,7 +108,7 @@ namespace Edu.Cache.User
/// <param name="Id">账号Id</param>
/// <param name="Id">账号Id</param>
/// <param name="apiRequestFromEnum">请求来源</param>
/// <param name="apiRequestFromEnum">请求来源</param>
/// <returns></returns>
/// <returns></returns>
public
static
UserInfo
GetUserLoginInfo
(
object
Id
,
ApiRequestFromEnum
apiRequestFromEnum
=
ApiRequestFromEnum
.
WebAdmin
)
public
static
UserInfo
GetUserLoginInfo
(
object
Id
,
ApiRequestFromEnum
apiRequestFromEnum
=
ApiRequestFromEnum
.
WebAdmin
)
{
{
UserInfo
userInfo
=
null
;
UserInfo
userInfo
=
null
;
if
(
Id
!=
null
)
if
(
Id
!=
null
)
...
@@ -100,7 +120,7 @@ namespace Edu.Cache.User
...
@@ -100,7 +120,7 @@ namespace Edu.Cache.User
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetUserLoginInfo"
);
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetUserLoginInfo"
);
}
}
if
(
userInfo
==
null
)
if
(
userInfo
==
null
)
{
{
...
...
Edu.Common/Config.cs
View file @
7a4404c1
...
@@ -461,6 +461,21 @@ namespace Edu.Common
...
@@ -461,6 +461,21 @@ namespace Edu.Common
}
}
}
}
/// <summary>
/// 连续缺课多少课时
/// </summary>
public
static
int
AbsentHours
{
get
{
int
.
TryParse
(
ReadConfigKey
(
"AbsentHours"
),
out
int
AbsentHours
);
if
(
AbsentHours
==
0
)
{
AbsentHours
=
12
;
}
return
AbsentHours
;
}
}
/// <summary>
/// <summary>
/// 消息推送AppId
/// 消息推送AppId
...
...
Edu.Common/Enum/Course/FinanceConfigTypeEnum.cs
View file @
7a4404c1
...
@@ -47,6 +47,11 @@ namespace Edu.Common.Enum.Course
...
@@ -47,6 +47,11 @@ namespace Edu.Common.Enum.Course
/// 耗材出库
/// 耗材出库
/// </summary>
/// </summary>
[
EnumField
(
"耗材出库"
)]
[
EnumField
(
"耗材出库"
)]
SuppliesStockOut
=
7
SuppliesStockOut
=
7
,
/// <summary>
/// 学费收入
/// </summary>
[
EnumField
(
"学费收入"
)]
Tuition
=
8
}
}
}
}
Edu.Common/WeChatPayAPIv3.Model/WxPayCallback/WxPayCallbackRespModel.cs
View file @
7a4404c1
...
@@ -9,7 +9,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model.WxPayCallback
...
@@ -9,7 +9,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model.WxPayCallback
/// <summary>
/// <summary>
/// 返回状态码,错误码,SUCCESS为清算机构接收成功,其他错误码为失败。
/// 返回状态码,错误码,SUCCESS为清算机构接收成功,其他错误码为失败。
/// </summary>
/// </summary>
public
string
code
{
set
;
get
;
}
=
"SUCCESS"
;
public
string
code
{
set
;
get
;
}
=
"
FAIL"
;
//"
SUCCESS";
/// <summary>
/// <summary>
/// 返回信息,如非空,为错误原因。
/// 返回信息,如非空,为错误原因。
...
...
Edu.Common/WeChatPayAPIv3.Model/WxPayConst.cs
View file @
7a4404c1
...
@@ -20,7 +20,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model
...
@@ -20,7 +20,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model
/// 密钥,用商户平台上设置的APIv3密钥【微信商户平台—>账户设置—>API安全—>设置APIv3密钥】,记为key;
/// 密钥,用商户平台上设置的APIv3密钥【微信商户平台—>账户设置—>API安全—>设置APIv3密钥】,记为key;
/// 官方资料:https://kf.qq.com/faq/180830E36vyQ180830AZFZvu.html
/// 官方资料:https://kf.qq.com/faq/180830E36vyQ180830AZFZvu.html
/// </summary>
/// </summary>
public
static
string
APIV3Key
=>
"
WECHATPAY2-SHA256-RSA2048
"
;
public
static
string
APIV3Key
=>
"
8A6453965FB561BC90CC4CB290F26469
"
;
/// <summary>
/// <summary>
/// 直连商户的商户号,由微信支付生成并下发。
/// 直连商户的商户号,由微信支付生成并下发。
...
...
Edu.Common/WeChatPayAPIv3/WxPayHelper.cs
View file @
7a4404c1
...
@@ -79,12 +79,14 @@ namespace Edu.Common.WeChatPayAPIv3
...
@@ -79,12 +79,14 @@ namespace Edu.Common.WeChatPayAPIv3
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
// var bodyJson = new StringContent(req.ToJson(), Encoding.UTF8, "application/json");
// var bodyJson = new StringContent(req.ToJson(), Encoding.UTF8, "application/json");
var
bodyJson
=
new
StringContent
(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
req
),
Encoding
.
UTF8
,
"application/json"
);
var
bodyJson
=
new
StringContent
(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
req
),
Encoding
.
UTF8
,
"application/json"
);
var
resp
=
await
client
.
PostAsync
(
url
,
bodyJson
);
var
resp
=
await
client
.
PostAsync
(
url
,
bodyJson
);
// 注意!!! 这个resp只是http的结果,需要把接口具体返回的值读取出来,如果接口报错的话,这地方可以看到具体的错误信息,我就是在这里入坑的。
// 注意!!! 这个resp只是http的结果,需要把接口具体返回的值读取出来,如果接口报错的话,这地方可以看到具体的错误信息,我就是在这里入坑的。
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
// 如果下单成功,就解析返回的结果,把prepay_id解析出来
// 如果下单成功,就解析返回的结果,把prepay_id解析出来
// var viewModel = respStr.ToObject<WxPayRespModel>();
// var viewModel = respStr.ToObject<WxPayRespModel>();
Plugin
.
LogHelper
.
WriteInfo
(
respStr
);
var
viewModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayRespModel
>(
respStr
);
var
viewModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayRespModel
>(
respStr
);
return
viewModel
;
return
viewModel
;
}
}
...
@@ -99,6 +101,7 @@ namespace Edu.Common.WeChatPayAPIv3
...
@@ -99,6 +101,7 @@ namespace Edu.Common.WeChatPayAPIv3
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
resp
=
await
client
.
GetAsync
(
url
);
var
resp
=
await
client
.
GetAsync
(
url
);
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
Plugin
.
LogHelper
.
WriteInfo
(
"查询订单的支付结果信息:"
+
respStr
);
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayStatusRespModel
>(
respStr
);
// respStr.ToObject<WxPayStatusRespModel>();
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayStatusRespModel
>(
respStr
);
// respStr.ToObject<WxPayStatusRespModel>();
return
payModel
;
return
payModel
;
}
}
...
@@ -170,6 +173,7 @@ namespace Edu.Common.WeChatPayAPIv3
...
@@ -170,6 +173,7 @@ namespace Edu.Common.WeChatPayAPIv3
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
resp
=
await
client
.
GetAsync
(
url
);
var
resp
=
await
client
.
GetAsync
(
url
);
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
Plugin
.
LogHelper
.
WriteInfo
(
"查询订单的退款结果信息:"
+
respStr
);
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
QueryRefundsOrderRespModel
>(
respStr
);
//respStr.ToObject<QueryRefundsOrderRespModel>();
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
QueryRefundsOrderRespModel
>(
respStr
);
//respStr.ToObject<QueryRefundsOrderRespModel>();
return
payModel
;
return
payModel
;
}
}
...
...
Edu.Model/Entity/Course/RB_Class_Check.cs
View file @
7a4404c1
...
@@ -5,7 +5,7 @@ using VT.FW.DB;
...
@@ -5,7 +5,7 @@ using VT.FW.DB;
namespace
Edu.Model.Entity.Course
namespace
Edu.Model.Entity.Course
{
{
/// <summary>
/// <summary>
///
教室管理
实体类
///
班级学员签到
实体类
/// </summary>
/// </summary>
[
Serializable
]
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
...
@@ -78,6 +78,16 @@ namespace Edu.Model.Entity.Course
...
@@ -78,6 +78,16 @@ namespace Edu.Model.Entity.Course
/// </summary>
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 当前抵扣课时
/// </summary>
public
decimal
CurrentDeductionHours
{
get
;
set
;
}
/// <summary>
/// 是否连续缺课12课时
/// </summary>
public
int
IsAbsentHours
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 补课状态(1-正常,2-已处理,3-未处理)
/// 补课状态(1-正常,2-已处理,3-未处理)
/// </summary>
/// </summary>
...
...
Edu.Model/Entity/Course/RB_Finance_Config.cs
View file @
7a4404c1
...
@@ -71,5 +71,10 @@ namespace Edu.Model.Entity.Course
...
@@ -71,5 +71,10 @@ namespace Edu.Model.Entity.Course
/// 币种id
/// 币种id
/// </summary>
/// </summary>
public
int
CurrencyId
{
get
;
set
;
}
public
int
CurrencyId
{
get
;
set
;
}
/// <summary>
/// ClientID=74 的时候是学费收款账户id
/// </summary>
public
int
ClientID
{
get
;
set
;
}
}
}
}
}
Edu.Model/Entity/Course/RB_Order_Guest.cs
View file @
7a4404c1
...
@@ -190,5 +190,10 @@ namespace Edu.Model.Entity.Course
...
@@ -190,5 +190,10 @@ namespace Edu.Model.Entity.Course
/// 补课课时
/// 补课课时
/// </summary>
/// </summary>
public
int
MakeUpHours
{
get
;
set
;
}
public
int
MakeUpHours
{
get
;
set
;
}
/// <summary>
/// 学生头像
/// </summary>
public
string
StuIcon
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Course/RB_Class_Check_ViewModel.cs
View file @
7a4404c1
...
@@ -5,7 +5,10 @@ using Edu.Model.Entity.Course;
...
@@ -5,7 +5,10 @@ using Edu.Model.Entity.Course;
namespace
Edu.Model.ViewModel.Course
namespace
Edu.Model.ViewModel.Course
{
{
public
class
RB_Class_Check_ViewModel
:
RB_Class_Check
/// <summary>
/// 班级学员签到视图实体类
/// </summary>
public
class
RB_Class_Check_ViewModel
:
RB_Class_Check
{
{
/// <summary>
/// <summary>
/// 【查询使用】
/// 【查询使用】
...
@@ -35,5 +38,69 @@ namespace Edu.Model.ViewModel.Course
...
@@ -35,5 +38,69 @@ namespace Edu.Model.ViewModel.Course
/// 学员名称
/// 学员名称
/// </summary>
/// </summary>
public
string
GuestName
{
get
;
set
;
}
public
string
GuestName
{
get
;
set
;
}
/// <summary>
/// 学员状态
/// </summary>
public
int
GuestState
{
get
;
set
;
}
/// <summary>
/// 学员状态
/// </summary>
public
string
GuestStateStr
{
get
{
string
str
=
""
;
switch
(
this
.
GuestState
)
{
case
1
:
str
=
"正常"
;
break
;
case
2
:
str
=
"退学"
;
break
;
case
3
:
str
=
"申请退学中"
;
break
;
case
4
:
str
=
"驳回申请"
;
break
;
case
5
:
str
=
"停课"
;
break
;
}
return
str
;
}
}
/// <summary>
/// 班级名称
/// </summary>
public
string
ClassName
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
CourseName
{
get
;
set
;
}
/// <summary>
/// 教室名称
/// </summary>
public
string
RoomName
{
get
;
set
;
}
/// <summary>
/// 老师名称
/// </summary>
public
string
TeacherName
{
get
;
set
;
}
/// <summary>
/// 处理状态字符串
/// </summary>
public
string
MakeUpStatusStr
{
get
{
string
str
=
""
;
switch
(
this
.
MakeUpStatus
)
{
case
1
:
str
=
"正常"
;
break
;
case
2
:
str
=
"已处理"
;
break
;
case
3
:
str
=
"未处理"
;
break
;
}
return
str
;
}
}
}
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
7a4404c1
This diff is collapsed.
Click to expand it.
Edu.Module.Course/EducationContractModule.cs
View file @
7a4404c1
...
@@ -71,7 +71,10 @@ namespace Edu.Module.Course
...
@@ -71,7 +71,10 @@ namespace Edu.Module.Course
/// </summary>
/// </summary>
private
readonly
RB_Online_Trade_DetailRepository
OnlineTradeDetailRepository
=
new
RB_Online_Trade_DetailRepository
();
private
readonly
RB_Online_Trade_DetailRepository
OnlineTradeDetailRepository
=
new
RB_Online_Trade_DetailRepository
();
/// <summary>
/// 财务配置
/// </summary>
private
readonly
RB_Finance_ConfigRepository
finance_ConfigRepository
=
new
RB_Finance_ConfigRepository
();
/// <summary>
/// <summary>
/// 获取学员信息
/// 获取学员信息
...
@@ -324,6 +327,19 @@ namespace Edu.Module.Course
...
@@ -324,6 +327,19 @@ namespace Edu.Module.Course
#
region
合同订单信息
#
region
合同订单信息
/// <summary>
/// 获取财务配置列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Finance_Config_ViewModel
>
GetFinanceConfigList
(
RB_Finance_Config_ViewModel
dmodel
)
{
return
finance_ConfigRepository
.
GetList
(
dmodel
);
}
/// <summary>
/// <summary>
/// 新增合同的付款记录
/// 新增合同的付款记录
/// </summary>
/// </summary>
...
...
Edu.Module.Course/OrderModule.cs
View file @
7a4404c1
...
@@ -1525,6 +1525,13 @@ namespace Edu.Module.Course
...
@@ -1525,6 +1525,13 @@ namespace Edu.Module.Course
{
{
LogContent
+=
",总课时由【"
+
gModel
.
TotalHours
+
"】修改为【"
+
dmodel
.
TotalHours
+
"】"
;
LogContent
+=
",总课时由【"
+
gModel
.
TotalHours
+
"】修改为【"
+
dmodel
.
TotalHours
+
"】"
;
}
}
if
(
gModel
.
StuIcon
!=
dmodel
.
StuIcon
)
{
LogContent
+=
",学生头像由【"
+
gModel
.
StuIcon
+
"】修改为【"
+
dmodel
.
StuIcon
+
"】"
;
}
gModel
.
StuIcon
=
dmodel
.
StuIcon
;
gModel
.
TotalHours
=
dmodel
.
TotalHours
;
gModel
.
TotalHours
=
dmodel
.
TotalHours
;
gModel
.
UpdateTime
=
dmodel
.
UpdateTime
;
gModel
.
UpdateTime
=
dmodel
.
UpdateTime
;
...
@@ -1543,6 +1550,19 @@ namespace Edu.Module.Course
...
@@ -1543,6 +1550,19 @@ namespace Edu.Module.Course
School_Id
=
dmodel
.
School_Id
,
School_Id
=
dmodel
.
School_Id
,
SourceId
=
gModel
.
OrderId
SourceId
=
gModel
.
OrderId
});
});
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StuIcon
))
//更新学生表中的头像
{
var
orderGuestModel
=
student_OrderGuestRepository
.
GetStrOrderGuestListRepository
(
new
RB_Student_OrderGuest_ViewModel
{
ClassId
=
gModel
.
ClassId
,
OrderId
=
gModel
.
OrderId
,
GuestId
=
gModel
.
Id
}).
FirstOrDefault
();
if
(
orderGuestModel
!=
null
&&
orderGuestModel
.
Student_Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
StuIcon
),
dmodel
.
StuIcon
},
};
studentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
orderGuestModel
.
Student_Id
));
}
}
}
}
}
}
else
else
...
@@ -1603,12 +1623,13 @@ namespace Edu.Module.Course
...
@@ -1603,12 +1623,13 @@ namespace Edu.Module.Course
School_Id
=
classmodel
.
School_Id
,
School_Id
=
classmodel
.
School_Id
,
Status
=
DateStateEnum
.
Normal
,
Status
=
DateStateEnum
.
Normal
,
StuBirth
=
dmodel
.
BirthDate
,
StuBirth
=
dmodel
.
BirthDate
,
StuIcon
=
""
,
StuIcon
=
dmodel
.
StuIcon
,
StuName
=
dmodel
.
GuestName
,
StuName
=
dmodel
.
GuestName
,
StuSex
=
dmodel
.
Sex
-
1
,
StuSex
=
dmodel
.
Sex
-
1
,
StuTel
=
dmodel
.
Mobile
,
StuTel
=
dmodel
.
Mobile
,
UpdateBy
=
dmodel
.
CreateBy
,
UpdateBy
=
dmodel
.
CreateBy
,
UpdateTime
=
DateTime
.
Now
UpdateTime
=
DateTime
.
Now
,
});
});
int
AccountId
=
accountRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Account
()
int
AccountId
=
accountRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Account
()
{
{
...
@@ -1650,7 +1671,7 @@ namespace Edu.Module.Course
...
@@ -1650,7 +1671,7 @@ namespace Edu.Module.Course
Group_Id
=
dmodel
.
Group_Id
,
Group_Id
=
dmodel
.
Group_Id
,
LogContent
=
LogContent
,
LogContent
=
LogContent
,
School_Id
=
dmodel
.
School_Id
,
School_Id
=
dmodel
.
School_Id
,
SourceId
=
dmodel
.
OrderId
SourceId
=
dmodel
.
OrderId
,
});
});
}
}
}
}
...
...
Edu.Repository/Course/RB_Class_CheckRepository.cs
View file @
7a4404c1
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
7a4404c1
...
@@ -754,6 +754,70 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -754,6 +754,70 @@ namespace Edu.WebApi.Controllers.Course
}
}
/// <summary>
/// 获取缺课分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAbsentPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Class_Check_ViewModel
()
{
CheckStatus
=
1
,
IsAbsentHours
=
1
,
MakeUpStatus
=
base
.
ParmJObj
.
GetInt
(
"MakeUpStatus"
),
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
ClassName
=
base
.
ParmJObj
.
GetStringValue
(
"ClassName"
),
CourseName
=
base
.
ParmJObj
.
GetStringValue
(
"CourseName"
),
TeacherName
=
base
.
ParmJObj
.
GetStringValue
(
"TeacherName"
),
RoomName
=
base
.
ParmJObj
.
GetStringValue
(
"RoomName"
),
StartDate
=
base
.
ParmJObj
.
GetStringValue
(
"StartDate"
),
EndDate
=
base
.
ParmJObj
.
GetStringValue
(
"EndDate"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
classModule
.
GetClassCheckPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
result
.
Add
(
new
{
item
.
ClassCheckId
,
item
.
OrderGuestId
,
item
.
GuestName
,
item
.
GuestState
,
item
.
GuestStateStr
,
item
.
ClassId
,
item
.
ClassName
,
item
.
CourseName
,
item
.
School_Id
,
item
.
TeacherId
,
item
.
TeacherName
,
item
.
ClassRoomId
,
item
.
RoomName
,
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
item
.
MakeUpStatus
,
item
.
MakeUpStatusStr
});
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 修改补课状态
/// </summary>
/// <returns></returns>
public
ApiResult
SetMakeUpStatus
()
{
int
MakeUpStatus
=
base
.
ParmJObj
.
GetInt
(
"MakeUpStatus"
);
int
ClassCheckId
=
base
.
ParmJObj
.
GetInt
(
"ClassCheckId"
);
int
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
);
bool
flag
=
classModule
.
SetMakeUpStatusModule
(
MakeUpStatus
,
ClassCheckId
,
GuestId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// <summary>
/// 获取班级日志
/// 获取班级日志
/// </summary>
/// </summary>
...
@@ -1460,6 +1524,23 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1460,6 +1524,23 @@ namespace Edu.WebApi.Controllers.Course
bool
retult
=
classModule
.
UpdateTimeClassVideo
(
extModel
.
VideoUrl
,
extModel
.
ClassTimeId
);
bool
retult
=
classModule
.
UpdateTimeClassVideo
(
extModel
.
VideoUrl
,
extModel
.
ClassTimeId
);
return
retult
?
ApiResult
.
Success
(
"课堂视频更新成功"
)
:
ApiResult
.
Failed
(
"课堂视频更新失败"
);
return
retult
?
ApiResult
.
Success
(
"课堂视频更新成功"
)
:
ApiResult
.
Failed
(
"课堂视频更新失败"
);
}
}
/// <summary>
/// 获取学员列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Microsoft
.
AspNetCore
.
Authorization
.
AllowAnonymous
]
public
ApiResult
GetStudentByClassId
()
{
var
classId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
);
var
schoolId
=
0
;
var
Group_Id
=
base
.
ParmJObj
.
GetInt
(
"Group_Id"
,
100000
);
var
data
=
classModule
.
GetClassStudentListModule
(
classId
,
schoolId
,
Group_Id
);
return
ApiResult
.
Success
(
data
:
data
);
}
#
endregion
#
endregion
}
}
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
7a4404c1
...
@@ -883,6 +883,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -883,6 +883,7 @@ namespace Edu.WebApi.Controllers.Course
x
.
VolunteerMajor
,
x
.
VolunteerMajor
,
x
.
Price
,
x
.
Price
,
x
.
StudyRemark
,
x
.
StudyRemark
,
x
.
StuIcon
});
});
return
ApiResult
.
Success
(
""
,
pageModel
);
return
ApiResult
.
Success
(
""
,
pageModel
);
}
}
...
@@ -920,7 +921,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -920,7 +921,8 @@ namespace Edu.WebApi.Controllers.Course
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"
),
BirthDate
=
base
.
ParmJObj
.
GetDateTime
(
"BirthDate"
),
TotalHours
=
base
.
ParmJObj
.
GetInt
(
"TotalHours"
)
TotalHours
=
base
.
ParmJObj
.
GetInt
(
"TotalHours"
),
StuIcon
=
base
.
ParmJObj
.
GetStringValue
(
"StuIcon"
),
};
};
if
(
dmodel
.
OrderId
<=
0
)
if
(
dmodel
.
OrderId
<=
0
)
{
{
...
...
Edu.WebApi/Controllers/WeChatPay/WeChatPayController.cs
View file @
7a4404c1
This diff is collapsed.
Click to expand it.
Edu.WebApi/Timers/TimerJobj.cs
View file @
7a4404c1
...
@@ -34,7 +34,7 @@ namespace Edu.WebApi.Timers
...
@@ -34,7 +34,7 @@ namespace Edu.WebApi.Timers
}
}
/// <summary>
/// <summary>
/// 防止重
置
/// 防止重
复提交
/// </summary>
/// </summary>
private
static
int
inTimer
=
0
;
private
static
int
inTimer
=
0
;
private
static
int
inTimer2
=
0
;
private
static
int
inTimer2
=
0
;
...
@@ -91,6 +91,7 @@ namespace Edu.WebApi.Timers
...
@@ -91,6 +91,7 @@ namespace Edu.WebApi.Timers
/// <param name="e"></param>
/// <param name="e"></param>
public
static
void
DealDuty
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
public
static
void
DealDuty
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
double
addhours
=
1.5
;
if
(
Interlocked
.
Exchange
(
ref
inTimer2
,
1
)
==
0
)
if
(
Interlocked
.
Exchange
(
ref
inTimer2
,
1
)
==
0
)
{
{
var
list
=
dutyPlanModule
.
GetDutyPlanPageModule
(
1
,
20
,
out
_
,
new
Model
.
ViewModel
.
Duty
.
RB_Duty_Plan_ViewModel
()
var
list
=
dutyPlanModule
.
GetDutyPlanPageModule
(
1
,
20
,
out
_
,
new
Model
.
ViewModel
.
Duty
.
RB_Duty_Plan_ViewModel
()
...
@@ -104,8 +105,8 @@ namespace Edu.WebApi.Timers
...
@@ -104,8 +105,8 @@ namespace Edu.WebApi.Timers
{
{
foreach
(
var
subItem
in
item
.
PlanDetails
)
foreach
(
var
subItem
in
item
.
PlanDetails
)
{
{
var
endTime
=
Convert
.
ToDateTime
((
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
subItem
.
EndTime
)).
AddHours
(
2
);
var
endTime
=
Convert
.
ToDateTime
((
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
subItem
.
EndTime
)).
AddHours
(
addhours
);
if
(
subItem
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
NoStart
&&
endTime
<
DateTime
.
Now
)
if
(
subItem
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
NoStart
&&
endTime
<
DateTime
.
Now
)
{
{
dutyPlanModule
.
UpdateNoDutyModule
(
subItem
.
Id
);
dutyPlanModule
.
UpdateNoDutyModule
(
subItem
.
Id
);
}
}
...
@@ -113,7 +114,7 @@ namespace Edu.WebApi.Timers
...
@@ -113,7 +114,7 @@ namespace Edu.WebApi.Timers
}
}
}
}
var
list2
=
dutyPlanModule
.
GetDutyPlanPageModule
(
1
,
20
,
out
_
,
new
Model
.
ViewModel
.
Duty
.
RB_Duty_Plan_ViewModel
()
var
list2
=
dutyPlanModule
.
GetDutyPlanPageModule
(
1
,
20
,
out
_
,
new
Model
.
ViewModel
.
Duty
.
RB_Duty_Plan_ViewModel
()
{
{
QDutyStatus
=
1
,
QDutyStatus
=
1
,
QEndDate
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
)
QEndDate
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
)
...
@@ -122,7 +123,7 @@ namespace Edu.WebApi.Timers
...
@@ -122,7 +123,7 @@ namespace Edu.WebApi.Timers
{
{
foreach
(
var
subItem
in
item
.
PlanDetails
)
foreach
(
var
subItem
in
item
.
PlanDetails
)
{
{
var
endTime
=
Convert
.
ToDateTime
((
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
subItem
.
EndTime
)).
AddHours
(
2
);
var
endTime
=
Convert
.
ToDateTime
((
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
subItem
.
EndTime
)).
AddHours
(
addhours
);
if
(
subItem
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
DutyIng
&&
endTime
<
DateTime
.
Now
)
if
(
subItem
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
DutyIng
&&
endTime
<
DateTime
.
Now
)
{
{
dutyPlanModule
.
UpdateDutyFinishedModule
(
subItem
.
Id
);
dutyPlanModule
.
UpdateDutyFinishedModule
(
subItem
.
Id
);
...
@@ -132,6 +133,5 @@ namespace Edu.WebApi.Timers
...
@@ -132,6 +133,5 @@ namespace Edu.WebApi.Timers
Interlocked
.
Exchange
(
ref
inTimer2
,
0
);
Interlocked
.
Exchange
(
ref
inTimer2
,
0
);
}
}
}
}
}
}
}
}
\ No newline at end of file
Edu.WebApi/appsettings.json
View file @
7a4404c1
{
{
"ConnectionStrings"
:
{
"ConnectionStrings"
:
{
"DefaultConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_edu;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_edu;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=test_reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"FinanceConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=test_reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
"DataStatisticsConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_datastatistics;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DataStatisticsConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_datastatistics;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DataStatisticsConnectionPName"
:
"MySql.Data.MySqlClient"
,
"DataStatisticsConnectionPName"
:
"MySql.Data.MySqlClient"
,
"LogConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_sys;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"LogConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_sys;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"LogConnectionPName"
:
"MySql.Data.MySqlClient"
"LogConnectionPName"
:
"MySql.Data.MySqlClient"
},
},
"Logging"
:
{
"Logging"
:
{
"LogLevel"
:
{
"LogLevel"
:
{
"Default"
:
"Information"
,
"Default"
:
"Information"
,
"Microsoft"
:
"Warning"
,
"Microsoft"
:
"Warning"
,
"Microsoft.Hosting.Lifetime"
:
"Information"
"Microsoft.Hosting.Lifetime"
:
"Information"
}
}
},
},
"SettlementRate"
:
"0.60"
,
"SettlementRate"
:
"0.60"
,
"JwtSecretKey"
:
"@VIITTOREBORN*2018"
,
"JwtSecretKey"
:
"@VIITTOREBORN*2018"
,
"JwtExpirTime"
:
86400
,
"JwtExpirTime"
:
86400
,
"IsSendMsg"
:
2
,
"IsSendMsg"
:
2
,
"AllowedHosts"
:
"*"
,
"AllowedHosts"
:
"*"
,
"OpenValidation"
:
"False"
,
"OpenValidation"
:
"False"
,
"UploadSiteUrl"
:
"http://192.168.1.36:8120"
,
"UploadSiteUrl"
:
"http://192.168.1.36:8120"
,
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ErpViewFileSiteUrl"
:
"http://imgfile.oytour.com"
,
"ErpViewFileSiteUrl"
:
"http://imgfile.oytour.com"
,
"Mongo"
:
"mongodb://47.96.25.130:27017"
,
"Mongo"
:
"mongodb://47.96.25.130:27017"
,
"MongoDBName"
:
"Edu"
,
"MongoDBName"
:
"Edu"
,
"WkHtmlToPdfPath"
:
"D:/wkhtmltopdf/bin/"
,
"WkHtmlToPdfPath"
:
"D:/wkhtmltopdf/bin/"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"PaymentFinanceApi"
:
"http://192.168.1.13:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.1.13:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"IncomeFinanceApi"
:
"http://192.168.20.9:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"IncomeFinanceApi"
:
"http://192.168.20.9:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"sTenpayNotifyUrl"
:
"http://eduapi.oytour.com/api/WeChatPay/WxPayCallback"
,
//下单回调地址
"sTenpayNotifyUrl"
:
"http://eduapi.oytour.com/api/WeChatPay/WxPayCallback"
,
//下单回调地址
"sTenpayNotifyRefundUrl"
:
"http://eduapi.oytour.com/api/WeChatPay/Refunds"
,
//退款回调地址
"sTenpayNotifyRefundUrl"
:
"http://eduapi.oytour.com/api/WeChatPay/Refunds"
,
//退款回调地址
"FinanceDateBase"
:
"test_reborn_finance"
,
"FinanceDateBase"
:
"test_reborn_finance"
,
"RabbitMqConfig"
:
{
"RabbitMqConfig"
:
{
"HostName"
:
"47.96.25.130"
,
"HostName"
:
"47.96.25.130"
,
"VirtualHost"
:
"/"
,
"VirtualHost"
:
"/"
,
"Port"
:
5672
,
"Port"
:
5672
,
"UserName"
:
"guest"
,
"UserName"
:
"guest"
,
"Password"
:
"viitto2019"
,
"Password"
:
"viitto2019"
,
"QueenName"
:
"vt_sys_message_test"
"QueenName"
:
"vt_sys_message_test"
},
},
"RedisSetting"
:
{
"RedisSetting"
:
{
"RedisServer"
:
"47.96.23.199"
,
"RedisServer"
:
"47.96.23.199"
,
"RedisPort"
:
"6379"
,
"RedisPort"
:
"6379"
,
"RedisPwd"
:
"Viitto2018"
"RedisPwd"
:
"Viitto2018"
},
},
"VirtualDirectory"
:
"WebFile"
,
"VirtualDirectory"
:
"WebFile"
,
//未填写
未打分
下降比例
//未填写
未打分
下降比例
"OKRMatterValue"
:
"30,100,100"
,
"OKRMatterValue"
:
"30,100,100"
,
//是否是线上环境
//是否是线上环境
"IsOnline"
:
false
,
"IsOnline"
:
false
,
//退课流程编号
//退课流程编号
"BackClassFlowId"
:
1
,
"BackClassFlowId"
:
1
,
//分区校长岗位编号
//分区校长岗位编号
"SchoolPostId"
:
3
,
"SchoolPostId"
:
3
,
//教务长
//教务长
"JiaoWuZhang"
:
8
,
"JiaoWuZhang"
:
8
,
//留学就业部门主管审核编号
[
王涛
]
//留学就业部门主管审核编号
[
王涛
]
"StudyAbroadDirectorId"
:
64
,
"StudyAbroadDirectorId"
:
64
,
//留学就业部门负责人审核编号
[
姚顺先
]
//留学就业部门负责人审核编号
[
姚顺先
]
"StudyAbroadManagerId"
:
52
,
"StudyAbroadManagerId"
:
52
,
//合同默认抬头
//合同默认抬头
"ContractDefaultTitle"
:
"JH-DZ-CD-"
,
"ContractDefaultTitle"
:
"JH-DZ-CD-"
,
//消息推送AppId
//消息推送AppId
"PushAppId"
:
"JiaHeJiaoYu"
,
"PushAppId"
:
"JiaHeJiaoYu"
,
//是否推送消息
//是否推送消息
"IsPushMessage"
:
"1"
,
"IsPushMessage"
:
"1"
,
//超过下班时间
60
分钟不能打卡
//超过下班时间
60
分钟不能打卡
"MoreThanMinutes"
:
60
"MoreThanMinutes"
:
60
,
//连续缺课课时
"AbsentHours"
:
12
}
}
\ No newline at end of file
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