liusheng
昨天 e4e220916dd2a4aa649a9b0162e5b5ed0dc9d7e5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
@@ -12,7 +12,6 @@
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;
@@ -22,12 +21,9 @@
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
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;
@@ -57,19 +53,6 @@
    @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;
    }
    /**
     * 查询语音任务列表
     */
@@ -90,13 +73,14 @@
                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();
                    //已发送(子任务中的 sendstate=1为被领取)
                    long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> (serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() >= 3L) || (serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 1L)).collect(Collectors.toList()).stream().count();
                    //未发送
                    long wfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count();
                    ServiceTaskVO.setYfs(yfs);
                    ServiceTaskVO.setWfs(wfs);
                }
            }
            //获取total
            long total = PageUtils.count(new ISelect() {
@@ -104,7 +88,7 @@
                public void doSelect() {
                    serviceTask.setPageNum(null);
                    serviceTask.setPageSize(null);
                    serviceTaskService.selectServiceTaskList(serviceTask);
                    serviceTaskService.selectServiceTaskAndtaskDeptList(serviceTask);
                }
            });