wenhongquan 1 год назад
Родитель
Сommit
0d405a0bf2

+ 1 - 1
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/system/controller/StatisticController.java

@@ -34,7 +34,7 @@ public class StatisticController extends BaseController {
 
 
 
 
 
 
-    @GetMapping("/passenger/flow")
+    @PostMapping("/passenger/flow")
     public Object sitesFlow(@RequestBody(required = false) Map<String,Object> data) {
     public Object sitesFlow(@RequestBody(required = false) Map<String,Object> data) {
         if(data==null) data=new HashMap<>();
         if(data==null) data=new HashMap<>();
         if(data.get("start")==null){
         if(data.get("start")==null){

+ 1 - 1
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/util/CabinetUtil.java

@@ -115,7 +115,7 @@ public class CabinetUtil {
         for (TblCarScheduleVo scheduleVo : scheduleVos) {
         for (TblCarScheduleVo scheduleVo : scheduleVos) {
             if(StrUtil.isNotEmpty(scheduleVo.getExt2())){
             if(StrUtil.isNotEmpty(scheduleVo.getExt2())){
                 try{
                 try{
-                    if(JSONUtil.parseObj(scheduleVo.getExt2()).getBool("isauto") && map.get(scheduleVo.getCarNum()+DateUtil.format(scheduleVo.getScheduleDate(),DatePattern.NORM_DATETIME_PATTERN))==null){
+                    if(JSONUtil.parseObj(scheduleVo.getExt2()).getBool("isauto") && map.get(scheduleVo.getCarNum()+DateUtil.format( DateUtil.date(scheduleVo.getScheduleDate()).offset(DateField.DAY_OF_MONTH,1),DatePattern.NORM_DATETIME_PATTERN))==null){
                         //copy
                         //copy
                         TblCarScheduleBo bo1 =new TblCarScheduleBo();
                         TblCarScheduleBo bo1 =new TblCarScheduleBo();
                         bo1.setCarNum(scheduleVo.getCarNum());
                         bo1.setCarNum(scheduleVo.getCarNum());

+ 14 - 1
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/util/MessageUtils.java

@@ -1,8 +1,13 @@
 package org.dromara.util;
 package org.dromara.util;
 
 
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import cn.hutool.extra.spring.SpringUtil;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.core.utils.SpringUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.core.utils.StringUtils;
+import org.dromara.system.service.ISysConfigService;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Import;
 
 
 import java.io.UnsupportedEncodingException;
 import java.io.UnsupportedEncodingException;
@@ -31,8 +36,16 @@ public class MessageUtils {
             Map<String, String> data = new HashMap<>();
             Map<String, String> data = new HashMap<>();
             data.put("devtype", "tts");
             data.put("devtype", "tts");
             data.put("devcode", devicecode);
             data.put("devcode", devicecode);
+            int vol = 1;
+            try {
+                String vols = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("sys.tts.vol");
+                JSONObject volso =JSONUtil.parseObj(vols);
+                int hour = DateUtil.date().hour(true);
+                vol = volso.getInt(hour<10?"0"+hour:hour+"");
+            }catch (Exception e){}
+
             final CamelDataUtil camelDataUtil = SpringUtil.getBean("camelDataUtil");
             final CamelDataUtil camelDataUtil = SpringUtil.getBean("camelDataUtil");
-            camelDataUtil.SendData("direct:sendMessage", StringUtils.format("{\"val\":\"{}\",\"vol\":3,\"id\":\"{}\"}", message,devicecode), "mqheader", data);
+            camelDataUtil.SendData("direct:sendMessage", StringUtils.format("{\"val\":\"{}\",\"vol\":"+vol+",\"id\":\"{}\"}", message,devicecode), "mqheader", data);
         }else{
         }else{
             log.error("------------------");
             log.error("------------------");
             log.error("devicecode:"+devicecode.toString()+"     message:"+message.toString());
             log.error("devicecode:"+devicecode.toString()+"     message:"+message.toString());