zhou zhou
10 小时以前 cfe049492f81d2c650a2b17348593edbc5054498
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/MatnrController.java
@@ -27,7 +27,7 @@
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
@@ -204,16 +204,16 @@
        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(null, MatnrsTemplate.class, true), response);
        ExcelUtil.build(ExcelUtil.create(matnrs, Matnr.class, false), response);
    }
    @PreAuthorize("hasAuthority('manager:matnr:list')")
    @ApiOperation("下载物料模板")
    @PostMapping("/matnr/template/download")
    public void download(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
        ExcelUtil.build(ExcelUtil.create(null, MatnrsTemplate.class, true), response);
        ExcelUtil.build(ExcelUtil.create(null, MatnrsTemplate.class), response);
    }