| | |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.openApi.entity.dto.CommonResponse; |
| | | import com.vincent.rsf.openApi.entity.phyz.*; |
| | | import com.vincent.rsf.openApi.service.phyz.MesReportService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import static com.vincent.rsf.openApi.controller.AuthController.SIMULATED_DATA_ENABLE; |
| | | import static com.vincent.rsf.openApi.controller.phyz.ERPController.paramsFormat; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/mes") |
| | | @Api("银座新工厂(五期)MES接口") |
| | | public class MESController { |
| | | |
| | | @Resource |
| | | private MesReportService mesReportService; |
| | | |
| | | |
| | | @ApiOperation("备料通知") |
| | | @PostMapping("/callMaterial") |
| | |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | | // region 测试推送功能 |
| | | @ApiOperation("托盘信息同步") |
| | | @PostMapping("/syncPalletInfo") |
| | | public CommonResponse syncPalletInfo(@RequestBody Object objParams) { |
| | | try { |
| | | return mesReportService.syncPalletInfo(objParams); |
| | | } catch (Exception e) { |
| | | log.error("mes, syncPalletInfo", e); |
| | | } |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | | @ApiOperation("站点信息同步") |
| | | @PostMapping("/syncStationInfo") |
| | | public CommonResponse syncStationInfo(@RequestBody Object objParams) { |
| | | try { |
| | | return mesReportService.syncStationInfo(objParams); |
| | | } catch (Exception e) { |
| | | log.error("mes, syncStationInfo", e); |
| | | } |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | | @ApiOperation("AGV任务回调") |
| | | @PostMapping("/reportTaskExecute") |
| | | public CommonResponse reportTaskExecute(@RequestBody Object objParams) { |
| | | try { |
| | | return mesReportService.reportTaskExecute(objParams); |
| | | } catch (Exception e) { |
| | | log.error("mes, reportTaskExecute", e); |
| | | } |
| | | return CommonResponse.ok(); |
| | | } |
| | | // endregion |
| | | |
| | | } |