Просмотр исходного кода

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

yeshijie 7 лет назад
Родитель
Сommit
8cc7b3ef3b

+ 39 - 0
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcMessageController.java

@ -48,6 +48,8 @@ public class GcMessageController {
    private DoctorDao doctorDao;
    @Value("${wechat.message.template_consult_notice}")
    private String templateId;
    @Value("${wechat.message.template_callserver_remind}")
    private String callServerTemplateId;
    @Value("${server.server_url}")
    private String server_url;
@ -152,6 +154,43 @@ public class GcMessageController {
        }
    }
    @RequestMapping(value = "/sendCallServerWechatMessage", method = RequestMethod.POST)
    @ApiOperation("客服系统发送协同服务微信模板消息接口")
    public ResultBatchModel sendCallServerWechatMessage(
            @ApiParam(name = "openIds", value = "微信openid", required = true) @RequestParam(value = "openIds", required = true) String openIds,
            @ApiParam(name = "remark", value = "服务内容", required = true) @RequestParam(value = "remark", required = true)String remark,
            @ApiParam(name = "doctorName", value = "消息内容", required = true) @RequestParam(value = "doctorName", required = true)String doctorName,
            @ApiParam(name = "patientName", value = "居民姓名", required = true) @RequestParam(value = "patientName", required = true) String patientName,
            @ApiParam(name = "mobile", value = "居民手机", required = true) @RequestParam(value = "mobile", required = true)String mobile,
            @ApiParam(name = "typeName", value = "服务类型", required = true) @RequestParam(value = "typeName", required = true)String typeName) {
        Integer success = 0;
        Integer error = 0;
        List<String> errorLiust = new ArrayList<>();
        try {
            String url = server_url + "wx_doctor/html/home/html/jumpApp.html";
            String[] codeArr = openIds.split(",");
            for (String openId : codeArr) {
                try {
                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
                    JSONObject sendJson = weiXinTempMsgSendUtils.packageTemplate("您好,您有一条协同服务待处理。", remark, doctorName, patientName,mobile,dateFormat.format(new Date()),typeName);
                    Boolean flag = weiXinTempMsgSendUtils.sendTemplateMessage(callServerTemplateId, openId, url, sendJson,null);
                    logger.info("send wechat message param : " + openId+" =======> "+remark);
                    logger.info("send wechat message retuen : " + openId+" =======> "+flag);
                    success++;
                } catch (Exception e) {
                    e.printStackTrace();
                    logger.error("openids " + openIds + " send Template error:" + e.getMessage());
                    error++;
                    errorLiust.add(openIds);
                }
            }
            return new ResultBatchModel(success, error, errorLiust);
        } catch (Exception e) {
            e.printStackTrace();
            return new ResultBatchModel(-1, "发送失败!", success, error, errorLiust);
        }
    }
    /**
     * 客服系统发送消息接口 居民没有有openID只发手机短信 有openID发微信模板消息、手机短信 没有IP次数限制
     *

+ 2 - 0
patient-co/patient-co-doctor-assistant/src/main/resources/application-dev.yml

@ -52,6 +52,8 @@ wechat:
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
   #服务待处理提醒
   template_service_remind:  v2iqCHvqNLiU0PBBMIEPkB40xi8eUtdpsjwyxw-euo4
   #协同服务提醒
   template_callserver_remind: Fsnt5YUDBCNOREMKifZbr51XhNRyop6VAEV8mIuFYuc
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/

+ 2 - 1
patient-co/patient-co-doctor-assistant/src/main/resources/application-devtest.yml

@ -52,7 +52,8 @@ wechat:
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
   #服务待处理提醒
   template_service_remind:  v2iqCHvqNLiU0PBBMIEPkB40xi8eUtdpsjwyxw-euo4
   #协同服务提醒
   template_callserver_remind: Fsnt5YUDBCNOREMKifZbr51XhNRyop6VAEV8mIuFYuc
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/

+ 2 - 1
patient-co/patient-co-doctor-assistant/src/main/resources/application-local.yml

@ -52,7 +52,8 @@ wechat:
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
   #服务待处理提醒
   template_service_remind:  v2iqCHvqNLiU0PBBMIEPkB40xi8eUtdpsjwyxw-euo4
   #协同服务提醒
   template_callserver_remind: Fsnt5YUDBCNOREMKifZbr51XhNRyop6VAEV8mIuFYuc
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/

+ 2 - 0
patient-co/patient-co-doctor-assistant/src/main/resources/application-localtest.yml

@ -52,6 +52,8 @@ wechat:
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
   #服务待处理提醒
   template_service_remind:  v2iqCHvqNLiU0PBBMIEPkB40xi8eUtdpsjwyxw-euo4
   #协同服务提醒
   template_callserver_remind: Fsnt5YUDBCNOREMKifZbr51XhNRyop6VAEV8mIuFYuc
yihu:

+ 2 - 0
patient-co/patient-co-doctor-assistant/src/main/resources/application-prod.yml

@ -51,6 +51,8 @@ wechat:
   template_schedule_remind:  9l1CBFlnJJaqWXW2UVQfgUidhtt5Fff_1L50RgXpIY8
   #服务待处理提醒
   template_service_remind:  v2iqCHvqNLiU0PBBMIEPkB40xi8eUtdpsjwyxw-euo4
   #协同服务提醒
   template_callserver_remind: Fsnt5YUDBCNOREMKifZbr51XhNRyop6VAEV8mIuFYuc
yihu:
  yihu_OpenPlatform_url: http://api.yihu.com.cn/OpenPlatform/cgiBin/1.0/

+ 2 - 0
patient-co/patient-co-doctor-assistant/src/main/resources/application-test.yml

@ -51,6 +51,8 @@ wechat:
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
   #服务待处理提醒
   template_service_remind:  v2iqCHvqNLiU0PBBMIEPkB40xi8eUtdpsjwyxw-euo4
   #协同服务提醒
   template_callserver_remind: Fsnt5YUDBCNOREMKifZbr51XhNRyop6VAEV8mIuFYuc
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/

+ 9 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -4287,11 +4287,11 @@ public class StatisticsESService {
                    signOnlineMap.put("name", one.getTeamName());
                }*/
                if (low_level.equals("3") && one.getTown() != null) {
                    signOnlineMap.put(one.getTown(), one.getResult2().intValue());
                    signOnlineMap.put(one.getTown(), one.getResult2().longValue());
                } else if (low_level.equals("4") && one.getHospital() != null) {
                    signOnlineMap.put(one.getHospital(), one.getResult2().intValue());
                    signOnlineMap.put(one.getHospital(), one.getResult2().longValue());
                } else if (low_level.equals("5") && one.getTeam() != null) {
                    signOnlineMap.put(one.getTeam(), one.getResult2().intValue());
                    signOnlineMap.put(one.getTeam(), one.getResult2().longValue());
                }
            }
        }
@ -4315,24 +4315,24 @@ public class StatisticsESService {
            for (Map<String, Object> reMap : resultList) {
                reMap.put("amount", reMap.get("amount") != null ? Long.valueOf(reMap.get("amount").toString()) : 0L);
                Integer signNun = 0;
                Integer signOnlineNum = 0;
                Long signNun = 0L;
                Long signOnlineNum = 0L;
                //获取签约量
                if (resultMap != null && resultMap.size() > 0) {
                    SaveModel one = resultMap.get(reMap.get("code").toString());
                    if (one != null) {
                        signNun = one.getResult2().intValue();
                        signNun = one.getResult2().longValue();
                    }
                }
                if (signOnlineMap != null && signOnlineMap.size() > 0) {
                    signOnlineNum = (Integer) signOnlineMap.get(String.valueOf(reMap.get("code")));
                    signOnlineNum = (Long) signOnlineMap.get(String.valueOf(reMap.get("code")));
                    if (signOnlineNum == null) {
                        signOnlineNum = 0;
                        signOnlineNum = 0L;
                    }
                }
                reMap.put("signNun", signNun);
                reMap.put("signOnlineNum", signOnlineNum);
                reMap.put("rate", getRange(signOnlineNum, signNun, 2));//线上签约率是 线上签约量/签约量
                reMap.put("rate", getRange(signOnlineNum.intValue(), signNun.intValue(), 2));//线上签约率是 线上签约量/签约量
            }
            if ((level == 2 && "5".equals(lowLevel)) || (level == 4) || (level == 3 && "5".equals(lowLevel))) {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwArchivesService.java

@ -876,7 +876,7 @@ public class JwArchivesService {
                        JSONArray jsonArray = data.getJSONArray("DATA");
                        // {"ARCHIVE_ID":"档案ID","SICK_NAME":"病人姓名","SICK_SEX":"性别","BIRTHDAY":"出生日期","IDENTITY_CARD_NO":"身份证号码","ZONE_CODE":"归属辖区","HOME_ADDRESS":"现住址","INSUR_CARD_NO":"医保卡号"}
                        jsonArray.forEach(one->{
                            JSONObject jsonObject = new JSONObject(one);
                            JSONObject jsonObject = (JSONObject)one;
                            JSONObject js = new JSONObject();
                            js.put("archiveId",jsonObject.get("ARCHIVE_ID"));
                            js.put("sickName",jsonObject.get("SICK_NAME"));

+ 8 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/CommonUtil.java

@ -476,7 +476,7 @@ public class CommonUtil {
                logger.info("result :" + returnStr.toString());
                if (returnStr != null) {
                    //1.3.7去掉前缀
                    fileUrls += returnStr;
                    fileUrls += returnStr+",";
                    f.delete();
                }
            } else {
@ -485,12 +485,13 @@ public class CommonUtil {
                logger.info("result :" + returnStr.toString());
                if (returnStr != null) {
                    //1.3.7去掉前缀
                    fileUrls += returnStr;
                    fileUrls += returnStr+",";
                }
            }
        }
        logger.info(" toNeiWang end files :" + fileUrls);
        return fileUrls;
        return fileUrls.substring(0,fileUrls.length()-1);
    }
    private String request(HttpServletRequest request, String path) {
@ -585,4 +586,8 @@ public class CommonUtil {
        return result;
    }
    public static void main(String[] args) {
        System.out.println("aaa,aaa,".substring(0,"aaa,aaa,".length()-2));
    }
}

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java

@ -589,7 +589,7 @@ public class EsStatisticsController extends BaseController {
    /**
     * 获取三师转签或高危人群
     *
     **-
     * @param endDate
     * @param area
     * @param level
@ -1925,7 +1925,7 @@ public class EsStatisticsController extends BaseController {
    /**
     * 获取 线上续签率和续签率
     * 前端:线上续签.
     * 前端:线上续签
     *
     * @param index 29,43,44 (51,53,54 服务类型维度)
     * @param level 等级  4 市  3区  2社区 1团队