Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionExpressageLogDO.java
wangzhinan 4 years ago
parent
commit
e4a6cde5b6

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

@ -1144,18 +1144,18 @@ public class ImService {
			BaseDoctorDO doctor = baseDoctorDao.findById(doctorCode);
//			doctorCode = doctor.getCode();
			// 查询患者信息
			BasePatientDO p = basePatientDao.findById(wlyyOutpatientDO.getPatient());
			BasePatientDO p = basePatientDao.findById(patient);
			
			if(!"0".equals(wlyyOutpatientDO.getStatus())){
				throw new RuntimeException("该就诊记录已被取消,无法接单!");
			}
			
			BasePatientDO patientDO = basePatientDao.findById(wlyyOutpatientDO.getPatient());
			JSONObject jsonObject = new JSONObject();
			jsonObject.put("title", p.getName() + "申请复诊");
			jsonObject.put("title", patientDO.getName() + "申请复诊");
			jsonObject.put("content",wlyyOutpatientDO.getDescription());
			jsonObject.put("age",DateUtil.getAgeForIdcard(p.getIdcard()));
			jsonObject.put("sex",p.getSex());
			jsonObject.put("name",p.getName());
			jsonObject.put("age",DateUtil.getAgeForIdcard(patientDO.getIdcard()));
			jsonObject.put("sex",patientDO.getSex());
			jsonObject.put("name",patientDO.getName());
			ConsultDo consultDo = consultDao.findByRelationCode(outpatientCode);
			if (consultDo==null){

+ 1 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -438,8 +438,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
				String date=DateUtil.dateToStr(outpatientDO.getRegisterDate(), "yyyyMMddHHmmss");
				ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, null, outpatientDO.getDeptName(), outpatientDO.getDoctorName(), date, "15", "1");
			}
		}
*/
		}*/
		if(1 == resutl){
			jsonStr = "{\"id\":\""+ UUID.randomUUID().toString()+"\",\"sender_id\":\""+doctorCode+"\",\"sender_name\":\"系统\",\"timestamp\":"+new Date().getTime()+",\"content_type\":7,\"content\":"+msgObj.toString()+",\"business_type\":1}";
		}

+ 18 - 11
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -852,7 +852,14 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                for (WlyyPrescriptionDO prescriptionDO:prescriptionDOList){
                                    String patient = prescriptionDO.getPatientCode();
                                    if (prescriptionDO.getStatus()!=30){
                                        String pushPayLog = payInfoNoticeService.pushPrescriptionPay(prescriptionDO.getPatientCode(),prescriptionDO.getDoctorName(),voucherNo,prescriptionDO.getOutpatientId(),prescriptionDO.getId(),prescriptionDO.getDrugFee().toString());
                                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                                        String fee=null;
                                        if (wlyyOutpatientDO.getHisStatus()!=null&&wlyyOutpatientDO.getHisStatus()==1){
                                            fee=(prescriptionDO.getDrugFee()+15)+"";
                                        }else {
                                            fee=prescriptionDO.getDrugFee()+"";
                                        }
                                        String pushPayLog = payInfoNoticeService.pushPrescriptionPay(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),voucherNo,prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee);
                                        WlyyPrescriptionLogDO prescriptionLogDO = new WlyyPrescriptionLogDO();
                                        prescriptionLogDO.setCreateTime(new Date());
                                        prescriptionLogDO.setStatus(30);
@ -863,21 +870,21 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                        prescriptionLogDO.setUserType(1);
                                        prescriptionLogDO.setDatajson("处方结算");
                                        prescriptionLogDao.save(prescriptionLogDO);
                                        for (WaitPayDetailVO waitPayDetailVO1:listWPD){
                                            if (waitPayDetailVO1.getItemName().equalsIgnoreCase("互联网医院复诊诊查费")){
                                                List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByRealOrderList(waitPayDetailVO1.getRecipeNo());
                                                if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
                                                    WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                                                    outpatientDao.updateHisStatusById(wlyyPrescriptionDO.getOutpatientId(),1);
                                                    logger.info("更新门诊结算状态");
                                                }
                                            }
                                        }
                                        logger.info("处方结算成功"+pushPayLog+"====="+waitPayDetailVO.getRecipeNo());
                                    }
                                }
                            }
                            for (WaitPayDetailVO waitPayDetailVO:listWPD){
                                if (waitPayDetailVO.getItemName().equalsIgnoreCase("互联网医院复诊诊查费")){
                                   List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByRealOrderList(waitPayDetailVO.getRecipeNo());
                                   if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
                                       WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                                       WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
                                       outpatientDao.updateHisStatusById(wlyyPrescriptionDO.getOutpatientId(),1);
                                       logger.info("更新门诊结算状态");
                                   }
                                }
                                prescriptionDao.updateStatusByRealOrder(waitPayDetailVO.getRecipeNo(),30,new Date());
                            }
                            logger.info("更新系统处方支付状态");