采购代码调整,退费代码增加
This commit is contained in:
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
|
||||||
*/
|
|
||||||
package com.core.common.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 定价类型
|
|
||||||
*
|
|
||||||
* @author zxy
|
|
||||||
* @date 2025-02-21
|
|
||||||
*/
|
|
||||||
public enum DefinitionTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 药品
|
|
||||||
*/
|
|
||||||
MEDICATION("1", "药品"),
|
|
||||||
/**
|
|
||||||
* 耗材
|
|
||||||
*/
|
|
||||||
DEVICE("2", "耗材"),
|
|
||||||
/**
|
|
||||||
* 手术
|
|
||||||
*/
|
|
||||||
ACTIVITY("3", "手术");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
DefinitionTypeEnum(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -91,7 +91,8 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
|||||||
public R<?> getEncounterPatientPrescription(Long encounterId) {
|
public R<?> getEncounterPatientPrescription(Long encounterId) {
|
||||||
return R.ok(outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId,
|
return R.ok(outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId,
|
||||||
ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(),
|
ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(),
|
||||||
ChargeItemContext.DEVICE.getValue()));
|
ChargeItemContext.DEVICE.getValue(), ChargeItemStatus.PLANNED.getValue(),
|
||||||
|
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,12 +4,20 @@
|
|||||||
package com.openhis.web.chargemanage.appservice.impl;
|
package com.openhis.web.chargemanage.appservice.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.openhis.web.chargemanage.dto.RefundItemDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.openhis.administration.domain.ChargeItem;
|
||||||
|
import com.openhis.administration.service.IChargeItemService;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.PaymentStatus;
|
import com.openhis.common.enums.PaymentStatus;
|
||||||
|
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||||
import com.openhis.web.chargemanage.appservice.IOutpatientRefundAppService;
|
import com.openhis.web.chargemanage.appservice.IOutpatientRefundAppService;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPaymentDto;
|
import com.openhis.web.chargemanage.dto.EncounterPatientPaymentDto;
|
||||||
import com.openhis.web.chargemanage.mapper.OutpatientRefundAppMapper;
|
import com.openhis.web.chargemanage.mapper.OutpatientRefundAppMapper;
|
||||||
@@ -25,6 +33,10 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OutpatientRefundAppMapper outpatientRefundAppMapper;
|
private OutpatientRefundAppMapper outpatientRefundAppMapper;
|
||||||
|
@Autowired
|
||||||
|
private IPaymentReconciliationService paymentReconciliationService;
|
||||||
|
@Autowired
|
||||||
|
private IChargeItemService chargeItemService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据就诊id查询患者的账单
|
* 根据就诊id查询患者的账单
|
||||||
@@ -49,10 +61,28 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
@Override
|
@Override
|
||||||
public R<?> refundPayment(List<Long> paymentIdList) {
|
public R<?> refundPayment(List<Long> paymentIdList) {
|
||||||
|
|
||||||
|
List<RefundItemDto> refundItemList = outpatientRefundAppMapper.selectRefundItem(paymentIdList, CommonConstants.TableName.MED_MEDICATION_REQUEST,
|
||||||
|
CommonConstants.TableName.WOR_SERVICE_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||||
|
CommonConstants.Common.THREE);
|
||||||
|
|
||||||
// 医生同意退费
|
// 医生同意退费
|
||||||
// 查询所有的chargeid,对应生成一个负的chargeitem
|
// 查询所有的chargeid,对应生成一个负的chargeitem
|
||||||
// 根据每个 chargeitem判断对应的服务,药品,耗材是否已发放执行
|
// 根据每个 chargeitem判断对应的服务,药品,耗材是否已发放执行
|
||||||
// 若已发放/执行需要对应的发药人/执行人审批(药品耗材需要先退药)
|
// 若已发放/执行需要对应的发药人/执行人审批(药品耗材需要先退药)
|
||||||
|
for (Long paymentId : paymentIdList) {
|
||||||
|
// 根据支付id获取对应收费项目的id列表
|
||||||
|
List<Long> chargeItemIdList = paymentReconciliationService.getChargeItemIdListByPayment(paymentId);
|
||||||
|
if (chargeItemIdList == null) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据收费项目id列表获取收费信息
|
||||||
|
List<ChargeItem> chargeItemList = chargeItemService.getChargeItemInfo(chargeItemIdList);
|
||||||
|
|
||||||
|
List<String> prescriptionNoList =
|
||||||
|
chargeItemList.stream().map(ChargeItem::getPrescriptionNo).collect(Collectors.toList());
|
||||||
|
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,4 @@ public class EncounterPatientPaymentDto implements Serializable {
|
|||||||
/** 合同编码 */
|
/** 合同编码 */
|
||||||
private String contractNo;
|
private String contractNo;
|
||||||
|
|
||||||
/** 处方号集合 */
|
|
||||||
private String chargeItemIds;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ public class EncounterPatientPrescriptionDto implements Serializable {
|
|||||||
/** 处方号 */
|
/** 处方号 */
|
||||||
private String prescriptionNo;
|
private String prescriptionNo;
|
||||||
|
|
||||||
|
/** 业务编码 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
/** 开立人ID */
|
/** 开立人ID */
|
||||||
private Long entererId;
|
private Long entererId;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.chargemanage.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款项目 dto
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-03-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class RefundItemDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
@@ -41,8 +41,12 @@ public interface OutpatientChargeAppMapper {
|
|||||||
* @param activity 项目
|
* @param activity 项目
|
||||||
* @param medication 药品
|
* @param medication 药品
|
||||||
* @param device 耗材
|
* @param device 耗材
|
||||||
|
* @param planned 收费状态:待收费
|
||||||
|
* @param billable 收费状态:待结算
|
||||||
|
* @param billed 收费状态:已结算
|
||||||
* @return 患者处方列表
|
* @return 患者处方列表
|
||||||
*/
|
*/
|
||||||
List<EncounterPatientPrescriptionDto> selectEncounterPatientPrescription(@Param("encounterId") Long encounterId,
|
List<EncounterPatientPrescriptionDto> selectEncounterPatientPrescription(@Param("encounterId") Long encounterId,
|
||||||
@Param("activity") Integer activity, @Param("medication") Integer medication, @Param("device") Integer device);
|
@Param("activity") Integer activity, @Param("medication") Integer medication, @Param("device") Integer device,
|
||||||
|
@Param("planned") Integer planned, @Param("billable") Integer billable, @Param("billed") Integer billed);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPaymentDto;
|
import com.openhis.web.chargemanage.dto.EncounterPatientPaymentDto;
|
||||||
|
import com.openhis.web.chargemanage.dto.RefundItemDto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊退费 appMapper
|
* 门诊退费 appMapper
|
||||||
@@ -31,4 +32,19 @@ public interface OutpatientRefundAppMapper {
|
|||||||
List<EncounterPatientPaymentDto> selectEncounterPatientPayment(@Param("encounterId") Long encounterId,
|
List<EncounterPatientPaymentDto> selectEncounterPatientPayment(@Param("encounterId") Long encounterId,
|
||||||
@Param("success") Integer success, @Param("refundAll") Integer refundAll,
|
@Param("success") Integer success, @Param("refundAll") Integer refundAll,
|
||||||
@Param("refundPart") Integer refundPart);
|
@Param("refundPart") Integer refundPart);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退费项目
|
||||||
|
*
|
||||||
|
* @param paymentIdList 支付编号列表
|
||||||
|
* @param medMedicationRequest 药品请求表
|
||||||
|
* @param worServiceRequest 服务请求表
|
||||||
|
* @param worDeviceRequest 耗材请求表
|
||||||
|
* @param three 用于字符截位
|
||||||
|
* @return 退费项目列表
|
||||||
|
*/
|
||||||
|
List<RefundItemDto> selectRefundItem(@Param("paymentIdList") List<Long> paymentIdList,
|
||||||
|
@Param("medMedicationRequest") String medMedicationRequest,
|
||||||
|
@Param("worServiceRequest") String worServiceRequest, @Param("worDeviceRequest") String worDeviceRequest,
|
||||||
|
@Param("three") Integer three);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.datadictionary.controller;
|
package com.openhis.web.datadictionary.controller;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
|
||||||
import org.apache.ibatis.builder.MapperBuilderAssistant;
|
import org.apache.ibatis.builder.MapperBuilderAssistant;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -20,18 +21,18 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
|
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.enums.AssignSeqEnum;
|
|
||||||
import com.core.common.enums.ChargeItemEnum;
|
|
||||||
import com.core.common.enums.DefinitionTypeEnum;
|
|
||||||
import com.core.common.utils.AssignSeqUtil;
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
|
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||||
import com.openhis.administration.service.IChargeItemDefDetailService;
|
import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||||
import com.openhis.common.constant.CommonConstants;
|
import com.openhis.common.constant.CommonConstants;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.ChargeItemEnum;
|
||||||
|
import com.openhis.common.enums.ItemType;
|
||||||
import com.openhis.common.enums.PublicationStatus;
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
||||||
import com.openhis.web.datadictionary.dto.ChargeItemOptionDto;
|
import com.openhis.web.datadictionary.dto.ChargeItemOptionDto;
|
||||||
@@ -71,7 +72,7 @@ public class ItemDefinitionController {
|
|||||||
public R<?> getInitDefinitionOptions(ItemDefSearchParam itemDefSearchParam) {
|
public R<?> getInitDefinitionOptions(ItemDefSearchParam itemDefSearchParam) {
|
||||||
/// TODO: 2025/2/26 收费项目下拉框 暂未做成用枚举代替,后续替换
|
/// TODO: 2025/2/26 收费项目下拉框 暂未做成用枚举代替,后续替换
|
||||||
List<ChargeItemOptionDto> chargeItemOptions = new ArrayList<>();
|
List<ChargeItemOptionDto> chargeItemOptions = new ArrayList<>();
|
||||||
if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
if (ItemType.MEDICINE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||||
// 西药
|
// 西药
|
||||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.WEST_MEDICINE.getCode(),
|
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.WEST_MEDICINE.getCode(),
|
||||||
ChargeItemEnum.WEST_MEDICINE.getInfo()));
|
ChargeItemEnum.WEST_MEDICINE.getInfo()));
|
||||||
@@ -84,14 +85,14 @@ public class ItemDefinitionController {
|
|||||||
// 其他
|
// 其他
|
||||||
chargeItemOptions
|
chargeItemOptions
|
||||||
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||||
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
} else if (ItemType.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||||
// 卫生材料
|
// 卫生材料
|
||||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.SANITARY_MATERIALS_FEE.getCode(),
|
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.SANITARY_MATERIALS_FEE.getCode(),
|
||||||
ChargeItemEnum.SANITARY_MATERIALS_FEE.getInfo()));
|
ChargeItemEnum.SANITARY_MATERIALS_FEE.getInfo()));
|
||||||
// 其他
|
// 其他
|
||||||
chargeItemOptions
|
chargeItemOptions
|
||||||
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||||
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
} else if (ItemType.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||||
// 床位
|
// 床位
|
||||||
chargeItemOptions
|
chargeItemOptions
|
||||||
.add(new ChargeItemOptionDto(ChargeItemEnum.BED_FEE.getCode(), ChargeItemEnum.BED_FEE.getInfo()));
|
.add(new ChargeItemOptionDto(ChargeItemEnum.BED_FEE.getCode(), ChargeItemEnum.BED_FEE.getInfo()));
|
||||||
@@ -155,14 +156,14 @@ public class ItemDefinitionController {
|
|||||||
queryWrapper.eq(ChargeItemDefPageDto::getCategoryCode, chargeItemDefPageDto.getChargeItem());
|
queryWrapper.eq(ChargeItemDefPageDto::getCategoryCode, chargeItemDefPageDto.getChargeItem());
|
||||||
}
|
}
|
||||||
// 通过 DefinitionType 区分药品定价/器具定价/活动定价
|
// 通过 DefinitionType 区分药品定价/器具定价/活动定价
|
||||||
if (DefinitionTypeEnum.MEDICATION.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
if (ItemType.MEDICINE.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||||
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable,
|
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable,
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION);
|
||||||
chargeItemDefinitionPage = chargeItemDefSearchMapper.getMedList(new Page<>(pageNo, pageSize), queryWrapper);
|
chargeItemDefinitionPage = chargeItemDefSearchMapper.getMedList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
} else if (ItemType.DEVICE.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||||
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
||||||
chargeItemDefinitionPage = chargeItemDefSearchMapper.getDevList(new Page<>(pageNo, pageSize), queryWrapper);
|
chargeItemDefinitionPage = chargeItemDefSearchMapper.getDevList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
} else if (ItemType.ACTIVITY.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||||
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||||
chargeItemDefinitionPage = chargeItemDefSearchMapper.getActList(new Page<>(pageNo, pageSize), queryWrapper);
|
chargeItemDefinitionPage = chargeItemDefSearchMapper.getActList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
}
|
}
|
||||||
@@ -204,45 +205,4 @@ public class ItemDefinitionController {
|
|||||||
return R.ok(Arrays.stream(PublicationStatus.values())
|
return R.ok(Arrays.stream(PublicationStatus.values())
|
||||||
.map(status -> new ChargeItemOptionDto(status.getValue(), status.getInfo())).collect(Collectors.toList()));
|
.map(status -> new ChargeItemOptionDto(status.getValue(), status.getInfo())).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 采番测试(例子,非常规代码,请勿调用)
|
|
||||||
*
|
|
||||||
* @return 采番测试结果
|
|
||||||
*/
|
|
||||||
@GetMapping(value = "/test-assign")
|
|
||||||
public R<?> getTestAssign() {
|
|
||||||
// 基础采番
|
|
||||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
|
||||||
// 控制长度采番(seqLength: 总长度)
|
|
||||||
String code1 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(), 8);
|
|
||||||
// 控制长度批量采番
|
|
||||||
List<String> code2 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(), 8, 3);
|
|
||||||
// 获取编号
|
|
||||||
Integer code3 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix());
|
|
||||||
// 批量获取编号
|
|
||||||
List<Integer> code4 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix(), 3);
|
|
||||||
// 每日采番
|
|
||||||
String code5 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix());
|
|
||||||
// 每日按长度采番(seqLength: 日期后的数字位数)
|
|
||||||
String code6 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(), 8);
|
|
||||||
// 每日批量采番
|
|
||||||
List<String> code7 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(), 8, 3);
|
|
||||||
// 每日获取编号
|
|
||||||
Integer code8 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix());
|
|
||||||
// 每日批量获取编号
|
|
||||||
List<Integer> code9 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix(), 3);
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("code", code);
|
|
||||||
map.put("code1", code1);
|
|
||||||
map.put("code2", code2);
|
|
||||||
map.put("code3", code3);
|
|
||||||
map.put("code4", code4);
|
|
||||||
map.put("code5", code5);
|
|
||||||
map.put("code6", code6);
|
|
||||||
map.put("code7", code7);
|
|
||||||
map.put("code8", code8);
|
|
||||||
map.put("code9", code9);
|
|
||||||
return R.ok(map);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,14 +98,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
// 匹配包装单位
|
// 匹配包装单位
|
||||||
List<AdvicePriceDto> advicePrice1 = childCharge.stream()
|
List<AdvicePriceDto> advicePrice1 = childCharge.stream()
|
||||||
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||||
.equals(String.format(CommonConstants.Common.COMMA, finalUnitCode,
|
.equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalUnitCode,
|
||||||
adviceInventoryDto.getLotNumber())))
|
adviceInventoryDto.getLotNumber())))
|
||||||
.peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
.peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
// 匹配最小单位
|
// 匹配最小单位
|
||||||
List<AdvicePriceDto> advicePrice2 = childCharge.stream()
|
List<AdvicePriceDto> advicePrice2 = childCharge.stream()
|
||||||
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||||
.equals(String.format(CommonConstants.Common.COMMA, finalMinUnitCode,
|
.equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalMinUnitCode,
|
||||||
adviceInventoryDto.getLotNumber())))
|
adviceInventoryDto.getLotNumber())))
|
||||||
.peek(e -> e.setUnitCode(finalMinUnitCode)) // 设置 unitCode
|
.peek(e -> e.setUnitCode(finalMinUnitCode)) // 设置 unitCode
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|||||||
@@ -69,4 +69,11 @@ public interface IPurchaseInventoryAppService {
|
|||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
R<?> withdrawApproval(String busNo);
|
R<?> withdrawApproval(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单据页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
R<?> purchaseInventoryInit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
package com.openhis.web.inventorymanage.appservice.impl;
|
package com.openhis.web.inventorymanage.appservice.impl;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@@ -13,20 +16,25 @@ import org.springframework.stereotype.Service;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.common.enums.AssignSeqEnum;
|
||||||
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
|
import com.openhis.administration.domain.Practitioner;
|
||||||
|
import com.openhis.administration.domain.Supplier;
|
||||||
|
import com.openhis.administration.service.IPractitionerService;
|
||||||
|
import com.openhis.administration.service.ISupplierService;
|
||||||
import com.openhis.common.constant.CommonConstants;
|
import com.openhis.common.constant.CommonConstants;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.ItemType;
|
||||||
import com.openhis.common.enums.SupplyCategory;
|
import com.openhis.common.enums.SupplyCategory;
|
||||||
import com.openhis.common.enums.SupplyStatus;
|
import com.openhis.common.enums.SupplyStatus;
|
||||||
import com.openhis.common.enums.SupplyType;
|
import com.openhis.common.enums.SupplyType;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.web.inventorymanage.appservice.IPurchaseInventoryAppService;
|
import com.openhis.web.inventorymanage.appservice.IPurchaseInventoryAppService;
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptDto;
|
import com.openhis.web.inventorymanage.dto.*;
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptPageDto;
|
|
||||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
|
||||||
import com.openhis.web.inventorymanage.mapper.PurchaseInventoryMapper;
|
import com.openhis.web.inventorymanage.mapper.PurchaseInventoryMapper;
|
||||||
import com.openhis.workflow.domain.SupplyRequest;
|
import com.openhis.workflow.domain.SupplyRequest;
|
||||||
import com.openhis.workflow.service.ISupplyRequestService;
|
import com.openhis.workflow.service.ISupplyRequestService;
|
||||||
@@ -46,6 +54,55 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISupplyRequestService supplyRequestService;
|
private ISupplyRequestService supplyRequestService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISupplierService supplierService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPractitionerService practitionerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单据页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> purchaseInventoryInit() {
|
||||||
|
|
||||||
|
InventoryReceiptInitDto initDto = new InventoryReceiptInitDto();
|
||||||
|
// 单据号
|
||||||
|
initDto.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.PURCHASE_NUM.getPrefix(), 12));
|
||||||
|
// 查询供应商列表
|
||||||
|
List<Supplier> supplierList = supplierService.getList();
|
||||||
|
// 查询经手人列表
|
||||||
|
List<Practitioner> practitionerList = practitionerService.getList();
|
||||||
|
// 供应商信息
|
||||||
|
List<InventoryReceiptInitDto.practitionerListOption> practitionerListOptions = practitionerList.stream()
|
||||||
|
.map(practitioner -> new InventoryReceiptInitDto.practitionerListOption(practitioner.getId(),
|
||||||
|
practitioner.getName()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
// 经手人信息
|
||||||
|
List<InventoryReceiptInitDto.supplierListOption> supplierListOptions = supplierList.stream()
|
||||||
|
.map(supplier -> new InventoryReceiptInitDto.supplierListOption(supplier.getId(), supplier.getName()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
// 入库项目类型
|
||||||
|
List<InventoryReceiptInitDto.itemTypeOption> itemTypeOptions = Stream.of(ItemType.values())
|
||||||
|
.map(itemType -> new InventoryReceiptInitDto.itemTypeOption(itemType.getValue(), itemType.getInfo()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
// 审批状态
|
||||||
|
List<InventoryReceiptInitDto.supplyStatusOption> supplyStatusOptions = Stream.of(SupplyStatus.values())
|
||||||
|
.map(supplyStatus -> new InventoryReceiptInitDto.supplyStatusOption(supplyStatus.getValue(),
|
||||||
|
supplyStatus.getInfo()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
initDto.setSupplierListOptions(supplierListOptions).setItemTypeOptions(itemTypeOptions)
|
||||||
|
.setPractitionerListOptions(practitionerListOptions).setSupplyStatusOptions(supplyStatusOptions);
|
||||||
|
|
||||||
|
return R.ok(initDto);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库单据列表
|
* 入库单据列表
|
||||||
*
|
*
|
||||||
@@ -86,6 +143,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getDetail(String busNo) {
|
public R<?> getDetail(String busNo) {
|
||||||
|
List<ReceiptDetailDto> receiptDetailList = purchaseInventoryMapper.selectDetail(busNo);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,13 +160,6 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
|
|||||||
SupplyRequest supplyRequest = new SupplyRequest();
|
SupplyRequest supplyRequest = new SupplyRequest();
|
||||||
BeanUtils.copyProperties(inventoryReceiptDto, supplyRequest);
|
BeanUtils.copyProperties(inventoryReceiptDto, supplyRequest);
|
||||||
|
|
||||||
// // 业务校验
|
|
||||||
// R<?> result = purchaseInventoryService.verifyInventoryReceipt(supplyRequest);
|
|
||||||
// // 校验失败返回提示信息
|
|
||||||
// if (result.getCode() == HttpStatus.ERROR) {
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (inventoryReceiptDto.getId() != null) {
|
if (inventoryReceiptDto.getId() != null) {
|
||||||
// 更新单据信息
|
// 更新单据信息
|
||||||
supplyRequestService.updateById(supplyRequest);
|
supplyRequestService.updateById(supplyRequest);
|
||||||
|
|||||||
@@ -220,8 +220,8 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// 生成请求的命中值
|
// 生成请求的命中值
|
||||||
String lotUnitCondition =
|
String lotUnitCondition = String.format(CommonConstants.Common.COMMA_FORMAT, supplyRequest.getLotNumber(),
|
||||||
String.format(CommonConstants.Common.COMMA, supplyRequest.getLotNumber(), supplyRequest.getUnitCode());
|
supplyRequest.getUnitCode());
|
||||||
|
|
||||||
for (ItemChargeDetailDto detail : details) {
|
for (ItemChargeDetailDto detail : details) {
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
// 判断入库单位是大单位还是小单位
|
// 判断入库单位是大单位还是小单位
|
||||||
if (supplyRequest.getUnitCode().equals(detail.getUnitCode())) {
|
if (supplyRequest.getUnitCode().equals(detail.getUnitCode())) {
|
||||||
resultList.add(this.addChargeItemDefApp(
|
resultList.add(this.addChargeItemDefApp(
|
||||||
String.format(CommonConstants.Common.COMMA, supplyRequest.getLotNumber(),
|
String.format(CommonConstants.Common.COMMA_FORMAT, supplyRequest.getLotNumber(),
|
||||||
detail.getMinUnitCode()),
|
detail.getMinUnitCode()),
|
||||||
supplyRequest.getMinSellPrice(), detail.getDefinitionId()));
|
supplyRequest.getMinSellPrice(), detail.getDefinitionId()));
|
||||||
resultList.add(this.addChargeItemDefApp(lotUnitCondition, supplyRequest.getSellPrice(),
|
resultList.add(this.addChargeItemDefApp(lotUnitCondition, supplyRequest.getSellPrice(),
|
||||||
@@ -246,7 +246,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
} else {
|
} else {
|
||||||
resultList
|
resultList
|
||||||
.add(this.addChargeItemDefApp(
|
.add(this.addChargeItemDefApp(
|
||||||
String.format(CommonConstants.Common.COMMA, supplyRequest.getLotNumber(),
|
String.format(CommonConstants.Common.COMMA_FORMAT, supplyRequest.getLotNumber(),
|
||||||
detail.getUnitCode()),
|
detail.getUnitCode()),
|
||||||
supplyRequest.getMinSellPrice(), detail.getDefinitionId()));
|
supplyRequest.getMinSellPrice(), detail.getDefinitionId()));
|
||||||
resultList.add(this.addChargeItemDefApp(lotUnitCondition, supplyRequest.getMinSellPrice(),
|
resultList.add(this.addChargeItemDefApp(lotUnitCondition, supplyRequest.getMinSellPrice(),
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ package com.openhis.web.inventorymanage.controller;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptInitDto;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -31,25 +30,15 @@ public class PurchaseInventoryController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IPurchaseInventoryAppService purchaseInventoryAppService;
|
private IPurchaseInventoryAppService purchaseInventoryAppService;
|
||||||
|
|
||||||
// @GetMapping(value = "/init")
|
/**
|
||||||
// public R<?> init() {
|
* 入库单据页面初始化
|
||||||
// // 采番
|
*
|
||||||
//
|
* @return 初始化信息
|
||||||
// InventoryReceiptInitDto initDto = new InventoryReceiptInitDto();
|
*/
|
||||||
// // 设置供应商列表
|
@GetMapping(value = "/init")
|
||||||
// initDto.setSupplier(supplierService.list())
|
public R<?> purchaseInventoryInit() {
|
||||||
// // 设置药房列表
|
return purchaseInventoryAppService.purchaseInventoryInit();
|
||||||
// .setLocation(locationService.list(new LambdaQueryWrapper<Location>().in(Location::getFormEnum, 1)))
|
}
|
||||||
// // 药品详细
|
|
||||||
// .setMedicationDetail(medicationService.getDetailList());
|
|
||||||
// return R.ok(initDto);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 添加入库单据之前需要
|
|
||||||
// 1.supplier供应商信息列表
|
|
||||||
// 2.location信息列表包括(药房,药库,材料柜,护理站)
|
|
||||||
// 3.practitioner_role与practitioner联查获取对应location的管理员列表
|
|
||||||
// 4.查询选定对应药品类型的药品信息列表
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库单据列表
|
* 入库单据列表
|
||||||
|
|||||||
@@ -58,18 +58,6 @@ public class InventoryReceiptDto implements Serializable {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
/** 源仓库类型 */
|
|
||||||
@NotNull
|
|
||||||
private Integer sourceTypeEnum;
|
|
||||||
|
|
||||||
/** 源仓库 */
|
|
||||||
@NotNull
|
|
||||||
private Long sourceLocationId;
|
|
||||||
|
|
||||||
/** 源仓位 */
|
|
||||||
@NotNull
|
|
||||||
private Long sourceLocationStoreId;
|
|
||||||
|
|
||||||
/** 目的仓库类型 */
|
/** 目的仓库类型 */
|
||||||
@NotNull
|
@NotNull
|
||||||
private Integer purposeTypeEnum;
|
private Integer purposeTypeEnum;
|
||||||
@@ -86,6 +74,10 @@ public class InventoryReceiptDto implements Serializable {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private Long applicantId;
|
private Long applicantId;
|
||||||
|
|
||||||
|
/** 经手人 */
|
||||||
|
@NotNull
|
||||||
|
private Long practitionerId;
|
||||||
|
|
||||||
/** 申请时间 */
|
/** 申请时间 */
|
||||||
private Date applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ package com.openhis.web.inventorymanage.dto;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.openhis.administration.domain.Location;
|
|
||||||
import com.openhis.administration.domain.Supplier;
|
|
||||||
import com.openhis.medication.domain.MedicationDetail;
|
|
||||||
|
|
||||||
import com.openhis.web.basedatamanage.dto.LocationQueryDto;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -23,14 +18,84 @@ import lombok.experimental.Accessors;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class InventoryReceiptInitDto {
|
public class InventoryReceiptInitDto {
|
||||||
|
|
||||||
// 返回前台的应是dto 懒得定义请勿学习
|
/**
|
||||||
|
* 单据号
|
||||||
|
*/
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
/** 药房信息 */
|
/**
|
||||||
private List<Location> location;
|
* 供应商
|
||||||
|
*/
|
||||||
|
private List<InventoryReceiptInitDto.supplierListOption> supplierListOptions;
|
||||||
|
|
||||||
/** 供应商信息 */
|
/**
|
||||||
private List<Supplier> supplier;
|
* 经手人
|
||||||
|
*/
|
||||||
|
private List<InventoryReceiptInitDto.practitionerListOption> practitionerListOptions;
|
||||||
|
|
||||||
/** 药品详细信息 */
|
/**
|
||||||
private List<MedicationDetail> medicationDetail;
|
* 入库项目类型
|
||||||
|
*/
|
||||||
|
private List<InventoryReceiptInitDto.itemTypeOption> itemTypeOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态
|
||||||
|
*/
|
||||||
|
private List<InventoryReceiptInitDto.supplyStatusOption> supplyStatusOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class supplierListOption {
|
||||||
|
private Long value;
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
public supplierListOption(Long value, String label) {
|
||||||
|
this.value = value;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经手人
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class practitionerListOption {
|
||||||
|
private Long value;
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
public practitionerListOption(Long value, String label) {
|
||||||
|
this.value = value;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库项目类型
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class itemTypeOption {
|
||||||
|
private Integer value;
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
public itemTypeOption(Integer value, String label) {
|
||||||
|
this.value = value;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库项目类型
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class supplyStatusOption {
|
||||||
|
private Integer value;
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
public supplyStatusOption(Integer value, String label) {
|
||||||
|
this.value = value;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class InventoryReceiptPageDto implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 单据号 */
|
/** 单据号 */
|
||||||
private String busNo;
|
private String supplyBusNo;
|
||||||
|
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
private Integer statusEnum;
|
private Integer statusEnum;
|
||||||
@@ -42,9 +42,9 @@ public class InventoryReceiptPageDto implements Serializable {
|
|||||||
/** 供应商 */
|
/** 供应商 */
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
/** 目的仓库 */
|
/** 经手人 */
|
||||||
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_location")
|
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||||
private Long purposeLocationId;
|
private Long practitionerId;
|
||||||
|
|
||||||
/** 审批人 */
|
/** 审批人 */
|
||||||
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ public class InventorySearchParam implements Serializable {
|
|||||||
/** 状态 */
|
/** 状态 */
|
||||||
private Integer statusEnum;
|
private Integer statusEnum;
|
||||||
|
|
||||||
/** 分类 */
|
|
||||||
private Integer categoryEnum;
|
|
||||||
|
|
||||||
/** 供应商 */
|
/** 供应商 */
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
@@ -40,9 +37,6 @@ public class InventorySearchParam implements Serializable {
|
|||||||
/** 申请结束时间 */
|
/** 申请结束时间 */
|
||||||
private Date applyTimeEnd;
|
private Date applyTimeEnd;
|
||||||
|
|
||||||
/** 目的仓库 */
|
/** 经手人 */
|
||||||
private Long purposeLocationId;
|
private Long practitionerId;
|
||||||
|
|
||||||
/** 申请人 */
|
|
||||||
private Long applicantId;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,14 @@
|
|||||||
package com.openhis.web.inventorymanage.dto;
|
package com.openhis.web.inventorymanage.dto;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -19,4 +27,77 @@ import lombok.experimental.Accessors;
|
|||||||
public class ReceiptDetailDto implements Serializable {
|
public class ReceiptDetailDto implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 单据号 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
|
/** 当前库存总数 */
|
||||||
|
private BigDecimal totalQuantity;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
private BigDecimal itemQuantity;
|
||||||
|
|
||||||
|
/** 物品名称 */
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 规格 */
|
||||||
|
private String totalVolume;
|
||||||
|
|
||||||
|
/** 物品计量单位 */
|
||||||
|
@Dict(dictCode = "unit_code")
|
||||||
|
private String unitCode;
|
||||||
|
private String unitCode_dictText;
|
||||||
|
|
||||||
|
/** 请求细节 */
|
||||||
|
private String detailJson;
|
||||||
|
|
||||||
|
/** 供应人名称 */
|
||||||
|
private String practitionerName;
|
||||||
|
|
||||||
|
/** 供应商名称 */
|
||||||
|
private String supplierName;
|
||||||
|
|
||||||
|
/** 目的仓库类型 */
|
||||||
|
private Integer purposeTypeEnum;
|
||||||
|
|
||||||
|
/** 目的仓库名称 */
|
||||||
|
private String purposeLocationName;
|
||||||
|
|
||||||
|
/** 目的货位名称 */
|
||||||
|
private String purposeLocationStoreName;
|
||||||
|
|
||||||
|
/** 申请时间 */
|
||||||
|
private Date applyTime;
|
||||||
|
|
||||||
|
/** 产品批号 */
|
||||||
|
private String lotNumber;
|
||||||
|
|
||||||
|
/** 追溯码 */
|
||||||
|
private String traceNo;
|
||||||
|
|
||||||
|
/** 发票号 */
|
||||||
|
private String invoiceNo;
|
||||||
|
|
||||||
|
/** 开始时间 */
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/** 结束时间 */
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/** 单价 */
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/** 总价 */
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
/** 售价 */
|
||||||
|
private BigDecimal sellPrice;
|
||||||
|
|
||||||
|
/** 拆零售价 */
|
||||||
|
private BigDecimal minSellPrice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.inventorymanage.mapper;
|
package com.openhis.web.inventorymanage.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -11,6 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptPageDto;
|
import com.openhis.web.inventorymanage.dto.InventoryReceiptPageDto;
|
||||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||||
|
import com.openhis.web.inventorymanage.dto.ReceiptDetailDto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购入库查询用 mapper
|
* 采购入库查询用 mapper
|
||||||
@@ -32,4 +35,12 @@ public interface PurchaseInventoryMapper {
|
|||||||
Page<InventoryReceiptPageDto> selectInventoryReceiptPage(@Param("page") Page<InventoryReceiptPageDto> page,
|
Page<InventoryReceiptPageDto> selectInventoryReceiptPage(@Param("page") Page<InventoryReceiptPageDto> page,
|
||||||
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||||
@Param("purchaseInventory") Integer purchaseInventory);
|
@Param("purchaseInventory") Integer purchaseInventory);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单据详情
|
||||||
|
*
|
||||||
|
* @param busNo 单据号
|
||||||
|
* @return 单据详情
|
||||||
|
*/
|
||||||
|
List<ReceiptDetailDto> selectDetail(@Param("busNo") String busNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.enums.AssignSeqEnum;
|
import com.openhis.common.enums.AssignSeqEnum;
|
||||||
import com.core.common.utils.AssignSeqUtil;
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.ChineseConvertUtils;
|
import com.core.common.utils.ChineseConvertUtils;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
|
|||||||
@@ -8,23 +8,21 @@
|
|||||||
T2.bus_no AS supply_bus_no,
|
T2.bus_no AS supply_bus_no,
|
||||||
T2.status_enum,
|
T2.status_enum,
|
||||||
T2.supplier_id,
|
T2.supplier_id,
|
||||||
T2.purpose_location_id,
|
|
||||||
T2.approver_id,
|
T2.approver_id,
|
||||||
T2.approval_time,
|
T2.approval_time,
|
||||||
T2.applicant_id,
|
T2.applicant_id,
|
||||||
T2.apply_time,
|
T2.apply_time,
|
||||||
T2.purpose_location_id,
|
T2.practitioner_id,
|
||||||
T2.tenant_id
|
T2.tenant_id
|
||||||
FROM (SELECT T1.id,
|
FROM (SELECT T1.id,
|
||||||
T1.bus_no,
|
T1.bus_no,
|
||||||
T1.status_enum,
|
T1.status_enum,
|
||||||
T1.supplier_id,
|
T1.supplier_id,
|
||||||
T1.purpose_location_id,
|
|
||||||
T1.approver_id,
|
T1.approver_id,
|
||||||
T1.approval_time,
|
T1.approval_time,
|
||||||
T1.applicant_id,
|
T1.applicant_id,
|
||||||
T1.apply_time,
|
T1.apply_time,
|
||||||
T1.purpose_location_id,
|
T1.practitioner_id,
|
||||||
T1.tenant_id
|
T1.tenant_id
|
||||||
FROM wor_supply_request AS T1
|
FROM wor_supply_request AS T1
|
||||||
WHERE type_enum = #{purchaseInventory}
|
WHERE type_enum = #{purchaseInventory}
|
||||||
@@ -32,15 +30,47 @@
|
|||||||
T1.bus_no,
|
T1.bus_no,
|
||||||
T1.status_enum,
|
T1.status_enum,
|
||||||
T1.supplier_id,
|
T1.supplier_id,
|
||||||
T1.purpose_location_id,
|
|
||||||
T1.approver_id,
|
T1.approver_id,
|
||||||
T1.approval_time,
|
T1.approval_time,
|
||||||
T1.applicant_id,
|
T1.applicant_id,
|
||||||
T1.apply_time,
|
T1.apply_time,
|
||||||
T1.purpose_location_id,
|
T1.practitioner_id,
|
||||||
T1.tenant_id
|
T1.tenant_id
|
||||||
ORDER BY T1.bus_no desc
|
ORDER BY T1.bus_no desc
|
||||||
) AS T2
|
) AS T2
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectDetail" resultType="com.openhis.web.inventorymanage.dto.ReceiptDetailDto">
|
||||||
|
SELECT *
|
||||||
|
FROM wor_supply_request T1
|
||||||
|
LEFT JOIN med_medication_definition T2
|
||||||
|
ON T1.item_id = T2.id
|
||||||
|
LEFT JOIN med_medication T3
|
||||||
|
ON T3.medication_def_id = T2.id
|
||||||
|
LEFT JOIN adm_supplier T4
|
||||||
|
ON T4.id = T1.supplier_id
|
||||||
|
LEFT JOIN adm_practitioner T5
|
||||||
|
ON T1.practitioner_id = T5.id
|
||||||
|
LEFT JOIN adm_location T6
|
||||||
|
ON T1.purpose_location_id = T6.id
|
||||||
|
LEFT JOIN adm_location T7
|
||||||
|
ON T1.purpose_location_store_id = T7.id
|
||||||
|
WHERE T1.bus_no = #{busNo}
|
||||||
|
AND T1.delete_flag = '0'
|
||||||
|
UNION ALL
|
||||||
|
SELECT *
|
||||||
|
FROM wor_supply_request T1
|
||||||
|
LEFT JOIN adm_device_definition T8
|
||||||
|
ON T1.item_id = T8.id
|
||||||
|
LEFT JOIN adm_supplier T4
|
||||||
|
ON T4.id = T1.supplier_id
|
||||||
|
LEFT JOIN adm_practitioner T5
|
||||||
|
ON T1.practitioner_id = T5.id
|
||||||
|
LEFT JOIN adm_location T6
|
||||||
|
ON T1.purpose_location_id = T6.id
|
||||||
|
LEFT JOIN adm_location T7
|
||||||
|
ON T1.purpose_location_store_id = T7.id
|
||||||
|
WHERE T1.bus_no = #{busNo}
|
||||||
|
AND T1.delete_flag = '0'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
T1.unit_price,
|
T1.unit_price,
|
||||||
T1.total_price,
|
T1.total_price,
|
||||||
T1.prescription_no,
|
T1.prescription_no,
|
||||||
|
T1.bus_no,
|
||||||
T1.enterer_id,
|
T1.enterer_id,
|
||||||
T1.entered_date,
|
T1.entered_date,
|
||||||
T1.account_id,
|
T1.account_id,
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
ON T1.context_enum = #{device}
|
ON T1.context_enum = #{device}
|
||||||
AND T1.product_id = T4.id
|
AND T1.product_id = T4.id
|
||||||
WHERE T1.encounter_id = #{encounterId}
|
WHERE T1.encounter_id = #{encounterId}
|
||||||
AND T1.status_enum IN (1 , 2 , 5)
|
AND T1.status_enum IN (#{planned} , #{billable} , #{billed})
|
||||||
AND T1.delete_flag = '0'
|
AND T1.delete_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
T1.tendered_amount,
|
T1.tendered_amount,
|
||||||
T1.returned_amount,
|
T1.returned_amount,
|
||||||
T1.contract_no,
|
T1.contract_no,
|
||||||
T1.charge_item_ids,
|
|
||||||
T2.prescription_no,
|
T2.prescription_no,
|
||||||
T2.account_id
|
T2.account_id
|
||||||
FROM fin_payment_reconciliation AS T1
|
FROM fin_payment_reconciliation AS T1
|
||||||
@@ -24,4 +23,48 @@
|
|||||||
AND T1.status_enum IN (#{success},#{refundAll},#{refundPart})
|
AND T1.status_enum IN (#{success},#{refundAll},#{refundPart})
|
||||||
AND T1.delete_flag = '0'
|
AND T1.delete_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectRefundItem" resultType="com.openhis.web.chargemanage.dto.RefundItemDto">
|
||||||
|
SELECT T1.*,
|
||||||
|
T2.name AS service_name
|
||||||
|
FROM fin_payment_reconciliation AS T1
|
||||||
|
LEFT JOIN adm_charge_item AS T2
|
||||||
|
ON T2.id IN T1.charge_item_ids
|
||||||
|
LEFT JOIN med_medication_request AS T3
|
||||||
|
ON T3.bus_no = SUBSTRING(T2.bus_no, #{three})
|
||||||
|
LEFT JOIN med_medication_dispense AS T4
|
||||||
|
ON T4.med_req_id = T3.id
|
||||||
|
WHERE T2.service_table = #{medMedicationRequest}
|
||||||
|
AND T1.id IN
|
||||||
|
<foreach collection="paymentIdList" item="paymentId" separator="," open="(" close=")">
|
||||||
|
#{paymentId}
|
||||||
|
</foreach>
|
||||||
|
UNION ALL
|
||||||
|
SELECT T1.*,
|
||||||
|
T2.name AS service_name
|
||||||
|
FROM fin_payment_reconciliation AS T1
|
||||||
|
LEFT JOIN adm_charge_item AS T2
|
||||||
|
ON T2.id IN T1.charge_item_ids
|
||||||
|
LEFT JOIN wor_device_request AS T5
|
||||||
|
ON T6.bus_no = SUBSTRING(T2.bus_no, #{three})
|
||||||
|
LEFT JOIN wor_device_dispense AS T6
|
||||||
|
ON T6.device_req_id = T5.id
|
||||||
|
WHERE T2.service_table = #{worDeviceRequest}
|
||||||
|
AND T1.id IN
|
||||||
|
<foreach collection="paymentIdList" item="paymentId" separator="," open="(" close=")">
|
||||||
|
#{paymentId}
|
||||||
|
</foreach>
|
||||||
|
UNION ALL
|
||||||
|
SELECT T1.*,
|
||||||
|
T2.name AS service_name
|
||||||
|
FROM fin_payment_reconciliation AS T1
|
||||||
|
LEFT JOIN adm_charge_item AS T2
|
||||||
|
ON T2.id IN T1.charge_item_ids
|
||||||
|
LEFT JOIN wor_service_request AS T7
|
||||||
|
ON T7.bus_no = SUBSTRING(T2.bus_no, #{three})
|
||||||
|
WHERE T2.service_table = #{worServiceRequest}
|
||||||
|
AND T1.id IN
|
||||||
|
<foreach collection="paymentIdList" item="paymentId" separator="," open="(" close=")">
|
||||||
|
#{paymentId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
*/
|
*/
|
||||||
package com.core.common.enums;
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采番前缀枚举
|
* 采番前缀枚举
|
||||||
@@ -12,15 +12,19 @@ package com.core.common.enums;
|
|||||||
public enum AssignSeqEnum {
|
public enum AssignSeqEnum {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 例子
|
* 患者编号
|
||||||
*/
|
*/
|
||||||
TEST("1", "例子", "TE"),
|
|
||||||
// 患者编号
|
|
||||||
PATIENT_NUM("1", "患者编号", "PN"),
|
PATIENT_NUM("1", "患者编号", "PN"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购单据号
|
||||||
|
*/
|
||||||
|
PURCHASE_NUM("2", "采购单据号", "SIN"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 就诊编号
|
* 就诊编号
|
||||||
*/
|
*/
|
||||||
ENCOUNTER_NUM("1", "就诊编号", "EN");
|
ENCOUNTER_NUM("3", "就诊编号", "EN");
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
private final String info;
|
private final String info;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
*/
|
*/
|
||||||
package com.core.common.enums;
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收费项目
|
* 收费项目
|
||||||
@@ -23,9 +23,9 @@ public enum ItemType implements HisEnumInterface {
|
|||||||
MEDICINE(1, "1", "中药"),
|
MEDICINE(1, "1", "中药"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 西药
|
* 耗材
|
||||||
*/
|
*/
|
||||||
DEVICE(2, "2", "西药"),
|
DEVICE(2, "2", "耗材"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医疗活动
|
* 医疗活动
|
||||||
|
|||||||
@@ -9,26 +9,21 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum LocationForm implements HisEnumInterface {
|
public enum LocationForm implements HisEnumInterface {
|
||||||
|
|
||||||
SITE(1, "si", "集合点A collection of buildings or other locations such as a site or a campus."),
|
SITE(1, "si", "集合点"),
|
||||||
BUILDING(2, "bu",
|
BUILDING(2, "bu", "建筑"),
|
||||||
"建筑Any Building or structure. This may contain rooms, corridors, wings, etc. It might not have walls, or a roof, but is considered a defined/allocated space."),
|
WING(3, "wi", "连廊"),
|
||||||
WING(3, "wi", "连廊A Wing within a Building, this often contains levels, rooms and corridors."),
|
WARD(4, "wa", "病区"),
|
||||||
WARD(4, "wa", "病区A Ward is a section of a medical facility that may contain rooms and other types of location."),
|
LEVEL(5, "lvl", "楼层"),
|
||||||
LEVEL(5, "lvl", "楼层A Level in a multi-level Building/Structure."),
|
CORRIDOR(6, "co", "走廊"),
|
||||||
CORRIDOR(6, "co", "走廊Any corridor within a Building, that may connect rooms."),
|
ROOM(7, "ro", "诊室"),
|
||||||
ROOM(7, "ro", "诊室A space that is allocated as a room, it may have walls/roof etc., but does not require these."),
|
BED(8, "bd", "床"),
|
||||||
BED(8, "bd",
|
VEHICLE(9, "ve", "运输工具"),
|
||||||
"床A space that is allocated for sleeping/laying on. This is not the physical bed/trolley that may be moved about, but the space it may occupy."),
|
HOUSE(10, "ho", "病房"),
|
||||||
VEHICLE(9, "ve", "运输工具A means of transportation."),
|
CABINET(11, "ca", "库房"),
|
||||||
HOUSE(10, "ho", "病房A residential dwelling. Usually used to reference a location that a person/patient may reside."),
|
ROAD(12, "rd", "路"),
|
||||||
CABINET(11, "ca", "库房A container that can store goods, equipment, medications or other items."),
|
AREA(13, "area", "区域"),
|
||||||
ROAD(12, "rd", "路A defined path to travel between 2 points that has a known name."),
|
VIRTUAL(15, "vi", "虚拟"),
|
||||||
AREA(13, "area", "区域A defined physical boundary of something, such as a flood risk zone, region, postcode"),
|
PHARMACY(16, "ph", "药房");
|
||||||
JURISDICTION(14, "jdn",
|
|
||||||
"适用范围A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health), Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy), not just an physical boundary"),
|
|
||||||
VIRTUAL(15, "vi", "虚拟A location that is virtual in nature, such as a conference call or virtual meeting space");
|
|
||||||
|
|
||||||
// PHARMACY(16, "ph", "药房"),
|
|
||||||
// PHARMACY_WINDOW(17, "phw", "发药窗口"),
|
// PHARMACY_WINDOW(17, "phw", "发药窗口"),
|
||||||
// PHARMACY_TABLE(18, "dt", "摆药台"),
|
// PHARMACY_TABLE(18, "dt", "摆药台"),
|
||||||
// NURSE_STATION(19, "ns", "护士站"),
|
// NURSE_STATION(19, "ns", "护士站"),
|
||||||
|
|||||||
@@ -35,4 +35,12 @@ public interface IChargeItemService extends IService<ChargeItem> {
|
|||||||
* @return 更新结果
|
* @return 更新结果
|
||||||
*/
|
*/
|
||||||
boolean updateAccountType(Long encounterId, Long accountId);
|
boolean updateAccountType(Long encounterId, Long accountId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据收费项目id列表获取收费信息
|
||||||
|
*
|
||||||
|
* @param chargeItemIdList 收费项目id列表
|
||||||
|
* @return 收费信息
|
||||||
|
*/
|
||||||
|
List<ChargeItem> getChargeItemInfo(List<Long> chargeItemIdList);
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,8 @@ package com.openhis.administration.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.openhis.administration.domain.Location;
|
import com.openhis.administration.domain.Location;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 位置管理Service接口
|
* 位置管理Service接口
|
||||||
*
|
*
|
||||||
@@ -11,4 +13,17 @@ import com.openhis.administration.domain.Location;
|
|||||||
*/
|
*/
|
||||||
public interface ILocationService extends IService<Location> {
|
public interface ILocationService extends IService<Location> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药房列表
|
||||||
|
*
|
||||||
|
* @return 药房列表
|
||||||
|
*/
|
||||||
|
List<Location> getPharmacyList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药库列表
|
||||||
|
*
|
||||||
|
* @return 药库列表
|
||||||
|
*/
|
||||||
|
List<Location> getCabinetList();
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.openhis.administration.domain.Practitioner;
|
import com.openhis.administration.domain.Practitioner;
|
||||||
import com.openhis.administration.domain.PractitionerRole;
|
import com.openhis.administration.domain.PractitionerRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医疗参与者管理Service接口
|
* 医疗参与者管理Service接口
|
||||||
*
|
*
|
||||||
@@ -20,4 +22,10 @@ public interface IPractitionerService extends IService<Practitioner> {
|
|||||||
*/
|
*/
|
||||||
Practitioner getPractitionerByUserId(long userId);
|
Practitioner getPractitionerByUserId(long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询医疗参与者列表
|
||||||
|
*
|
||||||
|
* @return 医疗参与者列表
|
||||||
|
*/
|
||||||
|
List<Practitioner> getList();
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ import com.openhis.workflow.domain.SupplyRequest;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商管理Service接口
|
* 供应商管理Service接口
|
||||||
@@ -24,4 +25,11 @@ public interface ISupplierService extends IService<Supplier> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean addSupplier(Supplier supplier);
|
boolean addSupplier(Supplier supplier);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商下拉列表
|
||||||
|
*
|
||||||
|
* @return 供应商下拉列表
|
||||||
|
*/
|
||||||
|
List<Supplier> getList();
|
||||||
}
|
}
|
||||||
@@ -60,4 +60,15 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
|||||||
.eq(ChargeItem::getEncounterId, encounterId).set(ChargeItem::getAccountId, accountId));
|
.eq(ChargeItem::getEncounterId, encounterId).set(ChargeItem::getAccountId, accountId));
|
||||||
return update > 0;
|
return update > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据收费项目id列表获取收费信息
|
||||||
|
*
|
||||||
|
* @param chargeItemIdList 收费项目id列表
|
||||||
|
* @return 收费信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ChargeItem> getChargeItemInfo(List<Long> chargeItemIdList) {
|
||||||
|
return baseMapper.selectBatchIds(chargeItemIdList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ package com.openhis.administration.service.impl;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import com.core.common.enums.AssignSeqEnum;
|
import com.openhis.common.enums.AssignSeqEnum;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.openhis.administration.domain.Location;
|
import com.openhis.administration.domain.Location;
|
||||||
import com.openhis.administration.mapper.LocationMapper;
|
import com.openhis.administration.mapper.LocationMapper;
|
||||||
import com.openhis.administration.service.ILocationService;
|
import com.openhis.administration.service.ILocationService;
|
||||||
|
import com.openhis.common.enums.LocationForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 位置管理Service业务层处理
|
* 位置管理Service业务层处理
|
||||||
@@ -16,4 +20,25 @@ import com.openhis.administration.service.ILocationService;
|
|||||||
@Service
|
@Service
|
||||||
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements ILocationService {
|
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements ILocationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药房列表
|
||||||
|
*
|
||||||
|
* @return 药房列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Location> getPharmacyList() {
|
||||||
|
return baseMapper
|
||||||
|
.selectList(new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.PHARMACY.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药库列表
|
||||||
|
*
|
||||||
|
* @return 药库列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Location> getCabinetList() {
|
||||||
|
return baseMapper
|
||||||
|
.selectList(new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.CABINET.getValue()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.core.common.utils.SecurityUtils;
|
|
||||||
import com.openhis.administration.domain.Practitioner;
|
import com.openhis.administration.domain.Practitioner;
|
||||||
import com.openhis.administration.mapper.PatientMapper;
|
|
||||||
import com.openhis.administration.mapper.PractitionerMapper;
|
import com.openhis.administration.mapper.PractitionerMapper;
|
||||||
import com.openhis.administration.service.IPractitionerService;
|
import com.openhis.administration.service.IPractitionerService;
|
||||||
|
|
||||||
@@ -21,9 +21,6 @@ import com.openhis.administration.service.IPractitionerService;
|
|||||||
public class PractitionerServiceImpl extends ServiceImpl<PractitionerMapper, Practitioner>
|
public class PractitionerServiceImpl extends ServiceImpl<PractitionerMapper, Practitioner>
|
||||||
implements IPractitionerService {
|
implements IPractitionerService {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
PractitionerMapper practitionerMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据执行人ID查询
|
* 根据执行人ID查询
|
||||||
*
|
*
|
||||||
@@ -35,6 +32,16 @@ public class PractitionerServiceImpl extends ServiceImpl<PractitionerMapper, Pra
|
|||||||
|
|
||||||
QueryWrapper<Practitioner> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Practitioner> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("user_id", userId);
|
queryWrapper.eq("user_id", userId);
|
||||||
return practitionerMapper.selectOne(queryWrapper);
|
return baseMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询医疗参与者列表
|
||||||
|
*
|
||||||
|
* @return 医疗参与者列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Practitioner> getList() {
|
||||||
|
return baseMapper.selectList(new LambdaQueryWrapper<>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,19 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
|
||||||
import com.openhis.clinical.domain.ConditionDefinition;
|
|
||||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
|
||||||
import com.openhis.common.enums.DelFlag;
|
|
||||||
import com.openhis.workflow.domain.SupplyRequest;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.openhis.administration.domain.Supplier;
|
import com.openhis.administration.domain.Supplier;
|
||||||
import com.openhis.administration.mapper.SupplierMapper;
|
import com.openhis.administration.mapper.SupplierMapper;
|
||||||
import com.openhis.administration.service.ISupplierService;
|
import com.openhis.administration.service.ISupplierService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import com.openhis.common.enums.SupplierType;
|
||||||
|
|
||||||
import java.util.List;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商管理Service业务层处理
|
* 供应商管理Service业务层处理
|
||||||
@@ -30,7 +25,7 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {
|
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {
|
||||||
private final SupplierMapper supplierMapper;
|
|
||||||
/**
|
/**
|
||||||
* 新增供应商
|
* 新增供应商
|
||||||
*
|
*
|
||||||
@@ -42,16 +37,26 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
|||||||
public boolean addSupplier(Supplier supplier) {
|
public boolean addSupplier(Supplier supplier) {
|
||||||
// 根据病种编码判断病种是否存在
|
// 根据病种编码判断病种是否存在
|
||||||
List<Supplier> suppliers =
|
List<Supplier> suppliers =
|
||||||
supplierMapper.selectList(new LambdaQueryWrapper<Supplier>()
|
baseMapper.selectList(new LambdaQueryWrapper<Supplier>().eq(Supplier::getBusNo, supplier.getBusNo()));
|
||||||
.eq(Supplier::getBusNo, supplier.getBusNo()));
|
|
||||||
if (suppliers.size() > 0) {
|
if (suppliers.size() > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 新增供应商
|
// 新增供应商
|
||||||
int insert = supplierMapper.insert(supplier);
|
int insert = baseMapper.insert(supplier);
|
||||||
if (insert != 1) {
|
if (insert != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商下拉列表
|
||||||
|
*
|
||||||
|
* @return 供应商下拉列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Supplier> getList() {
|
||||||
|
return baseMapper.selectList(new LambdaQueryWrapper<Supplier>().select(Supplier::getId, Supplier::getName)
|
||||||
|
.eq(Supplier::getTypeEnum, SupplierType.ACTIVE.getValue()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,8 @@ package com.openhis.financial.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.openhis.financial.domain.PaymentReconciliation;
|
import com.openhis.financial.domain.PaymentReconciliation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款管理Service接口
|
* 付款管理Service接口
|
||||||
*
|
*
|
||||||
@@ -11,4 +13,11 @@ import com.openhis.financial.domain.PaymentReconciliation;
|
|||||||
*/
|
*/
|
||||||
public interface IPaymentReconciliationService extends IService<PaymentReconciliation> {
|
public interface IPaymentReconciliationService extends IService<PaymentReconciliation> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据支付id获取对应收费项目的id列表
|
||||||
|
*
|
||||||
|
* @param paymentId 支付id
|
||||||
|
* @return 收费项目的id列表
|
||||||
|
*/
|
||||||
|
List<Long> getChargeItemIdListByPayment(Long paymentId);
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,15 @@
|
|||||||
package com.openhis.financial.service.impl;
|
package com.openhis.financial.service.impl;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
import com.openhis.financial.domain.PaymentReconciliation;
|
import com.openhis.financial.domain.PaymentReconciliation;
|
||||||
import com.openhis.financial.mapper.PaymentReconciliationMapper;
|
import com.openhis.financial.mapper.PaymentReconciliationMapper;
|
||||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||||
@@ -14,6 +21,30 @@ import com.openhis.financial.service.IPaymentReconciliationService;
|
|||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconciliationMapper, PaymentReconciliation> implements IPaymentReconciliationService {
|
public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconciliationMapper, PaymentReconciliation>
|
||||||
|
implements IPaymentReconciliationService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaymentReconciliationMapper paymentReconciliationMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据支付id获取对应收费项目的id列表
|
||||||
|
*
|
||||||
|
* @param paymentId 支付id
|
||||||
|
* @return 收费项目的id列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Long> getChargeItemIdListByPayment(Long paymentId) {
|
||||||
|
|
||||||
|
// 根据支付id获取支付信息
|
||||||
|
PaymentReconciliation paymentReconciliation =
|
||||||
|
paymentReconciliationMapper.selectOne(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||||
|
.select(PaymentReconciliation::getChargeItemIds).eq(PaymentReconciliation::getId, paymentId));
|
||||||
|
if (paymentReconciliation == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 将收费项目集合转换成列表
|
||||||
|
return Arrays.stream(paymentReconciliation.getChargeItemIds().split(CommonConstants.Common.COMMA))
|
||||||
|
.map(Long::parseLong).collect(Collectors.toList());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user