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
c2bef9dc
Commit
c2bef9dc
authored
Aug 23, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
本期申报,定时任务
parent
d495c826
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
29 deletions
+42
-29
TStatisticsTaxSalaryController.java
...ifu/salary/controller/TStatisticsTaxSalaryController.java
+4
-2
TStatisticsTaxSalaryTwoService.java
...1/yifu/salary/service/TStatisticsTaxSalaryTwoService.java
+9
-0
TStatisticsTaxSalaryServiceImpl.java
.../salary/service/impl/TStatisticsTaxSalaryServiceImpl.java
+2
-2
TStatisticsTaxSalaryTwoServiceImpl.java
...lary/service/impl/TStatisticsTaxSalaryTwoServiceImpl.java
+26
-0
DoStatisticsTask.java
...yifu/cloud/plus/v1/yifu/salary/util/DoStatisticsTask.java
+1
-25
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsTaxSalaryController.java
View file @
c2bef9dc
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryTwoService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalarySearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -48,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -48,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
public
class
TStatisticsTaxSalaryController
{
public
class
TStatisticsTaxSalaryController
{
private
final
TStatisticsTaxSalaryService
tStatisticsTaxSalaryService
;
private
final
TStatisticsTaxSalaryService
tStatisticsTaxSalaryService
;
private
final
TStatisticsTaxSalaryTwoService
tStatisticsTaxSalaryTwoService
;
/**
/**
...
@@ -111,9 +113,9 @@ public class TStatisticsTaxSalaryController {
...
@@ -111,9 +113,9 @@ public class TStatisticsTaxSalaryController {
@Inner
@Inner
@Operation
(
description
=
"定时任务-年度报账+工资薪金+本期申报"
)
@Operation
(
description
=
"定时任务-年度报账+工资薪金+本期申报"
)
@PostMapping
(
"/inner/doRefreshStatisticsTaxAuto"
)
@PostMapping
(
"/inner/doRefreshStatisticsTaxAuto"
)
public
R
<
String
>
doRefreshStatisticsTaxAuto
()
{
public
void
doRefreshStatisticsTaxAuto
()
{
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
return
tStatisticsTaxSalaryService
.
doRefreshStatisticsTaxAll
(
settleMonth
);
tStatisticsTaxSalaryTwoService
.
doRefreshStatisticsTaxAuto
(
settleMonth
);
}
}
/**
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsTaxSalaryTwoService.java
View file @
c2bef9dc
...
@@ -22,4 +22,13 @@ public interface TStatisticsTaxSalaryTwoService extends IService<TStatisticsTaxS
...
@@ -22,4 +22,13 @@ public interface TStatisticsTaxSalaryTwoService extends IService<TStatisticsTaxS
**/
**/
R
<
String
>
doStatisticsTaxSalary
(
String
tableName
,
String
settleMonth
);
R
<
String
>
doStatisticsTaxSalary
(
String
tableName
,
String
settleMonth
);
/**
* @param settleMonth
* @Description:
* @Author: hgw
* @Date: 2022/8/23 17:55
* @return: void
**/
void
doRefreshStatisticsTaxAuto
(
String
settleMonth
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsTaxSalaryServiceImpl.java
View file @
c2bef9dc
...
@@ -36,13 +36,13 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
...
@@ -36,13 +36,13 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalaryRule
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalaryRule
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsTaxSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsTaxSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryRuleService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.DoStatisticsTask
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.DoStatisticsTask
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalarySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalaryVo
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsTaxSalaryTwoServiceImpl.java
View file @
c2bef9dc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsTaxSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsTaxSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccount2022Service
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryTwoService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryTwoService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
@@ -20,6 +24,9 @@ import org.springframework.stereotype.Service;
...
@@ -20,6 +24,9 @@ import org.springframework.stereotype.Service;
@Service
(
"tStatisticsTaxSalaryTwoService"
)
@Service
(
"tStatisticsTaxSalaryTwoService"
)
public
class
TStatisticsTaxSalaryTwoServiceImpl
extends
ServiceImpl
<
TStatisticsTaxSalaryMapper
,
TStatisticsTaxSalary
>
implements
TStatisticsTaxSalaryTwoService
{
public
class
TStatisticsTaxSalaryTwoServiceImpl
extends
ServiceImpl
<
TStatisticsTaxSalaryMapper
,
TStatisticsTaxSalary
>
implements
TStatisticsTaxSalaryTwoService
{
private
final
TSalaryAccount2022Service
tSalaryAccount2020Service
;
private
final
TStatisticsCurrentReportService
tStatisticsCurrentReportService
;
/**
/**
* @param tableName
* @param tableName
* @param settleMonth
* @param settleMonth
...
@@ -39,4 +46,23 @@ public class TStatisticsTaxSalaryTwoServiceImpl extends ServiceImpl<TStatisticsT
...
@@ -39,4 +46,23 @@ public class TStatisticsTaxSalaryTwoServiceImpl extends ServiceImpl<TStatisticsT
return
R
.
failed
(
"刷新工资薪金失败!"
);
return
R
.
failed
(
"刷新工资薪金失败!"
);
}
}
@Override
public
void
doRefreshStatisticsTaxAuto
(
String
settleMonth
)
{
String
tableName
=
"t_salary_account_"
+
settleMonth
.
substring
(
0
,
4
);
// 刷新对应结算月的 年度报账
R
<
String
>
accountR
=
tSalaryAccount2020Service
.
doRefreshSalaryAccountByMonth
(
tableName
,
settleMonth
);
if
(
accountR
!=
null
&&
accountR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 工资薪金
R
<
String
>
taxR
=
this
.
doStatisticsTaxSalary
(
tableName
,
settleMonth
);
if
(
taxR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 本期申报
tStatisticsCurrentReportService
.
doRefreshStatisticsCurrentReport
(
settleMonth
);
}
else
{
log
.
error
(
taxR
.
getMsg
());
}
}
else
{
log
.
error
(
accountR
==
null
?
"刷新对应结算月的 年度报账-失败!"
:
accountR
.
getMsg
());
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoStatisticsTask.java
View file @
c2bef9dc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
util
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccount2022Service
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryTwoService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryTwoService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -24,12 +20,6 @@ public class DoStatisticsTask {
...
@@ -24,12 +20,6 @@ public class DoStatisticsTask {
@Autowired
@Autowired
private
TStatisticsTaxSalaryTwoService
tStatisticsTaxSalaryTwoService
;
private
TStatisticsTaxSalaryTwoService
tStatisticsTaxSalaryTwoService
;
@Autowired
private
TSalaryAccount2022Service
tSalaryAccount2020Service
;
@Autowired
private
TStatisticsCurrentReportService
tStatisticsCurrentReportService
;
/**
/**
* @param settleMonth
* @param settleMonth
* @Description: 核心刷新-年度报账、工资薪金、本期申报
* @Description: 核心刷新-年度报账、工资薪金、本期申报
...
@@ -39,21 +29,7 @@ public class DoStatisticsTask {
...
@@ -39,21 +29,7 @@ public class DoStatisticsTask {
**/
**/
@Async
@Async
public
void
doRefreshCore
(
String
settleMonth
)
{
public
void
doRefreshCore
(
String
settleMonth
)
{
String
tableName
=
"t_salary_account_"
+
settleMonth
.
substring
(
0
,
4
);
tStatisticsTaxSalaryTwoService
.
doRefreshStatisticsTaxAuto
(
settleMonth
);
// 刷新对应结算月的 年度报账
R
<
String
>
accountR
=
tSalaryAccount2020Service
.
doRefreshSalaryAccountByMonth
(
tableName
,
settleMonth
);
if
(
accountR
!=
null
&&
accountR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 工资薪金
R
<
String
>
taxR
=
tStatisticsTaxSalaryTwoService
.
doStatisticsTaxSalary
(
tableName
,
settleMonth
);
if
(
taxR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 本期申报
tStatisticsCurrentReportService
.
doRefreshStatisticsCurrentReport
(
settleMonth
);
}
else
{
log
.
error
(
taxR
.
getMsg
());
}
}
else
{
log
.
error
(
accountR
==
null
?
"刷新对应结算月的 年度报账-失败!"
:
accountR
.
getMsg
());
}
}
}
}
}
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