فهرست منبع

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

Shi Kejing 4 سال پیش
والد
کامیت
b7e7d936fe

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

@ -4404,7 +4404,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getConsumerName()));
                newConfig.setKeyword1( "处方支付");
                newConfig.setKeyword2(outpatientDO.getHospitalName());
                newConfig.setKeyword3( outpatientDO.getDoctorName());
                newConfig.setKeyword3(outpatientDO.getDoctorName());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 处方支付提醒开始");
@ -10711,6 +10711,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //同步眼科医院
            logger.info("开始同步眼科医院");
            ykyyEntranceService.saveKsjc(baseNatAppointmentDO,demoFlag);
            //预约成功后发送支付模板消息
            sendYktemplateMessage(baseNatAppointmentDO.getId(),false);
            logger.info("结束同步眼科医院");
            returnMap.put("msg","预约成功");
            returnMap.put("status","200");
@ -10729,7 +10731,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (!StringUtils.isNoneBlank(baseNatAppointmentDO.getRealOrder())){
            throw new Exception("核酸项目不存在");
        }
        logger.info("模板消息推送标识pushFlag"+pushFlag);
        if (!StringUtils.isNoneBlank(pushFlag)){
            String recipeTime = DateUtil.dateToStr(new Date(), "yyyyMMddHHmmss");
@ -10798,9 +10799,90 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                logger.info("支付宝模板消息"+reponse);
            }
         }
         return "发送成功!";
    }
    public String sendYktemplateMessage(Integer id,boolean isPayed)  {
        BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findOne(id);
        if (baseNatAppointmentDO==null){
            return "核酸项目不存在,发送失败";
        }
        List<BasePatientWechatDo> ps = new ArrayList<BasePatientWechatDo>();
        BasePatientDO patientDO = basePatientDao.findById(baseNatAppointmentDO.getPatientId());
        String userName = "";
        if (patientDO != null) {
            userName = patientDO.getName();
        }
        if (StringUtils.isNotEmpty(baseNatAppointmentDO.getPatientId())){
            ps = basePatientWechatDao.findByWechatIdAndPatientId(wechatId, baseNatAppointmentDO.getPatientId());
        }
        if (ps.isEmpty()) {
            logger.info("该用户没有openid,无法推送模版消息,用户ID:" + baseNatAppointmentDO.getPatientId() + "wechatId:" + wechatId);
        }
        Map<String,Object> map = ykyyEntranceService.findYkDoctor(baseNatAppointmentDO.getHospitalFlag());
        WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
        for (BasePatientWechatDo one : ps) {
            try {
                if (isPayed){
                    //眼科预约成功后消息提醒
                    WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
                    String scene = "hsyycgtx";
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_hsyycg_notice", scene, 1);
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1",userName));
                    newConfig.setKeyword1("核酸检测预约单支付");
                    newConfig.setKeyword3(map.get("doctorName")==null?"":map.get("doctorName").toString());
                    newConfig.setKeyword4(userName);
                    newConfig.setKeyword5(DateUtil.dateToStrLong(baseNatAppointmentDO.getAppointmentTime()));
                    newConfig.setRemark(config.getRemark().replace("key1",userName).replace("key2",DateUtil.dateToStrLong(baseNatAppointmentDO.getAppointmentTime())));
                    newConfig.setUrl(newConfig.getUrl()+baseNatAppointmentDO.getId());
                    logger.info("=======setUrlhsyycgtx========" + newConfig.getUrl());
                    logger.info("发送的消息="+ com.alibaba.fastjson.JSONObject.toJSONString(newConfig));
                    logger.info("调用眼科微信模板消息接口的入参:AccessToken="+wxAccessTokenDO.getAccessToken()+"---Openid="+one.getOpenid());
                    weixinMessagePushUtils.putWxMsg(wxAccessTokenDO.getAccessToken(), one.getOpenid(), newConfig);
                    //保存发送模板记录,
                    WxPushLogDO wxPushLogDO = new WxPushLogDO();
                    wxPushLogDO.setCreateTime(new Date());
                    wxPushLogDO.setOpenid(one.getOpenid());
                    wxPushLogDO.setReceiver(baseNatAppointmentDO.getPatientId());
                    wxPushLogDO.setWechatId(wechatId);
                    wxPushLogDO.setScene(scene);
                    wxPushLogDao.save(wxPushLogDO);
                }else {
                    WxTemplateConfigDO newPayNotice = new WxTemplateConfigDO();
                    String scenePayNotice= "hszftx";
                    //眼科核酸预约成功后支付提醒
                    WxTemplateConfigDO configPayNotice = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_hszf_notice", scenePayNotice, 1);
                    BeanUtils.copyProperties(configPayNotice, newPayNotice);
                    newPayNotice.setFirst(configPayNotice.getFirst().replace("key1",userName));
                    newPayNotice.setKeyword1("核酸检测预约单支付");
                    newPayNotice.setKeyword3(map.get("doctorName")==null?"":map.get("doctorName").toString());
                    newPayNotice.setRemark(configPayNotice.getRemark());
                    newPayNotice.setUrl(configPayNotice.getUrl()+baseNatAppointmentDO.getId());
                    logger.info("=======setUrlhszftx========" + newPayNotice.getUrl());
                    logger.info("发送的消息="+ com.alibaba.fastjson.JSONObject.toJSONString(newPayNotice));
                    logger.info("发送核酸预约模板消息成功");
                    logger.info("调用眼科微信模板消息支付提醒接口的入参:AccessToken="+wxAccessTokenDO.getAccessToken()+"---Openid="+one.getOpenid());
                    weixinMessagePushUtils.putWxMsg(wxAccessTokenDO.getAccessToken(), one.getOpenid(), newPayNotice);
                    //保存发送模板记录,
                    WxPushLogDO wxPushLogDO = new WxPushLogDO();
                    wxPushLogDO.setCreateTime(new Date());
                    wxPushLogDO.setOpenid(one.getOpenid());
                    wxPushLogDO.setReceiver(baseNatAppointmentDO.getPatientId());
                    wxPushLogDO.setWechatId(wechatId);
                    wxPushLogDO.setScene(scenePayNotice);
                    wxPushLogDao.save(wxPushLogDO);
                    logger.info("发送核酸预约模板消息支付提醒成功");
                }
            } catch (Exception e) {
                e.printStackTrace();
                logger.info("发送核酸预约模板消息失败,error="+e.getMessage());
            }
        }
        return "发送成功!";
    }
    public MixEnvelop getNatRecords(String patientId,String id,String payStatus,String appointmentTime, String isSuccess,Integer page ,Integer pageSize){
        String sql = "select t.name as \"name\"," +
                "t.card_no as \"cardNo\"," +

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

@ -66,6 +66,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -919,7 +920,63 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        return array;
    }
    public String findYxVideoList(){
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.findById("YXAPPKEY");
        WlyyHospitalSysDictDO hospitalSysDictDO =  hospitalSysDictDao.findById("YXAPPSECRET");
        if (sysDictDO==null){
            return  "找不到对应的key";
        }
        Long endTime = new Date().getTime();
        Long startTime = new Date().getTime()-24*60*60*1000;
        List vids = new ArrayList();
        String appKey = sysDictDO.getDictValue();
        String appSecret = hospitalSysDictDO.getDictValue();
        String nonce =  randomInt(10);
        String curTime = String.valueOf((new Date()).getTime() / 1000L);
        String checkSum = CheckSumBuilder.getCheckSum(appSecret, nonce ,curTime);//参考 计算CheckSum的java代码
        String url = "https://vcloud.163.com/app/vod/video/get";
        Map<String,Object> httpPost = new HashedMap();
        // 设置请求的header
        httpPost.put("AppKey", appKey);
        httpPost.put("Nonce", nonce);
        httpPost.put("CurTime", curTime);
        httpPost.put("CheckSum", checkSum);
        httpPost.put("Content-Type", "application/json");
        JSONObject object = new JSONObject();
        object.put("currentPage",500);
        object.put("pageSize",1);
        object.put("status",40);
        object.put("beginTime",startTime);
        object.put("endTime",endTime);
        logger.info("入参"+object.toJSONString());
        String response = httpClientUtil.postBodyHead(url,object,httpPost);
        logger.info("返回日志"+response);
        if(StringUtils.isNoneBlank(response)){
            com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(response);
            if (jsonObject.getString("code").equalsIgnoreCase("200")){
                JSONObject object1 = jsonObject.getJSONObject("ret");
                if (object1!=null){
                    Integer total = object1.getInteger("totalRecords");
                    JSONArray jsonArray = object1.getJSONArray("list");
                    if (jsonArray!=null&&jsonArray.size()>0){
                        for (int i=0;i<jsonArray.size();i++){
                            JSONObject object2 = jsonArray.getJSONObject(i);
                            if (object2!=null){
                                String vedioUrl =object1.getString("origUrl");
                                String vedioName = object1.getString("videoName");
                                String filePath = "/Projects/Video/"+DateUtil.getStringDate("yyyyMMdd");
                                logger.info("filePath:"+filePath);
                                logger.info("vedioUrl"+vedioUrl);
                                FileUtil.saveUrlAs(vedioUrl,filePath,"GET",vedioName);
                            }
                        }
                    }
                }
            }
        }
        return null;
    }
    public String saveVideoFile(String vip){
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.findById("YXAPPKEY");

+ 85 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -41,8 +41,10 @@ import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.utils.network.HttpResponse;
import com.yihu.utils.network.HttpUtils;
import com.yihu.utils.security.MD5;
import jxl.write.DateTime;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.helper.DataUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -81,6 +83,8 @@ public class YkyyEntranceService {
    private final static String orgName ="厦门大学附属厦门眼科中心";
    private final static String saveJdxxUrl="http://192.168.20.55:10023/ykyy/saveJdxx";
    @Autowired
    private DictHospitalDeptDao hospitalDeptDao;
@ -3024,6 +3028,17 @@ public class YkyyEntranceService {
    }
    public String saveJdxx(String brxm,String csny,Float brxb,String czgh,String sfzh,Float sjhm,String ybkh,String lxdz,Float zy){
        return  hibenateUtils.saveJdxx(brxm,DateUtil.strToDateShort(csny),brxb,czgh,sfzh,sjhm,ybkh,lxdz,zy);
    }
    public String updateJdxx(Float brid,String sfzh,String lxdz,Float zy,String lxdh){
        return  hibenateUtils.updateJdxx(brid,sfzh,lxdz,zy,lxdh);
    }
    public String findInfoBysql(String sql) throws Exception {
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
@ -3032,4 +3047,74 @@ public class YkyyEntranceService {
        String content = response.getContent();
        return content;
    }
    //判断居民是否建过档,没有就建档
    public JSONObject patientJDKH(String patientId, String idcard, String name,String phoneNum, String medicare) throws Exception {
        JSONObject res = new JSONObject();
        //查询是否建档
        String brid = "";
        String bridSql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where jzkh = '" +medicare + " ' ";
        Map<String, Object> params = new HashedMap();
        params.put("sql", bridSql);
        logger.info("bridSql:" + bridSql);
        HttpResponse response = HttpUtils.doGet(url, params);
        String content = response.getContent();
        logger.info("response:" + content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            JSONArray array = rs.getJSONArray("detailModelList");
            int size = array.size();
            if(size == 1){
                brid = ((JSONObject)array.get(0)).getString("BRID");
            }else if (size > 1){
                res.put("status", -1);
                res.put("message", "该居民存在多条建档信息!");
                return res;
            }
        }
        //先通过身份证查询是否有这个病人id 如果有直接返回 如果没有则新建
        if (StringUtil.isBlank(brid)) {
            Map<String, Object> params1 = new HashedMap();
            params1.put("brxm", name);
            params1.put("csny", IdCardUtil.getBirthdayForIdcardStr(idcard));
            params1.put("brxb", IdCardUtil.getSexForIdcard_new(idcard));
            params1.put("czgh", "1996");
            params1.put("sfzh", idcard);
            params1.put("sjhm", phoneNum);
            params1.put("ybkh", medicare);
            params1.put("lxdz", null);
            params1.put("zy", 0);
            HttpResponse response1 = HttpUtils.doGet(saveJdxxUrl, params);
            String content1 = response1.getContent();
            JSONObject rs1 = JSON.parseObject(content1);
            if (rs.getInteger("status") != 200)
            {
                res.put("status", -1);
                res.put("message", "操作失败,失败原因:" + rs1.getString("message"));
                return res;
            } else {
                //获取病人id
                response = HttpUtils.doGet(url, params);
                content = response.getContent();
                logger.info("response:" + content);
                rs = JSON.parseObject(content);
                status = rs.getInteger("status");
                if (status==200){
                    JSONArray array = rs.getJSONArray("detailModelList");
                    int size = array.size();
                    if(size == 1){
                        brid = ((JSONObject)array.get(0)).getString("BRID");
                    }else if (size > 1){
                        res.put("status", -1);
                        res.put("message", "该居民存在多条建档信息!");
                        return res;
                    }
                }
            }
        }
        res.put("status", 200);
        res.put("message", brid);
        return res;
    }
}

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

@ -921,12 +921,15 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findOne(Integer.parseInt(businessOrderDO.getRelationCode()));
                    baseNatAppointmentDO.setPayStatus("1");
                    baseNatAppointmentDao.save(baseNatAppointmentDO);
                    String updatesql = "update V_MS_YJ01 t set t.HLWJF=1 where t.yjxh='"+baseNatAppointmentDO.getRealOrder()+"'";
                    try {
                        ykyyEntranceService.updateHisStatus(updatesql);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    //发送核酸支付成功提醒
                    prescriptionService.sendYktemplateMessage(baseNatAppointmentDO.getId(),true);
                }
            }
            if (businessOrderDO!=null&&!businessOrderDO.getOrderCategory().equalsIgnoreCase("5")&&businessOrderDO.getStatus()!=1){

+ 52 - 0
business/base-service/src/main/java/com/yihu/jw/utils/hibernate/HibenateUtils.java

@ -8,10 +8,13 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.ParameterMode;
import javax.persistence.PersistenceContext;
import javax.persistence.StoredProcedureQuery;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -183,4 +186,53 @@ public class HibenateUtils {
    public String saveJdxx(String brxm,Date csny,Float brxb,String czgh,String sfzh,Float sjhm,String ybkh,String lxdz,Float zy) {
        StoredProcedureQuery query = entityManager
                .createStoredProcedureQuery(" ZKSG.sp_zksg_jdkh_2021@xec_link") // 被调用存储过程名称
                .registerStoredProcedureParameter("P_BRXM", String.class, ParameterMode.IN) // 注册参数
                .registerStoredProcedureParameter("P_CSNY", Date.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_BRXB", Float.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_CZGH", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_SFZH", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_SJHM", Float.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_YBKH", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_LXDZ", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_ZY", Float.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_ERRMSG", String.class, ParameterMode.INOUT)
                .setParameter("P_BRXM", brxm)
                .setParameter("P_CSNY", csny)
                .setParameter("P_CZGH", czgh)
                .setParameter("P_BRXB", brxb)
                .setParameter("P_SFZH",sfzh)
                .setParameter("P_SJHM",sjhm)
                .setParameter("P_YBKH",ybkh)
                .setParameter("P_LXDZ",lxdz)
                .setParameter("P_ZY",zy);
        query.execute();
        String priceStr = (String) query.getOutputParameterValue("P_ERRMSG"); // 获取存储过程中的返回值
        return priceStr;
    }
    public String updateJdxx(Float brid,String sfzh,String lxdz,Float zy,String lxdh) {
        StoredProcedureQuery query = entityManager
                .createStoredProcedureQuery("ZKSG.SP_ZKSG_MZBRXXXG@xec_link") // 被调用存储过程名称
                .registerStoredProcedureParameter("P_BRID", Float.class, ParameterMode.IN) // 注册参数
                .registerStoredProcedureParameter("P_SFZH", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_LXDZ", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_LXDH", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_ZY", Float.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_ERRMSG", String.class, ParameterMode.INOUT)
                .setParameter("P_BRID", brid)
                .setParameter("P_SFZH", sfzh)
                .setParameter("P_LXDZ", lxdz)
                .setParameter("P_LXDH", lxdh)
                .setParameter("P_ZY",zy);
        query.execute();
        String priceStr = (String) query.getOutputParameterValue("P_ERRMSG"); // 获取存储过程中的返回值
        return priceStr;
    }
}

+ 42 - 1
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/YkyyController.java

@ -358,5 +358,46 @@ public class YkyyController extends EnvelopRestEndpoint {
        }
        return mixEnvelop;
    }
    
    @GetMapping(value = "/saveJdxx")
    @ApiOperation(value = "患者建档")
    public Envelop saveJdxx(@ApiParam(name = "brxm", value = "病人姓名", required = true)
                                      @RequestParam(value = "brxm",required = true)String brxm,
                                      @ApiParam(name = "csny", value = "出生日期", required = false)
                                      @RequestParam(value = "csny",required = false)String csny,
                                      @ApiParam(name = "brxb", value = "病人性别", required = false)
                                      @RequestParam(value = "brxb",required = false)Float brxb,
                                      @ApiParam(name = "czgh", value = "操作工号", required = false)
                                      @RequestParam(value = "czgh",required = false)String czgh,
                                @ApiParam(name = "sfzh", value = "身份证号", required = false)
                                    @RequestParam(value = "sfzh",required = false)String sfzh,
                                @ApiParam(name = "sjhm", value = "手机号码", required = false)
                                    @RequestParam(value = "sjhm",required = false)Float sjhm,
                                @ApiParam(name = "ybkh", value = "医保卡号", required = false)
                                    @RequestParam(value = "ybkh",required = false)String ybkh,
                                @ApiParam(name = "lxdz", value = "联系地址", required = false)
                                    @RequestParam(value = "lxdz",required = false)String lxdz,
                                @ApiParam(name = "zy", value = "职业", required = false)
                                    @RequestParam(value = "zy",required = false)Float zy){
        return success(ykyyEntranceService.saveJdxx(brxm,csny,brxb, czgh,sfzh,sjhm,ybkh,lxdz,zy));
    }
    @GetMapping(value = "/updateJdxx")
    @ApiOperation(value = "更新患者档案")
    public Envelop updateJdxx(@ApiParam(name = "brid", value = "病人id", required = true)
                            @RequestParam(value = "brid",required = true)Float brid,
                            @ApiParam(name = "sfzh", value = "身份证号", required = false)
                            @RequestParam(value = "sfzh",required = false)String sfzh,
                            @ApiParam(name = "lxdh", value = "联系电话", required = false)
                            @RequestParam(value = "lxdh",required = false)String lxdh,
                            @ApiParam(name = "lxdz", value = "联系地址", required = false)
                            @RequestParam(value = "lxdz",required = false)String lxdz,
                            @ApiParam(name = "zy", value = "职业", required = false)
                            @RequestParam(value = "zy",required = false)Float zy){
        return success(ykyyEntranceService.updateJdxx(brid,sfzh,lxdz,zy,lxdh));
    }
}

+ 47 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/util/DownLoadYxJob.java

@ -0,0 +1,47 @@
package com.yihu.jw.util;
import com.yihu.jw.hospital.prescription.service.YkyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.scheduling.support.CronTrigger;
import java.util.Date;
public class DownLoadYxJob implements SchedulingConfigurer {
    private static final Logger logger = LoggerFactory.getLogger(DownLoadYxJob.class);
    private static String cron = "0 0 0 * * ?";//"0 0 0 * * ?";0 */5 * * * ?
    @Autowired
    private YkyyPrescriptionService ykyyPrescriptionService;
    @Override
    public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
        taskRegistrar.addTriggerTask(new Runnable() {
            @Override
            public void run() {
                logger.info("START========OverdueJob========");
                try {
                    ykyyPrescriptionService.findYxVideoList();
                    logger.info("END========OverdueJob========");
                } catch (Exception e) {
                    e.printStackTrace();
                    logger.error("END===ERROE===OverdueJob,message:"+e.getMessage());
                }
            }
        }, new Trigger() {
            @Override
            public Date nextExecutionTime(TriggerContext triggerContext) {
                // 任务触发,可修改任务的执行周期
                CronTrigger trigger = new CronTrigger(cron);
                System.out.println("OverdueJob任务触发,可修改任务的执行周期"+cron);
                Date nextExec = trigger.nextExecutionTime(triggerContext);
                return nextExec;
            }
        });
    }
}

+ 9 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -357,7 +357,15 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                if (null != jsonObject.get("id")) {
                    id = jsonObject.get("id").toString();
                }
                mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false,medicareType,medicare,clinicId);
                //获取建档信息
                JSONObject jdObject = ykyyEntranceService.patientJDKH(patientId, idCard,familyName,username,medicare);
                if(jdObject.getInteger("status") == 200) {
                    mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false, medicareType, medicare, clinicId);
                }else {
                    mixEnvelop.setStatus(408);
                    mixEnvelop.setMessage(jdObject.getString("message"));
                    return mixEnvelop;
                }
            } else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("验证码不正确");