修改
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
package org.nl.wms.pda.mps.rest;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.wms.pda.mps.service.BakingService;
|
||||||
|
import org.nl.wms.pda.mps.service.RawFoilService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "烘烤工序")
|
||||||
|
@RequestMapping("api/pda/baking")
|
||||||
|
@Slf4j
|
||||||
|
public class BakingController {
|
||||||
|
|
||||||
|
private final BakingService bakingService;
|
||||||
|
|
||||||
|
@PostMapping("/ovenInAndOut")
|
||||||
|
@Log("烘箱出入")
|
||||||
|
@ApiOperation("烘箱出入")
|
||||||
|
public ResponseEntity<Object> queryRawFoil(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(bakingService.ovenInAndOut(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -43,4 +43,32 @@ public class RawFoilController {
|
|||||||
public ResponseEntity<Object> queryRawFoilList(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> queryRawFoilList(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(rawFoilService.queryRawFoilList(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(rawFoilService.queryRawFoilList(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/needEmptyAxis")
|
||||||
|
@Log("呼叫空轴")
|
||||||
|
@ApiOperation("呼叫空轴")
|
||||||
|
public ResponseEntity<Object> needEmptyAxis(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(rawFoilService.needEmptyAxis(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirmBlanking")
|
||||||
|
@Log("确认下卷")
|
||||||
|
@ApiOperation("确认下卷")
|
||||||
|
public ResponseEntity<Object> confirmBlanking(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(rawFoilService.confirmBlanking(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/finishBlanking")
|
||||||
|
@Log("下卷完成")
|
||||||
|
@ApiOperation("下卷完成")
|
||||||
|
public ResponseEntity<Object> finishBlanking(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(rawFoilService.finishBlanking(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/finish")
|
||||||
|
@Log("完成")
|
||||||
|
@ApiOperation("完成")
|
||||||
|
public ResponseEntity<Object> finish(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(rawFoilService.finish(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,44 @@ public interface RawFoilService {
|
|||||||
JSONObject queryProductArea();
|
JSONObject queryProductArea();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 叫料确定
|
* 查询生箔生产进度
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject queryRawFoil(JSONObject whereJson);
|
JSONObject queryRawFoil(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生箔工单
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
JSONObject queryRawFoilList(JSONObject whereJson);
|
JSONObject queryRawFoilList(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认下卷
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject needEmptyAxis(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生箔工单
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject confirmBlanking(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下卷完成
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject finishBlanking(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject finish(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
// 1、准备参数:point_code、type = 4
|
// 1、准备参数:point_code、type = 4
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("type","4");
|
param.put("type", "4");
|
||||||
param.put("point_code",whereJson.getString("point_code"));
|
param.put("point_code", whereJson.getString("point_code"));
|
||||||
// 2、调用接口
|
// 2、调用接口
|
||||||
JSONObject json = acsToWmsService.apply(param);
|
JSONObject json = acsToWmsService.apply(param);
|
||||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
if (StrUtil.equals(json.getString("status"), "200")) {
|
||||||
@@ -44,7 +44,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
} else {
|
} else {
|
||||||
result.put("result", "");
|
result.put("result", "");
|
||||||
result.put("code", "0");
|
result.put("code", "0");
|
||||||
result.put("desc", "操作失败:"+json.getString("message"));
|
result.put("desc", "操作失败:" + json.getString("message"));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -54,8 +54,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
// 1、准备参数:point_code、type = 4
|
// 1、准备参数:point_code、type = 4
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("type","4");
|
param.put("type", "4");
|
||||||
param.put("point_code",whereJson.getString("point_code"));
|
param.put("point_code", whereJson.getString("point_code"));
|
||||||
// 2、调用接口
|
// 2、调用接口
|
||||||
JSONObject json = acsToWmsService.apply(param);
|
JSONObject json = acsToWmsService.apply(param);
|
||||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
if (StrUtil.equals(json.getString("status"), "200")) {
|
||||||
@@ -65,28 +65,54 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
} else {
|
} else {
|
||||||
result.put("result", "");
|
result.put("result", "");
|
||||||
result.put("code", "0");
|
result.put("code", "0");
|
||||||
result.put("desc", "操作失败:"+json.getString("message"));
|
result.put("desc", "操作失败:" + json.getString("message"));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject needEmptyAxis(JSONObject whereJson) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
JSONArray rows = new JSONArray();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("code", "1");
|
||||||
|
result.put("desc", "查询成功");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject confirmBlanking(JSONObject whereJson) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
JSONArray rows = new JSONArray();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("code", "1");
|
||||||
|
result.put("desc", "查询成功");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject finishBlanking(JSONObject whereJson) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
JSONArray rows = new JSONArray();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("code", "1");
|
||||||
|
result.put("desc", "查询成功");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject finish(JSONObject whereJson) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
JSONArray rows = new JSONArray();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("code", "1");
|
||||||
|
result.put("desc", "查询成功");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user