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
b20b4ed3
Commit
b20b4ed3
authored
Aug 26, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申报修改
parent
ca438a8b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
57 deletions
+8
-57
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+4
-31
TStatisticsDeclarerServiceImpl.java
...u/salary/service/impl/TStatisticsDeclarerServiceImpl.java
+0
-22
TStatisticsBonusMapper.xml
...-biz/src/main/resources/mapper/TStatisticsBonusMapper.xml
+1
-1
TStatisticsDeclarerMapper.xml
...z/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
+1
-1
TStatisticsLaborMapper.xml
...-biz/src/main/resources/mapper/TStatisticsLaborMapper.xml
+1
-1
TStatisticsRemunerationMapper.xml
...c/main/resources/mapper/TStatisticsRemunerationMapper.xml
+1
-1
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
b20b4ed3
...
...
@@ -972,27 +972,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
backList
;
}
/**
* @param itemList
* @param settleMonth
* @Description: 循环获取符合条件的报账
* @Author: hgw
* @Date: 2022/1/27 17:32
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
private
List
<
TSalaryAccountItem
>
getRemuAsList
(
List
<
TSalaryAccountItem
>
itemList
,
String
settleMonth
)
{
List
<
TSalaryAccountItem
>
backList
=
new
ArrayList
<>();
if
(
itemList
!=
null
&&
!
itemList
.
isEmpty
())
{
for
(
TSalaryAccountItem
item
:
itemList
)
{
if
((
"4"
.
equals
(
item
.
getFormType
()))
&&
settleMonth
.
equals
(
item
.
getSettlementMonth
()))
{
backList
.
add
(
item
);
}
}
}
return
backList
;
}
/**
* @param realSalary 应发工资
* @param saiList 报账详情表list
...
...
@@ -1841,7 +1820,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
TSalaryAccount
a
;
//定库:
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
List
<
TSalaryAccountItem
>
asList
;
//累计扣税
int
size
=
savList
.
size
();
// 自有员工人数
int
ownNum
=
0
;
...
...
@@ -1891,14 +1869,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
//累计扣税list
asList
=
this
.
getRemuAsList
(
itemMap
.
get
(
a
.
getEmpIdcard
()),
a
.
getSettlementMonth
());
// 实发稿酬,按月累计扣税
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculationRemu
(
saiList
,
asList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
calculationRemu
(
saiList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
// 自有员工以及自有员工应发金额
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
...
...
@@ -1957,15 +1931,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
* @param itemList
* @param itemHistoryList
* @param saiList
* @Description: 计算劳务费个税、应发
* @Author: hgw
* @Date: 2022/3/3 11:30
* @return: java.math.BigDecimal
**/
private
static
BigDecimal
calculationRemu
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
itemHistory
List
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
private
static
BigDecimal
calculationRemu
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
sai
List
,
TSalaryAccount
a
)
{
// 本次实发
BigDecimal
actualSalarySumNow
=
BigDecimal
.
ZERO
;
// 历史个税合计
...
...
@@ -1981,7 +1954,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal
relaySalary
;
nowTaxT
=
getNowTaxRemu
(
actualSalarySumNow
);
relaySalary
=
BigDecimalUtils
.
safe
Add
(
actualSalarySumNow
,
nowTaxT
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
relaySalary
=
BigDecimalUtils
.
safe
Subtract
(
actualSalarySumNow
,
nowTaxT
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
a
.
setSalaryTax
(
nowTaxT
);
a
.
setActualSalary
(
relaySalary
);
a
.
setRelaySalaryUnit
(
actualSalarySumNow
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsDeclarerServiceImpl.java
View file @
b20b4ed3
...
...
@@ -29,20 +29,14 @@ 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.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.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -60,12 +54,8 @@ import java.util.List;
*/
@Log4j2
@Service
@EnableConfigurationProperties
(
DaprArchivesProperties
.
class
)
public
class
TStatisticsDeclarerServiceImpl
extends
ServiceImpl
<
TStatisticsDeclarerMapper
,
TStatisticsDeclarer
>
implements
TStatisticsDeclarerService
{
@Autowired
private
DaprArchivesProperties
archivesProperties
;
/**
* 申报对象表简单分页查询
* @param tStatisticsDeclarer 申报对象表
...
...
@@ -186,18 +176,6 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
String
lastYear
=
lastMonth
.
substring
(
0
,
4
);
List
<
TStatisticsDeclarer
>
stdvoList
=
baseMapper
.
doStatisticsTaxDeclarer
(
nowMonth
,
lastYear
);
for
(
TStatisticsDeclarer
declarer
:
stdvoList
)
{
if
(
Common
.
isNotNull
(
declarer
.
getDeclareUnit
()))
{
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
declarer
.
getDeclareUnit
(),
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
TSettleDomainSelectVo
dept
=
null
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
}
if
(
Common
.
isNotNull
(
dept
))
{
declarer
.
setDeclareUnit
(
dept
.
getBusinessSubjectName
());
}
}
this
.
save
(
declarer
);
}
return
R
.
ok
();
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsBonusMapper.xml
View file @
b20b4ed3
...
...
@@ -106,7 +106,7 @@
<!--统计-->
<select
id=
"doStatisticsBonus"
resultMap=
"tStatisticsBonusMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,
b.UNIT_NAM
E DECLARE_UNIT,
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,
a.INVOICE_TITL
E 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
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
View file @
b20b4ed3
...
...
@@ -96,7 +96,7 @@
<!--统计-->
<select
id=
"doStatisticsTaxDeclarer"
resultMap=
"tStatisticsDeclarerMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,
b.UNIT_ID
DECLARE_UNIT,
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,
a.INVOICE_TITLE
DECLARE_UNIT,
if(a.FORM_TYPE=0,'雇员',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'其他','-')) OCCUPATION_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsLaborMapper.xml
View file @
b20b4ed3
...
...
@@ -92,7 +92,7 @@
<select
id=
"doStatisticsLabor"
resultMap=
"tStatisticsLaborMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX,sum(a.ACTUAL_SALARY) INCOME,
b.UNIT_NAM
E DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE
a.INVOICE_TITL
E DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = '1' and a.SETTLEMENT_MONTH like '${lastYear}%' and a.FORM_TYPE = '3'
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsRemunerationMapper.xml
View file @
b20b4ed3
...
...
@@ -88,7 +88,7 @@
<select
id=
"doStatisticsRemuneration"
resultMap=
"tStatisticsRemunerationMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX,
sum(a.ACTUAL_SALARY) INCOME,
b.UNIT_NAM
E DECLARE_UNIT,'居民身份证' CARD_TYPE
sum(a.ACTUAL_SALARY) INCOME,
a.INVOICE_TITL
E DECLARE_UNIT,'居民身份证' CARD_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = '1' and a.SETTLEMENT_MONTH like '${lastYear}%' and a.FORM_TYPE = '4'
...
...
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