package com.ruoyi.api.controller; import cn.hutool.json.JSONUtil; import com.ruoyi.api.moveMsg.domain.MoveMsg; import com.ruoyi.api.service.IToErpService; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.log.service.IRequestLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.*; import com.ruoyi.api.domain.DeliveryNoticeVo; /** * 作业统计 Controller */ @RestController @RequestMapping("/api2erp") public class ToErpApiController { @Autowired private IToErpService toErpService; @Autowired private IRequestLogService requestLogService; /** * 接收入出库通知单 */ @PostMapping("/receiveDeliveryNotice") @ResponseBody public AjaxResult receiveDeliveryNotice(@RequestBody DeliveryNoticeVo deliveryNoticeVo) { AjaxResult ajaxResult = toErpService.receiveDeliveryNotice(deliveryNoticeVo); requestLogService.insertRequestLog(requestLogService.getRequestLog(JSONUtil.toJsonStr(deliveryNoticeVo), "接收入出库通知单", ajaxResult)); return ajaxResult; } /** * 回传其他入库单 */ //@Scheduled(fixedDelay = 1500) @RequestMapping("/callbackInDeliveryNotice") @ResponseBody public void callbackInDeliveryNotice() { toErpService.callbackInDeliveryNotice(); } /** * 回传其他出库单 */ // @Scheduled(fixedDelay = 1500) @RequestMapping("/callbackOutDeliveryNotice") @ResponseBody public void callbackDeliveryOutNotice() { toErpService.callbackoutDeliveryNotice(); } /** * 移库回调接口 */ // @Scheduled(fixedDelay = 1500) @RequestMapping("/moveCargoSpace") @ResponseBody public void moveCargoSpace(){ toErpService.moveCargoSpace(); } }