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
a0be93d8
Commit
a0be93d8
authored
Mar 16, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
19887680
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
55 deletions
+66
-55
CustomerRemitModule.cs
Edu.Module.Customer/CustomerRemitModule.cs
+62
-52
B2BRemitController.cs
Edu.WebApi/Controllers/Customer/B2BRemitController.cs
+4
-3
No files found.
Edu.Module.Customer/CustomerRemitModule.cs
View file @
a0be93d8
...
...
@@ -6,6 +6,7 @@ using Edu.Model.ViewModel.Customer;
using
Edu.Model.ViewModel.Finance
;
using
Edu.Repository.Customer
;
using
Edu.Repository.Finance
;
using
Edu.Repository.User
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -47,12 +48,17 @@ namespace Edu.Module.Customer
/// <summary>
/// 用户返佣
/// </summary>
private
readonly
R
epository
.
User
.
RB_User_ReturnComissionRepository
user_ReturnComissionRepository
=
new
Repository
.
User
.
RB_User_ReturnComissionRepository
();
private
readonly
R
B_User_ReturnComissionRepository
user_ReturnComissionRepository
=
new
RB_User_ReturnComissionRepository
();
/// <summary>
/// 订单返佣
/// </summary>
private
readonly
Repository
.
Sell
.
RB_Order_ReturnComissionRepository
order_ReturnComissionRepository
=
new
Repository
.
Sell
.
RB_Order_ReturnComissionRepository
();
/// <summary>
/// 员工信息仓储层对象
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
#
region
提现管理
...
...
@@ -96,30 +102,32 @@ namespace Edu.Module.Customer
var
rmodel
=
customer_RemitRepository
.
GetEntity
(
remitId
);
if
(
rmodel
==
null
)
{
return
"提现不存在"
;
}
if
(
rmodel
.
AuditStatus
!=
1
)
{
return
"提现状态不正确"
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Customer_Remit_Extend
.
AuditRemark
),
remark
}
,
{
nameof
(
RB_Customer_Remit_Extend
.
AuditDate
),
DateTime
.
Now
}
};
//审核通过
if
(
state
==
1
)
{
//审核通过
keyValues
.
Add
(
nameof
(
RB_Customer_Remit_Extend
.
AuditStatus
),
2
);
keyValues
.
Add
(
nameof
(
RB_Customer_Remit_Extend
.
AuditRemark
),
remark
);
keyValues
.
Add
(
nameof
(
RB_Customer_Remit_Extend
.
AuditDate
),
DateTime
.
Now
);
}
//审核驳回
else
if
(
state
==
2
)
{
//审核驳回
keyValues
.
Add
(
nameof
(
RB_Customer_Remit_Extend
.
AuditStatus
),
4
);
keyValues
.
Add
(
nameof
(
RB_Customer_Remit_Extend
.
RejectRemark
),
remark
);
keyValues
.
Add
(
nameof
(
RB_Customer_Remit_Extend
.
RejectDate
),
DateTime
.
Now
);
}
else
{
return
"状态有误,请核实后再试"
;
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Customer_Remit_Extend
.
Id
),
FiledValue
=
remitId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
remitId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
customer_RemitRepository
.
Update
(
keyValues
,
wheres
);
...
...
@@ -129,6 +137,7 @@ namespace Edu.Module.Customer
{
var
cmodel
=
customerRepository
.
GetEntity
(
rmodel
.
CustomerId
);
var
amodel
=
customer_AccountRepository
.
GetEntity
(
rmodel
.
BankAccountId
);
var
employeeModel
=
accountRepository
.
GetEmployeeInfo
(
cmodel
.
CreateBy
);
//同意需要制财务单据
#
region
新增财务单据
var
fcmodel
=
new
RB_Finance_Config_ViewModel
();
...
...
@@ -180,11 +189,13 @@ namespace Edu.Module.Customer
{
nameof
(
RB_ClientBankAccount_Extend
.
AccountHolder
),
amodel
.
AccountHolder
},
{
nameof
(
RB_ClientBankAccount_Extend
.
OpenBankName
),
amodel
.
AccountBank
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_ClientBankAccount_Extend
.
ID
),
FiledValue
=
clientModel
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
clientModel
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
clientBankAccountRepository
.
Update
(
keyValues1
,
wheres1
);
...
...
@@ -192,20 +203,11 @@ namespace Edu.Module.Customer
}
decimal
TotalMoney
=
rmodel
.
AppliedMoney
;
//var detailList = new
//{
// fcmodel.CostTypeId,
// Number = 1,
// OriginalMoney = rmodel.AppliedMoney,
// UnitPrice = rmodel.AppliedMoney,
// Remark = "同业" + (rmodel.Type == 1 ? "佣金" : "幸福存折") + "提现:" + cmodel.CustomerName + "(" + cmodel.ContactNumber + ")"
//};
var
detailList
=
new
List
<
object
>
{
new
{
fcmodel
.
CostTypeId
,
fcmodel
.
CostTypeId
,
Number
=
1
,
OriginalMoney
=
rmodel
.
AppliedMoney
,
UnitPrice
=
rmodel
.
AppliedMoney
,
...
...
@@ -227,14 +229,14 @@ namespace Edu.Module.Customer
ReFinanceId
=
rmodel
.
Id
,
Remark
,
detailList
,
CreateBy
=
userInfo
.
Id
,
RB_Branch_Id
=
userInfo
.
School_Id
,
RB_Depart_Id
=
userInfo
.
Dept
Id
,
RB_Group_Id
=
userInfo
.
Group_Id
,
RB_CreateByName
=
userInfo
.
Account
Name
,
RB_DepartName
=
userInfo
.
DeptName
,
RB_BranchName
=
userInfo
.
SchoolName
,
RB_GroupName
=
userInfo
.
GroupName
,
CreateBy
=
employeeModel
.
Id
,
RB_Branch_Id
=
employeeModel
.
School_Id
,
RB_Depart_Id
=
employeeModel
.
Dept_
Id
,
RB_Group_Id
=
employeeModel
.
Group_Id
,
RB_CreateByName
=
employeeModel
.
Employee
Name
,
RB_DepartName
=
employeeModel
.
DeptName
,
RB_BranchName
=
employeeModel
.
SchoolName
,
RB_GroupName
=
employeeModel
.
GroupName
,
FinanceType
=
2
};
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
ReadConfigKey
(
"FinanceKey"
));
...
...
@@ -255,11 +257,13 @@ namespace Edu.Module.Customer
{
nameof
(
RB_Customer_Remit_Extend
.
FinanceId
),
frid
},
{
nameof
(
RB_Customer_Remit_Extend
.
AuditRemark
),
remark
+
" 自动生成财务单据:"
+
frid
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Customer_Remit_Extend
.
Id
),
FiledValue
=
rmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
rmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
customer_RemitRepository
.
Update
(
keyValues1
,
wheres1
);
...
...
@@ -274,10 +278,11 @@ namespace Edu.Module.Customer
{
nameof
(
RB_Customer_Remit_Extend
.
AuditRemark
),
remark
+
" 自动生成财务单据失败,请联系管理员"
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Customer_Remit_Extend
.
Id
),
FiledValue
=
rmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
rmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
customer_RemitRepository
.
Update
(
keyValues1
,
wheres1
);
...
...
@@ -290,25 +295,30 @@ namespace Edu.Module.Customer
var
urmodel
=
user_ReturnComissionRepository
.
GetList
(
new
Model
.
ViewModel
.
User
.
RB_User_ReturnComission_ViewModel
()
{
GroupId
=
userInfo
.
Group_Id
,
UserId
=
rmodel
.
CustomerId
,
UserType
=
Common
.
Enum
.
User
.
StuCreateTypeEnum
.
CustomerInput
,
CommissionType
=
rmodel
.
Type
}).
FirstOrDefault
();
if
(
urmodel
!=
null
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
Model
.
ViewModel
.
User
.
RB_User_ReturnComission_ViewModel
.
CanCashOutMoney
),
urmodel
.
CanCashOutMoney
+
rmodel
.
AppliedMoney
},
{
nameof
(
Model
.
ViewModel
.
User
.
RB_User_ReturnComission_ViewModel
.
CashOutMoney
),
urmodel
.
CashOutMoney
-
rmodel
.
AppliedMoney
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
Model
.
ViewModel
.
User
.
RB_User_ReturnComission_ViewModel
.
UserId
),
FiledValue
=
urmodel
.
UserId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
urmodel
.
UserId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
Model
.
ViewModel
.
User
.
RB_User_ReturnComission_ViewModel
.
UserType
),
FiledValue
=
urmodel
.
UserType
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
urmodel
.
UserType
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
Model
.
ViewModel
.
User
.
RB_User_ReturnComission_ViewModel
.
CommissionType
),
FiledValue
=
urmodel
.
CommissionType
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
urmodel
.
CommissionType
,
OperatorEnum
=
OperatorEnum
.
Equal
},
};
user_ReturnComissionRepository
.
Update
(
keyValues1
,
wheres1
);
...
...
Edu.WebApi/Controllers/Customer/B2BRemitController.cs
View file @
a0be93d8
...
...
@@ -77,16 +77,17 @@ namespace Edu.WebApi.Controllers.Customer
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCustomerRemitState
()
{
public
ApiResult
SetCustomerRemitState
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
Msg
.
ToString
());
int
RemitId
=
parms
.
GetInt
(
"RemitId"
,
0
);
int
State
=
parms
.
GetInt
(
"State"
,
1
);
//状态 1审核通过 2审核驳回
string
Remark
=
parms
.
GetStringValue
(
"Remark"
);
//备注
if
(
RemitId
<=
0
)
{
if
(
RemitId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递提现ID"
);
}
string
msg
=
customerRemitModule
.
SetCustomerRemitState
(
RemitId
,
State
,
Remark
,
userInfo
);
if
(
msg
==
""
)
{
...
...
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