Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 years ago
parent
commit
1ef47a570b

+ 43 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/call/CallRecord.java

@ -0,0 +1,43 @@
package com.yihu.wlyy.entity.call;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Trick on 2017/11/9.
 */
@Entity
@Table(name = "manage_call_record")
public class CallRecord extends IdEntity {
    private String  code; //业务关联标识
    private String  callerNumber; //主叫号码
    private String  recipientNumber;//被叫号码
    private Integer  answerStatus;//接听状态: 1.接通,2. 队列中放弃,3.接通
    private Integer  serviceType; //服务类型:1.医生转接 2.代理咨询
    private String  serviceContent; //服务内容
    private Date createTime; //创建时间
    private Date  endTime; //通话结束时间
    private Date  updateTime; //更新时间
    private Date  callTime; //呼叫时间
    private String  talkTime; //通话时长(单位秒)格式 hh:mm:ss
    private String  userCode; //客服编码
    private String  userName; //客服名称
    private String  patient; //居民
    private String  patientName; //居民姓名
    private String  idcard; //身份证号
    private String  ssc; //社保卡号
    private String  doctor; //签约医生code
    private String  doctorName; //签约医生姓名
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
}

+ 45 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/call/CallService.java

@ -0,0 +1,45 @@
package com.yihu.wlyy.entity.call;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Trick on 2017/11/9.
 */
@Entity
@Table(name = "manage_call_service")
public class CallService extends IdEntity {
    private String code; //服务编号
    private String callCode; //关联通话记录
    private Integer serverType; //服务类型:0.医生咨询,1.预约挂号
    private String patient; //服务对象(患者code)
    private String patientName; // 服务对象名称(患者名称)
    private String ssc; // 社保卡号
    private String Idcard;  // 居民身份证号
    private String phone;  // 手机号
    private String doctor; // 医生code
    private String doctorName; //医生姓名
    private String serverContent; //服务内容
    private Integer state; //订单状态:0.草稿,1.待处理,2.完成
    private Date createTime; //创建时间
    private Date updateTime; //更新时间
    private String remark; //备注
    private Integer type; //服务类型:0.咨询,2.预约
    private Integer dealType; //处理方式:1.电话回复,2.客服回复
    private Date dealTime; //处理时间
    private Integer dealState; // 处理结果:1.完成,2.无法联系居民
    private String dealContent; // 处理内容
    private Integer dealReason; // 处理取消原因:0.没有号源、1.病人取消
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
}

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -486,7 +486,8 @@ public class PrescriptionExpressageService extends BaseService {
                        "  p.patient AS patientCode, " +
                        "  py.charge_time AS chargeTime, " +
                        "  p.dispensary_type AS dispensaryType, " +
                        "  p.`status` " +
                        "  p.`status` ," +
                        "  p.code AS prescriptionCode " +
                        " FROM " +
                        " wlyy_prescription p " +
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
@ -587,6 +588,8 @@ public class PrescriptionExpressageService extends BaseService {
                "  p.dispensary_type AS dispensaryType, " +
                "  p.drug_delivery_operator_name AS operatorName," +
                "  p.drug_delivery_flag AS drugDeliveryFlag, " +
                "  p.drug_delivery_time AS drugDeliveryTime," +
                "  p.code AS prescriptionCode," +
                "  p.`status` " +
                " FROM " +
                " wlyy_prescription p " +

+ 15 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -32,6 +32,7 @@ import com.yihu.wlyy.service.third.jw.JwArchivesService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.task.SignUploadTask;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.web.third.gateway.controller.doctor.GcDoctorController;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.lang3.StringUtils;
@ -39,6 +40,8 @@ import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
@ -66,6 +69,7 @@ import java.util.*;
@Transactional
public class FamilyContractService extends BaseService {
    private Logger logger = LoggerFactory.getLogger(FamilyContractService.class);
    @Autowired
    private DoctorPatientDao doctorPatientDao;
    @Autowired
@ -680,12 +684,18 @@ public class FamilyContractService extends BaseService {
            message.setOver("1");//未处理
            message.setData(temp.getCode());
            messageDao.save(message);
            // 发送消息给医生
            JSONObject jsonObject = doctorWorkTimeService.isDoctorWorking(doctor);
            if (jsonObject.getString("status").equals("1")) {
                //如果在工作时间内就推送
                pushMsgTask.put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.D_SW_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.家庭签约.name(), "您有一条新的家庭签约申请!", patient);
            try {
                // 发送消息给医生
                JSONObject jsonObject = doctorWorkTimeService.isDoctorWorking(doctor);
                if (jsonObject.getString("status").equals("1")) {
                    //如果在工作时间内就推送
                    pushMsgTask.put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.D_SW_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.家庭签约.name(), "您有一条新的家庭签约申请!", patient);
                }
            }catch (Exception e){
                logger.info("发送医生消息失败:"+e.getMessage());
            }
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            if (StringUtils.isNotEmpty(d.getOpenid())){
                String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";

+ 5 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -5,6 +5,7 @@ import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.education.*;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.event.ApplicationEvent;
import com.yihu.wlyy.logs.BusinessLogs;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.app.consult.ConsultService;
@ -27,6 +28,8 @@ import org.htmlparser.util.ParserException;
import org.htmlparser.visitors.TextExtractingVisitor;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
@ -47,6 +50,7 @@ import java.util.*;
@Api(description = "健康教育")
public class DoctorHealthEduArticleController extends WeixinBaseController {
    private Logger logger = LoggerFactory.getLogger(DoctorHealthEduArticleController.class);
    @Autowired
    private HealthEduArticleService healthEduArticleService;
    @Autowired
@ -446,6 +450,7 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
                        msgs.put(patientTemp.getCode(), content);
                    }
                }catch (Exception e){
                    logger.info("eduArticle_doctor:"+doctor.getCode()+" patient:"+p +" error:"+e.getMessage());
                    error(e);
                }
            }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -256,6 +256,7 @@ public class PrescriptionInfoController extends BaseController {
            PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
            //获取配送信息
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("prescriptionExpressage", prescriptionExpressage);