zhou zhou
2 天以前 f27309d45c7ef46b0aea98107b67d0c5b46d4217
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/ReviseLogController.java
@@ -13,12 +13,14 @@
import com.vincent.rsf.server.manager.controller.params.ReviseLogParams;
import com.vincent.rsf.server.manager.entity.ReviseLog;
import com.vincent.rsf.server.manager.service.ReviseLogService;
import com.vincent.rsf.server.manager.utils.buildPageRowsUtils;
import com.vincent.rsf.server.system.controller.BaseController;
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 javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.util.*;
@RestController
@@ -32,7 +34,9 @@
    public R page(@RequestBody Map<String, Object> map) {
        BaseParam baseParam = buildParam(map, BaseParam.class);
        PageParam<ReviseLog, BaseParam> pageParam = new PageParam<>(baseParam, ReviseLog.class);
        return R.ok().add(reviseLogService.page(pageParam, pageParam.buildWrapper(true)));
        PageParam<ReviseLog, BaseParam> page = reviseLogService.page(pageParam, pageParam.buildWrapper(true));
        buildPageRowsUtils.userNameMap(page.getRecords());
        return R.ok().add(page);
    }
    @PreAuthorize("hasAuthority('manager:locRevise:list')")
@@ -67,6 +71,7 @@
        return R.ok("Save Success").add(reviseLog);
    }
    @PreAuthorize("hasAuthority('manager:locRevise:update')")
    @OperationLog("Update 库位调整历史")
    @PostMapping("/reviseLog/update")
@@ -89,6 +94,16 @@
        return R.ok().add(reviseLogService.reviseLoc(reviseLog, getLoginUserId()));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:update')")
    @PostMapping("/reviseLog/complete/{id}")
    @ApiOperation("确认调整库存")
    public R completeTran(@PathVariable("id") Long id) {
        if (Objects.isNull(id)) {
            throw new CoolException("参数不能为空!!");
        }
        return reviseLogService.complete(id, getLoginUserId());
    }
    @PreAuthorize("hasAuthority('manager:locRevise:remove')")
    @OperationLog("Delete 库位调整历史")
    @PostMapping("/reviseLog/remove/{ids}")