| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.InboundManagement; |
| | | import com.ruoyi.procurementrecord.service.InboundManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * @date : 2025/9/16 16:38 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "到货管理") |
| | | @Tag(name = "到货管理") |
| | | @RequestMapping("/inboundManagement") |
| | | @AllArgsConstructor |
| | | public class InboundManagementController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InboundManagementService inboundManagementService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("到货管理-查询") |
| | | @Operation(summary = "到货管理-查询") |
| | | public AjaxResult listPage(Page page, InboundManagement inboundManagement) { |
| | | IPage<InboundManagement> result = inboundManagementService.listPage(page, inboundManagement); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("到货管理-添加") |
| | | @Operation(summary = "到货管理-添加") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody InboundManagement inboundManagement) { |
| | | inboundManagement.setArrivalTime(new Date()); |
| | |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("到货管理-修改") |
| | | @Operation(summary = "到货管理-修改") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody InboundManagement inboundManagement) { |
| | | boolean result = inboundManagementService.updateById(inboundManagement); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("到货管理-删除") |
| | | @Operation(summary = "到货管理-删除") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult del(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请选择至少一条数据"); |