Browse Source

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

wangjun 4 years ago
parent
commit
1755d42117

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

@ -833,7 +833,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "复诊-诊查费", "2", "复诊-诊查费", patientDO.getId(), patientDO.getName(), outpatient.getDoctor(), price);
        BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "复诊-诊查费", "2", "复诊-诊查费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
        WlyyPatientRegisterTimeDO registerTimeDO = null;
        WlyyPatientRegisterTimeDO wlyyPatientRegisterTimeDO =new WlyyPatientRegisterTimeDO();
@ -3627,7 +3627,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outPatientId);
        try {
            if (wxId.equalsIgnoreCase("xm_ykyy_wx")) {
                businessOrderService.orderRefund(wxId, wlyyOutpatientDO.getPatient(), businessOrderDO.getOrderNo(), businessOrderDO.getPayPrice(), description);
                businessOrderService.orderRefund(wxId, wlyyOutpatientDO.getConsumer(), businessOrderDO.getOrderNo(), businessOrderDO.getPayPrice(), description);
                //眼科接诊时更新眼科通状态
                if (!flag){
                    if (businessOrderDO!=null){

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

@ -4,7 +4,6 @@ package com.yihu.jw.hospital.prescription.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.base.area.BaseDrugStoreDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxWechatDO;
@ -17,7 +16,6 @@ import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.hospital.consult.dao.HospitalWaitingRoomDao;
import com.yihu.jw.hospital.doctor.dao.PatientRegisterTimeDao;
import com.yihu.jw.hospital.drugstore.dao.BaseDrugStoreDao;
import com.yihu.jw.hospital.drugstore.service.BaseDrugStoreService;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
@ -35,7 +33,6 @@ import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -192,8 +189,8 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        businessOrderDO.setRelationName("复诊-诊查费");
        businessOrderDO.setDescription("复诊-诊查费");
        businessOrderDO.setRematk(outpatient.getDescription());
        businessOrderDO.setPatient(outpatient.getPatient());
        businessOrderDO.setPatientName(outpatient.getPatientName());
        businessOrderDO.setPatient(outpatient.getConsumer());
        businessOrderDO.setPatientName(outpatient.getConsumerName());
        businessOrderDO.setDoctor(outpatient.getDoctor());
        if (outpatientDO.getType().equalsIgnoreCase("1")) {
            businessOrderDO.setOrderType(1);
@ -256,8 +253,8 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            waitingRoom.setGeneralDoctorName(outpatientDO.getGeneralDoctorName());
        }
        waitingRoom.setPatientId(outpatientDO.getPatient());
        waitingRoom.setPatientName(outpatientDO.getPatientName());
        waitingRoom.setPatientId(outpatientDO.getConsumer());
        waitingRoom.setPatientName(outpatientDO.getConsumerName());
        waitingRoom.setReservationTime(outpatientDO.getRegisterDate());
        waitingRoom.setVisitStatus(0);
        //设置复诊类型

+ 3 - 2
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -140,6 +140,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        List<BusinessOrderDO> businessOrderDOS = new ArrayList<>();
        if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(wlyyPrescriptionDO.getId());
            if (businessOrderDO==null){
@ -155,8 +156,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                businessOrderDO.setOrderCategory("4");
                businessOrderDO.setOrderType(4);
                businessOrderDO.setDoctor(wlyyPrescriptionDO.getDoctor());
                businessOrderDO.setPatient(wlyyPrescriptionDO.getPatientCode());
                businessOrderDO.setPatientName(wlyyPrescriptionDO.getPatientName());
                businessOrderDO.setPatient(outpatientDO.getConsumer());
                businessOrderDO.setPatientName(outpatientDO.getConsumerName());
                BigDecimal b = new BigDecimal(String.valueOf(wlyyPrescriptionDO.getDrugFee()));
                BigDecimal c = new BigDecimal(String.valueOf(100));
                BigDecimal bc = b.multiply(c);

+ 31 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java

@ -84,12 +84,12 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
	private String deptName;
    /**
	 * 居民code
	 * 当前居民code
	 */
	private String patient;
    /**
	 * 居民名称
	 * 当前居民名称
	 */
	private String patientName;
@ -242,6 +242,17 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
     * 0未结算1已结算
     */
    private Integer hisStatus;
    /**
     * 代就诊人
     */
    private String consumer;
    /**
     * 代就诊人名字
     */
    private String consumerName;
    @Column(name = "remind_count")
    public Integer getRemindCount() {
        return remindCount;
@ -634,4 +645,22 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    public void setHisStatus(Integer hisStatus) {
        this.hisStatus = hisStatus;
    }
    @Column(name = "consumer")
    public String getConsumer() {
        return consumer;
    }
    public void setConsumer(String consumer) {
        this.consumer = consumer;
    }
    @Column(name = "consumer_name")
    public String getConsumerName() {
        return consumerName;
    }
    public void setConsumerName(String consumerName) {
        this.consumerName = consumerName;
    }
}

+ 22 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyOutpatientVO.java

@ -220,6 +220,12 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    @ApiModelProperty(value = "来源", example = "来源")
    private String source;
    @ApiModelProperty(value = "代接诊人", example = "代接诊人")
    private String consumer;
    @ApiModelProperty(value = "代接诊人名字", example = "代接诊人名字")
    private String consumerName;
    public String getAdmNo() {
@ -500,4 +506,20 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    public void setSource(String source) {
        this.source = source;
    }
    public String getConsumer() {
        return consumer;
    }
    public void setConsumer(String consumer) {
        this.consumer = consumer;
    }
    public String getConsumerName() {
        return consumerName;
    }
    public void setConsumerName(String consumerName) {
        this.consumerName = consumerName;
    }
}

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

@ -16,14 +16,12 @@ import com.yihu.jw.entity.hospital.article.KnowledgeArticleUserDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionLogDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.hospital.dao.consult.KnowledgeArticleUserDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.prescription.dao.OauthYlzConfigDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.PayInfoNoticeService;
import com.yihu.jw.hospital.prescription.service.PrescriptionExpressageService;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
@ -151,6 +149,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private PayInfoNoticeService payInfoNoticeService;
    @Autowired
    private OutpatientDao outpatientDao;
    @Autowired
    private PrescriptionLogDao prescriptionLogDao;
    private String successxml = "SUCCESS";
@ -852,6 +852,16 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                    String patient = prescriptionDO.getPatientCode();
                                    if (prescriptionDO.getStatus()!=30){
                                        String pushPayLog = payInfoNoticeService.pushPrescriptionPay(prescriptionDO.getPatientCode(),prescriptionDO.getDoctorName(),voucherNo,prescriptionDO.getOutpatientId(),prescriptionDO.getId(),prescriptionDO.getDrugFee().toString());
                                        WlyyPrescriptionLogDO prescriptionLogDO = new WlyyPrescriptionLogDO();
                                        prescriptionLogDO.setCreateTime(new Date());
                                        prescriptionLogDO.setStatus(30);
                                        prescriptionLogDO.setOutpatientId(prescriptionDO.getOutpatientId());
                                        prescriptionLogDO.setPrescriptionCode(prescriptionDO.getId());
                                        prescriptionLogDO.setUserCode(prescriptionDO.getPatientCode());
                                        prescriptionLogDO.setUserName(prescriptionDO.getPatientName());
                                        prescriptionLogDO.setUserType(1);
                                        prescriptionLogDO.setDatajson("处方结算");
                                        prescriptionLogDao.save(prescriptionLogDO);
                                        logger.info("处方结算成功"+pushPayLog+"====="+waitPayDetailVO.getRecipeNo());
                                    }
                                }