Files
his/openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java
zhangfei 9c3e603b94 Fix Bug #443: 手术计费:点击签发耗材时异常报错
当手术计费弹窗中点击"签发"耗材时,因耗材的locationId(发放库房)为空导致后端异常。
在DoctorStationAdviceAppServiceImpl.handDevice方法中,当locationId为null时,使用登录用户的科室ID作为默认值,
与NurseBillingAppService中的处理方式保持一致。
2026-05-08 09:14:18 +08:00

45 lines
2.1 KiB
Java
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.openhis;
import com.openhis.web.ybmanage.config.YbServiceConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* 启动程序
*
* @author system 1234
*/
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
@EnableConfigurationProperties(YbServiceConfig.class)
@EnableAsync
public class OpenHisApplication {
public static void main(String[] args) throws UnknownHostException {
// System.setProperty("spring.devtools.restart.enabled", "false");
// 测试 Instrument 类加载
// try {
// Class.forName("com.openhis.administration.domain.Instrument");
// System.out.println("Instrument class loaded successfully");
// } catch (ClassNotFoundException e) {
// System.err.println("Failed to load Instrument class: " + e.getMessage());
// }
ConfigurableApplicationContext application = SpringApplication.run(OpenHisApplication.class, args);
Environment env = application.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = env.getProperty("server.servlet.context-path");
System.out.println("\n----------------------------------------------------------\n\t"
+ "Application OpenHis is running! Access URLs:\n\t" + "Local: \t\thttp://localhost:" + port + path
+ "/\n\t" + "External: \thttp://" + ip + ":" + port + path + "/\n"
+ "----------------------------------------------------------");
}
}