package com.zy.asrs.controller;
|
|
import com.alibaba.fastjson.JSONObject;
|
import com.core.common.R;
|
import com.zy.asrs.entity.mes.*;
|
import com.zy.asrs.service.MesService;
|
import com.zy.common.web.BaseController;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
@RestController
|
public class MesController extends BaseController {
|
|
@Resource
|
private MesService mesService;
|
|
|
// 物料信息同步
|
@PostMapping("/api/mes/synMatInfo")
|
public MesReturn synMatInfo(@RequestBody MesMatInfo param){
|
|
MesReturn mesReturn = new MesReturn();
|
mesReturn.setSuccess(mesService.synMatInfo(param) == 1 ? "1" : "2");
|
return mesReturn;
|
}
|
|
// 出库申请
|
@PostMapping("/api/mes/outBoundOrder")
|
public MesReturn outBoundOrder(@RequestBody MesInApply param){
|
|
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){
|
|
MesReturn mesReturn = new MesReturn();
|
mesReturn.setSuccess(mesService.inBoundOrder(param, 0) == 1 ? "1" : "2");
|
return mesReturn;
|
}
|
|
// 入站允许
|
@PostMapping("/api/mes/allowInStation")
|
public MesReturn allowInStation(@RequestBody TransInOutStationAllow param){
|
|
return mesService.allowInStation(param);
|
}
|
|
// 离站允许,装配库、滑块库
|
@PostMapping("/api/mes/allowOutStation")
|
public MesReturn allowOutStation(@RequestBody TransInOutStationAllow param){
|
|
return mesService.allowOutStation(param);
|
}
|
|
// 下发运输任务
|
@PostMapping("/api/mes/submitTask")
|
public JSONObject submitTask(@RequestBody TransTask param){
|
|
return mesService.submitTask(param);
|
}
|
|
// 接受成品刀可以入库二维码
|
@PostMapping("/api/mes/inBoundItemBarcode")
|
public MesReturn inBoundItemBarcode(@RequestBody MesItemBarCode param){
|
|
MesReturn mesReturn = new MesReturn();
|
mesReturn.setSuccess("1"); // TODO:待缓存成品刀二维码;
|
return mesReturn;
|
}
|
|
|
// region 测试
|
@GetMapping("/api/mes/transDj")
|
public int transDj(@RequestParam String taskNo,@RequestParam String djNo){
|
|
return mesService.transDj(taskNo,djNo);
|
}
|
|
// 退空托盘返回产线 pda上操作空托返回产线
|
@GetMapping("/tkt")
|
public R tkt(@RequestParam String taskNo){
|
return mesService.tkt(taskNo);
|
}
|
// endregion
|
|
}
|