Commit 444643d2 authored by hongguangwu's avatar hongguangwu

MVP1.7.16-优化代码

parent a6e8a7ff
......@@ -443,14 +443,18 @@ public class FascUtil {
DocFieldValueInfo dfv;
String fieldValue;
String fieldName;
// 字段中文名
String fieldNameChinese;
for (TFascTemplateDetail detail : detailList) {
if (Common.isNotNull(detail.getHrFieldId()) && Common.isNotNull(detail.getHrField())) {
fieldValue = null;
dfv = new DocFieldValueInfo();
dfv.setDocId(detail.getFascDocId());
dfv.setFieldId(detail.getFascFieldId());
// 转化字段
fieldName = detail.getHrFieldId();
fieldNameChinese = detail.getHrField();
if (FascConstants.CONTRACT_DURATION.equals(fieldName)) {
fieldValue = contract.getContractDurationYear() + CommonConstants.CENTER_SPLIT_LINE_STRING + contract.getContractDurationMonth();
} else if (FascConstants.DISPATCH_PERIOD.equals(fieldName)) {
......@@ -472,7 +476,24 @@ public class FascUtil {
}
}
} else {
fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue());
if (Common.isNotNull(fieldNameChinese)) {
// 0=已完成一定工作任务为期限,1=固定期限,2=无固定期限
if (fieldNameChinese.contains("无固定-")) {
if (CommonConstants.TWO_STRING.equals(contract.getContractTerm())) {
fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue());
}
} else if (fieldNameChinese.contains("固定-")) {
if (CommonConstants.ONE_STRING.equals(contract.getContractTerm())) {
fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue());
}
} else if (fieldNameChinese.contains("完成任务-")) {
if (CommonConstants.ZERO_STRING.equals(contract.getContractTerm())) {
fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue());
}
} else {
fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue());
}
}
}
if (Common.isNotNull(fieldValue)) {
dfv.setFieldValue(fieldValue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment