skyouc
1 天以前 3170c2aca0583f801a5527c124103cfbff2bb306
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/CheckOrderController.java
@@ -17,9 +17,12 @@
import com.vincent.rsf.server.system.controller.BaseController;
import com.vincent.rsf.server.system.utils.SerialRuleUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
@@ -29,7 +32,6 @@
    @Autowired
    private CheckOrderService checkOrderService;
    @PreAuthorize("hasAuthority('manager:check:list')")
    @PostMapping("/check/page")
@@ -122,4 +124,23 @@
        ExcelUtil.build(ExcelUtil.create(orders, AsnOrder.class), response);
    }
    /**
     * 盘点单导入
     * @param file
     * @return
     */
    @PostMapping("/check/import")
    @ApiOperation("ASN导入接口")
    @PreAuthorize("hasAuthority('manager:check:update')")
    public R importExcel(@RequestParam(value = "file") MultipartFile file) throws Exception {
        if (Objects.isNull(file)) {
            return R.error("文件不能为空!!");
        }
        HashMap<String, Object> hashMap = new HashMap<>();
        return checkOrderService.excelImport(file, hashMap, getLoginUserId());
    }
}