add:wms接口

This commit is contained in:
2024-06-20 09:00:05 +08:00
parent 2f24f6b67e
commit 804ef3a786
4 changed files with 26 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ package org.nl.acs.ext.wms.rest;
import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.ext.wms.data.one.CancelTaskRequest;
@@ -45,6 +46,20 @@ public class WmsToAcsController {
return new ResponseEntity<>(wmstoacsService.cancelFromWms(reqs), HttpStatus.OK);
}
@PostMapping("/switchInOut")
@Log(value = "切换出入库模式")
@SaIgnore
public ResponseEntity<Object> switchInOut(@RequestBody JSONObject reqs) throws Exception {
return new ResponseEntity<>(wmstoacsService.switchInOut(reqs), HttpStatus.OK);
}
@PostMapping("/pinckStartStop")
@Log(value = "拣选工位启停")
@SaIgnore
public ResponseEntity<Object> pinckStartStop(@RequestBody JSONObject reqs) throws Exception {
return new ResponseEntity<>(wmstoacsService.pinkStartStop(reqs), HttpStatus.OK);
}

View File

@@ -17,6 +17,8 @@ public interface AcsToWmsService {
public UnifiedResponse feedbackTaskStatusToWms(JSONArray arr);
public UnifiedResponse feedPinkStartStop(JSONObject req);
}

View File

@@ -1,6 +1,7 @@
package org.nl.acs.ext.wms.service;
import com.alibaba.fastjson.JSONObject;
import org.nl.acs.ext.wms.data.one.*;
import java.util.List;
@@ -31,9 +32,7 @@ public interface WmsToAcsService {
CancelTaskResponse cancelFromWms(List<CancelTaskRequest> reqs) throws Exception;
JSONObject switchInOut(JSONObject reqs);
JSONObject pinkStartStop(JSONObject reqs);
}

View File

@@ -37,5 +37,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
return LmsHttpUtil.sendPostRequest(addressDto.getMethods_url(), arr, null);
}
@Override
public UnifiedResponse feedPinkStartStop(JSONObject req) {
AddressDto addressDto = addressService.findByCode("feedPinkStartStop");
return LmsHttpUtil.sendPostRequest(addressDto.getMethods_url(), req, null);
}
}