Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_scm_wms_sync
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
8104954b
authored
May 15, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改mq配置
parent
b8888b6d
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
43 additions
and
43 deletions
cmd/queue/sync_audit_status/main.go
cmd/queue/sync_audit_status/product/product_status_queue.go
cmd/queue/sync_customer/main.go
cmd/queue/sync_customer/product.go
cmd/queue/sync_goods/main.go
cmd/queue/sync_goods/product/product.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_out_store/product/product.go
cmd/queue/sync_status/main.go
cmd/queue/sync_status/product/product_status_queue.go
cmd/queue/sync_supplier/main.go
cmd/queue/sync_supplier/product/product.go
main.go
cmd/queue/sync_audit_status/main.go
View file @
8104954b
...
@@ -176,9 +176,9 @@ func Sync() {
...
@@ -176,9 +176,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_audit_status"
,
"s
cm_s
tore_audit_status"
,
"store_audit_status"
,
"s
cm_s
tore_audit_status"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_audit_status/product/product_status_queue.go
View file @
8104954b
...
@@ -15,9 +15,9 @@ func main() () {
...
@@ -15,9 +15,9 @@ func main() () {
message
=
`{"SyncName":"in_store","Data":{"erp_store_id":"aou1scjXStuIAw4aB7m1rMBZJbY=","detail":[{"number":"200.0000","erp_entry_sn":"qpnQLQvyRyKQBttqm9YmAO0oFFw=","country":"112"}],"pallet_number":0,"pallet_weight":"0","box_number":1,"box_weight":"0.0000"}}`
message
=
`{"SyncName":"in_store","Data":{"erp_store_id":"aou1scjXStuIAw4aB7m1rMBZJbY=","detail":[{"number":"200.0000","erp_entry_sn":"qpnQLQvyRyKQBttqm9YmAO0oFFw=","country":"112"}],"pallet_number":0,"pallet_weight":"0","box_number":1,"box_weight":"0.0000"}}`
fmt
.
Println
(
message
)
fmt
.
Println
(
message
)
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_audit_status"
,
"s
cm_s
tore_audit_status"
,
"store_audit_status"
,
"s
cm_s
tore_audit_status"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/queue/sync_customer/main.go
View file @
8104954b
...
@@ -160,9 +160,9 @@ func Sync() {
...
@@ -160,9 +160,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_customer"
,
"s
cm_s
tore_customer"
,
"store_customer"
,
"s
cm_s
tore_customer"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_customer/product.go
View file @
8104954b
...
@@ -31,9 +31,9 @@ func main() {
...
@@ -31,9 +31,9 @@ func main() {
}
}
body
:=
string
(
data
)
body
:=
string
(
data
)
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_customer"
,
"s
cm_s
tore_customer"
,
"store_customer"
,
"s
cm_s
tore_customer"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/queue/sync_goods/main.go
View file @
8104954b
...
@@ -164,9 +164,9 @@ func Sync() {
...
@@ -164,9 +164,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_goods"
,
"s
cm_s
tore_goods"
,
"store_goods"
,
"s
cm_s
tore_goods"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_goods/product/product.go
View file @
8104954b
...
@@ -24,9 +24,9 @@ func main() {
...
@@ -24,9 +24,9 @@ func main() {
}
}
body
:=
string
(
data
)
body
:=
string
(
data
)
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_goods"
,
"s
cm_s
tore_goods"
,
"store_goods"
,
"s
cm_s
tore_goods"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/queue/sync_in_store/main.go
View file @
8104954b
...
@@ -232,9 +232,9 @@ func Sync() {
...
@@ -232,9 +232,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_in"
,
"s
cm_s
tore_in"
,
"store_in"
,
"s
cm_s
tore_in"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_in_store/product.go
View file @
8104954b
...
@@ -45,9 +45,9 @@ func main() {
...
@@ -45,9 +45,9 @@ func main() {
}
}
body
:=
string
(
data
)
body
:=
string
(
data
)
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_in"
,
"s
cm_s
tore_in"
,
"store_in"
,
"s
cm_s
tore_in"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/queue/sync_out_store/main.go
View file @
8104954b
...
@@ -227,9 +227,9 @@ func Sync() {
...
@@ -227,9 +227,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_out"
,
"s
cm_s
tore_out"
,
"store_out"
,
"s
cm_s
tore_out"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_out_store/product/product.go
View file @
8104954b
...
@@ -60,9 +60,9 @@ func main() {
...
@@ -60,9 +60,9 @@ func main() {
body
=
`{"type":"save","data":{"FEntrustBillNo":"B05438","FWarehouseNo":"002","FDeliveryTypeNo":"deliveryTerms0003","FPrincipalNo":"WT00683","FSourceBillID":"7aJKpxihRW+LqF7MXDosLO+cpps=","FEntrys":[{"FQty":20,"FSourceBillEntryID":"EYTqfK7nT46e1Ek63QR6dcLaWpc=","FMaterialID":"Hcew0urxRmKVS4bYh6rDQ0QJ5/A=","FUnit":"\u4E2A","FBrand":"BRAND","FOriginCountry":"115","CFIsInsp":false,"FPrice":3.0045,"FGoods":"\u7535\u78C1\u5E72\u6270\u6EE4\u6CE2\u5668","FModel":"sfg"}],"FIsCustoms":true,"FErpPostRequistionBillNo":"FKFH202005147729"}}`
body
=
`{"type":"save","data":{"FEntrustBillNo":"B05438","FWarehouseNo":"002","FDeliveryTypeNo":"deliveryTerms0003","FPrincipalNo":"WT00683","FSourceBillID":"7aJKpxihRW+LqF7MXDosLO+cpps=","FEntrys":[{"FQty":20,"FSourceBillEntryID":"EYTqfK7nT46e1Ek63QR6dcLaWpc=","FMaterialID":"Hcew0urxRmKVS4bYh6rDQ0QJ5/A=","FUnit":"\u4E2A","FBrand":"BRAND","FOriginCountry":"115","CFIsInsp":false,"FPrice":3.0045,"FGoods":"\u7535\u78C1\u5E72\u6270\u6EE4\u6CE2\u5668","FModel":"sfg"}],"FIsCustoms":true,"FErpPostRequistionBillNo":"FKFH202005147729"}}`
body
=
`{"Type":"save","Data":{"FWarehouseNo":"002","FErpPostRequistionBillNo":"FKFH202005147730","FIsCustoms":true,"FSourceBillID":"eRoPxET5QsGpiG/+k153z++cpps=","FRecPerson":"","FPrincipalNo":"WT00655","FDeliveryTypeNo":"deliveryTerms0001","FRecPersonContact":"","FRecPersonAddress":"","Remark":"","FEntrustBillNo":"B05448","FEntrys":[{"FQty":60,"FMaterialID":"LBQDhMUhQF2WFB20c54Qu0QJ5/A=","FBrand":"JST","FPrice":5.0077,"FSourceBillEntryID":"AJ6EYRbSSICvCxd/CZeciMLaWpc=","FModel":"04CPT-B1-2A","FGoods":"二极管","FUnit":"个","CFIsInsp":false,"Fremark":"","FOriginCountry":"137"}]}}`
body
=
`{"Type":"save","Data":{"FWarehouseNo":"002","FErpPostRequistionBillNo":"FKFH202005147730","FIsCustoms":true,"FSourceBillID":"eRoPxET5QsGpiG/+k153z++cpps=","FRecPerson":"","FPrincipalNo":"WT00655","FDeliveryTypeNo":"deliveryTerms0001","FRecPersonContact":"","FRecPersonAddress":"","Remark":"","FEntrustBillNo":"B05448","FEntrys":[{"FQty":60,"FMaterialID":"LBQDhMUhQF2WFB20c54Qu0QJ5/A=","FBrand":"JST","FPrice":5.0077,"FSourceBillEntryID":"AJ6EYRbSSICvCxd/CZeciMLaWpc=","FModel":"04CPT-B1-2A","FGoods":"二极管","FUnit":"个","CFIsInsp":false,"Fremark":"","FOriginCountry":"137"}]}}`
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_out"
,
"s
cm_s
tore_out"
,
"store_out"
,
"s
cm_s
tore_out"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/queue/sync_status/main.go
View file @
8104954b
...
@@ -204,9 +204,9 @@ func Sync() {
...
@@ -204,9 +204,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_sync_status"
,
"s
cm_s
tore_sync_status"
,
"store_sync_status"
,
"s
cm_s
tore_sync_status"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_status/product/product_status_queue.go
View file @
8104954b
...
@@ -19,9 +19,9 @@ func SyncErpStatus(syncName string, ErpId string) (err error) {
...
@@ -19,9 +19,9 @@ func SyncErpStatus(syncName string, ErpId string) (err error) {
}
}
body
:=
string
(
data
)
body
:=
string
(
data
)
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_sync_status"
,
"s
cm_s
tore_sync_status"
,
"store_sync_status"
,
"s
cm_s
tore_sync_status"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
cmd/queue/sync_supplier/main.go
View file @
8104954b
...
@@ -161,9 +161,9 @@ func Sync() {
...
@@ -161,9 +161,9 @@ func Sync() {
}()
}()
t
:=
&
RecvPro
{}
t
:=
&
RecvPro
{}
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
"store_supplier"
,
"s
cm_s
tore_supplier"
,
"store_supplier"
,
"s
cm_s
tore_supplier"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
},
t
,
1
)
},
t
,
1
)
...
...
cmd/queue/sync_supplier/product/product.go
View file @
8104954b
...
@@ -23,9 +23,9 @@ func main() {
...
@@ -23,9 +23,9 @@ func main() {
}
}
body
:=
string
(
data
)
body
:=
string
(
data
)
queueExchange
:=
rabbitmq
.
QueueExchange
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"store_supplier"
,
"s
cm_s
tore_supplier"
,
"store_supplier"
,
"s
cm_s
tore_supplier"
,
"store"
,
"s
cm_s
tore"
,
"direct"
,
"direct"
,
configs
.
RABBITMQDSN
,
configs
.
RABBITMQDSN
,
}
}
...
...
main.go
View file @
8104954b
...
@@ -34,7 +34,7 @@ func pushAlive() {
...
@@ -34,7 +34,7 @@ func pushAlive() {
err
error
err
error
)
)
item
=
PayloadItem
{
item
=
PayloadItem
{
Endpoint
:
"
wms-server
"
,
Endpoint
:
"
fengkong-server/172.18.137.41
"
,
Metric
:
"scm_wms_server"
,
Metric
:
"scm_wms_server"
,
Timestamp
:
time
.
Now
()
.
Unix
(),
Timestamp
:
time
.
Now
()
.
Unix
(),
Step
:
60
,
Step
:
60
,
...
...
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