Trick il y a 5 ans
Parent
commit
6915734fc0

+ 19 - 0
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -1,5 +1,6 @@
package com.yihu.jw.wlyy.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
@ -305,4 +306,22 @@ public class WlyyBusinessService {
        rs.put("mobile",basePatientDO.getMobile());
        return rs;
    }
    public JSONArray findPatientListBySscOrIdCard(String idcard,String ssc){
        Map<String,String> mapParams = new HashedMap();
        if(StringUtils.isNotBlank(idcard)){
            mapParams.put("idcard",idcard);
        }
        if(StringUtils.isNotBlank(ssc)){
            mapParams.put("ssc",ssc);
        }
        JSONObject re = wlyyHttpService.sendWlyyMes("findPatientListBySscOrIdCard",null,mapParams);
        JSONArray list =null;
        if(re!=null){
            list = re.getJSONArray("data");
            return list;
        }
        return null;
    }
}

+ 5 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -269,6 +269,11 @@ public class BaseHospitalRequestMapping {
         * 厦门I健康签约信息接口
         */
        public static final String findWlyyPatient = "/findWlyyPatient";
        /**
         *  厦门I健康获取居民身份证
         */
        public static final String findPatientListBySscOrIdCard = "/findPatientListBySscOrIdCard";
        //=================end=======================================
        /**

+ 81 - 81
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/job/DataUploadJob.java

@ -21,87 +21,87 @@ public class DataUploadJob implements Job {
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("START========DataUploadJob========");
        try {
//            //1、获取 JOB 执行区间  执行时间点的前一天  时间点定在每天的 02:00:00 执行,同步前一天的数据
//            String endDate = DateUtil.dateToStr(DateUtil.getNow(),"yyyy-MM-dd")+" 00:00:00";
//            String startDate = DateUtil.dateToStr(DateUtil.getPreDays(DateUtil.getNow(),-1),"yyyy-MM-dd")+" 00:00:00";
//
//            String res = "";
//
//            //2、分步执行需要JOB执行的服务
//            logger.info("START========2.5 网上预约挂号上传开始========");
//            try {
//                res = internetService.upAppointmentOnline(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.5 网上预约挂号上传结束========" + res);
//
//
//
//            logger.info("START========2.6 网上医技预约上传开始========");
//            try {
//                res = internetService.upMedicalOnline(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.6 网上医技预约上传结束========" + res);
//
//
//
//            logger.info("START========2.7 医生评价信息开始========");
//            try {
//                res = internetService.upNsDoctorScore(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.7 医生评价信息结束========" + res);
//
//
//
//            logger.info("START========2.8 网络咨询服务信息开始========");
//            try {
//                res = internetService.upNsOnlineAsk(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.8 网络咨询服务信息结束========" + res);
//
//
//
//            logger.info("START========2.9 网络诊疗服务信息========");
//            try {
//                res = internetService.upNsOnlineMed(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.9 网络诊疗服务信息========" + res);
//
//
//
//            logger.info("START========2.10 电子处方表开始========");
//            try {
//                res = internetService.upPrescription(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.10 电子处方表结束========" + res);
//
//
//
//            logger.info("START========2.11 电子处方_药品明细表开始 ========");
//            try {
//                res = internetService.upPrescriptionDrug(startDate,endDate,null);
//            }catch (Exception e){
//                e.printStackTrace();
//                logger.error(e.toString());
//            }
//            logger.info("END==========2.11 电子处方_药品明细表结束 ========" + res);
            //1、获取 JOB 执行区间  执行时间点的前一天  时间点定在每天的 02:00:00 执行,同步前一天的数据
            String endDate = DateUtil.dateToStr(DateUtil.getNow(),"yyyy-MM-dd")+" 00:00:00";
            String startDate = DateUtil.dateToStr(DateUtil.getPreDays(DateUtil.getNow(),-1),"yyyy-MM-dd")+" 00:00:00";
            String res = "";
            //2、分步执行需要JOB执行的服务
            logger.info("START========2.5 网上预约挂号上传开始========");
            try {
                res = internetService.upAppointmentOnline(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.5 网上预约挂号上传结束========" + res);
            logger.info("START========2.6 网上医技预约上传开始========");
            try {
                res = internetService.upMedicalOnline(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.6 网上医技预约上传结束========" + res);
            logger.info("START========2.7 医生评价信息开始========");
            try {
                res = internetService.upNsDoctorScore(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.7 医生评价信息结束========" + res);
            logger.info("START========2.8 网络咨询服务信息开始========");
            try {
                res = internetService.upNsOnlineAsk(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.8 网络咨询服务信息结束========" + res);
            logger.info("START========2.9 网络诊疗服务信息========");
            try {
                res = internetService.upNsOnlineMed(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.9 网络诊疗服务信息========" + res);
            logger.info("START========2.10 电子处方表开始========");
            try {
                res = internetService.upPrescription(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.10 电子处方表结束========" + res);
            logger.info("START========2.11 电子处方_药品明细表开始 ========");
            try {
                res = internetService.upPrescriptionDrug(startDate,endDate,null);
            }catch (Exception e){
                e.printStackTrace();
                logger.error(e.toString());
            }
            logger.info("END==========2.11 电子处方_药品明细表结束 ========" + res);
            logger.info("END========DataUploadJob 执行结束========");

+ 5 - 9
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/message/SystemMessageController.java

@ -56,16 +56,12 @@ public class SystemMessageController extends EnvelopRestEndpoint {
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id", required = true)String id,
            @ApiParam(name = "read", value = "read", required = true)
            @RequestParam(value = "read", required = true)String read){
        try {
            SystemMessageDO systemMessageDO = systemMessageService.updateMessage(id,read);
            if (null == systemMessageDO){
                return failed("更新失败,就诊消息不存在");
            }
            return success("更新成功");
        }catch (Exception e){
            return failed("更新失败,"+e.getMessage());
            @RequestParam(value = "read", required = true)String read)throws Exception{
        SystemMessageDO systemMessageDO = systemMessageService.updateMessage(id,read);
        if (null == systemMessageDO){
            return failed("更新失败,就诊消息不存在");
        }
        return success("更新成功");
    }

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

@ -23,6 +23,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@ -766,4 +767,19 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        return success(wlyyBusinessService.findWlyyPatient(idcard));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientListBySscOrIdCard)
    @ApiOperation(value = "获取居民信息")
    public Envelop findPatientListBySscOrIdCard(@ApiParam(name = "idcard", value = "idcard")
                                                @RequestParam(value = "idcard",required = false) String idcard,
                                                @ApiParam(name = "ssc", value = "社保卡")
                                                @RequestParam(value = "ssc",required = false) String ssc)throws Exception{
        if(StringUtils.isNotBlank(idcard)&&idcard.length()>=6){
            return success(wlyyBusinessService.findPatientListBySscOrIdCard(idcard,null));
        }
        if(StringUtils.isNotBlank(ssc)&&ssc.length()>=6){
            return success(wlyyBusinessService.findPatientListBySscOrIdCard(null,ssc));
        }
        return failed("身份证或医保卡格式有误");
    }
}