服务管理必填项校验
This commit is contained in:
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||||
import com.openhis.administration.domain.HealthcareService;
|
import com.openhis.administration.domain.HealthcareService;
|
||||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||||
@@ -19,9 +20,7 @@ import com.openhis.common.enums.AccountStatus;
|
|||||||
import com.openhis.common.enums.WhetherContainUnknown;
|
import com.openhis.common.enums.WhetherContainUnknown;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.web.basicservice.dto.HealthcareServiceAddOrUpdateParam;
|
import com.openhis.web.basicservice.dto.*;
|
||||||
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
|
||||||
import com.openhis.web.basicservice.dto.HealthcareServiceInitDto;
|
|
||||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -74,13 +73,17 @@ public class HealthcareServiceController {
|
|||||||
@PostMapping(value = "/healthcare-service")
|
@PostMapping(value = "/healthcare-service")
|
||||||
public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
||||||
// 服务管理-表单数据
|
// 服务管理-表单数据
|
||||||
HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
HealthcareServiceFormData healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
||||||
// 费用定价-表单数据
|
// 费用定价-表单数据
|
||||||
ChargeItemDefinition chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData();
|
ChargeItemDefinitionFormData chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData();
|
||||||
// 服务管理-新增
|
// 服务管理-新增
|
||||||
HealthcareService healthcareService = iHealthcareServiceService.addHealthcareService(healthcareServiceFormData);
|
HealthcareService healthcareService = new HealthcareService();
|
||||||
|
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
||||||
|
HealthcareService healthcareServiceAfterAdd = iHealthcareServiceService.addHealthcareService(healthcareService);
|
||||||
// 同时保存费用定价
|
// 同时保存费用定价
|
||||||
boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareService, chargeItemDefinitionFormData);
|
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||||
|
BeanUtils.copyProperties(chargeItemDefinitionFormData, chargeItemDefinition);
|
||||||
|
boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareServiceAfterAdd, chargeItemDefinition);
|
||||||
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"服务管理"})) :
|
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"服务管理"})) :
|
||||||
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||||
}
|
}
|
||||||
@@ -125,8 +128,10 @@ public class HealthcareServiceController {
|
|||||||
@PutMapping(value = "/healthcare-service")
|
@PutMapping(value = "/healthcare-service")
|
||||||
public R<?> edit(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
public R<?> edit(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
||||||
// 服务管理-表单数据
|
// 服务管理-表单数据
|
||||||
HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
HealthcareServiceFormData healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
||||||
boolean res = iHealthcareServiceService.updateHealthcareService(healthcareServiceFormData);
|
HealthcareService healthcareService = new HealthcareService();
|
||||||
|
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
||||||
|
boolean res = iHealthcareServiceService.updateHealthcareService(healthcareService);
|
||||||
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"服务管理"})) :
|
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"服务管理"})) :
|
||||||
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用定价管理表单数据
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-02-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ChargeItemDefinitionFormData {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "名称不能为空")
|
||||||
|
private String chargeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private PublicationStatus statusEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构ID
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "机构ID不能为空")
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "描述不能为空")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代码
|
||||||
|
*/
|
||||||
|
private String instanceTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联项目
|
||||||
|
*/
|
||||||
|
private Long instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效时间开始
|
||||||
|
*/
|
||||||
|
private Date effectiveStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效时间结束
|
||||||
|
*/
|
||||||
|
private Date effectiveEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务类别
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "财务类别不能为空")
|
||||||
|
private String typeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保类别
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "医保类别不能为空")
|
||||||
|
private String ybType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否使用详细价格规则
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否使用详细价格规则不能为空")
|
||||||
|
private Integer conditionFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础价格
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "基础价格不能为空")
|
||||||
|
private BigDecimal price;
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.openhis.web.basicservice.dto;
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
|
||||||
import com.openhis.administration.domain.HealthcareService;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,15 +9,15 @@ import lombok.Data;
|
|||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class HealthcareServiceAddOrUpdateParam{
|
public class HealthcareServiceAddOrUpdateParam {
|
||||||
/**
|
/**
|
||||||
* 服务管理
|
* 服务管理
|
||||||
*/
|
*/
|
||||||
private HealthcareService healthcareServiceFormData;
|
private HealthcareServiceFormData healthcareServiceFormData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用定价
|
* 费用定价
|
||||||
*/
|
*/
|
||||||
private ChargeItemDefinition chargeItemDefinitionFormData;
|
private ChargeItemDefinitionFormData chargeItemDefinitionFormData;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务项目管理表单数据
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-02-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class HealthcareServiceFormData {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动标记
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "活动标记不能为空")
|
||||||
|
private Integer activeFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供部门ID
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "提供部门ID不能为空")
|
||||||
|
private Long offeredOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务分类
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务分类不能为空")
|
||||||
|
private String categoryCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务类型不能为空")
|
||||||
|
private String typeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务专业
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务专业不能为空")
|
||||||
|
private String specialtyCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地点
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "地点不能为空")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额外细节
|
||||||
|
*/
|
||||||
|
private String extraDetails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "联系方式不能为空")
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约要求
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "预约要求不能为空")
|
||||||
|
private Integer appointmentRequiredFlag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊分类
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum OutpatientClass implements HisEnumInterface {
|
||||||
|
|
||||||
|
GENERAL_OUTPATIENT_SERVICE(1, "GOS", "普通门诊"),
|
||||||
|
EMERGENCY_TREATMENT(2, "ET", "急诊"),
|
||||||
|
HEALTH_COUNSELING(3, "HC", "健康咨询"),
|
||||||
|
SPECIALIZED_OUTPATIENT_DEPARTMENT(4, "SOD", "专科门诊"),
|
||||||
|
VIP_CLINIC(5, "VC", "特需门诊"),
|
||||||
|
SPECIALIZED_DISEASE_DEPARTMENT(6, "SOD", "专病门诊"),
|
||||||
|
APPOINTMENT_FOR_REGISTRATION(7, "AFR", "预约挂号"),
|
||||||
|
WESTERN_MEDICINE(11, "WM", "西医"),
|
||||||
|
TRADITIONAL_CHINESE_MEDICAL_SCIENCE(12, "TCMS", "中医"),
|
||||||
|
WESTERN_MEDICINE_EMERGENCY_DEPARTMENT(21, "WMED", "西医急诊"),
|
||||||
|
TRADITIONAL_CHINESE_MEDICINE_EMERGENCY(22, "TCME", "中医急诊"),
|
||||||
|
PHYSICAL_EXAMINATION(31, "PE", "体检"),
|
||||||
|
PREVENTIVE_MEDICAL_EXAMINATION(32, "PME", "预防体检"),
|
||||||
|
MATERNAL_AND_CHILD_HEALTH_CARE(33, "MACHC", "孕产保健"),
|
||||||
|
OTHER(99, "OT", "其他");
|
||||||
|
|
||||||
|
@EnumValue
|
||||||
|
private final Integer value;
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先级
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PriorityLevel implements HisEnumInterface {
|
||||||
|
|
||||||
|
EMERGENCY(1, "EM", "紧急"),
|
||||||
|
PRIORITY(2, "PR", "优先"),
|
||||||
|
ORDINARY(3, "OR", "普通"),
|
||||||
|
NOT_URGENT(4, "NU", "不紧急");
|
||||||
|
|
||||||
|
@EnumValue
|
||||||
|
private final Integer value;
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -37,10 +37,10 @@ public class Encounter extends HisBaseEntity {
|
|||||||
private String busNo;
|
private String busNo;
|
||||||
|
|
||||||
/** 状态编码 */
|
/** 状态编码 */
|
||||||
private EncounterStatus statusEnum;
|
private Integer statusEnum;
|
||||||
|
|
||||||
/** 类别编码 */
|
/** 类别编码 */
|
||||||
private EncounterClass classEnum;
|
private Integer classEnum;
|
||||||
|
|
||||||
/** 类别医保编码 */
|
/** 类别医保编码 */
|
||||||
private Integer ybClassEnum;
|
private Integer ybClassEnum;
|
||||||
@@ -49,16 +49,16 @@ public class Encounter extends HisBaseEntity {
|
|||||||
private String classJson;
|
private String classJson;
|
||||||
|
|
||||||
/** 优先级编码 */
|
/** 优先级编码 */
|
||||||
private ActPriority priorityEnum;
|
private Integer priorityEnum;
|
||||||
|
|
||||||
/** 分类编码 */
|
/** 分类编码 */
|
||||||
private EncounterType typeEnum;
|
private Integer typeEnum;
|
||||||
|
|
||||||
/** 服务ID */
|
/** 服务ID */
|
||||||
private Long serviceTypeId;
|
private Long serviceTypeId;
|
||||||
|
|
||||||
/** 就诊对象状态 */
|
/** 就诊对象状态 */
|
||||||
private EncounterSubjectStatus subjectStatusEnum;
|
private Integer subjectStatusEnum;
|
||||||
|
|
||||||
/** 开始时间 */
|
/** 开始时间 */
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user