器材,诊疗目录更新
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -81,7 +81,7 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
@@ -107,5 +107,4 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,4 +11,19 @@ import com.openhis.administration.domain.DeviceDefinition;
|
||||
*/
|
||||
public interface IDeviceDefinitionService extends IService<DeviceDefinition> {
|
||||
|
||||
/**
|
||||
* 新增器材目录
|
||||
*
|
||||
* @param deviceDefinition 耗材器材实体
|
||||
* @return
|
||||
*/
|
||||
boolean addDevice(DeviceDefinition deviceDefinition);
|
||||
|
||||
/**
|
||||
* 新增医保器材目录
|
||||
*
|
||||
* @param deviceDefinition 器材目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDevice(DeviceDefinition deviceDefinition);
|
||||
}
|
||||
@@ -1,19 +1,50 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.DeviceDefinition;
|
||||
import com.openhis.administration.mapper.DeviceDefinitionMapper;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 器材定义管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMapper, DeviceDefinition> implements IDeviceDefinitionService {
|
||||
@AllArgsConstructor
|
||||
public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMapper, DeviceDefinition>
|
||||
implements IDeviceDefinitionService {
|
||||
|
||||
private final DeviceDefinitionMapper deviceDefinitionMapper;
|
||||
|
||||
@Override
|
||||
public boolean addDevice(DeviceDefinition deviceDefinition) {
|
||||
// 根据器材编码判断器材是否存在
|
||||
List<DeviceDefinition> activityDefinitions = deviceDefinitionMapper.selectList(
|
||||
new LambdaQueryWrapper<DeviceDefinition>().eq(DeviceDefinition::getBusNo, deviceDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// 新增器材项目
|
||||
int insert = deviceDefinitionMapper.insert(deviceDefinition);
|
||||
if (insert != 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbDevice(DeviceDefinition deviceDefinition) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user