Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
		| @@ -10,5 +10,21 @@ import com.openhis.administration.domain.Organization; | ||||
|  * @date 2025-02-21 | ||||
|  */ | ||||
| public interface IOrganizationService extends IService<Organization> { | ||||
|     boolean activeChange(Long orgId); | ||||
|  | ||||
|     /** | ||||
|      * 机构启用 | ||||
|      * | ||||
|      * @param orgId 机构信息id | ||||
|      * @return 操作结果 | ||||
|      */ | ||||
|     boolean activeOrg(Long orgId); | ||||
|  | ||||
|     /** | ||||
|      * 机构停用 | ||||
|      * | ||||
|      * @param orgId 机构信息id | ||||
|      * @return 操作结果 | ||||
|      */ | ||||
|     boolean inactiveOrg(Long orgId); | ||||
|  | ||||
| } | ||||
| @@ -1,8 +1,8 @@ | ||||
| package com.openhis.administration.service.impl; | ||||
|  | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
|  | ||||
| import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import com.openhis.administration.domain.Organization; | ||||
| import com.openhis.administration.mapper.OrganizationMapper; | ||||
| @@ -19,29 +19,30 @@ import com.openhis.common.enums.AccountStatus; | ||||
| public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization> | ||||
|     implements IOrganizationService { | ||||
|  | ||||
|     @Autowired | ||||
|     private OrganizationMapper organizationMapper; | ||||
|  | ||||
|     /** | ||||
|      * 机构启用 | ||||
|      * | ||||
|      * @param orgId 机构信息id | ||||
|      * @return 操作结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public boolean activeChange(Long orgId) { | ||||
|         if (orgId != null) { | ||||
|             Organization organization = organizationMapper.selectById(orgId); | ||||
|             if (organization != null) { | ||||
|                 Integer activeFlag  = organization.getActiveFlag(); | ||||
|                 switch (activeFlag ) { | ||||
|                     case 1: | ||||
|                         organization.setActiveFlag(AccountStatus.INACTIVE.getValue()); | ||||
|                         break; | ||||
|                     case 2: | ||||
|                         organization.setActiveFlag(AccountStatus.ACTIVE.getValue()); | ||||
|                         break; | ||||
|                     default: | ||||
|                         return false; | ||||
|                 } | ||||
|                 organizationMapper.updateById(organization); | ||||
|                 return true; | ||||
|             } | ||||
|         } | ||||
|         return false; | ||||
|     public boolean activeOrg(Long orgId) { | ||||
|         int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId) | ||||
|             .set(Organization::getActiveFlag, AccountStatus.ACTIVE.getValue())); | ||||
|         return updateCount > 0; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 机构停用 | ||||
|      * | ||||
|      * @param orgId 机构信息id | ||||
|      * @return 操作结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public boolean inactiveOrg(Long orgId) { | ||||
|         int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId) | ||||
|             .set(Organization::getActiveFlag, AccountStatus.INACTIVE.getValue())); | ||||
|         return updateCount > 0; | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -151,9 +151,6 @@ public class MedicationRequest extends HisBaseEntity { | ||||
|     /** 单次最大剂量 */ | ||||
|     private BigDecimal maxDose; | ||||
|  | ||||
|     /** 发药id */ | ||||
|     private Long dispenseId; | ||||
|  | ||||
|     /** 首次用量 */ | ||||
|     private BigDecimal firstDose; | ||||
|  | ||||
|   | ||||
| @@ -55,7 +55,7 @@ public class ServiceRequest extends HisBaseEntity { | ||||
|     /** 是否执行 */ | ||||
|     private Integer performFlag; | ||||
|  | ||||
|     /** 请求code */ | ||||
|     /** 诊疗定义id */ | ||||
|     private Long activityId; | ||||
|  | ||||
|     /** 数量 */ | ||||
|   | ||||
| @@ -31,6 +31,9 @@ public class ServiceRequestDetail extends HisBaseEntity { | ||||
|     /** 申请主表id */ | ||||
|     private Long serviceReqId; | ||||
|  | ||||
|     /** 类型编码 */ | ||||
|     private String typeCode; | ||||
|  | ||||
|     /** 订单相关表 */ | ||||
|     private String orderDetailTable; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 liuhongrui
					liuhongrui