package com.web.pda.gltPda_wdPda.controller;
|
|
import com.web.pda.gltPda_wdPda.service.IODHSService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import com.app.base.control.WebController;
|
import com.app.base.data.ApiResponseResult;
|
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
|
@Api(description = "io_dhs接口")
|
@CrossOrigin
|
@ControllerAdvice
|
//@RestController
|
@Controller
|
@RequestMapping(value = "io_dhs")
|
public class IODHSController extends WebController{
|
|
@Autowired
|
private IODHSService iODHSService;
|
|
@ApiOperation(value = "用于德和盛设备调用接口,获取MES数据", notes = "用于德和盛设备调用接口,获取MES数据")
|
@RequestMapping(value = "/getMesInfo", method = RequestMethod.GET, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getMesInfo(
|
@RequestParam(value = "barcode") String barcode,
|
@RequestParam(value = "page") int page,
|
@RequestParam(value = "size") int size) {
|
try {
|
return iODHSService.getMesInfo(barcode,page,size);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
}
|