dev
This commit is contained in:
parent
f658520fe0
commit
4a2bca7568
|
|
@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-05-07
|
* @since 2025-05-13
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|
@ -97,4 +97,10 @@ public class PatientInfo implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty("过敏史")
|
@ApiModelProperty("过敏史")
|
||||||
private String allergyHistory;
|
private String allergyHistory;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保余额")
|
||||||
|
private BigDecimal socialBalance;
|
||||||
|
|
||||||
|
@ApiModelProperty("险种类型")
|
||||||
|
private String insutype;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,4 +76,7 @@ public class RegistrationSaveDto {
|
||||||
private String certNo;
|
private String certNo;
|
||||||
@ApiModelProperty("证件类型")
|
@ApiModelProperty("证件类型")
|
||||||
private String certType;
|
private String certType;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保余额")
|
||||||
|
private BigDecimal insuBalance;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.syjiaer.clinic.server.service.patient;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM1101;
|
||||||
import com.syjiaer.clinic.server.common.api.input.IM2201;
|
import com.syjiaer.clinic.server.common.api.input.IM2201;
|
||||||
import com.syjiaer.clinic.server.common.api.input.IM2202;
|
import com.syjiaer.clinic.server.common.api.input.IM2202;
|
||||||
import com.syjiaer.clinic.server.common.api.input.IM2203A;
|
import com.syjiaer.clinic.server.common.api.input.IM2203A;
|
||||||
|
|
@ -98,18 +99,26 @@ public class PatientRegistrationService extends BaseService {
|
||||||
registration.setFstNo(fstNo);
|
registration.setFstNo(fstNo);
|
||||||
registration.setRegistrationMoney(new BigDecimal("0"));
|
registration.setRegistrationMoney(new BigDecimal("0"));
|
||||||
registration.setCreateDatetime(now);
|
registration.setCreateDatetime(now);
|
||||||
registration.setType(1);
|
|
||||||
registration.setStatus(1);
|
registration.setStatus(1);
|
||||||
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
||||||
|
if (docker == null){
|
||||||
|
throw new MessageException("挂号医生不存在");
|
||||||
|
}
|
||||||
|
|
||||||
OrganizationSection section = organizationSectionMapper.selectById(registration.getOrganizationSectionId());
|
OrganizationSection section = organizationSectionMapper.selectById(registration.getOrganizationSectionId());
|
||||||
|
|
||||||
|
if (section == null){
|
||||||
|
throw new MessageException("挂号科室不存在");
|
||||||
|
}
|
||||||
registration.setOrganizationDoctorId(docker.getId());
|
registration.setOrganizationDoctorId(docker.getId());
|
||||||
registration.setOrganizationSectionId(section.getId());
|
registration.setOrganizationSectionId(section.getId());
|
||||||
patientRegistrationMapper.insert(registration);
|
patientRegistrationMapper.insert(registration);
|
||||||
//医保挂号
|
|
||||||
if (mdtrtCertType == null || mdtrtCertNo == null || mdtrtCertType.isEmpty() || mdtrtCertNo.isEmpty()) {
|
if (registration.getType().equals(RegistrationTypeEnum.Common.getType())){
|
||||||
return registration;
|
return registration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//医保挂号额外流程
|
||||||
IM2201 im2201 = new IM2201();
|
IM2201 im2201 = new IM2201();
|
||||||
im2201.setPsnNo(registration.getPsnNo());
|
im2201.setPsnNo(registration.getPsnNo());
|
||||||
im2201.setInsutype(registration.getInsutype());
|
im2201.setInsutype(registration.getInsutype());
|
||||||
|
|
@ -125,9 +134,19 @@ public class PatientRegistrationService extends BaseService {
|
||||||
JSONObject jsonObject = socialRequest.call2201(im2201);
|
JSONObject jsonObject = socialRequest.call2201(im2201);
|
||||||
UpdateWrapper<PatientRegistration> regisWrapper = new UpdateWrapper<>();
|
UpdateWrapper<PatientRegistration> regisWrapper = new UpdateWrapper<>();
|
||||||
regisWrapper.set("mdtrt_id", ((JSONObject) jsonObject.get("data")).get("mdtrt_id"));
|
regisWrapper.set("mdtrt_id", ((JSONObject) jsonObject.get("data")).get("mdtrt_id"));
|
||||||
regisWrapper.set("type", 2);
|
regisWrapper.set("type",RegistrationTypeEnum.Social.getType());
|
||||||
regisWrapper.eq("id", registration.getId());
|
regisWrapper.eq("id", registration.getId());
|
||||||
patientRegistrationMapper.update(null, regisWrapper);
|
patientRegistrationMapper.update(null, regisWrapper);
|
||||||
|
//更新用户医保余额
|
||||||
|
PatientInfo patientInfo = patientInfoMapper.selectById(registration.getPatientInfoId());
|
||||||
|
|
||||||
|
PatientInfo updatePatientInfo = new PatientInfo();
|
||||||
|
updatePatientInfo.setId(patientInfo.getId());
|
||||||
|
updatePatientInfo.setInsutype(registration.getInsutype());
|
||||||
|
updatePatientInfo.setSocialBalance(registrationParam.getInsuBalance());
|
||||||
|
patientInfoMapper.updateById(updatePatientInfo);
|
||||||
|
|
||||||
|
|
||||||
return registration;
|
return registration;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ public class SocialUserService {
|
||||||
//缓存入redis
|
//缓存入redis
|
||||||
String key = "social_user_info:" + socialPersonInfoVo.getBaseinfo().getPsn_no();
|
String key = "social_user_info:" + socialPersonInfoVo.getBaseinfo().getPsn_no();
|
||||||
cacheUtil.set(key, socialPersonInfoVo, 60 * 10);
|
cacheUtil.set(key, socialPersonInfoVo, 60 * 10);
|
||||||
|
|
||||||
return socialPersonInfoVo;
|
return socialPersonInfoVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue