This commit is contained in:
liuhongrui
2025-03-13 10:56:12 +08:00
11 changed files with 303 additions and 203 deletions

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -151,9 +151,6 @@ public class MedicationRequest extends HisBaseEntity {
/** 单次最大剂量 */
private BigDecimal maxDose;
/** 发药id */
private Long dispenseId;
/** 首次用量 */
private BigDecimal firstDose;

View File

@@ -55,7 +55,7 @@ public class ServiceRequest extends HisBaseEntity {
/** 是否执行 */
private Integer performFlag;
/** 请求code */
/** 诊疗定义id */
private Long activityId;
/** 数量 */

View File

@@ -31,6 +31,9 @@ public class ServiceRequestDetail extends HisBaseEntity {
/** 申请主表id */
private Long serviceReqId;
/** 类型编码 */
private String typeCode;
/** 订单相关表 */
private String orderDetailTable;