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
3e2900cf
Commit
3e2900cf
authored
Jun 16, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
f4b92651
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+10
-6
No files found.
Mall.WindowsService/Module/FinanceModule.cs
View file @
3e2900cf
...
...
@@ -123,6 +123,8 @@ namespace Mall.WindowsService.Module
builder
.
AppendFormat
(
$@" SELECT a.*,b.OrderNo from rb_goods_orderdetail as a LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId
where b.TenantId=1 and b.MallBaseId=1 and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('
{
startDate
}
','%y-%m-%d')
and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('
{
endDate
}
','%y-%m-%d') and b.OrderStatus in(2,3,4,5,6) "
);
Helper
.
LogHelper
.
Write
(
"sql语句:"
+
builder
.
ToString
());
var
goodsDetailList
=
goodsOrderDetailRepository
.
Get
<
RB_Goods_OrderDetail_Extend
>(
builder
.
ToString
()).
ToList
();
var
result
=
new
List
<
RB_Goods_OrderDetail_Extend
>();
...
...
@@ -213,7 +215,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
{
record
.
FinanceId
=
frid
;
int
recordId
=
financeRecordRepository
.
Insert
(
record
);
Helper
.
LogHelper
.
Write
(
"财务单据ID:"
+
frid
+
",记录id:"
+
recordId
+
"订单数量:"
+
record
.
RecordDetailList
.
Count
());
Helper
.
LogHelper
.
Write
(
"财务单据ID:"
+
frid
+
",记录id:"
+
recordId
+
"订单数量:"
+
record
.
RecordDetailList
.
Count
());
record
.
RecordDetailList
.
ForEach
(
x
=>
x
.
RecordId
=
recordId
);
record
.
RecordDetailList
.
ForEach
(
x
=>
x
.
FinanceId
=
frid
);
flag
=
financeRecordDetailRepository
.
InsertBatch
(
record
.
RecordDetailList
);
...
...
@@ -245,7 +247,8 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
/// 自动取消订单
/// </summary>
/// <returns></returns>
public
static
bool
AutoCancelOrder
()
{
public
static
bool
AutoCancelOrder
()
{
try
{
var
list
=
mallBaseRepository
.
GetListRepository
(
new
Mall
.
Model
.
Extend
.
BaseSetUp
.
RB_MallBase_Extend
()
{
});
...
...
@@ -258,7 +261,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
foreach
(
var
qitem
in
olist
)
{
try
{
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
};
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
OrderStatusEnum
.
Cancel
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
CancelTime
),
DateTime
.
Now
);
...
...
@@ -450,7 +453,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
{
Helper
.
LogHelper
.
Write
(
"AutoCancelOrder:"
+
ex
.
Message
);
return
false
;
}
}
}
#
endregion
...
...
@@ -461,7 +464,8 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
/// 自动收货
/// </summary>
/// <returns></returns>
public
static
bool
AutoReceivingOrder
()
{
public
static
bool
AutoReceivingOrder
()
{
try
{
var
list
=
mallBaseRepository
.
GetListRepository
(
new
Mall
.
Model
.
Extend
.
BaseSetUp
.
RB_MallBase_Extend
()
{
});
...
...
@@ -502,7 +506,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
bool
flag
=
goods_OrderRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
goods_LogRepository
.
Insert
(
new
Mall
.
Model
.
Entity
.
Product
.
RB_Goods_Log
()
{
Id
=
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