소스 검색

多语言

baishaojie 8 달 전
부모
커밋
f3da0f8705
6개의 변경된 파일59개의 추가작업 그리고 28개의 파일을 삭제
  1. BIN
      __debug_bin.exe
  2. 1 1
      conf/app.ini
  3. 2 2
      http/handle/api/report.go
  4. 1 2
      http/handle/api/scheduled.go
  5. 54 23
      http/handle/api/spillage.go
  6. 1 0
      http/handle/sap/sap.go

BIN
__debug_bin.exe


+ 1 - 1
conf/app.ini

@@ -75,7 +75,7 @@ Host = 192.168.1.93:3326
 #Name = tmrgo
 #Password = kepaiteng!QAZ
 #Host = 222.73.129.15:31306
-Name = tmrwatchenglish
+Name = tmrwatch5
 TablePrefix =
 
 ShowXormlog = false

+ 2 - 2
http/handle/api/report.go

@@ -186,7 +186,7 @@ func getAccuracyV9(queryList []map[string]interface{}, sqlnamestr string, flleig
 	data2 := []interface{}{}
 	data1 := []interface{}{}
 
-	mapc3["label"] = "车次"
+	mapc3["label"] = "Batch"
 	mapc3["prop"] = "projname"
 	data1 = append(data1, mapc3)
 	mapc3 = make(map[string]interface{})
@@ -278,7 +278,7 @@ func getAccuracyV9(queryList []map[string]interface{}, sqlnamestr string, flleig
 		mapc3 = make(map[string]interface{})
 	}
 	if queryList[0]["sumlweight"] != nil {
-		mapc3["label"] = "合计"
+		mapc3["label"] = "Sum"
 		mapc3["prop"] = "sumlweight"
 	}
 	data1 = append(data1, mapc3)

+ 1 - 2
http/handle/api/scheduled.go

@@ -16,7 +16,6 @@ import (
 
 	"tmr-watch/conf/setting"
 	"tmr-watch/http/handle/restful"
-	"tmr-watch/http/handle/sap"
 	"tmr-watch/pkg/app"
 	"tmr-watch/pkg/e"
 	"tmr-watch/pkg/logging"
@@ -146,7 +145,7 @@ func CronScheduled(ctx context.Context) {
 	// 	sap.SyncSurplusOutbound()
 	// })
 
-	xdmy.Start()
+	// xdmy.Start()
 	// InitMqttClient()
 	// yq.YqCron()
 }

+ 54 - 23
http/handle/api/spillage.go

@@ -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 ,

+ 1 - 0
http/handle/sap/sap.go

@@ -46,6 +46,7 @@ func SyncSurplusOutbound() error {
 		return err
 	}
 	surplusOutbound(pastureinfo.Pastureid, time.Now().Format("2006-01-02"))
+	return nil
 }
 
 func SyncSapBar(c *gin.Context) {