|
@@ -38,6 +38,7 @@ import com.nb.core.exception.CustomException;
|
|
|
import com.nb.web.service.system.entity.SysRole;
|
|
import com.nb.web.service.system.entity.SysRole;
|
|
|
import com.nb.web.service.system.service.impl.SysRoleServiceImpl;
|
|
import com.nb.web.service.system.service.impl.SysRoleServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.jdbc.BadSqlGrammarException;
|
|
import org.springframework.jdbc.BadSqlGrammarException;
|
|
@@ -74,6 +75,9 @@ public class LocalBusHospitalService extends BaseService<BusHospitalMapper, BusH
|
|
|
@Lazy
|
|
@Lazy
|
|
|
private LocalBusConAlarmService conAlarmService;
|
|
private LocalBusConAlarmService conAlarmService;
|
|
|
|
|
|
|
|
|
|
+ @Value("${spring.profiles.active}")
|
|
|
|
|
+ private String env;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
@Lazy
|
|
@Lazy
|
|
|
private SysRoleServiceImpl sysRoleService;
|
|
private SysRoleServiceImpl sysRoleService;
|
|
@@ -195,8 +199,9 @@ public class LocalBusHospitalService extends BaseService<BusHospitalMapper, BusH
|
|
|
alarmCause.setTenantId(entity.getId());
|
|
alarmCause.setTenantId(entity.getId());
|
|
|
}).collect(Collectors.toSet()));
|
|
}).collect(Collectors.toSet()));
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
- sendIotAddHospital(entity);
|
|
|
|
|
|
|
+ if(StrUtil.equalsAny("prod",env)){
|
|
|
|
|
+ sendIotAddHospital(entity);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void sendIotAddHospital(BusHospitalEntity source){
|
|
private void sendIotAddHospital(BusHospitalEntity source){
|