Commit a1116e70 by mushishixian

修复优化

parent 8104954b
......@@ -94,6 +94,7 @@ ERR:
}
func SyncErpAuditStatus(syncName, billId, json string) (err error) {
fmt.Println(json)
if err = service.LoginErp(); err != nil {
return
}
......
......@@ -7,12 +7,7 @@ import (
)
func main() () {
message := `{"SyncName":"in_store","Data":{"erp_store_id":"FGipxV9OSXGWVCgqefjkesBZJbY=","detail":[{"number":"10.0000","erp_entry_sn":"mJ4W+QdYQoWe0WCnzEOJou0oFFw=","country":""},{"number":"900.0000","erp_entry_sn":"z0ULke\/wRhC5cQFzZZT4WO0oFFw=","country":""}],"pallet_number":1,"pallet_weight":"0.0000","box_number":1,"box_weight":"0.0000"}}`
message = `{"SyncName":"out_store","Data":{"erp_store_id":"Ncx3gMUSSEml7z2jL1\/p\/u+cpps=","box_number":1,"pallet_number":0,"detail":[{"erp_entry_sn":"123131","number":"25.0000","box_id":"39","pallet_id":0}]}}`
message = `{"SyncName":"in_store","Data":{"erp_store_id":"ibn\/BoPESE+jP5olU7sjl8BZJbY=","detail":[{"number":"100.0000","erp_entry_sn":"Nn9vCo1nRNip2jzdHLDN0e0oFFw=","country":"127"}],"pallet_number":1,"pallet_weight":"0.0000","box_number":1,"box_weight":"0.0000"}}`
message = `{"SyncName":"in_store","Data":{"erp_store_id":"MYDb7OZMQeS6cSN7TO8r+sBZJbY=","detail":[{"number":"200.0000","erp_entry_sn":"RbAldie8SiGLuPFp5WvY9e0oFFw=","country":"107"}],"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"}}`
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":"out_store","Data":{"erp_store_id":"Ncx3gMUSSEml7z2jL1\/p\/u+cpps=","box_number":1,"pallet_number":0,"detail":[{"erp_entry_sn":"123131","number":"25.0000","box_id":"39","pallet_id":0}]}}`
fmt.Println(message)
queueExchange := rabbitmq.QueueExchange{
"scm_store_audit_status",
......
......@@ -10,12 +10,12 @@ import (
func main() {
message := make(map[string]interface{})
message = map[string]interface{}{
"type": "delete",
"type": "save",
"data": map[string]string{
"FID": "imqWd01vR7qdD/+CY8FKHkQJ5/A=",
"FGoods": "test123145",
"FGoods": "test1231451",
"FBrand": "TEST123145",
"FModel": "test123145",
"FModel": "test1231451",
},
}
data, err := json.Marshal(message)
......
......@@ -117,7 +117,6 @@ func SyncOutStoreData(operate string, message OutStoreMessage) (err error) {
params map[string]interface{}
)
params = TransformParams(message)
fmt.Println(params)
//构建请求数据
param := req.BodyJSON(&params)
......
......@@ -37,7 +37,7 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
if message.SyncName == "inStore" || message.SyncName == "outStore" {
time.Sleep(5 * time.Second)
}
fmt.Println(message.SyncName)
//fmt.Println(message.SyncName)
//得到message以后,去请求金蝶的接口
if err = SyncErpDataStatus(message.SyncName, message.ErpId); err != nil {
goto ERR
......@@ -104,7 +104,7 @@ func SyncErpDataStatus(syncName, uniqueId string) (err error) {
params = gosoap.ArrayParams{
{"json", fmt.Sprintf(`{"FType":"%s", "FID":"%s"}`, syncName, uniqueId)},
}
fmt.Println(fmt.Sprintf(`{"FType":"%s", "FID":"%s"}`, syncName, uniqueId))
//fmt.Println(fmt.Sprintf(`{"FType":"%s", "FID":"%s"}`, syncName, uniqueId))
res, err = soap.Call(apiMethod, params)
if err != nil {
return
......
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