陈昶聿
2 天以前 9a7b7c6558a3248284eabb751354a44962e97730
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -37,6 +37,7 @@
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -56,6 +57,11 @@
@RestController
@RequestMapping("/smartor/serviceSubtask")
public class ServiceSubtaskController extends BaseController {
    @InitBinder
    public void initBinder(WebDataBinder binder) {
        binder.setAutoGrowCollectionLimit(1024); // 或 2048、4096 等
    }
    @Autowired
    private IServiceSubtaskService serviceSubtaskService;
@@ -113,16 +119,6 @@
        // 直接从已有聚合结果推算total,避免去掉分页后再全量查一遍大表
        long total = 0L;
        try {
//                 * wzx: 未执行数量
//                    * ysf: 已随访数量
//                    * fssb: 发送失败数量
//                    * yfs: 已发送数量
//                    * dsf: 待随访数量
//            long wzx = map.get("wzx") != null ? ((Number) map.get("wzx")).longValue() : 0L;
//            long ysf = map.get("ysf") != null ? ((Number) map.get("ysf")).longValue() : 0L;
//            long dsf = map.get("dsf") != null ? ((Number) map.get("dsf")).longValue() : 0L;
//            long fssb = map.get("fssb") != null ? ((Number) map.get("fssb")).longValue() : 0L;
            total = map.get("total") != null ? ((Number) map.get("total")).longValue() : 0L;
        } catch (Exception e) {
@@ -179,7 +175,7 @@
                if (ObjectUtils.isNotEmpty(oldCondition) && isSameCondition(oldCondition, serviceSubtaskEntity)) {
                    redisFlag = true;
                    map = redisMap;
                    redisCache.setCacheObject(userId + "patItemCount", map, 120, TimeUnit.MINUTES);
                    redisCache.setCacheObject(userId + "patItemCount", map, 60, TimeUnit.MINUTES);
                }
            }
            if (!redisFlag) {
@@ -441,6 +437,37 @@
    }
    /**
     * 新增或修改删除单一任务(临时接口)
     */
    @ApiOperation("新增或修改删除单一任务(临时接口)")
    //@PreAuthorize("@ss.hasPermi('system:task:add')")
    @Log(title = "单一任务(随访)", businessType = BusinessType.INSERT)
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/insertOrUpdateTaskByTaskId")
    public AjaxResult insertOrUpdateTaskByTaskId(@RequestBody ServiceTaskVO ivrTaskVO) {
        //根据入参查询信息-用户关系
        ServiceSubtask serviceSubtask = new ServiceSubtask();
        if(ObjectUtils.isNotEmpty(ivrTaskVO.getTaskid())){
            serviceSubtask.setTaskid(ivrTaskVO.getTaskid());
            ServiceTaskVO ivrTaskVO1 = serviceSubtaskService.queryTaskByCondition(serviceSubtask);
            log.info("insertOrUpdateTaskByTaskId的入参为:{}", ivrTaskVO);
            LoginUser loginUser = getLoginUser();
            SysUser user = loginUser.getUser();
            ivrTaskVO.setCreateBy(user.getNickName());
            ivrTaskVO.setUpdateBy(user.getNickName());
            ivrTaskVO.setOrgid(user.getOrgid());
            ivrTaskVO.setPatTaskRelevances(ivrTaskVO1.getPatTaskRelevances());
            return success(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO));
        }else {
            return error("insertOrUpdateTaskByTaskId taskid不可为空");
        }
    }
    /**
     * 电话回调任务(上海)
     */
    @ApiOperation("电话回调任务")