|
@@ -163,7 +163,8 @@ func UdUtirPush(pastureId, farmId, date string) error {
|
|
|
now = time.Now().AddDate(0, 0, -1).Format("2006-01-02")
|
|
|
}
|
|
|
|
|
|
- dataList, err := tx.SQL(`select date_format(d1.date,'%Y-%m-%d') loadDate,d.times loadShift,d.datacaptureno tmrNo,ft.id recipeId,ft.ccname recipeName,ifnull(f.id,ftd.fid) ingId,d1.fname ingName,ifnull(fc.fcname,(select fcname from feedclass fc1 join feed f1 on f1.fclassid = fc1.id where f1.id =ftd.fid )) ingType,
|
|
|
+ dataList, err := tx.SQL(`select date_format(d1.date,'%Y-%m-%d') loadDate,d.times loadShift,d.datacaptureno tmrNo,ft.id recipeId,ft.ccname recipeName,ifnull(ifnull(f.id,ftd.fid),0) ingId,d1.fname ingName,
|
|
|
+ ifnull(ifnull(fc.fcname,(select fcname from feedclass fc1 join feed f1 on f1.fclassid = fc1.id where f1.id =ftd.fid )),'饲料') ingType,
|
|
|
ifnull(f.dry * d1.actualweightminus,0) dmPct,d1.sort mixNo,ifnull(d1.feedallowratio,0) allowableError ,d1.lweight expWeight,d1.actualweightminus actualWeight,
|
|
|
DATE_FORMAT(IFNULL((SELECT MAX(intime) FROM downloadplandtl1 d2
|
|
|
WHERE d1.pid=d2.pid AND d1.pastureid = d2.pastureid AND d2.intime<d1.intime)
|