ソースを参照

软件牛头数同步调休

baishaojie 3 週間 前
コミット
6de56edeb6
5 ファイル変更11 行追加10 行削除
  1. BIN
      KPTAdmin64.exe
  2. 1 1
      conf/app-test.ini
  3. 7 6
      http/handle/api/ops.go
  4. 3 3
      http/handle/api/scheduled.go
  5. BIN
      tmr-watch.exe

BIN
KPTAdmin64.exe


+ 1 - 1
conf/app-test.ini

@@ -21,7 +21,7 @@ TimeFormat = 20060102-150405
 #debug or release
 #RunMode = debuggit 
 RunMode = release
-HttpPort = 8082
+HttpPort = 8081
 ReadTimeout = 260
 WriteTimeout = 260
 NoAuth = 1

+ 7 - 6
http/handle/api/ops.go

@@ -3649,7 +3649,7 @@ func UpdateFpdetailBar(c *gin.Context) {
 		ftmap["ptid"] = list.Get("ptid").ValueStr()
 		ftmap["ptsid"] = list.Get("ptsid").ValueStr()
 		// fmt.Println(ftmap)
-		/*
+		// /*
 		count, err := tx.SQL(` select count(1) from lpplandtl1 where pastureid = ? and  lppid in(select  id from lpplan where pastureid = ? and times = ?  )
 		and find_in_set(barid,(select barid from feedp where id = ?  ))  and lweight > 0 `, pastureid, pastureid, ftmap["times"], id).Count()
 		if count == 1 {
@@ -3670,7 +3670,7 @@ func UpdateFpdetailBar(c *gin.Context) {
 				return
 			}
 		}
-		*/
+		// */
 
 		fpdDataList, err := tx.SQL(`
 			SELECT TRIM(id) id,times,tratio,ifnull(ROUND((1-ptsrate)*weight,2)-ptuse,"") weight,TRIM(barid) barid,TRIM(pastureid) pastureid,TRIM((select ftid from feedp where barid =fpdetail.barid)) ptid,TRIM(ifnull(ptsid,-1) ) ptsid ,
@@ -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 {
@@ -9037,7 +9037,7 @@ func FpdBatchEdit(c *gin.Context) {
 			continue
 		}
 
-		/*
+		// /*
 		_, 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, dataexcel["barname"]).Execute()
 		if err != nil {
@@ -9052,7 +9052,7 @@ func FpdBatchEdit(c *gin.Context) {
 			appG.Response(http.StatusInternalServerError, e.ERROR, err)
 			return
 		}
-		*/
+		// */
 
 		dataexcel["1"] = barFsions.Get("times1").ValueStr()
 		dataexcel["2"] = barFsions.Get("times2").ValueStr()
@@ -12661,3 +12661,4 @@ func GetLyUdData(c *gin.Context) {
 }
 
 
+

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

@@ -748,7 +748,7 @@ func (h *ScheduledDown) SyncFeedp(pastureid string, feedpList []interface{}) err
 
 	for _, f := range feedpList {
 		feedp := f.(map[string]interface{})
-		var barName, barCode interface{}
+		var barName interface{}
 		// var ftId, tname interface{}
 		var cowCount interface{}
 		if _, ok := feedp["barname"]; ok {
@@ -799,8 +799,8 @@ func (h *ScheduledDown) SyncFeedp(pastureid string, feedpList []interface{}) err
 
 		insertSql := `insert into feedp(pastureid,barname,barid,softccount)VALUES(?,?,?,?)
 		ON DUPLICATE KEY UPDATE barname = ?  `
-		_, err = tx.SQL(insertSql, pastureid, barName, barId, cowCount, cowCount).Execute()
-		fmt.Println(barCode)
+		_, err = tx.SQL(insertSql, pastureid, barName, barId, cowCount, barName).Execute()
+		// fmt.Println(barName,cowCount)
 		_, err = tx.SQL(`update feedp fp set fp.softccount = ? where  (select bcode from bar where id = fp.barid ) = ? `, cowCount, barName).Execute()
 		if err != nil {
 			tx.Rollback()

BIN
tmr-watch.exe