zhou zhou
3 天以前 f27309d45c7ef46b0aea98107b67d0c5b46d4217
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocAreaMatRelaController.java
@@ -13,6 +13,7 @@
import com.vincent.rsf.server.manager.controller.params.LocAreaMatsParam;
import com.vincent.rsf.server.manager.entity.LocAreaMatRela;
import com.vincent.rsf.server.manager.service.LocAreaMatRelaService;
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;
@@ -21,7 +22,7 @@
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.util.*;
@Api(tags = "库区物料关系绑定")
@@ -36,7 +37,9 @@
    public R page(@RequestBody Map<String, Object> map) {
        BaseParam baseParam = buildParam(map, BaseParam.class);
        PageParam<LocAreaMatRela, BaseParam> pageParam = new PageParam<>(baseParam, LocAreaMatRela.class);
        return R.ok().add(locAreaMatRelaService.page(pageParam, pageParam.buildWrapper(true)));
        PageParam<LocAreaMatRela, BaseParam> page = locAreaMatRelaService.page(pageParam, pageParam.buildWrapper(true));
        buildPageRowsUtils.userNameMap(page.getRecords());
        return R.ok().add(page);
    }
    @PreAuthorize("hasAuthority('manager:locAreaMatRela:list')")
@@ -183,12 +186,12 @@
        if (Objects.isNull(param)) {
            throw new CoolException("参数不能为空!!");
        }
        if (Objects.isNull(param.getAreaId())) {
            throw new CoolException("库区不能为空!!");
        }
        if (Objects.isNull(param.getWarehouseId())) {
            throw new CoolException("仓库不能为空!!");
        }
//        if (Objects.isNull(param.getAreaId())) {
//            throw new CoolException("库区不能为空!!");
//        }
//        if (Objects.isNull(param.getWarehouseId())) {
//            throw new CoolException("仓库不能为空!!");
//        }
        if (Objects.isNull(param.getAreaMatId())) {
            throw new CoolException("主单ID不能为空!!");
        }