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
c7e0a529
Commit
c7e0a529
authored
May 26, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.11' into MVP1.7.11
parents
cc0f4af4
8523dbf4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
81 changed files
with
2669 additions
and
116 deletions
+2669
-116
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
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+12
-0
TSettleDomainMapper.java
...oud/plus/v1/yifu/archives/mapper/TSettleDomainMapper.java
+1
-0
TSettleDomainService.java
...d/plus/v1/yifu/archives/service/TSettleDomainService.java
+1
-0
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+81
-5
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+13
-1
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+5
-0
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+13
-0
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+1
-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
+103
-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
EkpBankAtta.java
...n/java/com/yifu/cloud/plus/v1/ekp/entity/EkpBankAtta.java
+1
-1
FileUploadController.java
...fu/cloud/plus/v1/ekp/controller/FileUploadController.java
+57
-0
IcbcTransactionFlowIssueController.java
...v1/ekp/controller/IcbcTransactionFlowIssueController.java
+11
-4
IcbcTransactionFlowIssueService.java
.../plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
+1
-1
IcbcTransactionFlowIssueServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
+196
-16
icbc
yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc
+39
-0
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+6
-0
InsuranceAutoParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
+5
-0
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+6
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+6
-0
TEmployeeInsurancePreServiceImpl.java
...vice/insurance/impl/TEmployeeInsurancePreServiceImpl.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+63
-42
EkpTask.java
...main/java/com/yifu/cloud/plus/v1/job/compont/EkpTask.java
+12
-1
HcmSalarySearchVo.java
.../yifu/cloud/plus/v1/yifu/salary/vo/HcmSalarySearchVo.java
+23
-0
SalaryUploadParamVo.java
...ifu/cloud/plus/v1/yifu/salary/vo/SalaryUploadParamVo.java
+4
-0
SalaryUploadController.java
...lus/v1/yifu/salary/controller/SalaryUploadController.java
+28
-5
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+14
-0
TSalaryAccountItemMapper.java
.../plus/v1/yifu/salary/mapper/TSalaryAccountItemMapper.java
+3
-0
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+10
-0
SalaryUploadService.java
...loud/plus/v1/yifu/salary/service/SalaryUploadService.java
+5
-0
TSalaryAccountItemService.java
...lus/v1/yifu/salary/service/TSalaryAccountItemService.java
+3
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+2
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+66
-6
TSalaryAccountItemServiceImpl.java
...fu/salary/service/impl/TSalaryAccountItemServiceImpl.java
+18
-0
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+16
-4
TSalaryAccountItemMapper.xml
...iz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
+12
-0
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+14
-2
SysHouseHoldInfo.java
...fu/cloud/plus/v1/yifu/social/entity/SysHouseHoldInfo.java
+10
-1
TSocialFriendBackLog.java
...loud/plus/v1/yifu/social/entity/TSocialFriendBackLog.java
+1
-1
SociaFriendYgsAddVo.java
...ifu/cloud/plus/v1/yifu/social/vo/SociaFriendYgsAddVo.java
+9
-0
pom.xml
yifu-social/yifu-social-biz/pom.xml
+15
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+12
-1
FileUploadController.java
.../plus/v1/yifu/social/controller/FileUploadController.java
+5
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+1
-1
TForecastLibraryController.java
...v1/yifu/social/controller/TForecastLibraryController.java
+8
-0
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+8
-0
TSocialFriendWordController.java
...1/yifu/social/controller/TSocialFriendWordController.java
+96
-0
TDispatchInfoMapper.java
...cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
+9
-0
FileUploadService.java
.../cloud/plus/v1/yifu/social/service/FileUploadService.java
+4
-0
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+4
-2
FileUploadServiceImpl.java
...us/v1/yifu/social/service/impl/FileUploadServiceImpl.java
+24
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+38
-6
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+65
-1
TSocialFriendServiceImpl.java
...v1/yifu/social/service/impl/TSocialFriendServiceImpl.java
+9
-6
DoSocialTask.java
...com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
+5
-2
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+3
-0
WordToImageWithSeal.java
...u/cloud/plus/v1/yifu/social/util/WordToImageWithSeal.java
+110
-0
WordUtil.java
...ava/com/yifu/cloud/plus/v1/yifu/social/util/WordUtil.java
+56
-0
SysHouseHoldInfoMapper.xml
...-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
+6
-1
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+12
-0
TSocialFriendMapper.xml
...ial-biz/src/main/resources/mapper/TSocialFriendMapper.xml
+6
-2
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+18
-0
No files found.
yifu-archives/yifu-archives-api/pom.xml
View file @
c7e0a529
...
...
@@ -42,5 +42,5 @@
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
</project>
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
View file @
c7e0a529
...
...
@@ -122,4 +122,14 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField
(
exist
=
false
)
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 @
c7e0a529
...
...
@@ -59,11 +59,11 @@ public class TAttaInfo extends BaseEntity {
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置
* 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户配置)"
)
@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)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
View file @
c7e0a529
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
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
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -123,4 +124,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema
(
description
=
"商险待派单信息集合"
)
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 @
c7e0a529
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/controller/TSettleDomainController.java
View file @
c7e0a529
...
...
@@ -360,6 +360,18 @@ public class TSettleDomainController {
public
TSettleDomainSelectVo
getSettleDomainVoById
(
@RequestBody
String
id
)
{
return
tSettleDomainService
.
getSettleDomainVoById
(
id
);
}
/**
* @param deptNo 项目主键
* @Description: 通过id获取结算主体及单位部分信息
* @Author: hgw
* @Date: 2022/8/10 17:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping
(
"/inner/getSettleDomainVoByNo"
)
public
TSettleDomainSelectVo
getSettleDomainVoByNo
(
@RequestBody
String
deptNo
)
{
return
tSettleDomainService
.
getSettleDomainVoByNo
(
deptNo
);
}
/**
* @param deptId 结算主体id
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TSettleDomainMapper.java
View file @
c7e0a529
...
...
@@ -74,6 +74,7 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
**/
TSettleDomainSelectVo
getSettleDomainVoById
(
@Param
(
"id"
)
String
id
);
TSettleDomainSelectVo
getSettleDomainVoByNo
(
@Param
(
"deptNo"
)
String
deptNo
);
/**
* 获取所有客户单位的项目信息
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TSettleDomainService.java
View file @
c7e0a529
...
...
@@ -109,6 +109,7 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
TSettleDomainSelectVo
getSettleDomainVoById
(
String
id
);
TSettleDomainSelectVo
getSettleDomainVoByNo
(
String
deptNo
);
/**
* 获取所有客户单位的项目信息
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
c7e0a529
...
...
@@ -3,10 +3,13 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper
;
...
...
@@ -24,11 +27,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.AliSmsResult;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.RegistParamVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
...
...
@@ -49,6 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
...
...
@@ -62,7 +64,7 @@ import java.util.*;
@Log4j2
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties
(
DaprInsurancesProperties
.
class
)
@EnableConfigurationProperties
(
{
DaprInsurancesProperties
.
class
,
DaprCheckProperties
.
class
}
)
public
class
EmployeeRegistrationPreServiceImpl
extends
ServiceImpl
<
EmployeeRegistrationPreMapper
,
EmployeeRegistrationPre
>
implements
EmployeeRegistrationPreService
{
private
final
DaprInsurancesProperties
daprInsurancesProperties
;
...
...
@@ -73,6 +75,12 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired
private
CspDaprUtils
cspDaprUtils
;
@Autowired
private
OSSUtil
ossUtil
;
@Autowired
private
DaprCheckProperties
daprCheckProperties
;
private
final
TEmployeePreLogService
tEmployeePreLogService
;
private
final
TCompleteMonitorMapper
completeMonitorMapper
;
...
...
@@ -87,6 +95,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private
final
MenuUtil
menuUtil
;
private
final
TAttaInfoService
attaInfoService
;
@Autowired
@Lazy
private
ScheduleService
scheduleService
;
...
...
@@ -250,8 +260,26 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
Common
.
isNotNull
(
preExit
))
{
pre
.
setId
(
preExit
.
getId
());
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
);
//附件赋值
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
<>();
if
(
Common
.
isNotNull
(
preExit
))
{
if
(
Common
.
isNotNull
(
preVo
.
getServerItem
())
&&
preVo
.
getServerItem
().
contains
(
"商险"
))
{
...
...
@@ -444,6 +472,42 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
Common
.
isEmpty
(
comparePre
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
//1.9.11 huyc 信息修改手机号真实性校验
if
(
Common
.
isNotNull
(
employeeRegistrationPre
.
getEmpPhone
())
&&
!
employeeRegistrationPre
.
getEmpPhone
().
equals
(
comparePre
.
getEmpPhone
()))
{
//手机号真实性校验
TCheckMobile
checkMobile
=
new
TCheckMobile
();
checkMobile
.
setMobile
(
employeeRegistrationPre
.
getEmpPhone
());
R
<
TCheckMobile
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
(),
"/tcheckmobile/inner/checkOneMobile"
,
JSON
.
toJSONString
(
checkMobile
),
TCheckMobile
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)
||
Common
.
isEmpty
(
res
.
getData
())){
return
R
.
failed
(
"校验手机号码信息失败!"
);
}
TCheckMobile
cm
=
res
.
getData
();
if
(
Common
.
isEmpty
(
cm
.
getStatus
())
||
!
CommonConstants
.
ONE_STRING
.
equals
(
cm
.
getStatus
())){
return
R
.
failed
(
cm
.
getMessage
());
}
}
// 创建更新条件构造器
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapper
.
eq
(
TAttaInfo:
:
getDomainId
,
employeeRegistrationPre
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的域名ID
attaInfoService
.
update
(
updateWrapper
);
// 检查附件ID列表是否不为空、更新附件
if
(
Common
.
isNotNull
(
employeeRegistrationPre
.
getAttaIdList
()))
{
// 遍历员工注册记录中的附件ID列表
TAttaInfo
atta
;
for
(
String
attaId
:
employeeRegistrationPre
.
getAttaIdList
())
{
// 根据ID获取附件信息
atta
=
attaInfoService
.
getById
(
attaId
);
// 更新附件的域名ID为当前员工的注册ID
atta
.
setDomainId
(
employeeRegistrationPre
.
getId
());
// 保存更新后的附件信息
attaInfoService
.
updateById
(
atta
);
}
}
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
=
new
HashMap
<>();
// 查原商险,来对比
...
...
@@ -1154,6 +1218,18 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
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
(
null
!=
url
?
url
.
toString
():
""
);
}
pre
.
setAttaList
(
attaInfo
);
}
}
return
pre
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
c7e0a529
...
...
@@ -169,6 +169,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
public
void
saveModifyAndUpdateInsurance
(
String
empPreId
,
EmployeeRegistrationPre
oldInfo
,
EmployeeRegistrationPre
newInfo
,
YifuUser
user
,
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
)
{
try
{
//1.9.11 huych 附件类型不比较差异
oldInfo
.
setAttaIdList
(
null
);
newInfo
.
setAttaIdList
(
null
);
oldInfo
.
setAttaList
(
null
);
newInfo
.
setAttaList
(
null
);
//比较记录不影响业务逻辑,用try套住
//比较差异
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldInfo
,
newInfo
);
...
...
@@ -298,6 +303,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
public
void
saveUpdateInsurance
(
String
empPreId
,
EmployeeRegistrationPre
oldInfo
,
EmployeeRegistrationPre
newInfo
,
String
userId
,
String
nickName
,
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
)
{
try
{
//1.9.11 huych 附件类型不比较差异
oldInfo
.
setAttaIdList
(
null
);
newInfo
.
setAttaIdList
(
null
);
oldInfo
.
setAttaList
(
null
);
newInfo
.
setAttaList
(
null
);
//比较记录不影响业务逻辑,用try套住
//比较差异
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldInfo
,
newInfo
);
...
...
@@ -309,7 +319,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
List
<
TEmployeePreLogDetail
>
detailList
=
new
ArrayList
<>();
// 档案信息修改
TEmployeePreLogDetail
detailEmpLog
=
null
;
if
(
Common
.
isNotNull
(
differenceKey
)
&&
!
"insurancePreList"
.
equals
(
differenceKey
))
{
if
(
Common
.
isNotNull
(
differenceKey
)
&&
!
"insurancePreList"
.
equals
(
differenceKey
)
&&
!
"attaIdList"
.
equals
(
differenceKey
))
{
differenceKey
=
differenceKey
.
replace
(
"insurancePreList"
,
""
);
diffTitle
=
"档案信息二次确认"
;
detailEmpLog
=
new
TEmployeePreLogDetail
();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
c7e0a529
...
...
@@ -189,6 +189,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return
baseMapper
.
getSettleDomainVoById
(
id
);
}
@Override
public
TSettleDomainSelectVo
getSettleDomainVoByNo
(
String
deptNo
)
{
return
baseMapper
.
getSettleDomainVoByNo
(
deptNo
);
}
@Override
public
List
<
TSettleDomainSelectVo
>
selectAllSettleDomainSelectVos
()
{
return
baseMapper
.
selectAllSettleDomainSelectVos
();
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
c7e0a529
...
...
@@ -357,6 +357,19 @@
WHERE a.id=#{id} GROUP BY a.id
</select>
<select
id=
"getSettleDomainVoByNo"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
a.CUSTOMER_ID AS 'customerId',
a.CUSTOMER_NAME as 'customerName',
a.CUSTOMER_NO as 'customerCode',
a.INVOICE_TITLE_SALARY as 'businessSubjectName'
FROM
t_settle_domain a
WHERE a.DEPART_NO = #{deptNo} GROUP BY a.id
</select>
<select
id=
"getPagePerMission"
resultMap=
"tSettleDomainMap"
>
SELECT
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
c7e0a529
...
...
@@ -84,6 +84,7 @@ public class DateUtil {
*/
public
static
final
String
DATE_PATTERN
=
"yyyyMMddHHmmss"
;
public
static
final
String
EXPORT_PATTERN
=
"yyyyMMdd-HHmmss"
;
public
static
final
String
CHINA_PATTEN_YMD
=
"yyyy年MM月dd日"
;
protected
static
final
float
normalizedJulian
(
float
jd
)
{
...
...
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/entity/EmployeeRegistration.java
View file @
c7e0a529
...
...
@@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
/**
* 入离职登记表
...
...
@@ -108,6 +109,18 @@ public class EmployeeRegistration extends BaseEntity {
@TableField
(
exist
=
false
)
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 @
c7e0a529
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 @
c7e0a529
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 @
c7e0a529
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 @
c7e0a529
...
...
@@ -105,7 +105,7 @@ public class EmployeeRegistrationController {
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission(' ')"
)
@GetMapping
(
"/{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 @
c7e0a529
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 @
c7e0a529
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 @
c7e0a529
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 @
c7e0a529
...
...
@@ -169,4 +169,6 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
**/
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 @
c7e0a529
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 @
c7e0a529
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 @
c7e0a529
...
...
@@ -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.constants.RegistConstants
;
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.mapper.EmployeeRegistrationMapper
;
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.vo.*
;
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;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
...
...
@@ -52,6 +55,7 @@ import org.springframework.web.client.RestTemplate;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.time.LocalDateTime
;
...
...
@@ -93,6 +97,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
@Autowired
private
InsuranceDaprUtil
insuranceDaprUtil
;
@Autowired
private
OSSUtil
ossUtil
;
@Autowired
private
final
CheckDaprUtil
checkDaprUtil
;
private
final
TAttaInfoService
tAttaInfoService
;
private
final
TOperationLogService
logService
;
/**
...
...
@@ -777,6 +789,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
// 1.9.8: 赋值【最新的客服名称】
registration
.
setCustomerUsernameNew
(
registration
.
getCustomerUsername
());
baseMapper
.
insert
(
registration
);
//更新附件
updateFileId
(
registration
);
}
//企业微信消息提醒
sendMessageToWx
(
registration
,
registration
.
getFeedbackType
());
...
...
@@ -939,6 +953,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(!
ValidityUtil
.
validateEmpPhone
(
registration
.
getEmpPhone
()))
{
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
()
.
eq
(
EmployeeRegistration:
:
getEmpIdcard
,
registration
.
getEmpIdcard
())
.
eq
(
EmployeeRegistration:
:
getDeptNo
,
registration
.
getDeptNo
())
...
...
@@ -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: 批量处理日志
* @Author: hgw
...
...
@@ -1227,6 +1278,24 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
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
(
"31"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
cspAttaInfo
.
getRelationType
()))
{
attaInfo
.
setRelationType
(
"32"
);
}
attaInfo
.
setDomainId
(
preVo
.
getId
());
attaInfos
.
add
(
attaInfo
);
}
preVo
.
setAttaList
(
attaInfos
);
}
}
//商险待购买数据初始化
...
...
@@ -1379,4 +1448,38 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
private
String
isNullToEmpty
(
Object
str
)
{
return
null
==
str
?
""
:
str
.
toString
();
}
/**
* 更新附件的ID
* 当员工注册时,此方法会更新附件信息表中相关记录的ID
* 首先,它会将所有与当前员工注册记录关联的附件的ID清空
* 然后,对于员工注册记录中的每个附件ID,它会更新附件信息表中对应记录的ID为当前员工的注册ID
* @Author: huych
* @param registration 员工注册对象,包含附件ID列表
*/
private
void
updateFileId
(
EmployeeRegistration
registration
)
{
// 创建更新条件构造器
LambdaUpdateWrapper
<
TCspAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapper
.
eq
(
TCspAttaInfo:
:
getDomainId
,
registration
.
getId
())
.
set
(
TCspAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的域名ID
tAttaInfoService
.
update
(
updateWrapper
);
// 检查附件ID列表是否不为空
if
(
Common
.
isNotNull
(
registration
.
getAttaIdList
())
&&
!
registration
.
getAttaIdList
().
isEmpty
())
{
// 遍历员工注册记录中的附件ID列表
TCspAttaInfo
atta
;
for
(
String
id
:
registration
.
getAttaIdList
())
{
// 根据ID获取附件信息
atta
=
tAttaInfoService
.
getById
(
id
);
// 更新附件的域名ID为当前员工的注册ID
if
(
Common
.
isNotNull
(
atta
))
{
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 @
c7e0a529
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 @
c7e0a529
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 @
c7e0a529
<?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 @
c7e0a529
<?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-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/entity/EkpBankAtta.java
View file @
c7e0a529
...
...
@@ -91,7 +91,7 @@ public class EkpBankAtta {
@ExcelProperty
(
"链接ID"
)
private
String
fdLinkId
;
/**
* 类型:1:银企付款主表;2:银企付款明细表
* 类型:1:银企付款主表;2:银企付款明细表
3:银企付款回单
*/
@ExcelAttribute
(
name
=
"类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/FileUploadController.java
0 → 100644
View file @
c7e0a529
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpBankAttaService
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.net.URL
;
/**
* @author hgw拷贝自档案的附件
* 文件上传接口
*/
@RestController
@RequestMapping
(
"/fileUpload"
)
@Tag
(
name
=
"文件上传下载接口"
)
@Slf4j
public
class
FileUploadController
{
@Autowired
private
OSSUtil
ossUtil
;
@Autowired
private
EkpBankAttaService
ekpBankAttaService
;
/**
* 根据wxNo(皖信编号)获取银企付款的回单:
*
* @return R
* @author hgw
*/
@Operation
(
summary
=
"根据wxNo(皖信编号)获取银企付款的回单:--EKP调用接口"
,
description
=
"根据wxNo(皖信编号)获取银企付款的回单:--EKP调用接口"
)
@SysLog
(
"根据wxNo(皖信编号)获取银企付款的回单:--EKP调用接口"
)
@GetMapping
(
"/getAttaListBySalaryId"
)
public
R
<
String
>
getAttaListBySalaryId
(
@RequestParam
String
wxNo
)
{
String
returnUrl
=
null
;
EkpBankAtta
atta
=
ekpBankAttaService
.
getOne
(
Wrappers
.<
EkpBankAtta
>
query
().
lambda
()
.
eq
(
EkpBankAtta:
:
getFdLinkId
,
wxNo
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
atta
!=
null
&&
Common
.
isNotNull
(
atta
.
getFdAttaSrc
()))
{
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getFdAttaSrc
());
returnUrl
=
String
.
valueOf
(
url
).
replace
(
"http"
,
"https"
);
}
return
R
.
ok
(
returnUrl
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/IcbcTransactionFlowIssueController.java
View file @
c7e0a529
...
...
@@ -136,9 +136,16 @@ public class IcbcTransactionFlowIssueController {
return
icbcTransactionFlowIssueService
.
doGetEkpBankStatus
();
}
@Operation
(
summary
=
"获取回单文件"
,
description
=
"获取回单文件"
)
@PostMapping
(
"/getPdfFile"
)
public
void
getPdfFile
()
{
icbcTransactionFlowIssueService
.
getPdfFile
();
@Operation
(
summary
=
"定时任务获取回单文件"
,
description
=
"定时任务获取回单文件"
)
@Inner
@PostMapping
(
"/inner/getPdfFile"
)
public
R
getPdfFile
()
{
return
icbcTransactionFlowIssueService
.
getPdfFile
();
}
@Operation
(
summary
=
"定时任务获取回单文件"
,
description
=
"定时任务获取回单文件"
)
@PostMapping
(
"/getTestPdfFile"
)
public
R
getPdfFileTest
()
{
return
icbcTransactionFlowIssueService
.
getPdfFile
();
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
View file @
c7e0a529
...
...
@@ -75,6 +75,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
**/
R
<
String
>
doGetEkpBankStatus
();
void
getPdfFile
();
R
getPdfFile
();
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
View file @
c7e0a529
This diff is collapsed.
Click to expand it.
yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc
0 → 100644
View file @
c7e0a529
-----BEGIN RSA PRIVATE KEY-----
MIIG4gIBAAKCAYEAs3PHK4rFlPFJnJ2COJV7HyrgP0aVxaFPyKKqjy9zapcuHCF4
4cQE7GEe90kG5esFCjenuRZphgaVbCLrA2XdXlMl/94i6r5P1WkVEfWnH7Jf0Ljv
TRKJJ2MVQaiI4wTWay6Sj7CDEZAUH73VZyr+XOreBZEwIXPanV7TJpslrHf3fb5Z
gIBhCETHWikpiI2ZLZrs9yzBQYUlshRXtNpMEeGGK+m+aKyYi7xduGzjGJg2f+xd
yS0981lhAQMu8Q/XNZPCpA2keQhQ7GmzEe2ZnqfFvRd2Nwn0tAgv5N8Zsi3WdGyt
ro4OW9n09SOS4nr95dOtsOzx1267B8ApKjeUXZL7sxKxH//S/WLIdG4NFjLvmlZX
2joq5zvaqjCtormQliDjT8YY/tI88r2leaW6lag4dJtbyj8ju+El8RtYXRK3auS0
ZBdHQSJqbFi8wKLN0vm/cIX3OdKkqFGvSL2SGuifXUPEh/s6rPILdGUbDH3h+tAv
3zXcEzZjAKopgK+fAgMBAAECggGAH5zAtFnw7okG97EDlKY4l0f9UwhDMBp3rJeD
RlAMm/Vf6RK4ccUPPPjq9JMHxQ7+x0sAn+lj03lrby5Dikiyk4BATG+8ZO/7rlOh
o5VLyJiqqmE5vrEKOkcJIpTm8F8UyrLcnLVykXB5KxJM+qynPIUfcYmfGfWHyHtA
5SclntlPXvZeW/XBoixDlg10RJr1JgSJxA09SiaDenh87t4Z0niRI0E9CsGE6fDX
7bo400dVKnngF6WBqVHQddYyucKZUjLGKTeF0gkPlCLhSxYUxO7AclL5z2noNy7E
StRNmuVVr9uur6HUhLIlnsPbilBF60MUDN6SWyGaveX7DyXlBla1vPx2J7NG7waw
/pYZZ+gamLEjRpfS2nsOl3jgRZLlh+6hErJnPioF8/cGoridhAGjgcF07Bf1xXyj
EjCMVqcI/qW2i20cJ0rIvEIpjvUOgq0ptxiRgmYwPBQSO04Gb91gWEyQdAh7z8vC
cHrsH036DgnW6Vo8iWrrNRJsVVF5AoHBAOLUiTfE30cKtlfuO1hAQUOWeodoM9zi
mgaqjrK6p+d4D2FcZnW2gDyzUdrP1Jo3YefJq2Mcurmh/0DeaNcdr9VptLM5OI5m
6rgreZtaAD+dihyrMhRXBLrlslWSrv717qvfGR6LVAP73Leasdtevi8dqSwK83ir
E9VOtPDjIsUgxd2UAlAwPWZy3HPfDU1Cu25kbJWKLU4akLaCee8XnC6MXX3jI9+G
5+jaNx20jtDKNrPUy72igrtqsmA3ixzqDQKBwQDKh4PW54OMLOM3znpdYVXk4+Ue
U27p2SHXzq9UaQqiLVmCCWoSn+UTrBLoF5mw88FYBYuKZsAR+1ilwof0h5WK5QBn
YD31gRQJCzm1uxDOp/eZvzGTWa6U3gRDgrQ8UXpWjT+HyWUFGR4KpGmzcq+TX7U8
nPFor7dZfcjyeuW3zQ2+CcdRRBFzd3nE4OM/Ke87DvZLgsVxPGvK3WpFfIA0E1ge
0c9G48YWWKlLG1MsmVzTMPFU4hd4q3UF4VjhMVsCgcAWDPlF7aKTAmyVgbhNLPnr
Ox6wOSYJjBHTIhN7NoAKFXbRTS08tkAjJn+HmPqe/1FKOiWqHendD+2DfduNRfqI
8Zy6a46e8UxSGQ/aVVZ+2K7LeK0Goyr3jErY3MicSoYoOSj0+jBxrrNXOfeeTsiI
RgbjHDFtApyL+PnIDRydM0Fo9/F9oCLn6bSaow1k/F7CLYsMwoEC/bwhse9umcn6
EHUqPsGHAlNbJJOFFL9pdq74rnAcAEdbNtUeW2fvqKUCgcBhvxHEUKxOpQNs1bx9
ARNBizPzdPUc6+zHiTtZk/DL4PNILV8CaiVXXz8owOsuWhbAcrysKXcdtp9MMR0I
yb9E781IF00QBiIzUzWhHg24j5ySmZJFuYzm0FhidNykF/bhev5kfLDCyyKSpFNX
hkxy5khEXsKscdId4PVxAhuIn/C3/WQzNpTtk4YznQ5QV97cNBZuz0iXpD+qAz7d
Fn+RopxvE3fkkN3zvwrF8wQrjEEetIplG1GUrbunAOGyne0CgcAfcne0tzujrxDX
a9sZEbllAa9j2b/SL427omCshgcYXwb529+78HAJ+RQ4d8TJNqzPnyTdfqxfXiUs
HwA4Vj6IbkCHbHyQGxkw/+b5mcbSOoEEsORJ7x0Z0c3bYNZ7h+KVqT7+Gq4qTrrL
eYRwkb0L5crDcneu6N35cI0w7wzBjfAUFxhCrtgcSaPF8yFfKdCF4foxwms4uFtg
zf7Ipcf7jd20uJkZ5tlFIWmbZtc0v9ulYkKD8eS5ilH+hy56C3U=
-----END RSA PRIVATE KEY-----
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
c7e0a529
...
...
@@ -124,6 +124,12 @@ public class InsuranceAddParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
View file @
c7e0a529
...
...
@@ -151,4 +151,9 @@ public class InsuranceAutoParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
c7e0a529
...
...
@@ -119,6 +119,12 @@ public class InsuranceBatchParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
c7e0a529
...
...
@@ -107,6 +107,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/**
* 数据传递对象
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TEmployeeInsurancePreServiceImpl.java
View file @
c7e0a529
...
...
@@ -207,6 +207,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setPost
(
insurancePre
.
getPosition
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
THREE_INT
==
insurancePre
.
getBuyType
())
{
...
...
@@ -224,6 +225,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setPost
(
insurancePre
.
getPosition
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
batchAddParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
FOUR_INT
==
insurancePre
.
getBuyType
())
{
...
...
@@ -242,6 +244,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setReplaceEmpIdcardNo
(
insurancePre
.
getEmpIdcard
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
replaceAddParamList
.
add
(
addParam
);
}
}
...
...
@@ -488,6 +491,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setRemark
(
addParam
.
getRemark
());
autoParam
.
setErrorMessage
(
addParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
addParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
addParam
.
getCustomerUserName
());
return
autoParam
;
}
...
...
@@ -508,6 +512,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setRemark
(
batchParam
.
getRemark
());
autoParam
.
setErrorMessage
(
batchParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
batchParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
batchParam
.
getCustomerUserName
());
return
autoParam
;
}
...
...
@@ -528,6 +533,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setReplaceEmpIdcardNo
(
replaceParam
.
getReplaceEmpIdcardNo
());
autoParam
.
setErrorMessage
(
replaceParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
replaceParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
replaceParam
.
getCustomerUserName
());
return
autoParam
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c7e0a529
...
...
@@ -373,7 +373,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setActualPremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setEstimatePremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
detailList
.
add
(
detail
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
baseMapper
.
insert
(
detail
);
...
...
@@ -446,7 +446,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setActualPremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setEstimatePremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
detailList
.
add
(
detail
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
replaceIdList
.
add
(
detail
.
getId
());
...
...
@@ -557,7 +557,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//创建时间是新数据插入时间
newDetail
.
setCreateTime
(
LocalDateTime
.
now
());
newDetail
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
newDetail
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
newDetail
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
//替换不参与结算
newDetail
.
setDefaultSettleId
(
null
);
//替换不继承备注 20250331 fxj 替换模板新增备注字段不用清空
...
...
@@ -585,7 +585,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setReplaceStatus
(
CommonConstants
.
ONE_INT
);
replace
.
setReplaceTime
(
LocalDateTime
.
now
());
replace
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
replace
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
replace
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
replace
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceReplaceService
.
save
(
replace
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
newDetail
,
CommonConstants
.
THREE_STRING
);
...
...
@@ -2671,7 +2671,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map<String, List<InsuranceAddParam>>}
*/
private
Map
<
String
,
List
<
InsuranceAddParam
>>
addInsuranceCheck
(
List
<
InsuranceAddParam
>
paramList
,
YifuUser
user
){
List
<
String
>
deptNoList
=
getDeptNoList
(
null
==
user
?
"1"
:
user
.
getId
());
//1.9.11超管无需校验项目权限
List
<
String
>
deptNoList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
user
.
getSystemFlag
()))
{
deptNoList
=
getDeptNoList
(
user
.
getId
());
}
Map
<
String
,
List
<
InsuranceAddParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceAddParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
listSuccess
=
new
ArrayList
<>();
...
...
@@ -2886,15 +2890,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
//1.9.11超管无需校验项目权限
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
user
.
getSystemFlag
()))
{
if
(
CollectionUtils
.
isEmpty
(
deptNoList
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
...
...
@@ -3058,7 +3065,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map< String, List< InsuranceBatchParam>>}
*/
private
Map
<
String
,
List
<
InsuranceBatchParam
>>
batchInsuranceCheck
(
List
<
InsuranceBatchParam
>
paramList
,
YifuUser
user
){
List
<
String
>
deptNoList
=
getDeptNoList
(
null
==
user
?
"1"
:
user
.
getId
());
//1.9.11超管无需校验项目权限
List
<
String
>
deptNoList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
user
.
getSystemFlag
()))
{
deptNoList
=
getDeptNoList
(
user
.
getId
());
}
Map
<
String
,
List
<
InsuranceBatchParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceBatchParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
listSuccess
=
new
ArrayList
<>();
...
...
@@ -3234,15 +3245,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
//1.9.11超管无需校验项目权限
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
user
.
getSystemFlag
()))
{
if
(
CollectionUtils
.
isEmpty
(
deptNoList
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
...
...
@@ -3444,7 +3458,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map< String, List<InsuranceReplaceParam>>}
*/
private
Map
<
String
,
List
<
InsuranceReplaceParam
>>
replaceInsuranceCheck
(
List
<
InsuranceReplaceParam
>
paramList
,
YifuUser
user
){
List
<
String
>
deptNoList
=
getDeptNoList
(
null
==
user
?
"1"
:
user
.
getId
());
//1.9.11超管无需校验项目权限
List
<
String
>
deptNoList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
user
.
getSystemFlag
()))
{
deptNoList
=
getDeptNoList
(
user
.
getId
());
}
Map
<
String
,
List
<
InsuranceReplaceParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceReplaceParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceReplaceParam
>
listSuccess
=
new
ArrayList
<>();
...
...
@@ -3707,21 +3725,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
//1.9.11超管无需校验项目权限
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
user
.
getSystemFlag
()))
{
if
(
CollectionUtils
.
isEmpty
(
deptNoList
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
}
// 投保状态 待投保 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
...
...
@@ -4343,8 +4364,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
}
else
{
operate
.
setCreateBy
(
"1"
);
operate
.
setCreateName
(
"自动化派单"
);
operate
.
setCreateBy
(
detail
.
getCreateBy
()
);
operate
.
setCreateName
(
detail
.
getCreateName
()
);
}
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/EkpTask.java
View file @
c7e0a529
...
...
@@ -60,5 +60,16 @@ public class EkpTask {
log
.
info
(
"------------每小时获取银企付款结果-定时任务结束------------"
);
}
/**
* @Author huyc
* @Description 生成昨日的回单文件
* @Date 2025-5-19 15:21:28
* @Param
* @return
**/
public
void
doCreateYesterdayPdfFile
()
{
log
.
info
(
"------------定时生成生成昨日的回单文件-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprEkpProperties
.
getAppUrl
(),
daprEkpProperties
.
getAppId
(),
"/icbcIssue/inner/getPdfFile"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成生成昨日的回单文件-定时任务结束------------"
);
}
}
\ No newline at end of file
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/HcmSalarySearchVo.java
0 → 100644
View file @
c7e0a529
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Hcm查询工资表的入参
*
* @author hgw
* @date 2019-07-30 15:00:05
*/
@Data
public
class
HcmSalarySearchVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Schema
(
description
=
"身份证集合"
)
List
<
String
>
idCardList
;
@Schema
(
description
=
"工资月份"
)
String
salaryMonth
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/SalaryUploadParamVo.java
View file @
c7e0a529
...
...
@@ -20,6 +20,10 @@ public class SalaryUploadParamVo {
// 结算主体id;必填
String
settleDepart
;
// HCM使用的
String
settleDepartNo
;
// HCM使用的
String
createUserLoginName
;
// 工资配置结算月等信息的id
String
configId
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/SalaryUploadController.java
View file @
c7e0a529
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.HcmSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -29,11 +32,8 @@ public class SalaryUploadController {
private
final
SalaryUploadService
salaryUploadService
;
/**
* @param jsonString Excel表-JsonString
* @param settleDepart 结算主体id
* @param configId 配置方案id
* @param salaryType 报表类型id
* @Description:
* @param vo : jsonString Excel表-JsonString;settleDepart 结算主体id;configId 配置方案id;salaryType 报表类型id
* @Description: 上传薪资表
* @Author: hgw
* @Date: 2019/9/11 15:21
* @return: com.yifu.cloud.v1.common.core.util.R
...
...
@@ -52,4 +52,27 @@ public class SalaryUploadController {
return
salaryUploadService
.
getBill
(
salaryFormId
);
}
/**
* @param vo : idCardList 身份证list; salaryMonth 工资月
* @Description: HCM查询工资
* @Author: hgw
* @Date: 2025/5/20 20:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.baomidou.mybatisplus.core.metadata.IPage < com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>>
**/
@Operation
(
description
=
"HCM查询工资"
)
@PostMapping
(
"/getHcmSalaryByIdCardListAndMonth"
)
public
R
<
List
<
TSalaryAccount
>>
getSalaryByIdCardList
(
@RequestBody
HcmSalarySearchVo
vo
)
{
List
<
String
>
idCardList
=
vo
.
getIdCardList
();
String
salaryMonth
=
vo
.
getSalaryMonth
();
if
(
Common
.
isEmpty
(
salaryMonth
))
{
return
R
.
failed
(
"工资月不可为空"
);
}
if
(
Common
.
isEmpty
(
idCardList
)
||
idCardList
.
isEmpty
())
{
return
R
.
failed
(
"身份证不可为空"
);
}
else
if
(
idCardList
.
size
()
>
3000
)
{
return
R
.
failed
(
"身份证数不可大于3000!"
);
}
return
new
R
<>(
salaryUploadService
.
getSalaryByIdCardList
(
idCardList
,
salaryMonth
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
c7e0a529
...
...
@@ -131,6 +131,20 @@ public class TSalaryStandardController {
return
tSalaryStandardService
.
deleteSalaryById
(
id
);
}
/**
* @param id 工资主表ID
* @Description: HCM通过id删除标准薪酬工资表
* @Author: hgw
* @Date: 2025/5/20 19:59
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"HCM通过id删除标准薪酬工资表"
,
description
=
"通过id删除标准薪酬工资表"
)
@SysLog
(
"HCM通过id删除标准薪酬工资表"
)
@GetMapping
(
"/deleteById"
)
public
R
<
String
>
deleteById
(
@RequestParam
String
id
)
{
return
tSalaryStandardService
.
deleteSalaryById
(
id
);
}
/**
* 标准薪酬工资表 批量导出
*
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountItemMapper.java
View file @
c7e0a529
...
...
@@ -68,6 +68,9 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
**/
List
<
TSalaryAccountItem
>
getSalaryItemVoList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"invoiceTitle"
)
String
invoiceTitle
);
// HCM使用
List
<
TSalaryAccountItem
>
getSalaryItemVoListByHcm
(
@Param
(
"accIdList"
)
List
<
String
>
accIdList
);
/**
* @param deptId 结算主体id
* @param javaFiedName 属性名
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
c7e0a529
...
...
@@ -49,6 +49,16 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
IPage
<
TSalaryAccount
>
getEmpAccountPage
(
Page
<
TSalaryAccount
>
page
,
@Param
(
"tSalaryAccount"
)
TSalaryAccountSearchVo
tSalaryAccount
);
/**
* @param idCardList
* @param salaryMonth
* @Description: 给HCM使用的,按身份证与工资月查询
* @Author: hgw
* @Date: 2025/5/20 20:36
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List
<
TSalaryAccount
>
getSalaryByIdCardList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"salaryMonth"
)
String
salaryMonth
);
int
getEmpAccountCount
(
@Param
(
"tSalaryAccount"
)
TSalaryAccountSearchVo
tSalaryAccount
);
List
<
TSalaryAccountExportSpecialVo
>
getEmpAccountExport
(
@Param
(
"tSalaryAccount"
)
TSalaryAccountSearchVo
tSalaryAccount
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/SalaryUploadService.java
View file @
c7e0a529
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
java.util.List
;
...
...
@@ -28,4 +31,6 @@ public interface SalaryUploadService extends IService<TSalaryStandard> {
R
<
TSalaryDetailVo
>
getBill
(
String
salaryFormId
);
List
<
TSalaryAccount
>
getSalaryByIdCardList
(
List
<
String
>
idCardList
,
String
salaryMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountItemService.java
View file @
c7e0a529
...
...
@@ -51,6 +51,9 @@ public interface TSalaryAccountItemService extends IService<TSalaryAccountItem>
**/
Map
<
String
,
List
<
TSalaryAccountItem
>>
getSalaryItemVoList
(
List
<
String
>
idCardList
,
String
invoiceTitle
);
// HCM查明细使用
Map
<
String
,
List
<
TSalaryAccountItem
>>
getSalaryItemVoListByHcm
(
List
<
String
>
accIdList
);
/**
* 工资报账表附加-工资明细简单分页查询
*
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
c7e0a529
...
...
@@ -53,6 +53,8 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
IPage
<
TSalaryAccount
>
getEmpAccountPage
(
Page
<
TSalaryAccount
>
page
,
TSalaryAccountSearchVo
searchVo
);
List
<
TSalaryAccount
>
getSalaryByIdCardList
(
List
<
String
>
idCardList
,
String
salaryMonth
);
/**
* @Author fxj
* @Description 薪资报账导出统一导出限制
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
c7e0a529
...
...
@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
...
...
@@ -12,6 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.*
;
...
...
@@ -27,6 +30,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.support.SimpleValueWrapper
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.AuthorityUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -46,13 +51,15 @@ import java.util.concurrent.atomic.AtomicInteger;
@Log4j2
@AllArgsConstructor
@Service
(
"salaryUploadService"
)
@EnableConfigurationProperties
({
DaprArchivesProperties
.
class
,
DaprSocialProperties
.
class
})
@EnableConfigurationProperties
({
DaprArchivesProperties
.
class
,
DaprSocialProperties
.
class
,
DaprUpmsProperties
.
class
})
public
class
SalaryUploadServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
SalaryUploadService
{
private
final
DaprArchivesProperties
archivesProperties
;
private
final
DaprSocialProperties
socialProperties
;
private
final
DaprUpmsProperties
daprUpmsProperties
;
private
final
TSalaryStandardService
tSalaryStandardService
;
private
final
MSalaryEstimateService
mSalaryEstimateService
;
...
...
@@ -131,13 +138,21 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// R<List<ErrorMessage>> salaryUpload(String jsonString, String settleDepart, String configId, String salaryType, String orderId)
String
jsonString
=
vo
.
getJsonString
();
String
settleDepart
=
vo
.
getSettleDepart
();
String
settleDepartNo
=
vo
.
getSettleDepartNo
();
String
configId
=
vo
.
getConfigId
();
String
salaryType
=
vo
.
getSalaryType
();
String
orderId
=
vo
.
getOrderId
();
if
(
Common
.
isNotNull
(
jsonString
)
&&
Common
.
isNotNull
(
settleDepart
)
&&
Common
.
isNotNull
(
salaryType
))
{
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
settleDepart
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
//String orderId = vo.getOrderId()
if
(
Common
.
isNotNull
(
jsonString
)
&&
Common
.
isNotNull
(
salaryType
)
&&
(
Common
.
isNotNull
(
settleDepart
)||
Common
.
isNotNull
(
settleDepartNo
))
)
{
R
<
TSettleDomainSelectVo
>
sdr
=
null
;
if
(
Common
.
isNotNull
(
settleDepart
))
{
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
settleDepart
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
else
if
(
Common
.
isNotNull
(
settleDepartNo
))
{
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoByNo"
,
settleDepartNo
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
// 结算主体
TSettleDomainSelectVo
dept
=
null
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
...
...
@@ -168,6 +183,17 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"获取登录用户信息失败!"
);
}
String
createUserLoginName
=
vo
.
getCreateUserLoginName
();
if
(
Common
.
isNotNull
(
createUserLoginName
))
{
R
<
SysUser
>
userR
=
HttpDaprUtil
.
invokeMethodGet
(
daprUpmsProperties
.
getAppUrl
()
,
daprUpmsProperties
.
getAppId
(),
"/user/inner/getSysUserByUsername"
,
"?username="
+
createUserLoginName
,
SysUser
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
null
!=
userR
&&
Common
.
isNotNull
(
userR
.
getData
()))
{
user
=
getNewUser
(
userR
.
getData
());
}
else
{
return
R
.
failed
(
"获取用户信息失败!登录名:"
+
createUserLoginName
);
}
}
TConfigSalary
configSalary
;
...
...
@@ -274,6 +300,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
R
.
failed
(
"导入数据不可为空"
);
}
private
YifuUser
getNewUser
(
SysUser
user
)
{
Set
<
String
>
dbAuthsSet
=
new
HashSet
<>();
Collection
<?
extends
GrantedAuthority
>
authorities
=
AuthorityUtils
.
createAuthorityList
(
dbAuthsSet
.
toArray
(
new
String
[
0
]));
return
new
YifuUser
(
user
.
getUserId
(),
1L
,
""
,
user
.
getUsername
(),
user
.
getNickname
(),
"0"
,
SecurityConstants
.
BCRYPT
+
"123456"
,
user
.
getPhone
(),
true
,
true
,
true
,
true
,
"1"
,
authorities
,
"1"
,
null
,
null
,
null
,
null
);
}
/**
* @param sav 报账表vo
* @param dept 结算主体
...
...
@@ -2159,5 +2198,26 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
zeroArr
[
num
]
+
nowNums
;
}
@Override
public
List
<
TSalaryAccount
>
getSalaryByIdCardList
(
List
<
String
>
idCardList
,
String
salaryMonth
)
{
List
<
TSalaryAccount
>
list
=
tSalaryAccountService
.
getSalaryByIdCardList
(
idCardList
,
salaryMonth
);
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
List
<
String
>
accountIdList
=
new
ArrayList
<>();
for
(
TSalaryAccount
a
:
list
)
{
accountIdList
.
add
(
a
.
getId
());
}
// TODO-明细
Map
<
String
,
List
<
TSalaryAccountItem
>>
itemMap
=
tSalaryAccountItemService
.
getSalaryItemVoListByHcm
(
accountIdList
);
List
<
TSalaryAccountItem
>
itemList
;
for
(
TSalaryAccount
a
:
list
)
{
itemList
=
itemMap
.
get
(
a
.
getId
());
if
(
itemList
!=
null
)
{
a
.
setSaiList
(
itemList
);
}
}
}
return
list
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountItemServiceImpl.java
View file @
c7e0a529
...
...
@@ -126,6 +126,24 @@ public class TSalaryAccountItemServiceImpl extends ServiceImpl<TSalaryAccountIte
return
itemMap
;
}
@Override
public
Map
<
String
,
List
<
TSalaryAccountItem
>>
getSalaryItemVoListByHcm
(
List
<
String
>
accIdList
)
{
List
<
TSalaryAccountItem
>
list
=
baseMapper
.
getSalaryItemVoListByHcm
(
accIdList
);
Map
<
String
,
List
<
TSalaryAccountItem
>>
itemMap
=
new
HashMap
<>();
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
List
<
TSalaryAccountItem
>
voList
;
for
(
TSalaryAccountItem
item
:
list
)
{
voList
=
itemMap
.
get
(
item
.
getSalaryAccountId
());
if
(
voList
==
null
)
{
voList
=
new
ArrayList
<>();
}
voList
.
add
(
item
);
itemMap
.
put
(
item
.
getSalaryAccountId
(),
voList
);
}
}
return
itemMap
;
}
/**
* @param settleDepartId 结算主体id
* @param javaFiedName 属性名
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
c7e0a529
...
...
@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -121,6 +122,17 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
return
baseMapper
.
getEmpAccountPage
(
page
,
searchVo
);
}
/**
* @Description: HCM查询
* @Author: hgw
* @Date: 2025-5-20 20:37:48
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
@Override
public
List
<
TSalaryAccount
>
getSalaryByIdCardList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"salaryMonth"
)
String
salaryMonth
)
{
return
baseMapper
.
getSalaryByIdCardList
(
idCardList
,
salaryMonth
);
}
/**
* @Author fxj
* @Description
...
...
@@ -270,7 +282,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
return
;
}
// 使用SXSSF模式,设置缓存行数为100
0
,减少内存占用
// 使用SXSSF模式,设置缓存行数为100,减少内存占用
ExcelWriterBuilder
writerBuilder
=
EasyExcel
.
write
(
out
,
TSalaryAccount
.
class
)
.
registerWriteHandler
(
new
SheetWriteHandler
()
{
@Override
...
...
@@ -293,9 +305,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
// 分批查询和写入
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
int
batchSize
=
CommonConstants
.
EXCEL_EXPORT_LIMIT_1
;
int
batchSize
=
100000
;
int
totalPages
=
(
int
)
Math
.
ceil
((
double
)
count
/
batchSize
);
List
<
SalaryAccountExportVo
>
batchList
;
for
(
int
page
=
1
;
page
<=
totalPages
;
page
++)
{
// 每10万条数据切换一个新sheet,防止单个sheet过大
if
((
page
-
1
)
*
batchSize
%
100000
==
0
&&
(
page
-
1
)
*
batchSize
>
0
)
{
...
...
@@ -307,7 +319,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
searchVo
.
setLimitStart
((
page
-
1
)
*
batchSize
);
searchVo
.
setLimitEnd
(
batchSize
);
List
<
SalaryAccountExportVo
>
batchList
=
baseMapper
.
noPageDiyLastNew
(
searchVo
,
searchVo
.
getIdList
(),
deptNos
);
batchList
=
baseMapper
.
noPageDiyLastNew
(
searchVo
,
searchVo
.
getIdList
(),
deptNos
);
if
(
Common
.
isNotNull
(
batchList
))
{
excelWriter
.
write
(
batchList
,
writeSheet
);
// 及时清空批次数据
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
View file @
c7e0a529
...
...
@@ -475,6 +475,18 @@
AND a.DELETE_FLAG = 0 and a.FORM_TYPE in ('0','1','2')
</where>
</select>
<!-- 获取所有数据,组装map,HCM使用 -->
<select
id=
"getSalaryItemVoListByHcm"
resultMap=
"tSalaryAccountItemMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_account_item a
where a.SALARY_ACCOUNT_ID in
<foreach
item=
"item"
index=
"index"
collection=
"accIdList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"getSumByAccountId"
resultType=
"java.util.Map"
>
SELECT
a.SALARY_ACCOUNT_ID as 'key',
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
c7e0a529
...
...
@@ -669,6 +669,17 @@
where a.DELETE_FLAG = 0
<include
refid=
"tSalaryAccount_where"
/>
</select>
<!--项目薪酬查询-工资条查询-->
<select
id=
"getSalaryByIdCardList"
resultMap=
"tSalaryAccountMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_account a
where a.DELETE_FLAG = 0 and a.salary_month = #{salaryMonth} and a.EMP_IDCARD in
<foreach
item=
"id"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
<!--tSalaryAccount简单分页查询-->
<select
id=
"getTSalaryAccountPageDataByIds"
resultMap=
"tSalaryAccountMap"
>
SELECT
...
...
@@ -1779,7 +1790,7 @@
a.BANK_SUB_NAME,
case a.FORM_TYPE when '0' then '薪资' when '1' then '绩效' when '3' then '劳务费' when '4' then '稿酬' else '其他' end as FORM_TYPE,
a.SALARY_MONTH,
if(
a.RELAY_SALARY_UNIT is not null
and a.RELAY_SALARY_UNIT != 0,a.RELAY_SALARY_UNIT,ifnull(a.RELAY_SALARY,0)) RELAY_SALARY,
if(
ifnull(a.RELAY_SALARY_UNIT,-1) != -1
and a.RELAY_SALARY_UNIT != 0,a.RELAY_SALARY_UNIT,ifnull(a.RELAY_SALARY,0)) RELAY_SALARY,
a.ACTUAL_SALARY,a.SALARY_TAX
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'"
>
...
...
@@ -1790,7 +1801,7 @@
</if>
inner join (
SELECT
a.id
a.id
,a.CREATE_TIME
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'"
>
t_salary_account a
...
...
@@ -1819,6 +1830,7 @@
) tmp ON a.id = tmp.id
left join sys_area ap on ap.id=a.BANK_PROVINCE
left join sys_area ac on ac.id=a.BANK_CITY
ORDER BY tmp.CREATE_TIME desc
</select>
<!-- 员工报账导出查询 -->
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/SysHouseHoldInfo.java
View file @
c7e0a529
...
...
@@ -249,7 +249,7 @@ public class SysHouseHoldInfo extends BaseEntity {
private
String
mediclPassword
;
/**
* 是否配置公章
* 是否配置公章
0有1无
*/
@ExcelAttribute
(
name
=
"是否配置公章"
)
@Schema
(
description
=
"是否配置公章"
)
...
...
@@ -287,6 +287,15 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty
(
"是否单个接口"
)
private
String
isSingle
;
/**
* 是否自动生成解除劳动合同书 0否1是(是的话,走单个推送,因为税友的减员接口没有批量附件的字段)
*/
@ExcelAttribute
(
name
=
"是否自动生成解除劳动合同书"
)
@Schema
(
description
=
"是否自动生成解除劳动合同书"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否自动生成解除劳动合同书 0否1是"
)
private
String
isAutoLeaveDoc
;
/**
* 审核人部门
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFriendBackLog.java
View file @
c7e0a529
...
...
@@ -65,7 +65,7 @@ public class TSocialFriendBackLog {
@ExcelAttribute
(
name
=
"类型"
)
@ExcelProperty
(
"类型"
)
@Schema
(
description
=
"类型1社保增 2社保减 3医保增 4医保减 5推送的日志 6社保图片路径7医保图片路径11社保增拉取 12社保减拉取 13医保增拉取 14医保减拉取"
)
@Schema
(
description
=
"类型1社保增 2社保减 3医保增 4医保减 5推送的日志 6社保图片路径7医保图片路径11社保增拉取 12社保减拉取 13医保增拉取 14医保减拉取
16社保单个图片17医保单个图片
"
)
private
Integer
type
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SociaFriendYgsAddVo.java
View file @
c7e0a529
...
...
@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author hgw
...
...
@@ -82,6 +83,8 @@ public class SociaFriendYgsAddVo implements Serializable {
// 企业职工社会保险增员花名册 qyzgshbxzyhmc
private
String
qyzgshbxzyhmc
;
// 单个附件list
private
List
<
String
>
imgList
;
// 当前行政经办区——2025-3-31 10:23:02 盛宇与税友沟通,可以默认安徽省,暂时不用这个字段了,后面有特殊要求再加
/*@ExcelProperty("当前行政经办区
private String dqxzjbq*/
...
...
@@ -109,4 +112,10 @@ public class SociaFriendYgsAddVo implements Serializable {
@ExcelProperty
(
"备案解除二级原因"
)
private
String
bajcejyy
;
@ExcelProperty
(
"是否单个"
)
private
String
isSingle
;
// 用来获取单个推送的附件
@ExcelProperty
(
"派单ID"
)
private
String
dispatchId
;
}
yifu-social/yifu-social-biz/pom.xml
View file @
c7e0a529
...
...
@@ -106,6 +106,21 @@
<version>
5.3.0
</version>
<type>
jar
</type>
</dependency>
<!-- word转pdf -->
<dependency>
<groupId>
org.jodconverter
</groupId>
<artifactId>
jodconverter-local
</artifactId>
<version>
4.4.0
</version>
</dependency>
<!-- pdf转图片 -->
<dependency>
<groupId>
org.apache.pdfbox
</groupId>
<artifactId>
pdfbox
</artifactId>
<version>
2.0.27
</version>
</dependency>
</dependencies>
<build>
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
c7e0a529
...
...
@@ -152,12 +152,20 @@ public class SocialFriendConfig {
if
(
Common
.
isNotNull
(
vo
.
getQyzgshbxzyhmc
()))
{
JSONArray
qyzgshbxzyhmclbArr
=
new
JSONArray
();
qyzgshbxzyhmclbArr
.
add
(
vo
.
getQyzgshbxzyhmc
());
if
(
vo
.
getImgList
()
!=
null
&&
!
vo
.
getImgList
().
isEmpty
())
{
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr
.
addAll
(
vo
.
getImgList
());
}
json
.
put
(
"qyzgshbxzyhmclb"
,
qyzgshbxzyhmclbArr
);
}
else
if
(
Common
.
isNotNull
(
vo
.
getQyzgjbylbxcbdjb
()))
{
JSONArray
qyzgshbxzyhmclbArr
=
new
JSONArray
();
qyzgshbxzyhmclbArr
.
add
(
vo
.
getQyzgjbylbxcbdjb
());
if
(
vo
.
getImgList
()
!=
null
&&
!
vo
.
getImgList
().
isEmpty
())
{
qyzgshbxzyhmclbArr
.
addAll
(
vo
.
getImgList
());
}
json
.
put
(
"qyzgshbxzyhmclb"
,
qyzgshbxzyhmclbArr
);
}
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
// 推的json
TSocialFriendBackLog
backLogPush
=
new
TSocialFriendBackLog
();
...
...
@@ -245,12 +253,13 @@ public class SocialFriendConfig {
// 行政区划代码 户里的缴纳地,精确到市 "340100"
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
backLog
.
setLogInfo
(
String
.
valueOf
(
formEntity
));
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
String
dataResultList
=
restTemplate
.
postForObject
(
appAddUrl
,
formEntity
,
String
.
class
);
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"
if
(
Common
.
isNotNull
(
dataResultList
))
{
backLog
.
setLogInfo
(
dataResultList
);
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
JSONObject
dataObject
=
JSON
.
parseObject
(
dataResultList
);
String
head
=
dataObject
.
getString
(
"head"
);
if
(
Common
.
isNotNull
(
head
))
{
...
...
@@ -262,6 +271,8 @@ public class SocialFriendConfig {
urlStr
=
bodyObject
.
getString
(
"wjlj"
);
}
}
}
else
{
backLog
.
setSocialId
(
appAddUrl
+
"返回dataResultList为空"
);
}
return
urlStr
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/FileUploadController.java
View file @
c7e0a529
...
...
@@ -7,6 +7,7 @@ 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
com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAttaVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService
;
...
...
@@ -99,6 +100,10 @@ public class FileUploadController {
TAttaInfo
attaInfo
=
tAttaInfoService
.
getById
(
id
);
if
(
null
==
attaInfo
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
attaInfo
.
getRelationType
())
&&
Common
.
isNotNull
(
attaInfo
.
getDomainId
()))
{
// 删除后解除户的章是否有为否
fileUploadService
.
updateSysHouseHoldInfoIsSign
(
attaInfo
.
getDomainId
(),
CommonConstants
.
ONE_STRING
);
}
if
(
tAttaInfoService
.
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
attaInfo
.
getAttaSrc
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
c7e0a529
...
...
@@ -531,7 +531,7 @@ public class TDispatchInfoController {
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tDispatchInfoService
.
addApplyAudit
(
idList
,
auditStatus
,
auditRemark
,
remark
);
return
tDispatchInfoService
.
addApplyAudit
(
idList
,
auditStatus
,
auditRemark
,
remark
,
isSingleAudit
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TForecastLibraryController.java
View file @
c7e0a529
...
...
@@ -68,6 +68,10 @@ public class TForecastLibraryController {
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
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
();
menuUtil
.
setAuthSql
(
user
,
tForecastLibrary
);
if
(
Common
.
isNotNull
(
tForecastLibrary
.
getAuthSql
())
&&
tForecastLibrary
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
...
...
@@ -140,6 +144,10 @@ public class TForecastLibraryController {
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('social_tforecastlibrary-export')"
)
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
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
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 @
c7e0a529
...
...
@@ -70,6 +70,10 @@ public class TIncomeController {
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TIncome
>>
getTIncomePage
(
Page
<
TIncome
>
page
,
TIncomeSearchVo
tIncome
)
{
//Ekp1.9.11查询条件 数据生成时间必填
if
(
Common
.
isEmpty
(
tIncome
.
getDataCreateMonth
()))
{
return
null
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tIncome
);
return
new
R
<>(
tIncomeService
.
getTIncomePage
(
page
,
tIncome
));
...
...
@@ -155,6 +159,10 @@ public class TIncomeController {
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('social_tincome-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TIncomeSearchVo
searchVo
)
{
//Ekp1.9.11查询条件 数据生成时间必填
if
(
Common
.
isEmpty
(
searchVo
.
getDataCreateMonth
()))
{
return
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
tIncomeService
.
listExport
(
response
,
searchVo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialFriendWordController.java
0 → 100644
View file @
c7e0a529
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
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
com.yifu.cloud.plus.v1.yifu.social.util.WordToImageWithSeal
;
import
com.yifu.cloud.plus.v1.yifu.social.util.WordUtil
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* 税友word文档离职证明
*
* @author hgw
* @date 2025-5-14 18:24:58
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tsocialfriendword"
)
@Tag
(
name
=
"税友word文档离职证明"
)
public
class
TSocialFriendWordController
{
@Operation
(
description
=
"生成新word"
)
@GetMapping
(
"/updateNewFileTest"
)
@SysLog
(
"生成新word"
)
public
void
updateNewFileTest
()
throws
Exception
{
// 1:将劳动合同解除证明书.doc某些文字替换
// 2:盖章
// 3:生成新文件
String
inputPath
=
"D:/test126.docx"
;
String
outputPath
=
"D:/test126666.docx"
;
String
outputImagePath
=
"D:/document_with_seal.png"
;
// 可以从配置中获取
replaceText
(
inputPath
,
outputPath
,
outputImagePath
);
}
@Autowired
private
OSSUtil
ossUtil
;
public
R
<
String
>
replaceText
(
String
inputPath
,
String
outputPath
,
String
outputImagePath
)
throws
Exception
{
String
src
=
"1735185038602皖信.png"
;
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
src
);
if
(
Common
.
isEmpty
(
url
))
{
throw
new
RuntimeException
(
"获取印章图片失败"
);
}
try
(
InputStream
imageStream
=
url
.
openStream
())
{
// 准备替换参数
Map
<
String
,
String
>
replacements
=
new
HashMap
<>();
replacements
.
put
(
"empName"
,
"张三丰"
);
replacements
.
put
(
"empSex"
,
"女"
);
replacements
.
put
(
"empAge"
,
"33"
);
replacements
.
put
(
"idCard"
,
"340826199012121212"
);
replacements
.
put
(
"startDate"
,
"2023年11月28日"
);
replacements
.
put
(
"leaveReason"
,
"个人原因"
);
replacements
.
put
(
"leaveDate"
,
"2025年01月20日"
);
replacements
.
put
(
"nowDate"
,
DateUtil
.
formatDatePatten
(
new
Date
(),
DateUtil
.
CHINA_PATTEN_YMD
));
// 执行替换 + 插入印章
WordUtil
.
replaceTextInWord
(
inputPath
,
outputPath
,
replacements
);
WordToImageWithSeal
.
convertAndAddSeal
(
outputPath
,
imageStream
,
outputImagePath
);
}
return
R
.
ok
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
View file @
c7e0a529
...
...
@@ -295,4 +295,13 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
HouseNameConfigVo
getFundSumExportVoTwo
(
@Param
(
"houseName"
)
String
houseName
,
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
dispatchInfo
);
List
<
AutoFlagVo
>
getAutoFlag
(
@Param
(
"idsList"
)
List
<
String
>
idsList
);
/**
* @param idsList 派单IDlist
* @Description: 获取单个的推送的户的派单ID
* @Author: hgw
* @Date: 2025/5/12 18:31
* @return: java.util.List<java.lang.String>
**/
List
<
String
>
getSingleFlagMap
(
@Param
(
"idsList"
)
List
<
String
>
idsList
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/FileUploadService.java
View file @
c7e0a529
...
...
@@ -21,4 +21,8 @@ public interface FileUploadService {
R
<
TAttaInfo
>
uploadFileReturnAtta
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
;
R
<
T
>
uploadAsso
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
);
// 更新户的章是否有
void
updateSysHouseHoldInfoIsSign
(
String
domainId
,
String
isSign
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
c7e0a529
...
...
@@ -80,9 +80,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
);
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
);
// isAutoFlag:是否社保士兵的自动办理,true :是
R
<
List
<
ErrorMessage
>>
addApplyHandle
(
List
<
String
>
ids
,
String
typeSub
,
String
handleStatus
,
String
handleRemark
,
String
socialType
,
String
remark
,
YifuUser
user
,
boolean
isAutoHandle
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/FileUploadServiceImpl.java
View file @
c7e0a529
...
...
@@ -8,9 +8,11 @@ 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
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.SysConfigLimitMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -36,6 +38,7 @@ public class FileUploadServiceImpl implements FileUploadService {
private
final
OSSUtil
ossUtil
;
private
final
TAttaInfoService
tAttaInfoService
;
private
final
SysHouseHoldInfoService
sysHouseHoldInfoService
;
private
AtomicInteger
atomicInteger
=
new
AtomicInteger
(
0
);
//初始化附件上传队列上限值
...
...
@@ -143,6 +146,10 @@ public class FileUploadServiceImpl implements FileUploadService {
}
//有实体id则插入关系,用于编辑
if
(
Common
.
isNotNull
(
domain
))
{
if
(
type
==
1
)
{
// 户配置上传公章,将户配置变为 有章
this
.
updateSysHouseHoldInfoIsSign
(
domain
,
CommonConstants
.
ZERO_STRING
);
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
...
...
@@ -155,6 +162,23 @@ public class FileUploadServiceImpl implements FileUploadService {
}
}
/**
* @param domainId 主键
* @param isSign 0是1否
* @Description: 更新户的章是否有
* @Author: hgw
* @Date: 2025/5/19 10:59
* @return: void
**/
public
void
updateSysHouseHoldInfoIsSign
(
String
domainId
,
String
isSign
)
{
// 户配置上传公章,将户配置变为 有章
SysHouseHoldInfo
sysHouseHoldInfo
=
sysHouseHoldInfoService
.
getById
(
domainId
);
if
(
sysHouseHoldInfo
!=
null
)
{
sysHouseHoldInfo
.
setIsSign
(
isSign
);
sysHouseHoldInfoService
.
updateById
(
sysHouseHoldInfo
);
}
}
private
R
<
FileVo
>
uploadImg2
(
InputStream
fileIn
,
String
filePath
,
Integer
type
,
String
domain
,
String
fileName
)
throws
IOException
{
if
(
null
==
fileIn
)
{
return
R
.
failed
(
"文件上传异常,请重新上传!"
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
c7e0a529
...
...
@@ -3511,11 +3511,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Author fxj
* @Description 派单申请批量审核
* @Date 16:54 2022/7/25
* @Param
* @Param
isSingleAudit 1:单个审核接口并且户类型为单个,即时推送税友
* @return
**/
@Override
public
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
)
{
public
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
if
(!
Common
.
isNotNull
(
idsList
))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
CommonConstants
.
PARAM_IS_NOT_ERROR
));
...
...
@@ -3526,6 +3527,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 获取所有派单对应的自动化配置信息
Map
<
String
,
String
>
autoFlagMap
=
new
HashMap
<>();
autoFlagMap
=
getAutoFlagMap
(
idsList
,
autoFlagMap
);
// 户配置为单个推送的派单
Map
<
String
,
String
>
singleFlagMap
=
new
HashMap
<>();
singleFlagMap
=
getSingleFlagMap
(
idsList
,
singleFlagMap
);
if
(
Common
.
isNotNull
(
dispatchs
))
{
// 获取所有派单查询信息
Map
<
String
,
TSocialFundInfo
>
socialFundMap
=
initSocialFundMap
(
dispatchs
);
...
...
@@ -3544,6 +3548,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchSocialFundInfo
socialFundInfo
;
// 是否自动化办理,true:推送到社保士兵
boolean
isAuto
;
for
(
TDispatchInfo
dis
:
dispatchs
)
{
autoFlag
=
autoFlagMap
.
get
(
dis
.
getId
());
if
(
Common
.
isEmpty
(
autoFlag
)){
...
...
@@ -3572,6 +3577,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单非待审核状态,禁止操作:"
+
dis
.
getEmpName
()));
continue
;
}
// 批量审核+审核为自动化+户配置为单个推送
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
isSingleAudit
)
&&
singleFlagMap
.
get
(
dis
.
getId
())
!=
null
&&
CommonConstants
.
THREE_STRING
.
equals
(
auditStatus
)
&&
null
!=
socialInfo
)
{
// 自动忽略这种社保,要单个审核并选择上传附件才行
errorList
.
add
(
new
ErrorMessage
(-
1
,
"户配置为单个推送,已跳过此条,请单个审核:"
+
dis
.
getEmpName
()));
continue
;
}
if
(
null
!=
socialInfo
)
{
// 派增审核
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())){
...
...
@@ -3627,7 +3641,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
//自动化处理,如果未配置还是人工处理
if
(
CommonConstants
.
THREE_STRING
.
equals
(
auditStatus
)){
if
(
CommonConstants
.
THREE_STRING
.
equals
(
auditStatus
))
{
// 初始化之前,保留原状态给 自动化办理查询使用 hgw 2025-4-27 17:37:09
socialInfo
.
setAddYgsHandleStatus
(
socialInfo
.
getYgsHandleStatus
());
socialInfo
.
setAddYsdHandleStatus
(
socialInfo
.
getYsdHandleStatus
());
...
...
@@ -3799,6 +3813,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ServiceUtil
.
runTimeExceptionDiy
(
"更新人员档案、项目档案、合同状态异常:"
+
(
Common
.
isNotNull
(
res
)?
res
.
getMsg
():
CommonConstants
.
EMPTY_STRING
));
}
}
// 非(批量审核+审核为自动化+户配置为单个推送),才可以改社保
if
(
CommonConstants
.
ONE_INT
==
flag
&&
flagTemp
){
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())){
sf
.
setSocialStatus
(
CommonConstants
.
FOUR_STRING
);
...
...
@@ -3839,8 +3854,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
dis
.
setIsSingle
(
isSingleAudit
);
baseMapper
.
updateById
(
dis
);
socialFundMapper
.
updateById
(
sf
);
// 非(批量审核+审核为自动化+户配置为单个推送),才可以改社保
if
(
isAuto
)
{
TSocialFreindSet
set
=
tSocialFreindSetService
.
getById
(
"1"
);
// 是否推送税友,默认不是,推送到士兵
...
...
@@ -3851,7 +3868,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
set
!=
null
&&
Common
.
isNotNull
(
set
.
getType
())
&&
set
.
getType
()
==
1
)
{
isFriend
=
true
;
}
socialTask
.
pushSoldier
(
dis
.
getId
(),
isFriend
);
socialTask
.
pushSoldier
(
dis
.
getId
(),
isFriend
,
isSingleAudit
);
}
//派减的申请审核完更新社保公积金查询快照表
...
...
@@ -3926,6 +3943,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
autoFlagMap
;
}
private
Map
<
String
,
String
>
getSingleFlagMap
(
List
<
String
>
idsList
,
Map
<
String
,
String
>
singleFlagMap
)
{
List
<
String
>
singleFlagList
=
baseMapper
.
getSingleFlagMap
(
idsList
);
if
(
Common
.
isNotNull
(
singleFlagList
)){
if
(
Common
.
isNotNull
(
singleFlagMap
)){
singleFlagMap
=
new
HashMap
<>();
}
for
(
String
dispatchId
:
singleFlagList
){
singleFlagMap
.
put
(
dispatchId
,
CommonConstants
.
ONE_STRING
);
}
}
return
singleFlagMap
;
}
private
void
initReduceStatus
(
TSocialFundInfo
sf
,
TSocialInfo
socialInfo
)
{
// 各个明细项的可派减项为待办理
if
(
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getPensionHandle
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getPensionHandle
())){
...
...
@@ -3966,10 +3996,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
// String isSingleAudit 1:单个审核接口并且户类型为单个,即时推送税友
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ShardingTransactionType
(
TransactionType
.
BASE
)
@Override
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
)
{
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -3988,7 +4020,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
else
{
return
R
.
failed
(
"派单审核状态参数异常:0待审核 1审核通过 2审核不通过"
);
}
List
<
ErrorMessage
>
errorInfo
=
addBatchApplyAudit
(
ids
,
user
,
flag
,
auditStatus
,
Common
.
isNullToString
(
auditRemark
),
remark
);
List
<
ErrorMessage
>
errorInfo
=
addBatchApplyAudit
(
ids
,
user
,
flag
,
auditStatus
,
Common
.
isNullToString
(
auditRemark
),
remark
,
isSingleAudit
);
return
R
.
ok
(
errorInfo
,
"派单审核结果:"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"派单审核异常:"
+
e
.
getMessage
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
c7e0a529
...
...
@@ -39,12 +39,14 @@ import com.yifu.cloud.plus.v1.yifu.social.util.ExcelToImage;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
java.io.*
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
...
@@ -99,6 +101,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
TSocialFreindSet
set
=
tSocialFreindSetService
.
getById
(
"1"
);
if
(
set
!=
null
&&
Common
.
isNotNull
(
set
.
getType
())
&&
1
==
set
.
getType
())
{
// 离职原因Map,将离职原因翻译为税友的字典
Map
<
String
,
TSocialFriendReduceSet
>
reduceMap
=
tSocialFriendReduceSetService
.
getFriendReduceMap
();
// 获取时间限制配置(获取 当月启用 的配置)
...
...
@@ -174,6 +177,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
SociaFriendYgsAddVo
vo
;
int
i
=
1
;
TSocialFriendReduceSet
reduceSet
;
// 是否为单个推送(派单审核时定性的)
boolean
isSingle
;
for
(
int
index
=
0
;
index
<
ygsAddlist
.
size
();
index
++)
{
vo
=
ygsAddlist
.
get
(
index
);
// 派减离职原因转化:
...
...
@@ -214,12 +219,19 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
&&
!
vo
.
getSocialHouseholdName
().
equals
(
ygsAddlist
.
get
(
index
+
1
).
getSocialHouseholdName
()))
{
nextFlag
=
true
;
}
if
(
nextFlag
||
i
%
10
==
0
||
index
>=
ygsAddlist
.
size
()-
1
)
{
isSingle
=
Common
.
isNotNull
(
vo
.
getIsSingle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getIsSingle
());
if
(
isSingle
||
nextFlag
||
i
%
10
==
0
||
index
>=
ygsAddlist
.
size
()-
1
)
{
// 房工接口,获取 企业职工社会保险增员花名册 url
urlR
=
doExportRoster
(
vo
.
getSocialId
(),
String
.
valueOf
(
type
),
vo
.
getUnitCreditCode
(),
listVo
);
if
(
urlR
!=
null
&&
urlR
.
getCode
()
==
200
&&
Common
.
isNotNull
(
urlR
.
getData
()))
{
vo
.
setQyzgshbxzyhmc
(
urlR
.
getData
());
}
if
(
isSingle
&&
Common
.
isNotNull
(
vo
.
getDispatchId
()))
{
// 获取单个附件并推送税友,返回 imgList 到Vo里
this
.
setImgList
(
vo
);
}
i
=
0
;
nextFlag
=
false
;
requestId
=
socialFriendConfig
.
pushFriendByInfo
(
restTemplate
,
vo
,
listVo
,
type
,
thisTime
,
backLogList
);
...
...
@@ -278,6 +290,57 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
}
/**
* @param vo
* @Description: 获取单个附件并推送税友,返回 imgList 到Vo里
* @Author: hgw
* @Date: 2025/4/28 17:05
* @return: void
**/
private
void
setImgList
(
SociaFriendYgsAddVo
vo
)
{
URL
url
;
InputStream
inStream
=
null
;
List
<
String
>
imgList
=
new
ArrayList
<>();
List
<
TAttaInfo
>
attaInfoList
=
attaInfoMapper
.
getTAttaInfoListByDoMainId
(
vo
.
getDispatchId
());
if
(
attaInfoList
!=
null
&&
!
attaInfoList
.
isEmpty
())
{
String
base64String
;
TSocialFriendBackLog
backLog
;
String
imgUrl
;
for
(
TAttaInfo
attaInfo
:
attaInfoList
)
{
if
(
Common
.
isNotNull
(
attaInfo
.
getAttaSrc
()))
{
// 获取附件url
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
if
(
url
!=
null
)
{
try
{
inStream
=
url
.
openStream
();
// inStream转化为base64String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
IOUtils
.
toByteArray
(
inStream
));
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
vo
.
getSocialId
());
backLog
.
setType
(
16
);
imgUrl
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
attaInfo
.
getAttaName
(),
base64String
,
backLog
);
tSocialFriendBackLogService
.
save
(
backLog
);
if
(
Common
.
isNotNull
(
imgUrl
)){
imgList
.
add
(
imgUrl
);
}
}
catch
(
Exception
e
){
log
.
info
(
"税友单个图片上传失败!"
);
}
finally
{
if
(
null
!=
inStream
){
try
{
inStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
vo
.
setImgList
(
imgList
);
}
}
/**
* @Description: 推送医保和记录日志
* @Author: hgw
...
...
@@ -1044,6 +1107,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
TSocialFriendBackLog
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
searchVo
.
getSocialId
());
backLog
.
setType
(
CommonConstants
.
SIX_INT
);
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
R
<
String
>
ulrR
=
excelToImage
.
excelToImg
(
inputStreamOut
,
socialFriendConfig
,
restTemplate
,
backLog
);
tSocialFriendBackLogService
.
save
(
backLog
);
return
ulrR
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendServiceImpl.java
View file @
c7e0a529
...
...
@@ -94,11 +94,13 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
FriendResult
info
;
List
<
FriendResult
>
resultList
;
Map
<
String
,
FriendResult
>
resultMap
;
String
key
;
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
logList
=
new
ArrayList
<>();
resultMap
=
new
HashMap
<>();
for
(
TSocialInfo
socialInfo
:
socialList
)
{
info
=
resultMap
.
get
(
socialInfo
.
getEmpIdcard
());
key
=
socialInfo
.
getEmpIdcard
()+
CommonConstants
.
DOWN_LINE_STRING
+
socialInfo
.
getYgsRequestId
();
info
=
resultMap
.
get
(
key
);
if
(
info
==
null
)
{
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
socialInfo
.
getEmpIdcard
());
...
...
@@ -112,9 +114,9 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
logList
.
add
(
backLog
);
if
(
resultList
!=
null
&&
!
resultList
.
isEmpty
())
{
for
(
FriendResult
result
:
resultList
)
{
resultMap
.
put
(
result
.
getIdCard
(),
result
);
resultMap
.
put
(
result
.
getIdCard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialInfo
.
getYgsRequestId
()
,
result
);
}
info
=
resultMap
.
get
(
socialInfo
.
getEmpIdcard
()
);
info
=
resultMap
.
get
(
key
);
}
}
else
{
backLog
.
setSocialId
(
backLog
.
getSocialId
()
+
","
+
socialInfo
.
getEmpIdcard
());
...
...
@@ -135,7 +137,8 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
resultMap
=
new
HashMap
<>();
backLog
=
new
TSocialFriendBackLog
();
for
(
TSocialInfo
socialInfo
:
socialYsdList
)
{
info
=
resultMap
.
get
(
socialInfo
.
getEmpIdcard
());
key
=
socialInfo
.
getEmpIdcard
()+
CommonConstants
.
DOWN_LINE_STRING
+
socialInfo
.
getYsdRequestId
();
info
=
resultMap
.
get
(
key
);
if
(
info
==
null
)
{
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
socialInfo
.
getEmpIdcard
());
...
...
@@ -148,9 +151,9 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
,
backLog
,
socialInfo
.
getDispatchType
());
if
(
resultList
!=
null
&&
!
resultList
.
isEmpty
())
{
for
(
FriendResult
result
:
resultList
)
{
resultMap
.
put
(
result
.
getIdCard
(),
result
);
resultMap
.
put
(
result
.
getIdCard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialInfo
.
getYsdRequestId
()
,
result
);
}
info
=
resultMap
.
get
(
socialInfo
.
getEmpIdcard
()
);
info
=
resultMap
.
get
(
key
);
}
logList
.
add
(
backLog
);
}
else
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
View file @
c7e0a529
...
...
@@ -269,7 +269,7 @@ public class DoSocialTask {
* @return
**/
@Async
public
void
pushSoldier
(
String
dispatchId
,
boolean
isFriend
)
{
public
void
pushSoldier
(
String
dispatchId
,
boolean
isFriend
,
String
isSingleAudit
)
{
List
<
String
>
dispatchIdList
=
new
ArrayList
<>();
dispatchIdList
.
add
(
dispatchId
);
try
{
...
...
@@ -280,7 +280,10 @@ public class DoSocialTask {
// 当前默认 安徽省 ,且开关是税友的,才可以税友推送办理
if
(
isFriend
)
{
// 断开派单单条推送税友
// tSocialFriendPushService.pushFriend(dispatchIdList);
// 单个审核接口并且户类型为单个,即时推送税友
if
(
CommonConstants
.
ONE_STRING
.
equals
(
isSingleAudit
))
{
tSocialFriendPushService
.
pushFriend
(
dispatchIdList
);
}
}
else
{
tSocialSoldierPushService
.
pushSoldier
(
dispatchIdList
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
View file @
c7e0a529
...
...
@@ -43,6 +43,7 @@ public class ExcelToImage {
public
R
<
String
>
excelToImg
(
InputStream
inputStream
,
SocialFriendConfig
socialFriendConfig
,
RestTemplate
restTemplate
,
TSocialFriendBackLog
backLog
){
backLog
.
setLogInfo
(
"开始转换excel为图片"
);
if
(
null
==
inputStream
||
null
==
socialFriendConfig
){
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagParamError
);
}
...
...
@@ -61,10 +62,12 @@ public class ExcelToImage {
file
=
new
File
(
projectRoot
+
toImag
);
if
(
file
.
exists
()){
// file 压缩到1M以内
backLog
.
setLogInfo
(
"压缩大小前"
);
file
=
compressImage
(
projectRoot
,
toImag
,
1024
*
1024
);
String
key
=
System
.
currentTimeMillis
()
+
file
.
getName
();
byte
[]
fileContent
=
Files
.
readAllBytes
(
file
.
toPath
());
String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
fileContent
);
backLog
.
setLogInfo
(
"转化为base64String"
);
String
url
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
key
,
base64String
,
backLog
);
if
(
Common
.
isEmpty
(
url
)){
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagOSSError
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/WordToImageWithSeal.java
0 → 100644
View file @
c7e0a529
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
org.apache.pdfbox.pdmodel.PDDocument
;
import
org.apache.pdfbox.rendering.ImageType
;
import
org.apache.pdfbox.rendering.PDFRenderer
;
import
org.jodconverter.core.document.DefaultDocumentFormatRegistry
;
import
org.jodconverter.core.office.OfficeException
;
import
org.jodconverter.core.office.OfficeManager
;
import
org.jodconverter.local.LocalConverter
;
import
org.jodconverter.local.office.LocalOfficeManager
;
import
javax.imageio.ImageIO
;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author hgw2
* @description word转图片
* @date 2025/5/15
*/
public
class
WordToImageWithSeal
{
// 主方法用于测试或外部调用
/*public static void main(String[] args) {
String inputDocx = "D:/test/document.docx";
String sealImagePath = "D:/seal/seal.png";
String outputImagePath = "D:/output/document_with_seal.png";
try {
convertAndAddSeal(inputDocx, sealImagePath, outputImagePath);
System.out.println("转换并加盖公章成功!");
} catch (Exception e) {
e.printStackTrace();
}
}*/
// 在生产环境中,建议在整个应用生命周期中共享一个OfficeManager:
public
static
OfficeManager
OFFICE_MANAGER
;
static
{
OFFICE_MANAGER
=
LocalOfficeManager
.
builder
()
.
portNumbers
(
2002
)
.
build
();
try
{
OFFICE_MANAGER
.
start
();
}
catch
(
OfficeException
e
)
{
e
.
printStackTrace
();
}
}
public
static
void
convertAndAddSeal
(
String
inputDocx
,
InputStream
sealImagePath
,
String
outputImagePath
)
throws
IOException
,
OfficeException
{
// Step 1: Word 转为 PDF(中间格式)
File
pdfFile
=
new
File
(
inputDocx
.
replace
(
".docx"
,
".pdf"
));
/*converter.convert(new File(inputDocx)).as(DocumentType.DOCX)
.to(pdfFile).as(DocumentType.PDF).execute();*/
Map
<
String
,
Object
>
pdfProps
=
new
HashMap
<>();
pdfProps
.
put
(
"FilterName"
,
"writer_pdf_Export"
);
pdfProps
.
put
(
"SelectPdfVersion"
,
1
);
// PDF/A-1
LocalConverter
.
builder
()
.
officeManager
(
OFFICE_MANAGER
)
.
storeProperties
(
pdfProps
)
.
build
()
.
convert
(
new
File
(
inputDocx
))
.
to
(
pdfFile
)
.
execute
();
// Step 2: PDF 转为 PNG 图片(可使用 Apache PDFBox 或 ImageMagick 转换)
BufferedImage
pageImage
=
convertPdfToImage
(
pdfFile
.
getAbsolutePath
());
// Step 3: 加盖公章
BufferedImage
sealedImage
=
addSealToImage
(
pageImage
,
sealImagePath
);
// Step 4: 输出图片
ImageIO
.
write
(
sealedImage
,
"png"
,
new
File
(
outputImagePath
));
//ImageIO.write(sealedImage, "png", new File(outputImagePath));
}
private
static
BufferedImage
convertPdfToImage
(
String
pdfPath
)
throws
IOException
{
try
(
PDDocument
document
=
PDDocument
.
load
(
new
File
(
pdfPath
)))
{
PDFRenderer
pdfRenderer
=
new
PDFRenderer
(
document
);
// 渲染第一页为图像,分辨率为 300 DPI
return
pdfRenderer
.
renderImageWithDPI
(
0
,
300
,
ImageType
.
RGB
);
}
}
private
static
BufferedImage
addSealToImage
(
BufferedImage
image
,
InputStream
sealImagePath
)
throws
IOException
{
BufferedImage
seal
=
ImageIO
.
read
(
sealImagePath
);
BufferedImage
combined
=
new
BufferedImage
(
image
.
getWidth
(),
image
.
getHeight
(),
BufferedImage
.
TYPE_INT_ARGB
);
Graphics2D
g
=
combined
.
createGraphics
();
g
.
drawImage
(
image
,
0
,
0
,
null
);
// 设置公章位置(右下角)
int
x
=
1600
;
int
y
=
1150
;
g
.
drawImage
(
seal
,
x
,
y
,
null
);
g
.
dispose
();
return
combined
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/WordUtil.java
0 → 100644
View file @
c7e0a529
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
org.apache.poi.xwpf.usermodel.*
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.util.Map
;
/**
* @author hgw2
* @description word工具类
* @date 2025/5/15
*/
public
class
WordUtil
{
public
static
void
replaceTextInWord
(
String
filePath
,
String
outputFilePath
,
Map
<
String
,
String
>
replacements
)
throws
IOException
{
try
(
FileInputStream
fis
=
new
FileInputStream
(
filePath
);
XWPFDocument
document
=
new
XWPFDocument
(
fis
))
{
// 替换段落中的文本
for
(
XWPFParagraph
paragraph
:
document
.
getParagraphs
())
{
for
(
String
key
:
replacements
.
keySet
())
{
if
(
paragraph
.
getText
().
contains
(
key
))
{
String
newText
=
paragraph
.
getText
().
replace
(
key
,
replacements
.
get
(
key
));
paragraph
.
getRuns
().
clear
();
XWPFRun
newRun
=
paragraph
.
createRun
();
newRun
.
setText
(
newText
);
}
}
}
String
text
;
// 替换表格中的文本
for
(
XWPFTable
table
:
document
.
getTables
())
{
for
(
XWPFTableRow
row
:
table
.
getRows
())
{
for
(
XWPFTableCell
cell
:
row
.
getTableCells
())
{
for
(
XWPFParagraph
p
:
cell
.
getParagraphs
())
{
for
(
XWPFRun
run
:
p
.
getRuns
())
{
text
=
run
.
getText
(
0
);
if
(
Common
.
isNotNull
(
text
)
&&
replacements
.
get
(
text
)
!=
null
)
{
run
.
setText
(
replacements
.
get
(
text
),
0
);
}
}
}
}
}
}
// 保存输出文件
try
(
FileOutputStream
fos
=
new
FileOutputStream
(
outputFilePath
))
{
document
.
write
(
fos
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
View file @
c7e0a529
...
...
@@ -57,6 +57,7 @@
<result
property=
"isSign"
column=
"IS_SIGN"
/>
<result
property=
"customerNoYsd"
column=
"CUSTOMER_NO_YSD"
/>
<result
property=
"isSingle"
column=
"IS_SINGLE"
/>
<result
property=
"isAutoLeaveDoc"
column=
"IS_AUTO_LEAVE_DOC"
/>
</resultMap>
<resultMap
id=
"sysHouseHoldSingleInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo"
>
...
...
@@ -99,7 +100,8 @@
a.MEDICL_PASSWORD,
a.IS_SIGN,
a.CUSTOMER_NO_YSD,
a.IS_SINGLE
a.IS_SINGLE,
a.IS_AUTO_LEAVE_DOC
</sql>
<sql
id=
"sysHouseHoldInfo_where"
>
<if
test=
"sysHouseHoldInfo != null"
>
...
...
@@ -154,6 +156,9 @@
<if
test=
"sysHouseHoldInfo.updateTime != null"
>
AND a.UPDATE_TIME = #{sysHouseHoldInfo.updateTime}
</if>
<if
test=
"sysHouseHoldInfo.isSign != null and sysHouseHoldInfo.isSign.trim() != ''"
>
AND a.IS_SIGN = #{sysHouseHoldInfo.isSign}
</if>
</if>
</sql>
<!--sysHouseHoldInfo简单分页查询-->
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
c7e0a529
...
...
@@ -2750,4 +2750,16 @@
#{item}
</foreach>
</select>
<select
id=
"getSingleFlagMap"
resultType=
"java.lang.String"
>
select a.id as "dispatchId"
FROM t_dispatch_info a
LEFT JOIN sys_house_hold_info b on a.SOCIAL_HOUSEHOLD_NAME=b.`NAME` and b.TYPE='0'
where a.SOCIAL_HOUSEHOLD_NAME is not null
and b.IS_SINGLE='1'
and a.id in
<foreach
item=
"item"
index=
"index"
collection=
"idsList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFriendMapper.xml
View file @
c7e0a529
...
...
@@ -79,7 +79,9 @@
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown,
a.SCHOOL_NAME byyx
a.SCHOOL_NAME byyx,
a.IS_SINGLE isSingle,
a.ID dispatchId
</sql>
...
...
@@ -221,7 +223,9 @@
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown,
a.SCHOOL_NAME byyx
a.SCHOOL_NAME byyx,
a.IS_SINGLE isSingle,
a.ID dispatchId
<include
refid=
"getSocialSoldierBaseTwo"
/>
and a.type = '1' and s.YSD_HANDLE_STATUS in ('0','1','3')
and (
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
c7e0a529
...
...
@@ -517,6 +517,24 @@ public class UserController {
return
null
;
}
/**
* @Description: 获取用户,根据用户名
* @Author: hgw
* @Date: 2025-5-20 19:44:18
* @return: java.lang.Integer
**/
@Inner
@GetMapping
(
"/inner/getSysUserByUsername"
)
public
SysUser
getSysUserByUsername
(
@RequestParam
(
name
=
"username"
)
String
username
)
{
SysUser
userInfo
=
userService
.
getOne
(
Wrappers
.<
SysUser
>
lambdaQuery
().
eq
(
SysUser:
:
getUsername
,
username
)
.
eq
(
SysUser:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
userInfo
)){
userInfo
.
setPassword
(
null
);
return
userInfo
;
}
return
null
;
}
/**
* @Author fxj
* @Description 通过openId验证是否存在用户
...
...
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