2 Commits

Author SHA1 Message Date
a080b4294c ```
feat(invoice): 添加发票分页查询权限过滤功能

- 移除未使用的Supplier导入
- 新增selectInvoicePage方法支持用户角色权限过滤
- 非管理员用户只能查看自己创建的发票
- 优化发票新增逻辑,使用count查询替代list查询提升性能
- 添加事务注解确保数据一致性
- 异常处理改进,抛出ServiceException替代返回null
```
2025-12-27 22:53:39 +08:00
0827ce2908 ```
refactor(invoice): 移除发票服务中的权限过滤功能

移除发票服务接口中的分页查询权限过滤方法,简化发票新增逻辑,
移除异常抛出改为返回null,更新分页查询方法实现

- 移除 IInvoiceService 中的 selectInvoicePage 方法
- 移除 InvoiceServiceImpl 中的权限过滤逻辑
- 移除发票新增时的异常抛出,改为返回null
- 移除多余的import和注释
- 简化发票编码存在性检查逻辑

refactor(outpatient): 修复门诊记录服务中的方法注解

为门诊记录服务中的 getDoctorNames 方法添加 @Override 注解,
移除多余的空行

- 在 OutpatientRecordServiceImpl 中添加 @Override 注解
- 移除 PatientManageMapper 导入前的多余空行
```
2025-12-27 22:53:32 +08:00
3 changed files with 4 additions and 5 deletions

View File

@@ -21,7 +21,6 @@ import com.openhis.common.utils.HisQueryUtils;
import com.openhis.web.patientmanage.appservice.IOutpatientRecordService;
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
/**
@@ -74,6 +73,7 @@ public class OutpatientRecordServiceImpl implements IOutpatientRecordService {
*
* @return 医生名字列表
*/
@Override
public R<?> getDoctorNames() {
return R.ok(patientManageMapper.getDoctorNames());
}

View File

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier;
/**
* 发票管理Service接口

View File

@@ -39,7 +39,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
if (count > 0) {
throw new ServiceException("发票编码已存在: " + invoice.getBusNo());
}
// 新增发票
int insert = baseMapper.insert(invoice);
if (insert != 1) {
@@ -59,12 +59,12 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
public IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<Invoice> queryWrapper = new LambdaQueryWrapper<Invoice>()
.eq(Invoice::getDeleteFlag, DelFlag.NO.getCode());
// 非管理员用户只能查看自己创建的发票
if (!isAdmin) {
queryWrapper.eq(Invoice::getInvoicingStaffId, userId);
}
return baseMapper.selectPage(page, queryWrapper);
}
}