Ver Fonte

订单保存字段空置显示字符串"null"问题修复

沈静伟 há 4 anos atrás
pai
commit
07b66e3dec

+ 5 - 7
src/rest/openapi/restcontroller/wechatapp/saorder/tools/SaorderTool.java

@@ -364,28 +364,26 @@ public class SaorderTool extends BaseClass {
             String fbrand = content.getString("fbrand");//品牌
 
             String fsaletype = "";
-            if (content.containsKey("fsaletype")) {
+            if (content.containsKey("fsaletype") && !content.getString("fsaletype").equalsIgnoreCase("null")) {
                 fsaletype = content.getString("fsaletype");
             }
             String fprojectnotes = "";
-            if (content.containsKey("fprojectnotes")) {
+            if (content.containsKey("fprojectnotes") && !content.getString("fprojectnotes").equalsIgnoreCase("null")) {
                 fprojectnotes = content.getString("fprojectnotes");
             }
-
-
             String fprojectnum = "";
-            if (content.containsKey("fprojectnum")) {
+            if (content.containsKey("fprojectnum")&& !content.getString("fprojectnum").equalsIgnoreCase("null")) {
                 fprojectnum = nullToStr(content.getString("fprojectnum"));//项目编号
             }
             String fpayagentnum = "";
-            if (content.containsKey("fpayagentnum")) {
+            if (content.containsKey("fpayagentnum")&& !content.getString("fpayagentnum").equalsIgnoreCase("null")) {
                 fpayagentnum = nullToStr(content.getString("fpayagentnum"));//结算客户
             }
             if ("".equals(fpayagentnum)) {
                 fpayagentnum = fagentnum;
             }
             String frecagentnum = "";
-            if (content.containsKey("frecagentnum")) {
+            if (content.containsKey("frecagentnum")&& !content.getString("frecagentnum").equalsIgnoreCase("null")) {
                 frecagentnum = nullToStr(content.getString("frecagentnum"));//收货客户
             }
             if ("".equals(frecagentnum)) {