提交 2c7555ff authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 74622231
......@@ -188,6 +188,9 @@ public class ImChatTemplateImpl implements ImChatTemplate {
} else {
content = MessageFormat.format(content, patientSignInfo.getDoctorName());
if (MsgTempTypeEnum.REP_INTER.getValue().equals(sendImMsgDTO.getType())){
}
}
}
......
......@@ -11,6 +11,8 @@ import com.ebaiyihui.family.doctor.common.bo.Result;
import com.ebaiyihui.family.doctor.common.dto.MobileBenefitPackageDTO;
import com.ebaiyihui.family.doctor.common.vo.RegisterPatientVo;
import com.ebaiyihui.family.doctor.server.common.constants.CommonConstants;
import com.ebaiyihui.family.doctor.server.common.enums.SignStatus;
import com.ebaiyihui.family.doctor.server.common.enums.StatusEnum;
import com.ebaiyihui.family.doctor.server.entity.MobileBenefitPackageEntity;
import com.ebaiyihui.family.doctor.server.entity.PatientEntity;
import com.ebaiyihui.family.doctor.server.entity.PatientSignEntity;
......@@ -128,6 +130,18 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
registerPatientVo.setSignSeqId(map.get("signSeqId"));
PatientSignEntity patientSignEntity = patientSignMapper.selectById(Long.valueOf(map.get("signSeqId")));
registerPatientVo.setAdmId(patientSignEntity.getAdmId());
if (StatusEnum.FINISH_APPLY.getValue().equals(patientSignEntity.getStatus())
&& SignStatus.CANCEL.getValue().equals(patientSignEntity.getSignStatus())) {
QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>();
PatientSignEntity patientSign = new PatientSignEntity();
patientSign.setSignId(patientSignEntity.getId());
patientSign.setStatus(StatusEnum.IN_CONSULTATION.getValue());
patientSign.setSignStatus(SignStatus.SIGNED.getValue());
psWrapper.setEntity(patientSign);
patientSignEntity = patientSignMapper.selectOne(psWrapper);
registerPatientVo.setAdmId(patientSignEntity.getAdmId());
}
// 更新权益医生id
if (Objects.nonNull(patientSignEntity)) {
entity.setDoctorId(String.valueOf(patientSignEntity.getDoctorId()));
......@@ -156,8 +170,8 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
patientEntity.setUserId(entity.getUserId());
log.info("数据库不存在添加患者: {}", JSON.toJSONString(patientEntity));
patientMapper.insert(patientEntity);
}else {
if (!map.get("mobile").equals(patientEntity.getPhone())){
} else {
if (!map.get("mobile").equals(patientEntity.getPhone())) {
patientEntity.setPhone(map.get("mobile"));
patientMapper.updateById(patientEntity);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论