陈昶聿
10 天以前 30ea2c33af092769b4969e7cf9d8209b5d8267ad
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -6,6 +6,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.dx.MessageSend;
import com.ruoyi.common.enums.MsgLSEnum;
@@ -19,6 +20,7 @@
import com.ruoyi.quartz.util.CreateDataTable;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysDeptService;
import com.smartor.common.LSHospTokenUtil;
import com.smartor.common.MtSubmitSmUtil;
import com.smartor.domain.*;
@@ -135,6 +137,8 @@
    @Autowired
    IPatArchiveService patArchiveService;
    @Autowired
    ISysDeptService sysDeptService;
    @Autowired
    IPatMedOuthospService patMedOuthospService;
@@ -865,12 +869,36 @@
                        }
                    } else if (active.equals("hzszlyy")) {//市一医院
                        String content = sendMagParam.getContent().replace("【新华医院】", "");
                        String result = smsUtils.sendSms(xhsmsPath, xhsmsAccount, xhsmsPwd, sendMagParam.getPhone(), content);
                        //这里需要根据result返回的值去判断,是否成功,然后将值赋值给isSuccess
                        if (StringUtils.isNotEmpty(result) && result.contains("处理成功")) {
                            isSuccess = "true";
                        }
                        SysDept sysDeptVo = new SysDept();
                        List<SysDept> sysDepts = new ArrayList<>();
                        if (ObjectUtils.isNotEmpty(serviceSubtask.getDeptcode())){
                            sysDeptVo.setDeptType("1");
                            sysDeptVo.setOrgid(serviceSubtask.getOrgid());
                            sysDeptVo.setDeptCode(serviceSubtask.getDeptcode());
                            sysDeptService.selectDeptList(sysDeptVo);
                        }else if(ObjectUtils.isNotEmpty(serviceSubtask.getLeavehospitaldistrictcode())){
                            sysDeptVo.setDeptType("2");
                            sysDeptVo.setOrgid(serviceSubtask.getOrgid());
                            sysDeptVo.setDeptCode(serviceSubtask.getLeavehospitaldistrictcode());
                            sysDeptService.selectDeptList(sysDeptVo);
                        }
                        SysDept sysDept = CollectionUtils.isNotEmpty(sysDepts) ? sysDepts.get(0) : new SysDept();
                        String campusid = ObjectUtils.isNotEmpty(sysDept) ? sysDept.getCampusid() : "2";
                        //湖滨单独发送方式
                        if("1".equals(campusid)){
                            String result = smsUtils.sendSms1(xhsmsPath, xhsmsAccount, xhsmsPwd, sendMagParam.getPhone(), content);
                            //这里需要根据result返回的值去判断,是否成功,然后将值赋值给isSuccess
                            if (StringUtils.isNotEmpty(result) && result.contains("处理成功")) {
                                isSuccess = "true";
                            }
                        }else {
                            String result = smsUtils.sendSms(xhsmsPath, xhsmsAccount, xhsmsPwd, sendMagParam.getPhone(), content);
                            //这里需要根据result返回的值去判断,是否成功,然后将值赋值给isSuccess
                            if (StringUtils.isNotEmpty(result) && result.contains("处理成功")) {
                                isSuccess = "true";
                            }
                        }
                    }
                    //任务发送记录
                    ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();