| | |
| | | import com.vincent.rsf.server.manager.entity.Matnr; |
| | | import com.vincent.rsf.server.manager.entity.excel.MatnrsTemplate; |
| | | import com.vincent.rsf.server.manager.service.MatnrService; |
| | | import com.vincent.rsf.server.manager.utils.buildPageRowsUtils; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | // } |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Matnr, BaseParam> pageParam = new PageParam<>(baseParam, Matnr.class); |
| | | return R.ok().add(matnrService.getMatnrPage(pageParam, map)); |
| | | PageParam<Matnr, BaseParam> page = matnrService.getMatnrPage(pageParam, map); |
| | | buildPageRowsUtils.userNameMap(page.getRecords()); |
| | | return R.ok().add(page); |
| | | |
| | | } |
| | | |
| | |
| | | if (!Objects.isNull(map.get("ids"))) { |
| | | matnrs = matnrService.list(new LambdaQueryWrapper<Matnr>().in(Matnr::getId, map.get("ids")).eq(Matnr::getStatus, 1)); |
| | | } else { |
| | | matnrs = matnrService.list(new LambdaQueryWrapper<Matnr>().last("limit 1")); |
| | | matnrs = matnrService.list(); |
| | | } |
| | | ExcelUtil.build(ExcelUtil.create(matnrs, Matnr.class, true), response); |
| | | ExcelUtil.build(ExcelUtil.create(matnrs, Matnr.class, false), response); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:matnr:list')") |