fix dealwithmapping lowecase bug
parent
958a9d7029
commit
8e6720335d
|
@ -557,26 +557,40 @@ public class DealWithMapping extends ToolUtil {
|
||||||
// 流程字段
|
// 流程字段
|
||||||
case WORKFLOW_FIELD: {
|
case WORKFLOW_FIELD: {
|
||||||
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
||||||
String fieldName = fieldMassage.getFieldName().toLowerCase();
|
String fieldName = fieldMassage.getFieldName();
|
||||||
|
String fieldNameLower = fieldName.toLowerCase();
|
||||||
if ("1".equals(childSource)) {
|
if ("1".equals(childSource)) {
|
||||||
|
value = Util.null2String(detailMap.get(fieldNameLower));
|
||||||
|
if ("".equals(value)) {
|
||||||
value = Util.null2String(detailMap.get(fieldName));
|
value = Util.null2String(detailMap.get(fieldName));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
value = Util.null2String(mainMap.get(fieldNameLower));
|
||||||
|
if ("".equals(value)) {
|
||||||
value = Util.null2String(mainMap.get(fieldName));
|
value = Util.null2String(mainMap.get(fieldName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// 默认值
|
// 默认值
|
||||||
case DEFAULT_VALUE: {
|
case DEFAULT_VALUE: {
|
||||||
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
||||||
String workFlowVal = "";
|
String workFlowVal = "";
|
||||||
if (fieldMassage != null) {
|
if (fieldMassage != null) {
|
||||||
String fieldName = fieldMassage.getFieldName().toLowerCase();
|
String fieldName = fieldMassage.getFieldName();
|
||||||
|
String fieldNameLowe = fieldName.toLowerCase();
|
||||||
if ("1".equals(childSource)) {
|
if ("1".equals(childSource)) {
|
||||||
|
workFlowVal = Util.null2String(detailMap.get(fieldNameLowe));
|
||||||
|
if ("".equals(workFlowVal)) {
|
||||||
workFlowVal = Util.null2String(detailMap.get(fieldName));
|
workFlowVal = Util.null2String(detailMap.get(fieldName));
|
||||||
|
}
|
||||||
} else if ("0".equals(childSource)) {
|
} else if ("0".equals(childSource)) {
|
||||||
|
workFlowVal = Util.null2String(mainMap.get(fieldNameLowe));
|
||||||
|
if ("".equals(workFlowVal)) {
|
||||||
workFlowVal = Util.null2String(mainMap.get(fieldName));
|
workFlowVal = Util.null2String(mainMap.get(fieldName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
value = Util.null2String(valueContext)
|
value = Util.null2String(valueContext)
|
||||||
.replace("{?requestid}", String.valueOf(mainMap.get("requestid")))
|
.replace("{?requestid}", String.valueOf(mainMap.get("requestid")))
|
||||||
.replace("{?}", workFlowVal);
|
.replace("{?}", workFlowVal);
|
||||||
|
@ -819,38 +833,64 @@ public class DealWithMapping extends ToolUtil {
|
||||||
// 流程字段
|
// 流程字段
|
||||||
case WORKFLOW_FIELD: {
|
case WORKFLOW_FIELD: {
|
||||||
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
||||||
String fieldName = fieldMassage.getFieldName().toLowerCase();
|
String fieldName = fieldMassage.getFieldName();
|
||||||
|
String fieldNameLower = fieldName.toLowerCase();
|
||||||
this.writeDebuggerLog("fieldName:" + fieldName);
|
this.writeDebuggerLog("fieldName:" + fieldName);
|
||||||
if ("1".equals(childSource)) {
|
if ("1".equals(childSource)) {
|
||||||
|
value = Util.null2String(detailMap.get(fieldNameLower));
|
||||||
|
if ("".equals(value)) {
|
||||||
value = Util.null2String(detailMap.get(fieldName));
|
value = Util.null2String(detailMap.get(fieldName));
|
||||||
|
}
|
||||||
} else if ("0".equals(childSource)) {
|
} else if ("0".equals(childSource)) {
|
||||||
|
value = Util.null2String(mainMap.get(fieldNameLower));
|
||||||
|
if ("".equals(value)) {
|
||||||
value = Util.null2String(mainMap.get(fieldName));
|
value = Util.null2String(mainMap.get(fieldName));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
value = Util.null2String(relationRs.getString(fieldNameLower));
|
||||||
|
if ("".equals(value)) {
|
||||||
value = Util.null2String(relationRs.getString(fieldName));
|
value = Util.null2String(relationRs.getString(fieldName));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ("rootNode".equals(mappingDetail.getBelongTo()) && "2".equals(childSource)) {
|
if ("rootNode".equals(mappingDetail.getBelongTo()) && "2".equals(childSource)) {
|
||||||
writeDebuggerLog("主表取关联流程字段 => " + paramName);
|
writeDebuggerLog("主表取关联流程字段 => " + paramName);
|
||||||
|
value = Util.null2String(tempRs.getString(fieldNameLower));
|
||||||
|
if ("".equals(value)) {
|
||||||
value = Util.null2String(tempRs.getString(fieldName));
|
value = Util.null2String(tempRs.getString(fieldName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// 默认值
|
// 默认值
|
||||||
case DEFAULT_VALUE: {
|
case DEFAULT_VALUE: {
|
||||||
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
FieldMessage fieldMassage = mappingDetail.getFieldMassage();
|
||||||
String workFlowVal = "";
|
String workFlowVal = "";
|
||||||
if (fieldMassage != null) {
|
if (fieldMassage != null) {
|
||||||
String fieldName = fieldMassage.getFieldName().toLowerCase();
|
String fieldName = fieldMassage.getFieldName();
|
||||||
|
String fieldNameLower = fieldName.toLowerCase();
|
||||||
if ("1".equals(childSource)) {
|
if ("1".equals(childSource)) {
|
||||||
|
workFlowVal = Util.null2String(detailMap.get(fieldNameLower));
|
||||||
|
if ("".equals(workFlowVal)) {
|
||||||
workFlowVal = Util.null2String(detailMap.get(fieldName));
|
workFlowVal = Util.null2String(detailMap.get(fieldName));
|
||||||
|
}
|
||||||
} else if ("0".equals(childSource)) {
|
} else if ("0".equals(childSource)) {
|
||||||
|
workFlowVal = Util.null2String(mainMap.get(fieldNameLower));
|
||||||
|
if ("".equals(workFlowVal)) {
|
||||||
workFlowVal = Util.null2String(mainMap.get(fieldName));
|
workFlowVal = Util.null2String(mainMap.get(fieldName));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
workFlowVal = Util.null2String(relationRs.getString(fieldNameLower));
|
||||||
|
if ("".equals(workFlowVal)) {
|
||||||
workFlowVal = Util.null2String(relationRs.getString(fieldName));
|
workFlowVal = Util.null2String(relationRs.getString(fieldName));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ("rootNode".equals(mappingDetail.getBelongTo()) && "2".equals(childSource)) {
|
if ("rootNode".equals(mappingDetail.getBelongTo()) && "2".equals(childSource)) {
|
||||||
|
workFlowVal = Util.null2String(tempRs.getString(fieldNameLower));
|
||||||
|
if ("".equals(workFlowVal)) {
|
||||||
workFlowVal = Util.null2String(tempRs.getString(fieldName));
|
workFlowVal = Util.null2String(tempRs.getString(fieldName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
value = Util.null2String(valueContext)
|
value = Util.null2String(valueContext)
|
||||||
.replace("{?requestid}", String.valueOf(mainMap.get("requestid")))
|
.replace("{?requestid}", String.valueOf(mainMap.get("requestid")))
|
||||||
.replace("{?}", workFlowVal);
|
.replace("{?}", workFlowVal);
|
||||||
|
|
Loading…
Reference in New Issue