Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
# Conflicts: # openhis-server/openhis-application/src/main/java/com/openhis/web/InventoryManage/controller/PurchaseInventoryController.java
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.openhis.medication.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Service接口
|
||||
*
|
||||
|
||||
@@ -19,4 +19,6 @@ public interface ISupplyRequestService extends IService<SupplyRequest> {
|
||||
* @return 供应申请列表
|
||||
*/
|
||||
Page<SupplyRequest> getPage(SupplyRequest supplyRequest, Integer pageNo, Integer pageSize);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user