tb
This commit is contained in:
		| @@ -9,4 +9,15 @@ import com.openhis.administration.domain.OrganizationLocation; | ||||
|  * @author system | ||||
|  * @date 2025-02-25 | ||||
|  */ | ||||
| public interface IOrganizationLocationService extends IService<OrganizationLocation> {} | ||||
| public interface IOrganizationLocationService extends IService<OrganizationLocation> { | ||||
|  | ||||
|     /** | ||||
|      * 查询机构位置关系 | ||||
|      *  | ||||
|      * @param orgId 机构id | ||||
|      * @param categoryCode 发放类型 | ||||
|      * @return机构位置关系 | ||||
|      */ | ||||
|     OrganizationLocation getOrgLocByOrgIdAndCategoryCode(Long orgId, String categoryCode); | ||||
|  | ||||
| } | ||||
| @@ -1,7 +1,10 @@ | ||||
| package com.openhis.administration.service.impl; | ||||
|  | ||||
| import java.util.Date; | ||||
|  | ||||
| import org.springframework.stereotype.Service; | ||||
|  | ||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import com.openhis.administration.domain.OrganizationLocation; | ||||
| import com.openhis.administration.mapper.OrganizationLocationMapper; | ||||
| @@ -17,4 +20,20 @@ import com.openhis.administration.service.IOrganizationLocationService; | ||||
| public class OrganizationLocationServiceImpl extends ServiceImpl<OrganizationLocationMapper, OrganizationLocation> | ||||
|     implements IOrganizationLocationService { | ||||
|  | ||||
|     /** | ||||
|      * 查询机构位置关系 | ||||
|      * | ||||
|      * @param orgId 机构id | ||||
|      * @param categoryCode 发放类型 | ||||
|      * @return机构位置关系 | ||||
|      */ | ||||
|     @Override | ||||
|     public OrganizationLocation getOrgLocByOrgIdAndCategoryCode(Long orgId, String categoryCode) { | ||||
|         OrganizationLocation organizationLocation = baseMapper | ||||
|             .selectOne(new LambdaQueryWrapper<OrganizationLocation>().eq(OrganizationLocation::getOrganizationId, orgId) | ||||
|                 .eq(OrganizationLocation::getDistributionCategoryCode, categoryCode) | ||||
|                 .lt(OrganizationLocation::getStartTime, new Date()).gt(OrganizationLocation::getEndTime, new Date())); | ||||
|         return organizationLocation; | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -82,9 +82,14 @@ public class MedicationRequest extends HisBaseEntity { | ||||
|     /** 开方医生 */ | ||||
|     private Long practitionerId; | ||||
|  | ||||
|     /** 发放药房 */ | ||||
|     /** 所在位置 */ | ||||
|     private Long locationId; | ||||
|  | ||||
|     /** | ||||
|      * 发放药房 | ||||
|      */ | ||||
|     private Long performLocation; | ||||
|  | ||||
|     /** 发放科室 */ | ||||
|     private Long orgId; | ||||
|  | ||||
|   | ||||
| @@ -82,6 +82,9 @@ public class DeviceRequest extends HisBaseEntity { | ||||
|     /** 默认器材房 */ | ||||
|     private Long locationId; | ||||
|  | ||||
|     /** 发放耗材房 */ | ||||
|     private Long performLocation; | ||||
|  | ||||
|     /** 就诊id */ | ||||
|     private Long encounterId; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Wang.Huan
					Wang.Huan