Browse Source

切换分支

baishaojie 10 months ago
parent
commit
094466afd5
8 changed files with 11 additions and 10 deletions
  1. 1 1
      .drone.yml
  2. BIN
      KPTAdmin64.exe
  3. BIN
      TMRWatchComm
  4. BIN
      TMRWatchComm.zip
  5. 5 4
      conf/app.ini
  6. 3 3
      http/handle/api/mqtt.go
  7. 2 2
      http/handle/api/scheduled.go
  8. BIN
      tmr-watch.exe

+ 1 - 1
.drone.yml

@@ -28,7 +28,7 @@ steps:
         from_secret: aliyun_password
       repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr
       registry: registry.cn-hangzhou.aliyuncs.com
-      tags: [ 1.0.3,latest ]
+      tags: [ 1.0.4,latest ]
 
 trigger:
   branch:

BIN
KPTAdmin64.exe


BIN
TMRWatchComm


BIN
TMRWatchComm.zip


+ 5 - 4
conf/app.ini

@@ -91,11 +91,12 @@ Name =
 
 
 [yyn]
-FarmId = "1830004776"
+FarmId = "118300003869"
 ProductKey = "k03txxLKFae"
-DeviceName = "04776_p_breed"
-DeviceSecret = "e1fdb50556b13afe896e738fdcb25bf3"
-HeartBeat = "Tmr183000477604776_p_breed"
+DeviceName = "3869_p_breed"
+DeviceSecret = "289232e21ef22ab60e52ebbc708f1458"
+HeartBeat = "Tmr1183000038693869_p_breed"
+
 
 
 [comm]

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

@@ -28,7 +28,8 @@ func InitMqttClient() {
 		c, pubTopic := MqttClient()
 		deviceHeartbeat(c, pubTopic)
 
-		// now := time.Now().AddDate(0, 0, -5).Format("2006-01-02")
+		// now := time.Now().AddDate(0, 0, -13).Format("2006-01-02")
+		// // now := "2024-05-11"
 		// stirPush(c, pubTopic, now)
 		// dustingPush(c, pubTopic, now)
 		// equipmentAccuracyPush(c, pubTopic, now)
@@ -257,8 +258,7 @@ FROM
 	JOIN feed f ON f.feedcode = d1.feedcode 
 	AND f.pastureid = d.pastureid 
 WHERE
-	DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?
-	`, date).QueryString()
+	DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ? `, date).QueryString()
 	if err != nil {
 		logs.Error("feedtempletPush-error-1:", err)
 		return

+ 2 - 2
http/handle/api/scheduled.go

@@ -131,7 +131,7 @@ func CronScheduled(ctx context.Context) {
 	dayCron.Start()
 	// udFeedSync(pastureinfo)
 	// //圣牧自动同步前天有进行中的任务
-	manualUdData(pastureinfo)
+	// manualUdData(pastureinfo)
 	// gm.GmUdSync(pastureinfo.Pastureid, pastureinfo.Werks)
 	// xdmy := cron.New()
 	// err = xdmy.AddFunc("0 30 8 * * *", func() {
@@ -142,7 +142,7 @@ func CronScheduled(ctx context.Context) {
 	// 	gm.GmUdSync(pastureinfo.Pastureid, pastureinfo.Werks)
 	// })
 	// xdmy.Start()
-	// InitMqttClient()
+	InitMqttClient()
 }
 
 type ScheduledInfo struct {

BIN
tmr-watch.exe