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
f8b35558
Commit
f8b35558
authored
Aug 23, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
本期申报,定时任务
parent
087a341f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
0 deletions
+87
-0
SalaryTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
+13
-0
TStatisticsTaxSalaryController.java
...ifu/salary/controller/TStatisticsTaxSalaryController.java
+16
-0
TSalaryAccount2022Mapper.java
.../plus/v1/yifu/salary/mapper/TSalaryAccount2022Mapper.java
+9
-0
TSalaryAccount2022ServiceImpl.java
...fu/salary/service/impl/TSalaryAccount2022ServiceImpl.java
+1
-0
TSalaryAccount2022Mapper.xml
...iz/src/main/resources/mapper/TSalaryAccount2022Mapper.xml
+48
-0
No files found.
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
View file @
f8b35558
...
...
@@ -114,5 +114,18 @@ public class SalaryTask {
log
.
info
(
"------------定时生成时生成最低工资提醒数据-定时任务结束------------"
);
}
/**
* @Author hgw
* @Description 定时生成本期申报
* @Date 2022-8-23 16:36:51
* @Param
* @return
**/
public
void
doRefreshStatisticsTaxAuto
()
{
log
.
info
(
"------------定时生成本期申报-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/tstatisticstaxsalary/inner/doRefreshStatisticsTaxAuto"
,
""
,
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/TStatisticsTaxSalaryController.java
View file @
f8b35558
...
...
@@ -19,8 +19,10 @@ 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.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalarySearchVo
;
...
...
@@ -100,6 +102,20 @@ public class TStatisticsTaxSalaryController {
tStatisticsTaxSalaryService
.
listExport
(
response
,
searchVo
);
}
/**
* @Description: 定时任务-年度报账+工资薪金+本期申报
* @Author: hgw
* @Date: 2022-8-23 16:21:08
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Inner
@Operation
(
description
=
"定时任务-年度报账+工资薪金+本期申报"
)
@PostMapping
(
"/inner/doRefreshStatisticsTaxAuto"
)
public
R
<
String
>
doRefreshStatisticsTaxAuto
()
{
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
return
tStatisticsTaxSalaryService
.
doRefreshStatisticsTaxAll
(
settleMonth
);
}
/**
* @param settleMonth 结算月
* @Description: 手动刷新-年度报账+工资薪金+本期申报
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccount2022Mapper.java
View file @
f8b35558
...
...
@@ -38,6 +38,15 @@ public interface TSalaryAccount2022Mapper extends BaseMapper<TSalaryAccount2022>
*/
IPage
<
TSalaryAccount2022
>
getTSalaryAccount2022Page
(
Page
<
TSalaryAccount2022
>
page
,
@Param
(
"tSalaryAccount2022"
)
TSalaryAccount2022
tSalaryAccount2022
);
/**
* @param tableName
* @Description: 自动创建年度报账表
* @Author: hgw
* @Date: 2022/8/23 16:32
* @return: void
**/
void
createAccountYear
(
@Param
(
"tableName"
)
String
tableName
);
int
deleteSalaryAccountYearByMonth
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"lastMonth"
)
String
lastMonth
);
int
insertIntoSalaryAccountYear
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"lastMonth"
)
String
lastMonth
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccount2022ServiceImpl.java
View file @
f8b35558
...
...
@@ -47,6 +47,7 @@ public class TSalaryAccount2022ServiceImpl extends ServiceImpl<TSalaryAccount202
if
(
Common
.
isEmpty
(
tableName
))
{
tableName
=
"t_salary_account_"
+
settleMonth
.
substring
(
0
,
4
);
}
baseMapper
.
createAccountYear
(
tableName
);
int
firstDelete
=
baseMapper
.
deleteSalaryAccountYearByMonth
(
tableName
,
settleMonth
);
if
(
firstDelete
!=
-
1
)
{
int
firstCreate
=
baseMapper
.
insertIntoSalaryAccountYear
(
tableName
,
settleMonth
);
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccount2022Mapper.xml
View file @
f8b35558
...
...
@@ -208,6 +208,54 @@
</where>
</select>
<!-- 自动创建年度报账表 -->
<update
id=
"createAccountYear"
statementType=
"STATEMENT"
>
CREATE TABLE IF NOT EXISTS ${tableName} (
`ID` varchar(32) NOT NULL COMMENT '主键',
`INVOICE_TITLE` varchar(50) DEFAULT NULL COMMENT '封面抬头',
`EMP_ID` varchar(32) DEFAULT NULL COMMENT '员工 ID',
`EMP_NAME` varchar(50) DEFAULT NULL COMMENT '员工姓名',
`EMP_IDCARD` varchar(25) DEFAULT NULL COMMENT '员工身份证号',
`SETTLE_DEPART_ID` varchar(32) DEFAULT NULL COMMENT '结算部门id',
`SETTLE_DEPART_NO` varchar(50) DEFAULT NULL COMMENT '结算部门no',
`SETTLE_DEPART_NAME` varchar(50) DEFAULT NULL COMMENT '结算部门name',
`SETTLEMENT_MONTH` varchar(20) DEFAULT NULL COMMENT '结算月',
`TAX_MONTH` varchar(6) DEFAULT NULL COMMENT '计税月份',
`REAL_SALARY` decimal(12,2) DEFAULT '0.00' COMMENT '应发',
`cost_reduction` decimal(12,2) DEFAULT '0.00' COMMENT '减除',
`SPECIAL_DEDU_MONEY` decimal(12,2) DEFAULT '0.00' COMMENT '专项',
`child_eduInfo_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计子女教育',
`housing_loan_Interest_expense_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计住房贷款利息',
`housing_rentalInfo_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计住房租金',
`continuing_education_expense_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计继续教育',
`support_elderly_expense_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计赡养老人',
`PERSONAL_SOCIAL` decimal(12,2) DEFAULT '0.00' COMMENT '个人社保',
`PERSONAL_FUND` decimal(12,2) DEFAULT '0.00' COMMENT '个人公积金',
`withholiding_person_social` decimal(12,2) DEFAULT '0.00' COMMENT '代扣个人社保',
`withholiding_person_fund` decimal(12,2) DEFAULT '0.00' COMMENT '代扣个人公积金',
`enterprise_annuity` decimal(12,2) DEFAULT '0.00' COMMENT '企业年金',
`salary_tax` decimal(12,2) DEFAULT '0.00' COMMENT '个税',
`actual_salary_sum` decimal(12,2) DEFAULT '0.00' COMMENT '实发',
`annual_bonus` decimal(12,2) DEFAULT '0.00' COMMENT '年终奖(单独扣税的部分)',
`annual_bonus_tax` decimal(12,2) DEFAULT '0.00' COMMENT '年终奖单独扣税',
`exemption_persion_tax` decimal(12,2) DEFAULT '0.00' COMMENT '免个税个人代扣',
`unit_id` varchar(32) DEFAULT NULL COMMENT '单位id',
`unit_no` varchar(50) DEFAULT NULL COMMENT '单位no',
`unit_name` varchar(50) DEFAULT NULL COMMENT '单位name',
`sum_baby_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计婴幼儿照护费用',
`IS_NEW_EMPLOYEE` varchar(1) DEFAULT NULL COMMENT '是否当月新增人员(0否1是)',
`CREATE_MONTH` varchar(6) DEFAULT NULL COMMENT '入职年月',
`EMP_PHONE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '手机号码',
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE KEY `SY_ACCOUNT_ID` (`ID`) USING BTREE,
KEY `SY_ACCOUNT_SETTLEMENT_MONTH` (`SETTLEMENT_MONTH`) USING BTREE,
KEY `SY_ACCOUNT_SETTLE_DEPART_ID` (`SETTLE_DEPART_ID`) USING BTREE,
KEY `SY_ACCOUNT_EMP_IDCARD` (`EMP_IDCARD`) USING BTREE,
KEY `SY_ACCOUNT_EMP_NAME` (`EMP_NAME`) USING BTREE,
KEY `SY_ACCOUNT_INVOICETITLE` (`INVOICE_TITLE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='工资报账年度表'
</update>
<delete
id=
"deleteSalaryAccountYearByMonth"
>
delete from ${tableName} where SETTLEMENT_MONTH = #{lastMonth};
</delete>
...
...
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