package com.web.pda.lyt.lytPda.controller;
|
|
import com.app.base.control.WebController;
|
import com.app.base.data.ApiResponseResult;
|
import com.web.pda.lyt.lytPda.service.PQCSamplingService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.*;
|
|
@Api(description = "PQC抽检录入")
|
@CrossOrigin
|
@ControllerAdvice
|
//@RestController
|
@Controller
|
@RequestMapping(value = "pqc_sample_input")
|
public class PQCSamplingController extends WebController {
|
|
@Autowired
|
private PQCSamplingService pqcSamplingService;
|
|
@ApiOperation(value = "获取批号数据源", notes = "获取批号数据源")
|
@RequestMapping(value = "/getBatchNum", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBatchNum(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "ftype") String ftype,
|
@RequestParam(value = "procno") String procno,
|
@RequestParam(value = "modelno") String modelno,
|
@RequestParam(value = "keyword") String keyword) {
|
try {
|
return pqcSamplingService.getBatchNum(factory, company,ftype,procno,modelno,keyword);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取送检单号下拉数据源", notes = "获取送检单号下拉数据源")
|
@RequestMapping(value = "/getInspectOrder", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getInspectOrder(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "batchNum") String batchNum) {
|
try {
|
return pqcSamplingService.getInspectOrder(factory, company,batchNum);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取送检单号详细信息", notes = "获取送检单号详细信息")
|
@RequestMapping(value = "/getInspectOrderInfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getInspectOrderInfo(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "batchNum") String batchNum,
|
@RequestParam(value = "classNo") String classNo,
|
@RequestParam(value = "inspect") String inspect) {
|
try {
|
return pqcSamplingService.getInspectOrderInfo(factory, company,userNo,batchNum,classNo,inspect);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取复测抽检项目数据源", notes = "获取复测抽检项目数据源")
|
@RequestMapping(value = "/getCheckItem", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getCheckItem(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "pid") String pid,
|
@RequestParam(value = "dataType") String dataType) {
|
try {
|
return pqcSamplingService.getCheckItem(factory, company,pid,dataType);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
@ApiOperation(value = "执行操作", notes = "执行操作")
|
@RequestMapping(value = "/modifyPQCValue", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult modifyPQCValue(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "mid") String mid,
|
@RequestParam(value = "tableName") String tableName,
|
@RequestParam(value = "changeName") String changeName,
|
@RequestParam(value = "changeValue") String changeValue) {
|
try {
|
return pqcSamplingService.modifyPQCValue(factory, company,userNo,mid,tableName,changeName,changeValue);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
}
|