提交merge1.3
This commit is contained in:
@@ -24,11 +24,15 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ChargeItem extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 状态 */
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
|
||||
/**
|
||||
@@ -36,100 +40,164 @@ public class ChargeItem extends HisBaseEntity {
|
||||
*/
|
||||
private Integer generateSourceEnum;
|
||||
|
||||
/** 层级 */
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
/** 处方号 */
|
||||
/**
|
||||
* 处方号
|
||||
*/
|
||||
private String prescriptionNo;
|
||||
|
||||
/** 患者ID */
|
||||
/**
|
||||
* 患者ID
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/** 类别 */
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
private Integer contextEnum;
|
||||
|
||||
/** 就诊ID */
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
private Long encounterId;
|
||||
|
||||
/** 发生时间 */
|
||||
/**
|
||||
* 发生时间
|
||||
*/
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 执行人Id */
|
||||
/**
|
||||
* 执行人Id
|
||||
*/
|
||||
private Long performerId;
|
||||
|
||||
/** 执行科室 */
|
||||
/**
|
||||
* 执行科室
|
||||
*/
|
||||
private Long performingOrgId;
|
||||
|
||||
/** 开立科室 */
|
||||
/**
|
||||
* 开立科室
|
||||
*/
|
||||
private Long requestingOrgId;
|
||||
|
||||
/** 成本科室 */
|
||||
/**
|
||||
* 成本科室
|
||||
*/
|
||||
private Long costOrgId;
|
||||
|
||||
/** 数量 */
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal quantityValue;
|
||||
|
||||
/** 单位 */
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String quantityUnit;
|
||||
|
||||
/** 单价 */
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 费用定价ID */
|
||||
/**
|
||||
* 费用定价ID
|
||||
*/
|
||||
private Long definitionId;
|
||||
|
||||
/** 定价子表主键 */
|
||||
/**
|
||||
* 定价子表主键
|
||||
*/
|
||||
private Long defDetailId;
|
||||
|
||||
/** 原价 */
|
||||
/**
|
||||
* 原价
|
||||
*/
|
||||
private BigDecimal baseAmount;
|
||||
|
||||
/** 折后价格 */
|
||||
/**
|
||||
* 折后价格
|
||||
*/
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
/** 附加价格 */
|
||||
/**
|
||||
* 附加价格
|
||||
*/
|
||||
private BigDecimal surchargeAmount;
|
||||
|
||||
/** 改价原因 */
|
||||
/**
|
||||
* 改价原因
|
||||
*/
|
||||
private String overrideReasonCode;
|
||||
|
||||
/** 改价原因文本 */
|
||||
/**
|
||||
* 改价原因文本
|
||||
*/
|
||||
private String overrideReasonText;
|
||||
|
||||
/** 开立人ID */
|
||||
/**
|
||||
* 开立人ID
|
||||
*/
|
||||
private Long entererId;
|
||||
|
||||
/** 开立时间 */
|
||||
/**
|
||||
* 开立时间
|
||||
*/
|
||||
private Date enteredDate;
|
||||
|
||||
/** 医疗服务所在表 */
|
||||
/**
|
||||
* 医疗服务所在表
|
||||
*/
|
||||
private String serviceTable;
|
||||
|
||||
/** 医疗服务ID */
|
||||
/**
|
||||
* 医疗服务ID
|
||||
*/
|
||||
private Long serviceId;
|
||||
|
||||
/** 产品所在表 */
|
||||
/**
|
||||
* 产品所在表
|
||||
*/
|
||||
private String productTable;
|
||||
|
||||
/** 产品ID */
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/** 索赔结果 */
|
||||
/**
|
||||
* 索赔结果
|
||||
*/
|
||||
private Integer claimStateEnum;
|
||||
|
||||
/** 打印次数 */
|
||||
/**
|
||||
* 打印次数
|
||||
*/
|
||||
private Integer printCount;
|
||||
|
||||
/** 关联账户ID */
|
||||
/**
|
||||
* 关联账户ID
|
||||
*/
|
||||
private Long accountId;
|
||||
|
||||
/** 机构 */
|
||||
/**
|
||||
* 机构
|
||||
*/
|
||||
private Long orgId;
|
||||
|
||||
/** 退费ID */
|
||||
/**
|
||||
* 退费ID
|
||||
*/
|
||||
private Long refundId;
|
||||
|
||||
/**
|
||||
@@ -152,16 +220,20 @@ public class ChargeItem extends HisBaseEntity {
|
||||
*/
|
||||
private Integer tcmFlag;
|
||||
|
||||
/** 执行id */
|
||||
/**
|
||||
* 执行id
|
||||
*/
|
||||
private Long procedureId;
|
||||
|
||||
/** 发放所在表 */
|
||||
/**
|
||||
* 发放所在表
|
||||
*/
|
||||
private String dispenseTable;
|
||||
|
||||
/** 发放ID */
|
||||
/**
|
||||
* 发放ID
|
||||
*/
|
||||
private Long dispenseId;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 系统优惠价格
|
||||
@@ -173,6 +245,4 @@ public class ChargeItem extends HisBaseEntity {
|
||||
*/
|
||||
private BigDecimal manualAdjustedPrice;
|
||||
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -18,46 +18,34 @@ import com.openhis.administration.dto.PatientBedInfoDto;
|
||||
*/
|
||||
@Repository
|
||||
public interface LocationMapper extends BaseMapper<Location> {
|
||||
|
||||
/**
|
||||
* Desc: 根据区域id数组查询 区域表
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
*
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @param locationIds
|
||||
* @Author raymond
|
||||
* @Date 07:46 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.LocationDataDto>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<LocationDataDto> searchLocationDataByIds(@Param("locationIds") List<Long> locationIds);
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Desc: 根据病区bus_no 查询病床
|
||||
* @param busNo
|
||||
* @param formEnum
|
||||
* @Author raymond
|
||||
* @Date 14:01 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.LocationDataDto>
|
||||
**/
|
||||
List<PatientBedInfoDto> searchLocationDataByBusNo(@Param("busNo") String busNo, @Param("formEnum") Integer formEnum, @Param("statusEnum") Integer statusEnum);
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
|
||||
/**
|
||||
* Desc: 根据病区bus_no 查询病床
|
||||
*
|
||||
*
|
||||
* @param busNo
|
||||
* @param formEnum
|
||||
* @Author raymond
|
||||
* @Date 14:01 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.LocationDataDto>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<PatientBedInfoDto> searchLocationDataByBusNo(@Param("busNo") String busNo, @Param("formEnum") Integer formEnum,
|
||||
@Param("statusEnum") Integer statusEnum);
|
||||
@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* 判断是否存在相同名字
|
||||
*
|
||||
*
|
||||
* @param name 名字
|
||||
* @param busNo 病区号/病房号/病床号
|
||||
* @param locId 病区ID/病房ID/病床ID
|
||||
@@ -65,5 +53,5 @@ public interface LocationMapper extends BaseMapper<Location> {
|
||||
* @return true/false
|
||||
*/
|
||||
boolean isExistName(@Param("name") String name, @Param("busNo") String busNo, @Param("locId") Long locId,
|
||||
@Param("delFlag") String delFlag);
|
||||
}
|
||||
@Param("delFlag") String delFlag);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.openhis.administration.domain.Supplier;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IInvoiceService extends IService<Invoice> {
|
||||
|
||||
/**
|
||||
* 新增发票
|
||||
*
|
||||
@@ -20,18 +21,6 @@ public interface IInvoiceService extends IService<Invoice> {
|
||||
* @return
|
||||
*/
|
||||
Long addInvoice(Invoice invoice);
|
||||
<<<<<<< HEAD
|
||||
|
||||
/**
|
||||
* 分页查询发票列表(带用户角色权限过滤)
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param isAdmin 是否管理员
|
||||
* @param userId 当前用户ID
|
||||
* @return 发票列表
|
||||
*/
|
||||
IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId);
|
||||
=======
|
||||
|
||||
/**
|
||||
* 根据付款单ID查询发票
|
||||
@@ -40,5 +29,4 @@ public interface IInvoiceService extends IService<Invoice> {
|
||||
* @return
|
||||
*/
|
||||
Invoice getByPaymentId(Long id);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.dto.LocationDataDto;
|
||||
<<<<<<< HEAD
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
|
||||
/**
|
||||
* 位置管理Service接口
|
||||
@@ -74,7 +70,7 @@ public interface ILocationService extends IService<Location> {
|
||||
|
||||
/**
|
||||
* 新增位置信息
|
||||
*
|
||||
*
|
||||
* @param location 位置信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@@ -108,19 +104,15 @@ public interface ILocationService extends IService<Location> {
|
||||
|
||||
/**
|
||||
* Desc: 根据区域id数组查询 区域表
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
*
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @param locationIds
|
||||
* @Author raymond
|
||||
* @Date 07:46 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.LocationDataDto>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<LocationDataDto> searchLocationDataByIds(@Param("locationIds") List<Long> locationIds);
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/**
|
||||
* 获取所有位置信息
|
||||
*
|
||||
@@ -130,12 +122,11 @@ public interface ILocationService extends IService<Location> {
|
||||
|
||||
/**
|
||||
* 判断是否存在相同名字
|
||||
*
|
||||
*
|
||||
* @param name 名字
|
||||
* @param busNo 病区号/病房号/病床号
|
||||
* @param locId 病区ID/病房ID/病床ID
|
||||
* @return true/false
|
||||
*/
|
||||
boolean isExistName(String name, String busNo, Long locId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,7 @@ import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import com.openhis.administration.mapper.ChargeItemDefDetailAppMapper;
|
||||
import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||
import com.openhis.common.enums.ConditionCode;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
|
||||
/**
|
||||
* 费用定价管理子Service业务层处理
|
||||
@@ -24,7 +20,7 @@ import com.core.common.enums.DelFlag;
|
||||
*/
|
||||
@Service
|
||||
public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefDetailAppMapper, ChargeItemDefDetail>
|
||||
implements IChargeItemDefDetailService {
|
||||
implements IChargeItemDefDetailService {
|
||||
|
||||
/**
|
||||
* 更新项目定价
|
||||
@@ -82,7 +78,7 @@ public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefDet
|
||||
@Override
|
||||
public List<ChargeItemDefDetail> searchChargeItemDefDetailByIds(Long chargeItemId, String code, String lotNumber) {
|
||||
LambdaQueryWrapper<ChargeItemDefDetail> queryWrapper = new LambdaQueryWrapper<ChargeItemDefDetail>()
|
||||
.eq(ChargeItemDefDetail::getDefinitionId, chargeItemId).eq(ChargeItemDefDetail::getConditionCode, code);
|
||||
.eq(ChargeItemDefDetail::getDefinitionId, chargeItemId).eq(ChargeItemDefDetail::getConditionCode, code);
|
||||
if (lotNumber != null) {
|
||||
queryWrapper.eq(ChargeItemDefDetail::getConditionValue, lotNumber);
|
||||
}
|
||||
@@ -103,8 +99,8 @@ public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefDet
|
||||
@Override
|
||||
public List<ChargeItemDefDetail> getLotNumberPriceByDefIds(List<Long> chargeItemDefIdList) {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<ChargeItemDefDetail>().in(ChargeItemDefDetail::getDefinitionId, chargeItemDefIdList)
|
||||
.eq(ChargeItemDefDetail::getConditionCode, ConditionCode.LOT_NUMBER_PRICE.getCode())
|
||||
.eq(ChargeItemDefDetail::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaQueryWrapper<ChargeItemDefDetail>().in(ChargeItemDefDetail::getDefinitionId, chargeItemDefIdList)
|
||||
.eq(ChargeItemDefDetail::getConditionCode, ConditionCode.LOT_NUMBER_PRICE.getCode())
|
||||
.eq(ChargeItemDefDetail::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.openhis.common.enums.Whether;
|
||||
*/
|
||||
@Service
|
||||
public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefinitionMapper, ChargeItemDefinition>
|
||||
implements IChargeItemDefinitionService {
|
||||
implements IChargeItemDefinitionService {
|
||||
|
||||
@Autowired
|
||||
private IChargeItemDefDetailService chargeItemDefDetailService;
|
||||
@@ -47,7 +47,7 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
*/
|
||||
@Override
|
||||
public Page<ChargeItemDefinition> getPage(ChargeItemDefinition chargeItemDefinition, Integer pageNo,
|
||||
Integer pageSize) {
|
||||
Integer pageSize) {
|
||||
|
||||
LambdaQueryWrapper<ChargeItemDefinition> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ChargeItemDefinition::getDeleteFlag, DelFlag.NO.getCode());
|
||||
@@ -100,7 +100,7 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
*/
|
||||
@Override
|
||||
public boolean addChargeItemDefinitionByHealthcareService(HealthcareService healthcareService,
|
||||
ChargeItemDefinition chargeItemDefinition) {
|
||||
ChargeItemDefinition chargeItemDefinition) {
|
||||
// 服务管理主键id
|
||||
if (healthcareService.getId() != null) {
|
||||
chargeItemDefinition.setInstanceTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||
@@ -113,7 +113,7 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
|
||||
/**
|
||||
* 创建费用定价和详情
|
||||
*
|
||||
*
|
||||
* @param chargeName 名称
|
||||
* @param typeCode 财务类别
|
||||
* @param ybCode 医保类别
|
||||
@@ -127,30 +127,30 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
*/
|
||||
@Override
|
||||
public void addChargeItemDefinitionAndDetail(String chargeName, String typeCode, String ybCode, String unitCode,
|
||||
BigDecimal purchasePrice, BigDecimal retailPrice, BigDecimal maximumRetailPrice, Long orgId,
|
||||
String instanceTable, Long instanceId) {
|
||||
BigDecimal purchasePrice, BigDecimal retailPrice, BigDecimal maximumRetailPrice, Long orgId,
|
||||
String instanceTable, Long instanceId) {
|
||||
// 费用定价主表
|
||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition().setChargeName(chargeName)
|
||||
.setStatusEnum(PublicationStatus.ACTIVE.getValue()).setOrgId(orgId).setInstanceTable(instanceTable)
|
||||
.setInstanceId(instanceId).setEffectiveStart(DateUtils.getNowDate()).setTypeCode(typeCode).setYbType(ybCode)
|
||||
.setConditionFlag(Whether.YES.getValue()).setPrice(retailPrice);
|
||||
.setStatusEnum(PublicationStatus.ACTIVE.getValue()).setOrgId(orgId).setInstanceTable(instanceTable)
|
||||
.setInstanceId(instanceId).setEffectiveStart(DateUtils.getNowDate()).setTypeCode(typeCode).setYbType(ybCode)
|
||||
.setConditionFlag(Whether.YES.getValue()).setPrice(retailPrice);
|
||||
this.save(chargeItemDefinition);
|
||||
List<ChargeItemDefDetail> chargeItemDefDetailList = new ArrayList<>();
|
||||
// 购入价子表(购入价不一定存在)
|
||||
if (purchasePrice != null) {
|
||||
ChargeItemDefDetail defDetailPurchase =
|
||||
new ChargeItemDefDetail().setDefinitionId(chargeItemDefinition.getId())
|
||||
.setConditionCode(ConditionCode.PURCHASE.getCode()).setAmount(purchasePrice);
|
||||
ChargeItemDefDetail defDetailPurchase
|
||||
= new ChargeItemDefDetail().setDefinitionId(chargeItemDefinition.getId())
|
||||
.setConditionCode(ConditionCode.PURCHASE.getCode()).setAmount(purchasePrice);
|
||||
chargeItemDefDetailList.add(defDetailPurchase);
|
||||
}
|
||||
// 零售价子表
|
||||
ChargeItemDefDetail defDetailRetail = new ChargeItemDefDetail().setDefinitionId(chargeItemDefinition.getId())
|
||||
.setConditionCode(ConditionCode.UNIT.getCode()).setConditionValue(unitCode).setAmount(retailPrice);
|
||||
.setConditionCode(ConditionCode.UNIT.getCode()).setConditionValue(unitCode).setAmount(retailPrice);
|
||||
chargeItemDefDetailList.add(defDetailRetail);
|
||||
// 最高零售价子表
|
||||
ChargeItemDefDetail defDetailMaximumRetail =
|
||||
new ChargeItemDefDetail().setDefinitionId(chargeItemDefinition.getId())
|
||||
.setConditionCode(ConditionCode.LIMIT.getCode()).setAmount(maximumRetailPrice);
|
||||
ChargeItemDefDetail defDetailMaximumRetail
|
||||
= new ChargeItemDefDetail().setDefinitionId(chargeItemDefinition.getId())
|
||||
.setConditionCode(ConditionCode.LIMIT.getCode()).setAmount(maximumRetailPrice);
|
||||
chargeItemDefDetailList.add(defDetailMaximumRetail);
|
||||
chargeItemDefDetailService.saveBatch(chargeItemDefDetailList);
|
||||
}
|
||||
@@ -158,16 +158,16 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
@Override
|
||||
public List<ChargeItemDefinition> searchChargeItemDefinitionByMedIds(List<Long> itemIds) {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<ChargeItemDefinition>().in(ChargeItemDefinition::getInstanceId, itemIds));
|
||||
new LambdaQueryWrapper<ChargeItemDefinition>().in(ChargeItemDefinition::getInstanceId, itemIds));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeItemDefinition getChargeItemDefinitionEntity(Long instanceId, String instanceTable,
|
||||
Integer statusEnum) {
|
||||
Integer statusEnum) {
|
||||
return baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<ChargeItemDefinition>().eq(ChargeItemDefinition::getInstanceId, instanceId)
|
||||
.eq(ChargeItemDefinition::getInstanceTable, instanceTable)
|
||||
.eq(ChargeItemDefinition::getStatusEnum, statusEnum));
|
||||
new LambdaQueryWrapper<ChargeItemDefinition>().eq(ChargeItemDefinition::getInstanceId, instanceId)
|
||||
.eq(ChargeItemDefinition::getInstanceTable, instanceTable)
|
||||
.eq(ChargeItemDefinition::getStatusEnum, statusEnum));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -177,11 +177,7 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
|
||||
@Override
|
||||
public ChargeItemDefDetailPriceDto getDevicePriceByParam(String conditionCode, Long instanceId) {
|
||||
<<<<<<< HEAD
|
||||
return this.baseMapper.getDevicePriceByParam(conditionCode,instanceId);
|
||||
=======
|
||||
return this.baseMapper.getDevicePriceByParam(conditionCode, instanceId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,4 +185,4 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
return this.baseMapper.getProductPrice(statusEnum, instanceId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,24 +13,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
<<<<<<< HEAD
|
||||
import com.core.common.exception.ServiceException;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.core.common.exception.ServiceException;
|
||||
import com.core.common.utils.AgeCalculatorUtil;
|
||||
>>>>>>> v1.3
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.dto.ChargeItemBaseInfoDto;
|
||||
import com.openhis.administration.dto.ChargeItemDefInfo;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import com.openhis.administration.dto.CostDetailDto;
|
||||
import com.openhis.administration.dto.CostDetailSearchParam;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.administration.mapper.ChargeItemDefinitionMapper;
|
||||
import com.openhis.administration.mapper.ChargeItemMapper;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
@@ -87,12 +80,12 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
*/
|
||||
@Override
|
||||
public boolean updateAccountType(Long encounterId, Long accountId) {
|
||||
int update =
|
||||
baseMapper.update(new ChargeItem().setAccountId(accountId),
|
||||
new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, encounterId)
|
||||
.in(ChargeItem::getStatusEnum, ChargeItemStatus.DRAFT.getValue(),
|
||||
ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue())
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
int update
|
||||
= baseMapper.update(new ChargeItem().setAccountId(accountId),
|
||||
new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, encounterId)
|
||||
.in(ChargeItem::getStatusEnum, ChargeItemStatus.DRAFT.getValue(),
|
||||
ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue())
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
return update > 0;
|
||||
}
|
||||
|
||||
@@ -115,8 +108,8 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
@Override
|
||||
public void updateRefundChargeStatus(List<Long> chargeItemIdList) {
|
||||
baseMapper.update(new ChargeItem().setStatusEnum(ChargeItemStatus.REFUNDING.getValue()),
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList).eq(ChargeItem::getDeleteFlag,
|
||||
DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList).eq(ChargeItem::getDeleteFlag,
|
||||
DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,21 +121,21 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
@Override
|
||||
public void updatePaymentStatus(List<Long> chargeItemIdList, Integer value) {
|
||||
baseMapper.update(
|
||||
new ChargeItem().setStatusEnum(value).setPerformerId(SecurityUtils.getLoginUser().getPractitionerId()),
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList).eq(ChargeItem::getDeleteFlag,
|
||||
DelFlag.NO.getCode()));
|
||||
new ChargeItem().setStatusEnum(value).setPerformerId(SecurityUtils.getLoginUser().getPractitionerId()),
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList).eq(ChargeItem::getDeleteFlag,
|
||||
DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据表名和id删除费用项
|
||||
*
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param serviceId id
|
||||
*/
|
||||
@Override
|
||||
public void deleteByServiceTableAndId(String tableName, Long serviceId) {
|
||||
baseMapper.delete(new LambdaQueryWrapper<ChargeItem>().eq(ChargeItem::getServiceTable, tableName)
|
||||
.eq(ChargeItem::getServiceId, serviceId));
|
||||
.eq(ChargeItem::getServiceId, serviceId));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,13 +146,13 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
*/
|
||||
@Override
|
||||
public List<String> getRegenerateCharge(Long encounterId) {
|
||||
List<ChargeItem> chargeItemList =
|
||||
baseMapper.selectList(new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, encounterId)
|
||||
.eq(ChargeItem::getStatusEnum, ChargeItemStatus.PLANNED.getValue()).isNotNull(ChargeItem::getRefundId));
|
||||
List<ChargeItem> chargeItemList
|
||||
= baseMapper.selectList(new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, encounterId)
|
||||
.eq(ChargeItem::getStatusEnum, ChargeItemStatus.PLANNED.getValue()).isNotNull(ChargeItem::getRefundId));
|
||||
List<String> chargeItemIdList = new ArrayList<>();
|
||||
if (chargeItemList != null) {
|
||||
chargeItemIdList =
|
||||
chargeItemList.stream().map(item -> item.getId().toString()).collect(Collectors.toList());
|
||||
chargeItemIdList
|
||||
= chargeItemList.stream().map(item -> item.getId().toString()).collect(Collectors.toList());
|
||||
}
|
||||
return chargeItemIdList;
|
||||
}
|
||||
@@ -173,7 +166,7 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
@Override
|
||||
public List<ChargeItem> getChargeItemInfoByReqId(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ChargeItem>().in(ChargeItem::getServiceId, requestIdList)
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,16 +205,16 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
for (ChargeItemDefInfo chargeItemDefInfoById : chargeItemDefInfos) {
|
||||
|
||||
if (!StringUtils.isEmpty(chargeItemDefInfoById.getChildrenJson())) {
|
||||
List<ChargeItem> childrenList =
|
||||
JSON.parseArray(chargeItemDefInfoById.getChildrenJson(), ChargeItem.class);
|
||||
List<ChargeItem> childrenList
|
||||
= JSON.parseArray(chargeItemDefInfoById.getChildrenJson(), ChargeItem.class);
|
||||
for (ChargeItem chargeItem : childrenList) {
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition =
|
||||
chargeItemDefinitionMapper.selectById(chargeItem.getDefinitionId());
|
||||
ChargeItemDefinition chargeItemDefinition
|
||||
= chargeItemDefinitionMapper.selectById(chargeItem.getDefinitionId());
|
||||
|
||||
if (chargeItemDefinition == null) {
|
||||
throw new ServiceException("未查询到定价信息!提示信息:" + chargeItemDefInfoById.getChargeName() + "子项信息--"
|
||||
+ chargeItem.getDefinitionId());
|
||||
+ chargeItem.getDefinitionId());
|
||||
}
|
||||
chargeItemDefInfo = new ChargeItemDefInfo();
|
||||
|
||||
@@ -248,7 +241,7 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
@Override
|
||||
public List<ChargeItem> getChargeItemByProcedureId(List<Long> procedureIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ChargeItem>()
|
||||
.in(ChargeItem::getProcedureId, procedureIdList).eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.in(ChargeItem::getProcedureId, procedureIdList).eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,21 +253,21 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
public void updatePlannedChargeStatus(List<Long> procedureIdList) {
|
||||
for (Long procedureId : procedureIdList) {
|
||||
baseMapper.update(new ChargeItem().setStatusEnum(ChargeItemStatus.PLANNED.getValue()),
|
||||
new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getProcedureId, procedureId)
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getProcedureId, procedureId)
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChargeItem> getChargeItemByEncounterId(Long id) {
|
||||
return baseMapper.selectList(new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, id)
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChargeItem> getChargeItemByEncounterId(Long id, String tableName, List<Long> serviceId) {
|
||||
return baseMapper.selectList(new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, id)
|
||||
.in(ChargeItem::getEncounterId, serviceId).eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.in(ChargeItem::getEncounterId, serviceId).eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,22 +285,22 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
*/
|
||||
@Override
|
||||
public List<CostDetailDto> getCostDetails(QueryWrapper<CostDetailSearchParam> queryWrapper, Integer billable,
|
||||
Integer billed, Integer refunded, Integer active, Integer bed, String admittingDoctor,
|
||||
String personalCashAccount) {
|
||||
Integer billed, Integer refunded, Integer active, Integer bed, String admittingDoctor,
|
||||
String personalCashAccount) {
|
||||
// 查询费用明细
|
||||
List<CostDetailDto> costDetails = baseMapper.getCostDetails(queryWrapper, billable, billed, refunded, active,
|
||||
bed, admittingDoctor, personalCashAccount);
|
||||
bed, admittingDoctor, personalCashAccount);
|
||||
// 翻译字段
|
||||
costDetails.forEach(costDetail -> {
|
||||
// 医保类型
|
||||
if (costDetail.getChrgitmLv() != null) {
|
||||
costDetail
|
||||
.setChrgitmLv_enumText(EnumUtils.getInfoByValue(InsuranceLevel.class, costDetail.getChrgitmLv()));
|
||||
.setChrgitmLv_enumText(EnumUtils.getInfoByValue(InsuranceLevel.class, costDetail.getChrgitmLv()));
|
||||
}
|
||||
// 性别枚举
|
||||
if (costDetail.getGenderEnum() != null) {
|
||||
costDetail.setGenderEnum_enumText(
|
||||
EnumUtils.getInfoByValue(AdministrativeGender.class, costDetail.getGenderEnum()));
|
||||
EnumUtils.getInfoByValue(AdministrativeGender.class, costDetail.getGenderEnum()));
|
||||
}
|
||||
// 计算年龄
|
||||
if (costDetail.getBirthDate() != null) {
|
||||
@@ -316,7 +309,7 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
// 费用类型
|
||||
if (costDetail.getChargeItemEnum() != null) {
|
||||
costDetail
|
||||
.setChargeItemEnum_enumText(ChargeItemEnum.getByValue(costDetail.getChargeItemEnum()).getInfo());
|
||||
.setChargeItemEnum_enumText(ChargeItemEnum.getByValue(costDetail.getChargeItemEnum()).getInfo());
|
||||
}
|
||||
});
|
||||
return costDetails;
|
||||
|
||||
@@ -2,13 +2,7 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
<<<<<<< HEAD
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.administration.domain.Invoice;
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
@@ -29,56 +23,33 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> implements IInvoiceService {
|
||||
|
||||
/**
|
||||
* 新增发票
|
||||
*
|
||||
*
|
||||
* @param invoice 发票实体
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Long addInvoice(Invoice invoice){
|
||||
// 根据编码判断发票是否存在
|
||||
List<Invoice> invoices =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<Invoice>().eq(Invoice::getBusNo, invoice.getBusNo()));
|
||||
if (invoices.size() > 0) {
|
||||
return null;
|
||||
}
|
||||
// 新增发票
|
||||
int insert = baseMapper.insert(invoice);
|
||||
if (insert != 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return invoice.getId();
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* 分页查询发票列表(带用户角色权限过滤)
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param isAdmin 是否管理员
|
||||
* @param userId 当前用户ID
|
||||
* @return 发票列表
|
||||
*/
|
||||
@Override
|
||||
public IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId) {
|
||||
LambdaQueryWrapper<Invoice> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
// 如果不是管理员,只查询当前用户创建的发票
|
||||
if (!isAdmin) {
|
||||
queryWrapper.eq(Invoice::getInvoicingStaffId, userId);
|
||||
public Long addInvoice(Invoice invoice) {
|
||||
// 根据编码判断发票是否存在
|
||||
List<Invoice> invoices
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<Invoice>().eq(Invoice::getBusNo, invoice.getBusNo()));
|
||||
if (invoices.size() > 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 按创建时间降序排序
|
||||
queryWrapper.orderByDesc(Invoice::getCreateTime);
|
||||
|
||||
return baseMapper.selectPage(page, queryWrapper);
|
||||
=======
|
||||
// 新增发票
|
||||
int insert = baseMapper.insert(invoice);
|
||||
if (insert != 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return invoice.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Invoice getByPaymentId(Long id) {
|
||||
return baseMapper.selectOne(new LambdaQueryWrapper<Invoice>().eq(Invoice::getReconciliationId, id)
|
||||
.eq(Invoice::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,8 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.administration.dto.LocationDataDto;
|
||||
=======
|
||||
import javax.annotation.Resource;
|
||||
|
||||
>>>>>>> v1.3
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -31,6 +27,7 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@Service
|
||||
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements ILocationService {
|
||||
|
||||
@Resource
|
||||
private LocationMapper locationMapper;
|
||||
|
||||
@@ -42,7 +39,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
@Override
|
||||
public List<Location> getPharmacyList() {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.PHARMACY.getValue()));
|
||||
.selectList(new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.PHARMACY.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,7 +50,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
@Override
|
||||
public List<Location> getCabinetList() {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.CABINET.getValue()));
|
||||
.selectList(new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.CABINET.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +61,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
@Override
|
||||
public List<Location> getWarehouseList() {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.WAREHOUSE.getValue()));
|
||||
new LambdaQueryWrapper<Location>().eq(Location::getFormEnum, LocationForm.WAREHOUSE.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +72,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
@Override
|
||||
public List<Location> getPharmacyCabinetList() {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Location>().in(Location::getFormEnum,
|
||||
LocationForm.CABINET.getValue(), LocationForm.PHARMACY.getValue(), LocationForm.WAREHOUSE.getValue()));
|
||||
LocationForm.CABINET.getValue(), LocationForm.PHARMACY.getValue(), LocationForm.WAREHOUSE.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,8 +97,8 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
public List<Location> getWardList(Long id) {
|
||||
LambdaQueryWrapper<Location> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(Location::getId, Location::getName)
|
||||
.eq(Location::getStatusEnum, LocationStatus.ACTIVE.getValue())
|
||||
.eq(Location::getFormEnum, LocationForm.WARD.getValue());
|
||||
.eq(Location::getStatusEnum, LocationStatus.ACTIVE.getValue())
|
||||
.eq(Location::getFormEnum, LocationForm.WARD.getValue());
|
||||
if (id != null) {
|
||||
queryWrapper.eq(Location::getOrganizationId, id);
|
||||
}
|
||||
@@ -151,7 +148,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
@Override
|
||||
public boolean updateLocation(Location location) {
|
||||
return baseMapper.update(location,
|
||||
new LambdaUpdateWrapper<Location>().eq(Location::getId, location.getId())) > 0;
|
||||
new LambdaUpdateWrapper<Location>().eq(Location::getId, location.getId())) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,8 +170,8 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
// 创建查询条件
|
||||
LambdaQueryWrapper<Location> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(Location::getId, Location::getName, Location::getFormEnum, Location::getBusNo)
|
||||
.in(Location::getId, ids).eq(Location::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.in(Location::getStatusEnum, status);
|
||||
.in(Location::getId, ids).eq(Location::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.in(Location::getStatusEnum, status);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -198,8 +195,6 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
return this.locationMapper.searchLocationDataByIds(locationIds);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/**
|
||||
* 获取所有位置信息
|
||||
*
|
||||
@@ -212,7 +207,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
|
||||
/**
|
||||
* 判断是否存在相同名字
|
||||
*
|
||||
*
|
||||
* @param name 名字
|
||||
* @param busNo 病区号/病房号/病床号
|
||||
* @param locId 病区ID/病房ID/病床ID
|
||||
@@ -223,5 +218,4 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
return locationMapper.isExistName(name, busNo, locId, DelFlag.NO.getCode());
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,8 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.administration.domain.Practitioner;
|
||||
import com.openhis.administration.dto.OrgDataDto;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import javax.annotation.Resource;
|
||||
|
||||
>>>>>>> v1.3
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -32,13 +26,11 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@Service
|
||||
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization>
|
||||
implements IOrganizationService {
|
||||
implements IOrganizationService {
|
||||
|
||||
@Resource
|
||||
private OrganizationMapper organizationMapper;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> v1.3
|
||||
/**
|
||||
* 机构启用
|
||||
*
|
||||
@@ -48,7 +40,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
@Override
|
||||
public boolean activeOrg(Long orgId) {
|
||||
int updateCount = baseMapper.update(new Organization().setActiveFlag(AccountStatus.ACTIVE.getValue()),
|
||||
new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId));
|
||||
new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -61,7 +53,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
@Override
|
||||
public boolean inactiveOrg(Long orgId) {
|
||||
int updateCount = baseMapper.update(new Organization().setActiveFlag(AccountStatus.INACTIVE.getValue()),
|
||||
new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId));
|
||||
new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -75,10 +67,10 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
@Override
|
||||
public List<Organization> getList(Integer organizationType, Integer organizationClass) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Organization>()
|
||||
.select(Organization::getId, Organization::getName, Organization::getDisplayOrder)
|
||||
.eq(Organization::getTypeEnum, organizationType)
|
||||
.eq(organizationClass != null, Organization::getClassEnum, organizationClass)
|
||||
.orderByAsc(Organization::getDisplayOrder)); // 按 displayOrder 升序排序
|
||||
.select(Organization::getId, Organization::getName, Organization::getDisplayOrder)
|
||||
.eq(Organization::getTypeEnum, organizationType)
|
||||
.eq(organizationClass != null, Organization::getClassEnum, organizationClass)
|
||||
.orderByAsc(Organization::getDisplayOrder)); // 按 displayOrder 升序排序
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,7 +82,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
@Override
|
||||
public List<Organization> getOrganizationListById(List<Long> collect) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Organization>().in(Organization::getId, collect)
|
||||
.eq(Organization::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(Organization::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -102,4 +94,4 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
public List<OrgDataDto> searchOrgDataByHealth() {
|
||||
return this.organizationMapper.searchOrgDataByHealth();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,7 @@ import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.administration.domain.PatientStudent;
|
||||
import com.openhis.administration.mapper.PatientStudentMapper;
|
||||
import com.openhis.administration.service.IPatientStudentService;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.PhysicalExamResult;
|
||||
|
||||
/**
|
||||
@@ -27,11 +23,11 @@ import com.openhis.common.enums.PhysicalExamResult;
|
||||
*/
|
||||
@Service
|
||||
public class PatientStudentServiceImpl extends ServiceImpl<PatientStudentMapper, PatientStudent>
|
||||
implements IPatientStudentService {
|
||||
implements IPatientStudentService {
|
||||
|
||||
/**
|
||||
* 校验学生公费资格
|
||||
*
|
||||
*
|
||||
* @param patient
|
||||
*/
|
||||
public void checkStatus(Patient patient) {
|
||||
@@ -40,8 +36,8 @@ public class PatientStudentServiceImpl extends ServiceImpl<PatientStudentMapper,
|
||||
Date date = new Date();
|
||||
|
||||
List<PatientStudent> patientStudents = baseMapper.selectList(new LambdaQueryWrapper<PatientStudent>()
|
||||
.eq(PatientStudent::getIdNumber, idCard).eq(PatientStudent::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(PatientStudent::getPatientId, patient.getId()));
|
||||
.eq(PatientStudent::getIdNumber, idCard).eq(PatientStudent::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(PatientStudent::getPatientId, patient.getId()));
|
||||
|
||||
if (patientStudents == null || patientStudents.isEmpty()) {
|
||||
throw new ServiceException("该患者不是学生,请更换费用性质类型!");
|
||||
@@ -62,4 +58,4 @@ public class PatientStudentServiceImpl extends ServiceImpl<PatientStudentMapper,
|
||||
throw new ServiceException("该患者体检不合格不可以享受公费");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
import com.openhis.administration.mapper.SupplierMapper;
|
||||
import com.openhis.administration.service.ISupplierService;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.SupplierType;
|
||||
import com.openhis.common.enums.Whether;
|
||||
|
||||
@@ -42,8 +38,8 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addSupplier(Supplier supplier) {
|
||||
// 根据病种编码判断病种是否存在
|
||||
List<Supplier> suppliers =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<Supplier>().eq(Supplier::getBusNo, supplier.getBusNo()));
|
||||
List<Supplier> suppliers
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<Supplier>().eq(Supplier::getBusNo, supplier.getBusNo()));
|
||||
if (suppliers.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -63,9 +59,9 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
@Override
|
||||
public List<Supplier> getList() {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<Supplier>().select(Supplier::getId, Supplier::getName, Supplier::getPhone)
|
||||
.eq(Supplier::getTypeEnum, SupplierType.SUPPLIER.getValue())
|
||||
.eq(Supplier::getDeleteFlag, DelFlag.NO.getCode()).eq(Supplier::getActiveFlag, Whether.YES.getValue()));
|
||||
new LambdaQueryWrapper<Supplier>().select(Supplier::getId, Supplier::getName, Supplier::getPhone)
|
||||
.eq(Supplier::getTypeEnum, SupplierType.SUPPLIER.getValue())
|
||||
.eq(Supplier::getDeleteFlag, DelFlag.NO.getCode()).eq(Supplier::getActiveFlag, Whether.YES.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,6 +75,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
@Override
|
||||
public List<Supplier> getsupplierList(String name, String address, Integer typeEnum) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Supplier>().eq(Supplier::getName, name)
|
||||
.eq(Supplier::getAddress, address).eq(Supplier::getTypeEnum, typeEnum));
|
||||
.eq(Supplier::getAddress, address).eq(Supplier::getTypeEnum, typeEnum));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user