| | |
| | | import com.ruoyi.common.enums.MsgLSEnum; |
| | | import com.ruoyi.common.enums.ServiceFromEnum; |
| | | import com.ruoyi.common.enums.WxGZHEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.LSHospTokenUtil; |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.mapper.*; |
| | |
| | | @Value("${server.port}") |
| | | private String port; |
| | | |
| | | @Autowired |
| | | private MtSubmitSmUtil mtSubmitSmUtil; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | |
| | | } catch (Exception e) { |
| | | log.error("【dealHisData】河南数据采集异常", e); |
| | | } |
| | | } else if (active.trim().equals("sltd")) { |
| | | } else if (active.trim().equals("sltd") || active.trim().equals("nhfy")) { |
| | | //省立同德与华南附一用同一套采集方法(都是来未来提供) |
| | | |
| | | try { |
| | | //获取是否需要采集用户、部门信息 |
| | | SysConfig config = new SysConfig(); |
| | |
| | | if (heLibrary.getHetype().equals("1")) { |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(localIP + ":" + req_path + "/xj?p=" + format); |
| | | if (active.equals("ls") || active.equals("sltd")) { |
| | | if (active.equals("ls") || active.equals("sltd") || active.equals("nhfy")) { |
| | | sendMagParam.setContent("您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); |
| | | } else if (active.equals("xh")) { |
| | | sendMagParam.setContent("【新华医院】您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); |
| | |
| | | if (code.equals("0")) { |
| | | isSuccess = "true"; |
| | | } |
| | | } else if (active.equals("sltd")) { |
| | | } else if (active.equals("sltd") || active.equals("nhfy")) { |
| | | log.info("sltd进来了吗?{} ,---sendMagParam.getContent()的参数为:{}", active, sendMagParam.getContent()); |
| | | //省立同德的短信发送方式 |
| | | String data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | if (StringUtils.isNotEmpty(data)) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | JsonNode root = mapper.readTree(data); |
| | | String status = root.get("result").get(0).get("status").asText(); |
| | | if (status.equals("00000")) { |
| | | if (active.equals("sltd")) { |
| | | //省立同德的短信发送方式 |
| | | String data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | if (StringUtils.isNotEmpty(data)) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | JsonNode root = mapper.readTree(data); |
| | | String status = root.get("result").get(0).get("status").asText(); |
| | | if (status.equals("00000")) { |
| | | isSuccess = "true"; |
| | | } |
| | | } |
| | | } else if (active.equals("nhfy")) { |
| | | Map<String, Object> smsResult = mtSubmitSmUtil.submitSm(sendMagParam.getPhone(), sendMagParam.getContent()); |
| | | if (smsResult != null && smsResult.get("result") != null && smsResult.get("result").toString().equals("0")) { |
| | | isSuccess = "true"; |
| | | } |
| | | } |
| | |
| | | if (active.equals("hzszlyy")) { |
| | | if (!map.isEmpty() && map.get("success") != null) { |
| | | Integer wxCodeSuccessShiyi = (Integer) map.get("success"); |
| | | if(ObjectUtils.isNotEmpty(wxCodeSuccessShiyi) && wxCodeSuccessShiyi == 1){ |
| | | if (ObjectUtils.isNotEmpty(wxCodeSuccessShiyi) && wxCodeSuccessShiyi == 1) { |
| | | wxCodeSuccess = true; |
| | | }else { |
| | | } else { |
| | | wxCodeSuccess = false; |
| | | } |
| | | } |