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