Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
0290b504
Commit
0290b504
authored
Mar 13, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7.21-法大大试用期默认值
parent
c4d31c10
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
16 deletions
+44
-16
TFascHrField.java
...yifu/cloud/plus/v1/yifu/archives/entity/TFascHrField.java
+7
-0
TFascTemplateDetail.java
...oud/plus/v1/yifu/archives/entity/TFascTemplateDetail.java
+6
-0
FascUtil.java
.../com/yifu/cloud/plus/v1/yifu/archives/utils/FascUtil.java
+26
-14
TFascHrFieldMapper.xml
...ives-biz/src/main/resources/mapper/TFascHrFieldMapper.xml
+3
-1
TFascTemplateDetailMapper.xml
...z/src/main/resources/mapper/TFascTemplateDetailMapper.xml
+2
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TFascHrField.java
View file @
0290b504
...
...
@@ -84,5 +84,12 @@ public class TFascHrField {
@ExcelProperty
(
"字段格式化或键值对"
)
@Schema
(
description
=
"字段格式化或键值对"
)
private
String
fieldValue
;
/**
* 字段空值时的默认值
*/
@ExcelAttribute
(
name
=
"字段空值时的默认值"
,
maxLength
=
2
)
@Length
(
max
=
2
,
message
=
"字段空值时的默认值不能超过2个字符"
)
@Schema
(
description
=
"字段空值时的默认值"
)
private
String
fieldDefaultValue
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TFascTemplateDetail.java
View file @
0290b504
...
...
@@ -153,6 +153,12 @@ public class TFascTemplateDetail extends BaseEntity {
@TableField
(
exist
=
false
)
@Schema
(
description
=
"字段格式化或键值对"
)
private
String
fieldValue
;
/**
* 字段空值时的默认值
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"字段空值时的默认值"
)
private
String
fieldDefaultValue
;
/**
* 公司主体Id
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/FascUtil.java
View file @
0290b504
...
...
@@ -693,18 +693,22 @@ public class FascUtil {
// 针对一个模板,三种类型,有的要开始时间,有的不要,这里做区分:
if
(
fieldNameChinese
.
contains
(
"无固定-"
))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
contract
.
getContractTerm
()))
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
else
if
(
fieldNameChinese
.
contains
(
"固定-"
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
contract
.
getContractTerm
()))
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
else
if
(
fieldNameChinese
.
contains
(
"完成任务-"
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
contract
.
getContractTerm
()))
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
else
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
}
...
...
@@ -787,18 +791,22 @@ public class FascUtil {
// 针对一个模板,三种类型,有的要开始时间,有的不要,这里做区分:
if
(
fieldNameChinese
.
contains
(
"无固定-"
))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
contract
.
getContractTerm
()))
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
else
if
(
fieldNameChinese
.
contains
(
"固定-"
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
contract
.
getContractTerm
()))
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
else
if
(
fieldNameChinese
.
contains
(
"完成任务-"
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
contract
.
getContractTerm
()))
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
else
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
());
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
(),
detail
.
getFieldDefaultValue
());
}
}
}
...
...
@@ -828,7 +836,8 @@ public class FascUtil {
* @param fieldName 字段名
* @return 字段值
*/
private
String
getContractFieldValueByReflection
(
TEmployeeContractPre
contract
,
String
fieldName
,
String
fieldType
,
String
fieldValue
)
{
private
String
getContractFieldValueByReflection
(
TEmployeeContractPre
contract
,
String
fieldName
,
String
fieldType
,
String
fieldValue
,
String
fieldDefaultValue
)
{
if
(
contract
==
null
||
fieldName
==
null
)
{
return
null
;
}
...
...
@@ -841,7 +850,7 @@ public class FascUtil {
java
.
lang
.
reflect
.
Method
method
=
contract
.
getClass
().
getMethod
(
getterMethodName
);
Object
value
=
method
.
invoke
(
contract
);
String
valueStr
=
String
.
valueOf
(
value
);
valueStr
=
this
.
getCoverValue
(
valueStr
,
fieldType
,
fieldValue
);
valueStr
=
this
.
getCoverValue
(
valueStr
,
fieldType
,
fieldValue
,
fieldDefaultValue
);
return
valueStr
;
}
catch
(
Exception
e
)
{
// 如果找不到对应的方法,尝试直接匹配字段名
...
...
@@ -855,7 +864,8 @@ public class FascUtil {
}
}
}
private
String
getContractFieldValueByReflection
(
TEmployeeContractPreNew
contract
,
String
fieldName
,
String
fieldType
,
String
fieldValue
)
{
private
String
getContractFieldValueByReflection
(
TEmployeeContractPreNew
contract
,
String
fieldName
,
String
fieldType
,
String
fieldValue
,
String
fieldDefaultValue
)
{
if
(
contract
==
null
||
fieldName
==
null
)
{
return
null
;
}
...
...
@@ -868,7 +878,7 @@ public class FascUtil {
java
.
lang
.
reflect
.
Method
method
=
contract
.
getClass
().
getMethod
(
getterMethodName
);
Object
value
=
method
.
invoke
(
contract
);
String
valueStr
=
String
.
valueOf
(
value
);
valueStr
=
this
.
getCoverValue
(
valueStr
,
fieldType
,
fieldValue
);
valueStr
=
this
.
getCoverValue
(
valueStr
,
fieldType
,
fieldValue
,
fieldDefaultValue
);
return
valueStr
;
}
catch
(
Exception
e
)
{
// 如果找不到对应的方法,尝试直接匹配字段名
...
...
@@ -883,13 +893,15 @@ public class FascUtil {
}
}
// 翻译字典
private
String
getCoverValue
(
String
valueStr
,
String
fieldType
,
String
fieldValue
)
{
if
(
Common
.
isNotNull
(
valueStr
)
&&
(
Common
.
isNotNull
(
fieldType
)
))
{
private
String
getCoverValue
(
String
valueStr
,
String
fieldType
,
String
fieldValue
,
String
fieldDefailtValue
)
{
if
(
Common
.
isNotNull
(
valueStr
)
&&
Common
.
isNotNull
(
fieldType
))
{
if
(
DATA_COVER
.
equals
(
fieldType
))
{
valueStr
=
convertByExp
(
fieldValue
,
valueStr
);
}
else
if
(
DATE_FORMAT
.
equals
(
fieldType
))
{
valueStr
=
formatStringDate
(
fieldValue
,
valueStr
);
}
}
else
if
(
Common
.
isNotNull
(
fieldDefailtValue
))
{
valueStr
=
fieldDefailtValue
;
}
return
valueStr
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TFascHrFieldMapper.xml
View file @
0290b504
...
...
@@ -30,6 +30,7 @@
<result
property=
"contractType"
column=
"contract_type"
/>
<result
property=
"fieldType"
column=
"field_type"
/>
<result
property=
"fieldValue"
column=
"field_value"
/>
<result
property=
"fieldDefaultValue"
column=
"field_default_value"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
...
...
@@ -37,7 +38,8 @@
a.hr_field_id,
a.contract_type,
a.field_type,
a.field_value
a.field_value,
a.field_default_value
</sql>
<sql
id=
"tFascHrField_where"
>
<if
test=
"tFascHrField != null"
>
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TFascTemplateDetailMapper.xml
View file @
0290b504
...
...
@@ -44,6 +44,7 @@
<result
property=
"fascDocId"
column=
"fasc_doc_id"
/>
<result
property=
"fieldType"
column=
"field_type"
/>
<result
property=
"fieldValue"
column=
"field_value"
/>
<result
property=
"fieldDefaultValue"
column=
"field_default_value"
/>
</resultMap>
<resultMap
id=
"tFascTemplateDetailExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TFascTemplateDetailExportVo"
>
...
...
@@ -174,7 +175,7 @@
a.hr_field,
a.hr_field_id,
a.is_edit,
h.field_type,h.field_value
h.field_type,h.field_value
,h.field_default_value
FROM t_fasc_template_detail a
left join t_fasc_template b on a.sign_template_id = b.sign_template_id
left join t_fasc_hr_field h on h.hr_field_id = a.hr_field_id and h.hr_field = a.hr_field
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment