采购入库
This commit is contained in:
@@ -74,7 +74,7 @@ public class ChargeItem extends HisBaseEntity {
|
||||
/** 费用定价ID */
|
||||
private Long definitionId;
|
||||
|
||||
/** applicability表主键 */
|
||||
/** 定价子表主键 */
|
||||
private Long applicabilityId;
|
||||
|
||||
/** 原价 */
|
||||
@@ -98,12 +98,18 @@ public class ChargeItem extends HisBaseEntity {
|
||||
/** 开立时间 */
|
||||
private Date enteredDate;
|
||||
|
||||
/** 医疗服务类型 */
|
||||
/** 医疗服务所在表 */
|
||||
private String serviceTable;
|
||||
|
||||
/** 医疗服务ID */
|
||||
private Long serviceId;
|
||||
|
||||
/** 产品所在表 */
|
||||
private String productTable;
|
||||
|
||||
/** 产品ID */
|
||||
private Long productId;
|
||||
|
||||
/** 索赔结果 */
|
||||
private Integer claimStateEnum;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
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.ActPriority;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -55,5 +55,8 @@ public class ChargeItemDefApp extends HisBaseEntity {
|
||||
/** 价格 */
|
||||
private BigDecimal amount;
|
||||
|
||||
|
||||
public ChargeItemDefApp() {
|
||||
// 默认优先级:常规
|
||||
this.priority = ActPriority.ROUTINE.getValue();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
|
||||
/**
|
||||
* 费用项管理Service接口
|
||||
@@ -12,17 +16,9 @@ import com.openhis.administration.domain.ChargeItem;
|
||||
public interface IChargeItemService extends IService<ChargeItem> {
|
||||
|
||||
/**
|
||||
* 保存chargeItem相关信息
|
||||
* 创建已计费的采购账单
|
||||
*
|
||||
* @return 保存结果
|
||||
* @param chargeItemList 采购账单
|
||||
*/
|
||||
boolean saveChargeItem(ChargeItem chargeItem);
|
||||
|
||||
/**
|
||||
* 更新收费项目
|
||||
*
|
||||
* @param chargeItem 更新内容
|
||||
* @return 更新结果
|
||||
*/
|
||||
boolean updateChargeItem(ChargeItem chargeItem);
|
||||
void createBilledPurchaseCharge(List<ChargeItem> chargeItemList);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class ChargeItemDefAppServiceImpl extends ServiceImpl<ChargeItemDefAppMap
|
||||
*/
|
||||
@Override
|
||||
public boolean addChargeItemDefApp(ChargeItemDefApp chargeItemDefApp) {
|
||||
//此判断是为了避免插入时主键重复
|
||||
// 此判断是为了避免插入时主键重复
|
||||
if (chargeItemDefApp.getId() != null) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
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.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.mapper.ChargeItemDefinitionMapper;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 费用定价管理Service业务层处理
|
||||
@@ -21,24 +20,24 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefinitionMapper, ChargeItemDefinition>
|
||||
implements IChargeItemDefinitionService {
|
||||
implements IChargeItemDefinitionService {
|
||||
|
||||
/**
|
||||
* 获取分页列表
|
||||
*
|
||||
* @param chargeItemDefinition 查询条件
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 页面大小
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 页面大小
|
||||
* @return 分页列表
|
||||
*/
|
||||
@Override
|
||||
public Page<ChargeItemDefinition> getPage(ChargeItemDefinition chargeItemDefinition, Integer pageNo,
|
||||
Integer pageSize) {
|
||||
Integer pageSize) {
|
||||
|
||||
LambdaQueryWrapper<ChargeItemDefinition> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ChargeItemDefinition::getDeleteFlag, DelFlag.NO.getValue());
|
||||
|
||||
//拼接查询条件
|
||||
// 拼接查询条件
|
||||
if (chargeItemDefinition.getStatusEnum() != null) {
|
||||
queryWrapper.eq(ChargeItemDefinition::getStatusEnum, chargeItemDefinition.getStatusEnum());
|
||||
}
|
||||
@@ -54,7 +53,7 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
*/
|
||||
@Override
|
||||
public boolean addChargeItemDefinition(ChargeItemDefinition chargeItemDefinition) {
|
||||
//此判断是为了避免插入时主键重复
|
||||
// 此判断是为了避免插入时主键重复
|
||||
if (chargeItemDefinition.getId() != null) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -77,16 +76,16 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过服务管理新增费用定价
|
||||
*
|
||||
* @param healthcareService 服务管理
|
||||
* @param healthcareService 服务管理
|
||||
* @param chargeItemDefinition 费用定价
|
||||
* @return 新增结果
|
||||
*/
|
||||
@Override
|
||||
public boolean addChargeItemDefinitionByHealthcareService(HealthcareService healthcareService, ChargeItemDefinition chargeItemDefinition) {
|
||||
public boolean addChargeItemDefinitionByHealthcareService(HealthcareService healthcareService,
|
||||
ChargeItemDefinition chargeItemDefinition) {
|
||||
// 服务管理主键id
|
||||
if (healthcareService.getId() != null) {
|
||||
chargeItemDefinition.setInstanceTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -22,37 +24,12 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
private final ChargeItemMapper chargeItemMapper;
|
||||
|
||||
/**
|
||||
* 保存chargeItem相关信息
|
||||
*
|
||||
* @return 保存结果
|
||||
*/
|
||||
@Override
|
||||
public boolean saveChargeItem(ChargeItem chargeItem) {
|
||||
// 假设此处有业务相关处理
|
||||
if (chargeItem.getBusNo() == null) {
|
||||
return false;
|
||||
}
|
||||
return chargeItemMapper.insert(chargeItem) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新收费项目
|
||||
* 创建已计费的采购账单
|
||||
*
|
||||
* @param chargeItem 更新内容
|
||||
* @return 更新结果
|
||||
* @param chargeItemList 采购账单
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
public void createBilledPurchaseCharge(List<ChargeItem> chargeItemList) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user