From bbc5784cc34d65e64d639d949e75b978fe07bdb3 Mon Sep 17 00:00:00 2001 From: yyt <306727702@qq.com> Date: 星期一, 06 五月 2024 12:30:48 +0800 Subject: [PATCH] 更新首页 --- jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java | 66 ++++++++++++++++++++------------- 1 files changed, 40 insertions(+), 26 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java index 8dee271..e263ecb 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java @@ -1,45 +1,40 @@ package com.jcdm.main.bs.orderScheduling.controller; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; - import cn.hutool.core.collection.CollUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; -import com.jcdm.common.annotation.Excel; +import com.jcdm.common.annotation.Log; +import com.jcdm.common.core.controller.BaseController; +import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.core.domain.R; import com.jcdm.common.core.domain.entity.SysDictData; -import com.jcdm.common.utils.DictUtils; +import com.jcdm.common.core.page.TableDataInfo; +import com.jcdm.common.enums.BusinessType; import com.jcdm.common.utils.StringUtils; +import com.jcdm.common.utils.poi.ExcelUtil; +import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; +import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO; import com.jcdm.main.bs.orderScheduling.vo.LineChartVO; import com.jcdm.main.da.paramCollection.domain.DaParamCollection; import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; +import com.jcdm.main.plcserver.conf.OPCElement; import com.jcdm.system.service.ISysDictDataService; -import org.springframework.security.access.prepost.PreAuthorize; +import com.kangaroohy.milo.model.ReadWriteEntity; +import com.kangaroohy.milo.service.MiloService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.jcdm.common.annotation.Log; -import com.jcdm.common.core.controller.BaseController; -import com.jcdm.common.core.domain.AjaxResult; -import com.jcdm.common.enums.BusinessType; -import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; -import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; -import com.jcdm.common.utils.poi.ExcelUtil; -import com.jcdm.common.core.page.TableDataInfo; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; /** * 璁㈠崟鎺掍骇Controller @@ -58,6 +53,25 @@ @Resource private ISysDictDataService iSysDictDataService; + + @Autowired + MiloService miloService; + + @Value("${websocketUrl}") + private String websocketUrl; + + @GetMapping("/forceUpload") + public void forceUpload() throws Exception { + ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP121_ZZ_CODE_CHECK, 1); + miloService.writeToOpcByte(entity); + } + + @GetMapping("/websocketUrl") + public String websocketName() { + return websocketUrl; + } + + /** * 鏌ヨ璁㈠崟鎺掍骇鍒楄〃 */ -- Gitblit v1.9.3