Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
1a1d630e
Commit
1a1d630e
authored
Nov 03, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
5fd15657
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
17 deletions
+91
-17
src/main/java/cn/timer/api/bean/xcgl/XcglAssoJsgzzx.java
+4
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+28
-17
src/main/java/cn/timer/api/dao/xcgl/XcglAssoJsgzzxMapper.java
+2
-0
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
+57
-0
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAssoJsgzzx.java
View file @
1a1d630e
...
...
@@ -87,4 +87,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty
(
value
=
"是否自定义项(0:否;1:是)"
,
example
=
"0"
)
private
Integer
isCustom
;
@ApiModelProperty
(
value
=
"薪资档案自定义id"
,
example
=
"0"
)
private
Integer
xzdazdyid
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
1a1d630e
...
...
@@ -1264,6 +1264,13 @@ public class SalaryManagementController {
zzx
.
setGsid
(
0
);
//公式id 0:未关联规则
zzx
.
setGsgs
(
"从薪资档案-"
+
term
[
a
].
getOptname
()+
"自动提取数据"
);
//公式格式 系统提供/自定义公式
zzx
.
setRulestate
(
1
);
//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
XcglAssoXzdazdy
xzd
=
XcglAssoXzdazdy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzdazdy
>().
lambda
().
eq
(
XcglAssoXzdazdy:
:
getQyid
,
userBean
.
getOrgCode
())
.
eq
(
XcglAssoXzdazdy:
:
getZdmc
,
term
[
a
].
getOptname
()));
int
xzdazdyid
=
0
;
if
(
xzd
!=
null
)
{
xzdazdyid
=
xzd
.
getId
();
}
zzx
.
setXzdazdyid
(
xzdazdyid
);
}
else
{
//
String
xxs
=
"自动提取数据"
;
String
[]
strxz
=
{
"从人事花名册-"
,
"从月度汇总-"
,
"从社保账单-"
};
...
...
@@ -1286,6 +1293,8 @@ public class SalaryManagementController {
zzx
.
setGsid
(
0
);
//公式id 0:未关联规则
zzx
.
setGsgs
(
describe
);
//公式格式 系统提供/自定义公式
zzx
.
setRulestate
(
rule
);
//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx
.
setXzdazdyid
(
0
);
}
}
if
(
term
[
a
].
getOptitemid
()
!=
0
)
{
...
...
@@ -1312,7 +1321,7 @@ public class SalaryManagementController {
}
}
if
(
gzzxlist
.
size
()
>
0
)
{
xcglassojsgzzxmapper
.
insertxcglassojsgzzxList
(
gzzxlist
);
xcglassojsgzzxmapper
.
insertxcglassojsgzzxList
Two
(
gzzxlist
);
}
return
new
ResponseResult
().
success
(
"创建薪资组成功"
,
gzzxlist
);
}
...
...
@@ -1935,15 +1944,15 @@ public class SalaryManagementController {
String
formula
=
xzx
.
getGsgs
();
//#基本工资#/#应出勤天数#*#事假天数#
if
(
xzx
.
getGsid
()
==
3
)
{
//事假天数
matter_leave
=
SalaryTool
.
formatDouble_
(
matter_leave
/
prescription
)
;
//转化天数
matter_leave
=
matter_leave
/
prescription
;
//转化天数
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#应出勤天数#"
,
String
.
valueOf
(
attendance_days
)).
replace
(
"#事假天数#"
,
String
.
valueOf
(
matter_leave
));
if
(
attendance_days
>
0
)
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
}
else
if
(
xzx
.
getGsid
()
==
4
)
{
//事假次数 #事假次数#*200
String
qaz
=
formula
.
replace
(
"#事假次数#"
,
String
.
valueOf
(
matter_leave_num
));
if
(
attendance_days
>
0
)
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
}
...
...
@@ -1953,15 +1962,15 @@ public class SalaryManagementController {
String
formula
=
xzx
.
getGsgs
();
//#基本工资#/#应出勤天数#*#病假天数#*0.4
if
(
xzx
.
getGsid
()
==
5
)
{
//病假天数
sick_leave
=
SalaryTool
.
formatDouble_
(
sick_leave
/
prescription
)
;
//转化天数
sick_leave
=
sick_leave
/
prescription
;
//转化天数
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#应出勤天数#"
,
String
.
valueOf
(
attendance_days
)).
replace
(
"#病假天数#"
,
String
.
valueOf
(
sick_leave
));
if
(
attendance_days
>
0
)
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
}
else
if
(
xzx
.
getGsid
()
==
6
)
{
//病假次数 #病假次数#*100
String
qaz
=
formula
.
replace
(
"#病假次数#"
,
String
.
valueOf
(
sick_leave_num
));
if
(
attendance_days
>
0
)
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
}
...
...
@@ -1984,7 +1993,7 @@ public class SalaryManagementController {
qaz
=
formula
.
replace
(
"#迟到时长#"
,
String
.
valueOf
(
late_sc
)).
replace
(
"#早退时长数#"
,
String
.
valueOf
(
leave_early_sc
));
}
if
(!(
""
).
equals
(
qaz
))
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
}
...
...
@@ -2035,7 +2044,7 @@ public class SalaryManagementController {
}
if
(!
qaz
.
contains
(
"#"
))
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
else
{
System
.
err
.
println
(
xzx
.
getOptionid
()
+
":"
+
qaz
+
"有误!!!"
);
}
...
...
@@ -2099,7 +2108,7 @@ public class SalaryManagementController {
}
if
(!
qaz
.
contains
(
"#"
))
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
SalaryTool
.
formatDouble_
(
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)
)));
}
else
{
System
.
err
.
println
(
xzx
.
getOptionid
()
+
":"
+
qaz
+
"有误!!!"
);
}
...
...
@@ -2186,24 +2195,25 @@ public class SalaryManagementController {
SbgjjAssoYjzd
cuspde
=
sbgjjassoyjzdmapper
.
IndividualTotalsbgjj
(
gsus
,
orgcode
,
salary_month
);
gsmx
.
setCurrentSpecialDeduction
(
cuspde
==
null
?
0
:
Double
.
valueOf
(
cuspde
.
getGrjltotal
()));
//本期专项扣除 【个人的社保公积金缴纳扣除】
gsmx
.
setCumSre
(
wages_payable
+(
sygs
==
null
?
0
:
sygs
.
getCumSre
()));
//累计收入额 【本期收入+累计收入额(上月)】
double
cumjcfy
=
0
;
if
(
sygs
.
getCumJcfy
()
>
0
)
{
double
cumjcfy
=
0
;
if
(
sygs
!=
null
&&
sygs
.
getCumJcfy
()
>
0
)
{
cumjcfy
=
sygs
.
getCumJcfy
()
+
5000
;
}
else
{
int
xcy
=
0
;
YgglMainEmp
xzrz
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
gsus
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgcode
));
if
(
xzrz
!=
null
)
{
String
entry_date
=
ClockInTool
.
SunNovCSTYMD
(
xzrz
.
getRzTime
());
//yyyyMMdd
// String entry_date = ClockInTool.SunNovCSTYMD(xzrz.getRzTime());//yyyyMMdd
String
entry_date
=
ClockInTool
.
SunNovCSTYM
(
xzrz
.
getRzTime
());
//yyyyMM
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
//当月报税
if
(
entry_date
.
substring
(
0
,
4
).
equals
(
strY
))
{
//判断是否是本年
xcy
=
SalaryTool
.
getMonthDiff
(
entry_date
,
salary_month
+
"-01"
);
xcy
=
SalaryTool
.
getMonthDiff
(
entry_date
+
"-01"
,
salary_month
+
"-01"
);
}
else
{
xcy
=
SalaryTool
.
getMonthDiff
(
strY
+
"-01-01"
,
salary_month
+
"-01"
);
}
cumjcfy
=
xcy
*
5000
;
}
else
{
//次月报税
if
(
entry_date
.
substring
(
0
,
4
).
equals
(
strY
))
{
//判断是否是本年
xcy
=
SalaryTool
.
getMonthDiff
(
entry_date
,
salary_month
+
"-01"
)+
1
;
xcy
=
SalaryTool
.
getMonthDiff
(
entry_date
+
"-01"
,
salary_month
+
"-01"
)+
1
;
}
else
{
xcy
=
SalaryTool
.
getMonthDiff
(
strY
+
"-01-01"
,
salary_month
+
"-01"
)+
1
;
}
...
...
@@ -2218,7 +2228,7 @@ public class SalaryManagementController {
double
cumynssde
=
0
;
cumynssde
=
gsmx
.
getCumSre
()
-
cumjcfy
-
gsmx
.
getCumZxkc
()
-
gsmx
.
getCumZxfjkc
()
-
gsmx
.
getCumQtkc
();
gsmx
.
setCumYnssde
(
cumynssde
);
//累计应纳税所得额 【累计收入额-累计减除费用-累计专项扣除-累计专项附加扣除-累计其他扣除】
gsmx
.
setCumYnssde
(
SalaryTool
.
formatDouble_
(
cumynssde
)
);
//累计应纳税所得额 【累计收入额-累计减除费用-累计专项扣除-累计专项附加扣除-累计其他扣除】
String
[]
miscalculation
=
getPersonalincometax
(
cumynssde
);
gsmx
.
setTaxRate
(
Double
.
valueOf
(
miscalculation
[
0
]));
//税率
...
...
@@ -2254,7 +2264,7 @@ public class SalaryManagementController {
List
<
XcglAssoTaxFormula
>
taxratelist
=
XcglAssoTaxFormula
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoTaxFormula
>().
lambda
().
eq
(
XcglAssoTaxFormula:
:
getQyid
,
0
));
double
personalIncomeTax
=
0
;
//个税
double
money
=
36000
;
//应交税工资最低点
if
(
taxpayroll
>
money
){
//应交税
if
(
taxpayroll
>
0
){
//应交税
for
(
XcglAssoTaxFormula
tax
:
taxratelist
)
{
//计算个税
if
(
tax
.
getTaxablestart
()<=
taxpayroll
&&
taxpayroll
<
tax
.
getTaxableend
()){
//个人所得税=计税工资*税率-速算扣除数
...
...
@@ -2269,6 +2279,7 @@ public class SalaryManagementController {
}
}
}
else
{
perinctax
[
0
]
=
"0"
;
perinctax
[
1
]
=
"0"
;
perinctax
[
2
]
=
"0"
;
...
...
src/main/java/cn/timer/api/dao/xcgl/XcglAssoJsgzzxMapper.java
View file @
1a1d630e
...
...
@@ -31,4 +31,6 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> {
List
<
XcglAssoJsgzzx
>
selectSalarySectionList
(
int
xzzid
);
List
<
XcglAssoJsgzzx
>
SalaryRuleGroupItem
(
int
xzzid
);
int
insertxcglassojsgzzxListTwo
(
List
<
XcglAssoJsgzzx
>
xcglassojsgzzx
);
}
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
View file @
1a1d630e
...
...
@@ -19,6 +19,7 @@
<result
column=
"rulestate"
property=
"rulestate"
/>
<result
column=
"optionid"
property=
"optionid"
/>
<result
column=
"is_custom"
property=
"isCustom"
/>
<result
column=
"xzdazdyid"
property=
"xzdazdyid"
/>
</resultMap>
...
...
@@ -151,6 +152,62 @@
)
</foreach>
</insert>
<insert
id=
"insertxcglassojsgzzxListTwo"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid,xzdazdyid)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
<if
test=
"item.salaryitem != null"
>
#{item.salaryitem,jdbcType=VARCHAR},
</if>
<if
test=
"item.yhmbzd != null"
>
#{item.yhmbzd,jdbcType=VARCHAR},
</if>
<if
test=
"item.rule != null"
>
#{item.rule,jdbcType=VARCHAR},
</if>
<if
test=
"item.type != null"
>
#{item.type,jdbcType=INTEGER},
</if>
<if
test=
"item.addtime != null"
>
#{item.addtime,jdbcType=BIGINT},
</if>
<if
test=
"item.adduserid != null"
>
#{item.adduserid,jdbcType=INTEGER},
</if>
<if
test=
"item.jxgzid != null"
>
#{item.jxgzid,jdbcType=INTEGER},
</if>
<if
test=
"item.remarks != null"
>
#{item.remarks,jdbcType=VARCHAR},
</if>
<if
test=
"item.gsid != null"
>
#{item.gsid,jdbcType=INTEGER},
</if>
<if
test=
"item.gsgs != null"
>
#{item.gsgs,jdbcType=VARCHAR},
</if>
<if
test=
"item.dygk != null"
>
#{item.dygk,jdbcType=DOUBLE},
</if>
<if
test=
"item.degk != null"
>
#{item.degk,jdbcType=DOUBLE},
</if>
<if
test=
"item.xzzid != null"
>
#{item.xzzid,jdbcType=INTEGER},
</if>
<if
test=
"item.rulestate != null"
>
#{item.rulestate,jdbcType=INTEGER},
</if>
<if
test=
"item.optionid != null"
>
#{item.optionid,jdbcType=INTEGER},
</if>
<if
test=
"item.xzdazdyid != null"
>
#{item.xzdazdyid,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<insert
id=
"jsgzzxinsert"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoJsgzzx"
>
...
...
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