| | |
| | | @Resource |
| | | Jwt jwt; |
| | | |
| | | @ApiOperation(value = "新增原材料检验单-->根据原材料编码得到ifs中的报检数据") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "code", value = "原材料编码", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @PostMapping("/chooseIFS") |
| | | public Result chooseIFS(String code){ |
| | | return Result.success(rawInspectService.chooseIFS(code)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增原材料检验单") |
| | | @PostMapping("/addRawInspects") |
| | |
| | | |
| | | @ApiOperation(value = "上报(更新检验状态)") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "检验单id", dataTypeClass = Integer.class, required = true) |
| | | @ApiImplicitParam(name = "id", value = "检验单id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "number", value = "不合格数量", dataTypeClass = Integer.class) |
| | | }) |
| | | @PostMapping("/updateRawInspectsById/{id}") |
| | | public Result updateRawInspectsById(@PathVariable Integer id) { |
| | | public Result updateRawInspectsById(@PathVariable Integer id,Integer number) { |
| | | //如果已经上报了不能再一次上报 |
| | | RawInspect rawInspect = rawInspectService.getById(id); |
| | | if (rawInspect.getInsState() == 1) { |
| | | return Result.fail("已经上报过了,不能再次上报!"); |
| | | } |
| | | return Result.success(rawInspectService.updateRawInspectsById(id)); |
| | | return Result.success(rawInspectService.updateRawInspectsById(id,number)); |
| | | } |
| | | |
| | | } |