¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.mapper.ClientSatisfactionAnalyseFileMapper; |
| | | import com.ruoyi.manage.pojo.ClientSatisfaction; |
| | | import com.ruoyi.manage.pojo.ClientSatisfactionAnalyseFile; |
| | | import com.ruoyi.manage.service.ClientSatisfactionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Api(tags = "å®¢æ·æ»¡æåº¦è°æ¥") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/clientSatisfaction") |
| | | public class ClientSatisfactionController { |
| | | |
| | | private ClientSatisfactionService clientSatisfactionService; |
| | | private ClientSatisfactionAnalyseFileMapper clientSatisfactionAnalyseFileMapper; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥å表") |
| | | @PostMapping("/pageClientSatisfaction") |
| | | public Result<IPage<ClientSatisfaction>> pageClientSatisfaction(Page page,ClientSatisfaction clientSatisfaction) throws Exception { |
| | | return Result.success(clientSatisfactionService.pageClientSatisfaction(page, clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥æ°å¢ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @PostMapping("/addClientSatisfaction") |
| | | public Result addClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction){ |
| | | return Result.success(clientSatisfactionService.save(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @PostMapping("/updateClientSatisfaction") |
| | | public Result updateClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction){ |
| | | return Result.success(clientSatisfactionService.updateById(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @GetMapping("/delClientSatisfaction") |
| | | public Result updateClientSatisfaction(Integer clientSatisfactionId){ |
| | | return Result.success(clientSatisfactionService.removeById(clientSatisfactionId)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦å¯¼åº |
| | | * @param clientSatisfactionId |
| | | * @param response |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å®¢æ·æ»¡æå¯¼åº") |
| | | @GetMapping("/exportWordClientSatisfaction") |
| | | public Result exportWordClientSatisfaction(Integer clientSatisfactionId, HttpServletResponse response){ |
| | | clientSatisfactionService.exportWordClientSatisfaction(clientSatisfactionId, response); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ç¡®è®¤å®¢æ·æ»¡æåº¦ |
| | | * @param clientSatisfaction è¦ä¿®æ¹å®¢æ·æ»¡æåº¦çç¶æå¯¹è±¡ |
| | | * @param userId ä¿®æ¹äººid |
| | | */ |
| | | |
| | | @ApiOperation(value = "ç¡®è®¤å®¢æ·æ»¡æåº¦") |
| | | @GetMapping("/confirmClientSatisfaction") |
| | | public void confirmClientSatisfaction(ClientSatisfaction clientSatisfaction, Integer userId){ |
| | | clientSatisfactionService.confirmClientSatisfaction(clientSatisfaction, userId); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å®¢æ·åæéä»¶ |
| | | * @param file |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ°å¢æ·åæéä»¶") |
| | | @PostMapping("/uploadAnalyseFile") |
| | | public Result<?> uploadAnalyseFile(MultipartFile file) { |
| | | return Result.success(clientSatisfactionService.uploadAnalyseFile(file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ·åæéä»¶ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ·åæéä»¶") |
| | | @PostMapping("/pageAnalyseFile") |
| | | public Result<IPage<ClientSatisfactionAnalyseFile>> pageAnalyseFile(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ClientSatisfactionAnalyseFile analyseFile = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ClientSatisfactionAnalyseFile.class); |
| | | return Result.success(clientSatisfactionService.pageAnalyseFile(page, analyseFile)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿·åæéä»¶ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å 餿·åæéä»¶") |
| | | @GetMapping("/delAnalyseFile") |
| | | public Result delAnalyseFile(Integer analyseFileId){ |
| | | return Result.success(clientSatisfactionAnalyseFileMapper.deleteById(analyseFileId)); |
| | | } |
| | | } |
| | | |