Commit 809af8fe by 孙龙

up

parent 38221b5c
Showing with 3 additions and 3 deletions
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment