上传文件至 'op-modules/op-quality/src/main/java/com/op/quality/Controller'

highway
周鸿羽(海威) 1 year ago
parent 8996a9396a
commit 7d4632e30b

@ -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<Boolean> saveQcProCheck(@RequestBody Map<QcProCheck,BaseFile> map) {
// System.out.println(qcProCheck);
// System.out.println(baseFile);
QcProCheck qcProCheck = map.keySet().iterator().next();
BaseFile baseFile = map.values().iterator().next();
public R<Boolean> 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<Boolean> 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();
}
}

Loading…
Cancel
Save