更新wip-退火 缺少实际库区选择,重新占据库位能力
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.domain.bo.WmsFurnaceBo;
|
||||
import com.klp.domain.bo.WmsFurnaceBusyBo;
|
||||
import com.klp.domain.bo.WmsFurnaceStatusBo;
|
||||
import com.klp.domain.vo.WmsFurnaceVo;
|
||||
import com.klp.service.IWmsFurnaceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 退火炉管理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-03-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/anneal/furnace")
|
||||
public class WmsFurnaceController extends BaseController {
|
||||
|
||||
private final IWmsFurnaceService iWmsFurnaceService;
|
||||
|
||||
/**
|
||||
* 查询炉子列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsFurnaceVo> list(WmsFurnaceBo bo, PageQuery pageQuery) {
|
||||
return iWmsFurnaceService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取炉子详情
|
||||
*/
|
||||
@GetMapping("/{furnaceId}")
|
||||
public R<WmsFurnaceVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long furnaceId) {
|
||||
return R.ok(iWmsFurnaceService.queryById(furnaceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增炉子
|
||||
*/
|
||||
@Log(title = "退火炉", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping("/add")
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsFurnaceBo bo) {
|
||||
return toAjax(iWmsFurnaceService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改炉子
|
||||
*/
|
||||
@Log(title = "退火炉", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping("/edit")
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsFurnaceBo bo) {
|
||||
return toAjax(iWmsFurnaceService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用停用
|
||||
*/
|
||||
@Log(title = "退火炉", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping("/status")
|
||||
public R<Void> changeStatus(@Validated @RequestBody WmsFurnaceStatusBo bo) {
|
||||
return toAjax(iWmsFurnaceService.updateStatus(bo.getFurnaceId(), bo.getStatus()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 置忙/置闲
|
||||
*/
|
||||
@Log(title = "退火炉", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping("/busy")
|
||||
public R<Void> changeBusy(@Validated @RequestBody WmsFurnaceBusyBo bo) {
|
||||
return toAjax(iWmsFurnaceService.updateBusy(bo.getFurnaceId(), bo.getBusyFlag()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除炉子
|
||||
*/
|
||||
@Log(title = "退火炉", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{furnaceIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] furnaceIds) {
|
||||
return toAjax(iWmsFurnaceService.deleteWithValidByIds(Arrays.asList(furnaceIds), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user