skyouc
10 小时以前 1badfb47887a8b95e422341fb7b44f1610cae11b
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/CheckOrderItemController.java
@@ -22,7 +22,6 @@
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.*;
@@ -40,7 +39,7 @@
    private CheckOrderItemService checkOrderItemService;
    @PreAuthorize("hasAuthority('manager:checkItem:list')")
    @PreAuthorize("hasAuthority('manager:check:list')")
    @PostMapping("/checkItem/page")
    public R page(@RequestBody Map<String, Object> map) {
        BaseParam baseParam = buildParam(map, BaseParam.class);
@@ -49,25 +48,25 @@
        return R.ok().add(checkOrderItemService.page(pageParam, wrapper));
    }
    @PreAuthorize("hasAuthority('manager:checkItem:list')")
    @PreAuthorize("hasAuthority('manager:check:list')")
    @PostMapping("/checkItem/list")
    public R list(@RequestBody Map<String, Object> map) {
        return R.ok().add(checkOrderItemService.list());
    }
    @PreAuthorize("hasAuthority('manager:checkItem:list')")
    @PreAuthorize("hasAuthority('manager:check:list')")
    @PostMapping({"/checkItem/many/{ids}", "/checkItem/many/{ids}"})
    public R many(@PathVariable Long[] ids) {
        return R.ok().add(checkOrderItemService.listByIds(Arrays.asList(ids)));
    }
    @PreAuthorize("hasAuthority('manager:checkItem:list')")
    @PreAuthorize("hasAuthority('manager:check:list')")
    @GetMapping("/checkItem/{id}")
    public R get(@PathVariable("id") Long id) {
        return R.ok().add(checkOrderItemService.getById(id));
    }
    @PreAuthorize("hasAuthority('manager:checkItem:save')")
    @PreAuthorize("hasAuthority('manager:check:save')")
    @OperationLog("Create 字典数据集")
    @PostMapping("/checkItem/save")
    public R save(@RequestBody AsnOrderItem order) {
@@ -81,7 +80,7 @@
        return R.ok("Save Success").add(order);
    }
    @PreAuthorize("hasAuthority('manager:checkItem:update')")
    @PreAuthorize("hasAuthority('manager:check:update')")
    @OperationLog("Update 字典数据集")
    @PostMapping("/checkItem/update")
    public R update(@RequestBody AsnOrderItem order) {
@@ -93,7 +92,7 @@
        return R.ok("Update Success").add(order);
    }
    @PreAuthorize("hasAuthority('manager:checkItem:remove')")
    @PreAuthorize("hasAuthority('manager:check:remove')")
    @OperationLog("Delete 字典数据集")
    @PostMapping("/checkItem/remove/{ids}")
    public R remove(@PathVariable Long[] ids) {
@@ -103,7 +102,7 @@
        return R.ok("Delete Success").add(ids);
    }
    @PreAuthorize("hasAuthority('manager:checkItem:list')")
    @PreAuthorize("hasAuthority('manager:check:list')")
    @PostMapping("/checkItem/query")
    public R query(@RequestParam(required = false) String condition) {
        List<KeyValVo> vos = new ArrayList<>();
@@ -123,7 +122,7 @@
     * @description: 盘点单导出
     * @version 1.0
     */
    @PreAuthorize("hasAuthority('manager:checkItem:list')")
    @PreAuthorize("hasAuthority('manager:check:list')")
    @PostMapping("/checkItem/export")
    public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
        List<AsnOrderItem> orders = new ArrayList<>();
@@ -144,7 +143,7 @@
     */
    @PostMapping("/checkItem/template/download")
    @ApiOperation("下载盘点单模板")
    @PreAuthorize("hasAuthority('manager:checkItem:update')")
    @PreAuthorize("hasAuthority('manager:check:update')")
    public void downloadTemplate(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
        CheckOrderTemplate template = ExcelUtil.mockData(CheckOrderTemplate.class);
        List<CheckOrderTemplate> list = Arrays.asList(template);