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
76ab6527
Commit
76ab6527
authored
Aug 17, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申报,稿酬,劳务费接口修改
parent
c0900d0c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
10 deletions
+83
-10
salaryTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/salaryTask.java
+18
-2
TStatisticsBonusController.java
...v1/yifu/salary/controller/TStatisticsBonusController.java
+15
-0
TStatisticsBonusMapper.java
...ud/plus/v1/yifu/salary/mapper/TStatisticsBonusMapper.java
+9
-0
TStatisticsBonusService.java
.../plus/v1/yifu/salary/service/TStatisticsBonusService.java
+6
-0
TStatisticsBonusServiceImpl.java
...yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
+22
-8
TStatisticsBonusMapper.xml
...-biz/src/main/resources/mapper/TStatisticsBonusMapper.xml
+13
-0
No files found.
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/salaryTask.java
View file @
76ab6527
...
@@ -4,6 +4,7 @@ package com.yifu.cloud.plus.v1.job.compont;
...
@@ -4,6 +4,7 @@ package com.yifu.cloud.plus.v1.job.compont;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalarylProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalarylProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
...
@@ -65,10 +66,25 @@ public class salaryTask {
...
@@ -65,10 +66,25 @@ public class salaryTask {
* @Param
* @Param
**/
**/
public
void
doStatisticsRemuneration
()
throws
Exception
{
public
void
doStatisticsRemuneration
()
throws
Exception
{
log
.
info
(
"-------------生成本期
劳务费
-定时任务开始------------"
);
log
.
info
(
"-------------生成本期
稿酬
-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/tstatisticsremuneration/inner/doStatisticsRemuneration"
,
""
,
"/tstatisticsremuneration/inner/doStatisticsRemuneration"
,
""
,
TStatisticsRemuneration
.
class
,
SecurityConstants
.
FROM_IN
);
TStatisticsRemuneration
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------生成本期劳务费-定时任务结束------------"
);
log
.
info
(
"-------------生成本期稿酬-定时任务结束------------"
);
}
/**
* @return
* @Author huyc
* @Description
* @Date 10:48 2022/8/17
* @Param
**/
public
void
doStatisticsBonus
()
throws
Exception
{
log
.
info
(
"-------------生成全年一次性奖金-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/tstatisticsbonus/inner/doStatisticsBonus"
,
""
,
TStatisticsBonus
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------生成全年一次性奖金-定时任务结束------------"
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsBonusController.java
View file @
76ab6527
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -22,6 +22,7 @@ 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.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusSearchVo
;
...
@@ -139,4 +140,18 @@ public class TStatisticsBonusController {
...
@@ -139,4 +140,18 @@ public class TStatisticsBonusController {
public
R
batchDelete
(
@RequestParam
String
declareMonth
){
public
R
batchDelete
(
@RequestParam
String
declareMonth
){
return
tStatisticsBonusService
.
batchDelete
(
declareMonth
);
return
tStatisticsBonusService
.
batchDelete
(
declareMonth
);
}
}
/**
* @param
* @Description: 生成全年一次性奖金
* @Author: huyc
* @Date: 2022-08-17 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Inner
@Operation
(
description
=
"生成全年一次性奖金"
)
@PostMapping
(
"/inner/doStatisticsBonus"
)
public
R
doStatisticsBonus
()
{
return
tStatisticsBonusService
.
doStatisticsBonus
();
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TStatisticsBonusMapper.java
View file @
76ab6527
...
@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
...
@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 全年一次性奖金申报表
* 全年一次性奖金申报表
*
*
...
@@ -38,4 +40,11 @@ public interface TStatisticsBonusMapper extends BaseMapper<TStatisticsBonus> {
...
@@ -38,4 +40,11 @@ public interface TStatisticsBonusMapper extends BaseMapper<TStatisticsBonus> {
* @return
* @return
*/
*/
IPage
<
TStatisticsBonus
>
getTStatisticsBonusPage
(
Page
<
TStatisticsBonus
>
page
,
@Param
(
"tStatisticsBonus"
)
TStatisticsBonus
tStatisticsBonus
);
IPage
<
TStatisticsBonus
>
getTStatisticsBonusPage
(
Page
<
TStatisticsBonus
>
page
,
@Param
(
"tStatisticsBonus"
)
TStatisticsBonus
tStatisticsBonus
);
/**
* @param
* @Description: 统计
* @return:
**/
List
<
TStatisticsBonus
>
doStatisticsBonus
(
@Param
(
"nowMonth"
)
String
nowMonth
,
@Param
(
"lastYear"
)
String
lastYear
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsBonusService.java
View file @
76ab6527
...
@@ -54,4 +54,10 @@ public interface TStatisticsBonusService extends IService<TStatisticsBonus> {
...
@@ -54,4 +54,10 @@ public interface TStatisticsBonusService extends IService<TStatisticsBonus> {
* @return
* @return
*/
*/
R
batchDelete
(
String
declareMonth
);
R
batchDelete
(
String
declareMonth
);
/** 生成全年一次性奖金
* @param
* @return
**/
R
doStatisticsBonus
();
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
View file @
76ab6527
...
@@ -16,10 +16,9 @@
...
@@ -16,10 +16,9 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService
;
...
@@ -33,7 +32,6 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -33,7 +32,6 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.context.AnalysisContext
;
...
@@ -45,17 +43,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -45,17 +43,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -170,6 +163,27 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -170,6 +163,27 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
return
null
;
return
null
;
}
}
@Override
public
R
doStatisticsBonus
()
{
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
//本月
TStatisticsBonus
std
=
new
TStatisticsBonus
();
std
.
setDeclareMonth
(
nowMonth
);
QueryWrapper
<
TStatisticsBonus
>
queryWrapperSs
=
new
QueryWrapper
<>();
queryWrapperSs
.
setEntity
(
std
);
long
num
=
this
.
count
(
queryWrapperSs
);
if
(
num
>
0
)
{
return
R
.
failed
(
"上月数据已生成,不可重复生成!"
);
}
else
{
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
String
lastYear
=
lastMonth
.
substring
(
0
,
4
);
List
<
TStatisticsBonus
>
stdvoList
=
baseMapper
.
doStatisticsBonus
(
nowMonth
,
lastYear
);
for
(
TStatisticsBonus
bonus
:
stdvoList
)
{
this
.
save
(
bonus
);
}
return
R
.
ok
();
}
}
private
Long
noPageCountDiy
(
TStatisticsBonusSearchVo
searchVo
)
{
private
Long
noPageCountDiy
(
TStatisticsBonusSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TStatisticsBonus
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TStatisticsBonus
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsBonusMapper.xml
View file @
76ab6527
...
@@ -102,4 +102,17 @@
...
@@ -102,4 +102,17 @@
</where>
</where>
order by a.DECLARE_MONTH desc
order by a.DECLARE_MONTH desc
</select>
</select>
<!--统计-->
<select
id=
"doStatisticsBonus"
resultMap=
"tStatisticsBonusMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,b.UNIT_NAME DECLARE_UNIT,
sum(annualbonus.SALARY_MONEY) ANNUAL_BONUS,sum(tax.SALARY_MONEY) BONUS_TAX
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
left join t_salary_account_item annualbonus on annualbonus.SALARY_ACCOUNT_ID = a.id and annualbonus.CN_NAME='年终奖'
left join t_salary_account_item tax on tax.SALARY_ACCOUNT_ID = a.id and tax.CN_NAME='年终奖单独扣税'
where a.DELETE_FLAG = '1' and a.SETTLEMENT_MONTH like '${lastYear}%' and annualbonus.SALARY_MONEY > 0 and tax.SALARY_MONEY > 0
GROUP BY a.EMP_IDCARD,a.EMP_NAME
</select>
</mapper>
</mapper>
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