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