Преглед изворни кода

修改脚本数据
添加重设参数值

18339543638 пре 11 месеци
родитељ
комит
95d5df8e69

+ 1 - 1
nb-admin/src/main/resources/application-dev.yml

@@ -30,7 +30,7 @@ spring:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driverClassName: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://192.168.100.32:3306/nbnetpump1?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
+    url: jdbc:mysql://192.168.100.32:3306/nbnetpump?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
     username: root
     password: 123456
     druid:

+ 1 - 1
nb-core/src/main/java/com/nb/core/utils/ExceptionUtil.java

@@ -8,7 +8,7 @@ package com.nb.core.utils;
  * @createTime 2022年07月04日 13:49:00
  */
 public class ExceptionUtil {
-    public static final int dept=10;
+    public static final int dept=50;
     public static String getExceptionMsg(Throwable e){
         StringBuffer result=new StringBuffer(e.toString()).append("\n");
         StackTraceElement[] stackTrace = e.getStackTrace();

+ 2 - 0
nb-service/iot-service/src/main/java/com/nb/aliyun/controller/IotController.java

@@ -22,6 +22,7 @@ import com.nb.web.api.feign.IIotMsgHandler;
 import io.netty.channel.DefaultEventLoopGroup;
 import io.swagger.annotations.Api;
 import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -40,6 +41,7 @@ import java.util.concurrent.ExecutorService;
 @RequestMapping("/iot")
 @Api(description="iot数据处理")
 @AllArgsConstructor
+@Slf4j
 public class IotController {
 
     private final IIotMsgHandler iotMsgHandler;

+ 2 - 1
nb-service/web-service/src/main/java/com/nb/web/service/bus/controller/BusPatientController.java

@@ -71,7 +71,8 @@ public class BusPatientController  implements BaseQueryController<BusPatientEnti
     @Log(title = "输注监控列表查询")
     @SaCheckPermission("device:patient:query")
     @ApiOperation(value = "输注监控列表",notes = "病人监控管理列表,权限【device:patient:query】")
-    public R<List<PatientMonitorResult>> selectPage(@RequestBody PatientMonitorQuery query){
+    public R<List<PatientMonitorResult>> selectPage(@RequestAttribute("tenantId")@ApiParam(hidden = true) String tenantId,@RequestBody PatientMonitorQuery query){
+        query.setTenantId(tenantId);
         log.info("输注监控列表,【{}】",JSONUtil.toJsonStr(query));
         return R.success(patientService.selectAll(query));
     }

+ 3 - 1
nb-service/web-service/src/main/java/com/nb/web/service/bus/job/HospitalConfigJob.java

@@ -34,6 +34,8 @@ import lombok.AllArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
 import java.util.Date;
 import java.util.List;
 import java.util.Objects;
@@ -67,7 +69,7 @@ public class HospitalConfigJob {
     private DeputyDeviceAutoUndoHandler deputyDeviceAutoUndoHandler;
 
     /**
-     * 描述: 每天早上9点定时对医院的配置参数进行补偿处理
+     * 描述: 每天早上1点定时对医院的配置参数进行补偿处理
      * @author lifang
      * @date 2022/7/29 9:03
      * @param

+ 8 - 8
nb-service/web-service/src/main/java/com/nb/web/service/bus/registry/patient/ClusterPatientOperator.java

@@ -49,11 +49,11 @@ public class ClusterPatientOperator implements PatientOperator {
     @Override
     public boolean getExist() {
         Value value = getValue(DeviceKeyConstant.IS_EXIST);
-        if(value==null){
+//        if(value==null){
             BusPatientEntity  patient = patientService.findByOriginCode(patientCode, hospitalId);
             value=Value.simple(patient!=null);
             setExist(patient!=null);
-        }
+//        }
         return value.asBoolean();
     }
 
@@ -77,11 +77,11 @@ public class ClusterPatientOperator implements PatientOperator {
     @Override
     public String getClinicId() {
         Value value = getValue(PatientKeyConstant.CLINIC_ID);
-        if(value==null){
+//        if(value==null){
             BusPatientEntity patient = getPatient();
             value=Value.simple(patient.getClinicId());
             setClinicId(patient.getClinicId());
-        }
+//        }
         return value.asString();
     }
 
@@ -93,7 +93,7 @@ public class ClusterPatientOperator implements PatientOperator {
     @Override
     public String getBindDeviceId() {
         Value value = getValue(PatientKeyConstant.BIND_DEVICE_ID);
-        if(value==null){
+//        if(value==null){
             BusPatientEntity patient = getPatient();
             if(patient==null|| CharSequenceUtil.isEmpty(patient.getInfusionId())){
                 return null;
@@ -104,18 +104,18 @@ public class ClusterPatientOperator implements PatientOperator {
             }
             value=Value.simple(infusion.getDeviceId());
             setBindDeviceId(infusion.getDeviceId());
-        }
+//        }
         return value.asString();
     }
 
     @Override
     public String getPatientId() {
         Value value = getValue(PatientKeyConstant.PATIENT_ID);
-        if(value==null){
+//        if(value==null){
             BusPatientEntity patient = getPatient();
             value=Value.simple(patient.getId());
             setPatientId(patient.getId());
-        }
+//        }
         return value.asString();
     }
 

+ 1 - 1
nb-service/web-service/src/main/java/com/nb/web/service/bus/service/LocalBusDeviceService.java

@@ -160,7 +160,7 @@ public class LocalBusDeviceService extends BaseService<BusDeviceMapper, BusDevic
         return this.update(new LambdaUpdateWrapper<BusDeviceEntity>()
                 .eq(BusDeviceEntity::getDeviceId,device.getDeviceId())
                 .set(StrUtil.isNotEmpty(device.getMqttConnInfo()),BusDeviceEntity::getMqttConnInfo,device.getMqttConnInfo())
-//                .set(StrUtil.isNotEmpty(device.getAlias()),BusDeviceEntity::getAlias,device.getAlias())
+                .set(StrUtil.isNotEmpty(device.getAlias()),BusDeviceEntity::getAlias,device.getAlias())
                 .set(StrUtil.isNotEmpty(device.getInfusionId()),BusDeviceEntity::getInfusionId,device.getInfusionId())
                 .set(StrUtil.isNotEmpty(device.getSimIccid()),BusDeviceEntity::getSimIccid,device.getSimIccid())
                 .set(StrUtil.isNotEmpty(device.getSimMno()),BusDeviceEntity::getSimMno,device.getSimMno())