Explorar el Código

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

wangjun hace 4 años
padre
commit
265623e83a

+ 5 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PayInfoNoticeService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.util.http.HttpClientUtil;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -18,14 +19,15 @@ public class PayInfoNoticeService {
    private BasePatientDao patientDao;
    public String pushPrescriptionPay(String patient,String doctorName,String orderNo,String outpatientId,String prescriptionId,String total){
    public String pushPrescriptionPay(String patient,String doctorName,String orderNo,String outpatientId,String prescriptionId,String total,String title,String url){
        BasePatientDO patientDO = patientDao.findById(patient);
        if (patientDO!=null){
            String userName = patientDO.getName();
            String idcard = patientDO.getIdcard();
            String phone = patientDO.getMobile();
            String title="您在厦门大学附属中山医院有一笔诊察/处方费用以支付完成!";
            String url = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientId+"&id="+prescriptionId;
            if (!StringUtils.isNotBlank(url)){
                url = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientId+"&id="+prescriptionId;
            }
            String remark = "结算方式:微信结算" +
                    "点击查看取药\n物流信息";
            return paySuccessNotice(userName,idcard,phone,title,url,doctorName,total,"0",total,orderNo,remark);

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

@ -7065,7 +7065,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "FROM\n" +
                "\twlyy_prescription P\n" +
                "WHERE\n" +
                "\t1 = 1 p.check_status not in (3,4) ";
                "\t1 = 1 and  p.check_status not in (3,4) ";
        Map<String, Object> params = new HashedMap();
        if (StringUtils.isNoneBlank(hospital)) {
            sql += " and p.hospital =:hospital";
@ -7094,7 +7094,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        sql += " order by p.create_time desc";
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql, params, page, pagesize);
        String sqlTotal = "select COUNT(1) AS \"total\" from wlyy_prescription p where 1=1  ";
        String sqlTotal = "select COUNT(1) AS \"total\" from wlyy_prescription p where 1=1 and  p.check_status not in (3,4)  ";
        Map<String, Object> params1 = new HashedMap();
        if (StringUtils.isNoneBlank(hospital)) {
            sqlTotal += " and p.hospital =:hospital";

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -147,6 +147,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            BasePatientDO patientDO = basePatientDao.findById(patient);
            outpatientVO.setSex(patientDO.getSex()+"");
            outpatientVO.setBirthday(patientDO.getBirthday());
            outpatientVO.setIdcard(patientDO.getIdcard());
            return outpatientVO;
        }
       return null;

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

@ -1149,13 +1149,13 @@ public class ImService {
			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}";
		}

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

@ -852,7 +852,17 @@ 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;
                                        String title = null;
                                        if (wlyyOutpatientDO.getHisStatus()!=null&&wlyyOutpatientDO.getHisStatus()==1){
                                            fee=(prescriptionDO.getDrugFee()+15)+"";
                                            title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!结算费用包含本次在线问诊的复诊诊查费:15元。";
                                        }else {
                                            fee=prescriptionDO.getDrugFee()+"";
                                            title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!";
                                        }
                                        String pushPayLog = payInfoNoticeService.pushPrescriptionPay(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),voucherNo,prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,title,null);
                                        WlyyPrescriptionLogDO prescriptionLogDO = new WlyyPrescriptionLogDO();
                                        prescriptionLogDO.setCreateTime(new Date());
                                        prescriptionLogDO.setStatus(30);
@ -863,20 +873,28 @@ 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("更新门诊结算状态");
                                   }
                                    List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByRealOrderList(waitPayDetailVO.getRecipeNo());
                                    if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
                                        WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                                        outpatientDao.updateHisStatusById(wlyyPrescriptionDO.getOutpatientId(),1);
                                        logger.info("更新门诊结算状态");
                                    }
                                }
                                prescriptionDao.updateStatusByRealOrder(waitPayDetailVO.getRecipeNo(),30,new Date());
                            }