提交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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,143 +27,204 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DocInventoryItemStatic extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
<<<<<<< HEAD
|
||||
/** 物品类别 */
|
||||
private String categoryCode;
|
||||
=======
|
||||
/** 备份单据编号 */
|
||||
/**
|
||||
* 备份单据编号
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
/** 药品类别 */
|
||||
/**
|
||||
* 药品类别
|
||||
*/
|
||||
private String medCategoryCode;
|
||||
|
||||
/** 耗材类别 */
|
||||
/**
|
||||
* 耗材类别
|
||||
*/
|
||||
private String devCategoryCode;
|
||||
>>>>>>> v1.3
|
||||
|
||||
/** 名称 */
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/** 库存状态 */
|
||||
/**
|
||||
* 库存状态
|
||||
*/
|
||||
private Integer inventoryStatusEnum;
|
||||
|
||||
/** 供应商id */
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
/** 说明书 */
|
||||
/**
|
||||
* 说明书
|
||||
*/
|
||||
private String descriptionText;
|
||||
|
||||
/** 最小单位 */
|
||||
/**
|
||||
* 最小单位
|
||||
*/
|
||||
private String unitCode;
|
||||
|
||||
<<<<<<< HEAD
|
||||
/** 当前库存数量(最小单位数量) */
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private BigDecimal quantity;
|
||||
|
||||
=======
|
||||
/** 库存数量 */
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 包装单位数量(整数部分) */
|
||||
/**
|
||||
* 包装单位数量(整数部分)
|
||||
*/
|
||||
private BigDecimal number;
|
||||
|
||||
/** 包装单位数量(余数部分) */
|
||||
/**
|
||||
* 包装单位数量(余数部分)
|
||||
*/
|
||||
private BigDecimal remainder;
|
||||
|
||||
>>>>>>> v1.3
|
||||
/** 产品批号 */
|
||||
/**
|
||||
* 产品批号
|
||||
*/
|
||||
private String lotNumber;
|
||||
|
||||
/** 生产日期 */
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private Date productionDate;
|
||||
|
||||
/** 失效日期 */
|
||||
/**
|
||||
* 失效日期
|
||||
*/
|
||||
private Date expirationDate;
|
||||
|
||||
/** 库位 */
|
||||
/**
|
||||
* 库位
|
||||
*/
|
||||
private Long locationStoreId;
|
||||
|
||||
/** 仓库 */
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
/** 追溯码 */
|
||||
/**
|
||||
* 追溯码
|
||||
*/
|
||||
private String traceNo;
|
||||
|
||||
/** 追溯码包装层级 */
|
||||
/**
|
||||
* 追溯码包装层级
|
||||
*/
|
||||
private Integer packagingLevels;
|
||||
|
||||
/** 项目 */
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private String itemTable;
|
||||
|
||||
/** 物品编码 */
|
||||
/**
|
||||
* 物品编码
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/** 采购单价(包装单位) */
|
||||
/**
|
||||
* 采购单价(包装单位)
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/** 销售单价(包装单位) */
|
||||
/**
|
||||
* 销售单价(包装单位)
|
||||
*/
|
||||
private BigDecimal salePrice;
|
||||
|
||||
<<<<<<< HEAD
|
||||
/** 项目编号 */
|
||||
private String busNo;
|
||||
=======
|
||||
/** 总零售价 */
|
||||
/**
|
||||
* 总零售价
|
||||
*/
|
||||
private BigDecimal totalSalePrice;
|
||||
|
||||
/** 总进价 */
|
||||
/**
|
||||
* 总进价
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 项目编号 */
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String itemNo;
|
||||
>>>>>>> v1.3
|
||||
|
||||
/** 最小单位 */
|
||||
/**
|
||||
* 最小单位
|
||||
*/
|
||||
private String minUnitCode;
|
||||
|
||||
/** 拆零比 */
|
||||
/**
|
||||
* 拆零比
|
||||
*/
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 供应商名称 */
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
|
||||
/** 库房名称 */
|
||||
/**
|
||||
* 库房名称
|
||||
*/
|
||||
private String locationName;
|
||||
|
||||
/** 货位名称 */
|
||||
/**
|
||||
* 货位名称
|
||||
*/
|
||||
private String locationStoreName;
|
||||
|
||||
/** 生产厂商文本 */
|
||||
/**
|
||||
* 生产厂商文本
|
||||
*/
|
||||
private String manufacturerText;
|
||||
|
||||
/** 医保等级 */
|
||||
/**
|
||||
* 医保等级
|
||||
*/
|
||||
private Integer chrgitmLv;
|
||||
|
||||
/** 规格 */
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String totalVolume;
|
||||
|
||||
/** 药品名称拼音码 */
|
||||
/**
|
||||
* 药品名称拼音码
|
||||
*/
|
||||
private String pyStr;
|
||||
|
||||
/** 药品五笔码 */
|
||||
/**
|
||||
* 药品五笔码
|
||||
*/
|
||||
private String wbStr;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/** 剩余过期天数 */
|
||||
/**
|
||||
* 剩余过期天数
|
||||
*/
|
||||
private Integer remainingDays;
|
||||
|
||||
/** 库存id */
|
||||
/**
|
||||
* 库存id
|
||||
*/
|
||||
private Long inventoryId;
|
||||
|
||||
/** 医保码 */
|
||||
/**
|
||||
* 医保码
|
||||
*/
|
||||
private String ybNo;
|
||||
|
||||
/** 批准文号 */
|
||||
/**
|
||||
* 批准文号
|
||||
*/
|
||||
private String approvalNumber;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
*/
|
||||
package com.openhis.document.service;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import java.util.List;
|
||||
|
||||
>>>>>>> v1.3
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
|
||||
@@ -17,9 +14,6 @@ import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
* @author zwh
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
public interface IDocInventoryItemStaticService extends IService<DocInventoryItemStatic> {}
|
||||
=======
|
||||
public interface IDocInventoryItemStaticService extends IService<DocInventoryItemStatic> {
|
||||
|
||||
/**
|
||||
@@ -32,4 +26,3 @@ public interface IDocInventoryItemStaticService extends IService<DocInventoryIte
|
||||
*/
|
||||
List<DocInventoryItemStatic> getInventoryItemStaticByItemId(List<Long> itemIdList, String busNo, Long locationId);
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
*/
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
=======
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -15,7 +10,6 @@ import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
import com.openhis.document.mapper.DocInventoryItemStaticMapper;
|
||||
import com.openhis.document.service.IDocInventoryItemStaticService;
|
||||
@@ -28,10 +22,7 @@ import com.openhis.document.service.IDocInventoryItemStaticService;
|
||||
*/
|
||||
@Service
|
||||
public class DocInventoryItemStaticServiceImpl extends ServiceImpl<DocInventoryItemStaticMapper, DocInventoryItemStatic>
|
||||
<<<<<<< HEAD
|
||||
implements IDocInventoryItemStaticService {}
|
||||
=======
|
||||
implements IDocInventoryItemStaticService {
|
||||
implements IDocInventoryItemStaticService {
|
||||
|
||||
/**
|
||||
* 根据物品id获取物品的库存备份信息
|
||||
@@ -41,15 +32,14 @@ public class DocInventoryItemStaticServiceImpl extends ServiceImpl<DocInventoryI
|
||||
*/
|
||||
@Override
|
||||
public List<DocInventoryItemStatic> getInventoryItemStaticByItemId(List<Long> itemIdList, String busNo,
|
||||
Long locationId) {
|
||||
Long locationId) {
|
||||
LambdaQueryWrapper<DocInventoryItemStatic> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (itemIdList != null && !itemIdList.isEmpty()) {
|
||||
queryWrapper.in(DocInventoryItemStatic::getItemId, itemIdList);
|
||||
}
|
||||
queryWrapper.eq(DocInventoryItemStatic::getBusNo, busNo)
|
||||
.eq(DocInventoryItemStatic::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(DocInventoryItemStatic::getLocationId, locationId).orderByDesc(DocInventoryItemStatic::getCreateTime);
|
||||
.eq(DocInventoryItemStatic::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(DocInventoryItemStatic::getLocationId, locationId).orderByDesc(DocInventoryItemStatic::getCreateTime);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -25,91 +25,134 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PaymentReconciliation extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 状态 */
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 关联ID */
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
private Long relationId;
|
||||
|
||||
/** 支付的业务标识符 */
|
||||
/**
|
||||
* 支付的业务标识符
|
||||
*/
|
||||
private String paymentNo;
|
||||
|
||||
/** 付款类别 */
|
||||
/**
|
||||
* 付款类别
|
||||
*/
|
||||
private Integer paymentEnum;
|
||||
|
||||
/** 付款实体ID */
|
||||
/**
|
||||
* 付款实体ID
|
||||
*/
|
||||
private Long paymentReconciliationId;
|
||||
|
||||
/** 发起支付的工作流程类别 */
|
||||
/**
|
||||
* 发起支付的工作流程类别
|
||||
*/
|
||||
private Integer kindEnum;
|
||||
|
||||
/** 收款员 */
|
||||
/**
|
||||
* 收款员
|
||||
*/
|
||||
private Long entererId;
|
||||
|
||||
/** 支付发起人类型 */
|
||||
/**
|
||||
* 支付发起人类型
|
||||
*/
|
||||
private Integer issuerEnum;
|
||||
|
||||
/** 支付的患者ID */
|
||||
/**
|
||||
* 支付的患者ID
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/** 请求支付责任人ID */
|
||||
/**
|
||||
* 请求支付责任人ID
|
||||
*/
|
||||
private Long practitionerId;
|
||||
|
||||
/** 付款结果 */
|
||||
/**
|
||||
* 付款结果
|
||||
*/
|
||||
private Integer outcomeEnum;
|
||||
|
||||
/** 支付位置 */
|
||||
/**
|
||||
* 支付位置
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
/** 到期时间 */
|
||||
/**
|
||||
* 到期时间
|
||||
*/
|
||||
private Date expirationDate;
|
||||
|
||||
/** 应收金额 */
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
private BigDecimal tenderedAmount;
|
||||
|
||||
/** 找零金额 */
|
||||
/**
|
||||
* 找零金额
|
||||
*/
|
||||
private BigDecimal returnedAmount;
|
||||
|
||||
/** 付款总额 */
|
||||
/**
|
||||
* 付款总额
|
||||
*/
|
||||
private BigDecimal displayAmount;
|
||||
|
||||
/** 打印标识 */
|
||||
/**
|
||||
* 打印标识
|
||||
*/
|
||||
private Integer printCount;
|
||||
|
||||
/** 合同编码 */
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private String contractNo;// 2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
|
||||
/** 处方号集合 */
|
||||
/**
|
||||
* 处方号集合
|
||||
*/
|
||||
private String chargeItemIds;
|
||||
|
||||
/** 就诊ID */
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
private Long encounterId;
|
||||
|
||||
/** 结算时间 */
|
||||
/**
|
||||
* 结算时间
|
||||
*/
|
||||
private Date billDate;
|
||||
|
||||
/** 发票编号 */
|
||||
/**
|
||||
* 发票编号
|
||||
*/
|
||||
private Long invoiceId;
|
||||
|
||||
/** 关联账户Id */
|
||||
/**
|
||||
* 关联账户Id
|
||||
*/
|
||||
private Long accountId;// 2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
|
||||
/** 医保结算id */
|
||||
/**
|
||||
* 医保结算id
|
||||
*/
|
||||
private String ybSettleIds;// 记录医保结算id
|
||||
|
||||
/** 医保清算标志 */
|
||||
<<<<<<< HEAD
|
||||
private Integer ybClearFlag;//默认值0 未清算
|
||||
|
||||
/** 退号/退费原因 */
|
||||
@TableField("refund_reason")
|
||||
private String refundReason;
|
||||
|
||||
=======
|
||||
/**
|
||||
* 医保清算标志
|
||||
*/
|
||||
private Integer ybClearFlag;// 默认值0 未清算
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,40 +3,26 @@ package com.openhis.financial.domain;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
>>>>>>> v1.3
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* 第三方支付回调实体(下方备注信息以中银支付为模板)
|
||||
=======
|
||||
* 第三方支付回调实体(下方备注信息以中银支付为模板,其中会产生冗余字段或者重复字段,这些字段均以第三方平台返回内容为主)
|
||||
>>>>>>> v1.3
|
||||
*/
|
||||
@Data
|
||||
@TableName("fin_three_part_pay_call_back")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
<<<<<<< HEAD
|
||||
public class ThreePartPayCallBack {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
=======
|
||||
public class ThreePartPayCallBack extends HisBaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
>>>>>>> v1.3
|
||||
private BigDecimal id;
|
||||
|
||||
/**
|
||||
@@ -147,27 +133,17 @@ public class ThreePartPayCallBack extends HisBaseEntity {
|
||||
/**
|
||||
* 付款主键ID
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
>>>>>>> v1.3
|
||||
private Long paymentId;
|
||||
|
||||
/**
|
||||
* 前台UI序号
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
private Long index;
|
||||
=======
|
||||
private Long payIndex;
|
||||
>>>>>>> v1.3
|
||||
|
||||
/**
|
||||
* 时间戳(中银建议)
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
private Long time;
|
||||
=======
|
||||
private Long payTime;
|
||||
|
||||
/**
|
||||
@@ -235,5 +211,4 @@ public class ThreePartPayCallBack extends HisBaseEntity {
|
||||
*/
|
||||
private String lotNo;
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.financial.domain.ThreePartPayCallBack;
|
||||
|
||||
public interface ThreePartPayCallBackService extends IService<ThreePartPayCallBack> {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
ThreePartPayCallBack getByPayment(Long paymentId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -32,11 +32,7 @@ import com.openhis.administration.service.impl.PatientServiceImpl;
|
||||
import com.openhis.administration.service.impl.PatientStudentServiceImpl;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.YbCommonConstants;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.ItemType;
|
||||
import com.openhis.common.enums.PaymentKind;
|
||||
import com.openhis.common.enums.PaymentStatus;
|
||||
@@ -71,7 +67,8 @@ import com.openhis.yb.service.YbManager;
|
||||
*/
|
||||
@Service
|
||||
public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconciliationMapper, PaymentReconciliation>
|
||||
implements IPaymentReconciliationService {
|
||||
implements IPaymentReconciliationService {
|
||||
|
||||
@Resource
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
@Autowired
|
||||
@@ -107,22 +104,22 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
public List<Long> getChargeItemIdListByPayment(List<Long> paymentIdList) {
|
||||
|
||||
// 根据支付id获取支付信息
|
||||
List<PaymentReconciliation> paymentReconciliationList =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.select(PaymentReconciliation::getChargeItemIds).in(PaymentReconciliation::getId, paymentIdList));
|
||||
List<PaymentReconciliation> paymentReconciliationList
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.select(PaymentReconciliation::getChargeItemIds).in(PaymentReconciliation::getId, paymentIdList));
|
||||
if (paymentReconciliationList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// 拆解所有的chargeItemId,拼装成一个集合
|
||||
List<String> chargeItemIdList = paymentReconciliationList.stream().map(PaymentReconciliation::getChargeItemIds)
|
||||
.collect(Collectors.toList());
|
||||
.collect(Collectors.toList());
|
||||
List<Long> chargeItemIds = new ArrayList<>();
|
||||
for (String chargeItemId : chargeItemIdList) {
|
||||
if (StringUtils.isNotEmpty(chargeItemId)) {
|
||||
chargeItemIds.addAll(Arrays
|
||||
.stream(
|
||||
chargeItemId.replaceAll("\\[", "").replaceAll("\\]", "").split(CommonConstants.Common.COMMA))
|
||||
.map(Long::parseLong).collect(Collectors.toList()));
|
||||
.stream(
|
||||
chargeItemId.replaceAll("\\[", "").replaceAll("\\]", "").split(CommonConstants.Common.COMMA))
|
||||
.map(Long::parseLong).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
// 将收费项目集合转换成列表
|
||||
@@ -137,15 +134,16 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
@Override
|
||||
public void updateRefundingStatus(List<Long> paymentIdList) {
|
||||
baseMapper.update(new PaymentReconciliation().setStatusEnum(PaymentStatus.REFUNDING.getValue()),
|
||||
new LambdaUpdateWrapper<PaymentReconciliation>().in(PaymentReconciliation::getId, paymentIdList));
|
||||
new LambdaUpdateWrapper<PaymentReconciliation>().in(PaymentReconciliation::getId, paymentIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
* PS:对chargeItem分付款方式 2025/05/23 ChargeItem分完付款方式之后,医保支付的ChargeItem还要分特慢病和普通门诊,特慢病等支付与常规门诊支付传参不一样
|
||||
* PS:对chargeItem分付款方式 2025/05/23
|
||||
* ChargeItem分完付款方式之后,医保支付的ChargeItem还要分特慢病和普通门诊,特慢病等支付与常规门诊支付传参不一样
|
||||
*/
|
||||
/**
|
||||
* 【预结算】
|
||||
*
|
||||
*
|
||||
* @param ybMdtrtCertType 医保凭证类型
|
||||
* @param busiCardInfo 读卡获取的密钥
|
||||
* @param contractBusNo 合同编号
|
||||
@@ -154,7 +152,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
*/
|
||||
@Override
|
||||
public PrePaymentResult preSettle(YbMdtrtCertType ybMdtrtCertType, String busiCardInfo, String contractBusNo,
|
||||
List<PaymentedItemModel> paymentedItemList) {
|
||||
List<PaymentedItemModel> paymentedItemList) {
|
||||
|
||||
PrePaymentResult prePaymentResult = null;
|
||||
String ybSwitchFlag = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
||||
@@ -180,8 +178,8 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
case "229900":// 吉林省医保
|
||||
case "220199":// 长春市医保(农大)
|
||||
case "220100":// 长春市医保(长大)
|
||||
Map<String, List<PaymentedItemModel>> collect =
|
||||
paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getMedType));
|
||||
Map<String, List<PaymentedItemModel>> collect
|
||||
= paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getMedType));
|
||||
if (collect.entrySet().size() > 1) {
|
||||
throw new ServiceException("医保只接受同种医疗类型结算(普通门诊与慢病等不可以同时结算)!");
|
||||
}
|
||||
@@ -190,21 +188,21 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
Clinic2206OrderOutput clinic2206OrderOutput = null;
|
||||
ClinicReg2201Output reg2201Output = null;
|
||||
if (!medTypeKV.getKey().equals(YbMedType.GENERAL_OUTPATIENT.getValue()) && "1".equals(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))) {
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))) {
|
||||
// 不是普通门诊就诊类型,补充挂号信息
|
||||
reg2201Output = ybManager.createRegWithMedType(contract, ybMdtrtCertType, busiCardInfo,
|
||||
medTypeKV.getValue().get(0).getEncounterId(),
|
||||
YbMedType.getByValue(medTypeKV.getValue().get(0).getMedType()));
|
||||
medTypeKV.getValue().get(0).getEncounterId(),
|
||||
YbMedType.getByValue(medTypeKV.getValue().get(0).getMedType()));
|
||||
reg2201Output.setMedType(medTypeKV.getKey());// 2025/06/05慢病挂号后上传2206信息报错,2201返回值没有medType,此处更正赋值
|
||||
} else {
|
||||
// 从数据库里取reg2201
|
||||
reg2201Output =
|
||||
ybManager.getClinicRegByEncounterId(medTypeKV.getValue().get(0).getEncounterId());
|
||||
reg2201Output
|
||||
= ybManager.getClinicRegByEncounterId(medTypeKV.getValue().get(0).getEncounterId());
|
||||
}
|
||||
// 调用预结算
|
||||
clinic2206OrderOutput = ybManager.preSettle(contract, medTypeKV.getValue().get(0).getEncounterId(),
|
||||
ybMdtrtCertType, busiCardInfo, reg2201Output, "01", medTypeKV.getValue(),
|
||||
YbMedType.getByValue(medTypeKV.getKey()));
|
||||
ybMdtrtCertType, busiCardInfo, reg2201Output, "01", medTypeKV.getValue(),
|
||||
YbMedType.getByValue(medTypeKV.getKey()));
|
||||
prePaymentResult = new PrePaymentResult();
|
||||
BeanUtils.copyProperties(clinic2206OrderOutput, prePaymentResult);
|
||||
}
|
||||
@@ -225,7 +223,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
|
||||
/**
|
||||
* 学生二次报销
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param ybMdtrtCertType 医疗类别
|
||||
* @param busiCardInfo 电子码
|
||||
@@ -234,7 +232,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
* @return 预结算结果
|
||||
*/
|
||||
private PrePaymentResult studentYbPay(Contract contract, YbMdtrtCertType ybMdtrtCertType, String busiCardInfo,
|
||||
String s, List<PaymentedItemModel> paymentedItemList) {
|
||||
String s, List<PaymentedItemModel> paymentedItemList) {
|
||||
|
||||
// 查比例及分类信息(PaymentedItemModel在chargeItem表中不是一定存在的所以此处改用单独查询)
|
||||
List<StudentPaymentItemModel> allPaymentItemList = getStudentPaymentItemModelList(paymentedItemList);
|
||||
@@ -244,16 +242,16 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
for (StudentPaymentItemModel studentPaymentItemModel : allPaymentItemList) {
|
||||
// 获取折扣比例
|
||||
BigDecimal ratio = studentPaymentItemModel.getTwiceRatio() == null ? studentPaymentItemModel.getSelfRatio()
|
||||
: studentPaymentItemModel.getTwiceRatio();
|
||||
: studentPaymentItemModel.getTwiceRatio();
|
||||
|
||||
// 计算金额
|
||||
onceReceivedAmount = onceReceivedAmount.add(studentPaymentItemModel.getTotalPrice()
|
||||
.multiply(ratio.divide(new BigDecimal("100"), 6, RoundingMode.HALF_UP)));
|
||||
.multiply(ratio.divide(new BigDecimal("100"), 6, RoundingMode.HALF_UP)));
|
||||
}
|
||||
|
||||
// 医保结算
|
||||
PrePaymentResult prePaymentResult =
|
||||
this.studentPreSettleYb(contract, ybMdtrtCertType, busiCardInfo, paymentedItemList);
|
||||
PrePaymentResult prePaymentResult
|
||||
= this.studentPreSettleYb(contract, ybMdtrtCertType, busiCardInfo, paymentedItemList);
|
||||
if (prePaymentResult == null) {
|
||||
throw new ServiceException("医生开具的收费项未分配对应的医疗类型!");
|
||||
}
|
||||
@@ -272,7 +270,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
|
||||
/**
|
||||
* 学生一次报销
|
||||
*
|
||||
*
|
||||
* @param paymentedItemList 收费项
|
||||
* @return 预结算结果
|
||||
*/
|
||||
@@ -285,7 +283,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
for (StudentPaymentItemModel studentPaymentItemModel : allPaymentItemList) {
|
||||
// 获取折扣比例
|
||||
BigDecimal ratio = studentPaymentItemModel.getTwiceRatio() == null ? studentPaymentItemModel.getSelfRatio()
|
||||
: studentPaymentItemModel.getTwiceRatio();
|
||||
: studentPaymentItemModel.getTwiceRatio();
|
||||
|
||||
// 计算金额
|
||||
onceReceivedAmount = onceReceivedAmount.add(studentPaymentItemModel.getTotalPrice().multiply(ratio));
|
||||
@@ -307,7 +305,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
|
||||
/**
|
||||
* 【门诊结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param payTransNo 支付批次号
|
||||
* @param ybMdtrtCertType 凭证类型
|
||||
@@ -318,13 +316,13 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
*/
|
||||
@Override
|
||||
public PaymentResult settle(Contract contract, String payTransNo, YbMdtrtCertType ybMdtrtCertType,
|
||||
String busiCardInfo, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
String busiCardInfo, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
PaymentResult paymentResult = null;
|
||||
if (!(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(payTransNo)
|
||||
|| CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO.equals(payTransNo))) {
|
||||
|| CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO.equals(payTransNo))) {
|
||||
// 医保支付 todo:支付的详细信息在于结算中已经存好了,但是还没有存储卡余额
|
||||
Clinic2207OrderModel clinic2207OrderModel =
|
||||
ybManager.settle(contract, payTransNo, busiCardInfo, ybMdtrtCertType, minpacuntDrugTracCnt, mcsTracCnt);
|
||||
Clinic2207OrderModel clinic2207OrderModel
|
||||
= ybManager.settle(contract, payTransNo, busiCardInfo, ybMdtrtCertType, minpacuntDrugTracCnt, mcsTracCnt);
|
||||
paymentResult = new PaymentResult();
|
||||
BeanUtils.copyProperties(clinic2207OrderModel, paymentResult);
|
||||
} else {
|
||||
@@ -365,43 +363,43 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
@Override
|
||||
public void updatePaymentStatusById(Long id, PaymentStatus success) {
|
||||
baseMapper.update(new PaymentReconciliation().setStatusEnum(success.getValue()),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更改payment状态以及医保支付结算id
|
||||
*
|
||||
*
|
||||
* @param id 主键id
|
||||
* @param success 状态
|
||||
* @param settleId 医保结算id
|
||||
*/
|
||||
@Override
|
||||
public void updatePaymentStatusAndSettleIdsById(Long id, PaymentStatus success, Integer paymentOutcome,
|
||||
List<String> settleId) {
|
||||
List<String> settleId) {
|
||||
if (settleId == null || settleId.isEmpty()) {
|
||||
baseMapper.update(
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue()).setOutcomeEnum(paymentOutcome),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue()).setOutcomeEnum(paymentOutcome),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
} else {
|
||||
baseMapper.update(
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue()).setYbSettleIds(String.join(",", settleId))
|
||||
.setOutcomeEnum(paymentOutcome),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue()).setYbSettleIds(String.join(",", settleId))
|
||||
.setOutcomeEnum(paymentOutcome),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询付款实体
|
||||
*
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 付款实体
|
||||
*/
|
||||
@Override
|
||||
public PaymentReconciliation getByEncounterId(Long encounterId, PaymentKind paymentKind) {
|
||||
return baseMapper.selectOne(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.eq(PaymentReconciliation::getEncounterId, encounterId)
|
||||
.eq(PaymentReconciliation::getKindEnum, PaymentKind.HOSPITAL_DEPOSIT.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.eq(PaymentReconciliation::getEncounterId, encounterId)
|
||||
.eq(PaymentReconciliation::getKindEnum, PaymentKind.HOSPITAL_DEPOSIT.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,7 +412,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
public List<PaymentReconciliation> getListByEncounterId(Long encounterId, PaymentKind paymentKind) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.eq(PaymentReconciliation::getEncounterId, encounterId)
|
||||
.in(PaymentReconciliation::getStatusEnum, PaymentStatus.SUCCESS.getValue(),PaymentStatus.REFUNDING.getValue())
|
||||
.in(PaymentReconciliation::getStatusEnum, PaymentStatus.SUCCESS.getValue(), PaymentStatus.REFUNDING.getValue())
|
||||
.eq(PaymentReconciliation::getKindEnum, PaymentKind.HOSPITAL_DEPOSIT.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
@@ -428,10 +426,10 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
@Override
|
||||
public boolean isReturn(Long paymentId) {
|
||||
List<PaymentReconciliation> paymentReconciliations = baseMapper.selectList(
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getRelationId, paymentId)
|
||||
.in(PaymentReconciliation::getStatusEnum, PaymentStatus.REFUNDING.getValue(),
|
||||
PaymentStatus.REFUND_ALL.getValue(), PaymentStatus.REFUND_PART.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getRelationId, paymentId)
|
||||
.in(PaymentReconciliation::getStatusEnum, PaymentStatus.REFUNDING.getValue(),
|
||||
PaymentStatus.REFUND_ALL.getValue(), PaymentStatus.REFUND_PART.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
if (paymentReconciliations != null && paymentReconciliations.size() > 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -452,14 +450,14 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
*/
|
||||
@Override
|
||||
public List<PaymentReconciliationAccountDel> getPaymentAccountContract(String startTime, String endTime,
|
||||
Long entererId, String contractNo, Integer success, Integer returnAll, Integer clinic) {
|
||||
Long entererId, String contractNo, Integer success, Integer returnAll, Integer clinic) {
|
||||
return baseMapper.getPaymentAccountContract(startTime, endTime, entererId, contractNo, success, returnAll,
|
||||
clinic);
|
||||
clinic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询自付比例等
|
||||
*
|
||||
*
|
||||
* @param paymentedItemList 收款明细
|
||||
* @return 学生付款实体
|
||||
*/
|
||||
@@ -468,18 +466,18 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
// 大项比例
|
||||
List<GfTypeRatioDto> typeRatioList = gfRatioService.getTypeRatioList();
|
||||
Map<String, Map<String, List<GfTypeRatioDto>>> result = typeRatioList.stream().collect(
|
||||
// 第一次分组:按 ybClass 分组(外层 key 为 ybClass)
|
||||
Collectors.groupingBy(GfTypeRatioDto::getYbClass,
|
||||
// 第二次分组:对每个分组的 List 再按 subType 分组(内层 key 为 subType)
|
||||
Collectors.groupingBy(GfTypeRatioDto::getYbLv)));
|
||||
// 第一次分组:按 ybClass 分组(外层 key 为 ybClass)
|
||||
Collectors.groupingBy(GfTypeRatioDto::getYbClass,
|
||||
// 第二次分组:对每个分组的 List 再按 subType 分组(内层 key 为 subType)
|
||||
Collectors.groupingBy(GfTypeRatioDto::getYbLv)));
|
||||
|
||||
List<StudentPaymentItemModel> allPaymentItemList = new ArrayList<>();
|
||||
|
||||
Map<String, List<PaymentedItemModel>> paymentedItemListByServiceTableMap =
|
||||
paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getServiceTable));
|
||||
Map<String, List<PaymentedItemModel>> paymentedItemListByServiceTableMap
|
||||
= paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getServiceTable));
|
||||
|
||||
for (Map.Entry<String, List<PaymentedItemModel>> stringListEntry : paymentedItemListByServiceTableMap
|
||||
.entrySet()) {
|
||||
.entrySet()) {
|
||||
|
||||
String key = stringListEntry.getKey();
|
||||
ItemType itemType;
|
||||
@@ -500,13 +498,13 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
continue;
|
||||
}
|
||||
// 查定价分类
|
||||
ChargeItemDefinition chargeItemDefinition =
|
||||
chargeItemDefinitionService.getById(studentPaymentItemModel.getDefinitionId());
|
||||
ChargeItemDefinition chargeItemDefinition
|
||||
= chargeItemDefinitionService.getById(studentPaymentItemModel.getDefinitionId());
|
||||
|
||||
// 查医保等级
|
||||
if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(studentPaymentItemModel.getProductTable())) {
|
||||
DeviceDefinition deviceDefinition =
|
||||
deviceDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
DeviceDefinition deviceDefinition
|
||||
= deviceDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
if (deviceDefinition != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件
|
||||
YbMedChrgItmType medChrgItmType = YbMedChrgItmType.getByValue(chargeItemDefinition.getYbType());
|
||||
@@ -517,11 +515,11 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
if (chrgitmLv == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保等级!请检查!!!");
|
||||
}
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos =
|
||||
result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos
|
||||
= result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
if (gfTypeRatioDtos == null || gfTypeRatioDtos.isEmpty()) {
|
||||
throw new ServiceException(
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
}
|
||||
|
||||
studentPaymentItemModel.setSelfRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
@@ -529,9 +527,9 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
|
||||
}
|
||||
} else if (CommonConstants.TableName.WOR_ACTIVITY_DEFINITION
|
||||
.equals(studentPaymentItemModel.getProductTable())) {
|
||||
ActivityDefinition activityDefinition =
|
||||
activityDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
.equals(studentPaymentItemModel.getProductTable())) {
|
||||
ActivityDefinition activityDefinition
|
||||
= activityDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
if (activityDefinition != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件
|
||||
YbMedChrgItmType medChrgItmType = YbMedChrgItmType.getByValue(chargeItemDefinition.getYbType());
|
||||
@@ -542,20 +540,20 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
if (chrgitmLv == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保等级!请检查!!!");
|
||||
}
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos =
|
||||
result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos
|
||||
= result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
if (gfTypeRatioDtos == null || gfTypeRatioDtos.isEmpty()) {
|
||||
throw new ServiceException(
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
}
|
||||
|
||||
studentPaymentItemModel.setSelfRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
studentPaymentItemModel.setTwiceRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
}
|
||||
} else if (CommonConstants.TableName.MED_MEDICATION_DEFINITION
|
||||
.equals(studentPaymentItemModel.getProductTable())) {
|
||||
MedicationDefinition medicationDefinition =
|
||||
medicationDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
.equals(studentPaymentItemModel.getProductTable())) {
|
||||
MedicationDefinition medicationDefinition
|
||||
= medicationDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
if (medicationDefinition != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件
|
||||
YbMedChrgItmType medChrgItmType = YbMedChrgItmType.getByValue(chargeItemDefinition.getYbType());
|
||||
@@ -566,19 +564,19 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
if (chrgitmLv == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保等级!请检查!!!");
|
||||
}
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos =
|
||||
result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos
|
||||
= result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
if (gfTypeRatioDtos == null || gfTypeRatioDtos.isEmpty()) {
|
||||
throw new ServiceException(
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
}
|
||||
|
||||
studentPaymentItemModel.setSelfRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
studentPaymentItemModel.setTwiceRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
}
|
||||
} else {
|
||||
HealthcareService healthcareService =
|
||||
healthcareServiceService.getById(studentPaymentItemModel.getServiceId());
|
||||
HealthcareService healthcareService
|
||||
= healthcareServiceService.getById(studentPaymentItemModel.getServiceId());
|
||||
if (healthcareService != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件 医疗服务没有定义医保等级,默认百分百还是直接抛异常?
|
||||
studentPaymentItemModel.setSelfRatio(new BigDecimal("100"));
|
||||
@@ -593,7 +591,7 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
|
||||
/**
|
||||
* 医保预结算
|
||||
*
|
||||
*
|
||||
* @param contract 合同b
|
||||
* @param ybMdtrtCertType 证件类型
|
||||
* @param busiCardInfo 电子密钥
|
||||
@@ -601,19 +599,19 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
* @return 预结算参数
|
||||
*/
|
||||
private PrePaymentResult studentPreSettleYb(Contract contract, YbMdtrtCertType ybMdtrtCertType, String busiCardInfo,
|
||||
List<PaymentedItemModel> paymentedItemList) {
|
||||
Map<String, List<PaymentedItemModel>> collect =
|
||||
paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getMedType));
|
||||
List<PaymentedItemModel> paymentedItemList) {
|
||||
Map<String, List<PaymentedItemModel>> collect
|
||||
= paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getMedType));
|
||||
// 一次医保结算只能支持一种医疗类型的结算
|
||||
for (Map.Entry<String, List<PaymentedItemModel>> medTypeKV : collect.entrySet()) {
|
||||
Clinic2206OrderOutput clinic2206OrderOutput = null;
|
||||
ClinicReg2201Output reg2201Output = null;
|
||||
if (!medTypeKV.getKey().equals(YbMedType.GENERAL_OUTPATIENT.getValue()) && "1"
|
||||
.equals(SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))) {
|
||||
.equals(SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))) {
|
||||
// 不是普通门诊就诊类型,补充挂号信息
|
||||
reg2201Output = ybManager.createRegWithMedType(contract, ybMdtrtCertType, busiCardInfo,
|
||||
medTypeKV.getValue().get(0).getEncounterId(),
|
||||
YbMedType.getByValue(medTypeKV.getValue().get(0).getMedType()));
|
||||
medTypeKV.getValue().get(0).getEncounterId(),
|
||||
YbMedType.getByValue(medTypeKV.getValue().get(0).getMedType()));
|
||||
reg2201Output.setMedType(medTypeKV.getKey());// 2025/06/05慢病挂号后上传2206信息报错,2201返回值没有medType,此处更正赋值
|
||||
} else {
|
||||
// 从数据库里取reg2201
|
||||
@@ -623,9 +621,9 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
throw new ServiceException("未查询到医保挂号信息");
|
||||
}
|
||||
// 调用预结算
|
||||
clinic2206OrderOutput =
|
||||
ybManager.preSettle(contract, medTypeKV.getValue().get(0).getEncounterId(), ybMdtrtCertType,
|
||||
busiCardInfo, reg2201Output, "01", medTypeKV.getValue(), YbMedType.getByValue(medTypeKV.getKey()));
|
||||
clinic2206OrderOutput
|
||||
= ybManager.preSettle(contract, medTypeKV.getValue().get(0).getEncounterId(), ybMdtrtCertType,
|
||||
busiCardInfo, reg2201Output, "01", medTypeKV.getValue(), YbMedType.getByValue(medTypeKV.getKey()));
|
||||
PrePaymentResult prePaymentResult = new PrePaymentResult();
|
||||
BeanUtils.copyProperties(clinic2206OrderOutput, prePaymentResult);
|
||||
return prePaymentResult;
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
package com.openhis.financial.service.impl;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.financial.domain.ThreePartPayCallBack;
|
||||
import com.openhis.financial.mapper.ThreePartPayCallBackMapper;
|
||||
import com.openhis.financial.service.ThreePartPayCallBackService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ThreePartPayCallBackServiceImpl extends ServiceImpl<ThreePartPayCallBackMapper, ThreePartPayCallBack> implements ThreePartPayCallBackService {
|
||||
=======
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -22,12 +12,12 @@ import com.openhis.financial.service.ThreePartPayCallBackService;
|
||||
|
||||
@Service
|
||||
public class ThreePartPayCallBackServiceImpl extends ServiceImpl<ThreePartPayCallBackMapper, ThreePartPayCallBack>
|
||||
implements ThreePartPayCallBackService {
|
||||
implements ThreePartPayCallBackService {
|
||||
|
||||
@Override
|
||||
public ThreePartPayCallBack getByPayment(Long paymentId) {
|
||||
return baseMapper
|
||||
.selectOne(new LambdaQueryWrapper<ThreePartPayCallBack>().eq(ThreePartPayCallBack::getPaymentId, paymentId)
|
||||
.eq(ThreePartPayCallBack::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.selectOne(new LambdaQueryWrapper<ThreePartPayCallBack>().eq(ThreePartPayCallBack::getPaymentId, paymentId)
|
||||
.eq(ThreePartPayCallBack::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -24,149 +24,245 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class MedicationDefinition extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 药品编号 */
|
||||
/**
|
||||
* 药品编号
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
/** 药品名称 */
|
||||
/**
|
||||
* 药品名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/** 适用范围 */
|
||||
/**
|
||||
* 适用范围
|
||||
*/
|
||||
private Integer domainEnum;
|
||||
|
||||
/** 药品版本 */
|
||||
/**
|
||||
* 药品版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/** 英文药名 */
|
||||
/**
|
||||
* 英文药名
|
||||
*/
|
||||
private String nameEn;
|
||||
|
||||
/** 药品名称拼音码 */
|
||||
/**
|
||||
* 药品名称拼音码
|
||||
*/
|
||||
private String pyStr;
|
||||
|
||||
/** 药品五笔码 */
|
||||
/**
|
||||
* 药品五笔码
|
||||
*/
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
/**
|
||||
* 药品分类
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String merchandiseName;
|
||||
|
||||
/** 商品名称拼音码 */
|
||||
/**
|
||||
* 商品名称拼音码
|
||||
*/
|
||||
private String merchandisePyStr;
|
||||
|
||||
/** 商品五笔码 */
|
||||
/**
|
||||
* 商品五笔码
|
||||
*/
|
||||
private String merchandiseWbStr;
|
||||
|
||||
/** 药品单位 */
|
||||
/**
|
||||
* 药品单位
|
||||
*/
|
||||
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 ybNo;
|
||||
|
||||
/** 药理作用分类 */
|
||||
/**
|
||||
* 药理作用分类
|
||||
*/
|
||||
private String pharmacologyCategoryCode;
|
||||
|
||||
/** 是否皮试 */
|
||||
/**
|
||||
* 是否皮试
|
||||
*/
|
||||
private Integer skinTestFlag;
|
||||
|
||||
/** 是否为注射药物 */
|
||||
/**
|
||||
* 是否为注射药物
|
||||
*/
|
||||
private Integer injectFlag;
|
||||
|
||||
/** 生产厂家 */
|
||||
/**
|
||||
* 生产厂家
|
||||
*/
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂商文本 */
|
||||
/**
|
||||
* 生产厂商文本
|
||||
*/
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private Long supplyId;
|
||||
|
||||
/** 是否限制使用 */
|
||||
/**
|
||||
* 是否限制使用
|
||||
*/
|
||||
private Integer restrictedFlag;
|
||||
|
||||
/** 限制使用范围 */
|
||||
/**
|
||||
* 限制使用范围
|
||||
*/
|
||||
private String restrictedScope;
|
||||
|
||||
/** 是否使用 */
|
||||
/**
|
||||
* 是否使用
|
||||
*/
|
||||
private Integer activeFlag;
|
||||
|
||||
/** 儿童用药标志 */
|
||||
/**
|
||||
* 儿童用药标志
|
||||
*/
|
||||
private Integer childrenFlag;
|
||||
|
||||
/** 产品特性 */
|
||||
/**
|
||||
* 产品特性
|
||||
*/
|
||||
private Integer characteristic;
|
||||
|
||||
/** 删除状态 */
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
private String deleteFlag;
|
||||
|
||||
/** 最小库存警戒数量(常规单位) */
|
||||
/**
|
||||
* 最小库存警戒数量(常规单位)
|
||||
*/
|
||||
private BigDecimal itemMinQuantity;
|
||||
|
||||
/** 最大库存警戒数量(常规单位) */
|
||||
/**
|
||||
* 最大库存警戒数量(常规单位)
|
||||
*/
|
||||
private BigDecimal itemMaxQuantity;
|
||||
|
||||
/** 默认门诊单位 */
|
||||
/**
|
||||
* 默认门诊单位
|
||||
*/
|
||||
private String defEncounterUnitCode;
|
||||
|
||||
/** 默认住院单位 */
|
||||
/**
|
||||
* 默认住院单位
|
||||
*/
|
||||
private String defInhospitalUnitCode;
|
||||
|
||||
/** 贯标国家编码 */
|
||||
/**
|
||||
* 贯标国家编码
|
||||
*/
|
||||
private String nationalDrugCode;
|
||||
|
||||
/** 拆分属性 */
|
||||
/**
|
||||
* 拆分属性
|
||||
*/
|
||||
private Integer partAttributeEnum;
|
||||
|
||||
/** 抗生素分类 */
|
||||
/**
|
||||
* 抗生素分类
|
||||
*/
|
||||
private String antibioticCode;
|
||||
|
||||
/** 权限限制 */
|
||||
/**
|
||||
* 权限限制
|
||||
*/
|
||||
private Integer restrictedEnum;
|
||||
|
||||
/** 是否自制 */
|
||||
/**
|
||||
* 是否自制
|
||||
*/
|
||||
private Integer selfFlag;
|
||||
|
||||
/** 是否抗生素 */
|
||||
/**
|
||||
* 是否抗生素
|
||||
*/
|
||||
private Integer antibioticFlag;
|
||||
|
||||
/** 基药标识 */
|
||||
/**
|
||||
* 基药标识
|
||||
*/
|
||||
private Integer basicFlag;
|
||||
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
/**
|
||||
* 住院临时医嘱拆分属性
|
||||
*/
|
||||
private Integer thoPartAttributeEnum;
|
||||
|
||||
/** 剂量单位换算比 */
|
||||
/**
|
||||
* 剂量单位换算比
|
||||
*/
|
||||
private BigDecimal unitConversionRatio;
|
||||
|
||||
/** 医保等级 */
|
||||
/**
|
||||
* 医保等级
|
||||
*/
|
||||
private Integer chrgitmLv;
|
||||
|
||||
/** 处方标志 */
|
||||
/**
|
||||
* 处方标志
|
||||
*/
|
||||
private Integer rxFlag;
|
||||
|
||||
/**
|
||||
@@ -174,13 +270,10 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
*/
|
||||
private String dosageInstruction;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/**
|
||||
* 药品69码
|
||||
*/
|
||||
@TableField("drug_69_code")
|
||||
private String drug69Code;
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,192 +25,324 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class MedicationDetail extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 药品编码 */
|
||||
/**
|
||||
* 药品编码
|
||||
*/
|
||||
private Long medicationDefId;
|
||||
|
||||
/** 药品状态 */
|
||||
/**
|
||||
* 药品状态
|
||||
*/
|
||||
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 String busNo;
|
||||
|
||||
/** 药品名称 */
|
||||
/**
|
||||
* 药品名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/** 适用范围 */
|
||||
/**
|
||||
* 适用范围
|
||||
*/
|
||||
private Integer domainEnum;
|
||||
|
||||
/** 药品版本 */
|
||||
/**
|
||||
* 药品版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/** 英文药名 */
|
||||
/**
|
||||
* 英文药名
|
||||
*/
|
||||
private String nameEn;
|
||||
|
||||
/** 药品名称拼音码 */
|
||||
/**
|
||||
* 药品名称拼音码
|
||||
*/
|
||||
private String pyStr;
|
||||
|
||||
/** 药品五笔码 */
|
||||
/**
|
||||
* 药品五笔码
|
||||
*/
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
/**
|
||||
* 药品分类
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String merchandiseName;
|
||||
|
||||
/** 商品名称拼音码 */
|
||||
/**
|
||||
* 商品名称拼音码
|
||||
*/
|
||||
private String merchandisePyStr;
|
||||
|
||||
/** 商品五笔码 */
|
||||
/**
|
||||
* 商品五笔码
|
||||
*/
|
||||
private String merchandiseWbStr;
|
||||
|
||||
/** 药品单位 */
|
||||
/**
|
||||
* 药品单位
|
||||
*/
|
||||
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 ybNo;
|
||||
|
||||
/** 药理作用分类 */
|
||||
/**
|
||||
* 药理作用分类
|
||||
*/
|
||||
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;
|
||||
|
||||
/** 所在位置 */
|
||||
/**
|
||||
* 所在位置
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
/** 贯标国家编码 */
|
||||
/**
|
||||
* 贯标国家编码
|
||||
*/
|
||||
private String nationalDrugCode;
|
||||
|
||||
/** 拆分属性 */
|
||||
/**
|
||||
* 拆分属性
|
||||
*/
|
||||
private Integer partAttributeEnum;
|
||||
|
||||
/** DDD值 */
|
||||
/**
|
||||
* DDD值
|
||||
*/
|
||||
private String dddCode;
|
||||
|
||||
/** DDD单位 */
|
||||
/**
|
||||
* DDD单位
|
||||
*/
|
||||
private String dddUnitCode;
|
||||
|
||||
/** 单次最小用药频次 */
|
||||
/**
|
||||
* 单次最小用药频次
|
||||
*/
|
||||
private String minRateCode;
|
||||
|
||||
/** 单次最大用药频次 */
|
||||
/**
|
||||
* 单次最大用药频次
|
||||
*/
|
||||
private String maxRateCode;
|
||||
/** 抗生素分类 */
|
||||
/**
|
||||
* 抗生素分类
|
||||
*/
|
||||
private String antibioticCode;
|
||||
/** 权限限制 */
|
||||
/**
|
||||
* 权限限制
|
||||
*/
|
||||
private Integer restrictedEnum;
|
||||
/** 是否自制 */
|
||||
/**
|
||||
* 是否自制
|
||||
*/
|
||||
private Integer selfFlag;
|
||||
/** 是否抗生素 */
|
||||
/**
|
||||
* 是否抗生素
|
||||
*/
|
||||
private Integer antibioticFlag;
|
||||
/** 基药标识 */
|
||||
/**
|
||||
* 基药标识
|
||||
*/
|
||||
private Integer basicFlag;
|
||||
/** 生产厂商文本 */
|
||||
/**
|
||||
* 生产厂商文本
|
||||
*/
|
||||
private String manufacturerText;
|
||||
/** 用量限定 */
|
||||
/**
|
||||
* 用量限定
|
||||
*/
|
||||
private BigDecimal usageLimit;
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
/**
|
||||
* 住院临时医嘱拆分属性
|
||||
*/
|
||||
private Integer thoPartAttributeEnum;
|
||||
/** 剂量单位换算比 */
|
||||
/**
|
||||
* 剂量单位换算比
|
||||
*/
|
||||
private BigDecimal unitConversionRatio;
|
||||
/** 医保等级 */
|
||||
/**
|
||||
* 医保等级
|
||||
*/
|
||||
private Integer chrgitmLv;
|
||||
/** 处方标志 */
|
||||
/**
|
||||
* 处方标志
|
||||
*/
|
||||
private Integer rxFlag;
|
||||
|
||||
/** 最小库存警戒数量(常规单位) */
|
||||
/**
|
||||
* 最小库存警戒数量(常规单位)
|
||||
*/
|
||||
private BigDecimal itemMinQuantity;
|
||||
|
||||
/** 最大库存警戒数量(常规单位) */
|
||||
/**
|
||||
* 最大库存警戒数量(常规单位)
|
||||
*/
|
||||
private BigDecimal itemMaxQuantity;
|
||||
|
||||
/**
|
||||
@@ -218,12 +350,9 @@ public class MedicationDetail extends HisBaseEntity {
|
||||
*/
|
||||
private String dosageInstruction;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/**
|
||||
* 药品69码
|
||||
*/
|
||||
private String drug69Code;
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.openhis.medication.service.IMedicationDispenseService;
|
||||
*/
|
||||
@Service
|
||||
public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispenseMapper, MedicationDispense>
|
||||
implements IMedicationDispenseService {
|
||||
implements IMedicationDispenseService {
|
||||
|
||||
@Resource
|
||||
AssignSeqUtil assignSeqUtil;
|
||||
@@ -97,14 +97,6 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
// 设置限制发药时间
|
||||
medicationDispense.setLimitTime(limitTime);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (DbOpType.INSERT.getCode().equals(dbOpType)) {
|
||||
baseMapper.insert(medicationDispense);
|
||||
} else if (DbOpType.UPDATE.getCode().equals(dbOpType)) {
|
||||
baseMapper.update(medicationDispense, new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.eq(MedicationDispense::getMedReqId, medicationRequest.getId()));
|
||||
}
|
||||
=======
|
||||
baseMapper.insert(medicationDispense);
|
||||
|
||||
// if (DbOpType.INSERT.getCode().equals(dbOpType)) {
|
||||
@@ -113,8 +105,6 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
// baseMapper.update(medicationDispense, new LambdaUpdateWrapper<MedicationDispense>()
|
||||
// .eq(MedicationDispense::getMedReqId, medicationRequest.getId()));
|
||||
// }
|
||||
>>>>>>> v1.3
|
||||
|
||||
return medicationDispense.getId();
|
||||
}
|
||||
|
||||
@@ -128,7 +118,7 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
*/
|
||||
@Override
|
||||
public Long generateMedicationDispense(MedicationRequest medicationRequest, Long procedureId,
|
||||
Date plannedDispenseTime) {
|
||||
Date plannedDispenseTime) {
|
||||
MedicationDispense medicationDispense = new MedicationDispense();
|
||||
// 执行id
|
||||
medicationDispense.setProcedureId(procedureId);
|
||||
@@ -207,8 +197,8 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public void updateStopDispenseStatus(List<Long> medDisIdList, Integer refund) {
|
||||
baseMapper.update(
|
||||
new MedicationDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<MedicationDispense>().in(MedicationDispense::getId, medDisIdList));
|
||||
new MedicationDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<MedicationDispense>().in(MedicationDispense::getId, medDisIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,10 +209,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public void updatePreparationDispenseStatus(List<Long> medicationRequestIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.in(MedicationDispense::getMedReqId, medicationRequestIdList));
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.in(MedicationDispense::getMedReqId, medicationRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,10 +223,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public void updateOnHoldDispenseStatus(List<Long> medReqIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.ON_HOLD.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.in(MedicationDispense::getMedReqId, medReqIdList));
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.ON_HOLD.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.in(MedicationDispense::getMedReqId, medReqIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,10 +238,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public boolean verifyAbleEdit(Long medicationDefId) {
|
||||
return baseMapper.exists(
|
||||
new LambdaQueryWrapper<MedicationDispense>().eq(MedicationDispense::getMedicationId, medicationDefId)
|
||||
.and(q -> q.eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue()).or()
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.REFUNDED.getValue()))
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaQueryWrapper<MedicationDispense>().eq(MedicationDispense::getMedicationId, medicationDefId)
|
||||
.and(q -> q.eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue()).or()
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.REFUNDED.getValue()))
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,8 +253,8 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public List<MedicationDispense> selectByRequestIdList(List<Long> requestIdList) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getMedReqId, requestIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getMedReqId, requestIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,11 +265,11 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> medDispenseId, String busNo) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.set(MedicationDispense::getSummaryNo, busNo).in(MedicationDispense::getId, medDispenseId)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.set(MedicationDispense::getSummaryNo, busNo).in(MedicationDispense::getId, medDispenseId)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -291,8 +281,8 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public List<MedicationDispense> getMedDispenseByProcedureId(List<Long> procedureIdList) {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getProcedureId, procedureIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getProcedureId, procedureIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,10 +294,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public boolean cancelMedicationSummary(List<String> summaryNoList) {
|
||||
int result = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.set(MedicationDispense::getSummaryNo, null).in(MedicationDispense::getSummaryNo, summaryNoList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.set(MedicationDispense::getSummaryNo, null).in(MedicationDispense::getSummaryNo, summaryNoList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@@ -320,10 +310,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public void updateDispenseStatus(List<Long> dispenseIdList, Integer dispenseStatus) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<MedicationDispense>().set(MedicationDispense::getStatusEnum, dispenseStatus)
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.in(MedicationDispense::getId, dispenseIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<MedicationDispense>().set(MedicationDispense::getStatusEnum, dispenseStatus)
|
||||
.set(MedicationDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
.in(MedicationDispense::getId, dispenseIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -335,12 +325,8 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
@Override
|
||||
public List<MedicationDispense> getMedDispenseBySummaryNo(List<String> summaryNoList) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getSummaryNo, summaryNoList)
|
||||
<<<<<<< HEAD
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
=======
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue()));
|
||||
>>>>>>> v1.3
|
||||
.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getSummaryNo, summaryNoList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,6 @@ package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -49,7 +44,7 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
if (!medicationIdList.isEmpty()) {
|
||||
// 查询药品相关信息列表并返回
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Medication>()
|
||||
.eq(Medication::getDeleteFlag, DelFlag.NO.getCode()).in(Medication::getId, medicationIdList));
|
||||
.eq(Medication::getDeleteFlag, DelFlag.NO.getCode()).in(Medication::getId, medicationIdList));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -77,7 +72,7 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
BeanUtils.copyProperties(medicationDetail, medication);
|
||||
// 根据药品编码判断药品是否存在
|
||||
List<Medication> medications = medicationMapper.selectList(
|
||||
new LambdaQueryWrapper<Medication>().eq(Medication::getMedicationDefId, medication.getMedicationDefId()));
|
||||
new LambdaQueryWrapper<Medication>().eq(Medication::getMedicationDefId, medication.getMedicationDefId()));
|
||||
if (!medications.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
@@ -93,4 +88,4 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
public List<AdjustPriceMedListDto> searchMedListByKeyWord(String keyWord) {
|
||||
return this.medicationMapper.searchMedListByKeyWord(keyWord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,12 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
<<<<<<< HEAD
|
||||
import com.core.common.enums.DeleteFlag;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.GfRatioType;
|
||||
import com.openhis.common.enums.ItemType;
|
||||
import com.openhis.common.enums.ybenums.YbChrgitmLv;
|
||||
@@ -40,7 +35,7 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
|
||||
|
||||
/**
|
||||
* 查询自付比例(按照小项查询自付比例,如果没有的话,返回值不一定会有自付比例,还要查大项)
|
||||
*
|
||||
*
|
||||
* @param itemType
|
||||
* @param paymentItemList
|
||||
* @return
|
||||
@@ -49,18 +44,18 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
|
||||
|
||||
ArrayList<StudentPaymentItemModel> list = new ArrayList<>();
|
||||
|
||||
List<Long> serviceIdList =
|
||||
paymentItemList.stream().map(PaymentedItemModel::getServiceId).collect(Collectors.toList());
|
||||
List<Long> serviceIdList
|
||||
= paymentItemList.stream().map(PaymentedItemModel::getServiceId).collect(Collectors.toList());
|
||||
|
||||
Date date = new Date();
|
||||
// 查询自付比例
|
||||
List<GfRatio> gfRatios =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<GfRatio>().in(GfRatio::getDefinitionId, serviceIdList)
|
||||
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()).eq(GfRatio::getItemType, itemType.getValue())
|
||||
.ge(GfRatio::getStartDate, date).le(GfRatio::getEndDate, date));
|
||||
List<GfRatio> gfRatios
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<GfRatio>().in(GfRatio::getDefinitionId, serviceIdList)
|
||||
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()).eq(GfRatio::getItemType, itemType.getValue())
|
||||
.ge(GfRatio::getStartDate, date).le(GfRatio::getEndDate, date));
|
||||
|
||||
Map<Long, List<GfRatio>> gfRatiosMap =
|
||||
gfRatios.stream().collect(Collectors.groupingBy(GfRatio::getDefinitionId));
|
||||
Map<Long, List<GfRatio>> gfRatiosMap
|
||||
= gfRatios.stream().collect(Collectors.groupingBy(GfRatio::getDefinitionId));
|
||||
|
||||
StudentPaymentItemModel studentPaymentItemModel;
|
||||
for (PaymentedItemModel paymentedItemModel : paymentItemList) {
|
||||
@@ -89,23 +84,19 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
|
||||
@Override
|
||||
public List<GfTypeRatioDto> getTypeRatioList() {
|
||||
// 查询DB中的所有大项比例
|
||||
List<GfRatio> gfRatioList =
|
||||
this.list(new LambdaQueryWrapper<GfRatio>().eq(GfRatio::getRatioType, GfRatioType.TYPE_RATIO.getValue())
|
||||
<<<<<<< HEAD
|
||||
.eq(GfRatio::getDeleteFlag, DeleteFlag.NOT_DELETED.getCode()));
|
||||
=======
|
||||
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
>>>>>>> v1.3
|
||||
List<GfRatio> gfRatioList
|
||||
= this.list(new LambdaQueryWrapper<GfRatio>().eq(GfRatio::getRatioType, GfRatioType.TYPE_RATIO.getValue())
|
||||
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
// 做成医保分项+医保等级拼接的Map
|
||||
Map<String, GfRatio> gfRatioMap =
|
||||
gfRatioList.stream().collect(Collectors.toMap(e -> e.getYbClass() + e.getYbLv(), Function.identity()));
|
||||
Map<String, GfRatio> gfRatioMap
|
||||
= gfRatioList.stream().collect(Collectors.toMap(e -> e.getYbClass() + e.getYbLv(), Function.identity()));
|
||||
List<GfTypeRatioDto> gfTypeRatioDtoList = new ArrayList<>();
|
||||
// 遍历所有医疗收费项目类别
|
||||
for (YbMedChrgItmType ybMedChrgItmType : YbMedChrgItmType.values()) {
|
||||
// 甲类
|
||||
GfTypeRatioDto gfTypeRatioDtoA =
|
||||
new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
|
||||
.setYbLv(YbChrgitmLv.CATEGORY_A.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_A.getInfo());
|
||||
GfTypeRatioDto gfTypeRatioDtoA
|
||||
= new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
|
||||
.setYbLv(YbChrgitmLv.CATEGORY_A.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_A.getInfo());
|
||||
GfRatio gfRatioA = gfRatioMap.get(ybMedChrgItmType.getValue() + YbChrgitmLv.CATEGORY_A.getCode());
|
||||
if (gfRatioA != null) {
|
||||
// DB存在则取DB的值
|
||||
@@ -113,9 +104,9 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
|
||||
}
|
||||
gfTypeRatioDtoList.add(gfTypeRatioDtoA);
|
||||
// 乙类
|
||||
GfTypeRatioDto gfTypeRatioDtoB =
|
||||
new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
|
||||
.setYbLv(YbChrgitmLv.CATEGORY_B.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_B.getInfo());
|
||||
GfTypeRatioDto gfTypeRatioDtoB
|
||||
= new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
|
||||
.setYbLv(YbChrgitmLv.CATEGORY_B.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_B.getInfo());
|
||||
GfRatio gfRatioB = gfRatioMap.get(ybMedChrgItmType.getValue() + YbChrgitmLv.CATEGORY_B.getCode());
|
||||
if (gfRatioB != null) {
|
||||
// DB存在则取DB的值
|
||||
@@ -126,4 +117,4 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
|
||||
// 返回列表
|
||||
return gfTypeRatioDtoList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,37 +43,29 @@ public interface IActivityDefinitionService extends IService<ActivityDefinition>
|
||||
|
||||
/**
|
||||
* Desc: 根据 项目id数组 加载 诊疗数据集合
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
*
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @param itemIds
|
||||
* @Author raymond
|
||||
* @Date 12:20 2025/10/18
|
||||
* @return java.util.List<com.openhis.workflow.domain.ActivityDefinition>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<ActivityDto> searchActivityDefinitionByIds(@Param("itemIds") List<Long> itemIds);
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Desc: 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
=======
|
||||
|
||||
/**
|
||||
* Desc: 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
*
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @param keyWord
|
||||
* @Author raymond
|
||||
* @Date 07:53 2025/10/22
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<AdjustPriceMedListDto> searchActivityListByKeyWord(String keyWord);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 查询某一类的服务
|
||||
*
|
||||
*
|
||||
* @param productIdList id集合
|
||||
* @param activityDefCategory 类型
|
||||
* @return 查询结果
|
||||
@@ -89,5 +81,4 @@ public interface IActivityDefinitionService extends IService<ActivityDefinition>
|
||||
*/
|
||||
List<ActivityDefinition> getListByTypeEnum(List<Long> productIdList, Integer typeEnum);
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.openhis.workflow.domain.DeviceRequest;
|
||||
*/
|
||||
public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
|
||||
|
||||
/**
|
||||
* 处理器材发放信息
|
||||
*
|
||||
@@ -37,9 +36,7 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @return 发放id
|
||||
*/
|
||||
Long generateDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
Date plannedDispenseTime);
|
||||
|
||||
/**
|
||||
* 医嘱执行生成耗材发放,状态为已发放
|
||||
@@ -51,12 +48,11 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @return 发放id
|
||||
*/
|
||||
Long generateIssuedDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime);
|
||||
>>>>>>> v1.3
|
||||
Date plannedDispenseTime);
|
||||
|
||||
/**
|
||||
* 删除器材发放信息
|
||||
*
|
||||
*
|
||||
* @param deviceReqId 器材请求id
|
||||
*/
|
||||
void deleteDeviceDispense(Long deviceReqId);
|
||||
@@ -87,7 +83,7 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @param quantity 发药数量
|
||||
*/
|
||||
DeviceDispense createCompletedDeviceDispense(DeviceDispense deviceDispense, Date now, Practitioner loginUser,
|
||||
String step, BigDecimal quantity);
|
||||
String step, BigDecimal quantity);
|
||||
|
||||
/**
|
||||
* 器材发放状态:已发药
|
||||
@@ -143,8 +139,6 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @param medDispenseId 发放id列表
|
||||
*/
|
||||
void updateDispenseStatusSummarized(List<Long> medDispenseId, String busNo);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 通过请求id获取耗材发放信息
|
||||
@@ -153,5 +147,4 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @return 发放信息
|
||||
*/
|
||||
List<DeviceDispense> selectByRequestIdList(List<Long> requestIdList);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
* @param step 执行次数
|
||||
*/
|
||||
ServiceRequest createCompletedServiceRequest(ServiceRequest serviceRequest, Date now, Practitioner loginUser,
|
||||
String step);
|
||||
String step);
|
||||
|
||||
/**
|
||||
* 服务申请状态:已完成
|
||||
@@ -113,13 +113,11 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
|
||||
/**
|
||||
* 查询诊疗对应的服务申请
|
||||
*
|
||||
*
|
||||
* @param activityId 诊疗id
|
||||
* @return 请求信息列表
|
||||
*/
|
||||
List<ServiceRequest> getServiceRequestByActivityId(Long activityId);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 查询诊疗对应的服务申请
|
||||
@@ -128,5 +126,4 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
* @return 请求信息列表
|
||||
*/
|
||||
List<ServiceRequest> getServiceRequestListByEncounterId(Long encounterId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,7 @@ package com.openhis.workflow.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import com.openhis.workflow.dto.ActivityDto;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -33,12 +28,13 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitionMapper, ActivityDefinition>
|
||||
implements IActivityDefinitionService {
|
||||
implements IActivityDefinitionService {
|
||||
|
||||
private final ActivityDefinitionMapper activityDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 增加外来诊疗项目
|
||||
*
|
||||
*
|
||||
* @param activityDefinition 诊疗项目实体
|
||||
* @return
|
||||
*/
|
||||
@@ -46,9 +42,9 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addDiagnosisTreatment(ActivityDefinition activityDefinition) {
|
||||
// 根据诊疗编码判断诊疗项目是否存在
|
||||
List<ActivityDefinition> activityDefinitions =
|
||||
activityDefinitionMapper.selectList(new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo()));
|
||||
List<ActivityDefinition> activityDefinitions
|
||||
= activityDefinitionMapper.selectList(new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -86,8 +82,6 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
return this.activityDefinitionMapper.searchActivityListByKeyWord(keyWord);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@Override
|
||||
public List<ActivityDefinition> getListByIds(List<Long> productIdList, Integer activityDefCategory) {
|
||||
LambdaQueryWrapper<ActivityDefinition> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -95,7 +89,7 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
queryWrapper.eq(ActivityDefinition::getCategoryCode, activityDefCategory);
|
||||
}
|
||||
queryWrapper.in(ActivityDefinition::getId, productIdList).eq(ActivityDefinition::getDeleteFlag,
|
||||
DelFlag.NO.getCode());
|
||||
DelFlag.NO.getCode());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -109,5 +103,4 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
DelFlag.NO.getCode());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.openhis.workflow.service.IDeviceDispenseService;
|
||||
*/
|
||||
@Service
|
||||
public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper, DeviceDispense>
|
||||
implements IDeviceDispenseService {
|
||||
implements IDeviceDispenseService {
|
||||
|
||||
@Resource
|
||||
AssignSeqUtil assignSeqUtil;
|
||||
@@ -89,14 +89,6 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
// 设置限制发药时间
|
||||
deviceDispense.setLimitTime(limitTime);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (DbOpType.INSERT.getCode().equals(dbOpType)) {
|
||||
baseMapper.insert(deviceDispense);
|
||||
} else if (DbOpType.UPDATE.getCode().equals(dbOpType)) {
|
||||
baseMapper.update(deviceDispense,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getDeviceReqId, deviceRequest.getId()));
|
||||
}
|
||||
=======
|
||||
baseMapper.insert(deviceDispense);
|
||||
|
||||
// if (DbOpType.INSERT.getCode().equals(dbOpType)) {
|
||||
@@ -105,8 +97,6 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
// baseMapper.update(deviceDispense,
|
||||
// new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getDeviceReqId, deviceRequest.getId()));
|
||||
// }
|
||||
>>>>>>> v1.3
|
||||
|
||||
return deviceDispense.getId();
|
||||
}
|
||||
|
||||
@@ -121,7 +111,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public Long generateDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime) {
|
||||
Date plannedDispenseTime) {
|
||||
DeviceDispense deviceDispense = new DeviceDispense();
|
||||
// 执行id
|
||||
deviceDispense.setProcedureId(procedureId);
|
||||
@@ -190,8 +180,8 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateStopDispenseStatus(List<Long> devDisIdList, Integer refund) {
|
||||
baseMapper.update(
|
||||
new DeviceDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<DeviceDispense>().in(DeviceDispense::getId, devDisIdList));
|
||||
new DeviceDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<DeviceDispense>().in(DeviceDispense::getId, devDisIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,8 +193,8 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public List<DeviceDispense> getDevDispenseByProcedureId(List<Long> procedureIdList) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<DeviceDispense>().in(DeviceDispense::getProcedureId, procedureIdList)
|
||||
.eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.selectList(new LambdaQueryWrapper<DeviceDispense>().in(DeviceDispense::getProcedureId, procedureIdList)
|
||||
.eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,7 +208,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public DeviceDispense createCompletedDeviceDispense(DeviceDispense deviceDispense, Date now, Practitioner loginUser,
|
||||
String step, BigDecimal quantity) {
|
||||
String step, BigDecimal quantity) {
|
||||
// 服务请求编码
|
||||
deviceDispense.setBusNo(deviceDispense.getBusNo() + "." + step);
|
||||
// // 请求基于什么
|
||||
@@ -253,10 +243,10 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public boolean completedStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -270,10 +260,10 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public boolean cancelledStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.CANCELLED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.CANCELLED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -287,10 +277,10 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public boolean inProgressStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.IN_PROGRESS.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.IN_PROGRESS.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -302,9 +292,9 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updatePreparationDispenseStatus(List<Long> deviceRequestIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.in(DeviceDispense::getDeviceReqId, deviceRequestIdList));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.in(DeviceDispense::getDeviceReqId, deviceRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -315,9 +305,9 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateOnHoldDispenseStatus(List<Long> devReqIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.ON_HOLD.getValue())
|
||||
.in(DeviceDispense::getDeviceDefId, devReqIdList));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.ON_HOLD.getValue())
|
||||
.in(DeviceDispense::getDeviceDefId, devReqIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -328,9 +318,9 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> devDispenseId) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
.in(DeviceDispense::getId, devDispenseId));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
.in(DeviceDispense::getId, devDispenseId));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,15 +331,13 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> medDispenseId, String busNo) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
// TODO 数据库需要加字段
|
||||
// .set(DeviceDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
// .set(DeviceDispense::getSummaryNo, busNo)
|
||||
.in(DeviceDispense::getId, medDispenseId).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
// TODO 数据库需要加字段
|
||||
// .set(DeviceDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
// .set(DeviceDispense::getSummaryNo, busNo)
|
||||
.in(DeviceDispense::getId, medDispenseId).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 通过请求id获取耗材发放信息
|
||||
@@ -360,7 +348,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public List<DeviceDispense> selectByRequestIdList(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<DeviceDispense>()
|
||||
.in(DeviceDispense::getDeviceReqId, requestIdList).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.in(DeviceDispense::getDeviceReqId, requestIdList).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -374,7 +362,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public Long generateIssuedDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime) {
|
||||
Date plannedDispenseTime) {
|
||||
DeviceDispense deviceDispense = new DeviceDispense();
|
||||
// 执行id
|
||||
deviceDispense.setProcedureId(procedureId);
|
||||
@@ -427,5 +415,4 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
|
||||
return deviceDispense.getId();
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -8,11 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.Practitioner;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.RequestStatus;
|
||||
import com.openhis.workflow.domain.DeviceRequest;
|
||||
import com.openhis.workflow.mapper.DeviceRequestMapper;
|
||||
@@ -26,7 +22,7 @@ import com.openhis.workflow.service.IDeviceRequestService;
|
||||
*/
|
||||
@Service
|
||||
public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, DeviceRequest>
|
||||
implements IDeviceRequestService {
|
||||
implements IDeviceRequestService {
|
||||
|
||||
/**
|
||||
* 器材请求状态:已完成
|
||||
@@ -37,10 +33,10 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public boolean completedStatusEnum(Long id, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -53,10 +49,10 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public boolean activeStatusEnum(Long id, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -68,7 +64,7 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public void updateCompletedStatusBatch(List<Long> devRequestIdList) {
|
||||
baseMapper.update(new DeviceRequest().setStatusEnum(RequestStatus.COMPLETED.getValue()),
|
||||
new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devRequestIdList));
|
||||
new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +75,7 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public void updateDraftStatusBatch(List<Long> devReqIdList) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devReqIdList)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.DRAFT.getValue()));
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.DRAFT.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,7 +86,7 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public void updateCancelledStatusBatch(List<Long> devReqIdList) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devReqIdList)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue()));
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,6 +98,6 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public List<DeviceRequest> getDevRequestByDeviceId(Long deviceId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<DeviceRequest>().eq(DeviceRequest::getDeviceDefId, deviceId)
|
||||
.eq(DeviceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(DeviceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.openhis.workflow.service.IInventoryItemService;
|
||||
*/
|
||||
@Service
|
||||
public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, InventoryItem>
|
||||
implements IInventoryItemService {
|
||||
implements IInventoryItemService {
|
||||
|
||||
/**
|
||||
* 入库
|
||||
@@ -52,7 +52,7 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
@Override
|
||||
public Boolean updateInventoryQuantity(Long id, BigDecimal quantity, Date now) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<InventoryItem>().eq(InventoryItem::getId, id)
|
||||
.set(InventoryItem::getUpdateTime, now).set(InventoryItem::getQuantity, quantity));
|
||||
.set(InventoryItem::getUpdateTime, now).set(InventoryItem::getQuantity, quantity));
|
||||
return updateCount > 0;
|
||||
|
||||
}
|
||||
@@ -68,11 +68,11 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryItem> selectInventoryByItemId(Long itemId, String lotNumber, Long locationId,
|
||||
Integer tenantId) {
|
||||
Integer tenantId) {
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper = new LambdaQueryWrapper<InventoryItem>()
|
||||
.eq(InventoryItem::getItemId, itemId).eq(InventoryItem::getLotNumber, lotNumber)
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
.eq(InventoryItem::getItemId, itemId).eq(InventoryItem::getLotNumber, lotNumber)
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
if (locationId != null) {
|
||||
queryWrapper.eq(InventoryItem::getLocationId, locationId);
|
||||
}
|
||||
@@ -89,14 +89,10 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryItem> selectInventoryByItemIdList(List<Long> itemIdList, Integer tenantId) {
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper =
|
||||
new LambdaQueryWrapper<InventoryItem>().in(InventoryItem::getItemId, itemIdList)
|
||||
<<<<<<< HEAD
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getValue())
|
||||
=======
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
>>>>>>> v1.3
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper
|
||||
= new LambdaQueryWrapper<InventoryItem>().in(InventoryItem::getItemId, itemIdList)
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
// 查询取库房信息
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
@@ -108,12 +104,8 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryItem> selectAllInventory() {
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper =
|
||||
<<<<<<< HEAD
|
||||
new LambdaQueryWrapper<InventoryItem>().eq(InventoryItem::getDeleteFlag, DelFlag.NO.getValue());
|
||||
=======
|
||||
new LambdaQueryWrapper<InventoryItem>().eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode());
|
||||
>>>>>>> v1.3
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper
|
||||
= new LambdaQueryWrapper<InventoryItem>().eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode());
|
||||
// 查询取库房信息
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.openhis.workflow.service.IServiceRequestService;
|
||||
*/
|
||||
@Service
|
||||
public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper, ServiceRequest>
|
||||
implements IServiceRequestService {
|
||||
implements IServiceRequestService {
|
||||
|
||||
/**
|
||||
* 查询服务申请管理中basedOnId相同的个数
|
||||
@@ -50,8 +50,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateStopRequestStatus(List<Long> serReqIdList) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.STOPPED.getValue()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,9 +62,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateCompleteRequestStatus(List<Long> serReqIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.COMPLETED.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,8 +75,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public List<ServiceRequest> selectServiceRequestByBasedOnId(Long basedOnId) {
|
||||
return (baseMapper
|
||||
.selectList(new LambdaQueryWrapper<ServiceRequest>().eq(ServiceRequest::getBasedOnId, basedOnId)
|
||||
.eq(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())));
|
||||
.selectList(new LambdaQueryWrapper<ServiceRequest>().eq(ServiceRequest::getBasedOnId, basedOnId)
|
||||
.eq(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
*/
|
||||
@Override
|
||||
public ServiceRequest createCompletedServiceRequest(ServiceRequest serviceRequest, Date now, Practitioner loginUser,
|
||||
String step) {
|
||||
String step) {
|
||||
// 服务请求编码
|
||||
serviceRequest.setBusNo(serviceRequest.getBusNo() + "." + step);
|
||||
// 请求基于什么
|
||||
@@ -124,9 +124,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public boolean completedStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -142,10 +142,10 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public boolean updateCancelledStatus(Long serviceReqId, Date now, Long practitionerId, Long orgId) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ServiceRequest>().eq(ServiceRequest::getId, serviceReqId)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, practitionerId).set(ServiceRequest::getOrgId, orgId)
|
||||
.set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
new LambdaUpdateWrapper<ServiceRequest>().eq(ServiceRequest::getId, serviceReqId)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, practitionerId).set(ServiceRequest::getOrgId, orgId)
|
||||
.set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -159,9 +159,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public boolean activeStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -175,9 +175,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.DRAFT.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serviceRequestIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serviceRequestIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,8 +188,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateDraftStatusBatch(List<Long> serReqIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ServiceRequest>().set(ServiceRequest::getStatusEnum, RequestStatus.DRAFT.getValue())
|
||||
.in(ServiceRequest::getId, serReqIdList));
|
||||
new LambdaUpdateWrapper<ServiceRequest>().set(ServiceRequest::getStatusEnum, RequestStatus.DRAFT.getValue())
|
||||
.in(ServiceRequest::getId, serReqIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,10 +223,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public List<ServiceRequest> getServiceRequestByActivityId(Long activityId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getActivityId, activityId).eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(ServiceRequest::getActivityId, activityId).eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 获取执行过的诊疗数据
|
||||
@@ -238,5 +236,4 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getEncounterId, encounterId).eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.DispenseStatus;
|
||||
import com.openhis.common.enums.SupplyType;
|
||||
import com.openhis.workflow.domain.SupplyDelivery;
|
||||
@@ -33,7 +29,7 @@ import com.openhis.workflow.service.ISupplyDeliveryService;
|
||||
*/
|
||||
@Service
|
||||
public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper, SupplyDelivery>
|
||||
implements ISupplyDeliveryService {
|
||||
implements ISupplyDeliveryService {
|
||||
|
||||
/**
|
||||
* 根据单据,发放物品
|
||||
@@ -50,38 +46,38 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
for (SupplyRequest supplyRequest : supplyRequestList) {
|
||||
SupplyDelivery supplyDelivery = new SupplyDelivery();
|
||||
supplyDelivery
|
||||
// 请求id
|
||||
.setRequestId(supplyRequest.getId())
|
||||
// 发放状态:已发放
|
||||
.setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
// 单据类型
|
||||
.setTypeEnum(supplyRequest.getTypeEnum())
|
||||
// 发放项目所在表
|
||||
.setItemTable(supplyRequest.getItemTable())
|
||||
// 发放物品id
|
||||
.setItemId(supplyRequest.getItemId())
|
||||
// 物品单位
|
||||
.setUnitCode(supplyRequest.getUnitCode())
|
||||
// 发放数量
|
||||
.setQuantity(supplyRequest.getItemQuantity())
|
||||
// 批次号
|
||||
.setLotNumber(supplyRequest.getLotNumber())
|
||||
// 追溯码
|
||||
.setTraceNo(supplyRequest.getTraceNo())
|
||||
// 供应商id
|
||||
.setSupplierId(supplyRequest.getSupplierId())
|
||||
// 审批人
|
||||
.setPractitionerId(supplyRequest.getApplicantId())
|
||||
// 发放时间
|
||||
.setOccurrenceTime(now)
|
||||
// 接收位置
|
||||
.setReceiverId(supplyRequest.getPurposeLocationId())
|
||||
// 接收时间
|
||||
.setReceiveTime(now)
|
||||
// 生产日期
|
||||
.setOccurrenceStartTime(supplyRequest.getStartTime())
|
||||
// 失效日期
|
||||
.setOccurrenceEndTime(supplyRequest.getEndTime());
|
||||
// 请求id
|
||||
.setRequestId(supplyRequest.getId())
|
||||
// 发放状态:已发放
|
||||
.setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
// 单据类型
|
||||
.setTypeEnum(supplyRequest.getTypeEnum())
|
||||
// 发放项目所在表
|
||||
.setItemTable(supplyRequest.getItemTable())
|
||||
// 发放物品id
|
||||
.setItemId(supplyRequest.getItemId())
|
||||
// 物品单位
|
||||
.setUnitCode(supplyRequest.getUnitCode())
|
||||
// 发放数量
|
||||
.setQuantity(supplyRequest.getItemQuantity())
|
||||
// 批次号
|
||||
.setLotNumber(supplyRequest.getLotNumber())
|
||||
// 追溯码
|
||||
.setTraceNo(supplyRequest.getTraceNo())
|
||||
// 供应商id
|
||||
.setSupplierId(supplyRequest.getSupplierId())
|
||||
// 审批人
|
||||
.setPractitionerId(supplyRequest.getApplicantId())
|
||||
// 发放时间
|
||||
.setOccurrenceTime(now)
|
||||
// 接收位置
|
||||
.setReceiverId(supplyRequest.getPurposeLocationId())
|
||||
// 接收时间
|
||||
.setReceiveTime(now)
|
||||
// 生产日期
|
||||
.setOccurrenceStartTime(supplyRequest.getStartTime())
|
||||
// 失效日期
|
||||
.setOccurrenceEndTime(supplyRequest.getEndTime());
|
||||
deliveryList.add(supplyDelivery);
|
||||
// 新增发放单据
|
||||
baseMapper.insert(supplyDelivery);
|
||||
@@ -99,7 +95,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
|
||||
// 根据请求id查询发放状态
|
||||
List<SupplyDelivery> deliveryList = baseMapper.selectList(new LambdaQueryWrapper<SupplyDelivery>()
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()).in(SupplyDelivery::getRequestId, supplyReqIdList));
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()).in(SupplyDelivery::getRequestId, supplyReqIdList));
|
||||
if (!deliveryList.isEmpty()) {
|
||||
List<Integer> deliveryStatusList = deliveryList.stream().map(SupplyDelivery::getStatusEnum).toList();
|
||||
return deliveryStatusList.stream().anyMatch(x -> x.equals(DispenseStatus.COMPLETED.getValue()));
|
||||
@@ -115,10 +111,10 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
@Override
|
||||
public void updateCompletedStatusBatch(List<Long> supplyDeliveryIdList) {
|
||||
baseMapper.update(
|
||||
new SupplyDelivery().setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setOccurrenceTime(DateUtils.getNowDate()).setReceiveTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyDelivery>().in(SupplyDelivery::getId, supplyDeliveryIdList));
|
||||
new SupplyDelivery().setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setOccurrenceTime(DateUtils.getNowDate()).setReceiveTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyDelivery>().in(SupplyDelivery::getId, supplyDeliveryIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +126,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
@Override
|
||||
public List<SupplyDelivery> selectByIdList(List<Long> deliveryIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyDelivery>().in(SupplyDelivery::getId, deliveryIdList)
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +138,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
@Override
|
||||
public List<SupplyDelivery> selectByRequestIdList(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyDelivery>()
|
||||
.in(SupplyDelivery::getRequestId, requestIdList).eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.in(SupplyDelivery::getRequestId, requestIdList).eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,16 +154,12 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
*/
|
||||
@Override
|
||||
public void createSummarySupplyDelivery(Long medicationId, String lotNumber, Long patientId, BigDecimal minQuantity,
|
||||
String minUnitCode, Long receiverId, Long supplyRequestId) {
|
||||
String minUnitCode, Long receiverId, Long supplyRequestId) {
|
||||
baseMapper.insert(new SupplyDelivery().setItemId(medicationId)
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setLotNumber(lotNumber)
|
||||
.setPatientId(patientId).setQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue()).setRequestId(supplyRequestId)
|
||||
<<<<<<< HEAD
|
||||
.setStatusEnum(DispenseStatus.IN_PROGRESS.getValue()).setReceiverId(receiverId));
|
||||
=======
|
||||
.setStatusEnum(DispenseStatus.PREPARATION.getValue()).setReceiverId(receiverId));
|
||||
>>>>>>> v1.3
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setLotNumber(lotNumber)
|
||||
.setPatientId(patientId).setQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue()).setRequestId(supplyRequestId)
|
||||
.setStatusEnum(DispenseStatus.PREPARATION.getValue()).setReceiverId(receiverId));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,11 +173,11 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
*/
|
||||
@Override
|
||||
public void createDeviceSummarySupplyDelivery(Long deviceId, String lotNumber, BigDecimal minQuantity,
|
||||
String minUnitCode, Long supplyRequestId) {
|
||||
String minUnitCode, Long supplyRequestId) {
|
||||
baseMapper.insert(new SupplyDelivery().setItemId(deviceId)
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setLotNumber(lotNumber)
|
||||
.setQuantity(minQuantity).setUnitCode(minUnitCode).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setRequestId(supplyRequestId).setStatusEnum(DispenseStatus.COMPLETED.getValue()));
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setLotNumber(lotNumber)
|
||||
.setQuantity(minQuantity).setUnitCode(minUnitCode).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setRequestId(supplyRequestId).setStatusEnum(DispenseStatus.COMPLETED.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,10 +16,6 @@ import com.core.common.enums.DelFlag;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.SupplyCategory;
|
||||
import com.openhis.common.enums.SupplyStatus;
|
||||
import com.openhis.common.enums.SupplyType;
|
||||
@@ -42,7 +38,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, SupplyRequest>
|
||||
implements ISupplyRequestService {
|
||||
implements ISupplyRequestService {
|
||||
|
||||
@Resource
|
||||
private SupplyRequestMapper supplyRequestMapper;
|
||||
|
||||
@@ -55,8 +52,6 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> getSupplyByBusNo(String busNo) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +63,6 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> getSupplyByBusNoBatch(List<String> busNoList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, busNoList));
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +74,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> getSupplyByOriginalBusNo(String originalBusNo) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,10 +88,10 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public List<SupplyRequest> agreeRequest(String busNo, Date now) {
|
||||
// 更新单据状态
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now)
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now)
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
// 返回单据详情
|
||||
return this.getSupplyByBusNo(busNo);
|
||||
}
|
||||
@@ -113,7 +107,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public List<SupplyRequest> addOriginalBusNo(String busNo, String originalBusNo) {
|
||||
// 更新单据状态
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
.set(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
// 返回单据详情
|
||||
return this.getSupplyByBusNo(busNo);
|
||||
}
|
||||
@@ -127,7 +121,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean updateByBusNo(String busNo) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>()
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getOriginalBusNo, ""));
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getOriginalBusNo, ""));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -139,9 +133,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public boolean updateStatusEnumByBusNo(String busNo) {
|
||||
int updateCount =
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.EXPIRED_INVALIDATED.getValue()));
|
||||
int updateCount
|
||||
= baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.EXPIRED_INVALIDATED.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -154,9 +148,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean submitApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -169,9 +163,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean withdrawApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.WITHDRAW.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.WITHDRAW.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -184,7 +178,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean removeByBusNo(String busNo) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>()
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -197,10 +191,10 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public boolean rejectRequest(String busNo) {
|
||||
// 更新单据状态
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -235,8 +229,8 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public boolean supplyRequestValidation(String busNo) {
|
||||
|
||||
// 根据单据号查询请求状态
|
||||
List<SupplyRequest> requestList =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
List<SupplyRequest> requestList
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
if (!requestList.isEmpty()) {
|
||||
for (SupplyRequest supplyRequest : requestList) {
|
||||
if (SupplyStatus.AGREE.getValue().equals(supplyRequest.getStatusEnum())) {
|
||||
@@ -256,8 +250,8 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean verifyAbleEdit(Long itemId) {
|
||||
return baseMapper.exists(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getItemId, itemId)
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.in(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue(), SupplyStatus.AGREE.getValue()));
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.in(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue(), SupplyStatus.AGREE.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,8 +275,8 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public void updateCompletedStatusBatch(List<Long> supplyRequestIdList) {
|
||||
baseMapper.update(new SupplyRequest().setStatusEnum(SupplyStatus.AGREE.getValue())
|
||||
.setApproverId(SecurityUtils.getLoginUser().getPractitionerId()).setApprovalTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().in(SupplyRequest::getId, supplyRequestIdList));
|
||||
.setApproverId(SecurityUtils.getLoginUser().getPractitionerId()).setApprovalTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().in(SupplyRequest::getId, supplyRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,7 +288,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> selectByIdList(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getId, requestIdList)
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -317,13 +311,13 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public Long createSummarySupplyRequest(Long medicationId, Long locationId, String lotNumber, Long patientId,
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
SupplyRequest supplyRequest = new SupplyRequest().setItemId(medicationId).setSourceLocationId(locationId)
|
||||
.setLotNumber(lotNumber).setPatientId(patientId).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
.setLotNumber(lotNumber).setPatientId(patientId).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
baseMapper.insert(supplyRequest);
|
||||
return supplyRequest.getId();
|
||||
}
|
||||
@@ -342,13 +336,13 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public Long createDeviceSummarySupplyRequest(Long deviceId, Long locationId, String lotNumber,
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
SupplyRequest supplyRequest = new SupplyRequest().setItemId(deviceId).setSourceLocationId(locationId)
|
||||
.setLotNumber(lotNumber).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
.setLotNumber(lotNumber).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
baseMapper.insert(supplyRequest);
|
||||
return supplyRequest.getId();
|
||||
}
|
||||
@@ -402,13 +396,13 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<Long> cancelSummarySupplyRequest(List<String> summaryNoList) {
|
||||
// 查询汇总发药单
|
||||
List<SupplyRequest> supplyRequestList =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, summaryNoList)
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
List<SupplyRequest> supplyRequestList
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, summaryNoList)
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
// 软删除汇总发药单
|
||||
baseMapper.delete(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, summaryNoList)
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue()));
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue()));
|
||||
if (supplyRequestList != null && !supplyRequestList.isEmpty()) {
|
||||
return supplyRequestList.stream().map(SupplyRequest::getId).toList();
|
||||
}
|
||||
@@ -419,4 +413,4 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public List<ChangePriceDto> searchGroupDataForBusNo(String busNo) {
|
||||
return this.supplyRequestMapper.searchGroupDataForBusNo(busNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,21 +8,12 @@ import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* TODO:请概括描述当前接口的主要用途和注意事项
|
||||
=======
|
||||
* 出院办理服务接口
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
|
||||
public interface IInpatientDischargeService extends IService<InpatientDischarge> {
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
InpatientDischarge getByMdtrtId(String mdtrtId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,11 +11,6 @@ import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
@@ -82,8 +77,8 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
Info1101Output perinfo = null;
|
||||
// 发送请求
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/getPatinfo", readcard, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/getPatinfo", readcard, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -143,8 +138,8 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
ClinicReg2201Output clinicReg2201Output = new ClinicReg2201Output();
|
||||
// 发送请求
|
||||
String s =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancelReg", reg, contract);
|
||||
String s
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancelReg", reg, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -174,7 +169,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload2204-record",
|
||||
clinic2204OrderParam, contract);
|
||||
clinic2204OrderParam, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -208,7 +203,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/preSetl",
|
||||
clinic2206OrderParam, contract);
|
||||
clinic2206OrderParam, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -241,7 +236,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl", clinicOrder2207,
|
||||
contract);
|
||||
contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -269,8 +264,8 @@ public class YbHttpUtils {
|
||||
|
||||
public Sign9001Result sign(Sign signParam, Contract contract) {
|
||||
Sign9001Result sign = null;
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/signIn", signParam, contract);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/signIn", signParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -303,7 +298,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/unPreSettle",
|
||||
clinic2205OrderParam, contract);
|
||||
clinic2205OrderParam, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -333,7 +328,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancelSetl",
|
||||
clinicOrder2208, contract);
|
||||
clinicOrder2208, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -351,8 +346,8 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
clinicOrder2206Result =
|
||||
parseObject(JSON.toJSONString(result.getResult()), Clinic2208UnSetlInfoOutput.class);
|
||||
clinicOrder2206Result
|
||||
= parseObject(JSON.toJSONString(result.getResult()), Clinic2208UnSetlInfoOutput.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -364,7 +359,7 @@ public class YbHttpUtils {
|
||||
Clinic2208UnSetlInfoResult clinicOrder2206Result = new Clinic2208UnSetlInfoResult();
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/directoryCheck",
|
||||
medicalDirectory3301ListParam, null);
|
||||
medicalDirectory3301ListParam, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -384,7 +379,7 @@ public class YbHttpUtils {
|
||||
public Result directoryUnCheck(MedicalDirectory3302Param medicalDirectory3302Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/directoryUnCheck",
|
||||
medicalDirectory3302Param, null);
|
||||
medicalDirectory3302Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -410,7 +405,7 @@ public class YbHttpUtils {
|
||||
}
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/reconcile",
|
||||
financial3201Param, contract);
|
||||
financial3201Param, contract);
|
||||
|
||||
// 赋值(上述回填的两个参数医保不要,为了避免麻烦,在发送http后进行回填)
|
||||
financial3201Param.setFixmedinsCode(contract.getFixmedinsCode());
|
||||
@@ -436,7 +431,7 @@ public class YbHttpUtils {
|
||||
public FinancialSettlement3202Result reconcileGeneralLedgerDetail(FinancialSettlement3202Param financial3202Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/reconcile-detail",
|
||||
financial3202Param, null);
|
||||
financial3202Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -454,10 +449,10 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public List<FinancialSettlement3209AResult>
|
||||
threePartSearch(FinancialSettlement3209AParam financialSettlement3209AParam) {
|
||||
threePartSearch(FinancialSettlement3209AParam financialSettlement3209AParam) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/three-part-search-err",
|
||||
financialSettlement3209AParam, null);
|
||||
financialSettlement3209AParam, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -477,7 +472,7 @@ public class YbHttpUtils {
|
||||
public String applyFinancialClearing(Financial3203AParam financial3203AParam) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/apply-clearing",
|
||||
financial3203AParam, iContractService.getContract(financial3203AParam.getClrOptins()));
|
||||
financial3203AParam, iContractService.getContract(financial3203AParam.getClrOptins()));
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -488,7 +483,7 @@ public class YbHttpUtils {
|
||||
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-clearing",
|
||||
financial3204Param, null);
|
||||
financial3204Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -506,7 +501,7 @@ public class YbHttpUtils {
|
||||
public Clearing3205AResult getFinancialClearingStatus(Clearing3205AParma clearing3205AParma) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/get-clearing-status",
|
||||
clearing3205AParma, null);
|
||||
clearing3205AParma, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -524,7 +519,7 @@ public class YbHttpUtils {
|
||||
public Result uploadInventoryCount(MedicalInventory3501Param medicalInventory3501Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload-inventory-count",
|
||||
medicalInventory3501Param, null);
|
||||
medicalInventory3501Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -542,7 +537,7 @@ public class YbHttpUtils {
|
||||
public Result updateInventoryCount(MedicalInventory3502Param medicalInventory3502Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/update-inventory",
|
||||
medicalInventory3502Param, null);
|
||||
medicalInventory3502Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -560,7 +555,7 @@ public class YbHttpUtils {
|
||||
public Result procurement(Medical3503Param medical3503Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/procurement",
|
||||
medical3503Param, null);
|
||||
medical3503Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -578,7 +573,7 @@ public class YbHttpUtils {
|
||||
public Result cancelProcurement(MedicalPurchase3504Param medicalPurchase3504Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/procurement-cancel",
|
||||
medicalPurchase3504Param, null);
|
||||
medicalPurchase3504Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -596,7 +591,7 @@ public class YbHttpUtils {
|
||||
public Result merchandise(Medical3505Param medical3505Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/merchandise",
|
||||
medical3505Param, contract);
|
||||
medical3505Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -614,7 +609,7 @@ public class YbHttpUtils {
|
||||
public Result cancelMerchandise(Medical3506Param medical3506Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-merchandise",
|
||||
medical3506Param, contract);
|
||||
medical3506Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -632,7 +627,7 @@ public class YbHttpUtils {
|
||||
public Result deleteGoodsInfo(Medical3507Param medical3507Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/del-goods",
|
||||
medical3507Param, null);
|
||||
medical3507Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -650,7 +645,7 @@ public class YbHttpUtils {
|
||||
public MedicalInventory3511Output querySalesInfo(MedicalInventory3511Param medicalInventory3511Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-3511-info",
|
||||
medicalInventory3511Param, null);
|
||||
medicalInventory3511Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -668,8 +663,8 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 401) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
medicalInventory3511Output =
|
||||
parseObject(JSON.toJSONString(result.getResult()), MedicalInventory3511Output.class);
|
||||
medicalInventory3511Output
|
||||
= parseObject(JSON.toJSONString(result.getResult()), MedicalInventory3511Output.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -679,7 +674,7 @@ public class YbHttpUtils {
|
||||
public Result getClrOptins(Clearing3206AParam clearing3206AParam) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/getclroptins",
|
||||
clearing3206AParam, null);
|
||||
clearing3206AParam, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -697,7 +692,7 @@ public class YbHttpUtils {
|
||||
public Result upload2203Record(Clinic2203MedicalParam medical2203Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload2203-record",
|
||||
medical2203Param, contract);
|
||||
medical2203Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -715,7 +710,7 @@ public class YbHttpUtils {
|
||||
public Result query3512(MedicalInventory3512Param inventory3512Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-3512-info",
|
||||
inventory3512Param, contract);
|
||||
inventory3512Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -733,7 +728,7 @@ public class YbHttpUtils {
|
||||
public Result query3513(MedicalInventory3513Param inventory3513Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-3513-info",
|
||||
inventory3513Param, contract);
|
||||
inventory3513Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -763,7 +758,7 @@ public class YbHttpUtils {
|
||||
logger.info("【请求路径】:" + url + ";【入参】: " + JSON.toJSONString(baseParam));
|
||||
// 创建Http请求
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(300000)
|
||||
.setConnectionRequestTimeout(300000).setSocketTimeout(300000).build();
|
||||
.setConnectionRequestTimeout(300000).setSocketTimeout(300000).build();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
// 发送请求
|
||||
@@ -797,9 +792,9 @@ public class YbHttpUtils {
|
||||
List<Catalogue1312Output> outputList = new ArrayList<>();
|
||||
try {
|
||||
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/queryYbCatalogue",
|
||||
catalogue1312QueryParam, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/queryYbCatalogue",
|
||||
catalogue1312QueryParam, null);
|
||||
// System.out.println("--------1312resultString-------------" + resultString);
|
||||
// 1. 解析外层 JSON
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -808,7 +803,8 @@ public class YbHttpUtils {
|
||||
String resultStr = rootNode.get("result").asText();
|
||||
|
||||
// 2. 解析 result 中的 JSON 数组
|
||||
outputList = mapper.readValue(resultStr, new TypeReference<List<Catalogue1312Output>>() {});
|
||||
outputList = mapper.readValue(resultStr, new TypeReference<List<Catalogue1312Output>>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -849,8 +845,8 @@ public class YbHttpUtils {
|
||||
// 3. 转发并删除临时文件
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
response = restTemplate.postForEntity(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/file-up2",
|
||||
new HttpEntity<>(body, headers), String.class);
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/file-up2",
|
||||
new HttpEntity<>(body, headers), String.class);
|
||||
System.out.println(JSON.toJSONString(response));
|
||||
// 清理临时文件
|
||||
// Files.deleteIfExists(tempFile);
|
||||
@@ -871,7 +867,9 @@ public class YbHttpUtils {
|
||||
// }
|
||||
// });
|
||||
//
|
||||
//// 3. 发送请求到目标服务
|
||||
|
||||
|
||||
//// 3. 发送请求到目标服务
|
||||
// RestTemplate restTemplate = new RestTemplate();
|
||||
// HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers);
|
||||
// ResponseEntity<String> response =
|
||||
@@ -914,8 +912,8 @@ public class YbHttpUtils {
|
||||
* @return 违规信息
|
||||
*/
|
||||
public Yb3101OutputResult yb3101PreMidAnalysis(Yb3101InputData data) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-analysis", data, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-analysis", data, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -944,8 +942,8 @@ public class YbHttpUtils {
|
||||
* @param data 输入
|
||||
*/
|
||||
public void yb3103PreMidFeedback(Yb3103InputData data) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-feedback", data, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-feedback", data, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -968,9 +966,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public List<Yb2301OutputResult> upload2301FeeDetail(Yb2301InputFeeDetailModel yb2301InputFeeDetailModel) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload-2301-fee-detail",
|
||||
yb2301InputFeeDetailModel, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload-2301-fee-detail",
|
||||
yb2301InputFeeDetailModel, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1000,9 +998,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public Yb2303OutputSetInfo inpatientPreSettle(Yb2303InputInpatient yb2303InputInpatient) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-pre-setl",
|
||||
yb2303InputInpatient, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-pre-setl",
|
||||
yb2303InputInpatient, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1027,7 +1025,7 @@ public class YbHttpUtils {
|
||||
|
||||
public Yb2304OutputSetlInfo inpatientSettle(Contract contract, Yb2304InputInpatient yb2304InpatientParam) {
|
||||
String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-setl",
|
||||
yb2304InpatientParam, contract);
|
||||
yb2304InpatientParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1052,15 +1050,15 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【取消住院结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param yb2305InpatientParam 2305参数
|
||||
* @return 医保结果
|
||||
*/
|
||||
public Yb2305OutputSetlInfo inpatientUnSettle(Contract contract, Yb2305InputInpatient yb2305InpatientParam) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-un-setl",
|
||||
yb2305InpatientParam, contract);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-un-setl",
|
||||
yb2305InpatientParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1085,15 +1083,15 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【5205】人员慢特病用药记录查询
|
||||
*
|
||||
*
|
||||
* @param yb5205InputSpecialDisease
|
||||
* @return
|
||||
*/
|
||||
public List<Yb5205OutputSpecialDisease>
|
||||
yb5205SpecialDiseaseDrugRecordSearch(Yb5205InputSpecialDisease yb5205InputSpecialDisease) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/spe-disease-record-search",
|
||||
yb5205InputSpecialDisease, null);
|
||||
yb5205SpecialDiseaseDrugRecordSearch(Yb5205InputSpecialDisease yb5205InputSpecialDisease) {
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/spe-disease-record-search",
|
||||
yb5205InputSpecialDisease, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1125,7 +1123,7 @@ public class YbHttpUtils {
|
||||
*/
|
||||
public FileResult queryCatalog(CatalogFileInput catalogFileInput) {
|
||||
String resultString = httpPost(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-catalog", catalogFileInput, null);
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-catalog", catalogFileInput, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1135,20 +1133,6 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
<<<<<<< HEAD
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
=======
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
@@ -1161,7 +1145,6 @@ public class YbHttpUtils {
|
||||
} else {
|
||||
return new FileResult().setErrMsg(result.getMessage());
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1170,13 +1153,9 @@ public class YbHttpUtils {
|
||||
* @param fileResult
|
||||
* @return
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
public FileResult downLoadFile(FileResult fileResult) {
|
||||
=======
|
||||
public String downLoadFile(FileResult fileResult) {
|
||||
>>>>>>> v1.3
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/download", fileResult, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/download", fileResult, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1190,11 +1169,7 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
<<<<<<< HEAD
|
||||
return JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
=======
|
||||
return result.getResult().toString();
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -1207,23 +1182,13 @@ public class YbHttpUtils {
|
||||
/**
|
||||
* 【2401】住院办理
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
* @param yb2401InputInpatientMdtrtInfo 入參
|
||||
* @return 結果
|
||||
*/
|
||||
public InpatientReg inpatientReg(Yb2401InputInpatientMdtrtInfo yb2401InputInpatientMdtrtInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg",
|
||||
yb2401InputInpatientMdtrtInfo, contractServiceImpl.getContract(yb2401InputInpatientMdtrtInfo.getMdtrtareaAdmvs()));
|
||||
=======
|
||||
* @param jsonObject 入參
|
||||
* @return 結果
|
||||
*/
|
||||
public InpatientReg inpatientReg(JSONObject jsonObject, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg", jsonObject,
|
||||
contractServiceImpl.getContract(contractNo));
|
||||
>>>>>>> v1.3
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg", jsonObject,
|
||||
contractServiceImpl.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1247,12 +1212,6 @@ public class YbHttpUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public InpatientDischarge inpatientCheckOut(Contract contract,Yb2402InputParam yb2402InputInpatientDscgInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, contract);
|
||||
=======
|
||||
/**
|
||||
* 【2404】住院办理撤销
|
||||
*
|
||||
@@ -1260,9 +1219,9 @@ public class YbHttpUtils {
|
||||
* @return 結果
|
||||
*/
|
||||
public void cancelInpatientReg(Yb2404InputInpatient yb2404InputInpatient, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-inpatient-reg",
|
||||
yb2404InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-inpatient-reg",
|
||||
yb2404InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1287,16 +1246,15 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【2402】出院办理
|
||||
*
|
||||
*
|
||||
* @param yb2402InputInpatientDscgInfo 参数
|
||||
* @param contractNo 合同编号
|
||||
* @return 结果
|
||||
*/
|
||||
public Yb2402InputParam inpatientCheckOut(Yb2402InputParam yb2402InputInpatientDscgInfo, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, iContractService.getContract(contractNo));
|
||||
>>>>>>> v1.3
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, iContractService.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1310,11 +1268,7 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
<<<<<<< HEAD
|
||||
return JSON.parseObject(result.getResult().toString(), InpatientDischarge.class);
|
||||
=======
|
||||
return JSON.parseObject(result.getResult().toString(), Yb2402InputParam.class);
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -1324,12 +1278,6 @@ public class YbHttpUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public void updateInpatientInfo(Yb2403InputParam yb2405InputInpatient) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2405InputInpatient, null);
|
||||
=======
|
||||
/**
|
||||
* 【2405】出院办理撤销
|
||||
*
|
||||
@@ -1337,9 +1285,9 @@ public class YbHttpUtils {
|
||||
* @return 結果
|
||||
*/
|
||||
public void cancelInpatientCheckOut(Yb2405InputInpatient yb2405InputInpatient, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-discharge-patient",
|
||||
yb2405InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-discharge-patient",
|
||||
yb2405InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1364,15 +1312,14 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【2403】 更改住院信息
|
||||
*
|
||||
*
|
||||
* @param yb2403InputInpatient 参数
|
||||
* @param contractNo 结果
|
||||
*/
|
||||
public void updateInpatientInfo(Yb2403InputParam yb2403InputInpatient, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2403InputInpatient, iContractService.getContract(contractNo));
|
||||
>>>>>>> v1.3
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2403InputInpatient, iContractService.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1392,17 +1339,13 @@ public class YbHttpUtils {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
}
|
||||
=======
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void emrUp(Yb4401InputDto yb4401InputDto) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/emr-up", yb4401InputDto, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/emr-up", yb4401InputDto, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1428,13 +1371,13 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【2601】冲正交易
|
||||
*
|
||||
*
|
||||
* @param toReverse 冲正参数
|
||||
* @param contract 省市医保
|
||||
*/
|
||||
public void ybToReverse(Yb2601InputParam toReverse, Contract contract) {
|
||||
String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/to-reverse",
|
||||
toReverse, contract);
|
||||
toReverse, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1461,7 +1404,7 @@ public class YbHttpUtils {
|
||||
public void yb4101Up(Yb4101AInputData yb4101AInputData, Contract contract) {
|
||||
|
||||
String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl-up",
|
||||
yb4101AInputData, contract);
|
||||
yb4101AInputData, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1486,9 +1429,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public void yb4102Up(Yb4102InputStastInfo yb4102InputStastInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl-status-up",
|
||||
yb4102InputStastInfo, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl-status-up",
|
||||
yb4102InputStastInfo, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1514,9 +1457,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public void cancel2302FeeDetailUp(Yb2302InpatientParam yb2302InpatientParam, Contract contract) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-2302-fee-detail",
|
||||
yb2302InpatientParam, contract);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-2302-fee-detail",
|
||||
yb2302InpatientParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1540,5 +1483,4 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -82,7 +82,9 @@ public class YbManager {
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
/******************************** 业务服务 ***********************************/
|
||||
/**
|
||||
* ****************************** 业务服务 **********************************
|
||||
*/
|
||||
@Autowired
|
||||
private IPaymentRecDetailService iPaymentRecDetailService;
|
||||
@Autowired
|
||||
@@ -107,7 +109,9 @@ public class YbManager {
|
||||
private IOrganizationService iOrganizationService;
|
||||
@Autowired
|
||||
private IInventoryItemService inventoryItemService;
|
||||
/****************************** 基础医保服务 *********************************/
|
||||
/**
|
||||
* **************************** 基础医保服务 ********************************
|
||||
*/
|
||||
|
||||
@Autowired
|
||||
private IPerinfoService iPerinfoService;
|
||||
@@ -170,14 +174,14 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【2201】 为了慢特病自动挂号封装
|
||||
*
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
public ClinicReg2201Output createRegWithMedType(Contract contract, YbMdtrtCertType ybMdtrtCertTypeLong,
|
||||
String busiCardInfo, Long encounterId, YbMedType medType) {
|
||||
String busiCardInfo, Long encounterId, YbMedType medType) {
|
||||
ClinicReg reg = ybBaseService.getReg(ybMdtrtCertTypeLong, busiCardInfo, encounterId, medType,
|
||||
SecurityUtils.getLoginUser().getTenantId());
|
||||
SecurityUtils.getLoginUser().getTenantId());
|
||||
reg.setMedType(medType.getValue());
|
||||
ClinicReg2201Output regResult = ybHttpService.reg(reg, contract);
|
||||
if (regResult != null) {
|
||||
@@ -197,8 +201,8 @@ public class YbManager {
|
||||
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
|
||||
PaymentReconciliation paymentReconciliation =
|
||||
iPaymentReconciliationService.getById(cancelRegPaymentDto.getId());
|
||||
PaymentReconciliation paymentReconciliation
|
||||
= iPaymentReconciliationService.getById(cancelRegPaymentDto.getId());
|
||||
|
||||
if (paymentReconciliation == null) {
|
||||
throw new ServiceException("未查询到付款信息");
|
||||
@@ -216,8 +220,8 @@ public class YbManager {
|
||||
|
||||
Contract contractByInsuplcAdmdvs = iContractService.getContract(cancelRegPaymentDto.getContractNo());
|
||||
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoOutput =
|
||||
ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoOutput
|
||||
= ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
if (clinic2208UnSetlInfoOutput == null) {
|
||||
throw new ServiceException("未查询到医保返回信息");
|
||||
}
|
||||
@@ -227,8 +231,8 @@ public class YbManager {
|
||||
|
||||
ClinicReg reg = ybBaseService.getUnReg(cancelRegPaymentDto.getEncounterId(), tenantId);
|
||||
|
||||
ClinicReg2201Output regResult =
|
||||
ybHttpService.cancelReg(reg, iContractService.getContract(cancelRegPaymentDto.getContractNo()));
|
||||
ClinicReg2201Output regResult
|
||||
= ybHttpService.cancelReg(reg, iContractService.getContract(cancelRegPaymentDto.getContractNo()));
|
||||
if (regResult != null) {
|
||||
ybBaseService.saveUnReg(regResult);
|
||||
}
|
||||
@@ -252,14 +256,14 @@ public class YbManager {
|
||||
* @return 结果
|
||||
*/
|
||||
public Clinic2206OrderOutput getPreSettleInfo(OutpatientRegistrationModel cancelRegPaymentModel, Patient patient,
|
||||
Organization organization, Practitioner doctor) {
|
||||
Organization organization, Practitioner doctor) {
|
||||
if (patient == null || organization == null || doctor == null) {
|
||||
throw new ServiceException("未查询到相关信息");
|
||||
}
|
||||
|
||||
InfoPerson perinfo = iPerinfoService.getOne(new LambdaQueryWrapper<InfoPerson>()
|
||||
.eq(InfoPerson::getCertno, patient.getIdCard()).eq(InfoPerson::getTenantId, patient.getTenantId())
|
||||
.orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.eq(InfoPerson::getCertno, patient.getIdCard()).eq(InfoPerson::getTenantId, patient.getTenantId())
|
||||
.orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (perinfo == null) {
|
||||
throw new ServiceException("未查询到身份信息");
|
||||
}
|
||||
@@ -276,16 +280,15 @@ public class YbManager {
|
||||
// 拼接医保挂号参数
|
||||
ClinicReg reg = new ClinicReg();
|
||||
reg.setPsnNo(perinfo.getPsnNo()).setInsutype(perinfo.getInsutype()).setBegntime(new Date())
|
||||
.setMdtrtCertType(mdtrtCertType.getValue()).setMdtrtCertNo(cancelRegPaymentModel.getBusiCardInfo())
|
||||
.setIptOtpNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 4))
|
||||
.setAtddrNo(doctor.getYbNo()).setDrName(doctor.getName()).setDeptCode(organization.getYbNo())
|
||||
.setDeptName(organization.getName())
|
||||
.setCaty(organization.getCaty() == null ? organization.getYbNo() : organization.getCaty())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setAtddrNo(doctor.getYbNo()).setPsnType("11")
|
||||
.setPsnCertType("01").setCertno(perinfo.getCertno()).setPsnName(perinfo.getPsnName());
|
||||
.setMdtrtCertType(mdtrtCertType.getValue()).setMdtrtCertNo(cancelRegPaymentModel.getBusiCardInfo())
|
||||
.setIptOtpNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 4))
|
||||
.setAtddrNo(doctor.getYbNo()).setDrName(doctor.getName()).setDeptCode(organization.getYbNo())
|
||||
.setDeptName(organization.getName())
|
||||
.setCaty(organization.getCaty() == null ? organization.getYbNo() : organization.getCaty())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setAtddrNo(doctor.getYbNo()).setPsnType("11")
|
||||
.setPsnCertType("01").setCertno(perinfo.getCertno()).setPsnName(perinfo.getPsnName());
|
||||
|
||||
// reg.setAtddrNo("D220172023129").setDrName("郭建林").setCaty("B19").setDeptCode("B19");
|
||||
|
||||
// 发送医保挂号请求
|
||||
ClinicReg2201Output clinicReg2201Output = ybHttpService.reg(reg, contract);
|
||||
if (clinicReg2201Output == null) {
|
||||
@@ -303,17 +306,17 @@ public class YbManager {
|
||||
// 拼接2203参数
|
||||
Clinic2203DiseInfoParam diseinfo = new Clinic2203DiseInfoParam();
|
||||
diseinfo.setDiagDept(organization.getYbNo()).setDiseDorName(doctor.getName()).setDiseDorNo(doctor.getYbNo())
|
||||
.setDiagTime(new Date()).setValiFlag(Whether.YES.getValue().toString()).setDiagType("1").setDiagSrtNo("1")
|
||||
.setDiagCode("Z00.001").setDiagName("健康查体").setMdtrtId(clinicReg2201Output.getMdtrtId());
|
||||
.setDiagTime(new Date()).setValiFlag(Whether.YES.getValue().toString()).setDiagType("1").setDiagSrtNo("1")
|
||||
.setDiagCode("Z00.001").setDiagName("健康查体").setMdtrtId(clinicReg2201Output.getMdtrtId());
|
||||
// .setDiseDorNo("D220172023129").setDiseDorName("郭建林").setDiagDept("B19");
|
||||
|
||||
diseinfos.add(diseinfo);
|
||||
|
||||
Clinic2203MedicalParam medical2203Param = new Clinic2203MedicalParam();
|
||||
medical2203Param.setMdtrtId(clinicReg2201Output.getMdtrtId()).setPsnNo(reg.getPsnNo())
|
||||
.setBegntime(reg.getBegntime()).setMedType(medType.getValue()).setMainCondDscr("")
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setDiseCodg("Z00.001").setDiseName("健康查体")
|
||||
.setDiseinfoList(diseinfos).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
.setBegntime(reg.getBegntime()).setMedType(medType.getValue()).setMainCondDscr("")
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setDiseCodg("Z00.001").setDiseName("健康查体")
|
||||
.setDiseinfoList(diseinfos).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
|
||||
// 2203接口上传就诊信息
|
||||
ybHttpService.upload2203Record(medical2203Param, contract);
|
||||
@@ -337,14 +340,14 @@ public class YbManager {
|
||||
// 外购处方标志(文档上没有详细介绍) 2025/04/14经确认,暂定非处方流转传0,处方流转传1
|
||||
clinicFeedetail.setMedListCodg(cancelRegPaymentModel.getYbNo());
|
||||
clinicFeedetail.setFeedetlSn(clinic2204OrderParam.getChrgBchno()).setMdtrtId(clinicReg2201Output.getMdtrtId())
|
||||
.setPsnNo(reg.getPsnNo()).setChrgBchno(clinic2204OrderParam.getChrgBchno()).setFeeOcurTime(new Date())
|
||||
.setMedinsListCodg(cancelRegPaymentModel.getBusNo()).setDetItemFeeSumamt(totalPrice.doubleValue())
|
||||
.setCnt(1.0).setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs())
|
||||
.setBilgDeptCodg(organization.getYbNo()).setBilgDeptName(organization.getName())
|
||||
.setBilgDrCodg(doctor.getYbNo())
|
||||
// 默认无需审批
|
||||
.setBilgDrName(doctor.getName()).setHospApprFlag(YbHospApprFlag.NO_APPROVAL_REQUIRED.getValue())
|
||||
.setRxCircFlag("0").setBilgDrCodg(doctor.getYbNo());
|
||||
.setPsnNo(reg.getPsnNo()).setChrgBchno(clinic2204OrderParam.getChrgBchno()).setFeeOcurTime(new Date())
|
||||
.setMedinsListCodg(cancelRegPaymentModel.getBusNo()).setDetItemFeeSumamt(totalPrice.doubleValue())
|
||||
.setCnt(1.0).setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs())
|
||||
.setBilgDeptCodg(organization.getYbNo()).setBilgDeptName(organization.getName())
|
||||
.setBilgDrCodg(doctor.getYbNo())
|
||||
// 默认无需审批
|
||||
.setBilgDrName(doctor.getName()).setHospApprFlag(YbHospApprFlag.NO_APPROVAL_REQUIRED.getValue())
|
||||
.setRxCircFlag("0").setBilgDrCodg(doctor.getYbNo());
|
||||
// .setBilgDrName("郭建林").setBilgDrCodg("D220172023129")
|
||||
// .setBilgDeptCodg("B19").setBilgDeptName(organization.getName());
|
||||
|
||||
@@ -362,11 +365,11 @@ public class YbManager {
|
||||
// 拼接2206预结算参数
|
||||
Clinic2206OrderParam clinicOrder = new Clinic2206OrderParam();
|
||||
clinicOrder.setPsnNo(clinicReg2201Output.getPsnNo()).setMdtrtCertType(clinicReg2201Output.getMdtrtCertType())
|
||||
.setMdtrtCertNo(clinicReg2201Output.getMdtrtCertNo()).setMedType(medType.getValue())
|
||||
.setMedfeeSumamt(totalPrice.doubleValue()).setPsnSetlway(setlWay.getValue())
|
||||
.setMdtrtId(clinicReg2201Output.getMdtrtId()).setChrgBchno(clinic2204OrderParam.getChrgBchno())
|
||||
.setAcctUsedFlag(String.valueOf(Whether.YES.getValue())).setInsutype(clinicReg2201Output.getInsutype())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
.setMdtrtCertNo(clinicReg2201Output.getMdtrtCertNo()).setMedType(medType.getValue())
|
||||
.setMedfeeSumamt(totalPrice.doubleValue()).setPsnSetlway(setlWay.getValue())
|
||||
.setMdtrtId(clinicReg2201Output.getMdtrtId()).setChrgBchno(clinic2204OrderParam.getChrgBchno())
|
||||
.setAcctUsedFlag(String.valueOf(Whether.YES.getValue())).setInsutype(clinicReg2201Output.getInsutype())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
|
||||
// 接收2206接口返回参数
|
||||
Clinic2206OrderOutput clinic2206OrderResult = ybHttpService.upload2206Record(clinicOrder, contract);
|
||||
@@ -375,18 +378,18 @@ public class YbManager {
|
||||
}
|
||||
// 保存预结算参数
|
||||
ybBaseService.saveClinicOrder2206Param(clinicOrder, clinic2206OrderResult, medical2203Param,
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
// 缓存预结算结果
|
||||
redisCache.setCacheObject("PRE-SETTLE:PRE_SETTLE_:" + clinic2204OrderParam.getChrgBchno(),
|
||||
clinic2206OrderResult, 1800, TimeUnit.SECONDS);
|
||||
clinic2206OrderResult, 1800, TimeUnit.SECONDS);
|
||||
clinic2206OrderResult.setChrgBchno(clinic2204OrderParam.getChrgBchno()).setBusNo(reg.getIptOtpNo());
|
||||
// 返回预结算结果
|
||||
return clinic2206OrderResult;
|
||||
}
|
||||
|
||||
public Clinic2206OrderOutput preSettle(Contract contract, Long encounterId, YbMdtrtCertType ybMdtrtCertType,
|
||||
String busiCardInfo, ClinicReg2201Output reg2201Output, String payWay,
|
||||
List<PaymentedItemModel> paymentedItemList, YbMedType ybMedType) {
|
||||
String busiCardInfo, ClinicReg2201Output reg2201Output, String payWay,
|
||||
List<PaymentedItemModel> paymentedItemList, YbMedType ybMedType) {
|
||||
YbPsnSetlWay ybPsnSetlWay = YbPsnSetlWay.getByValue(payWay);
|
||||
if (ybPsnSetlWay == null) {
|
||||
ybPsnSetlWay = YbPsnSetlWay.PSN_SETLWAY01;
|
||||
@@ -394,16 +397,16 @@ public class YbManager {
|
||||
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// 获取2203接口和2204接口参数
|
||||
Clinic2203MedicalParam clinic2203MedicalParam =
|
||||
ybBaseService.getClinicMedical2203Param(encounterId, tenantId, reg2201Output, ybMedType);
|
||||
Clinic2203MedicalParam clinic2203MedicalParam
|
||||
= ybBaseService.getClinicMedical2203Param(encounterId, tenantId, reg2201Output, ybMedType);
|
||||
if (clinic2203MedicalParam == null) {
|
||||
throw new ServiceException("未生成2203接口参数");
|
||||
}
|
||||
|
||||
Result result = ybHttpService.upload2203Record(clinic2203MedicalParam, contract);
|
||||
|
||||
Clinic2204OrderParam clinic2204OrderParam =
|
||||
ybBaseService.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output);
|
||||
Clinic2204OrderParam clinic2204OrderParam
|
||||
= ybBaseService.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output);
|
||||
if (clinic2204OrderParam == null) {
|
||||
throw new ServiceException("未生成2204接口参数");
|
||||
}
|
||||
@@ -421,7 +424,7 @@ public class YbManager {
|
||||
|
||||
// 获取2206参数
|
||||
Clinic2206OrderParam clinic2206OrderParam = ybBaseService.getClinicOrder2206Param(sum, reg2201Output,
|
||||
clinic2204OrderParam.getChrgBchno(), busiCardInfo);
|
||||
clinic2204OrderParam.getChrgBchno(), busiCardInfo);
|
||||
if (clinic2206OrderParam == null) {
|
||||
throw new ServiceException("未生成2206接口参数");
|
||||
}
|
||||
@@ -432,7 +435,7 @@ public class YbManager {
|
||||
}
|
||||
// 保存预结算参数
|
||||
ybBaseService.saveClinicOrder2206Param(clinic2206OrderParam, clinic2206OrderResult, clinic2203MedicalParam,
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
// 缓存预结算结果
|
||||
// redisCache.setCacheObject("PRE-SETTLE:PRE_SETTLE_:" + clinic2206OrderParam.getChrgBchno(),
|
||||
// clinic2206OrderResult, 1800, TimeUnit.SECONDS);
|
||||
@@ -453,10 +456,10 @@ public class YbManager {
|
||||
if (clinicOrder2208 == null) {
|
||||
throw new ServiceException("未生成2208接口参数");
|
||||
}
|
||||
Contract contractByInsuplcAdmdvs =
|
||||
iContractService.getContractByInsuplcAdmdvs(clinicOrder2208.getInsuplcAdmdvs());
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoResult =
|
||||
ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
Contract contractByInsuplcAdmdvs
|
||||
= iContractService.getContractByInsuplcAdmdvs(clinicOrder2208.getInsuplcAdmdvs());
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoResult
|
||||
= ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
// 业务表中进行操作
|
||||
ybBaseService.saveUnSettleRecord(settleId, clinicOrder2208, clinic2208UnSetlInfoResult);
|
||||
return R.ok(clinic2208UnSetlInfoResult);
|
||||
@@ -500,14 +503,14 @@ public class YbManager {
|
||||
* @param ybNo 医保编码
|
||||
*/
|
||||
public R<?> directoryCheckMedication(String categoryCode, String busNo, String name, String ybNo) {
|
||||
MedicalDirectory3302Param medicalDirectory3302Param =
|
||||
ybBaseService.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo);
|
||||
MedicalDirectory3302Param medicalDirectory3302Param
|
||||
= ybBaseService.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo);
|
||||
Result result3302Info = ybHttpService.directoryUnCheck(medicalDirectory3302Param);
|
||||
if (!result3302Info.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||
return R.fail("目录对照前,撤销对照失败");
|
||||
}
|
||||
MedicalDirectory3301Param medicalDirectory3301Param =
|
||||
ybBaseService.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo);
|
||||
MedicalDirectory3301Param medicalDirectory3301Param
|
||||
= ybBaseService.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo);
|
||||
ArrayList<MedicalDirectory3301Param> list = new ArrayList<>();
|
||||
list.add(medicalDirectory3301Param);
|
||||
MedicalDirectory3301ListParam medicalDirectory3301ListParam = new MedicalDirectory3301ListParam();
|
||||
@@ -565,8 +568,8 @@ public class YbManager {
|
||||
*/
|
||||
public R<?> reconcileGeneralLedgerDetail(Settlement3202WebParam settlement3202WebParam) {
|
||||
|
||||
FinancialSettlement3202Param financial3202Param =
|
||||
ybBaseService.getFinancialSettlement3202Param(settlement3202WebParam);
|
||||
FinancialSettlement3202Param financial3202Param
|
||||
= ybBaseService.getFinancialSettlement3202Param(settlement3202WebParam);
|
||||
FinancialSettlement3202Result resultInfo = ybHttpService.reconcileGeneralLedgerDetail(financial3202Param);
|
||||
|
||||
return R.ok(resultInfo);
|
||||
@@ -580,8 +583,8 @@ public class YbManager {
|
||||
*/
|
||||
public R<?> threePartSearch(Settlement3209AWebParam settlement3209AWebParam) {
|
||||
|
||||
FinancialSettlement3209AParam financialSettlement3209AParam =
|
||||
ybBaseService.getFinancialSettlement3209AParam(settlement3209AWebParam);
|
||||
FinancialSettlement3209AParam financialSettlement3209AParam
|
||||
= ybBaseService.getFinancialSettlement3209AParam(settlement3209AWebParam);
|
||||
List<FinancialSettlement3209AResult> list = ybHttpService.threePartSearch(financialSettlement3209AParam);
|
||||
|
||||
return R.ok();
|
||||
@@ -707,8 +710,8 @@ public class YbManager {
|
||||
public R<?> merchandise(Medical3505Param medical3505Param, Contract contract) {
|
||||
|
||||
Result result = ybHttpService.merchandise(medical3505Param, contract);
|
||||
Medical3505Result medical3505Result =
|
||||
JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
Medical3505Result medical3505Result
|
||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
if ("1".equals(medical3505Result.getRetRslt())) {
|
||||
ybBaseService.saveInventorySaleRecord(medical3505Param, medical3505Result.getMsgRslt());
|
||||
return R.ok();
|
||||
@@ -726,8 +729,8 @@ public class YbManager {
|
||||
*/
|
||||
public R<?> cancelMerchandise(Medical3506Param medical3506Param, Contract contract) {
|
||||
Result result = ybHttpService.cancelMerchandise(medical3506Param, contract);
|
||||
Medical3505Result medical3505Result =
|
||||
JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
Medical3505Result medical3505Result
|
||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
if ("1".equals(medical3505Result.getRetRslt())) {
|
||||
ybBaseService.saveInventorySaleReturnRecord(medical3506Param, medical3505Result.getMsgRslt());
|
||||
return R.ok();
|
||||
@@ -754,7 +757,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【门诊结算-2207结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param chrgBchno 支付批次号
|
||||
* @param ybMdtrtCertType 凭证类型
|
||||
@@ -764,33 +767,33 @@ public class YbManager {
|
||||
* @return 结算结果
|
||||
*/
|
||||
public Clinic2207OrderModel settle(Contract contract, String chrgBchno, String busiCardInfo,
|
||||
YbMdtrtCertType ybMdtrtCertType, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
YbMdtrtCertType ybMdtrtCertType, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
// 分别查询2206和2201记录的参数信息
|
||||
ClinicPreSettle clinicPreSettle = iClinicPreSettleService
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
if (clinicPreSettle == null) {
|
||||
throw new ServiceException("为查询到预结算信息");
|
||||
}
|
||||
ClinicReg clinicReg = iRegService
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
if (clinicReg == null) {
|
||||
throw new ServiceException("为查询到挂号信息");
|
||||
}
|
||||
Clinic2206OrderOutput clinic2206OrderResult =
|
||||
JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
Clinic2206OrderOutput clinic2206OrderResult
|
||||
= JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
// 组装2207接口参数
|
||||
Clinic2207OrderParam clinicOrder = new Clinic2207OrderParam();
|
||||
clinicOrder.setPsnNo(clinicPreSettle.getPsnNo()).setMdtrtCertType(ybMdtrtCertType.getValue())
|
||||
.setMdtrtCertNo(busiCardInfo).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs()).setMinpacuntDrugTracCnt(minpacuntDrugTracCnt)
|
||||
.setMcsTracCnt(mcsTracCnt);
|
||||
.setMdtrtCertNo(busiCardInfo).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs()).setMinpacuntDrugTracCnt(minpacuntDrugTracCnt)
|
||||
.setMcsTracCnt(mcsTracCnt);
|
||||
// 发送http请求给app
|
||||
Clinic2207OrderModel settle = ybHttpService.settle(clinicOrder, contract);
|
||||
if (settle == null) {
|
||||
@@ -803,7 +806,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【门诊挂号收费-2207】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param chrgBchno 收费批次号
|
||||
* @return 结果
|
||||
@@ -811,33 +814,33 @@ public class YbManager {
|
||||
public PaymentResult settle(Contract contract, String chrgBchno) {
|
||||
|
||||
ClinicPreSettle clinicPreSettle = iClinicPreSettleService
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
|
||||
if (clinicPreSettle == null) {
|
||||
throw new ServiceException("未查询到预结算信息");
|
||||
}
|
||||
ClinicReg clinicReg = iRegService
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
|
||||
if (clinicReg == null) {
|
||||
throw new ServiceException("未查询到挂号信息");
|
||||
}
|
||||
|
||||
Clinic2206OrderOutput clinic2206OrderResult =
|
||||
JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
Clinic2206OrderOutput clinic2206OrderResult
|
||||
= JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
|
||||
Clinic2207OrderParam clinicOrder = new Clinic2207OrderParam();
|
||||
clinicOrder.setPsnNo(clinicPreSettle.getPsnNo()).setMdtrtCertType(clinic2206OrderResult.getMdtrtCertType())
|
||||
// todo:sjq 医疗费用总额需要用ChargeItem的和
|
||||
.setMdtrtCertNo(clinic2206OrderResult.getMdtrtCertNo()).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs());
|
||||
// todo:sjq 医疗费用总额需要用ChargeItem的和
|
||||
.setMdtrtCertNo(clinic2206OrderResult.getMdtrtCertNo()).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs());
|
||||
|
||||
Clinic2207OrderModel settle = ybHttpService.settle(clinicOrder, contract);
|
||||
|
||||
@@ -869,7 +872,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 医保预结算返回信息
|
||||
*
|
||||
*
|
||||
* @return 预结算结果
|
||||
*/
|
||||
public Yb2303OutputSetInfo preSettleInpatient(PrePaymentDto prePaymentDto) {
|
||||
@@ -880,8 +883,8 @@ public class YbManager {
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = inpatientRegService
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (inpatientReg == null) {
|
||||
throw new ServiceException("未查询到医保就诊记录");
|
||||
}
|
||||
@@ -894,13 +897,12 @@ public class YbManager {
|
||||
// 获取今天和昨天的上午10点时间
|
||||
// LocalDateTime today10AM = LocalDateTime.of(LocalDate.now(), LocalTime.of(10, 0)); // 今天10点
|
||||
// LocalDateTime yesterday10AM = today10AM.minusDays(1); // 昨天10点(自动处理跨月/年)
|
||||
|
||||
// List<ChargeItem> chargeItemList = iChargeItemService.list(new LambdaQueryWrapper<ChargeItem>()
|
||||
// .eq(ChargeItem::getEncounterId, encounterId).between(ChargeItem::getEnteredDate, yesterday10AM, today10AM));
|
||||
// List<ChargeItem> chargeItemList = iChargeItemService.list(new LambdaQueryWrapper<ChargeItem>()
|
||||
// .eq(ChargeItem::getEncounterId, encounterId).in(ChargeItem::getId, chargeItemIds));
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtos =
|
||||
iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds());
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtos
|
||||
= iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds());
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtosList = new ArrayList<>();
|
||||
|
||||
// 查询基础信息 todo:childrenJson里面村的内容相比较ChargeItemBaseInfoDto有些不够,需要确认一下类里面实际用到的值在children里存不存在
|
||||
@@ -910,8 +912,8 @@ public class YbManager {
|
||||
}
|
||||
if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) {
|
||||
// 反序列化:将JSON数组字符串转为List<>
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoList =
|
||||
JSON.parseArray(chargeItemBaseInfoDto.getChildrenJson(), ChargeItemBaseInfoDto.class);
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoList
|
||||
= JSON.parseArray(chargeItemBaseInfoDto.getChildrenJson(), ChargeItemBaseInfoDto.class);
|
||||
chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList);
|
||||
} else {
|
||||
chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto);
|
||||
@@ -922,11 +924,11 @@ public class YbManager {
|
||||
List<Yb2301InputFeeDetail> yb2301InputFeeDetailList = new ArrayList();
|
||||
BigDecimal quantity = BigDecimal.ZERO;
|
||||
// 分组分类
|
||||
Map<String, List<ChargeItemBaseInfoDto>> groupByTable =
|
||||
chargeItemBaseInfoDtosList.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceTable));
|
||||
Map<String, List<ChargeItemBaseInfoDto>> groupByTable
|
||||
= chargeItemBaseInfoDtosList.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceTable));
|
||||
for (Map.Entry<String, List<ChargeItemBaseInfoDto>> stringListEntry : groupByTable.entrySet()) {
|
||||
Map<Long, List<ChargeItemBaseInfoDto>> groupById =
|
||||
stringListEntry.getValue().stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceId));
|
||||
Map<Long, List<ChargeItemBaseInfoDto>> groupById
|
||||
= stringListEntry.getValue().stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceId));
|
||||
for (Map.Entry<Long, List<ChargeItemBaseInfoDto>> longListEntry : groupById.entrySet()) {
|
||||
quantity = BigDecimal.ZERO;
|
||||
for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : longListEntry.getValue()) {
|
||||
@@ -937,17 +939,17 @@ public class YbManager {
|
||||
|
||||
yb2301InputFeeDetail = new Yb2301InputFeeDetail();
|
||||
yb2301InputFeeDetail.setFeedetlSn(chargeItemBaseInfoDto.getBusNo())
|
||||
.setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo())
|
||||
.setMedType(String.valueOf(encounter.getYbClassEnum()))
|
||||
.setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate())
|
||||
.setMedListCodg(chargeItemBaseInfoDto.getYbNo())
|
||||
.setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo())
|
||||
// 2025-11-13 李方案住院部分的totalprice不可直接用,要用单价乘以数量,并且比如患者一天一袋氯化钠注射液,预结算的时候要根据同表同id进行归类计算
|
||||
.setDetItemFeeSumamt(quantity.multiply(chargeItemBaseInfoDto.getUnitPrice())).setCnt(quantity)
|
||||
.setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName())
|
||||
.setBilgDrName(chargeItemBaseInfoDto.getDoctName())
|
||||
.setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
.setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo())
|
||||
.setMedType(String.valueOf(encounter.getYbClassEnum()))
|
||||
.setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate())
|
||||
.setMedListCodg(chargeItemBaseInfoDto.getYbNo())
|
||||
.setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo())
|
||||
// 2025-11-13 李方案住院部分的totalprice不可直接用,要用单价乘以数量,并且比如患者一天一袋氯化钠注射液,预结算的时候要根据同表同id进行归类计算
|
||||
.setDetItemFeeSumamt(quantity.multiply(chargeItemBaseInfoDto.getUnitPrice())).setCnt(quantity)
|
||||
.setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName())
|
||||
.setBilgDrName(chargeItemBaseInfoDto.getDoctName())
|
||||
.setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
|
||||
yb2301InputFeeDetailList.add(yb2301InputFeeDetail);
|
||||
}
|
||||
@@ -968,10 +970,9 @@ public class YbManager {
|
||||
// .setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
// yb2301InputFeeDetailList.add(yb2301InputFeeDetail);
|
||||
// }
|
||||
|
||||
Yb2301InputFeeDetailModel yb2301InputFeeDetailModel = new Yb2301InputFeeDetailModel();
|
||||
yb2301InputFeeDetailModel.setFeedetail(yb2301InputFeeDetailList)
|
||||
.setInsuplcAdmdvs(inpatientReg.getInsuplcAdmdvs());
|
||||
.setInsuplcAdmdvs(inpatientReg.getInsuplcAdmdvs());
|
||||
|
||||
List<Yb2301OutputResult> yb2301OutputResults = ybHttpService.upload2301FeeDetail(yb2301InputFeeDetailModel);
|
||||
// todo :数据保存
|
||||
@@ -998,15 +999,14 @@ public class YbManager {
|
||||
|
||||
Yb2303InputInpatient yb2303InputInpatient = new Yb2303InputInpatient();
|
||||
yb2303InputInpatient.setPsnNo(infoPerson.getPsnNo())
|
||||
.setMdtrtCertType(YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()) == null ? null
|
||||
: YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()).getValue())
|
||||
.setMdtrtCertNo(prePaymentDto.getBusiCardInfo()).setMedfeeSumamt(medfeeSumamt)
|
||||
.setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()).setMdtrtId(inpatientReg.getMdtrtId())
|
||||
.setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs())
|
||||
.setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs());
|
||||
.setMdtrtCertType(YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()) == null ? null
|
||||
: YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()).getValue())
|
||||
.setMdtrtCertNo(prePaymentDto.getBusiCardInfo()).setMedfeeSumamt(medfeeSumamt)
|
||||
.setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()).setMdtrtId(inpatientReg.getMdtrtId())
|
||||
.setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs())
|
||||
.setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs());
|
||||
|
||||
// todo:中途结算标志需要判断一下,待2304接口开发完成后编辑
|
||||
|
||||
Yb2303OutputSetInfo yb2303OutputSetInfo = ybHttpService.inpatientPreSettle(yb2303InputInpatient);
|
||||
|
||||
if (yb2303OutputSetInfo == null) {
|
||||
@@ -1020,7 +1020,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【住院结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param paymentDto 结算参数
|
||||
* @return 结果
|
||||
@@ -1052,10 +1052,6 @@ public class YbManager {
|
||||
return yb2305OutputSetlInfo;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public void hospitalAdmission() {
|
||||
}
|
||||
=======
|
||||
public void hospitalAdmission() {}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -5,19 +5,6 @@ package com.openhis.yb.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
import com.openhis.yb.mapper.InpatientDischargeMapper;
|
||||
import com.openhis.yb.mapper.InpatientRegMapper;
|
||||
import com.openhis.yb.service.IInpatientDischargeService;
|
||||
import com.openhis.yb.service.IInpatientRegService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* TODO:请概括描述当前类的主要用途和注意事项
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.openhis.common.constant.YbCommonConstants;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
@@ -27,22 +14,17 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 医保出院Mapper
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
@Service
|
||||
public class InpatientDischargeServiceImpl extends ServiceImpl<InpatientDischargeMapper, InpatientDischarge>
|
||||
implements IInpatientDischargeService {
|
||||
<<<<<<< HEAD
|
||||
implements IInpatientDischargeService {
|
||||
|
||||
|
||||
=======
|
||||
@Override
|
||||
public InpatientDischarge getByMdtrtId(String mdtrtId) {
|
||||
return baseMapper.selectOne(new LambdaQueryWrapper<InpatientDischarge>().eq(InpatientDischarge::getMdtrtId, mdtrtId)
|
||||
.eq(InpatientDischarge::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.eq(InpatientDischarge::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user