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
a53643ec
Commit
a53643ec
authored
Oct 19, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
c5bf4ef2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
33 deletions
+111
-33
src/main/java/cn/timer/api/bean/xcgl/XcglAssoXcjsgz.java
+4
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+105
-32
src/main/resources/mapping/xcgl/XcglAssoXcjsgzMapper.xml
+2
-1
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAssoXcjsgz.java
View file @
a53643ec
...
@@ -64,4 +64,7 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> {
...
@@ -64,4 +64,7 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> {
@ApiModelProperty
(
value
=
""
,
example
=
""
)
@ApiModelProperty
(
value
=
""
,
example
=
""
)
private
Integer
rulestate
;
private
Integer
rulestate
;
@ApiModelProperty
(
value
=
""
,
example
=
""
)
private
Integer
defaulttype
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
a53643ec
...
@@ -645,10 +645,13 @@ public class SalaryManagementController {
...
@@ -645,10 +645,13 @@ public class SalaryManagementController {
if
(!
xcjsgz
.
getGsxs
().
equals
(
modifysalaryruledto
.
getFormula
()))
{
if
(!
xcjsgz
.
getGsxs
().
equals
(
modifysalaryruledto
.
getFormula
()))
{
XcglAssoJsgzzx
.
builder
().
gsid
(
modifysalaryruledto
.
getXcjsgzid
()).
gsgs
(
modifysalaryruledto
.
getFormula
())
XcglAssoJsgzzx
.
builder
().
gsid
(
modifysalaryruledto
.
getXcjsgzid
()).
gsgs
(
modifysalaryruledto
.
getFormula
())
.
rule
(
modifysalaryruledto
.
getFormula
()).
rulestate
(
3
).
id
(
modifysalaryruledto
.
getJsgzzxid
()).
build
().
updateById
();
.
rule
(
modifysalaryruledto
.
getFormula
()).
rulestate
(
3
).
id
(
modifysalaryruledto
.
getJsgzzxid
()).
build
().
updateById
();
}
else
{
XcglAssoJsgzzx
.
builder
().
gsid
(
modifysalaryruledto
.
getXcjsgzid
()).
gsgs
(
modifysalaryruledto
.
getFormula
())
.
rule
(
modifysalaryruledto
.
getFormula
()).
rulestate
(
xcjsgz
.
getOptionid
()).
id
(
modifysalaryruledto
.
getJsgzzxid
()).
build
().
updateById
();
}
}
}
else
{
}
else
{
XcglAssoJsgzzx
.
builder
().
gsid
(
modifysalaryruledto
.
getXcjsgzid
()).
gsgs
(
modifysalaryruledto
.
getFormula
())
XcglAssoJsgzzx
.
builder
().
gsid
(
modifysalaryruledto
.
getXcjsgzid
()).
gsgs
(
modifysalaryruledto
.
getFormula
())
.
rule
(
modifysalaryruledto
.
getFormula
()).
id
(
modifysalaryruledto
.
getJsgzzxid
()).
build
().
updateById
();
.
rule
(
modifysalaryruledto
.
getFormula
()).
rulestate
(
xcjsgz
.
getOptionid
()).
id
(
modifysalaryruledto
.
getJsgzzxid
()).
build
().
updateById
();
}
}
return
ResultUtil
.
success
(
"操作成功!"
);
return
ResultUtil
.
success
(
"操作成功!"
);
...
@@ -1406,7 +1409,6 @@ public class SalaryManagementController {
...
@@ -1406,7 +1409,6 @@ public class SalaryManagementController {
yjs
.
updateById
();
yjs
.
updateById
();
//薪资组信息
//薪资组信息
@SuppressWarnings
(
"unused"
)
XcglAdminXzz
xzz
=
new
LambdaQueryChainWrapper
<
XcglAdminXzz
>(
xcgladminxzzmapper
).
eq
(
XcglAdminXzz:
:
getId
,
id
).
one
();
XcglAdminXzz
xzz
=
new
LambdaQueryChainWrapper
<
XcglAdminXzz
>(
xcgladminxzzmapper
).
eq
(
XcglAdminXzz:
:
getId
,
id
).
one
();
// sxrq = xzz.getXzyf();
// sxrq = xzz.getXzyf();
xzyf
=
xzz
.
getXzyf
();
xzyf
=
xzz
.
getXzyf
();
...
@@ -1489,6 +1491,10 @@ public class SalaryManagementController {
...
@@ -1489,6 +1491,10 @@ public class SalaryManagementController {
if
(
lbcx
.
getId
()
==
24
)
{
numover
=
xcglassoxzbmapper
.
PeriodsOvertime
(
orgcode
,
xzyf
,
1
,
znr
.
getUserid
());}
if
(
lbcx
.
getId
()
==
24
)
{
numover
=
xcglassoxzbmapper
.
PeriodsOvertime
(
orgcode
,
xzyf
,
1
,
znr
.
getUserid
());}
if
(
lbcx
.
getId
()
==
25
)
{
numover
=
xcglassoxzbmapper
.
PeriodsOvertime
(
orgcode
,
xzyf
,
2
,
znr
.
getUserid
());}
if
(
lbcx
.
getId
()
==
25
)
{
numover
=
xcglassoxzbmapper
.
PeriodsOvertime
(
orgcode
,
xzyf
,
2
,
znr
.
getUserid
());}
if
(
lbcx
.
getId
()
==
26
)
{
numover
=
xcglassoxzbmapper
.
PeriodsOvertime
(
orgcode
,
xzyf
,
3
,
znr
.
getUserid
());}
if
(
lbcx
.
getId
()
==
26
)
{
numover
=
xcglassoxzbmapper
.
PeriodsOvertime
(
orgcode
,
xzyf
,
3
,
znr
.
getUserid
());}
}
else
if
(
tablename
.
equals
(
"xcgl_asso_gsjsmx"
))
{
QueryWrapper
<
XcglAssoGsjsmx
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
fieldname
).
eq
(
"user_num"
,
znr
.
getUserid
()).
eq
(
"qyid"
,
userBean
.
getOrgCode
()).
eq
(
"salary_month"
,
xzyf
);
//select #{tablename} from yggl_main_emp where emp_num = ?
list
=
xcglassogsjsmxmapper
.
selectMaps
(
queryWrapper
);
}
}
String
autacq
=
""
;
String
autacq
=
""
;
...
@@ -1641,24 +1647,29 @@ public class SalaryManagementController {
...
@@ -1641,24 +1647,29 @@ public class SalaryManagementController {
//算薪月份
//算薪月份
String
salary_month
=
xzz
.
getXzyf
();
//算薪月份
String
salary_month
=
xzz
.
getXzyf
();
//算薪月份
//个税
double
perinctax
=
0
;
//基本工资,岗位津贴,应出勤天数,实出勤天数,事假,病假
//基本工资,岗位津贴,应出勤天数,实出勤天数,事假,病假
double
base_pay
=
0
;
//基本工资
double
base_pay
=
0
;
//基本工资
double
post_allowance
=
0
;
//岗位津贴
double
post_allowance
=
0
;
//岗位津贴
double
attendance_days
=
0
;
//应出勤天数
double
attendance_days
=
0
;
//应出勤天数
double
actual_attendance_days
=
0
;
//实出勤天数
double
actual_attendance_days
=
0
;
//实出勤天数
double
matter_leave
=
0
;
//事假
double
matter_leave
=
0
;
//事假
double
sick_leave
;
//病假
double
sick_leave
=
0
;
//病假
double
absenteeism_days
=
0
;
//旷工天数
double
personal_income_tax
=
0
;
//个税
double
personal_income_tax
=
0
;
//个税
double
other_deductions
=
0
;
//其他扣除
double
other_deductions
=
0
;
//其他扣除
double
wages_payable
=
0
;
//应发工资
double
wages_payable
=
0
;
//应发工资
double
late_cs
=
0
;
//迟到次数
double
leave_early_cs
=
0
;
//早退次数
double
late_sc
=
0
;
//迟到时长
double
leave_early_sc
=
0
;
//早退时长
double
achievement_bonus
=
0
;
//绩效奖金
double
achievement_bonus
=
0
;
//绩效奖金
double
performance_commission
=
0
;
//业绩提成
double
performance_commission
=
0
;
//业绩提成
double
pre_taxmakediff
=
0
;
//税前补差
double
pre_taxmakediff
=
0
;
//税前补差
double
matter_leave_deduction
=
0
;
//事假扣款
double
sick_leave_deduction
=
0
;
//病假扣款
double
secretary_ling
=
0
;
//司龄
double
secretary_ling
=
0
;
//司龄
double
grsb
=
0
;
//个人社保
double
grgjj
=
0
;
//个人公积金
//薪资组内成员
//薪资组内成员
for
(
XcglAssoXzury
pag
:
paygrlist
)
{
for
(
XcglAssoXzury
pag
:
paygrlist
)
{
...
@@ -1673,54 +1684,80 @@ public class SalaryManagementController {
...
@@ -1673,54 +1684,80 @@ public class SalaryManagementController {
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
post_allowance
=
xzb
.
getXzxjg
();
post_allowance
=
xzb
.
getXzxjg
();
}
}
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
10
)
{
//应出勤天数
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
10
)
{
attendance_days
=
xzb
.
getXzxjg
();
}
//实出勤天数
attendance_days
=
xzb
.
getXzxjg
();
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
11
)
{
actual_attendance_days
=
xzb
.
getXzxjg
();
}
//实出勤天数
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
32
)
{
matter_leave
=
xzb
.
getXzxjg
();
}
//事假
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
11
)
{
//实出勤天数
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
34
)
{
sick_leave
=
xzb
.
getXzxjg
();
}
//病假
actual_attendance_days
=
xzb
.
getXzxjg
();
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
12
)
{
absenteeism_days
=
xzb
.
getXzxjg
();
}
//旷工天数
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
72
)
{
other_deductions
=
xzb
.
getXzxjg
();
}
//其他扣除
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
32
)
{
//事假
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
13
)
{
late_cs
=
xzb
.
getXzxjg
();
}
//迟到次数
matter_leave
=
xzb
.
getXzxjg
();
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
14
)
{
leave_early_cs
=
xzb
.
getXzxjg
();
}
//早退次数
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
18
)
{
late_sc
=
xzb
.
getXzxjg
();
}
//迟到时长
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
34
)
{
//病假
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
22
)
{
leave_early_sc
=
xzb
.
getXzxjg
();
}
//早退时长
sick_leave
=
xzb
.
getXzxjg
();
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
50
)
{
grsb
=
xzb
.
getXzxjg
();
}
//个人社保
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
51
)
{
grgjj
=
xzb
.
getXzxjg
();
}
//个人公积金
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
72
)
{
//其他扣除
other_deductions
=
xzb
.
getXzxjg
();
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
43
)
{
//司龄
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
43
)
{
//司龄
YgglMainEmp
xzrz
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
pag
.
getUserid
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgcode
));
YgglMainEmp
xzrz
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
pag
.
getUserid
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgcode
));
int
entry_date
=
Integer
.
valueOf
(
ClockInTool
.
SunNovCSTY
(
xzrz
.
getRzTime
()));
//yyyy
int
entry_date
=
Integer
.
valueOf
(
ClockInTool
.
SunNovCSTY
(
xzrz
.
getRzTime
()));
//yyyy
if
(
Integer
.
valueOf
(
strY
)
-
entry_date
>=
0
)
{
if
(
Integer
.
valueOf
(
strY
)
-
entry_date
>=
0
)
{
secretary_ling
=
Integer
.
valueOf
(
strY
)
-
entry_date
;
secretary_ling
=
Integer
.
valueOf
(
strY
)
-
entry_date
;
}
}
XcglAssoXzb
.
builder
().
xzxjg
(
secretary_ling
).
build
().
update
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
XcglAssoXzb
.
builder
().
xzxjg
(
secretary_ling
).
build
().
update
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
}
}
//公式计算
//公式计算
//(固定公式计算):迟到早退扣款、事假扣款、病假扣款、旷工扣款、司龄工资、应发工资、实发工资
//(固定公式计算):迟到早退扣款、事假扣款、病假扣款、旷工扣款、司龄工资、应发工资、实发工资
if
(
xzx
.
getRulestate
().
equals
(
2
))
{
if
(
xzx
.
getRulestate
().
equals
(
2
))
{
double
result
=
0
;
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
31
)
{
//司龄工资
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
31
)
{
//司龄工资
String
formula
=
xzx
.
getGsgs
();
//#司龄#*100
String
formula
=
xzx
.
getGsgs
();
//#司龄#*100
String
qaz
=
formula
.
replace
(
"#司龄#"
,
String
.
valueOf
(
secretary_ling
));
String
qaz
=
formula
.
replace
(
"#司龄#"
,
String
.
valueOf
(
secretary_ling
));
double
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
}
XcglAssoXzb
.
builder
().
xzxjg
(
result
).
build
().
update
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
27
)
{
//事假扣款
String
formula
=
xzx
.
getGsgs
();
//#基本工资#/#应出勤天数#*#事假# #事假#*200
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#应出勤天数#"
,
String
.
valueOf
(
attendance_days
)).
replace
(
"#事假#"
,
String
.
valueOf
(
matter_leave
));
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
matter_leave_deduction
=
result
;
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
28
)
{
//病假扣款
String
formula
=
xzx
.
getGsgs
();
//#基本工资#/#应出勤天数#*#病假#*0.4 #病假#*100
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#应出勤天数#"
,
String
.
valueOf
(
attendance_days
)).
replace
(
"#病假#"
,
String
.
valueOf
(
sick_leave
));
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
sick_leave_deduction
=
result
;
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
29
)
{
//旷工扣款
String
formula
=
xzx
.
getGsgs
();
//#基本工资#/#应出勤天数#*#旷工天数#*3 #旷工天数#*100
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#应出勤天数#"
,
String
.
valueOf
(
attendance_days
)).
replace
(
"#旷工天数#"
,
String
.
valueOf
(
absenteeism_days
));
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
30
)
{
//迟到早退扣款
String
qaz
=
""
;
if
(
xzx
.
getGsid
().
equals
(
1
))
{
String
formula
=
xzx
.
getGsgs
();
//#迟到次数#*20+#早退次数#*15
qaz
=
formula
.
replace
(
"#迟到次数#"
,
String
.
valueOf
(
late_cs
)).
replace
(
"#早退次数#"
,
String
.
valueOf
(
leave_early_cs
));
}
else
{
String
formula
=
xzx
.
getGsgs
();
//#迟到时长#*10+#早退时长#*5
qaz
=
formula
.
replace
(
"#迟到时长#"
,
String
.
valueOf
(
late_sc
)).
replace
(
"#早退时长数#"
,
String
.
valueOf
(
leave_early_sc
));
}
}
if
(!(
""
).
equals
(
qaz
))
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
}
}
//(自定义公式计算): 应发工资、实发工资
if
(
xzx
.
getRulestate
()
==
3
)
{
}
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
48
)
{
//应发工资
String
formula
=
xzx
.
getGsgs
();
//#基本工资#+#岗位津贴#+#绩效奖金#+#业绩提成#+#税前补差#-#事假扣款#-#病假扣款#
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#岗位津贴#"
,
String
.
valueOf
(
post_allowance
)).
replace
(
"#绩效奖金#"
,
String
.
valueOf
(
achievement_bonus
))
.
replace
(
"#业绩提成#"
,
String
.
valueOf
(
performance_commission
)).
replace
(
"#税前补差#"
,
String
.
valueOf
(
pre_taxmakediff
))
.
replace
(
"#事假扣款#"
,
String
.
valueOf
(
matter_leave_deduction
)).
replace
(
"#病假扣款#"
,
String
.
valueOf
(
sick_leave_deduction
));
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
wages_payable
=
result
;
}
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
69
)
{
//个税
//个税计算
//个税计算
try
{
try
{
personal_income_tax
=
CalculationOfIndividualIncomeTax
(
String
.
valueOf
(
pag
.
getUserid
()),
salary_month
,
orgcode
,
wages_payable
,
other_deductions
);
personal_income_tax
=
CalculationOfIndividualIncomeTax
(
String
.
valueOf
(
pag
.
getUserid
()),
salary_month
,
orgcode
,
wages_payable
,
other_deductions
);
...
@@ -1728,9 +1765,45 @@ public class SalaryManagementController {
...
@@ -1728,9 +1765,45 @@ public class SalaryManagementController {
e
.
printStackTrace
();
e
.
printStackTrace
();
System
.
out
.
println
(
"个税计算错误"
);
System
.
out
.
println
(
"个税计算错误"
);
}
}
result
=
personal_income_tax
;
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
70
)
{
//实发工资
String
formula
=
xzx
.
getGsgs
();
//#应发工资#-#个人社保#-#个人公积金#-#个税#
String
qaz
=
formula
.
replace
(
"#应发工资#"
,
String
.
valueOf
(
wages_payable
)).
replace
(
"#个人社保#"
,
String
.
valueOf
(
grsb
)).
replace
(
"#个人公积金#"
,
String
.
valueOf
(
grgjj
)).
replace
(
"#个税#"
,
String
.
valueOf
(
personal_income_tax
));
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
}
XcglAssoXzb
.
builder
().
xzxjg
(
result
).
build
().
update
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
}
//(自定义公式计算): 应发工资、实发工资
if
(
xzx
.
getRulestate
()
==
3
)
{
//计薪规则组项中自定义项
List
<
XcglAssoJsgzzx
>
zdyx
=
XcglAssoJsgzzx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoJsgzzx
>().
lambda
().
eq
(
XcglAssoJsgzzx:
:
getXzzid
,
calcomtiondto
.
getPay_group_id
()).
eq
(
XcglAssoJsgzzx:
:
getIsCustom
,
1
));
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
48
)
{
//应发工资
String
formula
=
xzx
.
getGsgs
();
//#基本工资#+#岗位津贴#+#绩效奖金#+#业绩提成#+#税前补差#-#事假扣款#-#病假扣款#?
String
qaz
=
formula
.
replace
(
"#基本工资#"
,
String
.
valueOf
(
base_pay
)).
replace
(
"#岗位津贴#"
,
String
.
valueOf
(
post_allowance
)).
replace
(
"#绩效奖金#"
,
String
.
valueOf
(
achievement_bonus
))
.
replace
(
"#业绩提成#"
,
String
.
valueOf
(
performance_commission
)).
replace
(
"#税前补差#"
,
String
.
valueOf
(
pre_taxmakediff
))
.
replace
(
"#事假扣款#"
,
String
.
valueOf
(
matter_leave_deduction
)).
replace
(
"#病假扣款#"
,
String
.
valueOf
(
sick_leave_deduction
));
for
(
XcglAssoJsgzzx
zdy
:
zdyx
)
{
}
}
double
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
}
if
(
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
70
)
{
//实发工资
}
}
}
//存在的计薪规则组项数据对应 写入薪资表 --结束
}
//薪资组内成员--结束
return
ResultUtil
.
data
(
null
,
"计算完成"
);
return
ResultUtil
.
data
(
null
,
"计算完成"
);
}
}
...
...
src/main/resources/mapping/xcgl/XcglAssoXcjsgzMapper.xml
View file @
a53643ec
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<result
column=
"dygk_text"
property=
"dygkText"
/>
<result
column=
"dygk_text"
property=
"dygkText"
/>
<result
column=
"degk_text"
property=
"degkText"
/>
<result
column=
"degk_text"
property=
"degkText"
/>
<result
column=
"rulestate"
property=
"rulestate"
/>
<result
column=
"rulestate"
property=
"rulestate"
/>
<result
column=
"defaulttype"
property=
"defaulttype"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -38,7 +39,7 @@
...
@@ -38,7 +39,7 @@
<select
id=
"QuerySalaryRules"
resultMap=
"BaseResultMap"
>
<select
id=
"QuerySalaryRules"
resultMap=
"BaseResultMap"
>
select * from xcgl_asso_xcjsgz jsgz
select * from xcgl_asso_xcjsgz jsgz
where jsgz.formulaname = #{formulaname}
where jsgz.formulaname = #{formulaname}
ORDER BY jsgz.id ASC LIMIT
1
and jsgz.defaulttype =
1
</select>
</select>
<!--
<!--
...
...
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