Browse Source

生成对账单时,考虑判断已转数为空的情况

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@5720 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
shenj 9 years ago
parent
commit
72b3e96fb6
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/main/java/com/uas/platform/b2b/model/SourceForApcheck.java

+ 7 - 3
src/main/java/com/uas/platform/b2b/model/SourceForApcheck.java

@@ -16,7 +16,12 @@ public class SourceForApcheck {
 		super();
 		this.sourceId = item.getSourceId();
 		this.sourceTable = item.getSourceTable();
-		this.newYCheckQty = item.getCheckQty() + item.getOldYCheckQty();
+		if (item.getOldYCheckQty() == null) {
+			this.newYCheckQty = item.getCheckQty();
+		} else {
+			this.newYCheckQty = item.getCheckQty() + item.getOldYCheckQty();
+		}
+
 	}
 
 	public Long getSourceId() {
@@ -52,8 +57,7 @@ public class SourceForApcheck {
 
 	@Override
 	public String toString() {
-		return "SourceForApcheck [sourceId=" + sourceId + ", sourceTable=" + sourceTable + ", newYCheckQty="
-				+ newYCheckQty + "]";
+		return "SourceForApcheck [sourceId=" + sourceId + ", sourceTable=" + sourceTable + ", newYCheckQty=" + newYCheckQty + "]";
 	}
 
 }