解决合并冲突
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 修改价格记录Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Data
|
||||
@TableName("adm_change_price_record")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ChangePriceRecord extends HisBaseEntity {
|
||||
|
||||
/** 本表id */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 仓库位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 改价申请人id */
|
||||
private Long applicantId;
|
||||
|
||||
/** 目标枚举 药品、耗材、诊疗、挂号 */
|
||||
private Integer itemCategoryEnum;
|
||||
|
||||
/** 药品ID、耗材ID、诊疗ID、挂号ID */
|
||||
private Long itemId;
|
||||
|
||||
/** 原进货价 */
|
||||
private BigDecimal originBuyingPrice;
|
||||
|
||||
/** 原新价格 */
|
||||
private BigDecimal originRetailPrice;
|
||||
|
||||
/** 审批人ID */
|
||||
private Long approverId;
|
||||
|
||||
/** 审批时间 */
|
||||
private Date approvalTime;
|
||||
|
||||
/** 删除标识 默认 0 未删除 */
|
||||
private String deleteFlag;
|
||||
|
||||
/** 当前品库存量 */
|
||||
private BigDecimal itemQuantity;
|
||||
|
||||
/** 零售价盈负差*/
|
||||
private BigDecimal differenceRetailPrice;
|
||||
/**进货价盈负差*/
|
||||
private BigDecimal differenceBuyingPrice;
|
||||
|
||||
/** 当前业务批次号 */
|
||||
private String busNo;
|
||||
|
||||
/** 改价原因 */
|
||||
private String description;
|
||||
|
||||
/** 改价申请时间 */
|
||||
private Date applicantTime;
|
||||
|
||||
/** 业务表名药品、耗材、诊疗、挂号 */
|
||||
private String itemTable;
|
||||
|
||||
/** 新进货价 */
|
||||
private BigDecimal newBuyingPrice;
|
||||
|
||||
/** 新零售价 */
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
/** 物品计量单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 审批状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 批次号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 条件理由 */
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -154,4 +154,10 @@ public class ChargeItem extends HisBaseEntity {
|
||||
|
||||
/** 执行id */
|
||||
private Long procedureId;
|
||||
|
||||
/** 发放所在表 */
|
||||
private String dispenseTable;
|
||||
|
||||
/** 发放ID */
|
||||
private Long dispenseId;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -27,6 +28,11 @@ public class HealthcareService extends HisBaseEntity {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
/** 活动标记 */
|
||||
private Integer activeFlag;
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 公费医疗学生名单管理表Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("adm_patient_student")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PatientStudent extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 姓名 */
|
||||
private String name;
|
||||
|
||||
/** 拼音码 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔码 */
|
||||
private String wbStr;
|
||||
|
||||
/** 性别 */
|
||||
private Integer gender;
|
||||
|
||||
/** 年龄 */
|
||||
private Integer age;
|
||||
|
||||
/** 学号 */
|
||||
private String studentId;
|
||||
|
||||
/** 身份证号 */
|
||||
private String idNumber;
|
||||
|
||||
/** 电话 */
|
||||
private String phone;
|
||||
|
||||
/** 学院 */
|
||||
private String college;
|
||||
|
||||
/** 专业 */
|
||||
private String major;
|
||||
|
||||
/** 学历层次(0预科生1本科生2硕士研究生3博士研究生) */
|
||||
private Integer educationLevel;
|
||||
|
||||
/** 入校时间 */
|
||||
private Date enrollmentDate;
|
||||
|
||||
/** 离校时间 */
|
||||
private Date graduationDate;
|
||||
|
||||
/** 年级 */
|
||||
private String grade;
|
||||
|
||||
/** 学习形式(1全日制2非全日制) */
|
||||
private Integer studyMode;
|
||||
|
||||
/** 在校状态(0在校1休学2离校) */
|
||||
private Integer studentStatus;
|
||||
|
||||
/** 体检结果(0未体检1体检不合格2体检合格) */
|
||||
private Integer physicalExamResult;
|
||||
|
||||
/** 辅导员 */
|
||||
private String counselor;
|
||||
|
||||
/** 辅导员电话 */
|
||||
private String counselorPhone;
|
||||
|
||||
/** 患者ID */
|
||||
private Long patientId;
|
||||
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -90,7 +88,7 @@ public class Practitioner extends HisBaseEntity {
|
||||
private Long userId;
|
||||
|
||||
/** 医生职称 */
|
||||
private String drProfttlCode ;
|
||||
private String drProfttlCode;
|
||||
|
||||
/** 证件类型 */
|
||||
private String prscDrCertCode;
|
||||
@@ -103,4 +101,7 @@ public class Practitioner extends HisBaseEntity {
|
||||
|
||||
/** 签名图片 */
|
||||
private String signature;
|
||||
|
||||
/** pos机编号 */
|
||||
private String posNo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePricePageDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/31 17:35
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class ChangePriceDataDto {
|
||||
|
||||
/** 批次号 */
|
||||
private String originLotNumber;
|
||||
|
||||
/** 改价申请人id */
|
||||
private Long applicantId;
|
||||
|
||||
/** 目标枚举 药品、耗材、诊疗、挂号 */
|
||||
private Integer itemCategoryEnum;
|
||||
private String itemCategoryEnum_Text;
|
||||
|
||||
/** 药品ID、耗材ID、诊疗ID、挂号ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long itemId;
|
||||
/**
|
||||
* 获取名称
|
||||
*/
|
||||
private String itemName;
|
||||
/** 原进货价 */
|
||||
private BigDecimal originBuyingPrice;
|
||||
|
||||
/** 原零售价价格 */
|
||||
private BigDecimal originRetailPrice;
|
||||
|
||||
/** 当前品库存量 */
|
||||
private BigDecimal itemQuantity;
|
||||
|
||||
/** 当前业务批次号 */
|
||||
private String busNo;
|
||||
|
||||
/** 改价申请时间 */
|
||||
private Date applicantTime;
|
||||
|
||||
/** 新进货价 */
|
||||
private BigDecimal newBuyingPrice;
|
||||
|
||||
/** 新零售价 */
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
/** 物品计量单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 审批状态 */
|
||||
private Integer statusEnum;
|
||||
private Integer statusEnum_Text;
|
||||
|
||||
/** 批次号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 条件理由 */
|
||||
private String reason;
|
||||
|
||||
/** 零售价盈负差*/
|
||||
private BigDecimal differenceRetailPrice;
|
||||
/**进货价盈负差*/
|
||||
private BigDecimal differenceBuyingPrice;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 价格主表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long chargeId;
|
||||
/**
|
||||
* 调价表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long changePriceRecordId;
|
||||
|
||||
private String label;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String totalVolume;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @ClassName ChargeItemDefDetailPriceDto
|
||||
* @Description 获取 药品或耗材 进货价和零售价的DTO
|
||||
* @Author raymond
|
||||
* @Date 2025/11/1 21:40
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class ChargeItemDefDetailPriceDto {
|
||||
/**
|
||||
* 进货价或者零售价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 拆零比
|
||||
*/
|
||||
private BigDecimal partPercent;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName EncounterDataDto
|
||||
* @Description
|
||||
* @Author raymond
|
||||
* @Date 2025/10/27 16:01
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class EncounterDataDto {
|
||||
/**
|
||||
* 换着ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
/**
|
||||
* 就诊表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName EncounterLocationDataDto
|
||||
* @Description
|
||||
* @Author raymond
|
||||
* @Date 2025/10/27 16:01
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class EncounterLocationDataDto {
|
||||
/**
|
||||
* 区域ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
/**
|
||||
* 就诊表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName HealcareDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/18 14:59
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class HealthcareDto {
|
||||
|
||||
private Long itemId;
|
||||
/**
|
||||
* 科室id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
private String categoryCode;
|
||||
/**
|
||||
* 服务类型
|
||||
*/
|
||||
private String typeCode;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName roleDataList
|
||||
* @Description 权限集合
|
||||
* @Author raymond
|
||||
* @Date 2025/10/27 16:01
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class LocationDataDto {
|
||||
/**
|
||||
* 区域ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
/**
|
||||
* 模式编码
|
||||
*/
|
||||
private Integer modeEnum;
|
||||
/**
|
||||
* 操作状态
|
||||
*/
|
||||
private Integer operationalEnum;
|
||||
/**
|
||||
* 岗位类型
|
||||
*/
|
||||
private String busNo;
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 患者详细信息
|
||||
*/
|
||||
private List<PatientBedInfoDto> patientBedInfoDtoList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName OrgDataDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/22 09:44
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class OrgDataDto {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 挂号集合
|
||||
*/
|
||||
private List<AdjustPriceMedListDto> healthDataList;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName PatientBedInfoDto
|
||||
* @Description 患者详细信息
|
||||
* @Author raymond
|
||||
* @Date 2025/10/30 08:10
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class PatientBedInfoDto {
|
||||
|
||||
/**
|
||||
* 床位
|
||||
*/
|
||||
private String bedName;
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String patientName;
|
||||
/**
|
||||
* 患者编号ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
/**
|
||||
* 患者性别
|
||||
*/
|
||||
private String patientGenderText;
|
||||
/**
|
||||
* 患者编号
|
||||
*/
|
||||
private String patientNumber;
|
||||
/**
|
||||
* 就诊号ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
/**
|
||||
* 床位ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long bedLocationId;
|
||||
/** 生日 */
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date birthDate;
|
||||
private String patientAgeText;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName EncounterDataDto
|
||||
* @Description
|
||||
* @Author raymond
|
||||
* @Date 2025/10/27 16:01
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class PatientDataDto {
|
||||
/**
|
||||
* 换着ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
private String patientName;
|
||||
private Integer gender;
|
||||
private String idCard;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName roleDataList
|
||||
* @Description 权限集合
|
||||
* @Author raymond
|
||||
* @Date 2025/10/27 16:01
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class RoleDataDto {
|
||||
/**
|
||||
* 权限表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long roleId;
|
||||
/**
|
||||
* 科室ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
/**
|
||||
* 区域ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
/**
|
||||
* 专业编码枚举
|
||||
*/
|
||||
private Integer specialtyEnum;
|
||||
/**
|
||||
* 岗位类型
|
||||
*/
|
||||
private String typeCode;
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.dto.ChangePriceDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.ChangePriceRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 修改价格记录Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Repository
|
||||
public interface ChangePriceRecordMapper extends BaseMapper<ChangePriceRecord> {
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:34 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:33 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:32 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:31 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 审批单 审核中的数据
|
||||
* @param busNo
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 10:36 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchChangePriceRecordDataByBusNo(@Param("busNo") String busNo,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据编号分组查询 数据
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 09:39 2025/11/5
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceRecord> searchChangePriceDataGroupByBusNo(@Param("busNo") String busNo);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用定价管理子Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ChargeItemDefDetailAppMapper extends BaseMapper<ChargeItemDefDetail> {
|
||||
|
||||
/**
|
||||
* Desc: 根据 参数加载数据
|
||||
* @param value
|
||||
* @param code
|
||||
* @Author raymond
|
||||
* @Date 08:13 2025/10/29
|
||||
* @return java.util.List<com.openhis.administration.domain.ChargeItemDefDetail>
|
||||
**/
|
||||
List<ChargeItemDefDetail> searchChargeDetailDataByBusNo(@Param("value") String value, @Param("code") String code);
|
||||
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.dto.ChargeItemDefDetailPriceDto;
|
||||
|
||||
/**
|
||||
* 费用定价管理Mapper接口
|
||||
@@ -13,5 +15,40 @@ import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
*/
|
||||
@Repository
|
||||
public interface ChargeItemDefinitionMapper extends BaseMapper<ChargeItemDefinition> {
|
||||
/**
|
||||
* Desc: 根据 conditionCode 和 药品ID 获取 原价和零售价
|
||||
*
|
||||
* @param conditionCode
|
||||
* @param instanceId
|
||||
* @Author raymond
|
||||
* @Date 21:44 2025/11/1
|
||||
* @return com.openhis.administration.domain.ChargeItemDefinition
|
||||
**/
|
||||
ChargeItemDefDetailPriceDto getMedPriceByParam(@Param("conditionCode") String conditionCode,
|
||||
@Param("instanceId") Long instanceId);
|
||||
|
||||
/**
|
||||
* Desc: 根据 conditionCode 和 耗材ID 获取 原价和零售价
|
||||
*
|
||||
* @param conditionCode
|
||||
* @param instanceId
|
||||
* @Author raymond
|
||||
* @Date 07:23 2025/11/4
|
||||
* @return com.openhis.administration.dto.ChargeItemDefDetailPriceDto
|
||||
**/
|
||||
ChargeItemDefDetailPriceDto getDevicePriceByParam(@Param("conditionCode") String conditionCode,
|
||||
@Param("instanceId") Long instanceId);
|
||||
|
||||
/**
|
||||
* Desc: 根据 状态和货品ID 加载诊疗或挂号的最新零售价
|
||||
*
|
||||
* @param statusEnum
|
||||
* @param instanceId
|
||||
* @Author raymond
|
||||
* @Date 22:02 2025/11/1
|
||||
* @return com.openhis.administration.dto.ChargeItemDefDetailPriceDto
|
||||
**/
|
||||
ChargeItemDefDetailPriceDto getProductPrice(@Param("statusEnum") Integer statusEnum,
|
||||
@Param("instanceId") Long instanceId);
|
||||
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 器材定义管理Mapper接口
|
||||
*
|
||||
@@ -13,5 +17,13 @@ import com.openhis.administration.domain.DeviceDefinition;
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceDefinitionMapper extends BaseMapper<DeviceDefinition> {
|
||||
/** 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
* Desc:
|
||||
* @param keyWord
|
||||
* @Author raymond
|
||||
* @Date 20:23 2025/10/21
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
List<AdjustPriceMedListDto> searchDeviceListByKeyWord(@Param("keyWord") String keyWord);
|
||||
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.EncounterLocation;
|
||||
import com.openhis.administration.dto.PatientBedInfoDto;
|
||||
|
||||
/**
|
||||
* 就诊位置管理Mapper接口
|
||||
@@ -14,4 +16,17 @@ import com.openhis.administration.domain.EncounterLocation;
|
||||
@Repository
|
||||
public interface EncounterLocationMapper extends BaseMapper<EncounterLocation> {
|
||||
|
||||
/**
|
||||
* Desc: 根据区域ID查询所有 就诊信息
|
||||
*
|
||||
* @param locationId
|
||||
* @param statusEnum
|
||||
* @param formEnum
|
||||
* @Author raymond
|
||||
* @Date 12:20 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.EncounterDataDto>
|
||||
**/
|
||||
PatientBedInfoDto searchEncounterDataByLocationId(@Param("locationId") Long locationId,
|
||||
@Param("statusEnum") Integer statusEnum,@Param("formEnum") Integer formEnum);
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Repository;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.Encounter;
|
||||
import com.openhis.administration.dto.EncounterAccountDto;
|
||||
import com.openhis.administration.dto.EncounterDataDto;
|
||||
|
||||
/**
|
||||
* 就诊管理Mapper接口
|
||||
@@ -28,4 +29,26 @@ public interface EncounterMapper extends BaseMapper<Encounter> {
|
||||
*/
|
||||
List<EncounterAccountDto> getEncounterInfoByTime(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate);
|
||||
/**
|
||||
* Desc: 根据条件查询 encounter 数据
|
||||
* @param imp
|
||||
* @param amb
|
||||
* @param encounterStatus
|
||||
* @param encounterIds
|
||||
* @Author raymond
|
||||
* @Date 12:36 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.EncounterDataDto>
|
||||
**/
|
||||
List<EncounterDataDto> searchEncounterDataByIds(@Param("imp") Integer imp, @Param("amb") Integer amb,
|
||||
@Param("encounterStatus") Long encounterStatus, @Param("encounterIds") List<Long> encounterIds);
|
||||
/**
|
||||
* Desc: 根据参数加载 患者记录信息
|
||||
* @param classEnum
|
||||
* @param encounterId
|
||||
* @Author raymond
|
||||
* @Date 12:34 2025/11/3
|
||||
* @return com.openhis.administration.dto.EncounterDataDto
|
||||
**/
|
||||
EncounterDataDto getPatientIdByParam(@Param("classEnum") Integer classEnum,
|
||||
@Param("encounterId") Long encounterId);
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.dto.HealthcareDto;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
|
||||
/**
|
||||
* 服务项目管理Mapper接口
|
||||
@@ -13,5 +18,22 @@ import com.openhis.administration.domain.HealthcareService;
|
||||
*/
|
||||
@Repository
|
||||
public interface HealthcareServiceMapper extends BaseMapper<HealthcareService> {
|
||||
/**
|
||||
* Desc: 根据 项目id数组 加载 挂号数据集合
|
||||
*
|
||||
* @param itemIds
|
||||
* @Author raymond
|
||||
* @Date 15:36 2025/10/18
|
||||
* @return java.util.List<com.openhis.administration.dto.HealthcareDto>
|
||||
**/
|
||||
List<HealthcareDto> searchHealthByIds(@Param("itemIds") List<Long> itemIds);
|
||||
/**
|
||||
* Desc: 查询所有 挂号数据
|
||||
* @param orgId
|
||||
* @Author raymond
|
||||
* @Date 08:32 2025/10/22
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
List<AdjustPriceMedListDto> searchAllHeathData(@Param("orgId") Long orgId,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.dto.LocationDataDto;
|
||||
import com.openhis.administration.dto.PatientBedInfoDto;
|
||||
|
||||
/**
|
||||
* 位置管理Mapper接口
|
||||
@@ -13,5 +18,22 @@ import com.openhis.administration.domain.Location;
|
||||
*/
|
||||
@Repository
|
||||
public interface LocationMapper extends BaseMapper<Location> {
|
||||
/**
|
||||
* Desc: 根据区域id数组查询 区域表
|
||||
* @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);
|
||||
/**
|
||||
* 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);
|
||||
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.dto.OrgDataDto;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机构管理Mapper接口
|
||||
*
|
||||
@@ -13,5 +16,13 @@ import com.openhis.administration.domain.Organization;
|
||||
*/
|
||||
@Repository
|
||||
public interface OrganizationMapper extends BaseMapper<Organization> {
|
||||
/**
|
||||
* Desc:
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/10/22
|
||||
* @return List<OrgDataDto>
|
||||
**/
|
||||
List<OrgDataDto> searchOrgDataByHealth();
|
||||
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.dto.PatientDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 患者管理Mapper接口
|
||||
*
|
||||
@@ -13,5 +17,14 @@ import com.openhis.administration.domain.Patient;
|
||||
*/
|
||||
@Repository
|
||||
public interface PatientMapper extends BaseMapper<Patient> {
|
||||
/**
|
||||
* Desc: 根据属性查询用户信息
|
||||
* @param patientId
|
||||
* @param activeFlag
|
||||
* @Author raymond
|
||||
* @Date 12:53 2025/10/28
|
||||
* @return java.util.List<com.openhis.administration.dto.PatientDataDto>
|
||||
**/
|
||||
List<PatientDataDto> searchPatientDataByPatientId(@Param("patientId") Long patientId,@Param("activeFlag") Integer activeFlag);
|
||||
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.PatientStudent;
|
||||
|
||||
/**
|
||||
* 费用定价管理子Mapper接口
|
||||
* 公费医疗学生名单管理表Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ChargeItemDefAppMapper extends BaseMapper<ChargeItemDefDetail> {
|
||||
public interface PatientStudentMapper extends BaseMapper<PatientStudent> {
|
||||
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.PractitionerRole;
|
||||
import com.openhis.administration.dto.RoleDataDto;
|
||||
|
||||
/**
|
||||
* 岗位管理Mapper接口
|
||||
@@ -13,5 +17,31 @@ import com.openhis.administration.domain.PractitionerRole;
|
||||
*/
|
||||
@Repository
|
||||
public interface PractitionerRoleMapper extends BaseMapper<PractitionerRole> {
|
||||
/**
|
||||
* Desc: 根据员工ID 查询
|
||||
* @param practitionerId
|
||||
* @param roleCode
|
||||
* @Author raymond
|
||||
* @Date 16:43 2025/10/27
|
||||
* @return java.util.List<com.openhis.administration.dto.RoleDataDto>
|
||||
**/
|
||||
List<RoleDataDto> searchPractitionerRoleByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("roleCode") String roleCode);
|
||||
/**
|
||||
* Desc: 根据员工ID数组 查询
|
||||
* @param practitionerIds
|
||||
* @Author raymond
|
||||
* @Date 16:49 2025/10/27
|
||||
* @return java.util.List<com.openhis.administration.dto.RoleDataDto>
|
||||
**/
|
||||
List<RoleDataDto> searchPractitionerRoleByPractitionerIds(@Param("practitionerIds") Long practitionerIds);
|
||||
/**
|
||||
* Desc: 根据员工ID 查询 locationId数组
|
||||
* @param practitionerId
|
||||
* @param roleCode
|
||||
* @Author raymond
|
||||
* @Date 16:50 2025/10/27
|
||||
* @return java.util.List<java.lang.Long>
|
||||
**/
|
||||
List<Long> searchPractitionerRoleLocationIds(@Param("practitionerId") Long practitionerId,@Param("roleCode") String roleCode);
|
||||
|
||||
}
|
||||
@@ -84,4 +84,19 @@ public interface IAccountService extends IService<Account> {
|
||||
*/
|
||||
List<Account> getAccountListByEncounter(Long encounterId);
|
||||
|
||||
/**
|
||||
* 学生医保转学生自费
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 账户id
|
||||
*/
|
||||
Long getStudentSelfAccount(Long encounterId);
|
||||
|
||||
/**
|
||||
* 学生自费转学生医保
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 账户id
|
||||
*/
|
||||
Long getStudentYbAccount(Long encounterId);
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.ChangePriceRecord;
|
||||
import com.openhis.administration.dto.ChangePriceDataDto;
|
||||
|
||||
/**
|
||||
* 修改价格记录Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
public interface IChangePriceRecordService extends IService<ChangePriceRecord> {
|
||||
/**
|
||||
* Desc: 根据单据号 进行提交审核操作
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 23:08 2025/11/1
|
||||
* @return boolean
|
||||
**/
|
||||
boolean submitApproval(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据单据号 查询列表
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 08:44 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceRecord> searchChangePriceDataForBusNo(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
*
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByBusNo(String busNo, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
*
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:34 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
*
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByBusNo(String busNo, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
*
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:33 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
*
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByBusNo(String busNo, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
*
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:32 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
*
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByBusNo(String busNo, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
*
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:31 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 审核通过操作
|
||||
*
|
||||
* @param busNo
|
||||
* @param now
|
||||
* @Author raymond
|
||||
* @Date 10:13 2025/11/2
|
||||
* @return void
|
||||
**/
|
||||
void agreeRequest(String busNo, Date now);
|
||||
|
||||
/**
|
||||
* Desc: 审核驳回操作
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 18:43 2025/11/3
|
||||
* @return boolean
|
||||
**/
|
||||
boolean rejectRequest(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 审批单 审核中的数据
|
||||
*
|
||||
* @param busNo
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 10:36 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchChangePriceRecordDataByBusNo(String busNo, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据编号分组查询 数据
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 09:39 2025/11/5
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceRecord> searchChangePriceDataGroupByBusNo(String busNo);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
|
||||
@@ -34,4 +36,33 @@ public interface IChargeItemDefDetailService extends IService<ChargeItemDefDetai
|
||||
* @return 新增结果
|
||||
*/
|
||||
boolean deleteChargeItemDefApp(Long id);
|
||||
|
||||
/**
|
||||
* Desc: 根据主表ID 数组加载 价格子表
|
||||
*
|
||||
* @param chargeItemId
|
||||
* @Author raymond
|
||||
* @Date 22:56 2025/10/18
|
||||
* @return java.util.List<com.openhis.administration.domain.ChargeItemDefDetail>
|
||||
**/
|
||||
List<ChargeItemDefDetail> searchChargeItemDefDetailByIds(Long chargeItemId,String code,String lotNumber);
|
||||
|
||||
/**
|
||||
* Desc: 根据 参数加载数据
|
||||
*
|
||||
* @param value
|
||||
* @param code
|
||||
* @Author raymond
|
||||
* @Date 08:13 2025/10/29
|
||||
* @return java.util.List<com.openhis.administration.domain.ChargeItemDefDetail>
|
||||
**/
|
||||
List<ChargeItemDefDetail> searchChargeDetailDataByBusNo(String value, String code);
|
||||
|
||||
/**
|
||||
* 根据定价id查询批号售价
|
||||
*
|
||||
* @param chargeItemDefIdList 定价ids
|
||||
* @return 批号售价信息
|
||||
*/
|
||||
List<ChargeItemDefDetail> getLotNumberPriceByDefIds(List<Long> chargeItemDefIdList);
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.dto.ChargeItemDefDetailPriceDto;
|
||||
|
||||
/**
|
||||
* 费用定价管理Service接口
|
||||
@@ -68,4 +70,59 @@ public interface IChargeItemDefinitionService extends IService<ChargeItemDefinit
|
||||
void addChargeItemDefinitionAndDetail(String chargeName, String typeCode, String ybCode, String unitCode,
|
||||
BigDecimal purchasePrice, BigDecimal retailPrice, BigDecimal maximumRetailPrice, Long orgId,
|
||||
String instanceTable, Long instanceId);
|
||||
|
||||
/**
|
||||
* Desc: 根据 货品ID集合查询 价格主表 集合
|
||||
*
|
||||
* @param itemIds
|
||||
* @Author raymond
|
||||
* @Date 22:39 2025/10/18
|
||||
* @return java.util.List<com.openhis.administration.domain.ChargeItemDefinition>
|
||||
**/
|
||||
List<ChargeItemDefinition> searchChargeItemDefinitionByMedIds(List<Long> itemIds);
|
||||
|
||||
/**
|
||||
* Desc: 根据参数加载对象
|
||||
*
|
||||
* @param instanceId
|
||||
* @param instanceTable
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 11:15 2025/10/30
|
||||
* @return com.openhis.administration.domain.ChargeItemDefinition
|
||||
**/
|
||||
ChargeItemDefinition getChargeItemDefinitionEntity(Long instanceId, String instanceTable, Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据 conditionCode 和 货品ID 获取 原价和零售价
|
||||
*
|
||||
* @param conditionCode
|
||||
* @param instanceId
|
||||
* @Author raymond
|
||||
* @Date 21:44 2025/11/1
|
||||
* @return com.openhis.administration.domain.ChargeItemDefinition
|
||||
**/
|
||||
ChargeItemDefDetailPriceDto getMedPriceByParam(String conditionCode, Long instanceId);
|
||||
|
||||
/**
|
||||
* Desc: 根据 conditionCode 和 耗材ID 获取 原价和零售价
|
||||
*
|
||||
* @param conditionCode
|
||||
* @param instanceId
|
||||
* @Author raymond
|
||||
* @Date 07:23 2025/11/4
|
||||
* @return com.openhis.administration.dto.ChargeItemDefDetailPriceDto
|
||||
**/
|
||||
ChargeItemDefDetailPriceDto getDevicePriceByParam(String conditionCode, Long instanceId);
|
||||
|
||||
/**
|
||||
* Desc: 根据 状态和货品ID 加载诊疗或挂号的最新零售价
|
||||
*
|
||||
* @param statusEnum
|
||||
* @param instanceId
|
||||
* @Author raymond
|
||||
* @Date 22:02 2025/11/1
|
||||
* @return com.openhis.administration.dto.ChargeItemDefDetailPriceDto
|
||||
**/
|
||||
ChargeItemDefDetailPriceDto getProductPrice(Integer statusEnum, Long instanceId);
|
||||
}
|
||||
@@ -101,6 +101,14 @@ public interface IChargeItemService extends IService<ChargeItem> {
|
||||
*/
|
||||
List<ChargeItemDefInfo> getChargeItemDefInfoByIds(List<Long> chargeItemIds);
|
||||
|
||||
/**
|
||||
* 收费项关联Def项目集合(带组套)
|
||||
*
|
||||
* @param chargeItemIds 集合
|
||||
* @return 集合
|
||||
*/
|
||||
List<ChargeItemDefInfo> getChargeItemDefInfoByIdList(List<Long> chargeItemIds);
|
||||
|
||||
/**
|
||||
* 根据执行id查询收费项目信息
|
||||
*
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
|
||||
/**
|
||||
* 器材定义管理Service接口
|
||||
@@ -26,4 +29,13 @@ public interface IDeviceDefinitionService extends IService<DeviceDefinition> {
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDevice(DeviceDefinition deviceDefinition);
|
||||
|
||||
/** 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
* Desc:
|
||||
* @param keyWord
|
||||
* @Author raymond
|
||||
* @Date 20:23 2025/10/21
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
List<AdjustPriceMedListDto> searchDeviceListByKeyWord(String keyWord);
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Encounter;
|
||||
import com.openhis.administration.dto.EncounterAccountDto;
|
||||
import com.openhis.administration.dto.EncounterDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 就诊管理Service接口
|
||||
@@ -69,4 +71,14 @@ public interface IEncounterService extends IService<Encounter> {
|
||||
* @return 集合
|
||||
*/
|
||||
List<EncounterAccountDto> getEncounterInfoByTime(Date startDate, Date endDate);
|
||||
|
||||
/**
|
||||
* Desc: 根据参数加载 患者记录信息
|
||||
* @param classEnum
|
||||
* @param encounterId
|
||||
* @Author raymond
|
||||
* @Date 12:34 2025/11/3
|
||||
* @return com.openhis.administration.dto.EncounterDataDto
|
||||
**/
|
||||
EncounterDataDto getPatientIdByParam(Integer classEnum,Long encounterId);
|
||||
}
|
||||
@@ -2,6 +2,12 @@ package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.dto.HealthcareDto;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务项目管理Service接口
|
||||
@@ -24,5 +30,23 @@ public interface IHealthcareServiceService extends IService<HealthcareService> {
|
||||
* @return 编辑结果
|
||||
*/
|
||||
boolean updateHealthcareService(HealthcareService healthcareService);
|
||||
/**
|
||||
* Desc: 根据 项目id数组 加载 挂号数据集合
|
||||
* @param itemIds
|
||||
* @Author raymond
|
||||
* @Date 15:36 2025/10/18
|
||||
* @return java.util.List<com.openhis.administration.dto.HealthcareDto>
|
||||
**/
|
||||
List<HealthcareDto> searchHealthByIds(@Param("itemIds") List<Long> itemIds);
|
||||
|
||||
/**
|
||||
* Desc: 查询所有 挂号数据
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 08:32 2025/10/22
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
List<AdjustPriceMedListDto> searchAllHeathData(Long orgId,Integer statusEnum);
|
||||
|
||||
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.dto.LocationDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 位置管理Service接口
|
||||
@@ -99,4 +101,13 @@ public interface ILocationService extends IService<Location> {
|
||||
*/
|
||||
boolean updateStatusById(Long id, Integer status);
|
||||
|
||||
/**
|
||||
* Desc: 根据区域id数组查询 区域表
|
||||
* @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);
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.openhis.administration.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Service接口
|
||||
*
|
||||
@@ -28,4 +30,12 @@ public interface IOrganizationLocationService extends IService<OrganizationLocat
|
||||
*/
|
||||
OrganizationLocation getOrgLocByOrgIdAndActivityDefinitionId(Long activityDefinitionId);
|
||||
|
||||
/**
|
||||
* 查询诊疗的执行科室列表
|
||||
*
|
||||
* @param activityDefinitionId 诊疗定义id
|
||||
* @return 诊疗的执行科室列表
|
||||
*/
|
||||
List<OrganizationLocation> getOrgLocListByOrgIdAndActivityDefinitionId(Long activityDefinitionId);
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.dto.OrgDataDto;
|
||||
|
||||
/**
|
||||
* 机构管理Service接口
|
||||
@@ -45,4 +46,13 @@ public interface IOrganizationService extends IService<Organization> {
|
||||
* @return 科室集合
|
||||
*/
|
||||
List<Organization> getOrganizationListById(List<Long> collect);
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/10/22
|
||||
* @return List<OrgDataDto>
|
||||
**/
|
||||
List<OrgDataDto> searchOrgDataByHealth();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.PatientStudent;
|
||||
|
||||
/**
|
||||
* 公费医疗学生名单管理表Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IPatientStudentService extends IService<PatientStudent> {
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.openhis.administration.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Practitioner;
|
||||
import com.openhis.administration.domain.PractitionerRole;
|
||||
import com.openhis.administration.dto.RoleDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -54,4 +56,31 @@ public interface IPractitionerRoleService extends IService<PractitionerRole> {
|
||||
*/
|
||||
List<PractitionerRole> getNurseList(Long orgId);
|
||||
|
||||
/**
|
||||
* Desc: 根据员工ID 查询
|
||||
* @param practitionerId
|
||||
* @param roleCode
|
||||
* @Author raymond
|
||||
* @Date 16:43 2025/10/27
|
||||
* @return java.util.List<com.openhis.administration.dto.RoleDataDto>
|
||||
**/
|
||||
List<RoleDataDto> searchPractitionerRoleByPractitionerId(@Param("practitionerId") Long practitionerId, @Param("roleCode") String roleCode);
|
||||
/**
|
||||
* Desc: 根据员工ID数组 查询
|
||||
* @param practitionerIds
|
||||
* @Author raymond
|
||||
* @Date 16:49 2025/10/27
|
||||
* @return java.util.List<com.openhis.administration.dto.RoleDataDto>
|
||||
**/
|
||||
List<RoleDataDto> searchPractitionerRoleByPractitionerIds(@Param("practitionerIds") Long practitionerIds);
|
||||
/**
|
||||
* Desc: 根据员工ID 查询 locationId数组
|
||||
* @param practitionerId
|
||||
* @param roleCode
|
||||
* @Author raymond
|
||||
* @Date 16:50 2025/10/27
|
||||
* @return java.util.List<java.lang.Long>
|
||||
**/
|
||||
List<Long> searchPractitionerRoleLocationIds(@Param("practitionerId") Long practitionerId,@Param("roleCode") String roleCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
.in(Account::getTypeCode, AccountType.MEDICAL_ELECTRONIC_CERTIFICATE.getCode(),
|
||||
AccountType.ID_CARD.getCode(), AccountType.SOCIAL_SECURITY_CARD.getCode())
|
||||
.ne(Account::getContractNo, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)
|
||||
.ne(Account::getContractNo, CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO)
|
||||
.last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (account != null) {
|
||||
return account.getId();
|
||||
@@ -163,4 +164,47 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
public List<Account> getAccountListByEncounter(Long encounterId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Account>().eq(Account::getEncounterId, encounterId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生医保转学生自费
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 账户id
|
||||
*/
|
||||
@Override
|
||||
public Long getStudentSelfAccount(Long encounterId) {
|
||||
Account account = baseMapper
|
||||
.selectOne(new LambdaQueryWrapper<Account>().select(Account::getId).eq(Account::getEncounterId, encounterId)
|
||||
.in(Account::getTypeCode, AccountType.MEDICAL_ELECTRONIC_CERTIFICATE.getCode(),
|
||||
AccountType.ID_CARD.getCode(), AccountType.SOCIAL_SECURITY_CARD.getCode())
|
||||
.ne(Account::getContractNo, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)
|
||||
.eq(Account::getContractNo, CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO)
|
||||
.last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (account != null) {
|
||||
return account.getId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生自费转学生医保
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 账户id
|
||||
*/
|
||||
@Override
|
||||
public Long getStudentYbAccount(Long encounterId) {
|
||||
Account account = baseMapper
|
||||
.selectOne(new LambdaQueryWrapper<Account>().select(Account::getId).eq(Account::getEncounterId, encounterId)
|
||||
.in(Account::getTypeCode, AccountType.MEDICAL_ELECTRONIC_CERTIFICATE.getCode(),
|
||||
AccountType.ID_CARD.getCode(), AccountType.SOCIAL_SECURITY_CARD.getCode())
|
||||
.ne(Account::getContractNo, CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)
|
||||
.ne(Account::getContractNo, CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO)
|
||||
.like(Account::getContractNo, CommonConstants.BusinessName.CONTRACT_STUDENT)
|
||||
.last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (account != null) {
|
||||
return account.getId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.workflow.domain.SupplyRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.system.mapper.SysDictDataMapper;
|
||||
import com.openhis.administration.domain.ChangePriceRecord;
|
||||
import com.openhis.administration.dto.ChangePriceDataDto;
|
||||
import com.openhis.administration.mapper.ChangePriceRecordMapper;
|
||||
import com.openhis.administration.service.IChangePriceRecordService;
|
||||
import com.openhis.common.enums.SupplyStatus;
|
||||
|
||||
/**
|
||||
* 修改价格记录Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class ChangePriceRecordServiceImpl extends ServiceImpl<ChangePriceRecordMapper, ChangePriceRecord>
|
||||
implements IChangePriceRecordService {
|
||||
|
||||
@Resource
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
@Override
|
||||
public boolean submitApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ChangePriceRecord>().eq(ChangePriceRecord::getBusNo, busNo)
|
||||
.set(ChangePriceRecord::getApplicantTime, DateUtils.getNowDate())
|
||||
.set(ChangePriceRecord::getStatusEnum, SupplyStatus.APPROVAL.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceRecord> searchChangePriceDataForBusNo(String busNo) {
|
||||
return this.baseMapper.selectList(new LambdaUpdateWrapper<ChangePriceRecord>().eq(ChangePriceRecord::getBusNo,busNo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchMedChangePriceByBusNo(String busNo, Integer categoryEnum,Integer statusEnum) {
|
||||
return this.baseMapper.searchMedChangePriceByBusNo(busNo, categoryEnum,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchMedChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum) {
|
||||
return this.baseMapper.searchMedChangePriceByItemId(itemId,categoryEnum,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchDeviceChangePriceByBusNo(String busNo, Integer categoryEnum,Integer statusEnum) {
|
||||
return this.baseMapper.searchDeviceChangePriceByBusNo(busNo,categoryEnum, statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchDeviceChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum) {
|
||||
return this.baseMapper.searchDeviceChangePriceByItemId(itemId,categoryEnum,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchActivityChangePriceByBusNo(String busNo, Integer categoryEnum,Integer statusEnum) {
|
||||
return this.baseMapper.searchActivityChangePriceByBusNo(busNo,categoryEnum, statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchActivityChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum) {
|
||||
return this.baseMapper.searchActivityChangePriceByItemId(itemId,categoryEnum,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchHealthChangePriceByBusNo(String busNo, Integer categoryEnum,Integer statusEnum) {
|
||||
return this.baseMapper.searchHealthChangePriceByBusNo(busNo,categoryEnum,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchHealthChangePriceByItemId(Long itemId, Integer categoryEnum, Integer statusEnum) {
|
||||
return this.baseMapper.searchHealthChangePriceByItemId(itemId,categoryEnum,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void agreeRequest(String busNo, Date now) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ChangePriceRecord>().eq(ChangePriceRecord::getBusNo, busNo)
|
||||
.set(ChangePriceRecord::getApprovalTime, now)
|
||||
.set(ChangePriceRecord::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(ChangePriceRecord::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rejectRequest(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ChangePriceRecord>().eq(ChangePriceRecord::getBusNo, busNo)
|
||||
.set(ChangePriceRecord::getApprovalTime, DateUtils.getNowDate())
|
||||
.set(ChangePriceRecord::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(ChangePriceRecord::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceDataDto> searchChangePriceRecordDataByBusNo(String busNo, Integer statusEnum) {
|
||||
return this.baseMapper.searchChangePriceRecordDataByBusNo(busNo,statusEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChangePriceRecord> searchChangePriceDataGroupByBusNo(String busNo) {
|
||||
return this.baseMapper.searchChangePriceDataGroupByBusNo(busNo);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.mapper.ChargeItemDefAppMapper;
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import com.openhis.administration.mapper.ChargeItemDefDetailAppMapper;
|
||||
import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||
import com.openhis.common.enums.ConditionCode;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
|
||||
/**
|
||||
* 费用定价管理子Service业务层处理
|
||||
@@ -14,7 +19,7 @@ import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefAppMapper, ChargeItemDefDetail>
|
||||
public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefDetailAppMapper, ChargeItemDefDetail>
|
||||
implements IChargeItemDefDetailService {
|
||||
|
||||
/**
|
||||
@@ -31,7 +36,7 @@ public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefApp
|
||||
if (baseMapper.selectById(chargeItemDefDetail.getId()) == null) {
|
||||
return false;
|
||||
} else {
|
||||
//todo deleteFlag=1
|
||||
// todo deleteFlag=1
|
||||
return baseMapper.updateById(chargeItemDefDetail) > 0;
|
||||
}
|
||||
} else {
|
||||
@@ -69,4 +74,33 @@ public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefApp
|
||||
return baseMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (lotNumber != null) {
|
||||
queryWrapper.eq(ChargeItemDefDetail::getConditionValue, lotNumber);
|
||||
}
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChargeItemDefDetail> searchChargeDetailDataByBusNo(String value, String code) {
|
||||
return this.baseMapper.searchChargeDetailDataByBusNo(value, code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据定价id查询批号售价
|
||||
*
|
||||
* @param chargeItemDefIdList 定价ids
|
||||
* @return 批号售价信息
|
||||
*/
|
||||
@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()));
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.core.common.utils.DateUtils;
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.dto.ChargeItemDefDetailPriceDto;
|
||||
import com.openhis.administration.mapper.ChargeItemDefinitionMapper;
|
||||
import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
@@ -154,4 +155,34 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin
|
||||
chargeItemDefDetailService.saveBatch(chargeItemDefDetailList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChargeItemDefinition> searchChargeItemDefinitionByMedIds(List<Long> itemIds) {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<ChargeItemDefinition>().in(ChargeItemDefinition::getInstanceId, itemIds));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeItemDefinition getChargeItemDefinitionEntity(Long instanceId, String instanceTable,
|
||||
Integer statusEnum) {
|
||||
return baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<ChargeItemDefinition>().eq(ChargeItemDefinition::getInstanceId, instanceId)
|
||||
.eq(ChargeItemDefinition::getInstanceTable, instanceTable)
|
||||
.eq(ChargeItemDefinition::getStatusEnum, statusEnum));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeItemDefDetailPriceDto getMedPriceByParam(String conditionCode, Long instanceId) {
|
||||
return this.baseMapper.getMedPriceByParam(conditionCode, instanceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeItemDefDetailPriceDto getDevicePriceByParam(String conditionCode, Long instanceId) {
|
||||
return this.baseMapper.getDevicePriceByParam(conditionCode,instanceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeItemDefDetailPriceDto getProductPrice(Integer statusEnum, Long instanceId) {
|
||||
return this.baseMapper.getProductPrice(statusEnum, instanceId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,15 +4,22 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
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.core.common.exception.ServiceException;
|
||||
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;
|
||||
import com.openhis.administration.mapper.ChargeItemDefinitionMapper;
|
||||
import com.openhis.administration.mapper.ChargeItemMapper;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
import com.openhis.common.enums.ChargeItemContext;
|
||||
@@ -31,6 +38,9 @@ import lombok.AllArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeItem> implements IChargeItemService {
|
||||
|
||||
@Autowired
|
||||
ChargeItemDefinitionMapper chargeItemDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 创建已计费的采购账单
|
||||
*
|
||||
@@ -177,6 +187,47 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
return baseMapper.getChargeItemDefInfoByIds(chargeItemIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费项关联Def项目集合(带组套)
|
||||
*
|
||||
* @param chargeItemIds 集合
|
||||
* @return 集合
|
||||
*/
|
||||
@Override
|
||||
public List<ChargeItemDefInfo> getChargeItemDefInfoByIdList(List<Long> chargeItemIds) {
|
||||
List<ChargeItemDefInfo> chargeItemDefInfos = baseMapper.getChargeItemDefInfoByIds(chargeItemIds);
|
||||
List<ChargeItemDefInfo> chargeItemDefInfoChildren = new ArrayList<>();
|
||||
ChargeItemDefInfo chargeItemDefInfo;
|
||||
for (ChargeItemDefInfo chargeItemDefInfoById : chargeItemDefInfos) {
|
||||
|
||||
if (!StringUtils.isEmpty(chargeItemDefInfoById.getChildrenJson())) {
|
||||
List<ChargeItem> childrenList =
|
||||
JSON.parseArray(chargeItemDefInfoById.getChildrenJson(), ChargeItem.class);
|
||||
for (ChargeItem chargeItem : childrenList) {
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition =
|
||||
chargeItemDefinitionMapper.selectById(chargeItem.getDefinitionId());
|
||||
|
||||
if (chargeItemDefinition == null) {
|
||||
throw new ServiceException("未查询到定价信息!提示信息:" + chargeItemDefInfoById.getChargeName() + "子项信息--"
|
||||
+ chargeItem.getDefinitionId());
|
||||
}
|
||||
chargeItemDefInfo = new ChargeItemDefInfo();
|
||||
|
||||
BeanUtils.copyProperties(chargeItem, chargeItemDefInfo);
|
||||
BeanUtils.copyProperties(chargeItemDefinition, chargeItemDefInfo);
|
||||
|
||||
chargeItemDefInfoChildren.add(chargeItemDefInfo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (!chargeItemDefInfoChildren.isEmpty()) {
|
||||
chargeItemDefInfos.addAll(chargeItemDefInfoChildren);
|
||||
}
|
||||
return chargeItemDefInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据执行id查询收费项目信息
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -47,4 +48,9 @@ public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMap
|
||||
public boolean addYbDevice(DeviceDefinition deviceDefinition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdjustPriceMedListDto> searchDeviceListByKeyWord(String keyWord) {
|
||||
return this.deviceDefinitionMapper.searchDeviceListByKeyWord(keyWord);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.openhis.administration.dto.EncounterDataDto;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -145,4 +146,9 @@ public class EncounterServiceImpl extends ServiceImpl<EncounterMapper, Encounter
|
||||
public List<EncounterAccountDto> getEncounterInfoByTime(Date startDate, Date endDate) {
|
||||
return baseMapper.getEncounterInfoByTime(startDate, endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EncounterDataDto getPatientIdByParam(Integer classEnum, Long encounterId) {
|
||||
return this.baseMapper.getPatientIdByParam(classEnum,encounterId);
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,16 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.dto.HealthcareDto;
|
||||
import com.openhis.administration.mapper.HealthcareServiceMapper;
|
||||
import com.openhis.administration.service.IHealthcareServiceService;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务项目管理Service业务层处理
|
||||
*
|
||||
@@ -14,8 +19,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class HealthcareServiceServiceImpl extends ServiceImpl<HealthcareServiceMapper, HealthcareService> implements IHealthcareServiceService {
|
||||
|
||||
private final HealthcareServiceMapper healthcareServiceMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 服务管理 新增
|
||||
@@ -45,4 +53,14 @@ public class HealthcareServiceServiceImpl extends ServiceImpl<HealthcareServiceM
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthcareDto> searchHealthByIds(List<Long> itemIds) {
|
||||
return this.healthcareServiceMapper.searchHealthByIds(itemIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdjustPriceMedListDto> searchAllHeathData(Long orgId,Integer statusEnum) {
|
||||
return this.healthcareServiceMapper.searchAllHeathData(orgId,statusEnum);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.administration.dto.LocationDataDto;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -14,6 +15,8 @@ import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
import com.openhis.common.enums.LocationStatus;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 位置管理Service业务层处理
|
||||
*
|
||||
@@ -22,6 +25,8 @@ import com.openhis.common.enums.LocationStatus;
|
||||
*/
|
||||
@Service
|
||||
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements ILocationService {
|
||||
@Resource
|
||||
private LocationMapper locationMapper;
|
||||
|
||||
/**
|
||||
* 获取药房列表
|
||||
@@ -180,4 +185,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
|
||||
return baseMapper.updateById(location) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LocationDataDto> searchLocationDataByIds(List<Long> locationIds) {
|
||||
return this.locationMapper.searchLocationDataByIds(locationIds);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -50,4 +51,16 @@ public class OrganizationLocationServiceImpl extends ServiceImpl<OrganizationLoc
|
||||
.lt(OrganizationLocation::getStartTime, time).gt(OrganizationLocation::getEndTime, time));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗的执行科室列表
|
||||
*
|
||||
* @param activityDefinitionId 诊疗定义id
|
||||
* @return 诊疗的执行科室列表
|
||||
*/
|
||||
@Override
|
||||
public List<OrganizationLocation> getOrgLocListByOrgIdAndActivityDefinitionId(Long activityDefinitionId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<OrganizationLocation>()
|
||||
.eq(OrganizationLocation::getActivityDefinitionId, activityDefinitionId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.openhis.administration.service.impl;
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.administration.domain.Practitioner;
|
||||
import com.openhis.administration.dto.OrgDataDto;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -14,6 +15,8 @@ import com.openhis.administration.mapper.OrganizationMapper;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 机构管理Service业务层处理
|
||||
*
|
||||
@@ -23,7 +26,8 @@ import com.openhis.common.enums.AccountStatus;
|
||||
@Service
|
||||
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization>
|
||||
implements IOrganizationService {
|
||||
|
||||
@Resource
|
||||
private OrganizationMapper organizationMapper;
|
||||
/**
|
||||
* 机构启用
|
||||
*
|
||||
@@ -75,4 +79,9 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Organization>().in(Organization::getId, collect)
|
||||
.eq(Organization::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrgDataDto> searchOrgDataByHealth() {
|
||||
return this.organizationMapper.searchOrgDataByHealth();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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.exception.ServiceException;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.administration.domain.PatientStudent;
|
||||
import com.openhis.administration.mapper.PatientStudentMapper;
|
||||
import com.openhis.administration.service.IPatientStudentService;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.PhysicalExamResult;
|
||||
|
||||
/**
|
||||
* 公费医疗学生名单管理表Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class PatientStudentServiceImpl extends ServiceImpl<PatientStudentMapper, PatientStudent>
|
||||
implements IPatientStudentService {
|
||||
|
||||
/**
|
||||
* 校验学生公费资格
|
||||
*
|
||||
* @param patient
|
||||
*/
|
||||
public void checkStatus(Patient patient) {
|
||||
|
||||
String idCard = patient.getIdCard();
|
||||
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()));
|
||||
|
||||
if (patientStudents == null || patientStudents.isEmpty()) {
|
||||
throw new ServiceException("该患者不是学生,请更换费用性质类型!");
|
||||
}
|
||||
|
||||
PatientStudent patientStudent = null;
|
||||
for (PatientStudent item : patientStudents) {
|
||||
if (date.after(item.getEnrollmentDate()) && date.before(item.getGraduationDate())) {
|
||||
patientStudent = item;
|
||||
}
|
||||
}
|
||||
|
||||
if (patientStudent == null) {
|
||||
throw new ServiceException("该患者公费资格未生效或已失效!!不可以享受公费");
|
||||
}
|
||||
|
||||
if (!PhysicalExamResult.EXAMINATION_PASSED.getValue().equals(patientStudent.getPhysicalExamResult())) {
|
||||
throw new ServiceException("该患者体检不合格不可以享受公费");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.openhis.administration.service.impl;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.openhis.administration.dto.RoleDataDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -113,4 +114,19 @@ public class PractitionerRoleServiceImpl extends ServiceImpl<PractitionerRoleMap
|
||||
// 身份类型是护士
|
||||
.eq(PractitionerRole::getRoleCode, PractitionerRoles.NURSE.getCode()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleDataDto> searchPractitionerRoleByPractitionerId(Long practitionerId, String roleCode) {
|
||||
return this.practitionerRoleMapper.searchPractitionerRoleByPractitionerId(practitionerId,roleCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleDataDto> searchPractitionerRoleByPractitionerIds(Long practitionerIds) {
|
||||
return this.practitionerRoleMapper.searchPractitionerRoleByPractitionerIds(practitionerIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> searchPractitionerRoleLocationIds(Long practitionerId, String roleCode) {
|
||||
return this.practitionerRoleMapper.searchPractitionerRoleLocationIds(practitionerId,roleCode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -12,7 +10,9 @@ 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;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.SupplierType;
|
||||
import com.openhis.common.enums.Whether;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -58,9 +58,10 @@ 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.ACTIVE.getValue())
|
||||
.eq(Supplier::getDeleteFlag, DelFlag.NO.getCode()).eq(Supplier::getActiveFlag, Whether.YES.getValue()));
|
||||
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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 新增国临码功能单表增删改查
|
||||
* @author ws
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_condition_no_definition")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ConditionNoDefinition extends HisBaseEntity {
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 国临编码 */
|
||||
private String glNo;
|
||||
|
||||
/** 国临name */
|
||||
private String glName;
|
||||
|
||||
/** 医保编码 */
|
||||
private String icd10No;
|
||||
|
||||
/** 医保name */
|
||||
private String icd10Name;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.Condition;
|
||||
import com.openhis.clinical.domain.ConditionNoDefinition;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 新增国临码功能单表增删改查
|
||||
* @author ws
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Repository
|
||||
public interface ConditionNoDefinitionMapper extends BaseMapper<ConditionNoDefinition> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.domain.ConditionNoDefinition;
|
||||
|
||||
/**
|
||||
* 新增国临码功能单表增删改查
|
||||
* @author ws
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
public interface IConditionNoDefinitionService extends IService<ConditionNoDefinition> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
||||
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||
import com.openhis.clinical.service.IConditionNoDefinitionService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.openhis.clinical.mapper.ConditionNoDefinitionMapper;
|
||||
import com.openhis.clinical.domain.ConditionNoDefinition;
|
||||
/**
|
||||
* 新增国临码功能单表增删改查
|
||||
* @author ws
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ConditionNoDefinitionServiceImpl extends ServiceImpl<ConditionNoDefinitionMapper, ConditionNoDefinition>
|
||||
implements IConditionNoDefinitionService {
|
||||
private final ConditionNoDefinitionMapper conditionNoDefinitionMapper;
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* 跨系统发送申请工具类
|
||||
*
|
||||
* @author GuoRui
|
||||
* @author Thanking
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@@ -128,6 +128,7 @@ public class CrossSystemSendApplyUtil {
|
||||
// 获取结果CODE
|
||||
String code = String.valueOf(object.getInnerMap().get("code"));
|
||||
if (!"100000".equals(code)) {
|
||||
log.error("LIS失败申请报文:" + s);
|
||||
throw new ServiceException("LIS申请返回失败信息:" + object);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -230,6 +231,7 @@ public class CrossSystemSendApplyUtil {
|
||||
// 获取结果CODE
|
||||
String code = String.valueOf(object.getInnerMap().get("code"));
|
||||
if (!"100000".equals(code)) {
|
||||
log.error("PACS失败申请报文:" + s);
|
||||
throw new ServiceException("PACS申请返回失败信息:" + object);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.document.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 历史库存静态记录表
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_inventory_item_static")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DocInventoryItemStatic extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 物品类别 */
|
||||
private String categoryCode;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 库存状态 */
|
||||
private Integer inventoryStatusEnum;
|
||||
|
||||
/** 供应商id */
|
||||
private Long supplierId;
|
||||
|
||||
/** 说明书 */
|
||||
private String descriptionText;
|
||||
|
||||
/** 最小单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 当前库存数量(最小单位数量) */
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 产品批号 */
|
||||
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;
|
||||
|
||||
/** 项目编号 */
|
||||
private String busNo;
|
||||
|
||||
/** 最小单位 */
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.document.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
|
||||
/**
|
||||
* 历史库存静态记录 mapper
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
@Repository
|
||||
public interface DocInventoryItemStaticMapper extends BaseMapper<DocInventoryItemStatic> {}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.openhis.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.document.domain.DocDefinition;
|
||||
import com.openhis.document.domain.DocDefinitionOrganization;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.openhis.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.document.domain.DocDefinition;
|
||||
import com.openhis.document.domain.EmrTemplate;
|
||||
|
||||
/**
|
||||
* 病历定义服务接口
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
|
||||
/**
|
||||
* 历史库存静态记录接口
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
public interface IDocInventoryItemStaticService extends IService<DocInventoryItemStatic> {}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.openhis.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.document.domain.DocStatisticsDefinition;
|
||||
import com.openhis.document.domain.DocStatisticsDefinitionOption;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.openhis.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.document.domain.DocStatistics;
|
||||
import com.openhis.document.domain.DocStatisticsDefinition;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocDefinition;
|
||||
import com.openhis.document.domain.DocDefinitionOrganization;
|
||||
import com.openhis.document.mapper.DocDefinitionMapper;
|
||||
import com.openhis.document.mapper.DocDefinitionOrganizationMapper;
|
||||
import com.openhis.document.service.IDocDefinitionOrganizationService;
|
||||
import com.openhis.document.service.IDocDefinitionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocDefinitionOrganization;
|
||||
import com.openhis.document.mapper.DocDefinitionOrganizationMapper;
|
||||
import com.openhis.document.service.IDocDefinitionOrganizationService;
|
||||
|
||||
@Service
|
||||
public class DocDefinitionOrganizationServiceImpl extends ServiceImpl<DocDefinitionOrganizationMapper, DocDefinitionOrganization> implements IDocDefinitionOrganizationService {
|
||||
}
|
||||
public class DocDefinitionOrganizationServiceImpl
|
||||
extends ServiceImpl<DocDefinitionOrganizationMapper, DocDefinitionOrganization>
|
||||
implements IDocDefinitionOrganizationService {}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocDefinition;
|
||||
import com.openhis.document.domain.EmrDetail;
|
||||
import com.openhis.document.mapper.DocDefinitionMapper;
|
||||
import com.openhis.document.mapper.EmrDetailMapper;
|
||||
import com.openhis.document.service.IDocDefinitionService;
|
||||
import com.openhis.document.service.IEmrDetailService;
|
||||
import nonapi.io.github.classgraph.json.Id;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DocDefinitionServiceImpl extends ServiceImpl<DocDefinitionMapper, DocDefinition> implements IDocDefinitionService {
|
||||
}
|
||||
public class DocDefinitionServiceImpl extends ServiceImpl<DocDefinitionMapper, DocDefinition>
|
||||
implements IDocDefinitionService {}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
import com.openhis.document.mapper.DocInventoryItemStaticMapper;
|
||||
import com.openhis.document.service.IDocInventoryItemStaticService;
|
||||
|
||||
/**
|
||||
* 历史库存静态记录接口实现类
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
@Service
|
||||
public class DocInventoryItemStaticServiceImpl extends ServiceImpl<DocInventoryItemStaticMapper, DocInventoryItemStatic>
|
||||
implements IDocInventoryItemStaticService {}
|
||||
@@ -1,14 +1,11 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocRecord;
|
||||
import com.openhis.document.domain.DocStatistics;
|
||||
import com.openhis.document.mapper.DocRecordMapper;
|
||||
import com.openhis.document.mapper.DocStatisticsMapper;
|
||||
import com.openhis.document.service.IDocRecordService;
|
||||
import com.openhis.document.service.IDocStatisticsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DocRecordServiceImpl extends ServiceImpl<DocRecordMapper, DocRecord> implements IDocRecordService {
|
||||
}
|
||||
public class DocRecordServiceImpl extends ServiceImpl<DocRecordMapper, DocRecord> implements IDocRecordService {}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocStatisticsDefinition;
|
||||
import com.openhis.document.domain.DocStatisticsDefinitionOption;
|
||||
import com.openhis.document.mapper.DocStatisticsDefinitionMapper;
|
||||
import com.openhis.document.mapper.DocStatisticsDefinitionOptionMapper;
|
||||
import com.openhis.document.service.IDocStatisticsDefinitionOptionService;
|
||||
import com.openhis.document.service.IDocStatisticsDefinitionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocStatisticsDefinitionOption;
|
||||
import com.openhis.document.mapper.DocStatisticsDefinitionOptionMapper;
|
||||
import com.openhis.document.service.IDocStatisticsDefinitionOptionService;
|
||||
|
||||
@Service
|
||||
public class DocStatisticsDefinitionOptionServiceImpl extends ServiceImpl<DocStatisticsDefinitionOptionMapper, DocStatisticsDefinitionOption> implements IDocStatisticsDefinitionOptionService {
|
||||
}
|
||||
public class DocStatisticsDefinitionOptionServiceImpl
|
||||
extends ServiceImpl<DocStatisticsDefinitionOptionMapper, DocStatisticsDefinitionOption>
|
||||
implements IDocStatisticsDefinitionOptionService {}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocStatistics;
|
||||
import com.openhis.document.domain.DocStatisticsDefinition;
|
||||
import com.openhis.document.mapper.DocStatisticsDefinitionMapper;
|
||||
import com.openhis.document.mapper.DocStatisticsMapper;
|
||||
import com.openhis.document.service.IDocStatisticsDefinitionService;
|
||||
import com.openhis.document.service.IDocStatisticsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocStatisticsDefinition;
|
||||
import com.openhis.document.mapper.DocStatisticsDefinitionMapper;
|
||||
import com.openhis.document.service.IDocStatisticsDefinitionService;
|
||||
|
||||
@Service
|
||||
public class DocStatisticsDefinitionServiceImpl extends ServiceImpl<DocStatisticsDefinitionMapper, DocStatisticsDefinition> implements IDocStatisticsDefinitionService {
|
||||
}
|
||||
public class DocStatisticsDefinitionServiceImpl extends
|
||||
ServiceImpl<DocStatisticsDefinitionMapper, DocStatisticsDefinition> implements IDocStatisticsDefinitionService {}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocDefinition;
|
||||
import com.openhis.document.domain.DocStatistics;
|
||||
import com.openhis.document.mapper.DocDefinitionMapper;
|
||||
import com.openhis.document.mapper.DocStatisticsMapper;
|
||||
import com.openhis.document.service.IDocDefinitionService;
|
||||
import com.openhis.document.service.IDocStatisticsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocStatistics;
|
||||
import com.openhis.document.mapper.DocStatisticsMapper;
|
||||
import com.openhis.document.service.IDocStatisticsService;
|
||||
|
||||
@Service
|
||||
public class DocStatisticsServiceImpl extends ServiceImpl<DocStatisticsMapper, DocStatistics> implements IDocStatisticsService {
|
||||
}
|
||||
public class DocStatisticsServiceImpl extends ServiceImpl<DocStatisticsMapper, DocStatistics>
|
||||
implements IDocStatisticsService {}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package com.openhis.document.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.document.domain.DocTemplate;
|
||||
import com.openhis.document.mapper.DocTemplateMapper;
|
||||
import com.openhis.document.service.IDocTemplateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DocTemplateServiceImpl extends ServiceImpl<DocTemplateMapper, DocTemplate> implements IDocTemplateService {
|
||||
}
|
||||
public class DocTemplateServiceImpl extends ServiceImpl<DocTemplateMapper, DocTemplate>
|
||||
implements IDocTemplateService {}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class PaymentReconciliation extends HisBaseEntity {
|
||||
private Integer printCount;
|
||||
|
||||
/** 合同编码 */
|
||||
private String contractNo;//2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
private String contractNo;// 2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
|
||||
/** 处方号集合 */
|
||||
private String chargeItemIds;
|
||||
@@ -96,15 +96,19 @@ public class PaymentReconciliation extends HisBaseEntity {
|
||||
private Long invoiceId;
|
||||
|
||||
/** 关联账户Id */
|
||||
private Long accountId;//2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
private Long accountId;// 2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
|
||||
/** 医保结算id */
|
||||
private String ybSettleIds;//记录医保结算id
|
||||
private String ybSettleIds;// 记录医保结算id
|
||||
|
||||
/** 医保清算标志 */
|
||||
<<<<<<< HEAD
|
||||
private Integer ybClearFlag;//默认值0 未清算
|
||||
|
||||
/** 退号/退费原因 */
|
||||
@TableField("refund_reason")
|
||||
private String refundReason;
|
||||
=======
|
||||
private Integer ybClearFlag;// 默认值0 未清算
|
||||
>>>>>>> upstream/develop
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.openhis.financial.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 第三方支付回调实体(下方备注信息以中银支付为模板)
|
||||
*/
|
||||
@Data
|
||||
@TableName("fin_three_part_pay_call_back")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ThreePartPayCallBack {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private BigDecimal id;
|
||||
|
||||
/**
|
||||
* 响应码:(枚举RespCode)00 表示成功,其它表示失败
|
||||
*/
|
||||
private String respCode;
|
||||
|
||||
/**
|
||||
* 响应码解释信息(需要Base64解密)
|
||||
*/
|
||||
private String respMsg;
|
||||
|
||||
/**
|
||||
* 交易类型:(枚举TranType)
|
||||
*/
|
||||
private String tranType;
|
||||
|
||||
/**
|
||||
* 交易金额
|
||||
*/
|
||||
private String txnAmt;
|
||||
|
||||
/**
|
||||
* 支付方式:
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 终端流水号:终端号系统跟踪号,同请求报文原值返回,客户端收到应答报文需要验证traceNo字段值,需与请求报文值一致,如果不一致则丢包交易失败
|
||||
*/
|
||||
private String traceNo;
|
||||
|
||||
/**
|
||||
* 交易时间:(yyyyMMddHHmmss)
|
||||
*/
|
||||
private String txnTime;
|
||||
|
||||
/**
|
||||
* 支付订单号:银行返回系统订单号,需要保存该支付交易订单号
|
||||
*/
|
||||
private String tradeNo;
|
||||
|
||||
/**
|
||||
* 第三方支付订单号
|
||||
*/
|
||||
private String transNo;
|
||||
|
||||
/**
|
||||
* 商户号
|
||||
*/
|
||||
private String mid;
|
||||
|
||||
/**
|
||||
* 商户名称
|
||||
*/
|
||||
private String merName;
|
||||
|
||||
/**
|
||||
* 终端号
|
||||
*/
|
||||
private String tid;
|
||||
|
||||
/**
|
||||
* 商户系统订单号:同请求一致
|
||||
*/
|
||||
private String merTradeNo;
|
||||
|
||||
/**
|
||||
* 商户系统退款授权单号:同请求一致
|
||||
*/
|
||||
private String vfTradeNo;
|
||||
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private String discountAmt;
|
||||
|
||||
/**
|
||||
* 有效时间:二维码本身的有效时间,是相对时间,单位为秒,以接收方收到报文时间为起始点计时。不同类型的订单以及不同的订单状况会对应不同的默认有效时间和最大有效时间(可以为空)
|
||||
*/
|
||||
private String qrValidTime;
|
||||
|
||||
/**
|
||||
* 二维码信息:主扫支付二维码,以二维码形式显示,手机APP扫二维码码消费
|
||||
*/
|
||||
private String scanCode;
|
||||
|
||||
/**
|
||||
* 原交易类型:1、订单查询类交易填写原交易类型(被扫交易必填)2、非订单查询填写交易类型与tranType一致(可以为空)
|
||||
*/
|
||||
private String orgTranType;
|
||||
|
||||
/**
|
||||
* 原交易名称:订单查询类交易填写原交易名称,非订单查询填写交易名称(被扫交易必填)
|
||||
*/
|
||||
private String orgTxnName;
|
||||
|
||||
/**
|
||||
* 订单数据:当tranType为F时,payType 值为ZFBA或WEIX时支付宝返回的tradeNo 或者微信返回的prepayId
|
||||
*/
|
||||
private String payData;
|
||||
|
||||
/**
|
||||
* POS机号
|
||||
*/
|
||||
private String posNo;
|
||||
|
||||
/**
|
||||
* 付款主键ID
|
||||
*/
|
||||
private Long paymentId;
|
||||
|
||||
/**
|
||||
* 前台UI序号
|
||||
*/
|
||||
private Long index;
|
||||
|
||||
/**
|
||||
* 时间戳(中银建议)
|
||||
*/
|
||||
private Long time;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.openhis.financial.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.financial.domain.ClaimResponse;
|
||||
import com.openhis.financial.domain.ThreePartPayCallBack;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface ThreePartPayCallBackMapper extends BaseMapper<ThreePartPayCallBack> {
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.openhis.financial.model;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PaymentedItemModel {
|
||||
@@ -21,4 +22,37 @@ public class PaymentedItemModel {
|
||||
/** 总价 */
|
||||
private Long chargeItemId;
|
||||
|
||||
/** 医疗服务所在表 */
|
||||
private String serviceTable;
|
||||
|
||||
/** 医疗服务ID */
|
||||
private Long serviceId;
|
||||
|
||||
/** 产品所在表 */
|
||||
private String productTable;
|
||||
|
||||
/** 产品ID */
|
||||
private Long productId;
|
||||
|
||||
/** 开立人ID */
|
||||
private Long entererId;
|
||||
|
||||
/** 开立科室 */
|
||||
private Long requestingOrgId;
|
||||
|
||||
/** 开立时间 */
|
||||
private Date enteredDate;
|
||||
|
||||
/** 数量 */
|
||||
private BigDecimal quantityValue;
|
||||
|
||||
/** 单位 */
|
||||
private String quantityUnit;
|
||||
|
||||
/** 单价 */
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** chargeItem定义id */
|
||||
private Long definitionId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.openhis.financial.model;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.openhis.yb.dto.Clinic2206FundPaymentResult;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.openhis.yb.dto.Clinic2206FundPaymentResult;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PrePaymentResult {
|
||||
|
||||
@@ -82,4 +83,6 @@ public class PrePaymentResult {
|
||||
private String busNo; // 挂号采访码
|
||||
|
||||
private Long accountId; // 账号ID码
|
||||
|
||||
private BigDecimal gfRatio;// 学校垫付金额
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.openhis.financial.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StudentPaymentItemModel extends PaymentedItemModel {
|
||||
|
||||
/**
|
||||
* 医保等级
|
||||
*/
|
||||
private Integer chrgitmLv;
|
||||
|
||||
/**
|
||||
* 医保分类
|
||||
*/
|
||||
private String ybType;
|
||||
|
||||
/**
|
||||
* 自付比例
|
||||
*/
|
||||
private BigDecimal selfRatio;
|
||||
|
||||
/**
|
||||
* 公费一次报销金额
|
||||
*/
|
||||
private BigDecimal oncePrice;
|
||||
|
||||
/**
|
||||
* 医保折扣部分金额
|
||||
*/
|
||||
private BigDecimal ybRatio;
|
||||
|
||||
/**
|
||||
* 学校垫付部分金额
|
||||
*/
|
||||
private BigDecimal studentRatio;
|
||||
|
||||
/**
|
||||
* 自付比例
|
||||
*/
|
||||
private BigDecimal twiceRatio;
|
||||
|
||||
/**
|
||||
* 公费二次报销金额
|
||||
*/
|
||||
private BigDecimal twicePrice;
|
||||
}
|
||||
@@ -98,6 +98,14 @@ public interface IPaymentReconciliationService extends IService<PaymentReconcili
|
||||
*/
|
||||
PaymentReconciliation getByEncounterId(Long encounterId, PaymentKind kindEnum);
|
||||
|
||||
/**
|
||||
* 查询付款实体
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 付款实体
|
||||
*/
|
||||
List<PaymentReconciliation> getListByEncounterId(Long encounterId, PaymentKind paymentKind);
|
||||
|
||||
/**
|
||||
* 判断是否已退费
|
||||
*
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.openhis.financial.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.financial.domain.ThreePartPayCallBack;
|
||||
|
||||
public interface ThreePartPayCallBackService extends IService<ThreePartPayCallBack> {
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.financial.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -16,25 +17,41 @@ import org.springframework.stereotype.Service;
|
||||
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.core.common.exception.ServiceException;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
import com.openhis.administration.service.IHealthcareServiceService;
|
||||
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;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.ItemType;
|
||||
import com.openhis.common.enums.PaymentKind;
|
||||
import com.openhis.common.enums.PaymentStatus;
|
||||
import com.openhis.common.enums.ybenums.YbChrgitmLv;
|
||||
import com.openhis.common.enums.ybenums.YbMdtrtCertType;
|
||||
import com.openhis.common.enums.ybenums.YbMedChrgItmType;
|
||||
import com.openhis.common.enums.ybenums.YbMedType;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.mapper.PaymentReconciliationMapper;
|
||||
import com.openhis.financial.model.PaymentReconciliationAccountDel;
|
||||
import com.openhis.financial.model.PaymentResult;
|
||||
import com.openhis.financial.model.PaymentedItemModel;
|
||||
import com.openhis.financial.model.PrePaymentResult;
|
||||
import com.openhis.financial.model.*;
|
||||
import com.openhis.financial.service.IContractService;
|
||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||
import com.openhis.medication.domain.MedicationDefinition;
|
||||
import com.openhis.medication.service.IMedicationDefinitionService;
|
||||
import com.openhis.nenu.dto.GfTypeRatioDto;
|
||||
import com.openhis.nenu.service.impl.GfRatioServiceImpl;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
import com.openhis.yb.dto.Clinic2206OrderOutput;
|
||||
import com.openhis.yb.dto.ClinicReg2201Output;
|
||||
import com.openhis.yb.dto.PaymentInpatientDto;
|
||||
@@ -57,6 +74,24 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
private IContractService iContractService;
|
||||
@Autowired
|
||||
private YbManager ybManager;
|
||||
@Autowired
|
||||
private GfRatioServiceImpl gfRatioService;
|
||||
@Autowired
|
||||
private PatientServiceImpl patientService;
|
||||
@Autowired
|
||||
private PatientStudentServiceImpl patientStudentService;
|
||||
@Autowired
|
||||
private IChargeItemService chargeItemService;
|
||||
@Autowired
|
||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||
@Autowired
|
||||
private IDeviceDefinitionService deviceDefinitionService;
|
||||
@Autowired
|
||||
private IActivityDefinitionService activityDefinitionService;
|
||||
@Autowired
|
||||
private IMedicationDefinitionService medicationDefinitionService;
|
||||
@Autowired
|
||||
private IHealthcareServiceService healthcareServiceService;
|
||||
|
||||
/**
|
||||
* 根据支付id获取对应收费项目的id列表
|
||||
@@ -143,6 +178,9 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
case "220100":// 长春市医保(长大)
|
||||
Map<String, List<PaymentedItemModel>> collect =
|
||||
paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getMedType));
|
||||
if (collect.entrySet().size() > 1) {
|
||||
throw new ServiceException("医保只接受同种医疗类型结算(普通门诊与慢病等不可以同时结算)!");
|
||||
}
|
||||
PrePaymentResult result;
|
||||
for (Map.Entry<String, List<PaymentedItemModel>> medTypeKV : collect.entrySet()) {
|
||||
Clinic2206OrderOutput clinic2206OrderOutput = null;
|
||||
@@ -161,19 +199,108 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
}
|
||||
// 调用预结算
|
||||
clinic2206OrderOutput = ybManager.preSettle(contract, medTypeKV.getValue().get(0).getEncounterId(),
|
||||
ybMdtrtCertType, busiCardInfo, reg2201Output, "01", medTypeKV.getValue().stream()
|
||||
.map(PaymentedItemModel::getChargeItemId).collect(Collectors.toList()),
|
||||
ybMdtrtCertType, busiCardInfo, reg2201Output, "01", medTypeKV.getValue(),
|
||||
YbMedType.getByValue(medTypeKV.getKey()));
|
||||
prePaymentResult = new PrePaymentResult();
|
||||
BeanUtils.copyProperties(clinic2206OrderOutput, prePaymentResult);
|
||||
}
|
||||
break;
|
||||
case "STUDENT0000":
|
||||
prePaymentResult = this.studentSelfPay(paymentedItemList);
|
||||
break;
|
||||
case "STUDENT220100":
|
||||
case "STUDENT229900":
|
||||
case "STUDENT220199":
|
||||
prePaymentResult = this.studentYbPay(contract, ybMdtrtCertType, busiCardInfo, "01", paymentedItemList);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return prePaymentResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生二次报销
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param ybMdtrtCertType 医疗类别
|
||||
* @param busiCardInfo 电子码
|
||||
* @param s 按项目收费还是按病种收费(该字段目前在系统里面没用上,默认都是01)
|
||||
* @param paymentedItemList 收费项
|
||||
* @return 预结算结果
|
||||
*/
|
||||
private PrePaymentResult studentYbPay(Contract contract, YbMdtrtCertType ybMdtrtCertType, String busiCardInfo,
|
||||
String s, List<PaymentedItemModel> paymentedItemList) {
|
||||
|
||||
// 查比例及分类信息(PaymentedItemModel在chargeItem表中不是一定存在的所以此处改用单独查询)
|
||||
List<StudentPaymentItemModel> allPaymentItemList = getStudentPaymentItemModelList(paymentedItemList);
|
||||
|
||||
// 拟定使用公费医疗的情况下实收金额
|
||||
BigDecimal onceReceivedAmount = BigDecimal.ZERO;
|
||||
for (StudentPaymentItemModel studentPaymentItemModel : allPaymentItemList) {
|
||||
// 获取折扣比例
|
||||
BigDecimal ratio = studentPaymentItemModel.getTwiceRatio() == null ? studentPaymentItemModel.getSelfRatio()
|
||||
: studentPaymentItemModel.getTwiceRatio();
|
||||
|
||||
// 计算金额
|
||||
onceReceivedAmount = onceReceivedAmount.add(studentPaymentItemModel.getTotalPrice()
|
||||
.multiply(ratio.divide(new BigDecimal("100"), 6, RoundingMode.HALF_UP)));
|
||||
}
|
||||
|
||||
// 医保结算
|
||||
PrePaymentResult prePaymentResult =
|
||||
this.studentPreSettleYb(contract, ybMdtrtCertType, busiCardInfo, paymentedItemList);
|
||||
if (prePaymentResult == null) {
|
||||
throw new ServiceException("医生开具的收费项未分配对应的医疗类型!");
|
||||
}
|
||||
|
||||
BigDecimal psnPartAmt = prePaymentResult.getPsnPartAmt();
|
||||
|
||||
if (psnPartAmt.compareTo(onceReceivedAmount) > 0) {
|
||||
prePaymentResult.setGfRatio(psnPartAmt.subtract(onceReceivedAmount));
|
||||
prePaymentResult.setPsnCashPay(onceReceivedAmount);
|
||||
} else {
|
||||
prePaymentResult.setGfRatio(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
return prePaymentResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生一次报销
|
||||
*
|
||||
* @param paymentedItemList 收费项
|
||||
* @return 预结算结果
|
||||
*/
|
||||
private PrePaymentResult studentSelfPay(List<PaymentedItemModel> paymentedItemList) {
|
||||
|
||||
List<StudentPaymentItemModel> allPaymentItemList = getStudentPaymentItemModelList(paymentedItemList);
|
||||
|
||||
// 拟定使用公费医疗的情况下实收金额
|
||||
BigDecimal onceReceivedAmount = BigDecimal.ZERO;
|
||||
for (StudentPaymentItemModel studentPaymentItemModel : allPaymentItemList) {
|
||||
// 获取折扣比例
|
||||
BigDecimal ratio = studentPaymentItemModel.getTwiceRatio() == null ? studentPaymentItemModel.getSelfRatio()
|
||||
: studentPaymentItemModel.getTwiceRatio();
|
||||
|
||||
// 计算金额
|
||||
onceReceivedAmount = onceReceivedAmount.add(studentPaymentItemModel.getTotalPrice().multiply(ratio));
|
||||
}
|
||||
|
||||
PrePaymentResult prePaymentResult = new PrePaymentResult();
|
||||
BigDecimal sumAmount = BigDecimal.ZERO;
|
||||
for (PaymentedItemModel item : paymentedItemList) {
|
||||
sumAmount = sumAmount.add(item.getTotalPrice());
|
||||
}
|
||||
prePaymentResult.setMedfeeSumamt(sumAmount);
|
||||
prePaymentResult.setFulamtOwnpayAmt(sumAmount);
|
||||
prePaymentResult.setPsnPartAmt(sumAmount);
|
||||
prePaymentResult.setPsnCashPay(onceReceivedAmount.divide(new BigDecimal("100"), 6, RoundingMode.HALF_UP));
|
||||
prePaymentResult.setGfRatio(sumAmount.subtract(prePaymentResult.getPsnCashPay()));
|
||||
prePaymentResult.setChrgBchno(CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO);
|
||||
return prePaymentResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【门诊结算】
|
||||
*
|
||||
@@ -189,7 +316,8 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
public PaymentResult settle(Contract contract, String payTransNo, YbMdtrtCertType ybMdtrtCertType,
|
||||
String busiCardInfo, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
PaymentResult paymentResult = null;
|
||||
if (!CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(payTransNo)) {
|
||||
if (!(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(payTransNo)
|
||||
|| CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO.equals(payTransNo))) {
|
||||
// 医保支付 todo:支付的详细信息在于结算中已经存好了,但是还没有存储卡余额
|
||||
Clinic2207OrderModel clinic2207OrderModel =
|
||||
ybManager.settle(contract, payTransNo, busiCardInfo, ybMdtrtCertType, minpacuntDrugTracCnt, mcsTracCnt);
|
||||
@@ -272,6 +400,21 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已收费付款实体
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 付款实体
|
||||
*/
|
||||
@Override
|
||||
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())
|
||||
.eq(PaymentReconciliation::getKindEnum, PaymentKind.HOSPITAL_DEPOSIT.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否已退费
|
||||
*
|
||||
@@ -309,4 +452,181 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
return baseMapper.getPaymentAccountContract(startTime, endTime, entererId, contractNo, success, returnAll,
|
||||
clinic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询自付比例等
|
||||
*
|
||||
* @param paymentedItemList 收款明细
|
||||
* @return 学生付款实体
|
||||
*/
|
||||
private List<StudentPaymentItemModel> getStudentPaymentItemModelList(List<PaymentedItemModel> paymentedItemList) {
|
||||
|
||||
// 大项比例
|
||||
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)));
|
||||
|
||||
List<StudentPaymentItemModel> allPaymentItemList = new ArrayList<>();
|
||||
|
||||
Map<String, List<PaymentedItemModel>> paymentedItemListByServiceTableMap =
|
||||
paymentedItemList.stream().collect(Collectors.groupingBy(PaymentedItemModel::getServiceTable));
|
||||
|
||||
for (Map.Entry<String, List<PaymentedItemModel>> stringListEntry : paymentedItemListByServiceTableMap
|
||||
.entrySet()) {
|
||||
|
||||
String key = stringListEntry.getKey();
|
||||
ItemType itemType;
|
||||
if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(key)) {
|
||||
itemType = ItemType.MEDICINE;
|
||||
} else if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(key)) {
|
||||
itemType = ItemType.ACTIVITY;
|
||||
} else {
|
||||
throw new ServiceException("除药品和诊疗项目外不存在其他公费项目,请确认!");
|
||||
}
|
||||
List<PaymentedItemModel> value = stringListEntry.getValue();
|
||||
List<StudentPaymentItemModel> paymentItemList = gfRatioService.getGfRatioList(itemType, value);
|
||||
|
||||
for (StudentPaymentItemModel studentPaymentItemModel : paymentItemList) {
|
||||
|
||||
// 如果自付比例有值,就continue掉
|
||||
if (studentPaymentItemModel.getSelfRatio() != null && studentPaymentItemModel.getTwiceRatio() != null) {
|
||||
continue;
|
||||
}
|
||||
// 查定价分类
|
||||
ChargeItemDefinition chargeItemDefinition =
|
||||
chargeItemDefinitionService.getById(studentPaymentItemModel.getDefinitionId());
|
||||
|
||||
// 查医保等级
|
||||
if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(studentPaymentItemModel.getProductTable())) {
|
||||
DeviceDefinition deviceDefinition =
|
||||
deviceDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
if (deviceDefinition != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件
|
||||
YbMedChrgItmType medChrgItmType = YbMedChrgItmType.getByValue(chargeItemDefinition.getYbType());
|
||||
if (medChrgItmType == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保分类!请检查!!!");
|
||||
}
|
||||
YbChrgitmLv chrgitmLv = YbChrgitmLv.getByValue(deviceDefinition.getChrgitmLv());
|
||||
if (chrgitmLv == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保等级!请检查!!!");
|
||||
}
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos =
|
||||
result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
if (gfTypeRatioDtos == null || gfTypeRatioDtos.isEmpty()) {
|
||||
throw new ServiceException(
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
}
|
||||
|
||||
studentPaymentItemModel.setSelfRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
studentPaymentItemModel.setTwiceRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
|
||||
}
|
||||
} else if (CommonConstants.TableName.WOR_ACTIVITY_DEFINITION
|
||||
.equals(studentPaymentItemModel.getProductTable())) {
|
||||
ActivityDefinition activityDefinition =
|
||||
activityDefinitionService.getById(studentPaymentItemModel.getProductId());
|
||||
if (activityDefinition != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件
|
||||
YbMedChrgItmType medChrgItmType = YbMedChrgItmType.getByValue(chargeItemDefinition.getYbType());
|
||||
if (medChrgItmType == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保分类!请检查!!!");
|
||||
}
|
||||
YbChrgitmLv chrgitmLv = YbChrgitmLv.getByValue(activityDefinition.getChrgitmLv());
|
||||
if (chrgitmLv == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保等级!请检查!!!");
|
||||
}
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos =
|
||||
result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
if (gfTypeRatioDtos == null || gfTypeRatioDtos.isEmpty()) {
|
||||
throw new ServiceException(
|
||||
"医保分类:" + 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());
|
||||
if (medicationDefinition != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件
|
||||
YbMedChrgItmType medChrgItmType = YbMedChrgItmType.getByValue(chargeItemDefinition.getYbType());
|
||||
if (medChrgItmType == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保分类!请检查!!!");
|
||||
}
|
||||
YbChrgitmLv chrgitmLv = YbChrgitmLv.getByValue(medicationDefinition.getChrgitmLv());
|
||||
if (chrgitmLv == null) {
|
||||
throw new ServiceException(chargeItemDefinition.getChargeName() + "未配置正确的医保等级!请检查!!!");
|
||||
}
|
||||
List<GfTypeRatioDto> gfTypeRatioDtos =
|
||||
result.get(chargeItemDefinition.getYbType()).get(chrgitmLv.getCode());
|
||||
if (gfTypeRatioDtos == null || gfTypeRatioDtos.isEmpty()) {
|
||||
throw new ServiceException(
|
||||
"医保分类:" + medChrgItmType.getInfo() + "医保等级:" + chrgitmLv.getInfo() + "未配置自付比例!请检查!!!");
|
||||
}
|
||||
|
||||
studentPaymentItemModel.setSelfRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
studentPaymentItemModel.setTwiceRatio(gfTypeRatioDtos.get(0).getSelfRatio());
|
||||
}
|
||||
} else {
|
||||
HealthcareService healthcareService =
|
||||
healthcareServiceService.getById(studentPaymentItemModel.getServiceId());
|
||||
if (healthcareService != null && chargeItemDefinition != null) {
|
||||
// 约定大项目的自付比例获取条件 医疗服务没有定义医保等级,默认百分百还是直接抛异常?
|
||||
studentPaymentItemModel.setSelfRatio(new BigDecimal("100"));
|
||||
studentPaymentItemModel.setTwiceRatio(new BigDecimal("100"));
|
||||
}
|
||||
}
|
||||
allPaymentItemList.addAll(paymentItemList);
|
||||
}
|
||||
}
|
||||
return allPaymentItemList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 医保预结算
|
||||
*
|
||||
* @param contract 合同b
|
||||
* @param ybMdtrtCertType 证件类型
|
||||
* @param busiCardInfo 电子密钥
|
||||
* @param paymentedItemList 收款明细
|
||||
* @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));
|
||||
// 一次医保结算只能支持一种医疗类型的结算
|
||||
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))) {
|
||||
// 不是普通门诊就诊类型,补充挂号信息
|
||||
reg2201Output = ybManager.createRegWithMedType(contract, ybMdtrtCertType, busiCardInfo,
|
||||
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());
|
||||
}
|
||||
if (reg2201Output == null) {
|
||||
throw new ServiceException("未查询到医保挂号信息");
|
||||
}
|
||||
// 调用预结算
|
||||
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;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.financial.service.impl;
|
||||
|
||||
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 {
|
||||
}
|
||||
@@ -168,4 +168,9 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 处方标志 */
|
||||
private Integer rxFlag;
|
||||
|
||||
/**
|
||||
* 用药说明
|
||||
*/
|
||||
private String dosageInstruction;
|
||||
|
||||
}
|
||||
@@ -215,4 +215,9 @@ public class MedicationDetail extends HisBaseEntity {
|
||||
/** 最大库存警戒数量(常规单位) */
|
||||
private BigDecimal itemMaxQuantity;
|
||||
|
||||
/**
|
||||
* 用药说明
|
||||
*/
|
||||
private String dosageInstruction;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -126,4 +126,7 @@ public class MedicationDispense extends HisBaseEntity {
|
||||
|
||||
/** 执行id */
|
||||
private Long procedureId;
|
||||
|
||||
/** 汇总编号 */
|
||||
private String summaryNo;
|
||||
}
|
||||
|
||||
@@ -239,4 +239,14 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
|
||||
/** 请求基于什么的ID */
|
||||
private Long basedOnId;
|
||||
|
||||
/**
|
||||
* 用药说明
|
||||
*/
|
||||
private String dosageInstruction;
|
||||
|
||||
/**
|
||||
* 生成来源
|
||||
*/
|
||||
private Integer generateSourceEnum;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.openhis.medication.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceMedListDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/20 09:58
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class AdjustPriceMedListDto {
|
||||
|
||||
/**
|
||||
* 表主表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long targetId;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String volume;
|
||||
/**
|
||||
* 原进货价
|
||||
*/
|
||||
private BigDecimal originBuyingPrice;
|
||||
/**
|
||||
* 原零售价
|
||||
*/
|
||||
private BigDecimal originRetailPrice;
|
||||
/**
|
||||
* 新进货价格
|
||||
*/
|
||||
private BigDecimal newBuyingPrice;
|
||||
/**
|
||||
* 新零售价
|
||||
*/
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
/**
|
||||
* 调价原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String busNo;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 药品单位
|
||||
*/
|
||||
private String unitCode;
|
||||
/**
|
||||
* 影响库存总数
|
||||
*/
|
||||
private BigDecimal totalQuantity;
|
||||
/**
|
||||
* 进价盈负差
|
||||
*/
|
||||
private BigDecimal buyingDifferencePrice;
|
||||
/**
|
||||
* 售价盈负差
|
||||
*/
|
||||
private BigDecimal retailDifferencePrice;
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.openhis.medication.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@@ -22,4 +24,12 @@ public interface MedicationMapper extends BaseMapper<Medication> {
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
List<MedicationDetail> selectDetailList();
|
||||
/**
|
||||
* Desc: 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
* @param keyWord
|
||||
* @Author raymond
|
||||
* @Date 10:17 2025/10/20
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
List<AdjustPriceMedListDto> searchMedListByKeyWord(@Param("keyWord") String keyWord);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.openhis.medication.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
@@ -21,16 +20,19 @@ public interface IMedicationDispenseService extends IService<MedicationDispense>
|
||||
*
|
||||
* @param medicationRequest 药品请求信息
|
||||
* @param dbOpType db操作类型
|
||||
* @return 发放id
|
||||
*/
|
||||
void handleMedicationDispense(MedicationRequest medicationRequest, String dbOpType);
|
||||
Long handleMedicationDispense(MedicationRequest medicationRequest, String dbOpType);
|
||||
|
||||
/**
|
||||
* 医嘱执行生成药品发放,状态为待配药
|
||||
*
|
||||
* @param medicationRequest 药品医嘱请求
|
||||
* @param procedureId 执行记录id
|
||||
* @param plannedDispenseTime 预定发药时间
|
||||
* @return 发放id
|
||||
*/
|
||||
void generateMedicationDispense(MedicationRequest medicationRequest,Long procedureId);
|
||||
Long generateMedicationDispense(MedicationRequest medicationRequest, Long procedureId, Date plannedDispenseTime);
|
||||
|
||||
/**
|
||||
* 删除药品发放信息
|
||||
@@ -77,20 +79,13 @@ public interface IMedicationDispenseService extends IService<MedicationDispense>
|
||||
*/
|
||||
List<MedicationDispense> selectByRequestIdList(List<Long> requestIdList);
|
||||
|
||||
/**
|
||||
* 通过id获取药品发放信息
|
||||
*
|
||||
* @param idList 请求id
|
||||
* @return 发放信息
|
||||
*/
|
||||
List<MedicationDispense> selectByIdList(@Param("idList") List<Long> idList);
|
||||
|
||||
/**
|
||||
* 更新药品状态:已汇总
|
||||
*
|
||||
* @param medDispenseId 发放id列表
|
||||
* @param busNo 汇总单号
|
||||
*/
|
||||
void updateDispenseStatusSummarized(List<Long> medDispenseId);
|
||||
void updateDispenseStatusSummarized(List<Long> medDispenseId, String busNo);
|
||||
|
||||
/**
|
||||
* 通过执行id获取药品发放信息
|
||||
@@ -99,4 +94,28 @@ public interface IMedicationDispenseService extends IService<MedicationDispense>
|
||||
* @return 发放信息
|
||||
*/
|
||||
List<MedicationDispense> getMedDispenseByProcedureId(List<Long> procedureIdList);
|
||||
|
||||
/**
|
||||
* 取消汇总
|
||||
*
|
||||
* @param summaryNoList 汇总单号列表
|
||||
* @return 取消结果
|
||||
*/
|
||||
boolean cancelMedicationSummary(List<String> summaryNoList);
|
||||
|
||||
/**
|
||||
* 更新药品发放状态
|
||||
*
|
||||
* @param dispenseIdList 发放id列表
|
||||
* @param dispenseStatus 发放状态
|
||||
*/
|
||||
void updateDispenseStatus(List<Long> dispenseIdList, Integer dispenseStatus);
|
||||
|
||||
/**
|
||||
* 通过汇总单号获取药品发放信息
|
||||
*
|
||||
* @param summaryNoList 汇总单号列表
|
||||
* @return 发放信息
|
||||
*/
|
||||
List<MedicationDispense> getMedDispenseBySummaryNo(List<String> summaryNoList);
|
||||
}
|
||||
@@ -3,8 +3,6 @@ package com.openhis.medication.service;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
|
||||
@@ -35,10 +33,19 @@ public interface IMedicationRequestService extends IService<MedicationRequest> {
|
||||
void updateDraftStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate);
|
||||
|
||||
/**
|
||||
* 通过id获取药品请求信息
|
||||
* 更新请求状态:取消
|
||||
*
|
||||
* @param idList 请求id
|
||||
* @return 发放信息
|
||||
* @param requestIdList 药品请求id列表
|
||||
* @param practitionerId 校对人
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
List<MedicationRequest> selectByIdList(@Param("idList") List<Long> idList);
|
||||
void updateCancelledStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate);
|
||||
|
||||
/**
|
||||
* 根据药品id获取药品请求
|
||||
*
|
||||
* @param medicationId 药品id
|
||||
* @return 药品请求列表
|
||||
*/
|
||||
List<MedicationRequest> getMedRequestByMedicationId(Long medicationId);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Service接口
|
||||
@@ -31,5 +33,12 @@ public interface IMedicationService extends IService<Medication> {
|
||||
|
||||
// 新增药品目录
|
||||
boolean addMedication(MedicationDetail medicationDetail);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
* @param keyWord
|
||||
* @Author raymond
|
||||
* @Date 10:18 2025/10/20
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
List<AdjustPriceMedListDto> searchMedListByKeyWord(String keyWord);
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -43,9 +42,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
*
|
||||
* @param medicationRequest 药品请求信息
|
||||
* @param dbOpType db操作类型
|
||||
* @return 发放id
|
||||
*/
|
||||
@Override
|
||||
public void handleMedicationDispense(MedicationRequest medicationRequest, String dbOpType) {
|
||||
public Long handleMedicationDispense(MedicationRequest medicationRequest, String dbOpType) {
|
||||
MedicationDispense medicationDispense = new MedicationDispense();
|
||||
// 药品发放id
|
||||
medicationDispense.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.MEDICATION_DIS_NO.getPrefix(), 4));
|
||||
@@ -103,19 +103,26 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
baseMapper.update(medicationDispense, new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.eq(MedicationDispense::getMedReqId, medicationRequest.getId()));
|
||||
}
|
||||
|
||||
return medicationDispense.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 医嘱执行生成药品发放,状态为待配药
|
||||
*
|
||||
*
|
||||
* @param medicationRequest 药品医嘱请求
|
||||
* @param procedureId 执行记录id
|
||||
* @param plannedDispenseTime 预定发药时间
|
||||
* @return 发放id
|
||||
*/
|
||||
@Override
|
||||
public void generateMedicationDispense(MedicationRequest medicationRequest, Long procedureId) {
|
||||
public Long generateMedicationDispense(MedicationRequest medicationRequest, Long procedureId,
|
||||
Date plannedDispenseTime) {
|
||||
MedicationDispense medicationDispense = new MedicationDispense();
|
||||
// 执行id
|
||||
medicationDispense.setProcedureId(procedureId);
|
||||
// 预定发药时间
|
||||
medicationDispense.setPlannedDispenseTime(plannedDispenseTime);
|
||||
// 药品发放id
|
||||
medicationDispense.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.MEDICATION_DIS_NO.getPrefix(), 4));
|
||||
// 药品发放状态
|
||||
@@ -166,6 +173,8 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
medicationDispense.setLimitTime(limitTime);
|
||||
|
||||
baseMapper.insert(medicationDispense);
|
||||
|
||||
return medicationDispense.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -247,30 +256,19 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取药品发放信息
|
||||
*
|
||||
* @param idList 请求id
|
||||
* @return 发放信息
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDispense> selectByIdList(@Param("idList") List<Long> idList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getId, idList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新药品状态:已汇总
|
||||
*
|
||||
* @param medDispenseId 发放id列表
|
||||
*/
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> medDispenseId) {
|
||||
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())
|
||||
.in(MedicationDispense::getId, medDispenseId));
|
||||
.set(MedicationDispense::getSummaryNo, busNo).in(MedicationDispense::getId, medDispenseId)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,4 +283,48 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getProcedureId, procedureIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消汇总
|
||||
*
|
||||
* @param summaryNoList 汇总单号
|
||||
* @return 取消结果
|
||||
*/
|
||||
@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()));
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新药品发放状态
|
||||
*
|
||||
* @param dispenseIdList 发放id列表
|
||||
* @param dispenseStatus 发放状态
|
||||
*/
|
||||
@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()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过汇总单号获取药品发放信息
|
||||
*
|
||||
* @param summaryNoList 汇总单号列表
|
||||
* @return 发放信息
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDispense> getMedDispenseBySummaryNo(List<String> summaryNoList) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getSummaryNo, summaryNoList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package com.openhis.medication.service.impl;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -60,15 +59,36 @@ public class MedicationRequestServiceImpl extends ServiceImpl<MedicationRequestM
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取药品请求信息
|
||||
* 更新请求状态:取消
|
||||
*
|
||||
* @param idList 请求id
|
||||
* @return 发放信息
|
||||
* @param requestIdList 药品请求id列表
|
||||
* @param practitionerId 校对人
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationRequest> selectByIdList(@Param("idList") List<Long> idList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<MedicationRequest>().in(MedicationRequest::getId, idList)
|
||||
.eq(MedicationRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
public void updateCancelledStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate) {
|
||||
LambdaUpdateWrapper<MedicationRequest> updateWrapper =
|
||||
new LambdaUpdateWrapper<MedicationRequest>().in(MedicationRequest::getId, requestIdList)
|
||||
.set(MedicationRequest::getStatusEnum, RequestStatus.CANCELLED.getValue());
|
||||
if (practitionerId != null) {
|
||||
updateWrapper.set(MedicationRequest::getPerformerCheckId, practitionerId);
|
||||
}
|
||||
if (checkDate != null) {
|
||||
updateWrapper.set(MedicationRequest::getCheckTime, checkDate);
|
||||
}
|
||||
baseMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据药品id获取药品请求
|
||||
*
|
||||
* @param medicationId 药品id
|
||||
* @return 药品请求列表
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationRequest> getMedRequestByMedicationId(Long medicationId) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<MedicationRequest>().eq(MedicationRequest::getMedicationId, medicationId)
|
||||
.eq(MedicationRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -60,7 +63,7 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
|
||||
/**
|
||||
* 新增药品目录
|
||||
*
|
||||
*
|
||||
* @param medicationDetail
|
||||
* @return
|
||||
*/
|
||||
@@ -83,4 +86,8 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdjustPriceMedListDto> searchMedListByKeyWord(String keyWord) {
|
||||
return this.medicationMapper.searchMedListByKeyWord(keyWord);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.openhis.nenu.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 公费医疗自付比例管理表Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("nenu_gf_ratio")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class GfRatio extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 比例类型(1大项比例2单项比例) */
|
||||
private Integer ratioType;
|
||||
|
||||
/** 公费项目分类(1药品2诊疗) */
|
||||
private Integer itemType;
|
||||
|
||||
/** 医保分项 */
|
||||
private String ybClass;
|
||||
|
||||
/** 医保等级 */
|
||||
private String ybLv;
|
||||
|
||||
/** 自付比例 */
|
||||
private BigDecimal selfRatio;
|
||||
|
||||
/** 二次报销的自付比例 */
|
||||
private BigDecimal twiceRatio;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startDate;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endDate;
|
||||
|
||||
/** 表id */
|
||||
private Long definitionId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.openhis.nenu.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 公费医疗自付比例调整申请表Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("nenu_gf_ratio_application")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class GfRatioApplication extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 申请编号 */
|
||||
private String busNo;
|
||||
|
||||
/** 公费项目分类(1药品2诊疗) */
|
||||
private Integer itemType;
|
||||
|
||||
/** 医保分项 */
|
||||
private String ybClass;
|
||||
|
||||
/** 医保等级 */
|
||||
private String ybLv;
|
||||
|
||||
/** 申请比例 */
|
||||
private BigDecimal applicationRatio;
|
||||
|
||||
/** 二次报销的自付比例 */
|
||||
private BigDecimal twiceRatio;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startDate;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endDate;
|
||||
|
||||
/** 申请状态(0处理中1通过2驳回3取消) */
|
||||
private Integer applicationStatus;
|
||||
|
||||
/** 申请人 */
|
||||
private String applicant;
|
||||
|
||||
/** 申请时间 */
|
||||
private Date applicationTime;
|
||||
|
||||
/** 申请原因 */
|
||||
private String applicationReason;
|
||||
|
||||
/** 测算盈亏负责人 */
|
||||
private String initialApprover;
|
||||
|
||||
/** 测算通过or驳回(0处理中1通过2驳回) */
|
||||
private Integer initialApprovalResult;
|
||||
|
||||
/** 测算时间 */
|
||||
private Date initialApprovalTime;
|
||||
|
||||
/** 测算意见 */
|
||||
private String initialApprovalOpinion;
|
||||
|
||||
/** 财务科负责人 */
|
||||
private String financeApprover;
|
||||
|
||||
/** 财务科通过or驳回(0处理中1通过2驳回) */
|
||||
private Integer financeApprovalResult;
|
||||
|
||||
/** 报批时间 */
|
||||
private Date financeApprovalTime;
|
||||
|
||||
/** 报批意见 */
|
||||
private String financeApprovalOpinion;
|
||||
|
||||
/** 会议结果录入人 */
|
||||
private String finalRecorder;
|
||||
|
||||
/** 会议通过or驳回(0处理中1通过2驳回) */
|
||||
private Integer finalApprovalResult;
|
||||
|
||||
/** 录入时间 */
|
||||
private Date finalRecordTime;
|
||||
|
||||
/** 录入意见 */
|
||||
private String finalApprovalOpinion;
|
||||
|
||||
/** 表id */
|
||||
private Long definitionId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.nenu.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* BPC返回对象
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@Data
|
||||
@TableName("nenu_transaction_response")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TransactionResponse extends HisBaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private BigDecimal id;
|
||||
|
||||
/**
|
||||
* 响应码:(枚举RespCode)00 表示成功,其它表示失败
|
||||
*/
|
||||
@Length(max = 2)
|
||||
@JSONField(name = "respCode")
|
||||
private String respCode;
|
||||
|
||||
/**
|
||||
* 响应码解释信息(需要Base64解密)
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "respMsg")
|
||||
private String respMsg;
|
||||
|
||||
/**
|
||||
* 交易类型:(枚举TranType)
|
||||
*/
|
||||
@Length(max = 1)
|
||||
@JSONField(name = "tranType")
|
||||
private String tranType;
|
||||
|
||||
/**
|
||||
* 交易金额:以分为单位的交易金额(订单总金额,同请求金额一致)
|
||||
*/
|
||||
@Length(max = 12)
|
||||
@JSONField(name = "txnAmt")
|
||||
private String txnAmt;
|
||||
|
||||
/**
|
||||
* 支付方式:(枚举PayType)
|
||||
*/
|
||||
@Length(max = 4)
|
||||
@JSONField(name = "payType")
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 终端流水号:终端号系统跟踪号,同请求报文原值返回,客户端收到应答报文需要验证traceNo字段值,需与请求报文值一致,如果不一致则丢包交易失败
|
||||
*/
|
||||
@Length(max = 6)
|
||||
@JSONField(name = "traceNo")
|
||||
private String traceNo;
|
||||
|
||||
/**
|
||||
* 交易时间:(yyyyMMddHHmmss)
|
||||
*/
|
||||
@Length(max = 14)
|
||||
@JSONField(name = "txnTime")
|
||||
private String txnTime;
|
||||
|
||||
/**
|
||||
* 支付订单号:银行返回系统订单号,需要保存该支付交易订单号
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "tradeNo")
|
||||
private String tradeNo;
|
||||
|
||||
/**
|
||||
* 第三方支付订单号
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "transNo")
|
||||
private String transNo;
|
||||
|
||||
/**
|
||||
* 商户号
|
||||
*/
|
||||
@Length(max = 15)
|
||||
@JSONField(name = "mid")
|
||||
private String mid;
|
||||
|
||||
/**
|
||||
* 商户名称
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "merName")
|
||||
private String merName;
|
||||
|
||||
/**
|
||||
* 终端号
|
||||
*/
|
||||
@Length(max = 8)
|
||||
@JSONField(name = "tid")
|
||||
private String tid;
|
||||
|
||||
/**
|
||||
* 商户系统订单号:同请求一致
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "merTradeNo")
|
||||
private String merTradeNo;
|
||||
|
||||
/**
|
||||
* 商户系统退款授权单号:同请求一致
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "vfTradeNo")
|
||||
private String vfTradeNo;
|
||||
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
@Length(max = 12)
|
||||
@JSONField(name = "discountAmt")
|
||||
private String discountAmt;
|
||||
|
||||
/**
|
||||
* 有效时间:二维码本身的有效时间,是相对时间,单位为秒,以接收方收到报文时间为起始点计时。不同类型的订单以及不同的订单状况会对应不同的默认有效时间和最大有效时间(可以为空)
|
||||
*/
|
||||
@Length(max = 8)
|
||||
@JSONField(name = "qrValidTime")
|
||||
private String qrValidTime;
|
||||
|
||||
/**
|
||||
* 二维码信息:主扫支付二维码,以二维码形式显示,手机APP扫二维码码消费
|
||||
*/
|
||||
@Length(max = 128)
|
||||
@JSONField(name = "scanCode")
|
||||
private String scanCode;
|
||||
|
||||
/**
|
||||
* 原交易类型:1、订单查询类交易填写原交易类型(被扫交易必填)2、非订单查询填写交易类型与tranType一致(可以为空)
|
||||
*/
|
||||
@Length(max = 1)
|
||||
@JSONField(name = "orgTranType")
|
||||
private String orgTranType;
|
||||
|
||||
/**
|
||||
* 原交易名称:订单查询类交易填写原交易名称,非订单查询填写交易名称(被扫交易必填)
|
||||
*/
|
||||
@Length(max = 30)
|
||||
@JSONField(name = "orgTxnName")
|
||||
private String orgTxnName;
|
||||
|
||||
/**
|
||||
* 订单数据:当tranType为F时,payType 值为ZFBA或WEIX时支付宝返回的tradeNo 或者微信返回的prepayId
|
||||
*/
|
||||
@Length(max = 64)
|
||||
@JSONField(name = "payData")
|
||||
private String payData;
|
||||
|
||||
/**
|
||||
* 付款主键ID
|
||||
*/
|
||||
private Long paymentId;
|
||||
|
||||
/**
|
||||
* 前台UI序号
|
||||
*/
|
||||
private Long index;
|
||||
|
||||
/**
|
||||
* 时间戳(中银建议)
|
||||
*/
|
||||
private Long time;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user