baishaojie 8 months ago
parent
commit
f1fd345e24
37 changed files with 19 additions and 17 deletions
  1. BIN
      TMRWatchComm
  2. BIN
      TMRWatchComm.zip
  3. 1 1
      conf/app.ini
  4. BIN
      dist-tmr-20240619.zip
  5. 0 0
      dist-tmr-20240619/dist/favicon.ico
  6. 0 0
      dist-tmr-20240619/dist/index.html
  7. 0 0
      dist-tmr-20240619/dist/static/css/app.ed733f4f.css
  8. 0 0
      dist-tmr-20240619/dist/static/css/chunk-elementUI.c1c3b808.css
  9. 0 0
      dist-tmr-20240619/dist/static/css/chunk-libs.f403b559.css
  10. 0 0
      dist-tmr-20240619/dist/static/fonts/element-icons.535877f5.woff
  11. 0 0
      dist-tmr-20240619/dist/static/fonts/element-icons.732389de.ttf
  12. 0 0
      dist-tmr-20240619/dist/static/img/404.a57b6f31.png
  13. 0 0
      dist-tmr-20240619/dist/static/img/404_cloud.0f4bc32b.png
  14. 0 0
      dist-tmr-20240619/dist/static/img/guiji2.9dc0addf.jpeg
  15. 0 0
      dist-tmr-20240619/dist/static/img/iconfont.0ddaba12.svg
  16. 0 0
      dist-tmr-20240619/dist/static/img/logo.afed751a.png
  17. 0 0
      dist-tmr-20240619/dist/static/img/logo1.0121925c.png
  18. 0 0
      dist-tmr-20240619/dist/static/img/logo_u3.3c77f543.png
  19. 0 0
      dist-tmr-20240619/dist/static/img/nlogin-bg1.77301f56.jpg
  20. 0 0
      dist-tmr-20240619/dist/static/img/row-bg3.b3be7548.png
  21. 0 0
      dist-tmr-20240619/dist/static/img/topBg.69ecd1e1.png
  22. 0 0
      dist-tmr-20240619/dist/static/js/app.bf68639d.js
  23. 0 0
      dist-tmr-20240619/dist/static/js/chunk-4ab5740d.fd41fff9.js
  24. 0 0
      dist-tmr-20240619/dist/static/js/chunk-52ecc0ac.6e6c1552.js
  25. 0 0
      dist-tmr-20240619/dist/static/js/chunk-5c4dc4a9.8801e0b1.js
  26. 0 0
      dist-tmr-20240619/dist/static/js/chunk-b702d234.4563c788.js
  27. 0 0
      dist-tmr-20240619/dist/static/js/chunk-elementUI.c961dc79.js
  28. 0 0
      dist-tmr-20240619/dist/static/js/chunk-libs.de4daf58.js
  29. 0 0
      dist-tmr-测试-20240617/dist/static/js/app.e481e3ac.js
  30. 0 0
      dist/index.html
  31. 0 0
      dist/static/css/app.ed733f4f.css
  32. 0 0
      dist/static/js/app.bf68639d.js
  33. 0 0
      dist/static/js/app.e481e3ac.js
  34. 4 4
      http/handle/api/grfdApi.go
  35. 5 5
      http/handle/api/scheduled.go
  36. 3 3
      http/handle/sap/sap.go
  37. 6 4
      update.sql

BIN
__debug_bin.exe → TMRWatchComm


BIN
TMRWatchComm.zip


+ 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 = tmrwatch23
+Name = grfd
 TablePrefix =
 
 ShowXormlog = false

BIN
dist-tmr-测试-20240617.zip → dist-tmr-20240619.zip


+ 0 - 0
dist-tmr-测试-20240617/dist/favicon.ico → dist-tmr-20240619/dist/favicon.ico


File diff suppressed because it is too large
+ 0 - 0
dist-tmr-20240619/dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist-tmr-20240619/dist/static/css/app.ed733f4f.css


+ 0 - 0
dist-tmr-测试-20240617/dist/static/css/chunk-elementUI.c1c3b808.css → dist-tmr-20240619/dist/static/css/chunk-elementUI.c1c3b808.css


+ 0 - 0
dist-tmr-测试-20240617/dist/static/css/chunk-libs.f403b559.css → dist-tmr-20240619/dist/static/css/chunk-libs.f403b559.css


+ 0 - 0
dist-tmr-测试-20240617/dist/static/fonts/element-icons.535877f5.woff → dist-tmr-20240619/dist/static/fonts/element-icons.535877f5.woff


+ 0 - 0
dist-tmr-测试-20240617/dist/static/fonts/element-icons.732389de.ttf → dist-tmr-20240619/dist/static/fonts/element-icons.732389de.ttf


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/404.a57b6f31.png → dist-tmr-20240619/dist/static/img/404.a57b6f31.png


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/404_cloud.0f4bc32b.png → dist-tmr-20240619/dist/static/img/404_cloud.0f4bc32b.png


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/guiji2.9dc0addf.jpeg → dist-tmr-20240619/dist/static/img/guiji2.9dc0addf.jpeg


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/iconfont.0ddaba12.svg → dist-tmr-20240619/dist/static/img/iconfont.0ddaba12.svg


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/logo.afed751a.png → dist-tmr-20240619/dist/static/img/logo.afed751a.png


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/logo1.0121925c.png → dist-tmr-20240619/dist/static/img/logo1.0121925c.png


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/logo_u3.3c77f543.png → dist-tmr-20240619/dist/static/img/logo_u3.3c77f543.png


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/nlogin-bg1.77301f56.jpg → dist-tmr-20240619/dist/static/img/nlogin-bg1.77301f56.jpg


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/row-bg3.b3be7548.png → dist-tmr-20240619/dist/static/img/row-bg3.b3be7548.png


+ 0 - 0
dist-tmr-测试-20240617/dist/static/img/topBg.69ecd1e1.png → dist-tmr-20240619/dist/static/img/topBg.69ecd1e1.png


File diff suppressed because it is too large
+ 0 - 0
dist-tmr-20240619/dist/static/js/app.bf68639d.js


+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/chunk-4ab5740d.fd41fff9.js → dist-tmr-20240619/dist/static/js/chunk-4ab5740d.fd41fff9.js


+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/chunk-52ecc0ac.6e6c1552.js → dist-tmr-20240619/dist/static/js/chunk-52ecc0ac.6e6c1552.js


+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/chunk-5c4dc4a9.8801e0b1.js → dist-tmr-20240619/dist/static/js/chunk-5c4dc4a9.8801e0b1.js


+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/chunk-b702d234.4563c788.js → dist-tmr-20240619/dist/static/js/chunk-b702d234.4563c788.js


+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/chunk-elementUI.c961dc79.js → dist-tmr-20240619/dist/static/js/chunk-elementUI.c961dc79.js


+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/chunk-libs.de4daf58.js → dist-tmr-20240619/dist/static/js/chunk-libs.de4daf58.js


File diff suppressed because it is too large
+ 0 - 0
dist-tmr-测试-20240617/dist/static/js/app.e481e3ac.js


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.ed733f4f.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.bf68639d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.e481e3ac.js


+ 4 - 4
http/handle/api/grfdApi.go

@@ -560,7 +560,7 @@ func AddOtherDevice() {
 		AND d.isuse=0 
 		AND d.pastureid =(SELECT column_default  FROM information_schema.COLUMNS WHERE table_name = 'recweight' AND table_schema = 'tmrwatch2' AND column_name = 'pastureid')
 		AND (SELECT COUNT(*) FROM downloadplandtl1 d1 WHERE  d.id=d1.PID AND d.pastureid=d1.pastureid  AND  d1.type = 0)>0
-		// AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND  downloadedplan.lpplantype=1 and mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0
+		AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND  downloadedplan.lpplantype=1 and mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0
 		GROUP BY d.pid +UNIX_TIMESTAMP(d.mydate)`).Query().List()
 
 	queryDataList, err2 := tx.SQL(`SELECT  d.pid +UNIX_TIMESTAMP(d.mydate) id,d.projname projName,ROUND(d.lweight,2) lWeight,DATE_FORMAT(d.mydate,'%Y-%m-%d') AS loadDate,d.SORT AS tmrNo,d.Times AS times,ft.backup1 AS ftId,d.templetName  AS ftName,f.backup1 AS fId,
@@ -573,7 +573,7 @@ func AddOtherDevice() {
 		 WHERE  (d.mydate=DATE_FORMAT(NOW(),'%Y-%m-%d') OR d.mydate=DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -1 DAY),'%Y-%m-%d') ) AND d.isuse=0  
 		 AND d.pastureid =(SELECT column_default  FROM information_schema.COLUMNS WHERE table_name = 'recweight' AND table_schema = 'tmrwatch2' AND column_name = 'pastureid') 
 		 AND (SELECT COUNT(*) FROM downloadplandtl1 d1 WHERE  d.id=d1.PID AND d.pastureid=d1.pastureid  AND  d1.type = 0)>0
-		//  AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND downloadedplan.lpplantype=1 and mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0
+		 AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND downloadedplan.lpplantype=1 and mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0
 		  group by d.pid,de.Fname`).Query().List()
 
 	if err1 == nil && err2 == nil {
@@ -667,9 +667,9 @@ func AddOtherDeviceFeeding() {
 	queryIdList, err1 := tx.SQL(`SELECT d.pid +UNIX_TIMESTAMP(d.mydate) id,d.pid did,d.projname projName,DATE_FORMAT(d.mydate,'%Y-%m-%d') mydate 
 		FROM downloadedplan d 
  		WHERE  (d.mydate=DATE_FORMAT(NOW(),'%Y-%m-%d')OR d.mydate=DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -1 DAY),'%Y-%m-%d') )   
- 		AND iscompleted=1 AND d.isUse=0
+ 		AND iscompleted=1 AND d.isuse2=0
  		AND (SELECT COUNT(*) FROM downloadplandtl2 d2 WHERE  d.id=d2.PID AND d.pastureid=d2.pastureid  AND  d2.type = 0)>0
- 		// AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0
+ 		AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0
 		`).Query().List()
 
 	queryDataList, err2 := tx.SQL(`		SELECT  d.pid +UNIX_TIMESTAMP(d.mydate) id,d.projname projName,DATE_FORMAT(d.mydate,'%Y-%m-%d') AS dropDate,d.Times AS times,d.SORT AS tmrNo,

+ 5 - 5
http/handle/api/scheduled.go

@@ -131,15 +131,15 @@ func CronScheduled(ctx context.Context) {
 	dayCron.Start()
 	// udFeedSync(pastureinfo)
 	// //圣牧自动同步前天有进行中的任务
-	manualUdData(pastureinfo)
+	// manualUdData(pastureinfo)
 	// gm.GmUdSync(pastureinfo.Pastureid, pastureinfo.Werks)
 	// xdmy := cron.New()
 	// err = xdmy.AddFunc("0 30 4 * * *", func() {
-	// 	// 	//现代牧业sap同步
+	// 	// 	// 	//现代牧业sap同步
 	// 	sap.SyncMaterialOutbound()
-	// 	// 	// 光明ud同步
-	// 	// 	fmt.Println(time.Now())
-	// 	// gm.GmUdSync(pastureinfo.Pastureid, pastureinfo.Werks)
+	// 	// 	// 	// 光明ud同步
+	// 	// 	// 	fmt.Println(time.Now())
+	// 	// 	// gm.GmUdSync(pastureinfo.Pastureid, pastureinfo.Werks)
 	// })
 	// xdmy.Start()
 	// InitMqttClient()

+ 3 - 3
http/handle/sap/sap.go

@@ -124,12 +124,12 @@ func materialOutbound(pastureId, date string) error {
 		return err
 	}
 
-	dataList, err := tx.SQL(`		SELECT 
+	dataList, err := tx.SQL(`			SELECT 
 	tem.sort ZEILE,
 	tem.feedname MAKTX,
 	ifnull(ROUND(if(tem.lweight<0,0,tem.lweight),(select  inforvalue from sysopt  where inforname="decimalPlaces" and pastureid =? )),0)lweight,
 	ifnull(ROUND(tem.actualweightminus,(select  inforvalue from sysopt  where inforname="decimalPlaces" and pastureid = ?)),0) MENGE
-	,tem.bname CHSTX,tem.sapcode CHSNO,tem.cattle FCWTS,tem.MATNR,tem.sapGoods LGORT
+	,tem.bname CHSTX,if( LOCATE("_剩料","日粮_剩料") = 0 , tem.sapcode,(select  inforvalue from sysopt  where inforname="excess" and pastureid =? ) ) CHSNO,tem.cattle FCWTS,tem.MATNR,tem.sapGoods LGORT
 
 	 FROM (
 	(SELECT 
@@ -207,7 +207,7 @@ left join feed f on f.id = ftd.fid
 	
 	) tem
 	
-	ORDER BY tem.d2sort,tem.feedname  `, pastureId, pastureId, pastureId, date, pastureId, date).Query().List()
+	ORDER BY tem.d2sort,tem.feedname   `, pastureId, pastureId, pastureId, pastureId, date, pastureId, date).Query().List()
 	if err != nil {
 		logs.Error(err)
 		return err

+ 6 - 4
update.sql

@@ -345,11 +345,10 @@ CREATE TABLE `surplus` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `pastureId` int(11) DEFAULT NULL,
   `surplus` varchar(50) DEFAULT NULL,
+  `feedId` bigint(20) DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `surplus` (`surplus`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-
-
+) ENGINE=InnoDB AUTO_INCREMENT=180 DEFAULT CHARSET=utf8mb3;
 
 
 ALTER TABLE `feedtemplet` 
@@ -360,4 +359,7 @@ ADD COLUMN `is_surplus` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 不是剩料' A
 
 
 ALTER TABLE `downloadplandtl1_exec` 
-ADD COLUMN `surplus` decimal(10, 2) NULL COMMENT '剩料重量' AFTER `xxwFeedCode`;
+ADD COLUMN `surplus` decimal(10, 2) NULL COMMENT '剩料重量' AFTER `xxwFeedCode`;
+
+
+INSERT INTO `dictlist` ( `pid`, `pastureId`, `label`, `value`, `orderby`, `enable`) VALUES ( 19, NULL, '剩料', '5', NULL, 1);

Some files were not shown because too many files changed in this diff