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
37452b3a
Commit
37452b3a
authored
Sep 15, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
53c6c67a
3a9956cc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
69 changed files
with
1621 additions
and
834 deletions
+1621
-834
TCertRecord.java
.../yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
+6
-0
TSettleDomain.java
...ifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
+1
-1
EmployeeContractUpdateVO.java
...ud/plus/v1/yifu/archives/vo/EmployeeContractUpdateVO.java
+0
-5
EmployeeProjectExportVO.java
...oud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
+2
-1
TCertRecordVo.java
...om/yifu/cloud/plus/v1/yifu/archives/vo/TCertRecordVo.java
+6
-1
TCertRecordController.java
...us/v1/yifu/archives/controller/TCertRecordController.java
+16
-1
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+0
-1
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+30
-131
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+15
-2
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+2
-2
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+2
-3
TCertRecordServiceImpl.java
...v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
+7
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+5
-5
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+4
-4
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+0
-8
TCertRecordMapper.xml
...hives-biz/src/main/resources/mapper/TCertRecordMapper.xml
+1
-0
TCutsomerDataPermissonMapper.xml
...rc/main/resources/mapper/TCutsomerDataPermissonMapper.xml
+1
-1
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+17
-2
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+8
-1
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+3
-4
YifuClientLoginSuccessHandler.java
...s.v1/yifu/auth/handler/YifuClientLoginSuccessHandler.java
+1
-1
application.yml
yifu-auth/src/main/resources/application.yml
+0
-4
ChecksUtil.java
...n/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
+16
-4
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+4
-0
ValidityConstants.java
....plus.v1/yifu/common/core/constant/ValidityConstants.java
+2
-0
pom.xml
yifu-common/yifu-common-dapr/pom.xml
+4
-1
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+0
-14
MenuUtil.java
...om/yifu/cloud/plus/v1/yifu/common/dapr/util/MenuUtil.java
+127
-0
spring.factories
...-common-dapr/src/main/resources/META-INF/spring.factories
+1
-0
EkpFundUtil.java
...ava/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpFundUtil.java
+0
-1
EkpIncomeUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
+0
-2
EkpInsuranceUtil.java
...om/yifu.cloud.plus.v1/yifu/ekp/util/EkpInsuranceUtil.java
+3
-12
EkpSocialUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSocialUtil.java
+0
-1
EkpIncomeParamManage.java
.../yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamManage.java
+4
-0
EkpIncomeParamRisk.java
...om/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamRisk.java
+4
-0
BaseEntity.java
...fu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
+12
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+20
-0
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+6
-0
BigDecimalUtils.java
...u/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
+14
-12
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+12
-12
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+5
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+340
-133
TInsuranceEnclosureServiceImpl.java
...ervice/insurance/impl/TInsuranceEnclosureServiceImpl.java
+3
-4
application.yml
...es/yifu-insurances-biz/src/main/resources/application.yml
+0
-1
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+4
-0
TConfigSalaryController.java
...us/v1/yifu/salary/controller/TConfigSalaryController.java
+1
-1
TConfigSalaryService.java
...oud/plus/v1/yifu/salary/service/TConfigSalaryService.java
+2
-1
TConfigSalaryServiceImpl.java
...v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
+6
-9
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+1
-1
TPaymentInfo.java
...m/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
+8
-0
IncomeExportVo.java
...com/yifu/cloud/plus/v1/yifu/social/vo/IncomeExportVo.java
+1
-8
TIncomeSearchVo.java
...om/yifu/cloud/plus/v1/yifu/social/vo/TIncomeSearchVo.java
+6
-0
OTAStrategyShardingAlgorithm.java
...s/v1/yifu/social/config/OTAStrategyShardingAlgorithm.java
+0
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+14
-0
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+2
-0
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+4
-0
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+8
-0
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+2
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+15
-37
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+99
-88
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+392
-20
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+305
-278
TIncomeMapper.xml
...fu-social-biz/src/main/resources/mapper/TIncomeMapper.xml
+0
-1
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+9
-0
TSocialFundInfoMapper.xml
...l-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
+4
-0
UserController.java
...u.cloud.plus.v1/yifu/admin/controller/UserController.java
+20
-1
SysDataAuthServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDataAuthServiceImpl.java
+8
-8
application.yml
yifu-upms/yifu-upms-biz/src/main/resources/application.yml
+0
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
View file @
37452b3a
...
...
@@ -70,6 +70,12 @@ public class TCertRecord extends BaseEntity {
private
String
empIdcard
;
/**
* 项目id
*/
@ExcelAttribute
(
name
=
"项目id"
)
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
View file @
37452b3a
...
...
@@ -348,7 +348,7 @@ public class TSettleDomain extends BaseEntity {
@Schema
(
description
=
"公积金类型0:缴费库;1:预估库"
)
private
String
fundType
;
/**
* 商险结算类型0 合并
1 单独
* 商险结算类型0 合并
(预估) 1 单独(实缴)
*/
@ExcelAttribute
(
name
=
"商险结算类型0 合并 1 单独"
)
@ExcelProperty
(
"商险结算类型0 合并 1 单独"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractUpdateVO.java
View file @
37452b3a
...
...
@@ -16,18 +16,13 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* 员工合同-批量更新的VO
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
View file @
37452b3a
...
...
@@ -22,6 +22,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -38,7 +39,7 @@ import java.util.List;
*/
@Data
@ColumnWidth
(
15
)
public
class
EmployeeProjectExportVO
{
public
class
EmployeeProjectExportVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCertRecordVo.java
View file @
37452b3a
...
...
@@ -37,7 +37,12 @@ public class TCertRecordVo implements Serializable {
@ExcelAttribute
(
name
=
"员工身份证"
)
@Schema
(
description
=
"员工身份证"
)
private
String
empIdcard
;
/**
* 项目id
*/
@ExcelAttribute
(
name
=
"项目id"
)
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 项目名称
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCertRecordController.java
View file @
37452b3a
...
...
@@ -23,8 +23,13 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCertRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -50,7 +55,7 @@ import java.util.List;
public
class
TCertRecordController
{
private
final
TCertRecordService
tCertRecordService
;
private
final
MenuUtil
menuUtil
;
/**
* 分页查询
* @param page 分页对象
...
...
@@ -61,6 +66,11 @@ public class TCertRecordController {
@GetMapping
(
"/page"
)
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public
R
<
IPage
<
TCertRecord
>>
getTCertRecordPage
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
searchVo
);
return
R
.
ok
(
tCertRecordService
.
pageDiy
(
page
,
searchVo
));
}
/**
...
...
@@ -72,6 +82,11 @@ public class TCertRecordController {
@GetMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public
R
<
List
<
TCertRecord
>>
getTCertRecordNoPage
(
CertRecordSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
searchVo
);
return
R
.
ok
(
tCertRecordService
.
getTCertRecordNoPage
(
searchVo
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
37452b3a
...
...
@@ -19,7 +19,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
37452b3a
...
...
@@ -20,18 +20,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.
HttpDapr
Util
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.
Menu
Util
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
...
...
@@ -40,9 +37,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
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.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -68,10 +62,7 @@ public class TEmployeeInfoController {
private
final
TEmployeeInfoService
tEmployeeInfoService
;
// 缓存信息
private
final
CacheManager
cacheManager
;
private
final
DaprUpmsProperties
daprUpmsProperties
;
private
final
MenuUtil
menuUtil
;
/**
* 分页查询
...
...
@@ -87,67 +78,14 @@ public class TEmployeeInfoController {
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
// 普通用户:
if
(
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
// 菜单id
String
menuId
=
"1536922631616278529"
;
String
linkId
=
user
.
getId
();
int
linkType
=
1
;
// 用户
SysDataAuth
sysDataAuth
=
new
SysDataAuth
();
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
// 获取缓存菜单权限的步骤:
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
Object
obj
=
null
;
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
TEmployeeInfo
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
linkId
=
user
.
getUserGroup
();
linkType
=
0
;
// 用户组
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
TEmployeeInfo
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
}
}
}
}
}
if
(
Common
.
isNotNull
(
obj
))
{
SimpleValueWrapper
objs
=
(
SimpleValueWrapper
)
obj
;
if
(
objs
!=
null
)
{
String
sql
=
String
.
valueOf
(
objs
.
get
());
if
(
sql
.
contains
(
"#deptId"
))
{
// TODO - 需要关联部门表
}
if
(
sql
.
contains
(
"#create_by"
))
{
sql
=
sql
.
replace
(
"#create_by"
,
user
.
getId
());
}
if
(
sql
.
contains
(
"#settleDomainId"
))
{
// TODO - 获取人员项目权限
// sql = sql.replace("#settleDomainId", ",'1','2' ")
sql
=
sql
.
replace
(
"or a.settle_domain_id in ('0'#settleDomainId) "
,
""
);
}
if
(
sql
.
contains
(
"#deptId"
))
{
// TODO - 获取人员部门权限
// sql = sql.replace("#settleDomainId", ",'1','2' ")
sql
=
sql
.
replace
(
" or dept.dept_id = #deptId "
,
""
);
}
return
R
.
ok
(
tEmployeeInfoService
.
getPage
(
page
,
tEmployeeInfo
,
sql
));
}
}
if
(
Common
.
isEmpty
(
tEmployeeInfo
.
getMId
()))
{
tEmployeeInfo
.
setMId
(
"1536922631616278529"
);
}
return
R
.
ok
(
tEmployeeInfoService
.
getPage
(
page
,
tEmployeeInfo
,
null
));
menuUtil
.
setAuthSql
(
user
,
tEmployeeInfo
);
if
(
Common
.
isNotNull
(
tEmployeeInfo
.
getAuthSql
())
&&
tEmployeeInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tEmployeeInfo
.
setAuthSql
(
tEmployeeInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"b.id"
));
}
return
R
.
ok
(
tEmployeeInfoService
.
getPage
(
page
,
tEmployeeInfo
));
}
/**
...
...
@@ -164,67 +102,14 @@ public class TEmployeeInfoController {
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
// 普通用户:
if
(
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
// 菜单id
String
menuId
=
"1536952884128591873"
;
String
linkId
=
user
.
getId
();
int
linkType
=
1
;
// 用户
SysDataAuth
sysDataAuth
=
new
SysDataAuth
();
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
// 获取缓存菜单权限的步骤:
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
Object
obj
=
null
;
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
TEmployeeInfo
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
linkId
=
user
.
getUserGroup
();
linkType
=
0
;
// 用户组
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
TEmployeeInfo
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
}
}
}
}
}
if
(
Common
.
isNotNull
(
obj
))
{
SimpleValueWrapper
objs
=
(
SimpleValueWrapper
)
obj
;
if
(
objs
!=
null
)
{
String
sql
=
String
.
valueOf
(
objs
.
get
());
if
(
sql
.
contains
(
"#deptId"
))
{
// TODO - 需要关联部门表
}
if
(
sql
.
contains
(
"#create_by"
))
{
sql
=
sql
.
replace
(
"#create_by"
,
user
.
getId
());
}
if
(
sql
.
contains
(
"#settleDomainId"
))
{
// TODO - 获取人员项目权限
// sql = sql.replace("#settleDomainId", ",'1','2' ")
sql
=
sql
.
replace
(
"or a.settle_domain_id in ('0'#settleDomainId) "
,
""
);
}
if
(
sql
.
contains
(
"#deptId"
))
{
// TODO - 获取人员部门权限
// sql = sql.replace("#settleDomainId", ",'1','2' ")
sql
=
sql
.
replace
(
" or dept.dept_id = #deptId "
,
""
);
}
return
R
.
ok
(
tEmployeeInfoService
.
getLeavePage
(
page
,
tEmployeeInfo
,
sql
));
}
}
if
(
Common
.
isEmpty
(
tEmployeeInfo
.
getMId
()))
{
tEmployeeInfo
.
setMId
(
"1536952884128591873"
);
}
return
R
.
ok
(
tEmployeeInfoService
.
getLeavePage
(
page
,
tEmployeeInfo
,
null
));
menuUtil
.
setAuthSql
(
user
,
tEmployeeInfo
);
if
(
Common
.
isNotNull
(
tEmployeeInfo
.
getAuthSql
())
&&
tEmployeeInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tEmployeeInfo
.
setAuthSql
(
tEmployeeInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"b.id"
));
}
return
R
.
ok
(
tEmployeeInfoService
.
getLeavePage
(
page
,
tEmployeeInfo
));
}
...
...
@@ -418,6 +303,13 @@ public class TEmployeeInfoController {
// @ResponseExcel
@PostMapping
(
"/exportEmployee"
)
public
void
exportEmployee
(
@RequestBody
(
required
=
false
)
TEmployeeInfo
employeeInfo
,
HttpServletResponse
response
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
employeeInfo
);
if
(
Common
.
isNotNull
(
employeeInfo
.
getAuthSql
())
&&
employeeInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
employeeInfo
.
setAuthSql
(
employeeInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"b.id"
));
}
}
tEmployeeInfoService
.
exportEmployee
(
employeeInfo
,
response
);
}
...
...
@@ -432,6 +324,13 @@ public class TEmployeeInfoController {
// @ResponseExcel
@PostMapping
(
"/exportLeaveEmployee"
)
public
void
exportLeaveEmployee
(
@RequestBody
(
required
=
false
)
TEmployeeInfo
employeeInfo
,
HttpServletResponse
response
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
employeeInfo
);
if
(
Common
.
isNotNull
(
employeeInfo
.
getAuthSql
())
&&
employeeInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
employeeInfo
.
setAuthSql
(
employeeInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"b.id"
));
}
}
tEmployeeInfoService
.
exportLeaveEmployee
(
employeeInfo
,
response
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
37452b3a
...
...
@@ -22,15 +22,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDispatchAddVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmpVo
;
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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -59,6 +61,8 @@ public class TEmployeeProjectController {
private
final
TEmployeeProjectService
tEmployeeProjectService
;
private
final
MenuUtil
menuUtil
;
/**
* @param empId 人员档案id
* @Description: 根据人员档案id获取项目list
...
...
@@ -84,6 +88,11 @@ public class TEmployeeProjectController {
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TEmployeeProject
>>
getTEmployeeProjectPage
(
Page
page
,
TEmployeeProject
tEmployeeProject
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
tEmployeeProject
);
return
R
.
ok
(
tEmployeeProjectService
.
getTEmployeeProjectInfoPage
(
page
,
tEmployeeProject
));
}
...
...
@@ -254,6 +263,10 @@ public class TEmployeeProjectController {
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
@RequestParam
(
name
=
"idstr"
,
required
=
false
)
String
idstr
,
@RequestBody
List
<
String
>
exportFields
,
EmployeeProjectExportVO
projectDTO
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
projectDTO
);
}
tEmployeeProjectService
.
listExportProject
(
response
,
projectDTO
,
idstr
,
exportFields
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
37452b3a
...
...
@@ -39,9 +39,9 @@ import java.util.List;
@Mapper
public
interface
TEmployeeInfoMapper
extends
BaseMapper
<
TEmployeeInfo
>
{
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"sql"
)
String
sql
);
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"sql"
)
String
sql
);
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
List
<
TEmployeeInfo
>
getList
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
37452b3a
...
...
@@ -24,7 +24,6 @@ import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.validation.BindingResult
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
...
...
@@ -47,7 +46,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
* @Date: 2022/6/20 20:46
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
);
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
);
/**
* @Description: 离职库分页
...
...
@@ -55,7 +54,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
* @Date: 2022/7/4 17:38
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
);
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
);
/**
* @param employeeInfo
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
View file @
37452b3a
...
...
@@ -92,6 +92,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
vo
.
setPost
(
project
.
getPost
());
vo
.
setProjectName
(
project
.
getDeptName
());
vo
.
setProjectCode
(
project
.
getDeptNo
());
vo
.
setDeptId
(
project
.
getDeptId
());
// 最新合同时间
if
(
Common
.
isNotNull
(
last
)){
if
(
Common
.
isNotNull
(
last
.
getContractStart
())){
...
...
@@ -121,6 +122,9 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
@Override
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
());
}
wrapper
.
orderByDesc
(
TCertRecord:
:
getCreateTime
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
...
...
@@ -132,6 +136,9 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TCertRecord:
:
getId
,
idList
);
}
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
());
}
return
baseMapper
.
selectList
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
CertRecordSearchVo
entity
){
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
37452b3a
...
...
@@ -17,7 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
Factory
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
...
...
@@ -609,7 +609,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
EmployeeContractUpdateVO
.
class
,
new
ReadListener
<
EmployeeContractUpdateVO
>()
{
EasyExcel
Factory
.
read
(
inputStream
,
EmployeeContractUpdateVO
.
class
,
new
ReadListener
<
EmployeeContractUpdateVO
>()
{
/**
* 单次缓存的数据量
*/
...
...
@@ -728,7 +728,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
EmployeeContractVO
.
class
,
new
ReadListener
<
EmployeeContractVO
>()
{
EasyExcel
Factory
.
read
(
inputStream
,
EmployeeContractVO
.
class
,
new
ReadListener
<
EmployeeContractVO
>()
{
/**
* 单次缓存的数据量
*/
...
...
@@ -925,7 +925,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
response
.
setCharacterEncoding
(
CommonConstants
.
UTF8
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
).
includeColumnFiledNames
(
contractInfo
.
getExportFields
())
EasyExcel
Factory
.
write
(
out
,
EmployeeContractExportVO
.
class
).
includeColumnFiledNames
(
contractInfo
.
getExportFields
())
.
sheet
(
"员工合同"
).
doWrite
(
list
);
out
.
flush
();
}
catch
(
Exception
e
)
{
...
...
@@ -965,7 +965,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
response
.
setCharacterEncoding
(
CommonConstants
.
UTF8
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
).
includeColumnFiledNames
(
contractInfo
.
getExportFields
())
EasyExcel
Factory
.
write
(
out
,
EmployeeContractExportVO
.
class
).
includeColumnFiledNames
(
contractInfo
.
getExportFields
())
.
sheet
(
"员工合同【合并历史】"
).
doWrite
(
list
);
out
.
flush
();
}
catch
(
Exception
e
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
37452b3a
...
...
@@ -88,13 +88,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
@Override
public
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
)
{
return
baseMapper
.
getPage
(
page
,
employeeInfo
,
sql
);
public
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
)
{
return
baseMapper
.
getPage
(
page
,
employeeInfo
);
}
@Override
public
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
)
{
return
baseMapper
.
getLeavePage
(
page
,
employeeInfo
,
sql
);
public
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
)
{
return
baseMapper
.
getLeavePage
(
page
,
employeeInfo
);
}
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
37452b3a
...
...
@@ -1419,14 +1419,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
str
;
}
public
boolean
saveCheck
(
EmployeeXProjectVO
employeeXProjectVO
,
TEmployeeProject
tEmployeeProject
)
{
if
(
employeeXProjectVO
.
getDeptNo
().
equals
(
tEmployeeProject
.
getDeptNo
())
&&
employeeXProjectVO
.
getEmpIdcard
().
equals
(
tEmployeeProject
.
getEmpIdcard
()))
{
return
true
;
}
return
false
;
}
/**
* @Description: 更新社保公积金状态 : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
* 派增:
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCertRecordMapper.xml
View file @
37452b3a
...
...
@@ -50,5 +50,6 @@
<result
property=
"openTime"
column=
"OPEN_TIME"
/>
<result
property=
"introductionUnit"
column=
"INTRODUCTION_UNIT"
/>
<result
property=
"socialTime"
column=
"SOCIAL_TIME"
/>
<result
property=
"deptId"
column=
"DEPT_ID"
/>
</resultMap>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCutsomerDataPermissonMapper.xml
View file @
37452b3a
...
...
@@ -126,7 +126,7 @@
FROM t_cutsomer_data_permisson a
WHERE 1=1
AND SETTLE_DOMAIN_ID IS NOT NULL
AND BE_PERMISSON_USER =
${userId}
AND BE_PERMISSON_USER =
'${userId}'
</select>
<select
id=
"getCustomerServiceByid"
resultType=
"java.lang.String"
>
SELECT
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
37452b3a
...
...
@@ -491,9 +491,16 @@
select
<include
refid=
"baseParam"
/>
from t_employee_info a
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.id') "
>
left join t_employee_project b on a.id=b.EMP_ID
</if>
where a.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
${sql}
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
and b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
</if>
GROUP BY a.id
order by a.CREATE_TIME desc
</select>
...
...
@@ -513,7 +520,9 @@
left join t_employee_project b on a.id = b.EMP_ID
where a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
${sql}
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
group by a.id order by a.CREATE_TIME desc
) b
where 1=1
...
...
@@ -624,6 +633,9 @@
<where>
a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
</select>
...
...
@@ -644,6 +656,9 @@
<where>
a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
) b
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
37452b3a
...
...
@@ -780,7 +780,10 @@
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include
refid=
"tEmployeeProject_where"
/>
<include
refid=
"tEmployeeProject_where"
/>
<if
test=
"tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''"
>
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
...
...
@@ -793,6 +796,10 @@
<where>
a.DELETE_FLAG = '0'
<include
refid=
"exportTEmployeeProject_where"
/>
<if
test=
"tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''"
>
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
37452b3a
...
...
@@ -249,9 +249,9 @@
a.DEPART_NO,
a.DEPART_NAME,
a.INSURANCE_SETTLE_TYPE,
c.
ID AS 'customerId',
c
.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE
as 'customerCode',
a.CUSTOMER_
ID AS 'customerId',
a
.CUSTOMER_NAME as 'customerName',
a.CUSTOMER_NO
as 'customerCode',
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
...
...
@@ -259,7 +259,6 @@
a.INVOICE_TITLE_SALARY,
a.INVOICE_TITLE_INSURANCE
FROM t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where 1=1
<if
test=
"codes != null and codes.size() > 0"
>
and a.DEPART_NO in
...
...
yifu-auth/src/main/java/com/yifu.cloud.plus.v1/yifu/auth/handler/YifuClientLoginSuccessHandler.java
View file @
37452b3a
...
...
@@ -112,7 +112,7 @@ public class YifuClientLoginSuccessHandler implements AuthenticationSuccessHandl
//非管理员获取 b端项目权限
/*if(ServiceNameConstants.CLIENT_ID_HR_B.equals(clientId) && !SecurityUtils.isHaveAllOrg(clientId,user)){
if(Common.isEmpty(user.getSettleIdList())){
throw new InvalidException("该用户("+user.getNickName()+")没有项目权限!请联系管理员开通!")
;
throw new InvalidException("该用户("+user.getNickName()+")没有项目权限!请联系管理员开通!")
}
}*/
...
...
yifu-auth/src/main/resources/application.yml
View file @
37452b3a
...
...
@@ -47,10 +47,6 @@ security:
-
/v3/api-docs
-
/actuator/**
-
/swagger-ui/**
-
/**/insuranceDetail/updateInsuranceSettle
-
/**/insuranceDetail/urgentUpdateIsUse
-
/insuranceDetail/urgentUpdateIsUse
-
/insuranceDetail/updateInsuranceSettle
# Spring 相关
...
...
yifu-check/yifu-check-api/src/main/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
View file @
37452b3a
...
...
@@ -194,7 +194,10 @@ public class ChecksUtil {
params
.
put
(
ChecksConstants
.
ID_NUM
,
idNum
);
String
result
=
HttpUtils
.
post
(
API_URL
,
params
);
// 解析json,并返回结果
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
if
(
Common
.
isNotNull
(
result
)){
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
}
return
null
;
}
/**
...
...
@@ -210,7 +213,10 @@ public class ChecksUtil {
params
.
put
(
ChecksConstants
.
MOBILES
,
mobiles
);
String
result
=
HttpUtils
.
post
(
API_URL_MOBILE
,
params
);
// 解析json,并返回结果
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
if
(
Common
.
isNotNull
(
result
)){
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
}
return
null
;
}
private
static
JsonObject
invokeBankNo
(
String
name
,
String
idNum
,
String
cardNo
,
String
mobile
)
{
...
...
@@ -225,7 +231,10 @@ public class ChecksUtil {
}
String
result
=
HttpUtils
.
post
(
API_URL_BANK_NO
,
params
);
// 解析json,并返回结果
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
if
(
Common
.
isNotNull
(
result
)){
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
}
return
null
;
}
private
static
JsonObject
invokeBankNoTwoAuth
(
String
name
,
String
cardNo
)
{
...
...
@@ -236,6 +245,9 @@ public class ChecksUtil {
params
.
put
(
ChecksConstants
.
CARD_NO
,
cardNo
);
String
result
=
HttpUtils
.
post
(
API_URL_BANK_NO_TWO
,
params
);
// 解析json,并返回结果
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
if
(
Common
.
isNotNull
(
result
)){
return
jsonParser
.
parse
(
result
).
getAsJsonObject
();
}
return
null
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
37452b3a
...
...
@@ -328,6 +328,8 @@ public interface CommonConstants {
String
PARAM_IS_NOT_ERROR
=
"传参异常,请检查参数"
;
int
EXCEL_EXPORT_LIMIT
=
60000
;
String
USER
=
"用户"
;
/**
* multipart/form-data
* @Author fxj
...
...
@@ -490,4 +492,6 @@ public interface CommonConstants {
public
static
final
String
XLSX
=
".xlsx"
;
public
static
final
String
ERROR_IMPORT
=
"执行异常"
;
// 权限使用的
public
static
final
String
A_DEPT_ID
=
"a.dept_id"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ValidityConstants.java
View file @
37452b3a
...
...
@@ -69,6 +69,8 @@ public class ValidityConstants {
/** 最多200位 规则 */
public
static
final
String
PATTERN_200
=
"[\\s\\S]{1,200}$"
;
public
static
String
NUMBER_OF_DECIMAL_PLACE
=
"^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$"
;
/** 不超过两位小数的正数 */
public
static
final
String
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
=
"^[+]?([0-9]+(.[0-9]{1,2})?)$"
;
/** 身份证规则(x只能大写) */
...
...
yifu-common/yifu-common-dapr/pom.xml
View file @
37452b3a
...
...
@@ -12,7 +12,10 @@
<artifactId>
yifu-common-dapr
</artifactId>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-common-mybatis
</artifactId>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-upms-api
</artifactId>
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
37452b3a
...
...
@@ -31,20 +31,6 @@ import java.util.Map;
public
class
ArchivesDaprUtil
{
@Autowired
private
DaprArchivesProperties
daprArchivesProperties
;
/**
* @Author fxj
* @Description 获取登录用户对应的计算主体权限
* @Date 21:15 2022/7/18
* @Param
* @return
**/
public
R
<
List
<
String
>>
getSettleDomainIdsByUserId
(){
R
<
List
<
String
>>
res
=
HttpDaprUtil
.
invokeMethodGet
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleDomainIdsByUserId"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取用户项目权限失败!"
);
}
return
res
;
}
/**
* @Author fxj
* @Description 获取派单校验需要的档案信息
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/MenuUtil.java
0 → 100644
View file @
37452b3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
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.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.support.SimpleValueWrapper
;
/**
* @author hgw
* 2022-9-13 16:14:34
* @Description 公共获取菜单权限的工具
*/
@EnableConfigurationProperties
({
DaprUpmsProperties
.
class
,
DaprArchivesProperties
.
class
})
@RequiredArgsConstructor
@Slf4j
public
class
MenuUtil
{
// 缓存信息
private
final
CacheManager
cacheManager
;
private
final
DaprUpmsProperties
daprUpmsProperties
;
private
final
DaprArchivesProperties
daprArchivesProperties
;
private
static
final
String
START_STR
=
"start"
;
public
void
setAuthSql
(
YifuUser
user
,
BaseEntity
entity
)
{
// 普通用户:
if
(
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
// 菜单id
String
menuId
=
entity
.
getMId
();
if
(
Common
.
isNotNull
(
menuId
))
{
String
linkId
=
user
.
getId
();
int
linkType
=
1
;
// 用户
SysDataAuth
sysDataAuth
=
new
SysDataAuth
();
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
// 获取缓存菜单权限的步骤:
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
Object
obj
=
null
;
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
SysDataAuth
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
linkId
=
user
.
getUserGroup
();
linkType
=
0
;
// 用户组
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
SysDataAuth
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
}
}
}
}
}
if
(
Common
.
isNotNull
(
obj
))
{
SimpleValueWrapper
objs
=
(
SimpleValueWrapper
)
obj
;
if
(
objs
!=
null
)
{
String
sql
=
String
.
valueOf
(
objs
.
get
());
if
(
sql
.
contains
(
"#create_by"
))
{
sql
=
sql
.
replace
(
"#create_by"
,
user
.
getId
());
}
if
(
sql
.
contains
(
"#settleDomainId"
))
{
// 获取人员项目权限
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
()
,
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleDomainIdsByUserId"
,
user
.
getId
(),
TSettleDomainListVo
.
class
,
SecurityConstants
.
FROM_IN
);
StringBuilder
deptStr
=
new
StringBuilder
();
if
(
res
!=
null
&&
CommonConstants
.
SUCCESS
!=
res
.
getCode
()
&&
res
.
getData
()
!=
null
&&
res
.
getData
().
getDeptIds
()
!=
null
&&
!
res
.
getData
().
getDeptIds
().
isEmpty
())
{
for
(
String
deptId
:
res
.
getData
().
getDeptIds
())
{
deptStr
.
append
(
",'"
).
append
(
deptId
).
append
(
"'"
);
}
}
//sql = sql.replace("or a.settle_domain_id in ('0'#settleDomainId) ", "")
sql
=
sql
.
replace
(
"#settleDomainId"
,
deptStr
.
toString
());
}
String
userIds
=
"0"
;
if
(
sql
.
contains
(
START_STR
))
{
String
deptIds
=
StringUtils
.
substringBetween
(
sql
,
START_STR
,
"end"
);
R
<
String
>
userIdR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
()
,
daprUpmsProperties
.
getAppId
(),
"/user/inner/getUserIdByDeptIds"
,
deptIds
,
String
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
userIdR
!=
null
&&
CommonConstants
.
SUCCESS
==
userIdR
.
getCode
())
{
userIds
=
userIdR
.
getData
();
}
sql
=
sql
.
replace
(
START_STR
,
""
).
replace
(
"end"
,
""
)
.
replace
(
deptIds
,
userIds
);
}
if
(
sql
.
contains
(
"#deptId"
))
{
R
<
String
>
userIdR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
()
,
daprUpmsProperties
.
getAppId
(),
"/user/inner/getUserIdByDeptIds"
,
String
.
valueOf
(
user
.
getDeptId
()),
String
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
userIdR
!=
null
&&
CommonConstants
.
SUCCESS
==
userIdR
.
getCode
())
{
userIds
=
userIdR
.
getData
();
}
sql
=
sql
.
replace
(
"#deptId"
,
userIds
);
//sql = sql.replace(" or dept.dept_id = #deptId ", "")
}
entity
.
setAuthSql
(
sql
);
}
}
}
}
}
}
yifu-common/yifu-common-dapr/src/main/resources/META-INF/spring.factories
View file @
37452b3a
...
...
@@ -3,4 +3,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpFundUtil.java
View file @
37452b3a
...
...
@@ -47,7 +47,6 @@ public class EkpFundUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
View file @
37452b3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
cn.hutool.json.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpIncomeProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
io.micrometer.core.instrument.util.StringUtils
;
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpInsuranceUtil.java
View file @
37452b3a
...
...
@@ -38,28 +38,19 @@ public class EkpInsuranceUtil {
* 注意key的书写格式,类似EL表达式的方式,属性关系用'.', 列表和数组关系用[],Map关系用["xxx"]
*/
public
String
sendToEkp
(
EkpInteractiveParam
param
){
log
.
info
(
"推送EKP开始"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
EKPInsurancePushParam
pushParam
=
insuranceDetail2PushParam
(
param
);
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
pushParam
);
log
.
info
(
"formValues:"
+
formValues
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
loginName
.
append
(
"LoginName"
,
ekpInsuranceProperties
.
getInsuranceLoginName
());
String
loginData
=
new
ObjectMapper
().
writeValueAsString
(
loginName
);
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") );
wholeForm
.
add
(
"docSubject"
,
ekpInsuranceProperties
.
getInsuranceFocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
//wholeForm.add("docCreator", loginData);
wholeForm
.
add
(
"docStatus"
,
ekpInsuranceProperties
.
getInsuranceDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpInsuranceProperties
.
getInsuranceFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpInsuranceProperties
.
getInsuranceFdFlowId
());
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
...
...
@@ -67,14 +58,14 @@ public class EkpInsuranceUtil {
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
log
.
info
(
"推送EKP开始,formValues:"
+
formValues
);
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpInsuranceProperties
.
getInsuranceUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
log
.
info
(
"obj:"
+
obj
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
"交易失败
"
+
body
);
log
.
error
(
"交易失败
:"
+
obj
);
return
null
;
}
else
{
log
.
info
(
"交易成功:"
+
body
);
log
.
info
(
"交易成功:"
+
obj
);
return
body
;
}
}
catch
(
Exception
e
){
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSocialUtil.java
View file @
37452b3a
...
...
@@ -47,7 +47,6 @@ public class EkpSocialUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamManage.java
View file @
37452b3a
...
...
@@ -26,4 +26,8 @@ public class EkpIncomeParamManage extends EkpIncomeParam {
* 收款单号
**/
private
String
fd_3aeae58b14691c
;
/**
* 管理费ID
**/
private
String
fd_3b13dae9bd70f8
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamRisk.java
View file @
37452b3a
...
...
@@ -26,4 +26,8 @@ public class EkpIncomeParamRisk extends EkpIncomeParam {
* 收款单号
**/
private
String
fd_3aeae59b70fe5a
;
/**
* 风险金ID
**/
private
String
fd_3b13dac4c03022
;
}
yifu-common/yifu-common-mybatis/src/main/java/com/yifu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
View file @
37452b3a
...
...
@@ -64,5 +64,17 @@ public class BaseEntity implements Serializable {
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@ExcelIgnore
private
LocalDateTime
updateTime
;
/**
* 菜单ID 获取查询权限使用
*/
@TableField
(
exist
=
false
)
private
String
mId
;
/**
* 权限sql
*/
@TableField
(
exist
=
false
)
@ExcelIgnore
private
String
authSql
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
37452b3a
...
...
@@ -1096,6 +1096,26 @@ public class InsurancesConstants {
*/
public
static
final
String
SETTLE_ID_ATYPISM
=
"结算id不一致"
;
/**
* 获取项目信息失败
*/
public
static
final
String
GET_DEPT_DETAIL_ERROR
=
"获取项目信息失败:"
;
/**
* 获取项目信息失败
*/
public
static
final
String
ERROR_LIST
=
"errorList"
;
/**
* 获取项目信息失败
*/
public
static
final
String
SUCCESS_LIST
=
"successList"
;
/**
* OSS文件上传接口异常:
*/
public
static
final
String
OSS_ERROR
=
"OSS文件上传接口异常:"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
37452b3a
...
...
@@ -47,6 +47,12 @@ public class TInsuranceDetail extends BaseEntity {
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
/**
* 项目id
*/
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 投保岗位
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
View file @
37452b3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
com.google.common.base.Optional
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants
;
import
java.math.BigDecimal
;
import
java.util.regex.Matcher
;
...
...
@@ -13,7 +15,6 @@ import java.util.regex.Pattern;
* @Description 提供精确的浮点数运算(包括加、减、乘、除、四舍五入)工具类
**/
public
class
BigDecimalUtils
{
static
Pattern
p
=
Pattern
.
compile
(
"^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$"
);
/**
* BigDecimal的加法运算封装
* @author : shijing
...
...
@@ -50,7 +51,7 @@ public class BigDecimalUtils {
Integer
r
=
b1
;
if
(
null
!=
bn
)
{
for
(
Integer
b
:
bn
)
{
r
+=
Optional
.
fromNullable
(
b
).
or
(
0
);
r
+=
Optional
.
fromNullable
(
b
).
or
(
CommonConstants
.
ZERO_INT
);
}
}
return
r
>
0
?
r
:
0
;
...
...
@@ -87,7 +88,7 @@ public class BigDecimalUtils {
r
=
r
.
subtract
((
null
==
b
?
BigDecimal
.
ZERO
:
b
));
}
}
return
isZero
?
(
r
.
compareTo
(
BigDecimal
.
ZERO
)
==
-
1
?
BigDecimal
.
ZERO
:
r
)
:
r
;
return
isZero
?
(
r
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT_NEGATE
?
BigDecimal
.
ZERO
:
r
)
:
r
;
}
/**
...
...
@@ -105,10 +106,10 @@ public class BigDecimalUtils {
Integer
r
=
b1
;
if
(
null
!=
bn
)
{
for
(
Integer
b
:
bn
)
{
r
-=
Optional
.
fromNullable
(
b
).
or
(
0
);
r
-=
Optional
.
fromNullable
(
b
).
or
(
CommonConstants
.
ZERO_INT
);
}
}
return
null
!=
r
&&
r
>
0
?
r
:
0
;
return
null
!=
r
&&
r
>
CommonConstants
.
ZERO_INT
?
r
:
CommonConstants
.
ZERO_INT
;
}
/**
...
...
@@ -151,7 +152,7 @@ public class BigDecimalUtils {
return
defaultValue
;
}
try
{
return
BigDecimal
.
valueOf
(
b1
.
doubleValue
()).
divide
(
BigDecimal
.
valueOf
(
b2
.
doubleValue
()),
2
,
BigDecimal
.
ROUND_HALF_UP
);
return
BigDecimal
.
valueOf
(
b1
.
doubleValue
()).
divide
(
BigDecimal
.
valueOf
(
b2
.
doubleValue
()),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
...
...
@@ -190,7 +191,7 @@ public class BigDecimalUtils {
if
(
null
==
b1
||
null
==
b2
)
{
return
BigDecimal
.
ZERO
;
}
return
BigDecimal
.
valueOf
(
b1
.
doubleValue
()).
multiply
(
BigDecimal
.
valueOf
(
b2
.
doubleValue
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
return
BigDecimal
.
valueOf
(
b1
.
doubleValue
()).
multiply
(
BigDecimal
.
valueOf
(
b2
.
doubleValue
())).
setScale
(
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
}
public
static
<
T
extends
Number
>
BigDecimal
safeMultiply
(
T
b1
,
T
b2
,
T
b3
)
{
if
(
null
==
b1
||
null
==
b2
||
null
==
b3
)
{
...
...
@@ -249,7 +250,7 @@ public class BigDecimalUtils {
if
(
null
==
bigDecimal
){
return
true
;
}
if
(
bigDecimal
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
if
(
bigDecimal
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ZERO_INT
){
return
true
;
}
return
false
;
...
...
@@ -265,7 +266,7 @@ public class BigDecimalUtils {
if
(
null
==
b1
)
{
return
BigDecimal
.
ZERO
;
}
return
BigDecimal
.
valueOf
(
b1
.
doubleValue
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
return
BigDecimal
.
valueOf
(
b1
.
doubleValue
()).
setScale
(
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
}
/**
...
...
@@ -274,16 +275,16 @@ public class BigDecimalUtils {
* @return
*/
public
static
boolean
isBigDecimal
(
String
str
){
if
(
str
==
null
||
str
.
trim
().
length
()
==
0
){
if
(
str
==
null
||
str
.
trim
().
length
()
==
CommonConstants
.
ZERO_INT
){
return
false
;
}
char
[]
chars
=
str
.
toCharArray
();
int
sz
=
chars
.
length
;
int
i
=
(
chars
[
0
]
==
'-'
)
?
1
:
0
;
int
i
=
(
chars
[
CommonConstants
.
ZERO_INT
]
==
'-'
)
?
CommonConstants
.
ONE_INT
:
CommonConstants
.
ZERO_INT
;
if
(
i
==
sz
){
return
false
;
}
if
(
chars
[
i
]
==
'.'
){
if
(
chars
[
i
]
==
CommonConstants
.
SPOT_CHAR
){
//除了负号,第一位不能为'小数点'
return
false
;
}
...
...
@@ -333,6 +334,7 @@ public class BigDecimalUtils {
* @return double
*/
public
static
BigDecimal
getNumberOfDecimalPlace
(
String
str
,
int
point
)
{
Pattern
p
=
Pattern
.
compile
(
ValidityConstants
.
NUMBER_OF_DECIMAL_PLACE
);
Matcher
m
=
p
.
matcher
(
str
);
boolean
b
=
m
.
matches
();
if
(
b
){
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
37452b3a
...
...
@@ -122,7 +122,7 @@ public class ValidityUtil {
* @param email 邮箱(电子邮件)
* @return boolean
*/
public
static
boolean
validateE
am
il
(
final
String
email
){
public
static
boolean
validateE
ma
il
(
final
String
email
){
if
(
Common
.
isEmpty
(
email
)){
return
Boolean
.
FALSE
;
}
...
...
@@ -169,11 +169,11 @@ public class ValidityUtil {
return
Boolean
.
FALSE
;
}
BigDecimal
bigDecimalMoney
=
new
BigDecimal
(
money
);
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
0
;
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
CommonConstants
.
ZERO_INT
;
if
(
max
){
return
Boolean
.
FALSE
;
}
boolean
min
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MIN
)
<=
0
;
boolean
min
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MIN
)
<=
CommonConstants
.
ZERO_INT
;
if
(
min
){
return
Boolean
.
FALSE
;
}
...
...
@@ -202,7 +202,7 @@ public class ValidityUtil {
*/
public
static
boolean
validateMoneyMax
(
final
String
money
)
{
BigDecimal
bigDecimalMoney
=
new
BigDecimal
(
money
);
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
0
;
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
CommonConstants
.
ZERO_INT
;
if
(
max
){
return
Boolean
.
FALSE
;
}
...
...
@@ -345,7 +345,7 @@ public class ValidityUtil {
if
(!
validateMobile
(
phone
)){
return
Boolean
.
FALSE
;
}
String
initializeInfo
=
"用户"
.
concat
(
phone
.
substring
(
phone
.
length
()-
6
,
phone
.
length
()));
String
initializeInfo
=
CommonConstants
.
USER
.
concat
(
phone
.
substring
(
phone
.
length
()-
CommonConstants
.
SIX_INT
,
phone
.
length
()));
if
(!
str
.
trim
().
equals
(
initializeInfo
)){
return
Boolean
.
FALSE
;
}
...
...
@@ -393,13 +393,13 @@ public class ValidityUtil {
return
false
;
}
if
(
numStr
==
""
){
if
(
CommonConstants
.
EMPTY_STRING
.
equals
(
numStr
)
){
return
false
;
}
//验证是否是float型
if
(
numStr
.
contains
(
"."
)){
if
(
numStr
.
indexOf
(
'.'
)==
numStr
.
lastIndexOf
(
'.'
)){
StringTokenizer
st
=
new
StringTokenizer
(
numStr
,
"."
);
if
(
numStr
.
contains
(
CommonConstants
.
SPOT
)){
if
(
numStr
.
indexOf
(
CommonConstants
.
SPOT_CHAR
)==
numStr
.
lastIndexOf
(
CommonConstants
.
SPOT_CHAR
)){
StringTokenizer
st
=
new
StringTokenizer
(
numStr
,
CommonConstants
.
SPOT
);
while
(
st
.
hasMoreElements
()){
String
splitStr
=
st
.
nextToken
();
for
(
int
i
=
splitStr
.
length
();--
i
>=
0
;){
...
...
@@ -429,15 +429,15 @@ public class ValidityUtil {
return
false
;
}
if
(
numStr
==
""
){
if
(
CommonConstants
.
EMPTY_STRING
.
equals
(
numStr
)
){
return
false
;
}
//验证是否是float型
if
(
numStr
.
contains
(
"."
)){
if
(
numStr
.
contains
(
CommonConstants
.
SPOT
)){
return
false
;
}
else
{
//验证是否是int型
for
(
int
i
=
numStr
.
length
();--
i
>=
0
;){
for
(
int
i
=
numStr
.
length
();--
i
>=
CommonConstants
.
ZERO_INT
;){
if
(!
Character
.
isDigit
(
numStr
.
charAt
(
i
))){
return
false
;
}
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
37452b3a
...
...
@@ -18,6 +18,11 @@ import java.time.LocalDate;
public
class
InsuranceBatchParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 项目id
*/
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 项目编码
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
37452b3a
...
...
@@ -28,6 +28,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 项目id
*/
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 项目编码
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
37452b3a
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceEnclosureServiceImpl.java
View file @
37452b3a
...
...
@@ -63,15 +63,14 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
if
(
file
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_SIZE_ERROR
);
}
String
enclosureName
=
Objects
.
requireNonNull
(
file
.
getOriginalFilename
()).
substring
(
0
,
file
.
getOriginalFilename
().
lastIndexOf
(
"."
));
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
file
.
getOriginalFilename
();
String
fileName
=
System
.
currentTimeMillis
()
+
CommonConstants
.
DOWN_LINE_STRING
+
file
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
""
;
if
(!
Common
.
isNotNull
(
filePath
))
{
key
=
fileName
;
}
else
{
key
=
filePath
+
"/"
+
fileName
;
key
=
filePath
+
CommonConstants
.
SLASH_SPLIT_LINE_STRING
+
fileName
;
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
...
...
@@ -92,7 +91,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
try
{
this
.
save
(
insuranceEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
log
.
error
(
InsurancesConstants
.
OSS_ERROR
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/application.yml
View file @
37452b3a
...
...
@@ -39,7 +39,6 @@ security:
-
/v3/api-docs
-
/actuator/**
-
/swagger-ui/**
-
/insuranceDetail/updateInsuranceSettle
-
/insuranceDetail/urgentUpdateIsUse
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
37452b3a
...
...
@@ -56,6 +56,7 @@
<result
property=
"orderNo"
column=
"ORDER_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"createUserDeptId"
column=
"CREATE_USER_DEPT_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"createUserDeptName"
column=
"CREATE_USER_DEPT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptId"
column=
"DEPT_ID"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
...
...
@@ -135,6 +136,9 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TConfigSalaryController.java
View file @
37452b3a
...
...
@@ -64,7 +64,7 @@ public class TConfigSalaryController {
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TConfigSalary
>>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
)
{
return
new
R
<>(
tConfigSalaryService
.
getTConfigSalaryPage
(
page
,
tConfigSalary
)
);
return
tConfigSalaryService
.
getTConfigSalaryPage
(
page
,
tConfigSalary
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TConfigSalaryService.java
View file @
37452b3a
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.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.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary
;
/**
...
...
@@ -19,7 +20,7 @@ public interface TConfigSalaryService extends IService<TConfigSalary> {
* @param tConfigSalary 工资报账配置
* @return
*/
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
);
R
<
IPage
<
TConfigSalary
>
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
View file @
37452b3a
...
...
@@ -34,26 +34,23 @@ public class TConfigSalaryServiceImpl extends ServiceImpl<TConfigSalaryMapper, T
* @return
*/
@Override
public
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
){
public
R
<
IPage
<
TConfigSalary
>
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
){
YifuUser
user
=
SecurityUtils
.
getUser
();
TSettleDomainListVo
vo
=
null
;
if
(
Common
.
isNotNull
(
user
))
{
R
<
TSettleDomainListVo
>
domainListVoR
=
archivesDaprUtil
.
getSettleDomainIdsByUserId
(
user
.
getId
());
if
(
Common
.
isEmpty
(
domainListVoR
))
{
throw
new
RuntimeException
(
"调用结算服务失败"
);
return
R
.
failed
(
"调用结算服务失败"
);
}
if
(
CommonConstants
.
SUCCESS
!=
domainListVoR
.
getCode
())
{
throw
new
RuntimeException
(
"调用结算服务返回失败"
);
return
R
.
failed
(
"调用结算服务返回失败"
);
}
vo
=
domainListVoR
.
getData
();
if
(
Common
.
isEmpty
(
vo
)
||
!
Common
.
isNotEmpty
(
vo
.
getDeptIds
()))
{
throw
new
RuntimeException
(
"无项目权限"
);
}
}
if
(
Common
.
is
Empty
(
vo
)){
return
baseMapper
.
getTConfigSalaryPage
(
page
,
tConfigSalary
,
vo
.
getDeptIds
(
));
if
(
Common
.
is
NotNull
(
vo
)){
return
R
.
ok
(
baseMapper
.
getTConfigSalaryPage
(
page
,
tConfigSalary
,
vo
.
getDeptIds
()
));
}
return
baseMapper
.
getTConfigSalaryPage
(
page
,
tConfigSalary
,
null
);
return
R
.
ok
(
baseMapper
.
getTConfigSalaryPage
(
page
,
tConfigSalary
,
null
)
);
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
37452b3a
...
...
@@ -472,7 +472,7 @@
,'' fd_3adfee1ff1ca6a
,'' fd_3adfee203f86b2
,ifnull(a.ACTUAL_SALARY,'0') fd_3adfee20fe5ba4
,
''
fd_3adfee21802434
,
ifnull(a.RELAY_SALARY,'0') - ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'0') - ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'')
fd_3adfee21802434
,'' fd_3adfee4ba5ad36
,'' fd_3adfee4c0c59ee
,'' fd_3adfee5dd14866
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
View file @
37452b3a
...
...
@@ -377,6 +377,14 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"推送状态 0已推送 1未推送"
)
private
String
pushStatus
;
/**
* 收入状态
*/
@ExcelAttribute
(
name
=
"收入状态 0已生成 1未生成"
)
@Schema
(
description
=
"收入状态 0已生成 1未生成"
)
@ExcelProperty
(
"收入状态 0已生成 1未生成"
)
private
String
incomeStatus
;
/**
* 单位社保补缴利息
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/IncomeExportVo.java
View file @
37452b3a
...
...
@@ -131,14 +131,7 @@ public class IncomeExportVo implements Serializable {
@Schema
(
description
=
"数据生成时间"
)
@ExcelProperty
(
"数据生成时间"
)
private
Date
createTime
;
/**
* 数据生成月份
*/
@Length
(
max
=
6
,
message
=
"数据生成时间 不能超过6 个字符"
)
@ExcelAttribute
(
name
=
"数据生成时间"
,
maxLength
=
6
)
@Schema
(
description
=
"数据生成时间"
)
@ExcelProperty
(
"数据生成时间"
)
private
String
dataCreateMonth
;
/**
* 推送状态:0未推送1已推送
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TIncomeSearchVo.java
View file @
37452b3a
...
...
@@ -16,6 +16,7 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -55,4 +56,9 @@ public class TIncomeSearchVo extends TIncome {
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
/**
* 菜单ID 获取查询权限使用
*/
@TableField
(
exist
=
false
)
private
String
mId
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/OTAStrategyShardingAlgorithm.java
View file @
37452b3a
...
...
@@ -31,7 +31,6 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
String
tableSuffix
=
value
.
format
(
yyyy
);
String
logicTableName
=
preciseShardingValue
.
getLogicTableName
();
String
table
=
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
System
.
out
.
println
(
"OrderStrategy.doSharding table name: "
+
table
);
return
collection
.
stream
().
filter
(
s
->
s
.
equals
(
table
)).
findFirst
().
orElseThrow
(()
->
new
RuntimeException
(
"逻辑分表不存在"
));
}
...
...
@@ -53,7 +52,6 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
Set
<
String
>
queryRangeTables
=
extracted
(
logicTableName
,
valueRange
.
lowerEndpoint
(),
valueRange
.
upperEndpoint
());
ArrayList
<
String
>
tables
=
new
ArrayList
<>(
collection
);
tables
.
retainAll
(
queryRangeTables
);
System
.
out
.
println
(
JSON
.
toJSONString
(
tables
));
return
tables
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
37452b3a
...
...
@@ -381,4 +381,18 @@ public class TPaymentInfoController {
public
TPaymentVo
getPaymentSocialAndFound
(
@RequestBody
TPaymentInfo
info
)
{
return
tPaymentInfoService
.
getPaymentSocialAndFound
(
info
);
}
/**
* @Description: 手动推送社保缴费库明细的数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
@Operation
(
summary
=
"手动推送社保缴费库明细的数据"
,
description
=
"手动推送社保缴费库明细的数据"
)
@SysLog
(
"手动推送社保缴费库明细的数据"
)
@PostMapping
(
"/pushPaymentSocialFundInfo"
)
public
R
<
Boolean
>
pushPaymentSocialFundInfo
()
{
tPaymentInfoService
.
pushPaymentSocialFundInfo
();
return
R
.
ok
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
37452b3a
...
...
@@ -117,6 +117,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
void
updatePaymentSocialAndFound
(
@Param
(
"infoVo"
)
UpdateSocialFoundVo
infoVo
);
void
updateByIncome
(
@Param
(
"id"
)
String
id
);
/**
* 更新社保推送
* @Author huyc
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
37452b3a
...
...
@@ -128,4 +128,8 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void
createForecastInfo
();
void
createForecastFundInfo
();
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
);
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
View file @
37452b3a
...
...
@@ -57,6 +57,14 @@ public interface TIncomeService extends IService<TIncome> {
**/
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: huyc
* @Date: 2022/9/9 11:42
* @return:
**/
void
saveBathDetail
(
List
<
TIncomeDetail
>
tIncomeDetail
);
void
pushDetail
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
37452b3a
...
...
@@ -140,4 +140,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
void
pushPaymentSocialFundInfo
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
37452b3a
...
...
@@ -3153,6 +3153,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
//获取所有的预估数据
List
<
TForecastLibrary
>
libraryFundInfoList
=
null
;
List
<
TForecastLibrary
>
libraryFundInfoList1
=
new
ArrayList
<>();
libraryFundInfoList
=
forecastLibraryService
.
list
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
sf
.
getEmpIdcard
())
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
...
...
@@ -3162,9 +3163,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoList1
.
add
(
library
);
}
}
if
(
Common
.
isNotNull
(
libraryFundInfoList1
))
{
forecastLibraryService
.
pushForecastFundInfo
(
libraryFundInfoList1
);
}
}
}
}
dis
.
setFundHandleRemark
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
));
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
...
...
@@ -4029,7 +4037,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
//判断是否存在当月的
社保或
公积金收入数据
//判断是否存在当月的公积金收入数据
Boolean
isExist
=
false
;
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
...
...
@@ -4047,6 +4055,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
...
...
@@ -4060,49 +4069,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
());
}
}
else
{
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
THREE_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
);
}
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
.
contains
(
CommonConstants
.
TWO_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
());
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
{
money
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
THREE_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
);
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
());
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
37452b3a
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
37452b3a
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
37452b3a
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/resources/mapper/TIncomeMapper.xml
View file @
37452b3a
...
...
@@ -63,7 +63,6 @@
<result
property=
"createMonth"
column=
"CREATE_MONTH"
/>
<result
property=
"payMonth"
column=
"PAY_MONTH"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"dataCreateMonth"
column=
"DATA_CREATE_MONTH"
/>
<result
property=
"sendStatus"
column=
"SEND_STATUS"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
37452b3a
...
...
@@ -104,6 +104,7 @@
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"incomeStatus"
column=
"INCOME_STATUS"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -1098,6 +1099,14 @@
and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard}
</update>
<!-- 更改薪资公积金结算状态 -->
<update
id=
"updateByIncome"
>
update t_payment_info
set INCOME_STATUS = '0'
where
ID = #{id}
</update>
<!-- 更改社保推送结算状态 -->
<update
id=
"updatePushStatus"
>
update t_payment_info
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
View file @
37452b3a
...
...
@@ -532,6 +532,10 @@
<if
test=
"tSocialFundInfo.id != null and tSocialFundInfo.id.trim() != ''"
>
AND a.ID = #{tSocialFundInfo.id}
</if>
<if
test=
"tSocialFundInfo.settleDomainCode != null and tSocialFundInfo.settleDomainCode.trim() != ''"
>
AND a.SETTLE_DOMAIN_CODE = #{tSocialFundInfo.settleDomainCode}
</if>
<if
test=
"tSocialFundInfo.empId != null and tSocialFundInfo.empId.trim() != ''"
>
AND a.EMP_ID = #{tSocialFundInfo.empId}
</if>
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/UserController.java
View file @
37452b3a
...
...
@@ -30,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
...
...
@@ -295,4 +294,24 @@ public class UserController {
}
return
naVo
;
}
/**
* @Author hgw
* @Description 获取部门下的用户id
* @Date 2022-9-14 11:29:59
**/
@Inner
@PostMapping
(
value
=
{
"/inner/getUserIdByDeptIds"
})
public
String
getUserIdByDeptIds
(
@RequestBody
String
deptIds
)
{
StringBuilder
userIds
=
new
StringBuilder
(
"0"
);
if
(
Common
.
isNotNull
(
deptIds
))
{
List
<
SysUser
>
sysUsers
=
userService
.
list
(
Wrappers
.<
SysUser
>
query
().
lambda
().
in
(
SysUser:
:
getDeptId
,
deptIds
));
if
(
Common
.
isNotEmpty
(
sysUsers
)){
for
(
SysUser
u:
sysUsers
){
userIds
.
append
(
",'"
).
append
(
u
.
getUserId
()).
append
(
"'"
);
}
}
}
return
userIds
.
toString
();
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDataAuthServiceImpl.java
View file @
37452b3a
...
...
@@ -108,13 +108,13 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理权限部门
if
(
sysDataAuth
.
getIsDeptAuth
()
==
1
||
sysDataAuth
.
getIsDeptAuth
()
==
2
)
{
if
(
sysDataAuth
.
getIsDeptAuth
()
==
2
)
{
sql
.
append
(
" or
dept.dept_id in (
'0' "
);
sql
.
append
(
" or
a.create_user in (start
'0' "
);
for
(
SysDataAuthDeptRel
dept
:
authDeptList
)
{
sql
.
append
(
", '"
).
append
(
dept
.
getDeptId
()).
append
(
"'"
);
}
sql
.
append
(
")"
);
sql
.
append
(
"
end
)"
);
}
else
{
sql
.
append
(
" or
dept.dept_id = #deptId
"
);
sql
.
append
(
" or
a.create_user in (#deptId)
"
);
}
for
(
SysDataAuthMenuRel
menu
:
menuDeptList
)
{
authSqlMap
.
put
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menu
.
getMenuId
(),
sql
.
toString
());
...
...
@@ -137,7 +137,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理项目
if
(
menuSettleList
!=
null
&&
!
menuSettleList
.
isEmpty
())
{
nowSql
=
" or a.
settle_domain
_id in ('0'#settleDomainId) "
;
nowSql
=
" or a.
dept
_id in ('0'#settleDomainId) "
;
sysDataAuth
.
setIsSettleAuth
(
1
);
for
(
SysDataAuthMenuRel
menu
:
menuSettleList
)
{
mapSql
=
authSqlMap
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menu
.
getMenuId
());
...
...
@@ -314,15 +314,15 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
if
(
menuDeptList
==
null
||
menuDeptList
.
isEmpty
())
{
return
R
.
failed
(
"请选择部门关联的菜单!"
);
}
else
if
(
sysDataAuth
.
getIsDeptAuth
()
==
2
)
{
sql
.
append
(
" or
dept.dept_id in (
'0' "
);
sql
.
append
(
" or
a.create_user in (start
'0' "
);
for
(
SysDataAuthDeptRel
dept
:
authDeptList
)
{
sql
.
append
(
", '"
).
append
(
dept
.
getDeptId
()).
append
(
"'"
);
dept
.
setSysDataAuthId
(
mainId
);
}
sql
.
append
(
")"
);
sql
.
append
(
"
end
)"
);
authDeptRelService
.
saveOrUpdateBatch
(
authDeptList
);
}
else
{
sql
.
append
(
" or
dept.dept_id = #deptId
"
);
sql
.
append
(
" or
a.create_user in (#deptId)
"
);
}
for
(
SysDataAuthMenuRel
menu
:
menuDeptList
)
{
authSqlMap
.
put
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menu
.
getMenuId
(),
sql
.
toString
());
...
...
@@ -352,7 +352,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理项目
if
(
menuSettleList
!=
null
&&
!
menuSettleList
.
isEmpty
())
{
nowSql
=
" or a.
settle_domain
_id in ('0'#settleDomainId) "
;
nowSql
=
" or a.
dept
_id in ('0'#settleDomainId) "
;
sysDataAuth
.
setIsSettleAuth
(
1
);
for
(
SysDataAuthMenuRel
menu
:
menuSettleList
)
{
mapSql
=
authSqlMap
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menu
.
getMenuId
());
...
...
yifu-upms/yifu-upms-biz/src/main/resources/application.yml
View file @
37452b3a
...
...
@@ -38,10 +38,6 @@ security:
-
/v3/api-docs
-
/actuator/**
-
/swagger-ui/**
-
/**/insuranceDetail/updateInsuranceSettle
-
/**/insuranceDetail/urgentUpdateIsUse
-
/insuranceDetail/urgentUpdateIsUse
-
/insuranceDetail/updateInsuranceSettle
...
...
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