|
@@ -286,7 +286,7 @@ func YmyUtirPush(pastureId, farmId, date string) error {
|
|
|
now = time.Now().AddDate(0, 0, -1).Format("2006-01-02")
|
|
|
}
|
|
|
|
|
|
- dataList, err := tx.SQL(`select MD5(CONCAT(d.pid, d.mydate)) loadId , date_format(d1.date,'%Y-%m-%d') dropDate,date_format(d1.date,'%Y-%m-%d') loadDate,d.times loadShift,d.id tmrNo,ft.tcode recipeId,ft.ccname recipeName,if(d1.feedcode = -1 ,d1.feedcode,f.feedcode) ingId,if(d1.feedcode = -1 ,d1.feedcode,f.feedcode) feedCode ,ifnull(f.fname,ftd.fname) ingName,
|
|
|
+ dataList, err := tx.SQL(`select MD5(CONCAT(d.pid, d.mydate)) loadId , date_format(d1.date,'%Y-%m-%d') dropDate,date_format(d1.date,'%Y-%m-%d') loadDate,d.times loadShift,d.id tmrNo,ft.tcode recipeId,ft.ccname recipeName,'' ingId,'' feedCode ,ifnull(f.fname,ftd.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 , if(f.fname is not null, ifnull(d1.lweight,''), ifnull(ftd.fweight / (select sum(fweight) from ftdetaildate where date = d1.date and ftid = d1.fid ) * d1.lweight,"") ) expWeight,
|
|
|
|