baishaojie преди 4 месеца
родител
ревизия
5508a2e055

BIN
TMRWatchComm


BIN
TMRWatchComm.zip


BIN
__debug_bin.exe


+ 3 - 3
conf/app.ini

@@ -50,8 +50,8 @@ Type = mysql
 User = root
 Password = root
 #Host = 8.130.17.8:3306
-#Host = 192.168.1.93:3326
-Host = 127.0.0.1:3316
+Host = 192.168.1.93:3326
+#Host = 127.0.0.1:3316
 #Name = haiyuan
 #Password = root
 #Password = root
@@ -75,7 +75,7 @@ Host = 127.0.0.1:3316
 #Name = tmrgo
 #Password = kepaiteng!QAZ
 #Host = 222.73.129.15:31306
-Name = tmrwatch2
+Name = tmrwatch5
 TablePrefix =
 
 ShowXormlog = false

+ 2 - 3
http/handle/api/grfdApi.go

@@ -476,10 +476,9 @@ func GetFormula(pastureid string) error {
 					logging.Info("create SnowIds err", err)
 				}
 
-				_, err = tx.Exec("insert into feedtemplet(id,pastureid,ccid,tcode,backup1,backup2,tname,fttypeid,fttype)  values(?,?,
-					(select ccid from feedtemplet where pastureid = ? limit 1),?,?,?,?,1,'饲喂配方') "+
+				_, err = tx.Exec("insert into feedtemplet(id,pastureid,ccid,tcode,backup1,backup2,tname,fttypeid,fttype)  values(?,?,(select ccid from feedtemplet where pastureid = ? limit 1),?,?,?,?,1,'饲喂配方') "+
 					" ON DUPLICATE KEY UPDATE tcode=?,backup2= ?",
-					ids, pastureid,pastureid, ftId, ftId, modifiedAt, ftName, ftId, modifiedAt)
+					ids, pastureid, pastureid, ftId, ftId, modifiedAt, ftName, ftId, modifiedAt)
 
 				if err != nil {
 					return err

+ 10 - 10
http/handle/api/ops.go

@@ -4773,13 +4773,13 @@ func FpdImportExcel(c *gin.Context) {
 					if v == "" {
 						continue
 					}
-					if d, ok := outentry[strings.Trim(v, " ")]; ok {
+					if d, ok := outentry[v]; ok {
 						dtime, err := TransfTime(d.(string))
 						if err != nil {
-							a = strings.Trim(v, " ")
+							a = v
 							break
 						}
-						outentry[strings.Trim(v, " ")] = dtime
+						outentry[v] = dtime
 					}
 				}
 				if a != "" {
@@ -4795,8 +4795,8 @@ func FpdImportExcel(c *gin.Context) {
 						continue
 					}
 
-					if d, ok := outentry[strings.Trim(v, " ")]; !ok || d == "" {
-						a = strings.Trim(v, " ")
+					if d, ok := outentry[v]; !ok || d == "" {
+						a = v
 						break
 					}
 				}
@@ -4812,9 +4812,9 @@ func FpdImportExcel(c *gin.Context) {
 					if v == "" {
 						continue
 					}
-					d, ok := outentry[strings.Trim(v, " ")]
+					d, ok := outentry[v]
 					if !ok || d == "" {
-						outentry[strings.Trim(v, " ")] = 0
+						outentry[v] = 0
 					} else {
 						var fl float64
 						switch d.(type) {
@@ -4822,7 +4822,7 @@ func FpdImportExcel(c *gin.Context) {
 							fl, err = strconv.ParseFloat(d.(string), 64)
 						}
 						if err != nil || fl < 0 {
-							a = strings.Trim(v, " ")
+							a = v
 							break
 						}
 					}
@@ -4916,8 +4916,8 @@ func FpdImportExcel(c *gin.Context) {
 					if _, ok := outentry["Pen Name"]; ok {
 						dataexcel["barname"] = outentry["Pen Name"]
 					}
-					if _, ok := outentry["Actual Headcount"]; ok {
-						dataexcel["ccount"] = outentry["Actual Headcount"]
+					if _, ok := outentry["Actual Cattle Number"]; ok {
+						dataexcel["ccount"] = outentry["Actual Cattle Number"]
 					}
 					if _, ok := outentry["Coefficient(%)"]; ok {
 						dataexcel["ratio"] = outentry["Coefficient(%)"]

+ 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 4 * * *", func() {
@@ -146,7 +146,7 @@ func CronScheduled(ctx context.Context) {
 	// })
 
 	// xdmy.Start()
-	InitMqttClient()
+	// InitMqttClient()
 	// yq.YqCron()
 }
 

BIN
uploads/file/导入导出模板/配方计划/配方模板导入模板.xlsx