diff --git a/healthlink-his-server/core-admin/src/main/java/com/core/web/util/TenantOptionUtil.java b/healthlink-his-server/core-admin/src/main/java/com/core/web/util/TenantOptionUtil.java deleted file mode 100755 index 1957bc5bd..000000000 --- a/healthlink-his-server/core-admin/src/main/java/com/core/web/util/TenantOptionUtil.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.core.web.util; - -import com.core.common.core.domain.model.LoginUser; -import com.core.common.enums.TenantOptionDict; -import com.core.common.utils.SecurityUtils; -import com.core.common.utils.StringUtils; - -/** - * 租户配置工具类 - * - * @author system - */ -public class TenantOptionUtil { - - /** - * 获取租户配置项内容 - * - * @param optionDict 租户配置项字典 - * @return 租户配置项内容 - */ - public static String getOptionContent(TenantOptionDict optionDict) { - LoginUser loginUser; - try { - loginUser = SecurityUtils.getLoginUser(); - } catch (Exception e) { - return null; - } - if (loginUser == null) { - return null; - } - if (loginUser.getOptionMap() == null || loginUser.getOptionMap().isEmpty()) { - return null; - } - // return loginUser.getOptionMap().get(optionDict.getCode()); - - // TODO:2025/10/17 李永兴提出的sys_option切换TenantOption临时防止报错方案,最晚2025年11月底删除 - String newValue = loginUser.getOptionMap().get(optionDict.getCode()); - String oldValue = loginUser.getOptionJsonValue(optionDict.getCode()); - return StringUtils.isEmpty(newValue) ? oldValue : newValue; - } - -} diff --git a/healthlink-his-server/core-system/src/main/java/com/core/system/domain/SysExpression.java b/healthlink-his-server/core-system/src/main/java/com/core/system/domain/SysExpression.java index 2f9f9d6b3..1852f92db 100755 --- a/healthlink-his-server/core-system/src/main/java/com/core/system/domain/SysExpression.java +++ b/healthlink-his-server/core-system/src/main/java/com/core/system/domain/SysExpression.java @@ -1,3 +1,4 @@ + package com.core.system.domain; import com.core.common.annotation.Excel; diff --git a/healthlink-his-server/healthlink-his-application/pom.xml b/healthlink-his-server/healthlink-his-application/pom.xml index a4372dcea..a198d2242 100755 --- a/healthlink-his-server/healthlink-his-application/pom.xml +++ b/healthlink-his-server/healthlink-his-application/pom.xml @@ -1,4 +1,4 @@ - + @@ -76,6 +76,20 @@ 0.0.1-SNAPSHOT + + + com.core + core-quartz + + + com.core + core-flowable + + + com.core + core-generator + + com.yomahub diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/controller/ChangePriceController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/controller/ChangePriceController.java index 4d046a750..95aa42ae8 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/controller/ChangePriceController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/controller/ChangePriceController.java @@ -2,7 +2,7 @@ package com.healthlink.his.web.adjustprice.controller; import com.core.common.core.domain.R; import com.core.common.enums.TenantOptionDict; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.common.enums.OrderPricingSource; import com.healthlink.his.web.adjustprice.appservice.IAdjustPriceService; import com.healthlink.his.web.adjustprice.dto.AdjustPriceDataVo; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basicservice/controller/HealthcareServiceController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basicservice/controller/HealthcareServiceController.java index 21b52995b..1677a0b54 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basicservice/controller/HealthcareServiceController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basicservice/controller/HealthcareServiceController.java @@ -26,7 +26,7 @@ import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.web.basicservice.dto.*; import com.healthlink.his.web.basicservice.mapper.HealthcareServiceBizMapper; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; @@ -54,7 +54,7 @@ public class HealthcareServiceController { private final HealthcareServiceBizMapper healthcareServiceBizMapper; - private final YbManager ybService; + private final IYbManager ybService; private final AssignSeqUtil assignSeqUtil; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java index fb4d2a38c..d20bd6e21 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java @@ -16,7 +16,7 @@ import com.healthlink.his.common.enums.AdministrativeGender; import com.healthlink.his.common.enums.ChargeItemContext; import com.healthlink.his.common.enums.ChargeItemStatus; import com.healthlink.his.common.enums.EncounterClass; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.web.chargemanage.appservice.IOutpatientChargeAppService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java index a5b05ae76..883eb67a3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java @@ -20,7 +20,7 @@ import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.SlotStatus; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisPageUtils; import com.healthlink.his.common.utils.HisQueryUtils; @@ -50,7 +50,7 @@ import com.healthlink.his.web.paymentmanage.appservice.IPaymentRecService; import com.healthlink.his.web.paymentmanage.dto.CancelPaymentDto; import com.healthlink.his.web.paymentmanage.dto.CancelRegPaymentDto; import com.healthlink.his.yb.model.CancelRegPaymentModel; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.stereotype.Service; import jakarta.annotation.Resource; @@ -95,7 +95,7 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra IOrganizationService iOrganizationService; @Resource - YbManager ybManager; + IYbManager ybManager; @Resource IPaymentRecService iPaymentRecService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java index 779316785..366aaa922 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java @@ -10,7 +10,7 @@ import com.healthlink.his.administration.domain.Patient; import com.healthlink.his.administration.service.IPatientService; import com.healthlink.his.clinical.domain.Surgery; import com.healthlink.his.clinical.service.ISurgeryService; -import com.healthlink.his.common.enums.SurgeryAppStatusEnum; +import com.healthlink.his.surgicalschedule.enums.SurgeryAppStatusEnum; import com.healthlink.his.surgicalschedule.domain.OpSchedule; import com.healthlink.his.surgicalschedule.service.IOpScheduleService; import com.healthlink.his.workflow.domain.ServiceRequest; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java index c0e7adacc..092510ade 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java @@ -37,7 +37,7 @@ import com.healthlink.his.web.chargemanage.dto.ContractMetadata; import com.healthlink.his.web.common.appservice.ICommonService; import com.healthlink.his.web.common.dto.*; import com.healthlink.his.web.common.mapper.CommonAppMapper; -import com.healthlink.his.web.pharmacymanage.dto.InventoryDetailDto; +import com.healthlink.his.web.pharmacy.dispense.dto.InventoryDetailDto; import com.healthlink.his.workflow.domain.DeviceDispense; import com.healthlink.his.workflow.domain.InventoryItem; import com.healthlink.his.workflow.service.IDeviceDispenseService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/mapper/CommonAppMapper.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/mapper/CommonAppMapper.java index 99a31d717..61397efe0 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/mapper/CommonAppMapper.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/mapper/CommonAppMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.healthlink.his.administration.domain.TraceNoManage; import com.healthlink.his.web.common.dto.*; -import com.healthlink.his.web.pharmacymanage.dto.InventoryDetailDto; +import com.healthlink.his.web.pharmacy.dispense.dto.InventoryDetailDto; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java index 3b7ba339b..f8bd25d6c 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java @@ -36,7 +36,7 @@ import com.healthlink.his.web.datadictionary.mapper.DeviceManageMapper; import com.healthlink.his.workflow.domain.DeviceRequest; import com.healthlink.his.workflow.service.IDeviceRequestService; import com.healthlink.his.workflow.service.ISupplyRequestService; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; @@ -89,7 +89,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService { private AssignSeqUtil assignSeqUtil; @Resource - private YbManager ybService; + private IYbManager ybService; @Resource private IOperationRecordService operationRecordService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DiagTreatMAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DiagTreatMAppServiceImpl.java index 08b63c525..429904044 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DiagTreatMAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/DiagTreatMAppServiceImpl.java @@ -31,7 +31,7 @@ import com.healthlink.his.workflow.domain.ServiceRequest; import com.healthlink.his.workflow.mapper.ActivityDefinitionMapper; import com.healthlink.his.workflow.service.IActivityDefinitionService; import com.healthlink.his.workflow.service.IServiceRequestService; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; @@ -73,7 +73,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService { @Resource private AssignSeqUtil assignSeqUtil; @Resource - private YbManager ybService; + private IYbManager ybService; @Resource private IOperationRecordService operationRecordService; @Resource diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/MedicationManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/MedicationManageAppServiceImpl.java index 34b44d26e..595bb6b22 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/MedicationManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datadictionary/appservice/impl/MedicationManageAppServiceImpl.java @@ -39,7 +39,7 @@ import com.healthlink.his.web.datadictionary.appservice.IMedicationManageAppServ import com.healthlink.his.web.datadictionary.dto.*; import com.healthlink.his.web.datadictionary.mapper.MedicationManageSearchMapper; import com.healthlink.his.workflow.service.ISupplyRequestService; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; @@ -91,7 +91,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi private AssignSeqUtil assignSeqUtil; @Resource - private YbManager ybService; + private IYbManager ybService; @Resource private IOperationRecordService operationRecordService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/departmentmanage/appservice/impl/DepartmentReceiptApprovalServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/departmentmanage/appservice/impl/DepartmentReceiptApprovalServiceImpl.java index 6490899d8..4c7d6d940 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/departmentmanage/appservice/impl/DepartmentReceiptApprovalServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/departmentmanage/appservice/impl/DepartmentReceiptApprovalServiceImpl.java @@ -12,8 +12,8 @@ import com.healthlink.his.common.enums.DispenseStatus; import com.healthlink.his.common.enums.SupplyType; import com.healthlink.his.common.enums.TraceNoStatus; import com.healthlink.his.common.enums.Whether; -import com.healthlink.his.common.enums.ybenums.YbInvChgType; -import com.healthlink.his.common.enums.ybenums.YbRxFlag; +import com.healthlink.his.yb.enums.YbInvChgType; +import com.healthlink.his.yb.enums.YbRxFlag; import com.healthlink.his.medication.domain.MedicationDispense; import com.healthlink.his.medication.service.IMedicationDispenseService; import com.healthlink.his.web.departmentmanage.appservice.IDepartmentReceiptApprovalService; @@ -35,7 +35,7 @@ import com.healthlink.his.yb.dto.Medical3503Param; import com.healthlink.his.yb.dto.MedicalInventory3501Param; import com.healthlink.his.yb.dto.MedicalInventory3502Param; import com.healthlink.his.yb.dto.MedicalPurchase3504Param; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -65,7 +65,7 @@ public class DepartmentReceiptApprovalServiceImpl implements IDepartmentReceiptA @Autowired private ReceiptApprovalMapper receiptApprovalMapper; @Autowired - private YbManager ybService; + private IYbManager ybService; @Autowired private IMedicationDispenseService medicationDispenseService; @Autowired diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 26e47d0d8..f147690e1 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -16,7 +16,7 @@ import com.core.common.utils.MessageUtils; import com.core.common.utils.SecurityUtils; import com.core.common.utils.DictUtils; import com.core.common.utils.StringUtils; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.Account; import com.healthlink.his.administration.domain.ChargeItem; import com.healthlink.his.administration.domain.Encounter; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationElepPrescriptionServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationElepPrescriptionServiceImpl.java index 97f2c00da..ef4e00029 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationElepPrescriptionServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationElepPrescriptionServiceImpl.java @@ -17,7 +17,7 @@ import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.AssignSeqEnum; import com.healthlink.his.common.enums.PrescriptionType; import com.healthlink.his.common.enums.RequestStatus; -import com.healthlink.his.common.enums.ybenums.YbRxItemTypeCode; +import com.healthlink.his.yb.enums.YbRxItemTypeCode; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.web.doctorstation.appservice.IDoctorStationElepPrescriptionService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java index 1594616d6..6f6eb9af3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java @@ -4,7 +4,7 @@ import com.core.common.enums.TenantOptionDict; import com.core.common.utils.AssignSeqUtil; import com.core.common.utils.SecurityUtils; import com.core.common.utils.StringUtils; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import tools.jackson.core.JacksonException; import tools.jackson.core.type.TypeReference; import tools.jackson.databind.ObjectMapper; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocDefinitionAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocDefinitionAppServiceImpl.java index 197384cd8..acba51f67 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocDefinitionAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocDefinitionAppServiceImpl.java @@ -6,7 +6,7 @@ import com.core.common.utils.AssignSeqUtil; import com.core.common.utils.SecurityUtils; import com.core.common.utils.bean.BeanUtils; import com.healthlink.his.common.enums.AssignSeqEnum; -import com.healthlink.his.common.enums.DocUseRangeEnum; +import com.healthlink.his.document.enums.DocUseRangeEnum; import com.healthlink.his.document.domain.DocDefinition; import com.healthlink.his.document.domain.DocDefinitionOrganization; import com.healthlink.his.document.service.IDocDefinitionOrganizationService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocRecordAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocRecordAppServiceImpl.java index ade20d735..f51b45fdf 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocRecordAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocRecordAppServiceImpl.java @@ -13,6 +13,7 @@ import com.core.common.utils.SecurityUtils; import com.core.common.utils.StringUtils; import com.core.common.utils.bean.BeanUtils; import com.healthlink.his.common.enums.*; +import com.healthlink.his.document.enums.*; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.document.domain.DocRecord; import com.healthlink.his.document.domain.DocStatistics; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocStatisticsAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocStatisticsAppServiceImpl.java index 2ccb527e4..aeb333e00 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocStatisticsAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocStatisticsAppServiceImpl.java @@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; import com.core.common.utils.SecurityUtils; import com.core.common.utils.bean.BeanUtils; -import com.healthlink.his.common.enums.DocDefinitionEnum; +import com.healthlink.his.document.enums.DocDefinitionEnum; import com.healthlink.his.common.utils.HisPageUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.document.domain.DocStatistics; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocTemplateAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocTemplateAppServiceImpl.java index 4c101dbb1..58d1d41d1 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocTemplateAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/appservice/impl/DocTemplateAppServiceImpl.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; import com.core.common.utils.SecurityUtils; -import com.healthlink.his.common.enums.DocUseRangeEnum; +import com.healthlink.his.document.enums.DocUseRangeEnum; import com.healthlink.his.common.utils.HisPageUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.document.domain.DocTemplate; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocDefinitionController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocDefinitionController.java index cbeababa2..120c2c471 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocDefinitionController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocDefinitionController.java @@ -1,9 +1,9 @@ package com.healthlink.his.web.document.controller; import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.DocPermissionEnum; -import com.healthlink.his.common.enums.DocTypeEnum; -import com.healthlink.his.common.enums.DocUseRangeEnum; +import com.healthlink.his.document.enums.DocPermissionEnum; +import com.healthlink.his.document.enums.DocTypeEnum; +import com.healthlink.his.document.enums.DocUseRangeEnum; import com.healthlink.his.web.document.appservice.IDocDefinitionAppService; import com.healthlink.his.web.document.dto.DocDefinitionDto; import com.healthlink.his.web.document.dto.DocDefinitonParam; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocRecordController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocRecordController.java index e0cac5b96..71aee1fb8 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocRecordController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocRecordController.java @@ -1,8 +1,8 @@ package com.healthlink.his.web.document.controller; import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.DocStatusEnum; -import com.healthlink.his.common.enums.DocTypeEnum; +import com.healthlink.his.document.enums.DocStatusEnum; +import com.healthlink.his.document.enums.DocTypeEnum; import com.healthlink.his.web.document.appservice.IDocRecordAppService; import com.healthlink.his.web.document.dto.DocRecordDto; import com.healthlink.his.web.document.dto.DocRecordPatientQueryParam; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocStatisticsDefinitionController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocStatisticsDefinitionController.java index fe414a6b3..4bac59c18 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocStatisticsDefinitionController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocStatisticsDefinitionController.java @@ -1,7 +1,7 @@ package com.healthlink.his.web.document.controller; import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.DocStatisticsDefinitionTypeEnum; +import com.healthlink.his.document.enums.DocStatisticsDefinitionTypeEnum; import com.healthlink.his.web.document.appservice.IDocStatisticsDefinitionAppService; import com.healthlink.his.web.document.dto.DocStatisticsDefinitionDto; import com.healthlink.his.web.document.util.EnumUtil; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocTemplateController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocTemplateController.java index c2113e8c8..5135db050 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocTemplateController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/DocTemplateController.java @@ -1,8 +1,8 @@ package com.healthlink.his.web.document.controller; import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.DocTypeEnum; -import com.healthlink.his.common.enums.DocUseRangeEnum; +import com.healthlink.his.document.enums.DocTypeEnum; +import com.healthlink.his.document.enums.DocUseRangeEnum; import com.healthlink.his.web.document.appservice.IDocTemplateAppService; import com.healthlink.his.web.document.dto.DocTemplateDto; import com.healthlink.his.web.document.util.EnumUtil; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/DocumentDirectoryProcessor.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/DocumentDirectoryProcessor.java index 96471a54d..2c1278fe6 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/DocumentDirectoryProcessor.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/DocumentDirectoryProcessor.java @@ -3,7 +3,7 @@ package com.healthlink.his.web.document.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.healthlink.his.common.enums.DocTypeEnum; +import com.healthlink.his.document.enums.DocTypeEnum; import com.healthlink.his.web.document.dto.DirectoryNode; import com.healthlink.his.web.document.dto.DocDefinitionDto; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/PermissionProcessor.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/PermissionProcessor.java index bb3887f54..09a1fdae5 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/PermissionProcessor.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/util/PermissionProcessor.java @@ -2,7 +2,7 @@ package com.healthlink.his.web.document.util; import com.core.common.core.domain.entity.SysRole; import com.core.common.utils.SecurityUtils; -import com.healthlink.his.common.enums.DocPermissionEnum; +import com.healthlink.his.document.enums.DocPermissionEnum; import com.healthlink.his.web.document.dto.DocDefinitionDto; import java.util.List; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/BankPosCloudAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/BankPosCloudAppServiceImpl.java index 624872b8c..6ecd4529a 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/BankPosCloudAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/BankPosCloudAppServiceImpl.java @@ -4,7 +4,7 @@ import tools.jackson.databind.ObjectMapper; import com.core.common.utils.JsonUtils; import com.core.common.core.domain.R; import com.core.common.enums.TenantOptionDict; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.web.externalintegration.appservice.IBankPosCloudAppService; import com.healthlink.his.web.externalintegration.dto.BpcTransactionRequestDto; import com.healthlink.his.web.externalintegration.dto.BpcTransactionResponseDto; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/FoodborneAcquisitionAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/FoodborneAcquisitionAppServiceImpl.java index aec7b9acf..4ebd98c79 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/FoodborneAcquisitionAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/externalintegration/appservice/impl/FoodborneAcquisitionAppServiceImpl.java @@ -6,7 +6,7 @@ import tools.jackson.databind.JsonNode; import com.core.common.core.domain.R; import com.core.common.enums.TenantOptionDict; import com.core.common.utils.StringUtils; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.common.enums.*; import com.healthlink.his.common.utils.CommonUtil; import com.healthlink.his.web.externalintegration.appservice.IFoodborneAcquisitionAppService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java index f35bb141d..669d25fd0 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java @@ -13,7 +13,7 @@ import com.healthlink.his.administration.service.IAccountService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.financial.domain.PaymentRecDetail; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java index dcdbb99f0..a2aadc4a8 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java @@ -15,8 +15,8 @@ import com.healthlink.his.clinical.service.IConditionService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbIptDiseTypeCode; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbIptDiseTypeCode; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.financial.domain.PaymentRecDetail; @@ -29,7 +29,7 @@ import com.healthlink.his.web.inhospitalcharge.dto.*; import com.healthlink.his.web.inhospitalcharge.mapper.InHospitalRegisterAppMapper; import com.healthlink.his.web.patientmanage.appservice.IPatientInformationService; import com.healthlink.his.web.patientmanage.dto.PatientBaseInfoDto; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -82,7 +82,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS IPatientService iPatientService; @Resource - private YbManager ybManager; + private IYbManager ybManager; @Resource private IChargeItemService iChargeItemService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/ATDManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/ATDManageAppServiceImpl.java index dbcc2fd68..e9dcc595e 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/ATDManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/ATDManageAppServiceImpl.java @@ -23,6 +23,8 @@ import com.healthlink.his.administration.service.ILocationService; import com.healthlink.his.administration.service.IPractitionerService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.enums.*; +import com.healthlink.his.document.enums.*; +import com.healthlink.his.surgicalschedule.enums.*; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.document.domain.DocStatistics; @@ -44,8 +46,12 @@ import com.healthlink.his.workflow.domain.DeviceRequest; import com.healthlink.his.workflow.domain.ServiceRequest; import com.healthlink.his.workflow.service.IDeviceRequestService; import com.healthlink.his.workflow.service.IServiceRequestService; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import com.healthlink.his.web.dataflow.event.AdmissionSavedEvent; +import com.healthlink.his.web.dataflow.event.DischargeEvent; +import com.healthlink.his.web.dataflow.event.StatisticsPushEvent; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; @@ -106,6 +112,9 @@ public class ATDManageAppServiceImpl implements IATDManageAppService { @Resource private IPractitionerService practitionerService; + @Resource + private ApplicationEventPublisher eventPublisher; + /** * 入出转管理页面初始化 * @@ -613,6 +622,16 @@ public class ATDManageAppServiceImpl implements IATDManageAppService { } catch (Exception e) { log.error("保存入院体征失败,但不影响参与者数据", e); } + // Chain1: 发布入院保存事件 → 门诊诊断同步 + Encounter encounter = encounterService.getById(encounterId); + if (encounter != null) { + eventPublisher.publishEvent(new AdmissionSavedEvent(this, encounterId, encounter.getPatientId())); + } + // Chain7: 统计实时推送 + java.util.Map stats = new java.util.HashMap<>(); + stats.put("action", "admission"); + stats.put("encounterId", encounterId); + eventPublisher.publishEvent(new StatisticsPushEvent(this, "ADMISSION", stats)); return R.ok("床位分配成功"); } @@ -704,6 +723,16 @@ public class ATDManageAppServiceImpl implements IATDManageAppService { int affectedRows = encounterService.updateEncounterStatus(encounterId, EncounterZyStatus.DISCHARGED_FROM_HOSPITAL.getValue()); if (affectedRows > 0) { + // Chain5: 发布出院事件 → DRG自动入组 + Encounter encounter = encounterService.getById(encounterId); + if (encounter != null) { + eventPublisher.publishEvent(new DischargeEvent(this, encounterId, encounter.getPatientId())); + } + // Chain7: 统计实时推送 + java.util.Map stats = new java.util.HashMap<>(); + stats.put("action", "discharge"); + stats.put("encounterId", encounterId); + eventPublisher.publishEvent(new StatisticsPushEvent(this, "DISCHARGE", stats)); return R.ok("出院成功"); } return R.fail("出院失败"); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java index 73385adce..1186f23b5 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java @@ -13,7 +13,7 @@ import com.core.common.enums.TenantOptionDict; import com.core.common.exception.ServiceException; import com.core.common.utils.*; import com.core.common.utils.bean.BeanUtils; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.ChargeItem; import com.healthlink.his.administration.service.IChargeItemService; import com.healthlink.his.administration.service.IEncounterService; @@ -22,6 +22,7 @@ import com.healthlink.his.clinical.service.IProcedureService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; +import com.healthlink.his.surgicalschedule.enums.*; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.medication.domain.MedicationDefinition; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java index c08c97e66..ee41695af 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java @@ -20,9 +20,9 @@ import com.healthlink.his.web.inhospitalnursestation.dto.MedicineDispenseFormDto import com.healthlink.his.web.inhospitalnursestation.dto.MedicineSummaryFormDto; import com.healthlink.his.web.inhospitalnursestation.dto.MedicineSummaryParam; import com.healthlink.his.web.inhospitalnursestation.mapper.MedicineSummaryAppMapper; -import com.healthlink.his.web.pharmacymanage.dto.DispenseInitDto; -import com.healthlink.his.web.pharmacymanage.dto.DispenseStatusOption; -import com.healthlink.his.web.pharmacymanage.mapper.ReturnMedicineMapper; +import com.healthlink.his.web.pharmacy.dispense.dto.DispenseInitDto; +import com.healthlink.his.web.pharmacy.dispense.dto.DispenseStatusOption; +import com.healthlink.his.web.pharmacy.dispense.mapper.ReturnMedicineMapper; import com.healthlink.his.workflow.service.ISupplyDeliveryService; import com.healthlink.his.workflow.service.ISupplyRequestService; import org.springframework.stereotype.Service; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java index 8b6718aa3..e5bdaa1ff 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java @@ -20,7 +20,7 @@ import com.healthlink.his.administration.service.IInvoiceService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.financial.domain.PaymentRecDetail; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java index 13c4aea84..da59496bd 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java @@ -30,6 +30,8 @@ import com.healthlink.his.document.service.IVitalSignsService; import com.healthlink.his.web.inpatientmanage.appservice.INursingRecordAppService; import com.healthlink.his.web.inpatientmanage.dto.*; import com.healthlink.his.web.inpatientmanage.mapper.NursingRecordAppMapper; +import com.healthlink.his.web.dataflow.event.NursingRecordSavedEvent; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -64,6 +66,9 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService { @Resource private IEmrTemplateService emrTemplateService; + @Resource + private ApplicationEventPublisher eventPublisher; + /** * 获取住院患者信息 分页显示 * @@ -165,6 +170,11 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService { } if (saveSuccess) { + // Chain6: 发布护理记录保存事件 → 质控自动触发 + eventPublisher.publishEvent(new NursingRecordSavedEvent(this, + nursingRecordDto.getEncounterId(), + nursingRecordDto.getPatientId(), + emr.getId())); return R.ok(nursingRecordDto, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"护理记录单"})); } else { diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java index d4662e183..40d6827ba 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java @@ -15,7 +15,7 @@ import com.healthlink.his.administration.service.IEncounterService; import com.healthlink.his.administration.service.ILocationService; import com.healthlink.his.administration.service.IOrganizationService; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.PriorityType; +import com.healthlink.his.yb.enums.PriorityType; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.web.chargemanage.dto.OrgMetadata; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductDetailAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductDetailAppServiceImpl.java index f3d0c2d91..e8d214e2a 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductDetailAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductDetailAppServiceImpl.java @@ -10,13 +10,13 @@ import com.core.common.enums.TenantOptionDict; import com.core.common.exception.NonCaptureException; import com.core.common.utils.*; import com.core.common.utils.poi.ExcelUtil; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.ChargeItemDefDetail; import com.healthlink.his.administration.service.IChargeItemDefDetailService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbChrgitmLv; +import com.healthlink.his.yb.enums.YbChrgitmLv; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.web.inventorymanage.appservice.IProductDetailAppService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReceiptApprovalAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReceiptApprovalAppServiceImpl.java index 150af27bc..64022e01d 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReceiptApprovalAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReceiptApprovalAppServiceImpl.java @@ -23,8 +23,8 @@ import com.healthlink.his.administration.service.*; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbInvChgType; -import com.healthlink.his.common.enums.ybenums.YbRxFlag; +import com.healthlink.his.yb.enums.YbInvChgType; +import com.healthlink.his.yb.enums.YbRxFlag; import com.healthlink.his.common.utils.EnumUtils; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.medication.service.IMedicationDispenseService; @@ -44,7 +44,7 @@ import com.healthlink.his.yb.dto.Medical3503Param; import com.healthlink.his.yb.dto.MedicalInventory3501Param; import com.healthlink.his.yb.dto.MedicalInventory3502Param; import com.healthlink.his.yb.dto.MedicalPurchase3504Param; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -78,7 +78,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService @Autowired private ReceiptApprovalMapper receiptApprovalMapper; @Autowired - private YbManager ybManager; + private IYbManager ybManager; @Autowired private IMedicationDispenseService medicationDispenseService; @Autowired diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/lab/controller/LabHistoryController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/lab/controller/LabHistoryController.java index d5ab78b48..741168b93 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/lab/controller/LabHistoryController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/lab/controller/LabHistoryController.java @@ -7,10 +7,12 @@ import com.healthlink.his.lab.domain.LabResultComparison; import com.healthlink.his.lab.service.ILabResultComparisonService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; +import com.healthlink.his.web.dataflow.event.LabReportPublishedEvent; @RestController @RequestMapping("/lab-history") @@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.*; public class LabHistoryController { private final ILabResultComparisonService comparisonService; + private final ApplicationEventPublisher eventPublisher; @GetMapping("/compare") @PreAuthorize("@ss.hasPermi('infection:lab:list')") @@ -38,6 +41,14 @@ public class LabHistoryController { public R addResult(@RequestBody LabResultComparison result) { result.setCreateTime(new java.util.Date()); comparisonService.save(result); + // Chain4: 发布检验报告事件 → 危急值推送 + boolean isCritical = result.getAbnormalFlag() != null && result.getAbnormalFlag().contains("危急"); + eventPublisher.publishEvent(new LabReportPublishedEvent(this, + result.getPatientId(), + result.getEncounterId() != null ? result.getEncounterId() : 0L, + result.getTestItem(), + result.getTestValue(), + isCritical)); return R.ok(result); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/materialmanage/appservice/impl/MaterialReceiptApprovalServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/materialmanage/appservice/impl/MaterialReceiptApprovalServiceImpl.java index 9ea96aa1d..bd65631c9 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/materialmanage/appservice/impl/MaterialReceiptApprovalServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/materialmanage/appservice/impl/MaterialReceiptApprovalServiceImpl.java @@ -14,8 +14,8 @@ import com.healthlink.his.administration.service.IChargeItemDefDetailService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbInvChgType; -import com.healthlink.his.common.enums.ybenums.YbRxFlag; +import com.healthlink.his.yb.enums.YbInvChgType; +import com.healthlink.his.yb.enums.YbRxFlag; import com.healthlink.his.medication.domain.MedicationDispense; import com.healthlink.his.medication.service.IMedicationDispenseService; import com.healthlink.his.web.inventorymanage.appservice.IReceiptApprovalAppService; @@ -37,7 +37,7 @@ import com.healthlink.his.yb.dto.Medical3503Param; import com.healthlink.his.yb.dto.MedicalInventory3501Param; import com.healthlink.his.yb.dto.MedicalInventory3502Param; import com.healthlink.his.yb.dto.MedicalPurchase3504Param; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -70,7 +70,7 @@ public class MaterialReceiptApprovalServiceImpl implements IMaterialReceiptAppro @Autowired private ReceiptApprovalMapper receiptApprovalMapper; @Autowired - private YbManager ybService; + private IYbManager ybService; @Autowired private IMedicationDispenseService medicationDispenseService; @Autowired diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/medicationmanagement/controller/DayEndSettlementController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/medicationmanagement/controller/DayEndSettlementController.java deleted file mode 100755 index 745a45e53..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/medicationmanagement/controller/DayEndSettlementController.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.healthlink.his.web.medicationmanagement.controller; - -import java.util.List; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.core.common.annotation.Log; -import com.core.common.core.controller.BaseController; -import com.core.common.core.domain.AjaxResult; -import com.core.common.core.page.TableDataInfo; -import com.core.common.enums.BusinessType; -import com.core.common.utils.poi.ExcelUtil; -import com.healthlink.his.medicationmanagement.domain.DayEndSettlement; -import com.healthlink.his.medicationmanagement.service.IDayEndSettlementService; -import com.core.common.core.page.PageDomain; -import com.core.common.utils.StringUtils; -import com.github.pagehelper.PageHelper; - -/** - * 日结结算单Controller - * - * @author healthlink-his - * @date 2025-02-01 - */ -@RestController -@RequestMapping("/medication/dayEndSettlement") -public class DayEndSettlementController extends BaseController { - @Autowired - private IDayEndSettlementService dayEndSettlementService; - - /** - * 查询日结结算单列表 - */ - @GetMapping("/list") - public TableDataInfo list(DayEndSettlement dayEndSettlement, PageDomain pageDomain) { - // 使用PageHelper进行分页 - PageHelper.startPage(pageDomain.getPageNum(), pageDomain.getPageSize()); - List list = dayEndSettlementService.lambdaQuery() - .like(StringUtils.isNotBlank(dayEndSettlement.getSettlementNo()), DayEndSettlement::getSettlementNo, dayEndSettlement.getSettlementNo()) - .eq(StringUtils.isNotBlank(dayEndSettlement.getSettlementType()), DayEndSettlement::getSettlementType, dayEndSettlement.getSettlementType()) - .eq(dayEndSettlement.getSettlementDate() != null, DayEndSettlement::getSettlementDate, dayEndSettlement.getSettlementDate()) - .orderByDesc(DayEndSettlement::getId) - .list(); - return getDataTable(list); - } - - /** - * 获取日结结算单详细信息 - */ - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(dayEndSettlementService.getById(id)); - } - - /** - * 新增日结结算单 - */ - @Log(title = "日结结算单", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody DayEndSettlement dayEndSettlement) { - return toAjax(dayEndSettlementService.save(dayEndSettlement)); - } - - /** - * 修改日结结算单 - */ - @Log(title = "日结结算单", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody DayEndSettlement dayEndSettlement) { - return toAjax(dayEndSettlementService.updateById(dayEndSettlement)); - } - - /** - * 删除日结结算单 - */ - @Log(title = "日结结算单", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(dayEndSettlementService.removeByIds(List.of(ids))); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioApplicationRecordAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioApplicationRecordAppServiceImpl.java index 38c18bf46..1f02017c1 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioApplicationRecordAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioApplicationRecordAppServiceImpl.java @@ -14,7 +14,7 @@ import com.healthlink.his.administration.domain.ChargeItemDefinition; import com.healthlink.his.administration.service.IChargeItemDefinitionService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbChrgitmLv; +import com.healthlink.his.yb.enums.YbChrgitmLv; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.medication.domain.MedicationDefinition; import com.healthlink.his.medication.service.IMedicationDefinitionService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioManageAppServiceImpl.java index 0e2c67025..32846d466 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfRatioManageAppServiceImpl.java @@ -8,7 +8,7 @@ import com.core.common.core.domain.R; import com.core.common.enums.DelFlag; import com.healthlink.his.common.enums.GfItemType; import com.healthlink.his.common.enums.GfRatioType; -import com.healthlink.his.common.enums.ybenums.YbChrgitmLv; +import com.healthlink.his.yb.enums.YbChrgitmLv; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.nenu.domain.GfRatio; import com.healthlink.his.nenu.dto.GfTypeRatioDto; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfStudentListAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfStudentListAppServiceImpl.java index 4a034e40b..da5e17e93 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfStudentListAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nenu/appservice/impl/GfStudentListAppServiceImpl.java @@ -16,7 +16,7 @@ import com.core.common.enums.TenantOptionDict; import com.core.common.exception.ServiceException; import com.core.common.utils.*; import com.core.common.utils.poi.ExcelUtil; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.Patient; import com.healthlink.his.administration.domain.PatientStudent; import com.healthlink.his.administration.service.IPatientService; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingExecutionController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingExecutionController.java index 88b1b4a4c..8860841f2 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingExecutionController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingExecutionController.java @@ -7,10 +7,12 @@ import com.healthlink.his.nursing.domain.*; import com.healthlink.his.nursing.service.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; +import com.healthlink.his.web.dataflow.event.OrderExecutedEvent; import java.util.*; @@ -23,6 +25,7 @@ public class NursingExecutionController { private final INursingExecutionScanService scanService; private final INursingHandoffRecordService handoffService; private final INursingInfusionPatrolService patrolService; + private final ApplicationEventPublisher eventPublisher; // ==================== 执行扫码 ==================== @GetMapping("/scan/page") @@ -46,6 +49,12 @@ public class NursingExecutionController { scan.setScanTime(new Date()); scan.setCreateTime(new Date()); scanService.save(scan); + // Chain2: 发布医嘱执行事件 → 护理执行反馈 + eventPublisher.publishEvent(new OrderExecutedEvent(this, + scan.getEncounterId() != null ? scan.getEncounterId() : 0L, + scan.getNurseUserId() != null ? scan.getNurseUserId() : 0L, + scan.getScanType() != null ? scan.getScanType() : "SCAN", + scan.getOrderId() != null ? scan.getOrderId() : scan.getId())); return R.ok(scan); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java index 20ed95f51..147b420f7 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java @@ -29,10 +29,10 @@ import com.healthlink.his.web.outpatientmanage.dto.OutpatientStationInitDto; import com.healthlink.his.web.outpatientmanage.dto.OutpatientTreatmentEncounterDto; import com.healthlink.his.web.outpatientmanage.dto.OutpatientTreatmentInfoDto; import com.healthlink.his.web.outpatientmanage.mapper.OutpatientTreatmentAppMapper; -import com.healthlink.his.web.pharmacymanage.appservice.impl.ReturnMedicineAppServiceImpl; -import com.healthlink.his.web.pharmacymanage.appservice.impl.WesternMedicineDispenseAppServiceImpl; -import com.healthlink.his.web.pharmacymanage.dto.UnDispenseInventoryDto; -import com.healthlink.his.web.pharmacymanage.mapper.ReturnMedicineMapper; +import com.healthlink.his.web.pharmacy.dispense.appservice.impl.ReturnMedicineAppServiceImpl; +import com.healthlink.his.web.pharmacy.dispense.appservice.impl.WesternMedicineDispenseAppServiceImpl; +import com.healthlink.his.web.pharmacy.dispense.dto.UnDispenseInventoryDto; +import com.healthlink.his.web.pharmacy.dispense.mapper.ReturnMedicineMapper; import com.healthlink.his.workflow.domain.DeviceDispense; import com.healthlink.his.workflow.domain.DeviceRequest; import com.healthlink.his.workflow.domain.InventoryItem; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/EleInvoiceServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/EleInvoiceServiceImpl.java index 2e6ae14e4..6ecc698b0 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/EleInvoiceServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/EleInvoiceServiceImpl.java @@ -24,8 +24,8 @@ import com.healthlink.his.administration.service.IPractitionerService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbEncounterClass; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbEncounterClass; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.config.HttpConfig; import com.healthlink.his.financial.domain.PaymentRecDetail; import com.healthlink.his.financial.domain.PaymentReconciliation; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java index bd2b7ac6e..6f37f9c27 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java @@ -21,9 +21,9 @@ import com.healthlink.his.clinical.service.IProcedureService; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.YbCommonConstants; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbMdcsType; -import com.healthlink.his.common.enums.ybenums.YbMedChrgItmType; -import com.healthlink.his.common.enums.ybenums.YbPayment; +import com.healthlink.his.yb.enums.YbMdcsType; +import com.healthlink.his.yb.enums.YbMedChrgItmType; +import com.healthlink.his.yb.enums.YbPayment; import com.healthlink.his.financial.domain.Contract; import com.healthlink.his.financial.domain.PaymentRecDetail; import com.healthlink.his.financial.domain.PaymentReconciliation; @@ -2699,7 +2699,7 @@ public class IChargeBillServiceImpl implements IChargeBillService { } @Autowired - private YbHttpUtils ybHttpUtils; + private IYbHttpUtils ybHttpUtils; @Override public R checkYbNo() { diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java index 45f012348..bec7ed2bb 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java @@ -24,9 +24,9 @@ import com.healthlink.his.administration.service.impl.PatientStudentServiceImpl; import com.healthlink.his.common.constant.CommonConstants; import com.healthlink.his.common.constant.PromptMsgConstant; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.YbMdtrtCertType; -import com.healthlink.his.common.enums.ybenums.YbPayment; -import com.healthlink.his.common.enums.ybenums.YbPsnSetlWay; +import com.healthlink.his.yb.enums.YbMdtrtCertType; +import com.healthlink.his.yb.enums.YbPayment; +import com.healthlink.his.yb.enums.YbPsnSetlWay; import com.healthlink.his.common.utils.HisQueryUtils; import com.healthlink.his.financial.domain.Contract; import com.healthlink.his.financial.domain.PaymentRecDetail; @@ -76,7 +76,7 @@ import com.healthlink.his.yb.model.OutpatientRegistrationModel; import com.healthlink.his.yb.service.IClinicSettleService; import com.healthlink.his.yb.service.IInpatientSettleService; import com.healthlink.his.yb.service.IRegService; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.poi.util.StringUtil; @@ -190,7 +190,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { @Autowired private IMedicationDefinitionService medicationDefinitionService; @Autowired - private YbManager ybManager; + private IYbManager ybManager; @Autowired private RedisCache redisCache; @Autowired diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/ThreePartPayServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/ThreePartPayServiceImpl.java index d85e718a8..fe851d0b7 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/ThreePartPayServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/ThreePartPayServiceImpl.java @@ -11,7 +11,7 @@ import com.core.common.enums.TenantOptionDict; import com.core.common.exception.ServiceException; import com.core.common.utils.SecurityUtils; import com.core.common.utils.StringUtils; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.Practitioner; import com.healthlink.his.administration.service.IPractitionerService; import com.healthlink.his.common.constant.CommonConstants; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/EleInvoiceController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/EleInvoiceController.java index c1749bc5b..49a900e10 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/EleInvoiceController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/EleInvoiceController.java @@ -3,7 +3,7 @@ package com.healthlink.his.web.paymentmanage.controller; import com.core.common.core.domain.R; import com.core.common.exception.ServiceException; import com.healthlink.his.administration.domain.Invoice; -import com.healthlink.his.common.enums.ybenums.YbEncounterClass; +import com.healthlink.his.yb.enums.YbEncounterClass; import com.healthlink.his.web.paymentmanage.appservice.IChargeBillService; import com.healthlink.his.web.paymentmanage.appservice.IEleInvoiceService; import com.healthlink.his.web.paymentmanage.dto.InvoiceWriteOffDto; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/PaymentReconciliationController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/PaymentReconciliationController.java index c22e26592..94fcd8881 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/PaymentReconciliationController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/controller/PaymentReconciliationController.java @@ -5,7 +5,7 @@ package com.healthlink.his.web.paymentmanage.controller; import com.core.common.core.domain.R; import com.core.common.enums.TenantOptionDict; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.Invoice; import com.healthlink.his.financial.domain.PaymentReconciliation; import com.healthlink.his.web.chargemanage.dto.OutpatientRegistrationAddParam; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryCommonService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryCommonService.java deleted file mode 100755 index e009e6a4b..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryCommonService.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * 药房共通方法 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryCommonService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - PharmacyDispensaryInitDto init(); - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, Integer pageNo, Integer pageSize, - String searchKey, HttpServletRequest request); - - /** - * 单据列表 - * - * @param purchaseOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @param locationFlg 仓库flg - * @param supplyType 单据类型 - * @return 订货单据分页列表 - */ - R getPage(PharmacyDispensarySearchParam purchaseOrderSearchParam, Integer pageNo, Integer pageSize, - String searchKey, HttpServletRequest request,String locationFlg,Integer supplyType); - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R deleteOrder(String busNo); - -// /** -// * 提交审批 -// * -// * @param busNo 单据号 -// * @return 操作结果 -// */ -// R submitApproval(String busNo); - -// /** -// * 同意审批 -// * -// * @param busNo 单据号 -// * @return 操作结果 -// */ -// R agreeApproval(String busNo); - -// /** -// * 撤回审批 -// * -// * @param busNo 单据号 -// * @return 操作结果 -// */ -// R withdrawApproval(String busNo); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryDispensingOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryDispensingOrderService.java deleted file mode 100755 index 9f45d3574..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryDispensingOrderService.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; - -import java.util.List; - -/** - * 药房发药单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryDispensingOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 发药单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 发药单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 添加/编辑发药单 - * - * @param dispenseIdList 药品发放id - * @return 操作结果 - */ - boolean addOrEditDispensingOrder(List dispenseIdList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryProfitLossOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryProfitLossOrderService.java deleted file mode 100755 index 106ec7332..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryProfitLossOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房损益单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryProfitLossOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 损益单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 损益单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑损益单 - * - * @param profitLossOrderDtoList 损益信息 - * @return 操作结果 - */ - R addOrEditProfitLossOrder(List profitLossOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryReceiptApprovalService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryReceiptApprovalService.java deleted file mode 100755 index 903439199..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryReceiptApprovalService.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.inventorymanage.dto.SupplyItemDetailDto; - -import java.util.List; - -/** - * 药房审批方法 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryReceiptApprovalService { - - /** - * 请领单同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R requisitionOrderAgreeApproval(String busNo); - - /** - * 药房入库单据审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R stockInOrderAgreeApproved(String busNo); - - /** - * 药库退库审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R returnToWarehouseAgreeApproved(String busNo); - - -// /** -// * 药房发药审批通过 -// * -// * @param busNo 单据号 -// * @return 操作结果 -// */ -// R dispensingAgreeApproved(String busNo); - - /** - * 药房损益单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R profitLossAgreeApproved(String busNo); - - /** - * 药房盘点单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R stocktakingAgreepproved(String busNo); - /** - * 药房调入单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R transferInAgreeApproved(String busNo); - - /** - * 药房调出单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - R transferOutAgreeApproved(String busNo); - - /** - * 根据单据号获取供应单据及供应项相关详细信息 - * - * @param busNo 单据号 - * @return 供应单据及供应项相关详细信息 - */ - List getSupplyItemDetail(String busNo); - - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryRequisitionOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryRequisitionOrderService.java deleted file mode 100755 index bf559bfe8..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryRequisitionOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房请领单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryRequisitionOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 请领单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 请领单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑采购单 - * - * @param requisitionOrderDtoList 采购信息 - * @return 操作结果 - */ - R addOrEditRequisitionOrder(List requisitionOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryReturnToWarehouseOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryReturnToWarehouseOrderService.java deleted file mode 100755 index f8b52f506..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryReturnToWarehouseOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房退库单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryReturnToWarehouseOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 退库单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 退库单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑退库单 - * - * @param returnToDispensaryOrderDtoList 退库信息 - * @return 操作结果 - */ - R addOrEditReturnToWarehouseOrder(List returnToDispensaryOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryStockInOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryStockInOrderService.java deleted file mode 100755 index 3f927b780..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryStockInOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房入库单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryStockInOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 入库单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 入库单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑入库单 - * - * @param stockInOrderDtoList 入库信息 - * @return 操作结果 - */ - R addOrEditStockInOrder(List stockInOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryStocktakingOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryStocktakingOrderService.java deleted file mode 100755 index 5f6ec6d1e..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryStocktakingOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房盘点单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryStocktakingOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 盘点单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 盘点单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑盘点单 - * - * @param stocktakingOrderDtoList 盘点信息 - * @return 操作结果 - */ - R addOrEditStocktakingOrder(List stocktakingOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryTransferInOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryTransferInOrderService.java deleted file mode 100755 index 526cbd23f..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryTransferInOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房调入单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryTransferInOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 调入单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 调入单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑采购单 - * - * @param transferInOrderDtoList 采购信息 - * @return 操作结果 - */ - R addOrEditTransferInOrder(List transferInOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryTransferOutOrderService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryTransferOutOrderService.java deleted file mode 100755 index 26f7d507a..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/IPharmacyDispensaryTransferOutOrderService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice; - -import com.core.common.core.domain.R; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; - -import java.util.List; - -/** - * 药房调出单 - * - * @author yuxj - * @date 2025-07-22 - */ -public interface IPharmacyDispensaryTransferOutOrderService { - /** - * 单据初始化 - * - * @return 初始化信息 - */ - R init(); - - /** - * 调出单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 调出单单据详情 - */ - R getDetailPage(String busNo, Integer pageNo, Integer pageSize); - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - R getBusNo(); - - /** - * 添加/编辑采购单 - * - * @param transferOutOrderDtoList 采购信息 - * @return 操作结果 - */ - R addOrEditTransferOutOrder(List transferOutOrderDtoList); - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryCommonServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryCommonServiceImpl.java deleted file mode 100755 index 503a863e1..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryCommonServiceImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.administration.domain.Practitioner; -import com.healthlink.his.administration.domain.Supplier; -import com.healthlink.his.administration.service.IPractitionerService; -import com.healthlink.his.administration.service.ISupplierService; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.AcceptanceResult; -import com.healthlink.his.common.enums.PackagingCondition; -import com.healthlink.his.common.enums.SupplyStatus; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.common.utils.HisQueryUtils; -import com.healthlink.his.web.common.appservice.ICommonService; -import com.healthlink.his.web.common.dto.LocationDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryMedicationInfoDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * 药房共通 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryCommonServiceImpl implements IPharmacyDispensaryCommonService { - - @Resource - private ISupplierService supplierService; - - @Resource - private IPractitionerService practitionerService; - - @Resource - private ISupplyRequestService supplyRequestService; - - @Resource - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - @Resource - private ICommonService commonServiceImpl; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public PharmacyDispensaryInitDto init() { - PharmacyDispensaryInitDto orderInitDto = new PharmacyDispensaryInitDto(); - - // 查询供应商列表 - List supplierList = supplierService.getList(); - // 查询经手人列表 - List practitionerList = practitionerService.getList(); - // 经手人信息 - List practitionerListOption = practitionerList.stream() - .map(practitioner -> new PharmacyDispensaryInitDto.LongOption(practitioner.getId(), practitioner.getName())) - .collect(Collectors.toList()); - // 供应商信息 - List supplierListOption = supplierList.stream() - .map(supplier -> new PharmacyDispensaryInitDto.SupplierOption(supplier.getId(), supplier.getName() ,supplier.getPhone())) - .collect(Collectors.toList()); - // 审批状态 - List supplyStatusOption = Stream.of(SupplyStatus.values()).map( - supplyStatus -> new PharmacyDispensaryInitDto.IntegerOption(supplyStatus.getValue(), supplyStatus.getInfo())) - .collect(Collectors.toList()); - - // 包装情况 - List packagingConditionOption = Stream.of(PackagingCondition.values()) - .map(packagingCondition -> new PharmacyDispensaryInitDto.IntegerOption(packagingCondition.getValue(), - packagingCondition.getInfo())) - .collect(Collectors.toList()); - - // 验收结果 - List acceptanceResultOption = Stream.of(AcceptanceResult.values()) - .map(acceptanceResult -> new PharmacyDispensaryInitDto.IntegerOption(acceptanceResult.getValue(), - acceptanceResult.getInfo())) - .collect(Collectors.toList()); - - // 仓库列表 - List cabinetList = commonServiceImpl.getCabinetList(); - - // 药房列表 - List pharmacyList = commonServiceImpl.getPharmacyList(); - - orderInitDto.setCabinetListOptions(cabinetList).setPharmacyListOptions(pharmacyList).setSupplierOption(supplierListOption) - .setPractitionerOption(practitionerListOption).setSupplyStatusOptions(supplyStatusOption) - .setPackagingConditionOptions(packagingConditionOption) - .setAcceptanceResultoryOptions(acceptanceResultOption); - - return orderInitDto; - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @Override - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, Integer pageNo, - Integer pageSize, String searchKey, HttpServletRequest request) { - - Long locationId = purchaseOrderSearchParam.getLocationId(); - purchaseOrderSearchParam.setLocationId(null); - Long supplierId = purchaseOrderSearchParam.getSupplierId(); - purchaseOrderSearchParam.setSupplierId(null); - // 构建查询条件 - QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(purchaseOrderSearchParam, searchKey, - new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name, CommonConstants.FieldName.PyStr)), request); - // 设置排序 - queryWrapper.orderByDesc(CommonConstants.FieldName.Name); - - Page medicationInfoDto = pharmacyDispensaryCommonMapper - .getMedicationInfo(new Page<>(pageNo, pageSize), queryWrapper, locationId, supplierId); - - for (PharmacyDispensaryMedicationInfoDto item : medicationInfoDto.getRecords()) { - List unitList = new ArrayList<>(); - unitList - .add(new PharmacyDispensaryMedicationInfoDto.Option(item.getUnitCode(), item.getUnitCode_dictText())); - unitList.add( - new PharmacyDispensaryMedicationInfoDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - - return R.ok(medicationInfoDto); - } - - /** - * 单据列表 - * - * @param purchaseOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @param locationFlg 仓库flg - * @param supplyType 单据类型 - * @return 订货单据分页列表 - */ - @Override - public R getPage(PharmacyDispensarySearchParam purchaseOrderSearchParam, Integer pageNo, Integer pageSize, - String searchKey, HttpServletRequest request, String locationFlg,Integer supplyType) { - //判断哪个画面使用 - if (supplyType != null) { - purchaseOrderSearchParam.setTypeEnum(supplyType); - } -// if (locationForm != null) { -// purchaseOrderSearchParam.setLocationTypeEnum(locationForm); -// } - String originalBusNoFlg = purchaseOrderSearchParam.getOriginalBusNoFlg(); - purchaseOrderSearchParam.setOriginalBusNoFlg(null); - // 构建查询条件 - QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(purchaseOrderSearchParam, searchKey, - new HashSet<>( - Arrays.asList(CommonConstants.FieldName.SupplyBusNo, CommonConstants.FieldName.ApplicantName)), - request); - // 设置排序 - queryWrapper.orderByDesc(CommonConstants.FieldName.SupplyBusNo); - // 查询订货单分页列表 - Page purchaseOrderDtoPage = - pharmacyDispensaryCommonMapper.getPage(new Page<>(pageNo, pageSize), queryWrapper,originalBusNoFlg, locationFlg); - - purchaseOrderDtoPage.getRecords().forEach(e -> { - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - return R.ok(purchaseOrderDtoPage); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R deleteOrder(String busNo) { - // 根据原始单据号查询信息 - List supplyRequest = supplyRequestService.getSupplyByOriginalBusNo(busNo); - if (!supplyRequest.isEmpty()) { - // 将原始单据号信息的原始单据号删除 - boolean flg = supplyRequestService.updateByBusNo(supplyRequest.get(0).getBusNo()); - if (!flg) { - R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - - // 删除单据 - boolean result = supplyRequestService.removeByBusNo(busNo); - return result ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)) - : R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryDispensingOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryDispensingOrderServiceImpl.java deleted file mode 100755 index 9fa91ae04..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryDispensingOrderServiceImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryDispensingOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryDispensingOrderMapper; -import com.healthlink.his.workflow.domain.SupplyDelivery; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyDeliveryService; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.List; - -/** - * 药房发药单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryDispensingOrderServiceImpl implements IPharmacyDispensaryDispensingOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - @Resource - private ISupplyRequestService supplyRequestService; - @Resource - private ISupplyDeliveryService supplyDeliveryService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - @Autowired - private PharmacyDispensaryDispensingOrderMapper pharmacyDispensaryDispensingOrderMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); - // supplyCategoryOption - // .add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getValue(), - // SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getInfo())); - // supplyCategoryOption - // .add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_DISPENSING.getValue(), - // SupplyCategory.INPATIENT_PATIENT_DISPENSING.getInfo())); - // supplyCategoryOption.add( - // new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getValue(), - // SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 发药单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 发药单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page dispensingOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - dispensingOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - - }); - - return R.ok(dispensingOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 单据号 - */ - public String getBusNo() { - return assignSeqUtil.getSeqByDay(AssignSeqEnum.DISPENSING_ORDER.getPrefix(), 4); - } - - /** - * 添加/编辑发药单 - * - * @param dispenseIdList 药品发放id - * @return 操作结果 - */ - - @Override - public boolean addOrEditDispensingOrder(List dispenseIdList) { - - // 获取单据号 - String busNo = this.getBusNo(); - // 获取更表所需信息 - List detailDto = - pharmacyDispensaryDispensingOrderMapper.getInfo(dispenseIdList, DispenseStatus.COMPLETED.getValue()); - - List supplyRequestList = new ArrayList<>(); - SupplyRequest supplyRequest; - List supplyDeliveryList = new ArrayList<>(); - SupplyDelivery supplyDelivery; - for (PharmacyDispensaryDetailDto item : detailDto) { - // 供应申请 - supplyRequest = new SupplyRequest().setBusNo(busNo).setTypeEnum(SupplyType.DISPENSING_ORDER.getValue()) - .setStatusEnum(SupplyStatus.AGREE.getValue()).setCategoryEnum(item.getCategoryEnum()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()) - .setLotNumber(item.getLotNumber()).setSourceTypeEnum(LocationForm.PHARMACY.getValue()) - .setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue()) - .setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId()) - .setApplyTime(item.getApplyTime()).setApproverId(item.getApproverId()) - .setApprovalTime(item.getApprovalTime()); - supplyRequestList.add(supplyRequest); - // 供应发放 - supplyDelivery = new SupplyDelivery().setRequestId(supplyRequest.getId()) - .setStatusEnum(DispenseStatus.COMPLETED.getValue()).setTypeEnum(supplyRequest.getTypeEnum()) - .setItemTable(supplyRequest.getItemTable()).setItemId(supplyRequest.getItemId()) - .setBasedOnTable(CommonConstants.TableName.MED_MEDICATION_DISPENSE).setBasedOnIds(item.getDispenseIds()) - .setUnitCode(supplyRequest.getUnitCode()).setQuantity(supplyRequest.getItemQuantity()) - .setLotNumber(supplyRequest.getLotNumber()).setPractitionerId(supplyRequest.getApplicantId()) - .setOccurrenceTime(supplyRequest.getApprovalTime()).setReceiverId(supplyRequest.getPurposeLocationId()) - .setReceiveTime(supplyRequest.getApprovalTime()); - - supplyDeliveryList.add(supplyDelivery); - } - - // 更新供应请求表 - boolean requestFlg = supplyRequestService.saveBatch(supplyRequestList); - if (!requestFlg) { - return false; - } - // 更新供应发放表 - boolean deliveryFlg = supplyDeliveryService.saveBatch(supplyDeliveryList); - if (!deliveryFlg) { - return false; - } - - return true; - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryProfitLossOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryProfitLossOrderServiceImpl.java deleted file mode 100755 index fe899d225..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryProfitLossOrderServiceImpl.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryProfitLossOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房损益单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryProfitLossOrderServiceImpl implements IPharmacyDispensaryProfitLossOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - @Resource - private ISupplyRequestService supplyRequestService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); - // supplyCategoryOption.add(new - // PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(), - // SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo())); - // supplyCategoryOption.add(new - // PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(), - // SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo())); - // supplyCategoryOption.add(new - // PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.STANDBY_RESCUE_MEDICINES.getValue(), - // SupplyCategory.STANDBY_RESCUE_MEDICINES.getInfo())); - // supplyCategoryOption.add(new - // PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getValue(), - // SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getInfo())); - // supplyCategoryOption.add(new - // PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.DONATED_MEDICINES.getValue(), - // SupplyCategory.DONATED_MEDICINES.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 损益单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 损益单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page profitLossOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - profitLossOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : profitLossOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - return R.ok(profitLossOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_PRPFITLOSS.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑损益单 - * - * @param profitLossOrderDtoList 损益信息 - * @return 操作结果 - */ - - @Override - public R addOrEditProfitLossOrder(List profitLossOrderDtoList) { - // 请求数据取得 - List requestList = - supplyRequestService.getSupplyByBusNo(profitLossOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - - List supplyRequestList = new ArrayList<>(); - Date applyTime = DateUtils.getNowDate(); - for (PharmacyDispensaryDetailDto item : profitLossOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_PRPFITLOSS.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()).setCategoryEnum(item.getCategoryEnum()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()).setPrice(item.getPrice()) - .setTotalPrice(item.getTotalPrice()).setRetailPrice(item.getRetailPrice()) - .setTotalRetailPrice(item.getTotalRetailPrice()).setBatchInventory(item.getBatchInventory()) - .setSpecificationInventory(item.getSpecificationInventory()).setStartTime(item.getStartTime()) - .setEndTime(item.getEndTime()).setLotNumber(item.getLotNumber()).setTraceNo(item.getTraceNo()) - .setTraceNoUnitCode(item.getTraceNoUnitCode()).setReason(item.getReason()) - .setPurposeTypeEnum(LocationForm.PHARMACY.getValue()).setPurposeLocationId(item.getPurposeLocationId()) - .setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryReceiptApprovalServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryReceiptApprovalServiceImpl.java deleted file mode 100755 index 015be97c8..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryReceiptApprovalServiceImpl.java +++ /dev/null @@ -1,924 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import tools.jackson.databind.JsonNode; -import tools.jackson.databind.node.ArrayNode; -import tools.jackson.databind.node.ObjectNode; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.core.common.core.domain.R; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.core.common.utils.SecurityUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.DispenseStatus; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.common.enums.TraceNoStatus; -import com.healthlink.his.common.enums.Whether; -import com.healthlink.his.common.enums.ybenums.YbInvChgType; -import com.healthlink.his.common.enums.ybenums.YbRxFlag; -import com.healthlink.his.medication.domain.MedicationDispense; -import com.healthlink.his.medication.service.IMedicationDispenseService; -import com.healthlink.his.web.inventorymanage.appservice.IReceiptApprovalAppService; -import com.healthlink.his.web.inventorymanage.appservice.ITraceNoAppService; -import com.healthlink.his.web.inventorymanage.assembler.InventoryManageAssembler; -import com.healthlink.his.web.inventorymanage.dto.ItemChargeDetailDto; -import com.healthlink.his.web.inventorymanage.dto.SupplyItemDetailDto; -import com.healthlink.his.web.inventorymanage.mapper.ReceiptApprovalMapper; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.workflow.domain.DeviceDispense; -import com.healthlink.his.workflow.domain.InventoryItem; -import com.healthlink.his.workflow.domain.SupplyDelivery; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.IDeviceDispenseService; -import com.healthlink.his.workflow.service.IInventoryItemService; -import com.healthlink.his.workflow.service.ISupplyDeliveryService; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import com.healthlink.his.yb.dto.Medical3503Param; -import com.healthlink.his.yb.dto.MedicalInventory3501Param; -import com.healthlink.his.yb.dto.MedicalInventory3502Param; -import com.healthlink.his.yb.dto.MedicalPurchase3504Param; -import com.healthlink.his.yb.service.YbManager; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.util.*; -import java.util.stream.Collectors; - -/** - * 药房审批 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryReceiptApprovalServiceImpl implements IPharmacyDispensaryReceiptApprovalService { - @Autowired - private ITraceNoAppService traceNoAppService; - @Resource - private ISupplyRequestService supplyRequestService; - - @Autowired - private ISupplyDeliveryService supplyDeliveryService; - @Autowired - private IInventoryItemService inventoryItemService; - @Autowired - private ReceiptApprovalMapper receiptApprovalMapper; - @Autowired - private YbManager ybService; - @Autowired - private IMedicationDispenseService medicationDispenseService; - @Autowired - private IDeviceDispenseService deviceDispenseService; - @Autowired - private IReceiptApprovalAppService receiptApprovalAppService; - - /** - * 请领单同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R requisitionOrderAgreeApproval(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - // // 获取审批通过后的供应请求id列表 - // List supplyReqIdList = agreedList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // - // // 校验(已经审批通过的单号(发放状态是已完成),不能再重复审批通过) - // boolean validation = supplyDeliveryService.supplyDeliveryValidation(supplyReqIdList); - // if (validation) { - // throw new ServiceException("请勿重复审批"); - // } - // // 根据单据,生成供应发放单 - // List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - // if (deliveredList.isEmpty()) { - // return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - // } - - return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - - /** - * 药房入库单据审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R stockInOrderAgreeApproved(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 根据单据,发放物品 - List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - if (deliveredList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 查询供应项目的详细信息 - List supplyItemDetailList = this.getSupplyItemDetail(busNo); - // 返回信息 - String returnMsg = null; - if (!supplyItemDetailList.isEmpty()) { - InventoryItem inventoryItemPurpose = null; - // 新增库存信息 - List supplyList = new ArrayList<>(); - - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // 根据项目id,产品批号,仓库id 查询仓库库存表信息 - List inventoryItemList = inventoryItemService.selectInventoryByItemId( - supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - supplyItemDetailDto.getPurposeLocationId(), SecurityUtils.getLoginUser().getTenantId()); - - if (!inventoryItemList.isEmpty()) { - inventoryItemPurpose = inventoryItemList.get(0); - } - - if (inventoryItemPurpose == null) { - // 新增库存信息 - supplyList.add(supplyItemDetailDto); - } else { - // 最小数量(最小单位库存数量) - BigDecimal minQuantity = inventoryItemPurpose.getQuantity(); - - // 计算盘点后库存数量,结果取小单位 - // 供应申请的物品计量单位与包装单位相同 - if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - // 源仓库库存+(调拨数量*拆零比) - minQuantity = minQuantity - .add(supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getItemQuantity())); - - } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - // 供应申请的物品计量单位与最小单位相同 - // 源仓库库存+调拨数量 - minQuantity = minQuantity.add(supplyItemDetailDto.getItemQuantity()); - } - // 更新源仓库库存数量 - Boolean aBoolean = - inventoryItemService.updateInventoryQuantity(inventoryItemPurpose.getId(), minQuantity, now); - - if (!aBoolean) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - } - - if (!supplyList.isEmpty()) { - // 将供应项目的详细信息装配为库存项目 - List inventoryItemList = InventoryManageAssembler.assembleInventoryItem(supplyList); - // 入库 - inventoryItemService.stockIn(inventoryItemList); - } - - // 追加追溯码信息 - traceNoAppService.addTraceNoManage(supplyItemDetailList, TraceNoStatus.IN.getValue(), - SupplyType.PURCHASE_STOCKIN.getValue()); - - // 调用医保商品采购接口 todo 药房相关医保接口未对应 - String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关 - if (Whether.YES.getCode().equals(ybSwitch)) { - List uploadFailedNoList = - this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now); - if (!uploadFailedNoList.isEmpty()) { - returnMsg = "3503商品采购上传错误,错误项目编码" + uploadFailedNoList; - } else { - returnMsg = "3503商品采购上传成功"; - } - } - } - return R.ok(returnMsg, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - - /** - * 药库退库审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R returnToWarehouseAgreeApproved(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 根据单据,发放物品 - List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - if (deliveredList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 查询供应项目的详细信息 - List supplyItemDetailList = this.getSupplyItemDetail(busNo); - // 返回信息 - String returnMsg = null; - if (!supplyItemDetailList.isEmpty()) { - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // 根据项目id,产品批号,目的仓库id 查询仓库库存表信息 - List inventoryItemList = inventoryItemService.selectInventoryByItemId( - supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - supplyItemDetailDto.getSourceLocationId(), SecurityUtils.getLoginUser().getTenantId()); - InventoryItem inventoryItemSource; - if (!inventoryItemList.isEmpty()) { - inventoryItemSource = inventoryItemList.get(0); - // 最小数量(最小单位库存数量) - BigDecimal minQuantity = inventoryItemSource.getQuantity(); - - // 计算退货后库存数量,结果取小单位 - // 供应申请的物品计量单位与包装单位相同 - if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - if (minQuantity.compareTo(supplyItemDetailDto.getItemQuantity()) < 0) { - // 库存数量不足 - return R.fail(MessageUtils.createMessage("操作失败,库存数量不足", null)); - } else { - // 仓库库存-(退货数量*拆零比) - minQuantity = minQuantity.subtract( - supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getItemQuantity())); - } - } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - if (minQuantity.compareTo(supplyItemDetailDto.getItemQuantity()) < 0) { - // 库存数量不足 - return R.fail(MessageUtils.createMessage("操作失败,库存数量不足", null)); - } else { - // 供应申请的物品计量单位与最小单位相同 - // 仓库库存-退货数量 - minQuantity = minQuantity.subtract(supplyItemDetailDto.getItemQuantity()); - } - } - // 更新仓库库存数量 - Boolean aBoolean = - inventoryItemService.updateInventoryQuantity(inventoryItemSource.getId(), minQuantity, now); - - if (!aBoolean) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - } - // 追加追溯码信息 - traceNoAppService.addTraceNoManage(supplyItemDetailList, TraceNoStatus.OUT.getValue(), - SupplyType.PURCHASE_RETURN.getValue()); - - // 调用医保采购退货接口 - String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关 - if (Whether.YES.getCode().equals(ybSwitch)) { - List uploadFailedNoList = - this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now); - if (!uploadFailedNoList.isEmpty()) { - returnMsg = "3504采购退货上传错误,错误项目编码" + uploadFailedNoList; - } - } - } - return R.ok(returnMsg, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - // - // /** - // * 药房发药审批通过 todo 发药只查询,没有审批 - // * - // * @param busNo 单据号 - // * @return 操作结果 - // */ - // @Override - // public R dispensingAgreeApproved(String busNo) { - // // 获取当前时间 - // Date now = DateUtils.getNowDate(); - // // 审批单据并返回单据详情 - // List agreedList = supplyRequestService.agreeRequest(busNo, now); - // if (agreedList.isEmpty()) { - // return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - // } - // // 根据单据,发放物品 - // List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - // if (deliveredList.isEmpty()) { - // return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - // } - // - // // 查询供应项目的详细信息 - // List supplyItemDetailList = this.getSupplyItemDetail(busNo); - // - // if (!supplyItemDetailList.isEmpty()) { - // - // for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // // 根据项目id,产品批号,源仓库id 查询源仓库库存表信息 - // List inventoryItemSourceList = inventoryItemService.selectInventoryByItemId( - // supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - // supplyItemDetailDto.getSourceLocationId(), SecurityUtils.getLoginUser().getTenantId()); - // InventoryItem inventoryItemSource = new InventoryItem(); - // if (!inventoryItemSourceList.isEmpty()) { - // inventoryItemSource = inventoryItemSourceList.get(0); - // - // // 包装数量(常规单位库存数量) 更新库存数量方法中没用到 - // BigDecimal baseQuantitySource = inventoryItemSource.getQuantity(); - // // 最小数量(最小单位库存数量) - // BigDecimal minQuantitySource = inventoryItemSource.getQuantity(); - // - // // 供应申请的物品计量单位与包装单位相同 - // if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - // if (minQuantitySource.compareTo(supplyItemDetailDto.getItemQuantity()) < 0) { - // // 库存数量不足 - // return R.fail(MessageUtils.createMessage("操作失败,库存数量不足", null)); - // } else { - // // 源仓库库存-(领用数量*拆零比) - // minQuantitySource = minQuantitySource.subtract( - // supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getItemQuantity())); - // } - // } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - // if (minQuantitySource.compareTo(supplyItemDetailDto.getItemQuantity()) < 0) { - // // 库存数量不足 - // return R.fail(MessageUtils.createMessage("操作失败,库存数量不足", null)); - // } else { - // // 供应申请的物品计量单位与最小单位相同 - // // 源仓库库存-领用数量 - // minQuantitySource = minQuantitySource.subtract(supplyItemDetailDto.getItemQuantity()); - // } - // } - // // 更新源仓库库存数量 - // Boolean aBooleanSource = inventoryItemService.updateInventoryQuantity(inventoryItemSource.getId(), - // baseQuantitySource, minQuantitySource, now, supplyItemDetailDto.getTraceNo()); - // - // if (!aBooleanSource) { - // return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - // } - // } - // } - // - // } - // return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - // } - - /** - * 药房损益单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R profitLossAgreeApproved(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - // 根据单据,生成供应发放单 - List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - if (deliveredList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - // 返回信息 - String returnMsg = null; - // 查询供应项目的详细信息 - List supplyItemDetailList = this.getSupplyItemDetail(busNo); - if (!supplyItemDetailList.isEmpty()) { - - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // 根据id,产品批号,仓库 查询库存表信息 - List inventoryItemList = inventoryItemService.selectInventoryByItemId( - supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - supplyItemDetailDto.getPurposeLocationId(), SecurityUtils.getLoginUser().getTenantId()); - InventoryItem inventoryItem = new InventoryItem(); - if (!inventoryItemList.isEmpty()) { - inventoryItem = inventoryItemList.get(0); - // 最小数量(最小单位库存数量) - BigDecimal minQuantity = null; - - // 计算报损后库存数量,结果取小单位 - // 供应申请的物品计量单位与包装单位相同 - if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - // 数量*拆零比 - minQuantity = - supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getItemQuantity()); - } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - // 供应申请的物品计量单位与最小单位相同 - // 数量 - minQuantity = supplyItemDetailDto.getItemQuantity(); - } - // 更新库存数量 - Boolean aBoolean = - inventoryItemService.updateInventoryQuantity(inventoryItem.getId(), minQuantity, now); - if (!aBoolean) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - } - - // 追加追溯码信息 - boolean flg = - traceNoAppService.updateTraceNoList(supplyItemDetailList, SupplyType.PURCHASE_PRPFITLOSS.getValue()); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 调用医保库存变更接口 - String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关 - if (Whether.YES.getCode().equals(ybSwitch)) { - List uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList, - YbInvChgType.DESTRUCTION, false, false, false, now); - if (!uploadFailedNoList.isEmpty()) { - returnMsg = "3502库存变更上传错误,错误项目编码" + uploadFailedNoList; - } - } - } - return R.ok(returnMsg, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - - /** - * 药房盘点单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R stocktakingAgreepproved(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - // 根据单据,生成供应发放单 - List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - if (deliveredList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 查询供应项目的详细信息 - List supplyItemDetailList = this.getSupplyItemDetail(busNo); - // 首次盘存列表 - List firstSupplyItemDetailList = new ArrayList<>(); - // 药品/耗材发放列表 - List medicationDispenses = null; - List deviceDispenses = null; - // 返回信息 - String stocktakingReturnMsg = null; - String changeReturnMsg = null; - if (!supplyItemDetailList.isEmpty()) { - // 获取盘盈列表(itemQuantity > 0) - List positiveList = supplyItemDetailList.stream() - .filter(item -> item.getItemQuantity() != null && item.getItemQuantity().compareTo(BigDecimal.ZERO) > 0) - .collect(Collectors.toList()); - // 获取盘亏列表(itemQuantity < 0) - List negativeList = supplyItemDetailList.stream() - .filter(item -> item.getItemQuantity() != null && item.getItemQuantity().compareTo(BigDecimal.ZERO) < 0) - .collect(Collectors.toList()); - - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // 根据id,产品批号,仓库 查询库存表信息 - List inventoryItemList = inventoryItemService.selectInventoryByItemId( - supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - supplyItemDetailDto.getPurposeLocationId(), SecurityUtils.getLoginUser().getTenantId()); - // 查看该批号的药品/耗材是否发放过(用于证明是否首次盘存) - if (CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(supplyItemDetailDto.getItemTable())) { - medicationDispenses = medicationDispenseService.list(new LambdaQueryWrapper() - .eq(MedicationDispense::getLotNumber, supplyItemDetailDto.getLotNumber())); - if (medicationDispenses.isEmpty()) { - firstSupplyItemDetailList.add(supplyItemDetailDto); - } - } else if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(supplyItemDetailDto.getItemTable())) { - deviceDispenses = deviceDispenseService.list(new LambdaQueryWrapper() - .in(DeviceDispense::getLotNumber, supplyItemDetailDto.getLotNumber())); - if (deviceDispenses.isEmpty()) { - firstSupplyItemDetailList.add(supplyItemDetailDto); - } - } - if (!inventoryItemList.isEmpty()) { - InventoryItem inventoryItem = inventoryItemList.get(0); - // 包装数量(常规单位库存数量) 更新库存数量方法中没用到 - BigDecimal baseQuantity = inventoryItem.getQuantity(); - // 最小数量(最小单位库存数量) - BigDecimal minQuantity = null; - - // 计算盘点后库存数量,结果取小单位 - // 供应申请的物品计量单位与包装单位相同 - if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - minQuantity = - supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getTotalQuantity()); - // 供应申请的物品计量单位与最小单位相同 - } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - minQuantity = supplyItemDetailDto.getTotalQuantity(); - } - // 更新库存数量 - Boolean aBoolean = - inventoryItemService.updateInventoryQuantity(inventoryItem.getId(), minQuantity, now); - if (!aBoolean) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - - String ybSwitch = - SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关 - if (Whether.YES.getCode().equals(ybSwitch)) { - // 如果首次盘点信息不为空 - if (!firstSupplyItemDetailList.isEmpty()) { - // 调用医保盘存接口,盘盈 - List uploadFailedNoList = this.ybInventoryIntegrated(firstSupplyItemDetailList, - YbInvChgType.INVENTORY_GAIN, true, false, false, now); - if (!uploadFailedNoList.isEmpty()) { - stocktakingReturnMsg = "3501盘存上传错误,错误项目编码" + uploadFailedNoList; - } - } - List uploadFailedGainList = null; - List uploadFailedLossList = null; - if (!positiveList.isEmpty()) { - // 调用医保库存变更接口,盘盈 - uploadFailedGainList = this.ybInventoryIntegrated(positiveList, YbInvChgType.INVENTORY_GAIN, - false, false, false, now); - } - if (!negativeList.isEmpty()) { - // 调用医保库存变更接口,盘亏 - uploadFailedLossList = this.ybInventoryIntegrated(negativeList, YbInvChgType.INVENTORY_LOSS, - false, false, false, now); - } - if (uploadFailedGainList != null || uploadFailedLossList != null) { - changeReturnMsg = "3502库存变更上传错误,错误项目编码" + uploadFailedGainList + uploadFailedLossList; - } - } - } - // 追加追溯码信息 - boolean flg = - traceNoAppService.updateTraceNoList(supplyItemDetailList, SupplyType.PURCHASE_STOCKTAKING.getValue()); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - return R.ok(stocktakingReturnMsg + changeReturnMsg, - MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - - /** - * 药房调入单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R transferInAgreeApproved(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - // 根据单据,发放物品 - List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - if (deliveredList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 查询供应项目的详细信息 - List supplyItemDetailList = this.getSupplyItemDetail(busNo); - - if (!supplyItemDetailList.isEmpty()) { - - // 新增库存信息 - List supplylList = new ArrayList<>(); - - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // 根据项目id,产品批号,目的仓库id 查询目的仓库库存表信息 - List inventoryItemPurposeList = inventoryItemService.selectInventoryByItemId( - supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - supplyItemDetailDto.getPurposeLocationId(), SecurityUtils.getLoginUser().getTenantId()); - InventoryItem inventoryItemPurpose = null; - if (!inventoryItemPurposeList.isEmpty()) { - inventoryItemPurpose = inventoryItemPurposeList.get(0); - } - - if (inventoryItemPurpose == null) { - // 新增库存信息 - supplylList.add(supplyItemDetailDto); - } else { - // 包装数量(常规单位库存数量) 更新库存数量方法中没用到 - BigDecimal baseQuantity = inventoryItemPurpose.getQuantity(); - // 最小数量(最小单位库存数量) - BigDecimal minQuantity = inventoryItemPurpose.getQuantity(); - - // 计算盘点后库存数量,结果取小单位 - // 供应申请的物品计量单位与包装单位相同 - if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - // 源仓库库存+(退库数量*拆零比) - minQuantity = minQuantity - .add(supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getItemQuantity())); - } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - // 供应申请的物品计量单位与最小单位相同 - // 源仓库库存+退库数量 - minQuantity = minQuantity.add(supplyItemDetailDto.getItemQuantity()); - } - // 更新目的仓库库存数量 - Boolean bBooleanPurpose = - inventoryItemService.updateInventoryQuantity(inventoryItemPurpose.getId(), minQuantity, now); - if (!bBooleanPurpose) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - } - if (!supplylList.isEmpty()) { - // 将供应项目的详细信息装配为库存项目 - List inventoryItemList = InventoryManageAssembler.assembleInventoryItem(supplylList); - // 入库 - inventoryItemService.stockIn(inventoryItemList); - } - // 追加追溯码信息 - traceNoAppService.addTraceNoManage(supplyItemDetailList, TraceNoStatus.IN.getValue(), - SupplyType.PURCHASE_TRANSFERIN.getValue()); - - } - return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - - } - - /** - * 药房调出单审批通过 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @Override - public R transferOutAgreeApproved(String busNo) { - // 获取当前时间 - Date now = DateUtils.getNowDate(); - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.agreeRequest(busNo, now); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - // 根据单据,发放物品 - List deliveredList = supplyDeliveryService.createCompletedSupplyDelivery(agreedList, now); - if (deliveredList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - - // 查询供应项目的详细信息 - List supplyItemDetailList = this.getSupplyItemDetail(busNo); - - if (!supplyItemDetailList.isEmpty()) { - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - // 根据项目id,产品批号,目的仓库id 查询目的仓库库存表信息 - List inventoryItemSourceList = inventoryItemService.selectInventoryByItemId( - supplyItemDetailDto.getItemId(), supplyItemDetailDto.getLotNumber(), - supplyItemDetailDto.getSourceLocationId(), SecurityUtils.getLoginUser().getTenantId()); - InventoryItem inventoryItemSource = null; - if (!inventoryItemSourceList.isEmpty()) { - inventoryItemSource = inventoryItemSourceList.get(0); - - // 包装数量(常规单位库存数量) 更新库存数量方法中没用到 - BigDecimal baseQuantity = inventoryItemSource.getQuantity(); - // 最小数量(最小单位库存数量) - BigDecimal minQuantity = inventoryItemSource.getQuantity(); - - // 计算盘点后库存数量,结果取小单位 - // 供应申请的物品计量单位与包装单位相同 - if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getUnitCode())) { - if (minQuantity.compareTo(supplyItemDetailDto.getItemQuantity()) < 0) { - // 库存数量不足 - return R.fail(MessageUtils.createMessage("操作失败,库存数量不足", null)); - } else { - // 源仓库库存-(退库数量*拆零比) - minQuantity = minQuantity.subtract( - supplyItemDetailDto.getPartPercent().multiply(supplyItemDetailDto.getItemQuantity())); - } - } else if (supplyItemDetailDto.getItemUnit().equals(supplyItemDetailDto.getMinUnitCode())) { - if (minQuantity.compareTo(supplyItemDetailDto.getItemQuantity()) < 0) { - // 库存数量不足 - return R.fail(MessageUtils.createMessage("操作失败,库存数量不足", null)); - } else { - // 供应申请的物品计量单位与最小单位相同 - // 源仓库库存-退库数量 - minQuantity = minQuantity.subtract(supplyItemDetailDto.getItemQuantity()); - } - } - // 更新目的仓库库存数量 - Boolean bBooleanSource = - inventoryItemService.updateInventoryQuantity(inventoryItemSource.getId(), minQuantity, now); - if (!bBooleanSource) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - } - // 追加追溯码信息 - traceNoAppService.addTraceNoManage(supplyItemDetailList, TraceNoStatus.OUT.getValue(), - SupplyType.PURCHASE_TRANSFEROUT.getValue()); - - } - return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - - } - - /** - * 根据单据号获取供应单据及供应项相关详细信息 - * - * @param busNo 单据号 - * @return 供应单据及供应项相关详细信息 - */ - @Override - public List getSupplyItemDetail(String busNo) { - return receiptApprovalMapper.selectSupplyDetail(busNo, DispenseStatus.COMPLETED.getValue()); - } - - /** - * 医保库存相关进销存接口 - * - * @param supplyItemDetailList 供应申请项目详细信息 - * @param ybInvChgType 库存变更类型 - * @param firstFlag 首次盘存标识 - * @param now 库存变更时间 - * @return 上传失败的id集合 - */ - private List ybInventoryIntegrated(List supplyItemDetailList, - YbInvChgType ybInvChgType, Boolean firstFlag, Boolean purchaseFlag, Boolean returnFlag, Date now) { - List uploadFailedNoList = new ArrayList<>(); - R result; - R firstResult = R.ok(); - R returnResult = R.ok(); - R purchaseResult = R.ok(); - for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) { - if (supplyItemDetailDto.getYbNo() == null) { - continue; - } - switch (ybInvChgType) { - case ALLOCATION_IN: - case ALLOCATION_OUT: - case INVENTORY_GAIN: - case INVENTORY_LOSS: - case DESTRUCTION: - case OTHER_IN: - case OTHER_OUT: - case DONATION_IN: - case DONATION_RETURN_OUT: - case PURCHASE_IN: - case RETURN_OUT: - if (firstFlag) { - firstResult = - ybService.uploadInventoryCount(getMedicalInventory3501Param(supplyItemDetailDto, now), now); - if (firstResult.getCode() != 200) { - uploadFailedNoList.add(supplyItemDetailDto.getItemBusNo()); - } - } - if (returnFlag) { - returnResult = - ybService.cancelProcurement(getMedicalPurchase3504Param(supplyItemDetailDto, now)); - if (returnResult.getCode() != 200) { - uploadFailedNoList.add(supplyItemDetailDto.getItemBusNo()); - } - } - if (purchaseFlag) { - purchaseResult = ybService.procurement(getMedical3503Param(supplyItemDetailDto, now)); - if (purchaseResult.getCode() != 200) { - uploadFailedNoList.add(supplyItemDetailDto.getItemBusNo()); - } - } - result = ybService.updateInventoryCount( - getMedicalInventory3502Param(supplyItemDetailDto, now, ybInvChgType.getValue())); - if (result.getCode() != 200) { - uploadFailedNoList.add(supplyItemDetailDto.getItemBusNo()); - } - break; - default: - throw new IllegalArgumentException("未知的库存变更类型: " + ybInvChgType); - } - } - return uploadFailedNoList; - } - - private MedicalPurchase3504Param getMedicalPurchase3504Param(SupplyItemDetailDto supplyItemDetailDto, Date now) { - MedicalPurchase3504Param medicalPurchase3504Param = new MedicalPurchase3504Param(); - medicalPurchase3504Param.setMedListCodg(supplyItemDetailDto.getYbNo()) - .setFixmedinsBchno(supplyItemDetailDto.getLotNumber()) - .setFixmedinsHilistId(supplyItemDetailDto.getItemBusNo()) - .setFixmedinsHilistName(supplyItemDetailDto.getItemTable()) - .setSplerName(supplyItemDetailDto.getSupplierName()).setPurcInvoNo(supplyItemDetailDto.getInvoiceNo()) - .setManuDate(supplyItemDetailDto.getStartTime()).setExpyEnd(supplyItemDetailDto.getEndTime()) - .setPurcRetnCnt(supplyItemDetailDto.getItemQuantity()).setPurcRetnStoinTime(now) - .setPurcRetnOpterName(supplyItemDetailDto.getPractitionerName()); - if (YbRxFlag.IMPORTANT_HERBAL_SLICES.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalPurchase3504Param.setRxFlag(YbRxFlag.IMPORTANT_HERBAL_SLICES.getName()); - } else if (YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalPurchase3504Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } else if (YbRxFlag.SELF_PREPARED_MEDICATION.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalPurchase3504Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } - return medicalPurchase3504Param; - } - - private Medical3503Param getMedical3503Param(SupplyItemDetailDto supplyItemDetailDto, Date now) { - Medical3503Param medical3503Param = new Medical3503Param(); - medical3503Param.setMedListCodg(supplyItemDetailDto.getYbNo()) - .setFixmedinsBchno(supplyItemDetailDto.getLotNumber()) - .setFixmedinsHilistId(supplyItemDetailDto.getItemBusNo()) - .setFixmedinsHilistName(supplyItemDetailDto.getItemTable()) - .setSplerName(supplyItemDetailDto.getSupplierName()).setManuLotnum(supplyItemDetailDto.getLotNumber()) - .setProdentpName(supplyItemDetailDto.getManufacturerText()) - .setAprvno(supplyItemDetailDto.getApprovalNumber()).setManuDate(supplyItemDetailDto.getStartTime()) - .setExpyEnd(supplyItemDetailDto.getEndTime()).setPurcRetnCnt(supplyItemDetailDto.getItemQuantity()) - .setPurcRetnStoinTime(now).setPurcRetnOpterName(supplyItemDetailDto.getPractitionerName()); - if (YbRxFlag.IMPORTANT_HERBAL_SLICES.getCode() == supplyItemDetailDto.getRxFlag()) { - medical3503Param.setRxFlag(YbRxFlag.IMPORTANT_HERBAL_SLICES.getName()); - } else if (YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getCode() == supplyItemDetailDto.getRxFlag()) { - medical3503Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } else if (YbRxFlag.SELF_PREPARED_MEDICATION.getCode() == supplyItemDetailDto.getRxFlag()) { - medical3503Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } - - return medical3503Param; - } - - private MedicalInventory3502Param getMedicalInventory3502Param(SupplyItemDetailDto supplyItemDetailDto, Date now, - String ybInvChgType) { - MedicalInventory3502Param medicalInventory3502Param = new MedicalInventory3502Param(); - // 查库存信息 - List inventoryItemList = - inventoryItemService.selectInventoryByItemId(supplyItemDetailDto.getItemId(), - supplyItemDetailDto.getLotNumber(), null, SecurityUtils.getLoginUser().getTenantId()); - // 查询商品价格信息 - List itemChargeDetailList = - receiptApprovalAppService.getItemChargeDetail(List.of(supplyItemDetailDto.getItemId())); - if (!inventoryItemList.isEmpty() && !itemChargeDetailList.isEmpty()) { - // 获取该项目所有的数量(最小单位) - BigDecimal totalQuantity = inventoryItemList.stream() - .map(item -> item.getQuantity() != null ? item.getQuantity() : BigDecimal.ZERO) - .reduce(BigDecimal.ZERO, BigDecimal::add); - // 最小单位售卖价格 - BigDecimal minPrice = BigDecimal.ZERO; - Optional price = itemChargeDetailList.stream() - .filter(x -> x.getConditionValue().equals(supplyItemDetailDto.getLotNumber())) - .map(ItemChargeDetailDto::getSellPrice).findFirst(); - if (price.isPresent()) { - if (supplyItemDetailDto.getPartPercent().compareTo(BigDecimal.ZERO) > 0) { - minPrice = price.get().divide(supplyItemDetailDto.getPartPercent(), RoundingMode.HALF_UP); - } - } - // 转换为JSON - ArrayNode medicalTraceNo = new tools.jackson.databind.ObjectMapper().createArrayNode(); - // 获取追溯码信息 - if (supplyItemDetailDto.getTraceNo() != null) { - List traceNoList = - Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA)) - .map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList()); - for (String traceNo : traceNoList) { - ObjectNode traceNoMap = new tools.jackson.databind.ObjectMapper().createObjectNode(); - traceNoMap.put("drug_trac_codg", traceNo); - medicalTraceNo.add(traceNoMap); - } - } - medicalInventory3502Param.setMedListCodg(supplyItemDetailDto.getYbNo()).setInvChgType(ybInvChgType) - .setFixmedinsHilistId(supplyItemDetailDto.getItemBusNo()) - .setFixmedinsHilistName(supplyItemDetailDto.getItemTable()) - .setFixmedinsBchno(supplyItemDetailDto.getLotNumber()).setPric(minPrice).setCnt(totalQuantity) - .setInvChgTime(now).setDrugtracinfo(medicalTraceNo); - if (YbRxFlag.IMPORTANT_HERBAL_SLICES.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalInventory3502Param.setRxFlag(YbRxFlag.IMPORTANT_HERBAL_SLICES.getName()); - } else if (YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalInventory3502Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } else if (YbRxFlag.SELF_PREPARED_MEDICATION.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalInventory3502Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } - } - return medicalInventory3502Param; - } - - private MedicalInventory3501Param getMedicalInventory3501Param(SupplyItemDetailDto supplyItemDetailDto, Date date) { - MedicalInventory3501Param medicalInventory3501Param = new MedicalInventory3501Param(); - // 查库存信息 - List inventoryItemList = - inventoryItemService.selectInventoryByItemId(supplyItemDetailDto.getItemId(), - supplyItemDetailDto.getLotNumber(), null, SecurityUtils.getLoginUser().getTenantId()); - if (!inventoryItemList.isEmpty()) { - // 获取该项目所有的数量(最小单位) - BigDecimal totalQuantity = inventoryItemList.stream() - .map(item -> item.getQuantity() != null ? item.getQuantity() : BigDecimal.ZERO) - .reduce(BigDecimal.ZERO, BigDecimal::add); - medicalInventory3501Param.setMedListCodg(supplyItemDetailDto.getYbNo()) - .setFixmedinsHilistId(supplyItemDetailDto.getItemBusNo()) - .setFixmedinsHilistName(supplyItemDetailDto.getItemTable()).setInvdate(date).setInvCnt(totalQuantity) - .setFixmedinsBchno(supplyItemDetailDto.getLotNumber()).setManuDate(supplyItemDetailDto.getStartTime()) - .setExpyEnd(supplyItemDetailDto.getEndTime()); - if (YbRxFlag.IMPORTANT_HERBAL_SLICES.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalInventory3501Param.setRxFlag(YbRxFlag.IMPORTANT_HERBAL_SLICES.getName()); - } else if (YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalInventory3501Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } else if (YbRxFlag.SELF_PREPARED_MEDICATION.getCode() == supplyItemDetailDto.getRxFlag()) { - medicalInventory3501Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName()); - } - } - return medicalInventory3501Param; - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryRequisitionOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryRequisitionOrderServiceImpl.java deleted file mode 100755 index 3152a8f56..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryRequisitionOrderServiceImpl.java +++ /dev/null @@ -1,163 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryRequisitionOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房请领单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryRequisitionOrderServiceImpl implements IPharmacyDispensaryRequisitionOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - - @Resource - private ISupplyRequestService supplyRequestService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto requisitionOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); - // supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), - // SupplyCategory.NORMAL.getInfo())); - // supplyCategoryOption.add(new - // PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.PURCHASE_APPLICATION.getValue(), - // SupplyCategory.PURCHASE_APPLICATION.getInfo())); - - requisitionOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(requisitionOrderInitDto); - } - - /** - * 请领单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 请领单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page requisitionOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - requisitionOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : requisitionOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - - return R.ok(requisitionOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_REQUISITION.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑请领单 - * - * @param requisitionOrderDtoList 请领信息 - * @return 操作结果 - */ - - @Override - public R addOrEditRequisitionOrder(List requisitionOrderDtoList) { - // 请求数据取得 - List requestList = - supplyRequestService.getSupplyByBusNo(requisitionOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - - List supplyRequestList = new ArrayList<>(); - for (PharmacyDispensaryDetailDto item : requisitionOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_REQUISITION.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()).setCategoryEnum(item.getCategoryEnum()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()) - .setRetailPrice(item.getRetailPrice()).setTotalRetailPrice(item.getTotalRetailPrice()) - .setSpecificationInventory(item.getSpecificationInventory()).setSupplierId(item.getSupplierId()) - .setReason(item.getReason()).setSourceTypeEnum(LocationForm.CABINET.getValue()) - .setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.PHARMACY.getValue()) - .setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId()) - .setApplyTime(item.getApplyTime()).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryReturnToWarehouseOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryReturnToWarehouseOrderServiceImpl.java deleted file mode 100755 index 9e1aa7a70..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryReturnToWarehouseOrderServiceImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReturnToWarehouseOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房退库单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryReturnToWarehouseOrderServiceImpl - implements IPharmacyDispensaryReturnToWarehouseOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - - @Resource - private ISupplyRequestService supplyRequestService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); - // supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), - // SupplyCategory.NORMAL.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 退库单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 退库单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page returnToDispensaryOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - returnToDispensaryOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : returnToDispensaryOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - return R.ok(returnToDispensaryOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_RETURN.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑退库单 - * - * @param returnToDispensaryOrderDtoList 退库信息 - * @return 操作结果 - */ - - @Override - public R addOrEditReturnToWarehouseOrder(List returnToDispensaryOrderDtoList) { - // 请求数据取得 - List requestList = - supplyRequestService.getSupplyByBusNo(returnToDispensaryOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - - List supplyRequestList = new ArrayList<>(); - Date applyTime = DateUtils.getNowDate(); - for (PharmacyDispensaryDetailDto item : returnToDispensaryOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_RETURN.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()).setCategoryEnum(item.getCategoryEnum()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()) - .setRetailPrice(item.getRetailPrice()).setTotalRetailPrice(item.getTotalRetailPrice()) - .setStartTime(item.getStartTime()).setEndTime(item.getEndTime()).setLotNumber(item.getLotNumber()) - .setTraceNo(item.getTraceNo()).setTraceNoUnitCode(item.getTraceNoUnitCode()) - .setSupplierId(item.getSupplierId()).setReason(item.getReason()) - .setSourceTypeEnum(LocationForm.PHARMACY.getValue()).setSourceLocationId(item.getSourceLocationId()) - .setPurposeTypeEnum(LocationForm.CABINET.getValue()).setPurposeLocationId(item.getPurposeLocationId()) - .setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStockInOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStockInOrderServiceImpl.java deleted file mode 100755 index e3c525e36..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStockInOrderServiceImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryStockInOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房入库单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryStockInOrderServiceImpl implements IPharmacyDispensaryStockInOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - - @Resource - private ISupplyRequestService supplyRequestService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); -// supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), -// SupplyCategory.NORMAL.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 入库单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 入库单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page stockInOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - stockInOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : stockInOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - return R.ok(stockInOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_STOCKIN.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑入库单 - * - * @param stockInOrderDtoList 入库信息 - * @return 操作结果 - */ - - @Override - public R addOrEditStockInOrder(List stockInOrderDtoList) { - // 请求数据取得 - List requestList = supplyRequestService.getSupplyByBusNo(stockInOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - //添加原始单据号 - if(stockInOrderDtoList.get(0).getOriginalBusNo()!=null){ - // 审批单据并返回单据详情 - List agreedList = supplyRequestService.addOriginalBusNo(stockInOrderDtoList.get(0).getOriginalBusNo(), stockInOrderDtoList.get(0).getBusNo()); - if (agreedList.isEmpty()) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); - } - } - - List supplyRequestList = new ArrayList<>(); - Date applyTime = DateUtils.getNowDate(); - for (PharmacyDispensaryDetailDto item : stockInOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_STOCKIN.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()).setCategoryEnum(item.getCategoryEnum()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()) - .setRetailPrice(item.getRetailPrice()).setTotalRetailPrice(item.getTotalRetailPrice()) - .setStartTime(item.getStartTime()).setEndTime(item.getEndTime()).setLotNumber(item.getLotNumber()) - .setTraceNo(item.getTraceNo()).setTraceNoUnitCode(item.getTraceNoUnitCode()) - .setSupplierId(item.getSupplierId()).setReason(item.getReason()) - .setSourceTypeEnum(LocationForm.CABINET.getValue()).setSourceLocationId(item.getSourceLocationId()) - .setPurposeTypeEnum(LocationForm.PHARMACY.getValue()).setPurposeLocationId(item.getPurposeLocationId()) - .setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStocktakingOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStocktakingOrderServiceImpl.java deleted file mode 100755 index 90e6e53a6..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStocktakingOrderServiceImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryStocktakingOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房盘点单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryStocktakingOrderServiceImpl implements IPharmacyDispensaryStocktakingOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - - @Resource - private ISupplyRequestService supplyRequestService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); -// supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption( -// SupplyCategory.GENERAL_STOCKTAKING.getValue(), SupplyCategory.GENERAL_STOCKTAKING.getInfo())); -// supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption( -// SupplyCategory.MONTHLY_STOCKTAKING.getValue(), SupplyCategory.MONTHLY_STOCKTAKING.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 盘点单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 盘点单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page stocktakingOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - stocktakingOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : stocktakingOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - return R.ok(stocktakingOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_STOCKTAKING.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑盘点单 - * - * @param stocktakingOrderDtoList 盘点信息 - * @return 操作结果 - */ - - @Override - public R addOrEditStocktakingOrder(List stocktakingOrderDtoList) { - // 请求数据取得 - List requestList = - supplyRequestService.getSupplyByBusNo(stocktakingOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - - List supplyRequestList = new ArrayList<>(); - Date applyTime = DateUtils.getNowDate(); - for (PharmacyDispensaryDetailDto item : stocktakingOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_STOCKTAKING.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()).setCategoryEnum(item.getCategoryEnum()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()) - .setTotalQuantity(item.getTotalQuantity()).setPrice(item.getPrice()).setTotalPrice(item.getTotalPrice()) - .setRetailPrice(item.getRetailPrice()).setTotalRetailPrice(item.getTotalRetailPrice()) - .setBatchInventory(item.getBatchInventory()).setLotNumber(item.getLotNumber()) - .setTraceNo(item.getTraceNo()).setTraceNoUnitCode(item.getTraceNoUnitCode()) - .setReasonCode(item.getReasonCode()).setReason(item.getReason()) - .setPurposeTypeEnum(LocationForm.PHARMACY.getValue()).setPurposeLocationId(item.getPurposeLocationId()) - .setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferInOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferInOrderServiceImpl.java deleted file mode 100755 index be5a38b5f..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferInOrderServiceImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryTransferInOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房调入单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryTransferInOrderServiceImpl implements IPharmacyDispensaryTransferInOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - - @Resource - private ISupplyRequestService supplyRequestService; - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); - // supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), - // SupplyCategory.NORMAL.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 调入单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 调入单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page transferInOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - transferInOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : transferInOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - - return R.ok(transferInOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_TRANSFERIN.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑采购单 - * - * @param transferInOrderDtoList 采购信息 - * @return 操作结果 - */ - - @Override - public R addOrEditTransferInOrder(List transferInOrderDtoList) { - // 请求数据取得 - List requestList = - supplyRequestService.getSupplyByBusNo(transferInOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - - List supplyRequestList = new ArrayList<>(); - Date applyTime = DateUtils.getNowDate(); - for (PharmacyDispensaryDetailDto item : transferInOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_TRANSFERIN.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()).setRetailPrice(item.getPrice()) - .setTotalRetailPrice(item.getTotalPrice()).setBatchInventory(item.getBatchInventory()) - .setSpecificationInventory(item.getSpecificationInventory()).setEndTime(item.getEndTime()) - .setLotNumber(item.getLotNumber()).setTraceNo(item.getTraceNo()) - .setTraceNoUnitCode(item.getTraceNoUnitCode()).setSupplierId(item.getSupplierId()) - .setReason(item.getReason()).setSourceTypeEnum(LocationForm.PHARMACY.getValue()) - .setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.PHARMACY.getValue()) - .setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId()) - .setApplyTime(applyTime).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferOutOrderServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferOutOrderServiceImpl.java deleted file mode 100755 index ab1cad53d..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferOutOrderServiceImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.core.common.core.domain.R; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.DateUtils; -import com.core.common.utils.MessageUtils; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.PromptMsgConstant; -import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.utils.EnumUtils; -import com.healthlink.his.web.inventorymanage.dto.ProductStocktakingInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryTransferOutOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto; -import com.healthlink.his.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryCommonMapper; -import com.healthlink.his.workflow.domain.SupplyRequest; -import com.healthlink.his.workflow.service.ISupplyRequestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import jakarta.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 药房调出单 - * - * @author yuxj - * @date 2025-07-22 - */ -@Service -public class PharmacyDispensaryTransferOutOrderServiceImpl implements IPharmacyDispensaryTransferOutOrderService { - - @Resource - private AssignSeqUtil assignSeqUtil; - @Resource - private ISupplyRequestService supplyRequestService; - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private PharmacyDispensaryCommonMapper pharmacyDispensaryCommonMapper; - - /** - * 初始化 - * - * @return 初始化信息 - */ - @Override - public R init() { - - PharmacyDispensaryInitDto purchaseOrderInitDto = pharmacyDispensaryCommonService.init(); - - // 单据分类 - List supplyCategoryOption = new ArrayList<>(); -// supplyCategoryOption.add(new PharmacyDispensaryInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), -// SupplyCategory.NORMAL.getInfo())); - - purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); - - return R.ok(purchaseOrderInitDto); - } - - /** - * 调出单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 调出单单据详情 - */ - @Override - public R getDetailPage(String busNo, Integer pageNo, Integer pageSize) { - - Page transferOutOrderDtoDetailPage = - pharmacyDispensaryCommonMapper.getDetailPage(new Page<>(pageNo, pageSize), busNo); - - transferOutOrderDtoDetailPage.getRecords().forEach(e -> { - // 单据分类 - e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyCategory.class, e.getCategoryEnum())); - // 单据状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum())); - // 单据类型 - e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getTypeEnum())); - }); - - List unitList; - for (PharmacyDispensaryDetailDto item : transferOutOrderDtoDetailPage.getRecords()) { - unitList = new ArrayList<>(); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText())); - unitList.add(new PharmacyDispensaryDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText())); - - item.setUnitList(unitList); - } - - return R.ok(transferOutOrderDtoDetailPage); - } - - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @Override - public R getBusNo() { - - ProductStocktakingInitDto initDto = new ProductStocktakingInitDto(); - // 单据号 - initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_TRANSFEROUT.getPrefix(), 4)); - - return R.ok(initDto); - } - - /** - * 添加/编辑采购单 - * - * @param transferOutOrderDtoList 采购信息 - * @return 操作结果 - */ - - @Override - public R addOrEditTransferOutOrder(List transferOutOrderDtoList) { - // 请求数据取得 - List requestList = supplyRequestService.getSupplyByBusNo(transferOutOrderDtoList.get(0).getBusNo()); - if (!requestList.isEmpty()) { - // 请求id取得 - List requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList()); - // 单据信息删除 - supplyRequestService.removeByIds(requestIdList); - } - - List supplyRequestList = new ArrayList<>(); - Date applyTime = DateUtils.getNowDate(); - for (PharmacyDispensaryDetailDto item : transferOutOrderDtoList) { - SupplyRequest supplyRequest = new SupplyRequest().setBusNo(item.getBusNo()) - .setTypeEnum(SupplyType.PURCHASE_TRANSFEROUT.getValue()) - .setStatusEnum(SupplyStatus.PENDING_REVIEW.getValue()) - .setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setItemId(item.getItemId()) - .setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity()).setRetailPrice(item.getPrice()) - .setTotalRetailPrice(item.getTotalPrice()).setBatchInventory(item.getBatchInventory()) - .setSpecificationInventory(item.getSpecificationInventory()).setEndTime(item.getEndTime()) - .setLotNumber(item.getLotNumber()).setTraceNo(item.getTraceNo()) - .setTraceNoUnitCode(item.getTraceNoUnitCode()).setSupplierId(item.getSupplierId()) - .setReason(item.getReason()).setSourceTypeEnum(LocationForm.PHARMACY.getValue()) - .setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.PHARMACY.getValue()) - .setPurposeLocationId(item.getPurposeLocationId()) - .setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake()); - supplyRequestList.add(supplyRequest); - } - // 更新请求表 - boolean flg = supplyRequestService.saveOrUpdateBatch(supplyRequestList); - if (!flg) { - return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00011, null)); - } - - return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null)); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryDispensingOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryDispensingOrderController.java deleted file mode 100755 index 8293cf431..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryDispensingOrderController.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryDispensingOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * 药房发药单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/dispensing-order") -@Slf4j -public class PharmacyDispensaryDispensingOrderController { - - @Autowired - private IPharmacyDispensaryDispensingOrderService pharmacyDispensaryDispensingOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - /** - * 发药单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryDispensingOrderService.init(); - } - - /** - * 发药单单据列表 - * - * @param dispensingOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 发药单据分页列表 - */ - @GetMapping(value = "/dispensing-order-page") - public R getPage(PharmacyDispensarySearchParam dispensingOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(dispensingOrderSearchParam, pageNo, pageSize, searchKey, request, - "1", SupplyType.DISPENSING_ORDER.getValue()); - } - /** - * 发药单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 发药单单据详情 - */ - @GetMapping(value = "/dispensing-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryDispensingOrderService.getDetailPage(busNo, pageNo, pageSize); - } -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryProfitLossOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryProfitLossOrderController.java deleted file mode 100755 index 2d4e8bc3b..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryProfitLossOrderController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryProfitLossOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房损益单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/profitLoss-order") -@Slf4j -public class PharmacyDispensaryProfitLossOrderController { - - @Autowired - private IPharmacyDispensaryProfitLossOrderService pharmacyDispensaryProfitLossOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - /** - * 损益单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryProfitLossOrderService.init(); - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(purchaseOrderSearchParam, pageNo, pageSize, searchKey, request); - } - - /** - * 损益单单据列表 - * - * @param profitLossOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 损益单据分页列表 - */ - @GetMapping(value = "/profitLoss-order-page") - public R getPage(PharmacyDispensarySearchParam profitLossOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(profitLossOrderSearchParam, pageNo, pageSize, searchKey, request, - null, SupplyType.PURCHASE_PRPFITLOSS.getValue()); - } - /** - * 损益单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 损益单单据详情 - */ - @GetMapping(value = "/profitLoss-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryProfitLossOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryProfitLossOrderService.getBusNo(); - } - - /** - * 添加/编辑损益单 - * - * @param profitLossOrderDtoList 损益信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-profitLossOrder") - public R addOrEditProfitLossOrder(@Validated @RequestBody List profitLossOrderDtoList) { - return pharmacyDispensaryProfitLossOrderService.addOrEditProfitLossOrder(profitLossOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-profitLossOrder") - public R deleteProfitLossOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.profitLossAgreeApproved(busNo); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryRequisitionOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryRequisitionOrderController.java deleted file mode 100755 index ddd6faa8a..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryRequisitionOrderController.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryRequisitionOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房请领单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/requisition-order") -@Slf4j -public class PharmacyDispensaryRequisitionOrderController { - - @Autowired - private IPharmacyDispensaryRequisitionOrderService pharmacyDispensaryRequisitionOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - /** - * 请领单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryRequisitionOrderService.init(); - } - - /** - * 获取药品 - * - * @param requisitionOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam requisitionOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(requisitionOrderSearchParam, pageNo, pageSize, searchKey, request); - } - - /** - * 请领单单据列表 - * - * @param requisitionOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 请领单据分页列表 - */ - @GetMapping(value = "/requisition-order-page") - public R getPage(PharmacyDispensarySearchParam requisitionOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(requisitionOrderSearchParam, pageNo, pageSize, searchKey, request, - null, SupplyType.PURCHASE_REQUISITION.getValue()); - } - /** - * 请领单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 请领单单据详情 - */ - @GetMapping(value = "/requisition-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryRequisitionOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryRequisitionOrderService.getBusNo(); - } - - /** - * 添加/编辑采购单 - * - * @param requisitionOrderDtoList 采购信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-requisitionOrder") - public R addOrEditRequisitionOrder(@Validated @RequestBody List requisitionOrderDtoList) { - return pharmacyDispensaryRequisitionOrderService.addOrEditRequisitionOrder(requisitionOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-requisitionOrder") - public R deleteRequisitionOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.requisitionOrderAgreeApproval(busNo); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryReturnToWarehouseOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryReturnToWarehouseOrderController.java deleted file mode 100755 index cc93c80d3..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryReturnToWarehouseOrderController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReturnToWarehouseOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房退库单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/returnToWarehouse-order") -@Slf4j -public class PharmacyDispensaryReturnToWarehouseOrderController { - - @Autowired - private IPharmacyDispensaryReturnToWarehouseOrderService pharmacyDispensaryReturnToWarehouseOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - /** - * 退库单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryReturnToWarehouseOrderService.init(); - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(purchaseOrderSearchParam, pageNo, pageSize, searchKey, request); - } - - /** - * 退库单单据列表 - * - * @param returnToDispensaryOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 退库单据分页列表 - */ - @GetMapping(value = "/returnToDispensary-order-page") - public R getPage(PharmacyDispensarySearchParam returnToDispensaryOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(returnToDispensaryOrderSearchParam, pageNo, pageSize, searchKey, request, - "1", SupplyType.PURCHASE_RETURN.getValue()); - } - /** - * 退库单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 退库单单据详情 - */ - @GetMapping(value = "/returnToDispensary-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryReturnToWarehouseOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryReturnToWarehouseOrderService.getBusNo(); - } - - /** - * 添加/编辑退库单 - * - * @param returnToDispensaryOrderDtoList 退库信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-returnToDispensaryOrder") - public R addOrEditReturnToDispensaryOrder(@Validated @RequestBody List returnToDispensaryOrderDtoList) { - return pharmacyDispensaryReturnToWarehouseOrderService.addOrEditReturnToWarehouseOrder(returnToDispensaryOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-returnToDispensaryOrder") - public R deleteReturnToDispensaryOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.returnToWarehouseAgreeApproved(busNo); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryStockInOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryStockInOrderController.java deleted file mode 100755 index 8633def99..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryStockInOrderController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryStockInOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房入库单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/stockIn-order") -@Slf4j -public class PharmacyDispensaryStockInOrderController { - - @Autowired - private IPharmacyDispensaryStockInOrderService pharmacyDispensaryStockInOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - /** - * 入库单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryStockInOrderService.init(); - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(purchaseOrderSearchParam, pageNo, pageSize, searchKey, request); - } - - /** - * 入库单单据列表 - * - * @param stockInOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 入库单据分页列表 - */ - @GetMapping(value = "/stockIn-order-page") - public R getPage(PharmacyDispensarySearchParam stockInOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(stockInOrderSearchParam, pageNo, pageSize, searchKey, request, - null, SupplyType.PURCHASE_STOCKIN.getValue()); - } - /** - * 入库单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 入库单单据详情 - */ - @GetMapping(value = "/stockIn-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryStockInOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryStockInOrderService.getBusNo(); - } - - /** - * 添加/编辑入库单 - * - * @param stockInOrderDtoList 入库信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-stockInOrder") - public R addOrEditStockInOrder(@Validated @RequestBody List stockInOrderDtoList) { - return pharmacyDispensaryStockInOrderService.addOrEditStockInOrder(stockInOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-stockInOrder") - public R deleteStockInOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.stockInOrderAgreeApproved(busNo); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryStocktakingOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryStocktakingOrderController.java deleted file mode 100755 index 43e826877..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryStocktakingOrderController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryStocktakingOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房盘点单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/stocktaking-order") -@Slf4j -public class PharmacyDispensaryStocktakingOrderController { - - @Autowired - private IPharmacyDispensaryStocktakingOrderService pharmacyDispensaryStocktakingOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - /** - * 盘点单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryStocktakingOrderService.init(); - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(purchaseOrderSearchParam, pageNo, pageSize, searchKey, request); - } - - /** - * 盘点单单据列表 - * - * @param stocktakingOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 盘点单据分页列表 - */ - @GetMapping(value = "/stocktaking-order-page") - public R getPage(PharmacyDispensarySearchParam stocktakingOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(stocktakingOrderSearchParam, pageNo, pageSize, searchKey, request, - null, SupplyType.PURCHASE_STOCKTAKING.getValue()); - } - /** - * 盘点单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 盘点单单据详情 - */ - @GetMapping(value = "/stocktaking-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryStocktakingOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryStocktakingOrderService.getBusNo(); - } - - /** - * 添加/编辑盘点单 - * - * @param stocktakingOrderDtoList 盘点信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-stocktakingOrder") - public R addOrEditStocktakingOrder(@Validated @RequestBody List stocktakingOrderDtoList) { - return pharmacyDispensaryStocktakingOrderService.addOrEditStocktakingOrder(stocktakingOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-stocktakingOrder") - public R deleteStocktakingOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.stocktakingAgreepproved(busNo); - } - -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryTransferInOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryTransferInOrderController.java deleted file mode 100755 index a6691b0f3..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryTransferInOrderController.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryTransferInOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房调入单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/transferIn-order") -@Slf4j -public class PharmacyDispensaryTransferInOrderController { - - @Autowired - private IPharmacyDispensaryTransferInOrderService pharmacyDispensaryTransferInOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - - /** - * 调入单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryTransferInOrderService.init(); - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(purchaseOrderSearchParam, pageNo, pageSize, searchKey, request); - } - /** - * 调入单单据列表 - * - * @param transferInOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 调入单据分页列表 - */ - @GetMapping(value = "/transferIn-order-page") - public R getPage(PharmacyDispensarySearchParam transferInOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(transferInOrderSearchParam, pageNo, pageSize, searchKey, request, - null, SupplyType.PURCHASE_TRANSFERIN.getValue()); - } - - /** - * 调入单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 调入单单据详情 - */ - @GetMapping(value = "/transferIn-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryTransferInOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryTransferInOrderService.getBusNo(); - } - - /** - * 添加/编辑采购单 - * - * @param transferInOrderDtoList 采购信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-transferInOrder") - public R addOrEditTransferInOrder(@Validated @RequestBody List transferInOrderDtoList) { - return pharmacyDispensaryTransferInOrderService.addOrEditTransferInOrder(transferInOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-transferInOrder") - public R deleteTransferInOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.transferInAgreeApproved(busNo); - } -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryTransferOutOrderController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryTransferOutOrderController.java deleted file mode 100755 index 0a99e9d79..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/controller/PharmacyDispensaryTransferOutOrderController.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.healthlink.his.web.pharmacyDispensarymanage.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.common.enums.SupplyType; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryCommonService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryReceiptApprovalService; -import com.healthlink.his.web.pharmacyDispensarymanage.appservice.IPharmacyDispensaryTransferOutOrderService; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto; -import com.healthlink.his.web.pharmacyDispensarymanage.dto.PharmacyDispensarySearchParam; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * 药房调出单 - * - * @author yuxj - * @date 2025-07-22 - */ -@RestController -@RequestMapping("/pharmacy-dispensary/transferOut-order") -@Slf4j -public class PharmacyDispensaryTransferOutOrderController { - - @Autowired - private IPharmacyDispensaryTransferOutOrderService pharmacyDispensaryTransferOutOrderService; - - @Autowired - private IPharmacyDispensaryCommonService pharmacyDispensaryCommonService; - - @Autowired - private IPharmacyDispensaryReceiptApprovalService pharmacyDispensaryReceiptApprovalService; - - /** - * 调出单初始化 - * - * @return 初始化信息 - */ - @GetMapping(value = "/init") - public R init() { - return pharmacyDispensaryTransferOutOrderService.init(); - } - - /** - * 获取药品 - * - * @param purchaseOrderSearchParam 查询条件 - * @return 药品信息 - */ - @GetMapping(value = "/medication-info") - public R getMedicationInfo(PharmacyDispensarySearchParam purchaseOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getMedicationInfo(purchaseOrderSearchParam, pageNo, pageSize, searchKey, request); - } - /** - * 调出单单据列表 - * - * @param transferOutOrderSearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param searchKey 模糊查询关键字 - * @param request 请求数据 - * @return 调出单据分页列表 - */ - @GetMapping(value = "/transferOut-order-page") - public R getPage(PharmacyDispensarySearchParam transferOutOrderSearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { - return pharmacyDispensaryCommonService.getPage(transferOutOrderSearchParam, pageNo, pageSize, searchKey, request, - "1", SupplyType.PURCHASE_TRANSFEROUT.getValue()); - } - - /** - * 调出单单据详情 - * - * @param busNo 单据号 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @return 调出单单据详情 - */ - @GetMapping(value = "/transferOut-order-detail-page") - public R getDetail(@RequestParam String busNo, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - return pharmacyDispensaryTransferOutOrderService.getDetailPage(busNo, pageNo, pageSize); - } - /** - * 获取单据号 - * - * @return 初始化信息 - */ - @GetMapping(value = "/busNo-init") - public R getBusNo() { - return pharmacyDispensaryTransferOutOrderService.getBusNo(); - } - - /** - * 添加/编辑采购单 - * - * @param transferOutOrderDtoList 采购信息 - * @return 操作结果 - */ - @PutMapping("/addOrEdit-transferOutOrder") - public R addOrEditTransferOutOrder(@Validated @RequestBody List transferOutOrderDtoList) { - return pharmacyDispensaryTransferOutOrderService.addOrEditTransferOutOrder(transferOutOrderDtoList); - } - - /** - * 删除单据 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @DeleteMapping("/delete-transferOutOrder") - public R deleteTransferOutOrder(@RequestParam String busNo) { - return pharmacyDispensaryCommonService.deleteOrder(busNo); - } - - /** - * 同意审批 - * - * @param busNo 单据号 - * @return 操作结果 - */ - @PutMapping("/agree-approval") - public R agreeApproval(@RequestParam String busNo) { - return pharmacyDispensaryReceiptApprovalService.transferOutAgreeApproved(busNo); - } -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/dto/PharmacyDispensaryDetailDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/dto/PharmacyDispensaryDetailDto.java deleted file mode 100755 index d04436ad5..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacyDispensarymanage/dto/PharmacyDispensaryDetailDto.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.web.pharmacyDispensarymanage.dto; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonFormat; -import tools.jackson.databind.annotation.JsonSerialize; -import tools.jackson.databind.ser.std.ToStringSerializer; -import com.healthlink.his.common.annotation.Dict; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; - -/** - * 订购单信息 - * - * @author yuxj - * @date 2025-07-22 - */ -@Data -@Accessors(chain = true) -public class PharmacyDispensaryDetailDto implements Serializable { - - /** ID */ - @TableId(type = IdType.ASSIGN_ID) - @JsonSerialize(using = ToStringSerializer.class) - private Long id; - - /** 单据号 */ - private String busNo; - /** 再生成单据号 */ - private String originalBusNo; - - /** 药品编码 */ - private String itemBusNo; - - /** 物品id */ - @JsonSerialize(using = ToStringSerializer.class) - private Long itemId; - - /** 物品名称 */ - private String itemName; - - /** 规格 */ - private String totalVolume; - - /** 选择单位 */ - @Dict(dictCode = "unit_code") - private String unitCode; - private String unitCode_dictText; - - /** 常规单位 */ - @Dict(dictCode = "unit_code") - private String maxUnitCode; - private String maxUnitCode_dictText; - - /** 最小单位 */ - @Dict(dictCode = "unit_code") - private String minUnitCode; - private String minUnitCode_dictText; - - /** 拆零比 */ - private String partPercent; - - /** 数量 */ - private BigDecimal itemQuantity; - - /** 合计数量 */ - private BigDecimal totalQuantity; - - /** 单价 */ - private BigDecimal price; - - /** 总价 */ - private BigDecimal totalPrice; - - /** 零售价 */ - private BigDecimal retailPrice; - - /** 零价金额 */ - private BigDecimal totalRetailPrice; - - /** 厂家/产地 */ - private String manufacturerText; - - /** 批准文号 */ - private String approvalNumber; - - /** 批次库存 */ - private BigDecimal batchInventory; - /** 规格库存 */ - private BigDecimal specificationInventory; - - /** 备注 */ - private String remake; - - /** 理由类型 */ - private String reasonCode; - - /** 摘要(理由) */ - private String reason; - - /** 供应商 */ - @JsonSerialize(using = ToStringSerializer.class) - @Dict(dictCode = "id", dictText = "name", dictTable = "adm_supplier") - private Long supplierId; - private String supplierId_dictText; - - /** 源仓库类型 */ - private Integer sourceTypeEnum; - /** 源仓库 */ - @JsonSerialize(using = ToStringSerializer.class) - private Long sourceLocationId; - - /** 目的仓库类型 */ - private Integer purposeTypeEnum; - /** 目的仓库 */ - @JsonSerialize(using = ToStringSerializer.class) - private Long purposeLocationId; - - /** 采购员 */ - @JsonSerialize(using = ToStringSerializer.class) - private Long applicantId; - - /** 审批人 */ - @JsonSerialize(using = ToStringSerializer.class) - private Long approverId; - /** 审批时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date approvalTime; - - /** 申请时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date applyTime; - - /** 状态 */ - private Integer statusEnum; - private String statusEnum_enumText; - - /** 类型 */ - private Integer typeEnum; - private String typeEnum_enumText; - - /** 单据分类 */ - private Integer categoryEnum; - private String categoryEnum_enumText; - - /** 供应商联系人 */ - private String phone; - - /** 仓库员 */ - @JsonSerialize(using = ToStringSerializer.class) - private Long practitionerId; - - /** 发票号 */ - private String invoiceNo; - - /** 产品批号 */ - private String lotNumber; - - /** 生产日期 */ - private Date startTime; - - /** 失效日期 */ - private Date endTime; - - /** 追溯码*/ - private String traceNo; - - /** 追溯码单位 */ - @Dict(dictCode = "unit_code") - private String traceNoUnitCode; - private String traceNoUnitCode_dictText; - - /** 包装情况 */ - private Integer packagingConditionEnum; - private String packagingConditionEnum_enumText; - - /** 验收结果 */ - private Integer acceptanceResultEnum; - private String acceptanceResultEnum_enumText; - - /** 禁用日期 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date occurrenceTime; - - /** 药品发放id */ - private String dispenseIds; - - /** - * 单位列表 - */ - private List - + com.core - core-admin + core-framework com.core diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocDefinitionEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocDefinitionEnum.java deleted file mode 100755 index 3094493fa..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocDefinitionEnum.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.healthlink.his.common.enums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 来源(Source)类型 - * - * @author swb - * @date 2025-11-26 - */ -@Getter -@AllArgsConstructor -public enum DocDefinitionEnum{ - ADMISSION_VITAL_SIGNS("1", "ADMISSION_VITAL_SIGNS", "入院体征"), - TEMPERATURE("4", "TEMPERATURE", "体温单"), - NURSING_RECORD("3", "NURSING_RECORD", "护理记录"); - - @EnumValue - private final String value; - private final String code; - private final String info; - - public static String getInfoByValue(String value){ - for(DocDefinitionEnum definition : DocDefinitionEnum.values()){ - if(definition.getValue().equals(value)){ - return definition.getInfo(); - } - } - return ""; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocPermissionEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocPermissionEnum.java deleted file mode 100755 index b7aec7f04..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocPermissionEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 文书权限枚举类 一级菜单 - * - * @author zxy - * @date 2025-02-24 - */ -@Getter -@AllArgsConstructor -public enum DocPermissionEnum implements HisEnumInterface { - - /** - * 不限制 - */ - NO_LIMIT(0, "NO_LIMIT", "不限制"), - - /** - * 编辑 - */ - EDIT(1, "EDIT", "编辑"), - - /** - * 查看 - */ - VIEW(2, "VIEW", "查看"); - - - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static DocPermissionEnum getByValue(Integer value) { - if (value == null) { - return null; - } - for (DocPermissionEnum val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocStatisticsDefinitionTypeEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocStatisticsDefinitionTypeEnum.java deleted file mode 100755 index 6208e8bf8..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocStatisticsDefinitionTypeEnum.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.healthlink.his.common.enums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 文档统计定义-属性类型枚举 - * 对应属性类型:Input(输入框)、Date(日期选择器)、Checkbox(复选框)、Radio(单选框)、Select(下拉选择)、Textarea(文本域) - */ -@Getter -@AllArgsConstructor -public enum DocStatisticsDefinitionTypeEnum implements HisEnumInterface { - // 枚举项:value(数据库存储值)、code(业务编码)、info(前端/业务描述) - INPUT(1, "INPUT", "输入框(单行文本)"), - DATE(2, "DATE", "日期选择器"), - CHECKBOX(3, "CHECKBOX", "复选框"), - RADIO(4, "RADIO", "单选框"), - SELECT(5, "SELECT", "下拉选择框"), - TEXTAREA(6, "TEXTAREA", "文本域(多行文本)"); - - // 数据库存储的枚举值(与表中type_enum字段对应) - @EnumValue - private final Integer value; - // 业务编码(用于前后端交互、日志打印等,避免硬编码) - private final String code; - // 枚举描述(用于前端显示、接口返回说明等) - private final String info; - - /** - * 根据数据库存储值(value)获取枚举实例 - * - * @param value 数据库中存储的type_enum值(如1、2、3...) - * @return 对应的枚举实例,若未匹配则返回null - */ - public static DocStatisticsDefinitionTypeEnum getByValue(Integer value) { - if (value == null) { - return null; - } - // 遍历所有枚举项,匹配value - for (DocStatisticsDefinitionTypeEnum typeEnum : values()) { - if (typeEnum.getValue().equals(value)) { - return typeEnum; - } - } - // 无匹配项时返回null(避免抛出异常,便于业务层处理) - return null; - } - - /** - * 扩展:根据业务编码(code)获取枚举实例(可选,按需使用) - * - * @param code 业务编码(如"INPUT"、"SELECT") - * @return 对应的枚举实例,若未匹配则返回null - */ - public static DocStatisticsDefinitionTypeEnum getByCode(String code) { - if (code == null || code.trim().isEmpty()) { - return null; - } - for (DocStatisticsDefinitionTypeEnum typeEnum : values()) { - if (typeEnum.getCode().equals(code.trim())) { - return typeEnum; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocStatusEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocStatusEnum.java deleted file mode 100755 index 43598e010..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocStatusEnum.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.healthlink.his.common.enums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 就诊类型 - */ -@Getter -@AllArgsConstructor -public enum DocStatusEnum implements HisEnumInterface { - DRAFT(0, "DRAFT", "草稿/暂存"), - SAVED(1, "SAVED", "提交"), - ARCHIVED(2, "ARCHIVED", "归档"); -// UPDATED(3, "UPDATED", "修改"); - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static DocStatusEnum getByValue(Integer value) { - if (value == null) { - return null; - } - for (DocStatusEnum val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocTypeEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocTypeEnum.java deleted file mode 100755 index 93dd54141..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocTypeEnum.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.healthlink.his.common.enums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 就诊类型 - */ -@Getter -@AllArgsConstructor -public enum DocTypeEnum implements HisEnumInterface { - OUT_DOC(0, "OUT_DOC", "门诊病历"), - IN_DOC(1, "IN_DOC", "住院病历"), - NURSING_DOC(2, "NURSING_DOC", "护理评估"), - NURSING_RECORD_DOC(3, "NURSING_RECORD_DOC", "护理记录"), - TEMPERATURE_DOC(4, "NURSING_RECORD_DOC", "体温单"), - NOTICE_DOC(5, "NOTICE_DOC", "告知书"), - AGREEMENT_DOC(6, "AGREEMENT_DOC", "知情同意书"), - IN_CASE_DOC(7, "IN_CASE_DOC", "病案首页"); - - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static DocTypeEnum getByValue(Integer value) { - if (value == null) { - return null; - } - for (DocTypeEnum val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocUseRangeEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocUseRangeEnum.java deleted file mode 100755 index 9d45754d4..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/DocUseRangeEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.healthlink.his.common.enums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 就诊类型 - */ -@Getter -@AllArgsConstructor -public enum DocUseRangeEnum implements HisEnumInterface { - // 使用范围 0-暂不使用 1-全院使用 2-指定科室使用 3-个人使用 - NO_IN_USE(0, "NO_IN_USE", "暂不使用"), - - ALL_HOSPITAL_USE(1, "ALL_HOSPITAL_USE", "全院使用"), - - DEPT_USE(2, "DEPT_USE", "指定科室使用"), - USE_BY_SELF(3, "USE_BY_SELF", "个人使用"); - - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static DocUseRangeEnum getByValue(Integer value) { - if (value == null) { - return null; - } - for (DocUseRangeEnum val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryAppStatusEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryAppStatusEnum.java deleted file mode 100644 index 95d6a3983..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryAppStatusEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.healthlink.his.common.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 手术申请单状态枚举 - *

- * 区别于 {@link SurgeryStatusEnum}(手术管理状态:待排期/已排期/手术中/已完成/已取消/暂停), - * 本枚举用于手术申请单的业务流转状态,覆盖从医生开立到手术完成的完整生命周期。 - * - *

- * 正向流转:
- *   待签发(1) → 已签发(2) → 已校对(3) → 已执行(4) → 已安排(5) → 已完成(6)
- *
- * 逆向流转:
- *   已签发(2) → 待签发(1)   (医生撤回 / 护士退回)
- *   已执行(4) → 已校对(3)   (护士取消执行)
- *   任意状态 → 已作废(10)   (医生撤销)
- * 
- * - * @author system - * @date 2026-06-02 - */ -@Getter -@AllArgsConstructor -public enum SurgeryAppStatusEnum { - - /** 待签发 — 医生已保存但尚未提交,仅在医生站可见 */ - PENDING_SIGN(1, "待签发"), - - /** 已签发 — 医生已提交,自动流转至护士工作站待校对 */ - SIGNED(2, "已签发"), - - /** 已校对 — 病区护士已校对手术医嘱 */ - VERIFIED(3, "已校对"), - - /** 已执行 — 病区护士已执行手术医嘱,已向手麻科提交申请 */ - EXECUTED(4, "已执行"), - - /** 已安排 — 手麻科已排好手术间及时间,待手术 */ - SCHEDULED(5, "已安排"), - - /** 已完成 — 手术已结束并录入完毕(终态只读) */ - COMPLETED(6, "已完成"), - - /** 已作废 — 医生中途撤销了手术申请(终态) */ - CANCELLED(10, "已作废"); - - private final Integer code; - private final String info; - - /** - * 根据状态码获取枚举 - * - * @param code 状态码 - * @return 对应的枚举,未匹配返回 null - */ - public static SurgeryAppStatusEnum getByCode(Integer code) { - if (code == null) { - return null; - } - for (SurgeryAppStatusEnum val : values()) { - if (val.getCode().equals(code)) { - return val; - } - } - return null; - } - - /** - * 判断是否为终态(不可再变更) - */ - public boolean isFinal() { - return this == COMPLETED || this == CANCELLED; - } - - /** - * 判断是否允许医生编辑 - */ - public boolean isEditable() { - return this == PENDING_SIGN; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryLevelEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryLevelEnum.java deleted file mode 100755 index 0b1391a90..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryLevelEnum.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.healthlink.his.common.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 手术等级枚举 - */ -@Getter -@AllArgsConstructor -public enum SurgeryLevelEnum { - - /** 一级手术 */ - LEVEL_1(1, "一级手术"), - - /** 二级手术 */ - LEVEL_2(2, "二级手术"), - - /** 三级手术 */ - LEVEL_3(3, "三级手术"), - - /** 四级手术 */ - LEVEL_4(4, "四级手术"), - - /** 特级手术 */ - SPECIAL(5, "特级手术"); - - private final Integer code; - private final String info; -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryStatusEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryStatusEnum.java deleted file mode 100755 index 697f5c61a..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryStatusEnum.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.healthlink.his.common.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 手术状态枚举 - */ -@Getter -@AllArgsConstructor -public enum SurgeryStatusEnum { - - /** 待排期 */ - PENDING_SCHEDULE(0, "待排期"), - - /** 已排期 */ - SCHEDULED(1, "已排期"), - - /** 手术中 */ - IN_PROGRESS(2, "手术中"), - - /** 已完成 */ - COMPLETED(3, "已完成"), - - /** 已取消 */ - CANCELLED(4, "已取消"), - - /** 暂停 */ - SUSPENDED(5, "暂停"); - - private final Integer code; - private final String info; -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryTypeEnum.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryTypeEnum.java deleted file mode 100755 index d1025e228..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/SurgeryTypeEnum.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.healthlink.his.common.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 手术类型枚举 - */ -@Getter -@AllArgsConstructor -public enum SurgeryTypeEnum { - - /** 门诊手术 */ - OUTPATIENT(1, "门诊手术"), - - /** 住院手术 */ - INPATIENT(2, "住院手术"), - - /** 急诊手术 */ - EMERGENCY(3, "急诊手术"), - - /** 择期手术 */ - ELECTIVE(4, "择期手术"); - - private final Integer code; - private final String info; -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/PriorityType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/PriorityType.java deleted file mode 100755 index 5194c4245..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/PriorityType.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.core.common.utils.StringUtils; -import com.healthlink.his.common.enums.HisEnumInterface; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 账户类型 - * - * @author zwh - * @date 2025-03-14 - */ -@Getter -@AllArgsConstructor -public enum PriorityType implements HisEnumInterface { - - /** - * 特级 - */ - SPECIAL_GRADE(1, "01", "特级"), - - /** - * 一级 - */ - ONE_GRADE(2, "02", "一级"), - - /** - * 二级 - */ - TWO_GRADE(3, "03", "二级"), - - /** - * 三级 - */ - THREE_GRADE(4, "04", "三级"); - - private Integer value; - private String code; - private String info; - - public static PriorityType getByValue(Integer value) { - if (value == null) { - return null; - } - for (PriorityType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } - - public static PriorityType getByCode(String code) { - if (StringUtils.isEmpty(code)) { - return null; - } - for (PriorityType val : values()) { - if (val.getCode().equals(code)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbChrgitmLv.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbChrgitmLv.java deleted file mode 100755 index aa71266ea..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbChrgitmLv.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import com.core.common.utils.StringUtils; -import com.healthlink.his.common.enums.HisEnumInterface; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医保等级【chrgitm_lv】 - * - * @author SunJQ - * @date 2025-04-16 - */ -@Getter -@AllArgsConstructor -public enum YbChrgitmLv implements HisEnumInterface { - - // 甲类 - CATEGORY_A(1, "1", "甲类"), - - // 乙类 - CATEGORY_B(2, "2", "乙类"), - - // 自费 - SELF_PAY(3, "3", "自费"); - - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static YbChrgitmLv getByValue(Integer value) { - if (value == null) { - return null; - } - for (YbChrgitmLv val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } - - public static YbChrgitmLv getByCode(String code) { - if (StringUtils.isEmpty(code)) { - return null; - } - for (YbChrgitmLv val : values()) { - if (val.getCode().equals(code)) { - return val; - } - } - return null; - } - -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrStas.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrStas.java deleted file mode 100755 index 11461d5c1..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrStas.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 清算状态 - * - * @author SunJQ - * @date 2025-04-17 - */ -@Getter -@AllArgsConstructor -public enum YbClrStas { - - /** - * 已申请 - */ - CLR_STAS10("10", "已申请"), - /** - * 已受理 - */ - CLR_STAS20("20", "已受理"), - /** - * 已清算 - */ - CLR_STAS50("50", "已清算"); - - private String value; - private String description; - - public static YbClrStas getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbClrStas val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrType.java deleted file mode 100755 index 77a7c122f..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrType.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 清算类别 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbClrType { - - /** - * 门诊 - */ - OUTPATIENT_CLINIC("11", "门诊"), - /** - * 药店购药 - */ - PHARMACY_PURCHASE("41", "药店购药"), - /** - * 住院 - */ - INPATIENT_CARE("21", "住院"), - /** - * 其他 - */ - OTHER("99", "其他"); - - private String value; - private String description; - - public static YbClrType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbClrType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrWay.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrWay.java deleted file mode 100755 index 025cd8c04..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbClrWay.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * YbClrWay (0: MEMBER_FIRST; 1: MEMBER_SECOND;) - * - * @author SunJQ - * @date 2025-04-29 - */ -@Getter -@AllArgsConstructor -public enum YbClrWay { - - /** - * 按项目 - */ - ITEM_BY_PROJECT("01", "按项目"), - /** - * 按人头 - */ - PER_CAPITA("04", "按人头"), - /** - * 单病种 - */ - SINGLE_DISEASE("02", "单病种"), - /** - * DRGs点数法 - */ - DRGS_POINTS("05", "DRGs点数法"), - /** - * 按床日 - */ - BY_BED_DAY("03", "按床日"), - /** - * 其他 - */ - OTHER("99", "其他"); - - private String value; - private String description; - - public static YbClrWay getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbClrWay val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDiagType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDiagType.java deleted file mode 100755 index 6546d1f20..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDiagType.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 诊断类别 - * - * @author SunJQ - * @date 2025-04-14 - */ -@Getter -@AllArgsConstructor -public enum YbDiagType { - - /** - * 西医诊断 - */ - WESTERN_MEDICINE_DIAGNOSIS(1, "西医诊断"), - /** - * 中医主病诊断 - */ - TCM_MAIN_DISEASE_DIAGNOSIS(2, "中医主病诊断"), - /** - * 中医主证诊断 - */ - TCM_MAIN_SYNDROME_DIAGNOSIS(3, "中医主证诊断"), - /** - * 初诊诊断 - */ - INITIAL_DIAGNOSIS(4, "初诊诊断"), - /** - * 修正诊断 - */ - REVISED_DIAGNOSIS(5, "修正诊断"), - /** - * 补充诊断 - */ - SUPPLEMENTARY_DIAGNOSIS(6, "补充诊断"); - - private Integer value; - private String description; - - public static YbDiagType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbDiagType val : values()) { - if (val.getValue().toString().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDoctorTitle.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDoctorTitle.java deleted file mode 100755 index ad896fd57..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDoctorTitle.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 开单医生职称枚举 - * - * @author YourName - * @date 2025-04-22 - */ -@Getter -@AllArgsConstructor -public enum YbDoctorTitle { - - /** - * 主任医师 - */ - CHIEF_PHYSICIAN("231", "主任医师"), - - /** - * 副主任医师 - */ - DEPUTY_CHIEF_PHYSICIAN("232", "副主任医师"), - - /** - * 主治医师 - */ - ATTENDING_PHYSICIAN("233", "主治医师"), - - /** - * 医师 - */ - PHYSICIAN("234", "医师"), - - /** - * 医士 - */ - MEDICAL_ASSISTANT("235", "医士"); - - private String code; - private String description; - - public static YbDoctorTitle getByValue(String code) { - if (StringUtil.isEmpty(code)) { - return null; - } - for (YbDoctorTitle title : values()) { - if (title.getCode().equals(code)) { - return title; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrordBhvr.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrordBhvr.java deleted file mode 100755 index fd2809106..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrordBhvr.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * YbDrordBhvr (0: MEMBER_FIRST; 1: MEMBER_SECOND;) - * - * @author SunJQ - * @date 2025-04-16 - */ -@Getter -@AllArgsConstructor -public enum YbDrordBhvr { - - /** - * MEMBER_FIRST - */ - OTHER("0", "其他"), - /** - * 出院带药 - */ - DISCHARGE_MEDICATION("1", "出院带药"); - - private String value; - private String description; - - public static YbDrordBhvr getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbDrordBhvr val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrordType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrordType.java deleted file mode 100755 index e40f7738a..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrordType.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import com.healthlink.his.common.enums.HisEnumInterface; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.43 医嘱类别drord_type - * - * @author SunJQ - * @date 2025-04-16 - */ -@Getter -@AllArgsConstructor -public enum YbDrordType implements HisEnumInterface { - - // 临时医嘱 - TEMPORARY_ORDER(1, "1","临时医嘱"), - - // 长期医嘱 - STANDING_ORDER(2, "2","长期医嘱"), - - // 备用医嘱 - STANDBY_ORDER(3, "3","备用医嘱"); - - private Integer value; - private String code; - private String info; - - public static YbDrordType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbDrordType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrugDosform.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrugDosform.java deleted file mode 100755 index b602861d9..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrugDosform.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.62 药品剂型【drug_dosform】【hilist_dosform】 - * - * @author SunJQ - * @date 2025-04-16 - */ -@Getter -@AllArgsConstructor -public enum YbDrugDosform { -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrugMedWay.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrugMedWay.java deleted file mode 100755 index 7d3b826e7..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDrugMedWay.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 药物使用途径代码 - * - * @author liuhr - * @date 2025-04-21 - */ -@Getter -@AllArgsConstructor -public enum YbDrugMedWay { - - ORAL_DRUG("1", "口服"), - - RECTAL_DRUG("2", "直肠给药"), - - SUBLINGUAL_DRUG("3", "舌下给药"), - - INJECTION_DRUG("4", "注射给药"), - - SUBCUTANEOUS_DRUG("401", "皮下注射"), - - INTRACUTANEOUS_DRUG("402", "皮内注射"), - - INTRAMUSCULAR_DRUG("403", "肌肉注射"), - - INGECTION_DRUG("404", "静脉注射或静脉滴注"), - - INHALATION_DRUG("5", "吸入给药"), - - TOPICAL_DRUG("6", "局部用药"), - - SPINAL_DRUG("601", "椎管内用药"), - - INTRA_ARTICULAR_DRUG("602", "关节腔内用药"), - - PLEURAL_DRUG("603", "胸膜腔用药"), - - INTRA_PERITONEAL_DRUG("604", "腹腔用药"), - - VAGINAL_DRUG("605", "阴道用药"), - - ENDOTRACHEAL_DRUG("606", "气管内用药"), - - EYE_DROPS("607", "滴眼"), - - NASAL_DROPS("608", "滴鼻"), - - THROAT_SPRAY("609", "喷喉"), - - BUCCAL("610", "含化"), - - WOUND_APPLICATION("611", "敷伤口"), - - TOPICAL_SKIN("612", "擦皮肤"), - - OTHER_TOPICAL_ROUTE("699", "其他局部给药途径"), - - OTHER_ROUTE("9", "其他给药途径"); - - private String value; - private String description; - - public static YbDrugMedWay getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbDrugMedWay code : values()) { - if (code.getValue().equals(value)) { - return code; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDspoWay.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDspoWay.java deleted file mode 100755 index 4b3223089..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbDspoWay.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 处理方式 - * - * @author Thanking - */ -@Getter -@AllArgsConstructor -public enum YbDspoWay { - - /** - * 继续执行医嘱 - */ - CONTINUE("1", "继续执行医嘱"), - /** - * 返回修改医嘱 - */ - MODIFY("2", "返回修改医嘱"); - - private String value; - private String description; - - public static YbDspoWay getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbDspoWay val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbEncounterClass.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbEncounterClass.java deleted file mode 100755 index 0a5a63752..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbEncounterClass.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * YbEncounterClass - * - * @author Wuser - * @date 2025/4/22 - */ -@Getter -@AllArgsConstructor -public enum YbEncounterClass { - - AMB("1", "门诊"), - - IMP("2", "住院"), - - REG("3", "挂号"); - - private String value; - private String description; - - public static YbEncounterClass getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbEncounterClass code : values()) { - if (code.getValue().equals(value)) { - return code; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbEncounterZyStatus.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbEncounterZyStatus.java deleted file mode 100755 index fbe004ea7..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbEncounterZyStatus.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import com.healthlink.his.common.enums.HisEnumInterface; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum YbEncounterZyStatus implements HisEnumInterface { - - - TO_BE_REGISTERED(1, "to-be-registered", "待登记"), - - ADMITTED_TO_THE_HOSPITAL(2, "admitted-to-the-hospital", "已登记"), - - DISCHARGED_FROM_HOSPITAL(3, "discharged-from-hospital", "已出院"), - - ALREADY_SETTLED(4, "already-settled", "已结算"); - - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static YbEncounterZyStatus getByValue(Integer value) { - if (value == null) { - return null; - } - for (YbEncounterZyStatus val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbGender.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbGender.java deleted file mode 100755 index 0334b699d..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbGender.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 性别枚举 - * - * @author YourName - * @date 2025-04-22 - */ -@Getter -@AllArgsConstructor -public enum YbGender { - - /** - * 未知的性别 - */ - UNKNOWN("0", "未知的性别"), - - /** - * 男 - */ - MALE("1", "男"), - - /** - * 女 - */ - FEMALE("2", "女"), - - /** - * 未说明性别 - */ - UNSTATED("9", "未说明性别"); - - private String value; - private String description; - - public static YbGender getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbGender type : values()) { - if (type.getValue().equals(value)) { - return type; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbHiFeesetlType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbHiFeesetlType.java deleted file mode 100755 index e43973b85..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbHiFeesetlType.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医保费用结算类型 - * - * @author YourName - * @date 2025-04-22 - */ -@Getter -@AllArgsConstructor -public enum YbHiFeesetlType { - - /** - * 非医疗保险结算 - */ - CHIEF_PHYSICIAN("0", "非医疗保险结算"), - - /** - * 本地医疗保险结算 - */ - ATTENDING_PHYSICIAN("1", "本地医疗保险结算"), - - /** - * 异地医疗保险结算 - */ - DEPUTY_CHIEF_PHYSICIAN("2", "异地医疗保险结算"); - - - private String code; - private String description; - - public static YbHiFeesetlType getByValue(String code) { - if (StringUtil.isEmpty(code)) { - return null; - } - for (YbHiFeesetlType title : values()) { - if (title.getCode().equals(code)) { - return title; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbHospApprFlag.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbHospApprFlag.java deleted file mode 100755 index 8d8d49c39..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbHospApprFlag.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医院审批标志 - * - * @author SunJQ - * @date 2025-04-14 - */ -@Getter -@AllArgsConstructor -public enum YbHospApprFlag { - - /** - * 无须审批 - */ - NO_APPROVAL_REQUIRED("0", "无须审批"), - /** - * 审批不通过 - */ - APPROVAL_NOT_PASSED("2", "审批不通过"), - /** - * 审批通过 - */ - APPROVAL_PASSED("1", "审批通过"); - - private String value; - private String description; - - public static YbHospApprFlag getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbHospApprFlag val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbIdDocumentType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbIdDocumentType.java deleted file mode 100755 index 20df5e9fb..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbIdDocumentType.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 证件类型枚举 - * - * @author YourName - * @date 2025-04-22 - */ -@Getter -@AllArgsConstructor -public enum YbIdDocumentType { - - /** - * 居民身份证(户口簿) - */ - RESIDENT_ID_CARD("01", "居民身份证(户口簿)"), - - /** - * 中国人民解放军军官证 - */ - PLA_OFFICER_ID_CARD("02", "中国人民解放军军官证"), - - /** - * 中国人民武装警察警官证 - */ - ARMED_POLICE_OFFICER_ID_CARD("03", "中国人民武装警察警官证"), - - /** - * 香港特区护照/港澳居民来往内地通行证 - */ - HK_PASSPORT_OR_PERMIT("04", "香港特区护照/港澳居民来往内地通行证"), - - /** - * 澳门特区护照/港澳居民来往内地通行证 - */ - MACAO_PASSPORT_OR_PERMIT("05", "澳门特区护照/港澳居民来往内地通行证"), - - /** - * 台湾居民来往大陆通行证 - */ - TAIWAN_PERMIT("06", "台湾居民来往大陆通行证"), - - /** - * 外国人永久居留证 - */ - FOREIGNER_PERMANENT_RESIDENCE_CARD("07", "外国人永久居留证"), - - /** - * 外国人护照 - */ - FOREIGNER_PASSPORT("08", "外国人护照"), - - /** - * 残疾人证 - */ - DISABILITY_CARD("09", "残疾人证"), - - /** - * 军烈属证明 - */ - MARTYRS_FAMILY_CERTIFICATE("10", "军烈属证明"), - - /** - * 外国人就业证 - */ - FOREIGNER_EMPLOYMENT_CERTIFICATE("11", "外国人就业证"), - - /** - * 外国专家证 - */ - FOREIGN_EXPERT_CERTIFICATE("12", "外国专家证"), - - /** - * 外国人常驻记者证 - */ - FOREIGN_JOURNALIST_CERTIFICATE("13", "外国人常驻记者证"), - - /** - * 台港澳人员就业证 - */ - TAIWAN_HONGKONG_MACAO_EMPLOYMENT_CERTIFICATE("14", "台港澳人员就业证"), - - /** - * 回国(来华)定居专家证 - */ - EXPATRIATE_SETTLEMENT_CERTIFICATE("15", "回国(来华)定居专家证"), - - /** - * 中国护照 - */ - CHINESE_PASSPORT("16", "中国护照"), - - /** - * 港澳台居民居住证 - */ - HK_MACAO_TAIWAN_RESIDENCE_PERMIT("17", "港澳台居民居住证"), - - /** - * 社会保障卡 - */ - SOCIAL_SECURITY_CARD("90", "社会保障卡"), - - /** - * 其他身份证件 - */ - OTHER_ID_DOCUMENT("99", "其他身份证件"), - - /** - * 医学出生证明 - */ - MEDICAL_BIRTH_CERTIFICATE("990201", "医学出生证明"), - - /** - * 扶贫人口编码 - */ - POVERTY_POPULATION_CODE("990102", "扶贫人口编码"); - - private String value; - private String description; - - public static YbIdDocumentType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbIdDocumentType type : values()) { - if (type.getValue().equals(value)) { - return type; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInOutDiagType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInOutDiagType.java deleted file mode 100755 index 020c279a3..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInOutDiagType.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 出入院诊断类别(inout_diag_type) 出入诊断类别 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbInOutDiagType { - /** - * 入院诊断 - */ - YB_IN_DIAG_TYPE("1", "入院诊断"), - /** - * 出院诊断 - */ - YB_OUT_DIAG_TYPE("2", "出院诊断"); - - private String value; - private String description; - - public static YbInOutDiagType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbInOutDiagType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInsuType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInsuType.java deleted file mode 100755 index e49d5fa49..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInsuType.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 险种类别 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbInsuType { - /** - * 长期照护保险 - */ - YB_INSU_TYPE410("410", "长期照护保险"), - /** - * 职工基本医疗保险 - */ - YB_INSU_TYPE310("310", "职工基本医疗保险"), - /** - * 公务员医疗补助 - */ - YB_INSU_TYPE320("320", "公务员医疗补助"), - /** - * 离休人员医疗保障 - */ - YB_INSU_TYPE340("340", "离休人员医疗保障"), - /** - * 一至六级残废军人医疗补助 - */ - YB_INSU_TYPE350("350", "一至六级残废军人医疗补助"), - /** - * 大额医疗费用补助 - */ - YB_INSU_TYPE330("330", "大额医疗费用补助"), - /** - * 老红军医疗保障 - */ - YB_INSU_TYPE360("360", "老红军医疗保障"), - /** - * 企业补充医疗保险 - */ - YB_INSU_TYPE370("370", "企业补充医疗保险"), - /** - * 新型农村合作医疗 - */ - YB_INSU_TYPE380("380", "新型农村合作医疗"), - /** - * 城乡居民基本医疗保险 - */ - YB_INSU_TYPE390("390", "城乡居民基本医疗保险"), - /** - * 城镇居民基本医疗保险 - */ - YB_INSU_TYPE391("391", "城镇居民基本医疗保险"), - /** - * 城乡居民大病医疗保险 - */ - YB_INSU_TYPE392("392", "城乡居民大病医疗保险"), - /** - * 其他特殊人员医疗保障 - */ - YB_INSU_TYPE399("399", "其他特殊人员医疗保障"); - - private String value; - private String description; - - public static YbInsuType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbInsuType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInvChgType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInvChgType.java deleted file mode 100755 index be30f428d..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInvChgType.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.51 库存变更类型(inv_chg_type) - * - * @author SunJQ - * @date 2025-04-17 - */ -@Getter -@AllArgsConstructor -public enum YbInvChgType { - - // 调拨入库 - ALLOCATION_IN("101", "调拨入库"), - // 调拨出库 - ALLOCATION_OUT("102", "调拨出库"), - // 盘盈 - INVENTORY_GAIN("103", "盘盈"), - // 盘损 - INVENTORY_LOSS("104", "盘损"), - // 销毁 - DESTRUCTION("105", "销毁"), - // 其他入库 - OTHER_IN("106", "其他入库"), - // 其他出库 - OTHER_OUT("107", "其他出库"), - // 商品采购入库 - PURCHASE_IN("108", "商品采购入库"), - // 商品退货出库 - RETURN_OUT("109", "商品退货出库"), - // 赠药入库 - DONATION_IN("110", "赠药入库"), - // 赠药退回出库 - DONATION_RETURN_OUT("111", "赠药退回出库"); - - private String value; - private String description; - - public static YbInvChgType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbInvChgType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInvDataType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInvDataType.java deleted file mode 100755 index b3a293b6d..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbInvDataType.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 进销存类型(inv_data_type) - * - * @author SunJQ - * @date 2025-04-19 - */ -@Getter -@AllArgsConstructor -public enum YbInvDataType { - // 1. 盘存信息 - STOCK_TAKING_INFO(1,"1", "盘存信息"), - - // 2. 库存变更信息 - INVENTORY_CHANGE_INFO(2,"2", "库存变更信息"), - - // 3. 采购信息 - PURCHASE_INFO(3,"3", "采购信息"), - - // 4. 销售信息 - SALES_INFO(4,"4", "销售信息"); - - private final int code; - private final String value; - private final String name; - - public static YbInvDataType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbInvDataType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbIptDiseTypeCode.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbIptDiseTypeCode.java deleted file mode 100755 index 36ae24abc..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbIptDiseTypeCode.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 住院患者疾病诊断类型 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbIptDiseTypeCode { - - // 出院诊断 - DISCHARGE_DIAGNOSIS(1,"1", "出院诊断"), - - // 入院诊断 - ADMISSION_DIAGNOSIS(31,"31", "入院诊断"), - - // 并发症诊断 - COMPLICATION_DIAGNOSIS(10,"10", "并发症诊断"), - - // 术前诊断 - PREOPERATIVE_DIAGNOSIS(4,"4", "术前诊断"), - - // 院内感染诊断 - NOSOCOMIAL_INFECTION_DIAGNOSIS(11,"11", "院内感染诊断"), - - // 术后诊断 - POSTOPERATIVE_DIAGNOSIS(5,"5", "术后诊断"), - - // 主要诊断 - PRIMARY_DIAGNOSIS(12,"12", "主要诊断"), - - // 次要诊断 - SECONDARY_DIAGNOSIS(13,"13", "次要诊断"), - - // 中医出院诊断病名 - TCM_DISCHARGE_DIAGNOSIS_DISEASE_NAME(14,"14", "中医出院诊断病名"), - - // 超声诊断 - ULTRASOUND_DIAGNOSIS(8,"8", "超声诊断"), - - // 中医出院主病 - TCM_DISCHARGE_PRIMARY_DISEASE(141,"141", "中医出院主病"), - - // 中医出院主证 - TCM_DISCHARGE_PRIMARY_SYNDROME(142,"142", "中医出院主证"), - - // 损伤、中毒的外部原因 - EXTERNAL_CAUSE_OF_INJURY_OR_POISONING(98,"98", "损伤、中毒的外部原因"), - - // 门诊诊断 - OUTPATIENT_DIAGNOSIS(2,"2", "门诊诊断"), - - // 其他 - OTHER(99,"99", "其他"), - - // 入院初步诊断 - ADMISSION_PRELIMINARY_DIAGNOSIS(3,"3", "入院初步诊断"), - - // 尸检诊断 - AUTOPSY_DIAGNOSIS(6,"6", "尸检诊断"), - - // 放射诊断 - RADIOLOGICAL_DIAGNOSIS(7,"7", "放射诊断"), - - // 病理诊断 - PATHOLOGICAL_DIAGNOSIS(9,"9", "病理诊断"); - - private Integer value; - private String code; - private String description; - - public static YbIptDiseTypeCode getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbIptDiseTypeCode val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbListType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbListType.java deleted file mode 100755 index aae00e463..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbListType.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.48 目录类别(list_type) - * - * @author SunJQ - * @date 2025-04-17 - */ -@Getter -@AllArgsConstructor -public enum YbListType { - // 西药中成药 - WESTERN_AND_CHINESE_PATENT_MEDICINE(101, "101","西药中成药"), - // 中药饮片 - IMPORTANT_HERBAL_SLICES(102, "102","中药饮片"), - // 自制剂 - SELF_PREPARED_MEDICATION(103, "103","自制剂"), - // 民族药 - ETHNIC_MEDICINE(104, "104","民族药"), - // 医疗服务项目 - MEDICAL_SERVICE_ITEM(201,"201", "医疗服务项目"), - // 医用耗材 - MEDICAL_CONSUMABLES(301,"301", "医用耗材"); - - private final int code; - private final String value; - private final String name; - - public static YbListType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbListType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMatnStas.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMatnStas.java deleted file mode 100755 index 472b7734b..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMatnStas.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 生育状态 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbMatnStas { - - // 未知 - UNKNOWN("0", "未知"), - - // 非妊娠期或哺乳期 - NON_PREGNANT_OR_LACTATING("1", "非妊娠期或哺乳期"), - - // 近期有生育计划 - PLANNING_TO_CONCEIVE("2", "近期有生育计划"), - - // 妊娠期 - PREGNANT("3", "妊娠期"), - - // 哺乳期 - LACTATING("4", "哺乳期"); - - private String value; - private String description; - - public static YbMatnStas getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMatnStas val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMdcsType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMdcsType.java deleted file mode 100755 index 6af69ef75..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMdcsType.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum YbMdcsType { - - /** 职工基本医疗保险 */ - EMPLOYEE_BASIC(310,"310", "职工基本医疗保险"), - - /** 离休人员医疗保障 */ - RETIRED_PERSONNEL(340,"340", "离休人员医疗保障"), - - /** 一至六级残疾军人医疗补助 */ - DISABLED_SOLDIER(350,"350", "一至六级残疾军人医疗补助"), - - /** 老红军医疗保障 */ - RED_ARMY_VETERAN(360,"360", "老红军医疗保障"), - - /** 新型农村合作医疗 */ - NEW_RURAL_COOPERATIVE(380,"380", "新型农村合作医疗"), - - /** 城乡居民基本医疗保险 */ - URBAN_RURAL_RESIDENT(390,"390", "城乡居民基本医疗保险"), - - /** 城镇居民基本医疗保险 */ - URBAN_RESIDENT(391,"391", "城镇居民基本医疗保险"), - - /** 其他医疗保险 */ - OTHER(999,"999", "其他医疗保险"); - - @EnumValue - private final Integer value; - private final String code; - private final String info; - - public static YbMdcsType getByValue(Integer value) { - if (value == null) { - return null; - } - for (YbMdcsType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } - - - public static YbMdcsType getByCode(String code) { - if (code == null|| code.isEmpty()) { - return null; - } - for (YbMdcsType val : values()) { - if (val.getCode().equals(code)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMdtrtCertType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMdtrtCertType.java deleted file mode 100755 index 631e9c25e..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMdtrtCertType.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.35 就诊凭证类型(mdtrt_cert_type) - * - * @author SunJQ - * @date 2025-04-10 - */ -@Getter -@AllArgsConstructor -public enum YbMdtrtCertType { - - /** - * 医保电子凭证 - */ - MDTRT_CERT_TYPE01("01","1","医保电子凭证"), - /** - * 居民身份证 - */ - MDTRT_CERT_TYPE02("02","2","居民身份证"), - /** - * 社会保障卡 - */ - MDTRT_CERT_TYPE03("03","3","社会保障卡"); - - private String value; - private String code;//2025/05/20,由于account数据库中存的1/2/3,无法与医保码01,02,03直接对照,故此增加code字段比较 - private String description; - - public static YbMdtrtCertType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMdtrtCertType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } - - public static YbMdtrtCertType getByCode(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMdtrtCertType val : values()) { - if (val.getCode().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedChrgItmType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedChrgItmType.java deleted file mode 100755 index 6224df754..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedChrgItmType.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医疗收费项目类别【MED_CHRGITM_TYPE】 【chrg_type】 - * - * @author SunJQ - * @date 2025-04-16 - */ -@Getter -@AllArgsConstructor -public enum YbMedChrgItmType { - /** - * 床位费 - */ - BED_FEE(1, "01","床位费"), - /** - * 诊察费 - */ - DIAGNOSTIC_FEE(2, "02","诊察费"), - /** - * 检查费 - */ - CHECK_FEE(3, "03","检查费"), - /** - * 化验费 - */ - DIAGNOSTIC_TEST_FEE(4, "04","化验费"), - /** - * 治疗费 - */ - MEDICAL_EXPENSE_FEE(5, "05","治疗费"), - /** - * 手术费 - */ - OPERATION_FEE(6, "06","手术费"), - /** - * 护理费 - */ - NURSING_FEE(7, "07","护理费"), - /** - * 卫生材料费 - */ - SANITARY_MATERIALS_FEE(8, "08","卫生材料费"), - /** - * 西药费 - */ - WEST_MEDICINE(9, "09","西药费"), - /** - * 中药饮片费 - */ - CHINESE_MEDICINE_SLICES_FEE(10, "10","中药饮片费"), - /** - * 中成药费 - */ - CHINESE_MEDICINE_FEE(11, "11","中成药费"), - /** - * 一般诊疗费 - */ - GENERAL_CONSULTATION_FEE(12, "12","一般诊疗费"), - /** - * 挂号费 - */ - REGISTRATION_FEE(13, "13","挂号费"), - /** - * 其他费 - */ - OTHER_FEE(14, "14","其他费"); - - private final Integer code; - private final String value; - private final String info; - - public Integer getCode() { - return code; - } - - public String getInfo() { - return info; - } - - public static YbMedChrgItmType getByCode(Integer value) { - if (value == null) { - return null; - } - for (YbMedChrgItmType val : values()) { - if (val.getCode().equals(value)) { - return val; - } - } - return null; - } - - public static YbMedChrgItmType getByValue(String value) { - if (value == null) { - return null; - } - for (YbMedChrgItmType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedMdtrtType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedMdtrtType.java deleted file mode 100755 index 7f7c56f38..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedMdtrtType.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * [3101]就诊类型 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbMedMdtrtType { - - /** - * 门诊 - */ - OUTPATIENT_CLINIC("1", "门诊"), - /** - * 药店购药 - */ - PHARMACY_PURCHASE("2", "药店购药"), - /** - * 住院 - */ - INPATIENT_CARE("3", "住院"), - /** - * 其他 - */ - OTHER("4", "其他"); - - private String value; - private String description; - - public static YbMedMdtrtType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMedMdtrtType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedType.java deleted file mode 100755 index f29daefa7..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedType.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医保医疗类别 - * - * @author SunJQ - * @date 2025-04-14 - */ -@Getter -@AllArgsConstructor -public enum YbMedType { - - // 异地住院 - CROSS_PROVINCIAL_HOSPITALIZATION("25", "异地住院",YbMedMdtrtType.INPATIENT_CARE), - // 单病种住院 - SINGLE_DISEASE_HOSPITALIZATION("26", "单病种住院",YbMedMdtrtType.INPATIENT_CARE), - // 自主就医 - SELF_MEDICATION("27", "自主就医",YbMedMdtrtType.OTHER), - // 意外伤害门诊 - ACCIDENTAL_INJURY_OUTPATIENT("81", "意外伤害门诊",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 特药 - SPECIAL_MEDICATION("15", "特药",YbMedMdtrtType.PHARMACY_PURCHASE), - // 日间手术 - DAY_SURGERY("28", "日间手术",YbMedMdtrtType.OTHER), - // 照护保险 - CARE_INSURANCE("61", "照护保险",YbMedMdtrtType.OTHER), - // 普通门诊 - GENERAL_OUTPATIENT("11", "普通门诊",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 门诊挂号 - OUTPATIENT_REGISTRATION("12", "门诊挂号",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 急诊 - EMERGENCY("13", "急诊",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 门诊慢特病 - CHRONIC_SPECIAL_DISEASE_OUTPATIENT("14", "门诊慢特病",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 门诊特检特治(限吉林市) - SPECIAL_EXAMINATION_TREATMENT_OUTPATIENT_JILIN("990404", "门诊特检特治(限吉林市)",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 普通住院 - GENERAL_HOSPITALIZATION("21", "普通住院",YbMedMdtrtType.INPATIENT_CARE), - // 外伤住院 - TRAUMA_HOSPITALIZATION("22", "外伤住院",YbMedMdtrtType.INPATIENT_CARE), - // 转外诊治住院 - EXTERNAL_TREATMENT_HOSPITALIZATION("23", "转外诊治住院",YbMedMdtrtType.INPATIENT_CARE), - // 急诊转住院 - EMERGENCY_TO_HOSPITALIZATION("24", "急诊转住院",YbMedMdtrtType.INPATIENT_CARE), - // 定点药店购药 - DESIGNATED_PHARMACY_PURCHASE("41", "定点药店购药",YbMedMdtrtType.PHARMACY_PURCHASE), - // 生育门诊 - MATERNITY_OUTPATIENT("51", "生育门诊",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 生育住院 - MATERNITY_HOSPITALIZATION("52", "生育住院",YbMedMdtrtType.INPATIENT_CARE), - // 生育新生儿费用 - NEWBORN_MATERNITY_EXPENSES("5212", "生育新生儿费用",YbMedMdtrtType.OTHER), - // 中医特色门诊 - TRADITIONAL_CHINESE_MEDICINE_OUTPATIENT("16", "中医特色门诊",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 起付线治疗 - DEDUCTIBLE_TREATMENT("29", "起付线治疗",YbMedMdtrtType.OTHER), - // 体检 - PHYSICAL_EXAMINATION("9107", "体检",YbMedMdtrtType.OTHER), - // 低自付住院 - LOW_COPAY_HOSPITALIZATION("3101", "低自付住院",YbMedMdtrtType.INPATIENT_CARE), - // 低自付门诊 - LOW_COPAY_OUTPATIENT("3102", "低自付门诊",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 门诊慢病 - CHRONIC_DISEASE_OUTPATIENT("140104", "门诊慢病",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 门诊特病 - SPECIAL_DISEASE_OUTPATIENT("140201", "门诊特病",YbMedMdtrtType.OUTPATIENT_CLINIC), - // 舒缓疗护住院 - PALLIATIVE_CARE_HOSPITALIZATION("2114", "舒缓疗护住院",YbMedMdtrtType.INPATIENT_CARE); - - private String value; - private String description; - private YbMedMdtrtType ybMedMdtrtType; - - public static YbMedType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMedType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedinsLv.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedinsLv.java deleted file mode 100755 index 504cd8db7..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedinsLv.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医疗机构等级 - * - * @author Thanking - */ -@Getter -@AllArgsConstructor -public enum YbMedinsLv { - - /** - * 三级特等 - */ - THIRD_SPECIAL("01", "三级特等"), - /** - * 三级甲等 - */ - THIRD_A("02", "三级甲等"), - /** - * 三级乙等 - */ - THIRD_B("03", "三级乙等"), - /** - * 三级丙等 - */ - THIRD_C("04", "三级丙等"), - /** - * 二级甲等 - */ - SECOND_A("05", "二级甲等"), - /** - * 二级乙等 - */ - SECOND_B("06", "二级乙等"), - /** - * 二级丙等 - */ - SECOND_C("07", "二级丙等"), - /** - * 一级甲等 - */ - FIRST_A("08", "一级甲等"), - /** - * 一级乙等 - */ - FIRST_B("09", "一级乙等"), - /** - * 一级丙等 - */ - FIRST_C("10", "一级丙等"), - /** - * 无等级 - */ - NO_LEVEL("11", "无等级"); - - private String value; - private String description; - - public static YbMedinsLv getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMedinsLv val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedinsType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedinsType.java deleted file mode 100755 index 97f16f965..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbMedinsType.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.12 定点医疗服务机构类型 - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbMedinsType { - - /** - * 定点医疗机构 - */ - FIXMEDINS_TYPE1("1", "定点医疗机构"), - /** - * 定点零售药店 - */ - FIXMEDINS_TYPE2("2", "定点零售药店"), - /** - * 工伤定点康复机构 - */ - FIXMEDINS_TYPE3("3", "工伤定点康复机构"), - /** - * 辅助器具配置机构 - */ - FIXMEDINS_TYPE4("4", "辅助器具配置机构"), - /** - * 计划生育服务机构 - */ - FIXMEDINS_TYPE5("5", "计划生育服务机构"); - - private String value; - private String description; - - public static YbMedinsType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbMedinsType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPayLoc.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPayLoc.java deleted file mode 100755 index 2b13c4e83..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPayLoc.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * YbPayLoc 支付地点 PAY_LOC 报销标志 REIM_FLAG - * - * @author SunJQ - * @date 2025-04-15 - */ -@Getter -@AllArgsConstructor -public enum YbPayLoc { - - /** - * 中心 - */ - PAY_LOC1("1", "中心"), - /** - * 医疗机构 - */ - PAY_LOC2("2", "医疗机构"), - /** - * 省内异地 - */ - PAY_LOC3("3", "省内异地"), - /** - * 跨省异地 - */ - PAY_LOC4("4", "跨省异地"), - /** - * 互联网医院 - */ - PAY_LOC5("5", "互联网医院"); - - private String value; - private String description; - - public static YbPayLoc getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbPayLoc val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPayment.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPayment.java deleted file mode 100755 index dc00d1bd3..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPayment.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.baomidou.mybatisplus.annotation.EnumValue; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 支付类型 - * - * @author SunJQ - * @date 2025-03-29 - */ -@Getter -@AllArgsConstructor -public enum YbPayment { - - /** - * 医保报销的费用总额,医保支付时存在,等于各种补贴报销的总和 - */ - YB_FUND_PAY(100000, 1, null, "基金支付总额"), - /** - * 个人支付,医保定义的名词,实际使用时医保和自费都用,医保时就是结算接口返回的字段,自费时等于全部费用项总和 - */ - SELF_PAY(200000, 1, null, "个人负担总金额"), - /** - * 医保定义名词,其他(如医院负担金额);实际使用时与下面某一枚举重复使用 OTH_PAY 重复,使用该枚举,不使用OTH_PAY - */ - OTHER_PAY(300000, 1, null, "其他(如医院负担金额)"), - /** - * 基本医保统筹基金支出 - */ - YB_TC_FUND_AMOUNT(110000, 2, YB_FUND_PAY, "基本医保统筹基金支出"), - /** - * 补充医疗保险基金支出 - */ - YB_BC_FUND_AMOUNT(120000, 2, YB_FUND_PAY, "补充医疗保险基金支出"), - /** - * 医疗救助基金支出 - */ - YB_JZ_FUND_AMOUNT(130000, 2, YB_FUND_PAY, "医疗救助基金支出"), - /** - * 其他支出 - */ - YB_OTHER_AMOUNT(140000, 2, YB_FUND_PAY, "其他支出"), - /** - * 职工基本医疗保险 - */ - YB_TC_ZG_FUND_VALUE(110100, 3, YB_TC_FUND_AMOUNT, "职工基本医疗保险"), - /** - * 居民基本医疗保险 - */ - YB_TC_JM_FUND_VALUE(110200, 3, YB_TC_FUND_AMOUNT, "居民基本医疗保险"), - /** - * 全体参保人的居民大病保险 - */ - YB_BC_JM_DB_VALUE(120100, 3, YB_BC_FUND_AMOUNT, "全体参保人的居民大病保险"), - /** - * 大额医疗费用补助 - */ - YB_BC_DE_BZ_VALUE(120200, 3, YB_BC_FUND_AMOUNT, "大额医疗费用补助"), - /** - * 企业职工大额医疗费用补助 - */ - YB_BC_ZG_DE_BZ_VALUE(120300, 3, YB_BC_FUND_AMOUNT, "企业职工大额医疗费用补助"), - /** - * 公务员医疗补助 - */ - YB_BC_GWY_BZ_VALUE(120400, 3, YB_BC_FUND_AMOUNT, "公务员医疗补助"), - /** - * 伤残人员医疗保障基金支出 - */ - YB_OTHER_SC_BZ_FUND_VALUE(130100, 3, YB_OTHER_AMOUNT, "伤残人员医疗保障基金支出"), - /** - * - */ - SELF_YB_ZH_PAY(210000, 2, SELF_PAY, "个人医保账户支付"), - /** - * - */ - SELF_YB_ZH_GJ_VALUE(210100, 3, SELF_YB_ZH_PAY, "账户共济支付金额"), - /** - * - */ - SELF_CASH_PAY(220000, 2, SELF_PAY, "个人现金支付金额"), - /** - * - */ - SELF_VX_PAY(230000, 2, SELF_PAY, "微信支付金额"), - /** - * - */ - SELF_ALI_PAY(240000, 2, SELF_PAY, "阿里支付金额"), - /** - * - */ - DISCOUNT_PAY(220500, 2, OTHER_PAY, "优惠金额"), - /** - * - */ - SELF_CASH_VALUE(220400, 3, SELF_CASH_PAY, "个人现金支付金额(现金)"), - /** - * - */ - SELF_CASH_VX_VALUE(220100, 3, SELF_CASH_PAY, "个人现金支付金额(微信)"), - /** - * - */ - SELF_CASH_ALI_VALUE(220200, 3, SELF_CASH_PAY, "个人现金支付金额(支付宝)"), - /** - * - */ - SELF_CASH_UNION_VALUE(220300, 3, SELF_CASH_PAY, "个人现金支付金额(银联)"), - /** - * 兜底基金支出 - */ - OTHER_PAY_DD_FUND_VALUE(300001, 2, OTHER_PAY, "兜底基金支出"), - /** - * 意外伤害基金支出 - */ - OTHER_PAY_YW_SH_FUND_VALUE(300002, 2, OTHER_PAY, "意外伤害基金支出"), - /** - * 离休人员医疗保障金支出 - */ - OTHER_PAY_LX_YL_FUND_VALUE(300003, 2, OTHER_PAY, "离休人员医疗保障金支出"), - /** - * 离休人员优惠金支出 - */ - OTHER_PAY_LX_YH_FUND_VALUE(300004, 2, OTHER_PAY, "离休人员优惠金支出"), - /** - * 财政基金支出 - */ - OTHER_PAY_CZ_FUND_VALUE(300005, 2, OTHER_PAY, "财政基金支出"), - /** - * 财政预支支出 - */ - OTHER_PAY_CZ_YZ_FUND_VALUE(300006, 2, OTHER_PAY, "财政预支支出"), - /** - * 职工大病基金支出 - */ - OTHER_PAY_ZG_DB_FUND_VALUE(300007, 2, OTHER_PAY, "职工大病基金支出"), - /** - * 二乙基金支出 - */ - OTHER_PAY_EY_FUND_VALUE(300008, 2, OTHER_PAY, "二乙基金支出"), - /** - * 倾斜救助支出 - */ - OTHER_PAY_QX_JZ_FUND_VALUE(300009, 2, OTHER_PAY, "倾斜救助支出"), - /** - * 医疗救助再救助基金 - */ - OTHER_PAY_YL_JZ_FUND_VALUE(300010, 2, OTHER_PAY, "医疗救助再救助基金"), - /** - * 医院负担金额 - */ - HOSP_PART_AMT(300011, 2, OTHER_PAY, "医院负担金额"), - // 医保结算返回值记录枚举 - FULAMT_OWNPAY_AMT(1, 2, null, "全自费金额"), - // PSN_PART_AMT(2,2,null,"个人负担总金额"), - OVERLMT_SELFPAY(3, 2, null, "超限价自费费用"), - PRESELFPAY_AMT(4, 2, null, "先行自付金额"), - INSCP_SCP_AMT(5, 2, null, "符合政策范围金额"), - ACT_PAY_DEDC(6, 2, null, "实际支付起付线"), - POOL_PROP_SELFPAY(7, 2, null, "基本医疗保险统筹基金支付比例"), - BALC(8, 2, null, "余额"), - HIFMI_PAY(9, 2, null, "居民大病保险资金支出"), - HIFP_PAY(10, 2, null, "居民大病保险资金支出"),//重复,误用 - CVLSERV_PAY(11, 2, null, "公务员医疗补助资金支出"),//重复,误用 - HIFES_PAY(12, 2, null, "企业补充医疗保险基金支出"), - HIFOB_PAY(13, 2, null, "职工大额医疗费用补助基金支出"), - MAF_PAY(14, 2, null, "医疗救助基金支出"), - OTH_PAY(15, 2, null, "其他支出"),//重复,误用 - ACCT_MULAID_PAY(16, 2, null, "个人账户共济支付金额"), - // 基金类型,下述仅作记录 - BIRTH_FUND(510100, 2, YB_FUND_PAY, "生育基金"), - RETIREE_MEDICAL(340100, 2, YB_FUND_PAY, "离休人员医疗保障基金"), - URBAN_BASIC_MEDICAL(390100, 2, YB_FUND_PAY, "城乡居民基本医疗保险基金"), - URBAN_SERIOUS_ILLNESS(390200, 2, YB_FUND_PAY, "城乡居民大病医疗保险基金"), - MEDICAL_ASSISTANCE(610100, 2, YB_FUND_PAY, "医疗救助基金"), - GOVERNMENT_SUBSIDY(640100, 2, YB_FUND_PAY, "政府兜底基金"), - ACCIDENT_INSURANCE(390400, 2, YB_FUND_PAY, "意外伤害基金"), - CARE_INSURANCE(620100, 2, YB_FUND_PAY, "照护保险基金"), - FINANCIAL_FUND(360100, 2, YB_FUND_PAY, "财政基金"), - HOSPITAL_ADVANCE(999900, 2, YB_FUND_PAY, "医院垫付"), - SUPPLEMENTARY_INSURANCE(390300, 2, YB_FUND_PAY, "城乡居民大病补充保险基金"), - BASIC_MEDICAL_INSURANCE_FOR_URBAN_EMPLOYEES(310201, 2, YB_FUND_PAY, "城镇职工基本医疗保险个人账户基金"), - E_WALLET(999981, 2, YB_FUND_PAY, "电子钱包"), - HEALTHCARE_PREPAYMENT(360300, 2, YB_FUND_PAY, "保健预支基金"), - // 师大中银支付 - BPC_PAY(500000, 2, SELF_PAY, "BPC支付"), - // 师大专属 - SCHOOL_GF_PAY(400000, 1, null, "学校垫支"); - - // - // - // /** - // * 现金支付 - // */ - // CASH(1, 1, "现金支付"), - // - // /** - // * 微信支付 - // */ - // VX_PAY(2, 1, "微信支付"), - // - // /** - // * 支付宝支付 - // */ - // ALI_PAY(3, 1, "支付宝支付"), - // - // /** - // * 银联支付 - // */ - // UNION_PAY(4, 1, "银联支付"), - // - // /** - // * 医保账户支付 - // */ - // YB_ZH_PAY(5, 1, "医保账户支付"), - // - // /** - // * 医保统筹支付合计 - // */ - // YB_TC_SUM_PAY(6, 1, "医保统筹支付合计"), - // - // /** - // * 医保统筹支付 - // */ - // YB_TC_PAY(7, 2, "医保统筹支付"), - // - // /** - // * 医保公务员补助 - // */ - // YB_GWY_PAY(8, 2, "医保公务员补助"), - // - // /** - // * 先行自付金额 - // */ - // XX_SELF_PAY(9, 2, "先行自付金额"), - // - // /** - // * 全自费金额 - // */ - // ALL_SELF_PAY(10, 2, "先行自付金额"), - // - // /** - // * 医疗工伤支付 - // */ - // YL_GS_PAY(11, 2, "医疗工伤支付"), - // - // /** - // * 老红军支付 - // */ - // YB_HJ_PAY(12, 2, "老红军支付"), - // - // /** - // * 离休人员医疗保障基金支付金额 - // */ - // YB_LTX_PAY(13, 2, "离休人员医疗保障基金支付金额"), - // - // /** - // * 居民统筹 - // */ - // YB_JM_TC_PAY(14, 2, "居民统筹"), - // /** - // * 居民大病 - // */ - // YB_JM_DB_PAY(15, 2, "居民大病"), - // /** - // * 补充医疗补助基金支付金额 - // */ - // YB_BC_PAY(16, 2, "补充医疗补助基金支付金额"), - // /** - // * 其他扶贫报销金额 - // */ - // YB_OTHER_FP_PAY(17, 2, "其他扶贫报销金额"), - // /** - // * 健康扶贫医疗基金 - // */ - // YB_JK_FP_PAY(18, 2, "健康扶贫医疗基金"), - // /** - // * 精准脱贫保险金额 - // */ - // YB_JZ_TP_PAY(19, 2, "精准脱贫保险金额"), - // /** - // * 提交医保总额 - // */ - // YB_SUM_FEE(20, 2, "提交医保总额"), - // /** - // * 二乙医疗专项医疗基金支出 - // */ - // YB_EY_PAY(21, 2, "二乙医疗专项医疗基金支出"), - // /** - // * 慢特病支付 - // */ - // YB_TM_PAY(22, 2, "补充医疗补助基金支付金额"), - // /** - // * 定点医疗机构垫支 - // */ - // YB_ORG_PAY(23, 2, "定点医疗机构垫支"), - // /** - // * 起付线公务员返还 - // */ - // YB_RETURN_GWY_PAY(24, 2, "起付线公务员返还"), - // /** - // * 大额理赔金额 - // */ - // YB_DELP_PAY(25, 2, "大额理赔金额"), - // /** - // * 民政救助金额 - // */ - // YB_MZJZ_PAY(26, 2, "民政救助金额"), - // /** - // * 生育基金支付 - // */ - // BIRTH_TC_PAY_AMOUNT(27, 1, "生育基金支付"), - // /** - // * 生育账户支付 - // */ - // BIRTH_ZH_PAY_AMOUNT(28, 1, "生育账户支付"), - // /** - // * 符合范围金额 - // */ - // YB_FHFW_AMOUNT(29, 2, "符合范围金额"), - // /** - // * 财政兜底基金支出 - // */ - // YB_CZDD_AMOUNT(30, 2, "财政兜底基金支出"); - @EnumValue - private Integer value; - private Integer level; - private YbPayment payment; - private String info; - - public static YbPayment getByValue(Integer value) { - if (value == null) { - return null; - } - for (YbPayment val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPharmacistTitle.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPharmacistTitle.java deleted file mode 100755 index f870a6a5a..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPharmacistTitle.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 审方药师职称枚举 - * - * @author liuhr - * @date 2025-04-22 - */ -@Getter -@AllArgsConstructor -public enum YbPharmacistTitle { - - /** - * 执业药师 - */ - LICENSED_PHARMACIST("1", "执业药师"), - - /** - * 卫生技术职称 - */ - HEALTH_TECH_TITLE("2", "卫生技术职称"), - - /** - * 主任药师 - */ - CHIEF_PHARMACIST("2.1", "主任药师"), - - /** - * 副主任药师 - */ - DEPUTY_CHIEF_PHARMACIST("2.2", "副主任药师"), - - /** - * 主管药师 - */ - SENIOR_PHARMACIST("2.3", "主管药师"), - - /** - * 药师 - */ - PHARMACIST("2.4", "药师"), - - /** - * 药士 - */ - JUNIOR_PHARMACIST("2.5", "药士"); - - private String value; - private String description; - - public static YbPharmacistTitle getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbPharmacistTitle title : values()) { - if (title.getValue().equals(value)) { - return title; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPrescriptionItemType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPrescriptionItemType.java deleted file mode 100755 index c63471889..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPrescriptionItemType.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 处方项目分类代码枚举 - * - * @author YourName - * @date 2025-04-21 - */ -@Getter -@AllArgsConstructor -public enum YbPrescriptionItemType { - - /** - * 西药 - */ - WESTERN_MEDICINE("11", "西药"), - - /** - * 中成药 - */ - TRADITIONAL_CHINESE_MEDICINE_PREPARATION("12", "中成药"), - - /** - * 中药饮片 - */ - CHINESE_MATERIAL_MEDICATED("13", "中药饮片"); - - private String value; - private String description; - - public static YbPrescriptionItemType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbPrescriptionItemType type : values()) { - if (type.getValue().equals(value)) { - return type; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPrescriptionStatus.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPrescriptionStatus.java deleted file mode 100755 index fcd2ca74f..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPrescriptionStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医保电子处方状态枚举 - * - * @author liuhr - * @date 2025-04-22 - */ -@Getter -@AllArgsConstructor -public enum YbPrescriptionStatus { - - /** - * 有效 - */ - VALID("1", "有效"), - - /** - * 已失效 - */ - EXPIRED("2", "已失效"), - - /** - * 已撤销 - */ - REVOKED("3", "已撤销"), - - /** - * 已作废 - */ - INVALID("4", "已作废"); - - private String value; - private String description; - - public static YbPrescriptionStatus getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbPrescriptionStatus status : values()) { - if (status.getValue().equals(value)) { - return status; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPsnCertType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPsnCertType.java deleted file mode 100755 index 291a97309..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPsnCertType.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 7.13 人员证件类型(psn_cert_type) - * - * @author SunJQ - * @date 2025-04-10 - */ -@Getter -@AllArgsConstructor -public enum YbPsnCertType { - - /** - * 中国护照 - */ - PSN_CERT_TYPE16("16", "中国护照"), - /** - * 港澳台居民居住证 - */ - PSN_CERT_TYPE17("17", "港澳台居民居住证"), - /** - * 居民身份证(户口簿) - */ - PSN_CERT_TYPE01("01", "居民身份证(户口簿)"), - /** - * 中国人民解放军军官证 - */ - PSN_CERT_TYPE02("02", "中国人民解放军军官证"), - /** - * 中国人民武装警察警官证 - */ - PSN_CERT_TYPE03("03", "中国人民武装警察警官证"), - /** - * 香港特区护照/港澳居民来往内地通行证 - */ - PSN_CERT_TYPE04("04", "香港特区护照/港澳居民来往内地通行证"), - /** - * 澳门特区护照/港澳居民来往内地通行证 - */ - PSN_CERT_TYPE05("05", "澳门特区护照/港澳居民来往内地通行证"), - /** - * 台湾居民来往大陆通行证 - */ - PSN_CERT_TYPE06("06", "台湾居民来往大陆通行证"), - /** - * 外国人永久居留证 - */ - PSN_CERT_TYPE07("07", "外国人永久居留证"), - /** - * 外国人护照 - */ - PSN_CERT_TYPE08("08", "外国人护照"), - /** - * MEMBER_FIRST - */ - PSN_CERT_TYPE09("09", "残疾人证"), - /** - * 军烈属证明 - */ - PSN_CERT_TYPE10("10", "军烈属证明"), - /** - * 外国人就业证 - */ - PSN_CERT_TYPE11("11", "外国人就业证"), - /** - * 外国专家证 - */ - PSN_CERT_TYPE12("12", "外国专家证"), - /** - * 外国人常驻记者证 - */ - PSN_CERT_TYPE13("13", "外国人常驻记者证"), - /** - * 台港澳人员就业证 - */ - PSN_CERT_TYPE14("14", "台港澳人员就业证"), - /** - * 回国(来华)定居专家证 - */ - PSN_CERT_TYPE15("15", "回国(来华)定居专家证"), - /** - * 社会保障卡 - */ - PSN_CERT_TYPE90("90", "社会保障卡"), - /** - * 其他身份证件 - */ - PSN_CERT_TYPE99("99", "其他身份证件"); - - private String value; - private String description; - - public static YbPsnCertType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbPsnCertType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPsnSetlWay.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPsnSetlWay.java deleted file mode 100755 index 1f2f1d04b..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbPsnSetlWay.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 医保个人结算方式 - * - * @author SunJQ - * @date 2025-04-14 - */ -@Getter -@AllArgsConstructor -public enum YbPsnSetlWay { - - /** - * 按项目结算 - */ - PSN_SETLWAY01("01", "按项目结算"), - /** - * 按定额结算 - */ - PSN_SETLWAY02("02", "按定额结算"); - - private String value; - private String description; - - public static YbPsnSetlWay getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbPsnSetlWay val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbRxFlag.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbRxFlag.java deleted file mode 100755 index a37c6ebd9..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbRxFlag.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 处方标记【rx_flag】 - * - * @author SunJQ - * @date 2025-04-17 - */ -@Getter -@AllArgsConstructor -public enum YbRxFlag { - - // 否 - WESTERN_AND_CHINESE_PATENT_MEDICINE(0, "0","否"), - // 是 - IMPORTANT_HERBAL_SLICES(1, "1","是"), - // 双跨 - SELF_PREPARED_MEDICATION(2, "2","双跨"); - - private final int code; - private final String value; - private final String name; - - public static YbRxFlag getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbRxFlag val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbRxItemTypeCode.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbRxItemTypeCode.java deleted file mode 100755 index c667bf36b..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbRxItemTypeCode.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 处方项目分类代码 - * - * @author liuhr - * @date 2025-05-13 - */ -@Getter -@AllArgsConstructor -public enum YbRxItemTypeCode { - - /** - * 西药 - */ - WESTERN_MEDICINE("11", "西药"), - /** - * 中成药 - */ - CHINESE_PATENT_MEDICINE("12", "中成药"), - /** - * 中药饮片 - */ - CHINESE_MATERIA_MEDICA_SLICES("13", "中药饮片"), - /** - * 治疗 - */ - TREATMENT("21", "治疗"), - /** - * 检验 - */ - LAB_TEST("22", "检验"), - /** - * 检查 - */ - MEDICAL_IMAGING("23", "检查"), - /** - * 手术 - */ - SURGERY("24", "手术"), - /** - * 麻醉 - */ - ANESTHESIA("25", "麻醉"), - /** - * 护理 - */ - NURSING("26", "护理"), - /** - * 膳食 - */ - DIET("27", "膳食"), - /** - * 输血 - */ - BLOOD_TRANSFUSION("28", "输血"), - /** - * 输氧 - */ - OXYGEN_THERAPY("29", "输氧"), - /** - * 其他 - */ - OTHER("31", "其他"), - /** - * 转科 - */ - REFERRAL3("2", "转科"), - /** - * 术后 - */ - POST_OPERATIVE("33", "术后"), - /** - * 出院 - */ - DISCHARGE("34", "出院"), - /** - * 转院 - */ - TRANSFER("35", "转院"), - /** - * 死亡 - */ - DEATH("36", "死亡"), - /** - * 产后 - */ - POSTPARTUM("37", "产后"); - - private String value; - private String description; - - public static YbRxItemTypeCode getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbRxItemTypeCode val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbTrigScen.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbTrigScen.java deleted file mode 100755 index 4a18b61db..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbTrigScen.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 触发场景 - * - * @author Thanking - */ -@Getter -@AllArgsConstructor -public enum YbTrigScen { - - /** - * 门诊挂号 - */ - OUTPATIENT_REGISTRATION("1", "门诊挂号"), - /** - * 门诊收费登记 - */ - OUTPATIENT_CHARGE_REGISTRATION("2", "门诊收费登记"), - /** - * 住院登记 - */ - HOSPITALIZATION_REGISTRATION("3", "住院登记"), - /** - * 住院收费登记 - */ - HOSPITALIZATION_CHARGE_REGISTRATION("4", "住院收费登记"), - /** - * 住院执行医嘱 - */ - HOSPITALIZATION_ORDER_EXECUTION("5", "住院执行医嘱"), - /** - * 门诊结算 - */ - OUTPATIENT_SETTLEMENT("6", "门诊结算"), - /** - * 门诊预结算 - */ - OUTPATIENT_PRE_SETTLEMENT("7", "门诊预结算"), - /** - * 住院结算 - */ - HOSPITALIZATION_SETTLEMENT("8", "住院结算"), - /** - * 住院预结算 - */ - HOSPITALIZATION_PRE_SETTLEMENT("9", "住院预结算"), - /** - * 药店划卡 - */ - PHARMACY_CARD("10", "药店划卡"); - - private String value; - private String description; - - public static YbTrigScen getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbTrigScen val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbUsedFrqu.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbUsedFrqu.java deleted file mode 100755 index 7723ea826..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbUsedFrqu.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -/** - * UsedFrquEnum - * - * @author Wuser - * @date 2025/4/21 - */ -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 使用频次枚举 - * - * @author YourName - * @date 2025-04-21 - */ -@Getter -@AllArgsConstructor -public enum YbUsedFrqu { - - DAILY_ONCE("11", "每天1次 (qd)"), - - DAILY_TWICE("12", "每天2次 (bid)"), - - DAILY_THRICE("13", "每天3次 (tid)"), - - DAILY_FOUR_TIMES("14", "每天4次 (qid)"), - - WEEKLY_ONCE("21", "每周1次 (qw)"), - - WEEKLY_TWICE("22", "每周2次 (biw)"), - - WEEKLY_THRICE("23", "每周3次 (tiw)"), - - EVERY_TWO_WEEKS("24", "每2周1次 (q2w)"), - - EVERY_HOUR("31", "每小时1次 (qh)"), - - EVERY_TWO_HOURS("32", "每2小时1次 (q2h)"), - - EVERY_FOUR_HOURS("33", "每4小时1次 (q4h)"), - - EVERY_FIVE_HOURS("34", "每5小时1次 (q5h)"), - - EVERY_SIX_HOURS("35", "每6小时1次 (q6h)"), - - EVERY_EIGHT_HOURS("36", "每8小时1次 (q8h)"), - - EVERY_TWELVE_HOURS("37", "每12小时1次 (q12h)"), - - EVERY_NIGHT("41", "每晚1次 (qn)"), - - EVERY_OTHER_DAY("42", "隔天1次 (qod)"), - - EVERY_FIVE_DAYS("43", "5天1次 (q5d)"), - - EVERY_TEN_DAYS("44", "10天1次 (q10d)"), - - EVERY_THREE_DAYS("45", "隔3日1次 (q3d)"), - - TWELVE_HOUR_MAINTAIN("51", "12小时维持"), - - TWENTY_FOUR_HOUR_MAINTAIN("52", "24小时维持"), - - IMMEDIATELY("61", "立即 (st)"), - - WHEN_NEEDED("62", "必要时使用 (prn)"), - - ONCE("63", "1次 (once)"), - - MONTHLY_ONCE("71", "每月1次 (qm)"), - - MONTHLY_TWICE("72", "每月2次 (bim)"), - - EVERY_THREE_MONTHS("73", "每3个月1次 (q3m)"), - - EVERY_SIX_MONTHS("74", "每6个月1次 (q6m)"); - - private String value; - private String description; - - public static YbUsedFrqu getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbUsedFrqu frqu : values()) { - if (frqu.getValue().equals(value)) { - return frqu; - } - } - return null; - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbWarnType.java b/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbWarnType.java deleted file mode 100755 index 265cdfe4d..000000000 --- a/healthlink-his-server/healthlink-his-common/src/main/java/com/healthlink/his/common/enums/ybenums/YbWarnType.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.healthlink.his.common.enums.ybenums; - -import com.github.pagehelper.util.StringUtil; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 反馈类型 - * - * @author Thanking - */ -@Getter -@AllArgsConstructor -public enum YbWarnType { - - /** - * 事前 - */ - PRE("1", "事前"), - /** - * 事中 - */ - MID("2", "事中"); - - private String value; - private String description; - - public static YbWarnType getByValue(String value) { - if (StringUtil.isEmpty(value)) { - return null; - } - for (YbWarnType val : values()) { - if (val.getValue().equals(value)) { - return val; - } - } - return null; - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/IEncounterDiagnosisService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/IEncounterDiagnosisService.java index efe6b1b98..02e429a6d 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/IEncounterDiagnosisService.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/IEncounterDiagnosisService.java @@ -2,7 +2,7 @@ package com.healthlink.his.administration.service; import com.baomidou.mybatisplus.extension.service.IService; import com.healthlink.his.administration.domain.EncounterDiagnosis; -import com.healthlink.his.common.enums.ybenums.YbIptDiseTypeCode; +import com.healthlink.his.yb.enums.YbIptDiseTypeCode; import java.util.List; diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/EncounterDiagnosisServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/EncounterDiagnosisServiceImpl.java index dd2f47569..e66c16c91 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/EncounterDiagnosisServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/EncounterDiagnosisServiceImpl.java @@ -7,7 +7,7 @@ import com.healthlink.his.administration.mapper.EncounterDiagnosisMapper; import com.healthlink.his.administration.service.IEncounterDiagnosisService; import com.healthlink.his.clinical.mapper.ConditionMapper; import com.healthlink.his.common.enums.Whether; -import com.healthlink.his.common.enums.ybenums.YbIptDiseTypeCode; +import com.healthlink.his.yb.enums.YbIptDiseTypeCode; import org.springframework.stereotype.Service; import jakarta.annotation.Resource; diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/crosssystem/utils/CrossSystemSendApplyUtil.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/crosssystem/utils/CrossSystemSendApplyUtil.java index c3186d483..bedd4df9e 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/crosssystem/utils/CrossSystemSendApplyUtil.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/crosssystem/utils/CrossSystemSendApplyUtil.java @@ -7,7 +7,7 @@ import com.core.common.enums.TenantOptionDict; import com.core.common.exception.ServiceException; import com.core.common.utils.DateUtils; import com.core.common.utils.StringUtils; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.common.utils.CommonUtil; import com.healthlink.his.crosssystem.dto.*; import com.healthlink.his.crosssystem.enums.LisAgeUnit; diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/IPaymentReconciliationService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/IPaymentReconciliationService.java index df3e85ae1..28953e7fc 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/IPaymentReconciliationService.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/IPaymentReconciliationService.java @@ -3,7 +3,7 @@ package com.healthlink.his.financial.service; import com.baomidou.mybatisplus.extension.service.IService; import com.healthlink.his.common.enums.PaymentKind; import com.healthlink.his.common.enums.PaymentStatus; -import com.healthlink.his.common.enums.ybenums.YbMdtrtCertType; +import com.healthlink.his.yb.enums.YbMdtrtCertType; import com.healthlink.his.financial.domain.Contract; import com.healthlink.his.financial.domain.PaymentReconciliation; import com.healthlink.his.financial.model.PaymentReconciliationAccountDel; diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/impl/PaymentReconciliationServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/impl/PaymentReconciliationServiceImpl.java index d298adb44..faf5fa3bc 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/impl/PaymentReconciliationServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/financial/service/impl/PaymentReconciliationServiceImpl.java @@ -22,10 +22,10 @@ import com.healthlink.his.common.constant.YbCommonConstants; import com.healthlink.his.common.enums.ItemType; import com.healthlink.his.common.enums.PaymentKind; import com.healthlink.his.common.enums.PaymentStatus; -import com.healthlink.his.common.enums.ybenums.YbChrgitmLv; -import com.healthlink.his.common.enums.ybenums.YbMdtrtCertType; -import com.healthlink.his.common.enums.ybenums.YbMedChrgItmType; -import com.healthlink.his.common.enums.ybenums.YbMedType; +import com.healthlink.his.yb.enums.YbChrgitmLv; +import com.healthlink.his.yb.enums.YbMdtrtCertType; +import com.healthlink.his.yb.enums.YbMedChrgItmType; +import com.healthlink.his.yb.enums.YbMedType; import com.healthlink.his.financial.domain.Contract; import com.healthlink.his.financial.domain.PaymentReconciliation; import com.healthlink.his.financial.mapper.PaymentReconciliationMapper; @@ -43,7 +43,7 @@ import com.healthlink.his.yb.dto.ClinicReg2201Output; import com.healthlink.his.yb.dto.PaymentInpatientDto; import com.healthlink.his.yb.dto.Yb2304OutputSetlInfo; import com.healthlink.his.yb.model.Clinic2207OrderModel; -import com.healthlink.his.yb.service.YbManager; +import com.healthlink.his.yb.service.IYbManager; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -72,7 +72,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl().eq(InfoPerson::getPsnNo, regResult.getPsnNo()) - .orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1)); - clinicReg.setInsuplcAdmdvs(one.getInsuplcAdmdvs()).setDeleteFlag(DelFlag.NO.getCode()); - iRegService.save(clinicReg); - } - - /** - * 退号变更挂号状态 - * - * @param regResult - */ - public void UpdateRegByMdtrtId(ClinicReg regResult) { - if (StringUtils.isEmpty(regResult.getMdtrtId())) { - throw new ServiceException("医保挂号编号为空"); - } - ClinicReg one - = iRegService.getOne(new LambdaQueryWrapper().eq(ClinicReg::getMdtrtId, regResult.getMdtrtId())); - if (one == null) { - throw new ServiceException("查询医保信息为空"); - } - iRegService.updateStatus(one.getId(), YbCommonConstants.ClincStatusConst.CANCLE); - } - - /** - * 【2203】就诊信息上传 - * - * @param encounterId 就诊id - * @param tenantId 租户 - * @return 【2203】就诊信息 - */ - public Clinic2203MedicalParam getClinicMedical2203Param(Long encounterId, Integer tenantId, - ClinicReg2201Output reg2201Output, YbMedType ybMedType) { - return ybUtil.getClinicMedical2203Param(encounterId, tenantId, reg2201Output, ybMedType); - } - - /** - * 【2204】诊断信息上传 - * - * @param tenantId 租户id - * @param paymentedItemList 收费项id集合 - * @return 【2204】参数 - */ - public Clinic2204OrderParam getClinicOrder2204Param(Integer tenantId, List paymentedItemList, - ClinicReg2201Output reg2201Output) { - return ybUtil.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output); - } - - /** - * 【2206】预结算 - * - * @param payFee 应收金额 - * @param chrgBchno 收费批次号(payment的busNo) - * @return 【2206】预结算 - */ - public Clinic2206OrderParam getClinicOrder2206Param(BigDecimal payFee, ClinicReg2201Output reg, String chrgBchno, - String busiCardInfo) { - return ybUtil.getClinicOrder2206Param(payFee, reg, chrgBchno, busiCardInfo); - } - - /** - * 【2205】费用明细撤销 - * - * @param encounterId 就诊id - * @param chrgBchno 收费批次号 - * @return 【2205】参数 - */ - public Clinic2205OrderParam getClinic2205OrderParam(Long encounterId, String chrgBchno) { - return ybUtil.getClinic2205OrderParam(encounterId, chrgBchno); - } - - /** - * 【2207】结算 - * - * @param encounterId 就诊id - * @param tenantId 租户id - * @param psnSetlWay 支付方式 - * @param chrgBchno 收费批次号(payment的busNo) - * @return 【2207】结算 - */ - public Clinic2207OrderParam getClinicOrder2207(Long encounterId, Integer tenantId, String psnSetlWay, - String chrgBchno, String medType) { - return ybUtil.getClinicOrder2207(encounterId, tenantId, psnSetlWay, chrgBchno, medType); - } - - /** - * 保存数据 - * - * @param paymentNo 首款业务流水号 - * @param clinicOrder2207 2207入参 - * @param clinic2207OrderResult 2207出参 - */ - public void saveClinic2207OrderResult(String paymentNo, Clinic2207OrderParam clinicOrder2207, - Clinic2207OrderModel clinic2207OrderResult) { - // 保存结算信息 - ClinicSettle clinicSettle = new ClinicSettle(); - BeanUtils.copyProperties(clinic2207OrderResult, clinicSettle); - clinicSettle.setParam2207(JsonUtils.toJson(clinicOrder2207)) - .setResult2207(JsonUtils.toJson(clinic2207OrderResult)); - iClinicSettleService.save(clinicSettle); - } - - /** - * 保存数据 - * - * @param settleId 医保结算id - * @param clinicOrder2207 2207入参 - * @param clinic2207OrderResult 2207出参 - */ - public void saveUnSettleRecord(String settleId, Clinic2208UnSetlInfoParam clinicOrder2207, - Clinic2208UnSetlInfoOutput clinic2207OrderResult) { - - ClinicUnSettle clinicSettle = new ClinicUnSettle(); - BeanUtils.copyProperties(clinic2207OrderResult, clinicSettle); - clinicSettle.setParam2208(JsonUtils.toJson(clinicOrder2207)) - .setResult2208(JsonUtils.toJson(clinic2207OrderResult)).setSettleId(clinic2207OrderResult.getSetlId()); - // 保存结算信息 - iClinicUnSettleService.save(clinicSettle); - } - - /** - * 反结 - * - * @param paymentReconciliation 付款实体 - */ - private void saveUnPaymentDetail(PaymentReconciliation paymentReconciliation) { - List paymentRecDetails - = iPaymentRecDetailService.list(new LambdaQueryWrapper() - .eq(PaymentRecDetail::getReconciliationId, paymentReconciliation.getId())); - // 新增详情信息 - PaymentRecDetail paymentRecDetail; - List addDetailList = new ArrayList<>(); - for (PaymentRecDetail paymentDetail : paymentRecDetails) { - paymentRecDetail = new PaymentRecDetail(); - com.core.common.utils.bean.BeanUtils.copyProperties(paymentDetail, paymentRecDetail); - paymentRecDetail.setPredecessorId(paymentReconciliation.getId()); - paymentRecDetail.setAccountId(paymentDetail.getAccountId() == null ? 0 : paymentDetail.getAccountId()); - paymentRecDetail.setResultEnum(PaymentResult.REFUNDED.getValue()); - paymentRecDetail.setAmount(paymentRecDetail.getAmount().multiply(new BigDecimal("-1"))); - addDetailList.add(paymentRecDetail); - } - iPaymentRecDetailService.saveBatch(addDetailList); - - // 修改详情信息 - List list = new ArrayList<>(); - for (PaymentRecDetail item : paymentRecDetails) { - item.setResultEnum(1); - list.add(item); - } - iPaymentRecDetailService.updateBatchById(list); - } - - /** - * 根据医保2207结果和前台参数添加结算记录 - * - * @param clinicOrder2207Result - * @param payment - * @param paymentDetails - */ - private void saveBy2207Result(Clinic2207OrderResult clinicOrder2207Result, PaymentReconciliation payment, - List paymentDetails) { - // 保存付款详情 - List paymentRecDetails = new ArrayList<>(); - BigDecimal amount = BigDecimal.ZERO; - String AccountEnum = "04"; - Account account = accountService.getById(payment.getAccountId()); - AccountEnum = account.getTypeCode(); - PaymentRecDetail paymentRecDetail; - for (PaymentDetailDto paymentDetail : paymentDetails) { - paymentRecDetail = new PaymentRecDetail(); - if (YbPayment.SELF_CASH_VX_VALUE.getValue().equals(paymentDetail.getPayEnum())) { - paymentRecDetail.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_CASH_VX_VALUE.getValue()) - .setPayLevelEnum(YbPayment.SELF_CASH_VX_VALUE.getLevel()).setAmount(paymentDetail.getAmount()) - .setResultEnum(PaymentResult.PAID.getValue()); - } - if (YbPayment.SELF_CASH_ALI_VALUE.getValue().equals(paymentDetail.getPayEnum())) { - paymentRecDetail.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_CASH_ALI_VALUE.getValue()) - .setPayLevelEnum(YbPayment.SELF_CASH_ALI_VALUE.getLevel()).setAmount(paymentDetail.getAmount()) - .setResultEnum(PaymentResult.PAID.getValue()); - } - if (YbPayment.SELF_CASH_UNION_VALUE.getValue().equals(paymentDetail.getPayEnum())) { - paymentRecDetail.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_CASH_UNION_VALUE.getValue()) - .setPayLevelEnum(YbPayment.SELF_CASH_UNION_VALUE.getLevel()).setAmount(paymentDetail.getAmount()) - .setResultEnum(PaymentResult.PAID.getValue()); - } - if (YbPayment.SELF_CASH_VALUE.getValue().equals(paymentDetail.getPayEnum())) { - paymentRecDetail.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_CASH_VALUE.getValue()) - .setPayLevelEnum(YbPayment.SELF_CASH_VALUE.getLevel()).setAmount(paymentDetail.getAmount()) - .setResultEnum(PaymentResult.PAID.getValue()); - } - paymentRecDetails.add(paymentRecDetail); - amount = amount.add(paymentDetail.getAmount()); - } - // 个人现金支出 - BigDecimal psnCashPay = clinicOrder2207Result.getPsnCashPay(); - if (psnCashPay.compareTo(amount) != 0) { - throw new ServiceException("金额校验失败"); - } - PaymentRecDetail paymentRecDetail10 = new PaymentRecDetail(); - paymentRecDetail10.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_CASH_VALUE.getValue()).setPayLevelEnum(YbPayment.SELF_CASH_VALUE.getLevel()) - .setAmount(psnCashPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail10); - // 个人负担总金额 - BigDecimal psnPartAmt = clinicOrder2207Result.getPsnPartAmt(); - PaymentRecDetail paymentRecDetail1 = new PaymentRecDetail(); - paymentRecDetail1.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_PAY.getValue()).setPayLevelEnum(YbPayment.SELF_PAY.getLevel()) - .setAmount(psnPartAmt).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail1); - // 基本医疗保险统筹基金支出 - BigDecimal hifpPay = clinicOrder2207Result.getHifpPay(); - PaymentRecDetail paymentRecDetail2 = new PaymentRecDetail(); - paymentRecDetail2.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_TC_FUND_AMOUNT.getValue()).setPayLevelEnum(YbPayment.YB_TC_FUND_AMOUNT.getLevel()) - .setAmount(hifpPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail2); - // 公务员医疗补助资金支出 - BigDecimal cvlservPay = clinicOrder2207Result.getCvlservPay(); - PaymentRecDetail paymentRecDetail3 = new PaymentRecDetail(); - paymentRecDetail3.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_GWY_BZ_VALUE.getValue()) - .setPayLevelEnum(YbPayment.YB_BC_GWY_BZ_VALUE.getLevel()).setAmount(cvlservPay) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail3); - // 企业补充医疗保险基金支出 - BigDecimal hifesPay = clinicOrder2207Result.getHifesPay(); - PaymentRecDetail paymentRecDetail4 = new PaymentRecDetail(); - paymentRecDetail4.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_FUND_AMOUNT.getValue()).setPayLevelEnum(YbPayment.YB_BC_FUND_AMOUNT.getLevel()) - .setAmount(hifesPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail4); - // 居民大病保险资金支出 - BigDecimal hifmiPay = clinicOrder2207Result.getHifmiPay(); - PaymentRecDetail paymentRecDetail5 = new PaymentRecDetail(); - paymentRecDetail5.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_JM_DB_VALUE.getValue()).setPayLevelEnum(YbPayment.YB_BC_JM_DB_VALUE.getLevel()) - .setAmount(hifmiPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail5); - // 职工大额医疗费用补助基金支出 - BigDecimal hifobPay = clinicOrder2207Result.getHifobPay(); - PaymentRecDetail paymentRecDetail6 = new PaymentRecDetail(); - paymentRecDetail6.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_ZG_DE_BZ_VALUE.getValue()) - .setPayLevelEnum(YbPayment.YB_BC_ZG_DE_BZ_VALUE.getLevel()).setAmount(hifobPay) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail5); - // 职工大额医疗费用补助基金支出 - BigDecimal mafPay = clinicOrder2207Result.getMafPay(); - PaymentRecDetail paymentRecDetail7 = new PaymentRecDetail(); - paymentRecDetail7.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_JZ_FUND_AMOUNT.getValue()).setPayLevelEnum(YbPayment.YB_JZ_FUND_AMOUNT.getLevel()) - .setAmount(mafPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail7); - // 其他支出 - BigDecimal othPay = clinicOrder2207Result.getOthPay(); - PaymentRecDetail paymentRecDetail8 = new PaymentRecDetail(); - paymentRecDetail8.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.OTHER_PAY.getValue()).setPayLevelEnum(YbPayment.OTHER_PAY.getLevel()) - .setAmount(othPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail8); - // 基金支付总额 - BigDecimal fundPaySumamt = clinicOrder2207Result.getFundPaySumamt(); - PaymentRecDetail paymentRecDetail9 = new PaymentRecDetail(); - paymentRecDetail9.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_FUND_PAY.getValue()).setPayLevelEnum(YbPayment.YB_FUND_PAY.getLevel()) - .setAmount(fundPaySumamt).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail9); - // 个人账户支出 - BigDecimal acctPay = clinicOrder2207Result.getAcctPay(); - PaymentRecDetail paymentRecDetail11 = new PaymentRecDetail(); - paymentRecDetail11.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_YB_ZH_PAY.getValue()).setPayLevelEnum(YbPayment.SELF_YB_ZH_PAY.getLevel()) - .setAmount(acctPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail11); - // 医院负担金额 - BigDecimal hospPartAmt = clinicOrder2207Result.getHospPartAmt(); - PaymentRecDetail paymentRecDetail12 = new PaymentRecDetail(); - paymentRecDetail12.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.OTHER_PAY.getValue()).setPayLevelEnum(YbPayment.OTHER_PAY.getLevel()) - .setAmount(hospPartAmt).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail12); - // 个人账户共济支付金额 - BigDecimal acctMulaidPay = clinicOrder2207Result.getAcctMulaidPay(); - PaymentRecDetail paymentRecDetail13 = new PaymentRecDetail(); - paymentRecDetail13.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_YB_ZH_GJ_VALUE.getValue()) - .setPayLevelEnum(YbPayment.SELF_YB_ZH_GJ_VALUE.getLevel()).setAmount(acctMulaidPay) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail13); - for (Clinic2206FundPaymentResult clinic2206FundPaymentResult : clinicOrder2207Result.getSetldetail()) { - PaymentRecDetail detail = new PaymentRecDetail(); - YbPayment ybPayment = YbPayment.getByValue(Integer.parseInt(clinic2206FundPaymentResult.getFundPayType())); - detail.setReconciliationId(payment.getId()).setAccountCode(AccountEnum).setPayEnum(ybPayment.getValue()) - .setPayLevelEnum(ybPayment.getLevel()) - .setAmount(new BigDecimal(clinic2206FundPaymentResult.getFundPayamt().toString())) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(detail); - } - - } - - /** - * 根据医保2207结果和前台参数添加结算记录(弃用)该方法内赋值有错误,若启用或copy需要重新定义里面的赋值内容 - * - * @param clinic2208UnSetlInfoResult - * @param payment - * @param paymentDetails - */ - private void saveBy2208Result(Clinic2208UnSetlInfoResult clinic2208UnSetlInfoResult, PaymentReconciliation payment, - List paymentDetails) { - // 保存付款详情 todo:医保反结是否是负数 - ArrayList paymentRecDetails = new ArrayList<>(); - BigDecimal amount = BigDecimal.ZERO; - String AccountEnum = "04"; - for (PaymentDetailDto paymentDetail : paymentDetails) { - PaymentRecDetail paymentRecDetail = new PaymentRecDetail(); - com.core.common.utils.bean.BeanUtils.copyProperties(paymentDetail, paymentRecDetail); - paymentRecDetail.setReconciliationId(payment.getId()); - paymentRecDetail.setPredecessorId(payment.getId()); - paymentRecDetail.setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail); - amount = amount.add(paymentDetail.getAmount()); - } - // 个人负担总金额 - BigDecimal psnPartAmt = clinic2208UnSetlInfoResult.getPsnPartAmt(); - PaymentRecDetail paymentRecDetail1 = new PaymentRecDetail(); - paymentRecDetail1.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_PAY.getValue()).setPayLevelEnum(YbPayment.SELF_PAY.getLevel()) - .setAmount(psnPartAmt).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail1); - // 基本医疗保险统筹基金支出 - BigDecimal hifpPay = clinic2208UnSetlInfoResult.getHifpPay(); - PaymentRecDetail paymentRecDetail2 = new PaymentRecDetail(); - paymentRecDetail2.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_TC_FUND_AMOUNT.getValue()).setPayLevelEnum(YbPayment.YB_TC_FUND_AMOUNT.getLevel()) - .setAmount(hifpPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail2); - // 公务员医疗补助资金支出 - BigDecimal cvlservPay = clinic2208UnSetlInfoResult.getCvlservPay(); - PaymentRecDetail paymentRecDetail3 = new PaymentRecDetail(); - paymentRecDetail3.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_GWY_BZ_VALUE.getValue()) - .setPayLevelEnum(YbPayment.YB_BC_GWY_BZ_VALUE.getLevel()).setAmount(cvlservPay) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail3); - // 企业补充医疗保险基金支出 - BigDecimal hifesPay = clinic2208UnSetlInfoResult.getHifesPay(); - PaymentRecDetail paymentRecDetail4 = new PaymentRecDetail(); - paymentRecDetail4.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_FUND_AMOUNT.getValue()).setPayLevelEnum(YbPayment.YB_BC_FUND_AMOUNT.getLevel()) - .setAmount(hifesPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail4); - // 居民大病保险资金支出 - BigDecimal hifmiPay = clinic2208UnSetlInfoResult.getHifmiPay(); - PaymentRecDetail paymentRecDetail5 = new PaymentRecDetail(); - paymentRecDetail5.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_JM_DB_VALUE.getValue()).setPayLevelEnum(YbPayment.YB_BC_JM_DB_VALUE.getLevel()) - .setAmount(hifmiPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail5); - // 职工大额医疗费用补助基金支出 - BigDecimal hifobPay = clinic2208UnSetlInfoResult.getHifobPay(); - PaymentRecDetail paymentRecDetail6 = new PaymentRecDetail(); - paymentRecDetail6.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_BC_ZG_DE_BZ_VALUE.getValue()) - .setPayLevelEnum(YbPayment.YB_BC_ZG_DE_BZ_VALUE.getLevel()).setAmount(hifobPay) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail5); - // 职工大额医疗费用补助基金支出 - BigDecimal mafPay = clinic2208UnSetlInfoResult.getMafPay(); - PaymentRecDetail paymentRecDetail7 = new PaymentRecDetail(); - paymentRecDetail7.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_JZ_FUND_AMOUNT.getValue()).setPayLevelEnum(YbPayment.YB_JZ_FUND_AMOUNT.getLevel()) - .setAmount(mafPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail7); - // 其他支出 - BigDecimal othPay = clinic2208UnSetlInfoResult.getOthPay(); - PaymentRecDetail paymentRecDetail8 = new PaymentRecDetail(); - paymentRecDetail8.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.OTHER_PAY.getValue()).setPayLevelEnum(YbPayment.OTHER_PAY.getLevel()) - .setAmount(othPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail8); - // 基金支付总额 - BigDecimal fundPaySumamt = clinic2208UnSetlInfoResult.getFundPaySumamt(); - PaymentRecDetail paymentRecDetail9 = new PaymentRecDetail(); - paymentRecDetail9.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.YB_FUND_PAY.getValue()).setPayLevelEnum(YbPayment.YB_FUND_PAY.getLevel()) - .setAmount(fundPaySumamt).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail9); - // 个人账户支出 - BigDecimal acctPay = clinic2208UnSetlInfoResult.getAcctPay(); - PaymentRecDetail paymentRecDetail11 = new PaymentRecDetail(); - paymentRecDetail11.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_YB_ZH_PAY.getValue()).setPayLevelEnum(YbPayment.SELF_YB_ZH_PAY.getLevel()) - .setAmount(acctPay).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail11); - // 医院负担金额 - BigDecimal hospPartAmt = clinic2208UnSetlInfoResult.getHospPartAmt(); - PaymentRecDetail paymentRecDetail12 = new PaymentRecDetail(); - paymentRecDetail12.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.OTHER_PAY.getValue()).setPayLevelEnum(YbPayment.OTHER_PAY.getLevel()) - .setAmount(hospPartAmt).setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail12); - // 个人账户共济支付金额 - BigDecimal acctMulaidPay = clinic2208UnSetlInfoResult.getAcctMulaidPay(); - PaymentRecDetail paymentRecDetail13 = new PaymentRecDetail(); - paymentRecDetail13.setReconciliationId(payment.getId()).setAccountCode(AccountEnum) - .setPayEnum(YbPayment.SELF_YB_ZH_GJ_VALUE.getValue()) - .setPayLevelEnum(YbPayment.SELF_YB_ZH_GJ_VALUE.getLevel()).setAmount(acctMulaidPay) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(paymentRecDetail13); - for (Clinic2206FundPaymentResult clinic2206FundPaymentResult : clinic2208UnSetlInfoResult.getSetldetail()) { - PaymentRecDetail detail = new PaymentRecDetail(); - YbPayment ybPayment = YbPayment.getByValue(Integer.parseInt(clinic2206FundPaymentResult.getFundPayType())); - detail.setReconciliationId(payment.getId()).setAccountCode(AccountEnum).setPayEnum(ybPayment.getValue()) - .setPayLevelEnum(ybPayment.getLevel()) - .setAmount(new BigDecimal(clinic2206FundPaymentResult.getFundPayamt().toString())) - .setResultEnum(PaymentResult.PAID.getValue()); - paymentRecDetails.add(detail); - } - - } - - /** - * 保存预结算接口的记录信息 - * - * @param clinic2206OrderParam 2206医保入参 - * @param clinic2206OrderResult 2206医保输出 - * @param clinic2203MedicalParam 2203医保入参 - * @param clinic2204OrderParam 2204医保入参 - * @param clinic2204OrderResult 2204医保输出 - */ - public void saveClinicOrder2206Param(Clinic2206OrderParam clinic2206OrderParam, - Clinic2206OrderOutput clinic2206OrderResult, Clinic2203MedicalParam clinic2203MedicalParam, - Clinic2204OrderParam clinic2204OrderParam, Clinic2204OrderResult clinic2204OrderResult) { - - ClinicPreSettle clinicPreSettle = new ClinicPreSettle(); - BeanUtils.copyProperties(clinic2204OrderParam, clinicPreSettle); - BeanUtils.copyProperties(clinic2206OrderResult, clinicPreSettle); - clinicPreSettle.setParam2203(JsonUtils.toJson(clinic2203MedicalParam)) - .setParam2204(JsonUtils.toJson(clinic2204OrderParam)).setParam2206(JsonUtils.toJson(clinic2206OrderParam)) - .setResult2204(JsonUtils.toJson(clinic2204OrderResult)) - .setResult2206(JsonUtils.toJson(clinic2206OrderResult)).setChrgBchno(clinic2206OrderParam.getChrgBchno()) - .setMdtrtId(clinic2206OrderParam.getMdtrtId()).setPsnNo(clinic2206OrderParam.getPsnNo()) - .setDeleteFlag(DelFlag.NO.getCode()); - - iClinicPreSettleService.save(clinicPreSettle); - } - - /** - * 保存签到信息 - * - * @param signParam 【9001】参数 - * @param signResult 【9001】参数 - */ - public void saveSign(Sign signParam, Sign9001Result signResult) { - com.healthlink.his.yb.domain.Sign sign = new com.healthlink.his.yb.domain.Sign(); - BeanUtils.copyProperties(signParam, sign); - BeanUtils.copyProperties(signResult, sign); - sign.setSignNo(signResult.getSignNo()).setOpterNo(signParam.getOpterNo()); - iSignService.save(sign); - } - - /** - * 取消挂号 - * - * @param regResult 【2202】参数 - */ - public void saveUnReg(ClinicReg2201Output regResult) { - ClinicUnReg clinicUnReg = new ClinicUnReg(); - BeanUtils.copyProperties(regResult, clinicUnReg); - clinicUnReg.setUnRegTime(new Date()); - iClinicUnRegService.save(clinicUnReg); - } - - /** - * 【2208】医保反结算 - * - * @param tenantId 租户id - * @param settleId 结算id - * @return 【2208】参数 - */ - public Clinic2208UnSetlInfoParam getClinicOrder2208(Integer tenantId, String settleId) { - return ybUtil.getClinicOrder2208(tenantId, settleId); - } - - /** - * 【3301】目录对照 - * - * @param tableName 表名 - * @param id 主键 - * @return 【3301】入参 - */ - public MedicalDirectory3301Param getMedicalDirectory3301Param(String tableName, Long id) { - return ybUtil.getMedicalDirectory3301Param(tableName, id); - } - - /** - * 【3301】医保目录对照参数作成(药品) - * - * @param categoryCode 药品分类 - * @param busNo 药品编号 - * @param name 药品编号 - * @param ybNo 医保编码 - * @return 医保目录对照参数 - */ - public MedicalDirectory3301Param getMedicalDirectory3301ParamMedication(String categoryCode, String busNo, - String name, String ybNo) { - return ybUtil.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo); - } - - /** - * 【3302】目录对照撤销 - * - * @param tableName 表名 - * @param id 主键 - * @return - */ - public MedicalDirectory3302Param getMedicalDirectory3302Param(String tableName, Long id) { - return ybUtil.getMedicalDirectory3302Param(tableName, id); - } - - /** - * 【3302】医保目录对照撤销参数作成(药品) - * - * @param categoryCode 药品分类 - * @param busNo 药品编号 - * @param ybNo 医保编码 - * @return 医保目录对照撤销参数 - */ - public MedicalDirectory3302Param getMedicalDirectory3302ParamMedication(String categoryCode, String busNo, - String ybNo) { - return ybUtil.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo); - } - - /** - * 【3201】医药机构费用结算对总账 - * - * @param reconciliation3201Param 参数信息 - * @return 入参 - */ - public Financial3201Param getFinancial3201Param(Settlement3201WebParam reconciliation3201Param) { - String insuType = reconciliation3201Param.getInsuType(); - if (StringUtils.isEmpty(insuType)) { - // insuType = "310"; - // reconciliation3201Param.setInsuType("310"); - throw new ServiceException("请选择险种类型"); - } - String clrType = reconciliation3201Param.getClrType(); - if (StringUtils.isEmpty(clrType)) { - throw new ServiceException("请选择医疗类型:住院/门诊"); - } - String contractNo = reconciliation3201Param.getContractNo(); - if (StringUtils.isEmpty(contractNo)) { - throw new ServiceException("请选择合同类型"); - } - Settlement3201DetailDto settlement3201DetailDto = null; - List settlement3201DetailDtos - = this.reconcileGeneralLedgerDetail(reconciliation3201Param); - for (Settlement3201DetailDto item : settlement3201DetailDtos) { - if (contractNo.equals(item.getContractNo()) && insuType.equals(item.getInsutype().toString()) - && clrType.equals(item.getClrType())) { - settlement3201DetailDto = item; - } - } - if (settlement3201DetailDto == null) { - throw new ServiceException("未查询到相关信息"); - } - return ybUtil.getFinancial3201Param(reconciliation3201Param, settlement3201DetailDto); - } - - /** - * 保存记录 - * - * @param tableName 表名 - * @param id 主键id - * @param s 类型 3301/3302 - * @param medicalDirectory3301Param 参数信息 - */ - public void saveDirectoryHistory(String tableName, Long id, Integer s, - MedicalDirectory3301Param medicalDirectory3301Param) { - Long hospitalId = SecurityUtils.getLoginUser().getHospitalId(); - DirectoryCheckRecord directoryCheckRecord = new DirectoryCheckRecord(); - directoryCheckRecord.setTableName(tableName).setTableId(id).setOrgId(hospitalId).setType(s) - .setParam(JsonUtils.toJson(medicalDirectory3301Param)); - directoryCheckRecordService.save(directoryCheckRecord); - } - - /** - * 保存记录 - * - * @param tableName 表名 - * @param id 主键id - * @param s 类型 3301/3302 - * @param medicalDirectory3302Param 参数信息 - */ - public void saveDirectoryHistory(String tableName, Long id, Integer s, - MedicalDirectory3302Param medicalDirectory3302Param) { - Long hospitalId = SecurityUtils.getLoginUser().getHospitalId(); - DirectoryCheckRecord directoryCheckRecord = new DirectoryCheckRecord(); - directoryCheckRecord.setTableName(tableName).setTableId(id).setOrgId(hospitalId).setType(s) - .setParam(JsonUtils.toJson(medicalDirectory3302Param)); - directoryCheckRecordService.save(directoryCheckRecord); - } - - /** - * 【9001】签到 - * - * @param id 员工id - * @return 9001参数 - */ - public Sign getSignParam(String id, String mac, String ip) { - Practitioner practitioner = iPractitionerService.getById(Long.valueOf(id)); - if (practitioner == null) { - throw new ServiceException("未查询到员工信息"); - } - Sign sign = new Sign(); - sign.setOpterNo(practitioner.getBusNo()).setMac(mac.replace(" ", "+")).setIp(ip) - .setOpterNo(String.valueOf(practitioner.getId())); - return sign; - } - - /** - * 保存3201的信息 - * - * @param financial3201Output 对账结果信息 - */ - public void saveReconcileGeneralLedger(Financial3201Output financial3201Output, - Financial3201Param financial3201Param) { - FinancialReconcileRecord financialReconcileRecord = new FinancialReconcileRecord(); - BeanUtils.copyProperties(financial3201Output, financialReconcileRecord); - financialReconcileRecord.setParam(JsonUtils.toJson(financial3201Output)); - financialReconcileRecord.setFixmedinsName(financial3201Param.getFixmedinsName()); - financialReconcileRecord.setAcctPay(financial3201Param.getAcctPay()); - financialReconcileRecord.setFundPaySumamt(financial3201Param.getFundPaySumamt()); - financialReconcileRecord.setFixmedinsCode(financial3201Param.getFixmedinsCode()); - financialReconcileRecord.setClrType(financial3201Param.getClrType()); - financialReconcileRecord.setFixmedinsSetlCnt(financial3201Param.getFixmedinsSetlCnt()); - financialReconcileRecord.setMedfeeSumamt(financial3201Param.getMedfeeSumamt()); - financialReconcileRecord.setSetlOptins(financial3201Param.getSetlOptins()); - iFinancialReconcileRecordService.save(financialReconcileRecord); - } - - /** - * 【3202】明细对账 - * - * @param settlement3202WebParam 前台参数 - * @return 3202参数 - */ - public FinancialSettlement3202Param getFinancialSettlement3202Param(Settlement3202WebParam settlement3202WebParam) { - return ybUtil.getFinancialSettlement3202Param(settlement3202WebParam); - } - - /** - * 【3209A】查询跨省三方对账未成功数据(吉林省) - * - * @param settlement3209AWebParam 前台参数 - * @return 结果 - */ - public FinancialSettlement3209AParam - getFinancialSettlement3209AParam(Settlement3209AWebParam settlement3209AWebParam) { - return ybUtil.getFinancialSettlement3209AParam(settlement3209AWebParam); - } - - /** - * 【3203A】清算申请(吉林省) - * - * @param financial3203AWebParam 前台参数 - * @return 结果 - */ - public Financial3203AParam getFinancial3203AParam(Financial3203AWebParam financial3203AWebParam) { - // 查询3202的所有实体记录 - List financial3202FileParams - = paymentCompareYbSettle(financial3203AWebParam.getSettlementIdList()); - // 处理赋值 - Financial3203AParam busMonthSetlApply = getInitFinancial3203AParam(financial3202FileParams); - // 时间处理 - getFinancial3203AParamForTime(busMonthSetlApply, - DateUtils.parseDateToStr("yyyy-MM-dd hh:mm:ss:", financial3203AWebParam.getStmtBegnDate()), - DateUtils.parseDateToStr("yyyy-MM-dd hh:mm:ss:", financial3203AWebParam.getStmtEndDate())); - // 将 Date 转换为 LocalDate(Java 8+) - // LocalDate begnLocalDate = financial3203AWebParam.getStmtBegnDate().toInstant() - // .atZone(ZoneId.systemDefault()) - // .toLocalDate(); - // LocalDate endLocalDate = financial3203AWebParam.getStmtEndDate().toInstant() - // .atZone(ZoneId.systemDefault()) - // .toLocalDate(); - - // 格式化为 "yyyy-MM-dd" - // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - // String begnDateStr = begnLocalDate.format(formatter); - // String endDateStr = endLocalDate.format(formatter); - // Financial3203AParam busMonthSetlApply = new Financial3203AParam(); - // 赋值 - busMonthSetlApply.setClrType(financial3203AWebParam.getClrType()) - // .setBegndate(DateUtils.dateTime("yyyy-MM-dd", begnDateStr)) - // .setEnddate(DateUtils.dateTime("yyyy-MM-dd", endDateStr)) - .setClrOptins(financial3203AWebParam.getClrOptins()); - return busMonthSetlApply; - } - - /** - * 自动申请清算 - * - * @param financial3202FileParams - * @param beginTime - * @param endTime - * @param clrType - * @param clrOptins - * @return - */ - public Financial3203AParam getFinancial3203AParam(List financial3202FileParams, - String beginTime, String endTime, String clrType, String clrOptins) { - if (financial3202FileParams.isEmpty()) { - throw new ServiceException("无医保结算数据"); - } - Financial3203AParam financial3203AParam = getInitFinancial3203AParam(financial3202FileParams); - - getFinancial3203AParamForTime(financial3203AParam, beginTime, endTime); - - return financial3203AParam.setClrType(clrType).setClrOptins(clrOptins); - } - - /** - * 自动申请清算 - * - * @param financial3203AParam - * @param beginTime - * @param endTime - * @return - */ - public Financial3203AParam getFinancial3203AParamForTime(Financial3203AParam financial3203AParam, - @NotNull String beginTime, @NotNull String endTime) { - - // 定义日期时间格式 - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - - // 解析成 LocalDateTime(包含日期+时间) - LocalDateTime begnLocalDateTime = LocalDateTime.parse(beginTime, formatter); - LocalDateTime endLocalDateTime = LocalDateTime.parse(endTime, formatter); - - // 转换成 LocalDate(自动丢弃时间部分) - LocalDate begnLocalDate = begnLocalDateTime.toLocalDate(); - LocalDate endLocalDate = endLocalDateTime.toLocalDate(); - - // 格式化为 "yyyy-MM-dd" - DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - String begnDateStr = begnLocalDate.format(dateFormatter); - String endDateStr = endLocalDate.format(dateFormatter); - - // Financial3203AParam busMonthSetlApply = new Financial3203AParam(); - // 再赋值 - financial3203AParam.setBegndate(DateUtils.dateTime("yyyy-MM-dd", begnDateStr)) - .setEnddate(DateUtils.dateTime("yyyy-MM-dd", endDateStr)); - return financial3203AParam; - } - - /** - * 【3203A】Financial3203AParam清算申请参数处理(吉林省) - * - * @param financial3202FileParams 入参 - * @return 结果 - */ - public Financial3203AParam getInitFinancial3203AParam(List financial3202FileParams) { - - BigDecimal medfeeSumamt = BigDecimal.ZERO; - BigDecimal fundPaySumamt = BigDecimal.ZERO; - BigDecimal medSumfee = BigDecimal.ZERO; - BigDecimal acctPay = BigDecimal.ZERO; - BigDecimal cashPay = BigDecimal.ZERO; - for (Financial3202FileParam financial3202FileParam : financial3202FileParams) { - if (financial3202FileParam instanceof Financial3202OtherParam otherParam) { - medfeeSumamt = medfeeSumamt.add(otherParam.getMedfeeSumamt()); - fundPaySumamt = fundPaySumamt.add(otherParam.getFundPaySumamt()); - acctPay = acctPay.add(otherParam.getAcctPay()); - cashPay = cashPay.add(otherParam.getCashPayamt()); - medSumfee = medSumfee.add(otherParam.getMedSumfee()); - } - } - // 赋值 - Financial3203AParam busMonthSetlApply = new Financial3203AParam(); - busMonthSetlApply.setMedfeeSumamt(medfeeSumamt).setMedSumfee(medSumfee).setCashPayamt(cashPay) - .setAcctPay(acctPay); - // .setClrType(financial3203AWebParam.getClrType()) - // .setClrOptins(financial3203AWebParam.getClrOptins()) - // .setBegndate(DateUtils.dateTime("yyyy-MM-dd", begnDateStr)) - // .setEnddate(DateUtils.dateTime("yyyy-MM-dd", endDateStr)); - return busMonthSetlApply; - } - - /** - * 【3205A】清算申请状态查询(吉林省) - * - * @param clearing3205AWebParma 前台参数 - * @return 结果 - */ - public Clearing3205AParma getClearing3205AParma(Clearing3205AWebParma clearing3205AWebParma) { - return ybUtil.getClearing3205AParma(clearing3205AWebParma); - } - - /** - * 【3501】商品盘存上传 - * - * @param id 供应申请id - * @param talentId 租户id - * @return 结果 - */ - public MedicalInventory3501Param getMedicalInventory3501Param(Long id, Integer talentId) { - return ybUtil.getMedicalInventory3501Param(id, talentId); - } - - /** - * 【3502】库存信息变更 - * - * @param id 供应链发放id - * @param invChgType 变更类型 参考枚举 - * @param talentId 租户id - * @return 结果 - */ - public MedicalInventory3502Param getMedicalInventory3502Param(Long id, String invChgType, Integer talentId) { - return ybUtil.getMedicalInventory3502Param(id, invChgType, talentId); - } - - /** - * 【3503】商品采购 - * - * @param id 供应发放id - * @param talentId 租户id - * @return 结果 - */ - public Medical3503Param getMedical3503Param(Long id, Integer talentId) { - return ybUtil.getMedical3503Param(id, talentId); - } - - /** - * 【3504】商品采购退货 - * - * @param id 供应发放id - * @param talentId 租户id - * @return 结果 - */ - public MedicalPurchase3504Param getMedicalPurchase3504Param(Long id, Integer talentId) { - return ybUtil.getMedicalPurchase3504Param(id, talentId); - } - - /** - * 【3505】商品销售 - * - * @param id 发放id - * @param ListType 耗材/药品 - * @param talentId 租户id - * @return 结果 - */ - public Medical3505Param getMedical3505Param(Long id, String ListType, Integer talentId) { - return ybUtil.getMedical3505Param(id, ListType, talentId); - } - - /** - * 【3506】商品销售退货 - * - * @param id 对应发放业务的主键id - * @param ListType 目录种类 - * @param talentId 租户id - * @return 3506参数 - */ - public Medical3506Param getMedical3506Param(Long id, String ListType, Integer talentId) { - return ybUtil.getMedical3506Param(id, ListType, talentId); - } - - /** - * 【3507】商品信息删除参数 - * - * @param id 库存项目id - * @param invDataType 进销存类型 - * @return 3507参数 - */ - public Medical3507Param getMedical3507Param(Long id, String invDataType) { - return ybUtil.getMedical3507Param(id, invDataType); - } - - /** - * 保存清算申请参数 - * - * @param financial3203AParam 3203A入参 - * @param s 一包返回结果 - */ - public void save3203AFinancialClearingApplycation(Financial3203AParam financial3203AParam, String s) { - FinancialApplyRecord financialApplyRecord = new FinancialApplyRecord(); - BeanUtils.copyProperties(financial3203AParam, financialApplyRecord); - financialApplyRecord.setParam(JsonUtils.toJson(financial3203AParam)).setOutResult(s) - .setPraId(SecurityUtils.getPractitionerId()).setStatus("0"); - iFinancialApplyRecordService.save(financialApplyRecord); - } - - /** - * 清算申请撤销 - * - * @param clrAppyEvtId 时间id - * @param clrOptins 清算机构 - */ - public void save3204AFinancialClearingApplycation(String clrAppyEvtId, String clrOptins) { - iFinancialApplyRecordService.update(new FinancialApplyRecord().setStatus("1"), - new LambdaUpdateWrapper().eq(FinancialApplyRecord::getOutResult, clrAppyEvtId)); - } - - /** - * 保存数据 - * - * @param medicalInventory3501Param 3501参数 - */ - public void saveInventoryCheckRecord(MedicalInventory3501Param medicalInventory3501Param, String resultMessage) { - InventoryCheckRecord inventoryCheckRecord = new InventoryCheckRecord(); - BeanUtils.copyProperties(medicalInventory3501Param, inventoryCheckRecord); - inventoryCheckRecord.setParam(JsonUtils.toJson(medicalInventory3501Param)); - inventoryCheckRecord.setResult(JsonUtils.toJson(resultMessage)); - iInventoryCheckRecordService.save(inventoryCheckRecord); - } - - /** - * 保存数据 - * - * @param medical3507Param 3507参数 - */ - public void saveInventoryDelRecord(Medical3507Param medical3507Param) { - InventoryDelRecord inventoryDelRecord = new InventoryDelRecord(); - BeanUtils.copyProperties(medical3507Param, inventoryDelRecord); - inventoryDelRecord.setParam(JsonUtils.toJson(medical3507Param)); - iInventoryDelRecordService.save(inventoryDelRecord); - } - - /** - * 保存数据 - * - * @param medical3506Param 3506参数 - */ - public void saveInventorySaleReturnRecord(Medical3506Param medical3506Param, String retRslt) { - InventorySaleReturnRecord inventorySaleReturnRecord = new InventorySaleReturnRecord(); - BeanUtils.copyProperties(medical3506Param, inventorySaleReturnRecord); - inventorySaleReturnRecord.setParam(JsonUtils.toJson(medical3506Param)); - inventorySaleReturnRecord.setOutResult(JsonUtils.toJson(retRslt)); - iInventorySaleReturnRecordService.save(inventorySaleReturnRecord); - } - - /** - * 保存数据 - * - * @param medical3505Param 3505参数 - */ - public void saveInventorySaleRecord(Medical3505Param medical3505Param, String retRslt) { - InventorySaleRecord inventorySaleRecord = new InventorySaleRecord(); - BeanUtils.copyProperties(medical3505Param, inventorySaleRecord); - inventorySaleRecord.setParam(JsonUtils.toJson(medical3505Param)); - inventorySaleRecord.setOutResult(JsonUtils.toJson(retRslt)); - inventorySaleRecord.setDrugtracinfo(JsonUtils.toJson(medical3505Param.getDrugtracinfo())); - iInventorySaleRecordService.save(inventorySaleRecord); - } - - /** - * 保存数据 - * - * @param medicalPurchase3504Param 3504参数 - */ - public void saveInventoryPurchaseReturnRecord(MedicalPurchase3504Param medicalPurchase3504Param, - String resultMessage) { - InventoryPurchaseReturnRecord inventoryPurchaseReturnRecord = new InventoryPurchaseReturnRecord(); - BeanUtils.copyProperties(medicalPurchase3504Param, inventoryPurchaseReturnRecord); - inventoryPurchaseReturnRecord.setParam(JsonUtils.toJson(medicalPurchase3504Param)); - inventoryPurchaseReturnRecord.setOutResult(JsonUtils.toJson(resultMessage)); - iInventoryPurchaseReturnRecordService.save(inventoryPurchaseReturnRecord); - } - - /** - * 保存数据 - * - * @param medical3503Param 3503参数 - */ - public void saveInventoryPurchaseRecord(Medical3503Param medical3503Param, String resultMessage) { - InventoryPurchaseRecord inventoryPurchaseRecord = new InventoryPurchaseRecord(); - BeanUtils.copyProperties(medical3503Param, inventoryPurchaseRecord); - inventoryPurchaseRecord.setParam(JsonUtils.toJson(medical3503Param)); - inventoryPurchaseRecord.setOutResult(JsonUtils.toJson(resultMessage)); - iInventoryPurchaseRecordService.save(inventoryPurchaseRecord); - } - - /** - * 保存数据 - * - * @param medicalInventory3502Param 3502参数 - */ - public void saveInventoryChangeRecord(MedicalInventory3502Param medicalInventory3502Param, String resultMessage) { - InventoryChangeRecord inventoryChangeRecord = new InventoryChangeRecord(); - BeanUtils.copyProperties(medicalInventory3502Param, inventoryChangeRecord); - inventoryChangeRecord.setParam(JsonUtils.toJson(medicalInventory3502Param)); - inventoryChangeRecord.setResult(JsonUtils.toJson(resultMessage)); - iInventoryChangeRecordService.save(inventoryChangeRecord); - } - - /** - * 保存医保结算参数等信息(挂号用) - * - * @param paymentNo - * @param clinicOrder2207 - * @param clinic2206OrderResult - */ - public void saveClinic2207Record(String paymentNo, Clinic2207OrderParam clinicOrder2207, - Clinic2207OrderModel clinic2206OrderResult) { - ClinicSettle clinicSettle = new ClinicSettle(); - BeanUtils.copyProperties(clinic2206OrderResult, clinicSettle); - clinicSettle.setParam2207(JsonUtils.toJson(clinicOrder2207)) - .setResult2207(JsonUtils.toJson(clinic2206OrderResult)).setPaymentNo(paymentNo); - iClinicSettleService.save(clinicSettle); - } - - /** - * 保存医保结算参数等信息(常规结算用) - * - * @param clinicOrder2207 - * @param clinic2206OrderResult - */ - public void saveClinic2207Record(Clinic2207OrderParam clinicOrder2207, Clinic2207OrderModel clinic2206OrderResult) { - ClinicSettle clinicSettle = new ClinicSettle(); - BeanUtils.copyProperties(clinic2206OrderResult, clinicSettle); - clinicSettle.setParam2207(JsonUtils.toJson(clinicOrder2207)) - .setResult2207(JsonUtils.toJson(clinic2206OrderResult)); - iClinicSettleService.save(clinicSettle); - } - - public PatientInfoDto getPatent(Info1101Output perInfo) { - // 查患者信息 - Patient patient - = iPatientService.getOne(new LambdaQueryWrapper().eq(Patient::getIdCard, perInfo.getCertno()).last(YbCommonConstants.sqlConst.LIMIT1)); - if (patient == null) { - patient = new Patient(); - // 处理性别字段 - YbGender ybGender = YbGender.getByValue(perInfo.getGend()); - AdministrativeGender administrativeGender; - switch (ybGender) { - case MALE: - administrativeGender = AdministrativeGender.MALE; - break; - case FEMALE: - administrativeGender = AdministrativeGender.FEMALE; - break; - default: - administrativeGender = AdministrativeGender.UNKNOWN; - break; - } - // 新建患者 - patient.setIdCard(perInfo.getCertno()).setName(perInfo.getPsnName()) - .setGenderEnum(administrativeGender.getValue()).setActiveFlag(0).setTempFlag(0) - .setOrganizationId(SecurityUtils.getLoginUser().getOrgId()).setBirthDate(perInfo.getBrdy()); - iPatientService.savePatient(patient); - } - // 赋值 - PatientInfoDto patientInfoDto = new PatientInfoDto(); - BeanUtils.copyProperties(patient, patientInfoDto); - // 查合同 2025/05/23 弃用,费用性质固定,如农大只有省医保,费用性质只显示省医保和自费即可,由@GetMapping(value = "/contract-list")接口提供数据 - Contract contract = iContractService - .getOne(new LambdaQueryWrapper().eq(Contract::getAdmVs, perInfo.getInsuplcAdmdvs())); - if (contract != null) { - // BeanUtils.copyProperties(contract, patientInfoDto); - patientInfoDto.setContractBusNo(contract.getBusNo()); - } - patientInfoDto.setId(patient.getId()).setFeedetail(perInfo.getFeedetail()); - - return patientInfoDto; - } - - public ClinicReg getUnReg(Long encounterId, Integer tenantId) { - - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("查询不到就诊信息"); - } - - ClinicReg one - = iRegService.getOne(new LambdaQueryWrapper().eq(ClinicReg::getIptOtpNo, encounter.getBusNo())); - if (one == null) { - throw new ServiceException("查询不到医保挂号信息"); - } - ClinicReg clinicReg = new ClinicReg().setPsnNo(one.getPsnNo()).setMdtrtId(one.getMdtrtId()) - .setIptOtpNo(encounter.getBusNo()).setInsuplcAdmdvs(one.getInsuplcAdmdvs()); - if (clinicReg == null) { - throw new ServiceException("未生成2202参数"); - } - return clinicReg; - } - - public List reconcileGeneralLedgerDetail(Settlement3201WebParam settlement3201WebParam) { - // 获取条件 - String clrType = settlement3201WebParam.getClrType();// 住院 or 门诊 - if (StringUtils.isEmpty(clrType)) { - throw new ServiceException("请选择医疗类型:住院/门诊"); - } - Integer kindEnum; - if (clrType.equals(YbClrType.OUTPATIENT_CLINIC.getValue())) { - kindEnum = PaymentKind.OUTPATIENT_CLINIC.getValue(); - } else if (clrType.equals(YbClrType.INPATIENT_CARE.getValue())) { - kindEnum = PaymentKind.INPATIENT_CLINIC.getValue(); - } else { - throw new ServiceException("请选择门诊或住院"); - } - String contractNo = settlement3201WebParam.getContractNo();// 省市医保 - String insuType = settlement3201WebParam.getInsuType();// 职工 or 居民保险 - String stmtBegnDate = settlement3201WebParam.getStmtBegnDate();// 开始时间 - String stmtEndDate = settlement3201WebParam.getStmtEndDate();// 结束时间 - Date startDate = DateUtils.parseDate(stmtBegnDate); - Date endDate = DateUtils.parseDate(stmtEndDate); - // 处理时间 - if (StringUtils.isEmpty(stmtBegnDate) || StringUtils.isEmpty(stmtEndDate)) { - // 获取当前日期 - LocalDate currentDate = LocalDate.now(); - - if (StringUtils.isEmpty(stmtBegnDate)) { - // 获取当月的开始时间(当月的1号 00:00:00) - LocalDateTime startOfMonth = LocalDateTime.of(currentDate, LocalTime.MIN); - startDate = Date.from(startOfMonth.atZone(ZoneId.systemDefault()).toInstant()); - stmtBegnDate = DateUtils.parseDateToStr("yyyy-MM-dd hh:mm:ss.SSS", startDate); - } - - if (StringUtils.isEmpty(stmtEndDate)) { - // 获取当月的结束时间(当月的最后一天 23:59:59) - LocalDate endOfMonthDate = currentDate.withDayOfMonth(currentDate.lengthOfMonth()); - LocalDateTime endOfMonth = LocalDateTime.of(endOfMonthDate, LocalTime.MAX); - endDate = Date.from(endOfMonth.atZone(ZoneId.systemDefault()).toInstant()); - stmtEndDate = DateUtils.parseDateToStr("yyyy-MM-dd hh:mm:ss.SSS", endDate); - } - } - // 查询该段时间内的payment - List paymentReconciliations - = iPaymentReconciliationService.list(new LambdaQueryWrapper() - .between(PaymentReconciliation::getBillDate, startDate, endDate) - .ne(PaymentReconciliation::getStatusEnum, PaymentStatus.DRAFT.getValue()) - .eq(PaymentReconciliation::getKindEnum, PaymentKind.OUTPATIENT_CLINIC.getValue()) - .isNotNull(PaymentReconciliation::getYbSettleIds)); - // 过滤医保结算id - List settleIdList - = paymentReconciliations.stream().filter(e -> StringUtils.isNotEmpty(e.getYbSettleIds())) - .map(PaymentReconciliation::getYbSettleIds).collect(Collectors.toList()); - - // List allSettleIds = settleIdList.stream().flatMap(ids -> Stream.of(ids.split(","))).filter(id -> - // !id.isEmpty()).collect(Collectors.toList()); - // 获取新的paymentId集合 - List paymentReconciliationIdList - = paymentReconciliations.stream().map(PaymentReconciliation::getId).collect(Collectors.toList()); - // List paymentRecDetailList = iPaymentRecDetailService.list(new - // LambdaQueryWrapper().in(PaymentRecDetail::getReconciliationId, - // paymentReconciliationIdList)); - // List accountIds = - // paymentRecDetailList.stream().map(PaymentRecDetail::getAccountId).collect(Collectors.toList()); - // List accountList = accountService.list(new LambdaQueryWrapper().in(Account::getId, - // accountIds)); - // 查询支付详情记录信息 - List paymentDecDetailUniAccountDtos - = medicalInsuranceMapper.getPaymentDecDetailUniAccountDtoListByPaymentIdList(paymentReconciliationIdList, - startDate, endDate, PaymentStatus.DRAFT.getValue()); - // 声明变量 - List settlement3201DetailDtos = new ArrayList<>(); - // Settlement3201DetailDto settlement3201ProEMPOutDto = new Settlement3201DetailDto();//省医保门诊职工 - // Settlement3201DetailDto settlement3201CityEMPOutDto = new Settlement3201DetailDto();//市医保门诊居民 - // Settlement3201DetailDto settlement3201ProRESOutDto = new Settlement3201DetailDto();//省医保门诊职工 - // Settlement3201DetailDto settlement3201CityRESOutDto = new Settlement3201DetailDto();//市医保门诊居民 - // Settlement3201DetailDto settlement3201ProEMPInDto = new Settlement3201DetailDto();//省医保住院职工 - // Settlement3201DetailDto settlement3201CityEMPInDto = new Settlement3201DetailDto();//市医保住院居民 - // Settlement3201DetailDto settlement3201ProRESInDto = new Settlement3201DetailDto();//省医保住院职工 - // Settlement3201DetailDto settlement3201CityRESInDto = new Settlement3201DetailDto();//市医保住院居民 - Settlement3201DetailDto settlement3201Dto;// 声明变量 - // 分组处理 - // for (PaymentDecDetailUniAccountDto paymentDecDetailUniAccountDto : paymentDecDetailUniAccountDtos) { - // if(StringUtils.isEmpty(paymentDecDetailUniAccountDto.getContractNo())){ - // log.info(paymentDecDetailUniAccountDto.getId()); - // } - // } - for (PaymentDecDetailUniAccountDto paymentDecDetailUniAccountDto : paymentDecDetailUniAccountDtos) { - if (StringUtils.isEmpty(paymentDecDetailUniAccountDto.getContractNo())) { - log.info(paymentDecDetailUniAccountDto.getId() + "payment主键:" - + paymentDecDetailUniAccountDto.getReconciliationId()); - } - } - - Map> paymentDecDetailUniAccountDtoMapGroupByContract - = paymentDecDetailUniAccountDtos.stream() - .collect(Collectors.groupingBy(PaymentDecDetailUniAccountDto::getContractNo)); - // 分省市医保 - for (Map.Entry> stringListEntry : paymentDecDetailUniAccountDtoMapGroupByContract - .entrySet()) { - if (CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(stringListEntry.getKey())) { - continue; - } - if (stringListEntry.getValue().isEmpty()) { - continue; - } - if (!StringUtils.isEmpty(contractNo) && !stringListEntry.getKey().equals(contractNo)) { - continue; - } - // 分住院门诊 - Map> paymentDecDetailUniAccountDtoMapGroupByMedType - = stringListEntry.getValue().stream() - .collect(Collectors.groupingBy(PaymentDecDetailUniAccountDto::getKindEnum)); - for (Map.Entry> listEntry : paymentDecDetailUniAccountDtoMapGroupByMedType - .entrySet()) { - if (listEntry.getValue().isEmpty()) { - continue; - } - if (!StringUtils.isEmpty(clrType) && !listEntry.getKey().equals(kindEnum)) { - continue; - } - // 分职工居民 - Map> collect = listEntry.getValue().stream() - .collect(Collectors.groupingBy(PaymentDecDetailUniAccountDto::getInsutype)); - for (Map.Entry> entry : collect.entrySet()) { - if (entry.getValue().isEmpty()) { - continue; - } - if (!StringUtils.isEmpty(insuType) && !entry.getKey().equals(insuType)) { - continue; - } - int count = 0; - settlement3201Dto = new Settlement3201DetailDto(); - settlement3201Dto.setContractNo(stringListEntry.getKey()) - .setInsutype(Integer.parseInt(entry.getKey())); - if (PaymentKind.OUTPATIENT_CLINIC.getValue() == listEntry.getKey()) { - settlement3201Dto.setClrType(YbClrType.OUTPATIENT_CLINIC.getValue()); - } else if (PaymentKind.INPATIENT_CLINIC.getValue() == listEntry.getKey()) { - settlement3201Dto.setClrType(YbClrType.INPATIENT_CARE.getValue()); - } - for (PaymentDecDetailUniAccountDto paymentDecDetailUniAccountDto : entry.getValue()) { - if (YbPayment.YB_FUND_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())) { - // 基金支付 - settlement3201Dto.setFundPaySumAmt( - paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getFundPaySumAmt())); - if (BigDecimal.ZERO.compareTo(paymentDecDetailUniAccountDto.getAmount()) >= 0 - && paymentDecDetailUniAccountDto.getReturnMedfeeSumamt() != null) { - // 合计医疗费用 - settlement3201Dto.setMedFeeSumAmt( - new BigDecimal(paymentDecDetailUniAccountDto.getReturnMedfeeSumamt() == null ? "0.0" - : paymentDecDetailUniAccountDto.getReturnMedfeeSumamt()) - .add(settlement3201Dto.getMedFeeSumAmt())); - } else { - // 合计医疗费用 - settlement3201Dto.setMedFeeSumAmt( - new BigDecimal(paymentDecDetailUniAccountDto.getMedfeeSumamt() == null ? "0.0" - : paymentDecDetailUniAccountDto.getMedfeeSumamt()) - .add(settlement3201Dto.getMedFeeSumAmt())); - } - count++; - } - if (YbPayment.SELF_YB_ZH_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())) { - // 账户支付 - settlement3201Dto.setAcctPay( - paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getAcctPay())); - } - if (YbPayment.SELF_YB_ZH_GJ_VALUE.getValue() - .equals(paymentDecDetailUniAccountDto.getPayEnum())) { - // 账户共济支付 - settlement3201Dto.setAcctGjPay( - paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getAcctGjPay())); - } - // if (YbPayment.SELF_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum()) - // || YbPayment.OTHER_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum()) - // || YbPayment.YB_FUND_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())) { - // // 合计医疗费用 - // settlement3201Dto.setMedFeeSumAmt( - // paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getMedFeeSumAmt())); - // } - } - // 结算笔数 - settlement3201Dto.setFixMedInsSetlCnt(count); - settlement3201DetailDtos.add(settlement3201Dto); - } - } - } - // 返回参数 - return settlement3201DetailDtos; - } - - public ClinicReg2201Output getClinicRegByEncounterId(Long encounterId) { - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - ClinicReg clinicReg - = iRegService.getOne(new LambdaQueryWrapper().eq(ClinicReg::getIptOtpNo, encounter.getBusNo())); - ClinicReg2201Output clinicReg2201Output = new ClinicReg2201Output(); - BeanUtils.copyProperties(clinicReg, clinicReg2201Output); - clinicReg2201Output.setMedType(clinicReg.getMedType());// copyProperties会有概率copy失败,此处打补丁赋值 - return clinicReg2201Output; - } - - public ClinicReg get2202Reg(Long id, Integer tenantId) { - Encounter encounter = iEncounterService.getById(id); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - return iRegService.getOne(new LambdaQueryWrapper().eq(ClinicReg::getIptOtpNo, encounter.getBusNo())); - } - - /** - * 系統數據比較 - * - * @param settlement3202WebParam - */ - public List paymentCompareYbSettle(Settlement3202WebParam settlement3202WebParam) { - // 比较yb_clinic_settle表和payment系列表数据是否一致 - String stmtBegnDate = String.valueOf(settlement3202WebParam.getStmtBegnDate()); - String stmtEndDate = String.valueOf(settlement3202WebParam.getStmtEndDate()); - if (StringUtils.isEmpty(stmtBegnDate) || StringUtils.isEmpty(stmtEndDate)) { - throw new ServiceException("未选择开始与结束时间"); - } - - Date startDate = DateUtils.parseDate(stmtBegnDate); - Date endDate = DateUtils.parseDate(stmtEndDate); - - // 查询该段时间内的payment - List paymentReconciliations - = iPaymentReconciliationService.list(new LambdaQueryWrapper() - .between(PaymentReconciliation::getBillDate, startDate, endDate) - .ne(PaymentReconciliation::getStatusEnum, PaymentStatus.DRAFT.getValue()) - .ne(PaymentReconciliation::getYbSettleIds, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentReconciliation::getYbSettleIds, "null").isNotNull(PaymentReconciliation::getYbSettleIds) - .eq(PaymentReconciliation::getKindEnum, PaymentKind.OUTPATIENT_CLINIC.getValue())); - if (paymentReconciliations.isEmpty()) { - throw new ServiceException("该时间内无付款记录"); - } - - // 过滤医保结算id - List settleIdList = paymentReconciliations.stream() - .filter(e -> StringUtils.isNotEmpty(e.getYbSettleIds())).map(PaymentReconciliation::getYbSettleIds) - .flatMap(ybSettleIds -> Arrays.stream(ybSettleIds.split(","))).collect(Collectors.toList()); - if (settleIdList.isEmpty()) { - throw new ServiceException("该时间内无医保付款记录"); - } - - // 查询医保表数据 - List clinicSettles - = iClinicSettleService.list(new LambdaQueryWrapper().in(ClinicSettle::getSetlId, settleIdList)); - List clinicUnSettles = iClinicUnSettleService - .list(new LambdaQueryWrapper().in(ClinicUnSettle::getSettleId, settleIdList)); - - // payment的id集合 - List paymentReconciliationIdList - = paymentReconciliations.stream().map(PaymentReconciliation::getId).collect(Collectors.toList()); - - // 查询详情表数据 - List paymentRecDetailList - = iPaymentRecDetailService.list(new LambdaQueryWrapper() - .in(PaymentRecDetail::getReconciliationId, paymentReconciliationIdList) - .ne(PaymentRecDetail::getPayTransNo, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentRecDetail::getPayTransText, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_ALI_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_VX_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_UNION_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_VALUE.getValue())); - if (paymentRecDetailList.isEmpty()) { - throw new ServiceException("该时间内无付款明细记录"); - } - // 该部分代码为辅助调试时使用,无任何业务处理 start - // for (PaymentRecDetail paymentRecDetail : paymentRecDetailList) { - // if (StringUtils.isEmpty(paymentRecDetail.getPayTransText())) { - // log.info("*******************************************************************"); - // log.info(paymentRecDetail.getId() + "主键:" + paymentRecDetail.getReconciliationId()); - // log.info(JsonUtils.toJson(paymentRecDetail)); - // // throw new ServiceException("paymentDetail无返回交易码"); - // } - // } - // end - - Map> paymentRecDetailMapBySettleId - = paymentRecDetailList.stream().collect(Collectors.groupingBy(PaymentRecDetail::getPayTransText)); - - List financial3202FileParamList = new ArrayList<>(); - Financial3202FileParam financial3202FileParam; - for (Map.Entry> stringListEntry : paymentRecDetailMapBySettleId.entrySet()) { - // 获取settleId - String settleId = stringListEntry.getKey(); - if (CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(settleId) || StringUtils.isEmpty(settleId)) { - continue; - } - Optional settleOptional - = clinicSettles.stream().filter(e -> settleId.equals(e.getSetlId())).findAny(); - Optional unSettleOptional - = clinicUnSettles.stream().filter(e -> settleId.equals(e.getSettleId())).findAny(); - if (!settleOptional.isPresent() && !unSettleOptional.isPresent()) { - throw new ServiceException("付款详情中结算id在医保记录中不存在,错误信息:paymentId:" - + stringListEntry.getValue().get(0).getReconciliationId() + ";医保结算id" + settleId); - } - if (settleOptional.isPresent() && unSettleOptional.isPresent()) { - throw new ServiceException("付款详情中结算id在医保记录中同时存在正结和反结,错误信息:paymentId:" - + stringListEntry.getValue().get(0).getReconciliationId() + ";医保结算id" + settleId); - } - // 校对金额 - BigDecimal medfeeSumamt = BigDecimal.ZERO; - BigDecimal fundPaySumamt = BigDecimal.ZERO; - BigDecimal acctPay = BigDecimal.ZERO; - String refdSetlFlag = Whether.NO.getCode();// 1 是退费; 0否 - String psnNo = ""; - String mdtrtId = ""; - String patientName = ""; - String setlTime = ""; - - for (PaymentRecDetail paymentRecDetail : stringListEntry.getValue()) { - if (YbPayment.YB_FUND_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - medfeeSumamt = medfeeSumamt.add(paymentRecDetail.getAmount()); - fundPaySumamt = fundPaySumamt.add(paymentRecDetail.getAmount()); - } - if (YbPayment.SELF_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - medfeeSumamt = medfeeSumamt.add(paymentRecDetail.getAmount()); - } - // if(YbPayment.OTHER_PAY.getValue().equals(paymentRecDetail.getPayEnum())){ - // medfeeSumamt = medfeeSumamt.add(paymentRecDetail.getAmount()); - // } - if (YbPayment.SELF_YB_ZH_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - acctPay = acctPay.add(paymentRecDetail.getAmount()); - } - } - - if (settleOptional.isPresent()) { - ClinicSettle clinicSettle = settleOptional.get(); - if (clinicSettle.getAcctPay().compareTo(acctPay) != 0) { - throw new ServiceException("医保正结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSetlId() - + " 账户支付:" + clinicSettle.getAcctPay() + " payment记录账户支付金额:" + acctPay); - } - if (clinicSettle.getMedfeeSumamt().compareTo(medfeeSumamt) != 0) { - throw new ServiceException("医保正结记录与业务记录医疗总金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSetlId() - + " 医疗总金额:" + clinicSettle.getMedfeeSumamt() + " payment记录医疗总金额:" + medfeeSumamt); - } - if (clinicSettle.getFundPaySumamt().compareTo(fundPaySumamt) != 0) { - throw new ServiceException("医保正结记录与业务记录基金金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSetlId() - + " 基金金额:" + clinicSettle.getFundPaySumamt() + " payment记录基金金额:" + fundPaySumamt); - } - String param2207 = clinicSettle.getParam2207(); - Clinic2207OrderParam clinic2207OrderParam = JsonUtils.parseObject(param2207, Clinic2207OrderParam.class); - psnNo = clinic2207OrderParam.getPsnNo(); - mdtrtId = clinic2207OrderParam.getMdtrtId(); - Clinic2207OrderModel clinic2207OrderModel - = JsonUtils.parseObject(clinicSettle.getResult2207(), Clinic2207OrderModel.class); - patientName = clinic2207OrderModel.getPsnName(); - setlTime = String.valueOf(clinic2207OrderModel.getSetlTime()); - } - - if (unSettleOptional.isPresent()) { - ClinicUnSettle clinicSettle = unSettleOptional.get(); - if (clinicSettle.getAcctPay().compareTo(acctPay) != 0) { - throw new ServiceException("医保反结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSettleId() - + " 账户支付:" + clinicSettle.getAcctPay() + " payment记录账户支付金额:" + acctPay); - } - if (clinicSettle.getMedfeeSumamt().compareTo(medfeeSumamt) != 0) { - throw new ServiceException("医保反结记录与业务记录医疗费用总金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSettleId() - + " 医疗费用总金额:" + clinicSettle.getMedfeeSumamt() + " payment记录医疗费用总金额:" + medfeeSumamt); - } - if (clinicSettle.getFundPaySumamt().compareTo(fundPaySumamt) != 0) { - throw new ServiceException("医保反结记录与业务记录基金金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSettleId() - + " 基金金额:" + clinicSettle.getFundPaySumamt() + " payment记录基金金额:" + fundPaySumamt); - } - refdSetlFlag = Whether.YES.getCode(); - String param2208 = clinicSettle.getParam2208(); - Clinic2208UnSetlInfoParam clinic2208UnSetlInfoParam - = JsonUtils.parseObject(param2208, Clinic2208UnSetlInfoParam.class); - psnNo = clinic2208UnSetlInfoParam.getPsnNo(); - mdtrtId = clinic2208UnSetlInfoParam.getMdtrtId(); - Clinic2208UnSetlInfoOutput clinic2207OrderModel - = JsonUtils.parseObject(clinicSettle.getResult2208(), Clinic2208UnSetlInfoOutput.class); - // patientName = clinic2207OrderModel.getPsnName(); - setlTime = String.valueOf(clinic2207OrderModel.getSetlTime()); - } - - financial3202FileParam = new Financial3202FileParam(); - - financial3202FileParam.setSetlId(settleId).setAcctPay(acctPay).setFundPaySumamt(fundPaySumamt) - .setMdtrtId(mdtrtId).setPsnNo(psnNo).setMedfeeSumamt(medfeeSumamt).setRefdSetlFlag(refdSetlFlag) - .setPatientName(patientName).setSetlTime(setlTime); - - financial3202FileParamList.add(financial3202FileParam); - } - - return financial3202FileParamList; - } - - /** - * 系統數據比較 - * - * @param settlementIdList - */ - public List paymentCompareYbSettle(List settlementIdList) { - // 比较yb_clinic_settle表和payment系列表数据是否一致 - // 查询医保表数据 - List clinicSettles = iClinicSettleService - .list(new LambdaQueryWrapper().in(ClinicSettle::getSetlId, settlementIdList)); - List clinicUnSettles = iClinicUnSettleService - .list(new LambdaQueryWrapper().in(ClinicUnSettle::getSettleId, settlementIdList)); - - // payment的id集合 - // List paymentReconciliationIdList = - // paymentReconciliations.stream().map(PaymentReconciliation::getId).collect(Collectors.toList()); - // 查询详情表数据 - List paymentRecDetailList = iPaymentRecDetailService - .list(new LambdaQueryWrapper().in(PaymentRecDetail::getPayTransText, settlementIdList) - .ne(PaymentRecDetail::getPayTransNo, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentRecDetail::getPayTransText, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_ALI_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_VX_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_UNION_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_VALUE.getValue()) - .isNotNull(PaymentRecDetail::getPayTransText)); - if (paymentRecDetailList.isEmpty()) { - throw new ServiceException("该时间内无付款明细记录"); - } - // 该部分代码为辅助调试时使用,无任何业务处理 start - for (PaymentRecDetail paymentRecDetail : paymentRecDetailList) { - if (StringUtils.isEmpty(paymentRecDetail.getPayTransText())) { - log.info(JsonUtils.toJson(paymentRecDetail)); - throw new ServiceException("paymentDetail无返回交易码"); - } - } - // end - - Map> paymentRecDetailMapBySettleId - = paymentRecDetailList.stream().collect(Collectors.groupingBy(PaymentRecDetail::getPayTransText)); - - List financial3202FileParamList = new ArrayList<>(); - Financial3202OtherParam financial3202OtherParam; - for (Map.Entry> stringListEntry : paymentRecDetailMapBySettleId.entrySet()) { - // 获取settleId - String settleId = stringListEntry.getKey(); - if (CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(settleId)) { - continue; - } - Optional settleOptional - = clinicSettles.stream().filter(e -> settleId.equals(e.getSetlId())).findAny(); - Optional unSettleOptional - = clinicUnSettles.stream().filter(e -> settleId.equals(e.getSettleId())).findAny(); - if (!settleOptional.isPresent() && !unSettleOptional.isPresent()) { - throw new ServiceException("付款详情中结算id在医保记录中不存在,错误信息:paymentId:" - + stringListEntry.getValue().get(0).getReconciliationId() + ";医保结算id" + settleId); - } - if (settleOptional.isPresent() && unSettleOptional.isPresent()) { - throw new ServiceException("付款详情中结算id在医保记录中同时存在正结和反结,错误信息:paymentId:" - + stringListEntry.getValue().get(0).getReconciliationId() + ";医保结算id" + settleId); - } - // 校对金额 - BigDecimal medfeeSumamt = BigDecimal.ZERO; - BigDecimal fundPaySumamt = BigDecimal.ZERO; - BigDecimal acctPay = BigDecimal.ZERO; - BigDecimal cashPay = BigDecimal.ZERO; - BigDecimal medSumfee = BigDecimal.ZERO; - String refdSetlFlag = Whether.NO.getCode();// 1 是退费; 0否 - String psnNo = ""; - String mdtrtId = ""; - - for (PaymentRecDetail paymentRecDetail : stringListEntry.getValue()) { - if (YbPayment.YB_FUND_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - medfeeSumamt = medfeeSumamt.add(paymentRecDetail.getAmount()); - fundPaySumamt = fundPaySumamt.add(paymentRecDetail.getAmount()); - } - if (YbPayment.SELF_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - medfeeSumamt = medfeeSumamt.add(paymentRecDetail.getAmount()); - } - // if(YbPayment.OTHER_PAY.getValue().equals(paymentRecDetail.getPayEnum())){ - // medfeeSumamt = medfeeSumamt.add(paymentRecDetail.getAmount()); - // } - if (YbPayment.SELF_YB_ZH_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - acctPay = acctPay.add(paymentRecDetail.getAmount()); - } - if (YbPayment.SELF_CASH_PAY.getValue().equals(paymentRecDetail.getPayEnum())) { - cashPay = cashPay.add(paymentRecDetail.getAmount()); - } - if (YbPayment.INSCP_SCP_AMT.getValue().equals(paymentRecDetail.getPayEnum())) { - medSumfee = medSumfee.add(paymentRecDetail.getAmount()); - } - } - - if (settleOptional.isPresent()) { - ClinicSettle clinicSettle = settleOptional.get(); - if (clinicSettle.getAcctPay().compareTo(acctPay) != 0) { - throw new ServiceException("医保正结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSetlId() - + " 账户支付:" + clinicSettle.getAcctPay() + " payment记录账户支付金额:" + acctPay); - } - if (clinicSettle.getMedfeeSumamt().compareTo(medfeeSumamt) != 0) { - throw new ServiceException("医保正结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSetlId() - + " 账户支付:" + clinicSettle.getMedfeeSumamt() + " payment记录账户支付金额:" + medfeeSumamt); - } - if (clinicSettle.getFundPaySumamt().compareTo(fundPaySumamt) != 0) { - throw new ServiceException("医保正结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSetlId() - + " 账户支付:" + clinicSettle.getFundPaySumamt() + " payment记录账户支付金额:" + fundPaySumamt); - } - String param2207 = clinicSettle.getParam2207(); - Clinic2207OrderParam clinic2207OrderParam = JsonUtils.parseObject(param2207, Clinic2207OrderParam.class); - psnNo = clinic2207OrderParam.getPsnNo(); - mdtrtId = clinic2207OrderParam.getMdtrtId(); - } - - if (unSettleOptional.isPresent()) { - ClinicUnSettle clinicSettle = unSettleOptional.get(); - if (clinicSettle.getAcctPay().compareTo(acctPay) != 0) { - throw new ServiceException("医保反结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSettleId() - + " 账户支付:" + clinicSettle.getAcctPay() + " payment记录账户支付金额:" + acctPay); - } - if (clinicSettle.getMedfeeSumamt().compareTo(medfeeSumamt) != 0) { - throw new ServiceException("医保反结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSettleId() - + " 账户支付:" + clinicSettle.getMedfeeSumamt() + " payment记录账户支付金额:" + medfeeSumamt); - } - if (clinicSettle.getFundPaySumamt().compareTo(fundPaySumamt) != 0) { - throw new ServiceException("医保反结记录与业务记录账户支付金额不等!请核对!错误信息:医保结算id:" + clinicSettle.getSettleId() - + " 账户支付:" + clinicSettle.getFundPaySumamt() + " payment记录账户支付金额:" + fundPaySumamt); - } - refdSetlFlag = Whether.YES.getCode(); - String param2208 = clinicSettle.getParam2208(); - Clinic2208UnSetlInfoParam clinic2208UnSetlInfoParam - = JsonUtils.parseObject(param2208, Clinic2208UnSetlInfoParam.class); - psnNo = clinic2208UnSetlInfoParam.getPsnNo(); - mdtrtId = clinic2208UnSetlInfoParam.getMdtrtId(); - } - - financial3202OtherParam = new Financial3202OtherParam(); - - financial3202OtherParam.setSetlId(settleId).setAcctPay(acctPay).setFundPaySumamt(fundPaySumamt) - .setMdtrtId(mdtrtId).setPsnNo(psnNo).setMedfeeSumamt(medfeeSumamt).setRefdSetlFlag(refdSetlFlag); - financial3202OtherParam.setCashPayamt(cashPay).setMedSumfee(medSumfee); - financial3202FileParamList.add(financial3202OtherParam); - } - - return financial3202FileParamList; - } - - /** - * 获取3202的现金支付金额 - * - * @param settlementIdList - */ - public FinancialSettlement3202Param getFinancialSettlement3202Param(List settlementIdList, BigDecimal a, - BigDecimal b) { - - // Financial3202OtherParam financial3202OtherParam = new Financial3202OtherParam(); - BigDecimal cashPay = BigDecimal.ZERO; - - // 比较yb_clinic_settle表和payment系列表数据是否一致 - // 查询医保表数据 - List clinicSettles = iClinicSettleService - .list(new LambdaQueryWrapper().in(ClinicSettle::getSetlId, settlementIdList)); - List clinicUnSettles = iClinicUnSettleService - .list(new LambdaQueryWrapper().in(ClinicUnSettle::getSettleId, settlementIdList)); - // 防空指针 - if (clinicSettles == null) { - clinicSettles = new ArrayList<>(); - } - if (clinicUnSettles == null) { - clinicUnSettles = new ArrayList<>(); - } - List clinicSettleTime - = clinicSettles.stream().map(ClinicSettle::getSetlTime).collect(Collectors.toList()); - List clinicUnSettleTime - = clinicUnSettles.stream().map(ClinicUnSettle::getSetlTime).collect(Collectors.toList()); - clinicSettleTime.addAll(clinicUnSettleTime); - - Date stmtBegndate = null; - Date stmtEnddate = null; - - // 获取最早的日期 - Optional minDate = clinicSettleTime.stream().min(Date::compareTo); - - // 获取最晚的日期 - Optional maxDate = clinicSettleTime.stream().max(Date::compareTo); - - if (!minDate.isPresent() || !maxDate.isPresent()) { - throw new ServiceException("未查询到医保结算时间"); - } - stmtBegndate = minDate.get(); - stmtEnddate = maxDate.get(); - - // payment的id集合 - // List paymentReconciliationIdList = - // paymentReconciliations.stream().map(PaymentReconciliation::getId).collect(Collectors.toList()); - // 查询详情表数据 - List paymentRecDetailList = iPaymentRecDetailService - .list(new LambdaQueryWrapper().in(PaymentRecDetail::getPayTransText, settlementIdList) - .ne(PaymentRecDetail::getPayTransNo, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentRecDetail::getPayTransText, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_ALI_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_VX_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_UNION_VALUE.getValue()) - .ne(PaymentRecDetail::getPayEnum, YbPayment.SELF_CASH_VALUE.getValue()) - .isNotNull(PaymentRecDetail::getPayTransText)); - if (paymentRecDetailList.isEmpty()) { - throw new ServiceException("该时间内无付款明细记录"); - } - // 该部分代码为辅助调试时使用,无任何业务处理 start - for (PaymentRecDetail paymentRecDetail : paymentRecDetailList) { - if (StringUtils.isEmpty(paymentRecDetail.getPayTransNo())) { - log.info(JsonUtils.toJson(paymentRecDetail)); - throw new ServiceException("paymentDetail无返回交易码"); - } - } - // end - - Map> paymentRecDetailMapBySettleId - = paymentRecDetailList.stream().collect(Collectors.groupingBy(PaymentRecDetail::getPayTransText)); - - // List financial3202FileParamList = new ArrayList<>(); - // Financial3202FileParam financial3202FileParam; - for (Map.Entry> stringListEntry : paymentRecDetailMapBySettleId.entrySet()) { - // 获取settleId - String settleId = stringListEntry.getKey(); - if (CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(settleId)) { - continue; - } - Optional settleOptional - = clinicSettles.stream().filter(e -> settleId.equals(e.getSetlId())).findAny(); - Optional unSettleOptional - = clinicUnSettles.stream().filter(e -> settleId.equals(e.getSettleId())).findAny(); - if (!settleOptional.isPresent() && !unSettleOptional.isPresent()) { - throw new ServiceException("付款详情中结算id在医保记录中不存在,错误信息:paymentId:" - + stringListEntry.getValue().get(0).getReconciliationId() + ";医保结算id" + settleId); - } - if (settleOptional.isPresent() && unSettleOptional.isPresent()) { - throw new ServiceException("付款详情中结算id在医保记录中同时存在正结和反结,错误信息:paymentId:" - + stringListEntry.getValue().get(0).getReconciliationId() + ";医保结算id" + settleId); - } - // 校对金额 - for (PaymentRecDetail paymentRecDetail : stringListEntry.getValue()) { - if (YbPayment.SELF_CASH_PAY.getValue().equals(paymentRecDetail.getPayEnum()) - && !CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(paymentRecDetail.getPayTransNo()) - && !CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(paymentRecDetail.getPayTransText())) { - cashPay = cashPay.add(paymentRecDetail.getAmount()); - } - } - } - - FinancialSettlement3202Param financialSettlement3202Param = new FinancialSettlement3202Param(); - financialSettlement3202Param.setCashPayamt(cashPay).setMedfeeSumamt(a).setFundPaySumamt(b) - .setStmtBegndate(stmtBegndate).setStmtEnddate(stmtEnddate); - - return financialSettlement3202Param; - } - - public void uploadFinancialSettlement3202Param(FinancialSettlement3202Param financialSettlement3202Param) { - - } - - public Page getFinancial3203APage(String searchKey, Integer pageNo, Integer pageSize, - HttpServletRequest request) { - - QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(new FinancialApplyRecord(), - searchKey, new HashSet<>(Arrays.asList("out_result")), null); - // 设置排序 - queryWrapper.orderByDesc("create_time"); - - // 申请信息 - Page financialApplyRecordPage = HisPageUtils.selectPage( - iFinancialApplyRecordService.getBaseMapper(), queryWrapper, pageNo, pageSize, FinancialApplyRecord.class); - - return financialApplyRecordPage; - } - - /** - * 根据申请结算ID查找申请结算记录 - * - * @param clrAppyEvtId - * @return - */ - public FinancialApplyRecord getFinancial3204ParamByClrAppyEvtId(String clrAppyEvtId) { - - FinancialApplyRecord financialApplyRecord = iFinancialApplyRecordService - .getOne(new LambdaQueryWrapper().eq(FinancialApplyRecord::getOutResult, clrAppyEvtId) - .orderByDesc(FinancialApplyRecord::getId).last(YbCommonConstants.sqlConst.LIMIT1)); - - if (financialApplyRecord == null) { - throw new ServiceException("未查询到申请记录"); - } - return financialApplyRecord; - } - - /** - * 【2301】住院费用明细上传 - * - * @param encounterId 就诊id - * @return 2301入参 - */ - public Yb2301InputFeeDetailModel getYb2301FeeDetailParam(Long encounterId, List chargeItemIds) { - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊记录"); - } - - InpatientReg inpatientReg = inpatientRegService - .getOne(new LambdaQueryWrapper().eq(InpatientReg::getIptNo, encounter.getBusNo()) - .orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1)); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保就诊记录"); - } - - // 获取今天和昨天的上午10点时间 - // LocalDateTime today10AM = LocalDateTime.of(LocalDate.now(), LocalTime.of(10, 0)); // 今天10点 - // LocalDateTime yesterday10AM = today10AM.minusDays(1); // 昨天10点(自动处理跨月/年) - // List chargeItemList = iChargeItemService.list(new LambdaQueryWrapper() - // .eq(ChargeItem::getEncounterId, encounterId).between(ChargeItem::getEnteredDate, yesterday10AM, today10AM)); - // List chargeItemList = iChargeItemService.list(new LambdaQueryWrapper() - // .eq(ChargeItem::getEncounterId, encounterId).in(ChargeItem::getId, chargeItemIds)); - List chargeItemBaseInfoDtos - = iChargeItemService.getChargeItemBaseInfoByIds(chargeItemIds); - List chargeItemBaseInfoDtosList = new ArrayList<>(); - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) { - if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - continue; - } - if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) { - // 反序列化:将JSON数组字符串转为List<> - List chargeItemBaseInfoList - = JsonUtils.parseObject(chargeItemBaseInfoDto.getChildrenJson(), new TypeReference>() {}); - chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList); - } else { - chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto); - } - } - Yb2301InputFeeDetail yb2301InputFeeDetail; - List yb2301InputFeeDetailList = new ArrayList<>(); - // int i = 1; - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtosList) { - yb2301InputFeeDetail = new Yb2301InputFeeDetail(); - yb2301InputFeeDetail.setFeedetlSn(chargeItemBaseInfoDto.getBusNo()).setMdtrtId(inpatientReg.getMdtrtId()) - .setPsnNo(inpatientReg.getPsnNo()).setMedType(String.valueOf(encounter.getYbClassEnum())) - .setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate()).setMedListCodg(chargeItemBaseInfoDto.getYbNo()) - .setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo()) - .setDetItemFeeSumamt(chargeItemBaseInfoDto.getTotalPrice()) - .setCnt(chargeItemBaseInfoDto.getQuantityValue()).setPric(chargeItemBaseInfoDto.getUnitPrice()) - .setBilgDeptName(chargeItemBaseInfoDto.getDeptName()).setBilgDrName(chargeItemBaseInfoDto.getDoctName()) - .setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo()) - .setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo()); - - yb2301InputFeeDetailList.add(yb2301InputFeeDetail); - } - - Yb2301InputFeeDetailModel yb2301InputFeeDetailModel = new Yb2301InputFeeDetailModel(); - yb2301InputFeeDetailModel.setFeedetail(yb2301InputFeeDetailList) - .setInsuplcAdmdvs(inpatientReg.getInsuplcAdmdvs()); - return yb2301InputFeeDetailModel; - } - - /** - * 【2302】费用明细上传撤销 - * - * @param chargeItemId 收费项 - * @return 2302入参 - */ - public Yb2302InputInpatient getYb2302InpatientParam(Long chargeItemId) { - ChargeItem chargeItem = iChargeItemService.getById(chargeItemId); - if (chargeItem == null) { - throw new ServiceException("未查询到收费项信息"); - } - InpatientFeeDetail inpatientFeeDetail = inpatientFeeDetailService.getOne( - new LambdaQueryWrapper().eq(InpatientFeeDetail::getFeedetlSn, chargeItem.getBusNo()) - .eq(InpatientFeeDetail::getDeleteFlag, DelFlag.NO.getCode())); - if (inpatientFeeDetail == null) { - throw new ServiceException("未查询到费用上传信息"); - } - Yb2302InputInpatient yb2302InputInpatient = new Yb2302InputInpatient(); - - return yb2302InputInpatient.setMdtrtId(inpatientFeeDetail.getMdtrtId()).setPsnNo(inpatientFeeDetail.getPsnNo()) - .setFeedetlSn(inpatientFeeDetail.getFeedetlSn()); - - } - - /** - * 【2303】住院预结算 - * - * @param encounterId 就诊id - * @return 2303入参 - */ - public Yb2303InputInpatient getYb2303InpatientPram(Long encounterId, List chargeItemIds) { - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到挂号信息"); - } - InpatientReg inpatientReg = inpatientRegService - .getOne(new LambdaQueryWrapper().eq(InpatientReg::getIptNo, encounter.getBusNo()) - .orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1)); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保就诊记录"); - } - InfoPerson infoPerson = iPerinfoService.getByPsnNo(inpatientReg.getPsnNo()); - if (infoPerson == null) { - throw new ServiceException("未查询到患者信息"); - } - // 获取今天和昨天的上午10点时间 - // LocalDateTime today10AM = LocalDateTime.of(LocalDate.now(), LocalTime.of(10, 0)); // 今天10点 - // LocalDateTime yesterday10AM = today10AM.minusDays(1); // 昨天10点(自动处理跨月/年) - - // List chargeItemList = iChargeItemService.list(new LambdaQueryWrapper() - // .eq(ChargeItem::getEncounterId, encounterId).between(ChargeItem::getEnteredDate, yesterday10AM, today10AM)); - List chargeItemBaseInfoDtos - = iChargeItemService.getChargeItemBaseInfoByIds(chargeItemIds); - List chargeItemBaseInfoDtosList = new ArrayList<>(); - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) { - if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - continue; - } - if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) { - // 反序列化:将JSON数组字符串转为List<> - List chargeItemBaseInfoList - = JsonUtils.parseObject(chargeItemBaseInfoDto.getChildrenJson(), new TypeReference>() {}); - chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList); - } else { - chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto); - } - } - // 计算医疗总费用 - BigDecimal medfee_sumamt = BigDecimal.ZERO; - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtosList) { - medfee_sumamt = medfee_sumamt.add(chargeItemBaseInfoDto.getTotalPrice()); - } - - Yb2303InputInpatient yb2303InputInpatient = new Yb2303InputInpatient(); - yb2303InputInpatient.setPsnNo(infoPerson.getPsnNo()) - .setMdtrtCertType(YbMdtrtCertType.MDTRT_CERT_TYPE02.getValue()).setMdtrtCertNo(infoPerson.getCertno()) - .setMedfeeSumamt(medfee_sumamt).setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()) - .setMdtrtId(inpatientReg.getMdtrtId()).setInsutype(infoPerson.getInsutype()) - .setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs()) - .setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs()); - - // todo:中如结算标志需要判断一下,待2304接口开发完成后编辑 - return yb2303InputInpatient; - } - - /** - * 【2304】住院结算 - * - * @param paymentDto 预结算参数 - * @return 2304入参 - */ - public Yb2304InputInpatient getYb2304InpatientParam(PaymentInpatientDto paymentDto) { - Encounter encounter = iEncounterService.getById(paymentDto.getEncounterId()); - if (encounter == null) { - throw new ServiceException("未查询到挂号信息"); - } - // 查询挂号信息 - InpatientReg inpatientReg = inpatientRegService - .getOne(new LambdaQueryWrapper().eq(InpatientReg::getIptNo, encounter.getBusNo()) - .orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1)); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保就诊记录"); - } - InfoPerson infoPerson = iPerinfoService.getByPsnNo(inpatientReg.getPsnNo()); - if (infoPerson == null) { - throw new ServiceException("未查询到患者信息"); - } - - // List chargeItemList = - // iChargeItemService.list(new LambdaQueryWrapper().eq(ChargeItem::getEncounterId, encounterId) - // .in(ChargeItem::getId, chargeItemIds).eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode())); - List chargeItemBaseInfoDtos - = iChargeItemService.getChargeItemBaseInfoByIds(paymentDto.getChargeItemIds()); - List chargeItemBaseInfoDtosList = new ArrayList<>(); - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) { - if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - continue; - } - if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) { - // 反序列化:将JSON数组字符串转为List<> - List chargeItemBaseInfoList - = JsonUtils.parseObject(chargeItemBaseInfoDto.getChildrenJson(), new TypeReference>() {}); - chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList); - } else { - chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto); - } - } - // 计算医疗总费用(这里总费用的计算方式很多种,现在用的是最老笨的,除了这个还可以去2303和2302去取值) - BigDecimal medfee_sumamt = BigDecimal.ZERO; - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtosList) { - medfee_sumamt = medfee_sumamt.add(chargeItemBaseInfoDto.getTotalPrice()); - } - - Yb2304InputInpatient yb2304InputInpatient = new Yb2304InputInpatient(); - yb2304InputInpatient.setPsnNo(infoPerson.getPsnNo()) - .setMdtrtCertType(YbMdtrtCertType.getByValue(paymentDto.getYbMdtrtCertType()).getValue()) - .setMdtrtCertNo(paymentDto.getBusiCardInfo()).setMedfeeSumamt(medfee_sumamt) - .setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()).setMdtrtId(inpatientReg.getMdtrtId()) - .setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs()) - .setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs()) - .setAcctUsedFlag(Whether.YES.getCode()); - - // todo:中如结算标志需要判断一下,待2304接口开发完成后编辑 - return yb2304InputInpatient; - } - - /** - * 【2305】撤销结算 - * - * @param inpatientSettle 结算实体 - * @return 2305入参 - */ - public Yb2305InputInpatient getYb2305InpatientParam(InpatientSettle inpatientSettle) { - - // inpatientSettle = inpatientSettleService.getBySettleId(ybSettleId); - Yb2305InputInpatient yb2305InputInpatient = new Yb2305InputInpatient(); - return yb2305InputInpatient.setMdtrtId(inpatientSettle.getMdtrtId()).setPsnNo(inpatientSettle.getPsnNo()) - .setSetlId(inpatientSettle.getSetlId()); - - } - - /** - * 【2401】 办理入院 - * - * @param encounterId 就诊id - * @return 2401参数 - */ - public Yb2401InputInpatientMdtrtInfo getYb2401InputInpatientMdtrtInfo(Long encounterId) { - - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - - Account account = iAccountService.getYbAccount(encounterId); - if (account == null) { - throw new ServiceException("未查询到医保账户信息"); - } - // if (account.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - // throw new ServiceException("挂号账户为自费账户,无法办理医保住院登记"); - // } - - Contract contract = iContractService.getContract(account.getContractNo()); - if (contract == null) { - throw new ServiceException("未查询到对应合同信息"); - } - - Patient patient = iPatientService.getById(encounter.getPatientId()); - if (patient == null) { - throw new ServiceException("未查询到患者信息"); - } - - InfoPerson infoPerson - = iPerinfoService.getPerInfoByIdCard(patient.getIdCard(), SecurityUtils.getLoginUser().getTenantId()); - if (infoPerson == null) { - throw new ServiceException("未查询到患者的医保信息"); - } - - List diagnosisList = iEncounterDiagnosisService.getDiagnosisList(encounterId); - if (diagnosisList.isEmpty()) { - throw new ServiceException("未查询到诊断信息"); - } - - EncounterDiagnosis mainDiagnosis = iEncounterDiagnosisService.getMainDiagnosis(diagnosisList); - if (mainDiagnosis == null) { - throw new ServiceException("未查询到主诊断信息"); - } - - Condition condition = iConditionService.getById(mainDiagnosis.getConditionId()); - if (condition == null) { - throw new ServiceException("未查询到主诊断信息"); - } - - ConditionDefinition conditionDefinition = iConditionDefinitionService.getById(condition.getDefinitionId()); - if (conditionDefinition == null) { - throw new ServiceException("未查询到主诊断定义信息"); - } - - List encounterParticipantListByTypeCode = iEncounterParticipantService - .getEncounterParticipantListByTypeCode(encounterId, ParticipantType.ADMITTING_DOCTOR); - if (encounterParticipantListByTypeCode.isEmpty()) { - throw new ServiceException("未查询到住院医生信息"); - } - - Practitioner practitioner - = iPractitionerService.getById(encounterParticipantListByTypeCode.get(0).getPractitionerId()); - if (practitioner == null) { - throw new ServiceException("未查询到住院医生信息"); - } - - List encounterLocationList = iEncounterLocationService.getEncounterLocationList(encounterId, - LocationForm.BED, EncounterActivityStatus.ACTIVE); - if (encounterLocationList.isEmpty()) { - throw new ServiceException("未查询到床位信息"); - } - - Organization organization = iOrganizationService.getById(practitioner.getOrgId()); - if (organization == null) { - throw new ServiceException("未查询到就诊科室信息"); - } - - Yb2401InputInpatientMdtrtInfo yb2401InputInpatientMdtrtInfo = new Yb2401InputInpatientMdtrtInfo(); - yb2401InputInpatientMdtrtInfo - // 人员编号 - .setPsnNo(infoPerson.getPsnNo()) - // 险种类型 - .setInsutype(infoPerson.getInsutype()) - // 开始时间 - .setBegntime(encounter.getStartTime()) - // 就诊凭证类型 - .setMdtrtCertType(YbMdtrtCertType.MDTRT_CERT_TYPE02.getCode()) - // 病历号 - .setMedrcdno(encounter.getBusNo()) - // 医疗类别 - .setMedType(mainDiagnosis.getMedTypeCode()) - // 住院号 - .setIptNo(encounter.getBusNo()) - // 主治医生编码 - .setAtddrNo(practitioner.getYbNo()) - // 主诊医师姓名 - .setChfpdrName(practitioner.getName()) - // 入院诊断描述 - .setAdmDiagDscr("") - // 入院科室编码 - .setAdmDeptCodg(organization.getYbNo()) - // 入院科室名称 - .setAdmDeptName(organization.getName()) - // 入院床位 - .setAdmBed(encounterLocationList.get(0).getLocationId().toString()) - // 住院主诊断代码 - .setDscgMaindiagCode(conditionDefinition.getYbNo()) - // 住院主诊断名称 - .setDscgMaindiagName(conditionDefinition.getName()) - // 参保地医保区划 - .setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs()) - // 就医地医保区划 - .setMdtrtareaAdmvs(contract.getAdmVs()); - return yb2401InputInpatientMdtrtInfo; - } - - /** - * 【2402】办理出院 - * - * @param encounterId 就诊id - * @return 2402参数 - */ - public Yb2402InputParam getYb2402InputInpatientDscgInfo(Long encounterId, Contract contract) { - - Yb2402InputParam yb2402InputParam = new Yb2402InputParam(); - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - - InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo()); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保挂号信息"); - } - - Account account = iAccountService.getAccountByEncounterFlag(encounterId); - if (account == null) { - throw new ServiceException("未查询到账户信息"); - } - if (account.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - throw new ServiceException("挂号账户为自费账户,无法办理医保住院登记"); - } - - contract = iContractService.getContract(account.getContractNo()); - if (contract == null) { - throw new ServiceException("未查询到对应合同信息"); - } - - Patient patient = iPatientService.getById(encounter.getPatientId()); - if (patient == null) { - throw new ServiceException("未查询到患者信息"); - } - - // InfoPerson infoPerson = - // iPerinfoService.getPerInfoByIdCard(patient.getIdCard(), SecurityUtils.getLoginUser().getTenantId()); - // if (infoPerson == null) { - // throw new ServiceException("未查询到患者的医保信息"); - // } - List diagnosisList - = iEncounterDiagnosisService.getDiagnosisListByType(encounterId, YbIptDiseTypeCode.DISCHARGE_DIAGNOSIS); - if (diagnosisList.isEmpty()) { - throw new ServiceException("未查询到出院诊断信息"); - } - - // EncounterDiagnosis mainDiagnosis = iEncounterDiagnosisService.getMainDiagnosis(diagnosisList); - // if (mainDiagnosis == null) { - // throw new ServiceException("未查询到主诊断信息"); - // } - List conditionList = iConditionService.getConditionListById( - diagnosisList.stream().map(EncounterDiagnosis::getConditionId).collect(Collectors.toList())); - if (conditionList.isEmpty()) { - throw new ServiceException("未查询到诊断信息"); - } - if (conditionList.size() != diagnosisList.size()) { - throw new ServiceException("数据异常:查询到诊断信息与诊断定义信息数量不相等"); - } - - List conditionDefinitionList = iConditionDefinitionService.getConditionDefinitionListByIds( - conditionList.stream().map(Condition::getDefinitionId).collect(Collectors.toList())); - if (conditionDefinitionList.isEmpty()) { - throw new ServiceException("未查询到主诊断定义信息"); - } - - List encounterParticipantListByTypeCode = iEncounterParticipantService - .getEncounterParticipantListByTypeCode(encounterId, ParticipantType.ADMITTING_DOCTOR); - if (encounterParticipantListByTypeCode.isEmpty()) { - throw new ServiceException("未查询到住院医生信息"); - } - - List practitionerList - = iPractitionerService.getPractitionerListById(encounterParticipantListByTypeCode.stream() - .map(EncounterParticipant::getPractitionerId).collect(Collectors.toList()));// 20250730被告知一个住院患者只有一套门诊医生住院医生护士等(主治医生和主任医生不一定会有),不存在一个患者多个医生 - if (practitionerList.isEmpty()) { - throw new ServiceException("未查询到住院医生信息"); - } - - List encounterLocationList = iEncounterLocationService.getEncounterLocationList(encounterId, - LocationForm.BED, EncounterActivityStatus.ACTIVE); - if (encounterLocationList.isEmpty()) { - throw new ServiceException("未查询到床位信息"); - } - - List organizationList = iOrganizationService.getOrganizationListById( - practitionerList.stream().map(Practitioner::getOrgId).collect(Collectors.toList())); - if (organizationList.isEmpty()) { - throw new ServiceException("未查询到就诊科室信息"); - } - - Yb2402InputInpatientDscgInfo yb2402InputInpatientDscgInfo = new Yb2402InputInpatientDscgInfo(); - yb2402InputInpatientDscgInfo - // 就诊ID - .setMdtrtId(inpatientReg.getMdtrtId()) - // 人员编号 - .setPsnNo(inpatientReg.getPsnNo()) - // 险种类型 - .setInsutype(inpatientReg.getInsutype()) - // 结束时间 - .setEndtime(encounter.getEndTime()) - // 出院科室编码 - .setDscgDeptCodg(organizationList.get(0).getYbNo()) - // 出院科室名称 - .setDscgDeptName(organizationList.get(0).getName()) - // 离院方式 - .setDscgWay("");// todo:离院方式待办 - - Map mapById - = conditionList.stream().collect(Collectors.toMap(Condition::getId, Function.identity())); - Map encounterParticipantMapById = encounterParticipantListByTypeCode.stream() - .collect(Collectors.toMap(EncounterParticipant::getId, Function.identity())); - Map conditionDefinitionMapById - = conditionDefinitionList.stream().collect(Collectors.toMap(ConditionDefinition::getId, Function.identity())); - Map organizationMapById - = organizationList.stream().collect(Collectors.toMap(Organization::getId, Function.identity())); - Map practitionerMapById - = practitionerList.stream().collect(Collectors.toMap(Practitioner::getId, Function.identity())); - Yb2402InputInpatientDiseInfo yb2402InputInpatientDiseInfo; - List yb2402InputInpatientDiseInfos = new ArrayList<>(); - for (EncounterDiagnosis encounterDiagnosis : diagnosisList) { - Condition condition = mapById.get(encounterDiagnosis.getConditionId()); - if (condition == null) { - throw new ServiceException( - "数据异常:就诊诊断信息无法关联到诊断信息;异常数据encounterDiagnosisId:" + encounterDiagnosis.getId()); - } - EncounterParticipant encounterParticipant = encounterParticipantMapById.get(condition.getRecorderId()); - if (encounterParticipant == null) { - throw new ServiceException("数据异常:就诊诊断信息无法关联到医生信息;异常数据condition:" + condition.getId()); - } - Practitioner practitioner = practitionerMapById.get(encounterParticipant.getPractitionerId()); - if (practitioner == null) { - throw new ServiceException( - "数据异常:就诊诊断信息无法关联到医生信息;异常数据encounterParticipant:" + encounterParticipant.getId()); - } - ConditionDefinition conditionDefinition = conditionDefinitionMapById.get(condition.getDefinitionId()); - if (conditionDefinition == null) { - throw new ServiceException("数据异常:就诊诊断信息无法关联到诊断定义;异常数据condition:" + condition.getId()); - } - Organization organization = organizationMapById.get(practitioner.getOrgId()); - if (organization == null) { - throw new ServiceException("数据异常:医生信息无法关联到科室;异常数据practitioner:" + practitioner.getId()); - } - yb2402InputInpatientDiseInfo = new Yb2402InputInpatientDiseInfo(); - yb2402InputInpatientDiseInfo - // 就诊id - .setMdtrtId(inpatientReg.getMdtrtId()) - // 人员编号 - .setPsnNo(inpatientReg.getPsnNo()) - // 诊断类别 - .setDiagType(conditionDefinition.getSourceEnum().toString()) - // 主诊断标志 - .setMaindiagFlag(encounterDiagnosis.getMaindiseFlag().equals(Whether.YES.getValue()) - ? Whether.YES.getCode() : Whether.NO.getCode()) - // 诊断排序号 - .setDiagSrtNo(encounterDiagnosis.getDiagSrtNo()) - // 诊断代码 - .setDiagCode(conditionDefinition.getYbNo()) - // 诊断名称 - .setDiagName(conditionDefinition.getName()) - // 诊断科室 - .setDiagDept(organization.getYbNo()) - // 诊断医生编码 - .setDiseDorNo(practitioner.getYbNo()) - // 诊断医生姓名 - .setDiseDorName(practitioner.getName()) - // 诊断时间 - .setDiagTime(encounterDiagnosis.getCreateTime()); - - yb2402InputInpatientDiseInfos.add(yb2402InputInpatientDiseInfo); - } - - // 拼装参数 - yb2402InputParam.setDiseinfo(yb2402InputInpatientDiseInfos); - yb2402InputParam.setDscginfo(yb2402InputInpatientDscgInfo); - - return yb2402InputParam; - } - - /** - * 【2403】接口参数 - * - * @param encounterId 就诊id - * @return 2403接口参数 - */ - public Yb2403InputParam getYb2403InputParam(Long encounterId) { - - Yb2403InputParam yb24032InputParam = new Yb2403InputParam(); - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - - InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo()); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保挂号信息"); - } - - Account account = iAccountService.getAccountByEncounterFlag(encounterId); - if (account == null) { - throw new ServiceException("未查询到账户信息"); - } - if (account.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - throw new ServiceException("挂号账户为自费账户,无法办理医保住院登记"); - } - - Contract contract = iContractService.getContract(account.getContractNo()); - if (contract == null) { - throw new ServiceException("未查询到对应合同信息"); - } - - Patient patient = iPatientService.getById(encounter.getPatientId()); - if (patient == null) { - throw new ServiceException("未查询到患者信息"); - } - - // InfoPerson infoPerson = - // iPerinfoService.getPerInfoByIdCard(patient.getIdCard(), SecurityUtils.getLoginUser().getTenantId()); - // if (infoPerson == null) { - // throw new ServiceException("未查询到患者的医保信息"); - // } - List diagnosisList - = iEncounterDiagnosisService.getDiagnosisListByType(encounterId, YbIptDiseTypeCode.DISCHARGE_DIAGNOSIS); - if (diagnosisList.isEmpty()) { - throw new ServiceException("未查询到出院诊断信息"); - } - - EncounterDiagnosis mainDiagnosis = iEncounterDiagnosisService.getMainDiagnosis(diagnosisList); - if (mainDiagnosis == null) { - throw new ServiceException("未查询到主诊断信息"); - } - - List conditionList = iConditionService.getConditionListById( - diagnosisList.stream().map(EncounterDiagnosis::getConditionId).collect(Collectors.toList())); - if (conditionList.isEmpty()) { - throw new ServiceException("未查询到诊断信息"); - } - if (conditionList.size() != diagnosisList.size()) { - throw new ServiceException("数据异常:查询到诊断信息与诊断定义信息数量不相等"); - } - Optional firstOptional - = conditionList.stream().filter(e -> e.getId().equals(mainDiagnosis.getConditionId())).findFirst(); - if (firstOptional.isEmpty()) { - throw new ServiceException("数据异常:主诊断关联不到诊断信息"); - } - Condition mainCondition = firstOptional.get(); - - List conditionDefinitionList = iConditionDefinitionService.getConditionDefinitionListByIds( - conditionList.stream().map(Condition::getDefinitionId).collect(Collectors.toList())); - if (conditionDefinitionList.isEmpty()) { - throw new ServiceException("未查询到主诊断定义信息"); - } - Optional optional - = conditionDefinitionList.stream().filter(e -> e.getId().equals(mainCondition.getDefinitionId())).findFirst(); - if (optional.isEmpty()) { - throw new ServiceException("数据异常:主诊断关联不到诊断信息"); - } - ConditionDefinition mainConditionDefinition = optional.get(); - - List encounterParticipantListByTypeCode = iEncounterParticipantService - .getEncounterParticipantListByTypeCode(encounterId, ParticipantType.ADMITTING_DOCTOR); - if (encounterParticipantListByTypeCode.isEmpty()) { - throw new ServiceException("未查询到住院医生信息"); - } - - List practitionerList - = iPractitionerService.getPractitionerListById(encounterParticipantListByTypeCode.stream() - .map(EncounterParticipant::getPractitionerId).collect(Collectors.toList()));// 20250730被告知一个住院患者只有一套门诊医生住院医生护士等(主治医生和主任医生不一定会有),不存在一个患者多个医生 - if (practitionerList.isEmpty()) { - throw new ServiceException("未查询到住院医生信息"); - } - - List encounterLocationList = iEncounterLocationService.getEncounterLocationList(encounterId, - LocationForm.BED, EncounterActivityStatus.ACTIVE); - if (encounterLocationList.isEmpty()) { - throw new ServiceException("未查询到床位信息"); - } - - List organizationList = iOrganizationService.getOrganizationListById( - practitionerList.stream().map(Practitioner::getOrgId).collect(Collectors.toList())); - if (organizationList.isEmpty()) { - throw new ServiceException("未查询到就诊科室信息"); - } - - Yb2403InputAdmInfo yb2403InputAdmInfo = new Yb2403InputAdmInfo(); - yb2403InputAdmInfo - // 就诊ID - .setMdtrtId(inpatientReg.getMdtrtId()) - // 人员编号 - .setPsnNo(inpatientReg.getPsnNo()) - // 开始时间 - .setBegntime(encounter.getStartTime()) - // 就诊凭证类型 - .setMdtrtCertType(YbMdtrtCertType.MDTRT_CERT_TYPE02.getCode()) - // 住院/门诊号 - .setIptOtpNo(encounter.getBusNo()) - // 医疗类别 - .setMedType(mainDiagnosis.getMedTypeCode()) - // 主治医生编码 - .setAtddrNo(practitionerList.get(0).getYbNo()) - // 主诊医师姓名 - .setChfpdrName(practitionerList.get(0).getName()) - // 入院诊断描述 - .setAdmDiagDscr("") - // 入院科室编码 - .setAdmDeptCodg(organizationList.get(0).getYbNo()) - // 入院科室名称 - .setAdmDeptName(organizationList.get(0).getName()) - // 入院床位 - .setAdmBed(encounterLocationList.get(0).getLocationId().toString()) - // 住院主诊断代码 - .setDscgMaindiagCode(mainConditionDefinition.getYbNo()) - // 住院主诊断名称 - .setDscgMaindiagName(mainConditionDefinition.getName()); - - Map mapById - = conditionList.stream().collect(Collectors.toMap(Condition::getId, Function.identity())); - Map encounterParticipantMapById = encounterParticipantListByTypeCode.stream() - .collect(Collectors.toMap(EncounterParticipant::getId, Function.identity())); - Map conditionDefinitionMapById - = conditionDefinitionList.stream().collect(Collectors.toMap(ConditionDefinition::getId, Function.identity())); - Map organizationMapById - = organizationList.stream().collect(Collectors.toMap(Organization::getId, Function.identity())); - Map practitionerMapById - = practitionerList.stream().collect(Collectors.toMap(Practitioner::getId, Function.identity())); - Yb2403InputDiseInfo yb2403InputDiseInfo; - List yb2403InputDiseInfos = new ArrayList<>(); - for (EncounterDiagnosis encounterDiagnosis : diagnosisList) { - Condition condition = mapById.get(encounterDiagnosis.getConditionId()); - if (condition == null) { - throw new ServiceException( - "数据异常:就诊诊断信息无法关联到诊断信息;异常数据encounterDiagnosisId:" + encounterDiagnosis.getId()); - } - EncounterParticipant encounterParticipant = encounterParticipantMapById.get(condition.getRecorderId()); - if (encounterParticipant == null) { - throw new ServiceException("数据异常:就诊诊断信息无法关联到医生信息;异常数据condition:" + condition.getId()); - } - Practitioner practitioner = practitionerMapById.get(encounterParticipant.getPractitionerId()); - if (practitioner == null) { - throw new ServiceException( - "数据异常:就诊诊断信息无法关联到医生信息;异常数据encounterParticipant:" + encounterParticipant.getId()); - } - ConditionDefinition conditionDefinition = conditionDefinitionMapById.get(condition.getDefinitionId()); - if (conditionDefinition == null) { - throw new ServiceException("数据异常:就诊诊断信息无法关联到诊断定义;异常数据condition:" + condition.getId()); - } - Organization organization = organizationMapById.get(practitioner.getOrgId()); - if (organization == null) { - throw new ServiceException("数据异常:医生信息无法关联到科室;异常数据practitioner:" + practitioner.getId()); - } - yb2403InputDiseInfo = new Yb2403InputDiseInfo(); - yb2403InputDiseInfo - // 就诊id - .setMdtrtId(inpatientReg.getMdtrtId()) - // 人员编号 - .setPsnNo(inpatientReg.getPsnNo()) - // 诊断类别 - .setDiagType(conditionDefinition.getSourceEnum().toString()) - // 主诊断标志 - .setMaindiagFlag(encounterDiagnosis.getMaindiseFlag().equals(Whether.YES.getValue()) - ? Whether.YES.getCode() : Whether.NO.getCode()) - // 诊断排序号 - .setDiagSrtNo(encounterDiagnosis.getDiagSrtNo()) - // 诊断代码 - .setDiagCode(conditionDefinition.getYbNo()) - // 诊断名称 - .setDiagName(conditionDefinition.getName()) - // 诊断科室 - .setDiagDept(organization.getYbNo()) - // 诊断医生编码 - .setDiseDorNo(practitioner.getYbNo()) - // 诊断医生姓名 - .setDiseDorName(practitioner.getName()) - // 诊断时间 - .setDiagTime(encounterDiagnosis.getCreateTime()); - - yb2403InputDiseInfos.add(yb2403InputDiseInfo); - } - - // 拼装参数 - yb24032InputParam.setDiseinfo(yb2403InputDiseInfos); - yb24032InputParam.setAdminfo(yb2403InputAdmInfo); - - return yb24032InputParam; - } - - /** - * 【2404】住院办理撤销 - * - * @param encounterId 就诊id - * @return 2404参数 - */ - public Yb2404InputInpatient getYb2404InputInpatient(Long encounterId) { - - Yb2404InputInpatient yb2404InputInpatient = new Yb2404InputInpatient(); - - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - - InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo()); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保挂号信息"); - } - yb2404InputInpatient.setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo()); - - return yb2404InputInpatient; - } - - /** - * 【2405】出院办理撤销 - * - * @param encounterId 就诊id - * @return 2405参数 - */ - public Yb2405InputInpatient getYb2405InputInpatient(Long encounterId) { - - Yb2405InputInpatient yb2405InputInpatient = new Yb2405InputInpatient(); - - Encounter encounter = iEncounterService.getById(encounterId); - if (encounter == null) { - throw new ServiceException("未查询到就诊信息"); - } - - InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo()); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保挂号信息"); - } - yb2405InputInpatient.setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo()); - - return yb2405InputInpatient; - } - - /** - * 【5205】结果 - * - * @param patientId 患者id - * @param begntime 开始时间 - * @param endtime 结束时间 - * @return 5205结果 - */ - public Yb5205InputSpecialDisease yb5205SpecialDiseaseDrugRecordSearch(Long patientId, Date begntime, Date endtime) { - - Patient patient = iPatientService.getById(patientId); - if (patient == null) { - throw new ServiceException("未查询到患者信息"); - } - InfoPerson perInfoByIdCard = iPerinfoService.getPerInfoByIdCard(patient.getIdCard(), patient.getTenantId()); - if (perInfoByIdCard == null) { - throw new ServiceException("未查询到患者医保读卡信息"); - } - - Yb5205InputSpecialDisease yb5205InputSpecialDisease = new Yb5205InputSpecialDisease(); - yb5205InputSpecialDisease.setBegntime(begntime).setEndtime(endtime).setPsnNo(perInfoByIdCard.getPsnNo()); - - return yb5205InputSpecialDisease; - } - - /** - * 保存入院办理信息 - * - * @param inpatientReg 参数 - */ - public void save2401InpatientReg(InpatientReg inpatientReg) { - inpatientRegService.save(inpatientReg); - } - - /** - * 保存出院办理信息 - * - * @param inpatientReg - */ - public void save2402InpatientDscg(InpatientDischarge inpatientReg) { - inpatientDischargeService.save(inpatientReg); - } - - /** - * 保存2403住院信息变更记录 - * - * @param yb2403InputParam 参数 - */ - public void save2403InputInpatient(Yb2403InputParam yb2403InputParam) { - - InpatientRegInfoUpdateRecorde inpatientRegInfoUpdateRecorde = new InpatientRegInfoUpdateRecorde(); - - Yb2403InputMdtrtGrpContent yb2403InputMdtrtGrpContent = yb2403InputParam.getMdtrtGrpContent(); - Yb2403InputAdmInfo yb2403InputAdmInfo = yb2403InputParam.getAdminfo(); - List yb2403InputDiseInfo = yb2403InputParam.getDiseinfo(); - - inpatientRegInfoUpdateRecorde.setMdtrtId(yb2403InputAdmInfo.getMdtrtId()) - .setAdmBed(yb2403InputAdmInfo.getAdmBed()) - .setPsnNo(yb2403InputAdmInfo.getPsnNo()) - .setConerName(yb2403InputAdmInfo.getConerName()) - .setTel(yb2403InputAdmInfo.getTel()) - .setBegntime(yb2403InputAdmInfo.getBegntime()) - .setEndtime(yb2403InputAdmInfo.getEndtime()) - .setDscgMaindiagCode(yb2403InputAdmInfo.getDscgMaindiagCode()) - .setDscgMaindiagName(yb2403InputAdmInfo.getDscgMaindiagName()) - .setMainCondDscr(yb2403InputAdmInfo.getMainCondDscr()) - .setDiseCodg(yb2403InputAdmInfo.getDiseCodg()) - .setDiseName(yb2403InputAdmInfo.getDiseName()) - .setOprnOprtName(yb2403InputAdmInfo.getOprnOprtName()) - .setOprnOprtCode(yb2403InputAdmInfo.getOprnOprtCode()) - .setFpscNo(yb2403InputAdmInfo.getFpscNo()) - .setMatnType(yb2403InputAdmInfo.getMatnType()) - .setBirctrlMatnDate(yb2403InputAdmInfo.getBirctrlMatnDate()) - .setLatechbFlag(yb2403InputAdmInfo.getLatechbFlag()) - .setBirctrlType(yb2403InputAdmInfo.getBirctrlType()) - .setEssoVal(yb2403InputAdmInfo.getEssoVal()) - .setFetts(yb2403InputAdmInfo.getFetts()) - .setFetusCnt(yb2403InputAdmInfo.getFetusCnt()) - .setPretFlag(yb2403InputAdmInfo.getPretFlag()) - .setDiseTypeCode(yb2403InputAdmInfo.getDiseTypeCode()); - - inpatientRegInfoUpdateRecorde.setInputParam(JsonUtils.toJson(inpatientRegInfoUpdateRecorde)); - - inpatientRegInfoUpdateRecordeService.save(inpatientRegInfoUpdateRecorde); - } - - public void updateInpatientRegById(InpatientReg inpatientReg) { - inpatientRegService.updateById(inpatientReg); - } - - public void save2301YbFeeDetail(List yb2301OutputResults, List feedetail, Long encounterId) { - - List feeDetailList = new ArrayList<>(); - InpatientFeeDetail inpatientFeeDetail; - for (Yb2301OutputResult yb2301OutputResult : yb2301OutputResults) { - Optional first = feedetail.stream().filter(yb2301InputFeeDetail -> yb2301InputFeeDetail.getFeedetlSn().equals(yb2301OutputResult.getFeedetlSn())).findFirst(); - if (!first.isPresent()) { - continue; - } - Yb2301InputFeeDetail yb2301InputFeeDetail = first.get(); - inpatientFeeDetail = new InpatientFeeDetail(); - inpatientFeeDetail.setFeedetlSn(yb2301OutputResult.getFeedetlSn()) - .setDetItemFeeSumamt(yb2301OutputResult.getDetItemFeeSumamt()) - .setInitFeedetlSn(yb2301InputFeeDetail.getInitFeedetlSn()) - .setMdtrtId(yb2301InputFeeDetail.getMdtrtId()) - .setDrordNo(yb2301InputFeeDetail.getDrordNo()) - .setPsnNo(yb2301InputFeeDetail.getPsnNo()) - .setMedType(yb2301InputFeeDetail.getMedType()) - .setFeeOcurTime(yb2301InputFeeDetail.getFeeOcurTime()) - .setMedinsListCodg(yb2301InputFeeDetail.getMedinsListCodg()) - .setDetItemFeeSumamt(yb2301OutputResult.getDetItemFeeSumamt()) - .setCnt(yb2301InputFeeDetail.getCnt()) - .setPric(yb2301InputFeeDetail.getPric()) - .setBilgDeptCodg(yb2301InputFeeDetail.getBilgDeptCodg()) - .setBilgDeptName(yb2301InputFeeDetail.getBilgDeptName()) - .setBilgDrCodg(yb2301InputFeeDetail.getBilgDrCodg()) - .setBilgDrName(yb2301InputFeeDetail.getBilgDrName()) - .setPricUplmtAmt(yb2301OutputResult.getPricUplmtAmt()) - .setSelfpayProp(yb2301OutputResult.getSelfpayProp()) - .setFulamtOwnpayAmt(yb2301OutputResult.getFulamtOwnpayAmt()) - .setOverlmtAmt(yb2301OutputResult.getOverlmtAmt()) - .setPreselfpayAmt(yb2301OutputResult.getPreselfpayAmt()) - .setInscpScpAmt(yb2301OutputResult.getInscpScpAmt()) - .setChrgitmLv(yb2301OutputResult.getChrgitmLv()) - .setMedChrgitmType(yb2301OutputResult.getMedChrgitmType()) - .setBasMednFlag(yb2301OutputResult.getBasMednFlag()) - .setHiNegoDrugFlag(yb2301OutputResult.getHiNegoDrugFlag()) - .setChldMedcFlag(yb2301OutputResult.getChldMedcFlag()) - .setListSpItemFlag(yb2301OutputResult.getListSpItemFlag()) - .setLmtUsedFlag(yb2301OutputResult.getLmtUsedFlag()) - .setDrtReimFlag(yb2301OutputResult.getDrtReimFlag()) - .setEncounterId(encounterId); - // - - feeDetailList.add(inpatientFeeDetail); - } - - inpatientFeeDetailService.saveBatch(feeDetailList); - - } - - public void save2303InpatientPreSettle(Yb2303OutputSetInfo yb2303OutputSetInfo) { - InpatientPreSettle inpatientPreSettle = new InpatientPreSettle(); - - inpatientPreSettle.setPsnNo(yb2303OutputSetInfo.getPsnNo()) - .setPsnName(yb2303OutputSetInfo.getPsnName()) - .setPsnCertType(yb2303OutputSetInfo.getPsnCertType()) - .setCertno(yb2303OutputSetInfo.getCertno()) - .setGend(yb2303OutputSetInfo.getGend()) - .setNaty(yb2303OutputSetInfo.getNaty()) - .setBrdy(yb2303OutputSetInfo.getBrdy()) - .setAge(yb2303OutputSetInfo.getAge()) - .setPsnType(yb2303OutputSetInfo.getPsnType()) - .setCvlservFlag(yb2303OutputSetInfo.getCvlservFlag()) - .setSetlTime(yb2303OutputSetInfo.getSetlTime()) - .setMedType(yb2303OutputSetInfo.getMedType()) - .setActPayDedc(yb2303OutputSetInfo.getActPayDedc()) - .setHifpPay(yb2303OutputSetInfo.getHifpPay()) - .setPoolPropSelfpay(yb2303OutputSetInfo.getPoolPropSelfpay()) - .setCvlservPay(yb2303OutputSetInfo.getCvlservPay()) - .setHifesPay(yb2303OutputSetInfo.getHifesPay()) - .setHifmiPay(yb2303OutputSetInfo.getHifmiPay()) - .setHifobPay(yb2303OutputSetInfo.getHifobPay()) - .setMafPay(yb2303OutputSetInfo.getMafPay()) - .setOthPay(yb2303OutputSetInfo.getOthPay()) - .setFundPaySumamt(yb2303OutputSetInfo.getFundPaySumamt()) - .setPsnPartAmt(yb2303OutputSetInfo.getPsnPartAmt()) - .setAcctPay(yb2303OutputSetInfo.getAcctPay()) - .setPsnCashPay(yb2303OutputSetInfo.getPsnCashPay()) - .setHospPartAmt(yb2303OutputSetInfo.getHospPartAmt()) - .setBalc(yb2303OutputSetInfo.getBalc()) - .setAcctMulaidPay(yb2303OutputSetInfo.getAcctMulaidPay()) - .setMedinsSetlId(yb2303OutputSetInfo.getMedinsSetlId()) - .setClrOptins(yb2303OutputSetInfo.getClrOptins()) - .setClrWay(yb2303OutputSetInfo.getClrWay()) - .setClrType(yb2303OutputSetInfo.getClrType()) - .setHifdmPay(yb2303OutputSetInfo.getHifdmPay()); - //inpatientPreSettle.setInputParam(JsonUtils.toJson(yb2303OutputSetInfo)); - inpatientPreSettle.setOutputResult(JsonUtils.toJson(yb2303OutputSetInfo)); - - inpatientPreSettleService.save(inpatientPreSettle); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbHttpUtils.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbHttpUtils.java deleted file mode 100755 index fc52a89ea..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbHttpUtils.java +++ /dev/null @@ -1,1486 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.yb.service; - -import com.core.common.utils.JsonUtils; -import tools.jackson.databind.JsonNode; -import tools.jackson.databind.JsonNode; -import com.core.common.exception.ServiceException; -import com.core.common.utils.SecurityUtils; -import com.core.common.utils.StringUtils; -import tools.jackson.core.JacksonException; -import tools.jackson.core.type.TypeReference; -import tools.jackson.databind.JsonNode; -import tools.jackson.databind.ObjectMapper; -import tools.jackson.databind.PropertyNamingStrategies; -import tools.jackson.databind.json.JsonMapper; -import com.healthlink.his.financial.domain.Contract; -import com.healthlink.his.financial.service.IContractService; -import com.healthlink.his.financial.service.impl.ContractServiceImpl; -import com.healthlink.his.yb.domain.ClinicReg; -import com.healthlink.his.yb.domain.InpatientReg; -import com.healthlink.his.yb.dto.*; -import com.healthlink.his.yb.model.Clinic2207OrderModel; -import com.healthlink.his.yb.model.Clinic2207OrderParam; -import com.healthlink.his.yb.util.YbParamBuilderUtil; -import org.apache.hc.client5.http.config.RequestConfig; -import org.apache.hc.core5.http.ClassicHttpResponse; -import org.apache.hc.client5.http.classic.methods.HttpPost; -import org.apache.hc.core5.http.ContentType; -import org.apache.hc.core5.http.io.entity.StringEntity; -import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; -import org.apache.hc.client5.http.impl.classic.HttpClients; -import org.apache.hc.core5.http.io.entity.EntityUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.FileSystemResource; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; - - - -/** - * http请求接口 - * - * @author SunJQ - * @date 2025-04-11 - */ -@Service -public class YbHttpUtils { - - @Autowired - YbParamBuilderUtil ybParamBuilderUtil; - @Autowired - IContractService iContractService; - - Logger logger = LoggerFactory.getLogger(YbHttpUtils.class); - @Autowired - private ContractServiceImpl contractServiceImpl; - - public Info1101Output getPerInfo(Info1101ReadcardParam readcard) { - // 声明参数 - Result result = null; - Info1101Output perinfo = null; - // 发送请求 - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/getPatinfo", readcard, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(resultString)); - logger.info("【1101】返回参数:" + resultString); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(resultString, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - perinfo = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Info1101Output.class); - } else { - throw new ServiceException(result.getMessage()); - } - - return perinfo; - } - - public ClinicReg2201Output reg(ClinicReg reg, Contract contract) { - // 声名参数 - Result result = null; - ClinicReg2201Output clinicReg2201Output = new ClinicReg2201Output(); - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/reg", reg, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【2201】返回参数:" + s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - clinicReg2201Output = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), ClinicReg2201Output.class); - } else { - throw new ServiceException(result.getMessage()); - } - return clinicReg2201Output; - } - - public ClinicReg2201Output cancelReg(ClinicReg reg, Contract contract) { - // 声名参数 - Result result = null; - ClinicReg2201Output clinicReg2201Output = new ClinicReg2201Output(); - // 发送请求 - String s - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancelReg", reg, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【2202】返回参数:" + JsonUtils.toJson(s)); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - clinicReg2201Output = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), ClinicReg2201Output.class); - } else { - throw new ServiceException(result.getMessage()); - } - return clinicReg2201Output; - } - - public Clinic2204OrderResult upload2204Record(Clinic2204OrderParam clinic2204OrderParam, Contract contract) { - Clinic2204OrderResult clinicFeedetail2204Result = new Clinic2204OrderResult(); - // 声名参数 - Result result = null; - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/upload2204-record", - clinic2204OrderParam, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【2204】返回参数:" + s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - clinicFeedetail2204Result = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Clinic2204OrderResult.class); - } else { - throw new ServiceException(result.getMessage()); - } - - return clinicFeedetail2204Result; - - } - - public Clinic2206OrderOutput upload2206Record(Clinic2206OrderParam clinic2206OrderParam, Contract contract) { - - Clinic2206OrderOutput clinic2206OrderResult = new Clinic2206OrderOutput(); - // 声名参数 - Result result = null; - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/preSetl", - clinic2206OrderParam, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2206】返回参数:" + JsonUtils.toJson(s)); - logger.info(s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - clinic2206OrderResult = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Clinic2206OrderOutput.class); - } else { - throw new ServiceException(result.getMessage()); - } - - return clinic2206OrderResult; - } - - public Clinic2207OrderModel settle(Clinic2207OrderParam clinicOrder2207, Contract contract) { - - Clinic2207OrderModel clinic2206OrderResult = new Clinic2207OrderModel(); - // 声名参数 - Result result = null; - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/setl", clinicOrder2207, - contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【2207】返回参数:" + s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - clinic2206OrderResult = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Clinic2207OrderModel.class); - } else { - throw new ServiceException(result.getMessage()); - } - - return clinic2206OrderResult; - } - - public Sign9001Result sign(Sign signParam, Contract contract) { - Sign9001Result sign = null; - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/signIn", signParam, contract); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(resultString)); - logger.info("【9001】返回参数:" + resultString); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - sign = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Sign9001Result.class); - } else { - throw new ServiceException(result.getMessage()); - } - - return sign; - } - - public void unPreSettle(Clinic2205OrderParam clinic2205OrderParam, Contract contract) { - - // 声名参数 - Result result = null; - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/unPreSettle", - clinic2205OrderParam, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info(s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - return; - } else { - throw new ServiceException(result.getMessage()); - } - } - - public Clinic2208UnSetlInfoOutput unSettle(Clinic2208UnSetlInfoParam clinicOrder2208, Contract contract) { - - Clinic2208UnSetlInfoOutput clinicOrder2206Result = new Clinic2208UnSetlInfoOutput(); - // 声名参数 - Result result = null; - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancelSetl", - clinicOrder2208, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【2208】返回参数:" + s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - clinicOrder2206Result - = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Clinic2208UnSetlInfoOutput.class); - } else { - throw new ServiceException(result.getMessage()); - } - return clinicOrder2206Result; - } - - public Result directoryCheck(MedicalDirectory3301ListParam medicalDirectory3301ListParam) { - - Clinic2208UnSetlInfoResult clinicOrder2206Result = new Clinic2208UnSetlInfoResult(); - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/directoryCheck", - medicalDirectory3301ListParam, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【3301】返回参数:" + s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result directoryUnCheck(MedicalDirectory3302Param medicalDirectory3302Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/directoryUnCheck", - medicalDirectory3302Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info("【3302】返回参数:" + s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result reconcileGeneralLedger(Financial3201Param financial3201Param) { - - // 此处先查询到合同并回填给入参对象 - Contract contract = iContractService.getContract(financial3201Param.getSetlOptins()); - if (contract == null) { - throw new ServiceException("未查询到合同信息"); - } - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/reconcile", - financial3201Param, contract); - - // 赋值(上述回填的两个参数医保不要,为了避免麻烦,在发送http后进行回填) - financial3201Param.setFixmedinsCode(contract.getFixmedinsCode()); - financial3201Param.setFixmedinsName(contract.getFixmedinsName()); - - // 医保回参逻辑处理 - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info(s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public FinancialSettlement3202Result reconcileGeneralLedgerDetail(FinancialSettlement3202Param financial3202Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/reconcile-detail", - financial3202Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info(s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - FinancialSettlement3202Result result = null; - try { - result = mapper.readValue(s, FinancialSettlement3202Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public List - threePartSearch(FinancialSettlement3209AParam financialSettlement3209AParam) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/three-part-search-err", - financialSettlement3209AParam, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info(JsonUtils.toJson(s)); - logger.info(s); - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - List result = null; - try { - result = mapper.readValue(s, List.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public String applyFinancialClearing(Financial3203AParam financial3203AParam) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/apply-clearing", - financial3203AParam, iContractService.getContract(financial3203AParam.getClrOptins())); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - return s; - } - - public Result cancelFinancialClearing(Financial3204Param financial3204Param) { - - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancel-clearing", - financial3204Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Clearing3205AResult getFinancialClearingStatus(Clearing3205AParma clearing3205AParma) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/get-clearing-status", - clearing3205AParma, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Clearing3205AResult result = null; - try { - result = mapper.readValue(s, Clearing3205AResult.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result uploadInventoryCount(MedicalInventory3501Param medicalInventory3501Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/upload-inventory-count", - medicalInventory3501Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result updateInventoryCount(MedicalInventory3502Param medicalInventory3502Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/update-inventory", - medicalInventory3502Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result procurement(Medical3503Param medical3503Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/procurement", - medical3503Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result cancelProcurement(MedicalPurchase3504Param medicalPurchase3504Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/procurement-cancel", - medicalPurchase3504Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result merchandise(Medical3505Param medical3505Param, Contract contract) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/merchandise", - medical3505Param, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result cancelMerchandise(Medical3506Param medical3506Param, Contract contract) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancel-merchandise", - medical3506Param, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result deleteGoodsInfo(Medical3507Param medical3507Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/del-goods", - medical3507Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public MedicalInventory3511Output querySalesInfo(MedicalInventory3511Param medicalInventory3511Param) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/query-3511-info", - medicalInventory3511Param, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - // 转业务参数 - MedicalInventory3511Output medicalInventory3511Output = null; - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 401) { - logger.info(JsonUtils.toJson(result.getResult())); - medicalInventory3511Output - = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), MedicalInventory3511Output.class); - } else { - throw new ServiceException(result.getMessage()); - } - return medicalInventory3511Output; - } - - public Result getClrOptins(Clearing3206AParam clearing3206AParam) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/getclroptins", - clearing3206AParam, null); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result upload2203Record(Clinic2203MedicalParam medical2203Param, Contract contract) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/upload2203-record", - medical2203Param, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result query3512(MedicalInventory3512Param inventory3512Param, Contract contract) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/query-3512-info", - inventory3512Param, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - public Result query3513(MedicalInventory3513Param inventory3513Param, Contract contract) { - // 发送请求 - String s = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/query-3513-info", - inventory3513Param, contract); - if (StringUtils.isEmpty(s)) { - throw new ServiceException("未接收到医保返回参数"); - } - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(s, Result.class); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return result; - } - - /** - * 发送http请求(2025/05/02经测试,若以自带的工具类发送请求失败,故使用原peis系统中成功调用的写法重新封装) - * - * @param url 路径 - * @param o 参数 - * @return - */ - private String httpPost(String url, Object o, Contract contract) { - String resultString = ""; - // 拼参数 - BaseParam baseParam = new BaseParam(); - baseParam.setBaseInfo(ybParamBuilderUtil.getBaseInfo(JsonUtils.parse(JsonUtils.toJson(o)), contract)).setData(o); - logger.info("【请求路径】:" + url + ";【入参】: " + JsonUtils.toJson(baseParam)); - // 创建Http请求 - RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(300000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(300000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(300000, java.util.concurrent.TimeUnit.MILLISECONDS).build(); - CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build(); - ClassicHttpResponse response = null; - // 发送请求 - try { - HttpPost httpPost = new HttpPost(url); - StringEntity stringEntity = new StringEntity(JsonUtils.toJson(baseParam), ContentType.APPLICATION_JSON); - httpPost.setEntity(stringEntity); - // 执行http请求 - response = httpClient.execute(httpPost); - if (response == null) { - throw new ServiceException("Http请求异常,未接受返回参数"); - } - resultString = EntityUtils.toString(response.getEntity(), "utf-8"); - } catch (Exception e) { - logger.error("Exception occurred", e); - throw new ServiceException("Http请求异常,请稍后再试。"); - } finally { - if (response != null) { - try { - response.close(); - } catch (IOException e) { - logger.error("关闭响应异常", e); - throw new ServiceException("未关闭系统资源:" + e.getStackTrace()); - } - } - } - return resultString; - } - - public List queryYbCatalogue(Catalogue1312QueryParam catalogue1312QueryParam) { - List outputList = new ArrayList<>(); - try { - - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/queryYbCatalogue", - catalogue1312QueryParam, null); - // logger.info("--------1312resultString-------------" + resultString); - // 1. 解析外层 JSON - ObjectMapper mapper = JsonMapper.builder() - .propertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE) // 启用 Snake Case 自动映射 - .build(); - JsonNode rootNode = mapper.readTree(resultString); - String resultStr = rootNode.get("result").asText(); - - // 2. 解析 result 中的 JSON 数组 - outputList = mapper.readValue(resultStr, new TypeReference>() { - }); - } catch (JacksonException e) { - logger.error("Exception occurred", e); - } - - return outputList; - } - - public ResponseEntity upload9101(MultipartFile file, String filename) { - - // File9101Param file9101Param = new File9101Param(); - // file9101Param.setFile(file); - // file9101Param.setFilename(filename); - List contractListByYb = iContractService.getContractListByYb(); - if (contractListByYb.isEmpty()) { - throw new ServiceException("未配置医保合同"); - } - // file9101Param.setFixmedinsCode(contractListByYb.get(0).getFixmedinsCode()); - // FileResult fileResult = null; - ResponseEntity response = null; - // 参数处理 - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - // 1. 保存到临时文件 - Path tempFile = Files.createTempFile("upload-", file.getOriginalFilename()); - file.transferTo(tempFile); - - // 2. 构建转发请求 - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.MULTIPART_FORM_DATA); - - MultiValueMap body = new LinkedMultiValueMap<>(); - body.add("file", new FileSystemResource(tempFile.toFile())); - body.add("fixmedinsCode", contractListByYb.get(0).getFixmedinsCode()); - body.add("userId", SecurityUtils.getUserId()); - body.add("admvs", contractListByYb.get(0).getAdmVs()); - - // 3. 转发并删除临时文件 - RestTemplate restTemplate = new RestTemplate(); - response = restTemplate.postForEntity( - SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/file-up2", - new HttpEntity<>(body, headers), String.class); - logger.info(JsonUtils.toJson(response)); - // 清理临时文件 - // Files.deleteIfExists(tempFile); - } catch (Exception e) { - logger.error("Exception occurred", e); - } - return response; - - // 2. 构建 Multipart 请求体 - // HttpHeaders headers = new HttpHeaders(); - // headers.setContentType(MediaType.MULTIPART_FORM_DATA); - // - // MultiValueMap body = new LinkedMultiValueMap<>(); - // body.add("file", new ByteArrayResource(file.getBytes()) { - // @Override - // public String getFilename() { - // return filename; // 保持原文件名 - // } - // }); - // - - - //// 3. 发送请求到目标服务 - // RestTemplate restTemplate = new RestTemplate(); - // HttpEntity> requestEntity = new HttpEntity<>(body, headers); - // ResponseEntity response = - // restTemplate.postForEntity(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/file-up2", - // requestEntity, String.class); - - // try { - // String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/file-up2", - // file9101Param,null); - // // logger.info("--------1312resultString-------------" + resultString); - // // 1. 解析外层 JSON - // ObjectMapper mapper = new ObjectMapper(); - // mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); // 启用 Snake Case 自动映射 - // Result result = null; - // try { - // result = mapper.readValue(resultString, Result.class); - // } catch (Exception e) { - // logger.error("Exception occurred", e); - // } - // - // if (result == null) { - // throw new ServiceException("未接收到医保返回参数"); - // } else if (result.getCode() == 200) { - // logger.info(JsonUtils.toJson(result.getResult())); - // fileResult = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), FileResult.class); - // } else { - // throw new ServiceException(result.getMessage()); - // } - // return fileResult; - // }catch (Exception e){ - // logger.error("Exception occurred", e); - // } - // return fileResult; - } - - /** - * 【3101】明细审核事前事中分析服务 - * - * @param data 规则分析信息 - * @return 违规信息 - */ - public Yb3101OutputResult yb3101PreMidAnalysis(Yb3101InputData data) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/pre-mid-analysis", data, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【3101】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【3101】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - return JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Yb3101OutputResult.class); - } else { - throw new ServiceException(result.getMessage()); - } - } - - /** - * 【3103】事前事中服务反馈服务 - * - * @param data 输入 - */ - public void yb3103PreMidFeedback(Yb3103InputData data) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/pre-mid-feedback", data, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【3103】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【3103】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(JsonUtils.toJson(result.getResult())); - } else { - throw new ServiceException(result.getMessage()); - } - } - - public List upload2301FeeDetail(Yb2301InputFeeDetailModel yb2301InputFeeDetailModel) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/upload-2301-fee-detail", - yb2301InputFeeDetailModel, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2301】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2301】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - List yb2301OutputResults = new ArrayList<>(); - JsonNode jsonObject = JsonUtils.parse(String.valueOf(result.getResult())); - logger.info(JsonUtils.toJson(result.getResult())); - JsonNode jsonArray = jsonObject.path("result"); - for (JsonNode o : jsonArray) { - yb2301OutputResults.add(JsonUtils.parseObject(String.valueOf(o), Yb2301OutputResult.class)); - } - return yb2301OutputResults; - } else { - throw new ServiceException(result.getMessage()); - } - } - - public Yb2303OutputSetInfo inpatientPreSettle(Yb2303InputInpatient yb2303InputInpatient) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/inpa-pre-setl", - yb2303InputInpatient, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2303】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2303】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - return mapper.readValue(String.valueOf(result.getResult()), Yb2303OutputSetInfo.class); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - public Yb2304OutputSetlInfo inpatientSettle(Contract contract, Yb2304InputInpatient yb2304InpatientParam) { - String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/inpa-setl", - yb2304InpatientParam, contract); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2304】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2304】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - return mapper.readValue(String.valueOf(result.getResult()), Yb2304OutputSetlInfo.class); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - /** - * 【取消住院结算】 - * - * @param contract 合同 - * @param yb2305InpatientParam 2305参数 - * @return 医保结果 - */ - public Yb2305OutputSetlInfo inpatientUnSettle(Contract contract, Yb2305InputInpatient yb2305InpatientParam) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/inpa-un-setl", - yb2305InpatientParam, contract); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2305】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2305】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - return mapper.readValue(String.valueOf(result.getResult()), Yb2305OutputSetlInfo.class); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - /** - * 【5205】人员慢特病用药记录查询 - * - * @param yb5205InputSpecialDisease - * @return - */ - public List - yb5205SpecialDiseaseDrugRecordSearch(Yb5205InputSpecialDisease yb5205InputSpecialDisease) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/spe-disease-record-search", - yb5205InputSpecialDisease, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【5205】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【5205】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return JsonUtils.parseObject(result.getResult().toString(), new TypeReference>() {}); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - /** - * 【目录下载】 - * - * @param catalogFileInput - * @return - */ - public FileResult queryCatalog(CatalogFileInput catalogFileInput) { - String resultString = httpPost( - SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/query-catalog", catalogFileInput, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【" + catalogFileInput.getAddress() + "】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【" + catalogFileInput.getAddress() + "】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), FileResult.class); - } else { - return new FileResult().setErrMsg(result.getMessage()); - } - } - - /** - * 【文件下载】 - * - * @param fileResult - * @return - */ - public String downLoadFile(FileResult fileResult) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/download", fileResult, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【9102】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【9102】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return result.getResult().toString(); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - /** - * 【2401】住院办理 - * - * @param jsonObject 入參 - * @return 結果 - */ - public InpatientReg inpatientReg(JsonNode jsonObject, String contractNo) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/inpatient-reg", jsonObject, - contractServiceImpl.getContract(contractNo)); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2401】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2401】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return JsonUtils.parseObject(result.getResult().toString(), InpatientReg.class); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - /** - * 【2404】住院办理撤销 - * - * @param yb2404InputInpatient 入參 - * @return 結果 - */ - public void cancelInpatientReg(Yb2404InputInpatient yb2404InputInpatient, String contractNo) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancel-inpatient-reg", - yb2404InputInpatient, contractServiceImpl.getContract(contractNo)); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2404】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2404】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - } - - /** - * 【2402】出院办理 - * - * @param yb2402InputInpatientDscgInfo 参数 - * @param contractNo 合同编号 - * @return 结果 - */ - public Yb2402InputParam inpatientCheckOut(Yb2402InputParam yb2402InputInpatientDscgInfo, String contractNo) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/discharge-patient", - yb2402InputInpatientDscgInfo, iContractService.getContract(contractNo)); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2402】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2402】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return JsonUtils.parseObject(result.getResult().toString(), Yb2402InputParam.class); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - return null; - } - - /** - * 【2405】出院办理撤销 - * - * @param yb2405InputInpatient 入參 - * @return 結果 - */ - public void cancelInpatientCheckOut(Yb2405InputInpatient yb2405InputInpatient, String contractNo) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancel-discharge-patient", - yb2405InputInpatient, contractServiceImpl.getContract(contractNo)); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2404】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2404】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - } - - /** - * 【2403】 更改住院信息 - * - * @param yb2403InputInpatient 参数 - * @param contractNo 结果 - */ - public void updateInpatientInfo(Yb2403InputParam yb2403InputInpatient, String contractNo) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/change-inpatient-info", - yb2403InputInpatient, iContractService.getContract(contractNo)); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2405】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2405】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return; - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - } - - public void emrUp(Yb4401InputDto yb4401InputDto) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/emr-up", yb4401InputDto, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【4401】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【4401】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return; - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - } - - /** - * 【2601】冲正交易 - * - * @param toReverse 冲正参数 - * @param contract 省市医保 - */ - public void ybToReverse(Yb2601InputParam toReverse, Contract contract) { - String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/to-reverse", - toReverse, contract); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【4401】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【4401】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return; - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - } - - public void yb4101Up(Yb4101AInputData yb4101AInputData, Contract contract) { - - String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/setl-up", - yb4101AInputData, contract); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【4101A】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【4101A】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return; - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - } - - public void yb4102Up(Yb4102InputStastInfo yb4102InputStastInfo) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/setl-status-up", - yb4102InputStastInfo, null); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【4102】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【4102】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return; - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - - } - - public void cancel2302FeeDetailUp(Yb2302InpatientParam yb2302InpatientParam, Contract contract) { - String resultString - = httpPost(SecurityUtils.getLoginUser().getOptionJsonValue("ybUrl") + "/cancel-2302-fee-detail", - yb2302InpatientParam, contract); - if (StringUtils.isEmpty(resultString)) { - throw new ServiceException("未接收到医保返回参数"); - } - logger.info("【2302】返回参数:" + JsonUtils.toJson(resultString)); - logger.info("【2302】返回参数:" + resultString); - ObjectMapper mapper = new ObjectMapper(); - Result result = null; - try { - result = mapper.readValue(resultString, Result.class); - if (result == null) { - throw new ServiceException("未接收到医保返回参数"); - } else if (result.getCode() == 200) { - logger.info(result.getResult().toString()); - return; - } else { - throw new ServiceException(result.getMessage()); - } - } catch (Exception e) { - logger.error(e.getMessage(), e); - throw new ServiceException(e.getMessage()); - } - - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbManager.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbManager.java deleted file mode 100755 index 45dc6f9dd..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbManager.java +++ /dev/null @@ -1,1056 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.yb.service; - -import com.core.common.utils.JsonUtils; -import tools.jackson.databind.JsonNode; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.core.common.core.domain.R; -import com.core.common.core.redis.RedisCache; -import com.core.common.exception.ServiceException; -import com.core.common.utils.AssignSeqUtil; -import com.core.common.utils.SecurityUtils; -import com.core.common.utils.StringUtils; -import com.core.system.service.impl.SysUserServiceImpl; -import com.core.web.controller.common.CommonController; -import com.healthlink.his.administration.domain.Encounter; -import com.healthlink.his.administration.domain.Organization; -import com.healthlink.his.administration.domain.Patient; -import com.healthlink.his.administration.domain.Practitioner; -import com.healthlink.his.administration.dto.ChargeItemBaseInfoDto; -import com.healthlink.his.administration.service.*; -import com.healthlink.his.common.constant.CommonConstants; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.common.enums.AssignSeqEnum; -import com.healthlink.his.common.enums.Whether; -import com.healthlink.his.common.enums.ybenums.YbHospApprFlag; -import com.healthlink.his.common.enums.ybenums.YbMdtrtCertType; -import com.healthlink.his.common.enums.ybenums.YbMedType; -import com.healthlink.his.common.enums.ybenums.YbPsnSetlWay; -import com.healthlink.his.financial.domain.Contract; -import com.healthlink.his.financial.domain.PaymentReconciliation; -import com.healthlink.his.financial.model.PaymentResult; -import com.healthlink.his.financial.model.PaymentedItemModel; -import com.healthlink.his.financial.service.IContractService; -import com.healthlink.his.financial.service.IPaymentRecDetailService; -import com.healthlink.his.financial.service.IPaymentReconciliationService; -import com.healthlink.his.medication.service.IMedicationDispenseService; -import com.healthlink.his.workflow.service.IDeviceDispenseService; -import com.healthlink.his.workflow.service.IInventoryItemService; -import com.healthlink.his.workflow.service.IServiceRequestService; -import com.healthlink.his.yb.domain.*; -import com.healthlink.his.yb.domain.ClinicReg; -import com.healthlink.his.yb.dto.*; -import com.healthlink.his.yb.model.CancelRegPaymentModel; -import com.healthlink.his.yb.model.Clinic2207OrderModel; -import com.healthlink.his.yb.model.Clinic2207OrderParam; -import com.healthlink.his.yb.model.OutpatientRegistrationModel; -import com.healthlink.his.yb.service.impl.DirectoryCheckRecordServiceImpl; -import com.healthlink.his.yb.util.CommonConstant; -import com.healthlink.his.yb.util.YbParamBuilderUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -/** - * 医保服务(与ybController方法一致,原定是ui触发医保controller,2025/05/05由于缺少ui资源,欲使用对应的业务controller直接触发医保服务,故将其下沉到Service层) - * - * @author SunJQ - * @date 2025-05-05 - */ -@Service -public class YbManager { - - private static final Logger log = LoggerFactory.getLogger(CommonController.class); - @Autowired - private YbDao ybBaseService; - @Autowired - private YbHttpUtils ybHttpService; - @Autowired - private RedisCache redisCache; - @Autowired - private AssignSeqUtil assignSeqUtil; - /** - * ****************************** 业务服务 ********************************** - */ - @Autowired - private IPaymentRecDetailService iPaymentRecDetailService; - @Autowired - private IPaymentReconciliationService iPaymentReconciliationService; - @Autowired - private SysUserServiceImpl userService; - @Autowired - private IPractitionerService iPractitionerService; - @Autowired - private IEncounterService iEncounterService; - @Autowired - private IAccountService accountService; - @Autowired - private IChargeItemService iChargeItemService; - @Autowired - private IInvoiceService invoiceService; - @Autowired - private IPatientService iPatientService; - @Autowired - private IContractService iContractService; - @Autowired - private IOrganizationService iOrganizationService; - @Autowired - private IInventoryItemService inventoryItemService; - /** - * **************************** 基础医保服务 ******************************** - */ - - @Autowired - private IPerinfoService iPerinfoService; - @Autowired - private IRegService iRegService; - @Autowired - private IInpatientRegService inpatientRegService; - @Autowired - private IClinicUnRegService iClinicUnRegService; - @Autowired - private ISignService iSignService; - @Autowired - private IClinicPreSettleService iClinicPreSettleService; - @Autowired - private IClinicSettleService iClinicSettleService; - @Autowired - private IClinicUnSettleService iClinicUnSettleService; - @Autowired - private DirectoryCheckRecordServiceImpl directoryCheckRecordService; - @Autowired - private IInventorySaleReturnRecordService iInventorySaleReturnRecordService; - @Autowired - private IInventorySaleRecordService iInventorySaleRecordService; - @Autowired - private IInventoryPurchaseReturnRecordService iInventoryPurchaseReturnRecordService; - @Autowired - private IInventoryPurchaseRecordService iInventoryPurchaseRecordService; - @Autowired - private IInventoryDelRecordService iInventoryDelRecordService; - @Autowired - private IInventoryCheckRecordService iInventoryCheckRecordService; - @Autowired - private IInventoryChangeRecordService iInventoryChangeRecordService; - @Autowired - private IFinancialReconcileRecordService iFinancialReconcileRecordService; - @Autowired - private IFinancialApplyRecordService iFinancialApplyRecordService; - @Autowired - private YbParamBuilderUtil ybUtil; - @Autowired - private IMedicationDispenseService medicationDispenseService; - @Autowired - private IDeviceDispenseService deviceDispenseService; - @Autowired - private IServiceRequestService serviceRequestService; - - /** - * 【1101】 - * - * @return 结果 - */ - public R getPerInfo(String certType, String certNo) { - Info1101ReadcardParam readcard = ybBaseService.getReadCard(certType, certNo); - Info1101Output perInfo = ybHttpService.getPerInfo(readcard); - if (perInfo != null) { - ybBaseService.saveReadcardAndPerinfo(readcard, perInfo); - } - return R.ok(perInfo); - } - - /** - * 【2201】 为了慢特病自动挂号封装 - * - * @param encounterId 就诊id - * @return 结果 - */ - public ClinicReg2201Output createRegWithMedType(Contract contract, YbMdtrtCertType ybMdtrtCertTypeLong, - String busiCardInfo, Long encounterId, YbMedType medType) { - ClinicReg reg = ybBaseService.getReg(ybMdtrtCertTypeLong, busiCardInfo, encounterId, medType, - SecurityUtils.getLoginUser().getTenantId()); - reg.setMedType(medType.getValue()); - ClinicReg2201Output regResult = ybHttpService.reg(reg, contract); - if (regResult != null) { - regResult.setMedType(medType.getValue()); - ybBaseService.saveReg(regResult); - } - return regResult; - } - - /** - * 【2202】 - * - * @param cancelRegPaymentDto 就诊id - * @return 结果 - */ - public R cancelReg(CancelRegPaymentModel cancelRegPaymentDto) { - - Integer tenantId = SecurityUtils.getLoginUser().getTenantId(); - - PaymentReconciliation paymentReconciliation - = iPaymentReconciliationService.getById(cancelRegPaymentDto.getId()); - - if (paymentReconciliation == null) { - throw new ServiceException("未查询到付款信息"); - } - if (paymentReconciliation.getYbSettleIds() == null) { - throw new ServiceException("未查询到医保付款信息"); - } - - String ybSettleId = paymentReconciliation.getYbSettleIds().split(",")[0];// 理论上挂号的这个只有一个参数,没有逗号 - // 医保退费 - Clinic2208UnSetlInfoParam clinicOrder2208 = ybBaseService.getClinicOrder2208(tenantId, ybSettleId); - if (clinicOrder2208 == null) { - throw new ServiceException("未查询到医保付款信息"); - } - - Contract contractByInsuplcAdmdvs = iContractService.getContract(cancelRegPaymentDto.getContractNo()); - - Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoOutput - = ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs); - if (clinic2208UnSetlInfoOutput == null) { - throw new ServiceException("未查询到医保返回信息"); - } - - cancelRegPaymentDto.setSetlId(clinic2208UnSetlInfoOutput.getSetlId()); - ybBaseService.saveUnSettleRecord(ybSettleId, clinicOrder2208, clinic2208UnSetlInfoOutput); - - ClinicReg reg = ybBaseService.getUnReg(cancelRegPaymentDto.getEncounterId(), tenantId); - - ClinicReg2201Output regResult - = ybHttpService.cancelReg(reg, iContractService.getContract(cancelRegPaymentDto.getContractNo())); - if (regResult != null) { - ybBaseService.saveUnReg(regResult); - } - return R.ok(regResult); - } - - /** - * 【2202】 - * - * @param clinicReg 就诊id - * @return 结果 - */ - public R cancelRegById(ClinicReg clinicReg) { - return null; - } - - /** - * 【2206】2203-2206 - * - * @param cancelRegPaymentModel 挂号信息 - * @return 结果 - */ - public Clinic2206OrderOutput getPreSettleInfo(OutpatientRegistrationModel cancelRegPaymentModel, Patient patient, - Organization organization, Practitioner doctor) { - if (patient == null || organization == null || doctor == null) { - throw new ServiceException("未查询到相关信息"); - } - - InfoPerson perinfo = iPerinfoService.getOne(new LambdaQueryWrapper() - .eq(InfoPerson::getCertno, patient.getIdCard()).eq(InfoPerson::getTenantId, patient.getTenantId()) - .orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1)); - if (perinfo == null) { - throw new ServiceException("未查询到身份信息"); - } - - YbMdtrtCertType mdtrtCertType = YbMdtrtCertType.getByValue(cancelRegPaymentModel.getMdtrtCertType()); - if (mdtrtCertType == null) { - throw new ServiceException("传参异常,未查询到就诊凭证类型"); - } - - Contract contract = iContractService.getContract(cancelRegPaymentModel.getContractNo()); - if (contract == null) { - throw new ServiceException("请选择费用性质"); - } - // 拼接医保挂号参数 - ClinicReg reg = new ClinicReg(); - reg.setPsnNo(perinfo.getPsnNo()).setInsutype(perinfo.getInsutype()).setBegntime(new Date()) - .setMdtrtCertType(mdtrtCertType.getValue()).setMdtrtCertNo(cancelRegPaymentModel.getBusiCardInfo()) - .setIptOtpNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 4)) - .setAtddrNo(doctor.getYbNo()).setDrName(doctor.getName()).setDeptCode(organization.getYbNo()) - .setDeptName(organization.getName()) - .setCaty(organization.getCaty() == null ? organization.getYbNo() : organization.getCaty()) - .setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setAtddrNo(doctor.getYbNo()).setPsnType("11") - .setPsnCertType("01").setCertno(perinfo.getCertno()).setPsnName(perinfo.getPsnName()); - - // reg.setAtddrNo("D220172023129").setDrName("郭建林").setCaty("B19").setDeptCode("B19"); - // 发送医保挂号请求 - ClinicReg2201Output clinicReg2201Output = ybHttpService.reg(reg, contract); - if (clinicReg2201Output == null) { - throw new ServiceException("未接受到医保挂号接口返回参数"); - } - clinicReg2201Output.setMedType(YbMedType.GENERAL_OUTPATIENT.getValue()); - // 保存挂号数据 - ybBaseService.saveReg(clinicReg2201Output); - - // 查询医疗类型 - YbMedType medType = YbMedType.GENERAL_OUTPATIENT; - - List diseinfos = new ArrayList<>(); - - // 拼接2203参数 - Clinic2203DiseInfoParam diseinfo = new Clinic2203DiseInfoParam(); - diseinfo.setDiagDept(organization.getYbNo()).setDiseDorName(doctor.getName()).setDiseDorNo(doctor.getYbNo()) - .setDiagTime(new Date()).setValiFlag(Whether.YES.getValue().toString()).setDiagType("1").setDiagSrtNo("1") - .setDiagCode("Z00.001").setDiagName("健康查体").setMdtrtId(clinicReg2201Output.getMdtrtId()); - // .setDiseDorNo("D220172023129").setDiseDorName("郭建林").setDiagDept("B19"); - - diseinfos.add(diseinfo); - - Clinic2203MedicalParam medical2203Param = new Clinic2203MedicalParam(); - medical2203Param.setMdtrtId(clinicReg2201Output.getMdtrtId()).setPsnNo(reg.getPsnNo()) - .setBegntime(reg.getBegntime()).setMedType(medType.getValue()).setMainCondDscr("") - .setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setDiseCodg("Z00.001").setDiseName("健康查体") - .setDiseinfoList(diseinfos).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()); - - // 2203接口上传就诊信息 - ybHttpService.upload2203Record(medical2203Param, contract); - - YbPsnSetlWay finCategory = YbPsnSetlWay.getByValue(cancelRegPaymentModel.getPsnSetlWay()); - if (finCategory == null) { - throw new ServiceException("请选择收费方式"); - } - - // 拼接2204参数 - Clinic2204OrderParam clinic2204OrderParam = new Clinic2204OrderParam(); - // 排番 - clinic2204OrderParam.setChrgBchno(AssignSeqEnum.YB_CLINIC_ORDER.getPrefix() + new Date().getTime());// 医保FeedetlSn字段最大长度30,前期设置20也被check了,故此怀疑是加密后不可超过30 - List clincFeedetailList = new ArrayList<>(); - Clinic2204FeeDetailParam clinicFeedetail = new Clinic2204FeeDetailParam(); - BigDecimal totalPrice = cancelRegPaymentModel.getTotalPrice(); - if (totalPrice == null) { - throw new ServiceException("未查询到挂号费用金额"); - } - - // 外购处方标志(文档上没有详细介绍) 2025/04/14经确认,暂定非处方流转传0,处方流转传1 - clinicFeedetail.setMedListCodg(cancelRegPaymentModel.getYbNo()); - clinicFeedetail.setFeedetlSn(clinic2204OrderParam.getChrgBchno()).setMdtrtId(clinicReg2201Output.getMdtrtId()) - .setPsnNo(reg.getPsnNo()).setChrgBchno(clinic2204OrderParam.getChrgBchno()).setFeeOcurTime(new Date()) - .setMedinsListCodg(cancelRegPaymentModel.getBusNo()).setDetItemFeeSumamt(totalPrice.doubleValue()) - .setCnt(1.0).setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()) - .setBilgDeptCodg(organization.getYbNo()).setBilgDeptName(organization.getName()) - .setBilgDrCodg(doctor.getYbNo()) - // 默认无需审批 - .setBilgDrName(doctor.getName()).setHospApprFlag(YbHospApprFlag.NO_APPROVAL_REQUIRED.getValue()) - .setRxCircFlag("0").setBilgDrCodg(doctor.getYbNo()); - // .setBilgDrName("郭建林").setBilgDrCodg("D220172023129") - // .setBilgDeptCodg("B19").setBilgDeptName(organization.getName()); - - clincFeedetailList.add(clinicFeedetail); - clinic2204OrderParam.setFeedetail(clincFeedetailList).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()); - - // 接收2204接口返回参数 - Clinic2204OrderResult clinic2204OrderResult = ybHttpService.upload2204Record(clinic2204OrderParam, contract); - if (clinic2204OrderResult == null) { - throw new ServiceException("未接收2204接口返回参数"); - } - - // 个人结算方式 - YbPsnSetlWay setlWay = YbPsnSetlWay.PSN_SETLWAY01; - // 拼接2206预结算参数 - Clinic2206OrderParam clinicOrder = new Clinic2206OrderParam(); - clinicOrder.setPsnNo(clinicReg2201Output.getPsnNo()).setMdtrtCertType(clinicReg2201Output.getMdtrtCertType()) - .setMdtrtCertNo(clinicReg2201Output.getMdtrtCertNo()).setMedType(medType.getValue()) - .setMedfeeSumamt(totalPrice.doubleValue()).setPsnSetlway(setlWay.getValue()) - .setMdtrtId(clinicReg2201Output.getMdtrtId()).setChrgBchno(clinic2204OrderParam.getChrgBchno()) - .setAcctUsedFlag(String.valueOf(Whether.YES.getValue())).setInsutype(clinicReg2201Output.getInsutype()) - .setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()); - - // 接收2206接口返回参数 - Clinic2206OrderOutput clinic2206OrderResult = ybHttpService.upload2206Record(clinicOrder, contract); - if (clinic2206OrderResult == null) { - throw new ServiceException("未接收2206接口返回参数"); - } - // 保存预结算参数 - ybBaseService.saveClinicOrder2206Param(clinicOrder, clinic2206OrderResult, medical2203Param, - clinic2204OrderParam, clinic2204OrderResult); - // 缓存预结算结果 - redisCache.setCacheObject("PRE-SETTLE:PRE_SETTLE_:" + clinic2204OrderParam.getChrgBchno(), - clinic2206OrderResult, 1800, TimeUnit.SECONDS); - clinic2206OrderResult.setChrgBchno(clinic2204OrderParam.getChrgBchno()).setBusNo(reg.getIptOtpNo()); - // 返回预结算结果 - return clinic2206OrderResult; - } - - public Clinic2206OrderOutput preSettle(Contract contract, Long encounterId, YbMdtrtCertType ybMdtrtCertType, - String busiCardInfo, ClinicReg2201Output reg2201Output, String payWay, - List paymentedItemList, YbMedType ybMedType) { - YbPsnSetlWay ybPsnSetlWay = YbPsnSetlWay.getByValue(payWay); - if (ybPsnSetlWay == null) { - ybPsnSetlWay = YbPsnSetlWay.PSN_SETLWAY01; - } - - Integer tenantId = SecurityUtils.getLoginUser().getTenantId(); - // 获取2203接口和2204接口参数 - Clinic2203MedicalParam clinic2203MedicalParam - = ybBaseService.getClinicMedical2203Param(encounterId, tenantId, reg2201Output, ybMedType); - if (clinic2203MedicalParam == null) { - throw new ServiceException("未生成2203接口参数"); - } - - Result result = ybHttpService.upload2203Record(clinic2203MedicalParam, contract); - - Clinic2204OrderParam clinic2204OrderParam - = ybBaseService.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output); - if (clinic2204OrderParam == null) { - throw new ServiceException("未生成2204接口参数"); - } - - // 接收2204接口返回参数 - Clinic2204OrderResult clinic2204OrderResult = ybHttpService.upload2204Record(clinic2204OrderParam, contract); - if (clinic2204OrderResult == null) { - throw new ServiceException("未接收2204接口参数"); - } - // 2204上报费用明细金额总数在2206中使用 - BigDecimal sum = BigDecimal.ZERO; - for (Clinic2204FeeDetailResult clinic2204FeeDetailResult : clinic2204OrderResult.getResult()) { - sum = sum.add(clinic2204FeeDetailResult.getDetItemFeeSumamt()); - } - - // 获取2206参数 - Clinic2206OrderParam clinic2206OrderParam = ybBaseService.getClinicOrder2206Param(sum, reg2201Output, - clinic2204OrderParam.getChrgBchno(), busiCardInfo); - if (clinic2206OrderParam == null) { - throw new ServiceException("未生成2206接口参数"); - } - // 接收2206接口返回参数 - Clinic2206OrderOutput clinic2206OrderResult = ybHttpService.upload2206Record(clinic2206OrderParam, contract); - if (clinic2206OrderResult == null) { - throw new ServiceException("未接收2206接口参数"); - } - // 保存预结算参数 - ybBaseService.saveClinicOrder2206Param(clinic2206OrderParam, clinic2206OrderResult, clinic2203MedicalParam, - clinic2204OrderParam, clinic2204OrderResult); - // 缓存预结算结果 - // redisCache.setCacheObject("PRE-SETTLE:PRE_SETTLE_:" + clinic2206OrderParam.getChrgBchno(), - // clinic2206OrderResult, 1800, TimeUnit.SECONDS); - clinic2206OrderResult.setChrgBchno(clinic2206OrderParam.getChrgBchno()); - return clinic2206OrderResult; - } - - /** - * 【2208】 - * - * @param settleId 付款id - * @return 结果 - */ - public R unSettle(String settleId) { - Integer tenantId = SecurityUtils.getLoginUser().getTenantId(); - Clinic2208UnSetlInfoParam clinicOrder2208 = ybBaseService.getClinicOrder2208(tenantId, settleId); - // clinicOrder2208.setMdtrtId("220000202505161931470129200037").setSetlId("220000202505161932020113002625"); - if (clinicOrder2208 == null) { - throw new ServiceException("未生成2208接口参数"); - } - Contract contractByInsuplcAdmdvs - = iContractService.getContractByInsuplcAdmdvs(clinicOrder2208.getInsuplcAdmdvs()); - Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoResult - = ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs); - // 业务表中进行操作 - ybBaseService.saveUnSettleRecord(settleId, clinicOrder2208, clinic2208UnSetlInfoResult); - return R.ok(clinic2208UnSetlInfoResult); - } - - /** - * 【3301】目录对照 - * - * @param tableName 表名 - * @param id 主键id - * @return 结果 - */ - public R directoryCheck(String tableName, Long id) { - - MedicalDirectory3302Param medicalDirectory3302Param = ybBaseService.getMedicalDirectory3302Param(tableName, id); - Result result3302Info = ybHttpService.directoryUnCheck(medicalDirectory3302Param); - if (result3302Info.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveDirectoryHistory(tableName, id, 3302, medicalDirectory3302Param); - } else { - log.error("目录对照前,撤销对照失败"); - } - MedicalDirectory3301Param medicalDirectory3301Param = ybBaseService.getMedicalDirectory3301Param(tableName, id); - ArrayList list = new ArrayList<>(); - list.add(medicalDirectory3301Param); - MedicalDirectory3301ListParam medicalDirectory3301ListParam = new MedicalDirectory3301ListParam(); - medicalDirectory3301ListParam.setData(list); - Result resultInfo = ybHttpService.directoryCheck(medicalDirectory3301ListParam); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveDirectoryHistory(tableName, id, 3301, medicalDirectory3301Param); - return R.ok("对照成功"); - } - throw new ServiceException("药品对照失败"); - } - - /** - * 【3301】目录对照(药品) - * - * @param categoryCode 药品分类 - * @param busNo 药品编号 - * @param name 药品编号 - * @param ybNo 医保编码 - */ - public R directoryCheckMedication(String categoryCode, String busNo, String name, String ybNo) { - MedicalDirectory3302Param medicalDirectory3302Param - = ybBaseService.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo); - Result result3302Info = ybHttpService.directoryUnCheck(medicalDirectory3302Param); - if (!result3302Info.getCode().equals(CommonConstant.SC_OK_200)) { - return R.fail("目录对照前,撤销对照失败"); - } - MedicalDirectory3301Param medicalDirectory3301Param - = ybBaseService.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo); - ArrayList list = new ArrayList<>(); - list.add(medicalDirectory3301Param); - MedicalDirectory3301ListParam medicalDirectory3301ListParam = new MedicalDirectory3301ListParam(); - medicalDirectory3301ListParam.setData(list); - Result resultInfo = ybHttpService.directoryCheck(medicalDirectory3301ListParam); - if (!resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - return R.fail("药品对照失败"); - } - return R.ok(); - } - - /** - * 【3302】目录对照撤销 - * - * @param tableName 就诊id - * @param id 付款id - * @return 结果 - */ - public R directoryUnCheck(String tableName, Long id) { - - MedicalDirectory3302Param medicalDirectory3302Param = ybBaseService.getMedicalDirectory3302Param(tableName, id); - Result resultInfo = ybHttpService.directoryUnCheck(medicalDirectory3302Param); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveDirectoryHistory(tableName, id, 3302, medicalDirectory3302Param); - return R.ok("撤销成功"); - } - return R.fail("撤销失败"); - } - - /** - * 【3201】对总账 - * - * @param settlement3201WebParam 3201入参条件 - * @return 结果 - */ - public R reconcileGeneralLedger(Settlement3201WebParam settlement3201WebParam) { - - Financial3201Param financial3201Param = ybBaseService.getFinancial3201Param(settlement3201WebParam); - if (financial3201Param == null) { - throw new ServiceException("未生成3201参数"); - } - Result result = ybHttpService.reconcileGeneralLedger(financial3201Param); - if (result == null) { - throw new ServiceException("未接收3201医保返回参数"); - } - // ybBaseService.saveReconcileGeneralLedger(result); - return R.ok(); - } - - /** - * 【3202】对明细账 - * - * @param settlement3202WebParam 3202入参条件 - * @return 结果 - */ - public R reconcileGeneralLedgerDetail(Settlement3202WebParam settlement3202WebParam) { - - FinancialSettlement3202Param financial3202Param - = ybBaseService.getFinancialSettlement3202Param(settlement3202WebParam); - FinancialSettlement3202Result resultInfo = ybHttpService.reconcileGeneralLedgerDetail(financial3202Param); - - return R.ok(resultInfo); - } - - /** - * 【3209A】第三方数据查询 - * - * @param settlement3209AWebParam 3209A入参条件 - * @return 结果 - */ - public R threePartSearch(Settlement3209AWebParam settlement3209AWebParam) { - - FinancialSettlement3209AParam financialSettlement3209AParam - = ybBaseService.getFinancialSettlement3209AParam(settlement3209AWebParam); - List list = ybHttpService.threePartSearch(financialSettlement3209AParam); - - return R.ok(); - } - - /** - * 【3203A】清算申请(吉林省) - * - * @param financial3203AWebParam 3203A入参条件 - * @return 结果 - */ - public R applyFinancialClearing(Financial3203AWebParam financial3203AWebParam) { - - Financial3203AParam financial3203AParam = ybBaseService.getFinancial3203AParam(financial3203AWebParam); - String s = ybHttpService.applyFinancialClearing(financial3203AParam); - ybBaseService.save3203AFinancialClearingApplycation(financial3203AParam, s); - return R.ok(s); - } - - /** - * 【3204A】清算申请撤销(吉林省) - * - * @param clrAppyEvtId 3203A入参条件 - * @return 结果 - */ - public R cancelFinancialClearing(String clrAppyEvtId, String clrOptins) { - - Financial3204Param financial3204Param = new Financial3204Param(); - financial3204Param.setClrOptins(clrOptins).setClrAppyEvtId(clrAppyEvtId); - Result resultInfo = ybHttpService.cancelFinancialClearing(financial3204Param); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.save3204AFinancialClearingApplycation(clrAppyEvtId, clrOptins); - return R.ok(); - } - return R.fail(); - } - - /** - * 【3205A】清算申请状态查询 - * - * @param clearing3205AWebParma 3205A入参条件 - * @return 结果 - */ - public R getFinancialClearingStatus(Clearing3205AWebParma clearing3205AWebParma) { - - Clearing3205AParma clearing3205AParma = ybBaseService.getClearing3205AParma(clearing3205AWebParma); - Clearing3205AResult clearing3205AResult = ybHttpService.getFinancialClearingStatus(clearing3205AParma); - - return R.ok(clearing3205AResult); - } - - /** - * 【3501】商品盘存上传 - * - * @param medicalInventory3501Param 供应申请详细信息 - * @param stocktakingTime 盘存时间 - * @return 结果 - */ - public R uploadInventoryCount(MedicalInventory3501Param medicalInventory3501Param, Date stocktakingTime) { - Result resultInfo = ybHttpService.uploadInventoryCount(medicalInventory3501Param); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveInventoryCheckRecord(medicalInventory3501Param, resultInfo.getMessage()); - return R.ok(); - } - ybBaseService.saveInventoryCheckRecord(medicalInventory3501Param, resultInfo.getMessage()); - return R.fail(); - } - - /** - * 【3502】商品信息变更 - * - * @param medicalInventory3502Param 供应申请详细信息 - * @return 结果 - */ - public R updateInventoryCount(MedicalInventory3502Param medicalInventory3502Param) { - Result resultInfo = ybHttpService.updateInventoryCount(medicalInventory3502Param); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveInventoryChangeRecord(medicalInventory3502Param, resultInfo.getMessage()); - return R.ok(); - } - ybBaseService.saveInventoryChangeRecord(medicalInventory3502Param, resultInfo.getMessage()); - return R.fail(); - } - - /** - * 【3503】商品采购 - * - * @param medical3503Param 供应申请详细信息 - * @return 结果 - */ - public R procurement(Medical3503Param medical3503Param) { - Result resultInfo = ybHttpService.procurement(medical3503Param); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveInventoryPurchaseRecord(medical3503Param, resultInfo.getMessage()); - return R.ok(); - } - ybBaseService.saveInventoryPurchaseRecord(medical3503Param, resultInfo.getMessage()); - return R.fail(); - } - - /** - * 【3504】商品采购退货 - * - * @param medicalPurchase3504Param 供应申请详细信息 - * @return 结果 - */ - public R cancelProcurement(MedicalPurchase3504Param medicalPurchase3504Param) { - Result resultInfo = ybHttpService.cancelProcurement(medicalPurchase3504Param); - if (resultInfo.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveInventoryPurchaseReturnRecord(medicalPurchase3504Param, resultInfo.getMessage()); - return R.ok(); - } - ybBaseService.saveInventoryPurchaseReturnRecord(medicalPurchase3504Param, resultInfo.getMessage()); - return R.fail(); - } - - /** - * 【3505】商品销售 - * - * @param medical3505Param 发药详细信息 - * @return 结果 - */ - public R merchandise(Medical3505Param medical3505Param, Contract contract) { - - Result result = ybHttpService.merchandise(medical3505Param, contract); - Medical3505Result medical3505Result - = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Medical3505Result.class); - if ("1".equals(medical3505Result.getRetRslt())) { - ybBaseService.saveInventorySaleRecord(medical3505Param, medical3505Result.getMsgRslt()); - return R.ok(); - } - ybBaseService.saveInventorySaleRecord(medical3505Param, medical3505Result.getMsgRslt()); - return R.fail(); - } - - /** - * 【3506】商品销售退货 - * - * @param medical3506Param 退货详细信息 - * @param contract 合同信息 - * @return 结果 - */ - public R cancelMerchandise(Medical3506Param medical3506Param, Contract contract) { - Result result = ybHttpService.cancelMerchandise(medical3506Param, contract); - Medical3505Result medical3505Result - = JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Medical3505Result.class); - if ("1".equals(medical3505Result.getRetRslt())) { - ybBaseService.saveInventorySaleReturnRecord(medical3506Param, medical3505Result.getMsgRslt()); - return R.ok(); - } - ybBaseService.saveInventorySaleReturnRecord(medical3506Param, medical3505Result.getMsgRslt()); - return R.fail(); - } - - /** - * 【3507】商品信息删除 - * - * @param id 供应申请id - * @return 结果 - */ - public R deleteGoodsInfo(Long id, String ListType) { - Medical3507Param medical3507Param = ybBaseService.getMedical3507Param(id, ListType); - Result resultBody = ybHttpService.deleteGoodsInfo(medical3507Param); - if (resultBody.getCode().equals(CommonConstant.SC_OK_200)) { - ybBaseService.saveInventoryDelRecord(medical3507Param); - return R.ok(); - } - return R.fail(); - } - - /** - * 【门诊结算-2207结算】 - * - * @param contract 合同 - * @param chrgBchno 支付批次号 - * @param ybMdtrtCertType 凭证类型 - * @param busiCardInfo 读卡获取到的凭证 - * @param minpacuntDrugTracCnt 追溯码相关信息 - * @param mcsTracCnt 追溯码相关信息 - * @return 结算结果 - */ - public Clinic2207OrderModel settle(Contract contract, String chrgBchno, String busiCardInfo, - YbMdtrtCertType ybMdtrtCertType, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) { - // 分别查询2206和2201记录的参数信息 - ClinicPreSettle clinicPreSettle = iClinicPreSettleService - .getOne(new LambdaQueryWrapper().eq(ClinicPreSettle::getChrgBchno, chrgBchno)); - if (clinicPreSettle == null) { - throw new ServiceException("为查询到预结算信息"); - } - ClinicReg clinicReg = iRegService - .getOne(new LambdaQueryWrapper().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId())); - if (clinicReg == null) { - throw new ServiceException("为查询到挂号信息"); - } - Clinic2206OrderOutput clinic2206OrderResult - = JsonUtils.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class); - // 组装2207接口参数 - Clinic2207OrderParam clinicOrder = new Clinic2207OrderParam(); - clinicOrder.setPsnNo(clinicPreSettle.getPsnNo()).setMdtrtCertType(ybMdtrtCertType.getValue()) - .setMdtrtCertNo(busiCardInfo).setMedType(clinic2206OrderResult.getMedType()) - .setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01") - .setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno) - .setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype()) - .setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue()) - .setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue()) - .setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue()) - .setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue()) - .setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs()).setMinpacuntDrugTracCnt(minpacuntDrugTracCnt) - .setMcsTracCnt(mcsTracCnt); - // 发送http请求给app - Clinic2207OrderModel settle = ybHttpService.settle(clinicOrder, contract); - if (settle == null) { - throw new ServiceException("未接收2207接口参数"); - } - // 保存记录通信记录 - ybBaseService.saveClinic2207Record(clinicOrder, settle); - return settle.setChrgBchno(chrgBchno); - } - - /** - * 【门诊挂号收费-2207】 - * - * @param contract 合同 - * @param chrgBchno 收费批次号 - * @return 结果 - */ - public PaymentResult settle(Contract contract, String chrgBchno) { - - ClinicPreSettle clinicPreSettle = iClinicPreSettleService - .getOne(new LambdaQueryWrapper().eq(ClinicPreSettle::getChrgBchno, chrgBchno)); - - if (clinicPreSettle == null) { - throw new ServiceException("未查询到预结算信息"); - } - ClinicReg clinicReg = iRegService - .getOne(new LambdaQueryWrapper().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId())); - - if (clinicReg == null) { - throw new ServiceException("未查询到挂号信息"); - } - - Clinic2206OrderOutput clinic2206OrderResult - = JsonUtils.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class); - - Clinic2207OrderParam clinicOrder = new Clinic2207OrderParam(); - clinicOrder.setPsnNo(clinicPreSettle.getPsnNo()).setMdtrtCertType(clinic2206OrderResult.getMdtrtCertType()) - // todo:sjq 医疗费用总额需要用ChargeItem的和 - .setMdtrtCertNo(clinic2206OrderResult.getMdtrtCertNo()).setMedType(clinic2206OrderResult.getMedType()) - .setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01") - .setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno) - .setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype()) - .setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue()) - .setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue()) - .setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue()) - .setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue()) - .setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs()); - - Clinic2207OrderModel settle = ybHttpService.settle(clinicOrder, contract); - - if (settle == null) { - throw new ServiceException("未接收2207接口参数"); - } - // 统一生成业务流水 - String paymentNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.PAYMENT_NO.getPrefix(), 20); - // 业务表中进行操作 - ybBaseService.saveClinic2207Record(paymentNo, clinicOrder, settle); - PaymentResult paymentResult = new com.healthlink.his.financial.model.PaymentResult(); - BeanUtils.copyProperties(settle, paymentResult); - paymentResult.setPaymentNo(paymentNo); - return paymentResult; - } - - public ClinicReg2201Output getClinicRegByEncounterId(Long encounterId) { - return ybBaseService.getClinicRegByEncounterId(encounterId); - } - - public void unPreSettle(Long encounterId, String s) { - Clinic2205OrderParam clinic2205OrderParam = ybBaseService.getClinic2205OrderParam(encounterId, s); - if (clinic2205OrderParam == null) { - throw new ServiceException("未生成2205接口参数"); - } - Contract contract = iContractService.getContractByInsuplcAdmdvs(clinic2205OrderParam.getInsuplcAdmdvs()); - ybHttpService.unPreSettle(clinic2205OrderParam, contract); - } - - /** - * 医保预结算返回信息 - * - * @return 预结算结果 - */ - public Yb2303OutputSetInfo preSettleInpatient(PrePaymentDto prePaymentDto) { - - Encounter encounter = iEncounterService.getById(prePaymentDto.getEncounterId()); - if (encounter == null) { - throw new ServiceException("未查询到就诊记录"); - } - - InpatientReg inpatientReg = inpatientRegService - .getOne(new LambdaQueryWrapper().eq(InpatientReg::getIptNo, encounter.getBusNo()) - .orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1)); - if (inpatientReg == null) { - throw new ServiceException("未查询到医保就诊记录"); - } - - InfoPerson infoPerson = iPerinfoService.getByPsnNo(inpatientReg.getPsnNo()); - if (infoPerson == null) { - throw new ServiceException("未查询到患者信息"); - } - - // 获取今天和昨天的上午10点时间 - // LocalDateTime today10AM = LocalDateTime.of(LocalDate.now(), LocalTime.of(10, 0)); // 今天10点 - // LocalDateTime yesterday10AM = today10AM.minusDays(1); // 昨天10点(自动处理跨月/年) - // List chargeItemList = iChargeItemService.list(new LambdaQueryWrapper() - // .eq(ChargeItem::getEncounterId, encounterId).between(ChargeItem::getEnteredDate, yesterday10AM, today10AM)); - // List chargeItemList = iChargeItemService.list(new LambdaQueryWrapper() - // .eq(ChargeItem::getEncounterId, encounterId).in(ChargeItem::getId, chargeItemIds)); - List chargeItemBaseInfoDtos - = iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds()); - List chargeItemBaseInfoDtosList = new ArrayList<>(); - - // 查询基础信息 todo:childrenJson里面村的内容相比较ChargeItemBaseInfoDto有些不够,需要确认一下类里面实际用到的值在children里存不存在 - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) { - if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - continue; - } - if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) { - // 反序列化:将JSON数组字符串转为List<> - List chargeItemBaseInfoList - = JsonUtils.parseObject(chargeItemBaseInfoDto.getChildrenJson(), new tools.jackson.core.type.TypeReference>() {}); - chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList); - } else { - chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto); - } - } - - Yb2301InputFeeDetail yb2301InputFeeDetail; - List yb2301InputFeeDetailList = new ArrayList<>(); - BigDecimal quantity = BigDecimal.ZERO; - // 分组分类 - Map> groupByTable - = chargeItemBaseInfoDtosList.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceTable)); - for (Map.Entry> stringListEntry : groupByTable.entrySet()) { - Map> groupById - = stringListEntry.getValue().stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceId)); - for (Map.Entry> longListEntry : groupById.entrySet()) { - quantity = BigDecimal.ZERO; - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : longListEntry.getValue()) { - quantity = quantity.add(chargeItemBaseInfoDto.getQuantityValue()); - } - - ChargeItemBaseInfoDto chargeItemBaseInfoDto = longListEntry.getValue().get(0); - - yb2301InputFeeDetail = new Yb2301InputFeeDetail(); - yb2301InputFeeDetail.setFeedetlSn(chargeItemBaseInfoDto.getBusNo()) - .setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo()) - .setMedType(String.valueOf(encounter.getYbClassEnum())) - .setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate()) - .setMedListCodg(chargeItemBaseInfoDto.getYbNo()) - .setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo()) - // 2025-11-13 李方案住院部分的totalprice不可直接用,要用单价乘以数量,并且比如患者一天一袋氯化钠注射液,预结算的时候要根据同表同id进行归类计算 - .setDetItemFeeSumamt(quantity.multiply(chargeItemBaseInfoDto.getUnitPrice())).setCnt(quantity) - .setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName()) - .setBilgDrName(chargeItemBaseInfoDto.getDoctName()) - .setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo()) - .setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo()); - - yb2301InputFeeDetailList.add(yb2301InputFeeDetail); - } - } - - // int i = 1; - // for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtosList) { - // yb2301InputFeeDetail = new Yb2301InputFeeDetail(); - // yb2301InputFeeDetail.setFeedetlSn(chargeItemBaseInfoDto.getBusNo()).setMdtrtId(inpatientReg.getMdtrtId()) - // .setPsnNo(inpatientReg.getPsnNo()).setMedType(String.valueOf(encounter.getYbClassEnum())) - // .setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate()).setMedListCodg(chargeItemBaseInfoDto.getYbNo()) - // .setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo()) - // //2025-11-13 李方案住院部分的totalprice不可直接用,要用单价乘以数量,并且比如患者一天一袋氯化钠注射液,预结算的时候要根据同表同id进行归类计算 - // .setDetItemFeeSumamt(chargeItemBaseInfoDto.getQuantityValue().multiply(chargeItemBaseInfoDto.getUnitPrice())) - // .setCnt(chargeItemBaseInfoDto.getQuantityValue()).setPric(chargeItemBaseInfoDto.getUnitPrice()) - // .setBilgDeptName(chargeItemBaseInfoDto.getDeptName()).setBilgDrName(chargeItemBaseInfoDto.getDoctName()) - // .setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo()) - // .setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo()); - // yb2301InputFeeDetailList.add(yb2301InputFeeDetail); - // } - Yb2301InputFeeDetailModel yb2301InputFeeDetailModel = new Yb2301InputFeeDetailModel(); - yb2301InputFeeDetailModel.setFeedetail(yb2301InputFeeDetailList) - .setInsuplcAdmdvs(inpatientReg.getInsuplcAdmdvs()); - - List yb2301OutputResults = ybHttpService.upload2301FeeDetail(yb2301InputFeeDetailModel); - // todo :数据保存 - ybBaseService.save2301YbFeeDetail(yb2301OutputResults, yb2301InputFeeDetailList, encounter.getId()); - - // for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) { - // if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) { - // continue; - // } - // if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) { - // // 反序列化:将JSON数组字符串转为List<> - // List chargeItemBaseInfoList = - // JsonUtils.parseObject(chargeItemBaseInfoDto.getChildrenJson(), new tools.jackson.core.type.TypeReference>() {}); - // chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList); - // } else { - // chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto); - // } - // } - // 计算医疗总费用 - BigDecimal medfeeSumamt = BigDecimal.ZERO; - for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtosList) { - medfeeSumamt = medfeeSumamt.add(chargeItemBaseInfoDto.getTotalPrice()); - } - - Yb2303InputInpatient yb2303InputInpatient = new Yb2303InputInpatient(); - yb2303InputInpatient.setPsnNo(infoPerson.getPsnNo()) - .setMdtrtCertType(YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()) == null ? null - : YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()).getValue()) - .setMdtrtCertNo(prePaymentDto.getBusiCardInfo()).setMedfeeSumamt(medfeeSumamt) - .setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()).setMdtrtId(inpatientReg.getMdtrtId()) - .setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs()) - .setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs()); - - // todo:中途结算标志需要判断一下,待2304接口开发完成后编辑 - Yb2303OutputSetInfo yb2303OutputSetInfo = ybHttpService.inpatientPreSettle(yb2303InputInpatient); - - if (yb2303OutputSetInfo == null) { - throw new ServiceException("医保预结算失败"); - } - // todo:数据保存 - ybBaseService.save2303InpatientPreSettle(yb2303OutputSetInfo); - - return yb2303OutputSetInfo; - } - - /** - * 【住院结算】 - * - * @param contract 合同 - * @param paymentDto 结算参数 - * @return 结果 - */ - public Yb2304OutputSetlInfo inpatientSettle(Contract contract, PaymentInpatientDto paymentDto) { - - Yb2304InputInpatient yb2304InpatientParam = ybBaseService.getYb2304InpatientParam(paymentDto); - - Yb2304OutputSetlInfo yb2304OutputSetlInfo = ybHttpService.inpatientSettle(contract, yb2304InpatientParam); - if (yb2304OutputSetlInfo == null) { - throw new ServiceException("医保结算失败,请稍后重试"); - } - return yb2304OutputSetlInfo; - } - - /** - * 【取消住院结算】 - * - * @param contract 合同 - * @param inpatientSettle 医保结算实体 - * @return 医保结果 - */ - public Yb2305OutputSetlInfo inpatientUnSettle(Contract contract, InpatientSettle inpatientSettle) { - - Yb2305InputInpatient yb2305InpatientParam = ybBaseService.getYb2305InpatientParam(inpatientSettle); - - Yb2305OutputSetlInfo yb2305OutputSetlInfo = ybHttpService.inpatientUnSettle(contract, yb2305InpatientParam); - - return yb2305OutputSetlInfo; - } - - public void hospitalAdmission() { - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicPreSettleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicPreSettleServiceImpl.java deleted file mode 100755 index c33ffdbf2..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicPreSettleServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.ClinicPreSettle; -import com.healthlink.his.yb.mapper.ClinicPreSettleMapper; -import com.healthlink.his.yb.service.IClinicPreSettleService; -import org.springframework.stereotype.Service; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author system - * @date 2025-04-20 - */ -@Service -public class ClinicPreSettleServiceImpl extends ServiceImpl implements IClinicPreSettleService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicSettleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicSettleServiceImpl.java deleted file mode 100755 index d13290677..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicSettleServiceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.ClinicSettle; -import com.healthlink.his.yb.mapper.ClinicSettleMapper; -import com.healthlink.his.yb.service.IClinicSettleService; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author system - * @date 2025-04-20 - */ -@Service -public class ClinicSettleServiceImpl extends ServiceImpl implements IClinicSettleService { - - /** - * 通过结算id查询 - * - * @param paymentId 结算id - * @return - */ - @Override - public ClinicSettle getByPaymentId(Long paymentId){ - return baseMapper.selectOne(new LambdaQueryWrapper().eq(ClinicSettle::getSetlId, paymentId)); - } - - - @Override - public ClinicSettle getBySettleId(String settleId) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(ClinicSettle::getSetlId, settleId)); - } - - @Override - public List getBySettleIds(List settleIds) { - return baseMapper.selectList(new LambdaQueryWrapper().in(ClinicSettle::getSetlId, settleIds)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicUnRegServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicUnRegServiceImpl.java deleted file mode 100755 index 35039057a..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicUnRegServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.ClinicUnReg; -import com.healthlink.his.yb.mapper.ClinicUnRegMapper; -import com.healthlink.his.yb.service.IClinicUnRegService; -import org.springframework.stereotype.Service; - - -/** - * 撤销挂号记录Service业务层处理 - * - * @author system - * @date 2025-04-21 - */ -@Service -public class ClinicUnRegServiceImpl extends ServiceImpl implements IClinicUnRegService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicUnSettleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicUnSettleServiceImpl.java deleted file mode 100755 index 4894d30af..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/ClinicUnSettleServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.core.common.enums.DelFlag; -import com.healthlink.his.yb.domain.ClinicUnSettle; -import com.healthlink.his.yb.mapper.ClinicUnSettleMapper; -import com.healthlink.his.yb.service.IClinicUnSettleService; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author system - * @date 2025-04-20 - */ -@Service -public class ClinicUnSettleServiceImpl extends ServiceImpl - implements IClinicUnSettleService { - - /** - * 根据settleId查询集合 - * - * @param settleIds 集合 - * @return 集合 - */ - @Override - public List getBySettleIds(List settleIds) { - return baseMapper.selectList(new LambdaQueryWrapper().in(ClinicUnSettle::getSettleId, settleIds) - .eq(ClinicUnSettle::getDeleteFlag, DelFlag.NO.getCode())); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/DayEndMedicalInsuranceSettlementServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/DayEndMedicalInsuranceSettlementServiceImpl.java deleted file mode 100755 index a5daff5ee..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/DayEndMedicalInsuranceSettlementServiceImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.core.common.core.domain.PageResult; -import com.healthlink.his.yb.domain.DayEndMedicalInsuranceSettlement; -import com.healthlink.his.yb.mapper.DayEndMedicalInsuranceSettlementMapper; -import com.healthlink.his.yb.service.IDayEndMedicalInsuranceSettlementService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Arrays; -import java.util.List; - -/** - * 日结医保结算Service业务层处理 - * - * @author - * @date 2026-02-02 - */ -@Service -public class DayEndMedicalInsuranceSettlementServiceImpl extends ServiceImpl implements IDayEndMedicalInsuranceSettlementService { - - @Autowired - private DayEndMedicalInsuranceSettlementMapper dayEndMedicalInsuranceSettlementMapper; - - /** - * 查询日结医保结算 - * - * @param id 日结医保结算ID - * @return 日结医保结算 - */ - @Override - public DayEndMedicalInsuranceSettlement selectDayEndMedicalInsuranceSettlementById(Long id) { - return dayEndMedicalInsuranceSettlementMapper.selectById(id); - } - - /** - * 查询日结医保结算列表 - * - * @param dayEndMedicalInsuranceSettlement 日结医保结算 - * @return 日结医保结算 - */ - @Override - public List selectDayEndMedicalInsuranceSettlementList(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.like(dayEndMedicalInsuranceSettlement.getSettlementNo() != null, DayEndMedicalInsuranceSettlement::getSettlementNo, dayEndMedicalInsuranceSettlement.getSettlementNo()); - lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementDate() != null, DayEndMedicalInsuranceSettlement::getSettlementDate, dayEndMedicalInsuranceSettlement.getSettlementDate()); - lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementType() != null, DayEndMedicalInsuranceSettlement::getSettlementType, dayEndMedicalInsuranceSettlement.getSettlementType()); - lqw.eq(dayEndMedicalInsuranceSettlement.getInsuranceType() != null, DayEndMedicalInsuranceSettlement::getInsuranceType, dayEndMedicalInsuranceSettlement.getInsuranceType()); - lqw.eq(dayEndMedicalInsuranceSettlement.getStatus() != null, DayEndMedicalInsuranceSettlement::getStatus, dayEndMedicalInsuranceSettlement.getStatus()); - lqw.orderByDesc(DayEndMedicalInsuranceSettlement::getCreateTime); - return dayEndMedicalInsuranceSettlementMapper.selectList(lqw); - } - - /** - * 新增日结医保结算 - * - * @param dayEndMedicalInsuranceSettlement 日结医保结算 - * @return 结果 - */ - @Override - public int insertDayEndMedicalInsuranceSettlement(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement) { - return dayEndMedicalInsuranceSettlementMapper.insert(dayEndMedicalInsuranceSettlement); - } - - /** - * 修改日结医保结算 - * - * @param dayEndMedicalInsuranceSettlement 日结医保结算 - * @return 结果 - */ - @Override - public int updateDayEndMedicalInsuranceSettlement(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement) { - return dayEndMedicalInsuranceSettlementMapper.updateById(dayEndMedicalInsuranceSettlement); - } - - /** - * 批量删除日结医保结算 - * - * @param ids 需要删除的日结医保结算ID - * @return 结果 - */ - @Override - public int deleteDayEndMedicalInsuranceSettlementByIds(Long[] ids) { - return dayEndMedicalInsuranceSettlementMapper.deleteBatchIds(Arrays.asList(ids)); - } - - /** - * 删除日结医保结算信息 - * - * @param id 日结医保结算ID - * @return 结果 - */ - @Override - public int deleteDayEndMedicalInsuranceSettlementById(Long id) { - return dayEndMedicalInsuranceSettlementMapper.deleteById(id); - } - - /** - * 分页查询日结医保结算列表 - * - * @param dayEndMedicalInsuranceSettlement 日结医保结算 - * @param pageNum 页码 - * @param pageSize 页面大小 - * @return 分页结果 - */ - @Override - public PageResult selectDayEndMedicalInsuranceSettlementPage(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement, int pageNum, int pageSize) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.like(dayEndMedicalInsuranceSettlement.getSettlementNo() != null, DayEndMedicalInsuranceSettlement::getSettlementNo, dayEndMedicalInsuranceSettlement.getSettlementNo()); - lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementDate() != null, DayEndMedicalInsuranceSettlement::getSettlementDate, dayEndMedicalInsuranceSettlement.getSettlementDate()); - lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementType() != null, DayEndMedicalInsuranceSettlement::getSettlementType, dayEndMedicalInsuranceSettlement.getSettlementType()); - lqw.eq(dayEndMedicalInsuranceSettlement.getInsuranceType() != null, DayEndMedicalInsuranceSettlement::getInsuranceType, dayEndMedicalInsuranceSettlement.getInsuranceType()); - lqw.eq(dayEndMedicalInsuranceSettlement.getStatus() != null, DayEndMedicalInsuranceSettlement::getStatus, dayEndMedicalInsuranceSettlement.getStatus()); - lqw.orderByDesc(DayEndMedicalInsuranceSettlement::getCreateTime); - - Page page = new Page<>(pageNum, pageSize); - Page result = dayEndMedicalInsuranceSettlementMapper.selectPage(page, lqw); - - return PageResult.builder() - .rows(result.getRecords()) - .total(result.getTotal()) - .build(); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/FinancialApplyRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/FinancialApplyRecordServiceImpl.java deleted file mode 100755 index ff31a39f1..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/FinancialApplyRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.FinancialApplyRecord; -import com.healthlink.his.yb.mapper.FinancialApplyRecordMapper; -import com.healthlink.his.yb.service.IFinancialApplyRecordService; -import org.springframework.stereotype.Service; - -/** - * 医保财务申请记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class FinancialApplyRecordServiceImpl extends ServiceImpl implements IFinancialApplyRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/FinancialReconcileRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/FinancialReconcileRecordServiceImpl.java deleted file mode 100755 index 9e2c563bd..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/FinancialReconcileRecordServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.FinancialReconcileRecord; -import com.healthlink.his.yb.mapper.FinancialReconcileRecordMapper; -import com.healthlink.his.yb.service.IFinancialReconcileRecordService; -import org.springframework.stereotype.Service; - - -/** - * ybService业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class FinancialReconcileRecordServiceImpl extends ServiceImpl implements IFinancialReconcileRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientDischargeServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientDischargeServiceImpl.java deleted file mode 100755 index f9471021f..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientDischargeServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.core.common.enums.DelFlag; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.yb.domain.InpatientDischarge; -import com.healthlink.his.yb.mapper.InpatientDischargeMapper; -import com.healthlink.his.yb.service.IInpatientDischargeService; -import org.springframework.stereotype.Service; - -/** - * 医保出院Mapper - * - * @author SunJQ - * @date 2025-07-31 - */ -@Service -public class InpatientDischargeServiceImpl extends ServiceImpl - implements IInpatientDischargeService { - - @Override - public InpatientDischarge getByMdtrtId(String mdtrtId) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(InpatientDischarge::getMdtrtId, mdtrtId) - .eq(InpatientDischarge::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientFeeDetailServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientFeeDetailServiceImpl.java deleted file mode 100755 index ff1790aaa..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientFeeDetailServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InpatientFeeDetail; -import com.healthlink.his.yb.mapper.InpatientFeeDetailMapper; -import com.healthlink.his.yb.service.IInpatientFeeDetailService; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class InpatientFeeDetailServiceImpl extends ServiceImpl implements IInpatientFeeDetailService { - @Override - public List getFeeDetailList(String mdtrtId) { - return baseMapper.selectList(new LambdaQueryWrapper().eq(InpatientFeeDetail::getMdtrtId, mdtrtId)); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientPreSettleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientPreSettleServiceImpl.java deleted file mode 100755 index a043918cd..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientPreSettleServiceImpl.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InpatientPreSettle; -import com.healthlink.his.yb.mapper.InpatientPreSettleMapper; -import com.healthlink.his.yb.service.IInpatientPreSettleService; -import org.springframework.stereotype.Service; - -@Service -public class InpatientPreSettleServiceImpl extends ServiceImpl - implements IInpatientPreSettleService { - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientRegInfoUpdateRecordeServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientRegInfoUpdateRecordeServiceImpl.java deleted file mode 100755 index 6fedf7cc8..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientRegInfoUpdateRecordeServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InpatientRegInfoUpdateRecorde; -import com.healthlink.his.yb.mapper.InpatientRegInfoUpdateRecordeMapper; -import com.healthlink.his.yb.service.IInpatientRegInfoUpdateRecordeService; -import org.springframework.stereotype.Service; - -/** - * TODO:请概括描述当前类的主要用途和注意事项 - * - * @author SunJQ - * @date 2025-07-31 - */ -@Service -public class InpatientRegInfoUpdateRecordeServiceImpl extends ServiceImpl - implements IInpatientRegInfoUpdateRecordeService { - - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientRegServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientRegServiceImpl.java deleted file mode 100755 index 93beff7c5..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientRegServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright ©2023 CJB-CNIT Team. All rights reserved - */ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.core.common.enums.DelFlag; -import com.healthlink.his.yb.domain.InpatientReg; -import com.healthlink.his.yb.mapper.InpatientRegMapper; -import com.healthlink.his.yb.service.IInpatientRegService; -import org.springframework.stereotype.Service; - -/** - * TODO:请概括描述当前类的主要用途和注意事项 - * - * @author SunJQ - * @date 2025-07-31 - */ -@Service -public class InpatientRegServiceImpl extends ServiceImpl - implements IInpatientRegService { - - @Override - public InpatientReg getInpatientRegByIptNo(String busNo) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(InpatientReg::getIptNo, busNo) - .eq(InpatientReg::getDeleteFlag, DelFlag.NO.getCode())); - } - - @Override - public InpatientReg getInpatientRegByMdtrtId(String mdtrtId) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(InpatientReg::getMdtrtId, mdtrtId) - .eq(InpatientReg::getDeleteFlag, DelFlag.NO.getCode())); - } - - @Override - public InpatientReg getInpatientRegByEncounterId(String encounterId) { - return baseMapper.selectInpatientInfoByEncounterId(encounterId); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientSettleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientSettleServiceImpl.java deleted file mode 100755 index 7c8be3d38..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InpatientSettleServiceImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.core.common.enums.DelFlag; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.yb.domain.InpatientSettle; -import com.healthlink.his.yb.mapper.InpatientSettleMapper; -import com.healthlink.his.yb.service.IInpatientSettleService; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class InpatientSettleServiceImpl extends ServiceImpl - implements IInpatientSettleService { - @Override - public InpatientSettle getBySettleId(String ybSettleIds) { - return baseMapper - .selectOne(new LambdaQueryWrapper().eq(InpatientSettle::getSetlId, ybSettleIds) - .eq(InpatientSettle::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1)); - } - - @Override - public List getByMdtrtId(String mdtrtId) { - return baseMapper.selectList(new LambdaQueryWrapper().eq(InpatientSettle::getMdtrtId, mdtrtId) - .eq(InpatientSettle::getDeleteFlag, DelFlag.NO.getCode())); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryChangeRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryChangeRecordServiceImpl.java deleted file mode 100755 index f519020b6..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryChangeRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventoryChangeRecord; -import com.healthlink.his.yb.mapper.InventoryChangeRecordMapper; -import com.healthlink.his.yb.service.IInventoryChangeRecordService; -import org.springframework.stereotype.Service; - -/** - * 库存信息变更记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventoryChangeRecordServiceImpl extends ServiceImpl implements IInventoryChangeRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryCheckRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryCheckRecordServiceImpl.java deleted file mode 100755 index 88d7eb58d..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryCheckRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventoryCheckRecord; -import com.healthlink.his.yb.mapper.InventoryCheckRecordMapper; -import com.healthlink.his.yb.service.IInventoryCheckRecordService; -import org.springframework.stereotype.Service; - -/** - * 库存盘点记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventoryCheckRecordServiceImpl extends ServiceImpl implements IInventoryCheckRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryDelRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryDelRecordServiceImpl.java deleted file mode 100755 index 3e4bf8a33..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryDelRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventoryDelRecord; -import com.healthlink.his.yb.mapper.InventoryDelRecordMapper; -import com.healthlink.his.yb.service.IInventoryDelRecordService; -import org.springframework.stereotype.Service; - -/** - * 库存删除记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventoryDelRecordServiceImpl extends ServiceImpl implements IInventoryDelRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryPurchaseRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryPurchaseRecordServiceImpl.java deleted file mode 100755 index 485b228cb..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryPurchaseRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventoryPurchaseRecord; -import com.healthlink.his.yb.mapper.InventoryPurchaseRecordMapper; -import com.healthlink.his.yb.service.IInventoryPurchaseRecordService; -import org.springframework.stereotype.Service; - -/** - * 库存采购/退货记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventoryPurchaseRecordServiceImpl extends ServiceImpl implements IInventoryPurchaseRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryPurchaseReturnRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryPurchaseReturnRecordServiceImpl.java deleted file mode 100755 index eb020d1b6..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventoryPurchaseReturnRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventoryPurchaseReturnRecord; -import com.healthlink.his.yb.mapper.InventoryPurchaseReturnRecordMapper; -import com.healthlink.his.yb.service.IInventoryPurchaseReturnRecordService; -import org.springframework.stereotype.Service; - -/** - * 采购/退货记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventoryPurchaseReturnRecordServiceImpl extends ServiceImpl implements IInventoryPurchaseReturnRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventorySaleRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventorySaleRecordServiceImpl.java deleted file mode 100755 index 3db26d9e7..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventorySaleRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventorySaleRecord; -import com.healthlink.his.yb.mapper.InventorySaleRecordMapper; -import com.healthlink.his.yb.service.IInventorySaleRecordService; -import org.springframework.stereotype.Service; - -/** - * 销售/退货记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventorySaleRecordServiceImpl extends ServiceImpl implements IInventorySaleRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventorySaleReturnRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventorySaleReturnRecordServiceImpl.java deleted file mode 100755 index 986be6bf0..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/InventorySaleReturnRecordServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.InventorySaleReturnRecord; -import com.healthlink.his.yb.mapper.InventorySaleReturnRecordMapper; -import com.healthlink.his.yb.service.IInventorySaleReturnRecordService; -import org.springframework.stereotype.Service; - -/** - * 销售/退货记录Service业务层处理 - * - * @author system - * @date 2025-04-30 - */ -@Service -public class InventorySaleReturnRecordServiceImpl extends ServiceImpl implements IInventorySaleReturnRecordService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/PerinfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/PerinfoServiceImpl.java deleted file mode 100755 index 9ec9cc22f..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/PerinfoServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.core.common.exception.ServiceException; -import com.core.common.utils.StringUtils; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.yb.domain.InfoPerson; -import com.healthlink.his.yb.mapper.PerinfoMapper; -import com.healthlink.his.yb.service.IPerinfoService; -import org.springframework.stereotype.Service; - -/** - * @Description: 人员基础信息 - * @Author: jeecg-boot - * @Date: 2021-08-27 - * @Version: V1.0 - */ -@Service -public class PerinfoServiceImpl extends ServiceImpl implements IPerinfoService { - @Override - public InfoPerson getPerInfoByIdCard(String idCard,Integer tenantId) { - return baseMapper.selectOne(new LambdaQueryWrapper() - .eq(InfoPerson::getCertno, idCard).eq(InfoPerson::getTenantId, tenantId) - .orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1)); - } - - @Override - public InfoPerson getByPsnNo(String psnNo) { - return baseMapper.selectOne(new LambdaQueryWrapper() - .eq(InfoPerson::getPsnNo, psnNo).orderByDesc(InfoPerson::getCreateTime) - .last(YbCommonConstants.sqlConst.LIMIT1)); - } - - @Override - public boolean assessInterCrossRegionalSettlement(String psnNo, String admVs) { - InfoPerson infoPerson = getByPsnNo(psnNo); - if(infoPerson==null){ - throw new ServiceException("未查询到身份信息"); - } - //参保地 - String insuplcAdmdvs = infoPerson.getInsuplcAdmdvs(); - return admVs.equals(insuplcAdmdvs); - } - - @Override - public boolean assessIntraCrossRegionalSettlement(String psnNo, String admVs){ - InfoPerson infoPerson = getByPsnNo(psnNo); - if(infoPerson==null){ - throw new ServiceException("未查询到身份信息"); - } - //参保地 - String insuplcAdmdvs = infoPerson.getInsuplcAdmdvs(); - if(StringUtils.isEmpty(insuplcAdmdvs)){ - throw new ServiceException("该患者查询不到参保地信息"); - } - return insuplcAdmdvs.startsWith(admVs.substring(0,2)); - } - - public boolean assessCrossRegionalSettlement(String psnNo, String admVs){ - return assessIntraCrossRegionalSettlement(psnNo,admVs)||assessIntraCrossRegionalSettlement(psnNo,admVs); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/RegServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/RegServiceImpl.java deleted file mode 100755 index 59e6082ac..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/RegServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.ClinicReg; -import com.healthlink.his.yb.mapper.RegMapper; -import com.healthlink.his.yb.service.IRegService; -import org.springframework.stereotype.Service; - -/** - * 挂号管理-服务 - */ -@Service -public class RegServiceImpl extends ServiceImpl implements IRegService { - @Override - public void updateStatus(Long id, String status) { - ClinicReg reg = new ClinicReg(); - reg.setId(id); - reg.setStatus(status); - updateById(reg); - } - - /** - * 通过单据号查询 - * - * @param busNo 单据号 - * @return - */ - @Override - public ClinicReg getByBusNo(String busNo) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(ClinicReg::getIptOtpNo, busNo) - .orderByDesc(ClinicReg::getCreateTime) - .last("LIMIT 1")); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/SignServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/SignServiceImpl.java deleted file mode 100755 index 55a110732..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/impl/SignServiceImpl.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.healthlink.his.yb.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.yb.domain.Sign; -import com.healthlink.his.yb.mapper.SignMapper; -import com.healthlink.his.yb.service.ISignService; -import org.springframework.stereotype.Service; - -/** - * 签到管理-服务 - */ -@Service -public class SignServiceImpl extends ServiceImpl implements ISignService { - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/util/YbParamBuilderUtil.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/util/YbParamBuilderUtil.java index a965c022a..47c827160 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/util/YbParamBuilderUtil.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/util/YbParamBuilderUtil.java @@ -12,7 +12,7 @@ import com.core.common.utils.DateUtils; import com.core.common.utils.SecurityUtils; import com.core.common.utils.StringUtils; import com.core.system.service.impl.SysUserServiceImpl; -import com.core.web.util.TenantOptionUtil; +import com.core.common.utils.TenantOptionUtil; import com.healthlink.his.administration.domain.*; import com.healthlink.his.administration.service.*; import com.healthlink.his.clinical.domain.Condition; @@ -24,7 +24,7 @@ import tools.jackson.databind.JsonNode; import com.core.common.utils.JsonUtils; import com.healthlink.his.common.constant.YbCommonConstants; import com.healthlink.his.common.enums.*; -import com.healthlink.his.common.enums.ybenums.*; +import com.healthlink.his.yb.enums.*; import com.healthlink.his.financial.domain.Contract; import com.healthlink.his.financial.domain.PaymentRecDetail; import com.healthlink.his.financial.domain.PaymentReconciliation; diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogDrugInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogDrugInfoServiceImpl.java deleted file mode 100755 index e40ae4bd8..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogDrugInfoServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogDrugInfo; -import com.healthlink.his.ybcatalog.mapper.CatalogDrugInfoMapper; -import com.healthlink.his.ybcatalog.service.ICatalogDrugInfoService; -import org.springframework.stereotype.Service; - -/** - * 西药中成药目录Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogDrugInfoServiceImpl extends ServiceImpl implements ICatalogDrugInfoService { -// /** -// * 获取药品信息 -// */ -// -// @Override -// public Page selectCatalogDrugInfo(Integer pageNo, -// Integer pageSize, String searchKey) { -// Page page = new Page<>(pageNo, pageSize); -// return (baseMapper.selectPage(page, new LambdaQueryWrapper().like(CatalogDrugInfo::getRegisteredName, searchKey).or().like(CatalogDrugInfo::getPinyinCode, searchKey).or().like(CatalogDrugInfo::getWubiCode, searchKey))); -// } - - public CatalogDrugInfo getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogDrugInfo::getMedicalCatalogCode,medicalCatalogCode).eq(CatalogDrugInfo::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogDrugInfoUsualServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogDrugInfoUsualServiceImpl.java deleted file mode 100755 index 50d0aea2b..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogDrugInfoUsualServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybcatalog.domain.CatalogDrugInfoUsual; -import com.healthlink.his.ybcatalog.mapper.CatalogDrugInfoUsualMapper; -import com.healthlink.his.ybcatalog.service.ICatalogDrugInfoUsualService; -import org.springframework.stereotype.Service; - -/** - * 西药中成药目录Service业务层处理 - * - * @author system - * @date 2025-07-02 - */ -@Service -public class CatalogDrugInfoUsualServiceImpl extends ServiceImpl - implements ICatalogDrugInfoUsualService { - /** - * 获取药品信息 - */ - - @Override - public Page selectCatalogDrugInfoUsual(Integer pageNo, Integer pageSize, String searchKey) { - Page page = new Page<>(pageNo, pageSize); - return (baseMapper.selectPage(page, - new LambdaQueryWrapper().like(CatalogDrugInfoUsual::getRegisteredName, searchKey).or() - .like(CatalogDrugInfoUsual::getPinyinCode, searchKey).or() - .like(CatalogDrugInfoUsual::getWubiCode, searchKey).or() - .like(CatalogDrugInfoUsual::getApprovalNo, searchKey).or() - .like(CatalogDrugInfoUsual::getManufacturerName, searchKey))); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalConsumablesServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalConsumablesServiceImpl.java deleted file mode 100755 index fa98fc25e..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalConsumablesServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogMedicalConsumables; -import com.healthlink.his.ybcatalog.mapper.CatalogMedicalConsumablesMapper; -import com.healthlink.his.ybcatalog.service.ICatalogMedicalConsumablesService; -import org.springframework.stereotype.Service; - -/** - * 医疗耗材信息Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogMedicalConsumablesServiceImpl extends ServiceImpl implements ICatalogMedicalConsumablesService { - public CatalogMedicalConsumables getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogMedicalConsumables::getMedicalCatalogCode,medicalCatalogCode).eq(CatalogMedicalConsumables::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalHerbInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalHerbInfoServiceImpl.java deleted file mode 100755 index 2ee5e4462..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalHerbInfoServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogMedicalHerbInfo; -import com.healthlink.his.ybcatalog.mapper.CatalogMedicalHerbInfoMapper; -import com.healthlink.his.ybcatalog.service.ICatalogMedicalHerbInfoService; -import org.springframework.stereotype.Service; - -/** - * 中药材信息Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogMedicalHerbInfoServiceImpl extends ServiceImpl implements ICatalogMedicalHerbInfoService { - public CatalogMedicalHerbInfo getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogMedicalHerbInfo::getMedicalCatalogCode,medicalCatalogCode).eq(CatalogMedicalHerbInfo::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalServiceServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalServiceServiceImpl.java deleted file mode 100755 index dda1fffe5..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogMedicalServiceServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogMedicalService; -import com.healthlink.his.ybcatalog.mapper.CatalogMedicalServiceMapper; -import com.healthlink.his.ybcatalog.service.ICatalogMedicalServiceService; -import org.springframework.stereotype.Service; - -/** - * 医疗服务项目Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogMedicalServiceServiceImpl extends ServiceImpl implements ICatalogMedicalServiceService { - public CatalogMedicalService getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogMedicalService::getMedicalCatalogCode,medicalCatalogCode).eq(CatalogMedicalService::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSpecialDiseaseServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSpecialDiseaseServiceImpl.java deleted file mode 100755 index 3520144e9..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSpecialDiseaseServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogSpecialDisease; -import com.healthlink.his.ybcatalog.mapper.CatalogSpecialDiseaseMapper; -import com.healthlink.his.ybcatalog.service.ICatalogSpecialDiseaseService; -import org.springframework.stereotype.Service; - -/** - * 特慢病目录 Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogSpecialDiseaseServiceImpl extends - ServiceImpl implements ICatalogSpecialDiseaseService { - public CatalogSpecialDisease getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogSpecialDisease::getDiseaseCatalogCode,medicalCatalogCode).eq(CatalogSpecialDisease::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSpecialInsuranceDiseaseServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSpecialInsuranceDiseaseServiceImpl.java deleted file mode 100755 index 5e9d0c20c..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSpecialInsuranceDiseaseServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogSpecialInsuranceDisease; -import com.healthlink.his.ybcatalog.mapper.CatalogSpecialInsuranceDiseaseMapper; -import com.healthlink.his.ybcatalog.service.ICatalogSpecialInsuranceDiseaseService; -import org.springframework.stereotype.Service; - -@Service -public class CatalogSpecialInsuranceDiseaseServiceImpl extends ServiceImpl implements ICatalogSpecialInsuranceDiseaseService { - public CatalogSpecialInsuranceDisease getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogSpecialInsuranceDisease::getDiseaseCode,medicalCatalogCode).eq(CatalogSpecialInsuranceDisease::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSurgeryStandardDirectoryServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSurgeryStandardDirectoryServiceImpl.java deleted file mode 100755 index 9705e4164..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogSurgeryStandardDirectoryServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogSurgeryStandardDirectory; -import com.healthlink.his.ybcatalog.mapper.CatalogSurgeryStandardDirectoryMapper; -import com.healthlink.his.ybcatalog.service.ICatalogSurgeryStandardDirectoryService; -import org.springframework.stereotype.Service; - -/** - * 手术标准目录Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogSurgeryStandardDirectoryServiceImpl extends ServiceImpl implements ICatalogSurgeryStandardDirectoryService { - public CatalogSurgeryStandardDirectory getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogSurgeryStandardDirectory::getId,medicalCatalogCode).eq(CatalogSurgeryStandardDirectory::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogWesternDiseaseServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogWesternDiseaseServiceImpl.java deleted file mode 100755 index 5b81ba511..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogWesternDiseaseServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogWesternDisease; -import com.healthlink.his.ybcatalog.mapper.CatalogWesternDiseaseMapper; -import com.healthlink.his.ybcatalog.service.ICatalogWesternDiseaseService; -import org.springframework.stereotype.Service; - -/** - * 西医疾病诊断信息Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogWesternDiseaseServiceImpl extends ServiceImpl implements ICatalogWesternDiseaseService { - public CatalogWesternDisease getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogWesternDisease::getDiseaseId,medicalCatalogCode).eq(CatalogWesternDisease::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogZyDiseaseDiagnosisServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogZyDiseaseDiagnosisServiceImpl.java deleted file mode 100755 index d93160ba6..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogZyDiseaseDiagnosisServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogZyDiseaseDiagnosis; -import com.healthlink.his.ybcatalog.mapper.CatalogZyDiseaseDiagnosisMapper; -import com.healthlink.his.ybcatalog.service.ICatalogZyDiseaseDiagnosisService; -import org.springframework.stereotype.Service; - -/** - * 中医疾病诊断Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogZyDiseaseDiagnosisServiceImpl extends ServiceImpl implements ICatalogZyDiseaseDiagnosisService { - public CatalogZyDiseaseDiagnosis getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogZyDiseaseDiagnosis::getId,medicalCatalogCode).eq(CatalogZyDiseaseDiagnosis::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogZySyndromeServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogZySyndromeServiceImpl.java deleted file mode 100755 index 5377c9b97..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybcatalog/service/impl/CatalogZySyndromeServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.healthlink.his.ybcatalog.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.common.constant.YbCommonConstants; -import com.healthlink.his.ybcatalog.domain.CatalogZySyndrome; -import com.healthlink.his.ybcatalog.mapper.CatalogZySyndromeMapper; -import com.healthlink.his.ybcatalog.service.ICatalogZySyndromeService; -import org.springframework.stereotype.Service; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author system - * @date 2025-04-09 - */ -@Service -public class CatalogZySyndromeServiceImpl extends ServiceImpl implements ICatalogZySyndromeService { - public CatalogZySyndrome getByYbNo(String medicalCatalogCode, String version) { - return baseMapper.selectOne(new LambdaQueryWrapper().eq(CatalogZySyndrome::getTcmSyndromeId,medicalCatalogCode).eq(CatalogZySyndrome::getVersionName,version).last(YbCommonConstants.sqlConst.LIMIT1)); - } -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultDetail.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultDetail.java deleted file mode 100755 index 6fdb4e845..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultDetail.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; - -/** - * 【电子处方取药结果查询-输出(节点标识:seltdelts)】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_medresult_detail") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepMedresultDetail extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医疗目录编码 */ - private String medListCodg; - - /** 药品通用名 */ - private String drugGenname; - - /** 药品商品名 */ - private String drugProdname; - - /** 药品剂型 */ - private String drugDosform; - - /** 药品规格 */ - private BigDecimal drugSpec; - - /** 数量 */ - private BigDecimal cnt; - - /** 批准文号 */ - private String aprvno; - - /** 批次号 */ - private String bchno; - - /** 生产批号 */ - private String manuLotnum; - - /** 生产厂家 */ - private String prdrName; - - /** 取药标志位 */ - private String takeDrugFlag; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultInfo.java deleted file mode 100755 index 269863cc8..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultInfo.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方取药结果查询-输出】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_medresult_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepMedresultInfo extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医保处方编号 */ - private String hiRxno; - - /** 医保结算时间(yyyy-MM-dd HH:mm:ss) */ - private String setlTime; - - /** 医保处方状态编码(参考rx_stas_codg) */ - private String rxStasCodg; - - /** 医保处方状态名称 */ - private String rxStasName; - - /** 处方使用状态编号(参考rx_used_stas_codg) */ - private String rxUsedStasCodg; - - /** 处方使用状态名称 */ - private String rxUsedStasName; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultInput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultInput.java deleted file mode 100755 index 299b374a2..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepMedresultInput.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方取药结果查询-输入】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_medresult_input") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepMedresultInput extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 医保处方编号 */ - private String hiRxno; - - /** 医保就诊ID(医保门诊挂号时返回) */ - private String mdtrtId; - - /** 人员名称 */ - private String psnName; - - /** 人员证件类型 */ - private String psnCertType; - - /** 证件号码 */ - private String certno; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerDiagnosisInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerDiagnosisInfo.java deleted file mode 100755 index dba267ecd..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerDiagnosisInfo.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方信息查询-输出-诊断信息(节点表示: rxDiseList) 】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_quer_diagnosis_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepQuerDiagnosisInfo extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 诊断类别 */ - private String diagType; - - /** 主诊断标志 */ - private String maindiagFlag; - - /** 诊断排序号 */ - private String diagSrtNo; - - /** 诊断代码 */ - private String diagCode; - - /** 诊断名称 */ - private String diagName; - - /** 诊断科室 */ - private String diagDept; - - /** 诊断科室代码 */ - private String diagDeptCode; - - /** 诊断医生编码 */ - private String diagDrNo; - - /** 诊断医生姓名 */ - private String diagDrName; - - /** 诊断时间(yyyy-MM-dd HH:mm:ss) */ - private String diagTime; - - /** 中医病名代码 */ - private String tcmDiseCode; - - /** 中医病名名称 */ - private String tcmDiseName; - - /** 中医症候代码 */ - private String tcmsympCode; - - /** 中医症候 */ - private String tcmsymp; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionDetail.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionDetail.java deleted file mode 100755 index f44755d7e..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionDetail.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; - -/** - * 【电子处方信息查询-输出-处方明细信息(节点标识:rxDetlList) 】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_quer_prescription_detail") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepQuerPrescriptionDetail extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医疗目录编码(医保目录编码) */ - private String medListCodg; - - /** 定点医药机构目录编号(院内药品编码) */ - private String fixmedinsHilistId; - - /** 院内制剂标志(Y/N) */ - private String hospPrepFlag; - - /** 处方项目分类代码 */ - private String rxItemTypeCode; - - /** 处方项目分类名称 */ - private String rxItemTypeName; - - /** 中药类别名称 */ - private String tcmdrugTypeName; - - /** 中药类别代码 */ - private String tcmdrugTypeCode; - - /** 草药脚注 */ - private String tcmherbFoote; - - /** 药物类型代码 */ - private String mednTypeCode; - - /** 药物类型 */ - private String mednTypeName; - - /** 主要用药标志 */ - private String mainMedcFlag; - - /** 加急标志 */ - private String urgtFlag; - - /** 基本药物标志(Y/N) */ - private String basMednFlag; - - /** 基本药物标志(Y/N) */ - private String impDrugFlag; - - /** 药品商品名 */ - private String drugProdname; - - /** 药品通用名 */ - private String drugGenname; - - /** 药品剂型 */ - private String drugDosform; - - /** 药品规格 */ - private String drugSpec; - - /** 生产厂家 */ - private String prdrName; - - /** 用药途径代码 */ - private String medcWayCodg; - - /** 用药途径描述 */ - private String medcWayDscr; - - /** 用药开始时间(yyyy-MM-dd HH:mm:ss) */ - private String medcBegntime; - - /** 用药结束时间(yyyy-MM-dd HH:mm:ss) */ - private String medcEndtime; - - /** 用药天数 */ - private BigDecimal medcDays; - - /** 药品总用药量 */ - private BigDecimal drugCnt; - - /** 药品总用药量单位 */ - private String drugDosunt; - - /** 单次用量 */ - private BigDecimal sinDoscnt; - - /** 单次剂量单位 */ - private String sinDosunt; - - /** 使用频次编码 */ - private String usedFrquCodg; - - /** 使用频次名称 */ - private String usedFrquName; - - /** 医院审批标志(Y/N) */ - private String hospApprFlag; - - /** 取药标志位(Y/N) */ - private String takeDrugFlag; - - /** 是否OTC药品(0-处方药品、1-OTC药品) */ - private String otcFlag; - - /** 自费原因类型 */ - private String selfPayRea; - - /** 自费原因描述 */ - private String realDscr; - - /** 所需药品库存数量 */ - private String drugTotlcnt; - - /** 所需药品库存单位 */ - private String drugTotlcntEmp; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionInfo.java deleted file mode 100755 index e446fbf18..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionInfo.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; - -/** - * 【电子处方信息查询-输出-处方信息 】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_quer_prescription_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepQuerPrescriptionInfo extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医保处方编号 */ - private String hiRxno; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 定点医疗机构名称 */ - private String fixmedinsName; - - /** 医保处方状态编码 */ - private String rxStasCodg; - - /** 医保处方状态名称 */ - private String rxStasName; - - /** 医保处方使用状态编码 */ - private String rxUsedStasCodg; - - /** 医保处方使用状态名称 */ - private String rxUsedStasName; - - /** 开方时间 */ - private String prscTime; - - /** 药品总用量(剂数) */ - private BigDecimal rxDrugCnt; - - /** 处方整剂用法编码 */ - private String rxUsedWayCodg; - - /** 处方整剂用法名称 */ - private String rxUsedWayName; - - /** 处方整剂频次编号 */ - private String rxFrquCodg; - - /** 处方整剂频次名称 */ - private String rxFrquName; - - /** 处方整剂剂量单位 */ - private String rxDosunt; - - /** 处方整剂单次剂量数 */ - private BigDecimal rxDoscnt; - - /** 处方整剂医嘱说明 */ - private String rxDrordDscr; - - /** 处方有效天数 */ - private BigDecimal valiDays; - - /** 有效截止时间 */ - private String valiEndTime; - - /** 复用(多次)使用标志,0-否、1-是 */ - private String reptFlag; - - /** 最大复用次数 */ - private BigDecimal maxReptCnt; - - /** 已复用次数 */ - private BigDecimal reptdCnt; - - /** 使用最小间隔(天数) */ - private BigDecimal minInrvDays; - - /** 处方类别编码 */ - private String rxTypeCode; - - /** 处方类别名称 */ - private String rxTypeName; - - /** 长期处方标志,0-否、1-是 */ - private String longRxFlag; - - /** 业务类型代码 */ - private String bizTypeCode; - - /** 业务类型名称 */ - private String bizTypeName; - - /** 处方附加属性代码 */ - private String rxExraAttrCode; - - /** 处方附加属性名称 */ - private String rxExraAttrName; - - /** 处方循环限制标志 */ - private String rxCircLimitFlag; -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionInput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionInput.java deleted file mode 100755 index d3e75ad37..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerPrescriptionInput.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方信息查询-输入】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_quer_prescription_input") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepQuerPrescriptionInput extends HisBaseEntity { - - /** 定点医疗机构编号 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 医保处方编号 */ - private String hiRxno; - - /** 医保就诊 ID */ - private String mdtrtId; - - /** 人员名称 */ - private String psnName; - - /** 人员证件类型 */ - private String psnCertType; - - /** 证件号码 */ - private String certno; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerVisitInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerVisitInfo.java deleted file mode 100755 index d9ffe1667..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepQuerVisitInfo.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; - -/** - * 【电子处方信息查询-输出-就诊信息(节点标识:rxOtpinfo) 】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_quer_visit_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepQuerVisitInfo extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医疗类别(参考医疗类别med_type) */ - private String medType; - - /** 门诊/住院号 */ - private String iptOtpNo; - - /** 门诊住院标志(1-门诊,2-住院) */ - private String otpIptFlag; - - /** 患者姓名 */ - private String patnName; - - /** 年龄 */ - private BigDecimal patnAge; - - /** 患者身高(cm) */ - private BigDecimal patnHgt; - - /** 患者体重(kg) */ - private BigDecimal patnWt; - - /** 性别 */ - private String gend; - - /** 妊娠(孕周) */ - private Integer gesoVal; - - /** 新生儿标志(0-否、1-是) */ - private String nwbFlag; - - /** 新生儿日、月龄 */ - private String nwbAge; - - /** 哺乳期标志(0-否、1-是) */ - private Integer suckPrdFlag; - - /** 过敏史 */ - private String algsHis; - - /** 险种类型 */ - private String insutype; - - /** 开方科室名称 */ - private String prscDeptName; - - /** 开方医师姓名 */ - private String prscDrName; - - /** 药师姓名 */ - private String pharName; - - /** 医疗机构药师审方时间(yyyy-MM-dd HH:mm:ss) */ - private String pharChkTime; - - /** 就诊时间(yyyy-MM-dd HH:mm:ss) */ - private String mdtrtTime; - - /** 病种编码(按病种结算病种目录代码/门诊慢特病种目录代码) */ - private String diseCodg; - - /** 病种名称 */ - private String diseName; - - /** 是否特殊病种 */ - private String spDiseFlag; - - /** 主诊断代码 */ - private String maindiagCode; - - /** 主诊断名称 */ - private String maindiagName; - - /** 疾病病情描述 */ - private String diseCondDscr; - - /** 是否初诊(0-否、1-是) */ - private String fstdiagFlag; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepRevokeInput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepRevokeInput.java deleted file mode 100755 index b4dae4a68..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepRevokeInput.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -/** - * 【电子处方撤销-输入】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_revoke_input") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepRevokeInput extends HisBaseEntity { - - /** 医保处方编号 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医保处方编号 */ - private String hiRxno; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 撤销医师的医保医师代码 */ - private String drCode; - - /** 撤销医师姓名 */ - private String undoDrName; - - /** 撤销医师证件类型 */ - private String undoDrCertType; - - /** 撤销医师证件号码 */ - private String undoDrCertno; - - /** 撤销原因描述 */ - private String undoRea; - - /** 撤销时间,格式:yyyy-MM-dd HH:mm:ss */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date undoTime; -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepRevokeOutput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepRevokeOutput.java deleted file mode 100755 index 351240464..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepRevokeOutput.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方撤销-输出】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_revoke_output") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepRevokeOutput extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医保处方编号 */ - - private String hiRxno; - - /** 医保处方状态编码 */ - private String rxStasCodg; - - /** 医保处方状态名称 */ - private String rxStasName; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepSignatureInput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepSignatureInput.java deleted file mode 100755 index 12f150d0f..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepSignatureInput.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方医保电子签名 -输入】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_signature_input") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepSignatureInput extends HisBaseEntity { - - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 定点机构代码,定点机构唯一标识,用于识别机构对应的医保数字证书 */ - private String fixmedinsCode; - - /** 原始待签名处方信息,JSONString序列化后的base64字符值 */ - private String originalValue; - - /** 原始待签名处方文件,文件base64的字符值 */ - private String originalRxFile; - - /** 扩展字段,JSON序列化成字符串后长度不能超过4000 */ - private String extras; - - /** 医保处方编号 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; - - /** 院内内部处方号 */ - private String prescriptionNo; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepSignatureOutput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepSignatureOutput.java deleted file mode 100755 index 515b15f03..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepSignatureOutput.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方医保电子签名 -输出】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_signature_output") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepSignatureOutput extends HisBaseEntity { - - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 处方文件,医保电子签名后处方文件originalRxFile的base64值 */ - private String rxFile; - - /** 签名摘要值,医保电子签名后处方信息originalValue的签名结果值 */ - private String signDigest; - - /** 签名机构证书SN */ - private String signCertSn; - - /** 签名机构证书DN */ - private String signCertDn; - - /** 医保处方编号 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepUploadInput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepUploadInput.java deleted file mode 100755 index 5c90aba8d..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepUploadInput.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方上传-输入】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_upload_input") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepUploadInput extends HisBaseEntity { - - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 处方追溯码 */ - private String rxTraceCode; - - /** 医保处方编号 */ - private String hiRxno; - - /** 医院就诊 ID */ - private String mdtrtId; - - /** 患者姓名 */ - private String patnName; - - /** 人员证件类型 */ - private String psnCertType; - - /** 证件号码 */ - private String certno; - - /** 定点医疗机构名称 */ - private String fixmedinsName; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 开方医保医师代码 */ - private String drCode; - - /** 开方医师姓名 */ - private String prscDrName; - - /** 审方药师科室名称 */ - private String pharDeptName; - - /** 审方药师科室编号 */ - private String pharDeptCode; - - /** 审方药师职称编码 */ - private String pharProfttlCodg; - - /** 审方药师职称名称 */ - private String pharProfttlName; - - /** 审方医保药师代码 */ - private String pharCode; - - /** 审方药师证件类型 */ - private String pharCertType; - - /** 审方药师证件号码 */ - private String pharCertno; - - /** 审方药师姓名 */ - private String pharName; - - /** 审方药师执业资格证号 */ - private String pharPracCertNo; - - /** 医疗机构药师审方时间,格式:yyyy-MM-dd HH:mm:ss */ - private String pharChkTime; - - /** 处方原件,医保电子签名后的处方文件base64字符(PDF或OFD格式) */ - private String rxFile; - - /** 处方信息签名值 */ - private String signDigest; - - /** 扩展字段,JSON格式,长度不超过4000 */ - private String extras; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepUploadOutput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepUploadOutput.java deleted file mode 100755 index a4911fac3..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepUploadOutput.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方上传-输出】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_upload_output") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepUploadOutput extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 医保处方编号 */ - private String hiRxno; - - /** 医保处方状态编码 */ - private String rxStasCodg; - - /** 医保处方状态名称 */ - private String rxStasName; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriDiagnosisInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriDiagnosisInfo.java deleted file mode 100755 index 6a9a2839c..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriDiagnosisInfo.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -/** - * 【电子处方上传预核验-输入-诊断信息(节点表示:diseinfo)】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_veri_diagnosis_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepVeriDiagnosisInfo extends HisBaseEntity { - - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 诊断类别,参考诊断类别(diag_type) */ - private String diagType; - - /** 主诊断标志,0-否、1-是 */ - private String maindiagFlag; - - /** 诊断排序号 */ - private String diagSrtNo; - - /** 诊断代码,医保疾病诊断代码 */ - private String diagCode; - - /** 诊断名称 */ - private String diagName; - - /** 诊断科室名称 */ - private String diagDept; - - /** 诊断科室代码,与科室信息上传中的hosp_dept_codg医院科室编码保持一致 */ - private String diagDeptCode; - - /** 诊断医生编码,国家医保医师代码 */ - private String diagDrNo; - - /** 诊断医生姓名 */ - private String diagDrName; - - /** 诊断时间,格式:yyyy-MM-dd HH:mm:ss */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date diagTime; - - /** 中医病名代码,diag_type为中医诊断(值为2,3)时上传 */ - private String tcmDiseCode; - - /** 中医病名,diag_type为中医诊断(值为2,3)时上传 */ - private String tcmDiseName; - - /** 中医证候代码,diag_type为中医诊断(值为2,3)时上传 */ - private String tcmsympCode; - - /** 中医证候,diag_type为中医诊断(值为2,3)时上传 */ - private String tcmsymp; - - /** 院内内部处方号 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String prescriptionNo; - - /** 医保处方编号(电子处方信息查询返回时插入记录) */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionDetail.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionDetail.java deleted file mode 100755 index c2942fd1a..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionDetail.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -/** - * 【电子处方上传预核验-输入-处方明细信息(节点标识 rxdrugdetail) 】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_veri_prescription_detail") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepVeriPrescriptionDetail extends HisBaseEntity { - - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - /** 医疗目录编码(医保药品编码) */ - private String medListCodg; - - /** 定点医药机构目录编号(院内药品编码) */ - private String fixmedinsHilistId; - - /** 医疗机构制剂标志(0-否、1-是) */ - private String hospPrepFlag; - - /** 处方项目分类代码(11:西药,12:中成药,13:中药饮片) */ - private String rxItemTypeCode; - - /** 处方项目分类名称 */ - private String rxItemTypeName; - - /** 中药类别代码(中药饮片固定传3) */ - private String tcmdrugTypeCode; - - /** 中药类别名称 */ - private String tcmdrugTypeName; - - /** 草药脚注 */ - private String tcmherbFoote; - - /** 药物类型代码(参考medn_type_code) */ - private String mednTypeCode; - - /** 药物类型名称 */ - private String mednTypeName; - - /** 主要用药标志(0-否、1-是) */ - private String mainMedcFlag; - - /** 加急标志(0-否、1-是) */ - private String urgtFlag; - - /** 基本药物标志(0-否、1-是) */ - private String basMednFlag; - - /** 是否进口药品(0-否、1-是) */ - private String impDrugFlag; - - /** 是否OTC药品(0-处方药品、1-OTC药品) */ - private String otcFlag; - - /** 药品通用名 */ - private String drugGenname; - - /** 药品剂型 */ - private String drugDosform; - - /** 药品规格 */ - private String drugSpec; - - /** 药品商品名(非必填) */ - private String drugProdname; - - /** 生产厂家(非必填) */ - private String prdrName; - - /** 用药途径代码(西药/中成药必填) */ - private String medcWayCodg; - - /** 用药途径描述(西药/中成药必填) */ - private String medcWayDscr; - - /** 用药开始时间(yyyy-MM-dd HH:mm:ss) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date medcBegntime; - - /** 用药结束时间(yyyy-MM-dd HH:mm:ss) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date medcEndtime; - - /** 用药天数 */ - private String medcDays; - - /** 单次剂量单位(西药/中成药必填) */ - private String sinDosunt; - - /** 单次用量(西药/中成药必填) */ - private String sinDoscnt; - - /** 使用频次编码(西药/中成药必填) */ - private String usedFrquCodg; - - /** 使用频次名称(西药/中成药必填) */ - private String usedFrquName; - - /** 药品总用药量单位(发药计价单位) */ - private String drugDosunt; - - /** 药品总用药量(医保结算数量) */ - private String drugCnt; - - /** 药品单价(按drug_dosunt计价) */ - private String drugPric; - - /** 药品总金额(drug_cnt×drug_pric) */ - private String drugSumamt; - - /** 医院审批标志(1-纳入报销,2-自费) */ - private String hospApprFlag; - - /** 自费原因类型(hosp_appr_flag=2时必填) */ - private String selfPayRea; - - /** 自费原因描述(自费原因类型为6时必填) */ - private String realDscr; - - /** 扩展数据(地方业务扩展信息) */ - private String extras; - - /** 院内内部处方号 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String prescriptionNo; - - /** 医保处方编号(电子处方信息查询返回时插入记录) */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionInfo.java deleted file mode 100755 index 78b223a1d..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionInfo.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -/** - * 【电子处方上传预核验-输入-处方信息】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_veri_prescription_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepVeriPrescriptionInfo extends HisBaseEntity { - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 就诊凭证类型(01-电子凭证令牌、02-身份证号、03-社会保障卡号) */ - private String mdtrtCertType; - - /** 就诊凭证编号 */ - private String mdtrtCertNo; - - /** 卡识别码(就诊凭证类型为"03"时必填) */ - private String cardSn; - - /** 业务类型代码(01-定点医疗机构就诊,02-互联网医院问诊) */ - private String bizTypeCode; - - /** 处方附加属性代码(01-双通道处方,02-门诊统筹处方,99-其他) */ - private String rxExraAttrCode; - - /** 电子凭证令牌(使用医保电子凭证就诊时必填) */ - private String ecToken; - - /** 电子凭证线上身份核验流水号(线上场景互联网医院问诊时使用) */ - private String authNo; - - /** 参保地编号 */ - private String insuPlcNo; - - /** 就医地编号 */ - private String mdtrtareaNo; - - /** 定点医疗机构处方编号(院内内部处方号) */ - private String hospRxno; - - /** 续方的原处方编号 */ - private String initRxno; - - /** 处方类别代码(参考rx_type_code) */ - private String rxTypeCode; - - /** 开方时间(yyyy-MM-dd HH:mm:ss) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date prscTime; - - /** 药品类目数(剂数) */ - private String rxDrugCnt; - - /** 处方整剂用法编号 */ - private String rxUsedWayCodg; - - /** 处方整剂用法名称 */ - private String rxUsedWayName; - - /** 处方整剂频次编号(参考used_frequ) */ - private String rxFrquCodg; - - /** 处方整剂频次名称 */ - private String rxFrquName; - - /** 处方整剂剂量单位 */ - private String rxDosunt; - - /** 处方整剂单次剂量数 */ - private String rxDoscnt; - - /** 处方整剂医嘱说明 */ - private String rxDrordDscr; - - /** 处方有效天数 */ - private String valiDays; - - /** 有效截止时间(开方时间+处方有效天数) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date valiEndTime; - - /** 复用(多次)使用标志(0-否、1-是) */ - private String reptFlag; - - /** 最大使用次数(预留字段) */ - private String maxReptCnt; - - /** 使用最小间隔(天数)(预留字段) */ - private String minInvDays; - - /** 续方标志(0-否、1-是) */ - private String rxCotnFlag; - - /** 长期处方标志(0-否、1-是) */ - private String longRxFlag; - - /** 医保处方编号(电子处方信息查询返回时插入记录) */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionOutput.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionOutput.java deleted file mode 100755 index aca84dff8..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriPrescriptionOutput.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * 【电子处方上传预核验-输出】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_veri_prescription_output") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepVeriPrescriptionOutput extends HisBaseEntity { - - /** 自增主键 */ - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 处方追溯码 */ - private String rxTraceCode; - - /** 医保处方编号 */ - private String hiRxno; - - /** 药品请求的处方号 */ - private String prescriptionNo; -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriVisitInfo.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriVisitInfo.java deleted file mode 100755 index 2581bb855..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/ElepVeriVisitInfo.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.core.common.core.domain.HisBaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -/** - * 【电子处方上传预核验-输入-就诊信息(节点标识:mdtrtinfo) 】Entity实体 - * - * @author system - * @date 2025-04-17 - */ -@Data -@TableName("yb_elep_veri_visit_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class ElepVeriVisitInfo extends HisBaseEntity { - /** 自增主键 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - @TableId(type = IdType.ASSIGN_ID) - private Long id; - - /** 定点医疗机构名称 */ - private String fixmedinsName; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 医保就诊ID(医保门诊挂号时返回) */ - private String mdtrtId; - - /** 医疗类别(参考med_type) */ - private String medType; - - /** 门诊/住院号 */ - private String iptOtpNo; - - /** 门诊住院标识(1-门诊、2-住院) */ - private String otpIptFlag; - - /** 医保人员编号 */ - private String psnNo; - - /** 患者姓名 */ - private String patnName; - - /** 人员证件类型(参考psn_cert_type) */ - private String psnCertType; - - /** 证件号码 */ - private String certno; - - /** 年龄 */ - private String patnAge; - - /** 患者身高(cm) */ - private String patnHgt; - - /** 患者体重(kg) */ - private String patnWt; - - /** 性别(参考gend) */ - private String gend; - - /** 计划生育手术类别 */ - private String birctrlType; - - /** 计划生育手术或生育日期(yyyy-MM-dd) */ - private String birctrlMatnDate; - - /** 生育类别 */ - private String matnType; - - /** 妊娠(孕周) */ - private String gesoVal; - - /** 新生儿标志(0-否、1-是) */ - private String nwbFlag; - - /** 新生儿日、月龄 */ - private String nwbAge; - - /** 哺乳期标志(0-否、1-是) */ - private String suckPrdFlag; - - /** 过敏史 */ - private String algsHis; - - /** 开方科室名称 */ - private String prscDeptName; - - /** 开方科室编号(与医药机构服务的科室管理保持一致) */ - private String prscDeptCode; - - /** 开方医保医师代码(国家医保医师代码) */ - private String drCode; - - /** 开方医师姓名 */ - private String prscDrName; - - /** 开方医师证件类型(参考psn_cert_type) */ - private String prscDrCertType; - - /** 开方医师证件号码 */ - private String prscDrCertno; - - /** 医生职称编码(参考drord_dr_proftt1) */ - private String drProfttlCodg; - - /** 医生职称名称 */ - private String drProfttlName; - - /** 医生科室编码(与医院科室编码字段保持一致) */ - private String drDeptCode; - - /** 医生科室名称 */ - private String drDeptName; - - /** 科别(参考科室代码dept) */ - private String caty; - - /** 就诊时间(yyyy-MM-dd HH:mm:ss) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date mdtrtTime; - - /** 病种编码 */ - private String diseCodg; - - /** 病种名称 */ - private String diseName; - - /** 特殊病种标志(0-否、1-是) */ - private String spDiseFlag; - - /** 主诊断代码(医保疾病诊断代码) */ - private String maindiagCode; - - /** 主诊断名称 */ - private String maindiagName; - - /** 疾病病情描述 */ - private String diseCondDscr; - - /** 医保费用结算类型(参考hi_feeset1_type) */ - private String hiFeesetlType; - - /** 医保费用类别名称 */ - private String hiFeesetlName; - - /** 挂号费 */ - private String rgstFee; - - /** 医疗费总额 */ - private String medfeeSumamt; - - /** 是否初诊(0-否、1-是) */ - private String fstdiagFlag; - - /** 扩展数据(地方业务扩展信息) */ - private String extras; - - /** 院内内部处方号 */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String prescriptionNo; - - /** 医保处方编号(电子处方信息查询返回时插入记录) */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/InformationInquiry.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/InformationInquiry.java deleted file mode 100755 index 3a603972d..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/InformationInquiry.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.List; - -@Data -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class InformationInquiry { - - // 处方信息 - private ElepQuerPrescriptionInfo prescriptionInfo; - - // 处方明细信息 - private List rxDetlList; - - // 就诊信息 - private List rxOtpinfo; - - // 诊断信息 - private List rxDiseList; - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/MedicationResultInquiry.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/MedicationResultInquiry.java deleted file mode 100755 index e3eb62e1d..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/MedicationResultInquiry.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * 电子处方取药结果查询 - */ -@Data -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class MedicationResultInquiry { - - /** 医保处方编号 */ - private String hiRxno; - - /** 医保结算时间(yyyy-MM-dd HH:mm:ss) */ - private String setlTime; - - /** 医保处方状态编码(参考rx_stas_codg) */ - private String rxStasCodg; - - /** 医保处方状态名称 */ - private String rxStasName; - - /** 处方使用状态编号(参考rx_used_stas_codg) */ - private String rxUsedStasCodg; - - /** 处方使用状态名称 */ - private String rxUsedStasName; - - // 输出明细信息 - private List seltdelts; - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/PreCheckPrescription.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/PreCheckPrescription.java deleted file mode 100755 index 1a4d4cb66..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/PreCheckPrescription.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; -import java.util.List; - - -/** - * 电子处方上传预核验 - */ -@Data -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class PreCheckPrescription { - - // 处方信息 - - /** 就诊凭证类型(01-电子凭证令牌、02-身份证号、03-社会保障卡号) */ - private String mdtrtCertType; - - /** 就诊凭证编号 */ - private String mdtrtCertNo; - - /** 卡识别码(就诊凭证类型为"03"时必填) */ - private String cardSn; - - /** 业务类型代码(01-定点医疗机构就诊,02-互联网医院问诊) */ - private String bizTypeCode; - - /** 处方附加属性代码(01-双通道处方,02-门诊统筹处方,99-其他) */ - private String rxExraAttrCode; - - /** 电子凭证令牌(使用医保电子凭证就诊时必填) */ - private String ecToken; - - /** 电子凭证线上身份核验流水号(线上场景互联网医院问诊时使用) */ - private String authNo; - - /** 参保地编号 */ - private String insuPlcNo; - - /** 就医地编号 */ - private String mdtrtareaNo; - - /** 定点医疗机构处方编号(院内内部处方号) */ - private String hospRxno; - - /** 续方的原处方编号 */ - private String initRxno; - - /** 处方类别代码(参考rx_type_code) */ - private String rxTypeCode; - - /** 开方时间(yyyy-MM-dd HH:mm:ss) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date prscTime; - - /** 药品类目数(剂数) */ - private String rxDrugCnt; - - /** 处方整剂用法编号 */ - private String rxUsedWayCodg; - - /** 处方整剂用法名称 */ - private String rxUsedWayName; - - /** 处方整剂频次编号(参考used_frequ) */ - private String rxFrquCodg; - - /** 处方整剂频次名称 */ - /** 处方整剂频次名称 */ - private String rxFrquName; - - /** 处方整剂剂量单位 */ - private String rxDosunt; - - /** 处方整剂单次剂量数 */ - private String rxDoscnt; - - /** 处方整剂医嘱说明 */ - private String rxDrordDscr; - - /** 处方有效天数 */ - private String valiDays; - - /** 有效截止时间(开方时间+处方有效天数) */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date valiEndTime; - - /** 复用(多次)使用标志(0-否、1-是) */ - private String reptFlag; - - /** 最大使用次数(预留字段) */ - private String maxReptCnt; - - /** 使用最小间隔(天数)(预留字段) */ - private String minInvDays; - - /** 续方标志(0-否、1-是) */ - private String rxCotnFlag; - - /** 长期处方标志(0-否、1-是) */ - private String longRxFlag; - - /** 医保处方编号(电子处方信息查询返回时插入记录) */ - @JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY) - private String hiRxno; - - // 处方明细信息 - private List rxdrugdetail; - - // 就诊信息 - private ElepVeriVisitInfo mdtrtinfo; - - // 诊断信息 - private ElepVeriDiagnosisInfo diseinfo; - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/QueryPrescription.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/QueryPrescription.java deleted file mode 100755 index 087ec13ad..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/domain/QueryPrescription.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.healthlink.his.ybelep.domain; - -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; -import java.util.List; - - -/** - * 电子处方上传预核验 - */ -@Data -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -public class QueryPrescription { - - /** 医保处方编号 */ - private String hiRxno; - - /** 定点医疗机构编号 */ - private String fixmedinsCode; - - /** 定点医疗机构名称 */ - private String fixmedinsName; - - /** 医保处方状态编码 */ - private String rxStasCodg; - - /** 医保处方状态名称 */ - private String rxStasName; - - /** 医保处方使用状态编码 */ - private String rxUsedStasCodg; - - /** 医保处方使用状态名称 */ - private String rxUsedStasName; - - /** 开方时间 */ - private String prscTime; - - /** 药品总用量(剂数) */ - private BigDecimal rxDrugCnt; - - /** 处方整剂用法编码 */ - private String rxUsedWayCodg; - - /** 处方整剂用法名称 */ - private String rxUsedWayName; - - /** 处方整剂频次编号 */ - private String rxFrquCodg; - - /** 处方整剂频次名称 */ - private String rxFrquName; - - /** 处方整剂剂量单位 */ - private String rxDosunt; - - /** 处方整剂单次剂量数 */ - private BigDecimal rxDoscnt; - - /** 处方整剂医嘱说明 */ - private String rxDrordDscr; - - /** 处方有效天数 */ - private BigDecimal valiDays; - - /** 有效截止时间 */ - private String valiEndTime; - - /** 复用(多次)使用标志,0-否、1-是 */ - private String reptFlag; - - /** 最大复用次数 */ - private BigDecimal maxReptCnt; - - /** 已复用次数 */ - private BigDecimal reptdCnt; - - /** 使用最小间隔(天数) */ - private BigDecimal minInrvDays; - - /** 处方类别编码 */ - private String rxTypeCode; - - /** 处方类别名称 */ - private String rxTypeName; - - /** 长期处方标志,0-否、1-是 */ - private String longRxFlag; - - /** 业务类型代码 */ - private String bizTypeCode; - - /** 业务类型名称 */ - private String bizTypeName; - - /** 处方附加属性代码 */ - private String rxExraAttrCode; - - /** 处方附加属性名称 */ - private String rxExraAttrName; - - /** 处方循环限制标志 */ - private String rxCircLimitFlag; - - // 处方明细信息 - private List rxDetlList; - - // 就诊信息 - private ElepQuerVisitInfo rxOtpinfo; - - // 诊断信息 - private List rxDiseList; - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultDetailMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultDetailMapper.java deleted file mode 100755 index 7fd3e45cb..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultDetailMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepMedresultDetail; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方取药结果查询-输出(节点标识:seltdelts)】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepMedresultDetailMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultInfoMapper.java deleted file mode 100755 index 2e2757e8a..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepMedresultInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方取药结果查询-输出】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepMedresultInfoMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultInputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultInputMapper.java deleted file mode 100755 index 99ce66d27..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepMedresultInputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepMedresultInput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方取药结果查询-输入】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepMedresultInputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerDiagnosisInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerDiagnosisInfoMapper.java deleted file mode 100755 index 2c4ad130e..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerDiagnosisInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepQuerDiagnosisInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方信息查询-输出-诊断信息(节点表示: rxDiseList) 】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepQuerDiagnosisInfoMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionDetailMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionDetailMapper.java deleted file mode 100755 index 5de8137eb..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionDetailMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepQuerPrescriptionDetail; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方信息查询-输出-处方明细信息(节点标识:rxDetlList) 】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepQuerPrescriptionDetailMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionInfoMapper.java deleted file mode 100755 index 862fbeb64..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepQuerPrescriptionInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方信息查询-输出-处方信息 】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepQuerPrescriptionInfoMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionInputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionInputMapper.java deleted file mode 100755 index e5fb25b4c..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerPrescriptionInputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepQuerPrescriptionInput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方信息查询-输入】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepQuerPrescriptionInputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerVisitInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerVisitInfoMapper.java deleted file mode 100755 index b4d73f20a..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepQuerVisitInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepQuerVisitInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方信息查询-输出-就诊信息(节点标识:rxOtpinfo) 】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepQuerVisitInfoMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepRevokeInputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepRevokeInputMapper.java deleted file mode 100755 index ddd0519b8..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepRevokeInputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepRevokeInput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方撤销-输入】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepRevokeInputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepRevokeOutputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepRevokeOutputMapper.java deleted file mode 100755 index 47ca393d6..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepRevokeOutputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepRevokeOutput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方撤销-输出】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepRevokeOutputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepSignatureInputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepSignatureInputMapper.java deleted file mode 100755 index 41a3a7e25..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepSignatureInputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepSignatureInput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方医保电子签名 -输入】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepSignatureInputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepSignatureOutputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepSignatureOutputMapper.java deleted file mode 100755 index 9ea4ae102..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepSignatureOutputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepSignatureOutput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方医保电子签名 -输出】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepSignatureOutputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepUploadInputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepUploadInputMapper.java deleted file mode 100755 index 64d631a68..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepUploadInputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepUploadInput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传-输入】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepUploadInputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepUploadOutputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepUploadOutputMapper.java deleted file mode 100755 index 81adc6e0b..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepUploadOutputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepUploadOutput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传-输出】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepUploadOutputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriDiagnosisInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriDiagnosisInfoMapper.java deleted file mode 100755 index ef7627a61..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriDiagnosisInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepVeriDiagnosisInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传预核验-输入-诊断信息(节点表示:diseinfo)】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepVeriDiagnosisInfoMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionDetailMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionDetailMapper.java deleted file mode 100755 index a0dda0ac6..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionDetailMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepVeriPrescriptionDetail; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传预核验-输入-处方明细信息(节点标识 rxdrugdetail) 】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepVeriPrescriptionDetailMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionInfoMapper.java deleted file mode 100755 index 01489e8b2..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepVeriPrescriptionInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传预核验-输入-处方信息】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepVeriPrescriptionInfoMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionOutputMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionOutputMapper.java deleted file mode 100755 index 281fdbed7..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriPrescriptionOutputMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepVeriPrescriptionOutput; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传预核验-输出】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepVeriPrescriptionOutputMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriVisitInfoMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriVisitInfoMapper.java deleted file mode 100755 index 54effd49b..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/mapper/ElepVeriVisitInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.healthlink.his.ybelep.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.ybelep.domain.ElepVeriVisitInfo; -import org.springframework.stereotype.Repository; - -/** - * 【电子处方上传预核验-输入-就诊信息(节点标识:mdtrtinfo) 】Mapper接口 - * - * @author system - * @date 2025-04-17 - */ -@Repository -public interface ElepVeriVisitInfoMapper extends BaseMapper { - -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultDetailServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultDetailServiceImpl.java deleted file mode 100755 index 176ca605e..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultDetailServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepMedresultDetail; -import com.healthlink.his.ybelep.mapper.ElepMedresultDetailMapper; -import com.healthlink.his.ybelep.service.IElepMedresultDetailService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方取药结果查询-输出(节点标识:seltdelts)】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepMedresultDetailServiceImpl extends ServiceImpl implements IElepMedresultDetailService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultInfoServiceImpl.java deleted file mode 100755 index c479e1de1..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepMedresultInfo; -import com.healthlink.his.ybelep.mapper.ElepMedresultInfoMapper; -import com.healthlink.his.ybelep.service.IElepMedresultInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方取药结果查询-输出】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepMedresultInfoServiceImpl extends ServiceImpl implements IElepMedresultInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultInputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultInputServiceImpl.java deleted file mode 100755 index 5868bfc38..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepMedresultInputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepMedresultInput; -import com.healthlink.his.ybelep.mapper.ElepMedresultInputMapper; -import com.healthlink.his.ybelep.service.IElepMedresultInputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方取药结果查询-输入】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepMedresultInputServiceImpl extends ServiceImpl implements IElepMedresultInputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerDiagnosisInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerDiagnosisInfoServiceImpl.java deleted file mode 100755 index 1a59fedea..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerDiagnosisInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepQuerDiagnosisInfo; -import com.healthlink.his.ybelep.mapper.ElepQuerDiagnosisInfoMapper; -import com.healthlink.his.ybelep.service.IElepQuerDiagnosisInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方信息查询-输出-诊断信息(节点表示: rxDiseList) 】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepQuerDiagnosisInfoServiceImpl extends ServiceImpl implements IElepQuerDiagnosisInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionDetailServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionDetailServiceImpl.java deleted file mode 100755 index 584335224..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionDetailServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepQuerPrescriptionDetail; -import com.healthlink.his.ybelep.mapper.ElepQuerPrescriptionDetailMapper; -import com.healthlink.his.ybelep.service.IElepQuerPrescriptionDetailService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方信息查询-输出-处方明细信息(节点标识:rxDetlList) 】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepQuerPrescriptionDetailServiceImpl extends ServiceImpl implements IElepQuerPrescriptionDetailService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionInfoServiceImpl.java deleted file mode 100755 index fe114de0c..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepQuerPrescriptionInfo; -import com.healthlink.his.ybelep.mapper.ElepQuerPrescriptionInfoMapper; -import com.healthlink.his.ybelep.service.IElepQuerPrescriptionInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方信息查询-输出-处方信息 】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepQuerPrescriptionInfoServiceImpl extends ServiceImpl implements IElepQuerPrescriptionInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionInputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionInputServiceImpl.java deleted file mode 100755 index 172fcb65a..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerPrescriptionInputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepQuerPrescriptionInput; -import com.healthlink.his.ybelep.mapper.ElepQuerPrescriptionInputMapper; -import com.healthlink.his.ybelep.service.IElepQuerPrescriptionInputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方信息查询-输入】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepQuerPrescriptionInputServiceImpl extends ServiceImpl implements IElepQuerPrescriptionInputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerVisitInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerVisitInfoServiceImpl.java deleted file mode 100755 index 254ff095b..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepQuerVisitInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepQuerVisitInfo; -import com.healthlink.his.ybelep.mapper.ElepQuerVisitInfoMapper; -import com.healthlink.his.ybelep.service.IElepQuerVisitInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方信息查询-输出-就诊信息(节点标识:rxOtpinfo) 】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepQuerVisitInfoServiceImpl extends ServiceImpl implements IElepQuerVisitInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepRevokeInputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepRevokeInputServiceImpl.java deleted file mode 100755 index 5c9522847..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepRevokeInputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepRevokeInput; -import com.healthlink.his.ybelep.mapper.ElepRevokeInputMapper; -import com.healthlink.his.ybelep.service.IElepRevokeInputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方撤销-输入】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepRevokeInputServiceImpl extends ServiceImpl implements IElepRevokeInputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepRevokeOutputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepRevokeOutputServiceImpl.java deleted file mode 100755 index 4e286182b..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepRevokeOutputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepRevokeOutput; -import com.healthlink.his.ybelep.mapper.ElepRevokeOutputMapper; -import com.healthlink.his.ybelep.service.IElepRevokeOutputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方撤销-输出】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepRevokeOutputServiceImpl extends ServiceImpl implements IElepRevokeOutputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepSignatureInputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepSignatureInputServiceImpl.java deleted file mode 100755 index a9ef4e1a2..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepSignatureInputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepSignatureInput; -import com.healthlink.his.ybelep.mapper.ElepSignatureInputMapper; -import com.healthlink.his.ybelep.service.IElepSignatureInputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方医保电子签名 -输入】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepSignatureInputServiceImpl extends ServiceImpl implements IElepSignatureInputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepSignatureOutputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepSignatureOutputServiceImpl.java deleted file mode 100755 index ed23e13cf..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepSignatureOutputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepSignatureOutput; -import com.healthlink.his.ybelep.mapper.ElepSignatureOutputMapper; -import com.healthlink.his.ybelep.service.IElepSignatureOutputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方医保电子签名 -输出】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepSignatureOutputServiceImpl extends ServiceImpl implements IElepSignatureOutputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepUploadInputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepUploadInputServiceImpl.java deleted file mode 100755 index 0b259405c..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepUploadInputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepUploadInput; -import com.healthlink.his.ybelep.mapper.ElepUploadInputMapper; -import com.healthlink.his.ybelep.service.IElepUploadInputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传-输入】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepUploadInputServiceImpl extends ServiceImpl implements IElepUploadInputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepUploadOutputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepUploadOutputServiceImpl.java deleted file mode 100755 index 009849f5c..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepUploadOutputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepUploadOutput; -import com.healthlink.his.ybelep.mapper.ElepUploadOutputMapper; -import com.healthlink.his.ybelep.service.IElepUploadOutputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传-输出】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepUploadOutputServiceImpl extends ServiceImpl implements IElepUploadOutputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriDiagnosisInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriDiagnosisInfoServiceImpl.java deleted file mode 100755 index b91ccd160..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriDiagnosisInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepVeriDiagnosisInfo; -import com.healthlink.his.ybelep.mapper.ElepVeriDiagnosisInfoMapper; -import com.healthlink.his.ybelep.service.IElepVeriDiagnosisInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传预核验-输入-诊断信息(节点表示:diseinfo)】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepVeriDiagnosisInfoServiceImpl extends ServiceImpl implements IElepVeriDiagnosisInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionDetailServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionDetailServiceImpl.java deleted file mode 100755 index 98b867c16..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionDetailServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepVeriPrescriptionDetail; -import com.healthlink.his.ybelep.mapper.ElepVeriPrescriptionDetailMapper; -import com.healthlink.his.ybelep.service.IElepVeriPrescriptionDetailService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传预核验-输入-处方明细信息(节点标识 rxdrugdetail) 】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepVeriPrescriptionDetailServiceImpl extends ServiceImpl implements IElepVeriPrescriptionDetailService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionInfoServiceImpl.java deleted file mode 100755 index 7d8588e24..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepVeriPrescriptionInfo; -import com.healthlink.his.ybelep.mapper.ElepVeriPrescriptionInfoMapper; -import com.healthlink.his.ybelep.service.IElepVeriPrescriptionInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传预核验-输入-处方信息】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepVeriPrescriptionInfoServiceImpl extends ServiceImpl implements IElepVeriPrescriptionInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionOutputServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionOutputServiceImpl.java deleted file mode 100755 index 1bc4c9952..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriPrescriptionOutputServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepVeriPrescriptionOutput; -import com.healthlink.his.ybelep.mapper.ElepVeriPrescriptionOutputMapper; -import com.healthlink.his.ybelep.service.IElepVeriPrescriptionOutputService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传预核验-输出】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepVeriPrescriptionOutputServiceImpl extends ServiceImpl implements IElepVeriPrescriptionOutputService { - -} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriVisitInfoServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriVisitInfoServiceImpl.java deleted file mode 100755 index 5fac1faa8..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/ybelep/service/impl/ElepVeriVisitInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.healthlink.his.ybelep.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.ybelep.domain.ElepVeriVisitInfo; -import com.healthlink.his.ybelep.mapper.ElepVeriVisitInfoMapper; -import com.healthlink.his.ybelep.service.IElepVeriVisitInfoService; -import org.springframework.stereotype.Service; - -/** - * 【电子处方上传预核验-输入-就诊信息(节点标识:mdtrtinfo) 】Service业务层处理 - * - * @author system - * @date 2025-04-17 - */ -@Service -public class ElepVeriVisitInfoServiceImpl extends ServiceImpl implements IElepVeriVisitInfoService { - -} \ No newline at end of file diff --git a/healthlink-his-server/pom.xml b/healthlink-his-server/pom.xml index 338ef0f21..7029e5833 100755 --- a/healthlink-his-server/pom.xml +++ b/healthlink-his-server/pom.xml @@ -1,4 +1,4 @@ - + @@ -345,16 +345,17 @@ - healthlink-his-application - healthlink-his-domain - healthlink-his-common - core-admin - core-framework + core-common core-system + core-framework core-quartz core-generator - core-common core-flowable + core-admin + healthlink-his-common + healthlink-his-domain + healthlink-his-yb + healthlink-his-application pom