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
815aa215
Commit
815aa215
authored
Oct 16, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
2cd47022
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
153 additions
and
126 deletions
+153
-126
src/main/java/cn/timer/api/bean/xcgl/XcglAdminXzz.java
+2
-1
src/main/java/cn/timer/api/bean/xcgl/XcglAssoJsgzzx.java
+4
-0
src/main/java/cn/timer/api/bean/xcgl/XcglAssoXcjsgz.java
+4
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+109
-62
src/main/java/cn/timer/api/dao/xcgl/XcglAssoXzbMapper.java
+1
-1
src/main/java/cn/timer/api/dto/xcgl/ModifysalaryruleDto.java
+19
-0
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
+1
-1
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
+11
-59
src/main/resources/mapping/xcgl/XcglAssoXcjsgzMapper.xml
+1
-0
src/main/resources/mapping/xcgl/XcglAssoXzbMapper.xml
+1
-2
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAdminXzz.java
View file @
815aa215
...
@@ -75,7 +75,7 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
...
@@ -75,7 +75,7 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
private
String
monthtime
;
private
String
monthtime
;
@ApiModelProperty
(
value
=
"算薪月份"
,
example
=
"2019-12"
)
@ApiModelProperty
(
value
=
"算薪月份"
,
example
=
"2019-12"
)
private
String
salarymonth
;
private
String
xzyf
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/xcgl/XcglAssoJsgzzx.java
View file @
815aa215
...
@@ -78,4 +78,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
...
@@ -78,4 +78,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty
(
value
=
"薪资选项id"
,
example
=
"薪资选项id"
)
@ApiModelProperty
(
value
=
"薪资选项id"
,
example
=
"薪资选项id"
)
private
Integer
optionid
;
private
Integer
optionid
;
@ApiModelProperty
(
value
=
"是否自定义项(0:否;1:是)"
,
example
=
"0"
)
private
Integer
isCustom
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/xcgl/XcglAssoXcjsgz.java
View file @
815aa215
...
@@ -54,4 +54,7 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> {
...
@@ -54,4 +54,7 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> {
@ApiModelProperty
(
value
=
"类型(1:迟到早退扣款;2:事假扣款;3:病假扣款;4:入离职缺勤扣款;5:司龄;6:旷工扣款;7:加班费;8:司龄工资;9:应出勤天数;10:入离职缺勤天数;11:应发工资;12:个税;13:实发工资)"
)
@ApiModelProperty
(
value
=
"类型(1:迟到早退扣款;2:事假扣款;3:病假扣款;4:入离职缺勤扣款;5:司龄;6:旷工扣款;7:加班费;8:司龄工资;9:应出勤天数;10:入离职缺勤天数;11:应发工资;12:个税;13:实发工资)"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
value
=
""
,
example
=
""
)
private
Integer
optionid
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
815aa215
...
@@ -92,7 +92,6 @@ import cn.timer.api.dto.xcgl.CalculationOptionsDto;
...
@@ -92,7 +92,6 @@ import cn.timer.api.dto.xcgl.CalculationOptionsDto;
import
cn.timer.api.dto.xcgl.ChangeSalaryDto
;
import
cn.timer.api.dto.xcgl.ChangeSalaryDto
;
import
cn.timer.api.dto.xcgl.CheckSalaryStaffDto
;
import
cn.timer.api.dto.xcgl.CheckSalaryStaffDto
;
import
cn.timer.api.dto.xcgl.CjPayrollGroupDto
;
import
cn.timer.api.dto.xcgl.CjPayrollGroupDto
;
import
cn.timer.api.dto.xcgl.ComputeUserDto
;
import
cn.timer.api.dto.xcgl.CustomDto
;
import
cn.timer.api.dto.xcgl.CustomDto
;
import
cn.timer.api.dto.xcgl.FixedSalaryStaffDto
;
import
cn.timer.api.dto.xcgl.FixedSalaryStaffDto
;
import
cn.timer.api.dto.xcgl.FixedsalaryDto
;
import
cn.timer.api.dto.xcgl.FixedsalaryDto
;
...
@@ -101,6 +100,7 @@ import cn.timer.api.dto.xcgl.ImportSalaryDto;
...
@@ -101,6 +100,7 @@ import cn.timer.api.dto.xcgl.ImportSalaryDto;
import
cn.timer.api.dto.xcgl.ImportSalarySetDto
;
import
cn.timer.api.dto.xcgl.ImportSalarySetDto
;
import
cn.timer.api.dto.xcgl.IndividualTaxDetailsDto
;
import
cn.timer.api.dto.xcgl.IndividualTaxDetailsDto
;
import
cn.timer.api.dto.xcgl.ModifyPayslipDto
;
import
cn.timer.api.dto.xcgl.ModifyPayslipDto
;
import
cn.timer.api.dto.xcgl.ModifysalaryruleDto
;
import
cn.timer.api.dto.xcgl.PayCustomDto
;
import
cn.timer.api.dto.xcgl.PayCustomDto
;
import
cn.timer.api.dto.xcgl.PayCustomZDYDto
;
import
cn.timer.api.dto.xcgl.PayCustomZDYDto
;
import
cn.timer.api.dto.xcgl.PayGroupedDataDto
;
import
cn.timer.api.dto.xcgl.PayGroupedDataDto
;
...
@@ -113,7 +113,6 @@ import cn.timer.api.dto.xcgl.SalaryCustomizationDto;
...
@@ -113,7 +113,6 @@ import cn.timer.api.dto.xcgl.SalaryCustomizationDto;
import
cn.timer.api.dto.xcgl.SalaryFieldDto
;
import
cn.timer.api.dto.xcgl.SalaryFieldDto
;
import
cn.timer.api.dto.xcgl.SalaryGroupGroupingDto
;
import
cn.timer.api.dto.xcgl.SalaryGroupGroupingDto
;
import
cn.timer.api.dto.xcgl.SalaryItemRulesDto
;
import
cn.timer.api.dto.xcgl.SalaryItemRulesDto
;
import
cn.timer.api.dto.xcgl.SalaryPersonFieldDto
;
import
cn.timer.api.dto.xcgl.SearchSalariedPeopleDto
;
import
cn.timer.api.dto.xcgl.SearchSalariedPeopleDto
;
import
cn.timer.api.dto.xcgl.SpecialDeductionDto
;
import
cn.timer.api.dto.xcgl.SpecialDeductionDto
;
import
cn.timer.api.dto.xcgl.TjSalaryItemDot
;
import
cn.timer.api.dto.xcgl.TjSalaryItemDot
;
...
@@ -308,7 +307,7 @@ public class SalaryManagementController {
...
@@ -308,7 +307,7 @@ public class SalaryManagementController {
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setMonthtime
(
paygro
.
getXzyf
());
//薪资月份
xcglxzz
.
setMonthtime
(
paygro
.
getXzyf
());
//薪资月份
xcglxzz
.
set
Salarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//开始);//算薪月份
xcglxzz
.
set
Xzyf
(
payrollcycle
.
substring
(
0
,
7
));
//开始);//算薪月份
xcgladminxzzmapper
.
insert
(
xcglxzz
);
xcgladminxzzmapper
.
insert
(
xcglxzz
);
int
payid
=
xcglxzz
.
getId
();
int
payid
=
xcglxzz
.
getId
();
...
@@ -650,6 +649,34 @@ public class SalaryManagementController {
...
@@ -650,6 +649,34 @@ public class SalaryManagementController {
}
}
/**
/**
* @param userBean
* @param modifysalaryruledto
* @return
*/
@PostMapping
(
value
=
"/modifysalaryrule"
)
@ApiOperation
(
value
=
"修改薪资规则"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
Modifysalaryrule
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ModifysalaryruleDto
modifysalaryruledto
)
{
return
XcglAssoJsgzzx
.
builder
().
gsid
(
modifysalaryruledto
.
getXcjsgzid
()).
gsgs
(
modifysalaryruledto
.
getFormula
()).
id
(
modifysalaryruledto
.
getJsgzzxid
()).
build
().
updateById
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
}
/**
* @param userBean
* @param id 薪资选项id
* @return
*/
@GetMapping
(
value
=
"/popupsalaryrule/{id}"
)
@ApiOperation
(
value
=
"弹出薪资规则"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
Popupsalaryrule
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"id"
)
Integer
id
)
{
List
<
XcglAssoXcjsgz
>
gzgs
=
XcglAssoXcjsgz
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoXcjsgz
>().
lambda
().
eq
(
XcglAssoXcjsgz:
:
getOptionid
,
id
));
return
ResultUtil
.
data
(
gzgs
,
"操作成功!"
);
}
/**
* 删除薪资组 ***********
* 删除薪资组 ***********
*/
*/
@DeleteMapping
(
value
=
"/paydelete/{id}"
)
@DeleteMapping
(
value
=
"/paydelete/{id}"
)
...
@@ -725,7 +752,7 @@ public class SalaryManagementController {
...
@@ -725,7 +752,7 @@ public class SalaryManagementController {
xcglxzz
.
setPxfs
(
paygro
.
getPxfs
());
// 选择配薪方式(0:空白模板;df:默认)
xcglxzz
.
setPxfs
(
paygro
.
getPxfs
());
// 选择配薪方式(0:空白模板;df:默认)
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setId
(
paygro
.
getId
());
xcglxzz
.
setId
(
paygro
.
getId
());
xcglxzz
.
set
Salarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcglxzz
.
set
Xzyf
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcglxzz
.
updateById
();
xcglxzz
.
updateById
();
int
payid
=
paygro
.
getId
();
int
payid
=
paygro
.
getId
();
xcglassoxzurymapper
.
xzurydelete
(
payid
);
xcglassoxzurymapper
.
xzurydelete
(
payid
);
...
@@ -1190,6 +1217,7 @@ public class SalaryManagementController {
...
@@ -1190,6 +1217,7 @@ public class SalaryManagementController {
zzx
.
setRemarks
(
payc
.
getRemarks
());
//备注
zzx
.
setRemarks
(
payc
.
getRemarks
());
//备注
zzx
.
setXzzid
(
payc
.
getGid
());
//
zzx
.
setXzzid
(
payc
.
getGid
());
//
zzx
.
setOptionid
(
0
);
zzx
.
setOptionid
(
0
);
zzx
.
setIsCustom
(
1
);
//是否自定义项(0:否;1:是)
xcglassojsgzzxmapper
.
jsgzzxinsert
(
zzx
);
xcglassojsgzzxmapper
.
jsgzzxinsert
(
zzx
);
return
new
ResponseResult
().
success
(
"创建薪资组成功"
,
zzx
);
return
new
ResponseResult
().
success
(
"创建薪资组成功"
,
zzx
);
}
}
...
@@ -1227,21 +1255,87 @@ public class SalaryManagementController {
...
@@ -1227,21 +1255,87 @@ public class SalaryManagementController {
/*******计算薪资*********/
/*******计算薪资*********/
/**
* 每月手动导入所需导出的表头数据
*/
@GetMapping
(
value
=
"/monthly_manual_import/{id}"
)
@ApiOperation
(
value
=
"每月手动导入所需导出的表头数据"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
MonthlyManualImport
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
//rulestate:规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
List
<
XcglAssoJsgzzx
>
jsgzzx
=
XcglAssoJsgzzx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoJsgzzx
>().
lambda
().
eq
(
XcglAssoJsgzzx:
:
getXzzid
,
id
)
.
eq
(
XcglAssoJsgzzx:
:
getRulestate
,
4
));
return
ResultUtil
.
data
(
jsgzzx
);
}
/**
* 导入浮动数据薪资
*/
@PostMapping
(
value
=
"/payimport"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
// XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, impor.getGid()).one();
//用户工号来匹配入库
//XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, orgCode).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, impor.getUsernum()).one();
//用户名称来匹配入库
//XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),impor.getUsername(),String.valueOf(orgCode));
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
if
(
ims
.
length
>
0
){
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++){
//用户工号来匹配入库
XcglAssoXzury
xzuryone
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoXzury:
:
getXzzid
,
impor
.
getGid
()).
eq
(
XcglAssoXzury:
:
getUserid
,
ims
[
p
].
getUsernum
()).
one
();
//用户名称来匹配入库
XcglAssoXzury
yhmpp
=
xcglassoxzurymapper
.
selectImportedSalary
(
impor
.
getGid
(),
ims
[
p
].
getUsername
(),
String
.
valueOf
(
userBean
.
getOrgCode
()));
int
k
=
0
;
if
(
xzuryone
!=
null
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
xzuryone
.
getUserid
());
//
xzb
.
setXzyf
(
impor
.
getSxrq
());
//
xzb
.
setXzxid
(
ims
[
p
].
getJsgzzx
());
//
xzb
.
setXzxjg
(
String
.
valueOf
(
ims
[
p
].
getSrz
()));
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
k
++;
}
if
(
yhmpp
!=
null
&&
k
==
0
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
yhmpp
.
getUserid
());
//
xzb
.
setXzyf
(
impor
.
getSxrq
());
//
xzb
.
setXzxid
(
ims
[
p
].
getJsgzzx
());
//
xzb
.
setXzxjg
(
String
.
valueOf
(
ims
[
p
].
getSrz
()));
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
}
}
}
return
new
ResponseResult
().
success
(
"考勤数据同步成功"
);
}
/**
/**
* 查看薪资
* 查看薪资
*/
*/
@GetMapping
(
value
=
"/checksalary/{id}
/{sxrq}
"
)
@GetMapping
(
value
=
"/checksalary/{id}"
)
@ApiOperation
(
value
=
"查看薪资"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"查看薪资"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
ResponseResult
CheckSalary
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@PathVariable
String
sxrq
)
{
public
ResponseResult
CheckSalary
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@PathVariable
String
sxrq
)
{
//计算完成 返回数据
//计算完成 返回数据
List
<
CalculationDto
>
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
sxrq
,
userBean
.
getOrgCode
());
List
<
CalculationDto
>
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
userBean
.
getOrgCode
());
return
new
ResponseResult
().
success
(
"查看薪资成功"
,
jswsj
);
return
new
ResponseResult
().
success
(
"查看薪资成功"
,
jswsj
);
}
}
/**
/**
* 获取计薪规则组项
* 获取计薪规则组项
*/
*/
@GetMapping
(
value
=
"/payrulegroupitem/{id}
/{sxrq}
"
)
@GetMapping
(
value
=
"/payrulegroupitem/{id}"
)
@ApiOperation
(
value
=
"获取计薪规则组项"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"获取计薪规则组项"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
ResponseResult
Payrulegroupitem
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@PathVariable
String
sxrq
)
{
public
ResponseResult
Payrulegroupitem
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@PathVariable
String
sxrq
)
{
SalaryFieldDto
salfie
=
new
SalaryFieldDto
();
SalaryFieldDto
salfie
=
new
SalaryFieldDto
();
...
@@ -1275,7 +1369,7 @@ public class SalaryManagementController {
...
@@ -1275,7 +1369,7 @@ public class SalaryManagementController {
// salfie.setComuser(usfil);
// salfie.setComuser(usfil);
// }
// }
List
<
CalculationDto
>
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
sxrq
,
userBean
.
getOrgCode
());
List
<
CalculationDto
>
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
userBean
.
getOrgCode
());
salfie
.
setComuser
(
jswsj
);
salfie
.
setComuser
(
jswsj
);
return
new
ResponseResult
().
success
(
"获取计薪规则组项成功"
,
salfie
);
return
new
ResponseResult
().
success
(
"获取计薪规则组项成功"
,
salfie
);
...
@@ -1307,7 +1401,7 @@ public class SalaryManagementController {
...
@@ -1307,7 +1401,7 @@ public class SalaryManagementController {
//薪资组信息
//薪资组信息
@SuppressWarnings
(
"unused"
)
@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
.
get
Salarymonth
();
sxrq
=
xzz
.
get
Xzyf
();
//当前薪资组内人员
//当前薪资组内人员
List
<
XcglAssoXzury
>
znrys
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getXzzid
,
id
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
()).
list
();
List
<
XcglAssoXzury
>
znrys
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getXzzid
,
id
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
()).
list
();
List
<
CalculationDto
>
jswsj
=
null
;
List
<
CalculationDto
>
jswsj
=
null
;
...
@@ -1472,7 +1566,7 @@ public class SalaryManagementController {
...
@@ -1472,7 +1566,7 @@ public class SalaryManagementController {
}
}
//计算完成 返回数据
//计算完成 返回数据
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
sxrq
,
userBean
.
getOrgCode
());
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
userBean
.
getOrgCode
());
return
new
ResponseResult
().
success
(
"计算完成"
,
jswsj
);
return
new
ResponseResult
().
success
(
"计算完成"
,
jswsj
);
}
else
{
//该组无人
}
else
{
//该组无人
...
@@ -1517,6 +1611,7 @@ public class SalaryManagementController {
...
@@ -1517,6 +1611,7 @@ public class SalaryManagementController {
//#2、考勤数据
//#2、考勤数据
//#3、套公式算结果
//#3、套公式算结果
//#4、数据写入薪资表
//#4、数据写入薪资表
...
@@ -1524,6 +1619,8 @@ public class SalaryManagementController {
...
@@ -1524,6 +1619,8 @@ public class SalaryManagementController {
return
ResultUtil
.
data
(
null
,
"计算完成"
);
return
ResultUtil
.
data
(
null
,
"计算完成"
);
}
}
/**
/**
* 新增/修改--报税周期信息
* 新增/修改--报税周期信息
*/
*/
...
@@ -1595,7 +1692,7 @@ public class SalaryManagementController {
...
@@ -1595,7 +1692,7 @@ public class SalaryManagementController {
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setMonthtime
(
budpaygr
.
getXzyf
());
//薪资月份
xcglxzz
.
setMonthtime
(
budpaygr
.
getXzyf
());
//薪资月份
xcglxzz
.
set
Salarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcglxzz
.
set
Xzyf
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcgladminxzzmapper
.
insert
(
xcglxzz
);
xcgladminxzzmapper
.
insert
(
xcglxzz
);
int
payid
=
xcglxzz
.
getId
();
int
payid
=
xcglxzz
.
getId
();
...
@@ -1779,7 +1876,7 @@ public class SalaryManagementController {
...
@@ -1779,7 +1876,7 @@ public class SalaryManagementController {
}
}
//计算完成 返回数据
//计算完成 返回数据
List
<
CalculationDto
>
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
sxrq
,
userBean
.
getOrgCode
());
List
<
CalculationDto
>
jswsj
=
xcglassoxzbmapper
.
CalculationResults
(
id
,
userBean
.
getOrgCode
());
return
new
ResponseResult
().
success
(
"考勤数据同步成功"
,
jswsj
);
return
new
ResponseResult
().
success
(
"考勤数据同步成功"
,
jswsj
);
...
@@ -2019,56 +2116,6 @@ public class SalaryManagementController {
...
@@ -2019,56 +2116,6 @@ public class SalaryManagementController {
}
}
/**
* 导入薪资
*/
@PostMapping
(
value
=
"/payimport"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
// XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, impor.getGid()).one();
//用户工号来匹配入库
//XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, orgCode).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, impor.getUsernum()).one();
//用户名称来匹配入库
//XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),impor.getUsername(),String.valueOf(orgCode));
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
if
(
ims
.
length
>
0
){
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++){
//用户工号来匹配入库
XcglAssoXzury
xzuryone
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoXzury:
:
getXzzid
,
impor
.
getGid
()).
eq
(
XcglAssoXzury:
:
getUserid
,
ims
[
p
].
getUsernum
()).
one
();
//用户名称来匹配入库
XcglAssoXzury
yhmpp
=
xcglassoxzurymapper
.
selectImportedSalary
(
impor
.
getGid
(),
ims
[
p
].
getUsername
(),
String
.
valueOf
(
userBean
.
getOrgCode
()));
int
k
=
0
;
if
(
xzuryone
!=
null
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
xzuryone
.
getUserid
());
//
xzb
.
setXzyf
(
impor
.
getSxrq
());
//
xzb
.
setXzxid
(
ims
[
p
].
getJsgzzx
());
//
xzb
.
setXzxjg
(
String
.
valueOf
(
ims
[
p
].
getSrz
()));
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
k
++;
}
if
(
yhmpp
!=
null
&&
k
==
0
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
yhmpp
.
getUserid
());
//
xzb
.
setXzyf
(
impor
.
getSxrq
());
//
xzb
.
setXzxid
(
ims
[
p
].
getJsgzzx
());
//
xzb
.
setXzxjg
(
String
.
valueOf
(
ims
[
p
].
getSrz
()));
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
}
}
}
return
new
ResponseResult
().
success
(
"考勤数据同步成功"
);
}
/**
/**
* 切换薪资日期
* 切换薪资日期
*/
*/
...
...
src/main/java/cn/timer/api/dao/xcgl/XcglAssoXzbMapper.java
View file @
815aa215
...
@@ -20,7 +20,7 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
...
@@ -20,7 +20,7 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
int
deleteByuserid
(
int
userid
,
int
xzzid
,
String
xzyf
);
int
deleteByuserid
(
int
userid
,
int
xzzid
,
String
xzyf
);
List
<
CalculationDto
>
CalculationResults
(
int
xzzid
,
String
xzyf
,
int
orgcode
);
List
<
CalculationDto
>
CalculationResults
(
int
xzzid
,
int
orgcode
);
int
deleteByAttendance
(
int
userid
,
int
xzzid
,
String
xzyf
);
int
deleteByAttendance
(
int
userid
,
int
xzzid
,
String
xzyf
);
...
...
src/main/java/cn/timer/api/dto/xcgl/ModifysalaryruleDto.java
0 → 100644
View file @
815aa215
package
cn
.
timer
.
api
.
dto
.
xcgl
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ModifysalaryruleDto
{
private
Integer
jsgzzxid
;
// 计薪规则组项id
private
Integer
xcjsgzid
;
// 薪酬计算规则公式id
private
String
formula
;
// 公式
}
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
View file @
815aa215
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"pxfs"
property=
"pxfs"
/>
<result
column=
"pxfs"
property=
"pxfs"
/>
<result
column=
"monthtime"
property=
"monthtime"
/>
<result
column=
"monthtime"
property=
"monthtime"
/>
<result
column=
"
salarymonth"
property=
"salarymonth
"
/>
<result
column=
"
xzyf"
property=
"xzyf
"
/>
</resultMap>
</resultMap>
<resultMap
id=
"PayrollExceptionDtoMap"
type=
"cn.timer.api.dto.xcgl.PayrollExceptionDto"
>
<resultMap
id=
"PayrollExceptionDtoMap"
type=
"cn.timer.api.dto.xcgl.PayrollExceptionDto"
>
...
...
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
View file @
815aa215
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<result
column=
"xzzid"
property=
"xzzid"
/>
<result
column=
"xzzid"
property=
"xzzid"
/>
<result
column=
"rulestate"
property=
"rulestate"
/>
<result
column=
"rulestate"
property=
"rulestate"
/>
<result
column=
"optionid"
property=
"optionid"
/>
<result
column=
"optionid"
property=
"optionid"
/>
<result
column=
"is_custom"
property=
"isCustom"
/>
</resultMap>
</resultMap>
...
@@ -40,40 +41,6 @@
...
@@ -40,40 +41,6 @@
<result
column=
"rsz"
property=
"rsz"
/>
<result
column=
"rsz"
property=
"rsz"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
salaryitem,
yhmbzd,
rule,
type,
addtime,
adduserid,
jxgzid,
remarks,
gsid,
gsgs,
xzzid,
rulestate,
optionid
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id XcglAssoJsgzzx_id,
salaryitem XcglAssoJsgzzx_salaryitem,
yhmbzd XcglAssoJsgzzx_yhmbzd,
rule XcglAssoJsgzzx_rule,
type XcglAssoJsgzzx_type,
addtime XcglAssoJsgzzx_addtime,
adduserid XcglAssoJsgzzx_adduserid,
jxgzid XcglAssoJsgzzx_jxgzid,
remarks XcglAssoJsgzzx_remarks,
gsid XcglAssoJsgzzx_gsid,
gsgs XcglAssoJsgzzx_gsgs,
xzzid XcglAssoJsgzzx_xzzid,
rulestate XcglAssoJsgzzx_rulestate,
optionid XcglAssoJsgzzx_optionid
</sql>
<select
id=
"selectSalarySectionList"
resultMap=
"BaseResultMap"
>
<select
id=
"selectSalarySectionList"
resultMap=
"BaseResultMap"
>
select jsgzzx.* from xcgl_asso_jsgzzx jsgzzx
select jsgzzx.* from xcgl_asso_jsgzzx jsgzzx
LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid
LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid
...
@@ -203,7 +170,10 @@
...
@@ -203,7 +170,10 @@
rulestate,
rulestate,
</if>
</if>
<if
test =
'null != optionid'
>
<if
test =
'null != optionid'
>
optionid
optionid,
</if>
<if
test =
'null != isCustom'
>
is_custom
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
@@ -244,7 +214,10 @@
...
@@ -244,7 +214,10 @@
#{rulestate},
#{rulestate},
</if>
</if>
<if
test =
'null != optionid'
>
<if
test =
'null != optionid'
>
#{optionid}
#{optionid},
</if>
<if
test =
'null != isCustom'
>
#{isCustom}
</if>
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -264,32 +237,12 @@
...
@@ -264,32 +237,12 @@
<if
test =
'null != gsgs'
>
gsgs = #{gsgs},
</if>
<if
test =
'null != gsgs'
>
gsgs = #{gsgs},
</if>
<if
test =
'null != xzzid'
>
xzzid = #{xzzid},
</if>
<if
test =
'null != xzzid'
>
xzzid = #{xzzid},
</if>
<if
test =
'null != rulestate'
>
rulestate = #{rulestate},
</if>
<if
test =
'null != rulestate'
>
rulestate = #{rulestate},
</if>
<if
test =
'null != optionid'
>
optionid = #{optionid}
</if>
<if
test =
'null != optionid'
>
optionid = #{optionid},
</if>
<if
test =
'null != optionid'
>
is_custom = #{isCustom}
</if>
</set>
</set>
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</delete>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_jsgzzx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_jsgzzx
</select> -->
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoXcjsgzMapper.xml
View file @
815aa215
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<result
column=
"dygk"
property=
"dygk"
/>
<result
column=
"dygk"
property=
"dygk"
/>
<result
column=
"degk"
property=
"degk"
/>
<result
column=
"degk"
property=
"degk"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"optionid"
property=
"optionid"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapping/xcgl/XcglAssoXzbMapper.xml
View file @
815aa215
...
@@ -74,8 +74,7 @@
...
@@ -74,8 +74,7 @@
left join zzgl_bmgw_m um on um.id = m.up_id
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id
) as bmgw on bmgw.mid = emp.bmgw_id
where emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid})
where emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid})
and xzbs.xzyf = #{xzyf} or xzbs.xzyf = ''
and xzbs.xzyf = (select xzz.xzyf from xcgl_admin_xzz xzz where xzz.id = #{xzzid})
and emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid})
) as aa
) as aa
where aa.orgcode = #{orgcode}
where aa.orgcode = #{orgcode}
</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