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
5358e61b
Commit
5358e61b
authored
Oct 28, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
fb031b9f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
14 deletions
+79
-14
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+78
-10
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
+1
-4
No files found.
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
5358e61b
...
...
@@ -363,19 +363,32 @@ public class SalaryManagementController {
xcglassojsgzzxmapper
.
insertxcglassojsgzzxList
(
zzxlist
);
}
}
else
if
((
"固定工资"
).
equals
(
grouping
[
g
]))
{
String
[]
fixed
=
{
"
基本工资"
,
"岗位津贴
"
};
String
[]
fixed
=
{
"
底薪"
,
"岗位津贴"
,
"基本工资
"
};
List
<
XcglAssoJsgzzx
>
gzzxlist
=
new
ArrayList
<
XcglAssoJsgzzx
>();
for
(
int
f
=
0
;
f
<
fixed
.
length
;
f
++)
{
XcglAssoXcjsgz
xzxj
=
xcglassoxcjsgzmapper
.
QuerySalaryRules
(
fixed
[
f
]);
XcglAssoJsgzzx
zzx
=
XcglAssoJsgzzx
.
builder
().
build
();
zzx
.
setSalaryitem
(
fixed
[
f
]);
//薪资项
zzx
.
setYhmbzd
(
fixed
[
f
]);
//银行模板项 需与银行一一对应
@SuppressWarnings
(
"unused"
)
XcglAssoXzdazdy
daz
=
xcglassoxzdazdymapper
.
SalaryFixedWages
(
fixed
[
f
]);
// XcglAssoXzdazdy daz = xcglassoxzdazdymapper.SalaryFixedWages(fixed[f]);
if
(
xzxj
!=
null
)
{
//系统有规则
zzx
.
setRule
(
xzxj
.
getGsxs
().
replace
(
"{{"
,
""
).
replace
(
"}}"
,
""
));
//规则********************************
zzx
.
setGsid
(
xzxj
.
getId
());
//公式id 0:未关联规则
zzx
.
setGsgs
(
xzxj
.
getGsxs
().
replace
(
"{{"
,
""
).
replace
(
"}}"
,
""
));
//公式格式 系统提供/自定义公式
zzx
.
setRulestate
(
xzxj
.
getRulestate
());
//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx
.
setDygk
(
xzxj
.
getDygk
()
==
null
?
0
:
xzxj
.
getDygk
());
//公式变量值1
zzx
.
setDegk
(
xzxj
.
getDegk
()
==
null
?
0
:
xzxj
.
getDegk
());
//公式变量值2
XcglAssoOption
opt
=
new
LambdaQueryChainWrapper
<
XcglAssoOption
>(
xcglassooptionmapper
).
eq
(
XcglAssoOption:
:
getOptionname
,
fixed
[
f
]).
one
();
zzx
.
setOptionid
(
opt
.
getId
());
}
else
{
zzx
.
setRule
(
"从薪资档案-"
+
fixed
[
f
]+
"自动提取数据"
);
//规则********************************
zzx
.
setGsid
(
0
);
//公式id 0:未关联规则
zzx
.
setGsgs
(
"从薪资档案-"
+
fixed
[
f
]+
"自动提取数据"
);
//公式格式 系统提供/自定义公式
zzx
.
setRulestate
(
1
);
//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx
.
setDygk
(
0.0
);
//公式变量值1
zzx
.
setDegk
(
0.0
);
//公式变量值2
zzx
.
setOptionid
(
0
);
}
zzx
.
setType
(
2
);
//类型 1:系统项;2:非系统项
zzx
.
setAddtime
(
new
Date
().
getTime
());
//添加时间
zzx
.
setAdduserid
(
empNum
);
//添加人员id
...
...
@@ -383,8 +396,6 @@ public class SalaryManagementController {
zzx
.
setRemarks
(
""
);
//备注
zzx
.
setXzzid
(
payid
);
zzx
.
setDygk
(
0.0
);
//公式变量值1
zzx
.
setDegk
(
0.0
);
//公式变量值2
gzzxlist
.
add
(
zzx
);
}
if
(
gzzxlist
.
size
()
>
0
)
{
...
...
@@ -918,7 +929,7 @@ public class SalaryManagementController {
@ApiOperation
(
value
=
"初始化薪资档案自定义"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
ResponseResult
Initialization
(
@CurrentUser
UserBean
userBean
)
{
List
<
XcglAssoXzdazdy
>
cshsj
=
xcglassoxzdazdymapper
.
selectxcglassoxzdazdy
(
userBean
.
getOrgCode
());
String
[]
zdmc
=
{
"
基本工资
"
,
"岗位津贴"
};
String
[]
zdmc
=
{
"
底薪
"
,
"岗位津贴"
};
// 检查是否有初始化数据
if
(
cshsj
.
size
()
==
0
)
{
for
(
int
z
=
0
;
z
<
zdmc
.
length
;
z
++)
{
...
...
@@ -1708,7 +1719,9 @@ public class SalaryManagementController {
String
salary_month
=
xzz
.
getXzyf
();
//算薪月份
//基本工资,岗位津贴,应出勤天数,实出勤天数,事假,病假
double
base_salary
=
0
;
//底薪######
double
base_pay
=
0
;
//基本工资
double
post_allowance
=
0
;
//岗位津贴
double
attendance_days
=
0
;
//应出勤天数
// double actual_attendance_days = 0;//实出勤天数
...
...
@@ -1740,14 +1753,15 @@ public class SalaryManagementController {
//存在的计薪规则组项数据对应 写入薪资表
for
(
XcglAssoJsgzzx
xzx
:
sjbt
)
{
if
(
xzx
.
getRulestate
()
==
1
&&
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
0
&&
xzx
.
getSalaryitem
().
equals
(
"
基本工资
"
))
{
if
(
xzx
.
getRulestate
()
==
1
&&
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
0
&&
xzx
.
getSalaryitem
().
equals
(
"
底薪
"
))
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
base_
pa
y
=
xzb
.
getXzxjg
();
base_
salar
y
=
xzb
.
getXzxjg
();
}
if
(
xzx
.
getRulestate
()
==
1
&&
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
0
&&
xzx
.
getSalaryitem
().
equals
(
"岗位津贴"
))
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
post_allowance
=
xzb
.
getXzxjg
();
}
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
)
{
attendance_days
=
xzb
.
getXzxjg
();
}
//实出勤天数
...
...
@@ -1782,6 +1796,51 @@ public class SalaryManagementController {
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
(
3
)
&&
xzx
.
getIsCustom
()
==
0
&&
xzx
.
getOptionid
()
==
73
)
{
double
result
=
0
;
//计薪规则组项中自定义项
List
<
XcglAssoJsgzzx
>
zdyx
=
XcglAssoJsgzzx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoJsgzzx
>().
lambda
().
eq
(
XcglAssoJsgzzx:
:
getXzzid
,
calcomtiondto
.
getPay_group_id
()).
eq
(
XcglAssoJsgzzx:
:
getIsCustom
,
1
));
String
formula
=
xzx
.
getGsgs
();
//#底薪#+#岗位津贴#?
String
qaz
=
formula
.
replace
(
"#底薪#"
,
String
.
valueOf
(
base_salary
)).
replace
(
"#岗位津贴#"
,
String
.
valueOf
(
post_allowance
));
for
(
XcglAssoJsgzzx
zdy
:
zdyx
)
{
double
custom_
=
0
;
//自定义
boolean
status
=
qaz
.
contains
(
"#"
+
zdy
.
getSalaryitem
()+
"#"
);
//公式中是否存在自定义
if
(
status
)
{
//存在
XcglAssoJsgzzx
zdygsx
=
XcglAssoJsgzzx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoJsgzzx
>().
lambda
().
eq
(
XcglAssoJsgzzx:
:
getRulestate
,
4
).
eq
(
XcglAssoJsgzzx:
:
getIsCustom
,
1
)
.
eq
(
XcglAssoJsgzzx:
:
getOptionid
,
0
).
eq
(
XcglAssoJsgzzx:
:
getSalaryitem
,
zdy
.
getSalaryitem
()));
XcglAssoXzb
xzb_custom
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
zdygsx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
custom_
=
xzb_custom
.
getXzxjg
();
qaz
=
qaz
.
replace
(
"#"
+
zdy
.
getSalaryitem
()+
"#"
,
String
.
valueOf
(
custom_
));
}
}
boolean
status
=
qaz
.
contains
(
"#"
);
//再次确认公式中是否存在系统数据项
if
(
status
)
{
List
<
XcglAssoJsgzzx
>
system_zdyx
=
XcglAssoJsgzzx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoJsgzzx
>().
lambda
().
eq
(
XcglAssoJsgzzx:
:
getXzzid
,
calcomtiondto
.
getPay_group_id
())
.
eq
(
XcglAssoJsgzzx:
:
getIsCustom
,
0
).
ne
(
XcglAssoJsgzzx:
:
getType
,
1
));
for
(
XcglAssoJsgzzx
sys
:
system_zdyx
)
{
if
(
qaz
.
contains
(
"#"
+
sys
.
getSalaryitem
()+
"#"
))
{
XcglAssoXzb
xzb_custom
=
XcglAssoXzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
sys
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
double
custom_two
=
xzb_custom
.
getXzxjg
();
qaz
=
qaz
.
replace
(
"#"
+
sys
.
getSalaryitem
()+
"#"
,
String
.
valueOf
(
custom_two
));
}
}
}
if
(!
qaz
.
contains
(
"#"
))
{
result
=
Double
.
valueOf
(
String
.
valueOf
(
js
.
eval
(
qaz
)));
}
else
{
System
.
err
.
println
(
xzx
.
getOptionid
()
+
":"
+
qaz
+
"有误!!!"
);
}
base_pay
=
result
;
XcglAssoXzb
.
builder
().
xzxjg
(
result
).
build
().
update
(
new
QueryWrapper
<
XcglAssoXzb
>().
lambda
().
eq
(
XcglAssoXzb:
:
getXzxid
,
xzx
.
getId
()).
eq
(
XcglAssoXzb:
:
getUserid
,
pag
.
getUserid
()));
}
//公式计算
//(固定公式计算):迟到早退扣款、事假扣款、病假扣款、旷工扣款、司龄工资、应发工资、实发工资
if
(
xzx
.
getRulestate
().
equals
(
2
))
{
...
...
@@ -3121,6 +3180,15 @@ public class SalaryManagementController {
int
i
=
0
;
for
(
IndividualTaxDetailsDto
indv
:
individualtaxdetailsdto
)
{
XcglAssoBszqsz
bssz
=
XcglAssoBszqsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoBszqsz
>().
lambda
().
eq
(
XcglAssoBszqsz:
:
getQyid
,
orgCode
));
String
taxmonth
=
""
;
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
taxmonth
=
indv
.
getTaxMonth
();
}
else
{
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
getTaxMonth
()+
"-01 00:00:00"
);
}
String
name
=
indv
.
getUserName
();
String
phone
=
indv
.
getPhone
();
String
date
=
indv
.
getSalaryMonth
();
//薪资月
...
...
@@ -3138,7 +3206,7 @@ public class SalaryManagementController {
gsgs
.
setUserNum
(
String
.
valueOf
(
ygl
.
getEmpNum
()));
gsgs
.
setUserName
(
indv
.
getUserName
());
gsgs
.
setSalaryMonth
(
indv
.
getSalaryMonth
());
gsgs
.
setTaxMonth
(
indv
.
getTaxMonth
());
gsgs
.
setTaxMonth
(
taxmonth
);
//税款所属月份
gsgs
.
setThmonthPersonal
(
indv
.
getThmonthPersonal
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getThmonthPersonal
()));
gsgs
.
setCumZljy
(
indv
.
getCumZljy
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getCumZljy
()));
gsgs
.
setCumZfdklx
(
indv
.
getCumZfdklx
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getCumZfdklx
()));
...
...
@@ -3167,7 +3235,7 @@ public class SalaryManagementController {
gsgs
.
setUserNum
(
String
.
valueOf
(
ygl
.
getEmpNum
()));
gsgs
.
setUserName
(
indv
.
getUserName
());
gsgs
.
setSalaryMonth
(
indv
.
getSalaryMonth
());
gsgs
.
setTaxMonth
(
indv
.
getTaxMonth
());
gsgs
.
setTaxMonth
(
taxmonth
);
//税款所属月份
gsgs
.
setThmonthPersonal
(
indv
.
getThmonthPersonal
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getThmonthPersonal
()));
gsgs
.
setCumZljy
(
indv
.
getCumZljy
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getCumZljy
()));
gsgs
.
setCumZfdklx
(
indv
.
getCumZfdklx
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getCumZfdklx
()));
...
...
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
View file @
5358e61b
...
...
@@ -64,10 +64,7 @@
<select
id=
"selectxcglassoxzdazdy"
resultMap=
"BaseResultMap"
>
select * from xcgl_asso_xzdazdy xzzdy
where xzzdy.qyid = #{qyid}
and xzzdy.zdmc = '基本工资'
or xzzdy.zdmc = '绩效工资'
or xzzdy.zdmc = '岗位津贴'
or xzzdy.zdmc = '加班工资'
and xzzdy.zdmc in ('底薪','岗位津贴')
</select>
<select
id=
"SalaryFixedWages"
resultMap=
"BaseResultMap"
>
...
...
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