sinake
8 小时以前 4d46005b4a4d127a1bd884efe7dfbb907338b1a0
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -14,8 +14,9 @@
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.quartz.service.ICollectHISMapperService;
import com.ruoyi.quartz.service.impl.CollectHISMapperServiceImpl;
import com.ruoyi.common.utils.sms.smsUtils;
import com.ruoyi.quartz.service.ICollectHISService;
import com.ruoyi.system.service.ISysConfigService;
import com.smartor.common.LSHospTokenUtil;
import com.smartor.domain.*;
import com.smartor.mapper.HeLibraryMapper;
@@ -87,11 +88,24 @@
    @Autowired
    private HeLibraryMapper heLibraryMapper;
    @Autowired
    private ICollectHISService ichService;
    @Autowired
    private ISysConfigService configService;
    @Value("${localIP}")
    private String localIP;
    @Value("${xhsmsPath}")
    private String xhsmsPath;
    @Value("${xhsmsAccount}")
    private String xhsmsAccount;
    @Value("${xhsmsPwd}")
    private String xhsmsPwd;
    @Value("${pub_key}")
    private String pub_key;
@@ -134,7 +148,7 @@
    IXHGatherPatArchiveService ixhGatherPatArchiveService;
    @Autowired
    ICollectHISMapperService icollectHis;
    ICollectHISService icollectHis;
    @Value("${appid}")
@@ -524,9 +538,10 @@
                                    req.put("content", sendMagParam.getContent());
                                    isSuccess = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req));
                                } else if (visitHosp == 2) {
                                    String url = configService.selectConfigByKey("token.360",serviceSubtask.getOrgid());
                                    //丽水的短信发送方式
                                    Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid());
                                    String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid());
                                    String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid(),url);
                                    if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) {
                                        ServiceSubtask ss = new ServiceSubtask();
                                        ss.setResult("error");
@@ -546,6 +561,9 @@
                                    if (code.equals("0")) {
                                        isSuccess = "true";
                                    }
                                }else if (visitHosp == 3) {//市一医院
                                    String content=sendMagParam.getContent().replace("【新华医院】","");
                                    smsUtils.sendSms(xhsmsPath,xhsmsAccount,xhsmsPwd,sendMagParam.getPhone(),content);
                                }
                                //任务发送记录
                                ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
@@ -768,9 +786,8 @@
    public void collectHIS() {
        try {
            // HIS数据采集
            HnDataGatherVO hnDataGatherVO = new HnDataGatherVO();
            log.info("【dealHisData】HIS开始采集数据");
            ihnGatherPatArchiveService.hnDataGather(hnDataGatherVO);
            ichService.sync();
            log.info("【dealHisData】HIS结束采集数据");
        } catch (Exception e) {
            log.error("【dealHisData】HIS数据采集异常", e);