Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
809af8fe
authored
Feb 04, 2021
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
38221b5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
dal/order/orderTrack/order_track.go
dal/order/orderTrack/order_track.go
View file @
809af8fe
package
orderTrack
import
(
"errors"
"fmt"
"github.com/ichunt2019/logger"
"go-queue-server/dal/db"
...
...
@@ -71,8 +70,8 @@ func InsertData(trackList OrderTrackList) error{
orderItems
:=
&
OrderItems
{}
err
=
db
.
DB
.
Get
(
orderItems
,
"SELECT order_id,rec_id,goods_number,fqty FROM lie_order_items WHERE erp_rec_id = ?"
,
data
.
ORDERENTRYID
)
if
err
!=
nil
{
logger
.
Error
(
"%s"
,
fmt
.
Sprintf
(
"没有找到该明细的信息 %
d
"
,
data
.
ORDERENTRYID
))
return
errors
.
New
(
fmt
.
Sprintf
(
"没有找到该明细的信息 %d"
,
data
.
ORDERENTRYID
))
logger
.
Error
(
"%s"
,
fmt
.
Sprintf
(
"没有找到该明细的信息 %
s
"
,
data
.
ORDERENTRYID
))
continue
}
create_time
=
util
.
ParseTimestrToTimestamp
(
data
.
BIZDATE
,
5
)
if
status_cn
,
ok
=
ORDER_TRACK_STATUS_CN
[
data
.
STATUS
];
!
ok
{
...
...
@@ -88,6 +87,7 @@ func InsertData(trackList OrderTrackList) error{
}
if
data
.
FQTY
>
0
&&
data
.
STATUS
==
110
{
sql1
:=
" UPDATE lie_order_items set fqty = ? where rec_id = ? "
fmt
.
Println
(
orderItems
.
RecId
)
newFqty
:=
int64
(
data
.
FQTY
)
+
int64
(
orderItems
.
FQTY
)
if
newFqty
>
orderItems
.
GoodsNumber
{
newFqty
=
orderItems
.
GoodsNumber
...
...
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