Browse Source

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

mengkang 4 năm trước cách đây
mục cha
commit
b999bc89af

+ 17 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/message/dao/BaseBannerDao.java

@ -0,0 +1,17 @@
package com.yihu.jw.hospital.message.dao;
import com.yihu.jw.entity.hospital.message.BaseBannerDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author wangzhinan
 * @vsrsion 2.0
 * Created at 2020.07.08
 */
public interface BaseBannerDao extends PagingAndSortingRepository<BaseBannerDO, String>, JpaSpecificationExecutor<BaseBannerDO> {
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/message/dao/BaseBannerDoctorDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.hospital.message.dao;
import com.yihu.jw.entity.hospital.message.BaseBannerDO;
import com.yihu.jw.entity.hospital.message.BaseBannerDoctorDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author wangzhinan
 * @vsrsion 2.0
 * Created at 2020.07.08
 */
public interface BaseBannerDoctorDao extends PagingAndSortingRepository<BaseBannerDoctorDO, String>, JpaSpecificationExecutor<BaseBannerDoctorDO> {
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/message/dao/BaseUserMessageDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.hospital.message.dao;
import com.yihu.jw.entity.hospital.message.BaseBannerDO;
import com.yihu.jw.entity.hospital.message.BaseUserMessageDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author wangzhinan
 * @vsrsion 2.0
 * Created at 2020.07.08
 */
public interface BaseUserMessageDao extends PagingAndSortingRepository<BaseUserMessageDO, String>, JpaSpecificationExecutor<BaseUserMessageDO> {
}

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

@ -5460,31 +5460,32 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //根据门诊唯一号取就诊记录
//        List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByAdmNo(admNo);
        WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo,realOrder);
        Object result = "";
        System.out.println("获取顺丰物流面单信息:wlyyPrescriptionDOS != null=" + wlyyPrescriptionDOS != null);
        if (wlyyPrescriptionDOS != null) {
            List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId", wlyyPrescriptionDOS.getOutpatientId());
            WlyyPrescriptionExpressageDO sfexpress_obj = null;
            System.out.println("获取顺丰物流面单信息:CollectionUtils.isEmpty(expressageDOList)=" + CollectionUtils.isEmpty(expressageDOList));
            if (CollectionUtils.isEmpty(expressageDOList)) {
                throw new Exception("顺丰快递下单失败,未找到该处方的派送地址!");
            } else {
                System.out.println("获取顺丰物流面单信息:1");
                sfexpress_obj = expressageDOList.get(0);
                System.out.println("获取顺丰物流面单信息:2");
                BasePatientDO basePatientDO = basePatientDao.findById(wlyyPrescriptionDOS.getPatientCode());
                //如果该处方的快递单号已生成,则说明已经下单成功,不需要重复下单,直接返回面单信息
                System.out.println("获取顺丰物流面单信息:3");
                if (org.apache.commons.lang.StringUtils.isNotBlank(sfexpress_obj.getMailno())) {
                    //处方已下单成功
                    System.out.println("获取顺丰物流面单信息:4");
                } else {
                    //如果该处方的快递单号未生成,则继续下单
                    //根据业务订单号判断是否已经下单成功
                    //--2020.05.20--顺丰V2.0接口已不提供查询接口,直接单下单--START
        if (StringUtils.isNoneBlank(realOrder)){
            String str[] = realOrder.split(";");
            Object result = "";
            for (int i=0;i<str.length;i++){
                WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo,str[i]);
                System.out.println("获取顺丰物流面单信息:wlyyPrescriptionDOS != null=" + wlyyPrescriptionDOS != null);
                if (wlyyPrescriptionDOS != null) {
                    List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId", wlyyPrescriptionDOS.getOutpatientId());
                    WlyyPrescriptionExpressageDO sfexpress_obj = null;
                    System.out.println("获取顺丰物流面单信息:CollectionUtils.isEmpty(expressageDOList)=" + CollectionUtils.isEmpty(expressageDOList));
                    if (CollectionUtils.isEmpty(expressageDOList)) {
                        throw new Exception("顺丰快递下单失败,未找到该处方的派送地址!");
                    } else {
                        System.out.println("获取顺丰物流面单信息:1");
                        sfexpress_obj = expressageDOList.get(0);
                        System.out.println("获取顺丰物流面单信息:2");
                        BasePatientDO basePatientDO = basePatientDao.findById(wlyyPrescriptionDOS.getPatientCode());
                        //如果该处方的快递单号已生成,则说明已经下单成功,不需要重复下单,直接返回面单信息
                        System.out.println("获取顺丰物流面单信息:3");
                        if (org.apache.commons.lang.StringUtils.isNotBlank(sfexpress_obj.getMailno())) {
                            //处方已下单成功
                            System.out.println("获取顺丰物流面单信息:4");
                        } else {
                            //如果该处方的快递单号未生成,则继续下单
                            //根据业务订单号判断是否已经下单成功
                            //--2020.05.20--顺丰V2.0接口已不提供查询接口,直接单下单--START
//                    boolean go_on = sfexpressService.sfOrderSearchService(sfexpress_obj);
//
//                    //如果该业务订单号未下单成功过,则重新下单
@ -5494,22 +5495,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
//                        //保存快递单号和增加处方物流记录为配送
//                        sfexpressService.updatePrescriptionExpressage(sfexpress_obj);
//                    }
                    //--2020.05.20--顺丰V2.0接口已不提供查询接口,直接单下单--END
                            //--2020.05.20--顺丰V2.0接口已不提供查询接口,直接单下单--END
                    //请求顺丰接口下单,成功下单后,返回快递单号
                    sfexpress_obj = sfexpressService.postSFOrderService(sfexpress_obj);
                    System.out.println("获取顺丰物流面单信息:5");
                    //保存快递单号和增加处方物流记录为配送
                    sfexpressService.updatePrescriptionExpressage(sfexpress_obj);
                    System.out.println("获取顺丰物流面单信息:6");
                            //请求顺丰接口下单,成功下单后,返回快递单号
                            sfexpress_obj = sfexpressService.postSFOrderService(sfexpress_obj);
                            System.out.println("获取顺丰物流面单信息:5");
                            //保存快递单号和增加处方物流记录为配送
                            sfexpressService.updatePrescriptionExpressage(sfexpress_obj);
                            System.out.println("获取顺丰物流面单信息:6");
                }
                wlyyPrescriptionDOS.setStatus(32);
                prescriptionDao.save(wlyyPrescriptionDOS);
                if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
                    com.alibaba.fastjson.JSONObject object = sfexpressService.postSFOrderQueryService(sfexpress_obj);
                    System.out.println("获取顺丰物流面单信息7-1"+object.toJSONString());
                    System.out.println("获取顺丰物流面单信息:7");
                        }
                        wlyyPrescriptionDOS.setStatus(32);
                        prescriptionDao.save(wlyyPrescriptionDOS);
                        if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
                            com.alibaba.fastjson.JSONObject object = sfexpressService.postSFOrderQueryService(sfexpress_obj);
                            System.out.println("获取顺丰物流面单信息7-1"+object.toJSONString());
                            System.out.println("获取顺丰物流面单信息:7");
                   /* com.alibaba.fastjson.JSONObject sfJsonObject = new com.alibaba.fastjson.JSONObject();*/
                    /*sfJsonObject.put("mailno", sfexpress_obj.getMailno());
@ -5539,13 +5540,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    sfJsonObject.put("pay_method", 2);
                    sfJsonObject.put("receive_time", "");
                    sfJsonObject.put("dispensaryType", 2);*/
                    result = object;
                    System.out.println("获取顺丰物流面单信息:8");
                            result = object;
                            System.out.println("获取顺丰物流面单信息:8");
                        }
                    }
                }
                System.out.println("获取顺丰物流面单信息:9");
            }
            return result;
        }else {
            return "处方号未空!";
        }
        System.out.println("获取顺丰物流面单信息:9");
        return result;
    }
    /**

+ 74 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/message/BaseBannerDO.java

@ -0,0 +1,74 @@
package com.yihu.jw.entity.hospital.message;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * @author zmk
 * @vsrsion 1.0
 * Created at 2019/11/13
 */
@Entity
@Table(name = "base_banner")
public class BaseBannerDO extends UuidIdentityEntityWithOperator {
    /**
     *锦旗名称
     */
    private String name;
    /**
     *锦旗描述
     */
    private String desc;
    /**
     *锦旗图标
     */
    private String img;
    /**
     * 排序
     */
    private Integer sort;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
    public String getImg() {
        return img;
    }
    public void setImg(String img) {
        this.img = img;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
}

+ 55 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/message/BaseBannerDoctorDO.java

@ -0,0 +1,55 @@
package com.yihu.jw.entity.hospital.message;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * @author zmk
 * @vsrsion 1.0
 * Created at 2019/11/13
 */
@Entity
@Table(name = "base_banner_doctor")
public class BaseBannerDoctorDO extends UuidIdentityEntityWithOperator {
    /**
     *锦旗id
     */
    private String bannerId;
    /**
     *医生code
     */
    private String doctor;
    /**
     *医生名称
     */
    private String doctorName;
    public String getBannerId() {
        return bannerId;
    }
    public void setBannerId(String bannerId) {
        this.bannerId = bannerId;
    }
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
}

+ 107 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/message/BaseUserMessageDO.java

@ -0,0 +1,107 @@
package com.yihu.jw.entity.hospital.message;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * @author zmk
 * @vsrsion 1.0
 * Created at 2019/11/13
 */
@Entity
@Table(name = "base_user_message")
public class BaseUserMessageDO extends UuidIdentityEntityWithOperator {
    /**
     *发送者code
     */
    private String sender;
    /**
     * 发送者名字
     */
    private String senderName;
    /**
     *接收者
     */
    private String receiver;
    /**
     * 接收者名称
     */
    private String receiverName;
    /**
     *业务code
     */
    private String relationCode;
    /**
     * 业务类型
     */
    private String relationType;
    /**
     * 业务名称
     */
    private String relationName;
    public String getSender() {
        return sender;
    }
    public void setSender(String sender) {
        this.sender = sender;
    }
    public String getSenderName() {
        return senderName;
    }
    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }
    public String getReceiver() {
        return receiver;
    }
    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }
    public String getReceiverName() {
        return receiverName;
    }
    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }
    public String getRelationCode() {
        return relationCode;
    }
    public void setRelationCode(String relationCode) {
        this.relationCode = relationCode;
    }
    public String getRelationType() {
        return relationType;
    }
    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }
    public String getRelationName() {
        return relationName;
    }
    public void setRelationName(String relationName) {
        this.relationName = relationName;
    }
}