Преглед на файлове

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 години
родител
ревизия
06ff73eb13

+ 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;

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

@ -854,12 +854,15 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                    if (prescriptionDO.getStatus()!=30){
                                        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);
                                        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);
@ -885,6 +888,14 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                }
                            }
                            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);
                                        outpatientDao.updateHisStatusById(wlyyPrescriptionDO.getOutpatientId(),1);
                                        logger.info("更新门诊结算状态");
                                    }
                                }
                                prescriptionDao.updateStatusByRealOrder(waitPayDetailVO.getRecipeNo(),30,new Date());
                            }
                            logger.info("更新系统处方支付状态");