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
5ae55522
Commit
5ae55522
authored
Oct 23, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.16-优化代码
parent
c0b9adac
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
209 additions
and
29 deletions
+209
-29
TFascHrField.java
...yifu/cloud/plus/v1/yifu/archives/entity/TFascHrField.java
+16
-0
TFascTemplateDetail.java
...oud/plus/v1/yifu/archives/entity/TFascTemplateDetail.java
+13
-0
IdCardUtil.java
...com/yifu/cloud/plus/v1/yifu/archives/util/IdCardUtil.java
+52
-0
TFascTemplateDetailMapper.java
...us/v1/yifu/archives/mapper/TFascTemplateDetailMapper.java
+2
-0
TFascTemplateDetailService.java
.../v1/yifu/archives/service/TFascTemplateDetailService.java
+2
-0
FascServiceImpl.java
...d/plus/v1/yifu/archives/service/impl/FascServiceImpl.java
+1
-3
TFascTemplateDetailServiceImpl.java
...archives/service/impl/TFascTemplateDetailServiceImpl.java
+10
-0
FascConstants.java
...yifu/cloud/plus/v1/yifu/archives/utils/FascConstants.java
+2
-0
FascUtil.java
.../com/yifu/cloud/plus/v1/yifu/archives/utils/FascUtil.java
+79
-20
TFascHrFieldMapper.xml
...ives-biz/src/main/resources/mapper/TFascHrFieldMapper.xml
+5
-1
TFascTemplateDetailMapper.xml
...z/src/main/resources/mapper/TFascTemplateDetailMapper.xml
+27
-5
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TFascHrField.java
View file @
5ae55522
...
@@ -68,5 +68,21 @@ public class TFascHrField {
...
@@ -68,5 +68,21 @@ public class TFascHrField {
@ExcelProperty
(
"合同类型"
)
@ExcelProperty
(
"合同类型"
)
@Schema
(
description
=
"合同类型"
)
@Schema
(
description
=
"合同类型"
)
private
String
contractType
;
private
String
contractType
;
/**
* 字段类型
*/
@ExcelAttribute
(
name
=
"字段类型"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"字段类型不能超过10个字符"
)
@ExcelProperty
(
"字段类型"
)
@Schema
(
description
=
"字段类型"
)
private
String
fieldType
;
/**
* 字段格式化或键值对
*/
@ExcelAttribute
(
name
=
"字段格式化或键值对"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"字段格式化或键值对不能超过30个字符"
)
@ExcelProperty
(
"字段格式化或键值对"
)
@Schema
(
description
=
"字段格式化或键值对"
)
private
String
fieldValue
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TFascTemplateDetail.java
View file @
5ae55522
...
@@ -141,4 +141,17 @@ public class TFascTemplateDetail extends BaseEntity {
...
@@ -141,4 +141,17 @@ public class TFascTemplateDetail extends BaseEntity {
@Schema
(
description
=
"合同类型是否配置"
)
@Schema
(
description
=
"合同类型是否配置"
)
private
String
haveContractType
;
private
String
haveContractType
;
/**
* 字段类型
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"字段类型"
)
private
String
fieldType
;
/**
* 字段格式化或键值对
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"字段格式化或键值对"
)
private
String
fieldValue
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/util/IdCardUtil.java
View file @
5ae55522
...
@@ -86,6 +86,58 @@ public class IdCardUtil {
...
@@ -86,6 +86,58 @@ public class IdCardUtil {
}
}
return
date
;
return
date
;
}
}
/**
* 提取身份证中的出生日期,身份证非法则返回空
* @param idNum
* @return
*/
public
static
String
getBirthdateByPatten
(
String
idNum
,
String
patten
){
Pattern
idNumPattern
=
null
;
Matcher
idNumMatcher
=
null
;
String
returnDateStr
=
null
;
//定义判别用户身份证号的正则表达式(要么是15位,要么是18位,最后一位可以为字母)
idNumPattern
=
compile
(
"(\\d{14}[0-9a-zA-Z])|(\\d{17}[0-9a-zA-Z])"
);
//通过Pattern获得Matcher
idNumMatcher
=
idNumPattern
.
matcher
(
idNum
);
//判断用户输入是否为身份证号
if
(
idNumMatcher
.
matches
()){
Pattern
birthDatePattern
=
null
;
Matcher
birthDateMather
=
null
;
String
year
=
null
;
if
(
idNum
.
length
()==
18
){
//如果是,定义正则表达式提取出身份证中的出生日期
birthDatePattern
=
compile
(
"\\d{6}(\\d{4})(\\d{2})(\\d{2}).*"
);
//身份证上的前6位以及出生年月日
//通过Pattern获得Matcher
birthDateMather
=
birthDatePattern
.
matcher
(
idNum
);
}
else
if
(
idNum
.
length
()==
15
){
//如果是,定义正则表达式提取出身份证中的出生日期
birthDatePattern
=
compile
(
"\\d{6}(\\d{2})(\\d{2})(\\d{2}).*"
);
//身份证上的前6位以及出生年月日
//通过Pattern获得Matcher
birthDateMather
=
birthDatePattern
.
matcher
(
idNum
);
}
//通过Matcher获得用户的出生年月日
if
(
null
!=
birthDateMather
&&
birthDateMather
.
find
()){
if
(
idNum
.
length
()==
18
){
year
=
birthDateMather
.
group
(
1
);
}
else
if
(
idNum
.
length
()==
15
){
year
=
"19"
+
birthDateMather
.
group
(
1
);
}
String
month
=
birthDateMather
.
group
(
2
);
String
datetemp
=
birthDateMather
.
group
(
3
);
String
dateStr
=
year
+
"-"
+
month
+
"-"
+
datetemp
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
patten
);
try
{
Date
shijian
=
sdf
.
parse
(
dateStr
);
returnDateStr
=
sdf
.
format
(
shijian
);
}
catch
(
ParseException
e
)
{
//数据有误
}
}
}
return
returnDateStr
;
}
/**
/**
* 获取身份证的性别
* 获取身份证的性别
* @Author fxj
* @Author fxj
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TFascTemplateDetailMapper.java
View file @
5ae55522
...
@@ -43,6 +43,8 @@ public interface TFascTemplateDetailMapper extends BaseMapper<TFascTemplateDetai
...
@@ -43,6 +43,8 @@ public interface TFascTemplateDetailMapper extends BaseMapper<TFascTemplateDetai
*/
*/
IPage
<
TFascTemplateDetail
>
getTFascTemplateDetailPage
(
Page
<
TFascTemplateDetail
>
page
,
@Param
(
"tFascTemplateDetail"
)
TFascTemplateDetail
tFascTemplateDetail
);
IPage
<
TFascTemplateDetail
>
getTFascTemplateDetailPage
(
Page
<
TFascTemplateDetail
>
page
,
@Param
(
"tFascTemplateDetail"
)
TFascTemplateDetail
tFascTemplateDetail
);
List
<
TFascTemplateDetail
>
getTDetailListByFieldType
(
@Param
(
"fadadaTemplateId"
)
String
fadadaTemplateId
);
List
<
TFascTemplateDetail
>
getTFascTemplateDetailList
(
@Param
(
"tFascTemplateDetail"
)
TFascTemplateDetail
tFascTemplateDetail
);
List
<
TFascTemplateDetail
>
getTFascTemplateDetailList
(
@Param
(
"tFascTemplateDetail"
)
TFascTemplateDetail
tFascTemplateDetail
);
List
<
TFascTemplateDetailExportVo
>
getTFascTemplateDetailExport
(
@Param
(
"tFascTemplateDetail"
)
TFascTemplateDetailSearchVo
tFascTemplateDetail
,
@Param
(
"idList"
)
List
<
String
>
idList
);
List
<
TFascTemplateDetailExportVo
>
getTFascTemplateDetailExport
(
@Param
(
"tFascTemplateDetail"
)
TFascTemplateDetailSearchVo
tFascTemplateDetail
,
@Param
(
"idList"
)
List
<
String
>
idList
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TFascTemplateDetailService.java
View file @
5ae55522
...
@@ -43,6 +43,8 @@ public interface TFascTemplateDetailService extends IService<TFascTemplateDetail
...
@@ -43,6 +43,8 @@ public interface TFascTemplateDetailService extends IService<TFascTemplateDetail
IPage
<
TFascTemplateDetail
>
getTFascTemplateDetailPage
(
Page
<
TFascTemplateDetail
>
page
,
TFascTemplateDetailSearchVo
tFascTemplateDetail
);
IPage
<
TFascTemplateDetail
>
getTFascTemplateDetailPage
(
Page
<
TFascTemplateDetail
>
page
,
TFascTemplateDetailSearchVo
tFascTemplateDetail
);
// 获取列表
// 获取列表
List
<
TFascTemplateDetail
>
getTDetailListByFieldType
(
String
fadadaTemplateId
);
List
<
TFascTemplateDetail
>
getTFascTemplateDetailList
(
TFascTemplateDetail
tFascTemplateDetail
);
List
<
TFascTemplateDetail
>
getTFascTemplateDetailList
(
TFascTemplateDetail
tFascTemplateDetail
);
R
<
List
<
ErrorMessage
>>
batchUpdateFascDetail
(
InputStream
inputStream
);
R
<
List
<
ErrorMessage
>>
batchUpdateFascDetail
(
InputStream
inputStream
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FascServiceImpl.java
View file @
5ae55522
...
@@ -244,9 +244,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
...
@@ -244,9 +244,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
}
else
if
(!
"valid"
.
equals
(
tFascTemplate
.
getSignTemplateStatus
()))
{
}
else
if
(!
"valid"
.
equals
(
tFascTemplate
.
getSignTemplateStatus
()))
{
return
R
.
failed
(
"法大大模版状态不是“启用”,不可发起电子签署"
);
return
R
.
failed
(
"法大大模版状态不是“启用”,不可发起电子签署"
);
}
}
TFascTemplateDetail
detail
=
new
TFascTemplateDetail
();
List
<
TFascTemplateDetail
>
detailList
=
tFascTemplateDetailService
.
getTDetailListByFieldType
(
contract
.
getFadadaTemplateId
());
detail
.
setSignTemplateId
(
contract
.
getFadadaTemplateId
());
List
<
TFascTemplateDetail
>
detailList
=
tFascTemplateDetailService
.
getTFascTemplateDetailList
(
detail
);
// - 判断是否入职超过1个月——接口入口做了
// - 判断是否入职超过1个月——接口入口做了
TFascCompany
company
=
tFascCompanyService
.
getById
(
tFascTemplate
.
getCompanyId
());
TFascCompany
company
=
tFascCompanyService
.
getById
(
tFascTemplate
.
getCompanyId
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TFascTemplateDetailServiceImpl.java
View file @
5ae55522
...
@@ -85,6 +85,16 @@ public class TFascTemplateDetailServiceImpl extends ServiceImpl<TFascTemplateDet
...
@@ -85,6 +85,16 @@ public class TFascTemplateDetailServiceImpl extends ServiceImpl<TFascTemplateDet
return
baseMapper
.
getTFascTemplateDetailPage
(
page
,
tFascTemplateDetail
);
return
baseMapper
.
getTFascTemplateDetailPage
(
page
,
tFascTemplateDetail
);
}
}
/**
* 法大大专业版模板映射表_发起专用,含格式化映射字段
*
* @param fadadaTemplateId 法大大专业版模板映射表
* @return
*/
@Override
public
List
<
TFascTemplateDetail
>
getTDetailListByFieldType
(
String
fadadaTemplateId
)
{
return
baseMapper
.
getTDetailListByFieldType
(
fadadaTemplateId
);
}
/**
/**
* 法大大专业版模板映射表简单分页查询
* 法大大专业版模板映射表简单分页查询
*
*
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/FascConstants.java
View file @
5ae55522
...
@@ -44,6 +44,8 @@ public interface FascConstants {
...
@@ -44,6 +44,8 @@ public interface FascConstants {
// 需要额外转化的字段:
// 需要额外转化的字段:
String
CONTRACT_DURATION
=
"contractDurationYear-Month"
;
String
CONTRACT_DURATION
=
"contractDurationYear-Month"
;
String
DISPATCH_PERIOD
=
"dispatchPeriodYear-Month"
;
String
DISPATCH_PERIOD
=
"dispatchPeriodYear-Month"
;
String
EMP_SEX
=
"empSex"
;
String
EMP_BIRTHDAY_MONTH
=
"empBirthdayMonth"
;
//String FIELD_TYPE = "text_single_line,text_multi_line,number,id_card,fill_date,multi_radio,multi_checkbox,picture,select_box,table,verification_code,business_code";
//String FIELD_TYPE = "text_single_line,text_multi_line,number,id_card,fill_date,multi_radio,multi_checkbox,picture,select_box,table,verification_code,business_code";
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/FascUtil.java
View file @
5ae55522
...
@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
...
@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TFascPushLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TFascPushLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
@@ -36,6 +37,8 @@ import org.springframework.stereotype.Component;
...
@@ -36,6 +37,8 @@ import org.springframework.stereotype.Component;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.net.HttpURLConnection
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.net.URL
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
...
@@ -57,6 +60,9 @@ public class FascUtil {
...
@@ -57,6 +60,9 @@ public class FascUtil {
@Autowired
@Autowired
//private FascConfig fascConfig;
//private FascConfig fascConfig;
private
static
final
String
DATA_COVER
=
"dataCover"
;
private
static
final
String
DATE_FORMAT
=
"dateFormat"
;
private
static
final
SerializerFeature
[]
features
=
new
SerializerFeature
[]{
private
static
final
SerializerFeature
[]
features
=
new
SerializerFeature
[]{
WriteMapNullValue
,
WriteNullNumberAsZero
,
WriteNullListAsEmpty
,
WriteMapNullValue
,
WriteNullNumberAsZero
,
WriteNullListAsEmpty
,
WriteNullStringAsEmpty
,
WriteDateUseDateFormat
WriteNullStringAsEmpty
,
WriteDateUseDateFormat
...
@@ -424,6 +430,7 @@ public class FascUtil {
...
@@ -424,6 +430,7 @@ public class FascUtil {
tEmployeeContractPreMapper
.
updateById
(
contract
);
tEmployeeContractPreMapper
.
updateById
(
contract
);
}
}
public
static
final
String
YEAR_MONTH_DATE_FORMAT
=
"yyyy年MM月"
;
// 第二步:填写控件
// 第二步:填写控件
private
R
<
String
>
buildDocFieldValue
(
TEmployeeContractPre
contract
,
String
requestId
private
R
<
String
>
buildDocFieldValue
(
TEmployeeContractPre
contract
,
String
requestId
...
@@ -450,8 +457,24 @@ public class FascUtil {
...
@@ -450,8 +457,24 @@ public class FascUtil {
fieldValue
=
contract
.
getContractDurationYear
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
contract
.
getContractDurationMonth
();
fieldValue
=
contract
.
getContractDurationYear
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
contract
.
getContractDurationMonth
();
}
else
if
(
FascConstants
.
DISPATCH_PERIOD
.
equals
(
fieldName
))
{
}
else
if
(
FascConstants
.
DISPATCH_PERIOD
.
equals
(
fieldName
))
{
fieldValue
=
contract
.
getDispatchPeriodYear
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
contract
.
getDispatchPeriodMonth
();
fieldValue
=
contract
.
getDispatchPeriodYear
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
contract
.
getDispatchPeriodMonth
();
}
else
if
(
FascConstants
.
EMP_SEX
.
equals
(
fieldName
))
{
fieldValue
=
""
;
if
(
Common
.
isNotNull
(
contract
.
getEmpIdcard
())
&&
contract
.
getEmpIdcard
().
length
()
>
14
){
String
idCard
=
contract
.
getEmpIdcard
();
fieldValue
=
IdCardUtil
.
getSexName
(
idCard
);
}
}
else
if
(
FascConstants
.
EMP_BIRTHDAY_MONTH
.
equals
(
fieldName
))
{
fieldValue
=
contract
.
getEmpIdcard
();
if
(
Common
.
isNotNull
(
contract
.
getEmpIdcard
())
&&
contract
.
getEmpIdcard
().
length
()
>
14
){
String
idCard
=
contract
.
getEmpIdcard
();
if
(
Common
.
isNotNull
(
detail
.
getFieldValue
()))
{
fieldValue
=
IdCardUtil
.
getBirthdateByPatten
(
idCard
,
detail
.
getFieldValue
());
}
else
{
fieldValue
=
IdCardUtil
.
getBirthdateByPatten
(
idCard
,
YEAR_MONTH_DATE_FORMAT
);
}
}
}
else
{
}
else
{
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
);
fieldValue
=
this
.
getContractFieldValueByReflection
(
contract
,
fieldName
,
detail
.
getFieldType
(),
detail
.
getFieldValue
()
);
}
}
dfv
.
setFieldValue
(
fieldValue
);
dfv
.
setFieldValue
(
fieldValue
);
...
@@ -479,7 +502,7 @@ public class FascUtil {
...
@@ -479,7 +502,7 @@ public class FascUtil {
* @param fieldName 字段名
* @param fieldName 字段名
* @return 字段值
* @return 字段值
*/
*/
private
String
getContractFieldValueByReflection
(
TEmployeeContractPre
contract
,
String
fieldName
)
{
private
String
getContractFieldValueByReflection
(
TEmployeeContractPre
contract
,
String
fieldName
,
String
fieldType
,
String
fieldValue
)
{
if
(
contract
==
null
||
fieldName
==
null
)
{
if
(
contract
==
null
||
fieldName
==
null
)
{
return
null
;
return
null
;
}
}
...
@@ -492,7 +515,7 @@ public class FascUtil {
...
@@ -492,7 +515,7 @@ public class FascUtil {
java
.
lang
.
reflect
.
Method
method
=
contract
.
getClass
().
getMethod
(
getterMethodName
);
java
.
lang
.
reflect
.
Method
method
=
contract
.
getClass
().
getMethod
(
getterMethodName
);
Object
value
=
method
.
invoke
(
contract
);
Object
value
=
method
.
invoke
(
contract
);
String
valueStr
=
String
.
valueOf
(
value
);
String
valueStr
=
String
.
valueOf
(
value
);
valueStr
=
this
.
getCoverValue
(
contract
,
fieldName
,
valueStr
);
valueStr
=
this
.
getCoverValue
(
valueStr
,
fieldType
,
fieldValue
);
return
valueStr
;
return
valueStr
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
// 如果找不到对应的方法,尝试直接匹配字段名
// 如果找不到对应的方法,尝试直接匹配字段名
...
@@ -508,27 +531,68 @@ public class FascUtil {
...
@@ -508,27 +531,68 @@ public class FascUtil {
}
}
// 翻译字典
// 翻译字典
private
String
getCoverValue
(
TEmployeeContractPre
contract
,
String
fieldName
,
String
valueStr
)
throws
NoSuchFieldException
{
private
String
getCoverValue
(
String
valueStr
,
String
fieldType
,
String
fieldValue
)
{
if
(
Common
.
isNotNull
(
valueStr
)
&&
isInteger
(
valueStr
))
{
if
(
Common
.
isNotNull
(
valueStr
)
&&
(
Common
.
isNotNull
(
fieldType
)))
{
java
.
lang
.
reflect
.
Field
field
=
contract
.
getClass
().
getDeclaredField
(
fieldName
);
if
(
DATA_COVER
.
equals
(
fieldType
))
{
field
.
setAccessible
(
true
);
valueStr
=
convertByExp
(
fieldValue
,
valueStr
);
// 检查ExcelAttribute注解
}
else
if
(
DATE_FORMAT
.
equals
(
fieldType
))
{
ExcelAttribute
excelAnnotation
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
valueStr
=
formatStringDate
(
fieldValue
,
valueStr
);
if
(
excelAnnotation
!=
null
&&
excelAnnotation
.
isDataId
())
{
String
converterExp
=
excelAnnotation
.
readConverterExp
();
if
(
converterExp
!=
null
&&
!
converterExp
.
isEmpty
())
{
valueStr
=
convertByExp
(
converterExp
,
valueStr
);
}
}
}
}
}
return
valueStr
;
return
valueStr
;
}
}
public
static
String
formatStringDate
(
String
pattern
,
String
dateValue
)
{
if
(
dateValue
==
null
||
dateValue
.
trim
().
isEmpty
()
||
pattern
==
null
)
{
return
dateValue
;
}
String
trimmedValue
=
dateValue
.
trim
();
try
{
// 尝试解析为java.util.Date
java
.
util
.
Date
date
=
parseDate
(
trimmedValue
);
if
(
date
!=
null
)
{
java
.
text
.
SimpleDateFormat
sdf
=
new
java
.
text
.
SimpleDateFormat
(
pattern
);
return
sdf
.
format
(
date
);
}
}
catch
(
Exception
e
)
{
// 解析失败,返回原字符串
}
return
dateValue
;
}
/**
* 解析字符串为java.util.Date
*/
private
static
java
.
util
.
Date
parseDate
(
String
dateStr
)
{
// 常见日期格式模式
String
[]
patterns
=
{
"yyyy-MM-dd"
,
"yyyy/MM/dd"
,
"yyyy年MM月dd日"
,
"yyyy-MM-dd HH:mm:ss"
,
"yyyy/MM/dd HH:mm:ss"
,
"yyyy-MM-dd HH:mm"
,
"yyyy/MM/dd HH:mm"
};
for
(
String
pattern
:
patterns
)
{
try
{
java
.
text
.
SimpleDateFormat
sdf
=
new
java
.
text
.
SimpleDateFormat
(
pattern
);
sdf
.
setLenient
(
false
);
// 严格模式
return
sdf
.
parse
(
dateStr
);
}
catch
(
Exception
e
)
{
// 继续尝试下一种格式
}
}
return
null
;
}
/**
/**
* 根据转换表达式翻译值
* 根据转换表达式翻译值
*/
*/
private
static
String
convertByExp
(
String
converterExp
,
String
value
)
{
private
static
String
convertByExp
(
String
converterExp
,
String
value
)
{
if
(
converterExp
==
null
||
value
==
null
)
{
if
(
Common
.
isEmpty
(
converterExp
)
||
Common
.
isEmpty
(
value
)
)
{
return
value
;
return
value
;
}
}
String
[]
items
=
converterExp
.
split
(
","
);
String
[]
items
=
converterExp
.
split
(
","
);
...
@@ -542,11 +606,6 @@ public class FascUtil {
...
@@ -542,11 +606,6 @@ public class FascUtil {
return
value
;
// 如果没有找到匹配的,返回原值
return
value
;
// 如果没有找到匹配的,返回原值
}
}
private
boolean
isInteger
(
String
value
)
{
// 允许正负整数,不允许前导0(除了0本身)
return
value
!=
null
&&
value
.
matches
(
"^(-?[1-9]\\d*|0)$"
);
}
// 第三步:提交任务
// 第三步:提交任务
private
R
<
String
>
submitTask
(
String
requestId
,
OpenApiClient
openApiClient
,
String
accessToken
)
throws
ApiException
{
private
R
<
String
>
submitTask
(
String
requestId
,
OpenApiClient
openApiClient
,
String
accessToken
)
throws
ApiException
{
SignTaskClient
signTaskClient
=
new
SignTaskClient
(
openApiClient
);
SignTaskClient
signTaskClient
=
new
SignTaskClient
(
openApiClient
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TFascHrFieldMapper.xml
View file @
5ae55522
...
@@ -28,12 +28,16 @@
...
@@ -28,12 +28,16 @@
<result
property=
"hrField"
column=
"hr_field"
/>
<result
property=
"hrField"
column=
"hr_field"
/>
<result
property=
"hrFieldId"
column=
"hr_field_id"
/>
<result
property=
"hrFieldId"
column=
"hr_field_id"
/>
<result
property=
"contractType"
column=
"contract_type"
/>
<result
property=
"contractType"
column=
"contract_type"
/>
<result
property=
"fieldType"
column=
"field_type"
/>
<result
property=
"fieldValue"
column=
"field_value"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.id,
a.id,
a.hr_field,
a.hr_field,
a.hr_field_id,
a.hr_field_id,
a.contract_type
a.contract_type,
a.field_type,
a.field_value
</sql>
</sql>
<sql
id=
"tFascHrField_where"
>
<sql
id=
"tFascHrField_where"
>
<if
test=
"tFascHrField != null"
>
<if
test=
"tFascHrField != null"
>
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TFascTemplateDetailMapper.xml
View file @
5ae55522
...
@@ -42,6 +42,8 @@
...
@@ -42,6 +42,8 @@
<result
property=
"signTemplateStatus"
column=
"sign_template_status"
/>
<result
property=
"signTemplateStatus"
column=
"sign_template_status"
/>
<result
property=
"contractType"
column=
"contract_type"
/>
<result
property=
"contractType"
column=
"contract_type"
/>
<result
property=
"fascDocId"
column=
"fasc_doc_id"
/>
<result
property=
"fascDocId"
column=
"fasc_doc_id"
/>
<result
property=
"fieldType"
column=
"field_type"
/>
<result
property=
"fieldValue"
column=
"field_value"
/>
</resultMap>
</resultMap>
<resultMap
id=
"tFascTemplateDetailExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TFascTemplateDetailExportVo"
>
<resultMap
id=
"tFascTemplateDetailExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TFascTemplateDetailExportVo"
>
...
@@ -151,11 +153,31 @@
...
@@ -151,11 +153,31 @@
FROM t_fasc_template_detail a
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_template b on a.sign_template_id = b.sign_template_id
<where>
<where>
1=1
b.delete_Flag = '0'
<include
refid=
"tFascTemplateDetail_where"
/>
<include
refid=
"tFascTemplateDetail_where"
/>
</where>
</where>
ORDER BY a.CREATE_TIME ASC
ORDER BY a.CREATE_TIME ASC
</select>
</select>
<!--推送时专用查询,含字段对应格式化-->
<select
id=
"getTDetailListByFieldType"
resultMap=
"tFascTemplateDetailMap"
>
SELECT
a.id,
a.sign_template_id,
a.fasc_doc_id,
a.fasc_field,
a.fasc_field_id,
a.is_must,
a.delete_flag,
a.hr_field,
a.hr_field_id,
a.is_edit,
h.field_type,h.field_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
where b.delete_Flag = '0' and a.hr_field_id is not null and a.sign_template_id = #{fadadaTemplateId}
</select>
<!--tFascTemplateDetail简单分页查询-->
<!--tFascTemplateDetail简单分页查询-->
<select
id=
"getTFascTemplateDetailList"
resultMap=
"tFascTemplateDetailMap"
>
<select
id=
"getTFascTemplateDetailList"
resultMap=
"tFascTemplateDetailMap"
>
SELECT
SELECT
...
@@ -186,7 +208,7 @@
...
@@ -186,7 +208,7 @@
FROM t_fasc_template_detail a
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_template b on a.sign_template_id = b.sign_template_id
<where>
<where>
1=1
b.delete_Flag = '0'
<include
refid=
"tFascTemplateDetail_where"
/>
<include
refid=
"tFascTemplateDetail_where"
/>
<if
test=
"idList != null and idList.size>0"
>
<if
test=
"idList != null and idList.size>0"
>
AND a.id in
AND a.id in
...
@@ -209,7 +231,7 @@
...
@@ -209,7 +231,7 @@
FROM t_fasc_template_detail a
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_template b on a.sign_template_id = b.sign_template_id
<where>
<where>
1=1
b.delete_Flag = '0'
<include
refid=
"tFascTemplateDetail_where"
/>
<include
refid=
"tFascTemplateDetail_where"
/>
<if
test=
"idList != null and idList.size>0"
>
<if
test=
"idList != null and idList.size>0"
>
AND a.id in
AND a.id in
...
...
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