| Line 63... |
Line 63... |
| 63 |
|
63 |
|
| 64 |
private static final Logger logger = LogManager.getLogger(FofoSolr.class);
|
64 |
private static final Logger logger = LogManager.getLogger(FofoSolr.class);
|
| 65 |
|
65 |
|
| 66 |
private static final List<Integer> CATEGORY_MASTER = Arrays.asList(10006, 10010, 14202, 14203);
|
66 |
private static final List<Integer> CATEGORY_MASTER = Arrays.asList(10006, 10010, 14202, 14203);
|
| 67 |
|
67 |
|
| 68 |
String solrPath = "http://" + "74.207.248.52" + ":8984/solr/demo";
|
68 |
String solrPath = "http://" + "172.105.58.16" + ":8984/solr/demo";
|
| 69 |
String mongoHost = "localhost";
|
69 |
String mongoHost = "localhost";
|
| 70 |
SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
|
70 |
SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
|
| 71 |
|
71 |
|
| 72 |
private String getAvailabilityJSON() {
|
72 |
private String getAvailabilityJSON() {
|
| 73 |
String url = "http://74.207.248.52/reports/run.php?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
73 |
String url = "http://172.105.58.16/reports/run.php?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
| 74 |
return getUrlContent(url);
|
74 |
return getUrlContent(url);
|
| 75 |
}
|
75 |
}
|
| 76 |
|
76 |
|
| 77 |
private String getPendingPOJSON() {
|
77 |
private String getPendingPOJSON() {
|
| 78 |
String url = "http://74.207.248.52/reports/run.php?execute_mode=EXECUTE&xmlin=UnfulfilledPOItemsNew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
78 |
String url = "http://172.105.58.16/reports/run.php?execute_mode=EXECUTE&xmlin=UnfulfilledPOItemsNew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
| 79 |
return getUrlContent(url);
|
79 |
return getUrlContent(url);
|
| 80 |
}
|
80 |
}
|
| 81 |
|
81 |
|
| 82 |
private static String getUrlContent(String urlString) {
|
82 |
private static String getUrlContent(String urlString) {
|
| 83 |
BufferedReader reader = null;
|
83 |
BufferedReader reader = null;
|
| Line 101... |
Line 101... |
| 101 |
}
|
101 |
}
|
| 102 |
return null;
|
102 |
return null;
|
| 103 |
}
|
103 |
}
|
| 104 |
|
104 |
|
| 105 |
public JSONArray getAvailability() throws IOException, JSONException {
|
105 |
public JSONArray getAvailability() throws IOException, JSONException {
|
| 106 |
String url = "http://74.207.248.52/reports/run.php?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
106 |
String url = "http://172.105.58.16/reports/run.php?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
| 107 |
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
107 |
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
| 108 |
connection.setRequestProperty("Accept-Encoding", "gzip");
|
108 |
connection.setRequestProperty("Accept-Encoding", "gzip");
|
| 109 |
BufferedReader reader = null;
|
109 |
BufferedReader reader = null;
|
| 110 |
|
110 |
|
| 111 |
try {
|
111 |
try {
|
| Line 135... |
Line 135... |
| 135 |
}
|
135 |
}
|
| 136 |
}
|
136 |
}
|
| 137 |
}
|
137 |
}
|
| 138 |
|
138 |
|
| 139 |
public JSONArray getPendingPO() throws IOException, JSONException {
|
139 |
public JSONArray getPendingPO() throws IOException, JSONException {
|
| 140 |
String url = "http://74.207.248.52/reports/run.php?execute_mode=EXECUTE&xmlin=UnfulfilledPOItemsNew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
140 |
String url = "http://172.105.58.16/reports/run.php?execute_mode=EXECUTE&xmlin=UnfulfilledPOItemsNew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
| 141 |
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
141 |
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
| 142 |
connection.setRequestProperty("Accept-Encoding", "gzip");
|
142 |
connection.setRequestProperty("Accept-Encoding", "gzip");
|
| 143 |
BufferedReader reader = null;
|
143 |
BufferedReader reader = null;
|
| 144 |
|
144 |
|
| 145 |
try {
|
145 |
try {
|