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
82659bb9
Commit
82659bb9
authored
Aug 17, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check update
parent
76ab6527
Show whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
3202 additions
and
560 deletions
+3202
-560
yifu-auth-virtualservice-yifucenter.yaml
k8s-bash-test/yifu-auth-virtualservice-yifucenter.yaml
+1
-1
yifu-upms-virtualservice-yifucenter.yaml
k8s-bash-test/yifu-upms-virtualservice-yifucenter.yaml
+1
-1
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+3
-7
TCutsomerDataPermissonMapper.java
...v1/yifu/archives/mapper/TCutsomerDataPermissonMapper.java
+1
-1
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+1
-1
TCutsomerDataPermissonMapper.xml
...rc/main/resources/mapper/TCutsomerDataPermissonMapper.xml
+2
-2
TCheckBankNoServiceImpl.java
...d/plus/v1/check/service/impl/TCheckBankNoServiceImpl.java
+0
-1
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+7
-0
Common.java
.../com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
+14
-0
pom.xml
yifu-common/yifu-common-dapr/pom.xml
+6
-0
DaprSalaryProperties.java
...plus/v1/yifu/common/dapr/config/DaprSalaryProperties.java
+39
-0
SalaryDaprUtil.java
...u/cloud/plus/v1/yifu/common/dapr/util/SalaryDaprUtil.java
+21
-0
SocialDaprUtils.java
.../cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
+49
-0
UpmsDaprUtils.java
...fu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
+16
-4
spring.factories
...-common-dapr/src/main/resources/META-INF/spring.factories
+3
-1
salaryTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/salaryTask.java
+13
-0
SysMessageSalary.java
...fu/cloud/plus/v1/yifu/salary/entity/SysMessageSalary.java
+2
-1
SysMessageSalaryTemp.java
...loud/plus/v1/yifu/salary/entity/SysMessageSalaryTemp.java
+55
-0
TConfigSalary.java
.../yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
+8
-0
THaveSalaryNosocial.java
...cloud/plus/v1/yifu/salary/entity/THaveSalaryNosocial.java
+129
-0
TSpecialDeducationSum.java
...oud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
+3
-3
SysMessageSalaryHandelExportVo.java
...lus/v1/yifu/salary/vo/SysMessageSalaryHandelExportVo.java
+38
-0
SysMessageSalaryTemplExportVo.java
...plus/v1/yifu/salary/vo/SysMessageSalaryTemplExportVo.java
+45
-0
THaveSalaryNoSocialExportVo.java
...d/plus/v1/yifu/salary/vo/THaveSalaryNoSocialExportVo.java
+101
-0
THaveSalaryNosocialHandleExportVo.java
.../v1/yifu/salary/vo/THaveSalaryNosocialHandleExportVo.java
+46
-0
THaveSalaryNosocialSearchVo.java
...d/plus/v1/yifu/salary/vo/THaveSalaryNosocialSearchVo.java
+37
-0
pom.xml
yifu-salary/yifu-salary-biz/pom.xml
+7
-1
SysMessageSalaryController.java
...v1/yifu/salary/controller/SysMessageSalaryController.java
+482
-105
SysMessageSalaryTempController.java
...ifu/salary/controller/SysMessageSalaryTempController.java
+94
-0
THaveSalaryNosocialController.java
...yifu/salary/controller/THaveSalaryNosocialController.java
+163
-0
TSalaryAccountController.java
...s/v1/yifu/salary/controller/TSalaryAccountController.java
+100
-3
TSpecialDeducationSumController.java
...fu/salary/controller/TSpecialDeducationSumController.java
+19
-0
SysMessageSalaryMapper.java
...ud/plus/v1/yifu/salary/mapper/SysMessageSalaryMapper.java
+60
-26
SysMessageSalaryTempMapper.java
...lus/v1/yifu/salary/mapper/SysMessageSalaryTempMapper.java
+26
-0
THaveSalaryNosocialMapper.java
...plus/v1/yifu/salary/mapper/THaveSalaryNosocialMapper.java
+68
-0
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+12
-0
SysMessageSalaryService.java
.../plus/v1/yifu/salary/service/SysMessageSalaryService.java
+46
-32
SysMessageSalaryTempService.java
...s/v1/yifu/salary/service/SysMessageSalaryTempService.java
+24
-0
THaveSalaryNosocialService.java
...us/v1/yifu/salary/service/THaveSalaryNosocialService.java
+48
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+10
-0
SysMessageSalaryServiceImpl.java
...yifu/salary/service/impl/SysMessageSalaryServiceImpl.java
+208
-212
SysMessageSalaryTempServiceImpl.java
.../salary/service/impl/SysMessageSalaryTempServiceImpl.java
+30
-0
TConfigSalaryServiceImpl.java
...v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
+1
-1
THaveSalaryNosocialServiceImpl.java
...u/salary/service/impl/THaveSalaryNosocialServiceImpl.java
+309
-0
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+15
-0
TSpecialDeducationSumServiceImpl.java
...salary/service/impl/TSpecialDeducationSumServiceImpl.java
+1
-1
SysMessageSalaryMapper.xml
...-biz/src/main/resources/mapper/SysMessageSalaryMapper.xml
+324
-131
SysMessageSalaryTempMapper.xml
.../src/main/resources/mapper/SysMessageSalaryTempMapper.xml
+37
-0
THaveSalaryNosocialMapper.xml
...z/src/main/resources/mapper/THaveSalaryNosocialMapper.xml
+245
-0
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+39
-0
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+8
-0
FundHandleExportVo.java
...yifu/cloud/plus/v1/yifu/social/vo/FundHandleExportVo.java
+1
-1
HaveSalaryNoSocialSearchVo.java
...ud/plus/v1/yifu/social/vo/HaveSalaryNoSocialSearchVo.java
+19
-0
HaveSalaryNoSocialVo.java
...fu/cloud/plus/v1/yifu/social/vo/HaveSalaryNoSocialVo.java
+17
-0
SocialHandleExportVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialHandleExportVo.java
+2
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+24
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+77
-21
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+2
-1
AllUserNaVo.java
...com/yifu.cloud.plus.v1/yifu/admin/api/vo/AllUserNaVo.java
+17
-0
UserController.java
...u.cloud.plus.v1/yifu/admin/controller/UserController.java
+26
-0
No files found.
k8s-bash-test/yifu-auth-virtualservice-yifucenter.yaml
View file @
82659bb9
...
...
@@ -5,7 +5,7 @@ metadata:
namespace
:
qas-mvp
spec
:
gateways
:
-
istio-system/qas-
yifu-gateway
-
istio-system/qas-
worfu
hosts
:
-
qas-mvp-yifu-auth.yifucenter.com
http
:
...
...
k8s-bash-test/yifu-upms-virtualservice-yifucenter.yaml
View file @
82659bb9
...
...
@@ -5,7 +5,7 @@ metadata:
namespace
:
qas-mvp
spec
:
gateways
:
-
istio-system/qas-
yifu-gateway
-
istio-system/qas-
worfu
hosts
:
-
qas-mvp-yifu-upms.yifucenter.com
http
:
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
82659bb9
...
...
@@ -136,14 +136,10 @@ public class TSettleDomainController {
**/
@Operation
(
description
=
"获取登录用户拥有的项目数据)"
)
@Inner
@GetMapping
(
"/getSettleDomainIdsByUserId"
)
public
TSettleDomainListVo
getSettleDomainIdsByUserId
()
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
null
;
}
@PostMapping
(
"/getSettleDomainIdsByUserId"
)
public
TSettleDomainListVo
getSettleDomainIdsByUserId
(
@RequestBody
String
userId
)
{
TSettleDomainListVo
vo
=
new
TSettleDomainListVo
();
vo
.
setDeptIds
(
tSettleDomainService
.
getSettleDomainIdsByUserId
(
user
.
getId
()
));
vo
.
setDeptIds
(
tSettleDomainService
.
getSettleDomainIdsByUserId
(
user
Id
));
return
vo
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TCutsomerDataPermissonMapper.java
View file @
82659bb9
...
...
@@ -42,7 +42,7 @@ public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPe
* @param userId
* @return
**/
List
<
TCutsomerDataPermisson
>
selectAllSettleDomainPermissionByUserId
(
@Param
(
"userId"
)
int
userId
);
List
<
TCutsomerDataPermisson
>
selectAllSettleDomainPermissionByUserId
(
@Param
(
"userId"
)
String
userId
);
String
getCustomerServiceByid
(
@Param
(
"id"
)
String
id
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
82659bb9
...
...
@@ -77,7 +77,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
if
(
settleDomainVoR
!=
null
)
{
return
(
List
<
String
>)
settleDomainVoR
;
}
else
{
List
<
TCutsomerDataPermisson
>
permissonList
=
permissonMapper
.
selectAllSettleDomainPermissionByUserId
(
Integer
.
parseInt
(
userId
)
);
List
<
TCutsomerDataPermisson
>
permissonList
=
permissonMapper
.
selectAllSettleDomainPermissionByUserId
(
userId
);
if
(
Common
.
isNotNull
(
permissonList
))
{
domainIds
=
permissonList
.
stream
().
map
(
TCutsomerDataPermisson:
:
getSettleDomainId
).
collect
(
Collectors
.
toList
());
redisUtil
.
set
(
userKey
,
domainIds
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCutsomerDataPermissonMapper.xml
View file @
82659bb9
...
...
@@ -123,10 +123,10 @@
<select
id=
"selectAllSettleDomainPermissionByUserId"
resultMap=
"tCutsomerDataPermissonMap"
>
SELECT
<include
refid=
"base_column_list"
/>
FROM t_cutsomer_data_permisson
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-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckBankNoServiceImpl.java
View file @
82659bb9
...
...
@@ -46,7 +46,6 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
@Override
public
CheckBankNoVo
checkBankNoTwo
(
String
name
,
String
cardNo
)
{
R
<
TCheckBankNo
>
res
;
CheckBankNoVo
vo
=
new
CheckBankNoVo
();
if
(
Common
.
isEmpty
(
name
)
||
Common
.
isEmpty
(
cardNo
)){
vo
.
setRes
(
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_BANK_NO_REQUEST_PARAM_ERROR
)));
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
82659bb9
...
...
@@ -135,4 +135,11 @@ public class ExcelAttributeConstants {
//身份证
public
static
final
String
EMPIDCARD
=
"empIdcard"
;
//最低工资提醒
public
static
final
String
SYS_MESSAGE_SALARY_TYPE
=
"SYS_MESSAGE_SALARY_TYPE"
;
//有工资无社保
public
static
final
String
HAVE_SALARY_NO_SOCIAL_TYPE
=
"HAVE_SALARY_NO_SOCIAL_TYPE"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
View file @
82659bb9
...
...
@@ -377,6 +377,20 @@ public class Common {
return
year
<
0
?
0
:
year
;
}
public
static
int
getYearOfTime
(
Date
start
,
Date
end
)
{
int
year
=
0
;
if
(
Common
.
isEmpty
(
start
)
||
Common
.
isEmpty
(
end
)){
return
year
;
}
String
startYear
=
DateUtil
.
getYear
(
start
).
substring
(
0
,
4
);
String
endYear
=
DateUtil
.
getYear
(
end
).
substring
(
0
,
4
);
if
(!
Common
.
isNumber
(
startYear
)
||
!
Common
.
isNumber
(
endYear
)){
return
year
;
}
year
=
Integer
.
valueOf
(
endYear
).
intValue
()
-
Integer
.
valueOf
(
startYear
).
intValue
()
;
return
year
<
0
?
0
:
year
;
}
/**
* 公积金单边小数点格式化
...
...
yifu-common/yifu-common-dapr/pom.xml
View file @
82659bb9
...
...
@@ -29,6 +29,12 @@
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-social-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<properties>
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/config/DaprSalaryProperties.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @Author hgw
* @Date 2022-7-27 19:38:08
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource
(
"classpath:daprConfig.properties"
)
@ConfigurationProperties
(
value
=
"dapr.salary"
,
ignoreInvalidFields
=
false
)
public
class
DaprSalaryProperties
{
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String
appUrl
;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String
appId
;
String
appPort
;
String
httpPort
;
String
grpcPort
;
String
metricsPort
;
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SalaryDaprUtil.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
/**
* @Author fxj
* @Date 2022/8/17
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties
(
DaprSalaryProperties
.
class
)
public
class
SalaryDaprUtil
{
@Autowired
private
DaprSalaryProperties
daprProperties
;
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
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.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2022-07-18
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties
(
DaprSocialProperties
.
class
)
public
class
SocialDaprUtils
{
@Autowired
private
DaprSocialProperties
daprProperties
;
/**
* @Author fxj
* @Description 去缴费库查询查询这些人社保是否存在
* @Date 17:38 2022/8/16
* @Param
* @return
**/
public
R
<
HaveSalaryNoSocialVo
>
getPaymentinfoListByEmpdIdCard
(
List
<
String
>
idCards
,
String
settleMonth
)
{
HaveSalaryNoSocialSearchVo
searchVo
=
new
HaveSalaryNoSocialSearchVo
();
searchVo
.
setIdCards
(
idCards
);
searchVo
.
setSettleMonth
(
settleMonth
);
R
<
HaveSalaryNoSocialVo
>
noSocialVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/listByEmpdIdCard"
,
JSON
.
toJSONString
(
searchVo
),
HaveSalaryNoSocialVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
noSocialVoR
)){
return
R
.
failed
(
"查询人员社保是否存在失败!"
);
}
return
noSocialVoR
;
}
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.
entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.
vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
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.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
java.util.List
;
/**
* @Author huyc
* @Date 2022-07-18
...
...
@@ -39,4 +36,19 @@ public class UpmsDaprUtils {
}
return
areaListR
;
}
/**
* @Author fxj
* @Description 获取所有用户数据
* @Date 17:57 2022/8/16
* @Param
* @return
**/
public
R
<
AllUserNaVo
>
getAllUserName
()
{
R
<
AllUserNaVo
>
allUserVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
(),
"/user/inner/getAllUserName"
,
""
,
AllUserNaVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
allUserVoR
)){
return
R
.
failed
(
"获取所有用户数据失败!"
);
}
return
allUserVoR
;
}
}
yifu-common/yifu-common-dapr/src/main/resources/META-INF/spring.factories
View file @
82659bb9
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil,\
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.CheckDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/salaryTask.java
View file @
82659bb9
...
...
@@ -87,4 +87,17 @@ public class salaryTask {
TStatisticsBonus
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------生成全年一次性奖金-定时任务结束------------"
);
}
/**
* @Author fxj
* @Description 定时生成有工资无社保数据
* @Date 17:31 2022/8/17
* @Param
* @return
**/
public
void
generate
()
{
log
.
info
(
"------------定时生成时生成有工资无社保数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/thavesalarynosocial/inner/generate"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成时生成有工资无社保数据-定时任务结束------------"
);
}
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/SysMessageSalary.java
View file @
82659bb9
...
...
@@ -22,6 +22,7 @@ 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
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
...
...
@@ -38,7 +39,7 @@ import java.math.BigDecimal;
@Data
@TableName
(
"sys_message_salary"
)
@Schema
(
description
=
"最低工资提醒-每月更新一次"
)
public
class
SysMessageSalary
{
public
class
SysMessageSalary
extends
BaseEntity
{
/**
* id
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/SysMessageSalaryTemp.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
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
;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"sys_message_salary_temp"
)
@Tag
(
name
=
"最低工资提醒-临时人员连续购买最低工资次数"
)
public
class
SysMessageSalaryTemp
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
""
)
private
String
id
;
/**
* 最低工资表数据id
*/
@Length
(
max
=
32
,
message
=
"最低工资表数据id 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"最低工资表数据id "
,
maxLength
=
32
)
@Schema
(
description
=
"最低工资表数据id "
,
name
=
"relateId"
)
private
String
relateId
;
/**
* 次数
*/
@ExcelAttribute
(
name
=
"次数"
)
@Schema
(
description
=
"次数"
,
name
=
"times"
)
private
Integer
times
;
/**
* 结算月
*/
@Length
(
max
=
10
,
message
=
"结算月不能超过10个字符"
)
@ExcelAttribute
(
name
=
"结算月"
,
maxLength
=
10
,
needExport
=
true
)
@Schema
(
description
=
"结算月"
,
name
=
"settleMonth"
)
private
String
settleMonth
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
View file @
82659bb9
...
...
@@ -77,6 +77,14 @@ public class TConfigSalary extends Model<TConfigSalary> implements Serializable
/**
* 社保月份
* '-6': '前6月',
* '-5': '前5月',
* '-4': '前4月',
* '-3': '前3月',
* '-2': '前2月',
* '-1': '上月',
* 0: '本月',
* 1: '下月',
*/
@NotNull
(
message
=
"社保月份不能为空"
)
@ExcelAttribute
(
name
=
"社保月份"
,
isNotEmpty
=
true
,
errorInfo
=
"社保月份不能为空"
)
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/THaveSalaryNosocial.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
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.baomidou.mybatisplus.extension.activerecord.Model
;
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
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.time.LocalDateTime
;
/**
* 有工资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_have_salary_nosocial"
)
@Tag
(
name
=
"有资没有社保(首页提醒定时任务)"
)
public
class
THaveSalaryNosocial
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
,
name
=
"id"
)
private
String
id
;
/**
* 员工ID
*/
@Length
(
max
=
32
,
message
=
"员工ID不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工ID"
,
maxLength
=
32
)
@Schema
(
description
=
"员工ID"
,
name
=
"employeeId"
)
private
String
employeeId
;
/**
* 客户名称
*/
@Length
(
max
=
50
,
message
=
"客户名称不能超过50个字符"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"客户名称"
,
name
=
"customerName"
)
private
String
customerName
;
/**
* 结算主体名称
*/
@NotBlank
(
message
=
"结算主体名称不能为空"
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelAttribute
(
name
=
"结算主体名称"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体名称不能为空"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"结算主体名称"
,
name
=
"settlementOrganName"
)
private
String
settlementOrganName
;
/**
* 员工名称
*/
@Length
(
max
=
32
,
message
=
"员工名称不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工名称"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"员工名称"
,
name
=
"employeeName"
)
private
String
employeeName
;
/**
* 身份证号
*/
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"身份证号"
,
name
=
"employeeIdCard"
)
private
String
employeeIdCard
;
/**
* 工资月份
*/
@NotBlank
(
message
=
"工资月份不能为空"
)
@ExcelAttribute
(
name
=
"工资月份"
,
isNotEmpty
=
true
,
errorInfo
=
"工资月份不能为空"
,
needExport
=
true
)
@Schema
(
description
=
"工资月份"
,
name
=
"month"
)
private
String
month
;
/**
* 应发工资
*/
@Schema
(
description
=
"应发工资"
,
name
=
"relaySalary"
)
@ExcelAttribute
(
name
=
"应发工资"
,
isNotEmpty
=
true
,
errorInfo
=
"应发工资不能为空"
,
needExport
=
true
)
private
String
relaySalary
;
/**
* 单位ID
*/
@Length
(
max
=
255
,
message
=
"单位ID不能超过255个字符"
)
@ExcelAttribute
(
name
=
"单位ID"
,
maxLength
=
255
)
@Schema
(
description
=
"单位ID"
,
name
=
"customerId"
)
private
String
customerId
;
/**
* 部门ID
*/
@Length
(
max
=
255
,
message
=
"部门ID不能超过255个字符"
)
@ExcelAttribute
(
name
=
"部门ID"
,
maxLength
=
255
)
@Schema
(
description
=
"部门ID"
,
name
=
"settleDomainId"
)
private
String
settleDomainId
;
/**
* 结算主体编码
*/
@NotBlank
(
message
=
"结算主体编码不能为空"
)
@Length
(
max
=
50
,
message
=
"结算主体编码不能超过50个字符"
)
@ExcelAttribute
(
name
=
"结算主体编码"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体编码不能为空"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"结算主体编码"
,
name
=
"settlementOrganNo"
)
private
String
settlementOrganNo
;
/**
* 结算月
*/
@Length
(
max
=
10
,
message
=
"结算月不能超过10个字符"
)
@ExcelAttribute
(
name
=
"结算月"
,
maxLength
=
10
,
needExport
=
true
)
@Schema
(
description
=
"结算月"
,
name
=
"settleMonth"
)
private
String
settleMonth
;
/**
* 原因大类 根据数据字典来判断
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"reasonType"
)
@ExcelAttribute
(
name
=
"原因大类"
,
errorInfo
=
"原因大类不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
HAVE_SALARY_NO_SOCIAL_TYPE
,
needExport
=
true
)
private
Integer
reasonType
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
View file @
82659bb9
...
...
@@ -134,10 +134,10 @@ public class TSpecialDeducationSum extends BaseEntity {
@ExcelProperty
(
value
=
"累计子女教育"
)
private
BigDecimal
sumChildEduMoney
;
/**
* 累计住房
租金
* 累计住房
贷款利息
*/
@ExcelAttribute
(
name
=
"累计住房
租金
"
)
@ExcelProperty
(
value
=
"累计住房
租金
"
)
@ExcelAttribute
(
name
=
"累计住房
贷款利息
"
)
@ExcelProperty
(
value
=
"累计住房
贷款利息
"
)
private
BigDecimal
sumHousingLoanMoney
;
/**
* 累计住房租金
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/SysMessageSalaryHandelExportVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
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.salary.entity.SysMessageSalary
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 2019-11-21 17:18:10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Tag
(
name
=
"最低工资提醒-每月更新一次"
)
public
class
SysMessageSalaryHandelExportVo
extends
SysMessageSalary
{
private
static
final
long
serialVersionUID
=
1L
;
@Schema
(
description
=
"原因大类 根据数据字典来判断"
)
@ExcelAttribute
(
name
=
"前一月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SYS_MESSAGE_SALARY_TYPE
,
needExport
=
true
)
private
Integer
lastOneReasonType
;
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
)
@ExcelAttribute
(
name
=
"前二月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SYS_MESSAGE_SALARY_TYPE
,
needExport
=
true
)
private
Integer
lastTwoReasonType
;
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
)
@ExcelAttribute
(
name
=
"前三月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SYS_MESSAGE_SALARY_TYPE
,
needExport
=
true
)
private
Integer
lastThreeReasonType
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/SysMessageSalaryTemplExportVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
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.salary.entity.SysMessageSalary
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2019-11-21 17:18:10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Tag
(
name
=
"最低工资提醒-临时人员连续购买最低工资次数"
)
public
class
SysMessageSalaryTemplExportVo
extends
SysMessageSalary
{
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"lastOneReasonType"
)
@ExcelAttribute
(
name
=
"前一月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SYS_MESSAGE_SALARY_TYPE
,
needExport
=
true
)
private
Integer
lastOneReasonType
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"lastTwoReasonType"
)
@ExcelAttribute
(
name
=
"前二月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SYS_MESSAGE_SALARY_TYPE
,
needExport
=
true
)
private
Integer
lastTwoReasonType
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"lastThreeReasonType"
)
@ExcelAttribute
(
name
=
"前三月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SYS_MESSAGE_SALARY_TYPE
)
private
Integer
lastThreeReasonType
;
@ExcelAttribute
(
name
=
"前三月原因大类"
,
maxLength
=
32
,
needExport
=
true
)
private
Integer
times
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/THaveSalaryNoSocialExportVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
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.salary.entity.THaveSalaryNosocial
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* @Author fxj
* @Date 2022/8/17
* @Description 有工资无社保导出对象
* @Version 1.0
*/
@Data
public
class
THaveSalaryNoSocialExportVo
extends
THaveSalaryNosocial
implements
Serializable
{
/**
* 客户名称
*/
@Length
(
max
=
50
,
message
=
"客户名称不能超过50个字符"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"客户名称"
,
name
=
"customerName"
)
private
String
customerName
;
/**
* 结算主体名称
*/
@NotBlank
(
message
=
"结算主体名称不能为空"
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelAttribute
(
name
=
"结算主体名称"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体名称不能为空"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"结算主体名称"
,
name
=
"settlementOrganName"
)
private
String
settlementOrganName
;
/**
* 员工名称
*/
@Length
(
max
=
32
,
message
=
"员工名称不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工名称"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"员工名称"
,
name
=
"employeeName"
)
private
String
employeeName
;
/**
* 身份证号
*/
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"身份证号"
,
name
=
"employeeIdCard"
)
private
String
employeeIdCard
;
/**
* 员工类型
*/
@TableField
(
exist
=
false
)
@ExcelAttribute
(
name
=
"员工类型"
,
errorInfo
=
"员工类型不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
PERSONNEL_TYPE
,
needExport
=
true
)
@Schema
(
description
=
"员工类型"
,
name
=
"empType"
)
private
String
empType
;
/**
* 工资月份
*/
@NotBlank
(
message
=
"工资月份不能为空"
)
@ExcelAttribute
(
name
=
"工资月份"
,
isNotEmpty
=
true
,
errorInfo
=
"工资月份不能为空"
,
needExport
=
true
)
@Schema
(
description
=
"工资月份"
,
name
=
"month"
)
private
String
month
;
/**
* 应发工资
*/
@Schema
(
description
=
"应发工资"
,
name
=
"relaySalary"
)
@ExcelAttribute
(
name
=
"应发工资"
,
isNotEmpty
=
true
,
errorInfo
=
"应发工资不能为空"
,
needExport
=
true
)
private
String
relaySalary
;
/**
* 在职状态 (0在职;1离职)
*/
@TableField
(
exist
=
false
)
@ExcelAttribute
(
name
=
"在职状态"
,
errorInfo
=
"在职状态 0是/1否不能为空"
,
maxLength
=
1
,
isDataId
=
true
,
readConverterExp
=
"0=在职,1=离职"
,
needExport
=
true
)
@Schema
(
description
=
"在职状态 0是/1否"
,
name
=
"workFlag"
)
private
String
workFlag
;
/**
* 原因大类 根据数据字典来判断
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"reasonType"
)
@ExcelAttribute
(
name
=
"原因大类"
,
errorInfo
=
"原因大类不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
HAVE_SALARY_NO_SOCIAL_TYPE
,
needExport
=
true
)
private
Integer
reasonType
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"创建人-姓名"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建人"
)
private
String
createName
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/THaveSalaryNosocialHandleExportVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
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.salary.entity.THaveSalaryNosocial
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 有工资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Tag
(
name
=
"有资没有社保(首页提醒定时任务)"
)
public
class
THaveSalaryNosocialHandleExportVo
extends
THaveSalaryNosocial
{
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"lastOneReasonType"
)
@ExcelAttribute
(
name
=
"前一月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
HAVE_SALARY_NO_SOCIAL_TYPE
,
needExport
=
true
)
private
Integer
lastOneReasonType
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"lastTwoReasonType"
)
@ExcelAttribute
(
name
=
"前二月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
HAVE_SALARY_NO_SOCIAL_TYPE
,
needExport
=
true
)
private
Integer
lastTwoReasonType
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"原因大类 根据数据字典来判断 "
,
name
=
"lastThreeReasonType"
)
@ExcelAttribute
(
name
=
"前三月原因大类"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
HAVE_SALARY_NO_SOCIAL_TYPE
,
needExport
=
true
)
private
Integer
lastThreeReasonType
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/THaveSalaryNosocialSearchVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* @Author fxj
* @Date 2022/8/17
* @Description 有工资无社保人员
* @Version 1.0
*/
@Data
public
class
THaveSalaryNosocialSearchVo
extends
THaveSalaryNosocial
{
/**
* 多选导出或删除等操作
*/
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
private
int
limitEnd
;
}
yifu-salary/yifu-salary-biz/pom.xml
View file @
82659bb9
...
...
@@ -77,6 +77,12 @@
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-social-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/SysMessageSalaryController.java
View file @
82659bb9
/*
* 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
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
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.ExcelUtil
;
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.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.CharEncoding
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -37,16 +38,28 @@ import java.util.List;
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-11-21 17:18:10
*/
@RestController
@
Required
ArgsConstructor
@
All
ArgsConstructor
@RequestMapping
(
"/sysmessagesalary"
)
@Tag
(
name
=
"最低工资提醒-每月更新一次管理"
)
@Tag
(
name
=
"最低工资提醒-每月更新一次"
)
@Slf4j
public
class
SysMessageSalaryController
{
public
static
final
String
EMPLOYEE_ID
=
"employeeId"
;
public
static
final
String
MULTIPART_FORM_DATA
=
"multipart/form-data"
;
public
static
final
String
CONTENT_DISPOSITION
=
"Content-Disposition"
;
public
static
final
String
ATTACHMENT_FILENAME
=
"attachment;filename="
;
private
final
SysMessageSalaryService
sysMessageSalaryService
;
/* @Autowired
private RemoteSysDictService remoteSysDictService;
@Autowired
private PreRemoteBasicArchivesService preRemoteBasicArchivesService;
@Autowired
private RemoteUserService remoteUserService;
@Autowired
private RemoteBasicArchivesService remoteBasicArchivesService;*/
/**
* 简单分页查询
...
...
@@ -57,75 +70,439 @@ public class SysMessageSalaryController {
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
SysMessageSalary
>>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalarySearchVo
sysMessageSalary
)
{
public
R
<
IPage
<
SysMessageSalary
>>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalary
sysMessageSalary
)
{
return
new
R
<>(
sysMessageSalaryService
.
getSysMessageSalaryPage
(
page
,
sysMessageSalary
));
}
/**
* 不
分页查询
* 简单
分页查询
*
* @param page 分页对象
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
* @return 查询所有数据,没有数据权限
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('salary_sysmessagesalary_get')" )
public
R
<
List
<
SysMessageSalary
>>
getSysMessageSalaryNoPage
(
@RequestBody
SysMessageSalarySearchVo
sysMessageSalary
)
{
return
R
.
ok
(
sysMessageSalaryService
.
noPageDiy
(
sysMessageSalary
));
@Operation
(
description
=
"处理反馈简单分页查询"
)
@GetMapping
(
"/handle/page"
)
public
R
<
IPage
<
SysMessageSalary
>>
getSysMessageSalaryHandlePage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalary
sysMessageSalary
)
{
return
new
R
<>(
sysMessageSalaryService
.
getSysMessageSalaryHandlePage
(
page
,
sysMessageSalary
));
}
/**
* 通过id查询最低工资提醒-每月更新一次
* 通过id查询单条记录
*
* @param id
id
* @param
id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_sysmessagesalary_get')
"
)
@Operation
(
description
=
"id查询
"
)
@GetMapping
(
"/{id}"
)
public
R
<
SysMessageSalary
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
sysMessageSalaryService
.
getById
(
id
));
return
new
R
<>
(
sysMessageSalaryService
.
getById
(
id
));
}
/**
* 新增最低工资提醒-每月更新一次
*
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return R
* 生成最低工资提醒
* hgw
* 2019-11-21 18:35:56
*/
@Operation
(
summary
=
"新增最低工资提醒-每月更新一次"
,
description
=
"新增最低工资提醒-每月更新一次:hasPermission('salary_sysmessagesalary_add')"
)
@SysLog
(
"新增最低工资提醒-每月更新一次"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('salary_sysmessagesalary_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
SysMessageSalary
sysMessageSalary
)
{
return
R
.
ok
(
sysMessageSalaryService
.
save
(
sysMessageSalary
));
@Inner
@Operation
(
description
=
"生成最低工资提醒"
)
@GetMapping
(
"/inner/createSysMessageSalary"
)
public
void
createSysMessageSalary
()
{
//结算月
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
//1:删除当前结算月数据:
sysMessageSalaryService
.
deleteAllBySettleMonth
(
settleMonth
);
//2:开始生成:
//2.1:普通工资
sysMessageSalaryService
.
insertSalaryBySettleMonth
(
settleMonth
);
}
/**
* 修改最低工资提醒-每月更新一次
*
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return R
*/
@Operation
(
summary
=
"修改最低工资提醒-每月更新一次"
,
description
=
"修改最低工资提醒-每月更新一次:hasPermission('salary_sysmessagesalary_edit')"
)
@SysLog
(
"修改最低工资提醒-每月更新一次"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('salary_sysmessagesalary_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
SysMessageSalary
sysMessageSalary
)
{
return
R
.
ok
(
sysMessageSalaryService
.
updateById
(
sysMessageSalary
));
* @param
* @Author: wangan
* @Date: 2021/1/11
* @Description: 为了生成之前的月份
* @return: void
**/
@Operation
(
description
=
"生成最低工资提醒外部接口调用"
)
@SysLog
(
"生成最低工资提醒外部接口调用"
)
@PostMapping
(
"/handle/createSysMessageSalary"
)
public
void
handleCreateSysMessageSalary
(
String
settleMonth
)
{
//1:删除当前结算月数据:
sysMessageSalaryService
.
deleteAllBySettleMonth
(
settleMonth
);
//2:开始生成:
//2.1:普通工资
sysMessageSalaryService
.
insertSalaryBySettleMonth
(
settleMonth
);
}
/**
* 通过id删除最低工资提醒-每月更新一次
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除最低工资提醒-每月更新一次"
,
description
=
"通过id删除最低工资提醒-每月更新一次:hasPermission('salary_sysmessagesalary_del')"
)
@SysLog
(
"通过id删除最低工资提醒-每月更新一次"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('salary_sysmessagesalary_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
sysMessageSalaryService
.
removeById
(
id
));
* @param
* @Author: wangan
* @Date: 2020/12/17
* @Description: 最低工资提醒-临时人员连续购买最低工资次数
* @return: void
**/
@Inner
@GetMapping
(
"/inner/createSysMessageSalaryTemp"
)
public
void
createSysMessageSalaryTemp
()
{
//结算月
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
sysMessageSalaryService
.
createSysMessageSalaryTemp
(
settleMonth
);
}
/**
* @param
* @Author: wangan
* @Date: 2021/1/11
* @Description: 为了生成之前的月份
* @return: void
**/
@Operation
(
description
=
"临时人员连续购买最低工资次数外部接口调用"
)
@SysLog
(
"临时人员连续购买最低工资次数外部接口调用"
)
@PostMapping
(
"/handle/createSysMessageSalaryTemp"
)
public
void
handleCreateSysMessageSalaryTemp
(
String
settleMonth
)
{
sysMessageSalaryService
.
createSysMessageSalaryTemp
(
settleMonth
);
}
/**
* @param
* @Author: wangan
* @Date: 2019/11/26
* @Description: 获取导出的中文字段
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation
(
description
=
"获取导出的中文字段"
)
@GetMapping
(
"/getExportFieldName"
)
public
R
<
List
<
String
>>
getExportFieldName
()
{
return
ExcelUtil
.
getExportfieldsName
(
SysMessageSalary
.
class
);
}
@GetMapping
(
"/export"
)
@Operation
(
description
=
"导出"
)
@SysLog
(
"导出"
)
public
void
exportHandle
(
HttpServletResponse
response
,
HttpServletRequest
request
,
@RequestParam
(
name
=
"idStr"
,
required
=
false
)
String
[]
idstr
,
@RequestParam
(
name
=
"exportFields"
,
required
=
true
)
String
[]
exportFields
,
SysMessageSalary
vo
)
{
List
<
SysMessageSalary
>
list
;
OutputStream
ouputStream
=
null
;
HSSFWorkbook
workbook
;
ExcelUtil
<
SysMessageSalary
>
util1
;
util1
=
new
ExcelUtil
<>(
SysMessageSalary
.
class
);
if
(
Common
.
isNotNull
(
idstr
))
{
list
=
sysMessageSalaryService
.
getByIdExport
(
idstr
);
}
else
{
list
=
sysMessageSalaryService
.
getExport
(
vo
);
}
try
{
HashMap
<
String
,
String
>
dicMap
=
Maps
.
newHashMap
();
//获取所有用户
if
(!
list
.
isEmpty
())
{
/*Map<String, String> userNameMap = null;//RemoteExportUtil.getUserNameMap(remoteUserService);
//字典数据
R<List<SysDict>> res = remoteSysDictService.findDetailsByItemTypeAndClientId("", ServiceNameConstants.SERVICE_NAME_WXHR, SecurityConstants.FROM_IN);
//区域数据
R<List<SysArea>> sysAreaR = preRemoteBasicArchivesService.getSysAreaList(SecurityUtils.getUser());
dicMap = ServiceUtil.initMapForExport(null == res ? null : res.getData(), null, null == sysAreaR ? null : sysAreaR.getData(), userNameMap);
//获取员工
Map<String, TEmployeeInfo> employeeInfoMap = RemoteExportUtil.getTEmployeeInfoMap(remoteBasicArchivesService, Common.listObjectToStr(list, EMPLOYEE_ID, CommonConstants.COMMA_STRING));
//塞员工值
for (SysMessageSalary salary : list) {
TEmployeeInfo employeeInfo = employeeInfoMap.get(salary.getEmployeeId());
if (employeeInfo != null) {
salary.setEmpType(employeeInfo.getEmpType());
salary.setFileProvince(employeeInfo.getFileProvince());
salary.setFileCity(employeeInfo.getFileCity());
salary.setFileTown(employeeInfo.getFileTown());
salary.setWorkFlag(employeeInfo.getWorkFlag());
salary.setWorkingStatusSub(employeeInfo.getWorkingStatusSub());
}
}*/
}
workbook
=
null
;
// util1.listToExcelByDicMap(list, exportFields, "最低工资提醒信息", dicMap, DateUtil.ISO_EXPANDED_DATE_FORMAT);
String
fileName
=
"最低工资提醒信息"
+
LocalDateTime
.
now
()
+
".xls"
;
response
.
setContentType
(
MULTIPART_FORM_DATA
);
response
.
setHeader
(
CONTENT_DISPOSITION
,
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CharEncoding
.
UTF_8
));
ouputStream
=
response
.
getOutputStream
();
workbook
.
write
(
ouputStream
);
ouputStream
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
ouputStream
)
{
ouputStream
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
/**
* @param
* @Author: wangan
* @Date: 2020/12/16
* @Description:
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < java.lang.String>>
**/
@Operation
(
description
=
"获取反馈审核导出的中文字段"
)
@GetMapping
(
"/getHandleExportFieldName"
)
public
R
<
List
<
String
>>
getHandleExportFieldName
()
{
Class
<?
super
SysMessageSalaryHandelExportVo
>
superClazz
=
SysMessageSalaryHandelExportVo
.
class
.
getSuperclass
();
R
<
List
<
String
>>
superExportfieldsName
=
ExcelUtil
.
getExportfieldsName
(
superClazz
);
R
<
List
<
String
>>
exportfieldsName
=
ExcelUtil
.
getExportfieldsName
(
SysMessageSalaryHandelExportVo
.
class
);
List
<
String
>
data
=
superExportfieldsName
.
getData
();
data
.
addAll
(
exportfieldsName
.
getData
());
return
R
.
ok
(
data
);
}
/**
* @param response
* @param request
* @param idstr
* @param exportFields
* @param vo
* @Author: wangan
* @Date: 2020/12/17
* @Description:
* @return: void
**/
@GetMapping
(
"/handle/export"
)
@Operation
(
description
=
"反馈审核人员导出"
)
@SysLog
(
"反馈审核人员导出"
)
public
void
exportHandle
(
HttpServletResponse
response
,
HttpServletRequest
request
,
@RequestParam
(
name
=
"idStr"
,
required
=
false
)
String
[]
idstr
,
@RequestParam
(
name
=
"exportFields"
,
required
=
true
)
String
[]
exportFields
,
SysMessageSalaryHandelExportVo
vo
)
{
if
(
Common
.
isEmpty
(
vo
.
getSettleMonth
()))
{
return
;
}
List
<
SysMessageSalaryHandelExportVo
>
list
;
OutputStream
ouputStream
=
null
;
HSSFWorkbook
workbook
;
ExcelUtil
<
SysMessageSalaryHandelExportVo
>
util1
;
util1
=
new
ExcelUtil
<>(
SysMessageSalaryHandelExportVo
.
class
);
if
(
Common
.
isNotNull
(
idstr
))
{
list
=
sysMessageSalaryService
.
getByIdHandleExport
(
idstr
);
}
else
{
list
=
sysMessageSalaryService
.
getHandleExport
(
vo
);
}
try
{
//通过员工id+结算月份查询所有消息提醒数据。
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMM"
);
Calendar
instance
=
Calendar
.
getInstance
();
Date
date
=
sf
.
parse
(
vo
.
getSettleMonth
());
instance
.
setTime
(
date
);
instance
.
add
(
Calendar
.
MONTH
,
-
1
);
String
lastOneMonth
=
sf
.
format
(
instance
.
getTime
());
instance
.
add
(
Calendar
.
MONTH
,
-
1
);
String
lastTwoMonth
=
sf
.
format
(
instance
.
getTime
());
instance
.
add
(
Calendar
.
MONTH
,
-
1
);
String
lastThreeMonth
=
sf
.
format
(
instance
.
getTime
());
List
<
SysMessageSalary
>
lastTHaveSalaryNosocial
=
sysMessageSalaryService
.
getLastTHaveSalaryNosocial
(
lastOneMonth
,
lastTwoMonth
,
lastThreeMonth
);
HashMap
<
String
,
Integer
>
lastHashMap
=
Maps
.
newHashMap
();
for
(
SysMessageSalary
entity
:
lastTHaveSalaryNosocial
)
{
lastHashMap
.
put
(
entity
.
getSettleMonth
()
+
entity
.
getEmployeeId
(),
null
);
}
HashMap
<
String
,
String
>
dicMap
=
Maps
.
newHashMap
();
//获取所有用户
if
(!
list
.
isEmpty
())
{
/* Map<String, String> userNameMap = null;// RemoteExportUtil.getUserNameMap(remoteUserService);
//字典数据
R<List<SysDict>> res = remoteSysDictService.findDetailsByItemTypeAndClientId("", ServiceNameConstants.SERVICE_NAME_WXHR, SecurityConstants.FROM_IN);
//区域数据
R<List<SysArea>> sysAreaR = preRemoteBasicArchivesService.getSysAreaList(SecurityUtils.getUser());
dicMap = ServiceUtil.initMapForExport(null == res ? null : res.getData(), null, null == sysAreaR ? null : sysAreaR.getData(), userNameMap);
//获取员工
Map<String, TEmployeeInfo> employeeInfoMap = RemoteExportUtil.getTEmployeeInfoMap(remoteBasicArchivesService, Common.listObjectToStr(list, EMPLOYEE_ID, CommonConstants.COMMA_STRING));
//塞员工值
for (SysMessageSalaryHandelExportVo handelExportVo : list) {
TEmployeeInfo employeeInfo = employeeInfoMap.get(handelExportVo.getEmployeeId());
if (employeeInfo != null) {
handelExportVo.setEmpType(employeeInfo.getEmpType());
handelExportVo.setFileProvince(employeeInfo.getFileProvince());
handelExportVo.setFileCity(employeeInfo.getFileCity());
handelExportVo.setFileTown(employeeInfo.getFileTown());
handelExportVo.setWorkFlag(employeeInfo.getWorkFlag());
handelExportVo.setWorkingStatusSub(employeeInfo.getWorkingStatusSub());
}
//从map汇总获取前三个月的反馈数据
handelExportVo.setLastOneReasonType(lastHashMap.get(lastOneMonth + handelExportVo.getEmployeeId()));
handelExportVo.setLastTwoReasonType(lastHashMap.get(lastTwoMonth + handelExportVo.getEmployeeId()));
handelExportVo.setLastThreeReasonType(lastHashMap.get(lastThreeMonth + handelExportVo.getEmployeeId()));
}*/
}
workbook
=
null
;
//util1.listToExcelByDicMap(list, exportFields, "最低工资反馈导出", dicMap, DateUtil.ISO_EXPANDED_DATE_FORMAT);
String
fileName
=
"最低工资反馈导出"
+
LocalDateTime
.
now
()
+
".xls"
;
response
.
setContentType
(
MULTIPART_FORM_DATA
);
response
.
setHeader
(
CONTENT_DISPOSITION
,
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CharEncoding
.
UTF_8
));
ouputStream
=
response
.
getOutputStream
();
workbook
.
write
(
ouputStream
);
ouputStream
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
ouputStream
)
{
ouputStream
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
/**
* @param
* @Author: wangan
* @Date: 2020/12/16
* @Description:
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < java.lang.String>>
**/
@Operation
(
description
=
"获取临时人员导出的中文字段"
)
@GetMapping
(
"/getTempExportFieldName"
)
public
R
<
List
<
String
>>
getTempExportFieldName
()
{
Class
<?
super
SysMessageSalaryTemplExportVo
>
superClazz
=
SysMessageSalaryTemplExportVo
.
class
.
getSuperclass
();
R
<
List
<
String
>>
superExportfieldsName
=
ExcelUtil
.
getExportfieldsName
(
superClazz
);
R
<
List
<
String
>>
exportfieldsName
=
ExcelUtil
.
getExportfieldsName
(
SysMessageSalaryTemplExportVo
.
class
);
List
<
String
>
data
=
superExportfieldsName
.
getData
();
data
.
addAll
(
exportfieldsName
.
getData
());
return
R
.
ok
(
data
);
}
/**
* @param response
* @param request
* @param idstr
* @param exportFields
* @param vo
* @Author: wangan
* @Date: 2020/12/17
* @Description:
* @return: void
**/
@GetMapping
(
"/temp/export"
)
@Operation
(
description
=
"临时人员导出"
)
@SysLog
(
"临时人员导出"
)
public
void
tempExportHandle
(
HttpServletResponse
response
,
HttpServletRequest
request
,
@RequestParam
(
name
=
"idStr"
,
required
=
false
)
String
[]
idstr
,
@RequestParam
(
name
=
"exportFields"
,
required
=
true
)
String
[]
exportFields
,
SysMessageSalaryTemplExportVo
vo
)
{
if
(
Common
.
isEmpty
(
vo
.
getSettleMonth
()))
{
return
;
}
List
<
SysMessageSalaryTemplExportVo
>
list
;
OutputStream
ouputStream
=
null
;
HSSFWorkbook
workbook
;
ExcelUtil
<
SysMessageSalaryTemplExportVo
>
util1
;
util1
=
new
ExcelUtil
<>(
SysMessageSalaryTemplExportVo
.
class
);
list
=
sysMessageSalaryService
.
getTempExport
(
vo
.
getSettleMonth
());
try
{
//通过员工id+结算月份查询所有消息提醒数据。
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMM"
);
Calendar
instance
=
Calendar
.
getInstance
();
Date
date
=
sf
.
parse
(
vo
.
getSettleMonth
());
instance
.
setTime
(
date
);
instance
.
add
(
Calendar
.
MONTH
,
-
1
);
String
lastOneMonth
=
sf
.
format
(
instance
.
getTime
());
instance
.
add
(
Calendar
.
MONTH
,
-
1
);
String
lastTwoMonth
=
sf
.
format
(
instance
.
getTime
());
instance
.
add
(
Calendar
.
MONTH
,
-
1
);
String
lastThreeMonth
=
sf
.
format
(
instance
.
getTime
());
List
<
SysMessageSalary
>
lastTHaveSalaryNosocial
=
sysMessageSalaryService
.
getLastTHaveSalaryNosocial
(
lastOneMonth
,
lastTwoMonth
,
lastThreeMonth
);
HashMap
<
String
,
Integer
>
lastHashMap
=
Maps
.
newHashMap
();
for
(
SysMessageSalary
entity
:
lastTHaveSalaryNosocial
)
{
lastHashMap
.
put
(
entity
.
getSalaryMonth
()
+
entity
.
getEmployeeId
(),
null
);
}
HashMap
<
String
,
String
>
dicMap
=
Maps
.
newHashMap
();
//获取所有用户
if
(!
list
.
isEmpty
())
{
/* Map<String, String> userNameMap = RemoteExportUtil.getUserNameMap(remoteUserService);
//字典数据
R<List<SysDict>> res = remoteSysDictService.findDetailsByItemTypeAndClientId("", ServiceNameConstants.SERVICE_NAME_WXHR, SecurityConstants.FROM_IN);
//区域数据
R<List<SysArea>> sysAreaR = preRemoteBasicArchivesService.getSysAreaList(SecurityUtils.getUser());
dicMap = ServiceUtil.initMapForExport(null == res ? null : res.getData(), null, null == sysAreaR ? null : sysAreaR.getData(), userNameMap);
//获取员工
Map<String, TEmployeeInfo> employeeInfoMap = RemoteExportUtil.getTEmployeeInfoMap(remoteBasicArchivesService, Common.listObjectToStr(list, EMPLOYEE_ID, CommonConstants.COMMA_STRING));
//塞员工值
for (SysMessageSalaryTemplExportVo exportVo : list) {
TEmployeeInfo employeeInfo = employeeInfoMap.get(exportVo.getEmployeeId());
if (employeeInfo != null) {
*//*exportVo.setEmpType(employeeInfo.getEmpType());
exportVo.setFileProvince(employeeInfo.getFileProvince());
exportVo.setFileCity(employeeInfo.getFileCity());
exportVo.setFileTown(employeeInfo.getFileTown());
exportVo.setWorkFlag(employeeInfo.getWorkFlag());
exportVo.setWorkingStatusSub(employeeInfo.getWorkingStatusSub());*//*
}
//从map汇总获取前三个月的反馈数据
exportVo.setLastOneReasonType(lastHashMap.get(lastOneMonth + exportVo.getEmployeeId()));
exportVo.setLastTwoReasonType(lastHashMap.get(lastTwoMonth + exportVo.getEmployeeId()));
exportVo.setLastThreeReasonType(lastHashMap.get(lastThreeMonth + exportVo.getEmployeeId()));
}*/
}
workbook
=
null
;
//util1.listToExcelByDicMap(list, exportFields, "最低工资临时人员", dicMap, DateUtil.ISO_EXPANDED_DATE_FORMAT);
String
fileName
=
"最低工资临时人员"
+
LocalDateTime
.
now
()
+
".xls"
;
response
.
setContentType
(
MULTIPART_FORM_DATA
);
response
.
setHeader
(
CONTENT_DISPOSITION
,
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CharEncoding
.
UTF_8
));
ouputStream
=
response
.
getOutputStream
();
workbook
.
write
(
ouputStream
);
ouputStream
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
ouputStream
)
{
ouputStream
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
/**
* @param
* @Author: wangan
* @Date: 2019/11/22
* @Description: 工作台消息提醒:最低工资提醒
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, java.lang.Object>>
**/
/*@PostMapping("/inner/workBranch/getSalaryMessageWarn")
@Inner
public R<List<WorkBanchWarnVo>> getSalaryMessageWarn(@RequestBody List<TSettleDomainSelectVo> remoteSettleDomainVoData) {
List<WorkBanchWarnVo> resultList = Lists.newArrayList();
List<String> settleDomainIds = Common.listObjectToStrList(remoteSettleDomainVoData, "id");
//最低工资提醒
int lowestalaryWarnCount = 0;
if (settleDomainIds != null && !settleDomainIds.isEmpty()) {
lowestalaryWarnCount = sysMessageSalaryService.count(Wrappers.<SysMessageSalary>query().lambda()
.in(SysMessageSalary::getDepartId, settleDomainIds));
}
if (lowestalaryWarnCount > 0) {
WorkBanchWarnVo noBuyInsuranceWorkBanchWarnVo = new WorkBanchWarnVo();
noBuyInsuranceWorkBanchWarnVo.setMesage(lowestalaryWarnCount + "个最低工资提醒");
noBuyInsuranceWorkBanchWarnVo.setCount(lowestalaryWarnCount);
noBuyInsuranceWorkBanchWarnVo.setUrl(WorkBanchConstants.LOWERST_SALARY_WARN_NAME_URL);
resultList.add(noBuyInsuranceWorkBanchWarnVo);
}
return new R(resultList);
}*/
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/SysMessageSalaryTempController.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.SysMessageSalaryTemp
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryTempService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/sysmessagesalarytemp"
)
@Tag
(
name
=
"最低工资提醒-临时人员连续购买最低工资次数"
)
public
class
SysMessageSalaryTempController
{
private
final
SysMessageSalaryTempService
sysMessageSalaryTempService
;
/**
* 简单分页查询
* @param page 分页对象
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
SysMessageSalaryTemp
>>
getSysMessageSalaryTempPage
(
Page
<
SysMessageSalaryTemp
>
page
,
SysMessageSalaryTemp
sysMessageSalaryTemp
)
{
return
new
R
<>(
sysMessageSalaryTempService
.
getSysMessageSalaryTempPage
(
page
,
sysMessageSalaryTemp
));
}
/**
* 通过id查询单条记录
* @param id
* @return R
*/
@Operation
(
description
=
"id查询"
)
@GetMapping
(
"/{id}"
)
public
R
<
SysMessageSalaryTemp
>
getById
(
@PathVariable
(
"id"
)
String
id
){
return
new
R
<>(
sysMessageSalaryTempService
.
getById
(
id
));
}
/**
* 新增记录
* @param sysMessageSalaryTemp
* @return R
*/
@Operation
(
description
=
"新增(wxhr:sysmessagesalarytemp_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:sysmessagesalarytemp_add')"
)
public
R
<
Boolean
>
save
(
@Valid
@RequestBody
SysMessageSalaryTemp
sysMessageSalaryTemp
){
return
new
R
<>(
sysMessageSalaryTempService
.
save
(
sysMessageSalaryTemp
));
}
/**
* 修改记录
* @param sysMessageSalaryTemp
* @return R
*/
@Operation
(
description
=
"修改(wxhr:sysmessagesalarytemp_edit)"
)
@SysLog
(
"修改最低工资提醒-临时人员连续购买最低工资次数"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:sysmessagesalarytemp_edit')"
)
public
R
<
Boolean
>
update
(
@RequestBody
SysMessageSalaryTemp
sysMessageSalaryTemp
){
return
new
R
<>(
sysMessageSalaryTempService
.
updateById
(
sysMessageSalaryTemp
));
}
/**
* 通过id删除一条记录
* @param id
* @return R
*/
@Operation
(
description
=
"删除(wxhr:sysmessagesalarytemp_del)"
)
@SysLog
(
"删除最低工资提醒-临时人员连续购买最低工资次数"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:sysmessagesalarytemp_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
){
return
new
R
<>(
sysMessageSalaryTempService
.
removeById
(
id
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/THaveSalaryNosocialController.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
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.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.THaveSalaryNosocialService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/thavesalarynosocial"
)
@Tag
(
name
=
"有工资没有社保(首页提醒定时任务)"
)
@Slf4j
public
class
THaveSalaryNosocialController
{
private
final
THaveSalaryNosocialService
tHaveSalaryNosocialService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
THaveSalaryNosocial
>>
getTHaveSalaryNosocialPage
(
Page
<
THaveSalaryNosocial
>
page
,
THaveSalaryNosocial
tHaveSalaryNosocial
)
{
return
new
R
<>(
tHaveSalaryNosocialService
.
getTHaveSalaryNosocialPage
(
page
,
tHaveSalaryNosocial
));
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
@Operation
(
description
=
"有工资无社保处理简单分页查询"
)
@GetMapping
(
"/handle/page"
)
public
R
<
IPage
<
THaveSalaryNosocial
>>
getTHaveSalaryNosocialHandelPage
(
Page
<
THaveSalaryNosocial
>
page
,
THaveSalaryNosocial
tHaveSalaryNosocial
)
{
return
new
R
<>(
tHaveSalaryNosocialService
.
getTHaveSalaryNosocialHandelPage
(
page
,
tHaveSalaryNosocial
));
}
/**
* 通过id查询单条记录
*
* @param id
* @return R
*/
@Operation
(
description
=
"id查询"
)
@GetMapping
(
"/{id}"
)
public
R
<
THaveSalaryNosocial
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
new
R
<>(
tHaveSalaryNosocialService
.
getById
(
id
));
}
/**
* 新增记录
*
* @param tHaveSalaryNosocial
* @return R
*/
@Operation
(
description
=
"新增(wxhr:thavesalarynosocial_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:thavesalarynosocial_add')"
)
public
R
<
Object
>
save
(
@Valid
@RequestBody
THaveSalaryNosocial
tHaveSalaryNosocial
)
{
return
new
R
<>(
tHaveSalaryNosocialService
.
save
(
tHaveSalaryNosocial
));
}
/**
* 修改记录
*
* @param tHaveSalaryNosocial
* @return R
*/
@Operation
(
description
=
"修改(wxhr:thavesalarynosocial_edit)"
)
@SysLog
(
"修改有资没有社保(首页提醒定时任务)"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:thavesalarynosocial_edit')"
)
public
R
<
Object
>
update
(
@RequestBody
THaveSalaryNosocial
tHaveSalaryNosocial
)
{
return
new
R
<>(
tHaveSalaryNosocialService
.
updateById
(
tHaveSalaryNosocial
));
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@Operation
(
description
=
"删除(wxhr:thavesalarynosocial_del)"
)
@SysLog
(
"删除有资没有社保(首页提醒定时任务)"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:thavesalarynosocial_del')"
)
public
R
<
Object
>
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>(
tHaveSalaryNosocialService
.
removeById
(
id
));
}
/**
* @Author fxj
* @Description 消息提醒导出
* @Date 15:28 2022/8/17
* @Param
* @return
**/
@SysLog
(
"消息提醒导出"
)
@Operation
(
description
=
"导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
THaveSalaryNosocialSearchVo
searchVo
)
{
tHaveSalaryNosocialService
.
listExport
(
response
,
searchVo
);
}
/**
* @Author fxj
* @Description 只有创建人为自己才能反馈
* @Date 17:15 2022/8/17
* @Param
* @return
**/
@Operation
(
description
=
"反馈"
)
@PostMapping
(
"/feedback"
)
public
R
<
String
>
feedback
(
@RequestParam
(
name
=
"reasonType"
,
required
=
true
)
Integer
reasonType
,
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
return
tHaveSalaryNosocialService
.
feedback
(
reasonType
,
id
);
}
/**
* @Author fxj
* @Description 有资没有社保(首页提醒定时任务 每月1号 6点)
* @Date 17:16 2022/8/17
* @Param
* @return
**/
@Inner
@PostMapping
(
"/inner/generate"
)
public
void
generate
()
{
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
tHaveSalaryNosocialService
.
generate
(
settleMonth
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAccountController.java
View file @
82659bb9
...
...
@@ -17,24 +17,32 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -51,6 +59,8 @@ public class TSalaryAccountController {
private
final
TSalaryAccountService
tSalaryAccountService
;
private
final
TSalaryAccountItemService
tSalaryAccountItemService
;
/**
* 简单分页查询
...
...
@@ -144,4 +154,91 @@ public class TSalaryAccountController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TSalaryAccountSearchVo
searchVo
)
{
tSalaryAccountService
.
listExport
(
response
,
searchVo
);
}
/**
* @Author fxj
* @Description 获取工资条
* @Date 14:53 2022/8/15
* @Param
* @return
**/
@Operation
(
description
=
"获取工资条"
)
@GetMapping
(
"/getEmpAccount"
)
public
R
<
TSalaryDetailVo
>
getEmpAccount
(
String
empIdcard
,
String
settleDepartId
,
String
settlementMonth
,
String
settleDepartNo
,
String
settleDepartName
,
String
empName
)
{
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
if
(
Common
.
isEmpty
(
empIdcard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
settlementMonth
)
&&
Common
.
isEmpty
(
settleDepartNo
)
&&
Common
.
isEmpty
(
settleDepartName
)
&&
Common
.
isEmpty
(
empName
))
{
return
R
.
failed
(
"请输入查询条件"
);
}
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
Common
.
isEmpty
(
empIdcard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
settleDepartNo
)
&&
Common
.
isEmpty
(
settleDepartName
)
&&
Common
.
isEmpty
(
empName
))
{
return
R
.
failed
(
"结算月需配合其他查询条件一起使用,请输入其他查询条件!"
);
}
//报账表
TSalaryAccount
salaryAccount
=
new
TSalaryAccount
();
salaryAccount
.
setDeleteFlag
(
SalaryConstants
.
NOT_DELETE
);
if
(
Common
.
isNotNull
(
empIdcard
))
{
salaryAccount
.
setEmpIdcard
(
empIdcard
);
}
if
(
Common
.
isNotNull
(
settleDepartId
))
{
salaryAccount
.
setDeptId
(
settleDepartId
);
}
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
settlementMonth
.
length
()
==
6
)
{
salaryAccount
.
setSettlementMonth
(
settlementMonth
);
}
QueryWrapper
<
TSalaryAccount
>
queryWrapperSa
=
new
QueryWrapper
<>();
queryWrapperSa
.
setEntity
(
salaryAccount
);
if
(
Common
.
isNotNull
(
empName
))
{
queryWrapperSa
.
eq
(
"EMP_NAME"
,
empName
);
}
if
(
Common
.
isNotNull
(
settleDepartNo
))
{
queryWrapperSa
.
eq
(
"SETTLE_DEPART_NO"
,
settleDepartNo
);
}
if
(
Common
.
isNotNull
(
settleDepartName
))
{
queryWrapperSa
.
like
(
"SETTLE_DEPART_NAME"
,
settleDepartName
);
}
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
settlementMonth
.
length
()
<
6
)
{
queryWrapperSa
.
like
(
"SETTLEMENT_MONTH"
,
settlementMonth
);
}
queryWrapperSa
.
orderByAsc
(
"SETTLEMENT_MONTH"
);
List
<
TSalaryAccount
>
salaryAccountList
=
tSalaryAccountService
.
list
(
queryWrapperSa
);
Map
<
String
,
String
>
accountTitle
=
new
HashMap
<>();
if
(
salaryAccountList
!=
null
&&
salaryAccountList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
//报账表明细
TSalaryAccountItem
item
;
QueryWrapper
<
TSalaryAccountItem
>
queryWrapperAi
;
List
<
TSalaryAccountItem
>
itemList
;
for
(
TSalaryAccount
a
:
salaryAccountList
)
{
item
=
new
TSalaryAccountItem
();
item
.
setSalaryAccountId
(
a
.
getId
());
queryWrapperAi
=
new
QueryWrapper
<>();
queryWrapperAi
.
setEntity
(
item
);
itemList
=
tSalaryAccountItemService
.
list
(
queryWrapperAi
);
if
(
itemList
!=
null
&&
itemList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
for
(
TSalaryAccountItem
items
:
itemList
)
{
accountTitle
.
put
(
items
.
getCnName
(),
items
.
getJavaFiedName
());
}
}
a
.
setSaiList
(
itemList
);
}
}
salaryDetailVo
.
setSalaryAccountList
(
salaryAccountList
);
salaryDetailVo
.
setAccountTitle
(
accountTitle
);
return
new
R
<>(
salaryDetailVo
);
}
/**
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:20 2022/8/16
* @Param
* @return
**/
@Inner
@PostMapping
(
"/inner/getLastMonthTHaveSalaryNosocial"
)
public
R
<
List
<
THaveSalaryNosocial
>>
getLastMonthTHaveSalaryNosocial
(
@RequestParam
(
name
=
"month"
)
String
month
){
return
new
R
<>(
tSalaryAccountService
.
getLastMonthTHaveSalaryNosocial
(
month
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSpecialDeducationSumController.java
View file @
82659bb9
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
...
...
@@ -119,6 +120,24 @@ public class TSpecialDeducationSumController {
return
tSpecialDeducationSumService
.
uploadSds
(
savList
);
}
/**
* @Author fxj
* @Description
* @Date 14:31 2022/8/17
* @Param
* @return
**/
@Operation
(
description
=
"获取申报单位对应月份专项扣除条数"
)
@GetMapping
(
"/getCountOfDeclareTitle"
)
public
R
<
Long
>
uploadSds
(
String
yearMonth
,
String
declareTitle
)
{
if
(
Common
.
isEmpty
(
yearMonth
))
{
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyyMM"
);
yearMonth
=
df
.
format
(
new
Date
());
}
return
R
.
ok
(
tSpecialDeducationSumService
.
count
(
Wrappers
.<
TSpecialDeducationSum
>
query
().
lambda
()
.
eq
(
TSpecialDeducationSum:
:
getDeclareTitle
,
declareTitle
)
.
eq
(
TSpecialDeducationSum:
:
getCreateMonth
,
yearMonth
)));
}
/**
* @param declareTitle
* @Description: 删除当月全部-专项扣除汇总
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/SysMessageSalaryMapper.java
View file @
82659bb9
/*
* 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
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-11-21 17:18:10
*/
@Mapper
public
interface
SysMessageSalaryMapper
extends
BaseMapper
<
SysMessageSalary
>
{
/**
* 最低工资提醒-每月更新一次简单分页查询
*
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
*/
IPage
<
SysMessageSalary
>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
@Param
(
"sysMessageSalary"
)
SysMessageSalary
sysMessageSalary
);
IPage
<
SysMessageSalary
>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
@Param
(
"sysMessageSalary"
)
SysMessageSalary
sysMessageSalary
,
@Param
(
"settleDomainVos"
)
List
<
TSettleDomainSelectVo
>
settleDomainVos
);
IPage
<
SysMessageSalary
>
getSysMessageSalaryHandlePage
(
Page
<
SysMessageSalary
>
page
,
@Param
(
"sysMessageSalary"
)
SysMessageSalary
sysMessageSalary
);
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
List
<
SysMessageSalary
>
insertSalaryBySettleMonth
(
@Param
(
"settleMonth"
)
String
settleMonth
);
/**
* @param settleMonth
* @Description: 新增-工程工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
List
<
SysMessageSalary
>
insertEngineerBySettleMonth
(
@Param
(
"settleMonth"
)
String
settleMonth
);
/**
* @param settleMonth 结算月
* @Description: 生成前,先删除老数据
* @Author: hgw
* @Date: 2019/11/21 17:28
* @return: void
**/
void
deleteAllBySettleMonth
(
@Param
(
"settleMonth"
)
String
settleMonth
);
List
<
SysMessageSalary
>
getByIdExport
(
String
[]
ids
);
List
<
SysMessageSalary
>
getExport
(
@Param
(
"sysMessageSalary"
)
SysMessageSalary
vo
,
@Param
(
"settleDomainVos"
)
List
<
TSettleDomainSelectVo
>
settleDomainVos
);
List
<
SysMessageSalaryHandelExportVo
>
getByIdHandleExport
(
String
[]
ids
);
List
<
SysMessageSalaryHandelExportVo
>
getHandleExport
(
@Param
(
"sysMessageSalary"
)
SysMessageSalaryHandelExportVo
vo
);
List
<
SysMessageSalary
>
getLastTHaveSalaryNosocial
(
@Param
(
"lastOneMonth"
)
String
lastOneMonth
,
@Param
(
"lastTwoMonth"
)
String
lastTwoMonth
,
@Param
(
"lastThreeMonth"
)
String
lastThreeMonth
);
List
<
SysMessageSalaryTemplExportVo
>
getTempExport
(
@Param
(
"settleMonth"
)
String
settleMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/SysMessageSalaryTempMapper.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
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.yifu.salary.entity.SysMessageSalaryTemp
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@Mapper
public
interface
SysMessageSalaryTempMapper
extends
BaseMapper
<
SysMessageSalaryTemp
>
{
/**
* 最低工资提醒-临时人员连续购买最低工资次数简单分页查询
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
IPage
<
SysMessageSalaryTemp
>
getSysMessageSalaryTempPage
(
Page
<
SysMessageSalaryTemp
>
page
,
@Param
(
"sysMessageSalaryTemp"
)
SysMessageSalaryTemp
sysMessageSalaryTemp
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/THaveSalaryNosocialMapper.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
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.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@Mapper
public
interface
THaveSalaryNosocialMapper
extends
BaseMapper
<
THaveSalaryNosocial
>
{
/**
* 有资没有社保(首页提醒定时任务)简单分页查询
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
IPage
<
THaveSalaryNosocial
>
getTHaveSalaryNosocialPage
(
Page
<
THaveSalaryNosocial
>
page
,
@Param
(
"tHaveSalaryNosocial"
)
THaveSalaryNosocial
tHaveSalaryNosocial
,
@Param
(
"settleDomainVos"
)
List
<
TSettleDomainSelectVo
>
settleDomainVos
);
IPage
<
THaveSalaryNosocial
>
getTHaveSalaryNosocialHandelPage
(
Page
<
THaveSalaryNosocial
>
page
,
@Param
(
"tHaveSalaryNosocial"
)
THaveSalaryNosocial
tHaveSalaryNosocial
);
List
<
THaveSalaryNosocial
>
getByIdExport
(
String
[]
ids
);
List
<
THaveSalaryNosocial
>
getExport
(
@Param
(
"tHaveSalaryNosocial"
)
THaveSalaryNosocial
vo
,
@Param
(
"settleDomainVos"
)
List
<
TSettleDomainSelectVo
>
settleDomainVos
);
List
<
THaveSalaryNosocialHandleExportVo
>
getByIdHandleExport
(
String
[]
ids
);
List
<
THaveSalaryNosocialHandleExportVo
>
getHandleExport
(
@Param
(
"tHaveSalaryNosocial"
)
THaveSalaryNosocial
vo
);
List
<
THaveSalaryNosocial
>
getLastTHaveSalaryNosocial
(
@Param
(
"lastOneMonth"
)
String
lastOneMonth
,
@Param
(
"lastTwoMonth"
)
String
lastTwoMonth
,
@Param
(
"lastThreeMonth"
)
String
lastThreeMonth
);
/**
* @Author fxj
* @Description 获取有工资无数据不分页数据
* @Date 16:57 2022/8/17
* @Param
* @return
**/
List
<
THaveSalaryNoSocialExportVo
>
noPageDiy
(
@Param
(
"tHaveSalaryNosocial"
)
THaveSalaryNosocialSearchVo
searchVo
,
@Param
(
"settleDomainIds"
)
List
<
String
>
settleDomains
,
@Param
(
"idsStr"
)
List
<
String
>
idsStr
,
@Param
(
"sql"
)
String
sql
);
/**
* @Author fxj
* @Description 获取有工资无数据不分页数据COUNT
* @Date 16:58 2022/8/17
* @Param
* @return
**/
int
noPageCountDiy
(
@Param
(
"tHaveSalaryNosocial"
)
THaveSalaryNosocialSearchVo
searchVo
,
@Param
(
"settleDomainIds"
)
List
<
String
>
settleDomains
,
@Param
(
"idsStr"
)
List
<
String
>
idsStr
,
@Param
(
"sql"
)
String
sql
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
82659bb9
...
...
@@ -18,6 +18,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -65,4 +66,15 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
**/
String
getMinTaxMonthByNowYear
(
@Param
(
"empIdCard"
)
String
empIdCard
,
@Param
(
"nowYear"
)
int
nowYear
);
/**
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:23 2022/8/16
* @Param
* @return
**/
List
<
THaveSalaryNosocial
>
getLastMonthTHaveSalaryNosocial
(
@Param
(
"month"
)
String
month
,
@Param
(
"month2"
)
String
month2
,
@Param
(
"month3"
)
String
month3
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/SysMessageSalaryService.java
View file @
82659bb9
/*
* 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
.
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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo
;
import
org.apache.ibatis.annotations.Param
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-11-21 17:18:10
*/
public
interface
SysMessageSalaryService
extends
IService
<
SysMessageSalary
>
{
/**
* 最低工资提醒-每月更新一次简单分页查询
*
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
*/
IPage
<
SysMessageSalary
>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalarySearchVo
sysMessageSalary
);
IPage
<
SysMessageSalary
>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalary
sysMessageSalary
);
IPage
<
SysMessageSalary
>
getSysMessageSalaryHandlePage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalary
sysMessageSalary
);
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
void
insertSalaryBySettleMonth
(
@Param
(
"settleMonth"
)
String
settleMonth
);
/**
* @param settleMonth 结算月
* @Description: 生成前,先删除老数据
* @Author: hgw
* @Date: 2019/11/21 17:28
* @return: void
**/
void
deleteAllBySettleMonth
(
String
settleMonth
);
List
<
SysMessageSalary
>
getByIdExport
(
String
[]
ids
);
List
<
SysMessageSalary
>
getExport
(
SysMessageSalary
vo
);
List
<
SysMessageSalaryHandelExportVo
>
getByIdHandleExport
(
String
[]
ids
);
List
<
SysMessageSalaryHandelExportVo
>
getHandleExport
(
SysMessageSalaryHandelExportVo
vo
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
List
<
SysMessageSalaryTemplExportVo
>
getTempExport
(
String
settleMonth
);
void
listExport
(
HttpServletResponse
response
,
SysMessageSalarySearchVo
searchVo
);
List
<
SysMessageSalary
>
getLastTHaveSalaryNosocial
(
String
lastOneMonth
,
String
lastTwoMonth
,
String
lastThreeMonth
);
List
<
SysMessageSalary
>
noPageDiy
(
SysMessageSalarySearchVo
searchVo
);
void
createSysMessageSalaryTemp
(
String
settleMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/SysMessageSalaryTempService.java
0 → 100644
View file @
82659bb9
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.salary.entity.SysMessageSalaryTemp
;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
public
interface
SysMessageSalaryTempService
extends
IService
<
SysMessageSalaryTemp
>
{
/**
* 最低工资提醒-临时人员连续购买最低工资次数简单分页查询
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
IPage
<
SysMessageSalaryTemp
>
getSysMessageSalaryTempPage
(
Page
<
SysMessageSalaryTemp
>
page
,
SysMessageSalaryTemp
sysMessageSalaryTemp
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/THaveSalaryNosocialService.java
0 → 100644
View file @
82659bb9
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.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
public
interface
THaveSalaryNosocialService
extends
IService
<
THaveSalaryNosocial
>
{
/**
* 有资没有社保(首页提醒定时任务)简单分页查询
*
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
IPage
<
THaveSalaryNosocial
>
getTHaveSalaryNosocialPage
(
Page
<
THaveSalaryNosocial
>
page
,
THaveSalaryNosocial
tHaveSalaryNosocial
);
IPage
<
THaveSalaryNosocial
>
getTHaveSalaryNosocialHandelPage
(
Page
<
THaveSalaryNosocial
>
page
,
THaveSalaryNosocial
tHaveSalaryNosocial
);
void
generate
(
String
settleMonth
);
List
<
THaveSalaryNosocial
>
getByIdExport
(
String
[]
ids
);
List
<
THaveSalaryNosocial
>
getExport
(
THaveSalaryNosocial
vo
);
List
<
THaveSalaryNosocialHandleExportVo
>
getByIdHandleExport
(
String
[]
ids
);
List
<
THaveSalaryNosocialHandleExportVo
>
getHandleExport
(
THaveSalaryNosocial
vo
);
List
<
THaveSalaryNosocial
>
getLastTHaveSalaryNosocial
(
String
lastOneMonth
,
String
lastTwoMonth
,
String
lastThreeMonth
);
void
listExport
(
HttpServletResponse
response
,
THaveSalaryNosocialSearchVo
searchVo
);
R
<
String
>
feedback
(
Integer
reasonType
,
String
id
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
82659bb9
...
...
@@ -18,6 +18,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -68,4 +69,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
String
getMinTaxMonthByNowYear
(
String
empIdCard
,
int
nowYear
);
/**
* @Author fxj
* @Description 获取有工资无社保数据 3个月的工资
* @Date 17:21 2022/8/16
* @Param
* @return
**/
List
<
THaveSalaryNosocial
>
getLastMonthTHaveSalaryNosocial
(
String
month
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SysMessageSalaryServiceImpl.java
View file @
82659bb9
/*
* 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
.
salary
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
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.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.SysMessageSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryVo
;
import
lombok.extern.log4j.Log4j2
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryTempService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-11-21 17:18:10
*/
@Log4j2
@Service
@Service
(
"sysMessageSalaryService"
)
public
class
SysMessageSalaryServiceImpl
extends
ServiceImpl
<
SysMessageSalaryMapper
,
SysMessageSalary
>
implements
SysMessageSalaryService
{
/* @Autowired
private PreRemoteBasicArchivesService preRemoteBasicArchivesService;
@Autowired
private RemoteBasicArchivesService remoteBasicArchivesService;*/
@Autowired
private
TSalaryAccountService
salaryAccountService
;
@Autowired
private
SysMessageSalaryTempService
sysMessageSalaryTempService
;
/* @Autowired
private RemoteTSettleDomainService remoteTSettleDomainService;*/
/**
* 最低工资提醒-每月更新一次简单分页查询
*
...
...
@@ -63,180 +59,180 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
* @return
*/
@Override
public
IPage
<
SysMessageSalary
>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalarySearchVo
sysMessageSalary
)
{
return
baseMapper
.
getSysMessageSalaryPage
(
page
,
sysMessageSalary
);
public
IPage
<
SysMessageSalary
>
getSysMessageSalaryPage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalary
sysMessageSalary
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
/* if (!SecurityUtils.isHaveAllOrg(ServiceNameConstants.SERVICE_NAME_WXHR, user)) {
R<List<TSettleDomainSelectVo>> remoteGetTSettleDomainVo =
preRemoteBasicArchivesService.getInnerSettleDomainSelectVosByExtendUser(SecurityUtils.getUser());
if (remoteGetTSettleDomainVo == null) {
throw new CheckedException("调用结算服务失败");
}
if (CommonConstants.SUCCESS != remoteGetTSettleDomainVo.getCode()) {
throw new CheckedException("调用结算服务返回失败");
}
List<TSettleDomainSelectVo> remoteSettleDomainVoData = remoteGetTSettleDomainVo.getData();
if (remoteSettleDomainVoData == null) {
throw new CheckedException("未获取到相关结算信息");
}
return baseMapper.getSysMessageSalaryPage(page, sysMessageSalary, remoteSettleDomainVoData);
} else {
}*/
return
baseMapper
.
getSysMessageSalaryPage
(
page
,
sysMessageSalary
,
null
);
}
/**
* 最低工资提醒-每月更新一次批量导出
*
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
SysMessageSalarySearchVo
searchVo
)
{
String
fileName
=
"不良记录批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
SysMessageSalary
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
SysMessageSalary
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
SysMessageSalary
>
util
=
new
ExcelUtil
<>(
SysMessageSalary
.
class
);
for
(
SysMessageSalary
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"最低工资提醒-每月更新一次"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"最低工资提醒-每月更新一次"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
public
IPage
<
SysMessageSalary
>
getSysMessageSalaryHandlePage
(
Page
<
SysMessageSalary
>
page
,
SysMessageSalary
sysMessageSalary
)
{
return
baseMapper
.
getSysMessageSalaryHandlePage
(
page
,
sysMessageSalary
);
}
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
@Transactional
@Override
public
List
<
SysMessageSalary
>
noPageDiy
(
SysMessageSalarySearchVo
searchVo
)
{
LambdaQueryWrapper
<
SysMessageSalary
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
SysMessageSalary:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
return
baseMapper
.
selectList
(
wrapper
);
public
void
insertSalaryBySettleMonth
(
String
settleMonth
)
{
List
<
SysMessageSalary
>
sysMessageSalaries
=
baseMapper
.
insertSalaryBySettleMonth
(
settleMonth
);
R
<
List
<
TEmployeeInfo
>>
employeeInfoListR
=
null
;
//remoteBasicArchivesService.getEmployeeListForImportCheckByIds(Common.listObjectToStr(sysMessageSalaries, "employeeId", CommonConstants.COMMA_STRING), SecurityConstants.FROM_IN);
HashMap
<
String
,
TEmployeeInfo
>
employeeInfoMap
=
Maps
.
newHashMap
();
List
<
TEmployeeInfo
>
employeeInfoList
=
employeeInfoListR
.
getData
();
for
(
TEmployeeInfo
employeeInfo
:
employeeInfoList
)
{
employeeInfoMap
.
put
(
employeeInfo
.
getId
(),
employeeInfo
);
}
//获取单位名称
Map
<
String
,
TSettleDomainSelectVo
>
settleDomainSelectVoMap
=
Maps
.
newHashMap
();
R
<
List
<
TSettleDomainSelectVo
>>
remoteTSettleDomainyIds
=
null
;
//remoteTSettleDomainService.getSettleDomainByIds(Common.listObjectToStrList(employeeInfoList, "settleDomain"), SecurityConstants.FROM_IN);
if
(
remoteTSettleDomainyIds
!=
null
&&
remoteTSettleDomainyIds
.
getData
()!=
null
){
for
(
TSettleDomainSelectVo
selectVo
:
remoteTSettleDomainyIds
.
getData
())
{
settleDomainSelectVoMap
.
put
(
selectVo
.
getId
(),
selectVo
);
}
}
for
(
SysMessageSalary
sysMessageSalary
:
sysMessageSalaries
)
{
//标准合同和临时人员才会提醒
TEmployeeInfo
employeeInfo
=
employeeInfoMap
.
get
(
sysMessageSalary
.
getEmployeeId
());
if
(
employeeInfo
==
null
)
{
continue
;
}
if
(
CommonConstants
.
ZERO_INT
!=
employeeInfo
.
getFileStatus
()){
//非在职
continue
;
}
if
(
StringUtils
.
equals
(
CommonConstants
.
ONE_STRING
,
employeeInfo
.
getEmpNatrue
()))
{
TSettleDomainSelectVo
selectVo
=
settleDomainSelectVoMap
.
get
(
employeeInfo
.
getDeptId
());
sysMessageSalary
.
setCustomerId
(
selectVo
!=
null
?
selectVo
.
getCustomerId
():
null
);
sysMessageSalary
.
setCustomerName
(
selectVo
!=
null
?
selectVo
.
getCustomerName
():
null
);
this
.
save
(
sysMessageSalary
);
}
private
Long
noPageCountDiy
(
SysMessageSalarySearchVo
searchVo
)
{
LambdaQueryWrapper
<
SysMessageSalary
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
SysMessageSalary:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
SysMessageSalarySearchVo
entity
)
{
LambdaQueryWrapper
<
SysMessageSalary
>
wrapper
=
Wrappers
.
lambdaQuery
();
return
wrapper
;
/**
* @param settleMonth 结算月
* @Description: 生成前,先删除老数据
* @Author: hgw
* @Date: 2019/11/21 17:28
* @return: void
**/
@Override
@Transactional
public
void
deleteAllBySettleMonth
(
String
settleMonth
)
{
baseMapper
.
deleteAllBySettleMonth
(
settleMonth
);
}
@Override
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
SysMessageSalaryVo
>
util1
=
new
ExcelUtil
<>(
SysMessageSalaryVo
.
class
);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
SysMessageSalaryVo
.
class
,
new
ReadListener
<
SysMessageSalaryVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
SysMessageSalaryVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
public
List
<
SysMessageSalary
>
getByIdExport
(
String
[]
ids
)
{
return
baseMapper
.
getByIdExport
(
ids
);
}
@Override
public
void
invoke
(
SysMessageSalaryVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
public
List
<
SysMessageSalary
>
getExport
(
SysMessageSalary
vo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
/*if (!SecurityUtils.isHaveAllOrg(ServiceNameConstants.SERVICE_NAME_WXHR, user)) {
R<List<TSettleDomainSelectVo>> remoteGetTSettleDomainVo = preRemoteBasicArchivesService.getInnerSettleDomainSelectVosByExtendUser(SecurityUtils.getUser());
if (remoteGetTSettleDomainVo == null) {
throw new CheckedException("调用结算主体服务失败");
}
if (CommonConstants.SUCCESS != remoteGetTSettleDomainVo.getCode()) {
throw new CheckedException("调用结算主体返回失败");
}
List<TSettleDomainSelectVo> remoteSettleDomainVoData = remoteGetTSettleDomainVo.getData();
return baseMapper.getExport(vo, remoteSettleDomainVoData);
} else {
cachedDataList
.
add
(
data
);
}*/
return
baseMapper
.
getExport
(
vo
,
null
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
List
<
SysMessageSalaryTemplExportVo
>
getTempExport
(
String
settleMonth
)
{
return
baseMapper
.
getTempExport
(
settleMonth
);
}
@Override
public
List
<
SysMessageSalaryHandelExportVo
>
getByIdHandleExport
(
String
[]
ids
)
{
return
baseMapper
.
getByIdHandleExport
(
ids
);
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
(
);
public
List
<
SysMessageSalaryHandelExportVo
>
getHandleExport
(
SysMessageSalaryHandelExportVo
vo
)
{
return
baseMapper
.
getHandleExport
(
vo
);
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importSysMessageSalary
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
@Override
public
List
<
SysMessageSalary
>
getLastTHaveSalaryNosocial
(
String
lastOneMonth
,
String
lastTwoMonth
,
String
lastThreeMonth
)
{
return
baseMapper
.
getLastTHaveSalaryNosocial
(
lastOneMonth
,
lastTwoMonth
,
lastThreeMonth
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
@Override
public
void
createSysMessageSalaryTemp
(
String
month
)
{
//删除之前的数据
sysMessageSalaryTempService
.
remove
(
Wrappers
.<
SysMessageSalaryTemp
>
query
().
lambda
().
eq
(
SysMessageSalaryTemp:
:
getSettleMonth
,
month
));
//获取当月的所有最低工资,并且是临时人员
// 获取他上次发工资是不是在最低工资表里面 次数+1
//继续循环上次,如果发现上次没有在最低工资表里面,则循环下一个人员
List
<
SysMessageSalary
>
list
=
this
.
list
(
Wrappers
.<
SysMessageSalary
>
query
().
lambda
().
eq
(
SysMessageSalary:
:
getSettleMonth
,
month
));
R
<
List
<
TEmployeeInfo
>>
employeeInfoListR
=
null
;
//remoteBasicArchivesService.getEmployeeListForImportCheckByIds(Common.listObjectToStr(list, "employeeId", CommonConstants.COMMA_STRING), SecurityConstants.FROM_IN);
HashMap
<
String
,
TEmployeeInfo
>
employeeInfoMap
=
Maps
.
newHashMap
();
List
<
TEmployeeInfo
>
employeeInfoList
=
employeeInfoListR
.
getData
();
for
(
TEmployeeInfo
employeeInfo
:
employeeInfoList
)
{
employeeInfoMap
.
put
(
employeeInfo
.
getId
(),
employeeInfo
);
}
//获取当月的所有最低工资,并且是临时人员
List
<
SysMessageSalary
>
tempSysMessageSalary
=
Lists
.
newArrayList
();
for
(
SysMessageSalary
salary
:
list
)
{
TEmployeeInfo
employeeInfo
=
employeeInfoMap
.
get
(
salary
.
getEmployeeId
());
tempSysMessageSalary
.
add
(
salary
);
}
for
(
SysMessageSalary
messageSalary
:
tempSysMessageSalary
)
{
//获取他上次发工资是不是在最低工资表里面 次数+1
List
<
TSalaryAccount
>
accountList
=
salaryAccountService
.
list
(
Wrappers
.<
TSalaryAccount
>
query
().
lambda
().
eq
(
TSalaryAccount:
:
getEmpIdcard
,
messageSalary
.
getEmployeeIdnum
())
.
lt
(
TSalaryAccount:
:
getSalaryGiveTime
,
messageSalary
.
getSalaryMonth
()).
groupBy
(
TSalaryAccount:
:
getSalaryGiveTime
).
orderByDesc
(
TSalaryAccount:
:
getSalaryGiveTime
));
int
lowerConut
=
1
;
for
(
TSalaryAccount
salaryAccount
:
accountList
)
{
long
count
=
this
.
count
(
Wrappers
.<
SysMessageSalary
>
query
().
lambda
().
eq
(
SysMessageSalary:
:
getEmployeeId
,
salaryAccount
.
getEmpId
()).
eq
(
SysMessageSalary:
:
getSalaryMonth
,
salaryAccount
.
getSalaryGiveTime
()));
if
(
count
>
0
)
{
//如果大于0 则上次也是最低工资。
lowerConut
++;
}
else
{
break
;
}
return
R
.
ok
(
errorMessageList
);
}
private
void
importSysMessageSalary
(
List
<
SysMessageSalaryVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
ErrorMessage
errorMsg
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
SysMessageSalaryVo
excel
=
excelVOList
.
get
(
i
);
// 数据合法情况 TODO
// 插入
insertExcel
(
excel
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
//判断最低次数
if
(
lowerConut
>
1
)
{
SysMessageSalaryTemp
messageSalaryTemp
=
new
SysMessageSalaryTemp
();
messageSalaryTemp
.
setRelateId
(
messageSalary
.
getId
());
messageSalaryTemp
.
setTimes
(
lowerConut
);
messageSalaryTemp
.
setSettleMonth
(
month
);
sysMessageSalaryTempService
.
save
(
messageSalaryTemp
);
}
}
/**
* 插入excel bad record
*/
private
void
insertExcel
(
SysMessageSalaryVo
excel
)
{
SysMessageSalary
insert
=
new
SysMessageSalary
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SysMessageSalaryTempServiceImpl.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
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.yifu.salary.entity.SysMessageSalaryTemp
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.SysMessageSalaryTempMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryTempService
;
import
org.springframework.stereotype.Service
;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@Service
(
"sysMessageSalaryTempService"
)
public
class
SysMessageSalaryTempServiceImpl
extends
ServiceImpl
<
SysMessageSalaryTempMapper
,
SysMessageSalaryTemp
>
implements
SysMessageSalaryTempService
{
/**
* 最低工资提醒-临时人员连续购买最低工资次数简单分页查询
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
@Override
public
IPage
<
SysMessageSalaryTemp
>
getSysMessageSalaryTempPage
(
Page
<
SysMessageSalaryTemp
>
page
,
SysMessageSalaryTemp
sysMessageSalaryTemp
){
return
baseMapper
.
getSysMessageSalaryTempPage
(
page
,
sysMessageSalaryTemp
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
View file @
82659bb9
...
...
@@ -50,7 +50,7 @@ public class TConfigSalaryServiceImpl extends ServiceImpl<TConfigSalaryMapper, T
throw
new
RuntimeException
(
"调用结算服务返回失败"
);
}
vo
=
domainListVoR
.
getData
();
if
(
Common
.
isEmpty
(
vo
)
||
Common
.
is
Empty
(
vo
.
getDeptIds
()))
{
if
(
Common
.
isEmpty
(
vo
)
||
!
Common
.
isNot
Empty
(
vo
.
getDeptIds
()))
{
throw
new
RuntimeException
(
"未获取到相关结算信息"
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/THaveSalaryNosocialServiceImpl.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.google.common.collect.Maps
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
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.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
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.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.THaveSalaryNosocialMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.THaveSalaryNosocialService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialVo
;
import
lombok.AllArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@AllArgsConstructor
@Service
(
"tHaveSalaryNosocialService"
)
public
class
THaveSalaryNosocialServiceImpl
extends
ServiceImpl
<
THaveSalaryNosocialMapper
,
THaveSalaryNosocial
>
implements
THaveSalaryNosocialService
{
private
final
TSalaryAccountService
salaryAccountService
;
@Autowired
private
final
SocialDaprUtils
socialDaprUtils
;
@Autowired
private
final
ArchivesDaprUtil
archivesDaprUtil
;
@Autowired
private
final
UpmsDaprUtils
upmsDaprUtils
;
/**
* 有资没有社保(首页提醒定时任务)简单分页查询
*
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
@Override
public
IPage
<
THaveSalaryNosocial
>
getTHaveSalaryNosocialPage
(
Page
<
THaveSalaryNosocial
>
page
,
THaveSalaryNosocial
tHaveSalaryNosocial
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
/* TODO if (!SecurityUtils.isHaveAllOrg(ServiceNameConstants.SERVICE_NAME_WXHR, user)) {
R<List<TSettleDomainSelectVo>> remoteGetTSettleDomainVo =
preRemoteBasicArchivesService.getInnerSettleDomainSelectVosByExtendUser(SecurityUtils.getUser());
if (remoteGetTSettleDomainVo == null || remoteGetTSettleDomainVo.getData() == null) {
throw new CheckedException("未获取到相关结算信息");
}
return baseMapper.getTHaveSalaryNosocialPage(page, tHaveSalaryNosocial, remoteGetTSettleDomainVo.getData());
} else {
}*/
return
baseMapper
.
getTHaveSalaryNosocialPage
(
page
,
tHaveSalaryNosocial
,
null
);
}
/**
* 有资没有社保(首页提醒定时任务)简单分页查询
*
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
@Override
public
IPage
<
THaveSalaryNosocial
>
getTHaveSalaryNosocialHandelPage
(
Page
<
THaveSalaryNosocial
>
page
,
THaveSalaryNosocial
tHaveSalaryNosocial
)
{
return
baseMapper
.
getTHaveSalaryNosocialHandelPage
(
page
,
tHaveSalaryNosocial
);
}
/**
* @Author fxj
* @Description 每月生成有工资没有社保(首页提醒定时任务 )
* @Date 18:30 2022/8/16
* @Param
* @return
* * 1.拉取所有上月社保记录
* * 2.拉取所有上月工资记录
* * 3.查询数据
* * 4.生成记录
**/
@Override
public
void
generate
(
String
settleMonth
)
{
//重新跑上月数据
this
.
remove
(
Wrappers
.<
THaveSalaryNosocial
>
query
().
lambda
().
eq
(
THaveSalaryNosocial:
:
getSettleMonth
,
settleMonth
));
List
<
THaveSalaryNosocial
>
haveSalaryNosocialList
=
salaryAccountService
.
getLastMonthTHaveSalaryNosocial
(
settleMonth
);
if
(!
Common
.
isNotEmpty
(
haveSalaryNosocialList
)){
log
.
error
(
"获取上月有社保无工资数据为空"
);
return
;
}
//去缴费库查询查询这些人社保是否存在
Map
<
String
,
TPaymentInfo
>
empPaymentInfoMap
=
Maps
.
newHashMap
();
R
<
HaveSalaryNoSocialVo
>
noSocialVoR
=
socialDaprUtils
.
getPaymentinfoListByEmpdIdCard
(
Common
.
listObjectToStrList
(
haveSalaryNosocialList
,
"employeeIdCard"
),
settleMonth
);
if
(
Common
.
isNotNull
(
noSocialVoR
)&&
Common
.
isNotNull
(
noSocialVoR
.
getData
()))
{
for
(
TPaymentInfo
paymentInfo
:
noSocialVoR
.
getData
().
getPaymentInfos
())
{
empPaymentInfoMap
.
put
(
paymentInfo
.
getEmpIdcard
(),
paymentInfo
);
}
}
//结算主体
R
<
TSettleDomainListVo
>
domainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
HashMap
<
String
,
TSettleDomainSelectVo
>
settleDomainSelectVoMap
=
Maps
.
newHashMap
();
if
(
Common
.
isNotNull
(
domainListVoR
)
&&
Common
.
isNotNull
(
domainListVoR
.
getData
())
&&
Common
.
isNotNull
(
domainListVoR
.
getData
().
getListSelectVO
()))
for
(
TSettleDomainSelectVo
selectVo
:
domainListVoR
.
getData
().
getListSelectVO
())
{
settleDomainSelectVoMap
.
put
(
selectVo
.
getId
(),
selectVo
);
}
//其获取所有用户
R
<
AllUserNaVo
>
allUserVoR
=
upmsDaprUtils
.
getAllUserName
();
Map
<
String
,
String
>
allUserDTOMap
=
Maps
.
newHashMap
();
if
(
Common
.
isNotNull
(
allUserVoR
)
&&
Common
.
isNotNull
(
allUserVoR
.
getData
())
&&
Common
.
isNotNull
(
allUserVoR
.
getData
().
getUserNames
())){
allUserDTOMap
=
allUserVoR
.
getData
().
getUserNames
();
}
for
(
THaveSalaryNosocial
haveSalaryNosocial
:
haveSalaryNosocialList
)
{
// 有工资无社保 薪酬人员查询 表单类型为薪资的 连续3个月有发薪记录 但是这三个月都没有社保缴费记录
if
(
empPaymentInfoMap
.
get
(
haveSalaryNosocial
.
getEmployeeIdCard
())
!=
null
)
{
//如果缴费库中有此人身份证号码数据,那他算有社保
continue
;
}
//塞客户数据
TSettleDomainSelectVo
selectVo
=
settleDomainSelectVoMap
.
get
(
haveSalaryNosocial
.
getSettleDomainId
());
haveSalaryNosocial
.
setCustomerId
(
selectVo
!=
null
?
selectVo
.
getCustomerId
():
null
);
haveSalaryNosocial
.
setCustomerName
(
selectVo
!=
null
?
selectVo
.
getCustomerName
():
null
);
//塞创建人数据
if
(
haveSalaryNosocial
.
getCreateBy
()!=
null
)
{
haveSalaryNosocial
.
setCreateBy
(
allUserDTOMap
.
get
(
haveSalaryNosocial
.
getCreateBy
()));
}
haveSalaryNosocial
.
setCreateTime
(
LocalDateTime
.
now
());
this
.
save
(
haveSalaryNosocial
);
}
}
@Override
public
List
<
THaveSalaryNosocial
>
getByIdExport
(
String
[]
ids
)
{
return
baseMapper
.
getByIdExport
(
ids
);
}
@Override
public
List
<
THaveSalaryNosocial
>
getExport
(
THaveSalaryNosocial
vo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
/* TODO if (!SecurityUtils.isHaveAllOrg(ServiceNameConstants.SERVICE_NAME_WXHR, user)) {
R<List<TSettleDomainSelectVo>> remoteGetTSettleDomainVo =
preRemoteBasicArchivesService.getInnerSettleDomainSelectVosByExtendUser(SecurityUtils.getUser());
if (remoteGetTSettleDomainVo == null || remoteGetTSettleDomainVo.getData() == null) {
throw new CheckedException("未获取到相关结算信息");
}
return baseMapper.getExport(vo, remoteGetTSettleDomainVo.getData());
}*/
return
baseMapper
.
getExport
(
vo
,
null
);
}
@Override
public
List
<
THaveSalaryNosocialHandleExportVo
>
getByIdHandleExport
(
String
[]
ids
)
{
return
baseMapper
.
getByIdHandleExport
(
ids
);
}
@Override
public
List
<
THaveSalaryNosocialHandleExportVo
>
getHandleExport
(
THaveSalaryNosocial
vo
)
{
return
baseMapper
.
getHandleExport
(
vo
);
}
@Override
public
List
<
THaveSalaryNosocial
>
getLastTHaveSalaryNosocial
(
String
lastOneMonth
,
String
lastTwoMonth
,
String
lastThreeMonth
)
{
return
baseMapper
.
getLastTHaveSalaryNosocial
(
lastOneMonth
,
lastTwoMonth
,
lastThreeMonth
);
}
public
List
<
THaveSalaryNoSocialExportVo
>
noPageDiy
(
THaveSalaryNosocialSearchVo
searchVo
,
List
<
String
>
settleDomainIds
,
List
<
String
>
ids
,
String
sql
)
{
return
baseMapper
.
noPageDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
}
private
int
noPageCountDiy
(
THaveSalaryNosocialSearchVo
searchVo
,
List
<
String
>
settleDomainIds
,
List
<
String
>
ids
,
String
sql
)
{
return
baseMapper
.
noPageCountDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
}
/**
* @Author fxj
* @Description 消息提醒导出
* @Date 15:37 2022/8/17
* @Param
* @return
**/
@Override
public
void
listExport
(
HttpServletResponse
response
,
THaveSalaryNosocialSearchVo
searchVo
)
{
String
fileName
=
"消息提醒导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
THaveSalaryNoSocialExportVo
>
list
=
new
ArrayList
<>();
// TODO
List
<
String
>
settleDomainIds
=
null
;
List
<
String
>
ids
=
null
;
String
sql
=
null
;
int
count
=
noPageCountDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
THaveSalaryNoSocialExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
THaveSalaryNoSocialExportVo
>
util
=
new
ExcelUtil
<>(
THaveSalaryNoSocialExportVo
.
class
);
for
(
THaveSalaryNoSocialExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"消息提醒"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"消息提醒"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
/**
* @Author fxj
* @Description 反馈信息
* @Date 17:23 2022/8/17
* @Param
* @return
**/
@Override
public
R
<
String
>
feedback
(
Integer
reasonType
,
String
id
)
{
THaveSalaryNosocial
entity
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isEmpty
(
entity
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
entity
.
setReasonType
(
reasonType
);
int
res
=
baseMapper
.
updateById
(
entity
);
if
(
res
==
CommonConstants
.
ONE_INT_NEGATE
){
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
}
return
R
.
ok
(
null
,
CommonConstants
.
SAVE_SUCCESS
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
82659bb9
...
...
@@ -33,6 +33,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
...
...
@@ -187,4 +188,18 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public
String
getMinTaxMonthByNowYear
(
String
empIdCard
,
int
nowYear
)
{
return
baseMapper
.
getMinTaxMonthByNowYear
(
empIdCard
,
nowYear
);
}
/**
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:22 2022/8/16
* @Param
* @return
**/
@Override
public
List
<
THaveSalaryNosocial
>
getLastMonthTHaveSalaryNosocial
(
String
month
)
{
return
baseMapper
.
getLastMonthTHaveSalaryNosocial
(
month
,
DateUtil
.
getYearAndMonth
(
month
,
CommonConstants
.
ONE_INT
),
DateUtil
.
getYearAndMonth
(
month
,
CommonConstants
.
TWO_INT
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSpecialDeducationSumServiceImpl.java
View file @
82659bb9
...
...
@@ -142,7 +142,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
for
(
TSpecialDeducationSum
s
:
sdsList
)
{
s
.
setCreateMonth
(
yearMonth
);
s
.
setCreateTime
(
nowDate
);
s
.
setCreateBy
(
user
.
getId
(
));
s
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()
));
}
return
new
R
<>(
this
.
saveBatch
(
sdsList
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/SysMessageSalaryMapper.xml
View file @
82659bb9
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!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.yifu.salary.mapper.SysMessageSalaryMapper"
>
<resultMap
id=
"sysMessageSalaryMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"actualSalary"
column=
"actual_salary"
/>
...
...
@@ -39,16 +17,14 @@
<result
property=
"departId"
column=
"DEPART_ID"
/>
<result
property=
"departName"
column=
"DEPART_NAME"
/>
<result
property=
"departNo"
column=
"DEPART_NO"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"relaySalary"
column=
"relay_salary"
/>
<result
property=
"feedback"
column=
"FEEDBACK"
/>
<result
property=
"ignoreFlag"
column=
"IGNORE_FLAG"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"customerId"
column=
"CUSTOMER_ID"
/>
<result
property=
"customerName"
column=
"CUSTOMER_NAME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.actual_salary,
a.relay_salary,
a.salary_base,
a.salary_month,
a.settle_month,
...
...
@@ -63,11 +39,9 @@
a.DEPART_NAME,
a.DEPART_NO,
a.type,
a.relay_salary,
a.FEEDBACK,
a.IGNORE_FLAG,
a.CUSTOMER_ID,
a.CUSTOMER_NAME
a.CUSTOMER_NAME,
a.CUSTOMER_ID
</sql>
<sql
id=
"sysMessageSalary_where"
>
<if
test=
"sysMessageSalary != null"
>
...
...
@@ -114,36 +88,255 @@
AND a.DEPART_NAME = #{sysMessageSalary.departName}
</if>
<if
test=
"sysMessageSalary.departNo != null and sysMessageSalary.departNo.trim() != ''"
>
AND a.DEPART_NO = #{sysMessageSalary.departNo}
AND a.DEPART_NO LIKE CONCAT('%', #{sysMessageSalary.departNo},'%')
</if>
<if
test=
"sysMessageSalary.type != null"
>
AND a.type = #{sysMessageSalary.type}
</if>
<if
test=
"sysMessageSalary.relaySalary != null"
>
AND a.relay_salary = #{sysMessageSalary.relaySalary}
</if>
<if
test=
"sysMessageSalary.feedback != null and sysMessageSalary.feedback.trim() != ''"
>
AND a.FEEDBACK = #{sysMessageSalary.feedback}
</if>
<if
test=
"sysMessageSalary.ignoreFlag != null and sysMessageSalary.ignoreFlag.trim() != ''"
>
AND a.IGNORE_FLAG = #{sysMessageSalary.ignoreFlag}
</if>
<if
test=
"sysMessageSalary.customerId != null and sysMessageSalary.customerId.trim() != ''"
>
AND a.CUSTOMER_ID = #{sysMessageSalary.customerId}
</if>
<if
test=
"sysMessageSalary.customerName != null and sysMessageSalary.customerName.trim() != ''"
>
AND a.CUSTOMER_NAME = #{sysMessageSalary.customerName}
AND a.CUSTOMER_NAME LIKE CONCAT('%', #{sysMessageSalary.customerName},'%')
</if>
</if>
</sql>
<!--sysMessageSalary简单分页查询-->
<select
id=
"getSysMessageSalaryPage"
resultMap=
"sysMessageSalaryMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
<include
refid=
"sysMessageSalarySql"
/>
<include
refid=
"sysMessageSalary_where"
/>
</where>
</select>
<!--sysMessageSalary简单分页查询-->
<select
id=
"getSysMessageSalaryHandlePage"
resultMap=
"sysMessageSalaryMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include
refid=
"sysMessageSalary_where"
/>
</where>
</select>
<sql
id=
"sysMessageSalarySql"
>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<!--数据权限判断-->
<if
test=
"settleDomainVos != null"
>
<if
test=
"settleDomainVos.size() > 0"
>
and a.DEPART_ID in
<foreach
collection=
"settleDomainVos"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param.id}
</foreach>
</if>
<if
test=
"settleDomainVos.size() == 0"
>
and 1=2
</if>
</if>
<if
test=
"settleDomainVos == null"
>
and 1=1
</if>
</sql>
<!--普通工资-->
<select
id=
"insertSalaryBySettleMonth"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary"
>
SELECT
id,
actual_salary,
relay_salary,
salary_base,
salary_month,
settle_month,
employee_id,
employee_name,
employee_idnum,
salary_make_man,
province,
city,
town,
DEPART_ID,
DEPART_NAME,
DEPART_NO,
0 as TYPE
FROM
(
SELECT
a.ID,
a.EMP_ID employee_id,
a.EMP_IDCARD employee_idnum,
a.EMP_NAME employee_name,
s.DEPART_ID,
s.DEPART_NAME,
s.DEPART_NO,
a.SALARY_DATE salary_month,
a.SETTLEMENT_MONTH settle_month,
sum(i.SALARY_MONEY) AS actual_salary,
sum(l.SALARY_MONEY) AS relay_Salary,
s.CREATE_USER AS salary_make_man,
min(IFNULL(t.salary_base,c.salary_base)) AS salary_base,
a.PROVINCE,
a.CITY,
a.TOWN
FROM
t_salary_account a
LEFT JOIN t_salary_standard s ON s.id = a.SALARY_FORM_ID
LEFT JOIN t_min_salary t ON t.TOWN = a.TOWN AND t.town IS NOT NULL
LEFT JOIN t_min_salary c ON c.city = a.city AND c.town IS NULL
LEFT JOIN t_salary_account_item i ON i.SALARY_ACCOUNT_ID = a.id and i.JAVA_FIED_NAME = 'actualSalarySum'
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE
a.DELETE_FLAG = 0
and a.SETTLEMENT_MONTH = #{settleMonth}
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD,a.SALARY_DATE
) b
WHERE b.salary_base > b.actual_salary
</select>
<!--工程工资-->
<select
id=
"insertEngineerBySettleMonth"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary"
>
SELECT
id,
actual_salary,
relay_salary,
salary_base,
salary_month,
settle_month,
employee_id,
employee_name,
employee_idnum,
salary_make_man,
province,
city,
town,
DEPART_ID,
DEPART_NAME,
DEPART_NO,
1 as TYPE
FROM
(
SELECT
a.id,
a.EMP_ID employee_id,
a.EMP_IDCARD employee_idnum,
a.EMP_NAME employee_name,
s.DEPART_ID,
s.DEPART_NAME,
s.DEPART_NO,
a.SALARY_DATE salary_month,
a.SETTLEMENT_MONTH settle_month,
sum(i.SALARY_MONEY) AS actual_salary,
sum(l.SALARY_MONEY) AS relay_Salary,
s.CREATE_USER AS salary_make_man,
min(IFNULL(t.salary_base,c.salary_base)) AS salary_base,
a.PROVINCE,
a.CITY,
a.TOWN
FROM
t_engineer_account a
LEFT JOIN t_salary_engineering s ON s.id = a.SALARY_FORM_ID
LEFT JOIN t_min_salary t ON t.TOWN = a.TOWN AND t.town IS NOT NULL
LEFT JOIN t_min_salary c ON c.city = a.city AND c.town IS NULL
LEFT JOIN t_engineer_account_item i ON i.SALARY_ACCOUNT_ID = a.id and i.JAVA_FIED_NAME = 'actualSalarySum'
LEFT JOIN t_engineer_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE
a.DELETE_FLAG = 0
and a.SETTLEMENT_MONTH = #{settleMonth}
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD,a.SALARY_DATE
) b
WHERE b.salary_base > b.actual_salary
</select>
<!--生成前,先删除老数据-->
<delete
id=
"deleteAllBySettleMonth"
>
delete from sys_message_salary where settle_month = #{settleMonth}
</delete>
<select
id=
"getByIdExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_message_salary a
where 1=1
<if
test=
"array.length > 0"
>
and id in
<foreach
collection=
"array"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
<if
test=
"array.length == 0"
>
and 1=2
</if>
</select>
<select
id=
"getExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
<include
refid=
"sysMessageSalarySql"
/>
<include
refid=
"sysMessageSalary_where"
/>
</where>
</select>
<select
id=
"getByIdHandleExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_message_salary a
where 1=1
<if
test=
"array.length > 0"
>
and id in
<foreach
collection=
"array"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
<if
test=
"array.length == 0"
>
and 1=2
</if>
</select>
<select
id=
"getHandleExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1
1=1
and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include
refid=
"sysMessageSalary_where"
/>
</where>
</select>
<select
id=
"getLastTHaveSalaryNosocial"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
where a.settle_month in(#{lastOneMonth},#{lastTwoMonth},#{lastThreeMonth}) and b.REASON_TYPE is not null
</select>
<select
id=
"getTempExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,
b.*, t.times
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
left join sys_message_salary_temp t on a.id=t.RELATE_ID
where a.settle_month in(#{settleMonth}) and t.id is not null
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/SysMessageSalaryTempMapper.xml
0 → 100644
View file @
82659bb9
<?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.yifu.salary.mapper.SysMessageSalaryTempMapper"
>
<resultMap
id=
"sysMessageSalaryTempMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"relateId"
column=
"RELATE_ID"
/>
<result
property=
"times"
column=
"times"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.RELATE_ID,
a.times
</sql>
<sql
id=
"sysMessageSalaryTemp_where"
>
<if
test=
"sysMessageSalaryTemp != null"
>
<if
test=
"sysMessageSalaryTemp.id != null and sysMessageSalaryTemp.id.trim() != ''"
>
AND a.id = #{sysMessageSalaryTemp.id}
</if>
<if
test=
"sysMessageSalaryTemp.relateId != null and sysMessageSalaryTemp.relateId.trim() != ''"
>
AND a.RELATE_ID = #{sysMessageSalaryTemp.relateId}
</if>
<if
test=
"sysMessageSalaryTemp.times != null"
>
AND a.times = #{sysMessageSalaryTemp.times}
</if>
</if>
</sql>
<!--sysMessageSalaryTemp简单分页查询-->
<select
id=
"getSysMessageSalaryTempPage"
resultMap=
"sysMessageSalaryTempMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_message_salary_temp a
<where>
1=1
<include
refid=
"sysMessageSalaryTemp_where"
/>
</where>
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/THaveSalaryNosocialMapper.xml
0 → 100644
View file @
82659bb9
<?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.yifu.salary.mapper.THaveSalaryNosocialMapper"
>
<resultMap
id=
"tHaveSalaryNosocialMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"employeeId"
column=
"employee_id"
/>
<result
property=
"employeeName"
column=
"employee_name"
/>
<result
property=
"employeeIdCard"
column=
"employee_id_card"
/>
<result
property=
"customerId"
column=
"Customer_id"
/>
<result
property=
"settleDomainId"
column=
"settle_domain_id"
/>
<result
property=
"customerName"
column=
"CUSTOMER_NAME"
/>
<result
property=
"settlementOrganName"
column=
"SETTLEMENT_ORGAN_NAME"
/>
<result
property=
"settlementOrganNo"
column=
"SETTLEMENT_ORGAN_NO"
/>
<result
property=
"month"
column=
"month"
/>
</resultMap>
<resultMap
id=
"haveSalaryNoSocialExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo"
>
<result
property=
"customerName"
column=
"CUSTOMER_NAME"
/>
<result
property=
"settlementOrganName"
column=
"SETTLEMENT_ORGAN_NAME"
/>
<result
property=
"employeeName"
column=
"employee_name"
/>
<result
property=
"employeeIdCard"
column=
"employee_id_card"
/>
<result
property=
"month"
column=
"month"
/>
<result
property=
"relaySalary"
column=
"RELAY_SALARY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.employee_id,
a.employee_name,
a.employee_id_card,
a.Customer_id,
a.settle_domain_id,
a.CUSTOMER_NAME,
a.SETTLEMENT_ORGAN_NAME,
a.SETTLEMENT_ORGAN_NO,
a.month,
a.SETTLE_MONTH,
a.relay_salary,
a.FEEDBACK,
a.CREATE_NAME
</sql>
<sql
id=
"tHaveSalaryNosocial_where"
>
<if
test=
"tHaveSalaryNosocial != null"
>
<if
test=
"tHaveSalaryNosocial.id != null and tHaveSalaryNosocial.id.trim() != ''"
>
AND a.ID = #{tHaveSalaryNosocial.id}
</if>
<if
test=
"tHaveSalaryNosocial.employeeId != null and tHaveSalaryNosocial.employeeId.trim() != ''"
>
AND a.employee_id = #{tHaveSalaryNosocial.employeeId}
</if>
<if
test=
"tHaveSalaryNosocial.employeeName != null and tHaveSalaryNosocial.employeeName.trim() != ''"
>
AND a.employee_name = #{tHaveSalaryNosocial.employeeName}
</if>
<if
test=
"tHaveSalaryNosocial.employeeIdCard != null and tHaveSalaryNosocial.employeeIdCard.trim() != ''"
>
AND a.employee_id_card = #{tHaveSalaryNosocial.employeeIdCard}
</if>
<if
test=
"tHaveSalaryNosocial.customerId != null and tHaveSalaryNosocial.customerId.trim() != ''"
>
AND a.Customer_id = #{tHaveSalaryNosocial.customerId}
</if>
<if
test=
"tHaveSalaryNosocial.settleDomainId != null and tHaveSalaryNosocial.settleDomainId.trim() != ''"
>
AND a.settle_domain_id = #{tHaveSalaryNosocial.settleDomainId}
</if>
<if
test=
"tHaveSalaryNosocial.customerName != null and tHaveSalaryNosocial.customerName.trim() != ''"
>
AND a.CUSTOMER_NAME LIKE CONCAT('%', #{tHaveSalaryNosocial.customerName},'%')
</if>
<if
test=
"tHaveSalaryNosocial.settlementOrganName != null and tHaveSalaryNosocial.settlementOrganName.trim() != ''"
>
AND a.SETTLEMENT_ORGAN_NAME LIKE CONCAT('%', #{tHaveSalaryNosocial.settlementOrganName},'%')
</if>
<if
test=
"tHaveSalaryNosocial.settlementOrganNo != null and tHaveSalaryNosocial.settlementOrganNo.trim() != ''"
>
AND a.SETTLEMENT_ORGAN_NO LIKE CONCAT('%', #{tHaveSalaryNosocial.settlementOrganNo},'%')
</if>
<if
test=
"tHaveSalaryNosocial.month != null"
>
AND a.month = #{tHaveSalaryNosocial.month}
</if>
<if
test=
"tHaveSalaryNosocial.settleMonth != null"
>
AND a.SETTLE_MONTH = #{tHaveSalaryNosocial.settleMonth}
</if>
<if
test=
"tHaveSalaryNosocial.createName != null"
>
AND a.CREATE_NAME = #{tHaveSalaryNosocial.createName}
</if>
</if>
</sql>
<!--tHaveSalaryNosocial简单分页查询-->
<select
id=
"getTHaveSalaryNosocialPage"
resultMap=
"tHaveSalaryNosocialMap"
>
SELECT
a.employee_name,
a.employee_id_card,
a.CUSTOMER_NAME,
a.SETTLEMENT_ORGAN_NAME,
a.month,
a.relay_salary,
a.CREATE_NAME
FROM t_have_salary_nosocial a
<include
refid=
"querPage"
/>
</select>
<select
id=
"getByIdExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a left join t_feed_back b on a.ID=b.RELATE_ID
where 1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<if
test=
"array.length > 0"
>
and a.id in
<foreach
collection=
"array"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
<if
test=
"array.length == 0"
>
and 1=2
</if>
</select>
<select
id=
"getExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a
<include
refid=
"querPage"
/>
</select>
<select
id=
"getByIdHandleExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a left join t_feed_back b on a.ID=b.RELATE_ID
where 1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<if
test=
"array.length > 0"
>
and a.id in
<foreach
collection=
"array"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
<if
test=
"array.length == 0"
>
and a.id in ('')
</if>
</select>
<select
id=
"getHandleExport"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<if
test=
"tHaveSalaryNosocial.reasonType != null and tHaveSalaryNosocial.reasonType.trim() != ''"
>
AND b.REASON_TYPE = #{tHaveSalaryNosocial.reasonType}
</if>
<include
refid=
"tHaveSalaryNosocial_where"
/>
</where>
</select>
<sql
id=
"querPage"
>
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include
refid=
"tHaveSalaryNosocial_where"
/>
<!--数据权限判断-->
<if
test=
"settleDomainVos != null"
>
<if
test=
"settleDomainVos.size() > 0"
>
and a.SETTLE_DOMAIN_ID in
<foreach
collection=
"settleDomainVos"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param.id}
</foreach>
</if>
<if
test=
"settleDomainVos.size() == 0"
>
and 1=2
</if>
</if>
<if
test=
"settleDomainVos == null"
>
and 1=1
</if>
</where>
</sql>
<select
id=
"getTHaveSalaryNosocialHandelPage"
resultMap=
"tHaveSalaryNosocialMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<if
test=
"tHaveSalaryNosocial.reasonType != null "
>
AND b.REASON_TYPE = #{tHaveSalaryNosocial.reasonType}
</if>
<include
refid=
"tHaveSalaryNosocial_where"
/>
</where>
</select>
<select
id=
"getLastTHaveSalaryNosocial"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a
left join t_feed_back b on a.ID=b.RELATE_ID
where a.SETTLE_MONTH in(#{lastOneMonth},#{lastTwoMonth},#{lastThreeMonth}) and b.REASON_TYPE is not null
</select>
<select
id=
"noPageDiy"
resultMap=
"haveSalaryNoSocialExportMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,b.*
FROM t_have_salary_nosocial a
<include
refid=
"querPage"
/>
</select>
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_have_salary_nosocial a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include
refid=
"tHaveSalaryNosocial_where"
/>
<if
test=
"idsStr != null and idsStr.size > 0"
>
AND a.ID in
<foreach
item=
"items"
index=
"index"
collection=
"idsStr"
open=
"("
separator=
","
close=
")"
>
#{items}
</foreach>
</if>
<!--数据权限判断-->
<if
test=
"settleDomainIds != null"
>
<if
test=
"settleDomainIds.size() > 0"
>
and a.SETTLE_DOMAIN_ID in
<foreach
collection=
"settleDomainIds"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
<if
test=
"settleDomainVos.size() == 0"
>
and 1=2
</if>
</if>
<if
test=
"settleDomainVos == null"
>
and 1=1
</if>
<if
test=
'sql != null and sql != ""'
>
and
<![CDATA[sql]]>
</if>
</where>
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
82659bb9
...
...
@@ -269,4 +269,43 @@
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
and a.FORM_TYPE != '3'
</select>
<select
id=
"getLastMonthTHaveSalaryNosocial"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
select a.EMP_ID employee_id
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, a.relaySalary relay_salary
, s.CREATE_USER CREATE_USER_ID
, a.SALARY_DATE month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, s.DEPART_ID settle_domain_id
, s.DEPART_NAME SETTLEMENT_ORGAN_NAME
, s.DEPART_NO SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
from (
select a.id
, a.SALARY_FORM_ID
, a.EMP_ID
, DISTINCT(a.EMP_IDCARD)
, a.EMP_NAME
, a.SALARY_DATE
, a.SETTLEMENT_MONTH
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
from hr_salary.t_salary_account a
left join hr_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
where
<!-- a.SETTLEMENT_MONTH = '202006' and EMP_ID='1242371741017026561' -->
a.SETTLEMENT_MONTH in ( #{month} , #{month2} , #{month3})
and a.DELETE_FLAG = 0
GROUP BY a.EMP_IDCARD, a.SALARY_DATE
) a
LEFT JOIN hr_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
where a.relaySalary > 0
and a.social = 0
</select>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
82659bb9
...
...
@@ -574,5 +574,13 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty
(
"申请编码"
)
private
String
applyNo
;
/**
* 首次购买时间(第一派单月份)
*/
@ExcelAttribute
(
name
=
"首次购买时间(第一派单月份)"
,
isDate
=
true
)
@Schema
(
description
=
"首次购买时间(第一派单月份)"
)
@ExcelProperty
(
"首次购买时间(第一派单月份)"
)
private
Date
firstBuyMonthSocial
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FundHandleExportVo.java
View file @
82659bb9
...
...
@@ -67,7 +67,7 @@ public class FundHandleExportVo implements Serializable {
@ExcelAttribute
(
name
=
"申请人"
,
needExport
=
true
)
@Schema
(
description
=
"申请人"
)
@ExcelProperty
(
"申请人"
)
private
String
crea
s
teUserName
;
private
String
createUserName
;
/**
* 公积金缴纳地-省
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/HaveSalaryNoSocialSearchVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2022/8/16
* @Description
* @Version 1.0
*/
@Data
public
class
HaveSalaryNoSocialSearchVo
{
private
List
<
String
>
idCards
;
private
String
settleMonth
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/HaveSalaryNoSocialVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2022/8/16
* @Description
* @Version 1.0
*/
@Data
public
class
HaveSalaryNoSocialVo
{
List
<
TPaymentInfo
>
paymentInfos
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialHandleExportVo.java
View file @
82659bb9
...
...
@@ -186,7 +186,7 @@ public class SocialHandleExportVo implements Serializable {
@ExcelAttribute
(
name
=
"申请人"
,
needExport
=
true
)
@Schema
(
description
=
"申请人"
)
@ExcelProperty
(
"申请人"
)
private
String
crea
s
teUserName
;
private
String
createUserName
;
/**
* 备案基数
...
...
@@ -342,7 +342,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 减少原因
*/
@ExcelAttribute
(
name
=
"减少原因"
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"减少原因"
,
needExport
=
true
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
REDUCE_SOCIAL_REASON
)
@Schema
(
description
=
"减少原因"
)
@ExcelProperty
(
"减少原因"
)
private
String
reduceReason
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
82659bb9
...
...
@@ -16,7 +16,9 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;/*
*/
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
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
;
...
...
@@ -25,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
...
...
@@ -273,4 +276,25 @@ public class TPaymentInfoController {
public
int
updatePaymentFundStatusToNoSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tPaymentInfoService
.
updatePaymentFundStatusToNoSettle
(
idList
);
}
/**
* @Author fxj
* @Description 有工资无社保提醒:通过身份证号和月份获取对应的缴费库数据
* @Date 17:45 2022/8/16
* @Param
* @return
**/
@Inner
@PostMapping
(
"/inner/listByEmpdIdCard"
)
public
R
<
List
<
TPaymentInfo
>>
getPaymentinfoListByEmpdIdCard
(
@RequestBody
HaveSalaryNoSocialSearchVo
searchVo
)
{
return
new
R
<>(
tPaymentInfoService
.
list
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
in
(
TPaymentInfo:
:
getEmpIdcard
,
searchVo
.
getIdCards
())
.
and
(
obj
->
obj
.
eq
(
TPaymentInfo:
:
getSocialCreateMonth
,
searchVo
.
getSettleMonth
())
.
or
()
.
eq
(
TPaymentInfo:
:
getSocialCreateMonth
,
DateUtil
.
getYearAndMonth
(
searchVo
.
getSettleMonth
(),
1
))
.
or
()
.
eq
(
TPaymentInfo:
:
getSocialCreateMonth
,
DateUtil
.
getYearAndMonth
(
searchVo
.
getSettleMonth
(),
1
))
)
.
groupBy
(
TPaymentInfo:
:
getEmpIdcard
)));
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
82659bb9
...
...
@@ -380,7 +380,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
Common
.
isEmpty
(
excel
.
getUnemployStart
())
&&
Common
.
isEmpty
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
())
&&
(
BigDecimal
.
ZERO
.
compareTo
(
excel
.
getWorkInjuryCardinal
(
))
<=
0
);
&&
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
excel
.
getWorkInjuryCardinal
()
))
<=
0
);
}
// 失败项社保派单 和已有派单户不一致
if
(
dispatchPart
&&
Common
.
isNotNull
(
socialFund
)
...
...
@@ -554,6 +554,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setEmpNo
(
project
.
getEmpNo
());
}
}
dispatch
.
setFirstBuyMonthSocial
(
getFirstBuyMonthSocial
(
social
));
insertDispatch
(
emp
,
dispatch
,
setInfoVo
);
}
// 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了
...
...
@@ -669,7 +670,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund
.
setSocialReduceStatus
(
CommonConstants
.
ONE_STRING_NEGATE
);
socialFund
.
setSocialId
(
social
.
getId
());
if
(
Common
.
isEmpty
(
socialFund
.
getFirstBuyMonthSocial
())){
socialFund
.
setFirstBuyMonthSocial
(
social
.
getSocialStartDate
(
));
socialFund
.
setFirstBuyMonthSocial
(
getFirstBuyMonthSocial
(
social
));
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialFund
.
getIsIllness
())
...
...
@@ -834,6 +835,38 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
/**
* @Author fxj
* @Description 获取首次购买月份
* @Date 14:12 2022/8/17
* @Param
* @return
**/
private
Date
getFirstBuyMonthSocial
(
TSocialInfo
social
)
{
if
(
Common
.
isEmpty
(
social
.
getSocialStartDate
())){
return
null
;
}
if
(
Common
.
isNotNull
(
social
.
getPensionStart
())
&&
social
.
getPensionStart
().
after
(
social
.
getSocialStartDate
())){
return
social
.
getPensionStart
();
}
if
(
Common
.
isNotNull
(
social
.
getMedicalStart
())
&&
social
.
getMedicalStart
().
after
(
social
.
getSocialStartDate
())){
return
social
.
getMedicalStart
();
}
if
(
Common
.
isNotNull
(
social
.
getBirthStart
())
&&
social
.
getBirthStart
().
after
(
social
.
getSocialStartDate
())){
return
social
.
getBirthStart
();
}
if
(
Common
.
isNotNull
(
social
.
getUnemployStart
())
&&
social
.
getUnemployStart
().
after
(
social
.
getSocialStartDate
())){
return
social
.
getUnemployStart
();
}
if
(
Common
.
isNotNull
(
social
.
getWorkInjuryStart
())
&&
social
.
getWorkInjuryStart
().
after
(
social
.
getSocialStartDate
())){
return
social
.
getWorkInjuryStart
();
}
if
(
Common
.
isNotNull
(
social
.
getBigailmentStart
())
&&
social
.
getBigailmentStart
().
after
(
social
.
getSocialStartDate
())){
return
social
.
getPensionStart
();
}
return
social
.
getSocialStartDate
();
}
private
void
initSocialFundAddInfo
(
Map
<
String
,
TSocialFundInfo
>
socialFundAddMap
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
,
...
...
@@ -1015,12 +1048,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setContractTerm
(
excel
.
getContractTerm
());
dispatch
.
setContractType
(
excel
.
getContractType
());
dispatch
.
setWorkingHours
(
excel
.
getWorkingHours
());
dispatch
.
setEmpRegisType
(
excel
.
getEmpRegisType
());
dispatch
.
setPost
(
excel
.
getPost
());
// 封装客户信息
if
(
Common
.
isNotNull
(
empVo
)){
dispatch
.
setEmpId
(
empVo
.
getId
());
dispatch
.
setEmpNo
(
empVo
.
getEmpNo
());
dispatch
.
setEmpName
(
empVo
.
getEmpName
());
if
(
Common
.
isEmpty
(
dispatch
.
getEmpRegisType
())){
dispatch
.
setEmpRegisType
(
empVo
.
getEmpRegisType
());
}
if
(
Common
.
isNotNull
(
dispatch
.
getPost
())){
dispatch
.
setPost
(
empVo
.
getPost
());
}
// 封装合同信息 如果有合同取值实际合同信息
if
(
Common
.
isNotNull
(
empVo
.
getContractStart
())){
dispatch
.
setContractStart
(
empVo
.
getContractStart
());
...
...
@@ -1692,6 +1733,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract
.
setFileCity
(
empVo
.
getFileCity
());
contract
.
setFileTown
(
empVo
.
getFileTown
());
}
if
(
Common
.
isEmpty
(
contract
.
getContractTerm
())
&&
Common
.
isNotNull
(
contract
.
getContractStart
())
&&
Common
.
isNotNull
(
contract
.
getContractEnd
())){
contract
.
setContractTerm
(
Integer
.
toString
(
Common
.
getYearOfTime
(
contract
.
getContractStart
(),
contract
.
getContractEnd
())));
}
contracts
.
put
(
excel
.
getEmpIdcard
()+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getSettleDomainCode
(),
contract
);
}
...
...
@@ -2079,7 +2123,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
true
;
}
// 业务细分(合同类型为其他时必填)
if
(
excel
.
getContract
Typ
e
().
equals
(
CommonConstants
.
TWENTY_ONE_STRING
)
if
(
excel
.
getContract
Nam
e
().
equals
(
CommonConstants
.
TWENTY_ONE_STRING
)
&&
Common
.
isEmpty
(
excel
.
getContractSubName
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
...
...
@@ -2120,9 +2164,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if
(
Common
.
isNotNull
(
excel
.
getRecordBase
())
&&
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
// 自定义 只要有一个不相
当
同的 日期或基数 就要提示
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
Common
.
isEmpty
(
excel
.
getTrustRemark
())
&&
(
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
// 自定义 只要有一个不相同的 日期或基数 就要提示
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
Common
.
isEmpty
(
excel
.
getTrustRemark
())
){
boolean
flag
=
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
||
(
Common
.
isNotNull
(
excel
.
getMedicalCardinal
())
&&
excel
.
getMedicalCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
...
...
@@ -2133,11 +2177,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||
(
Common
.
isNotNull
(
excel
.
getBirthCardinal
())
&&
excel
.
getBirthCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
||
(
Common
.
isNotNull
(
excel
.
getBigailmentCardinal
())
&&
excel
.
getBigailmentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
)
){
&&
excel
.
getBigailmentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
);
if
(
flag
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
flag
=
(
Common
.
isNotNull
(
excel
.
getContractStart
())
&&
((!
excel
.
getContractStart
().
equals
(
excel
.
getPensionStart
())
&&
Common
.
isNotNull
(
excel
.
getPensionStart
()))
||
(!
excel
.
getContractStart
().
equals
(
excel
.
getMedicalStart
())
&&
Common
.
isNotNull
(
excel
.
getMedicalStart
()))
||
(!
excel
.
getContractStart
().
equals
(
excel
.
getUnemployStart
())
&&
Common
.
isNotNull
(
excel
.
getUnemployStart
()))
||
(!
excel
.
getContractStart
().
equals
(
excel
.
getBirthStart
())
&&
Common
.
isNotNull
(
excel
.
getBirthStart
()))
||
(!
excel
.
getContractStart
().
equals
(
excel
.
getWorkInjuryStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
()))
||
(!
excel
.
getContractStart
().
equals
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getBigailmentStart
()))));
if
(
flag
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2
)));
return
true
;
}
}
Date
temp
;
if
(
Common
.
isEmpty
(
empVo
)){
temp
=
excel
.
getContractStart
();
...
...
@@ -3692,7 +3748,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/
@Override
public
void
doexportSocialRecordRoster
(
HttpServletResponse
response
,
SocialHandleSearchVo
searchVo
,
String
idStr
,
String
[]
exportFields
)
{
String
fileName
=
DispatchConstants
.
SOCIAL_RECORD_ROSTER_EXPORT
+
LocalDateTime
.
now
()
+
".xlsx"
;
String
fileName
=
DispatchConstants
.
SOCIAL_RECORD_ROSTER_EXPORT
+
".xlsx"
;
//获取要导出的列表
List
<
SocialHandleExportVo
>
list
=
new
ArrayList
<>();
// 项目权限 TODO
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
82659bb9
...
...
@@ -494,6 +494,7 @@
<result
property=
"socialTown"
column=
"SOCIAL_TOWN"
/>
<result
property=
"workingHours"
column=
"WORKING_HOURS"
/>
<result
property=
"educationName"
column=
"EDUCATION_NAME"
/>
<result
property=
"createUserName"
column=
"CREATE_NAME"
/>
<result
property=
"socialHouseholdName"
column=
"SOCIAL_HOUSEHOLD_NAME"
/>
<result
property=
"socialProvince"
column=
"SOCIAL_PROVINCE"
/>
...
...
@@ -524,7 +525,7 @@
<result
property=
"belongUnit"
column=
"BELONG_UNIT_NAME"
/>
<result
property=
"settleDomain"
column=
"SETTLE_DOMAIN_NAME"
/>
<result
property=
"empMobile"
column=
"EMP_MOBILE"
/>
<result
property=
"crea
s
teUserName"
column=
"CREATE_NAME"
/>
<result
property=
"createUserName"
column=
"CREATE_NAME"
/>
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"providentStart"
column=
"PROVIDENT_START"
/>
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/AllUserNaVo.java
0 → 100644
View file @
82659bb9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.HashMap
;
/**
* @Author fxj
* @Date 2022/8/16
* @Description
* @Version 1.0
*/
@Data
public
class
AllUserNaVo
implements
Serializable
{
private
HashMap
<
String
,
String
>
userNames
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/UserController.java
View file @
82659bb9
...
...
@@ -25,11 +25,14 @@ import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserDTO
;
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.admin.api.vo.AllUserNaVo
;
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
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -43,6 +46,7 @@ import org.springframework.validation.BindingResult;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -269,4 +273,26 @@ public class UserController {
public
SysUser
getSimpleUser
(
@PathVariable
Integer
id
)
{
return
userService
.
getById
(
id
);
}
/**
* @Author fxj
* @Description 获取所有用户极
* @Date 18:20 2022/8/16
* @Param
* @return
**/
@Inner
@GetMapping
(
value
=
{
"/inner/getAllUserName"
})
public
AllUserNaVo
getAllUserDTO
()
{
AllUserNaVo
naVo
=
new
AllUserNaVo
();
List
<
SysUser
>
sysUsers
=
userService
.
list
(
Wrappers
.<
SysUser
>
query
().
lambda
());
if
(
Common
.
isNotEmpty
(
sysUsers
)){
HashMap
<
String
,
String
>
nameMap
=
new
HashMap
<>();
for
(
SysUser
u:
sysUsers
){
nameMap
.
put
(
u
.
getUserId
(),
u
.
getNickname
());
}
naVo
.
setUserNames
(
nameMap
);
}
return
naVo
;
}
}
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