liusheng
2025-04-28 b5a1835f3ed1763b3d0b66f8ccff0bbd4d67dd5b
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -140,6 +140,12 @@
    @Value("${hosp_info_url}")
    private String hospInfoUrl;
    @Value("${appid}")
    private String appid;
    @Value("${server.port}")
    private String port;
    public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) {
        System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
    }
@@ -245,11 +251,13 @@
     * 处理患者信息,进入子任务表
     */
    public void dealOutHospInfo() {
        //出院表
        iPatMedInhospService.dealOutHospInfo();
        //门诊表
        if(visitHosp!=1) {
            iPatMedOuthospService.dealOutpatientInfo();
        if (port.equals("8095")) {
            //出院表
            iPatMedInhospService.dealOutHospInfo();
            //门诊表
            if (visitHosp != 1) {
                iPatMedOuthospService.dealOutpatientInfo();
            }
        }
    }
@@ -258,17 +266,19 @@
     * 处理手术信息,进入子任务表
     */
    public void dealOperationInfo() {
        iPatMedOperationService.dealOperationInfo();
        if (port.equals("8095")) iPatMedOperationService.dealOperationInfo();
    }
    /**
     * 处理患者信息,进入子任务表(微信小程序)
     */
    public void dealOutHospInfoXHC() {
        PatMedInhosp patMedInhosp = new PatMedInhosp();
        //获取未处理的数据
        List<ServicePatientTemp> servicePatientTemps = iServicePatientTempService.selectServicePatientTempList(new ServicePatientTemp());
        if (port.equals("8095")) {
            PatMedInhosp patMedInhosp = new PatMedInhosp();
            //获取未处理的数据
            List<ServicePatientTemp> servicePatientTemps = iServicePatientTempService.selectServicePatientTempList(new ServicePatientTemp());
        }
    }
@@ -530,7 +540,10 @@
                                String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
                                String url = null;
                                url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
                                String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "无");
//                                String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "无");
                                String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), patArchive.getTelcode(), serviceSubtask.getSendname(), patArchive.getPatientno());
                                Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class);
                                //任务发送记录
@@ -786,22 +799,23 @@
        return key;
    }
    private String getWXCode(String idcard, String url, String taskName, String taskDesc, String submitprompt) {
    private String getWXCode(String idcard, String url, String taskName, String taskDesc, String phone, String setPatientname, String setPatientid) {
        XinHuaWXReq xinHuaWXReq = new XinHuaWXReq();
        xinHuaWXReq.setIdcard(idcard);
        xinHuaWXReq.setUrl(url);
        xinHuaWXReq.setKeyword1("浙中医大二院出院随访");
        xinHuaWXReq.setKeyword2(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
        xinHuaWXReq.setKeyword3(taskName);
        xinHuaWXReq.setKeyword4("疾病康复注意事项");
        xinHuaWXReq.setPatientid(setPatientid);
        xinHuaWXReq.setPatientname(setPatientname);
        xinHuaWXReq.setMobile(phone);
        xinHuaWXReq.setMedcardno(null);
        xinHuaWXReq.setTitlename(taskName);
        xinHuaWXReq.setContent(taskDesc);
        xinHuaWXReq.setAppid(appid);
        log.error("----getWXCode---xinHuaWXReq的出参为:{}", xinHuaWXReq);
        String result = HttpUtils.sendPost(thirdWXUrl, new Gson().toJson(xinHuaWXReq));
        JSONObject jsonObject = JSONObject.parseObject(result);
        log.error("jsonObject的数据为:{}", jsonObject.toString());
//        String code = (String) jsonObject.get("code");
        return jsonObject.toString();
        String code = (String) jsonObject.toString();
        return code;
    }
//    public static void main(String[] args) {
//        LocalDateTime originalDateTime = LocalDateTime.now();
//        LocalDateTime startOfDay = originalDateTime.with(LocalTime.MIN);