版本更新
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.appservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.web.common.dto.InventoryItemParam;
|
||||
import com.openhis.web.common.dto.LocationDto;
|
||||
import com.openhis.web.common.dto.SearchTraceNoParam;
|
||||
|
||||
/**
|
||||
* app常用接口
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
public interface ICommonService {
|
||||
|
||||
/**
|
||||
* 药房列表
|
||||
*
|
||||
* @return 药房列表
|
||||
*/
|
||||
List<LocationDto> getPharmacyList();
|
||||
|
||||
/**
|
||||
* 药房列表(库房用)
|
||||
*
|
||||
* @return 药房列表
|
||||
*/
|
||||
List<LocationDto> getInventoryPharmacyList();
|
||||
|
||||
/**
|
||||
* 药库列表
|
||||
*
|
||||
* @return 药库列表
|
||||
*/
|
||||
List<LocationDto> getCabinetList();
|
||||
|
||||
/**
|
||||
* 仓库列表
|
||||
*
|
||||
* @return 仓库列表
|
||||
*/
|
||||
List<LocationDto> getWarehouseList();
|
||||
|
||||
/**
|
||||
* 药库列表(库房用)
|
||||
*
|
||||
* @return 药库列表
|
||||
*/
|
||||
List<LocationDto> getInventoryCabinetList();
|
||||
|
||||
/**
|
||||
* 药房药库列表
|
||||
*
|
||||
* @return 药房药库列表
|
||||
*/
|
||||
List<LocationDto> getPharmacyCabinetList();
|
||||
|
||||
/**
|
||||
* 获取病区列表
|
||||
*
|
||||
* @param orgId 科室id
|
||||
* @return 病区列表
|
||||
*/
|
||||
List<LocationDto> getWardList(Long orgId);
|
||||
|
||||
/**
|
||||
* 库存项目下拉列表(药库业务使用)
|
||||
*
|
||||
* @param inventoryItemParam 查询条件
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 库存项目信息
|
||||
*/
|
||||
R<?> getInventoryItemList(InventoryItemParam inventoryItemParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize);
|
||||
|
||||
/**
|
||||
* 根据项目相关信息查询项目库存相关信息
|
||||
*
|
||||
* @param inventoryItemParam 项目id
|
||||
* @return 项目库存相关信息
|
||||
*/
|
||||
R<?> getInventoryItemInfo(InventoryItemParam inventoryItemParam);
|
||||
|
||||
/**
|
||||
* 科室列表
|
||||
*
|
||||
* @return 科室列表
|
||||
*/
|
||||
R<?> getDepartmentList();
|
||||
|
||||
/**
|
||||
* 科室列表
|
||||
*
|
||||
* @return 科室列表
|
||||
*/
|
||||
List<Organization> departmentList();
|
||||
|
||||
/**
|
||||
* 根据追溯码获取药品/耗材信息
|
||||
*
|
||||
* @param traceNoList 追溯码列表
|
||||
* @return 项目信息
|
||||
*/
|
||||
R<?> getItemInfoByTraceNo(List<String> traceNoList);
|
||||
|
||||
/**
|
||||
* 追溯码查询
|
||||
*
|
||||
* @param searchTraceNoParam 查询条件
|
||||
* @return 项目信息
|
||||
*/
|
||||
R<?> searchTraceNo(SearchTraceNoParam searchTraceNoParam);
|
||||
|
||||
/**
|
||||
* 查询费用性质
|
||||
*
|
||||
* @return 费用性质
|
||||
*/
|
||||
R<?> getContractMetadata();
|
||||
|
||||
/**
|
||||
* 根据科室查询护士
|
||||
*
|
||||
* @param orgId 科室id
|
||||
* @return 护士列表
|
||||
*/
|
||||
R<?> getNurseListByOrg(Long orgId);
|
||||
|
||||
/**
|
||||
* 根据父级位置id查询他所有的子集
|
||||
*
|
||||
* @param locationId 位置id
|
||||
* @param locationForm 位置类型
|
||||
* @return 位置列表
|
||||
*/
|
||||
List<LocationDto> getChildLocation(Long locationId, Integer locationForm);
|
||||
|
||||
/**
|
||||
* 查询登录者管理的病区
|
||||
*
|
||||
* @return 病区列表
|
||||
*/
|
||||
List<LocationDto> getPractitionerWard();
|
||||
}
|
||||
@@ -0,0 +1,454 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.appservice.impl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
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.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.TraceNoManage;
|
||||
import com.openhis.administration.mapper.TraceNoManageMapper;
|
||||
import com.openhis.administration.service.ILocationService;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.administration.service.IPractitionerRoleService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.mapper.ContractMapper;
|
||||
import com.openhis.web.chargemanage.dto.ContractMetadata;
|
||||
import com.openhis.web.common.appservice.ICommonService;
|
||||
import com.openhis.web.common.dto.*;
|
||||
import com.openhis.web.common.mapper.CommonAppMapper;
|
||||
import com.openhis.workflow.domain.InventoryItem;
|
||||
import com.openhis.workflow.service.IInventoryItemService;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
|
||||
/**
|
||||
* app常用接口
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@Service
|
||||
public class CommonServiceImpl implements ICommonService {
|
||||
|
||||
@Resource
|
||||
private TraceNoManageMapper traceNoManageMapper;
|
||||
|
||||
@Resource
|
||||
private CommonAppMapper commonAppMapper;
|
||||
|
||||
@Resource
|
||||
private ILocationService locationService;
|
||||
|
||||
@Resource
|
||||
private IPractitionerRoleService practitionerRoleService;
|
||||
|
||||
@Resource
|
||||
private IOrganizationService organizationService;
|
||||
|
||||
@Resource
|
||||
private IInventoryItemService iInventoryItemService;
|
||||
|
||||
@Resource
|
||||
private ContractMapper contractMapper;
|
||||
|
||||
/**
|
||||
* 获取药房列表
|
||||
*
|
||||
* @return 药房列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getPharmacyList() {
|
||||
|
||||
List<Location> pharmacyList = locationService.getPharmacyList();
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : pharmacyList) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药房列表(库房用)
|
||||
*
|
||||
* @return 药房列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getInventoryPharmacyList() {
|
||||
|
||||
// 用户id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 根据用户id获得管理库房信息
|
||||
List<Long> locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId);
|
||||
|
||||
List<Location> pharmacyList = locationService.getPharmacyList();
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : pharmacyList) {
|
||||
for (Long locationId : locationIds) {
|
||||
if (location.getId().equals(locationId)) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药库列表
|
||||
*
|
||||
* @return 药库列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getCabinetList() {
|
||||
List<Location> pharmacyList = locationService.getCabinetList();
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : pharmacyList) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取仓库列表
|
||||
*
|
||||
* @return 仓库列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getWarehouseList() {
|
||||
List<Location> pharmacyList = locationService.getWarehouseList();
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : pharmacyList) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药库列表(库房用)
|
||||
*
|
||||
* @return 药库列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getInventoryCabinetList() {
|
||||
// 用户id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 根据用户id获得管理库房信息
|
||||
List<Long> locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId);
|
||||
|
||||
List<Location> pharmacyList = locationService.getCabinetList();
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : pharmacyList) {
|
||||
for (Long locationId : locationIds) {
|
||||
if (location.getId().equals(locationId)) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 药房药库列表
|
||||
*
|
||||
* @return 药房药库列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getPharmacyCabinetList() {
|
||||
List<Location> pharmacyCabinetList = locationService.getPharmacyCabinetList();
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : pharmacyCabinetList) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病区列表
|
||||
*
|
||||
* @param orgId 科室id
|
||||
* @return 病区列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getWardList(Long orgId) {
|
||||
List<Location> getWardList = new ArrayList<>();
|
||||
if (orgId != null) {
|
||||
getWardList = locationService.getWardList(orgId);
|
||||
} else {
|
||||
getWardList = locationService.getWardList(null);
|
||||
}
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location location : getWardList) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(location, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 库存项目下拉列表(药库业务使用)
|
||||
*
|
||||
* @param inventoryItemParam 查询条件
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 库存项目信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> getInventoryItemList(InventoryItemParam inventoryItemParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize) {
|
||||
Integer purchaseFlag = inventoryItemParam.getPurchaseFlag();
|
||||
inventoryItemParam.setPurchaseFlag(null);
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<InventoryItemParam> queryWrapper = HisQueryUtils.buildQueryWrapper(inventoryItemParam, searchKey,
|
||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name, CommonConstants.FieldName.PyStr,
|
||||
CommonConstants.FieldName.WbStr)),
|
||||
null);
|
||||
// 查询库存项目信息
|
||||
IPage<InventoryItemDto> inventoryItems = commonAppMapper.selectInventoryItemList(new Page<>(pageNo, pageSize),
|
||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
||||
ItemType.MEDICINE.getValue(), ItemType.DEVICE.getValue(), purchaseFlag, ConditionCode.PURCHASE.getCode(),
|
||||
PublicationStatus.RETIRED.getValue(), queryWrapper);
|
||||
List<InventoryItemDto> inventoryItemDtoList = inventoryItems.getRecords();
|
||||
inventoryItemDtoList.forEach(e -> {
|
||||
// 项目类型
|
||||
e.setItemType_enumText(EnumUtils.getInfoByValue(ItemType.class, e.getItemType()));
|
||||
});
|
||||
for (InventoryItemDto inventoryItem : inventoryItemDtoList) {
|
||||
List<UnitDto> unitList = new ArrayList<>();
|
||||
UnitDto unitDto = new UnitDto();
|
||||
// 单位列表
|
||||
unitDto.setUnitCode(inventoryItem.getUnitCode()).setMinUnitCode(inventoryItem.getMinUnitCode());
|
||||
unitList.add(unitDto);
|
||||
inventoryItem.setUnitList(unitList);
|
||||
}
|
||||
return R.ok(inventoryItemDtoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目相关信息查询项目库存相关信息
|
||||
*
|
||||
* @param inventoryItemParam 项目id
|
||||
* @return 项目库存相关信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> getInventoryItemInfo(InventoryItemParam inventoryItemParam) {
|
||||
// 查询项目库存相关信息
|
||||
List<LocationInventoryDto> locationInventoryDtoList = commonAppMapper.selectInventoryItemInfo(
|
||||
inventoryItemParam.getOrgLocationId(), CommonConstants.TableName.MED_MEDICATION_DEFINITION,
|
||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, inventoryItemParam.getObjLocationId(),
|
||||
inventoryItemParam.getLotNumber(), inventoryItemParam.getItemId(), ConditionCode.PURCHASE.getCode());
|
||||
|
||||
// 医保编码和生产厂家校验
|
||||
for (LocationInventoryDto dto : locationInventoryDtoList) {
|
||||
if (StringUtils.isNotEmpty(dto.getYbNo()) && StringUtils.isEmpty(dto.getManufacturer())) {
|
||||
return R.fail("生产厂家不能为空,请到药品目录维护");
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok(locationInventoryDtoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 科室列表
|
||||
*
|
||||
* @return 科室列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getDepartmentList() {
|
||||
return R.ok(organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 科室列表
|
||||
*
|
||||
* @return 科室列表
|
||||
*/
|
||||
@Override
|
||||
public List<Organization> departmentList(){
|
||||
return organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据追溯码获取药品/耗材信息
|
||||
*
|
||||
* @param traceNoList 追溯码列表
|
||||
* @return 项目信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> getItemInfoByTraceNo(List<String> traceNoList) {
|
||||
Map<String, String> traceNoMap = new HashMap<>();
|
||||
for (String traceNo : traceNoList) {
|
||||
if (traceNo != null && !StringUtils.isEmpty(traceNo)) {
|
||||
// 数据源更改
|
||||
InventoryItem inventoryItem = iInventoryItemService.getOne(
|
||||
new LambdaQueryWrapper<InventoryItem>().like(InventoryItem::getTraceNo, traceNo).last("LIMIT 1"));
|
||||
if (inventoryItem != null) {
|
||||
String itemId = inventoryItem.getItemId().toString();
|
||||
// TraceNoManage traceNoManage = commonAppMapper.getInfoByTraceNo("%" + traceNo + "%");
|
||||
// if (traceNoManage != null) {
|
||||
// String itemId = traceNoManage.getItemId().toString();
|
||||
// 如果map中已经存在该itemId,拼接traceNo,否则直接添加
|
||||
if (traceNoMap.containsKey(itemId)) {
|
||||
String existingTraceNos = traceNoMap.get(itemId);
|
||||
traceNoMap.put(itemId, existingTraceNos + CommonConstants.Common.COMMA + traceNo);
|
||||
} else {
|
||||
traceNoMap.put(itemId, traceNo);
|
||||
}
|
||||
} else {
|
||||
return R.ok(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok(traceNoMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 追溯码查询
|
||||
*
|
||||
* @param searchTraceNoParam 查询条件
|
||||
* @return 项目信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> searchTraceNo(SearchTraceNoParam searchTraceNoParam) {
|
||||
List<TraceNoManage> traceNoManageList = new ArrayList<>();
|
||||
Map<String, String> traceNoMap = new HashMap<>();
|
||||
// 判断传入的是药品还是耗材,查询追溯码状态只有进的数据
|
||||
if (searchTraceNoParam.getItemType().equals(ItemType.MEDICINE.getValue())) {
|
||||
traceNoManageList = traceNoManageMapper.getItemTraceNoInfo(
|
||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, searchTraceNoParam.getItemId(),
|
||||
searchTraceNoParam.getLocationId(), searchTraceNoParam.getLotNumber());
|
||||
} else if (searchTraceNoParam.getItemType().equals(ItemType.DEVICE.getValue())) {
|
||||
traceNoManageList = traceNoManageMapper.getItemTraceNoInfo(CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
||||
searchTraceNoParam.getItemId(), searchTraceNoParam.getLocationId(), searchTraceNoParam.getLotNumber());
|
||||
}
|
||||
if (traceNoManageList != null) {
|
||||
for (TraceNoManage traceNoItem : traceNoManageList) {
|
||||
traceNoMap.put(traceNoItem.getItemId().toString(), traceNoItem.getTraceNo());
|
||||
}
|
||||
}
|
||||
return R.ok(traceNoMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询费用性质
|
||||
*
|
||||
* @return 费用性质
|
||||
*/
|
||||
@Override
|
||||
public R<?> getContractMetadata() {
|
||||
// TODO: Contract表的基础数据维护还没做,具体不知道状态字段的取值是什么,先查询默认值为0的数据
|
||||
List<Contract> ContractList =
|
||||
contractMapper.selectList(new LambdaQueryWrapper<Contract>().eq(Contract::getStatusEnum, 0));
|
||||
// 复制同名字段并 return
|
||||
return R.ok(ContractList.stream().map(contract -> {
|
||||
ContractMetadata metadata = new ContractMetadata();
|
||||
try {
|
||||
BeanUtils.copyProperties(contract, metadata);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return metadata;
|
||||
}).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据科室查询护士
|
||||
*
|
||||
* @param orgId 科室id
|
||||
* @return 护士列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getNurseListByOrg(Long orgId) {
|
||||
return R.ok(practitionerRoleService.getNurseList(orgId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级位置id查询他所有的子集
|
||||
*
|
||||
* @param locationId 位置id
|
||||
* @param locationForm 位置类型
|
||||
* @return 位置列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getChildLocation(Long locationId, Integer locationForm) {
|
||||
// 获取当前位置信息
|
||||
Location location = locationService.getById(locationId);
|
||||
// 查询所有子集位置
|
||||
List<Location> childLocations = locationService.list(new LambdaQueryWrapper<Location>()
|
||||
.likeRight(Location::getBusNo, location.getBusNo()).eq(Location::getFormEnum, locationForm)
|
||||
.ne(Location::getStatusEnum, LocationStatus.INACTIVE.getValue()));
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location childLocation : childLocations) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(childLocation, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
// 8. 返回成功响应
|
||||
return locationDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询登录者管理的病区
|
||||
*
|
||||
* @return 病区列表
|
||||
*/
|
||||
@Override
|
||||
public List<LocationDto> getPractitionerWard() {
|
||||
// 查询当前登录者管理的病区
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
List<Long> locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId);
|
||||
List<Location> locationList = locationService.getLocationList(locationIds);
|
||||
List<Location> wardList = new ArrayList<>();
|
||||
for (Location ward : locationList) {
|
||||
if (LocationForm.WARD.getValue().equals(ward.getFormEnum())) {
|
||||
wardList.add(ward);
|
||||
}
|
||||
}
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
LocationDto locationDto;
|
||||
for (Location ward : wardList) {
|
||||
locationDto = new LocationDto();
|
||||
BeanUtils.copyProperties(ward, locationDto);
|
||||
locationDtoList.add(locationDto);
|
||||
}
|
||||
return locationDtoList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.common.appservice.ICommonService;
|
||||
import com.openhis.web.common.dto.InventoryItemParam;
|
||||
import com.openhis.web.common.dto.LocationDto;
|
||||
import com.openhis.web.common.dto.SearchTraceNoParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* app常用接口
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app-common")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class CommonAppController {
|
||||
|
||||
@Resource
|
||||
private ICommonService commonService;
|
||||
|
||||
/**
|
||||
* 药房列表
|
||||
*
|
||||
* @return 药房列表
|
||||
*/
|
||||
@GetMapping(value = "/pharmacy-list")
|
||||
public R<?> getPharmacyList() {
|
||||
return R.ok(commonService.getPharmacyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 药房列表(库房用)
|
||||
*
|
||||
* @return 药房列表
|
||||
*/
|
||||
@GetMapping(value = "/inventory-pharmacy-list")
|
||||
public R<?> getInventoryPharmacyList() {
|
||||
return R.ok(commonService.getInventoryPharmacyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 药库列表
|
||||
*
|
||||
* @return 药库列表
|
||||
*/
|
||||
@GetMapping(value = "/cabinet-list")
|
||||
public R<?> getCabinetList() {
|
||||
return R.ok(commonService.getCabinetList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 药库列表(库房用)
|
||||
*
|
||||
* @return 药库列表
|
||||
*/
|
||||
@GetMapping(value = "/inventory-cabinet-list")
|
||||
public R<?> getInventoryCabinetList() {
|
||||
return R.ok(commonService.getInventoryCabinetList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 药房药库列表
|
||||
*
|
||||
* @return 药房药库列表
|
||||
*/
|
||||
@GetMapping(value = "/pharmacy-cabinet-list")
|
||||
public R<?> getPharmacyCabinetList() {
|
||||
return R.ok(commonService.getPharmacyCabinetList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 病区列表
|
||||
*
|
||||
* @return 病区列表
|
||||
*/
|
||||
@GetMapping(value = "/ward-list")
|
||||
public R<?> getWardList(@RequestParam(value = "orgId", required = false) Long orgId) {
|
||||
return R.ok(commonService.getWardList(orgId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 科室列表
|
||||
*
|
||||
* @return 科室列表
|
||||
*/
|
||||
@GetMapping(value = "/department-list")
|
||||
public R<?> getDepartmentList() {
|
||||
return commonService.getDepartmentList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 库存项目下拉列表(药库业务使用)
|
||||
*
|
||||
* @param inventoryItemParam 查询条件
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 库存项目信息
|
||||
*/
|
||||
@GetMapping(value = "/inventory-item")
|
||||
public R<?> getInventoryItemList(InventoryItemParam inventoryItemParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "50") Integer pageSize) {
|
||||
return commonService.getInventoryItemList(inventoryItemParam, searchKey, pageNo, pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目相关信息查询项目库存相关信息
|
||||
*
|
||||
* @param inventoryItemParam 项目id
|
||||
* @return 项目库存相关信息
|
||||
*/
|
||||
@GetMapping(value = "/inventory-item-info")
|
||||
public R<?> getInventoryItemInfo(InventoryItemParam inventoryItemParam) {
|
||||
return commonService.getInventoryItemInfo(inventoryItemParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据追溯码获取药品/耗材信息
|
||||
*
|
||||
* @param traceNoList 追溯码列表
|
||||
* @return 项目信息
|
||||
*/
|
||||
@GetMapping(value = "/item-trace-no")
|
||||
public R<?> getItemInfoByTraceNo(@RequestParam List<String> traceNoList) {
|
||||
return commonService.getItemInfoByTraceNo(traceNoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 追溯码查询
|
||||
*
|
||||
* @param searchTraceNoParam 查询条件
|
||||
* @return 项目信息
|
||||
*/
|
||||
@GetMapping(value = "/search-trace-no")
|
||||
public R<?> searchTraceNo(SearchTraceNoParam searchTraceNoParam) {
|
||||
return commonService.searchTraceNo(searchTraceNoParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询费用性质
|
||||
*
|
||||
* @return 费用性质
|
||||
*/
|
||||
@GetMapping(value = "/contract-list")
|
||||
public R<?> getContractList() {
|
||||
return commonService.getContractMetadata();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据科室查询护士
|
||||
*
|
||||
* @param orgId 科室id
|
||||
* @return 护士列表
|
||||
*/
|
||||
@GetMapping(value = "/nurse-list")
|
||||
public R<?> getNurseListByOrg(Long orgId) {
|
||||
return commonService.getNurseListByOrg(orgId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级位置id查询他所有的子集
|
||||
*
|
||||
* @param locationId 位置id
|
||||
* @param locationForm 位置类型
|
||||
* @return 位置列表
|
||||
*/
|
||||
@GetMapping(value = "/child-location-list")
|
||||
public List<LocationDto> getChildLocation(Long locationId, Integer locationForm) {
|
||||
return commonService.getChildLocation(locationId, locationForm);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询登录者管理的病区
|
||||
*
|
||||
* @return 病区列表
|
||||
*/
|
||||
@GetMapping(value = "/practitioner-ward")
|
||||
public List<LocationDto> getPractitionerWard() {
|
||||
return commonService.getPractitionerWard();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
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.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 库存项目dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InventoryItemDto {
|
||||
|
||||
/** 项目类型 */
|
||||
private Integer itemType; // 1:药品 , 2: 耗材 , 3:诊疗
|
||||
private String itemType_enumText;
|
||||
|
||||
/**
|
||||
* 药品/耗材类型
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 采购单价 */
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
/** 项目定义ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long definitionId;
|
||||
|
||||
/** 项目名称 */
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String itemBusNo;
|
||||
|
||||
/** 拼音码 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔码 */
|
||||
private String wbStr;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 商品名称 */
|
||||
private String productName;
|
||||
|
||||
/** 包装单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String unitCode;
|
||||
private String unitCode_dictText;
|
||||
|
||||
/** 最小单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String minUnitCode;
|
||||
private String minUnitCode_dictText;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String volume;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 生产厂家
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 项目对应表名
|
||||
*/
|
||||
private String itemTableName;
|
||||
|
||||
/**
|
||||
* 产品批号
|
||||
*/
|
||||
private String lotNumber;
|
||||
|
||||
/** 原仓库 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgLocation;
|
||||
|
||||
/**
|
||||
* 单位列表
|
||||
*/
|
||||
private List<UnitDto> unitList;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 库存项目筛选条件
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-19
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InventoryItemParam {
|
||||
|
||||
/** 项目类型 */
|
||||
private Integer itemType; // 1:药品 , 2: 耗材 , 3:诊疗
|
||||
|
||||
/** 项目id */
|
||||
private Long itemId;
|
||||
|
||||
/** 项目名称 */
|
||||
private String name;
|
||||
|
||||
/** 拼音码 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔码 */
|
||||
private String wbStr;
|
||||
|
||||
/** 源仓库 */
|
||||
private Long orgLocationId;
|
||||
|
||||
/** 目的仓库 */
|
||||
private Long objLocationId;
|
||||
|
||||
/** 采购标志 */
|
||||
private Integer purchaseFlag;
|
||||
|
||||
/**
|
||||
* 产品批号
|
||||
*/
|
||||
private String lotNumber;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 位置 dto
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LocationDto {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 状态编码
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
|
||||
/**
|
||||
* 操作状态
|
||||
*/
|
||||
private Integer operationalEnum;
|
||||
|
||||
/**
|
||||
* 模式编码
|
||||
*/
|
||||
private Integer modeEnum;
|
||||
|
||||
/**
|
||||
* 功能编码
|
||||
*/
|
||||
private String typeJson;
|
||||
|
||||
/**
|
||||
* 拼音码
|
||||
*/
|
||||
private String pyStr;
|
||||
|
||||
/**
|
||||
* 五笔码
|
||||
*/
|
||||
private String wbStr;
|
||||
|
||||
/**
|
||||
* 物理形式枚举
|
||||
*/
|
||||
private Integer formEnum;
|
||||
|
||||
/**
|
||||
* 机构编码
|
||||
*/
|
||||
private Long organizationId;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer displayOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.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;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 库存项目所在对应库房信息
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LocationInventoryDto {
|
||||
|
||||
/** 物理表名 */
|
||||
private String itemTable;
|
||||
|
||||
/** 实例id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long itemId;
|
||||
|
||||
/** 采购单价 */
|
||||
private BigDecimal price;
|
||||
|
||||
/** 产品批号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 生产日期 */
|
||||
private Date productionDate;
|
||||
|
||||
/** 失效日期 */
|
||||
private Date expirationDate;
|
||||
|
||||
/** 仓库类型 */
|
||||
private String formEnum;
|
||||
|
||||
/** 库位 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationStoreId;
|
||||
|
||||
/** 仓库 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 库房名称 */
|
||||
private String locationName;
|
||||
|
||||
/** 货位名称 */
|
||||
private String locationStoreName;
|
||||
|
||||
/** 原仓库数量(最小单位) */
|
||||
private BigDecimal orgQuantity;
|
||||
|
||||
/** 目的仓库数量(最小单位) */
|
||||
private BigDecimal objQuantity;
|
||||
|
||||
/** 供应商id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long supplierId;
|
||||
|
||||
/** 供应商名称 */
|
||||
private String supplierName;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 生产厂家 */
|
||||
private String manufacturer;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 执行信息dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PerformInfoDto {
|
||||
|
||||
/** 请求id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long requestId;
|
||||
|
||||
/** 医嘱项目id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long itemId;
|
||||
|
||||
/** 住院id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 发放id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dispenseId;
|
||||
|
||||
/** 执行id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long procedureId;
|
||||
|
||||
/** 请求所在表 */
|
||||
private String requestTable;
|
||||
|
||||
/** 执行位置 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 执行开始时间 */
|
||||
private Date exeStartTime;
|
||||
|
||||
/** 执行结束时间 */
|
||||
private Date exeEndTime;
|
||||
|
||||
/** 组号 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long groupId;
|
||||
|
||||
/** 执行时间列表 */
|
||||
private List<String> executeTimes;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 执行记录dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PerformRecordDto {
|
||||
|
||||
/** 执行id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long procedureId;
|
||||
|
||||
/** 执行状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 执行时间 */
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 执行位置 */
|
||||
private String locationName;
|
||||
|
||||
/** 执行科室 */
|
||||
private String orgName;
|
||||
|
||||
/** 项目id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long requestId;
|
||||
|
||||
/** 执行开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 执行结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 执行人 */
|
||||
private String practitionerName;
|
||||
|
||||
/** 取消执行id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long refundId;
|
||||
|
||||
/** 操作时间 */
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 追溯码查询条件
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SearchTraceNoParam {
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private Integer itemType; // 1:药品 , 2: 耗材 , 3:诊疗
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 药房药库
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 产品批号
|
||||
*/
|
||||
private String lotNumber;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 单位列表
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UnitDto {
|
||||
|
||||
|
||||
/** 包装单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String unitCode;
|
||||
private String unitCode_dictText;
|
||||
|
||||
/** 最小单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String minUnitCode;
|
||||
private String minUnitCode_dictText;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 单位数量列表
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UnitQuantityDto {
|
||||
|
||||
/** 当前库存数量(最小单位) */
|
||||
private BigDecimal minQuantity;
|
||||
|
||||
/** 当前库存数量(包装单位) */
|
||||
private BigDecimal maxQuantity;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.common.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.administration.domain.TraceNoManage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.common.dto.InventoryItemDto;
|
||||
import com.openhis.web.common.dto.InventoryItemParam;
|
||||
import com.openhis.web.common.dto.LocationInventoryDto;
|
||||
|
||||
/**
|
||||
* app常用接口 mapper
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-01
|
||||
*/
|
||||
@Repository
|
||||
public interface CommonAppMapper {
|
||||
|
||||
/**
|
||||
* 查询库存项目信息
|
||||
*
|
||||
* @param page 分页
|
||||
* @param medicationTableName 药品表名
|
||||
* @param deviceTableName 耗材表名
|
||||
* @param purchaseFlag 是否入库
|
||||
* @param purchase 命中条件:采购
|
||||
* @param retired 停用
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 库存项目信息
|
||||
*/
|
||||
IPage<InventoryItemDto> selectInventoryItemList(@Param("page") Page<InventoryItemDto> page,
|
||||
@Param("medicationTableName") String medicationTableName, @Param("deviceTableName") String deviceTableName,
|
||||
@Param("medicine") Integer medicine, @Param("device") Integer device,
|
||||
@Param("purchaseFlag") Integer purchaseFlag, @Param("purchase") String purchase,
|
||||
@Param("retired") Integer retired, @Param(Constants.WRAPPER) QueryWrapper<InventoryItemParam> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询项目库存相关信息
|
||||
*
|
||||
* @param itemId 项目id
|
||||
* @param lotNumber 批号
|
||||
* @param orgLocationId 源仓库
|
||||
* @param objLocationId 目的仓库
|
||||
* @param purchase 价格命中条件:采购
|
||||
* @return 项目库存相关信息
|
||||
*/
|
||||
List<LocationInventoryDto> selectInventoryItemInfo(@Param("orgLocationId") Long orgLocationId,
|
||||
@Param("medicationTableName") String medicationTableName, @Param("deviceTableName") String deviceTableName,
|
||||
@Param("objLocationId") Long objLocationId, @Param("lotNumber") String lotNumber, @Param("itemId") Long itemId,
|
||||
@Param("purchase") String purchase);
|
||||
|
||||
/**
|
||||
* 查询追溯码信息
|
||||
*
|
||||
* @param traceNo 追溯码
|
||||
* @return
|
||||
*/
|
||||
TraceNoManage getInfoByTraceNo(@Param("traceNo") String traceNo);
|
||||
}
|
||||
Reference in New Issue
Block a user