Browse Source

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/IntegerIdentityEntity.java
wangzhinan 2 years ago
parent
commit
247d8ba624

+ 20 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/BaseAppointmentLogDao.java

@ -0,0 +1,20 @@
package com.yihu.jw.hospital.prescription.dao;
import com.yihu.jw.entity.hospital.prescription.BaseAppointmentLogDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Trick on 2019/5/17.
 */
public interface BaseAppointmentLogDao extends PagingAndSortingRepository<BaseAppointmentLogDO, String>, JpaSpecificationExecutor<BaseAppointmentLogDO> {
    @Query("from BaseAppointmentLogDO a where a.orderCode = ?1 ")
    BaseAppointmentLogDO findOrderCode(String orderCode);
}

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

@ -53,6 +53,17 @@ public class PayInfoNoticeService {
        return null;
    }
    /**
     *
     * @param title 推送标题 (不能为空)
     * @param url 支付链接   (不能为空)
     * @param doctorName 就诊医生 (不能为空)
     * @param total 总费用 (不能为空)
     * @param mipay 医保支付 (不能为空)
     * @param selfPay 个人支付 (不能为空)
     * @return
     */
    public String pushPrescriptionPayMedicare(String patient,String doctorName,String orderNo,String outpatientId,String prescriptionId,String total,String mipay,String selfPay,String title,String url){
        BasePatientDO patientDO = patientDao.findById(patient);
        if (patientDO!=null){

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

@ -5185,6 +5185,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            remark = "点击完成支付,如您已支付请忽略本条信息";
            msgUrl="/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientId+"&id="+remindMsg;
            logger.info("处方支付微信消息模板推送开始");
        }else if ("diagnoPayRemind".equalsIgnoreCase(titelType)) {
            //开具处方后向患者发送支付提醒
            first = outpatientDO.getConsumerName() + ",您好! 您的问诊已结束,请及时结算费用。";
            contentMsg = "您好! 您的问诊已结束,请及时结算费用。";
            remark = "点击完成支付,如您已支付请忽略本条信息";
            msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
            logger.info("诊查费微信消息模板推送开始");
        } else if ("videoOrderRemind".equalsIgnoreCase(titelType)) {
            //视频复诊预约提醒
            if ("16".equals(type)) {
@ -5856,7 +5863,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        sql += " outpatient.disease_img AS \"disease_img\"," +
                "outpatient.description AS \"description\"," +
                "room.reservation_type AS \"reservation_type\"," +
                "outpatient.origin_con_no AS \"origin_con_no\" " +
                "outpatient.origin_con_no AS \"origin_con_no\", " +
                "outpatient.medical_state AS \"medicalState\" " +
                "FROM " +
                "wlyy_hospital_waiting_room room," +
                "base_patient patient," +
@ -7629,6 +7637,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "outpatient.disease_img AS \"disease_img\"," +
                "outpatient.description AS \"description\"," +
                "outpatient.origin_con_no AS \"origin_con_no\", " +
                "outpatient.medical_state AS \"medicalState\", " +
                "consult.consult AS \"consult\" " +
                "FROM " +
                "wlyy_hospital_waiting_room room," +
@ -7780,6 +7789,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "outpatient.consumer as \"consumer\"," +
                "outpatient.consumer_name as \"consumer_name\"," +
                "outpatient.consumer_mobile as \"consumerMobile\"," +
                "outpatient.medical_state as \"medicalState\"," +
                "room.reservation_type AS \"reservation_type\" " +
                "FROM " +
                "wlyy_hospital_waiting_room room," +
@ -9823,7 +9833,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        if ("0".equals(rsCode)) {
                            free = res.getString("@total_charge");
                        }
                        ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
                        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSendYlzMes");
                        if (hospitalSysDictDO==null){
                            ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
                        }else if (hospitalSysDictDO.getDictValue().equalsIgnoreCase("0")){
                            ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
                        }
                        if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                            String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientDO.getId()+"&id="+prescriptionId;
                            sendZsMsgFlow("OL_JSTX",outpatientDO.getId(),prescriptionId,msgUrl,"结算提醒");
@ -14379,8 +14394,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                logger.info("变更医保结算状态成功");
                String realOrder = msgInfoJson.getString("xtgzh0");
                List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByRealOrderAndStatusList(realOrder);
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode());
                String title = "";
                if (wlyyOutpatientDO.getHisStatus()==null){
                    title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!结算费用包含本次在线问诊的复诊诊查费:"+wlyyOutpatientDO.getFee()+"元。";
                }else {
                    title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!";
                }
                if (hisState){
                    wlyyOutpatientDO.setHisStatus(1);
                    outpatientDao.save(wlyyOutpatientDO);
                }
                for (WlyyPrescriptionDO prescriptionDO:wlyyPrescriptionDOS){
                    WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                   /* WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                    String title = "";
                    if (wlyyOutpatientDO.getHisStatus()==null){
                        title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!结算费用包含本次在线问诊的复诊诊查费:"+wlyyOutpatientDO.getFee()+"元。";
@ -14390,7 +14416,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    if (hisState){
                        wlyyOutpatientDO.setHisStatus(1);
                        outpatientDao.save(wlyyOutpatientDO);
                    }
                    }*/
                    WlyyPrescriptionLogDO prescriptionLogDO = new WlyyPrescriptionLogDO();
                    prescriptionLogDO.setCreateTime(new Date());
                    prescriptionLogDO.setStatus(30);
@ -14406,7 +14432,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    prescriptionDao.save(prescriptionDO);
                    logger.info("变更处方结算状态成功");
                    String fee = ylzMedicalRelationDO.getTotalAmount();
                    String pushPayLog =  payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getVoucherNo(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,ylzMedicalRelationDO.getMedicalPrice(),ylzMedicalRelationDO.getPersonCash(),title,null);
                    Double medicarePrice = Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())+Double.parseDouble(ylzMedicalRelationDO.getPersonAccount());
                    String pushPayLog =  payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getVoucherNo(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,medicarePrice+"",ylzMedicalRelationDO.getPersonCash(),title,null);
                    logger.info("处方结算成功"+pushPayLog+"====="+realOrder);
                    //2.6.1	电子处方订单接收
                    logger.info("医保电子处方订单");

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

@ -24,6 +24,7 @@ import com.yihu.jw.entity.hospital.doctor.WlyyPatientRegisterTimeDO;
import com.yihu.jw.entity.hospital.family.WlyyPatientFamilyMemberDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.BaseAppointmentLogDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionExpressageDO;
@ -37,6 +38,7 @@ import com.yihu.jw.hospital.family.dao.WlyyPatientFamilyMemberDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.prescription.dao.BaseAppointmentLogDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionExpressageDao;
@ -54,6 +56,7 @@ import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.utils.CheckSumBuilder;
import com.yihu.jw.utils.FileUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.mysql.query.BaseJpaService;
@ -134,6 +137,10 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    @Autowired
    private HttpClientUtil httpClientUtil;
    @Autowired
    private BaseAppointmentLogDao appointmentLogDao;
    @Autowired
    private HibenateUtils hibenateUtils;
@ -1135,4 +1142,94 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    }
    /**
     * 保存五缘预约系统的日志
     * @param appointmentLogDO
     * @return
     */
    public BaseAppointmentLogDO saveYkAppointment(BaseAppointmentLogDO appointmentLogDO){
        if (appointmentLogDO.getStatus()==2){
            appointmentLogDO = appointmentLogDao.findOrderCode(appointmentLogDO.getOrderCode());
            appointmentLogDO.setUpdateTime(new Date());
            appointmentLogDO.setStatus(2);
            return appointmentLogDao.save(appointmentLogDO);
        }else {
            appointmentLogDO.setUpdateTime(new Date());
            appointmentLogDO.setCreateTime(new Date());
            return appointmentLogDao.save(appointmentLogDO);
        }
    }
    /**
     * 条件(姓名、科室、医生)
     * @param condition
     * @param page
     * @param pageSize
     * @return
     */
    public List<Map<String, Object>> selectList(String condition,String startTime,String endTime,Integer page,Integer pageSize){
        List<Map<String, Object>> maps = new ArrayList<>();
        String sql = "SELECT\n" +
                "\tid AS \"id\",\n" +
                "\torder_code AS \"orderCode\",\n" +
                "\tcorp_no AS \"corpNo\",\n" +
                "\tdepartment_code AS \"departmentCode\",\n" +
                "\tdepartment_name AS \"departmentName\",\n" +
                "  doctor_code as \"doctorCode\",\n" +
                "  doctor_name as \"doctorName\",\n" +
                "  schedule_code as \"scheduleCode\",\n" +
                "  schedule_item_code as \"scheduleItemCode\",\n" +
                "  to_char(service_start_date,'YYYY-MM-DD hh24:mi:ss') as \"serviceStartDate\",\n" +
                "  to_char(service_end_date,'YYYY-MM-DD hh24:mi:ss') as \"serviceEndDate\",\n" +
                "  patient_name as \"patientName\",\n" +
                "  patient_card as \"patientCard\",\n" +
                "  patient_phone as \"patientPhone\",\n" +
                "  app_source as \"appSource\",\n" +
                "  appoint_way as \"appointWay\",\n" +
                "  status as \"status\"\n" +
                "FROM\n" +
                "\tbase_appointment_log where 1=1  ";
        Map<String, Object> params = new HashedMap();
        if (StringUtils.isNoneBlank(condition)){
            sql += " and  (patient_card like '%"+condition+"%' OR patient_name like '%"+condition+"%' OR patient_phone like '%"+condition+"%' OR doctor_name like '%"+condition+"%' OR department_name like '%"+condition+"%') ";
        }
        if (StringUtils.isNoneBlank(startTime)){
            sql +=" and service_start_date >=:startTime ";
            params.put("startTime",DateUtil.stringToDate(startTime, "yyyy-MM-dd HH:mm:ss"));
        }
        if (StringUtils.isNoneBlank(endTime)){
            sql +=" and service_start_date <=:endTime ";
            params.put("endTime",DateUtil.stringToDate(endTime, "yyyy-MM-dd HH:mm:ss"));
        }
        sql += " order by service_start_date desc ";
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql, params, page, pageSize);
        String sqlTotal = "select COUNT(1) AS \"total\" from base_appointment_log where 1=1 ";
        Map<String, Object> params1 = new HashedMap();
        if (StringUtils.isNoneBlank(condition)){
            sqlTotal += " and  (patient_card like '%"+condition+"%' OR patient_name like '%"+condition+"%' OR patient_phone like '%"+condition+"%' OR doctor_name like '%"+condition+"%' OR department_name like '%"+condition+"%') ";
        }
        if (StringUtils.isNoneBlank(startTime)){
            sqlTotal +=" and service_start_date >=:startTime ";
            params1.put("startTime",DateUtil.stringToDate(startTime, "yyyy-MM-dd HH:mm:ss"));
        }
        if (StringUtils.isNoneBlank(endTime)){
            sqlTotal +=" and service_start_date <=:endTime ";
            params1.put("endTime",DateUtil.stringToDate(endTime, "yyyy-MM-dd HH:mm:ss"));
        }
        Long count = 0L;
        List<Map<String, Object>> total = hibenateUtils.createSQLQuery(sqlTotal, params1);
        if (total != null) {
            //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
        }
        Map<String, Object> map = new HashedMap();
        map.put("count", count);
        map.put("list", mapList);
        maps.add(map);
        return maps;
    }
}

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

@ -3144,8 +3144,8 @@ public class EntranceService {
        if (result!=null&&result.size()!=0){
            net.sf.json.JSONObject object = result.getJSONObject(0);
            net.sf.json.JSONObject jsonObject = object.getJSONObject("retInfo");
            net.sf.json.JSONObject msgInfoJson = object.getJSONObject("msgInfo");
            if (jsonObject.getString("retCode").equalsIgnoreCase("00")){
                net.sf.json.JSONObject msgInfoJson = object.getJSONObject("msgInfo");
                if (msgInfoJson!=null){
                    net.sf.json.JSONObject resultJSON = msgInfoJson.getJSONObject("receipt");
                    if (resultJSON!=null){

+ 7 - 4
business/base-service/src/main/java/com/yihu/jw/wechat/enterprise/EnterpriseService.java

@ -77,6 +77,9 @@ public class EnterpriseService {
    public String getToken(String enterpriseId)throws Exception{
        logger.info("getToken");
        if (enterpriseId.equalsIgnoreCase("xm_zsyy_wx")){
            enterpriseId ="zsyy";
        }
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findOne(enterpriseId);
@ -514,6 +517,7 @@ public class EnterpriseService {
     */
    public String getEnterpriseJsapi_ticketByToken(String wxId) throws Exception {
        try {
            System.out.println("getEnterpriseJsapi_ticketByToken="+wxId);
            Iterable<EnterpriseJsApiTicket> jsapiTickets = null;
            WxWechatDO wxWechat = null;
@ -543,7 +547,7 @@ public class EnterpriseService {
            token = getToken(wxId);
            System.out.println("getticket_token:"+token);
            if (token != null) {
                String token_url = "https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket?";
                String token_url = "https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket";
                String params = "access_token=" + token ;
                String result = HttpUtil.sendGet(token_url, params);
                System.out.println("result:"+result);
@ -570,7 +574,6 @@ public class EnterpriseService {
                return null;
            }
        } catch (Exception e) {
            System.out.println(e.getMessage());
            throw new Exception(e.getMessage());
        }
    }
@ -583,7 +586,7 @@ public class EnterpriseService {
    public InputStream getInputStream(String mediaId, String wechat_appid) throws Exception {
        String accessToken = getToken(wechat_appid);
        InputStream is = null;
        String url = "https://qyapi.weixin.qq.com/cgi-bin/media/get/jssdk?access_token=" + accessToken + "&media_id=" + mediaId;
        String url = "https://qyapi.weixin.qq.com/cgi-bin/media/get?access_token=" + accessToken + "&media_id=" + mediaId;
//		String url = "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=30_OBJbMMPW9TnyGHKf32bcjkXtxWnzBrtqWlSMBnNk8MWpJ6qis2TnsecRYNZImgahdx30WrsI1bGco6K67-j4sT1QkDxYKBrVvjaYF6QgbY8dgBMzuoARKoaxtX3ehiYvdCLSUHvogrpF3n0GANIfCHAHUP&media_id=R_060hnyXAFyHD9HaOLl15xhDIzDvcA61-Wz34GkXmCakdrsFJqxrPEBHewmAEK9";
        logger.info("media/get" + url);
        try {
@ -626,7 +629,7 @@ public class EnterpriseService {
        logger.info("accessToken 过期时重新下载多媒体文件:wechat_appid:" + wechat_appid);
        logger.info("accessToken 过期时重新下载多媒体文件:mediaId:" + mediaId);
        InputStream is = null;
        String url = "https://qyapi.weixin.qq.com/cgi-bin/media/get/jssdk?access_token=" + accessToken + "&media_id=" + mediaId;
        String url = "https://qyapi.weixin.qq.com/cgi-bin/media/get?access_token=" + accessToken + "&media_id=" + mediaId;
        logger.info("media/get" + url);
        try {
            URL urlGet = new URL(url);

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

@ -4554,6 +4554,7 @@ public class ImService {
                    "patient.id AS \"patientId\"," +
                    "op.consumer AS \"consumer\"," +
                    "op.consumer_name AS \"consumerName\"," +
                    "op.medical_state AS \"medicalState\"," +
                    "patient.idcard AS \"patientIdcard\"," +
                    "patient.sex AS \"patientsex\"," +
                    "patient.photo AS \"patientphoto\",";
@ -4639,6 +4640,7 @@ public class ImService {
                    "op.general_doctor AS \"generalDoctor\"," +
                    "op.consumer AS \"consumer\"," +
                    "op.consumer_name AS \"consumerName\"," +
                    "op.medical_state AS \"medicalState\"," +
                    "patient.NAME AS \"patientName\"," +
                    "patient.id AS \"patientId\"," +
                    "patient.idcard AS \"patientIdcard\"," +

+ 3 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -25,7 +25,9 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
/*   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
/*
   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 169 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/BaseAppointmentLogDO.java

@ -0,0 +1,169 @@
package com.yihu.jw.entity.hospital.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 预约记录 目前对接眼科转线下预约
*
* @author
*
*/
@Entity
@Table(name = "base_appointment_log")
public class BaseAppointmentLogDO extends UuidIdentityEntityWithOperator {
   private String orderCode;
   private String corpNo;
   private String departmentCode;
   private String departmentName;
   private String doctorCode;//院区id
   private String doctorName;
   private String scheduleCode;
   private String scheduleItemCode;
   private Date serviceStartDate;
   private Date serviceEndDate;
   private String patientName;
   private String patientCard;
   private String patientPhone;
   private String appSource;
   private String appointWay;
   private Integer status;//0预约失败1预约成功2取消预约
    public String getOrderCode() {
        return orderCode;
    }
    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }
    public String getCorpNo() {
        return corpNo;
    }
    public void setCorpNo(String corpNo) {
        this.corpNo = corpNo;
    }
    public String getDepartmentCode() {
        return departmentCode;
    }
    public void setDepartmentCode(String departmentCode) {
        this.departmentCode = departmentCode;
    }
    public String getDepartmentName() {
        return departmentName;
    }
    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }
    public String getDoctorCode() {
        return doctorCode;
    }
    public void setDoctorCode(String doctorCode) {
        this.doctorCode = doctorCode;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public String getScheduleCode() {
        return scheduleCode;
    }
    public void setScheduleCode(String scheduleCode) {
        this.scheduleCode = scheduleCode;
    }
    public String getScheduleItemCode() {
        return scheduleItemCode;
    }
    public void setScheduleItemCode(String scheduleItemCode) {
        this.scheduleItemCode = scheduleItemCode;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "service_start_date", nullable = false, length = 0,updatable = false)
    public Date getServiceStartDate() {
        return serviceStartDate;
    }
    public void setServiceStartDate(Date serviceStartDate) {
        this.serviceStartDate = serviceStartDate;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "service_end_date", nullable = false, length = 0,updatable = false)
    public Date getServiceEndDate() {
        return serviceEndDate;
    }
    public void setServiceEndDate(Date serviceEndDate) {
        this.serviceEndDate = serviceEndDate;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getPatientCard() {
        return patientCard;
    }
    public void setPatientCard(String patientCard) {
        this.patientCard = patientCard;
    }
    public String getPatientPhone() {
        return patientPhone;
    }
    public void setPatientPhone(String patientPhone) {
        this.patientPhone = patientPhone;
    }
    public String getAppSource() {
        return appSource;
    }
    public void setAppSource(String appSource) {
        this.appSource = appSource;
    }
    public String getAppointWay() {
        return appointWay;
    }
    public void setAppointWay(String appointWay) {
        this.appointWay = appointWay;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
}

+ 1 - 1
gateway/ag-basic/pom.xml

@ -12,7 +12,7 @@
    <artifactId>ag-basic</artifactId>
    <version>${parent.version}</version>
    <packaging>war</packaging>
    <packaging>jar</packaging>
    <dependencies>
        <!-- 支持Tomcat启动 -->

+ 9 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -743,9 +743,16 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
					}
				}
				if (!free.equalsIgnoreCase("0")){
					ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, outpatientDO.getXtgzh(), outpatientDO.getDeptName(), outpatientDO.getDoctorName(), date, free, "1","WX_PUB");
				List<WlyyOutpatientDO> outpatientDOS = outpatientDao.findByRegisterNoList(outpatientDO.getRegisterNo());
				if (outpatientDOS!=null&&outpatientDOS.size()>1){
					outpatientDO.setHisStatus(1);
				}else {
					prescriptionService.sendWxTemplateMsg(wxId, outpatientDO.getId(), null,"", "diagnoPayRemind", "");
				}
				/*if (!free.equalsIgnoreCase("0")){
					ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, outpatientDO.getXtgzh(), outpatientDO.getDeptName(), outpatientDO.getDoctorName(), date, free, "1","WX_PUB");
				}*/
				logger.info("发送诊查费支付模板消息end");
			}
			outpatientDO.setEndTime(new Date());

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

@ -998,7 +998,11 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        logger.info("pageUrl="+pageUrl);
        logger.info("wxId="+wxId);
        String ticket = enterpriseService.getEnterpriseJsapi_ticketByToken(wxId);
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findOne(wxId);
        String id = "";
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
            id = "zsyy";
        }
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findOne(id);
        Map<Object, Object> map = new HashMap<Object, Object>();
        if (ticket != null) {
            String noncestr = UUID.randomUUID().toString();

+ 32 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.endpoint.prescription;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.BaseAppointmentLogDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.YkyyPrescriptionService;
@ -468,4 +469,35 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "saveYkAppointment")
    @ApiOperation(value = "保存预约记录", notes = "保存预约记录")
    public Envelop GetFYQD(@ApiParam(name = "jsonData", value = "json格式")
                           @RequestParam(value = "jsonData", required = false)String jsonData)throws Exception {
        try {
            BaseAppointmentLogDO baseAppointmentLogDO = toEntity(jsonData,BaseAppointmentLogDO.class);
            return success("ok",prescriptionService.saveYkAppointment(baseAppointmentLogDO));
        }catch (Exception e) {
            return  failedListEnvelopException(e);
        }
    }
    @GetMapping(value = "selectList")
    @ApiOperation(value = "查询预约记录", notes = "查询预约记录")
    public ListEnvelop selectList(@ApiParam(name = "condition", value = "姓名、科室、医生")
                           @RequestParam(value = "condition", required = false)String condition,
                              @ApiParam(name = "startTime", value = "开始时间")
                              @RequestParam(value = "startTime", required = false)String startTime,
                              @ApiParam(name = "endTime", value = "结束时间")
                                  @RequestParam(value = "endTime", required = false)String endTime,
                              @ApiParam(name = "page", value = "页码")
                                  @RequestParam(value = "page", required = false)Integer page,
                              @ApiParam(name = "pageSize", value = "页大小")
                                  @RequestParam(value = "pageSize", required = false)Integer pageSize)throws Exception {
        try {
            return success("ok",prescriptionService.selectList(condition,startTime,endTime,page,pageSize));
        }catch (Exception e) {
            return  failedListEnvelopException(e);
        }
    }
}