Explorar el Código

物料状态增加为空判断

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@8034 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq hace 9 años
padre
commit
5bfb740a11
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      src/main/java/com/uas/platform/b2b/erp/model/Prod.java

+ 6 - 4
src/main/java/com/uas/platform/b2b/erp/model/Prod.java

@@ -140,10 +140,12 @@ public class Prod {
 		product.setLtinstock(this.pr_ltinstock);
 		product.setSourceId(this.pr_id);
 		product.setBrand(this.pr_brand);
-		if (this.pr_status.equals("已审核")) {
-			product.setIsSale((short) 1);
-		} else if (this.pr_status.equals("已禁用")) {
-			product.setIsSale((short) 0);
+		if (this.pr_status != null) {
+			if (this.pr_status.equals("已审核")) {
+				product.setIsSale((short) 1);
+			} else if (this.pr_status.equals("已禁用")) {
+				product.setIsSale((short) 0);
+			}
 		}
 		product.setCmpCode(this.pr_orispeccode);
 		product.setCmpUuId(this.pr_uuid);