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
9ea9c330
Commit
9ea9c330
authored
Aug 18, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
有工资无社保 & 最低工资提醒 & 代码优化
parent
b400a443
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
71 deletions
+57
-71
SalaryTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
+16
-1
SysMessageSalaryController.java
...v1/yifu/salary/controller/SysMessageSalaryController.java
+2
-32
SysMessageSalaryServiceImpl.java
...yifu/salary/service/impl/SysMessageSalaryServiceImpl.java
+30
-37
THaveSalaryNosocialServiceImpl.java
...u/salary/service/impl/THaveSalaryNosocialServiceImpl.java
+7
-0
TPaymentInfoImportLogServiceImpl.java
...social/service/impl/TPaymentInfoImportLogServiceImpl.java
+1
-0
I18nUtil.java
...n/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java
+1
-1
No files found.
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
View file @
9ea9c330
...
...
@@ -95,9 +95,24 @@ public class SalaryTask {
* @Param
* @return
**/
public
void
generate
()
{
public
void
createHaveSalaryNoSocial
()
{
log
.
info
(
"------------定时生成时生成有工资无社保数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/thavesalarynosocial/inner/generate"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成时生成有工资无社保数据-定时任务结束------------"
);
}
/**
* @Author fxj
* @Description 定时生成最低工资提醒数据
* @Date 17:31 2022/8/17
* @Param
* @return
**/
public
void
createSysMessageSalary
()
{
log
.
info
(
"------------定时生成时生成最低工资提醒数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/sysmessagesalary/inner/createSysMessageSalary"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成时生成最低工资提醒数据-定时任务结束------------"
);
}
}
\ No newline at end of file
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/SysMessageSalaryController.java
View file @
9ea9c330
...
...
@@ -103,36 +103,6 @@ public class SysMessageSalaryController {
sysMessageSalaryService
.
insertSalaryBySettleMonth
(
settleMonth
);
}
/**
* @Author fxj
* @Description 最低工资提醒-临时人员连续购买最低工资次数
* @Date 18:00 2022/8/17
* @Param
* @return
**/
@Inner
@GetMapping
(
"/inner/createSysMessageSalaryTemp"
)
public
void
createSysMessageSalaryTemp
()
{
//结算月
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
sysMessageSalaryService
.
createSysMessageSalaryTemp
(
settleMonth
);
}
/**
* @Author fxj
* @Description 临时人员连续购买最低工资次数外部接口调用
* @Date 18:01 2022/8/17
**/
@Operation
(
description
=
"临时人员连续购买最低工资次数外部接口调用"
)
@SysLog
(
"临时人员连续购买最低工资次数外部接口调用"
)
@PostMapping
(
"/handle/createSysMessageSalaryTemp"
)
public
void
handleCreateSysMessageSalaryTemp
(
String
settleMonth
)
{
sysMessageSalaryService
.
createSysMessageSalaryTemp
(
settleMonth
);
}
/**
* @Author fxj
* @Description 最低工资提醒导出
...
...
@@ -155,8 +125,8 @@ public class SysMessageSalaryController {
* @Param
* @return
**/
@Operation
(
description
=
"最低工资提醒
导出
反馈"
)
@SysLog
(
"最低工资提醒
导出
反馈"
)
@Operation
(
description
=
"最低工资提醒反馈"
)
@SysLog
(
"最低工资提醒反馈"
)
@PostMapping
(
"/feedback"
)
public
R
<
String
>
feedback
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
,
@RequestParam
(
name
=
"reasonType"
,
required
=
true
)
Integer
reasonType
,
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SysMessageSalaryServiceImpl.java
View file @
9ea9c330
...
...
@@ -10,6 +10,7 @@ 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.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
;
...
...
@@ -17,6 +18,7 @@ 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.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp
;
...
...
@@ -27,7 +29,7 @@ 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.SysMessageSalaryExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo
;
import
org.apache.commons.lang3.StringUtils
;
import
lombok.AllArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -47,18 +49,15 @@ import java.util.Map;
* @author hgw
* @date 2019-11-21 17:18:10
*/
@AllArgsConstructor
@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;*/
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
/**
...
...
@@ -103,37 +102,24 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
@Override
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
);
}
Map
<
String
,
TSettleDomainSelectVo
>
settleDomainSelectVoMap
=
Maps
.
newHashMap
();
//结算主体
R
<
TSettleDomainListVo
>
domainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
if
(
Common
.
isNotNull
(
domainListVoR
)
&&
Common
.
isNotNull
(
domainListVoR
.
getData
())
&&
Common
.
isNotNull
(
domainListVoR
.
getData
().
getListSelectVO
()))
for
(
TSettleDomainSelectVo
selectVo
:
domainListVoR
.
getData
().
getListSelectVO
())
{
settleDomainSelectVoMap
.
put
(
selectVo
.
getId
(),
selectVo
);
}
TSettleDomainSelectVo
selectVo
;
for
(
SysMessageSalary
sysMessageSalary
:
sysMessageSalaries
)
{
selectVo
=
settleDomainSelectVoMap
.
get
(
sysMessageSalary
.
getDepartId
());
if
(
Common
.
isNotNull
(
selectVo
)){
sysMessageSalary
.
setCustomerId
(
selectVo
.
getCustomerId
());
sysMessageSalary
.
setCustomerName
(
selectVo
.
getCustomerName
());
}
this
.
save
(
sysMessageSalary
);
}
}
...
...
@@ -290,10 +276,17 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
**/
@Override
public
R
<
String
>
feedback
(
Integer
reasonType
,
String
id
,
String
feedBack
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
SysMessageSalary
entity
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isEmpty
(
entity
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
if
(!
user
.
getId
().
equals
(
entity
.
getCreateBy
())){
return
R
.
failed
(
"允许创建人反馈信息!"
);
}
entity
.
setReasonType
(
reasonType
);
entity
.
setFeedback
(
feedBack
);
int
res
=
baseMapper
.
updateById
(
entity
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/THaveSalaryNosocialServiceImpl.java
View file @
9ea9c330
...
...
@@ -255,10 +255,17 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
**/
@Override
public
R
<
String
>
feedback
(
Integer
reasonType
,
String
id
,
String
feedBack
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
THaveSalaryNosocial
entity
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isEmpty
(
entity
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
if
(!
user
.
getId
().
equals
(
entity
.
getCreateBy
())){
return
R
.
failed
(
"允许创建人反馈信息!"
);
}
entity
.
setReasonType
(
reasonType
);
entity
.
setFeedBack
(
feedBack
);
int
res
=
baseMapper
.
updateById
(
entity
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoImportLogServiceImpl.java
View file @
9ea9c330
...
...
@@ -20,6 +20,7 @@ import com.alibaba.excel.EasyExcel;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
...
...
yifu-visual/yifu-xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java
View file @
9ea9c330
...
...
@@ -36,7 +36,7 @@ public class I18nUtil {
// load prop
Resource
resource
=
new
ClassPathResource
(
i18nFile
);
EncodedResource
encodedResource
=
new
EncodedResource
(
resource
,
CommonConstants
.
UTF8
);
EncodedResource
encodedResource
=
new
EncodedResource
(
resource
,
"UTF-8"
);
prop
=
PropertiesLoaderUtils
.
loadProperties
(
encodedResource
);
}
catch
(
IOException
e
)
{
...
...
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