Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package com.core.framework.aspectj;
|
||||
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.AfterThrowing;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
@@ -17,7 +17,7 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
public class TransactionAspect {
|
||||
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
private TransactionStatus transactionStatus;
|
||||
private final ThreadLocal<TransactionStatus> transactionStatus = new ThreadLocal<>();
|
||||
|
||||
public TransactionAspect(PlatformTransactionManager transactionManager) {
|
||||
this.transactionManager = transactionManager;
|
||||
@@ -28,7 +28,8 @@ public class TransactionAspect {
|
||||
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
||||
public void beginTransaction() {
|
||||
transactionStatus = transactionManager.getTransaction(new DefaultTransactionDefinition());
|
||||
TransactionStatus status = transactionManager.getTransaction(new DefaultTransactionDefinition());
|
||||
transactionStatus.set(status);
|
||||
}
|
||||
|
||||
@AfterReturning("@annotation(org.springframework.web.bind.annotation.PostMapping) || " +
|
||||
@@ -36,8 +37,10 @@ public class TransactionAspect {
|
||||
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
||||
public void commitTransaction() {
|
||||
if (transactionStatus != null && !transactionStatus.isCompleted()) {
|
||||
transactionManager.commit(transactionStatus);
|
||||
TransactionStatus status = transactionStatus.get();
|
||||
if (status != null && !status.isCompleted()) {
|
||||
transactionManager.commit(status);
|
||||
transactionStatus.remove(); // 清除 ThreadLocal 中的状态
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +50,10 @@ public class TransactionAspect {
|
||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)",
|
||||
throwing = "ex")
|
||||
public void rollbackTransaction(Exception ex) {
|
||||
if (transactionStatus != null && !transactionStatus.isCompleted()) {
|
||||
transactionManager.rollback(transactionStatus);
|
||||
TransactionStatus status = transactionStatus.get();
|
||||
if (status != null && !status.isCompleted()) {
|
||||
transactionManager.rollback(status);
|
||||
transactionStatus.remove(); // 清除 ThreadLocal 中的状态
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.openhis.web.outpatientservice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 门诊挂号 新增数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutpatientRegistrationAddDto {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 患者管理Service接口
|
||||
*
|
||||
@@ -28,4 +29,14 @@ public interface IPatientService extends IService<Patient> {
|
||||
* @return 是/否
|
||||
*/
|
||||
boolean isFuture(String date);
|
||||
|
||||
/**
|
||||
* 通过关键字查询患者信息
|
||||
*
|
||||
* @param searchKey 关键字
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return 患者信息
|
||||
*/
|
||||
Page<Patient> getPatientBySearchKey(String searchKey, Integer pageNo, Integer pageSize);
|
||||
}
|
||||
@@ -82,6 +82,9 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
/** 执行人 */
|
||||
private Long performerId;
|
||||
|
||||
/** 核对人 */
|
||||
private Long performerCheckId;
|
||||
|
||||
/** 执行位置 */
|
||||
private Long locationId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user