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
b8bbe0d9
Commit
b8bbe0d9
authored
Nov 03, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!536
parents
41a0b8c9
59a93bcd
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
223 additions
and
108 deletions
+223
-108
src/main/java/cn/timer/api/bean/xcgl/XcglAssoJsgzzx.java
+4
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+2
-2
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+1
-1
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+41
-59
src/main/java/cn/timer/api/dao/xcgl/XcglAssoGsjsmxMapper.java
+12
-3
src/main/java/cn/timer/api/dao/xcgl/XcglAssoJsgzzxMapper.java
+9
-0
src/main/java/cn/timer/api/dao/xcgl/XcglAssoZxfjkcMapper.java
+1
-1
src/main/java/cn/timer/api/dto/xcgl/SearchSalariedPeopleDto.java
+3
-2
src/main/java/cn/timer/api/dto/yggl/YgQueryDto.java
+2
-2
src/main/java/cn/timer/api/utils/Page.java
+1
-1
src/main/resources/mapping/xcgl/XcglAssoGsjsmxMapper.xml
+56
-16
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
+63
-0
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
+11
-5
src/main/resources/mapping/xcgl/XcglAssoZxfjkcMapper.xml
+17
-16
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAssoJsgzzx.java
View file @
b8bbe0d9
...
...
@@ -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/kqgl/atttimer/AttendanceTaskTiming.java
View file @
b8bbe0d9
...
...
@@ -98,10 +98,10 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次
// @Scheduled(cron = "0 0 */4 * * ?")
//typeid:1-员工 2-考勤组
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0
10
9 * * ?")
// @Scheduled(cron = "0
33
9 * * ?")
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
public
void
AttendanceTask
()
throws
ParseException
{
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
b8bbe0d9
...
...
@@ -756,7 +756,7 @@ public class LastMonthtimingExport {
}
if
(
shif
!=
null
&&
shif
.
getSxbcs
()
!=
null
)
{
System
.
out
.
println
(
shif
.
getSxbcs
());
//
System.out.println(shif.getSxbcs());
answer
=
shif
.
getSxbcs
();
//1=2次 2=4次 3=6次
//未打最后一次卡的时候 判断最后一次打卡时间是否在请假范围内 相对应减少下班缺卡次数
//最后一次应打卡时间
...
...
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
b8bbe0d9
...
...
@@ -825,14 +825,6 @@ public class SalaryManagementController {
@ApiOperation
(
value
=
"查询定薪人员/分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
FixedSalarStaff
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SearchSalariedPeopleDto
search
)
{
search
.
setOrgcode
(
userBean
.
getOrgCode
());
if
((
"0"
).
equals
(
search
.
getStatus
()))
{
//全部
search
.
setStatus
(
""
);
}
else
if
((
"1"
).
equals
(
search
.
getStatus
()))
{
//在职
search
.
setStatus
(
"0"
);
}
else
{
search
.
setStatus
(
"3"
);
}
Page
<
FixedSalaryStaffDto
>
page
=
new
Page
<
FixedSalaryStaffDto
>(
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
...
...
@@ -923,6 +915,10 @@ public class SalaryManagementController {
@ApiOperation
(
value
=
"删除薪资组自定义表头"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
ResponseResult
customdelete
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
XcglAssoXzdazdy
.
builder
().
build
().
deleteById
(
id
);
// 同时删除已添加到薪资组(未锁定的组)中的薪资项
xcglassojsgzzxmapper
.
deleteByxzdazdyid
(
id
);
return
new
ResponseResult
().
success
(
"删除成功"
,
id
);
}
...
...
@@ -1272,6 +1268,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
=
{
"从人事花名册-"
,
"从月度汇总-"
,
"从社保账单-"
};
...
...
@@ -1294,6 +1297,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
)
{
...
...
@@ -1320,7 +1325,7 @@ public class SalaryManagementController {
}
}
if
(
gzzxlist
.
size
()
>
0
)
{
xcglassojsgzzxmapper
.
insertxcglassojsgzzxList
(
gzzxlist
);
xcglassojsgzzxmapper
.
insertxcglassojsgzzxList
Two
(
gzzxlist
);
}
return
new
ResponseResult
().
success
(
"创建薪资组成功"
,
gzzxlist
);
}
...
...
@@ -1943,15 +1948,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
)
)));
}
}
...
...
@@ -1961,15 +1966,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
)
)));
}
}
...
...
@@ -1992,7 +1997,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
)
)));
}
}
...
...
@@ -2043,7 +2048,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
+
"有误!!!"
);
}
...
...
@@ -2107,7 +2112,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
+
"有误!!!"
);
}
...
...
@@ -2152,6 +2157,10 @@ public class SalaryManagementController {
public
double
CalculationOfIndividualIncomeTax
(
String
gsus
,
String
salary_month
,
int
orgcode
,
double
wages_payable
,
double
other_deductions
)
throws
ParseException
{
double
personalincome
=
0
;
String
strY
=
new
SimpleDateFormat
(
"yyyy"
).
format
(
new
Date
());
XcglAssoGsjsmx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
XcglAssoGsjsmx
>().
lambda
().
eq
(
XcglAssoGsjsmx:
:
getUserNum
,
gsus
).
eq
(
XcglAssoGsjsmx:
:
getSalaryMonth
,
salary_month
)
.
eq
(
XcglAssoGsjsmx:
:
getQyid
,
orgcode
));
//当月个税存在则直接获取 无则根据计算薪资月的上月个税为基准计算
XcglAssoGsjsmx
dyxzgs
=
XcglAssoGsjsmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoGsjsmx
>().
lambda
().
eq
(
XcglAssoGsjsmx:
:
getUserNum
,
gsus
).
eq
(
XcglAssoGsjsmx:
:
getQyid
,
orgcode
)
.
eq
(
XcglAssoGsjsmx:
:
getSalaryMonth
,
salary_month
));
...
...
@@ -2190,24 +2199,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
;
}
...
...
@@ -2222,7 +2232,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
]));
//税率
...
...
@@ -2258,7 +2268,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
()){
//个人所得税=计税工资*税率-速算扣除数
...
...
@@ -2273,6 +2283,7 @@ public class SalaryManagementController {
}
}
}
else
{
perinctax
[
0
]
=
"0"
;
perinctax
[
1
]
=
"0"
;
perinctax
[
2
]
=
"0"
;
...
...
@@ -2914,15 +2925,7 @@ public class SalaryManagementController {
@PostMapping
(
value
=
"/obtainidedu"
)
@ApiOperation
(
value
=
"获取附加扣除数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ObtainAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SearchSalariedPeopleDto
search
)
{
search
.
setOrgcode
(
userBean
.
getOrgCode
());
if
((
"0"
).
equals
(
search
.
getStatus
()))
{
//全部
search
.
setStatus
(
""
);
}
else
if
((
"1"
).
equals
(
search
.
getStatus
()))
{
//在职
search
.
setStatus
(
"0"
);
}
else
{
search
.
setStatus
(
"3"
);
}
List
<
AdditionalDeductionDto
>
fjkclist
=
xcglassozxfjkcmapper
.
selectAdditionalDeductiontwo
(
search
);
return
new
ResponseResult
().
success
(
"获取附加扣除数据成功"
,
fjkclist
);
...
...
@@ -2939,13 +2942,6 @@ public class SalaryManagementController {
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
search
.
setOrgcode
(
userBean
.
getOrgCode
());
if
((
"0"
).
equals
(
search
.
getStatus
()))
{
//全部
search
.
setStatus
(
""
);
}
else
if
((
"1"
).
equals
(
search
.
getStatus
()))
{
//在职
search
.
setStatus
(
"66"
);
}
else
{
search
.
setStatus
(
"3"
);
}
IPage
<
AdditionalDeductionDto
>
pageAs
=
xcglassozxfjkcmapper
.
selectAdditionalDeduction
(
page
,
search
);
List
<
AdditionalDeductionDto
>
listAs
=
pageAs
.
getRecords
();
...
...
@@ -3394,18 +3390,11 @@ public class SalaryManagementController {
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
search
.
setOrgcode
(
userBean
.
getOrgCode
());
if
((
"0"
).
equals
(
search
.
getStatus
()))
{
//全部
search
.
setStatus
(
""
);
}
else
if
((
"1"
).
equals
(
search
.
getStatus
()))
{
//在职
search
.
setStatus
(
"0"
);
}
else
{
search
.
setStatus
(
"3"
);
}
IPage
<
XcglAssoGsjsmxDto
>
pageAs
=
xcglassogsjsmxmapper
.
SelectIndividualincomedetails
(
page
,
search
);
List
<
XcglAssoGsjsmxDto
>
listAs
=
pageAs
.
getRecords
();
page
.
setTotal
(
xcglassogsjsmxmapper
.
listPageCount
(
search
));
List
<
XcglAssoGsjsmxDto
>
listAs
=
xcglassogsjsmxmapper
.
listPage
(
search
);
return
ResultUtil
.
data
(
page
As
,
listAs
,
"操作成功!"
);
return
ResultUtil
.
data
(
page
,
listAs
,
"操作成功!"
);
}
/**
...
...
@@ -3415,14 +3404,7 @@ public class SalaryManagementController {
@ApiOperation
(
value
=
"获取个税明细数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
IndividualIncomeDetailsAll
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SearchSalariedPeopleDto
search
)
{
search
.
setOrgcode
(
userBean
.
getOrgCode
());
if
((
"0"
).
equals
(
search
.
getStatus
()))
{
//全部
search
.
setStatus
(
""
);
}
else
if
((
"1"
).
equals
(
search
.
getStatus
()))
{
//在职
search
.
setStatus
(
"0"
);
}
else
{
search
.
setStatus
(
"3"
);
}
List
<
XcglAssoGsjsmxDto
>
listAs
=
xcglassogsjsmxmapper
.
SelectIndividualincomedetails
(
search
);
List
<
XcglAssoGsjsmxDto
>
listAs
=
xcglassogsjsmxmapper
.
SelectIndividualincomedetailsAll
(
search
);
return
ResultUtil
.
data
(
listAs
,
"操作成功!"
);
}
...
...
src/main/java/cn/timer/api/dao/xcgl/XcglAssoGsjsmxMapper.java
View file @
b8bbe0d9
...
...
@@ -17,9 +17,18 @@ import cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto;
*/
@Repository
public
interface
XcglAssoGsjsmxMapper
extends
BaseMapper
<
XcglAssoGsjsmx
>
{
List
<
XcglAssoGsjsmxDto
>
SelectIndividualincomedetails
(
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
IPage
<
XcglAssoGsjsmxDto
>
SelectIndividualincomedetails
(
IPage
<
XcglAssoGsjsmxDto
>
page
,
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
List
<
XcglAssoGsjsmxDto
>
SelectIndividualincomedetailsAll
(
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
/**
* 分页统计总数
* @return
*/
Integer
listPageCount
(
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
/**
* 分页数据
* @return
*/
List
<
XcglAssoGsjsmxDto
>
listPage
(
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
List
<
XcglAssoGsjsmx
>
Allyearround
(
String
year
,
String
usernum
,
Integer
qyid
);
...
...
src/main/java/cn/timer/api/dao/xcgl/XcglAssoJsgzzxMapper.java
View file @
b8bbe0d9
...
...
@@ -31,4 +31,13 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> {
List
<
XcglAssoJsgzzx
>
selectSalarySectionList
(
int
xzzid
);
List
<
XcglAssoJsgzzx
>
SalaryRuleGroupItem
(
int
xzzid
);
int
insertxcglassojsgzzxListTwo
(
List
<
XcglAssoJsgzzx
>
xcglassojsgzzx
);
/**
* 删除薪资档案值的同时删除已添加到薪资组(未锁定的组)中的薪资项
* @param xzdazdyid
* @return
*/
int
deleteByxzdazdyid
(
int
xzdazdyid
);
}
src/main/java/cn/timer/api/dao/xcgl/XcglAssoZxfjkcMapper.java
View file @
b8bbe0d9
...
...
@@ -23,7 +23,7 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> {
int
insertXcglAssoZxfjkc
(
XcglAssoZxfjkc
xcglassozxfjkc
);
List
<
AdditionalDeductionDto
>
selectAdditionalDeductiontwo
(
SearchSalariedPeopleDto
searchsalariedpeopledto
);
List
<
AdditionalDeductionDto
>
selectAdditionalDeductiontwo
(
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
int
updateXcglAssoZxfjkc
(
XcglAssoZxfjkc
xcglassozxfjkc
);
...
...
src/main/java/cn/timer/api/dto/xcgl/SearchSalariedPeopleDto.java
View file @
b8bbe0d9
package
cn
.
timer
.
api
.
dto
.
xcgl
;
import
java.io.Serializable
;
import
java.util.List
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -20,8 +21,8 @@ public class SearchSalariedPeopleDto extends Page {
private
static
final
long
serialVersionUID
=
6251994337286870380L
;
@ApiModelProperty
(
value
=
"员工状态
"
,
example
=
"员工状态
"
)
String
status
;
@ApiModelProperty
(
value
=
"员工状态
列表 "
,
example
=
"员工状态列表
"
)
List
<
Integer
>
status
;
@ApiModelProperty
(
value
=
"姓名/工号 "
,
example
=
"姓名/工号"
)
String
text
;
...
...
src/main/java/cn/timer/api/dto/yggl/YgQueryDto.java
View file @
b8bbe0d9
...
...
@@ -24,9 +24,9 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
YgQueryDto
extends
Page
implements
Serializable
{
public
class
YgQueryDto
extends
Page
{
private
static
final
long
serialVersionUID
=
-
1230023773946170942L
;
//
private static final long serialVersionUID = -1230023773946170942L;
@ApiModelProperty
(
value
=
"员工姓名"
,
example
=
"华仔"
)
private
String
empName
;
...
...
src/main/java/cn/timer/api/utils/Page.java
View file @
b8bbe0d9
...
...
@@ -41,7 +41,7 @@ public class Page {
this
.
totalPage
=
totalPage
;
}
public
Integer
getOffset
()
{
return
this
.
currentPage
>
0
?
(
this
.
currentPage
-
1
)
*
this
.
totalPage
:
0
;
return
this
.
getCurrentPage
()
>
0
?
(
this
.
getCurrentPage
()
-
1
)
*
this
.
getTotalPage
()
:
0
;
}
public
void
setOffset
(
Integer
offset
)
{
...
...
src/main/resources/mapping/xcgl/XcglAssoGsjsmxMapper.xml
View file @
b8bbe0d9
...
...
@@ -34,8 +34,8 @@
<resultMap
id=
"BaseXcglAssoGsjsmxDto"
type=
"cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto"
>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"
user
_num"
property=
"userNum"
/>
<result
column=
"
user
_name"
property=
"userName"
/>
<result
column=
"
emp
_num"
property=
"userNum"
/>
<result
column=
"
emp
_name"
property=
"userName"
/>
<result
column=
"salary_month"
property=
"salaryMonth"
/>
<result
column=
"tax_month"
property=
"taxMonth"
/>
<result
column=
"thmonth_personal"
property=
"thmonthPersonal"
/>
...
...
@@ -60,23 +60,63 @@
<result
column=
"cum_ybtse"
property=
"cumYbtse"
/>
<result
column=
"qyid"
property=
"qyid"
/>
</resultMap>
<select
id=
"SelectIndividualincomedetails"
resultMap=
"BaseXcglAssoGsjsmxDto"
>
select em.phone,
gs.*
from xcgl_asso_gsjsmx gs
LEFT JOIN yggl_main_emp as em on em.emp_num = gs.user_num and em.org_code = #{param.orgcode}
where gs.qyid = #{param.orgcode}
<if
test=
"param.datetime != ''"
>
<!-- 分页 -->
<select
id=
"listPageCount"
resultType=
"java.lang.Integer"
>
select count(*)
from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select
id=
"listPage"
resultMap=
"BaseXcglAssoGsjsmxDto"
>
select emp.phone, emp.emp_num, emp.name as emp_name, gs.*
from (select emp.phone, emp.emp_num, emp.name
from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
limit #{param.offset}, #{param.totalPage}) emp
LEFT JOIN xcgl_asso_gsjsmx gs on emp.emp_num = gs.user_num and gs.qyid = #{param.orgcode}
<if
test=
"param.datetime != ''"
>
and gs.salary_month = #{param.datetime}
</if>
<if
test=
"param.status != ''"
>
and em.job_status = #{param.status}
</if>
<if
test=
"param.text != ''"
>
and (em.`name` like CONCAT('%',#{param.text},'%') or em.emp_num = #{param.text})
</if>
</select>
<select
id=
"SelectIndividualincomedetailsAll"
resultMap=
"BaseXcglAssoGsjsmxDto"
>
select emp.phone, emp.emp_num, emp.name as emp_name,gs.*
from (select emp.phone, emp.emp_num, emp.name
from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
) emp
LEFT JOIN xcgl_asso_gsjsmx gs on emp.emp_num = gs.user_num and gs.qyid = #{param.orgcode}
<if
test=
"param.datetime != ''"
>
and gs.salary_month = #{param.datetime}
</if>
</select>
<select
id=
"Allyearround"
resultMap=
"BaseResultMap"
>
select * from xcgl_asso_gsjsmx gs
...
...
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
View file @
b8bbe0d9
...
...
@@ -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>
...
...
@@ -96,6 +97,12 @@
DELETE FROM xcgl_asso_jsgzzx
WHERE xzzid = #{xzzid}
</delete>
<!-- 删除薪资档案值的同时删除已添加到薪资组(未锁定的组)中的薪资项 -->
<delete
id=
"deleteByxzdazdyid"
>
delete jsgzzx from xcgl_asso_jsgzzx jsgzzx, xcgl_admin_xzz xxz
where jsgzzx.xzdazdyid = #{xzdazdyid} and xxz.is_xzsd = 0
and jsgzzx.xzzid = xxz.id
</delete>
<insert
id=
"insertxcglassojsgzzxList"
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)
...
...
@@ -151,6 +158,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"
>
...
...
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
View file @
b8bbe0d9
...
...
@@ -175,8 +175,11 @@
<select
id=
"selectFixedSalaryStaffCount"
resultType=
"java.lang.Long"
>
select COUNT(*) from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != ''"
>
and emp.job_status = #{param.status}
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
...
...
@@ -209,9 +212,12 @@
xzdaz.xzdadxid as xzdadxid
from (select * from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != ''"
>
and emp.job_status = #{param.status}
</if>
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
...
...
src/main/resources/mapping/xcgl/XcglAssoZxfjkcMapper.xml
View file @
b8bbe0d9
...
...
@@ -77,13 +77,12 @@
and zxfj.taxmonth = #{param.datetime}
</if>
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != '' and param.status != '66'"
>
and emp.job_status = #{param.status}
</if>
<if
test=
"param.status != '' and param.status == '66'"
>
and emp.job_status in (0,1)
</if>
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
...
...
@@ -103,16 +102,18 @@
zxfj.totalmoney as lj
from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num
<if
test=
"datetime != ''"
>
and zxfj.taxmonth = #{datetime}
</if>
where emp.org_code = #{orgcode}
<if
test=
"status != ''"
>
and emp.job_status = #{status}
<if
test=
"param.datetime != ''"
>
and zxfj.taxmonth = #{param.datetime}
</if>
<if
test=
"text != ''"
>
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != null and param.status.size() >0"
>
and emp.job_status in
<foreach
collection=
"param.status"
open=
"("
close=
")"
separator=
","
index=
"i"
item=
"item"
>
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</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