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
6a23e57b
Commit
6a23e57b
authored
Mar 09, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0eb568f1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
14 deletions
+85
-14
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+47
-13
RB_Education_ContractRepository.cs
Edu.Repository/Contract/RB_Education_ContractRepository.cs
+15
-0
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+14
-1
TimedTaskServices.cs
Edu.WebApi/Timers/TimedTaskServices.cs
+9
-0
No files found.
Edu.Module.Course/EducationContractModule.cs
View file @
6a23e57b
...
...
@@ -153,7 +153,7 @@ namespace Edu.Module.Course
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
),
FirstClassHours
=
(
courseModel
?.
ClassHours
??
0
)
-
(
orderModel
?.
StartClassHours
??
0
),
FirstCourseFee
=
PreferPrice
,
FirstBookFee
=
0
,
FirstClassFee
=
0
,
...
...
@@ -523,7 +523,7 @@ namespace Edu.Module.Course
model
.
GroupSealImg
=
gmodel
?.
SealImage
??
""
;
if
(
model
.
OrderId
>
0
)
{
var
orderModel
=
orderRepository
.
GetEntity
(
model
.
OrderId
);
var
orderModel
=
orderRepository
.
GetEntity
(
model
.
OrderId
);
if
(
orderModel
.
CourseId
>
0
)
{
model
.
CourseContracrInfo
=
courseRepository
.
GetEntity
(
orderModel
.
CourseId
)?.
ContractInfo
??
""
;
...
...
@@ -579,7 +579,7 @@ namespace Edu.Module.Course
});
}
}
else
if
(
state
==
2
||
state
==
3
||
state
==
6
)
else
if
(
state
==
2
||
state
==
3
||
state
==
6
)
{
var
notifyObj
=
accountRepository
.
GetEntity
(
model
.
CreateBy
);
if
(
notifyObj
!=
null
&&
!
string
.
IsNullOrEmpty
(
notifyObj
.
WorkUserId
))
...
...
@@ -657,13 +657,13 @@ namespace Edu.Module.Course
});
}
}
else
if
(
state
==
2
||
state
==
3
||
state
==
6
)
else
if
(
state
==
2
||
state
==
3
||
state
==
6
)
{
var
notifyObj
=
accountRepository
.
GetEntity
(
model
.
CreateBy
);
if
(
notifyObj
!=
null
&&
!
string
.
IsNullOrEmpty
(
notifyObj
.
WorkUserId
))
{
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/sale/contractManage?no=
{
model
.
ContractNo
}
"
);
var
content
=
$"
{((
state
==
2
||
state
==
6
)
?
"<font color='info'>合同审核通过</font>"
:
"`合同审核驳回`"
)}
你收到了一份合同审批结果通知\n>**概要信息** \n>审 批 人:<font color='comment'>
{
userInfo
.
AccountName
}
</font>\n>合同编号:<font color='comment'>
{
model
.
ContractNo
}
</font>\n>合同类型:<font color='warning'>
{
EnumHelper
.
ToName
(
model
.
CType
)}
合同</font> \n>订单编号:<font color='comment'>
{
model
.
OrderId
}
</font>\n>合同金额:<font color='info'>
{
model
.
Money
:
C
}
</font>\n>请点击:[查看合同](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
notifyObj
.
Id
}
&target=
{
recipientPath
}
)"
;
var
content
=
$"
{((
state
==
2
||
state
==
6
)
?
"<font color='info'>合同审核通过</font>"
:
"`合同审核驳回`"
)}
你收到了一份合同审批结果通知\n>**概要信息** \n>审 批 人:<font color='comment'>
{
userInfo
.
AccountName
}
</font>\n>合同编号:<font color='comment'>
{
model
.
ContractNo
}
</font>\n>合同类型:<font color='warning'>
{
EnumHelper
.
ToName
(
model
.
CType
)}
合同</font> \n>订单编号:<font color='comment'>
{
model
.
OrderId
}
</font>\n>合同金额:<font color='info'>
{
model
.
Money
:
C
}
</font>\n>请点击:[查看合同](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
notifyObj
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
notifyObj
.
WorkUserId
,
"合同审批通知"
);
}
}
...
...
@@ -689,7 +689,7 @@ namespace Edu.Module.Course
/// <param name="sign"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
bool
SetEducationContractSignModule
(
int
contractId
,
string
sign
,
string
StuIDCard
)
public
bool
SetEducationContractSignModule
(
int
contractId
,
string
sign
,
string
StuIDCard
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -838,9 +838,9 @@ namespace Edu.Module.Course
{
var
guestModel
=
student_OrderGuestRepository
.
GetModelByBackId
(
id
);
var
model
=
returnComissionRepository
.
GetModelByOrderIdStuId
(
guestModel
.
OrderId
,
guestModel
.
Student_Id
);
if
(
model
!=
null
&&
(
model
.
Status
==
0
||
model
.
Status
==
1
))
if
(
model
!=
null
&&
(
model
.
Status
==
0
||
model
.
Status
==
1
))
{
var
userModel
=
userReturnComissionRepository
.
GetModelBySourceId
((
int
)
model
.
OrderSourceType
,
model
.
OrderSourceId
,
model
.
CommissionType
);
var
userModel
=
userReturnComissionRepository
.
GetModelBySourceId
((
int
)
model
.
OrderSourceType
,
model
.
OrderSourceId
,
model
.
CommissionType
);
userModel
.
SttlementMoney
-=
model
.
CommissionMoeny
;
if
(
model
.
Status
==
1
)
{
...
...
@@ -907,7 +907,7 @@ namespace Edu.Module.Course
/// <param name="IsSure">是否销售确认(1-是)</param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
SetBackClassProtocolSureModule
(
int
Id
,
int
IsSure
,
int
ClientId
,
UserInfo
user
,
out
string
message
)
public
virtual
bool
SetBackClassProtocolSureModule
(
int
Id
,
int
IsSure
,
int
ClientId
,
UserInfo
user
,
out
string
message
)
{
bool
flag
=
false
;
message
=
""
;
...
...
@@ -936,7 +936,7 @@ namespace Edu.Module.Course
}
if
(
flag
)
{
message
=
studentBillModule
.
SetStudentBackFinance
(
Convert
.
ToInt32
(
extModel
.
BackId
),
ClientId
,
user
);
message
=
studentBillModule
.
SetStudentBackFinance
(
Convert
.
ToInt32
(
extModel
.
BackId
),
ClientId
,
user
);
if
(!
string
.
IsNullOrEmpty
(
message
))
{
flag
=
false
;
...
...
@@ -964,5 +964,39 @@ namespace Edu.Module.Course
{
return
student_BackClassRepository
.
GetStudentBackClassInfo
(
Student_Id
,
Group_Id
);
}
/// <summary>
/// 更新合同金额、优惠和订单不一致的合同
/// </summary>
/// <returns></returns>
public
bool
UpdateEducationAnomalyContractModule
()
{
bool
flag
=
false
;
var
contractList
=
education_ContractRepository
.
GetEducationAnomalyContractListRepository
();
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
});
foreach
(
var
item
in
contractList
)
{
var
orderModel
=
orderList
.
FirstOrDefault
(
qitem
=>
qitem
.
OrderId
==
item
.
OrderId
);
if
(
orderModel
!=
null
)
{
decimal
Money
=
(
orderModel
.
PreferPrice
-
orderModel
.
DiscountMoney
);
string
dxMoney
=
StringHelper
.
MoneyToUpper
(
Money
.
ToString
());
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Education_Contract_ViewModel
.
FirstCourseFee
),
orderModel
.
PreferPrice
},
{
nameof
(
RB_Education_Contract_ViewModel
.
FirstDiscountMoney
),
orderModel
.
DiscountMoney
},
{
nameof
(
RB_Education_Contract_ViewModel
.
FirstMoney
),
Money
},
{
nameof
(
RB_Education_Contract_ViewModel
.
Money
),
Money
},
{
nameof
(
RB_Education_Contract_ViewModel
.
CNYCaps
),
dxMoney
}
};
flag
=
education_ContractRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Education_Contract_ViewModel
.
Id
),
item
.
Id
));
}
}
}
return
flag
;
}
}
}
\ No newline at end of file
Edu.Repository/Contract/RB_Education_ContractRepository.cs
View file @
6a23e57b
...
...
@@ -359,5 +359,20 @@ where ec.Status =2 and og.`Status`=0 and o.OrderState =1 and sog.`Status`=0 and
return
Get
<
RB_Education_Contract_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 查询合同和订单金额、优惠不相同的数据
/// </summary>
/// <returns></returns>
public
List
<
RB_Education_Contract_ViewModel
>
GetEducationAnomalyContractListRepository
()
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.Id,A.CType,A.OrderId,A.GuestId,A.ContractNo,A.StudentName,A.School_Id,A.SchoolName,A.FirstCourseFee,A.FirstDiscountMoney,A.FirstMoney,A.Money,B.PreferPrice,B.Income,B.PlatformTax,B.DiscountMoney,B.Refund
FROM rb_education_contract AS A INNER JOIN RB_order AS B ON A.OrderId=B.OrderId
WHERE B.OrderState=1 AND A.School_Id =0 and (A.Money<>(B.PreferPrice-B.DiscountMoney))
"
);
return
Get
<
RB_Education_Contract_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.WebApi/Controllers/User/LoginController.cs
View file @
6a23e57b
...
...
@@ -64,6 +64,19 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
();
}
/// <summary>
/// 更新合同金额、优惠信息
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
TestContract
()
{
new
EducationContractModule
().
UpdateEducationAnomalyContractModule
();
return
ApiResult
.
Success
();
}
/// <summary>
/// 用户登录
/// </summary>
...
...
Edu.WebApi/Timers/TimedTaskServices.cs
View file @
6a23e57b
using
Edu.Cache.User
;
using
Edu.Model.CacheModel
;
using
Edu.Module.Course
;
using
Edu.Module.Customer
;
using
Edu.Module.User
;
using
Microsoft.Extensions.Hosting
;
...
...
@@ -34,6 +35,11 @@ namespace Edu.WebApi.Timers
/// </summary>
private
static
readonly
StudentStatModule
studentStatModule
=
new
StudentStatModule
();
/// <summary>
/// 教育合同处理类
/// </summary>
private
static
readonly
EducationContractModule
educationContractModule
=
new
EducationContractModule
();
private
static
int
marketconsultant_Timer
=
0
;
public
Task
StartAsync
(
CancellationToken
cancellationToken
)
...
...
@@ -105,6 +111,9 @@ namespace Edu.WebApi.Timers
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateTeacherStaticModule:"
+
startDate
);
}
Common
.
Plugin
.
LogHelper
.
Write
(
"DealMarketConsultantData========End"
);
educationContractModule
.
UpdateEducationAnomalyContractModule
();
Common
.
Plugin
.
LogHelper
.
Write
(
"更新合同金额========End"
);
Interlocked
.
Exchange
(
ref
marketconsultant_Timer
,
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