Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
00faf639
Commit
00faf639
authored
Aug 05, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp调用接口
parent
28c8b2ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
1 deletion
+84
-1
UserModule.cs
Mall.Module.User/UserModule.cs
+3
-1
ERPOrderCommissionController.cs
...ebApi/Controllers/Finance/ERPOrderCommissionController.cs
+81
-0
No files found.
Mall.Module.User/UserModule.cs
View file @
00faf639
...
...
@@ -5822,9 +5822,11 @@ namespace Mall.Module.User
if
(
model
.
BillState
!=
1
)
{
return
"账单状态不正确"
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Distributor_Bill
.
BillState
),
2
},
{
nameof
(
RB_Distributor_Bill
.
EmpId
),
empId
},
{
nameof
(
RB_Distributor_Bill
.
UpdateDate
),
DateTime
.
Now
}
};
if
(
empId
>
0
)
{
keyValues
.
Add
(
nameof
(
RB_Distributor_Bill
.
EmpId
),
empId
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Distributor_Bill
.
Id
),
...
...
Mall.WebApi/Controllers/Finance/ERPOrderCommissionController.cs
View file @
00faf639
...
...
@@ -195,5 +195,86 @@ namespace Mall.WebApi.Controllers.Finance
}
#
endregion
#
region
推荐账单
/// <summary>
/// 账单打款
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetRecommendOrdersBillRemit
(
object
request
)
{
JObject
parms1
=
JObject
.
Parse
(
request
.
ToString
());
string
rmsg
=
EncryptionHelper
.
AesDecrypt
(
parms1
.
GetStringValue
(
"msg"
),
Config
.
FinanceKey
);
int
TenantId
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"FinanceSetting"
)[
"TenantId"
]);
int
MallBaseId
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"FinanceSetting"
)[
"MallBaseId"
]);
var
parms
=
JObject
.
Parse
(
rmsg
.
ToString
());
int
BillId
=
parms
.
GetInt
(
"BillId"
,
0
);
if
(
BillId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
bmodel
=
userModule
.
GetBillModel
(
BillId
);
if
(
bmodel
==
null
)
{
return
ApiResult
.
Failed
(
"账单不存在"
);
}
if
(
bmodel
.
BillState
!=
1
)
{
return
ApiResult
.
Failed
(
"账单状态不正确"
);
}
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
if
(
IsNormalServer
==
1
)
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
MallBaseId
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
bmodel
.
UserId
??
0
);
var
flag
=
App_Code
.
PayUtil
.
GetTransfersOrder
((
bmodel
.
Periods
??
""
)
+
bmodel
.
Id
,
bmodel
.
Money
??
0
,
(
bmodel
.
UserId
??
0
).
ToString
(),
umodel
.
OpenId
,
mallModel
,
_accessor
);
if
(
flag
)
{
string
msg
=
userModule
.
SetRecommendOrdersBillRemit
(
BillId
,
TenantId
,
MallBaseId
,
0
);
if
(
msg
!=
""
)
{
LogHelper
.
Write
(
"企业付款失败 账单BillId:"
+
BillId
);
}
new
MiniProgramMsgModule
().
SendWithdrawSucceedMsg
(
TenantId
,
MallBaseId
,
umodel
.
OpenId
,
(
bmodel
.
Money
??
0
).
ToString
(),
"0"
,
"自动打款"
,
"已发放推荐佣金,请注意查收"
);
return
ApiResult
.
Success
();
}
else
{
LogHelper
.
Write
(
"企业付款失败 账单BillId:"
+
BillId
);
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
else
{
string
msg
=
userModule
.
SetRecommendOrdersBillRemit
(
BillId
,
TenantId
,
MallBaseId
,
0
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
}
/// <summary>
/// 获取账单明细
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetRecommendOrdersBillDetailList
(
object
request
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
request
.
ToString
());
RB_Distributor_BillDetail_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Distributor_BillDetail_Extend
>(
requestParm
.
msg
.
ToString
());
demodel
.
TenantId
=
requestParm
.
TenantId
;
demodel
.
MallBaseId
=
requestParm
.
MallBaseId
;
if
((
demodel
.
BillId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递账单id"
);
}
var
Robj
=
userModule
.
GetRecommendOrdersBillDetailList
(
demodel
);
return
ApiResult
.
Success
(
""
,
Robj
);
}
#
endregion
}
}
\ 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