| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.mes.*; |
| | | import com.zy.asrs.service.MesService; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | return mesReturn; |
| | | } |
| | | |
| | | // 出库申请 |
| | | @PostMapping("/api/mes/outBoundOrder") |
| | | public MesReturn outBoundOrder(@RequestBody MesOutApply param){ |
| | | |
| | | @AppAuth(memo = "出库申请") |
| | | public MesReturn outBoundOrder(@RequestHeader(required = false) String appkey,@RequestBody MesOutApply param, HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | MesReturn mesReturn = new MesReturn(); |
| | | mesReturn.setSuccess(mesService.outBoundOrder(param) == 1 ? "1" : "2"); |
| | | return mesReturn; |
| | | } |
| | | |
| | | // 出库申请(叫料),装配库、滑块库 |
| | | @PostMapping("/api/mes/callOutBoundOrder") |
| | | public MesReturn callOutBoundOrder(@RequestBody MesCallOutApply param){ |
| | | |
| | | MesReturn mesReturn = new MesReturn(); |
| | | mesReturn.setSuccess(mesService.callOutBoundOrder(param) == 1 ? "1" : "2"); |
| | | return mesReturn; |
| | | } |
| | | |
| | | // 入库申请 |
| | | @PostMapping("/api/mes/inBoundOrder") |
| | | public MesReturn inBoundOrder(@RequestBody MesInApply param){ |
| | | |
| | | @AppAuth(memo = "入库申请") |
| | | public MesReturn inBoundOrder(@RequestHeader(required = false) String appkey,@RequestBody MesInApply param, HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | MesReturn mesReturn = new MesReturn(); |
| | | mesReturn.setSuccess(mesService.inBoundOrder(param) == 1 ? "1" : "2"); |
| | | return mesReturn; |
| | | } |
| | | |
| | | // 入站允许 |
| | | @PostMapping("/api/mes/allowInStation") |
| | | public MesReturn allowInStation(@RequestBody TransInOutStationAllow param){ |
| | | |
| | | @AppAuth(memo = "入站允许") |
| | | public MesReturn allowInStation(@RequestHeader(required = false) String appkey,@RequestBody TransInOutStationAllow param, HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | return mesService.allowInStation(param); |
| | | } |
| | | |
| | | // 离站允许,装配库、滑块库 |
| | | @PostMapping("/api/mes/allowOutStation") |
| | | public MesReturn allowOutStation(@RequestBody TransInOutStationAllow param){ |
| | | |
| | | public MesReturn allowOutStation(@RequestHeader(required = false) String appkey,@RequestBody TransInOutStationAllow param, HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | return mesService.allowOutStation(param); |
| | | } |
| | | |
| | | // 下发运输任务 |
| | | @PostMapping("/api/mes/submitTask") |
| | | public JSONObject submitTask(@RequestBody TransTask param){ |
| | | |
| | | @AppAuth(memo = "下发运输任务") |
| | | public JSONObject submitTask(@RequestHeader(required = false) String appkey,@RequestBody TransTask param, HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | return mesService.submitTask(param); |
| | | } |
| | | |
| | | // region 临时测试 |
| | | |
| | | @GetMapping("/api/mes/testInFeedback") |
| | | public int test(@RequestParam String orderNo){ |
| | | |
| | | return mesService.inFeedback(orderNo); |
| | | } |
| | | |
| | | @GetMapping("/api/mes/testInFeedback2") |
| | | public int test(@RequestParam String orderNo, @RequestParam String zapplet){ |
| | | |
| | | return mesService.recvFeedback(orderNo, zapplet); |
| | | } |
| | | // endregion |
| | | |
| | | // 库存查询接口 |
| | | // 按 物料编码+oderNo |
| | | @PostMapping("/api/mes/queryInventory") |
| | | public MesReturn queryInventory(@RequestBody JSONObject param){ |
| | | @AppAuth(memo = "库存查询接口") |
| | | public MesReturn queryInventory(@RequestHeader(required = false) String appkey,@RequestBody JSONObject param, HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | MesReturn mesReturn = new MesReturn(); |
| | | String itemno = param.getString("itemno"); |
| | | String orderNo = param.getString("orderNo"); |