|
@@ -772,7 +772,8 @@ func GetSpillage(c *gin.Context) {
|
|
|
data := make(map[string]interface{})
|
|
|
|
|
|
if refresh == 0 || refresh == 2 {
|
|
|
- sqlStr := `SELECT isnull(ft.volume) volume,trim(feedp.pastureid) pastureid,barname,trim(barid) barid,trim(ftid) arrid,1 as type,? as times,ft.tname ftname,ft.tcolor background,0 isfill FROM feedp
|
|
|
+ sqlStr := `SELECT isnull(ft.volume) volume,trim(feedp.pastureid) pastureid,barname,
|
|
|
+ trim(barid) barid,trim(ftid) arrid,1 as type,? as times,ft.tname ftname,ft.tcolor background,0 isfill FROM feedp
|
|
|
inner join feedtemplet ft
|
|
|
on ft.id = feedp.ftid and ft.pastureid=?
|
|
|
WHERE feedp.pastureid = ? %s
|
|
@@ -840,20 +841,35 @@ func GetSpillage(c *gin.Context) {
|
|
|
if refresh == 0 || refresh == 1 {
|
|
|
sqlstr := ` SELECT
|
|
|
ifnull((select eqcode from tmr where pastureid =lpplan.pastureid and id = lpplan.tmrid ),lpplan.tmrname) tmrname,trim(tmrid) tmrid,sort,sel,times timesInt,
|
|
|
- CASE times
|
|
|
- WHEN 1 THEN
|
|
|
- '第一班'
|
|
|
- WHEN 2 THEN
|
|
|
- '第二班'
|
|
|
- WHEN 3 THEN
|
|
|
- '第三班'
|
|
|
- WHEN 4 THEN
|
|
|
- '第四班'
|
|
|
- WHEN 5 THEN
|
|
|
- '第五班'
|
|
|
- WHEN 6 THEN
|
|
|
- '第六班'
|
|
|
- END timesstr,issplit,
|
|
|
+ if( (select inforvalue from sysopt where inforname = 'language' and lpplan.pastureId) = 0 ,
|
|
|
+CASE
|
|
|
+lpplan.times
|
|
|
+ WHEN 1 THEN
|
|
|
+ '第一班'
|
|
|
+ WHEN 2 THEN
|
|
|
+ '第二班'
|
|
|
+ WHEN 3 THEN
|
|
|
+ '第三班'
|
|
|
+ WHEN 4 THEN
|
|
|
+ '第四班'
|
|
|
+ WHEN 5 THEN
|
|
|
+ '第五班'
|
|
|
+ WHEN 6 THEN
|
|
|
+ '第六班'
|
|
|
+ END ,CASE lpplan.times
|
|
|
+WHEN 1 THEN
|
|
|
+'First Shift'
|
|
|
+WHEN 2 THEN
|
|
|
+'Second Shift'
|
|
|
+WHEN 3 THEN
|
|
|
+'Third Shift'
|
|
|
+WHEN 4 THEN
|
|
|
+'Fourth Shift'
|
|
|
+WHEN 5 THEN
|
|
|
+'Five Shift'
|
|
|
+WHEN 6 THEN
|
|
|
+'Six Shift'
|
|
|
+END ) timesstr,issplit,
|
|
|
times,display,begintime,
|
|
|
(select tname from feedtemplet where pastureid =lpplan.pastureid and id = lpplan.ftid ) ftname,sumcowcount,
|
|
|
IFNULL(round((SELECT SUM(lpplandtl1.lweight) FROM lpplandtl1
|
|
@@ -1393,20 +1409,35 @@ GROUP BY fpd.ptsid`
|
|
|
lpplan.date,
|
|
|
-- ifnull((select eqcode from tmr where pastureid =lpplan.pastureid and id = lpplan.tmrid ),lpplan.tmrname)
|
|
|
lpplan.tmrname tmrname,trim(lpplan.tmrid) tmrid,lpplan.sort,lpplan.sel,lpplan.times timesInt,
|
|
|
- CASE lpplan.times
|
|
|
+ if( (select inforvalue from sysopt where inforname = 'language' and lpplan.pastureId) = 0 ,
|
|
|
+ CASE
|
|
|
+ lpplan.times
|
|
|
+ WHEN 1 THEN
|
|
|
+ '第一班'
|
|
|
+ WHEN 2 THEN
|
|
|
+ '第二班'
|
|
|
+ WHEN 3 THEN
|
|
|
+ '第三班'
|
|
|
+ WHEN 4 THEN
|
|
|
+ '第四班'
|
|
|
+ WHEN 5 THEN
|
|
|
+ '第五班'
|
|
|
+ WHEN 6 THEN
|
|
|
+ '第六班'
|
|
|
+ END ,CASE lpplan.times
|
|
|
WHEN 1 THEN
|
|
|
- '第一班'
|
|
|
+ 'First Shift'
|
|
|
WHEN 2 THEN
|
|
|
- '第二班'
|
|
|
+ 'Second Shift'
|
|
|
WHEN 3 THEN
|
|
|
- '第三班'
|
|
|
+ 'Third Shift'
|
|
|
WHEN 4 THEN
|
|
|
- '第四班'
|
|
|
+ 'Fourth Shift'
|
|
|
WHEN 5 THEN
|
|
|
- '第五班'
|
|
|
+ 'Five Shift'
|
|
|
WHEN 6 THEN
|
|
|
- '第六班'
|
|
|
- END timesstr,issplit,
|
|
|
+ 'Six Shift'
|
|
|
+ END ) timesstr,issplit,
|
|
|
lpplan.times,display,begintime,
|
|
|
(select tname from feedtemplet where pastureid =lpplan.pastureid and id = lpplan.ftid ) ftname,sumcowcount,
|
|
|
IFNULL(round((SELECT SUM(lpplandtl1.lweight) FROM lpplandtl1date lpplandtl1 WHERE lpplandtl1.lppid=lpplan.id and lpplandtl1.date= ?),2),0) sumweight ,
|