18339543638 преди 1 година
родител
ревизия
a87bd8eb08

+ 3 - 16
nb-admin/src/main/resources/application.yml

@@ -10,17 +10,6 @@ spring:
     active: dev
   jackson:
     time-zone: GMT+8
-  flyway:
-    enabled: true
-    encoding: UTF-8
-#    迁移脚本位置
-    locations:
-      - classpath:db/migration
-    sql-migration-prefix: V
-    sql-migration-separator: _
-    sql-migration-suffixes: .sql
-    validate-on-migrate: true
-    baseline-on-migrate: true
 
 server:
   port: 9090
@@ -56,7 +45,7 @@ sa-token:
   # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
   is-concurrent: true
   # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
-  is-share: true
+  is-share: false
   # token风格
   token-style: simple-uuid
   # 是否输出操作日志
@@ -93,6 +82,7 @@ mybatis-plus:
   configuration:
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler
+    cache-enabled: false
   type-aliases-package: com.nb.bus.entity
 
 captcha:
@@ -106,7 +96,4 @@ management:
   endpoints:
     web:
       exposure:
-        include: heapdump,metrics
-hospital:
-  code: 123
-  name: 中央监护管理系统
+        include: heapdump,metrics

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

@@ -49,7 +49,7 @@ public class IotController {
      */
     @PostMapping("/data/save")
     @SaIgnore
-    public R assignMenu(@RequestBody BusDeviceRunningEntity source) {
+    public R dataSave(@RequestBody BusDeviceRunningEntity source) {
         if(StrUtil.isBlank(source.getDeviceId())){
             throw new CustomException("[deviceId]设备id不能为空");
         }

+ 2 - 2
nb-service/web-service/src/main/java/com/nb/web/service/bus/mapper/BusPatientMapper.java

@@ -26,7 +26,7 @@ public interface BusPatientMapper extends BaseMapper<BusPatientEntity> {
      * @param
      * @return
      */
-    default List<PatientDeviceRepeatDomain> selectRepeatDevice(){
+    default List<PatientDeviceRepeatDomain> selectAllRepeatDevice(){
         return selectRepeatDevice(null);
     };
     /**
@@ -41,7 +41,7 @@ public interface BusPatientMapper extends BaseMapper<BusPatientEntity> {
      * @param
      * @return
      */
-    default List<PatientDeviceNoneResult> selectNoneDevice(){
+    default List<PatientDeviceNoneResult> selectNoneAllDevice(){
         return selectNoneDevice(null);
     };
 

+ 2 - 2
nb-service/web-service/src/main/java/com/nb/web/service/bus/service/LocalBusPatientService.java

@@ -187,7 +187,7 @@ public class LocalBusPatientService extends BaseService<BusPatientMapper, BusPat
      * 获取给定医院下所有的挂载多个设备的病人信息
      */
     public List<PatientDeviceRepeatResult> repeatDevice() {
-        List<PatientDeviceRepeatDomain> patientDeviceRepeats = this.baseMapper.selectRepeatDevice();
+        List<PatientDeviceRepeatDomain> patientDeviceRepeats = this.baseMapper.selectAllRepeatDevice();
         Map<String, PatientDeviceRepeatResult> resultMap = new HashMap<>();
         patientDeviceRepeats.forEach(deviceRepeat -> {
             PatientDeviceRepeatResult repeatResult = resultMap.computeIfAbsent(deviceRepeat.getCode() + deviceRepeat.getClinicId(), k ->
@@ -223,7 +223,7 @@ public class LocalBusPatientService extends BaseService<BusPatientMapper, BusPat
      * @return
      */
     public List<PatientDeviceNoneResult> noneDevice() {
-        return this.baseMapper.selectNoneDevice();
+        return this.baseMapper.selectNoneAllDevice();
     }
 
     @Override

+ 5 - 5
nb-service/web-service/src/main/resources/mapper/bus/BusDeviceMapper.xml

@@ -65,19 +65,19 @@
         from (select * from bus_device
         <where>
             is_delete=0
-            <if test="query.productNo!=null">
+            <if test="query.productNo!=null and query.productNo != ''">
                 and product_no like concat('%',#{query.productNo},'%')
             </if>
-            <if test="query.deviceId!=null">
+            <if test="query.deviceId!=null and query.deviceId != ''">
                 and device_id like concat('%',#{query.deviceId},'%')
             </if>
-            <if test="query.alias!=null">
+            <if test="query.alias!=null and query.alias != ''">
                 and alias like concat('%',#{query.alias},'%')
             </if>
-            <if test="query.status!=null">
+            <if test="query.status!=null and query.status != ''">
                 and status = #{query.status}
             </if>
-            <if test="query.iccId!=null">
+            <if test="query.iccId!=null and query.iccId !=''">
                 and sim_iccid like concat('%',#{query.iccId},'%')
             </if>
         </where>

+ 8 - 5
nb-service/web-service/src/main/resources/mapper/bus/BusPatientMapper.xml

@@ -132,15 +132,18 @@
         i.run_state as device_run_state,
         i.alarm as device_alarm,
         i.start_time as infusion_start_time
-        FROM (SELECT `name`,gender,infusion_id,CODE,id FROM bus_patient WHERE bus_patient.`alarm`=1) AS p
-        join  (select * from bus_infusion_history where is_undo=0 and finished=0) as i on i.patient_id=p.id
-        join (select device_id,alias from bus_device) as d on d.device_id=i.device_id
-        join  (SELECT * FROM bus_clinic WHERE finished=0 and monitor_type=1) AS c ON  c.`patient_id`=p.id;
+        FROM (SELECT `name`,gender,infusion_id,CODE,id FROM bus_patient
         <where>
+            bus_patient.`alarm`=1
             <if test="tenantId != null and tenantId != ''">
-                and p.tenant_id=#{tenantId}
+                and tenant_id=#{tenantId}
             </if>
         </where>
+             ) AS p
+        join  (select * from bus_infusion_history where is_undo=0 and finished=0) as i on i.patient_id=p.id
+        join (select device_id,alias from bus_device) as d on d.device_id=i.device_id
+        join  (SELECT * FROM bus_clinic WHERE finished=0 and monitor_type=1) AS c ON  c.`patient_id`=p.id
+
     </select>
 
     <select id="selectNoneDevice" resultMap="deviceNone">