chenhj
2026-04-22 fa3428b4bb32179a42d5618357c22fe2695716ae
src/main/java/com/ruoyi/procurementrecord/controller/InboundManagementController.java
@@ -9,7 +9,8 @@
import com.ruoyi.procurementrecord.service.InboundManagementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.AllArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
@@ -22,9 +23,9 @@
@RestController
@Api(tags = "到货管理")
@RequestMapping("/inboundManagement")
@AllArgsConstructor
public class InboundManagementController extends BaseController {
    @Autowired
    private InboundManagementService inboundManagementService;
    @GetMapping("/listPage")
@@ -36,6 +37,7 @@
    @PostMapping("/add")
    @ApiOperation("到货管理-添加")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult add(@RequestBody InboundManagement inboundManagement) {
        inboundManagement.setArrivalTime(new Date());
        boolean result = inboundManagementService.save(inboundManagement);
@@ -44,6 +46,7 @@
    @PostMapping("/update")
    @ApiOperation("到货管理-修改")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult update(@RequestBody InboundManagement inboundManagement) {
        boolean result = inboundManagementService.updateById(inboundManagement);
        return result ? AjaxResult.success() : AjaxResult.error();
@@ -51,6 +54,7 @@
    @DeleteMapping("/del")
    @ApiOperation("到货管理-删除")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult del(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请选择至少一条数据");
        boolean result = inboundManagementService.removeByIds(ids);