From 7d4632e30b0d8fee52511f91085e243887388149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=B8=BF=E7=BE=BD=EF=BC=88=E6=B5=B7=E5=A8=81?= =?UTF-8?q?=EF=BC=89?= Date: Tue, 29 Aug 2023 15:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'op-modules/op-quality/src/main/java/com/op/quality/Controll?= =?UTF-8?q?er'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/quality/controller/QuaController.java | 64 ++----------------- 1 file changed, 6 insertions(+), 58 deletions(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java index e1019632..c3a03321 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java @@ -1,9 +1,6 @@ package com.op.quality.controller; -import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.domain.R; -import com.op.common.core.utils.uuid.UUID; -import com.op.quality.domain.BaseFile; import com.op.quality.domain.QcProCheck; import com.op.quality.service.QcProCheckService; import com.op.system.api.RemoteMesService; @@ -11,8 +8,6 @@ import com.op.system.api.domain.dto.WCSDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.Map; - /** * @ClassName : quaController * @Description : @@ -28,63 +23,16 @@ public class QuaController { private RemoteMesService remoteMesService; @PostMapping("/saveQcProCheck") - public R saveQcProCheck(@RequestBody Map map) { -// System.out.println(qcProCheck); -// System.out.println(baseFile); - QcProCheck qcProCheck = map.keySet().iterator().next(); - BaseFile baseFile = map.values().iterator().next(); + public R saveQcProCheck(@RequestBody QcProCheck qcProCheck) { - if (!qcProCheck.getFactoryCode().isEmpty()){ - if (baseFile==null){ - baseFile = new BaseFile(); - qcProCheckService.saveQcProCheck(qcProCheck,baseFile); - } + qcProCheckService.saveQcProCheck(qcProCheck); + WCSDTO wcsdto = new WCSDTO(); + wcsdto.setFactory(qcProCheck.getFactoryCode()); + wcsdto.setRfidNo(qcProCheck.getRfid()); + remoteMesService.requestDestinationStations(wcsdto); - if (qcProCheck.getIsqua()=="1"){ - System.out.println("调用wcs接口开发转移"); -// WCSDTO wcsdto = new WCSDTO(); -// wcsdto.setFactory(qcProCheck.getFactoryCode()); -// wcsdto.setRfidNo(qcProCheck.getRfid()); -// remoteMesService.requestDestinationStations(wcsdto); - return R.ok(); - } - else{ - return R.fail(); - } - } return R.fail(); } - @PostMapping("/test") - public R test() { -// System.out.println(qcProCheck); -// System.out.println(baseFile); -// QcProCheck qcProCheck = map.keySet().iterator().next(); -// BaseFile baseFile = map.values().iterator().next(); - QcProCheck qcProCheck = new QcProCheck(); - BaseFile baseFile = new BaseFile(); -// qcProCheck.setId("1232132132121321"); - qcProCheck.setRfid("rfiddddddddddddddddddddddddddddddddddddd"); - qcProCheck.setFactoryCode("qewqewqewq"); - qcProCheck.setIsqua("1"); - baseFile.setFileAddress("qwewqewqewqewqewqq"); - if (!qcProCheck.getFactoryCode().isEmpty()){ - if (baseFile==null){ - baseFile = new BaseFile(); - qcProCheckService.saveQcProCheck(qcProCheck,baseFile); - } - else { - qcProCheckService.saveQcProCheck(qcProCheck,baseFile); - } - if (qcProCheck.getIsqua()=="1"){ - System.out.println("调用下一个接口"); - return R.ok(); - } - else{ - return R.ok(); - } - } - return R.fail(); - } }