Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.core.common.biz;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HisBaseMapper<T> extends BaseMapper<T> {
|
||||
|
||||
/**
|
||||
* 根据ID逻辑删除单条记录
|
||||
*/
|
||||
default int logicalDelById(Long id) {
|
||||
String tableName = getTableName();
|
||||
return logicalDelById(tableName, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID列表批量逻辑删除记录
|
||||
*/
|
||||
default int logicalDelByIds(List<Long> ids) {
|
||||
String tableName = getTableName();
|
||||
return logicalDelByIds(tableName, ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据 UpdateWrapper 逻辑删除记录
|
||||
*/
|
||||
default int logicalDelByWrapper(LambdaUpdateWrapper<T> updateWrapper) {
|
||||
String tableName = getTableName();
|
||||
return logicalDelByWrapper(updateWrapper, tableName);
|
||||
}
|
||||
|
||||
@Update("UPDATE ${tableName} SET delete_flag = 1 WHERE id = #{id}")
|
||||
int logicalDelById(@Param("tableName") String tableName, @Param("id") Long id);
|
||||
|
||||
@Update({
|
||||
"<script>",
|
||||
"UPDATE ${tableName} SET delete_flag = 1 WHERE id IN",
|
||||
"<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
|
||||
"#{id}",
|
||||
"</foreach>",
|
||||
"</script>"
|
||||
})
|
||||
int logicalDelByIds(@Param("tableName") String tableName, @Param("ids") List<Long> ids);
|
||||
|
||||
@Update("UPDATE ${tableName} SET delete_flag = 1 ${ew.customSqlSegment}")
|
||||
int logicalDelByWrapper(@Param(Constants.WRAPPER) LambdaUpdateWrapper<T> updateWrapper, @Param("tableName") String tableName);
|
||||
|
||||
/**
|
||||
* 获取表名
|
||||
*/
|
||||
default String getTableName() {
|
||||
TableName tableNameAnnotation = AnnotationUtils.findAnnotation(this.getClass(), TableName.class);
|
||||
if (tableNameAnnotation == null) {
|
||||
throw new RuntimeException("Table name annotation not found on Mapper interface");
|
||||
}
|
||||
return tableNameAnnotation.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.core.common.biz;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HisBaseService<T> extends IService<T> {
|
||||
|
||||
/**
|
||||
* 根据ID逻辑删除单条记录
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean logicalDelById(Long id);
|
||||
|
||||
/**
|
||||
* 根据ID列表批量逻辑删除记录
|
||||
*
|
||||
* @param ids 主键ID列表
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean logicalDelByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据条件逻辑删除记录
|
||||
*
|
||||
* @param updateWrapper 更新条件(Lambda形式)
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean logicalDelByWrapper(LambdaUpdateWrapper<T> updateWrapper);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.core.common.biz;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HisBaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements HisBaseService<T> {
|
||||
|
||||
@Override
|
||||
public boolean logicalDelById(Long id) {
|
||||
return ((HisBaseMapper<T>) baseMapper).logicalDelById(id) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean logicalDelByIds(List<Long> ids) {
|
||||
return ((HisBaseMapper<T>) baseMapper).logicalDelByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean logicalDelByWrapper(LambdaUpdateWrapper<T> updateWrapper) {
|
||||
return ((HisBaseMapper<T>) baseMapper).logicalDelByWrapper(updateWrapper) > 0;
|
||||
}
|
||||
}
|
||||
@@ -37,16 +37,10 @@ public class HisBaseEntity implements Serializable {
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 租户ID */
|
||||
private Integer tenantId;
|
||||
|
||||
/** 删除标识 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 测试标识 */
|
||||
private Integer testFlag;
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
|
||||
import com.core.common.utils.spring.SpringUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* 获取i18n资源文件
|
||||
@@ -22,4 +25,10 @@ public class MessageUtils {
|
||||
MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
|
||||
return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
public static String createMessage(String id, @Nullable Object[] params) {
|
||||
MessageSource messageSource = (MessageSource) SpringContextUtils.getApplicationContext().getBean(MessageSource.class);
|
||||
String messageConvert = messageSource.getMessage(id, params, Locale.getDefault());
|
||||
return messageConvert;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.core.common.utils;
|
||||
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@Component
|
||||
public class SpringContextUtils implements ApplicationContextAware {
|
||||
|
||||
private static ApplicationContext applicationContext;
|
||||
|
||||
public SpringContextUtils() {
|
||||
}
|
||||
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
SpringContextUtils.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
public static HttpServletRequest getHttpServletRequest() {
|
||||
return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
}
|
||||
|
||||
public static HttpServletResponse getHttpServletResponse() {
|
||||
return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getResponse();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,6 +30,11 @@
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>2.12.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.openhis.web.datadictionary.assembler;
|
||||
|
||||
public class DiseaseManagementAssembler {
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseInDto;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* TODO:病种目录
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/DataDictionary-DiseaseManagement")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class DiseaseManagementController {
|
||||
private final IConditionDefinitionService iConditionDefinitionService;
|
||||
|
||||
/**
|
||||
* 病种目录分类查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/GetDiseaseCategory")
|
||||
public List<ConditionDefinition> GetDiseaseCategory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 病种目录查询
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/GetDiseaseList")
|
||||
public List<ConditionDefinition> GetDiseaseList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 病种目录编辑
|
||||
@PutMapping("/EditDisease")
|
||||
void EditDisease() {}
|
||||
|
||||
// 新增外来病种目录
|
||||
@PostMapping("/AddDisease")
|
||||
void AddDisease(DiseaseInDto diseaseInDto) {
|
||||
ConditionDefinition conditionDefinition = new ConditionDefinition();
|
||||
BeanUtils.copyProperties(diseaseInDto,conditionDefinition);
|
||||
iConditionDefinitionService.AddDisease(conditionDefinition);
|
||||
}
|
||||
|
||||
// 新增医保病种目录
|
||||
@PostMapping("/AddYbDisease")
|
||||
void AddYbDisease(@RequestParam int id) {}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 病种目录列表 dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseInDto {
|
||||
/** 所属分类 */
|
||||
private Integer sourceEnum;
|
||||
|
||||
/** 编码 */
|
||||
private String code;
|
||||
|
||||
/** 诊断名称 */
|
||||
private String name;
|
||||
|
||||
/** 诊断名称拼音 */
|
||||
private String pyCode;
|
||||
|
||||
/** 诊断名称五笔拼音 */
|
||||
private String wbCode;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybCode;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
/** 租户 */
|
||||
private Integer tenantId;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.assembler;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptDto;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
|
||||
/**
|
||||
* 采购入库相关dto转换器
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public class PurchaseInventoryAssembler {
|
||||
|
||||
/**
|
||||
* 装配【入库单据分页列表DTO】分页
|
||||
*
|
||||
* @param supplyRequestPage 【供应申请管理Entity实体】分页
|
||||
* @param medicationList 【药品基本信息管理Entity实体】列表
|
||||
* @param patientList【患者管理Entity实体】列表
|
||||
* @return 【入库单据分页列表DTO】分页
|
||||
*/
|
||||
public static Page<InventoryReceiptDto> assembleInventoryReceiptDto(Page<SupplyRequest> supplyRequestPage,
|
||||
List<Medication> medicationList, List<Patient> patientList) {
|
||||
|
||||
// 将查询到的【药品基本信息管理】列表,作成以ID为Key的Map
|
||||
Map<Long, Medication> medicationMap =
|
||||
medicationList.stream().collect(Collectors.toMap(Medication::getId, Function.identity()));
|
||||
|
||||
// 将查询到的【患者管理】列表,作成以ID为Key的Map
|
||||
Map<Long, Patient> patientMap =
|
||||
patientList.stream().collect(Collectors.toMap(Patient::getId, Function.identity()));
|
||||
|
||||
// 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】
|
||||
Page<InventoryReceiptDto> returnPage =
|
||||
new Page<>(supplyRequestPage.getCurrent(), supplyRequestPage.getSize(), supplyRequestPage.getTotal());
|
||||
|
||||
// 将【供应申请管理】的分页转化为返回【入库单据分页列表DTO】的分页
|
||||
returnPage.setRecords(supplyRequestPage.getRecords().stream().map(entity -> {
|
||||
// 定义【入库单据分页列表DTO】
|
||||
InventoryReceiptDto dto = new InventoryReceiptDto();
|
||||
// 从主表COPY需要的字段
|
||||
dto.setId(entity.getId());
|
||||
dto.setCategoryEnum(1);
|
||||
// 从【药品基本信息管理】Map取值,设置【药品基本信息管理】返回实体
|
||||
dto.setMedication(medicationMap.getOrDefault(entity.getDispenseId(), null));
|
||||
// 从【患者管理】Map取值,设置【患者管理】返回实体
|
||||
dto.setPatient(patientMap.getOrDefault(entity.getPatientId(), null));
|
||||
return dto;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
// 返回【入库单据分页列表DTO】分页
|
||||
return returnPage;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
import com.openhis.administration.service.ILocationService;
|
||||
import com.openhis.administration.service.IPatientService;
|
||||
import com.openhis.administration.service.ISupplierService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.inventorymanage.assembler.PurchaseInventoryAssembler;
|
||||
import com.openhis.web.inventorymanage.dto.InventoryDto;
|
||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptInitDto;
|
||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||
import com.openhis.web.inventorymanage.dto.SaveInventoryReceiptDto;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
import com.openhis.workflow.service.ISupplyRequestService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 采购入库 controller
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-02-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inventory-manage-purchase")
|
||||
@Slf4j
|
||||
public class PurchaseInventoryController {
|
||||
@Autowired
|
||||
private ISupplyRequestService supplyRequestService;
|
||||
@Autowired
|
||||
private IMedicationService medicationService;
|
||||
@Autowired
|
||||
private IPatientService patientService;
|
||||
@Autowired
|
||||
private IChargeItemService chargeItemService;
|
||||
@Autowired
|
||||
private ISupplierService supplierService;
|
||||
@Autowired
|
||||
private ILocationService locationService;
|
||||
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init() {
|
||||
|
||||
InventoryReceiptInitDto initDto = new InventoryReceiptInitDto();
|
||||
// 设置供应商列表
|
||||
initDto.setSupplier(supplierService.list())
|
||||
// 设置药房列表
|
||||
.setLocation(locationService.list(new LambdaQueryWrapper<Location>().in(Location::getFormEnum, 1)))
|
||||
// 药品详细
|
||||
.setMedicationDetail(medicationService.getDetailList());
|
||||
return R.ok(initDto);
|
||||
}
|
||||
|
||||
// 添加入库单据之前需要
|
||||
// 1.supplier供应商信息列表
|
||||
// 2.location信息列表包括(药房,药库,材料柜,护理站)
|
||||
// 3.practitioner_role与practitioner联查获取对应location的管理员列表
|
||||
// 4.查询选定对应药品类型的药品信息列表
|
||||
|
||||
/**
|
||||
* 添加入库单据(生成供应请求)
|
||||
*
|
||||
* @param inventoryDto 供应请求信息
|
||||
*/
|
||||
@PostMapping("/inventory-receipt")
|
||||
public R<?> addSupplyRequest(@Validated @RequestBody InventoryDto inventoryDto) {
|
||||
// 生成待发送的入库单据supply_request
|
||||
SupplyRequest supplyRequest = new SupplyRequest();
|
||||
BeanUtils.copyProperties(inventoryDto, supplyRequest);
|
||||
// 如果业务上不需要其它处理 直接调用service的保存方法
|
||||
boolean saveSupplyRequestSuccess = supplyRequestService.save(supplyRequest);
|
||||
|
||||
if (!saveSupplyRequestSuccess) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
|
||||
}
|
||||
// 生成收费项目charge_item
|
||||
ChargeItem chargeItem = new ChargeItem();
|
||||
// 如果字段很少建议手动set赋值
|
||||
chargeItem.setUnitPrice(inventoryDto.getUnitPrice());
|
||||
boolean saveChargeItemSuccess = chargeItemService.saveChargeItem(chargeItem);
|
||||
// 如果采购单价被修改了,需要根据批次号更新采购单价子表价格、
|
||||
|
||||
// if (saveChargeItemSuccess) {
|
||||
// return R.ok();
|
||||
// } else {
|
||||
// return R.fail();
|
||||
// }
|
||||
return saveChargeItemSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"采购入库单据"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑入库单据
|
||||
*
|
||||
* @param saveInventoryReceiptDto 供应请求信息
|
||||
*/
|
||||
@PutMapping("/inventory-receipt")
|
||||
public R<?> editSupplyRequest(@Validated @RequestBody SaveInventoryReceiptDto saveInventoryReceiptDto) {
|
||||
// 更新supply_request信息
|
||||
SupplyRequest saveRequest = new SupplyRequest();
|
||||
BeanUtils.copyProperties(saveInventoryReceiptDto, saveRequest);
|
||||
if (!supplyRequestService.updateById(saveRequest)) {
|
||||
return R.fail();
|
||||
}
|
||||
// 更新收费项目charge_item
|
||||
ChargeItem chargeItem = new ChargeItem();
|
||||
BeanUtils.copyProperties(saveInventoryReceiptDto, chargeItem);
|
||||
chargeItem.setId(saveInventoryReceiptDto.getChargeItemId());
|
||||
return chargeItemService.updateChargeItem(chargeItem) ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
*
|
||||
* @param supplyRequestId 主表id
|
||||
*/
|
||||
@DeleteMapping("/inventory-receipt")
|
||||
public R<?> deleteSupplyRequest(@RequestParam Long supplyRequestId) {
|
||||
// 全都是逻辑删除
|
||||
|
||||
boolean deleteSuccess = supplyRequestService.removeById(supplyRequestId);
|
||||
|
||||
if (!deleteSuccess) {
|
||||
return R.fail();
|
||||
}
|
||||
|
||||
boolean deleteChargeItemSuccess = chargeItemService
|
||||
.remove(new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getServiceId, supplyRequestId));
|
||||
|
||||
return deleteChargeItemSuccess ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库单据详情列表
|
||||
*
|
||||
* @param inventorySearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 入库单据分页列表
|
||||
*/
|
||||
@GetMapping(value = "/inventory-receipt-page")
|
||||
public R<?> getDetailPage(InventorySearchParam inventorySearchParam,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 查询条件初始化
|
||||
Medication medication = new Medication();
|
||||
BeanUtils.copyProperties(inventorySearchParam, medication);
|
||||
|
||||
SupplyRequest supplyRequest = new SupplyRequest();
|
||||
BeanUtils.copyProperties(inventorySearchParam, supplyRequest);
|
||||
|
||||
// 获取供应请求信息
|
||||
|
||||
// ====================================================================================
|
||||
|
||||
// 查询【供应申请管理】分页列表
|
||||
Page<SupplyRequest> supplyRequestPage = supplyRequestService.getPage(supplyRequest, pageNo, pageSize);
|
||||
|
||||
// 根据【发放id】查询【药品基本信息管理】列表
|
||||
List<Medication> medicationList = medicationService.listByIds(
|
||||
supplyRequestPage.getRecords().stream().map(SupplyRequest::getDispenseId).collect(Collectors.toList()));
|
||||
|
||||
// 根据【患者id】查询【患者管理】列表
|
||||
List<Patient> patientList = patientService.listByIds(
|
||||
supplyRequestPage.getRecords().stream().map(SupplyRequest::getPatientId).collect(Collectors.toList()));
|
||||
|
||||
// 装配并返回【入库单据分页列表DTO】分页
|
||||
return R
|
||||
.ok(PurchaseInventoryAssembler.assembleInventoryReceiptDto(supplyRequestPage, medicationList, patientList));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 单据提交申请
|
||||
*
|
||||
* @param supplyRequest 供应请求信息
|
||||
*/
|
||||
@PutMapping("/submit-examine")
|
||||
public void submitExamine(SupplyRequest supplyRequest) {
|
||||
|
||||
// 更改供应请求单据状态
|
||||
// 生成供应分发supply_delivery
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author ZhangYC
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InventoryDto {
|
||||
|
||||
/** 项目 */
|
||||
private String itemTable;
|
||||
|
||||
/** 数量 */
|
||||
private Integer itemQuantity;
|
||||
|
||||
/** 物品编码 */
|
||||
private Long code;
|
||||
|
||||
/** 物品计量单位 */
|
||||
private String unitIdCode;
|
||||
|
||||
/** 物品数量 */
|
||||
private Integer unitQuantity;
|
||||
|
||||
/** 请求细节 */
|
||||
private String detailJson;
|
||||
|
||||
/** 期望时间 */
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 供应人 */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplierId;
|
||||
|
||||
/** 单位 */
|
||||
private Long quantityUnit;
|
||||
|
||||
/** 单价 */
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 入库单据分页列表 dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-02-18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InventoryReceiptDto implements Serializable {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 意图 */
|
||||
private Integer intentEnum;
|
||||
|
||||
/** 分类 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 优先权 */
|
||||
private Integer priorityEnum;
|
||||
|
||||
/** 汇总编号 */
|
||||
private Long summaryId;
|
||||
|
||||
/** 交付 */
|
||||
private Long deliverId;
|
||||
|
||||
/** 患者id */
|
||||
private Long patientId;
|
||||
|
||||
/** 发放实体表名 */
|
||||
private String dispenseTable;
|
||||
|
||||
/** 发放id */
|
||||
private Long dispenseId;
|
||||
|
||||
/** 期望时间 */
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 供应人 */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplierId;
|
||||
|
||||
/** 理由 */
|
||||
private String reason;
|
||||
|
||||
/** 源仓库类型 */
|
||||
private Integer sourceType;
|
||||
|
||||
/** 源仓库 */
|
||||
private Long sourceLocationId;
|
||||
|
||||
/** 源仓位 */
|
||||
private Long sourceLocationStoreId;
|
||||
|
||||
/** 目的类型 */
|
||||
private Integer purposeType;
|
||||
|
||||
/** 药品基本信息管理Entity实体 */
|
||||
private Medication medication;
|
||||
|
||||
/** 患者管理Entity实体 */
|
||||
private Patient patient;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 采购入库初始化 dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InventoryReceiptInitDto {
|
||||
|
||||
//返回前台的应是dto 懒得定义请勿学习
|
||||
|
||||
/** 药房信息 */
|
||||
private List<Location> location;
|
||||
|
||||
/** 供应商信息 */
|
||||
private List<Supplier> supplier;
|
||||
|
||||
/** 药品详细信息 */
|
||||
private List<MedicationDetail> medicationDetail;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 入库单据分页查询条件
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-02-18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InventorySearchParam implements Serializable {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.inventorymanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 更新dto
|
||||
*
|
||||
* @author zxy
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SaveInventoryReceiptDto {
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 意图 */
|
||||
private Integer intentEnum;
|
||||
|
||||
/** 分类 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 优先权 */
|
||||
private Integer priorityEnum;
|
||||
|
||||
/** 汇总编号 */
|
||||
private Long summaryId;
|
||||
|
||||
/** 交付 */
|
||||
private Long deliverId;
|
||||
|
||||
/** 患者id */
|
||||
private Long patientId;
|
||||
|
||||
/** 发放实体表名 */
|
||||
private String dispenseTable;
|
||||
|
||||
/** 发放id */
|
||||
private Long dispenseId;
|
||||
|
||||
/** 项目 */
|
||||
private String itemTable;
|
||||
|
||||
/** 数量 */
|
||||
private Integer itemQuantity;
|
||||
|
||||
/** 物品编码 */
|
||||
private Long code;
|
||||
|
||||
/** 物品计量单位 */
|
||||
private String unitIdCode;
|
||||
|
||||
/** 物品数量 */
|
||||
private Integer unitQuantity;
|
||||
|
||||
/** 请求细节 */
|
||||
private String detailJson;
|
||||
|
||||
/** 期望时间 */
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 供应人 */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplierId;
|
||||
|
||||
/** 理由 */
|
||||
private String reason;
|
||||
|
||||
/** 源仓库类型 */
|
||||
private Integer sourceType;
|
||||
|
||||
/** 源仓库 */
|
||||
private Long sourceLocationId;
|
||||
|
||||
/** 源仓位 */
|
||||
private Long sourceLocationStoreId;
|
||||
|
||||
/** 目的类型 */
|
||||
private Integer purposeType;
|
||||
|
||||
/** 目的仓库 */
|
||||
private Long purposeLocationId;
|
||||
|
||||
/** 目的仓位 */
|
||||
private Long purposeLocationStoreId;
|
||||
|
||||
/** 审批人 */
|
||||
private Long approverId;
|
||||
|
||||
/** 审批时间 */
|
||||
private Date approvalTime;
|
||||
|
||||
/** 申请人 */
|
||||
private Long applicantId;
|
||||
|
||||
/** 申请时间 */
|
||||
private Date applyTime;
|
||||
|
||||
// =======chargeItem实体============
|
||||
|
||||
/** ID */
|
||||
private Long chargeItemId;
|
||||
|
||||
/** 类别 */
|
||||
private Integer context;
|
||||
|
||||
/** 就诊ID */
|
||||
private Long encounterId;
|
||||
|
||||
/** 执行人Id */
|
||||
private Long performer;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long performingOrgId;
|
||||
|
||||
/** 开立科室 */
|
||||
private Long requestingOrgId;
|
||||
|
||||
/** 成本科室 */
|
||||
private Long costOrgId;
|
||||
|
||||
/** 数量 */
|
||||
private Long quantityValue;
|
||||
|
||||
/** 单位 */
|
||||
private Long quantityUnit;
|
||||
|
||||
/** 单价 */
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 费用定价ID */
|
||||
private Long definitionId;
|
||||
|
||||
/** applicability表主键 */
|
||||
private Long applicabilityId;
|
||||
|
||||
/** 原价 */
|
||||
private BigDecimal baseAmount;
|
||||
|
||||
/** 折后价格 */
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
/** 附加价格 */
|
||||
private BigDecimal surchargeAmount;
|
||||
|
||||
/** 改价原因 */
|
||||
private String overrideReasonCode;
|
||||
|
||||
/** 改价原因文本 */
|
||||
private String overrideReasonText;
|
||||
|
||||
/** 开立人ID */
|
||||
private Long entererId;
|
||||
|
||||
/** 开立时间 */
|
||||
private Date enteredDate;
|
||||
|
||||
/** 医疗服务类型 */
|
||||
private String serviceTable;
|
||||
|
||||
/** 医疗服务ID */
|
||||
private Long serviceId;
|
||||
|
||||
/** 索赔结果 */
|
||||
private Integer claimStateEnum;
|
||||
|
||||
/** 关联账户ID */
|
||||
private Long accountId;
|
||||
|
||||
/** 机构 */
|
||||
private String orgCode;
|
||||
}
|
||||
@@ -87,6 +87,10 @@ spring:
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
# 文言
|
||||
messages:
|
||||
basename: i18n/general_message/messages
|
||||
encoding: utf-8
|
||||
|
||||
# token配置
|
||||
token:
|
||||
|
||||
@@ -31,3 +31,7 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加
|
||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||
|
||||
|
||||
|
||||
apl.common.M00002={0}保存成功
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 测试类
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.openhis"})
|
||||
public class MedicationApplicationTests {
|
||||
@Test
|
||||
public void contextLoads() throws IOException {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.openhis.common.constant;
|
||||
|
||||
/**
|
||||
* APL消息ID常量类
|
||||
*/
|
||||
public interface PromptMsgConstant {
|
||||
|
||||
/**
|
||||
* 共用
|
||||
*/
|
||||
interface Common {
|
||||
/**
|
||||
* {0}添加成功
|
||||
*/
|
||||
String M00001 = "apl.common.M00001";
|
||||
/**
|
||||
* {0}保存成功
|
||||
*/
|
||||
String M00002 = "apl.common.M00002";
|
||||
/**
|
||||
* {0}已经存在
|
||||
*/
|
||||
String M00003 = "apl.common.M00003";
|
||||
/**
|
||||
* {0}操作成功
|
||||
*/
|
||||
String M00004 = "apl.common.M00004";
|
||||
/**
|
||||
* {0}删除成功
|
||||
*/
|
||||
String M00005 = "apl.common.M00005";
|
||||
/**
|
||||
* 操作失败,该数据已被他人删除,请刷新后重试
|
||||
*/
|
||||
String M00006 = "apl.common.M00006";
|
||||
/**
|
||||
* 操作失败,该数据已被他人更改,请刷新后重试
|
||||
*/
|
||||
String M00007 = "apl.common.M00007";
|
||||
/**
|
||||
* 请勿重复提交
|
||||
*/
|
||||
String M00008 = "apl.common.M00008";
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -9,16 +9,18 @@ public enum DelFlag {
|
||||
/**
|
||||
* 未删除
|
||||
*/
|
||||
NO("0", "未删除"),
|
||||
NO(0, "0", "未删除"),
|
||||
/**
|
||||
* 已删除
|
||||
*/
|
||||
YES("1", "已删除");
|
||||
YES(1, "1", "已删除");
|
||||
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
DelFlag(String code, String info) {
|
||||
DelFlag(Integer value, String code, String info) {
|
||||
this.value = value;
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
@@ -30,4 +32,8 @@ public enum DelFlag {
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Account extends HisBaseEntity {
|
||||
private Integer billingStatusEnum;
|
||||
|
||||
/** 账户类型编码 */
|
||||
private Integer typeCode;
|
||||
private String typeCode;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
@@ -58,7 +58,5 @@ public class Account extends HisBaseEntity {
|
||||
/** 欠费限制额度 */
|
||||
private BigDecimal limitAccount;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -112,7 +112,5 @@ public class ChargeItem extends HisBaseEntity {
|
||||
/** 机构 */
|
||||
private String orgCode;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -55,7 +55,5 @@ public class ChargeItemDefApp extends HisBaseEntity {
|
||||
/** 价格 */
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -67,7 +67,5 @@ public class ChargeItemDefinition extends HisBaseEntity {
|
||||
/** 基础价格 */
|
||||
private BigDecimal price;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class Device extends HisBaseEntity {
|
||||
private Long id;
|
||||
|
||||
/** 器材编码 */
|
||||
private Long deviceCode;
|
||||
private String deviceCode;
|
||||
|
||||
/** 器材定义编号 */
|
||||
private Long defId;
|
||||
@@ -91,7 +91,5 @@ public class Device extends HisBaseEntity {
|
||||
/** 器材安全 */
|
||||
private Integer safetyEnum;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -106,7 +106,5 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class Encounter extends HisBaseEntity {
|
||||
private String code;
|
||||
|
||||
/** 状态编码 */
|
||||
private Integer statusCode;
|
||||
private String statusCode;
|
||||
|
||||
/** 类别编码 */
|
||||
private Integer classEnum;
|
||||
@@ -73,7 +73,4 @@ public class Encounter extends HisBaseEntity {
|
||||
/** 就诊序号 */
|
||||
private Integer displayOrder;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -55,7 +55,5 @@ public class EncounterDiagnosis extends HisBaseEntity {
|
||||
/** 最高诊断依据标记 */
|
||||
private Integer highDiseEvidFlag;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -46,7 +46,5 @@ public class EncounterLocation extends HisBaseEntity {
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class EncounterParticipant extends HisBaseEntity {
|
||||
private Long encounterId;
|
||||
|
||||
/** 参与者类型 */
|
||||
private Integer typeCode;
|
||||
private String typeCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTiem;
|
||||
@@ -43,7 +43,5 @@ public class EncounterParticipant extends HisBaseEntity {
|
||||
/** 参与者ID */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class EncounterReason extends HisBaseEntity {
|
||||
private Long encounterId;
|
||||
|
||||
/** 原因编码 */
|
||||
private Integer useCode;
|
||||
private String useCode;
|
||||
|
||||
/** 具体原因类型 */
|
||||
private String valueTable;
|
||||
@@ -43,7 +43,5 @@ public class EncounterReason extends HisBaseEntity {
|
||||
/** 原因描述 */
|
||||
private String note;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public class HealthcareService extends HisBaseEntity {
|
||||
private Long offeredOrgId;
|
||||
|
||||
/** 服务分类 */
|
||||
private Integer categoryCode;
|
||||
private String categoryCode;
|
||||
|
||||
/** 服务类型 */
|
||||
private String typeCode;
|
||||
@@ -61,7 +61,5 @@ public class HealthcareService extends HisBaseEntity {
|
||||
/** 预约要求 */
|
||||
private Integer appointmentRequiredFlag;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class Invoice extends HisBaseEntity {
|
||||
private String paymentTerms;
|
||||
|
||||
/** 账单批次号 */
|
||||
private BigDecimal batchCode;
|
||||
private String batchCode;
|
||||
|
||||
/** 结算批次号 */
|
||||
private String qrCode;
|
||||
@@ -64,7 +64,5 @@ public class Invoice extends HisBaseEntity {
|
||||
/** 图片路径 */
|
||||
private String pictureUrl;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -61,7 +61,5 @@ public class Location extends HisBaseEntity {
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -58,7 +58,5 @@ public class Organization extends HisBaseEntity {
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -121,7 +121,5 @@ public class Patient extends HisBaseEntity {
|
||||
/** 机构Id */
|
||||
private Long organizationId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class PatientIdentifier extends HisBaseEntity {
|
||||
private Long id;
|
||||
|
||||
/** 标识类型编码 */
|
||||
private Integer typeCode;
|
||||
private String typeCode;
|
||||
|
||||
/** 标识号 */
|
||||
private String identifierNo;
|
||||
@@ -43,7 +43,5 @@ public class PatientIdentifier extends HisBaseEntity {
|
||||
/** 有效时间end */
|
||||
private Date endTime;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -82,7 +82,5 @@ public class Practitioner extends HisBaseEntity {
|
||||
/** 系统用户id */
|
||||
private Long userId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -58,7 +58,5 @@ public class PractitionerRole extends HisBaseEntity {
|
||||
/** 有效时间 */
|
||||
private String availabilityJson;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -58,7 +58,5 @@ public class Supplier extends HisBaseEntity {
|
||||
/** 机构编号 */
|
||||
private Long orgId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -11,4 +11,18 @@ import com.openhis.administration.domain.ChargeItem;
|
||||
*/
|
||||
public interface IChargeItemService extends IService<ChargeItem> {
|
||||
|
||||
/**
|
||||
* 保存chargeItem相关信息
|
||||
*
|
||||
* @return 保存结果
|
||||
*/
|
||||
boolean saveChargeItem(ChargeItem chargeItem);
|
||||
|
||||
/**
|
||||
* 更新收费项目
|
||||
*
|
||||
* @param chargeItem 更新内容
|
||||
* @return 更新结果
|
||||
*/
|
||||
boolean updateChargeItem(ChargeItem chargeItem);
|
||||
}
|
||||
@@ -7,6 +7,8 @@ import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.mapper.ChargeItemMapper;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* 费用项管理Service业务层处理
|
||||
*
|
||||
@@ -14,6 +16,43 @@ import com.openhis.administration.service.IChargeItemService;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeItem> implements IChargeItemService {
|
||||
|
||||
private final ChargeItemMapper chargeItemMapper;
|
||||
|
||||
/**
|
||||
* 保存chargeItem相关信息
|
||||
*
|
||||
* @return 保存结果
|
||||
*/
|
||||
@Override
|
||||
public boolean saveChargeItem(ChargeItem chargeItem) {
|
||||
// 假设此处有业务相关处理
|
||||
if (chargeItem.getCode() == null) {
|
||||
return false;
|
||||
}
|
||||
return chargeItemMapper.insert(chargeItem) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新收费项目
|
||||
*
|
||||
* @param chargeItem 更新内容
|
||||
* @return 更新结果
|
||||
*/
|
||||
@Override
|
||||
public boolean updateChargeItem(ChargeItem chargeItem) {
|
||||
// 更新样例 一切以实际为主
|
||||
if (chargeItem.getId() != null) {
|
||||
// 获取更新前收费项目,避免更新导致数据库崩溃
|
||||
if (chargeItemMapper.selectById(chargeItem.getId()) == null) {
|
||||
return false;
|
||||
} else {
|
||||
return chargeItemMapper.updateById(chargeItem) > 0;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,5 @@ public class Condition extends HisBaseEntity {
|
||||
/** 医保编码 */
|
||||
private String ybCode;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -61,7 +61,5 @@ public class ConditionDefinition extends HisBaseEntity {
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -97,7 +97,5 @@ public class Procedure extends HisBaseEntity {
|
||||
/** 跟进指南 */
|
||||
private String followUpJson;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -46,7 +46,5 @@ public class ProcedurePerformer extends HisBaseEntity {
|
||||
/** 飞刀机构 */
|
||||
private String orgFromId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -61,7 +61,5 @@ public class Claim extends HisBaseEntity {
|
||||
/** 索赔涵盖时间 */
|
||||
private Date billablePeriodEnd;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -58,7 +58,5 @@ public class ClaimResponse extends HisBaseEntity {
|
||||
/** 索赔金额 */
|
||||
private BigDecimal total;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -43,7 +43,5 @@ public class Contract extends HisBaseEntity {
|
||||
/** 机构 */
|
||||
private Long orgId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class PaymentNotice extends HisBaseEntity {
|
||||
private Long payee;
|
||||
|
||||
/** 通知方式 */
|
||||
private Integer wayCode;
|
||||
private String wayCode;
|
||||
|
||||
/** 通知内容 */
|
||||
private String content;
|
||||
@@ -58,7 +58,5 @@ public class PaymentNotice extends HisBaseEntity {
|
||||
/** 机构 */
|
||||
private String orgCode;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -73,7 +73,5 @@ public class PaymentRecDetail extends HisBaseEntity {
|
||||
/** 单笔交易结果 */
|
||||
private Integer resultEnum;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -88,7 +88,5 @@ public class PaymentReconciliation extends HisBaseEntity {
|
||||
/** 就诊ID */
|
||||
private Long encoutnerId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
@@ -76,7 +76,4 @@ public class Medication extends HisBaseEntity {
|
||||
/** 药品定义 */
|
||||
private String definition;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
private String wbCode;
|
||||
|
||||
/** 药品分类 */
|
||||
private Integer categoryCode;
|
||||
private String categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
@@ -115,10 +115,4 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 儿童用药标志 */
|
||||
private Integer childrenFlag;
|
||||
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
* 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 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;
|
||||
|
||||
}
|
||||
@@ -106,7 +106,5 @@ public class MedicationDispense extends HisBaseEntity {
|
||||
/** 单次最大剂量 */
|
||||
private BigDecimal maxUnit;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -169,7 +169,5 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
/** 发药人 */
|
||||
private Long dispenser;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -1,17 +1,29 @@
|
||||
package com.openhis.medication.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.biz.HisBaseMapper;
|
||||
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接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@TableName("med_medication")
|
||||
@Repository
|
||||
public interface MedicationMapper extends BaseMapper<Medication> {
|
||||
public interface MedicationMapper extends HisBaseMapper<Medication> {
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
List<MedicationDetail> selectDetailList();
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.medication.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.core.common.biz.HisBaseService;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Service接口
|
||||
@@ -9,6 +12,20 @@ import com.openhis.medication.domain.Medication;
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IMedicationService extends IService<Medication> {
|
||||
public interface IMedicationService extends HisBaseService<Medication> {
|
||||
|
||||
/**
|
||||
* 查询药品信息列表
|
||||
*
|
||||
* @param medicationIdList 药品id列表
|
||||
* @return 药品信息列表
|
||||
*/
|
||||
List<Medication> getList(List<Long> medicationIdList);
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
List<MedicationDetail> getDetailList();
|
||||
}
|
||||
@@ -1,19 +1,60 @@
|
||||
package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.core.common.biz.HisBaseServiceImpl;
|
||||
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.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medication> implements IMedicationService {
|
||||
public class MedicationServiceImpl extends HisBaseServiceImpl<MedicationMapper, Medication> implements IMedicationService {
|
||||
|
||||
@Autowired
|
||||
private MedicationMapper medicationMapper;
|
||||
|
||||
/**
|
||||
* 查询药品信息列表
|
||||
*
|
||||
* @param medicationIdList 药品id列表
|
||||
* @return 药品信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<Medication> getList(List<Long> medicationIdList) {
|
||||
|
||||
// 判断是否为空
|
||||
if (!medicationIdList.isEmpty()) {
|
||||
// 查询药品相关信息列表并返回
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Medication>()
|
||||
.eq(Medication::getDeleteFlag, DelFlag.NO.getValue()).in(Medication::getId, medicationIdList));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDetail> getDetailList() {
|
||||
return medicationMapper.selectDetailList();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -73,7 +73,5 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
/** 规则id */
|
||||
private String ruleId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -88,7 +88,5 @@ public class DeviceDispense extends HisBaseEntity {
|
||||
/** 使用说明 */
|
||||
private String usageInstruction;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -130,7 +130,5 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
/** 发放编号 */
|
||||
private Long dispenseId;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -97,7 +97,5 @@ public class InventoryItem extends HisBaseEntity {
|
||||
/** 追溯码包装层级 */
|
||||
private Integer packagingLevels;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -100,7 +100,5 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
/** 历史请求 */
|
||||
private Long relevantHistory;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -40,7 +40,5 @@ public class ServiceRequestDetail extends HisBaseEntity {
|
||||
/** 订单详情 */
|
||||
private String detailJson;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -106,7 +106,5 @@ public class SupplyDelivery extends HisBaseEntity {
|
||||
/** 接收时间 */
|
||||
private Date receiveDateTime;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -118,7 +118,5 @@ public class SupplyRequest extends HisBaseEntity {
|
||||
/** 申请时间 */
|
||||
private Date applyTime;
|
||||
|
||||
/** 删除状态 */
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
|
||||
@@ -11,4 +12,13 @@ import com.openhis.workflow.domain.SupplyRequest;
|
||||
*/
|
||||
public interface ISupplyRequestService extends IService<SupplyRequest> {
|
||||
|
||||
/**
|
||||
* 查询供应申请分页列表
|
||||
*
|
||||
* @param supplyRequest 查询条件
|
||||
* @return 供应申请列表
|
||||
*/
|
||||
Page<SupplyRequest> getPage(SupplyRequest supplyRequest, Integer pageNo, Integer pageSize);
|
||||
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.openhis.workflow.service.IServiceRequestService;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper, ServiceRequest> implements IServiceRequestService {
|
||||
public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper, ServiceRequest>
|
||||
implements IServiceRequestService {
|
||||
|
||||
}
|
||||
@@ -2,18 +2,50 @@ package com.openhis.workflow.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
import com.openhis.workflow.mapper.SupplyRequestMapper;
|
||||
import com.openhis.workflow.service.ISupplyRequestService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 供应申请管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, SupplyRequest> implements ISupplyRequestService {
|
||||
@AllArgsConstructor
|
||||
public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, SupplyRequest>
|
||||
implements ISupplyRequestService {
|
||||
|
||||
private final SupplyRequestMapper supplyRequestMapper;
|
||||
|
||||
/**
|
||||
* 查询供应申请列表
|
||||
*
|
||||
* @param supplyRequest 查询条件
|
||||
* @return 供应申请列表
|
||||
*/
|
||||
@Override
|
||||
public Page<SupplyRequest> getPage(SupplyRequest supplyRequest, Integer pageNo, Integer pageSize) {
|
||||
|
||||
Page<SupplyRequest> supplyRequestList;
|
||||
// 判断入库数量
|
||||
if (supplyRequest.getItemQuantity() != 0) {
|
||||
// 查询供应申请信息列表
|
||||
supplyRequestList = supplyRequestMapper.selectPage(new Page<>(pageNo, pageSize),
|
||||
new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getValue()));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
// 返回入库信息列表
|
||||
return supplyRequestList;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -36,7 +36,7 @@
|
||||
<spring-security.version>5.7.12</spring-security.version>
|
||||
<spring-framework.version>5.3.39</spring-framework.version>
|
||||
<lombok.version>1.18.26</lombok.version>
|
||||
<mybatis-plus.version>3.4.2</mybatis-plus.version>
|
||||
<mybatis-plus.version>3.5.3</mybatis-plus.version>
|
||||
<flowable.version>6.8.0</flowable.version>
|
||||
</properties>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user