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.PQCPatrolCheckService;
|
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_patrol_input")
|
public class PQCPatrolCheckController extends WebController {
|
|
@Autowired
|
private PQCPatrolCheckService pqcPatrolCheckService;
|
|
@ApiOperation(value = "获取产线数据", notes = "获取产线数据")
|
@RequestMapping(value = "/getLineInfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getLineInfo(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return pqcPatrolCheckService.getLineNo(userNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取产线数据", notes = "获取产线数据")
|
@RequestMapping(value = "/getLineInfoSJ", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult
|
getLineInfosj(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return pqcPatrolCheckService.getLineNosj(userNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取产线数据", notes = "获取产线数据")
|
@RequestMapping(value = "/getLineInfoFQC", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult
|
getLineInfoFQC(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return pqcPatrolCheckService.getLineNoFQC(userNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "搜索工单", notes = "搜索工单")
|
@RequestMapping(value = "/getWorkOrderData", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getWorkOrderData(@RequestParam(value = "workOrderNo") String workOrderNo) {
|
try {
|
// 执行存储过程或查询数据库来获取工单相关数据
|
ApiResponseResult result = pqcPatrolCheckService.getWorkOrderData(workOrderNo);
|
return result;
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
//调用案例
|
// @RequestMapping(value = "/getTest", method = RequestMethod.POST, produces = "application/json")
|
// @ResponseBody
|
// public ApiResponseResult getTest(
|
// @RequestParam(value = "userNo") String userNo) {
|
// try {
|
// return pqcPatrolCheckService.test();
|
// } catch (Exception e) {
|
// e.printStackTrace();
|
// return ApiResponseResult.failure(e.toString());
|
// }
|
// }
|
//
|
// @PostMapping("getLineInfo")
|
// @ResponseBody
|
// public ApiResponseResult getText() throws Exception {
|
// return pqcPatrolCheckService.getLineNo(null);
|
// }
|
|
@ApiOperation(value = "获取工序数据", notes = "获取工序数据")
|
@RequestMapping(value = "/getProccInfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getProccInfo(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return pqcPatrolCheckService.getProccInfoT(userNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取工序数据", notes = "获取工序数据")
|
@RequestMapping(value = "/getProccInfosj", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getProccInfosj(
|
@RequestParam(value = "userNo") String userNo) {
|
try {
|
return pqcPatrolCheckService.getProccInfoTsj(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 pqcPatrolCheckService.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 pqcPatrolCheckService.getprocessBillSelect(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取检验项目", notes = "获取检验项目")
|
@RequestMapping(value = "/getcheckinfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getcheckinfo(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "taskNo") String taskNo,
|
@RequestParam(value = "checkNo") String checkNo
|
) {
|
try {
|
return pqcPatrolCheckService.getcheckinfo(userNo,taskNo,checkNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取检验单号下拉选择数据2", notes = "获取检验单号下拉选择数据")
|
@RequestMapping(value = "/getBill2", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBill2(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
) {
|
try {
|
return pqcPatrolCheckService.getBillSelect2(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 pqcPatrolCheckService.getBillSelect2FQC(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取检验单号下拉选择数据2", notes = "获取检验单号下拉选择数据")
|
@RequestMapping(value = "/getBillSJ", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBillSJ(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
) {
|
try {
|
return pqcPatrolCheckService.getBillSelectSJ(userNo,lineNo,taskNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取检验单号下拉选择数据2", notes = "获取检验单号下拉选择数据")
|
@RequestMapping(value = "/getBill2OQC", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBill2OQC(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineNo") String lineNo,
|
@RequestParam(value = "taskNo") String taskNo
|
) {
|
try {
|
return pqcPatrolCheckService.getBillSelect2OQC(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 pqcPatrolCheckService.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,
|
@RequestParam(value = "checkNum") String checkNum
|
|
|
) {
|
try {
|
return pqcPatrolCheckService.checkDetailSave(userNo,checkNo,pid,checkResult,checkDemo,checkNum);
|
} 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
|
|
) {
|
try {
|
return pqcPatrolCheckService.checkDetailDel(userNo,checkNo,pid,checkResult,checkDemo);
|
} 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 pqcPatrolCheckService.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 pqcPatrolCheckService.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 pqcPatrolCheckService.submitData(userNo,checkNo,type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "提交数据", notes = "提交数据")
|
@RequestMapping(value = "/submit2", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult submit2(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type
|
) {
|
try {
|
return pqcPatrolCheckService.submitData2(userNo,checkNo,type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "提交数据", notes = "提交数据")
|
@RequestMapping(value = "/submit2FQC", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult submit2FQC(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type
|
) {
|
try {
|
return pqcPatrolCheckService.submitData2FQC(userNo,checkNo,type);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "提交数据", notes = "提交数据")
|
@RequestMapping(value = "/submit2OQC", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult submit2OQC(
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "checkNo") String checkNo,
|
@RequestParam(value = "type") int type,
|
@RequestParam(value = "conformity") String conformity
|
) {
|
try {
|
return pqcPatrolCheckService.submitData2OQC(userNo,checkNo,type,conformity);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
@ApiOperation(value = "获取批号下拉数据源", notes = "获取批号下拉数据源")
|
@RequestMapping(value = "/getPatrolBatchNum", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getPatrolBatchNum(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "ftype") String ftype,
|
@RequestParam(value = "period") String period,
|
@RequestParam(value = "procno") String procno,
|
@RequestParam(value = "modelno") String modelno,
|
@RequestParam(value = "keyword") String keyword) {
|
try {
|
return pqcPatrolCheckService.getPatrolBatchNum(factory,company,
|
ftype,period,procno,modelno,keyword);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取批号详细信息", notes = "获取批号详细信息")
|
@RequestMapping(value = "/getPatrolBatchNumInfo", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getPatrolBatchNumInfo(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "lineType") String lineType,
|
@RequestParam(value = "procNo") String procNo,
|
@RequestParam(value = "lotNo") String lotNo,
|
@RequestParam(value = "classNo") String classNo,
|
@RequestParam(value = "period") String period) {
|
try {
|
return pqcPatrolCheckService.getPatrolBatchNumInfo(factory, company,userNo,lineType,procNo,lotNo,classNo,period);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "PQC巡检项目-列表", notes = "PQC巡检项目-列表")
|
@RequestMapping(value = "/getPQCItemList", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getPQCItemList(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "keyword") String keyword,
|
@RequestParam(value = "page") int page,
|
@RequestParam(value = "size") int size){
|
try {
|
return pqcPatrolCheckService.getPQCItemList(factory,company,userNo,keyword,page,size);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "修改PQC巡检项目-列表", notes = "修改PQC巡检项目-列表")
|
@RequestMapping(value = "/sumbitPQCItem", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult sumbitPQCItem(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "mid") String mid,
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "operaType") String operaType){
|
try {
|
return pqcPatrolCheckService.sumbitPQCItem(factory,company,mid,userNo,operaType);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取合格结果", notes = "获取合格结果")
|
@RequestMapping(value = "/getOkResult", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getOkResult(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "userNo") String userNo,
|
@RequestParam(value = "mid") String mid){
|
try {
|
return pqcPatrolCheckService.getOkResult(factory,company,userNo,mid);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "获取巡检操作记录", notes = "获取巡检操作记录")
|
@RequestMapping(value = "/getRecordList", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getRecordList(
|
@RequestParam(value = "factory") String factory,
|
@RequestParam(value = "company") String company,
|
@RequestParam(value = "user") String user,
|
@RequestParam(value = "ftype") String ftype,
|
@RequestParam(value = "mid") String mid,
|
@RequestParam(value = "keyword") String keyword,
|
@RequestParam(value = "size") int size,
|
@RequestParam(value = "page") int page){
|
try {
|
return pqcPatrolCheckService.getRecordList(factory,company,user,ftype,mid,keyword,size,page);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
@ApiOperation(value = "根据检验单号返回数据", notes = "根据检验单号返回数据")
|
@RequestMapping(value = "/getBillReturn", method = RequestMethod.POST, produces = "application/json")
|
@ResponseBody
|
public ApiResponseResult getBillReturn(
|
@RequestParam(value = "billNo") String billNo) {
|
try {
|
return pqcPatrolCheckService.getBillReturn(billNo);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ApiResponseResult.failure(e.toString());
|
}
|
}
|
|
|
}
|