| | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.ServiceSubtaskDetail; |
| | | import com.smartor.service.IServiceSubtaskDetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 语音任务结果明细Controller |
| | |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Api(description = "语音任务结果明细") |
| | | @RestController |
| | | @RequestMapping("/smartor/serviceSubtaskDetail") |
| | | public class ServiceSubtaskDetailController extends BaseController { |
| | |
| | | private IServiceSubtaskDetailService ServiceSubtaskDetailService; |
| | | |
| | | /** |
| | | * 查询语音任务呼叫明细列表 |
| | | * 查询单个人的语音信息 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceSubtaskDetail:list')") |
| | | @ApiOperation("查询任务结果明细列表") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | startPage(); |
| | | List<ServiceSubtaskDetail> list = ServiceSubtaskDetailService.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出语音任务呼叫明细列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceSubtaskDetail:export')") |
| | | @Log(title = "语音任务呼叫明细", businessType = BusinessType.EXPORT) |
| | | @ApiOperation("导出任务结果明细列表") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | List<ServiceSubtaskDetail> list = ServiceSubtaskDetailService.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | ExcelUtil<ServiceSubtaskDetail> util = new ExcelUtil<ServiceSubtaskDetail>(ServiceSubtaskDetail.class); |
| | | util.exportExcel(response, list, "语音任务呼叫明细数据"); |
| | | @ApiOperation("查询单个人的语音信息通过子任务ID") |
| | | @PostMapping("/getPersonVoice") |
| | | public Map<String, Object> getPersonVoice(@RequestBody ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (serviceSubtaskDetail.getSubId() == null) { |
| | | map.put("code", 500); |
| | | map.put("msg", "查询失败,请查检入参"); |
| | | } else map = ServiceSubtaskDetailService.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | |
| | | return toAjax(ServiceSubtaskDetailService.updateServiceSubtaskDetail(serviceSubtaskDetail)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改语音任务呼叫明细 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceSubtaskDetail:edit')") |
| | | @Log(title = "语音任务呼叫明细", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改任务结果明细") |
| | | @PostMapping("/batchEdit") |
| | | public AjaxResult edit(@RequestBody List<ServiceSubtaskDetail> serviceSubtaskDetails) { |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubtaskDetails) { |
| | | ServiceSubtaskDetailService.updateServiceSubtaskDetail(serviceSubtaskDetail); |
| | | } |
| | | return toAjax(1); |
| | | } |
| | | |
| | | @ApiOperation("修改任务结果明细通过条件") |
| | | @PostMapping("/editByCondition") |
| | | public AjaxResult updateSSDByCondition(@RequestBody ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | return toAjax(ServiceSubtaskDetailService.updateSSDByCondition(serviceSubtaskDetail)); |
| | | return toAjax(ServiceSubtaskDetailService.updateSSDByCondition(serviceSubtaskDetail)); |
| | | } |
| | | |
| | | /** |