Commit c1300a1baf7d4873d9bf33c00d14c3285eb170b7
1 parent
92bd67f9
畅游通核销app: 1.部分漏提交
Showing
4 changed files
with
46 additions
and
18 deletions
build/generated/source/buildConfig/debug/com/ectrip/trips/check/BuildConfig.java
... | ... | @@ -8,6 +8,6 @@ public final class BuildConfig { |
8 | 8 | public static final String APPLICATION_ID = "com.ectrip.trips.check"; |
9 | 9 | public static final String BUILD_TYPE = "debug"; |
10 | 10 | public static final String FLAVOR = ""; |
11 | - public static final int VERSION_CODE = 25; | |
12 | - public static final String VERSION_NAME = "4.22"; | |
11 | + public static final int VERSION_CODE = 26; | |
12 | + public static final String VERSION_NAME = "4.23"; | |
13 | 13 | } | ... | ... |
src/com/ectrip/cyt/ui/PhomeScanerOrderActivity.java
... | ... | @@ -236,7 +236,9 @@ public class PhomeScanerOrderActivity extends BaseActivity implements Callback { |
236 | 236 | } |
237 | 237 | DbManager.ClearConfig(); |
238 | 238 | DbManager.InsertConfig(bean); |
239 | - Toast.makeText(this,"配置成功",Toast.LENGTH_SHORT); | |
239 | + Intent intent = new Intent(PhomeScanerOrderActivity.this, | |
240 | + SettingsActivity.class); | |
241 | + startActivity(intent); | |
240 | 242 | } |
241 | 243 | } |
242 | 244 | ... | ... |
src/com/ectrip/cyt/ui/SettingsActivity.java
... | ... | @@ -432,6 +432,8 @@ public class SettingsActivity extends BaseActivity implements OnClickListener, |
432 | 432 | @Override |
433 | 433 | public void onClick(View arg0) { |
434 | 434 | finish(); |
435 | + Intent intent = new Intent(SettingsActivity.this,MainActivity.class); | |
436 | + startActivity(intent); | |
435 | 437 | } |
436 | 438 | }); |
437 | 439 | } |
... | ... | @@ -738,6 +740,8 @@ public class SettingsActivity extends BaseActivity implements OnClickListener, |
738 | 740 | Intent intent = new Intent(); |
739 | 741 | setResult(SETTING_REQUESTCODE, intent); |
740 | 742 | finish(); |
743 | + Intent intent1 = new Intent(SettingsActivity.this,MainActivity.class); | |
744 | + startActivity(intent1); | |
741 | 745 | } |
742 | 746 | } else { |
743 | 747 | MToast(SettingsActivity.this, | ... | ... |
src/com/ectrip/trips/net/HttpHelper.java
1 | 1 | package com.ectrip.trips.net; |
2 | 2 | |
3 | +import java.util.ArrayList; | |
3 | 4 | import java.util.HashMap; |
4 | 5 | import java.util.List; |
5 | 6 | |
... | ... | @@ -8,11 +9,13 @@ import android.text.TextUtils; |
8 | 9 | import android.widget.Toast; |
9 | 10 | |
10 | 11 | import com.ectrip.cyt.base.DataTrans; |
12 | +import com.ectrip.cyt.bean.ConfigBean; | |
11 | 13 | import com.ectrip.cyt.callback.HttpCallback; |
12 | 14 | import com.ectrip.cyt.config.DevicTool; |
13 | 15 | import com.ectrip.cyt.config.MyApp; |
14 | 16 | import com.ectrip.cyt.constant.LogoType; |
15 | 17 | import com.ectrip.cyt.constant.constant; |
18 | +import com.ectrip.cyt.db.DbManager; | |
16 | 19 | import com.ectrip.cyt.request.ConsumeOrderRequest; |
17 | 20 | import com.ectrip.cyt.request.DetectVersionRequest; |
18 | 21 | import com.ectrip.cyt.request.LoginRequest; |
... | ... | @@ -39,7 +42,7 @@ public class HttpHelper extends HttpHelperCore { |
39 | 42 | private static BaseActivity activity; |
40 | 43 | // public static final String action="/service/terminal-2.action"; |
41 | 44 | public final String action = "/service/terminal-3.do"; |
42 | - | |
45 | + private ArrayList<ConfigBean> configBeans = DbManager.GetConfigs(); | |
43 | 46 | |
44 | 47 | public static HttpHelper getInstance(Context mContext) { |
45 | 48 | if (helper == null) { |
... | ... | @@ -78,7 +81,7 @@ public class HttpHelper extends HttpHelperCore { |
78 | 81 | } |
79 | 82 | orderRequest.setVer(MyApp.getInstance().getVer()); |
80 | 83 | orderRequest.setVerType(MyApp.getInstance().getVerType()); |
81 | - orderRequest.setDevId(DevicTool.getInstance().getDevId()); | |
84 | + orderRequest.setDevId(configBeans.get(0).getEc_mac()); | |
82 | 85 | orderRequest.setDevType(devType); |
83 | 86 | HashMap<String, String> map = new HashMap<String, String>(); |
84 | 87 | map.put("method", "queryOrder"); |
... | ... | @@ -99,7 +102,7 @@ public class HttpHelper extends HttpHelperCore { |
99 | 102 | } |
100 | 103 | activity.MToast(mContext, "服务地址:" |
101 | 104 | + MyApp.getInstance().getServiceIp() + ";" + "机器码:" |
102 | - + DevicTool.getInstance().getDevId() + ";" + credentials + ";" | |
105 | + + configBeans.get(0).getEc_mac() + ";" + credentials + ";" | |
103 | 106 | + phone + ";", Toast.LENGTH_LONG); |
104 | 107 | } |
105 | 108 | } |
... | ... | @@ -118,7 +121,7 @@ public class HttpHelper extends HttpHelperCore { |
118 | 121 | count, password, verifyPassword, consumedSeq, products); |
119 | 122 | consumeCount.setVer(MyApp.getInstance().getVer()); |
120 | 123 | consumeCount.setVerType(MyApp.getInstance().getVerType()); |
121 | - consumeCount.setDevId(DevicTool.getInstance().getDevId()); | |
124 | + consumeCount.setDevId(configBeans.get(0).getEc_mac()); | |
122 | 125 | consumeCount.setAccountId(accountId); |
123 | 126 | consumeCount.setDevType(devType); |
124 | 127 | |
... | ... | @@ -141,7 +144,7 @@ public class HttpHelper extends HttpHelperCore { |
141 | 144 | } |
142 | 145 | activity.MToast(mContext, "服务地址:" |
143 | 146 | + MyApp.getInstance().getServiceIp() + ";" + "机器码:" |
144 | - + DevicTool.getInstance().getDevId() + ";" + "订单号:" + orderId | |
147 | + + configBeans.get(0).getEc_mac() + ";" + "订单号:" + orderId | |
145 | 148 | + ";", Toast.LENGTH_LONG); |
146 | 149 | } |
147 | 150 | } |
... | ... | @@ -153,7 +156,7 @@ public class HttpHelper extends HttpHelperCore { |
153 | 156 | count, password, verifyPassword, consumedSeq, products); |
154 | 157 | consumeCount.setVer(MyApp.getInstance().getVer()); |
155 | 158 | consumeCount.setVerType(MyApp.getInstance().getVerType()); |
156 | - consumeCount.setDevId(DevicTool.getInstance().getDevId()); | |
159 | + consumeCount.setDevId(configBeans.get(0).getEc_mac()); | |
157 | 160 | consumeCount.setAccountId(accountId); |
158 | 161 | consumeCount.setDevType(devType); |
159 | 162 | if (isId) { |
... | ... | @@ -181,7 +184,7 @@ public class HttpHelper extends HttpHelperCore { |
181 | 184 | } |
182 | 185 | activity.MToast(mContext, "服务地址:" |
183 | 186 | + MyApp.getInstance().getServiceIp() + ";" + "机器码:" |
184 | - + DevicTool.getInstance().getDevId() + ";" + "订单号:" + orderId | |
187 | + + configBeans.get(0).getEc_mac() + ";" + "订单号:" + orderId | |
185 | 188 | + ";", Toast.LENGTH_LONG); |
186 | 189 | } |
187 | 190 | } |
... | ... | @@ -199,7 +202,8 @@ public class HttpHelper extends HttpHelperCore { |
199 | 202 | startdate, enddate, month); |
200 | 203 | consumeCount.setVer(MyApp.getInstance().getVer()); |
201 | 204 | consumeCount.setVerType(MyApp.getInstance().getVerType()); |
202 | - consumeCount.setDevId(DevicTool.getInstance().getDevId()); | |
205 | +// consumeCount.setDevId(DevicTool.getInstance().getDevId()); | |
206 | + consumeCount.setDevId(configBeans.get(0).getEc_mac()); | |
203 | 207 | consumeCount.setDevType(devType); |
204 | 208 | HashMap<String, String> map = new HashMap<String, String>(); |
205 | 209 | map.put("method", "consumeSummary"); |
... | ... | @@ -217,9 +221,14 @@ public class HttpHelper extends HttpHelperCore { |
217 | 221 | if (activity == null) { |
218 | 222 | return; |
219 | 223 | } |
224 | +// activity.MToast(mContext, "服务地址:" | |
225 | +// + MyApp.getInstance().getServiceIp() + ";" + "机器码:" | |
226 | +// + DevicTool.getInstance().getDevId() + ";" + "开始时间:" | |
227 | +// + startdate + ";" + "结束:" + enddate + ";" + "月份:" + month, | |
228 | +// Toast.LENGTH_LONG); | |
220 | 229 | activity.MToast(mContext, "服务地址:" |
221 | 230 | + MyApp.getInstance().getServiceIp() + ";" + "机器码:" |
222 | - + DevicTool.getInstance().getDevId() + ";" + "开始时间:" | |
231 | + + configBeans.get(0).getEc_mac() + ";" + "开始时间:" | |
223 | 232 | + startdate + ";" + "结束:" + enddate + ";" + "月份:" + month, |
224 | 233 | Toast.LENGTH_LONG); |
225 | 234 | } |
... | ... | @@ -235,7 +244,8 @@ public class HttpHelper extends HttpHelperCore { |
235 | 244 | reprintVoucherRequest.setOrderId(orderId); |
236 | 245 | reprintVoucherRequest.setVer(MyApp.getInstance().getVer()); |
237 | 246 | reprintVoucherRequest.setVerType(MyApp.getInstance().getVerType()); |
238 | - reprintVoucherRequest.setDevId(DevicTool.getInstance().getDevId()); | |
247 | +// reprintVoucherRequest.setDevId(DevicTool.getInstance().getDevId()); | |
248 | + reprintVoucherRequest.setDevId(configBeans.get(0).getEc_mac()); | |
239 | 249 | reprintVoucherRequest.setDevType(devType); |
240 | 250 | HashMap<String, String> map = new HashMap<String, String>(); |
241 | 251 | map.put("method", "consumeHistoryQuery"); |
... | ... | @@ -254,9 +264,13 @@ public class HttpHelper extends HttpHelperCore { |
254 | 264 | if (activity == null) { |
255 | 265 | return; |
256 | 266 | } |
267 | +// activity.MToast(mContext, "服务地址:" | |
268 | +// + MyApp.getInstance().getServiceIp() + ";" + "机器码:" | |
269 | +// + DevicTool.getInstance().getDevId() + ";" + "补打订单:" + orderId, | |
270 | +// Toast.LENGTH_LONG); | |
257 | 271 | activity.MToast(mContext, "服务地址:" |
258 | 272 | + MyApp.getInstance().getServiceIp() + ";" + "机器码:" |
259 | - + DevicTool.getInstance().getDevId() + ";" + "补打订单:" + orderId, | |
273 | + + configBeans.get(0).getEc_mac() + ";" + "补打订单:" + orderId, | |
260 | 274 | Toast.LENGTH_LONG); |
261 | 275 | } |
262 | 276 | } |
... | ... | @@ -280,7 +294,8 @@ public class HttpHelper extends HttpHelperCore { |
280 | 294 | reprintVoucherRequest.setOrderDetailIds(buffer.toString()); |
281 | 295 | reprintVoucherRequest.setVer(MyApp.getInstance().getVer()); |
282 | 296 | reprintVoucherRequest.setVerType(MyApp.getInstance().getVerType()); |
283 | - reprintVoucherRequest.setDevId(DevicTool.getInstance().getDevId()); | |
297 | +// reprintVoucherRequest.setDevId(DevicTool.getInstance().getDevId()); | |
298 | + reprintVoucherRequest.setDevId(configBeans.get(0).getEc_mac()); | |
284 | 299 | reprintVoucherRequest.setDevType(devType); |
285 | 300 | HashMap<String, String> map = new HashMap<String, String>(); |
286 | 301 | map.put("method", "reprintVoucher"); |
... | ... | @@ -299,9 +314,13 @@ public class HttpHelper extends HttpHelperCore { |
299 | 314 | if (activity == null) { |
300 | 315 | return; |
301 | 316 | } |
317 | +// activity.MToast(mContext, "服务地址:" | |
318 | +// + MyApp.getInstance().getServiceIp() + ";" + "机器码:" | |
319 | +// + DevicTool.getInstance().getDevId() + ";" + "补打订单:" + orderId, | |
320 | +// Toast.LENGTH_LONG); | |
302 | 321 | activity.MToast(mContext, "服务地址:" |
303 | 322 | + MyApp.getInstance().getServiceIp() + ";" + "机器码:" |
304 | - + DevicTool.getInstance().getDevId() + ";" + "补打订单:" + orderId, | |
323 | + + configBeans.get(0).getEc_mac() + ";" + "补打订单:" + orderId, | |
305 | 324 | Toast.LENGTH_LONG); |
306 | 325 | } |
307 | 326 | } |
... | ... | @@ -317,7 +336,8 @@ public class HttpHelper extends HttpHelperCore { |
317 | 336 | public void versionUpdate(String curVersionName, String signkey, |
318 | 337 | String identity, String url, HttpCallback<DataTrans> httpCallback) { |
319 | 338 | DetectVersionRequest detectVersionRequest = new DetectVersionRequest(); |
320 | - detectVersionRequest.setDevId(DevicTool.getInstance().getDevId()); | |
339 | +// detectVersionRequest.setDevId(DevicTool.getInstance().getDevId()); | |
340 | + detectVersionRequest.setDevId(configBeans.get(0).getEc_mac()); | |
321 | 341 | detectVersionRequest.setDevType("MDEV"); |
322 | 342 | detectVersionRequest.setVer(curVersionName); |
323 | 343 | if (constant.logoMark == LogoType.CYT.getValue() || constant.logoMark == LogoType.EMC.getValue()) { |
... | ... | @@ -344,12 +364,14 @@ public class HttpHelper extends HttpHelperCore { |
344 | 364 | * @param httpCallback |
345 | 365 | */ |
346 | 366 | public void login(String username, String password, HttpCallback<DataTrans> httpCallback) { |
367 | + | |
347 | 368 | LoginRequest loginRequest = new LoginRequest(); |
348 | 369 | loginRequest.setAccountName(username); |
349 | 370 | loginRequest.setPassword(password); |
350 | 371 | loginRequest.setVer(MyApp.getInstance().getVer()); |
351 | 372 | loginRequest.setVerType(MyApp.getInstance().getVerType()); |
352 | - loginRequest.setDevId(DevicTool.getInstance().getDevId()); | |
373 | +// loginRequest.setDevId(DevicTool.getInstance().getDevId()); | |
374 | + loginRequest.setDevId(configBeans.get(0).getEc_mac()); | |
353 | 375 | loginRequest.setDevType(devType); |
354 | 376 | |
355 | 377 | HashMap<String, String> map = new HashMap<String, String>(); | ... | ... |