42 lines
1.5 KiB
Java
42 lines
1.5 KiB
Java
package com.xkrs.newpro.controller;
|
|
|
|
import com.xkrs.newpro.model.qo.QcSourceQoDelete;
|
|
import com.xkrs.newpro.model.qo.QcSourceQoInsert;
|
|
import com.xkrs.newpro.service.QcSourceService;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@RestController
|
|
public class QcSourceController {
|
|
|
|
@Resource
|
|
private QcSourceService qcSourceService;
|
|
|
|
/**
|
|
* 添加检验数据
|
|
*/
|
|
@PostMapping("/insertQcSource")
|
|
public String insertQcSource(QcSourceQoInsert insertQo, @RequestParam(required = false, value = "picture") MultipartFile picture) {
|
|
return qcSourceService.insertQcSource(insertQo, picture);
|
|
}
|
|
|
|
/**
|
|
* 删除检验数据
|
|
*/
|
|
@PostMapping("/deleteQcSource")
|
|
public String deleteQcSource(@RequestBody QcSourceQoDelete deleteQo) {
|
|
return qcSourceService.deleteQcSource(deleteQo);
|
|
}
|
|
|
|
/**
|
|
* 查询检验数据
|
|
*/
|
|
@GetMapping("/queryQcSource")
|
|
public String queryQcSource(@RequestParam(required = false, value = "batchNo") String batchNo, @RequestParam(required = false, value = "machineNo") String machineNo, @RequestParam(required = false, value = "materialNo") String materialNo, @RequestParam(required = false, value = "mouldNo") String mouldNo, @RequestParam(required = false, value = "varietyNo") String varietyNo) {
|
|
return qcSourceService.queryQcSource(batchNo, machineNo, materialNo, mouldNo, varietyNo);
|
|
}
|
|
|
|
}
|