| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.aftersalesservice.dto.AfterSalesServiceDto; |
| | | import com.ruoyi.aftersalesservice.pojo.AfterSalesService; |
| | | import com.ruoyi.aftersalesservice.service.AfterSalesServiceService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.EquipmentEnergyConsumption; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.VatDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @Log(title = "售后服务-反馈登记", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @ApiOperation("售后服务-反馈登记") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | | AfterSalesService afterSalesService = new AfterSalesService(); |
| | | IPage<AfterSalesService> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | List<AfterSalesServiceDto> list = new ArrayList<>(); |
| | | listPage.getRecords().forEach(item -> { |
| | | AfterSalesServiceDto dto = new AfterSalesServiceDto(); |
| | | BeanUtils.copyProperties(item, dto); |
| | | dto.setStatusName(item.getStatus().toString()); |
| | | list.add(dto); |
| | | }); |
| | | ExcelUtil<AfterSalesServiceDto> util = new ExcelUtil<AfterSalesServiceDto>(AfterSalesServiceDto.class); |
| | | util.exportExcel(response, list , "反馈登记"); |
| | | } |
| | | |
| | | @Log(title = "售后服务-售后处理", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportTwo") |
| | | @ApiOperation("售后服务-售后处理") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | | AfterSalesService afterSalesService = new AfterSalesService(); |
| | | IPage<AfterSalesService> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | listPage.getRecords().forEach(item -> { |
| | | item.setStatusName(item.getStatus().toString()); |
| | | }); |
| | | ExcelUtil<AfterSalesService> util = new ExcelUtil<AfterSalesService>(AfterSalesService.class); |
| | | util.exportExcel(response, listPage.getRecords() , "售后处理"); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("售后服务-新增") |
| | | @Log(title = "售后服务-新增", businessType = BusinessType.INSERT) |