parent
0dfe66c8d2
commit
e89469724c
|
@ -120,6 +120,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
|||
|
||||
// 将映射字段塞入对应JSON中
|
||||
Object shkd_soufield = dynamicObject.get("shkd_soufield");
|
||||
logger.info("shkd_soufield: {}", shkd_soufield);
|
||||
Object value = null;
|
||||
if (shkd_soufield != null) {
|
||||
String[] parts = shkd_soufield.toString().split("\\.");
|
||||
|
@ -153,14 +154,27 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
|||
DynamicObjectCollection dynamicObjectCollection1 = billObject.getDynamicObjectCollection(parts[0]);
|
||||
value = dynamicObjectCollection1.get(0).get(parts[1]);
|
||||
} else {
|
||||
value = billObject.getDynamicObject(parts[0]).get(parts[1]);
|
||||
DynamicObject object = billObject.getDynamicObject(parts[0]);
|
||||
if (object != null) {
|
||||
value = object.get(parts[1]);
|
||||
}
|
||||
}
|
||||
} else if (parts.length == 3) {
|
||||
if ("entry".equals(parts[0])) {
|
||||
DynamicObjectCollection dynamicObjectCollection1 = billObject.getDynamicObjectCollection(parts[0]);
|
||||
value = dynamicObjectCollection1.get(0).getDynamicObject(parts[1]).get(parts[2]);
|
||||
DynamicObject object = dynamicObjectCollection1.get(0).getDynamicObject(parts[1]);
|
||||
if (object != null) {
|
||||
value = object.get(parts[2]);
|
||||
}
|
||||
} else {
|
||||
value = billObject.getDynamicObject(parts[0]).getDynamicObject(parts[1]).get(parts[2]);
|
||||
DynamicObject object = billObject.getDynamicObject(parts[0]);
|
||||
if (object != null) {
|
||||
DynamicObject object1 = object.getDynamicObject(parts[1]);
|
||||
if (object1 != null) {
|
||||
value = object1.get(parts[2]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -287,14 +301,26 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
|||
DynamicObjectCollection dynamicObjectCollection = dynamic.getDynamicObjectCollection(parts[0]);
|
||||
value = dynamicObjectCollection.get(0).get(parts[1]);
|
||||
} else {
|
||||
value = dynamic.getDynamicObject(parts[0]).get(parts[1]);
|
||||
DynamicObject object = dynamic.getDynamicObject(parts[0]);
|
||||
if (object != null) {
|
||||
value = object.get(parts[1]);
|
||||
}
|
||||
}
|
||||
} else if (parts.length == 3) {
|
||||
if ("entry".equals(parts[0])) {
|
||||
DynamicObjectCollection dynamicObjectCollection = dynamic.getDynamicObjectCollection(parts[0]);
|
||||
value = dynamicObjectCollection.get(0).getDynamicObject(parts[1]).get(parts[2]);
|
||||
DynamicObject object = dynamicObjectCollection.get(0).getDynamicObject(parts[1]);
|
||||
if (object != null) {
|
||||
value = object.get(parts[2]);
|
||||
}
|
||||
} else {
|
||||
value = dynamic.getDynamicObject(parts[0]).getDynamicObject(parts[1]).get(parts[2]);
|
||||
DynamicObject object = dynamic.getDynamicObject(parts[0]);
|
||||
if (object != null) {
|
||||
DynamicObject object1 = object.getDynamicObject(parts[1]);
|
||||
if (object1 != null) {
|
||||
value = object1.get(parts[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -363,14 +389,26 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
|||
DynamicObjectCollection dynamicObjectCollection = dynamic.getDynamicObjectCollection(parts[0]);
|
||||
value = dynamicObjectCollection.get(0).get(parts[1]);
|
||||
} else {
|
||||
value = dynamic.getDynamicObject(parts[0]).get(parts[1]);
|
||||
DynamicObject object = dynamic.getDynamicObject(parts[0]);
|
||||
if (object != null) {
|
||||
value = object.get(parts[1]);
|
||||
}
|
||||
}
|
||||
} else if (parts.length == 3) {
|
||||
if ("entry".equals(parts[0])) {
|
||||
DynamicObjectCollection dynamicObjectCollection = dynamic.getDynamicObjectCollection(parts[0]);
|
||||
value = dynamicObjectCollection.get(0).getDynamicObject(parts[1]).get(parts[2]);
|
||||
DynamicObject object = dynamicObjectCollection.get(0).getDynamicObject(parts[1]);
|
||||
if (object != null) {
|
||||
value = object.get(parts[2]);
|
||||
}
|
||||
} else {
|
||||
value = dynamic.getDynamicObject(parts[0]).getDynamicObject(parts[1]).get(parts[2]);
|
||||
DynamicObject object = dynamic.getDynamicObject(parts[0]);
|
||||
if (object != null) {
|
||||
DynamicObject object1 = object.getDynamicObject(parts[1]);
|
||||
if (object1 != null) {
|
||||
value = object1.get(parts[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue