| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import com.doumee.dao.business.model.YwStocktaking; |
| | | import com.doumee.service.business.YwOutinboundService; |
| | | import com.doumee.service.business.YwStocktakingService; |
| | | import com.doumee.service.business.impl.YwOutinboundServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | |
| | | @Autowired |
| | | private YwStocktakingService ywStocktakingService; |
| | | |
| | | @Autowired |
| | | private YwOutinboundServiceImpl ywOutinboundService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywstocktaking:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | public ApiResponse<YwStocktaking> findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywStocktakingService.getDetail(id)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/finishById") |
| | | @CloudRequiredPermission("business:ywstocktaking:delete") |
| | | public ApiResponse finishById(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingService.finishById(id,getLoginUser(token)); |
| | | ywStocktakingService.finishById(id,ywOutinboundService,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |