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

highway
zhaoxl 1 year ago
parent 17a42de771
commit 317e69e12d

@ -6,6 +6,8 @@ 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;
import com.op.system.api.domain.dto.WCSDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -22,6 +24,8 @@ public class QuaController {
@Autowired
private QcProCheckService qcProCheckService;
@Autowired
private RemoteMesService remoteMesService;
@PostMapping("/saveQcProCheck")
public R<Boolean> saveQcProCheck(@RequestBody Map<QcProCheck,BaseFile> map) {
@ -37,42 +41,19 @@ public class QuaController {
}
if (qcProCheck.getIsqua()=="1"){
System.out.println("调用下一个接口");
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.ok();
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.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();
}
}

Loading…
Cancel
Save