liusheng
2024-10-30 f55c563e2a0b52e4569ce6b5f81632cac598f7fe
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
@@ -11,6 +11,7 @@
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.common.SendService;
import com.smartor.domain.*;
import com.smartor.service.IServiceSubtaskService;
import com.smartor.service.IServiceTaskService;
@@ -24,6 +25,7 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.List;
import java.util.stream.Collectors;
@@ -54,6 +56,19 @@
    @Autowired
    private RSAPublicKeyExample rsaPublicKeyExample;
    @Autowired
    private SendService sendService;
    @PostMapping("/test")
    public TableDataInfo test(@RequestBody SendMagParam sendMagParam) {
        try {
            Boolean aBoolean = sendService.sendMsg(sendMagParam);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    /**
     * 查询语音任务列表
     */
@@ -67,9 +82,11 @@
        if (CollectionUtils.isNotEmpty(serviceTaskVOS)) {
            for (ServiceTaskVO ServiceTaskVO : serviceTaskVOS) {
                ServiceSubtaskVO ServiceTaskcall = new ServiceSubtaskVO();
                ServiceTaskcall.setTaskid(ServiceTaskVO.getTaskid());
                List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(ServiceTaskcall);
                ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
                serviceSubtaskVO.setTaskid(ServiceTaskVO.getTaskid());
                serviceSubtaskVO.setStartOutHospTime(serviceTask.getStartOutHospTime());
                serviceSubtaskVO.setEndOutHospTime(serviceTask.getEndOutHospTime());
                List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(serviceSubtaskVO);
                if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) {
                    //已发送
                    long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 3L).collect(Collectors.toList()).stream().count();
@@ -186,7 +203,7 @@
        }
        log.info("tid和pid的值为:{},{}", tid, pid);
        return success(serviceTaskService.getScriptInfoByCondition(tid, pid));
        return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true));
    }
}