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;
|
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.AfterReturning;
|
||||||
import org.aspectj.lang.annotation.AfterThrowing;
|
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.stereotype.Component;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
import org.springframework.transaction.TransactionStatus;
|
import org.springframework.transaction.TransactionStatus;
|
||||||
@@ -17,7 +17,7 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
|
|||||||
public class TransactionAspect {
|
public class TransactionAspect {
|
||||||
|
|
||||||
private final PlatformTransactionManager transactionManager;
|
private final PlatformTransactionManager transactionManager;
|
||||||
private TransactionStatus transactionStatus;
|
private final ThreadLocal<TransactionStatus> transactionStatus = new ThreadLocal<>();
|
||||||
|
|
||||||
public TransactionAspect(PlatformTransactionManager transactionManager) {
|
public TransactionAspect(PlatformTransactionManager transactionManager) {
|
||||||
this.transactionManager = transactionManager;
|
this.transactionManager = transactionManager;
|
||||||
@@ -28,7 +28,8 @@ public class TransactionAspect {
|
|||||||
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
||||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
||||||
public void beginTransaction() {
|
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) || " +
|
@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.PutMapping) || " +
|
||||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
||||||
public void commitTransaction() {
|
public void commitTransaction() {
|
||||||
if (transactionStatus != null && !transactionStatus.isCompleted()) {
|
TransactionStatus status = transactionStatus.get();
|
||||||
transactionManager.commit(transactionStatus);
|
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)",
|
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)",
|
||||||
throwing = "ex")
|
throwing = "ex")
|
||||||
public void rollbackTransaction(Exception ex) {
|
public void rollbackTransaction(Exception ex) {
|
||||||
if (transactionStatus != null && !transactionStatus.isCompleted()) {
|
TransactionStatus status = transactionStatus.get();
|
||||||
transactionManager.rollback(transactionStatus);
|
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;
|
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.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者管理Service接口
|
* 患者管理Service接口
|
||||||
*
|
*
|
||||||
@@ -15,7 +16,7 @@ public interface IPatientService extends IService<Patient> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 从身份证号码中提取生日
|
* 从身份证号码中提取生日
|
||||||
*
|
*
|
||||||
* @param idCard 身份证号
|
* @param idCard 身份证号
|
||||||
* @return 出生日
|
* @return 出生日
|
||||||
*/
|
*/
|
||||||
@@ -27,5 +28,15 @@ public interface IPatientService extends IService<Patient> {
|
|||||||
* @param date 字符串日期
|
* @param date 字符串日期
|
||||||
* @return 是/否
|
* @return 是/否
|
||||||
*/
|
*/
|
||||||
boolean isFuture(String date);
|
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 performerId;
|
||||||
|
|
||||||
|
/** 核对人 */
|
||||||
|
private Long performerCheckId;
|
||||||
|
|
||||||
/** 执行位置 */
|
/** 执行位置 */
|
||||||
private Long locationId;
|
private Long locationId;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user