From 5b16486fcb45ff6ab746f075cae8cc6de1995970 Mon Sep 17 00:00:00 2001 From: "ZHOUZ\\Noble'lift" <1014987728@qq.com> Date: Sun, 9 Oct 2022 18:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/pda/mps/rest/EmptyTubeController.java | 33 +++++++++++ .../wms/pda/mps/rest/RawFoilController.java | 28 +++++++++ .../wms/pda/mps/service/RawFoilService.java | 35 ++++++++++- .../mps/service/impl/RawFoilServiceImpl.java | 58 ++++++++++++++----- 4 files changed, 137 insertions(+), 17 deletions(-) create mode 100644 nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/EmptyTubeController.java diff --git a/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/EmptyTubeController.java b/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/EmptyTubeController.java new file mode 100644 index 000000000..c5352d3d0 --- /dev/null +++ b/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/EmptyTubeController.java @@ -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 queryRawFoil(@RequestBody JSONObject whereJson) { + return new ResponseEntity<>(bakingService.ovenInAndOut(whereJson), HttpStatus.OK); + } +} diff --git a/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/RawFoilController.java b/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/RawFoilController.java index fa74fec79..d4b06f304 100644 --- a/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/RawFoilController.java +++ b/nladmin-system/src/main/java/org/nl/wms/pda/mps/rest/RawFoilController.java @@ -43,4 +43,32 @@ public class RawFoilController { public ResponseEntity queryRawFoilList(@RequestBody JSONObject whereJson) { return new ResponseEntity<>(rawFoilService.queryRawFoilList(whereJson), HttpStatus.OK); } + + @PostMapping("/needEmptyAxis") + @Log("呼叫空轴") + @ApiOperation("呼叫空轴") + public ResponseEntity needEmptyAxis(@RequestBody JSONObject whereJson) { + return new ResponseEntity<>(rawFoilService.needEmptyAxis(whereJson), HttpStatus.OK); + } + + @PostMapping("/confirmBlanking") + @Log("确认下卷") + @ApiOperation("确认下卷") + public ResponseEntity confirmBlanking(@RequestBody JSONObject whereJson) { + return new ResponseEntity<>(rawFoilService.confirmBlanking(whereJson), HttpStatus.OK); + } + + @PostMapping("/finishBlanking") + @Log("下卷完成") + @ApiOperation("下卷完成") + public ResponseEntity finishBlanking(@RequestBody JSONObject whereJson) { + return new ResponseEntity<>(rawFoilService.finishBlanking(whereJson), HttpStatus.OK); + } + + @PostMapping("/finish") + @Log("完成") + @ApiOperation("完成") + public ResponseEntity finish(@RequestBody JSONObject whereJson) { + return new ResponseEntity<>(rawFoilService.finish(whereJson), HttpStatus.OK); + } } diff --git a/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/RawFoilService.java b/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/RawFoilService.java index d943a356a..d906e62ed 100644 --- a/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/RawFoilService.java +++ b/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/RawFoilService.java @@ -11,11 +11,44 @@ public interface RawFoilService { JSONObject queryProductArea(); /** - * 叫料确定 + * 查询生箔生产进度 * @param whereJson / * @return JSONObject */ JSONObject queryRawFoil(JSONObject whereJson); + /** + * 查询生箔工单 + * @param whereJson / + * @return JSONObject + */ 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); } diff --git a/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java b/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java index e1c3be196..0c3e8405d 100644 --- a/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java @@ -33,8 +33,8 @@ public class RawFoilServiceImpl implements RawFoilService { JSONObject result = new JSONObject(); // 1、准备参数:point_code、type = 4 JSONObject param = new JSONObject(); - param.put("type","4"); - param.put("point_code",whereJson.getString("point_code")); + param.put("type", "4"); + param.put("point_code", whereJson.getString("point_code")); // 2、调用接口 JSONObject json = acsToWmsService.apply(param); if (StrUtil.equals(json.getString("status"), "200")) { @@ -44,7 +44,7 @@ public class RawFoilServiceImpl implements RawFoilService { } else { result.put("result", ""); result.put("code", "0"); - result.put("desc", "操作失败:"+json.getString("message")); + result.put("desc", "操作失败:" + json.getString("message")); } return result; } @@ -54,8 +54,8 @@ public class RawFoilServiceImpl implements RawFoilService { JSONObject result = new JSONObject(); // 1、准备参数:point_code、type = 4 JSONObject param = new JSONObject(); - param.put("type","4"); - param.put("point_code",whereJson.getString("point_code")); + param.put("type", "4"); + param.put("point_code", whereJson.getString("point_code")); // 2、调用接口 JSONObject json = acsToWmsService.apply(param); if (StrUtil.equals(json.getString("status"), "200")) { @@ -65,28 +65,54 @@ public class RawFoilServiceImpl implements RawFoilService { } else { result.put("result", ""); result.put("code", "0"); - result.put("desc", "操作失败:"+json.getString("message")); + result.put("desc", "操作失败:" + json.getString("message")); } 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; + } }