fix: 二期内包间拔轴请求、套轴请求的纸管信息、套管工位请求判断去成品还是废箔的接口API定义

This commit is contained in:
2024-04-24 15:34:39 +08:00
parent b57ed27a56
commit f61baa473b
6 changed files with 85 additions and 20 deletions

View File

@@ -183,4 +183,11 @@ public class AcsToWmsController {
public ResponseEntity<Object> slitterApply(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.slitterApply(param), HttpStatus.OK);
}
@PostMapping("/sendSubVolumeApply")
@Log(value = "二期内包间送子卷请求", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
@SaIgnore
public ResponseEntity<Object> sendSubVolumeApply(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.sendSubVolumeApply(param), HttpStatus.OK);
}
}

View File

@@ -174,4 +174,11 @@ public interface AcsToWmsService {
* @return /
*/
JSONObject slitterApply(JSONObject param);
/**
* 二期内包间送子卷请求
* @param param /
* @return /
*/
JSONObject sendSubVolumeApply(JSONObject param);
}

View File

@@ -2104,4 +2104,27 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
return res;
}
@SneakyThrows
@Override
public JSONObject sendSubVolumeApply(JSONObject param) {
log.info("slitterApply请求参数---------------------------------------------{}", param);
JSONObject res = new JSONObject();
String deviceCode = param.getString("device_code");
RLock lock = redissonClient.getLock(deviceCode);
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
try {
if (tryLock) {
res = slitterService.acsSendSubVolume(param);
} else {
log.error("sendSubVolumeApply系统繁忙参数---------------------------------------------{}", param);
throw new BadRequestException("系统繁忙,请稍后再试!");
}
} finally {
if (tryLock) {
lock.unlock();
}
}
return null;
}
}