Pārlūkot izejas kodu

配方修改bug调整

baishaojie 3 dienas atpakaļ
vecāks
revīzija
0345b0645c
4 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 1 1
      conf/app-test.ini
  2. 1 0
      http/handle/api/ops.go
  3. 1 2
      http/handle/api/scheduled.go
  4. BIN
      tmr-watch.exe

+ 1 - 1
conf/app-test.ini

@@ -77,7 +77,7 @@ Password = root
 #Name = tmrgo
 #Password = kepaiteng!QAZ
 #Host = 222.73.129.15:31306
-Name = tn
+Name = bmsm18
 TablePrefix =
 
 ShowXormlog = false

+ 1 - 0
http/handle/api/ops.go

@@ -3238,6 +3238,7 @@ func UpdateFTdetail(c *gin.Context) {
 			),0) as '6'   from feedp fp join bar b on b.id = fp.barid
 			join feedtemplet  ft on ft.id = fp.ftid  where ft.id = ?`, parammaps["ftid"]).QueryString()
 		// fmt.Println(ftId)
+	    tx.SQL(`update feedp fp set barname = (select bname from bar where id = fp.id ) where pastureid = ?`, parammaps["pastureid"]).Execute()
 		FpdBatchEditGrfd(fmt.Sprintf("%v", parammaps["pastureid"]), values1)
 
 		// 		fpdDataList, err = tx.SQL(`select * from (SELECT TRIM(id) id,times,tratio,ifnull(ROUND(ptsrate*weight,2)-ptsuse,0) weight,TRIM(barid) barid,TRIM(pastureid) pastureid,TRIM((select ftid from feedp where barid =fpdetail.barid)) ptid,TRIM(ptsid ) ptsid ,

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

@@ -711,7 +711,7 @@ func (h *ScheduledDown) SyncFeed(pastureid string, feedList []interface{}) {
 		insertSql := `insert into feed(id,pastureid,feedcode,fname,fclassid,fclass,dry)VALUES(?,?,?,?,?,?,?) 
 		ON DUPLICATE KEY UPDATE fname = ? ,dry = ? `
 		_, err = tx.SQL(insertSql, ids, pastureid, feedcode, fname, fclassid, fclass, dry, fname, dry).Execute()
-		fmt.Println(feedcode, fname, fclassid)
+		// fmt.Println(feedcode, fname, fclassid)
 		if err != nil {
 			tx.Rollback()
 			logs.Error("syncFeed-error-5:", err)
@@ -1126,7 +1126,6 @@ func manualUdData(pastureinfo *udPastureInfo) {
 			return
 		}
 	
-		fmt.Println(time.Now(),"testtesttesttesttesttesttesttest")
 		for _, item := range upList {
 			if item.Datasql != "" {
 				// if item.Datatype == 4 {

BIN
tmr-watch.exe