| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.handler.WCSReportHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WCSReportHandler wcsReportHandler; |
| | | |
| | | @RequestMapping(value = "/wrkMast/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | return null; |
| | | } |
| | | |
| | | //任务优先级调整 调用wcs接口 通知wcs |
| | | public ReturnT<String> notice(WrkMast wrkMast) { |
| | | WrkPriority wrkPriority = new WrkPriority(); |
| | | Date date = new Date(); |
| | |
| | | wrkMast.setWrkSts(1L); |
| | | wrkMastService.updateById(wrkMast); |
| | | } else { |
| | | log.error("wms下发任务给wcs失败!!!url:{};request:{};response:{}", url + "/" + workIssued, JSON.toJSONString(wrkPriority), response); |
| | | throw new CoolException("wms下发任务给wcs失败"); |
| | | log.error("wms调整优先级下发给wcs失败!!!url:{};request:{};response:{}", url + "/" + workIssued, JSON.toJSONString(wrkPriority), response); |
| | | throw new CoolException("wms调整优先级下发给wcs失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "wms下发任务给wcs", |
| | | "wms调整优先级下发给wcs", |
| | | url + "/" + workIssued, |
| | | null, |
| | | "127.0.0.1", |