fanzherong_v 2 weeks ago
parent
commit
b2be0be66c

+ 3 - 2
snowy-admin-web/src/views/biz/bizorder/flow.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<xn-form-container title="流水" :width="1300" :visible="visible" :destroy-on-close="true" @close="onClose">
 	<xn-form-container title="流水" :width="1300" :visible="visible" :destroy-on-close="true" @close="onClose">
 		<s-table
 		<s-table
-			ref="tableRef"
+			ref="tabRef"
 			:columns="columns"
 			:columns="columns"
 			:data="loadData"
 			:data="loadData"
 			bordered
 			bordered
@@ -104,6 +104,7 @@
 	const table = ref()
 	const table = ref()
 	const resultJson = ref()
 	const resultJson = ref()
 	const detailRef = ref()
 	const detailRef = ref()
+	const tabRef = ref()
 
 
 	const labelStyle = {
 	const labelStyle = {
 		width: '20%'
 		width: '20%'
@@ -183,7 +184,7 @@
 		let param = {
 		let param = {
 			orderId:orderId.value
 			orderId:orderId.value
 		}
 		}
-		return bizRecordApi.bizRecordPage(param).then((data) => {
+		return bizRecordApi.bizRecordPage(Object.assign(parameter,param)).then((data) => {
 			return data
 			return data
 		})
 		})
 	}
 	}

+ 4 - 0
snowy-common/src/main/java/vip/xiaonuo/common/prop/CommonProperties.java

@@ -42,6 +42,10 @@ public class CommonProperties {
 
 
     private String mqttPassword;
     private String mqttPassword;
 
 
+    private String mqttClientId;
+
+    private String mqttTopic;
+
     /**微信公众号*/
     /**微信公众号*/
     private String officialToken;
     private String officialToken;
     private String officialAppId;
     private String officialAppId;

+ 7 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java

@@ -398,6 +398,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 if(bizLoadTime.getAvailableNumber()-bizLoadTime.getAlreadyNumber() <= 0){
                 if(bizLoadTime.getAvailableNumber()-bizLoadTime.getAlreadyNumber() <= 0){
                     throw new CommonException("当前装卸时段预约已满,不可预约!");
                     throw new CommonException("当前装卸时段预约已满,不可预约!");
                 }
                 }
+                if(new Date().getTime() > bizLoadTime.getEndTime().getTime()){
+                    throw new CommonException("装卸时间段已过,不可预约!");
+                }
             }
             }
         }finally {
         }finally {
             lock.unlock(); // 释放锁
             lock.unlock(); // 释放锁
@@ -414,6 +417,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 if(bizLoadTime.getAvailableNumber()-bizLoadTime.getAlreadyNumber() <= 0){
                 if(bizLoadTime.getAvailableNumber()-bizLoadTime.getAlreadyNumber() <= 0){
                     throw new CommonException("当前装卸时段预约已满,不可预约!");
                     throw new CommonException("当前装卸时段预约已满,不可预约!");
                 }
                 }
+                if(new Date().getTime() > bizLoadTime.getEndTime().getTime()){
+                    throw new CommonException("装卸时间段已过,不可预约!");
+                }
             }
             }
         }finally {
         }finally {
             lock.unlock(); // 释放锁
             lock.unlock(); // 释放锁
@@ -998,7 +1004,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             map.put("id",bizRecord.getRelationId());
             map.put("id",bizRecord.getRelationId());
             map.put("type","20");
             map.put("type","20");
             //mqtt发送过磅记录id给地磅端,告诉地磅端可打印磅单,抬道闸
             //mqtt发送过磅记录id给地磅端,告诉地磅端可打印磅单,抬道闸
-            mqttSubscribeClient.publishMessage("hnzydb", JSONObject.toJSONString(map));
+            mqttSubscribeClient.publishMessage(commonProperties.getMqttTopic(), JSONObject.toJSONString(map));
             log.info("授权出场mqtt下发车牌号:"+bizRecord.getLicensePlate());
             log.info("授权出场mqtt下发车牌号:"+bizRecord.getLicensePlate());
             bizRecordService.removeById(bizRecord.getId());
             bizRecordService.removeById(bizRecord.getId());
         }
         }

+ 1 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/mq/MqttSubscribeClient.java

@@ -32,7 +32,7 @@ public class MqttSubscribeClient implements CommandLineRunner {
         if(StringUtils.equals(mqttSwitch,"true")){
         if(StringUtils.equals(mqttSwitch,"true")){
             log.info("[MqttMsgSubscribe]公共生产者启动开始.");
             log.info("[MqttMsgSubscribe]公共生产者启动开始.");
             try{
             try{
-                client = new MqttClient(commonProperties.getMqttUrl(), "hnzy1234567890");
+                client = new MqttClient(commonProperties.getMqttUrl(), commonProperties.getMqttClientId());
                 connOpts = new MqttConnectOptions();
                 connOpts = new MqttConnectOptions();
                 connOpts.setCleanSession(true);
                 connOpts.setCleanSession(true);
                 connOpts.setUserName(commonProperties.getMqttName());
                 connOpts.setUserName(commonProperties.getMqttName());

+ 5 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/impl/BizRecordServiceImpl.java

@@ -67,6 +67,7 @@ import vip.xiaonuo.common.page.CommonPageRequest;
 import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.record.mapper.BizRecordMapper;
 import vip.xiaonuo.biz.modular.record.mapper.BizRecordMapper;
 import vip.xiaonuo.biz.modular.record.service.BizRecordService;
 import vip.xiaonuo.biz.modular.record.service.BizRecordService;
+import vip.xiaonuo.common.prop.CommonProperties;
 import vip.xiaonuo.common.util.CommonDownloadUtil;
 import vip.xiaonuo.common.util.CommonDownloadUtil;
 import vip.xiaonuo.common.util.CommonResponseUtil;
 import vip.xiaonuo.common.util.CommonResponseUtil;
 import vip.xiaonuo.dev.api.DevConfigApi;
 import vip.xiaonuo.dev.api.DevConfigApi;
@@ -108,6 +109,9 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
     @Resource
     @Resource
     private BizUserService bizUserService;
     private BizUserService bizUserService;
 
 
+    @Resource
+    private CommonProperties commonProperties;
+
     @Override
     @Override
     public Page<BizRecord> page(BizRecordPageParam bizRecordPageParam) {
     public Page<BizRecord> page(BizRecordPageParam bizRecordPageParam) {
         QueryWrapper<BizRecord> queryWrapper = getQueryWrapper(bizRecordPageParam);
         QueryWrapper<BizRecord> queryWrapper = getQueryWrapper(bizRecordPageParam);
@@ -627,7 +631,7 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         map.put("type","0");
         map.put("type","0");
         map.put("loadUser",bizRecord.getConfirmUser());
         map.put("loadUser",bizRecord.getConfirmUser());
         //mqtt发送过磅记录id给地磅端,告诉地磅端可打印磅单,抬道闸
         //mqtt发送过磅记录id给地磅端,告诉地磅端可打印磅单,抬道闸
-        mqttSubscribeClient.publishMessage("hnzydb", JSONObject.toJSONString(map));
+        mqttSubscribeClient.publishMessage(commonProperties.getMqttTopic(), JSONObject.toJSONString(map));
         log.info("司机确认mqtt下发车牌号:"+bizRecord.getLicensePlate());
         log.info("司机确认mqtt下发车牌号:"+bizRecord.getLicensePlate());
     }
     }
 
 

+ 2 - 1
snowy-web-app/src/main/resources/application-dev.properties

@@ -201,7 +201,8 @@ snowy.config.common.backend-url=http://localhost:82
 snowy.config.common.mqtt-url=tcp://192.168.25.47:1883
 snowy.config.common.mqtt-url=tcp://192.168.25.47:1883
 snowy.config.common.mqtt-name=bydz-smt
 snowy.config.common.mqtt-name=bydz-smt
 snowy.config.common.mqtt-password=bydzsmt123!@#
 snowy.config.common.mqtt-password=bydzsmt123!@#
-snowy.config.common.mqtt-clientId=my-mqtt-client-id
+snowy.config.common.mqtt-clientId=hnzy1234567890dev
+snowy.config.common.mqtt-topic=hnzydb
 
 
 open-sign.interceptor.sign.enable=true
 open-sign.interceptor.sign.enable=true
 open-sign.interceptor.sign.include-paths=/thirdPart/v1/**
 open-sign.interceptor.sign.include-paths=/thirdPart/v1/**

+ 14 - 2
snowy-web-app/src/main/resources/application-local.properties

@@ -25,6 +25,13 @@ spring.datasource.dynamic.datasource.master.username=root
 spring.datasource.dynamic.datasource.master.password=4008809192
 spring.datasource.dynamic.datasource.master.password=4008809192
 spring.datasource.dynamic.strict=true
 spring.datasource.dynamic.strict=true
 
 
+
+#spring.datasource.dynamic.datasource.master.driver-class-name=com.mysql.cj.jdbc.Driver
+#spring.datasource.dynamic.datasource.master.url=jdbc:mysql://localhost:3306/snowy_hnzy?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&useInformationSchema=true&rewriteBatchedStatements=true
+#spring.datasource.dynamic.datasource.master.username=root
+#spring.datasource.dynamic.datasource.master.password=root
+#spring.datasource.dynamic.strict=true
+
 # postgres
 # postgres
 #spring.datasource.dynamic.datasource.master.driver-class-name=org.postgresql.Driver
 #spring.datasource.dynamic.datasource.master.driver-class-name=org.postgresql.Driver
 #spring.datasource.dynamic.datasource.master.url=jdbc:postgresql://localhost:5432/snowy
 #spring.datasource.dynamic.datasource.master.url=jdbc:postgresql://localhost:5432/snowy
@@ -95,7 +102,7 @@ spring.jackson.serialization.write-dates-as-timestamps=false
 spring.data.redis.database=9
 spring.data.redis.database=9
 spring.data.redis.host=127.0.0.1
 spring.data.redis.host=127.0.0.1
 spring.data.redis.port=6379
 spring.data.redis.port=6379
-spring.data.redis.password= lease
+spring.data.redis.password=
 spring.data.redis.timeout=10s
 spring.data.redis.timeout=10s
 
 
 spring.data.redis.lettuce.pool.max-active=200
 spring.data.redis.lettuce.pool.max-active=200
@@ -106,6 +113,7 @@ spring.data.redis.lettuce.pool.min-idle=0
 #########################################
 #########################################
 # mybatis-plus configuration
 # mybatis-plus configuration
 #########################################
 #########################################
+#mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl
 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl
 mybatis-plus.configuration.jdbc-type-for-null=null
 mybatis-plus.configuration.jdbc-type-for-null=null
 mybatis-plus.global-config.banner=false
 mybatis-plus.global-config.banner=false
@@ -200,10 +208,14 @@ open-sign.interceptor.sign.enable=true
 open-sign.interceptor.sign.include-paths=/thirdPart/v1/**
 open-sign.interceptor.sign.include-paths=/thirdPart/v1/**
 
 
 #mqtt
 #mqtt
+#snowy.config.common.mqtt-url=tcp://218.2.6.74:13883
+#snowy.config.common.mqtt-name=bydz-smt
+#snowy.config.common.mqtt-password=bydzsmt123!@#
 snowy.config.common.mqtt-url=tcp://127.0.0.1:1883
 snowy.config.common.mqtt-url=tcp://127.0.0.1:1883
 snowy.config.common.mqtt-name=admin
 snowy.config.common.mqtt-name=admin
 snowy.config.common.mqtt-password=public
 snowy.config.common.mqtt-password=public
-snowy.config.common.mqtt-clientId=my-mqtt-client-id
+snowy.config.common.mqtt-clientId=hnzy1234567890local
+snowy.config.common.mqtt-topic=hnzydblocal
 
 
 #?????
 #?????
 snowy.config.common.official-token=jswhzl
 snowy.config.common.official-token=jswhzl