no message
parent
8a85e94431
commit
c50803b4bd
|
|
@ -211,6 +211,13 @@ public class StockController {
|
|||
return new ResponseEntity<>(stockService.getItemCode(stockCode), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/stockMsg")
|
||||
@AnonymousAccess
|
||||
public ResponseEntity<Object> stockMsg() {
|
||||
String stockMsg = stockService.stockMsg();
|
||||
return new ResponseEntity<>(stockMsg, HttpStatus.OK);
|
||||
}
|
||||
|
||||
private ResponseEntity<Object> badRequest(String message) {
|
||||
return new ResponseEntity<>(ApiResult.fail(BAD_REQUEST.value(), message, ""), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,4 +207,6 @@ public interface StockService {
|
|||
*/
|
||||
void callJlTask(Pick pick);
|
||||
|
||||
String stockMsg();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ import com.youchain.businessdata.domain.*;
|
|||
import com.youchain.businessdata.repository.*;
|
||||
import com.youchain.businessdata.service.*;
|
||||
import com.youchain.businessdata.service.dto.TaskDto;
|
||||
import com.youchain.modules.mnt.websocket.MsgType;
|
||||
import com.youchain.modules.mnt.websocket.SocketMsg;
|
||||
import com.youchain.modules.mnt.websocket.WebSocketServer;
|
||||
import com.youchain.utils.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.youchain.basicdata.repository.StockRepository;
|
||||
|
|
@ -661,6 +664,16 @@ public class StockServiceImpl implements StockService {
|
|||
pointRepository.save(endPoint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String stockMsg() {
|
||||
try {
|
||||
WebSocketServer.sendInfo(new SocketMsg("容器未解绑,请及时处理!", MsgType.INFO), "stock");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "ok";
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证任务
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue