Просмотр исходного кода

圣牧:云养牛编码上传调整

baishaojie 4 недель назад
Родитель
Сommit
fa4c135d16
2 измененных файлов с 6 добавлено и 3 удалено
  1. 4 1
      http/handle/api/mqtt.go
  2. 2 2
      http/handle/api/ops.go

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

@@ -290,7 +290,7 @@ FROM
 	JOIN feed f ON  f.id = d1.fid  
 	AND f.pastureid = d.pastureid 
 WHERE
-	DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?   and  (f.feedcode LIKE '%00000000%'  or  f.backup2 <> ''  )  `, date).QueryString()
+	DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?  and d1.type = 0    and  (f.feedcode LIKE '%00000000%'  or  f.backup2 <> ''  )  `, date).QueryString()
 // DATE_FORMAT( d.mydate ,'%Y-%m-%d' ) = ?   and f.sapCode is not null and f.sapCode != '' `, date).QueryString()
 
 	if err != nil {
@@ -777,3 +777,6 @@ func sendPost(url string, headers map[string]string, body []byte) (string, error
 
 	return string(respBody), nil
 }
+
+
+

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

@@ -5190,7 +5190,7 @@ func FpdImportExcel(c *gin.Context) {
 			// 			}
 			// 		}
 
-			// /*
+			/*
 			_, err = tx.SQL(` update  lpplandtl1  set lweight = 0 where pastureid = ? and  lppid in(select  id from lpplan where pastureid = ?  )
 			and find_in_set(barid,(select barid from feedp where barname = ? )) `, pastureid, pastureid, barname).Execute()
 			if err != nil {
@@ -5203,7 +5203,7 @@ func FpdImportExcel(c *gin.Context) {
 				logs.Error(err)
 				return
 			}
-			// */
+			*/
 			updateFpdetailByBar(pastureid, barname, v)
 		}
 	} else {