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 new file mode 100644 index 00000000..b61e4c38 --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/Controller/QuaController.java @@ -0,0 +1,78 @@ +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 org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + * @ClassName : quaController + * @Description : + * @Author : + * @Date: 2023-08-17 10:28 + */ +@RestController +public class QuaController { + @Autowired + private QcProCheckService qcProCheckService; + + + @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(); + + if (!qcProCheck.getFactoryId().isEmpty()){ + if (baseFile==null){ + baseFile = new BaseFile(); + qcProCheckService.saveQcProCheck(qcProCheck,baseFile); + } + + if (qcProCheck.getIsqua()=="1"){ + System.out.println("调用下一个接口"); + return R.ok(); + } + else{ + return R.ok(); + } + } + 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.setFactoryId("qewqewqewq"); + qcProCheck.setIsqua("1"); + baseFile.setFileAddress("qwewqewqewqewqewqq"); + if (!qcProCheck.getFactoryId().isEmpty()){ + if (baseFile==null){ + baseFile = new BaseFile(); + qcProCheckService.saveQcProCheck(qcProCheck,baseFile); + } + + if (qcProCheck.getIsqua()=="1"){ + System.out.println("调用下一个接口"); + return R.ok(); + } + else{ + return R.ok(); + } + } + return R.fail(); + } + +}