| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 移动端接口控制器 |
| | |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private RolePermissionService rolePermissionService; |
| | | @Autowired |
| | | private PermissionService permissionService; |
| | | |
| | | @RequestMapping("/pda/WarehouseIn") |
| | | @ManagerAuth |
| | | public R WarehouseIn(@RequestParam String locNo,@RequestParam String barcode){ |
| | | return mobileService.WarehouseIn(locNo,barcode,getHostId()); |
| | | } |
| | | |
| | | @RequestMapping("/menu/pda/auth") |
| | | @ManagerAuth |
| | | public R menuPda(){ |
| | | List<RolePermission> rolePermissions; |
| | | Long roleId = getUser().getRoleId(); |
| | | rolePermissions = rolePermissionService.list(new LambdaQueryWrapper<RolePermission>().eq(RolePermission::getRoleId, getHostId())); |
| | | |
| | | if (Cools.isEmpty(rolePermissions)) { |
| | | return R.ok(); |
| | | } |
| | | List<Long> collect = rolePermissions.stream().map(RolePermission::getPermissionId).distinct().collect(Collectors.toList()); |
| | | List<Permission> permissions = permissionService.listByIds(collect); |
| | | return R.ok().add(permissions); |
| | | } |
| | | |
| | | /** |
| | | * 根据单号检索单据数据 |