解决合并冲突
This commit is contained in:
@@ -0,0 +1,204 @@
|
||||
package com.openhis.web.adjustprice.appservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||
|
||||
/**
|
||||
* Desc: 调价业务接口
|
||||
*
|
||||
* @Author raymond
|
||||
* @Date 08:42 2025/10/16
|
||||
* @return
|
||||
**/
|
||||
public interface IAdjustPriceService {
|
||||
/**
|
||||
* Desc: 保存调价数据
|
||||
*
|
||||
* @param dataVoList 前端数据集合
|
||||
* @Author raymond
|
||||
* @Date 08:57 2025/10/16
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> submitChangePriceData(List<AdjustPriceDataVo> dataVoList);
|
||||
|
||||
/**
|
||||
* Desc: 保存并提交审核调价数据
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 16:22 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> submitExamineChangePriceData(List<AdjustPriceDataVo> dataVoList);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||
*
|
||||
* @param searchKey
|
||||
* @Author raymond
|
||||
* @Date 09:32 2025/10/20
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
R<?> searchKeyWordDataListByMed(String searchKey);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||
*
|
||||
* @param searchKey
|
||||
* @Author raymond
|
||||
* @Date 09:32 2025/10/20
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
R<?> searchKeyWordDataListByDevice(String searchKey);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||
*
|
||||
* @param searchKey
|
||||
* @Author raymond
|
||||
* @Date 09:32 2025/10/20
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
R<?> searchKeyWordDataListByActivity(String searchKey);
|
||||
|
||||
/**
|
||||
* Desc: 查询提交的改价数据
|
||||
*
|
||||
* @param adjustPriceManagerSearchParam
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param searchKey
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 23:39 2025/11/1
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam, Integer pageNo,
|
||||
Integer pageSize, String searchKey, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 med
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByMed(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 med
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByDevice(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 Activity
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByActivity(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 Health
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByHealth(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 修改调价原因 和 价格
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 15:21 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> cancelChangePriceData(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 查询有挂号信息的科室
|
||||
*
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 16:38 2025/10/22
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchAllOrgData();
|
||||
|
||||
/**
|
||||
* Desc: 根据科室id 加载挂号数据
|
||||
*
|
||||
* @param orgId
|
||||
* @Author raymond
|
||||
* @Date 16:45 2025/10/22
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchHealthData(Long orgId);
|
||||
|
||||
/**
|
||||
* Desc: 根据业务单据号 进行单据提交操作
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 09:25 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> updateExamineByApproval(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据药品ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkMedApprovalExist(Long itemId);
|
||||
|
||||
/**
|
||||
* Desc: 根据耗材ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkDeviceApprovalExist(Long itemId);
|
||||
|
||||
/**
|
||||
* Desc: 根据诊疗ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkActivityApprovalExist(Long itemId);
|
||||
|
||||
/**
|
||||
* Desc: 根据挂号ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkHealthApprovalExist(Long itemId);
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.openhis.web.adjustprice.appservice;
|
||||
|
||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* @Author raymond
|
||||
* @Date 16:09 2025/10/15
|
||||
* @return
|
||||
**/
|
||||
public interface ISupplyService {
|
||||
/**
|
||||
* Desc:
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 17:10 2025/10/15
|
||||
* @return java.util.List<com.openhis.web.paymentmanage.dto.SupplyListDto>
|
||||
**/
|
||||
List<SupplyListDto> searchAllSupplyList();
|
||||
}
|
||||
@@ -0,0 +1,594 @@
|
||||
package com.openhis.web.adjustprice.appservice.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
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.core.domain.entity.SysDictData;
|
||||
import com.core.common.enums.AdjustPriceEnum;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.system.service.ISysDictDataService;
|
||||
import com.openhis.administration.domain.ChangePriceRecord;
|
||||
import com.openhis.administration.dto.ChangePriceDataDto;
|
||||
import com.openhis.administration.dto.ChargeItemDefDetailPriceDto;
|
||||
import com.openhis.administration.dto.HealthcareDto;
|
||||
import com.openhis.administration.dto.OrgDataDto;
|
||||
import com.openhis.administration.service.*;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.common.utils.RedisKeys;
|
||||
import com.openhis.common.utils.RedisUtil;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||
import com.openhis.web.adjustprice.dto.ChangePricePageDto;
|
||||
import com.openhis.web.adjustprice.mapper.AdjustPriceMapper;
|
||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||
import com.openhis.workflow.dto.ActivityDto;
|
||||
import com.openhis.workflow.dto.AdjustPriceDto;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
import com.openhis.workflow.service.IInventoryItemService;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceServiceImpl
|
||||
* @Description 调价业务实现
|
||||
* @Author raymond
|
||||
* @Date 2025/10/15 16:10
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Service
|
||||
public class AdjustPriceServiceImpl implements IAdjustPriceService {
|
||||
@Resource
|
||||
private IInventoryItemService inventoryItemService;
|
||||
@Resource
|
||||
private IActivityDefinitionService activityDefinitionService;
|
||||
@Resource
|
||||
private IHealthcareServiceService healthcareServiceService;
|
||||
@Resource
|
||||
private IMedicationService medicationService;
|
||||
@Resource
|
||||
private AdjustPriceMapper adjustPriceMapper;
|
||||
@Resource
|
||||
private IDeviceDefinitionService deviceDefinitionService;
|
||||
@Resource
|
||||
private IOrganizationService organizationService;
|
||||
@Resource
|
||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||
@Resource
|
||||
private IChangePriceRecordService changePriceRecordService;
|
||||
@Resource
|
||||
private ISysDictDataService sysDictDataService;
|
||||
@Resource
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<?> submitChangePriceData(List<AdjustPriceDataVo> dataVoList) {
|
||||
if (dataVoList.isEmpty()) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00001, null));
|
||||
}
|
||||
if (dataVoList.stream()
|
||||
.anyMatch(data -> this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString())))) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
//获取数据中的类型
|
||||
Integer categoryType = dataVoList.get(0).getCategoryType();
|
||||
// 单据号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||
// 当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 根据表单提交的tab 进入不同的 execute
|
||||
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||
//如果是 药品或者是耗材 因为药品和耗材的价格取的是 charge_detail表
|
||||
this.executeChangePriceForMedication(dataVoList, busNo, practitionerId, categoryType);
|
||||
} else if (AdjustPriceEnum.DIAGNOSIS.getCode().equals(categoryType)) {
|
||||
//如果是 如果是 诊疗, 取价格主表
|
||||
this.executeChangePriceForActivity(dataVoList, busNo, practitionerId);
|
||||
} else {
|
||||
//如果是 如果是 挂号, 取价格主表
|
||||
this.executeChangePriceForHealth(dataVoList, busNo, practitionerId);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> submitExamineChangePriceData(List<AdjustPriceDataVo> dataVoList) {
|
||||
if (dataVoList.isEmpty()) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00001, null));
|
||||
}
|
||||
if (dataVoList.stream()
|
||||
.anyMatch(data -> this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString())))) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
//获取数据中的类型
|
||||
Integer categoryType = dataVoList.get(0).getCategoryType();
|
||||
// 单据号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||
// 当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 根据表单提交的tab 进入不同的 execute
|
||||
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||
this.executeChangePriceForMedicationExamine(dataVoList, busNo, practitionerId, categoryType);
|
||||
} else if (AdjustPriceEnum.DIAGNOSIS.getCode().equals(categoryType)) {
|
||||
this.executeChangePriceForActivityExamine(dataVoList, busNo, practitionerId);
|
||||
} else {
|
||||
this.executeChangePriceForHealthExamine(dataVoList, busNo, practitionerId);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchKeyWordDataListByMed(String searchKey) {
|
||||
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||
return R.ok(this.medicationService.searchMedListByKeyWord(searchKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchKeyWordDataListByDevice(String searchKey) {
|
||||
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||
return R.ok(this.deviceDefinitionService.searchDeviceListByKeyWord(searchKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchKeyWordDataListByActivity(String searchKey) {
|
||||
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||
return R.ok(this.activityDefinitionService.searchActivityListByKeyWord(searchKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||
Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
HashSet<String> searchFields = new HashSet<>();
|
||||
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||
// 构建查询条件
|
||||
QueryWrapper<InventorySearchParam> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(adjustPriceManagerSearchParam, searchKey, searchFields, request);
|
||||
// 查询入库单据分页列表
|
||||
Page<ChangePricePageDto> changePricePageDtoPage = this.adjustPriceMapper.searchChangePriceDataToPage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper, SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(),
|
||||
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(),
|
||||
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), practitionerId);
|
||||
changePricePageDtoPage.getRecords().forEach(e -> {
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum()));
|
||||
e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getItemCategoryEnum()));
|
||||
});
|
||||
return R.ok(changePricePageDtoPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByMed(String busNo) {
|
||||
// 根据 单据号 查询 药品详情
|
||||
List<ChangePriceDataDto> dataList = this.changePriceRecordService.searchMedChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(), null);
|
||||
// 获取 药品的单位
|
||||
for (ChangePriceDataDto changePriceDataDto : dataList) {
|
||||
SysDictData sysDictData =
|
||||
sysDictDataService.selectDictInfo(CommonConstants.FieldName.UnitCode, changePriceDataDto.getUnitCode());
|
||||
changePriceDataDto.setLabel(sysDictData.getDictLabel());
|
||||
}
|
||||
return R.ok(dataList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByDevice(String busNo) {
|
||||
//根据 单据号 耗材调价单详情
|
||||
return R.ok(this.changePriceRecordService.searchDeviceChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByActivity(String busNo) {
|
||||
//根据 单据号 查询 诊疗调价单详情
|
||||
return R.ok(this.changePriceRecordService.searchActivityChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(), null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByHealth(String busNo) {
|
||||
//根据 单据号 挂号调价单详情
|
||||
return R.ok(this.changePriceRecordService.searchHealthChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> cancelChangePriceData(String busNo) {
|
||||
//根据 单据号查询出 当前所有请求调价的数据集
|
||||
List<ChangePriceRecord> changePriceRecordList =
|
||||
this.changePriceRecordService.searchChangePriceDataForBusNo(busNo);
|
||||
//循环数据集合,将状态修改为 无效状态
|
||||
for (ChangePriceRecord data : changePriceRecordList) {
|
||||
ChangePriceRecord changePriceRecord = this.changePriceRecordService.getById(data.getId());
|
||||
changePriceRecord.setStatusEnum(SupplyStatus.EXPIRED_INVALIDATED.getValue());
|
||||
this.changePriceRecordService.updateById(changePriceRecord);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchAllOrgData() {
|
||||
//查询所有科室
|
||||
List<OrgDataDto> orgDataList = this.organizationService.searchOrgDataByHealth();
|
||||
return R.ok(orgDataList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchHealthData(Long orgId) {
|
||||
//根据科室ID 查询所有号源
|
||||
return R.ok(this.healthcareServiceService.searchAllHeathData(orgId,PublicationStatus.ACTIVE.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateExamineByApproval(String busNo) {
|
||||
//根据调价单编号 查询 分组后的 数据
|
||||
List<ChangePriceRecord> changePriceRecordList =
|
||||
this.changePriceRecordService.searchChangePriceDataGroupByBusNo(busNo);
|
||||
if (!changePriceRecordList.isEmpty()) {
|
||||
// 循环将数据进行填充
|
||||
for (ChangePriceRecord data : changePriceRecordList) {
|
||||
//提交 审批时,查看是否有正在审核中的 货品数据 。根据 货品ID 从redis中查询
|
||||
if (this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString()))) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
//如果不存在,向redis中插入 药品信息 = 给当前 货品上锁 。审批通过或驳回后 释放
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//根据 busNo 修改调价单状态
|
||||
this.changePriceRecordService.submitApproval(busNo);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkMedApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchMedChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkDeviceApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchDeviceChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkActivityApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchActivityChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkHealthApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchHealthChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
public boolean executeChangePriceForMedication(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId, Integer categoryType) {
|
||||
// 有库存的药品或耗材集合
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
// 从map中将表单集合取出
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
//根据表单中的id数组 加载库存集合
|
||||
List<AdjustPriceDto> inventoryItemList =
|
||||
this.inventoryItemService.searchResultDataList(this.executeItemIds(dataVoList));
|
||||
for (AdjustPriceDto data : inventoryItemList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setTotalQuantity(data.getTotalCount());
|
||||
dataVo.setItemTable(data.getItemTable());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setUnitCode(dataVoMap.get(data.getItemId()).getUnitCode());
|
||||
dataVo.setLotNumber(data.getLotNumber());
|
||||
dataVo.setLocationId(data.getLocationId());
|
||||
resultList.add(dataVo);
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords =
|
||||
this.executeChangePriceData(busNo, practitionerId, resultList, SupplyStatus.PENDING_APPROVAL.getValue(),
|
||||
AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
? SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue()
|
||||
: SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
public boolean executeChangePriceForMedicationExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId, Integer categoryType) {
|
||||
// 有库存的药品或耗材集合
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
List<AdjustPriceDto> inventoryItemList =
|
||||
this.inventoryItemService.searchResultDataList(this.executeItemIds(dataVoList));
|
||||
for (AdjustPriceDto data : inventoryItemList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setTotalQuantity(data.getTotalCount());
|
||||
dataVo.setItemTable(data.getItemTable());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setUnitCode(dataVoMap.get(data.getItemId()).getUnitCode());
|
||||
dataVo.setLotNumber(data.getLotNumber());
|
||||
dataVo.setLocationId(data.getLocationId());
|
||||
resultList.add(dataVo);
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords =
|
||||
this.executeChangePriceData(busNo, practitionerId, resultList, SupplyStatus.APPROVAL.getValue(),
|
||||
AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
? SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue()
|
||||
: SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
public boolean executeChangePriceForActivity(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId) {
|
||||
List<ActivityDto> dataDtoList =
|
||||
this.activityDefinitionService.searchActivityDefinitionByIds(this.executeItemIds(dataVoList));
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
for (ActivityDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.PENDING_APPROVAL.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 处理申请 诊疗改价业务申请
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 11:19 2025/10/18
|
||||
* @return boolean
|
||||
**/
|
||||
public boolean executeChangePriceForActivityExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId) {
|
||||
List<ActivityDto> dataDtoList =
|
||||
this.activityDefinitionService.searchActivityDefinitionByIds(this.executeItemIds(dataVoList));
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
for (ActivityDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.APPROVAL.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 处理申请 挂号改价业务
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 11:20 2025/10/18
|
||||
* @return boolean
|
||||
**/
|
||||
public boolean executeChangePriceForHealth(List<AdjustPriceDataVo> dataVoList, String busNo, Long practitionerId) {
|
||||
List<HealthcareDto> dataDtoList =
|
||||
this.healthcareServiceService.searchHealthByIds(this.executeItemIds(dataVoList));
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
for (HealthcareDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加 supply_request表共享了 审核状态和 category 枚举
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.PENDING_APPROVAL.getValue(), SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 处理申请 挂号改价业务
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 11:20 2025/10/18
|
||||
* @return boolean
|
||||
**/
|
||||
public boolean executeChangePriceForHealthExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId) {
|
||||
List<HealthcareDto> dataDtoList =
|
||||
this.healthcareServiceService.searchHealthByIds(this.executeItemIds(dataVoList));
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
for (HealthcareDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加 supply_request表共享了 审核状态和 category 枚举
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.APPROVAL.getValue(), SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 封装对象数据
|
||||
*
|
||||
* @param busNo
|
||||
* @param curUserId
|
||||
* @param itemList
|
||||
* @Author raymond
|
||||
* @Date 09:35 2025/10/18
|
||||
* @return java.util.List<com.openhis.workflow.domain.ChangePriceRecord>
|
||||
**/
|
||||
public List<ChangePriceRecord> executeChangePriceData(String busNo, Long curUserId,
|
||||
List<AdjustPriceDataVo> itemList, Integer statusEnum, Integer categoryEnum) {
|
||||
List<ChangePriceRecord> srList = new LinkedList<>();
|
||||
for (AdjustPriceDataVo dataVo : itemList) {
|
||||
ChangePriceRecord cpr = new ChangePriceRecord();
|
||||
//如果是 药品调价
|
||||
if (SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue().equals(categoryEnum)) {
|
||||
// 获取当前进货价
|
||||
ChargeItemDefDetailPriceDto buyingPriceDto = this.chargeItemDefinitionService
|
||||
.getMedPriceByParam(ConditionCode.LOT_NUMBER_COST.getCode(), dataVo.getItemId());
|
||||
// 获取当前零售价
|
||||
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||
.getMedPriceByParam(ConditionCode.LOT_NUMBER_PRICE.getCode(), dataVo.getItemId());
|
||||
if (buyingPriceDto != null || retailPriceDto != null) {
|
||||
// 库存 以最小单位存储,以货品最小单位进行计算
|
||||
BigDecimal partPercent =
|
||||
dataVo.getTotalQuantity().divide(buyingPriceDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||
//进货价盈负差
|
||||
BigDecimal buyingDiffPrice =
|
||||
dataVo.getNewBuyingPrice().subtract(buyingPriceDto.getPrice()).multiply(partPercent);
|
||||
// 零售价盈负差
|
||||
BigDecimal retailDiffPrice =
|
||||
dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice()).multiply(partPercent);
|
||||
//填充 change_price_record表数据
|
||||
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId())
|
||||
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||
.setOriginBuyingPrice(buyingPriceDto.getPrice()).setOriginRetailPrice(retailPriceDto.getPrice())
|
||||
.setDifferenceBuyingPrice(buyingDiffPrice).setDifferenceRetailPrice(retailDiffPrice)
|
||||
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||
srList.add(cpr);
|
||||
} //如果是 耗材调价
|
||||
} else if (SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue().equals(categoryEnum)) {
|
||||
// 获取当前进货价
|
||||
ChargeItemDefDetailPriceDto buyingPriceDto = this.chargeItemDefinitionService
|
||||
.getDevicePriceByParam(ConditionCode.LOT_NUMBER_COST.getCode(), dataVo.getItemId());
|
||||
// 获取当前零售价
|
||||
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||
.getDevicePriceByParam(ConditionCode.LOT_NUMBER_PRICE.getCode(), dataVo.getItemId());
|
||||
if (buyingPriceDto != null || retailPriceDto != null) {
|
||||
// 库存 以最小单位存储,以货品最小单位进行计算
|
||||
BigDecimal partPercent =
|
||||
dataVo.getTotalQuantity().divide(buyingPriceDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||
//进货价盈负差
|
||||
BigDecimal buyingDiffPrice =
|
||||
dataVo.getNewBuyingPrice().subtract(buyingPriceDto.getPrice()).multiply(partPercent);
|
||||
// 零售价盈负差
|
||||
BigDecimal retailDiffPrice =
|
||||
dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice()).multiply(partPercent);
|
||||
//填充 change_price_record表数据
|
||||
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId()).setLocationId(dataVo.getLocationId())
|
||||
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||
.setOriginBuyingPrice(buyingPriceDto.getPrice()).setOriginRetailPrice(retailPriceDto.getPrice())
|
||||
.setDifferenceBuyingPrice(buyingDiffPrice).setDifferenceRetailPrice(retailDiffPrice)
|
||||
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||
srList.add(cpr);
|
||||
}
|
||||
} else {//如果是 诊疗或者挂号调价,诊疗和耗材 没有库存
|
||||
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||
.getProductPrice(PublicationStatus.ACTIVE.getValue(), dataVo.getItemId());
|
||||
if (retailPriceDto != null) {
|
||||
//新价格 - 原价格
|
||||
BigDecimal retailDiffPrice = dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice());
|
||||
//填充 change_price_record表数据
|
||||
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId())
|
||||
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||
.setOriginRetailPrice(retailPriceDto.getPrice()).setDifferenceRetailPrice(retailDiffPrice)
|
||||
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||
srList.add(cpr);
|
||||
}
|
||||
}
|
||||
}
|
||||
return srList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 封装获取药品和耗材的id数组
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 08:03 2025/10/18
|
||||
* @return java.util.List<java.lang.Long>
|
||||
**/
|
||||
public List<Long> executeItemIds(List<AdjustPriceDataVo> dataVoList) {
|
||||
List<Long> itemIds = new LinkedList<>();
|
||||
for (AdjustPriceDataVo data : dataVoList) {
|
||||
itemIds.add(data.getItemId());
|
||||
}
|
||||
return itemIds;
|
||||
}
|
||||
/**
|
||||
* Desc: 存储表单数据
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 10:28 2025/11/5
|
||||
* @return java.util.Map<java.lang.Long,com.openhis.web.adjustprice.dto.AdjustPriceDataVo>
|
||||
**/
|
||||
public Map<Long, AdjustPriceDataVo> executeMap(List<AdjustPriceDataVo> dataVoList) {
|
||||
Map<Long, AdjustPriceDataVo> map = new ConcurrentHashMap<>();
|
||||
for (AdjustPriceDataVo data : dataVoList) {
|
||||
map.put(data.getItemId(), data);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.openhis.web.adjustprice.appservice.impl;
|
||||
|
||||
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
||||
import com.openhis.web.adjustprice.mapper.SupplyMapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePriceImpl
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/15 16:10
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Component
|
||||
public class SupplyServiceImpl implements ISupplyService {
|
||||
|
||||
@Resource
|
||||
private SupplyMapper supplyMapper;
|
||||
|
||||
@Override
|
||||
public List<SupplyListDto> searchAllSupplyList() {
|
||||
return this.supplyMapper.searchAllSupplyList();
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
package com.openhis.web.adjustprice.controller;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.enums.TenantOptionDict;
|
||||
import com.core.web.util.TenantOptionUtil;
|
||||
import com.openhis.common.enums.OrderPricingSource;
|
||||
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ChargePriceController
|
||||
@@ -19,94 +21,163 @@ import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||
@RestController
|
||||
@RequestMapping("/change/price")
|
||||
public class ChangePriceController {
|
||||
|
||||
@Resource
|
||||
private ISupplyService supplyService;
|
||||
private IAdjustPriceService adjustPriceService;
|
||||
|
||||
/**
|
||||
* Desc: 查询所有供应商集合
|
||||
*
|
||||
* Desc: 根据关键词搜索数据
|
||||
*
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 16:55 2025/10/15
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 09:26 2025/10/20
|
||||
**/
|
||||
@GetMapping(value = "searchAllSupply")
|
||||
public R<?> searchAllSupply() {
|
||||
return R.ok(this.supplyService.searchAllSupplyList());
|
||||
@PostMapping(value = "searchKeyWordDataListByMed")
|
||||
public R<?> searchKeyWordDataListByMed(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByMed(searchKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词搜索数据
|
||||
*
|
||||
* @param
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 09:26 2025/10/20
|
||||
**/
|
||||
@PostMapping(value = "searchKeyWordDataListByDevice")
|
||||
public R<?> searchKeyWordDataListByDevice(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByDevice(searchKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词搜索数据
|
||||
*
|
||||
* @param
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 09:26 2025/10/20
|
||||
**/
|
||||
@PostMapping(value = "searchKeyWordDataListByActivity")
|
||||
public R<?> searchKeyWordDataListByActivity(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByActivity(searchKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 查询所有 有挂号信息的科室
|
||||
*
|
||||
* @param
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 08:38 2025/10/22
|
||||
**/
|
||||
@PostMapping(value = "searchAllOrgData")
|
||||
public R<?> searchAllOrgData() {
|
||||
return this.adjustPriceService.searchAllOrgData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据科室id 加载 挂号信息
|
||||
*
|
||||
* @param orgId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 16:46 2025/10/22
|
||||
**/
|
||||
@PostMapping(value = "searchHealthData")
|
||||
public R<?> searchHealthData(@RequestParam Long orgId) {
|
||||
return this.adjustPriceService.searchHealthData(orgId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 保存 改价数据
|
||||
*
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 08:47 2025/10/15
|
||||
**/
|
||||
@PostMapping(value = "commitChangePriceData")
|
||||
public R<?> commitChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||
return adjustPriceService.submitChangePriceData(dataVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
||||
*
|
||||
*
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 08:47 2025/10/15
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchMedicineListToPage")
|
||||
public R<?> searchMedicineListToPage() {
|
||||
return R.ok();
|
||||
@PostMapping(value = "submitExamineChangePriceData")
|
||||
public R<?> submitExamineChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||
return adjustPriceService.submitExamineChangePriceData(dataVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
*
|
||||
* @param medicationSearchParam
|
||||
* @param searchKey
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 13:41 2025/10/15
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "searchConsumablesListToPage")
|
||||
public R<?> searchConsumablesListToPage(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
return null;
|
||||
@PostMapping(value = "checkMedApprovalExist")
|
||||
public R<?> checkMedApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkMedApprovalExist(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
*
|
||||
* @param medicationSearchParam
|
||||
* @param searchKey
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 13:41 2025/10/15
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "searchDiagnosisListToPage")
|
||||
public R<?> searchDiagnosisListToPage(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
return null;
|
||||
@PostMapping(value = "checkDeviceApprovalExist")
|
||||
public R<?> checkDeviceApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkDeviceApprovalExist(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
*
|
||||
* @param medicationSearchParam
|
||||
* @param searchKey
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 13:41 2025/10/15
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "searchHealthCareListToPage")
|
||||
public R<?> searchRegisterListToPage(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
@PostMapping(value = "checkActivityApprovalExist")
|
||||
public R<?> checkActivityApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkActivityApprovalExist(itemId);
|
||||
}
|
||||
|
||||
return null;
|
||||
/**
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "checkHealthApprovalExist")
|
||||
public R<?> checkHealthApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkHealthApprovalExist(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 查询调价控制开关状态接口
|
||||
*
|
||||
* @return true:统一零售价 , false:按批次号售卖
|
||||
**/
|
||||
@GetMapping(value = "getAdjustPriceSwitchState")
|
||||
public R<?> getAdjustPriceSwitchState() {
|
||||
// 医嘱定价来源
|
||||
String orderPricingSource = TenantOptionUtil.getOptionContent(TenantOptionDict.ORDER_PRICING_SOURCE);
|
||||
if (OrderPricingSource.RETAIL_PRICE.getCode().equals(orderPricingSource)) {
|
||||
return R.ok(true);
|
||||
}
|
||||
return R.ok(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.openhis.web.adjustprice.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePriceListPageController
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/23 15:16
|
||||
* @Version 1.0
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/change/price/list")
|
||||
public class ChangePriceDataListPageController {
|
||||
|
||||
@Resource
|
||||
private IAdjustPriceService adjustPriceService;
|
||||
|
||||
/**
|
||||
* Desc: 查询 调价管理列表页面 分页查询当前人 提交的调价单
|
||||
*
|
||||
* @param adjustPriceManagerSearchParam
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param searchKey
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 15:47 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@GetMapping(value = "getPage")
|
||||
public R<?> getPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||
return this.adjustPriceService.searchChangePriceSubmitDataToPage(adjustPriceManagerSearchParam, pageNo,
|
||||
pageSize, searchKey, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据单据号 进行提交审核操作
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 09:38 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "updateStatusByApproval")
|
||||
public R<?> updateStatusByApproval(@RequestParam String busNo) {
|
||||
return this.adjustPriceService.updateExamineByApproval(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 作废 调价单数据
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 14:47 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "cancelChangePriceData")
|
||||
public R<?> cancelChangePriceData(@RequestParam String busNo) {
|
||||
return this.adjustPriceService.cancelChangePriceData(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
||||
*
|
||||
*
|
||||
* @Author raymond
|
||||
* @Date 08:47 2025/10/15
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "submitChangePriceData")
|
||||
public R<?> submitChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||
return adjustPriceService.submitChangePriceData(dataVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 药品调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByMed")
|
||||
public R<?> searchChangePriceDataByMed(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByMed(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 耗材调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByDevice")
|
||||
public R<?> searchChangePriceDataByDevice(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByDevice(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 诊疗调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByActivity")
|
||||
public R<?> searchChangePriceDataByActivity(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByActivity(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 挂号调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByHealth")
|
||||
public R<?> searchChangePriceDataByHealth(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByHealth(busNo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceDataVo
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/16 08:31
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class AdjustPriceDataVo {
|
||||
/**
|
||||
* 表ID
|
||||
*/
|
||||
private Long itemId;
|
||||
/**
|
||||
* 分类 0、药品;1、耗材;2、诊疗;3、挂号
|
||||
*/
|
||||
private Integer categoryType;
|
||||
/**
|
||||
* 改价原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 新进货价
|
||||
*/
|
||||
private BigDecimal newBuyingPrice;
|
||||
/**
|
||||
* 新售价
|
||||
*/
|
||||
private BigDecimal newRetailPrice;
|
||||
/**
|
||||
* 经手人
|
||||
*/
|
||||
private Long practitionerId;
|
||||
/**
|
||||
* 每个批次影响数量
|
||||
*/
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private BigDecimal totalQuantity;
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String itemTable;
|
||||
/**
|
||||
* 单据号
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String lotNumber;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unitCode;
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
private BigDecimal finalTotalQuantity;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceManagerSearchParam
|
||||
* @Description 改价管理 查询条件
|
||||
* @Author raymond
|
||||
* @Date 2025/10/24 16:23
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdjustPriceManagerSearchParam {
|
||||
|
||||
/** 审核状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 单据类型 */
|
||||
private Integer itemCategoryEnum;
|
||||
/**
|
||||
* 单据时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date applicantTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePricePageDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/31 17:35
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class ChangePriceDataDto {
|
||||
|
||||
/** 批次号 */
|
||||
private String originLotNumber;
|
||||
|
||||
/** 改价申请人id */
|
||||
private Long applicantId;
|
||||
|
||||
/** 目标枚举 药品、耗材、诊疗、挂号 */
|
||||
private Integer itemCategoryEnum;
|
||||
private String itemCategoryEnum_Text;
|
||||
|
||||
/** 药品ID、耗材ID、诊疗ID、挂号ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long itemId;
|
||||
/**
|
||||
* 获取名称
|
||||
*/
|
||||
private String itemName;
|
||||
/** 原进货价 */
|
||||
private BigDecimal originBuyingPrice;
|
||||
|
||||
/** 原零售价价格 */
|
||||
private BigDecimal originRetailPrice;
|
||||
|
||||
/** 当前品库存量 */
|
||||
private BigDecimal itemQuantity;
|
||||
|
||||
/** 当前业务批次号 */
|
||||
private String busNo;
|
||||
|
||||
/** 改价申请时间 */
|
||||
private Date applicantTime;
|
||||
|
||||
/** 新进货价 */
|
||||
private BigDecimal newBuyingPrice;
|
||||
|
||||
/** 新零售价 */
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
/** 物品计量单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 审批状态 */
|
||||
private Integer statusEnum;
|
||||
private Integer statusEnum_Text;
|
||||
|
||||
/** 批次号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 条件理由 */
|
||||
private String reason;
|
||||
|
||||
/** 零售价盈负差*/
|
||||
private BigDecimal differenceRetailPrice;
|
||||
/**进货价盈负差*/
|
||||
private BigDecimal differenceBuyingPrice;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 价格主表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long chargeId;
|
||||
/**
|
||||
* 调价表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long changePriceRecordId;
|
||||
|
||||
private String label;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String totalVolume;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePricePageDto
|
||||
* @Description 改价业务分页dto
|
||||
* @Author raymond
|
||||
* @Date 2025/11/1 22:53
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class ChangePricePageDto {
|
||||
|
||||
/** 单据号 */
|
||||
private String busNo;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 审批人 */
|
||||
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||
private Long approverId;
|
||||
private String approverId_dictText;
|
||||
|
||||
/** 审批时间 */
|
||||
private Date approvalTime;
|
||||
|
||||
/** 申请人 */
|
||||
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||
private Long applicantId;
|
||||
private String applicantId_dictText;
|
||||
|
||||
/** 申请时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date applicantTime;
|
||||
|
||||
/** 制单日期 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 备注 */
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 24、药品
|
||||
*/
|
||||
private Integer itemCategoryEnum;
|
||||
private String categoryEnum_enumText;
|
||||
|
||||
private BigDecimal originRetailPrice;
|
||||
private BigDecimal originBuyingPrice;
|
||||
private BigDecimal newBuyingPrice;
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName SupplyListDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/15 16:56
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class SupplyListDto {
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private Long supplyId;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplyName;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.openhis.web.adjustprice.mapper;
|
||||
|
||||
import com.openhis.web.adjustprice.dto.ChangePriceDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.adjustprice.dto.ChangePricePageDto;
|
||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||
import com.openhis.web.inventorymanage.dto.ReceiptPageDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
*
|
||||
* @Author raymond
|
||||
* @Date 14:37 2025/10/15
|
||||
* @return
|
||||
**/
|
||||
@Component
|
||||
public interface AdjustPriceMapper {
|
||||
/**
|
||||
* Desc: 查询单据审批分页列表
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param medTypeEnum
|
||||
* @param deviceTypeEnum
|
||||
* @param activityTypeEnum
|
||||
* @param healthTypeEnum
|
||||
* @Author raymond
|
||||
* @Date 16:01 2025/10/24
|
||||
* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.openhis.web.inventorymanage.dto.ReceiptPageDto>
|
||||
**/
|
||||
Page<ReceiptPageDto> selectInventoryReceiptPage(@Param("page") Page<ReceiptPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||
@Param("medTypeEnum") Integer medTypeEnum, @Param("deviceTypeEnum") Integer deviceTypeEnum,
|
||||
@Param("activityTypeEnum") Integer activityTypeEnum, @Param("healthTypeEnum") Integer healthTypeEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据当前人 ID 查询提交的调价申请记录
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param medCategory
|
||||
* @param deviceCategory
|
||||
* @param activityCategory
|
||||
* @param healthCategory
|
||||
* @param applicantId
|
||||
* @Author raymond
|
||||
* @Date 00:59 2025/11/2
|
||||
* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.openhis.web.adjustprice.dto.ChangePricePageDto>
|
||||
**/
|
||||
Page<ChangePricePageDto> searchChangePriceDataToPage(@Param("page") Page<ReceiptPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||
@Param("medCategory") Integer medCategory, @Param("deviceCategory") Integer deviceCategory,
|
||||
@Param("activityCategory") Integer activityCategory, @Param("healthCategory") Integer healthCategory,
|
||||
@Param("applicantId") Long applicantId);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByBusNo(@Param("busNo") String busNo, @Param("categoryEnum") Integer categoryEnum, @Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:34 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:33 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:32 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:31 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 审批单 审核中的数据
|
||||
* @param busNo
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 10:36 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchChangePriceRecordDataByBusNo(@Param("busNo") String busNo,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.openhis.web.adjustprice.mapper;
|
||||
|
||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* @Author raymond
|
||||
* @Date 14:37 2025/10/15
|
||||
* @return
|
||||
**/
|
||||
@Component
|
||||
public interface SupplyMapper {
|
||||
/**
|
||||
* Desc:
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 17:10 2025/10/15
|
||||
* @return java.util.List<com.openhis.web.paymentmanage.dto.SupplyListDto>
|
||||
**/
|
||||
List<SupplyListDto> searchAllSupplyList();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user