소스 검색

代码修改

LAPTOP-KB9HII50\70708 1 년 전
부모
커밋
1d7a5ab16a

+ 12 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1191,14 +1191,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }else if ("3".equalsIgnoreCase(outpatient.getOutpatientType())){
            BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "专家咨询费", "1", "专家咨询费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
        }else if ("4".equalsIgnoreCase(outpatient.getOutpatientType())){
            ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(outpatient.getPlanId()).orElse(null);
            if(serviceItemPlanDO!=null){
                if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
                    throw new RuntimeException("该计划已发起过咨询,请选择其他计划发起!");
            if(StringUtils.isNotBlank(outpatient.getPlanId())){
                ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(outpatient.getPlanId()).orElse(null);
                if(serviceItemPlanDO!=null){
                    if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
                        throw new ServiceException("该计划已发起过咨询,请选择其他计划发起!");
                    }
                    serviceItemPlanDO.setStatus("3");
                    serviceItemPlanDO.setRelationCode(outpatient.getId());
                    serviceItemPlanDao.save(serviceItemPlanDO);
                }
                serviceItemPlanDO.setStatus("3");
                serviceItemPlanDO.setRelationCode(outpatient.getId());
                serviceItemPlanDao.save(serviceItemPlanDO);
            }
            BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "康复咨询费", "6", "康复咨询费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
        }
@ -1215,7 +1217,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                wlyyPatientRegisterTimeDO = patientRegisterTimeDao.save(registerTimeDO);
            }
        } catch (Exception e) {
            throw new RuntimeException("号源已经被预约,请选择其他号源");
            throw new ServiceException("号源已经被预约,请选择其他号源");
        }
        if (!outpatientDO.getOutpatientType().equalsIgnoreCase("3")&&!outpatientDO.getOutpatientType().equalsIgnoreCase("4")){
            if (1==expressageDO.getOneselfPickupFlg()){
@ -1257,7 +1259,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            logger.info("眼科中心患者档案查询");
            PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(outpatient.getPatient());
            if (patientMappingDO==null){
                throw new Exception("您的信息在院内无档案,请确认就诊人信息,并重新保存就诊人信息!");
                throw new ServiceException("您的信息在院内无档案,请确认就诊人信息,并重新保存就诊人信息!");
            }
            logger.info("眼科中心患者档案查询");
        }
@ -5153,6 +5155,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(wlyyOutpatientDO.getPlanId()).orElse(null);
            if(serviceItemPlanDO!=null){
                serviceItemPlanDO.setStatus("0");
                serviceItemPlanDO.setRelationCode(null);
                serviceItemPlanDao.save(serviceItemPlanDO);
            }
        }

+ 0 - 3
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1820,9 +1820,6 @@ public class ImService {
                if(org.apache.commons.lang3.StringUtils.isNotBlank(wlyyOutpatientDO.getPlanId())){
                    ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(wlyyOutpatientDO.getPlanId()).orElse(null);
                    if(serviceItemPlanDO!=null){
                        if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
                            throw new RuntimeException("该计划已发起过咨询,请选择其他计划发起!");
                        }
                        serviceItemPlanDO.setStatus("1");
                        serviceItemPlanDO.setCompleteTime(DateUtil.getStringDate());
                        serviceItemPlanDao.save(serviceItemPlanDO);

+ 6 - 7
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -588,10 +588,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                         @ApiParam(name = "registerJson", value = "预约时间")
                                         @RequestParam(value = "registerJson", required = false) String registerJson,
                                         @ApiParam(name = "chargeType", value = "预约实体json")
                                         @RequestParam(value = "chargeType", required = false) String chargeType) throws Exception {
   /*     try {*/
                                         @RequestParam(value = "chargeType", required = false) String chargeType)  {
    try {
            WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson, expressageJson, registerJson, chargeType);
            if (wlyyOutpatientDO != null && null == wlyyOutpatientDO.getId() && !wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("3")
                    && !wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("4")) {
@ -630,12 +628,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                        logger.info("发送厦门i健康智能失败" + e.toString());
                    }
                }
                return success(BaseHospitalRequestMapping.Prescription.api_success, wlyyOutpatientDO);
            }
     /*   } catch (Exception e) {
        }catch (ServiceException se){
            return ObjEnvelop.getError(se.getMessage());
        }catch (Exception e) {
            return failedObjEnvelopException(e);
        }*/
        }
    }