package com.web.pda.lyt.lytPda.controller;
|
|
|
import com.app.base.data.ApiResponseResult;
|
import com.web.pda.lyt.lytPda.service.internal.FQCPatrolServiceImpl;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
@RequestMapping("fqcPatrol")
|
@RestController
|
public class FQCPatrolController {
|
|
@Autowired
|
private FQCPatrolServiceImpl fqcPatrolService;
|
|
|
@PostMapping("getAll")
|
public ApiResponseResult getAll(@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "taskNo") String taskNo) throws Exception {
|
return fqcPatrolService.getBillSelect(userNo, taskNo);
|
}
|
|
@PostMapping("getDetails")
|
public ApiResponseResult getDetails(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid
|
|
) {
|
try {
|
return fqcPatrolService.getDetails(userNo, checkNo, pid);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@PostMapping("getDetailsSJ")
|
public ApiResponseResult getDetailsSJ(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid
|
|
) {
|
try {
|
return fqcPatrolService.getDetailsSJ(userNo, checkNo, pid);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取产线下拉选择检验单号", notes = "获取产线下拉选择检验单号")
|
@RequestMapping(value = "/getSelect", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getSelect(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
|
) {
|
try {
|
return fqcPatrolService.getLineSelect(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取产线下拉选择检验单号", notes = "获取产线下拉选择检验单号")
|
@RequestMapping(value = "/sjgetSelect", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult sjgetSelect(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
|
) {
|
try {
|
return fqcPatrolService.sjgetLineSelect(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取检验单号下拉选择数据2", notes = "获取检验单号下拉选择数据")
|
@RequestMapping(value = "/getBill2FQC", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBill2FQC(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
) {
|
try {
|
return fqcPatrolService.getBillSelect2FQC(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "提交数据", notes = "提交数据")
|
@RequestMapping(value = "/submitFQC", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult submitFQC(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type
|
) {
|
try {
|
return fqcPatrolService.submitDataFQC(userNo,checkNo,type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "提交数据", notes = "提交数据")
|
@RequestMapping(value = "/submitSJ", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult submitSJ(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type
|
) {
|
try {
|
return fqcPatrolService.submitDataSJ(userNo,checkNo,type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@PostMapping("checkSave")
|
public ApiResponseResult checkSave(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid,
|
@RequestParam(value = "checkResult") String checkResult,
|
@RequestParam(value = "checkDemo") String checkDemo,
|
@RequestParam(value = "checkNum") String checkNum
|
) {
|
try {
|
return fqcPatrolService.checkDetailSave(userNo, checkNo, pid, checkResult, checkDemo, checkNum);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@PostMapping("checkSaveSJ")
|
public ApiResponseResult checkSaveSJ(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid,
|
@RequestParam(value = "checkResult") String checkResult,
|
@RequestParam(value = "checkDemo") String checkDemo,
|
@RequestParam(value = "checkNum") String checkNum
|
) {
|
try {
|
return fqcPatrolService.checkDetailSaveSJ(userNo, checkNo, pid, checkResult, checkDemo, checkNum);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@PostMapping("submit")
|
public ApiResponseResult submit(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type
|
) {
|
try {
|
return fqcPatrolService.submitData(userNo, checkNo, type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
@PostMapping("getOQCAll")
|
public ApiResponseResult getOQCAll(@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "taskNo") String taskNo) throws Exception {
|
return fqcPatrolService.getOQCBillSelect(userNo, taskNo);
|
}
|
|
@PostMapping("getOQCDetails")
|
public ApiResponseResult getOQCDetails(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid
|
|
) {
|
try {
|
return fqcPatrolService.getOQCDetails(userNo, checkNo, pid);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@PostMapping("OQCCheckSave")
|
public ApiResponseResult OQCCheckSave(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid,
|
@RequestParam(value = "checkResult") String checkResult,
|
@RequestParam(value = "checkDemo") String checkDemo,
|
@RequestParam(value = "checkNum") String checkNum
|
) {
|
try {
|
return fqcPatrolService.checkDetailSaveOQC(userNo, checkNo, pid, checkResult, checkDemo, checkNum);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@PostMapping("submitOQC")
|
public ApiResponseResult submitOQC(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type,
|
@RequestParam(value = "conformity") String conformity
|
) {
|
try {
|
return fqcPatrolService.submitDataOQC(userNo, checkNo, type, conformity);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
}
|