fix(ui): 修复多个功能模块的验证和数据处理问题
- 在医生工作站退费功能中添加患者选择验证 - 统一药品管理中的仓库类型选择逻辑,移除重复代码 - 修复统计管理页面清空按钮的数据重置问题 - 修正西药管理页面处方打印按钮的功能绑定 - 完善库存报表查询的SQL过滤条件实现 - 更新多个控制器接口参数类型以支持业务流程 - 优化退费列表对话框的数据加载和错误处理
This commit is contained in:
@@ -108,9 +108,9 @@ public class ProductDetailAppServiceImpl extends ServiceImpl<InventoryItemMapper
|
||||
if (devCategoryCodes != null && !devCategoryCodes.isEmpty()) {
|
||||
queryWrapper.in(CommonConstants.FieldName.DevCategoryCode, devCategoryCodes);
|
||||
}
|
||||
// 库存是否为零
|
||||
// 库存是否为零 (zeroFlag: 1=库存为零, 0=库存大于零)
|
||||
if (zeroFlag != null) {
|
||||
if (Whether.YES.getValue().equals(zeroFlag)) {
|
||||
if (Integer.valueOf(1).equals(zeroFlag)) {
|
||||
queryWrapper.eq(CommonConstants.FieldName.Quantity, BigDecimal.ZERO);
|
||||
} else {
|
||||
queryWrapper.gt(CommonConstants.FieldName.Quantity, BigDecimal.ZERO);
|
||||
@@ -259,9 +259,9 @@ public class ProductDetailAppServiceImpl extends ServiceImpl<InventoryItemMapper
|
||||
if (devCategoryCodes != null && !devCategoryCodes.isEmpty()) {
|
||||
queryWrapper.in(CommonConstants.FieldName.DevCategoryCode, devCategoryCodes);
|
||||
}
|
||||
// 库存是否为零
|
||||
// 库存是否为零 (zeroFlag: 1=库存为零, 0=库存大于零)
|
||||
if (zeroFlag != null) {
|
||||
if (Whether.YES.getValue().equals(zeroFlag)) {
|
||||
if (Integer.valueOf(1).equals(zeroFlag)) {
|
||||
queryWrapper.eq(CommonConstants.FieldName.Quantity, BigDecimal.ZERO);
|
||||
} else {
|
||||
queryWrapper.gt(CommonConstants.FieldName.Quantity, BigDecimal.ZERO);
|
||||
@@ -507,9 +507,9 @@ public class ProductDetailAppServiceImpl extends ServiceImpl<InventoryItemMapper
|
||||
if (devCategoryCodes != null && !devCategoryCodes.isEmpty()) {
|
||||
queryWrapper.in(CommonConstants.FieldName.DevCategoryCode, devCategoryCodes);
|
||||
}
|
||||
// 库存是否为零
|
||||
// 库存是否为零 (zeroFlag: 1=库存为零, 0=库存大于零)
|
||||
if (zeroFlag != null) {
|
||||
if (Whether.YES.getValue().equals(zeroFlag)) {
|
||||
if (Integer.valueOf(1).equals(zeroFlag)) {
|
||||
queryWrapper.eq(CommonConstants.FieldName.Quantity, BigDecimal.ZERO);
|
||||
} else {
|
||||
queryWrapper.gt(CommonConstants.FieldName.Quantity, BigDecimal.ZERO);
|
||||
|
||||
@@ -213,10 +213,24 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
return R.fail("收费项的就诊类型未统一");
|
||||
}
|
||||
|
||||
// 获取所有的账户id
|
||||
List<Long> accountIdList = chargeItemList.stream().map(ChargeItem::getAccountId).collect(Collectors.toList());
|
||||
// 获取所有的账户id(过滤掉null值,防止groupingBy时空指针异常)
|
||||
List<Long> accountIdList = chargeItemList.stream()
|
||||
.map(ChargeItem::getAccountId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
// account去重
|
||||
List<Long> distinctAccountIdList = accountIdList.stream().distinct().collect(Collectors.toList());
|
||||
// 检查是否存在accountId为null的收费项
|
||||
long nullAccountIdCount = chargeItemList.stream()
|
||||
.map(ChargeItem::getAccountId)
|
||||
.filter(Objects::isNull)
|
||||
.count();
|
||||
if (nullAccountIdCount > 0) {
|
||||
throw new ServiceException("部分收费项缺少账户信息,请检查收费项数据");
|
||||
}
|
||||
if (distinctAccountIdList.isEmpty()) {
|
||||
throw new ServiceException("未找到有效的账户信息");
|
||||
}
|
||||
List<Account> accountList = iAccountService.list(new LambdaQueryWrapper<Account>()
|
||||
.in(Account::getId, distinctAccountIdList).eq(Account::getEncounterId, prePaymentDto.getEncounterId()));
|
||||
if (accountList.size() != distinctAccountIdList.size()) {
|
||||
@@ -503,9 +517,15 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
// }
|
||||
// }
|
||||
|
||||
// 收费详情按照收费批次进行分组
|
||||
// 收费详情按照收费批次进行分组(过滤掉payTransNo为null的记录)
|
||||
Map<String, List<PaymentRecDetail>> payTransNoMap
|
||||
= paymentRecDetails.stream().collect(Collectors.groupingBy(PaymentRecDetail::getPayTransNo));
|
||||
= paymentRecDetails.stream()
|
||||
.filter(detail -> detail.getPayTransNo() != null)
|
||||
.collect(Collectors.groupingBy(PaymentRecDetail::getPayTransNo));
|
||||
|
||||
if (payTransNoMap.isEmpty()) {
|
||||
throw new ServiceException("收费详情缺少批次号信息");
|
||||
}
|
||||
|
||||
com.openhis.financial.model.PaymentResult paymentResult;
|
||||
List<com.openhis.financial.model.PaymentResult> paymentResultList = new ArrayList<>();
|
||||
|
||||
@@ -48,10 +48,11 @@ public class PendingMedicationDetailsAppServiceImpl implements IPendingMedicatio
|
||||
QueryWrapper<PendingMedicationSearchParam> queryWrapper = HisQueryUtils.buildQueryWrapper(
|
||||
pendingMedicationSearchParam, searchKey, new HashSet<>(Arrays.asList("medicine_name", "medicine_no", "py_str")), request);
|
||||
|
||||
// 查询待发药明细列表
|
||||
// 查询待发药明细列表(包含待配药、待发药、已配药三种状态,与门诊发药界面一致)
|
||||
Page<PendingMedicationPageDto> pendingMedicationPage = pendingMedicationDetailsMapper
|
||||
.selectPendingMedicationDetailsPage(new Page<>(pageNo, pageSize), queryWrapper,
|
||||
DispenseStatus.IN_PROGRESS.getValue(), EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue());
|
||||
DispenseStatus.IN_PROGRESS.getValue(), DispenseStatus.PREPARATION.getValue(),
|
||||
DispenseStatus.PREPARED.getValue(), EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue());
|
||||
|
||||
pendingMedicationPage.getRecords().forEach(e -> {
|
||||
// 发药类型
|
||||
|
||||
@@ -20,11 +20,19 @@ public interface PendingMedicationDetailsMapper {
|
||||
* @param page 分页
|
||||
* @param queryWrapper 查询条件
|
||||
* @param inProgress 发药类型:待发药
|
||||
* @param preparation 发药类型:待配药
|
||||
* @param prepared 发药类型:已配药
|
||||
* @param amb 门诊类型
|
||||
* @param imp 住院类型
|
||||
* @return 待发药明细
|
||||
*/
|
||||
Page<PendingMedicationPageDto> selectPendingMedicationDetailsPage(
|
||||
@Param("page") Page<PendingMedicationPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<PendingMedicationSearchParam> queryWrapper,
|
||||
@Param("inProgress") Integer inProgress, @Param("amb") Integer amb, @Param("imp") Integer imp);
|
||||
@Param("inProgress") Integer inProgress,
|
||||
@Param("preparation") Integer preparation,
|
||||
@Param("prepared") Integer prepared,
|
||||
@Param("amb") Integer amb,
|
||||
@Param("imp") Integer imp);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user