package com.chinaztt.mes.production.controller;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.chinaztt.mes.common.wrapper.QueryWrapperUtil;
|
import com.chinaztt.mes.production.dto.ExaminerDTO;
|
import com.chinaztt.mes.production.dto.FeederCertificateSelectDTO;
|
import com.chinaztt.mes.production.entity.FeederCertificate;
|
import com.chinaztt.mes.production.service.FeederCertificateService;
|
import com.chinaztt.ztt.common.core.util.R;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* 馈线合格证
|
*
|
* @author yy
|
* @date 2022-11-17 09:11:25
|
*/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/feederCertificate")
|
@Api(value = "feederCertificate", tags = "馈线合格证")
|
public class FeederCertificateController {
|
|
private final FeederCertificateService feederCertificateService;
|
|
/**
|
* 通过sn查询
|
*
|
* @param sn
|
* @return R
|
*/
|
@ApiOperation(value = "通过sn查询", notes = "通过sn查询")
|
@GetMapping("/getBySn")
|
public R getFeederCertificateBySn(@RequestParam("sn") String sn,String commonSn) {
|
return R.ok(feederCertificateService.getFeederCertificateBySn(sn,commonSn));
|
}
|
|
|
/**
|
* 检验员变更
|
*
|
*@param partNo
|
* @return R
|
*/
|
@ApiOperation(value = "检验员变更", notes = "检验员变更")
|
@GetMapping("/changeExaminer")
|
public R changeExaminer(@RequestParam("partNo") String partNo) {
|
return R.ok(feederCertificateService.changeExaminer(partNo));
|
}
|
|
|
|
/**
|
* 批量新增
|
*
|
* @param feederCertificateList
|
* @return R
|
*/
|
@ApiOperation(value = "批量新增", notes = "批量新增")
|
@PostMapping
|
public R saveSnBatch(@RequestBody List<FeederCertificate> feederCertificateList) {
|
return R.ok(feederCertificateService.saveSnBatch(feederCertificateList));
|
}
|
|
|
|
/**
|
* 分页查询
|
*
|
* @param page 分页对象
|
* @param feederCertificateSelectDTO
|
* @return
|
*/
|
@ApiOperation(value = "分页查询", notes = "分页查询")
|
@GetMapping("/page")
|
public R getPage(Page page, FeederCertificateSelectDTO feederCertificateSelectDTO){
|
return R.ok(feederCertificateService.getPage(page, QueryWrapperUtil.gen(feederCertificateSelectDTO)));
|
}
|
|
|
/**
|
* 删除
|
*
|
* @param id
|
* @return
|
*/
|
@ApiOperation(value = "删除馈线合格证", notes = "删除馈线合格证")
|
@DeleteMapping("/{id}")
|
public R delete(@PathVariable Long id){
|
return R.ok(feederCertificateService.removeById(id));
|
}
|
|
/**
|
* 根据零件号查降级配置表
|
*
|
* @param partNo
|
* @return
|
*/
|
@ApiOperation(value = "根据零件号查降级配置表", notes = "根据零件号查降级配置表")
|
@GetMapping("/getExaminer")
|
public R getExaminer(@RequestParam("partNo") String partNo){
|
return R.ok(feederCertificateService.getExaminer(partNo));
|
}
|
|
|
|
|
|
/**
|
* 更新打印次数
|
*
|
* @param ids
|
* @param copies
|
* @return
|
*/
|
@ApiOperation(value = "更新打印次数", notes = "更新打印次数")
|
@GetMapping("/updatePrintNum")
|
public R updatePrintNum(@RequestParam List<Long> ids,@RequestParam Long copies){
|
return R.ok(feederCertificateService.updatePrintNum(ids,copies));
|
}
|
|
|
|
/**
|
* 重复打印标签密码校验
|
*
|
* @param password
|
* @return
|
*/
|
@ApiOperation(value = "重复打印标签密码校验", notes = "重复打印标签密码校验")
|
@GetMapping("/checkPrintNumPassword")
|
public R checkPrintNumPassword(String password){
|
return R.ok(feederCertificateService.checkPrintNumPassword(password));
|
}
|
|
}
|