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