Subversion Repositories SmartDukaan

Rev

Rev 6746 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6746 Rev 8303
Line 29... Line 29...
29
		String userName = request.getUsername();
29
		String userName = request.getUsername();
30
		String password = request.getPassword();
30
		String password = request.getPassword();
31
		
31
		
32
		boolean status = false;
32
		boolean status = false;
33
		long warehouseId = -1;
33
		long warehouseId = -1;
-
 
34
		long sourceId = -1;
34
		UserType userType = UserType.WAREHOUSE_EXECUTIVE;
35
		UserType userType = UserType.WAREHOUSE_EXECUTIVE;
35
		BillingType billingType = BillingType.EXTERNAL;
36
		BillingType billingType = BillingType.EXTERNAL;
36
		Map<Long, String> warehouses = null;
37
		Map<Long, String> warehouses = null;
37
		Map<Long, String> providers = null;
38
		Map<Long, String> providers = null;
38
		Map<Long, String> stores = null;
39
		Map<Long, String> stores = null;
Line 55... Line 56...
55
            }
56
            }
56
			status = true;
57
			status = true;
57
			nextScreen = NEXT.INBOX;
58
			nextScreen = NEXT.INBOX;
58
			
59
			
59
			warehouseId = dashboardUser.getWarehouseId();
60
			warehouseId = dashboardUser.getWarehouseId();
-
 
61
			sourceId = dashboardUser.getSource();
60
			InventoryClient csc = new InventoryClient();
62
			InventoryClient csc = new InventoryClient();
61
			in.shop2020.model.v1.inventory.InventoryService.Client iClient = csc.getClient();
63
			in.shop2020.model.v1.inventory.InventoryService.Client iClient = csc.getClient();
62
			Warehouse warehouse = iClient.getWarehouse(warehouseId);
64
			Warehouse warehouse = iClient.getWarehouse(warehouseId);
63
			switch(warehouse.getBillingType()){
65
			switch(warehouse.getBillingType()){
64
			case OURS:
66
			case OURS:
Line 86... Line 88...
86
		} catch (TException e) {
88
		} catch (TException e) {
87
			e.printStackTrace();
89
			e.printStackTrace();
88
		} catch (Exception e) {
90
		} catch (Exception e) {
89
			e.printStackTrace();
91
			e.printStackTrace();
90
		}
92
		}
91
		return new AuthResponse(userName, status, message, nextScreen, warehouseId, userType, billingType, warehouses, providers, stores);
93
		return new AuthResponse(userName, status, message, nextScreen, warehouseId, userType, billingType, warehouses, providers, stores, sourceId);
92
	}
94
	}
93
 
95
 
94
	@Override
96
	@Override
95
	public Class<AuthRequest> getActionType() {		
97
	public Class<AuthRequest> getActionType() {		
96
		return AuthRequest.class;
98
		return AuthRequest.class;