| | |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.*; |
| | | import com.zy.asrs.wms.asrs.service.LocDetlFieldService; |
| | | import com.zy.asrs.wms.asrs.service.LocService; |
| | | import com.zy.asrs.wms.asrs.service.MatFieldService; |
| | | import com.zy.asrs.wms.common.annotation.OperationLog; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | |
| | | @RequestMapping("/api") |
| | | public class LocDetlController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LocService locService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:locDetl:list')") |
| | | @GetMapping("/locDetl/locNo/{locNo}") |
| | | public R list(@PathVariable("locNo") String locNo) { |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, locNo)); |
| | | if (loc == null) { |
| | | return R.error("库位不存在"); |
| | | } |
| | | List<LocDetl> list = locDetlService.list(new LambdaQueryWrapper<LocDetl>().eq(LocDetl::getLocId, loc.getId())); |
| | | List<LocDetl> locDetls = locDetlService.parseLocDetl(list); |
| | | return R.ok().add(locDetls); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:locDetl:list')") |
| | | @GetMapping("/locDetl/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(locDetlService.getById(id)); |