Commit 6db2f1d6 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.16' into MVP1.7.16

parents 710b3933 0288b28f
......@@ -236,6 +236,8 @@ public class TEmployeeContractPreController {
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.FOUR_INT)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
return R.ok(employeeContractInfo);
......
......@@ -300,7 +300,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
Map<String, String> loginNameMap = new HashMap<>();
//发起派单
List<ErrorMessage> errorMessageListAll = new ArrayList<>();
List<EmployeeContractVO> excelVOList = baseMapper.getDisPatcherContractList(idList,CommonConstants.socialInfoStatus,type);
List<EmployeeContractVO> excelVOList = baseMapper.getDisPatcherContractList(idList,Arrays.asList("0","1","3","5","7","11"),type);
// 拆分电子签和线下签
List<EmployeeContractVO> electronicSignList = new ArrayList<>();
......@@ -389,6 +389,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
singleContractList.add(contractVO);
List<ErrorMessage> singleErrorMessageList = new ArrayList<>();
singleContractList.add(contractVO);
// 调用合同导入方法
contractInfoService.importContract(singleContractList, singleErrorMessageList);
......
......@@ -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,25 @@ 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