|
|
@@ -146,6 +146,7 @@ public class SendOutGoods extends Activity {
|
|
|
private boolean isFirst=true;
|
|
|
private String IsSYNCSTATUS="0";
|
|
|
private int Height=188;
|
|
|
+ private String DATAKEY="";
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -234,8 +235,19 @@ public class SendOutGoods extends Activity {
|
|
|
mHandler = new Handler(thread.getLooper());
|
|
|
ReceiveRunnable ReceiveRunnable = new ReceiveRunnable(obj);
|
|
|
mHandler.post(ReceiveRunnable);
|
|
|
+ updateDataKey();
|
|
|
}
|
|
|
-
|
|
|
+ /**更新唯一标识*/
|
|
|
+ private void updateDataKey() {
|
|
|
+ // 获取当前时间戳
|
|
|
+ long timestamp = new Date().getTime();
|
|
|
+
|
|
|
+ // 获取TextView文本内容
|
|
|
+ String text = procedureTv.getText().toString();
|
|
|
+
|
|
|
+ // 拼接字符串
|
|
|
+ DATAKEY = timestamp + "-" + text;
|
|
|
+ }
|
|
|
//protected void onResume() {
|
|
|
// super.onResume();
|
|
|
// 如果值已经在onCreate()中加载完成,可以在这里直接调用方法
|
|
|
@@ -862,7 +874,7 @@ public class SendOutGoods extends Activity {
|
|
|
JSONObject js6 = new JSONObject();
|
|
|
js6.put("SENDOUTCODE", sendOutGoodLogId);
|
|
|
js6.put("USERCODE", send_userCode);
|
|
|
-
|
|
|
+ js6.put("DATAKEY", DATAKEY);
|
|
|
if(TextView04.getText()== null|| TextView04.getText().toString()== "")
|
|
|
{
|
|
|
CustomToast.showToast(getApplicationContext(), "记账日期不能为空",
|
|
|
@@ -1126,13 +1138,11 @@ public class SendOutGoods extends Activity {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ boolean a=false;
|
|
|
if ((Double.parseDouble(Count)) >(double)(storageConout-mcount)) {
|
|
|
- //CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
- CommonUtil.showBarCodeAlertDialog(0, "库存不足", SendOutGoods.this, barcodeEdt, null,
|
|
|
- null);
|
|
|
- return;
|
|
|
- } else {
|
|
|
- if (jArray != null && jArray.length() > 0) {
|
|
|
+ a=!a;
|
|
|
+ }
|
|
|
+ if (status==0) {
|
|
|
for (int i = 0; i < jArray.length(); i++) {
|
|
|
JSONObject object2 = (JSONObject) jArray.opt(i);
|
|
|
String barcode = object2.optString("BANMA");
|
|
|
@@ -1150,7 +1160,8 @@ public class SendOutGoods extends Activity {
|
|
|
CustomToast.showToast(getApplicationContext(), "条码重复", 2000);
|
|
|
|
|
|
break;
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (!a) {
|
|
|
BarcodeInfo barcodeInfo = new BarcodeInfo();
|
|
|
barcodeInfo.setBanMa(barcode=="null"?"":barcode);
|
|
|
barcodeInfo.setGoodsCode(goodsCode);
|
|
|
@@ -1159,7 +1170,13 @@ public class SendOutGoods extends Activity {
|
|
|
barcodeInfo.setOrderNo(String.valueOf(orderNo));
|
|
|
barcodeInfo.setFinishedBarCode(object2.optString("FINISHEDLOADBATCHNO"));//判断是否重复
|
|
|
barcodeList.add(barcodeInfo);
|
|
|
- }
|
|
|
+ }}
|
|
|
+ if (a) {
|
|
|
+ //CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
+ CommonUtil.showBarCodeAlertDialog(0, "库存不足", SendOutGoods.this, barcodeEdt, null,
|
|
|
+ null);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (adapter == null) {
|
|
|
adapter = new SendOutGoodsListMessageAdapter(SendOutGoods.this, barcodeList);
|
|
|
messageLst.setAdapter(adapter);
|
|
|
@@ -1193,7 +1210,7 @@ public class SendOutGoods extends Activity {
|
|
|
// InputMethodManager.HIDE_NOT_ALWAYS);
|
|
|
ProcessDialogUtils.closeProgressDilog();
|
|
|
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
} else if (status==-1)
|
|
|
{
|
|
|
@@ -1281,7 +1298,8 @@ public class SendOutGoods extends Activity {
|
|
|
|
|
|
} else{
|
|
|
CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
- CommonUtil.showSaveAlertDialog(0,message , SendOutGoods.this, null, barcodeEdt, 2);
|
|
|
+ CommonUtil.showSaveAlertDialog(0,message , SendOutGoods.this, null, barcodeEdt, 2);
|
|
|
+ updateDataKey();
|
|
|
|
|
|
}
|
|
|
} catch (JSONException e) {
|