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.HoPatrolCheckService;
|
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 = "ho_patrol")
|
public class HoPatrolCheckController extends WebController {
|
@Autowired
|
private HoPatrolCheckService hoPatrolCheckService;
|
|
@ApiOperation(value = "获取产线数据", notes = "获取产线数据")
|
@RequestMapping(value = "/getLineInfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getLineInfo(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return hoPatrolCheckService.getLineNo(userNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取工序数据", notes = "获取工序数据")
|
@RequestMapping(value = "/getProccInfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getProccInfo(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return hoPatrolCheckService.getProccInfoT(userNo);
|
} 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 hoPatrolCheckService.getLineSelect(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取检验单号下拉数据", notes = "获取检验单号下拉数据")
|
@RequestMapping(value = "/getprocessT", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getprocessT(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
) {
|
try {
|
return hoPatrolCheckService.getprocessBillSelect(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
|
@ApiOperation(value = "获取检验单号下拉选择数据", notes = "获取检验单号下拉选择数据")
|
@RequestMapping(value = "/getBill", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBill(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
) {
|
try {
|
return hoPatrolCheckService.getBillSelect(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "检验项目保存", notes = "检验项目保存")
|
@RequestMapping(value = "/checkSave", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
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
|
|
) {
|
try {
|
return hoPatrolCheckService.checkDetailSave(userNo,checkNo,pid,checkResult,checkDemo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "检验项目删除", notes = "检验项目删除")
|
@RequestMapping(value = "/checkDel", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult checkDel(
|
@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 = "type") String type // 增加检验类型参数
|
) {
|
try {
|
return hoPatrolCheckService.checkDetailDel(userNo, checkNo, pid, checkResult, checkDemo, type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
@ApiOperation(value = "根据id获取详情", notes = "根据id获取详情")
|
@RequestMapping(value = "/getDetails", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getDetails(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "pid") int pid
|
|
) {
|
try {
|
return hoPatrolCheckService.getDetails(userNo,checkNo,pid);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "一键合格", notes = "一键合格")
|
@RequestMapping(value = "/pass", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult pass(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo
|
|
) {
|
try {
|
return hoPatrolCheckService.checkDetailPass(userNo,checkNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "提交数据", notes = "提交数据")
|
@RequestMapping(value = "/submit", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult submit(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type
|
|
) {
|
try {
|
return hoPatrolCheckService.submitData(userNo,checkNo,type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
}
|