修改非空判断

This commit is contained in:
gityjf 2020-04-24 17:20:58 +08:00
parent b5cb57c002
commit 1b9e80af27

View File

@ -13,6 +13,7 @@ import net.sf.json.JSONArray;
import net.sf.json.JSONNull;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
@ -273,14 +274,14 @@ public class ProductParamUtil {
String pData = boLPI.getAttribute("PRODUCT_DATA").getString();*/
String pData = ProductConfig.getProductData(realXmlPath);
String type = componentType;
if("".equals(pData)){
if(StringUtils.isEmpty(pData)){
}else{
JSONArray jsonArray = JSONArray.fromObject(pData);
Iterator<JSONObject> it = jsonArray.iterator();
JSONArray docList = null;
JSONArray docGroupConfig = null;
while(it.hasNext()){
JSONObject jo = (JSONObject)it.next().get("jbo.sample.Component");
JSONObject jo = it.next().getJSONObject("jbo.sample.Component");
if(type.equals(jo.get("TYPE"))){
docList = JSONArray.fromObject(jo.get("DecisionTable"));
}
@ -483,13 +484,13 @@ public class ProductParamUtil {
String pData = boLPI.getAttribute("PRODUCT_DATA").getString();*/
String pData = ProductConfig.getProductData(realXmlPath);
String type = componentType;
if("".equals(pData)){
if(StringUtils.isEmpty(pData)){
}else{
JSONArray jsonArray = JSONArray.fromObject(pData);
Iterator<JSONObject> it = jsonArray.iterator();
JSONArray param = null;
while(it.hasNext()){
JSONObject jo = (JSONObject)it.next().get("jbo.sample.Component");
JSONObject jo = it.next().getJSONObject("jbo.sample.Component");
if(type.equals(jo.get("TYPE")) && id.equals(jo.get("ID"))){
param = JSONArray.fromObject(jo.get("Parameter"));
}
@ -686,12 +687,12 @@ public class ProductParamUtil {
//Çл»ÁÈ¡»º´æ
String pData = ProductConfig.getProductData(realXmlPath);
String type = componentType;
if("".equals(pData)){
if(StringUtils.isEmpty(pData)){
}else{
JSONArray jsonArray = JSONArray.fromObject(pData);
Iterator<JSONObject> it = jsonArray.iterator();
while(it.hasNext()){
JSONObject jo = (JSONObject)it.next().get("jbo.sample.Component");
JSONObject jo = it.next().getJSONObject("jbo.sample.Component");
if(type.equals(jo.get("TYPE"))){
JSONArray ja = JSONArray.fromObject(jo.get("Parameter"));
BusinessObject b = BusinessObject.createBusinessObject("Component");
@ -724,12 +725,12 @@ public class ProductParamUtil {
String pData = boLPI.getAttribute("PRODUCT_DATA").getString();*/
String pData = ProductConfig.getProductData(realXmlPath);
String type = componentType;
if("".equals(pData)){
if(StringUtils.isEmpty(pData)){
}else{
JSONArray jsonArray = JSONArray.fromObject(pData);
Iterator<JSONObject> it = jsonArray.iterator();
while(it.hasNext()){
JSONObject jo = (JSONObject)it.next().get("jbo.sample.Component");
JSONObject jo = it.next().getJSONObject("jbo.sample.Component");
if(type.equals(jo.get("TYPE"))){
JSONArray ja = JSONArray.fromObject(jo.get("DecisionTable"));
BusinessObject b = BusinessObject.createBusinessObject("Component");