Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
31151e19
You need to sign in or sign up before continuing.
Commit
31151e19
authored
May 19, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.11' into MVP1.7.11
parents
607758c7
d952c028
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1456 additions
and
6 deletions
+1456
-6
pom.xml
yifu-archives/yifu-archives-api/pom.xml
+1
-1
EmployeeRegistrationPre.java
...plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
+10
-0
TAttaInfo.java
...om/yifu/cloud/plus/v1/yifu/archives/entity/TAttaInfo.java
+2
-2
EmployeeRegistrationPreVo.java
...d/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
+4
-0
TAttaInfoSaveVo.java
.../yifu/cloud/plus/v1/yifu/archives/vo/TAttaInfoSaveVo.java
+85
-0
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+58
-0
EmployeeRegistration.java
...m/yifu/cloud/plus/v1/csp/entity/EmployeeRegistration.java
+13
-0
SysConfigLimit.java
...ava/com/yifu/cloud/plus/v1/csp/entity/SysConfigLimit.java
+58
-0
TCspAttaInfo.java
.../java/com/yifu/cloud/plus/v1/csp/entity/TCspAttaInfo.java
+91
-0
TAttaInfoVo.java
.../main/java/com/yifu/cloud/plus/v1/csp/vo/TAttaInfoVo.java
+35
-0
EmployeeRegistrationController.java
...lus/v1/csp/controller/EmployeeRegistrationController.java
+1
-1
FileUploadController.java
...fu/cloud/plus/v1/csp/controller/FileUploadController.java
+136
-0
SysConfigLimitMapper.java
...m/yifu/cloud/plus/v1/csp/mapper/SysConfigLimitMapper.java
+24
-0
TAttaInfoMapper.java
...va/com/yifu/cloud/plus/v1/csp/mapper/TAttaInfoMapper.java
+63
-0
EmployeeRegistrationService.java
...loud/plus/v1/csp/service/EmployeeRegistrationService.java
+2
-0
FileUploadService.java
...com/yifu/cloud/plus/v1/csp/service/FileUploadService.java
+24
-0
TAttaInfoService.java
.../com/yifu/cloud/plus/v1/csp/service/TAttaInfoService.java
+101
-0
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+102
-0
FileUploadServiceImpl.java
...cloud/plus/v1/csp/service/impl/FileUploadServiceImpl.java
+256
-0
TAttaInfoServiceImpl.java
.../cloud/plus/v1/csp/service/impl/TAttaInfoServiceImpl.java
+177
-0
SysConfigLimitMapper.xml
...sp-biz/src/main/resources/mapper/SysConfigLimitMapper.xml
+19
-0
TAttaInfoMapper.xml
...ifu-csp-biz/src/main/resources/mapper/TAttaInfoMapper.xml
+176
-0
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+2
-2
TForecastLibraryController.java
...v1/yifu/social/controller/TForecastLibraryController.java
+8
-0
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+8
-0
No files found.
yifu-archives/yifu-archives-api/pom.xml
View file @
31151e19
...
@@ -42,5 +42,5 @@
...
@@ -42,5 +42,5 @@
<version>
1.0.0
</version>
<version>
1.0.0
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
View file @
31151e19
...
@@ -122,4 +122,14 @@ public class EmployeeRegistrationPre extends BaseEntity {
...
@@ -122,4 +122,14 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
TEmployeeInsurancePre
>
insurancePreList
;
private
List
<
TEmployeeInsurancePre
>
insurancePreList
;
@Schema
(
description
=
"附件集合"
)
@TableField
(
exist
=
false
)
private
List
<
TAttaInfo
>
attaList
;
/**
* 附件Id
*/
@TableField
(
exist
=
false
)
private
List
<
String
>
attaIdList
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TAttaInfo.java
View file @
31151e19
...
@@ -59,11 +59,11 @@ public class TAttaInfo extends BaseEntity {
...
@@ -59,11 +59,11 @@ public class TAttaInfo extends BaseEntity {
/**
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置
* 25 户口本本人页26学信27预入职其他附件28户配置
31入离职登记身份证正面 32入离职登记身份证反面
*/
*/
@NotBlank
(
message
=
"关系类型不能为空"
)
@NotBlank
(
message
=
"关系类型不能为空"
)
@Length
(
max
=
2
,
message
=
"关系类型不能超过2个字符"
)
@Length
(
max
=
2
,
message
=
"关系类型不能超过2个字符"
)
@Schema
(
description
=
"关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置)"
)
@Schema
(
description
=
"关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置
31入离职登记身份证正面 32入离职登记身份证反面
)"
)
private
String
relationType
;
private
String
relationType
;
/**
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
View file @
31151e19
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -123,4 +124,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
...
@@ -123,4 +124,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema
(
description
=
"商险待派单信息集合"
)
@Schema
(
description
=
"商险待派单信息集合"
)
private
List
<
TEmployeeInsurancePreVo
>
employeeInsurancePreVos
;
private
List
<
TEmployeeInsurancePreVo
>
employeeInsurancePreVos
;
@Schema
(
description
=
"附件集合"
)
private
List
<
TAttaInfoSaveVo
>
attaList
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TAttaInfoSaveVo.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
public
class
TAttaInfoSaveVo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 资源名称
*/
@NotBlank
(
message
=
"资源名称不能为空"
)
@Length
(
max
=
50
,
message
=
"资源名称不能超过50个字符"
)
@Schema
(
description
=
"资源名称"
)
private
String
attaName
;
/**
* 资源地址
*/
@NotBlank
(
message
=
"资源地址不能为空"
)
@Length
(
max
=
100
,
message
=
"资源地址不能超过100个字符"
)
@Schema
(
description
=
"资源地址"
)
private
String
attaSrc
;
/**
* 资源大小
*/
@Schema
(
description
=
"资源大小"
)
private
Long
attaSize
;
/**
* 资源类型
*/
@Length
(
max
=
10
,
message
=
"资源类型不能超过10个字符"
)
@Schema
(
description
=
"资源类型"
)
private
String
attaType
;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置 31入离职登记身份证正面 32入离职登记身份证反面
*/
@NotBlank
(
message
=
"关系类型不能为空"
)
@Length
(
max
=
2
,
message
=
"关系类型不能超过2个字符"
)
@Schema
(
description
=
"关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置 31入离职登记身份证正面 32入离职登记身份证反面)"
)
private
String
relationType
;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank
(
message
=
"实体id和关系类型共同确定附件所属不能为空"
)
@Length
(
max
=
32
,
message
=
"实体id和关系类型共同确定附件所属不能超过32个字符"
)
@Schema
(
description
=
"实体id和关系类型共同确定附件所属"
)
private
String
domainId
;
/**
* 地址URL
*/
@Length
(
max
=
100
,
message
=
"地址URL不能超过100个字符"
)
@Schema
(
description
=
"地址URL"
)
@TableField
(
exist
=
false
)
private
String
attaUrl
;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
private
String
handleType
;
/**
* 其他分租名称
*/
private
String
groupName
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
31151e19
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -49,6 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
...
@@ -49,6 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
...
@@ -73,6 +75,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -73,6 +75,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired
@Autowired
private
CspDaprUtils
cspDaprUtils
;
private
CspDaprUtils
cspDaprUtils
;
@Autowired
private
OSSUtil
ossUtil
;
private
final
TEmployeePreLogService
tEmployeePreLogService
;
private
final
TEmployeePreLogService
tEmployeePreLogService
;
private
final
TCompleteMonitorMapper
completeMonitorMapper
;
private
final
TCompleteMonitorMapper
completeMonitorMapper
;
...
@@ -87,6 +92,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -87,6 +92,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private
final
MenuUtil
menuUtil
;
private
final
MenuUtil
menuUtil
;
private
final
TAttaInfoService
attaInfoService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
ScheduleService
scheduleService
;
private
ScheduleService
scheduleService
;
...
@@ -250,8 +257,26 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -250,8 +257,26 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
Common
.
isNotNull
(
preExit
))
{
if
(
Common
.
isNotNull
(
preExit
))
{
pre
.
setId
(
preExit
.
getId
());
pre
.
setId
(
preExit
.
getId
());
baseMapper
.
deleteById
(
preExit
);
baseMapper
.
deleteById
(
preExit
);
// 创建更新条件构造器
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapper
.
eq
(
TAttaInfo:
:
getDomainId
,
pre
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的关联ID
attaInfoService
.
update
(
updateWrapper
);
}
}
baseMapper
.
insert
(
pre
);
baseMapper
.
insert
(
pre
);
//附件赋值
if
(
Common
.
isNotNull
(
preVo
.
getAttaList
()))
{
for
(
TAttaInfoSaveVo
attaInfoVo
:
preVo
.
getAttaList
())
{
TAttaInfo
attaInfo
=
new
TAttaInfo
();
BeanUtils
.
copyProperties
(
attaInfoVo
,
attaInfo
);
attaInfo
.
setDomainId
(
pre
.
getId
());
attaInfo
.
setCreateName
(
"确认接收同步"
);
attaInfoService
.
save
(
attaInfo
);
}
}
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
=
new
HashMap
<>();
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
preExit
))
{
if
(
Common
.
isNotNull
(
preExit
))
{
if
(
Common
.
isNotNull
(
preVo
.
getServerItem
())
&&
preVo
.
getServerItem
().
contains
(
"商险"
))
{
if
(
Common
.
isNotNull
(
preVo
.
getServerItem
())
&&
preVo
.
getServerItem
().
contains
(
"商险"
))
{
...
@@ -435,6 +460,27 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -435,6 +460,27 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
Common
.
isEmpty
(
id
))
{
if
(
Common
.
isEmpty
(
id
))
{
return
R
.
failed
(
"请传ID"
);
return
R
.
failed
(
"请传ID"
);
}
}
// 检查附件ID列表是否不为空、更新附件
if
(
Common
.
isNotNull
(
employeeRegistrationPre
.
getAttaIdList
()))
{
// 创建更新条件构造器
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapper
.
eq
(
TAttaInfo:
:
getDomainId
,
employeeRegistrationPre
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的域名ID
attaInfoService
.
update
(
updateWrapper
);
// 遍历员工注册记录中的附件ID列表
TAttaInfo
atta
;
for
(
String
attaId
:
employeeRegistrationPre
.
getAttaIdList
())
{
// 根据ID获取附件信息
atta
=
attaInfoService
.
getById
(
attaId
);
// 更新附件的域名ID为当前员工的注册ID
atta
.
setDomainId
(
employeeRegistrationPre
.
getId
());
// 保存更新后的附件信息
attaInfoService
.
updateById
(
atta
);
}
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)
||
Common
.
isEmpty
(
user
.
getId
()))
{
if
(
Common
.
isEmpty
(
user
)
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
@@ -1154,6 +1200,18 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -1154,6 +1200,18 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
pre
.
setInsurancePreList
(
oldList
);
pre
.
setInsurancePreList
(
oldList
);
}
}
// 查询与员工相关的附件信息
List
<
TAttaInfo
>
attaInfo
=
attaInfoService
.
list
(
Wrappers
.<
TAttaInfo
>
query
().
lambda
().
eq
(
TAttaInfo:
:
getDomainId
,
id
));
// 如果附件信息非空,则为每个附件生成可访问的URL,并将其添加到员工注册信息中
if
(
attaInfo
!=
null
&&
!
attaInfo
.
isEmpty
())
{
URL
url
;
for
(
TAttaInfo
a:
attaInfo
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
a
.
getAttaSrc
());
a
.
setAttaUrl
(
url
.
toString
());
}
pre
.
setAttaList
(
attaInfo
);
}
}
}
return
pre
;
return
pre
;
}
}
...
...
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/entity/EmployeeRegistration.java
View file @
31151e19
...
@@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
...
@@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 入离职登记表
* 入离职登记表
...
@@ -108,6 +109,18 @@ public class EmployeeRegistration extends BaseEntity {
...
@@ -108,6 +109,18 @@ public class EmployeeRegistration extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
empProjectId
;
private
String
empProjectId
;
/**
* 附件Id
*/
@TableField
(
exist
=
false
)
private
List
<
String
>
attaIdList
;
/**
* 印章附件
*/
@TableField
(
exist
=
false
)
private
List
<
TCspAttaInfo
>
attaInfoList
;
}
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/entity/SysConfigLimit.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 系统限制配置表
*
* @author huych
* @date 2025-05-16 11:39:57
*/
@Data
@TableName
(
"sys_config_limit"
)
@Schema
(
description
=
"系统限制配置表"
)
public
class
SysConfigLimit
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 限制键
*/
@ExcelAttribute
(
name
=
"限制键"
,
isNotEmpty
=
true
,
errorInfo
=
"限制键不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"限制键不能为空"
)
@Length
(
max
=
32
,
message
=
"限制键不能超过32个字符"
)
@ExcelProperty
(
"限制键"
)
@Schema
(
description
=
"限制键"
)
private
String
configKey
;
/**
* 限制值
*/
@ExcelAttribute
(
name
=
"限制值"
,
isNotEmpty
=
true
,
errorInfo
=
"限制值不能为空"
)
@NotBlank
(
message
=
"限制值不能为空"
)
@ExcelProperty
(
"限制值"
)
@Schema
(
description
=
"限制值"
)
private
Integer
configValue
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
255
)
@Length
(
max
=
255
,
message
=
"备注不能超过255个字符"
)
@ExcelProperty
(
"备注"
)
@Schema
(
description
=
"备注"
)
private
String
remark
;
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/entity/TCspAttaInfo.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author huych
* @Description 附件信息表
* @Date 11:07 2025/5/16
**/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_csp_atta_info"
)
@Tag
(
name
=
"附件信息表"
)
public
class
TCspAttaInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 资源名称
*/
@NotBlank
(
message
=
"资源名称不能为空"
)
@Length
(
max
=
50
,
message
=
"资源名称不能超过50个字符"
)
@Schema
(
description
=
"资源名称"
)
private
String
attaName
;
/**
* 资源地址
*/
@NotBlank
(
message
=
"资源地址不能为空"
)
@Length
(
max
=
100
,
message
=
"资源地址不能超过100个字符"
)
@Schema
(
description
=
"资源地址"
)
private
String
attaSrc
;
/**
* 资源大小
*/
@Schema
(
description
=
"资源大小"
)
private
Long
attaSize
;
/**
* 资源类型
*/
@Length
(
max
=
10
,
message
=
"资源类型不能超过10个字符"
)
@Schema
(
description
=
"资源类型"
)
private
String
attaType
;
/**
* 关系类型(1 入离职登记身份证正面 2.入离职登记身份证反面 3.离职登记)
*/
@NotBlank
(
message
=
"关系类型不能为空"
)
@Length
(
max
=
2
,
message
=
"关系类型不能超过2个字符"
)
@Schema
(
description
=
"关系类型(1 入离职登记身份证正面 2.入离职登记身份证反面 3.离职登记)"
)
private
String
relationType
;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank
(
message
=
"实体id和关系类型共同确定附件所属不能为空"
)
@Length
(
max
=
32
,
message
=
"实体id和关系类型共同确定附件所属不能超过32个字符"
)
@Schema
(
description
=
"实体id和关系类型共同确定附件所属"
)
private
String
domainId
;
/**
* 地址URL
*/
@Length
(
max
=
100
,
message
=
"地址URL不能超过100个字符"
)
@Schema
(
description
=
"地址URL"
)
@TableField
(
exist
=
false
)
private
String
attaUrl
;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
@TableField
(
exist
=
false
)
private
String
handleType
;
/**
* 其他分组名称
*/
@TableField
(
exist
=
false
)
private
String
groupName
;
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/TAttaInfoVo.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
public
class
TAttaInfoVo
extends
TAttaInfo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 其他分租名称
*/
@TableField
(
exist
=
false
)
private
String
groupName
;
/**
* 姓名
*/
@Schema
(
description
=
"姓名"
)
private
String
empName
;
/**
* 身份证
*/
@Schema
(
description
=
"身份证"
)
private
String
empIdcard
;
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
View file @
31151e19
...
@@ -105,7 +105,7 @@ public class EmployeeRegistrationController {
...
@@ -105,7 +105,7 @@ public class EmployeeRegistrationController {
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission(' ')"
)
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission(' ')"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
public
R
<
EmployeeRegistration
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
<
EmployeeRegistration
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
employeeRegistrationService
.
getById
(
id
)
);
return
employeeRegistrationService
.
getDetailInfoById
(
id
);
}
}
/**
/**
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/FileUploadController.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.csp.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.csp.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.util.List
;
/**
* @author huych
* 文件上传接口
*/
@RestController
@RequestMapping
(
"/fileUpload"
)
@Tag
(
name
=
"文件上传接口"
)
@Slf4j
public
class
FileUploadController
{
@Autowired
private
OSSUtil
ossUtil
;
@Autowired
private
TAttaInfoService
tAttaInfoService
;
@Autowired
private
FileUploadService
fileUploadService
;
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation
(
description
=
"OSS文件上传接口"
+
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(1 入离职登记身份证正面 2.入离职登记身份证反面 3.离职登记\", required = true, dataType = \"int\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n"
+
"\t"
)
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", required = false, dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "type", value = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招标信息7业务评估8电子档案)", required = true, dataType = "int", paramType = "form"),
@ApiImplicitParam(name = "domain", value = "实体id(传入就插入对应关系,用于编辑)", required = false, paramType = "form")
})*/
@PostMapping
(
value
=
"/ossUploadFile"
)
public
R
<
T
>
uploadImg
(
@RequestBody
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
)
throws
IOException
{
return
fileUploadService
.
uploadAsso
(
file
,
filePath
,
type
,
domain
,
CommonConstants
.
ZERO_STRING
);
}
/**
* @Author hgw
* @Description 改编自ossUploadFile接口,改变了回传信息——专为预入职微信端使用——忽略了token,其余人慎用
* @Date 13:49 2022/6/17
* @Param relationTypeSub 预入职其他附件的子类型
* @return
**/
@Operation
(
description
=
"OSS文件上传接口"
+
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(1 入离职登记身份证正面 2.入离职登记身份证反面 3.离职登记 \", required = true, dataType = \"int\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n"
+
"\t"
)
@PostMapping
(
value
=
"/uploadFileReturnAtta"
)
public
R
<
T
>
uploadFileReturnAtta
(
@RequestBody
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
{
return
fileUploadService
.
uploadAsso
(
file
,
filePath
,
type
,
domainId
,
CommonConstants
.
ONE_STRING
);
}
/**
* @Author fxj
* @Description
* @Date 13:51 2022/6/17
* @Param
* @return
**/
@Operation
(
description
=
"附件删除"
)
@SysLog
(
"附件删除"
)
@DeleteMapping
(
"/ossFileDelete/{id}"
)
public
R
<
Boolean
>
ossFileDelete
(
@PathVariable
String
id
)
{
try
{
TCspAttaInfo
attaInfo
=
tAttaInfoService
.
getById
(
id
);
if
(
null
==
attaInfo
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
if
(
tAttaInfoService
.
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
attaInfo
.
getAttaSrc
());
return
R
.
ok
(
null
,
"删除成功!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"附件删除异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"附件删除异常!"
);
}
return
R
.
ok
(
null
,
"删除失败!"
);
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
* @param id domainId
**/
@Operation
(
description
=
"附件预览下载地址 type:关系类型(1 入离职登记身份证正面 2.入离职登记身份证反面 3.离职登记"
)
@GetMapping
(
"/ossFileUrl/{id}"
)
public
R
<
List
<
TCspAttaInfo
>>
ossFileUrl
(
@PathVariable
String
id
)
{
List
<
TCspAttaInfo
>
attas
=
tAttaInfoService
.
list
(
Wrappers
.<
TCspAttaInfo
>
query
().
lambda
().
eq
(
TCspAttaInfo:
:
getDomainId
,
id
));
if
(
Common
.
isEmpty
(
attas
))
{
return
new
R
<>(
attas
);
}
for
(
TCspAttaInfo
atta:
attas
){
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
atta
.
setAttaUrl
(
url
.
toString
().
replace
(
"http"
,
"https"
));
}
return
new
R
<>(
attas
);
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/mapper/SysConfigLimitMapper.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.SysConfigLimit
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 系统限制配置表
*
* @author huych
* @date 2025-05-16 11:39:57
*/
@Mapper
public
interface
SysConfigLimitMapper
extends
BaseMapper
<
SysConfigLimit
>
{
/**
* 系统限制配置表简单分页查询
*
* @param configKey 键
* @return
*/
Integer
getSysConfigLimitByKey
(
@Param
(
"configKey"
)
String
configKey
);
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/mapper/TAttaInfoMapper.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.csp.vo.TAttaInfoVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Mapper
public
interface
TAttaInfoMapper
extends
BaseMapper
<
TCspAttaInfo
>
{
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
IPage
<
TCspAttaInfo
>
getTAttaInfoPage
(
Page
<
TCspAttaInfo
>
page
,
@Param
(
"tAttaInfo"
)
TCspAttaInfo
tAttaInfo
);
/**
* @param tAttaInfo
* @Description: 获取list
* @Author: hgw
* @Date: 2021/5/28 16:02
* @return: java.util.List<com.yifu.cloud.v1.crm.api.entity.TAttaInfo>
**/
List
<
TCspAttaInfo
>
getTAttaInfoList
(
@Param
(
"tAttaInfo"
)
TCspAttaInfo
tAttaInfo
);
List
<
TCspAttaInfo
>
getTAttaInfoListByDoMainId
(
@Param
(
"domainId"
)
String
domainId
);
List
<
TCspAttaInfo
>
getKeenAtta
(
@Param
(
"dayStart"
)
LocalDateTime
dayStart
,
@Param
(
"values"
)
Collection
<
String
>
values
);
int
updateDomainId
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"ids"
)
List
<
String
>
ids
);
List
<
TCspAttaInfo
>
getAttaByApplyId
(
@Param
(
"applyId"
)
String
applyId
);
void
deleteByDomainId
(
@Param
(
"domainId"
)
String
domainId
);
// 详档变简档,删除身份证、其他附件、签名之外的附件
void
deleteByDomainIdExceptionCard
(
@Param
(
"domainId"
)
String
domainId
);
void
deleteByDomainIdAndType
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"relationType"
)
String
relationType
);
// 删除学历与职业资格之外的附件
void
deleteByDomainIdAndOther
(
@Param
(
"domainId"
)
String
domainId
);
// 简档,仅删除身份证附件和(21(预入职申明签名);22(预入职确认签名);23(预入职pdf文)
void
deleteByDomainIdCard
(
@Param
(
"domainId"
)
String
domainId
);
List
<
TAttaInfoVo
>
getAttInfoByParam
(
@Param
(
"departNo"
)
String
departNo
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
int
getAttInfoCountByParam
(
@Param
(
"departNo"
)
String
departNo
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
View file @
31151e19
...
@@ -169,4 +169,6 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
...
@@ -169,4 +169,6 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
**/
**/
TEmployeeProjectBelongDept
getZeroRegistrationAndUpdateTwo
(
TEmployeeProjectBelongDeptSearchCspVo
searchCspVo
);
TEmployeeProjectBelongDept
getZeroRegistrationAndUpdateTwo
(
TEmployeeProjectBelongDeptSearchCspVo
searchCspVo
);
R
<
EmployeeRegistration
>
getDetailInfoById
(
String
id
);
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/FileUploadService.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
service
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
/**
* 文件上传
*
* @author huych
* @date 2025-05-16 11:16:07
*/
public
interface
FileUploadService
{
R
<
FileVo
>
uploadImg
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
)
throws
IOException
;
R
<
TCspAttaInfo
>
uploadFileReturnAtta
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
;
R
<
T
>
uploadAsso
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
);
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/TAttaInfoService.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.csp.vo.TAttaInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 附件信息表
*
* @author huych
* @date 2025-05-16 11:16:07
*/
public
interface
TAttaInfoService
extends
IService
<
TCspAttaInfo
>
{
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
IPage
<
TCspAttaInfo
>
getTAttaInfoPage
(
Page
<
TCspAttaInfo
>
page
,
TCspAttaInfo
tAttaInfo
);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
List
<
TCspAttaInfo
>
getTAttaInfoList
(
TCspAttaInfo
tAttaInfo
);
/**
* @param domainId 关联id
* @Description: 根据domainId获取附件
* @Author: hgw
* @Date: 2024/6/17 18:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>
**/
List
<
TCspAttaInfo
>
getTAttaInfoListByDoMainId
(
String
domainId
);
TCspAttaInfo
add
(
TCspAttaInfo
attaInfo
);
void
update
(
List
<
TCspAttaInfo
>
attaList
,
String
domainId
,
String
relationType
);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
Boolean
batchOssFileDelete
(
List
<
TCspAttaInfo
>
delAttaList
);
List
<
TCspAttaInfo
>
getKeenAtta
(
LocalDateTime
dayStart
,
Collection
<
String
>
values
);
Boolean
updateDomainId
(
String
domainId
,
List
<
String
>
ids
);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R
<
List
<
TCspAttaInfo
>>
getAttaByApplyId
(
String
applyId
);
/**
* @param domainId 关联id
* @Description: 删除附件
* @Author: hgw
* @Date: 2024/6/20 14:50
* @return: void
**/
void
deleteByDomainId
(
String
domainId
);
/**
* @Description: 详档变简档,删除身份证、其他附件、签名之外的附件
* @Author: hgw
* @Date: 2025/3/21 17:06
* @return: void
**/
void
deleteByDomainIdExceptionCard
(
String
domainId
);
void
deleteByDomainIdAndOther
(
String
domainId
);
// 简档,仅删除身份证附件和(21(预入职申明签名);22(预入职确认签名);23(预入职pdf文)
void
deleteByDomainIdCard
(
String
domainId
);
void
deleteByDomainIdAndType
(
String
domainId
,
int
relationType
);
List
<
TAttaInfoVo
>
getAttInfoByParam
(
String
departNo
,
String
startDate
,
String
endDate
);
int
getAttInfoCountByParam
(
String
departNo
,
String
startDate
,
String
endDate
);
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
31151e19
...
@@ -16,9 +16,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -16,9 +16,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.csp.config.WxConfig
;
import
com.yifu.cloud.plus.v1.csp.config.WxConfig
;
import
com.yifu.cloud.plus.v1.csp.constants.RegistConstants
;
import
com.yifu.cloud.plus.v1.csp.constants.RegistConstants
;
import
com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration
;
import
com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.csp.entity.TOperationLog
;
import
com.yifu.cloud.plus.v1.csp.entity.TOperationLog
;
import
com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationMapper
;
import
com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationMapper
;
import
com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService
;
import
com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService
;
import
com.yifu.cloud.plus.v1.csp.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.csp.service.TOperationLogService
;
import
com.yifu.cloud.plus.v1.csp.service.TOperationLogService
;
import
com.yifu.cloud.plus.v1.csp.vo.*
;
import
com.yifu.cloud.plus.v1.csp.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
...
@@ -44,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo;
...
@@ -44,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -52,6 +55,7 @@ import org.springframework.web.client.RestTemplate;
...
@@ -52,6 +55,7 @@ import org.springframework.web.client.RestTemplate;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -93,6 +97,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -93,6 +97,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
@Autowired
@Autowired
private
InsuranceDaprUtil
insuranceDaprUtil
;
private
InsuranceDaprUtil
insuranceDaprUtil
;
@Autowired
private
OSSUtil
ossUtil
;
@Autowired
private
final
CheckDaprUtil
checkDaprUtil
;
private
final
TAttaInfoService
tAttaInfoService
;
private
final
TOperationLogService
logService
;
private
final
TOperationLogService
logService
;
/**
/**
...
@@ -777,6 +789,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -777,6 +789,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
// 1.9.8: 赋值【最新的客服名称】
// 1.9.8: 赋值【最新的客服名称】
registration
.
setCustomerUsernameNew
(
registration
.
getCustomerUsername
());
registration
.
setCustomerUsernameNew
(
registration
.
getCustomerUsername
());
baseMapper
.
insert
(
registration
);
baseMapper
.
insert
(
registration
);
//更新附件
updateFileId
(
registration
);
}
}
//企业微信消息提醒
//企业微信消息提醒
sendMessageToWx
(
registration
,
registration
.
getFeedbackType
());
sendMessageToWx
(
registration
,
registration
.
getFeedbackType
());
...
@@ -939,6 +953,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -939,6 +953,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(!
ValidityUtil
.
validateEmpPhone
(
registration
.
getEmpPhone
()))
{
if
(!
ValidityUtil
.
validateEmpPhone
(
registration
.
getEmpPhone
()))
{
return
RegistConstants
.
PHONE_FORMAT_ERROR
;
return
RegistConstants
.
PHONE_FORMAT_ERROR
;
}
}
//姓名、身份证+手机号真实性校验
R
<
Boolean
>
checkRes
=
checkDaprUtil
.
checkIdCardAndMobile
(
registration
.
getEmployeeName
(),
registration
.
getEmpIdcard
(),
registration
.
getEmpPhone
());
if
(
Common
.
isEmpty
(
checkRes
)
||
checkRes
.
getCode
()
!=
CommonConstants
.
SUCCESS
){
return
checkRes
.
getMsg
();
}
EmployeeRegistration
exit
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistration
>
query
().
lambda
()
EmployeeRegistration
exit
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistration
>
query
().
lambda
()
.
eq
(
EmployeeRegistration:
:
getEmpIdcard
,
registration
.
getEmpIdcard
())
.
eq
(
EmployeeRegistration:
:
getEmpIdcard
,
registration
.
getEmpIdcard
())
.
eq
(
EmployeeRegistration:
:
getDeptNo
,
registration
.
getDeptNo
())
.
eq
(
EmployeeRegistration:
:
getDeptNo
,
registration
.
getDeptNo
())
...
@@ -1100,6 +1120,37 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -1100,6 +1120,37 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
}
}
/**
* 根据ID获取员工注册的详细信息
* 此方法首先通过ID从数据库中获取员工注册信息,然后查询与该员工相关的附件信息,
* 并为每个附件生成可访问的URL,最后将这些信息一起封装返回
* @Author: huych
* @param id 员工注册信息的唯一标识符
* @return 返回一个封装了员工注册详细信息的结果对象,包括附件信息
*/
@Override
public
R
<
EmployeeRegistration
>
getDetailInfoById
(
String
id
)
{
// 根据ID从数据库中获取员工注册信息
EmployeeRegistration
employeeRegistration
=
baseMapper
.
selectById
(
id
);
// 如果员工注册信息为空,则返回失败结果
if
(
Common
.
isEmpty
(
employeeRegistration
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
// 查询与员工相关的附件信息
List
<
TCspAttaInfo
>
attaInfo
=
tAttaInfoService
.
list
(
Wrappers
.<
TCspAttaInfo
>
query
().
lambda
().
eq
(
TCspAttaInfo:
:
getDomainId
,
id
));
// 如果附件信息非空,则为每个附件生成可访问的URL,并将其添加到员工注册信息中
if
(
attaInfo
!=
null
&&
!
attaInfo
.
isEmpty
())
{
URL
url
;
for
(
TCspAttaInfo
a:
attaInfo
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
a
.
getAttaSrc
());
a
.
setAttaUrl
(
url
.
toString
());
}
employeeRegistration
.
setAttaInfoList
(
attaInfo
);
}
// 返回封装了员工注册详细信息的成功结果
return
R
.
ok
(
employeeRegistration
);
}
/**
/**
* @Description: 批量处理日志
* @Description: 批量处理日志
* @Author: hgw
* @Author: hgw
...
@@ -1227,6 +1278,24 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -1227,6 +1278,24 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
registration
.
getJoinLeaveDate
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" "
+
preVo
.
getPushDate
(),
DateUtil
.
DATETIME_PATTERN_MINUTE
));
registration
.
getJoinLeaveDate
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" "
+
preVo
.
getPushDate
(),
DateUtil
.
DATETIME_PATTERN_MINUTE
));
}
}
//附件赋值
List
<
TCspAttaInfo
>
attaInfoList
=
tAttaInfoService
.
list
(
Wrappers
.<
TCspAttaInfo
>
query
().
lambda
().
eq
(
TCspAttaInfo:
:
getDomainId
,
registration
.
getId
()));
if
(
attaInfoList
!=
null
&&
!
attaInfoList
.
isEmpty
())
{
List
<
TAttaInfoSaveVo
>
attaInfos
=
new
ArrayList
<>();
for
(
TCspAttaInfo
cspAttaInfo
:
attaInfoList
)
{
TAttaInfoSaveVo
attaInfo
=
new
TAttaInfoSaveVo
();
BeanUtils
.
copyProperties
(
cspAttaInfo
,
attaInfo
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
cspAttaInfo
.
getRelationType
()))
{
attaInfo
.
setRelationType
(
"30"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
cspAttaInfo
.
getRelationType
()))
{
attaInfo
.
setRelationType
(
"31"
);
}
attaInfo
.
setDomainId
(
preVo
.
getId
());
attaInfos
.
add
(
attaInfo
);
}
preVo
.
setAttaList
(
attaInfos
);
}
}
}
//商险待购买数据初始化
//商险待购买数据初始化
...
@@ -1379,4 +1448,37 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -1379,4 +1448,37 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
private
String
isNullToEmpty
(
Object
str
)
{
private
String
isNullToEmpty
(
Object
str
)
{
return
null
==
str
?
""
:
str
.
toString
();
return
null
==
str
?
""
:
str
.
toString
();
}
}
/**
* 更新附件的ID
* 当员工注册时,此方法会更新附件信息表中相关记录的ID
* 首先,它会将所有与当前员工注册记录关联的附件的ID清空
* 然后,对于员工注册记录中的每个附件ID,它会更新附件信息表中对应记录的ID为当前员工的注册ID
* @Author: huych
* @param registration 员工注册对象,包含附件ID列表
*/
private
void
updateFileId
(
EmployeeRegistration
registration
)
{
// 检查附件ID列表是否不为空
if
(
Common
.
isNotNull
(
registration
.
getAttaIdList
()))
{
// 创建更新条件构造器
LambdaUpdateWrapper
<
TCspAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapper
.
eq
(
TCspAttaInfo:
:
getDomainId
,
registration
.
getId
())
.
set
(
TCspAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的域名ID
tAttaInfoService
.
update
(
updateWrapper
);
// 遍历员工注册记录中的附件ID列表
TCspAttaInfo
atta
;
for
(
String
id
:
registration
.
getAttaIdList
())
{
// 根据ID获取附件信息
atta
=
tAttaInfoService
.
getById
(
id
);
// 更新附件的域名ID为当前员工的注册ID
atta
.
setDomainId
(
registration
.
getId
());
// 保存更新后的附件信息
tAttaInfoService
.
updateById
(
atta
);
}
}
}
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/FileUploadServiceImpl.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
service
.
impl
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.csp.mapper.SysConfigLimitMapper
;
import
com.yifu.cloud.plus.v1.csp.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.csp.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.AuthorityUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
@Service
@RequiredArgsConstructor
@Slf4j
public
class
FileUploadServiceImpl
implements
FileUploadService
{
private
final
OSSUtil
ossUtil
;
private
final
TAttaInfoService
tAttaInfoService
;
private
AtomicInteger
atomicInteger
=
new
AtomicInteger
(
0
);
//初始化附件上传队列上限值
private
int
maxLimit
=
1
;
private
final
SysConfigLimitMapper
configLimitMapper
;
@Override
public
R
<
TCspAttaInfo
>
uploadFileReturnAtta
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
{
if
(
null
==
file
)
{
return
R
.
failed
(
"文件删除异常,请重新上传!"
);
}
String
fileName
=
file
.
getOriginalFilename
();
if
(
fileName
==
null
||
Common
.
isEmpty
(
fileName
))
{
return
R
.
failed
(
"文件名不能为空!!"
);
}
if
(
fileName
.
length
()
>
100
)
{
return
R
.
failed
(
"文件名不能超过100个字符!"
);
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
""
;
if
(
Common
.
isNotNull
(
filePath
))
{
key
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
fileName
;
}
else
{
key
=
System
.
currentTimeMillis
()
+
fileName
;
}
if
(!
Common
.
checkFile
(
key
))
{
return
R
.
failed
(
"非法上传类型:"
+
fileName
);
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
TCspAttaInfo
attaInfo
;
URL
url
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传到存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
attaInfo
=
initUnitAttaForInsert
(
fileName
,
key
,
file
.
getSize
());
attaInfo
.
setRelationType
(
String
.
valueOf
(
type
));
try
{
attaInfo
.
setDomainId
(
domainId
);
Set
<
String
>
dbAuthsSet
=
new
HashSet
<>();
Collection
<?
extends
GrantedAuthority
>
authorities
=
AuthorityUtils
.
createAuthorityList
(
dbAuthsSet
.
toArray
(
new
String
[
0
]));
YifuUser
user
=
new
YifuUser
(
"2"
,
1L
,
""
,
"预入职扫码"
,
"预入职扫码"
,
"0"
,
SecurityConstants
.
BCRYPT
+
"123456"
,
"12345678911"
,
true
,
true
,
true
,
true
,
"1"
,
authorities
,
"1"
,
null
,
null
,
null
,
null
);
attaInfo
.
setCreateBy
(
user
.
getId
());
attaInfo
.
setCreateName
(
user
.
getNickname
());
attaInfo
=
tAttaInfoService
.
add
(
attaInfo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"上传异常:"
+
e
.
getMessage
());
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
attaInfo
.
setAttaUrl
(
String
.
valueOf
(
url
));
return
R
.
ok
(
attaInfo
);
}
else
{
return
R
.
failed
(
"fail:上传异常"
);
}
}
@Override
public
R
<
FileVo
>
uploadImg
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
)
throws
IOException
{
if
(
null
==
file
)
{
return
R
.
failed
(
"文件删除异常,请重新上传!"
);
}
String
fileName
=
file
.
getOriginalFilename
();
if
(
Common
.
isEmpty
(
fileName
))
{
return
R
.
failed
(
"文件名不能为空!"
);
}
if
(
fileName
.
length
()
>
100
)
{
return
R
.
failed
(
"文件名不能超过100个字符!"
);
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
""
;
if
(
Common
.
isNotNull
(
filePath
))
{
key
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
fileName
;
}
else
{
key
=
System
.
currentTimeMillis
()
+
fileName
;
}
if
(!
Common
.
checkFile
(
key
))
{
return
R
.
failed
(
"非法上传类型!"
);
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
FileVo
fileVo
;
TCspAttaInfo
attaInfo
;
URL
url
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
attaInfo
=
initUnitAttaForInsert
(
fileName
,
key
,
file
.
getSize
());
attaInfo
.
setRelationType
(
String
.
valueOf
(
type
));
try
{
attaInfo
.
setDomainId
(
domain
);
attaInfo
=
tAttaInfoService
.
add
(
attaInfo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"fail:"
+
e
.
getMessage
());
}
//有实体id则插入关系,用于编辑
if
(
Common
.
isNotNull
(
domain
))
{
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
else
{
return
R
.
failed
(
"fail:上传失败"
);
}
}
private
R
<
FileVo
>
uploadImg2
(
InputStream
fileIn
,
String
filePath
,
Integer
type
,
String
domain
,
String
fileName
)
throws
IOException
{
if
(
null
==
fileIn
)
{
return
R
.
failed
(
"文件上传异常,请重新上传!"
);
}
if
(
Common
.
isEmpty
(
fileName
))
{
return
R
.
failed
(
"文件名不能为空!"
);
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
System
.
currentTimeMillis
()
+
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
fileIn
,
key
,
null
);
FileVo
fileVo
;
TCspAttaInfo
attaInfo
;
URL
url
;
if
(
flag
)
{
attaInfo
=
initUnitAttaForInsert
(
fileName
,
key
,
0
);
attaInfo
.
setRelationType
(
String
.
valueOf
(
type
));
try
{
attaInfo
.
setDomainId
(
domain
);
attaInfo
=
tAttaInfoService
.
add
(
attaInfo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"fail:"
+
e
.
getMessage
());
}
//有实体id则插入关系,用于编辑
if
(
Common
.
isNotNull
(
domain
))
{
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
else
{
return
R
.
failed
(
"fail:上传失败"
);
}
}
/**
* 对象初始化
* @param fileName
* @param key
* @param fileSize
* @return
*/
private
TCspAttaInfo
initUnitAttaForInsert
(
String
fileName
,
String
key
,
long
fileSize
)
{
TCspAttaInfo
unitAtta
=
new
TCspAttaInfo
();
char
slash
=
'/'
;
char
point
=
'.'
;
if
(
fileName
.
lastIndexOf
(
slash
)
>=
0
)
{
unitAtta
.
setAttaName
(
fileName
.
substring
(
fileName
.
lastIndexOf
(
slash
)));
}
else
{
unitAtta
.
setAttaName
(
fileName
);
}
unitAtta
.
setAttaSize
(
fileSize
);
unitAtta
.
setAttaSrc
(
key
);
if
(
key
.
lastIndexOf
(
point
)
>=
0
)
{
unitAtta
.
setAttaType
(
key
.
substring
(
key
.
lastIndexOf
(
point
)));
}
unitAtta
.
setCreateTime
(
LocalDateTime
.
now
());
return
unitAtta
;
}
/**
* @Author fxj
* @Description 整合接口
* @Date 15:24 2024/9/24
* @Param
* @return
**/
@Override
public
R
uploadAsso
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
){
return
getR
(
file
,
filePath
,
type
,
domain
,
uploadType
);
}
public
R
getR
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
)
{
maxLimit
=
configLimitMapper
.
getSysConfigLimitByKey
(
"UPLOAD_MAX_LIMIT"
);
if
(
atomicInteger
.
incrementAndGet
()
<=
maxLimit
){
try
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
uploadType
)){
return
uploadImg
(
file
,
filePath
,
type
,
domain
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
uploadType
)){
return
uploadFileReturnAtta
(
file
,
filePath
,
type
,
domain
);
}
}
catch
(
Exception
e
){
log
.
error
(
"附件上传异常:"
,
e
);
}
finally
{
atomicInteger
.
decrementAndGet
();
}
}
else
{
atomicInteger
.
decrementAndGet
();
log
.
error
(
"超出阈值:"
+
ResultConstants
.
FILE_UPLOADING_DATA
);
return
R
.
failed
(
ResultConstants
.
FILE_UPLOADING_DATA
);
}
return
null
;
}
}
\ No newline at end of file
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/TAttaInfoServiceImpl.java
0 → 100644
View file @
31151e19
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo
;
import
com.yifu.cloud.plus.v1.csp.mapper.TAttaInfoMapper
;
import
com.yifu.cloud.plus.v1.csp.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.csp.vo.TAttaInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Service
public
class
TAttaInfoServiceImpl
extends
ServiceImpl
<
TAttaInfoMapper
,
TCspAttaInfo
>
implements
TAttaInfoService
{
@Autowired
private
OSSUtil
ossUtil
;
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
@Override
public
IPage
<
TCspAttaInfo
>
getTAttaInfoPage
(
Page
<
TCspAttaInfo
>
page
,
TCspAttaInfo
tAttaInfo
)
{
return
baseMapper
.
getTAttaInfoPage
(
page
,
tAttaInfo
);
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public
List
<
TCspAttaInfo
>
getTAttaInfoList
(
TCspAttaInfo
tAttaInfo
)
{
return
baseMapper
.
getTAttaInfoList
(
tAttaInfo
);
}
@Override
public
List
<
TCspAttaInfo
>
getTAttaInfoListByDoMainId
(
String
domainId
)
{
return
baseMapper
.
getTAttaInfoListByDoMainId
(
domainId
);
}
@Override
public
TCspAttaInfo
add
(
TCspAttaInfo
attaInfo
)
{
this
.
save
(
attaInfo
);
return
attaInfo
;
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public
void
update
(
List
<
TCspAttaInfo
>
attaInfoList
,
String
domainId
,
String
relationType
)
{
if
(
attaInfoList
!=
null
)
{
for
(
TCspAttaInfo
attaInfo
:
attaInfoList
)
{
attaInfo
.
setDomainId
(
domainId
);
attaInfo
.
setRelationType
(
relationType
);
this
.
updateById
(
attaInfo
);
}
}
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public
Boolean
batchOssFileDelete
(
List
<
TCspAttaInfo
>
delAttaList
)
{
try
{
for
(
TCspAttaInfo
delAtta
:
delAttaList
)
{
if
(
this
.
removeById
(
delAtta
.
getId
()))
{
ossUtil
.
deleteObject
(
null
,
delAtta
.
getAttaSrc
());
}
}
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"附件删除异常:"
+
e
.
getMessage
());
return
false
;
}
}
@Override
public
List
<
TCspAttaInfo
>
getKeenAtta
(
LocalDateTime
dayStart
,
Collection
<
String
>
values
)
{
return
baseMapper
.
getKeenAtta
(
dayStart
,
values
);
}
@Override
public
Boolean
updateDomainId
(
String
domainId
,
List
<
String
>
ids
){
if
(
Common
.
isEmpty
(
domainId
)
||
!
Common
.
isNotEmpty
(
ids
)){
return
false
;
}
return
baseMapper
.
updateDomainId
(
domainId
,
ids
)
>
0
;
}
@Override
public
R
<
List
<
TCspAttaInfo
>>
getAttaByApplyId
(
String
applyId
)
{
List
<
TCspAttaInfo
>
list
=
baseMapper
.
getAttaByApplyId
(
applyId
);
if
(
Common
.
isNotNull
(
list
))
{
URL
url
;
for
(
TCspAttaInfo
atta:
list
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
atta
.
setAttaUrl
(
url
.
toString
());
}
return
R
.
ok
(
list
);
}
else
{
return
R
.
failed
(
"没有附件"
);
}
}
@Override
public
void
deleteByDomainId
(
String
domainId
)
{
baseMapper
.
deleteByDomainId
(
domainId
);
}
@Override
public
void
deleteByDomainIdExceptionCard
(
String
domainId
)
{
baseMapper
.
deleteByDomainIdExceptionCard
(
domainId
);
}
@Override
public
void
deleteByDomainIdAndOther
(
String
domainId
)
{
baseMapper
.
deleteByDomainIdAndOther
(
domainId
);
}
@Override
public
void
deleteByDomainIdCard
(
String
domainId
)
{
baseMapper
.
deleteByDomainIdCard
(
domainId
);
}
@Override
public
void
deleteByDomainIdAndType
(
String
domainId
,
int
relationType
)
{
// 学历
if
(
relationType
==
0
)
{
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"0"
);
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"26"
);
}
else
if
(
relationType
==
1
)
{
// 执业资格证书
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"2"
);
}
else
if
(
relationType
==
2
)
{
// 其他附件
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"27"
);
}
}
@Override
public
List
<
TAttaInfoVo
>
getAttInfoByParam
(
String
departNo
,
String
startDate
,
String
endDate
)
{
return
baseMapper
.
getAttInfoByParam
(
departNo
,
startDate
,
endDate
);
}
@Override
public
int
getAttInfoCountByParam
(
String
departNo
,
String
startDate
,
String
endDate
)
{
return
baseMapper
.
getAttInfoCountByParam
(
departNo
,
startDate
,
endDate
);
}
}
yifu-csp/yifu-csp-biz/src/main/resources/mapper/SysConfigLimitMapper.xml
0 → 100644
View file @
31151e19
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.csp.mapper.SysConfigLimitMapper"
>
<resultMap
id=
"sysConfigLimitMap"
type=
"com.yifu.cloud.plus.v1.csp.entity.SysConfigLimit"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"configKey"
column=
"CONFIG_KEY"
/>
<result
property=
"configValue"
column=
"CONFIG_VALUE"
/>
<result
property=
"remark"
column=
"REMARK"
/>
</resultMap>
<!-- 根据key获取value -->
<select
id=
"getSysConfigLimitByKey"
resultType=
"java.lang.Integer"
>
SELECT a.CONFIG_VALUE
FROM sys_config_limit a
where a.CONFIG_KEY = #{configKey} limit 1
</select>
</mapper>
yifu-csp/yifu-csp-biz/src/main/resources/mapper/TAttaInfoMapper.xml
0 → 100644
View file @
31151e19
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.csp.mapper.TAttaInfoMapper"
>
<resultMap
id=
"tAttaInfoMap"
type=
"com.yifu.cloud.plus.v1.csp.entity.TCspAttaInfo"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"attaName"
column=
"atta_name"
/>
<result
property=
"attaSrc"
column=
"atta_src"
/>
<result
property=
"attaSize"
column=
"atta_size"
/>
<result
property=
"attaType"
column=
"atta_type"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"relationType"
column=
"relation_type"
/>
<result
property=
"domainId"
column=
"domain_id"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.atta_name,
a.atta_src,
a.atta_size,
a.atta_type,
a.create_by,
a.create_time,
a.relation_type,
a.domain_id
</sql>
<sql
id=
"tAttaInfo_where"
>
<if
test=
"tAttaInfo != null"
>
<if
test=
"tAttaInfo.id != null and tAttaInfo.id.trim() != ''"
>
AND a.id = #{tAttaInfo.id}
</if>
<if
test=
"tAttaInfo.attaName != null and tAttaInfo.attaName.trim() != ''"
>
AND a.atta_name = #{tAttaInfo.attaName}
</if>
<if
test=
"tAttaInfo.attaSrc != null and tAttaInfo.attaSrc.trim() != ''"
>
AND a.atta_src = #{tAttaInfo.attaSrc}
</if>
<if
test=
"tAttaInfo.attaSize != null"
>
AND a.atta_size = #{tAttaInfo.attaSize}
</if>
<if
test=
"tAttaInfo.attaType != null and tAttaInfo.attaType.trim() != ''"
>
AND a.atta_type = #{tAttaInfo.attaType}
</if>
<if
test=
"tAttaInfo.createBy != null and tAttaInfo.createBy.trim() != ''"
>
AND a.create_by = #{tAttaInfo.createBy}
</if>
<if
test=
"tAttaInfo.createTime != null"
>
AND a.create_time = #{tAttaInfo.createTime}
</if>
<if
test=
"tAttaInfo.relationType != null and tAttaInfo.relationType.trim() != ''"
>
AND a.relation_type = #{tAttaInfo.relationType}
</if>
<if
test=
"tAttaInfo.domainId != null and tAttaInfo.domainId.trim() != ''"
>
AND a.domain_id = #{tAttaInfo.domainId}
</if>
</if>
</sql>
<!--tAttaInfo简单分页查询-->
<select
id=
"getTAttaInfoPage"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
<where>
1=1
<include
refid=
"tAttaInfo_where"
/>
</where>
</select>
<!--tAttaInfo 获取list-->
<select
id=
"getTAttaInfoList"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
<where>
1=1
<include
refid=
"tAttaInfo_where"
/>
</where>
</select>
<!--根据domainId 获取list-->
<select
id=
"getTAttaInfoListByDoMainId"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
where a.domain_id = #{domainId}
</select>
<select
id=
"getKeenAtta"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
<where>
1=1
<if
test=
"values != null and values.size() > 0"
>
and a.domain_id in
<foreach
collection=
"values"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
and a.create_time >= #{dayStart}
and a.relation_type in ("3","4")
</where>
</select>
<update
id=
"updateDomainId"
>
update t_atta_info
<trim
prefix=
"set"
suffixOverrides=
","
>
domain_id=#{domainId}
</trim>
WHERE
<if
test=
"ids != null and ids.size() > 0"
>
id in
<foreach
collection=
"ids"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</update>
<select
id=
"getAttaByApplyId"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
where EXISTS (select 1 from m_salary_prova_atta b where b.SALARY_PROVA_ID = #{applyId} and a.id = b.ATTA_ID);
</select>
<delete
id=
"deleteByDomainId"
>
delete from t_atta_info where domain_id=#{domainId}
</delete>
<!-- 详档变简档,删除身份证、其他附件、签名之外的附件 -->
<delete
id=
"deleteByDomainIdExceptionCard"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('9','24','27','21','22')
</delete>
<delete
id=
"deleteByDomainIdAndType"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type = #{relationType}
</delete>
<delete
id=
"deleteByDomainIdAndOther"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('0','2','26','27')
</delete>
<!-- 简档,仅删除身份证附件和(21(预入职申明签名);22(预入职确认签名);23(预入职pdf文) -->
<delete
id=
"deleteByDomainIdCard"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type in ('9','24','21','22','23')
</delete>
<select
id=
"getAttInfoByParam"
resultType=
"com.yifu.cloud.plus.v1.csp.vo.TAttaInfoVo"
>
SELECT
b.id,
b.atta_name,
b.atta_src,
b.atta_size,
b.atta_type,
b.create_by,
b.create_time,
b.relation_type,
b.domain_id, a.EMP_NAME,a.EMP_IDCARD
from (select id,EMP_NAME,EMP_IDCARD from t_pre_emp_main where `STATUS`='4' and SOUR_TYPE='0'
and DEPT_NO=#{departNo}
and AUDIT_TIME >= #{startDate}
and AUDIT_TIME
<![CDATA[ <= ]]>
#{endDate}) a
LEFT JOIN (select * from t_atta_info where RELATION_TYPE ='23' GROUP BY DOMAIN_ID ) b on a.id=b.DOMAIN_ID
where b.DOMAIN_ID is not null
</select>
<select
id=
"getAttInfoCountByParam"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from (select id from t_pre_emp_main where `STATUS`='4' and SOUR_TYPE='0'
and DEPT_NO = #{departNo}
and AUDIT_TIME >= #{startDate}
and AUDIT_TIME
<![CDATA[ <= ]]>
#{endDate}) a
LEFT JOIN (select * from t_atta_info where RELATION_TYPE ='23' GROUP BY DOMAIN_ID ) b on a.id=b.DOMAIN_ID
where b.DOMAIN_ID is not null
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
31151e19
...
@@ -295,7 +295,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
...
@@ -295,7 +295,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
int
batchSize
=
CommonConstants
.
EXCEL_EXPORT_LIMIT_1
;
int
batchSize
=
CommonConstants
.
EXCEL_EXPORT_LIMIT_1
;
int
totalPages
=
(
int
)
Math
.
ceil
((
double
)
count
/
batchSize
);
int
totalPages
=
(
int
)
Math
.
ceil
((
double
)
count
/
batchSize
);
List
<
SalaryAccountExportVo
>
batchList
;
for
(
int
page
=
1
;
page
<=
totalPages
;
page
++)
{
for
(
int
page
=
1
;
page
<=
totalPages
;
page
++)
{
// 每10万条数据切换一个新sheet,防止单个sheet过大
// 每10万条数据切换一个新sheet,防止单个sheet过大
if
((
page
-
1
)
*
batchSize
%
100000
==
0
&&
(
page
-
1
)
*
batchSize
>
0
)
{
if
((
page
-
1
)
*
batchSize
%
100000
==
0
&&
(
page
-
1
)
*
batchSize
>
0
)
{
...
@@ -307,7 +307,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
...
@@ -307,7 +307,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
searchVo
.
setLimitStart
((
page
-
1
)
*
batchSize
);
searchVo
.
setLimitStart
((
page
-
1
)
*
batchSize
);
searchVo
.
setLimitEnd
(
batchSize
);
searchVo
.
setLimitEnd
(
batchSize
);
List
<
SalaryAccountExportVo
>
batchList
=
baseMapper
.
noPageDiyLastNew
(
searchVo
,
searchVo
.
getIdList
(),
deptNos
);
batchList
=
baseMapper
.
noPageDiyLastNew
(
searchVo
,
searchVo
.
getIdList
(),
deptNos
);
if
(
Common
.
isNotNull
(
batchList
))
{
if
(
Common
.
isNotNull
(
batchList
))
{
excelWriter
.
write
(
batchList
,
writeSheet
);
excelWriter
.
write
(
batchList
,
writeSheet
);
// 及时清空批次数据
// 及时清空批次数据
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TForecastLibraryController.java
View file @
31151e19
...
@@ -68,6 +68,10 @@ public class TForecastLibraryController {
...
@@ -68,6 +68,10 @@ public class TForecastLibraryController {
@Operation
(
description
=
"简单分页查询"
)
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TForecastLibrary
>>
getTForecastLibraryPage
(
Page
<
TForecastLibrary
>
page
,
TForecastLibrary
tForecastLibrary
)
{
public
R
<
IPage
<
TForecastLibrary
>>
getTForecastLibraryPage
(
Page
<
TForecastLibrary
>
page
,
TForecastLibrary
tForecastLibrary
)
{
//Ekp1.9.11查询条件 社保生成月和公积金生成月必填其一
if
(
Common
.
isEmpty
(
tForecastLibrary
.
getSocialCreateMonth
())
&&
Common
.
isEmpty
(
tForecastLibrary
.
getProvidentCreateMonth
()))
{
return
null
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tForecastLibrary
);
menuUtil
.
setAuthSql
(
user
,
tForecastLibrary
);
if
(
Common
.
isNotNull
(
tForecastLibrary
.
getAuthSql
())
&&
tForecastLibrary
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
if
(
Common
.
isNotNull
(
tForecastLibrary
.
getAuthSql
())
&&
tForecastLibrary
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
...
@@ -140,6 +144,10 @@ public class TForecastLibraryController {
...
@@ -140,6 +144,10 @@ public class TForecastLibraryController {
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('social_tforecastlibrary-export')"
)
@PreAuthorize
(
"@pms.hasPermission('social_tforecastlibrary-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TForecastLibrary
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TForecastLibrary
searchVo
)
{
//Ekp1.9.11查询条件 社保生成月和公积金生成月必填其一
if
(
Common
.
isEmpty
(
searchVo
.
getSocialCreateMonth
())
&&
Common
.
isEmpty
(
searchVo
.
getProvidentCreateMonth
()))
{
return
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
31151e19
...
@@ -70,6 +70,10 @@ public class TIncomeController {
...
@@ -70,6 +70,10 @@ public class TIncomeController {
@Operation
(
description
=
"简单分页查询"
)
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TIncome
>>
getTIncomePage
(
Page
<
TIncome
>
page
,
TIncomeSearchVo
tIncome
)
{
public
R
<
IPage
<
TIncome
>>
getTIncomePage
(
Page
<
TIncome
>
page
,
TIncomeSearchVo
tIncome
)
{
//Ekp1.9.11查询条件 数据生成时间必填
if
(
Common
.
isEmpty
(
tIncome
.
getDataCreateMonth
()))
{
return
null
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tIncome
);
menuUtil
.
setAuthSql
(
user
,
tIncome
);
return
new
R
<>(
tIncomeService
.
getTIncomePage
(
page
,
tIncome
));
return
new
R
<>(
tIncomeService
.
getTIncomePage
(
page
,
tIncome
));
...
@@ -155,6 +159,10 @@ public class TIncomeController {
...
@@ -155,6 +159,10 @@ public class TIncomeController {
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('social_tincome-export')"
)
@PreAuthorize
(
"@pms.hasPermission('social_tincome-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TIncomeSearchVo
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TIncomeSearchVo
searchVo
)
{
//Ekp1.9.11查询条件 数据生成时间必填
if
(
Common
.
isEmpty
(
searchVo
.
getDataCreateMonth
()))
{
return
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
menuUtil
.
setAuthSql
(
user
,
searchVo
);
tIncomeService
.
listExport
(
response
,
searchVo
);
tIncomeService
.
listExport
(
response
,
searchVo
);
...
...
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