完成排产(测试过了)

This commit is contained in:
2026-03-08 16:02:44 +08:00
parent b660ddcc3e
commit 7736ac3311
125 changed files with 10418 additions and 15 deletions

View File

@@ -0,0 +1,44 @@
package com.klp.aps.controller;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.R;
import com.klp.aps.domain.dto.ApsLockReq;
import com.klp.aps.service.ApsLockService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* APS 锁定/解锁
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/aps")
public class ApsLockController extends BaseController {
private final ApsLockService apsLockService;
/**
* POST /aps/lock
*/
@PostMapping("/lock")
public R<Long> lock(@Validated @RequestBody ApsLockReq req) {
Long lockId = apsLockService.createLock(req, getUsername());
return R.ok(lockId);
}
/**
* POST /aps/lock/release/{lockId}
*/
@PostMapping("/lock/release/{lockId}")
public R<Void> release(@PathVariable Long lockId) {
apsLockService.releaseLock(lockId, getUsername());
return R.ok();
}
}