| | |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.utils.Jwt; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import com.yuanchu.mom.utils.RedisUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | @ApiOperation(value = "编辑意见-->确定按钮", tags = "QMS管理-->不合格品处置") |
| | | @PostMapping("/addOpinion") |
| | | public Result<?> updateOpinion(@RequestHeader("token") String token, @Validated @RequestBody List<Opinion> opinion) throws Exception { |
| | | MyUtil.PrintLog(opinion.toString()); |
| | | |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | String id = data.get("id").replaceAll("\"", ""); |
| | | opinionService.updateOpinion(id, opinion); |
| | | return Result.success(); |
| | | return Result.success("添加成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "查看编辑意见", tags = "QMS管理-->不合格品处置") |
| | |
| | | }) |
| | | @GetMapping("/descriptionUpdate") |
| | | public Result<?> descriptionUpdate(Integer rawUnacceptedId, String tell) { |
| | | return Result.success(inspectUnacceptedService.descriptionUpdate(rawUnacceptedId, tell)); |
| | | Integer isUpdateSuccess = inspectUnacceptedService.descriptionUpdate(rawUnacceptedId, tell); |
| | | if (isUpdateSuccess == 1) { |
| | | return Result.success("更新成功"); |
| | | } |
| | | return Result.fail("更新失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "点击编辑意见触发查询", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawUnacceptedId",value = "不合格品处置Id",dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @PostMapping("/clickEditing") |
| | | public Result<?> clickEditingTriggerQuery(Integer rawUnacceptedId) { |
| | | @GetMapping("/clickEditing") |
| | | public Result<?> clickEditingTriggerQuery(@RequestParam("rawUnacceptedId") Integer rawUnacceptedId) { |
| | | return Result.success(opinionService.clickEditingTriggerQuery(rawUnacceptedId)); |
| | | } |
| | | } |