| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.FinishedInspect; |
| | | import com.yuanchu.mom.pojo.vo.FinishedInspectVo1; |
| | | import com.yuanchu.mom.service.*; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.utils.Jwt; |
| | |
| | | @Autowired |
| | | Jwt jwt; |
| | | |
| | | @ApiOperation(value = "新增过程检验单-->根据订单号选择产品信息和工艺") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "orderNumber", value = "订单编号", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/chooseMater") |
| | | public Result<?> chooseMater(String orderNumber) { |
| | | return Result.success(finishedInspectService.chooseMater(orderNumber)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增过程检验单-->选择设备") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "technologyId", value = "关联的工艺路线id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "father", value = "项目父名称", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "name", value = "项目名称", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/chooseDev") |
| | | public Result<?> chooseDev(Integer technologyId, String father, String name) { |
| | | return Result.success(finishedInspectService.chooseDev(technologyId,father,name)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增过程检验单") |
| | | @PostMapping("/addProcess") |
| | | public Result<?> addProcess(@RequestHeader("token") String token, @RequestBody FinishedInspectVo1 finishedInspectVo1) throws Exception { |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | return Result.success(finishedInspectService.addProcess(data.get("id").replaceAll("\"", ""), finishedInspectVo1)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "新增按钮-->1、新增成品检验单") |
| | | @PostMapping("/add_process_inspection_sheet") |
| | | public Result<?> addProcessInspectionSheet(@Validated @RequestBody FinishedInspect finishedInspect){ |
| | |
| | | return Result.fail("新增失败!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增按钮-->1、新增过程检验单-->主机工下拉框") |
| | | @GetMapping("/list_user") |
| | | public Result<?> selectUserIdAndName(){ |
| | | List<Map<String, Object>> maps = userService.listUserIdAndName(); |
| | | return Result.success(maps); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增按钮-->1、新增过程检验单-->2、规格型号下拉框:根据项目ID查询") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "materialId",value = "项目名称ID",dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @GetMapping("/list_specification") |
| | | public Result<?> selectSpecificationIdAndName(Integer materialId){ |
| | | List<Map<String, Object>> maps = specificationsService.selectSpecificationIdAndName(materialId); |
| | | return Result.success(maps); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增按钮-->1、新增过程检验单-->1、项目名称下拉框") |
| | | @GetMapping("/list_material") |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "4、主页分页-->主机工条件查询下拉框") |
| | | @GetMapping("/page_user") |
| | | public Result<?> selectPageUserIdAndName(){ |
| | | List<Map<String, Object>> maps = userService.listUserIdAndName(); |
| | | return Result.success(maps); |
| | | } |
| | | |
| | | } |