18339543638 6 ヶ月 前
コミット
e9effe39d5

+ 14 - 1
nb-admin/pom.xml

@@ -120,7 +120,20 @@
         <resources>
             <resource>
                 <directory>src/main/resources</directory>
-                <filtering>true</filtering>
+                <excludes>
+                    <exclude>**/*.jar</exclude>
+                    <exclude>**/*.zip</exclude>
+                    <!-- 其他二进制文件类型 -->
+                </excludes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*.jar</include>
+                    <include>**/*.zip</include>
+                    <!-- 其他二进制文件类型 -->
+                </includes>
+                <filtering>false</filtering>
             </resource>
         </resources>
         <!--<pluginManagement>-->

+ 6 - 0
nb-admin/src/main/resources/db/migration/V4__init_20250418.sql

@@ -0,0 +1,6 @@
+-- 添加字段并设置默认值为 0(正常),不允许空值
+ALTER TABLE bus_clinic ADD COLUMN abnormal TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否异常';
+
+ALTER TABLE bus_clinic ADD COLUMN abnormal_reason VARCHAR(255) COMMENT '异常标识备注';
+
+ALTER TABLE app_doctor_user ADD COLUMN is_edit TINYINT(1) COMMENT '是否修改0-否;1-是';

+ 71 - 0
nb-service/app-assistant/src/main/java/com/nb/app/assistant/service/LocalAppIphoneService.java

@@ -0,0 +1,71 @@
+package com.nb.app.assistant.service;
+
+
+import com.nb.app.assistant.api.bean.DeviceAlarmBean;
+import com.nb.app.assistant.api.feign.IAppIphoneClient;
+import org.redisson.api.RedissonClient;
+import com.nb.web.api.feign.IDeviceAlarmClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+
+/**
+ * @ClassName : LocalAppIphoneService
+ * @Description :
+ * @Author : LF
+ * @Date: 2024年09月10日
+ */
+@Service("iosService")
+public class LocalAppIphoneService implements IAppIphoneClient {
+    @Autowired
+    private  RedissonClient redissonClient;
+
+    @Autowired
+    @Lazy
+    private IDeviceAlarmClient deviceAlarmClient;
+
+    @Autowired
+    @Lazy
+    private LocalAppIphoneService self;
+
+//    public void addDeviceToken(IphoneDeviceDTO source){
+//        RSet<IphoneDeviceTokenUserDTO> tenantSet = redissonClient.getSet("ios:"+source.getTenantId());
+//        tenantSet.add(IphoneDeviceTokenUserDTO.of(source.getDeviceToken(),source.getUserId(),new Date()));
+//    }
+
+//    public void removeDeviceToken(IphoneDeviceDTO source){
+//        RSet<IphoneDeviceTokenUserDTO> tenantSet = redissonClient.getSet("ios:"+source.getTenantId());
+//        Set<IphoneDeviceTokenUserDTO> iphoneDeviceTokenUserDTOS = tenantSet.readAll();
+//        HashSet<IphoneDeviceTokenUserDTO> removeAll = new HashSet<IphoneDeviceTokenUserDTO>();
+//        for (IphoneDeviceTokenUserDTO deviceTokenUser : iphoneDeviceTokenUserDTOS) {
+//            if(StrUtil.equals(source.getDeviceToken(),deviceTokenUser.getDeviceToken())){
+//                removeAll.add(deviceTokenUser);
+//            }
+//        }
+//        if(CollectionUtil.isNotEmpty(removeAll)){
+//            tenantSet.removeAll(removeAll);
+//        }
+//    }
+
+    @Override
+    public void sendAlarmMsg(String tenantId, DeviceAlarmBean source) {
+//        self.sendMsg(tenantId,source);
+    }
+
+//    public void sendMsg(String tenantId, DeviceAlarmBean source){
+//        RSet<IphoneDeviceTokenUserDTO> tenantSet = redissonClient.getSet("ios:"+tenantId);
+//        Set<IphoneDeviceTokenUserDTO> deviceTokenSet = tenantSet.readAll();
+//        if (CollectionUtil.isNotEmpty(deviceTokenSet)) {
+//            deviceTokenSet.parallelStream()
+//                    .forEach(deviceTokenUser->{
+//                        try {
+//                            Long alarmCount = deviceAlarmClient.count(tenantId, deviceTokenUser.getOfflineTime());
+//                            ApnsUtils.sendMsg(deviceTokenUser.getDeviceToken(),source,alarmCount>99?99:alarmCount);
+//                        } catch (Exception e) {
+//                            e.printStackTrace();
+//                        }
+//                    });
+//        }
+//    }
+
+}

+ 7 - 0
nb-service/web-service/pom.xml

@@ -59,6 +59,13 @@
             <artifactId>nb-oss</artifactId>
         </dependency>
 
+
+        <dependency>
+            <groupId>org.springframework.amqp</groupId>
+            <artifactId>spring-rabbit</artifactId>
+        </dependency>
+
+
         <dependency>
             <groupId>org.python</groupId>
             <artifactId>jython-standalone</artifactId>