demo优化,新增init方法
This commit is contained in:
@@ -6,8 +6,8 @@ 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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -79,4 +79,90 @@ public class Medication extends HisBaseEntity {
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
/** 药品编号 */
|
||||
private Long code;
|
||||
|
||||
/** 药品名称 */
|
||||
private String name;
|
||||
|
||||
/** 适用范围 */
|
||||
private Integer domainEnum;
|
||||
|
||||
/** 药品版本 */
|
||||
private String version;
|
||||
|
||||
/** 英文药名 */
|
||||
private String nameEn;
|
||||
|
||||
/** 药品名称拼音码 */
|
||||
private String pyCode;
|
||||
|
||||
/** 药品五笔码 */
|
||||
private String wbCode;
|
||||
|
||||
/** 药品分类 */
|
||||
private Integer categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
|
||||
/** 商品名称拼音码 */
|
||||
private String merchandisePyCode;
|
||||
|
||||
/** 商品五笔码 */
|
||||
private String merchandiseWbCode;
|
||||
|
||||
/** 药品单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 最小单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 所含耗材 */
|
||||
private String comprisedText;
|
||||
|
||||
/** 成分 */
|
||||
private String ingredient;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 剂量形式 */
|
||||
private Integer doseFrom;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保是否对码 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybCode;
|
||||
|
||||
/** 药理作用分类 */
|
||||
private String pharmacologyCategoryCode;
|
||||
|
||||
/** 是否皮试 */
|
||||
private Integer skinTestFlag;
|
||||
|
||||
/** 是否为注射药物 */
|
||||
private Integer injectFlag;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
/** 是否限制使用 */
|
||||
private Integer restrictedFlag;
|
||||
|
||||
/** 限制使用范围 */
|
||||
private String restrictedScope;
|
||||
|
||||
/** 儿童用药标志 */
|
||||
private Integer childrenFlag;
|
||||
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.medication.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 药品信息详情
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class MedicationDetail extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 药品编码 */
|
||||
private Long medicationProductId;
|
||||
|
||||
/** 药品状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 所属科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 剂型 */
|
||||
private String doseFormCode;
|
||||
|
||||
/** 规格 */
|
||||
private String totalVolume;
|
||||
|
||||
/** 成分 */
|
||||
private String ingredientItem;
|
||||
|
||||
/** 是否为活性 */
|
||||
private Integer activeFlag;
|
||||
|
||||
/** 批次号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 生效日期 */
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 到期日期 */
|
||||
private Date expirationDate;
|
||||
|
||||
/** 用法 */
|
||||
private String methodCode;
|
||||
|
||||
/** 用药频次 */
|
||||
private String rateCode;
|
||||
|
||||
/** 单次剂量 */
|
||||
private BigDecimal dose;
|
||||
|
||||
/** 剂量单位 */
|
||||
private String doseUnitCode;
|
||||
|
||||
/** 单次最大剂量 */
|
||||
private BigDecimal maxUnit;
|
||||
|
||||
/** 药品定义 */
|
||||
private String definition;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.openhis.medication.mapper;
|
||||
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Mapper接口
|
||||
*
|
||||
@@ -14,4 +17,10 @@ import com.openhis.medication.domain.Medication;
|
||||
@Repository
|
||||
public interface MedicationMapper extends BaseMapper<Medication> {
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
List<MedicationDetail> selectDetailList();
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Service接口
|
||||
@@ -20,4 +21,11 @@ public interface IMedicationService extends IService<Medication> {
|
||||
* @return 药品信息列表
|
||||
*/
|
||||
List<Medication> getList(List<Long> medicationIdList);
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
List<MedicationDetail> getDetailList();
|
||||
}
|
||||
@@ -2,16 +2,17 @@ package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.mapper.MedicationMapper;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
@@ -22,9 +23,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medication> implements IMedicationService {
|
||||
|
||||
@Autowired
|
||||
private MedicationMapper medicationMapper;
|
||||
|
||||
/**
|
||||
* 查询药品信息列表
|
||||
*
|
||||
@@ -42,4 +45,15 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDetail> getDetailList() {
|
||||
return medicationMapper.selectDetailList();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,4 +4,42 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.medication.mapper.MedicationMapper">
|
||||
|
||||
<select id="selectDetailList" resultType="com.openhis.medication.domain.MedicationDetail">
|
||||
SELECT T1.id,
|
||||
T1.medication_product_id,
|
||||
T1.status_enum,
|
||||
T1.org_id,
|
||||
T1.dose_form_code,
|
||||
T1.total_volume,
|
||||
T1.ingredient_item,
|
||||
T1.active_flag,
|
||||
T1.lot_number,
|
||||
T1.effective_date,
|
||||
T1.expiration_date,
|
||||
T1.effective_date,
|
||||
T1.method_code,
|
||||
T1.rate_code,
|
||||
T1.dose,
|
||||
T1.dose_unit_code,
|
||||
T1.max_unit,
|
||||
T1.definition,
|
||||
T2.code,
|
||||
T2.name,
|
||||
T2.domain_enum,
|
||||
T2.name_en,
|
||||
T2.py_code,
|
||||
T2.wb_code,
|
||||
T2.category_code,
|
||||
T2.merchandise_name,
|
||||
T2.merchandise_py_code,
|
||||
T2.merchandise_wb_code,
|
||||
T2.unit_code,
|
||||
T2.min_unit_code,
|
||||
T2.part_percent,
|
||||
T2.dose_from
|
||||
FROM med_medication AS T1
|
||||
LEFT JOIN med_medication_definition AS T2
|
||||
ON T1.medication_product_id = T2.id
|
||||
WHERE T1.delete_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user