提交 dbe48757 authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 e43d5bf5
...@@ -9,7 +9,7 @@ import lombok.Data; ...@@ -9,7 +9,7 @@ import lombok.Data;
* @Description * @Description
*/ */
@Data @Data
public class AbnormalDataDTO extends ThirdPushDTO{ public class AbnormalDataDTO {
private String abnormalId; private String abnormalId;
......
...@@ -9,7 +9,7 @@ import lombok.Data; ...@@ -9,7 +9,7 @@ import lombok.Data;
* @Description * @Description
*/ */
@Data @Data
public class FollowUpOrderDTO extends ThirdPushDTO { public class FollowUpOrderDTO {
private String phone; private String phone;
......
...@@ -9,7 +9,7 @@ import lombok.Data; ...@@ -9,7 +9,7 @@ import lombok.Data;
* @Description * @Description
*/ */
@Data @Data
public class HealthInfoDTO extends ThirdPushDTO { public class HealthInfoDTO {
private String phone; private String phone;
} }
...@@ -10,7 +10,9 @@ import lombok.Data; ...@@ -10,7 +10,9 @@ import lombok.Data;
* @Description * @Description
*/ */
@Data @Data
public class NotifyConsultDataDTO extends ThirdPushDTO { public class NotifyConsultDataDTO {
private String supplierCode;
@ApiModelProperty(value = "激活订单ID", required = true) @ApiModelProperty(value = "激活订单ID", required = true)
// @NotBlank(message = "激活订单ID 不为空") // @NotBlank(message = "激活订单ID 不为空")
......
...@@ -9,7 +9,7 @@ import lombok.Data; ...@@ -9,7 +9,7 @@ import lombok.Data;
* @Description * @Description
*/ */
@Data @Data
public class SyncSignedOrderDTO extends ThirdPushDTO { public class SyncSignedOrderDTO {
private String doctorId; private String doctorId;
......
package com.ebaiyihui.family.doctor.common.dto;
import lombok.Data;
/**
* @ClassName: ThirdPushDTO
* @Author:yanliang
* @Date:2024/3/18 15:40
* @Description
*/
@Data
public class ThirdPushDTO {
private String supplierCode;
}
...@@ -9,7 +9,7 @@ import lombok.Data; ...@@ -9,7 +9,7 @@ import lombok.Data;
* @Description * @Description
*/ */
@Data @Data
public class UserInfoDTO extends ThirdPushDTO { public class UserInfoDTO {
private String phone; private String phone;
} }
...@@ -142,4 +142,6 @@ public class CommonConstants { ...@@ -142,4 +142,6 @@ public class CommonConstants {
public static final String SIGN_SECRET = "123456"; public static final String SIGN_SECRET = "123456";
public static final String SUPPLIER_CODE = "ZhongKang"; public static final String SUPPLIER_CODE = "ZhongKang";
public static final String SUPPLIER_CODE_JTYS = "zhongkang_mfd";
} }
...@@ -109,6 +109,18 @@ public class PatientServiceImpl implements PatientService { ...@@ -109,6 +109,18 @@ public class PatientServiceImpl implements PatientService {
return BaseResponse.error("已经有进行中的签约的医生,不能在进行签约!!!"); return BaseResponse.error("已经有进行中的签约的医生,不能在进行签约!!!");
} }
} else { } else {
QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>();
PatientSignEntity patientSign = new PatientSignEntity();
patientSign.setPatientPhone(reqVo.getPhone());
patientSign.setPackageOrderId(reqVo.getPackageOrderId());
patientSign.setSignStatus(SignStatus.NORMAL.getValue());
patientSign.setStatus(StatusEnum.IN_CONSULTATION.getValue());
psWrapper.setEntity(patientSign);
PatientSignEntity patientSignEntity = patientSignMapper.selectOne(psWrapper);
if (Objects.nonNull(patientSignEntity)) {
return BaseResponse.success(patientSignEntity.getAdmId());
}
// 查询排班医生信息 // 查询排班医生信息
ScheduleRecordEntity scheduleRecordEntity = getScheduleDoctor(reqVo.getPatientId()); ScheduleRecordEntity scheduleRecordEntity = getScheduleDoctor(reqVo.getPatientId());
doctorId = Long.valueOf(scheduleRecordEntity.getDoctorId()); doctorId = Long.valueOf(scheduleRecordEntity.getDoctorId());
...@@ -129,7 +141,8 @@ public class PatientServiceImpl implements PatientService { ...@@ -129,7 +141,8 @@ public class PatientServiceImpl implements PatientService {
} }
// 处理换绑医生 // 处理换绑医生
if (Objects.nonNull(reqVo.getAdmId()) || Objects.nonNull(reqVo.getSignSeqId())) { if ((Objects.nonNull(reqVo.getAdmId()) || Objects.nonNull(reqVo.getSignSeqId())
&& SignStatus.CANCEL.getValue().equals(reqVo.getSignStatus()))) {
QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>(); QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>();
PatientSignEntity patientSign = new PatientSignEntity(); PatientSignEntity patientSign = new PatientSignEntity();
if (Objects.nonNull(reqVo.getAdmId())) { if (Objects.nonNull(reqVo.getAdmId())) {
...@@ -198,6 +211,7 @@ public class PatientServiceImpl implements PatientService { ...@@ -198,6 +211,7 @@ public class PatientServiceImpl implements PatientService {
notifyConsultDataDTO.setPatientId(entity.getUserId()); notifyConsultDataDTO.setPatientId(entity.getUserId());
notifyConsultDataDTO.setExpertName(reqVo.getDoctorName()); notifyConsultDataDTO.setExpertName(reqVo.getDoctorName());
notifyConsultDataDTO.setOrderDate(DateUtils.dateToFullString(patientSignEntity.getCreateTime())); notifyConsultDataDTO.setOrderDate(DateUtils.dateToFullString(patientSignEntity.getCreateTime()));
notifyConsultDataDTO.setSupplierCode(CommonConstants.SUPPLIER_CODE_JTYS);
thirdOrderPushUtil.syncBenefitUsedOrder(notifyConsultDataDTO); thirdOrderPushUtil.syncBenefitUsedOrder(notifyConsultDataDTO);
} else { } else {
QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>(); QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>();
......
...@@ -31,9 +31,8 @@ public class ThirdOrderPushUtil { ...@@ -31,9 +31,8 @@ public class ThirdOrderPushUtil {
private ProjProperties projProperties; private ProjProperties projProperties;
public <T extends ThirdPushDTO> Map<String, String> getThirdHead(T t) { public <T> Map<String, String> getThirdHead(T t) {
log.info("业务入参:{}", t); log.info("业务入参:{}", t);
t.setSupplierCode(CommonConstants.SUPPLIER_CODE);
String param = JSONObject.toJSONString(t); String param = JSONObject.toJSONString(t);
log.info("业务数据:{}", param); log.info("业务数据:{}", param);
String assessToken = getAssessToken(); String assessToken = getAssessToken();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论