Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
scm_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
b237c424
authored
Apr 27, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
格式替换
parent
2e1f6f44
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
76 additions
and
130 deletions
cmd/main.go
cmd/queue/sync_customer/main.go
cmd/queue/sync_goods/main.go
cmd/queue/sync_in_store/main.go
cmd/queue/sync_in_store/product.go
cmd/queue/sync_out_store/main.go
cmd/queue/sync_supplier/main.go
cmd/source/goods/goods.go
cmd/source/main.go
internal/logic/in_store.go
cmd/main.go
View file @
b237c424
package
main
import
(
"encoding/json"
"errors"
"fmt"
"github.com/beevik/etree"
"github.com/mushishixian/gosoap"
"log"
"strings"
)
func
main
()
{
fmt
.
Println
(
SyncBaseDataStatus
())
}
func
LoginErp
()
bool
{
soap
,
err
:=
gosoap
.
SoapClient
(
"http://192.168.2.253:6888/ormrpc/services/EASLogin?wsdl"
)
if
err
!=
nil
{
log
.
Fatalf
(
"SoapClient error: %s"
,
err
)
}
params
:=
gosoap
.
ArrayParams
{
{
"userName"
,
"WBYH"
},
{
"password"
,
"123456"
},
{
"slnName"
,
"eas"
},
{
"dcName"
,
"demo"
},
{
"language"
,
"L2"
},
{
"dbType"
,
"1"
},
{
"authPattern"
,
"BaseDB"
},
}
res
,
err
:=
soap
.
Call
(
"login"
,
params
)
if
err
!=
nil
{
log
.
Fatalf
(
"Call error: %s"
,
err
)
}
doc
:=
etree
.
NewDocument
()
if
err
:=
doc
.
ReadFromBytes
(
res
.
Body
);
err
!=
nil
{
fmt
.
Println
(
err
)
}
root
:=
doc
.
SelectElement
(
"multiRef"
)
sessionId
:=
root
.
SelectElement
(
"sessionId"
)
.
Text
()
if
sessionId
!=
""
{
return
true
}
return
false
}
func
SyncBaseDataStatus
()
(
err
error
)
{
soap
,
err
:=
gosoap
.
SoapClient
(
"http://192.168.2.253:6888/ormrpc/services/WSInventoryManagementFacade?wsdl"
)
if
err
!=
nil
{
return
}
params
:=
gosoap
.
ArrayParams
{
{
"json"
,
`{"FType":"material", "FID":"++Mhf5K+T9KTEE+bJhM9PEQJ5/A="}`
},
//{"json", `{"FType":"material", "FID":"ET9WHFzYagYZf0="}`},
}
res
,
err
:=
soap
.
Call
(
"synRewriteErpBaseDataStatus"
,
params
)
if
err
!=
nil
{
return
}
doc
:=
etree
.
NewDocument
()
if
err
=
doc
.
ReadFromBytes
(
res
.
Body
);
err
!=
nil
{
return
}
//没有这个xml节点代表金蝶报错了
root
:=
doc
.
SelectElement
(
"synRewriteErpBaseDataStatusResponse"
)
if
root
==
nil
{
return
errors
.
New
(
string
(
res
.
Body
))
}
result
:=
root
.
SelectElement
(
"synRewriteErpBaseDataStatusReturn"
)
if
result
!=
nil
{
var
responseData
map
[
string
]
interface
{}
json
.
Unmarshal
([]
byte
(
result
.
Text
()),
&
responseData
)
for
key
,
_
:=
range
responseData
{
//金蝶判断成功的标志
if
key
==
"0000"
{
return
}
//金额判断失败的标志
if
key
==
"4444"
{
return
errors
.
New
(
"金蝶返回失败"
)
}
}
}
return
errors
.
New
(
"金蝶返回响应格式无法识别"
)
temp
:=
`{\"type\":\"save\",\"date\":{\"FID\":\"UxasZFrOQGC+oCfTmVSNuUQJ5/A=\",\"FBrand\":\"3M\",\"FModel\":\"aabbddcc\",\"FGoods\":\"\u4E8C\u6781\u7BA1\"}}`
temp
=
strings
.
ReplaceAll
(
temp
,
`\`
,
""
)
fmt
.
Println
(
temp
)
return
}
cmd/queue/sync_customer/main.go
View file @
b237c424
...
...
@@ -155,7 +155,7 @@ func SyncCustomerData(operate string, customer model.Customer) (err error) {
}
if
respData
.
Errcode
!=
101100
{
paramJson
,
_
:=
json
.
Marshal
(
param
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncCustomerSuccess
(
customer
.
ErpId
);
err
!=
nil
{
...
...
@@ -178,7 +178,7 @@ func SyncCustomerData(operate string, customer model.Customer) (err error) {
}
if
respData
.
Errcode
!=
101100
{
paramJson
,
_
:=
json
.
Marshal
(
param
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncCustomerSuccess
(
customer
.
ErpId
);
err
!=
nil
{
...
...
cmd/queue/sync_goods/main.go
View file @
b237c424
...
...
@@ -157,7 +157,7 @@ func SyncGoodsData(operate string, goods model.Goods) (err error) {
}
if
respData
.
Errcode
!=
101100
{
paramJson
,
_
:=
json
.
Marshal
(
param
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncGoodsSuccess
(
goods
.
ErpId
,
false
);
err
!=
nil
{
...
...
@@ -180,7 +180,7 @@ func SyncGoodsData(operate string, goods model.Goods) (err error) {
}
if
respData
.
Errcode
!=
101100
{
paramJson
,
_
:=
json
.
Marshal
(
param
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncGoodsSuccess
(
goods
.
ErpId
,
true
);
err
!=
nil
{
...
...
cmd/queue/sync_in_store/main.go
View file @
b237c424
...
...
@@ -56,12 +56,12 @@ func init() {
func
(
t
*
RecvPro
)
Consumer
(
dataByte
[]
byte
)
error
{
var
(
message
InStoreMessage
err
error
inStore
model
.
InStore
operateType
string
syncLog
model
.
SyncLog
msg
[]
byte
message
InStoreMessage
err
error
inStore
model
.
InStore
operateType
string
syncLog
model
.
SyncLog
msg
,
messageData
[]
byte
)
//先去转换队列消息的json,如果失败,记录起来
if
err
=
json
.
Unmarshal
(
dataByte
,
&
message
);
err
!=
nil
{
...
...
@@ -72,17 +72,15 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
switch
message
.
Type
{
case
"save"
:
inStore
.
BillId
=
message
.
Data
.
FSourceBillID
messageData
,
err
:
=
json
.
Marshal
(
&
message
)
messageData
,
err
=
json
.
Marshal
(
&
message
)
if
err
!=
nil
{
goto
ERR
}
inStore
.
QueueMessage
=
string
(
messageData
)
//先去查询是否存在,不存在才去插入
,已经存在即是修改
//先去查询是否存在,不存在才去插入
if
!
logic
.
CheckInStoreExist
(
inStore
.
BillId
)
{
operateType
=
"insert"
if
err
=
logic
.
InsertInStore
(
inStore
);
err
!=
nil
{
fmt
.
Println
(
err
)
//todo:错误原因会消失
goto
ERR
}
}
...
...
@@ -107,14 +105,15 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
goto
ERR
}
fmt
.
Println
(
"同步成功,开始发送金蝶状态同步"
)
product
.
SyncErpStatus
(
"out_store"
,
inStore
.
BillId
)
if
err
=
product
.
SyncErpStatus
(
"in_store"
,
inStore
.
BillId
);
err
!=
nil
{
goto
ERR
}
return
nil
ERR
:
//不存在的billId不去操作对应的数据库
if
inStore
.
BillId
!=
""
{
logSyncErrorToInStore
(
inStore
.
BillId
,
err
.
Error
())
}
//还要存到一个统一错误表
syncLog
=
model
.
SyncLog
{
AddTime
:
time
.
Now
()
.
Unix
(),
...
...
@@ -145,7 +144,7 @@ func SyncInStoreData(operate string, message InStoreMessage) (err error) {
resp
*
req
.
Resp
url
string
respData
common
.
Response
params
map
[
string
]
interface
{}
params
req
.
Param
)
params
=
TransformParams
(
message
)
//更新和插入接口不同
...
...
@@ -164,9 +163,9 @@ func SyncInStoreData(operate string, message InStoreMessage) (err error) {
if
err
=
resp
.
ToJSON
(
&
respData
);
err
!=
nil
{
return
}
if
respData
.
Errcode
!=
10110
0
{
if
respData
.
Errcode
!=
0
{
paramJson
,
_
:=
json
.
Marshal
(
params
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncInStoreSuccess
(
billId
,
false
);
err
!=
nil
{
...
...
@@ -185,9 +184,10 @@ func logSyncErrorToInStore(erpId, syncError string) {
}
}
func
TransformParams
(
message
InStoreMessage
)
(
params
map
[
string
]
interface
{}
)
{
func
TransformParams
(
message
InStoreMessage
)
(
result
req
.
Param
)
{
var
(
entry
InStoreFEntrys
params
map
[
string
]
interface
{}
outStoreDetail
map
[
string
]
interface
{}
key
int
detailPrefix
string
...
...
@@ -196,6 +196,17 @@ func TransformParams(message InStoreMessage) (params map[string]interface{}) {
params
=
make
(
map
[
string
]
interface
{})
outStoreDetail
=
make
(
map
[
string
]
interface
{})
for
key
,
entry
=
range
message
.
Data
.
FEntrys
{
var
isInsp
,
isPrint
int
if
entry
.
CFIsInsp
{
isInsp
=
1
}
else
{
isInsp
=
0
}
if
entry
.
FIsPrint
{
isPrint
=
1
}
else
{
isPrint
=
0
}
detailPrefix
=
fmt
.
Sprintf
(
"detail[%d]["
,
key
)
detailMap
=
map
[
string
]
interface
{}{
detailPrefix
+
"erp_entry_sn]"
:
entry
.
FSourceBillEntryID
,
...
...
@@ -205,33 +216,40 @@ func TransformParams(message InStoreMessage) (params map[string]interface{}) {
detailPrefix
+
"number]"
:
entry
.
FQty
,
detailPrefix
+
"country]"
:
entry
.
FOriginCountry
,
detailPrefix
+
"goods_unit]"
:
entry
.
FUnit
,
detailPrefix
+
"is_insp]"
:
entry
.
CFI
sInsp
,
detailPrefix
+
"is_print]"
:
entry
.
FI
sPrint
,
detailPrefix
+
"is_insp]"
:
i
sInsp
,
detailPrefix
+
"is_print]"
:
i
sPrint
,
}
for
k
,
v
:=
range
detailMap
{
outStoreDetail
[
k
]
=
v
}
}
var
isInsp
int
var
isInsp
,
isApplyCustoms
int
if
message
.
Data
.
CFIsInsp
{
isInsp
=
1
}
else
{
isInsp
=
0
}
if
message
.
Data
.
FIsCustoms
{
isApplyCustoms
=
1
}
else
{
isApplyCustoms
=
0
}
params
=
map
[
string
]
interface
{}{
//缺一个原始单据id
"erp_in_store_id"
:
message
.
Data
.
FSourceBillID
,
"receiving_sn"
:
message
.
Data
.
FErpPurInWorehouseNo
,
"warehousing_sn"
:
message
.
Data
.
FEntrustBillNo
,
"is_insp"
:
isInsp
,
"store_erp_id"
:
message
.
Data
.
FWarehouseNo
,
"customer_erp_id"
:
message
.
Data
.
FPrincipalNo
,
"supplier_erp_id"
:
"LxYAAAABf9I3xn38"
,
"is_apply_customs"
:
1
,
"supplier_erp_id"
:
message
.
Data
.
FSupplierNo
,
"is_apply_customs"
:
isApplyCustoms
,
}
for
k
,
v
:=
range
outStoreDetail
{
params
[
k
]
=
v
}
return
result
=
params
return
result
}
func
main
()
{
...
...
cmd/queue/sync_in_store/product.go
View file @
b237c424
...
...
@@ -13,11 +13,12 @@ func main() {
"data"
:
map
[
string
]
interface
{}{
"FWarehouseNo"
:
"002"
,
"FEntrustBillNo"
:
"B05364"
,
"FErpPurInWorehouseNo"
:
"FKSH20200310748
2
"
,
"FErpPurInWorehouseNo"
:
"FKSH20200310748
1
"
,
"FSourceBillID"
:
"+7fvorsZSAevQCJ7ujsbLMBZJbY="
,
"CFIsInsp"
:
false
,
"FPrincipalNo"
:
"WT00018"
,
//"FPrincipalNo": "FIZXuVrXRCms51pqby5EVagYZf0=",
"FSupplierNo"
:
"M0000045"
,
"FBizType"
:
"执行采购"
,
"FEntrys"
:
[]
map
[
string
]
interface
{}{
{
...
...
@@ -26,14 +27,13 @@ func main() {
"FOriginCountry"
:
"502"
,
"FIsPrint"
:
false
,
"CFIsInsp"
:
false
,
"FMaterialID"
:
"
9l++jtj+RNS2VpdFhzcRE
0QJ5/A="
,
"FMaterialID"
:
"
nlOzVwbKSC2pIOF329QfN
0QJ5/A="
,
"FBrand"
:
"ON"
,
"FSourceBillEntryID"
:
"gHw/y6EQRBmCpLGDFkdJCO0oFFw="
,
"FModel"
:
"1abaaba"
,
"FGoods"
:
"集成电路"
,
"FUnit"
:
"个"
,
"FIsCustoms"
:
true
,
"FSupplierNo"
:
"LxYAAAABgRI3xn38"
,
},
},
},
...
...
cmd/queue/sync_out_store/main.go
View file @
b237c424
...
...
@@ -63,6 +63,7 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
syncLog
model
.
SyncLog
msg
,
messageData
[]
byte
)
fmt
.
Println
(
string
(
dataByte
))
//先去转换队列消息的json,如果失败,记录起来
if
err
=
json
.
Unmarshal
(
dataByte
,
&
message
);
err
!=
nil
{
goto
ERR
...
...
@@ -169,7 +170,7 @@ func SyncOutStoreData(operate string, message OutStoreMessage) (err error) {
}
if
respData
.
Errcode
!=
0
{
paramJson
,
_
:=
json
.
Marshal
(
params
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Data
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Data
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncOutStoreSuccess
(
billId
,
false
);
err
!=
nil
{
...
...
cmd/queue/sync_supplier/main.go
View file @
b237c424
...
...
@@ -153,7 +153,7 @@ func SyncSupplierData(operate string, supplier model.Supplier) (err error) {
}
if
respData
.
Errcode
!=
101100
{
paramJson
,
_
:=
json
.
Marshal
(
param
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncSupplierSuccess
(
supplier
.
ErpId
);
err
!=
nil
{
...
...
@@ -176,7 +176,7 @@ func SyncSupplierData(operate string, supplier model.Supplier) (err error) {
}
if
respData
.
Errcode
!=
101100
{
paramJson
,
_
:=
json
.
Marshal
(
param
)
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
return
errors
.
New
(
fmt
.
Sprintf
(
"请求后端接口返回失败,接口链接为%s,请求参数为%s,返回的错误信息为
:
%s"
,
url
,
string
(
paramJson
),
respData
.
Errmsg
))
}
//都没问题,代表后端那边已经成功修改,修改同步表的状态
if
err
=
logic
.
SyncCustomerSuccess
(
supplier
.
ErpId
);
err
!=
nil
{
...
...
cmd/source/goods/goods.go
View file @
b237c424
...
...
@@ -40,6 +40,9 @@ func Import() {
if
key
==
0
{
continue
}
if
key
==
100
{
break
}
goods
.
ErpId
=
row
.
Cells
[
0
]
.
String
()
goods
.
GoodsName
=
row
.
Cells
[
1
]
.
String
()
goods
.
BrandName
=
row
.
Cells
[
2
]
.
String
()
...
...
@@ -49,7 +52,6 @@ func Import() {
continue
}
if
logic
.
CheckGoodsExist
(
goods
.
ErpId
)
{
fmt
.
Println
(
"已存在,跳过"
)
continue
}
message
:=
make
(
map
[
string
]
interface
{})
...
...
cmd/source/main.go
View file @
b237c424
package
main
import
"scm_server/cmd/source/
customer
"
import
"scm_server/cmd/source/
goods
"
func
main
()
{
//forever := make(chan bool)
...
...
@@ -8,6 +8,6 @@ func main() {
//go supplier.Import()
//supplier.Import()
//<-forever
customer
.
Import
()
//
goods.Import()
//
customer.Import()
goods
.
Import
()
}
internal/logic/in_store.go
View file @
b237c424
...
...
@@ -6,23 +6,23 @@ import (
"time"
)
const
CheckInStoreExistSql
=
"SELECT
goods_id FROM lie_in_store WHERE erp
_id = ? AND sync_status = 1"
const
CheckInStoreExistSql
=
"SELECT
in_store_id FROM lie_in_store WHERE bill
_id = ? AND sync_status = 1"
const
InsertInStoreSql
=
"INSERT INTO `lie_in_store` (`queue_message`,`bill_id`,`add_time`) VALUES (?,?,?)"
const
DeleteInStoreSql
=
"UPDATE `lie_in_store` SET `status` = ? , `update_time` = ? WHERE `
erp
_id` = ?"
const
DeleteInStoreSql
=
"UPDATE `lie_in_store` SET `status` = ? , `update_time` = ? WHERE `
bill
_id` = ?"
const
WriteInStoreSyncErrorSql
=
"UPDATE `lie_in_store` SET sync_error = ? WHERE bill_id = ?"
const
SyncInStoreSuccessSql
=
"UPDATE `lie_in_store` SET sync_status = 1 , sync_time = ? WHERE
erp
_id = ?"
const
SyncInStoreSuccessSql
=
"UPDATE `lie_in_store` SET sync_status = 1 , sync_time = ? WHERE
bill
_id = ?"
const
SyncInStoreSuccessSqlWithStatus
=
"UPDATE `lie_in_store` SET sync_status = 1 , sync_time = ? , status = ? WHERE
erp
_id = ?"
const
SyncInStoreSuccessSqlWithStatus
=
"UPDATE `lie_in_store` SET sync_status = 1 , sync_time = ? , status = ? WHERE
bill
_id = ?"
//检查出库是否存在
func
CheckInStoreExist
(
erp
Id
string
)
(
exist
bool
)
{
var
goods
Id
int
dao
.
GetDb
()
.
QueryRowx
(
CheckInStoreExistSql
,
erpId
)
.
Scan
(
&
goods
Id
)
return
goods
Id
>
0
func
CheckInStoreExist
(
bill
Id
string
)
(
exist
bool
)
{
var
inStore
Id
int
dao
.
GetDb
()
.
QueryRowx
(
CheckInStoreExistSql
,
billId
)
.
Scan
(
&
inStore
Id
)
return
inStore
Id
>
0
}
//插入出库
...
...
@@ -38,18 +38,18 @@ func DeleteInStore(outStore model.InStore) (err error) {
}
//写入同步失败的原因
func
WriteInStoreSyncError
(
erp
Id
string
,
syncError
string
)
(
err
error
)
{
_
,
err
=
dao
.
GetDb
()
.
Exec
(
WriteInStoreSyncErrorSql
,
syncError
,
erp
Id
)
func
WriteInStoreSyncError
(
bill
Id
string
,
syncError
string
)
(
err
error
)
{
_
,
err
=
dao
.
GetDb
()
.
Exec
(
WriteInStoreSyncErrorSql
,
syncError
,
bill
Id
)
return
}
//修改成功的同步状态
func
SyncInStoreSuccess
(
erp
Id
string
,
isDelete
bool
)
(
err
error
)
{
func
SyncInStoreSuccess
(
bill
Id
string
,
isDelete
bool
)
(
err
error
)
{
//不是删除,不需要修改状态
if
!
isDelete
{
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncInStoreSuccessSql
,
time
.
Now
()
.
Unix
(),
erp
Id
)
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncInStoreSuccessSql
,
time
.
Now
()
.
Unix
(),
bill
Id
)
}
else
{
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncInStoreSuccessSqlWithStatus
,
time
.
Now
()
.
Unix
(),
0
,
erp
Id
)
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncInStoreSuccessSqlWithStatus
,
time
.
Now
()
.
Unix
(),
0
,
bill
Id
)
}
return
}
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