| | |
| | | @ApiOperation(value = "流向列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10") |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "long", required = false, value = "公司id"), |
| | | |
| | | }) |
| | | @GetMapping("/list") |
| | | public CommonResult list(HzHazmatFlow hazmatFlow){ |
| | |
| | | |
| | | |
| | | @ApiOperation(value = "根据危化品id查询危化品所有流向") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "hazmatId", dataType = "long", required = false, value = "公司id"), |
| | | @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "long", required = false, value = "公司id"), |
| | | |
| | | }) |
| | | @GetMapping(value = { "/getAllHazmatFlowByHazmatId" }) |
| | | public CommonResult getAllHazmatFlowByHazmatId(Long hazmatId){ |
| | | return CommonResult.success(hazmatFlowService.getAllHazmatFlowByHazmatId(hazmatId)); |
| | | public CommonResult getAllHazmatFlowByHazmatId(Long hazmatId,Long companyId){ |
| | | return CommonResult.success(hazmatFlowService.getAllHazmatFlowByHazmatId(hazmatId,companyId)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | |
| | | return CommonResult.success(hazmatFlowService.deleteHazmatFlowById(hazmatFlowId)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAnyAuthority('hazmat:manage:company','hazmat:manage:common')") |
| | | @PreAuthorize("hasAnyAuthority('hazmat:manage:company','hazmat:manage:common','hazmat:manage:system')") |
| | | @ApiOperation(value = "根据条码code查询危化品所有流向") |
| | | @GetMapping(value = { "/getHazmatFlowByCode" }) |
| | | public CommonResult getAllHazmatFlowByCode(@RequestParam(required = true) String code){ |
| | | public CommonResult getAllHazmatFlowByCode(@RequestParam(value = "code") String code,@RequestParam("companyId") Long companyId){ |
| | | if(code.startsWith(CodePrexEnum.MATERIAL.getCode())){ |
| | | return CommonResult.success(hazmatFlowService.selectAllHazmatFlowByCode(code)); |
| | | return CommonResult.success(hazmatFlowService.selectAllHazmatFlowByCode(code,companyId)); |
| | | }else if(code.startsWith(CodePrexEnum.GOOD.getCode())){ |
| | | return CommonResult.success(productFlowService.selectAllProductFlowByCode(code)); |
| | | return CommonResult.success(productFlowService.selectAllProductFlowByCode(code,companyId)); |
| | | }else{ |
| | | return CommonResult.failed("条码格式不正确"); |
| | | } |