Commit 2e4514cf by mushishixian

修复bug

parent b84f05fc
......@@ -64,15 +64,15 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
//判断操作类型
switch message.Type {
case "save":
operateType = "insert"
outStore.BillId = message.Data.FSourceBillID
messageData, err = json.Marshal(&message)
if err != nil {
goto ERR
}
outStore.QueueMessage = string(messageData)
//先去查询是否存在,不存在才去插入,已经存在即是修改
//先去查询是否存在已经同步完成的记录
if !logic.CheckOutStoreSyncStatus(outStore.BillId) {
operateType = "insert"
if err = logic.InsertOutStore(outStore); err != nil {
goto ERR
}
......
......@@ -57,6 +57,7 @@ func main() {
fmt.Println(err)
}
body := string(data)
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"}}`
queueExchange := rabbitmq.QueueExchange{
"store_out",
"store_out",
......
......@@ -9,7 +9,7 @@ url = "amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
[api]
base = http://192.168.2.232:40001
out_store = http://192.168.2.179:40003
out_store = http://192.168.2.232:40003
in_store = http://192.168.2.232:40004
erp_sync_base_data_status = http://192.168.2.253:6888/ormrpc/services/WSInventoryManagementFacade?wsdl
erp_sync_bill_status = http://192.168.2.253:6888/ormrpc/services/WSInventoryManagementFacade?wsdl
......
......@@ -56,6 +56,7 @@ func SendDingTalkRobotToApi(content string) {
}
func SendDingTalkRobotToApi1(content string) {
go func() {
var (
requestData DingDingRequest
apiUrl, token string
......@@ -76,4 +77,5 @@ func SendDingTalkRobotToApi1(content string) {
if err != nil {
fmt.Println(err)
}
}()
}
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