Explorar o código

shengmu:云养牛上传更新

baishaojie hai 1 mes
pai
achega
2da0edd4a1
Modificáronse 6 ficheiros con 7 adicións e 2 borrados
  1. BIN=BIN
      TMRWatchComm
  2. BIN=BIN
      TMRWatchComm.zip
  3. 0 0
      http/a.go
  4. 1 1
      http/handle/api/mqtt.go
  5. 6 1
      http/handle/yq/yq.go
  6. BIN=BIN
      tmr-watch.exe

BIN=BIN
TMRWatchComm


BIN=BIN
TMRWatchComm.zip


+ 0 - 0
http/a.go


+ 1 - 1
http/handle/api/mqtt.go

@@ -291,7 +291,7 @@ FROM
 	JOIN feed f ON  f.id = d1.fid  
 	AND f.pastureid = d.pastureid 
 WHERE
-	DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?  `, date).QueryString()
+	DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?    and f.source = '云养牛' `, date).QueryString()
 // DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?   and f.sapCode is not null and f.sapCode != '' `, date).QueryString()
 
 	if err != nil {

+ 6 - 1
http/handle/yq/yq.go

@@ -68,6 +68,7 @@ tx.Exec(`update downloadedplan set iweight = lweight ,oweight = lweight ,havebut
 
 
 		date := time.Now().AddDate(0,0,-1).Format("2006-01-02")
+
 		tx.Exec(`update downloadplandtl2 set 
 	actualweightminus = lweight ,lastactualweight =lweight ,actualweight = lweight 
 	where pid in(select id from downloadedplan  where mydate =?  and havebutton = 0)`,date)
@@ -81,7 +82,11 @@ tx.Exec(`update downloadedplan set iweight = lweight ,oweight = lweight ,havebut
 	where pid in (select id from downloadedplan  where mydate = ?  and havebutton = 0)`,date)
 
 	tx.Exec(`update downloadedplan set havebutton = 1 ,iscompleted = 1 ,completedtime = concat(?,' 23:00:00'),intime= concat(?,' 23:00:00')   where mydate = ? and havebutton = 0`,date,date,date)
-	})
+	
+
+	YcMaterialIssuePush(pastureinfo.Pastureid, pastureinfo.Werks, date, token)
+	YcBarFeedRemainPush(pastureinfo.Pastureid, pastureinfo.Werks, date, token)
+})
 
 	// token := getToken()
 	// fmt.Println(token)

BIN=BIN
tmr-watch.exe