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
680c9f3a
Commit
680c9f3a
authored
Sep 25, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
提交 See merge request 8timerv2/8timerapiv200!503
parents
a6fc3d40
98386efe
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
217 additions
and
49 deletions
+217
-49
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+118
-47
src/main/java/cn/timer/api/dao/xcgl/XcglAssoZxfjkcMapper.java
+9
-1
src/main/java/cn/timer/api/dto/xcgl/AdditionalDeductionDto.java
+2
-0
src/main/java/cn/timer/api/dto/xcgl/SearchSalariedPeopleDto.java
+2
-1
src/main/java/cn/timer/api/dto/xcgl/SpecialDeductionDto.java
+55
-0
src/main/resources/mapping/xcgl/XcglAssoZxfjkcMapper.xml
+31
-0
No files found.
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
680c9f3a
...
...
@@ -13,6 +13,7 @@ import java.util.Map;
import
javax.annotation.Resource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -23,8 +24,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.timer.api.bean.kqgl.AttendanceGroup
;
import
cn.timer.api.bean.kqgl.AttendanceReport
;
import
cn.timer.api.bean.kqgl.AttendanceWeeklySch
;
...
...
@@ -48,6 +53,7 @@ import cn.timer.api.bean.xcgl.XcglAssoZxfjkc;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.validation.ValidList
;
import
cn.timer.api.dao.kqgl.AttendanceGroupMapper
;
import
cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper
;
import
cn.timer.api.dao.kqgl.PunchCardDetailsMapper
;
...
...
@@ -97,10 +103,12 @@ import cn.timer.api.dto.xcgl.SalaryGroupGroupingDto;
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.SpecialDeductionDto
;
import
cn.timer.api.dto.xcgl.SwitchSalaryDateDto
;
import
cn.timer.api.dto.xcgl.TjSalaryItemDot
;
import
cn.timer.api.dto.xcgl.XcglAssoOptionDto
;
import
cn.timer.api.dto.xcgl.YdMobilePacketDto
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.ResponseResult
;
import
cn.timer.api.utils.Result
;
...
...
@@ -1920,8 +1928,6 @@ public class SalaryManagementController {
/**
* 获取附加扣除数据
*/
// @GetMapping(value = "/obtainidedu")
// @ApiOperation(value = "获取附加扣除数据", httpMethod = "GET", notes = "接口发布说明")
@PostMapping
(
value
=
"/obtainidedu"
)
@ApiOperation
(
value
=
"获取附加扣除数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ObtainAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SearchSalariedPeopleDto
search
)
{
...
...
@@ -1935,55 +1941,35 @@ public class SalaryManagementController {
search
.
setStatus
(
"3"
);
}
List
<
AdditionalDeductionDto
>
fjkclist
=
xcglassozxfjkcmapper
.
selectAdditionalDeduction
(
search
);
List
<
AdditionalDeductionDto
>
fjkclist
=
xcglassozxfjkcmapper
.
selectAdditionalDeduction
two
(
search
);
return
new
ResponseResult
().
success
(
"获取附加扣除数据成功"
,
fjkclist
);
}
/**
* 查询列表-获取附加扣除数据-分页
*/
@PostMapping
(
value
=
"/select_leave_rules"
)
@ApiOperation
(
value
=
"获取附加扣除数据-分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
selectleaverules
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SearchSalariedPeopleDto
search
)
{
IPage
<
AdditionalDeductionDto
>
page
=
new
Page
<
AdditionalDeductionDto
>(
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
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
<
AdditionalDeductionDto
>
pageAs
=
xcglassozxfjkcmapper
.
selectAdditionalDeduction
(
page
,
search
);
List
<
AdditionalDeductionDto
>
listAs
=
pageAs
.
getRecords
();
return
ResultUtil
.
data
(
pageAs
,
listAs
,
"操作成功!"
);
}
// @PostMapping(value = "/programme")
// @ApiOperation(value = "获取附加扣除数据搜索/分页", httpMethod = "POST", notes = "接口发布说明")
// public Result<Object> programme(@CurrentUser UserBean userBean,@RequestBody AdditionalkcDto kcdto) {
//
// String n = kcdto.getName();
// int s = kcdto.getState();
// String d = kcdto.getDate();
//
//
// /*
// * Page<AdditionalDeductionDto> page = new Page<AdditionalDeductionDto>(
// * kcdto.getCurrentPage() == null ? 1 : kcdto.getCurrentPage(),
// * kcdto.getTotalPage() == null ? 10 : kcdto.getTotalPage());
// */
//
// PageHelper.startPage(kcdto.getCurrentPage() == null ? 1 : kcdto.getCurrentPage(), kcdto.getTotalPage() == null ? 10 : kcdto.getTotalPage());
//
//
// //List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeduction(userBean.getOrgCode());
//
// Page<AdditionalDeductionDto> fjkcpage = xcglassozxfjkcmapper.selectAdditionalDeduction(userBean.getOrgCode());
//
// List<AdditionalDeductionDto> fjkclist = fjkcpage.getRecords();
//
// fjkcpage.getCurrent();
// fjkcpage.getPages();
// fjkcpage.getTotal();
// fjkcpage.getSize();
//
//
//// QueryWrapper<SbgjjAssoCbfa> queryWrapper = new QueryWrapper<>();
//// queryWrapper.eq("qyid",userBean.getOrgCode()).and(!StrUtil.hasBlank(c), wq -> wq.likeRight("cbcs", c));
////
//// IPage<SbgjjAssoCbfa> sbgjjassocbfaPage = SbgjjAssoCbfa.builder().build().selectPage(page, queryWrapper);
////
//// IPage<AdditionalDeductionDto> sbgjjassocbfaPage =
//// List<SbgjjAssoCbfa> sbgjjassocbfaEmps = sbgjjassocbfaPage.getRecords();
//// sbgjjassocbfaPage.getCurrent();
//// sbgjjassocbfaPage.getPages();
//// sbgjjassocbfaPage.getTotal();
//// sbgjjassocbfaPage.getSize();
//
// return ResultUtil.data2(fjkcpage, fjkclist, "方案搜索成功");
// }
/**
...
...
@@ -2197,6 +2183,91 @@ public class SalaryManagementController {
return
new
ResponseResult
().
success
(
"成功"
,
gztz
);
}
/**
* 导入专项附加扣除
*/
@PostMapping
(
value
=
"/import_special_additional_deduction"
)
@ApiOperation
(
value
=
"导入专项附加扣除"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
JSONObject
>
importSpecialAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
SpecialDeductionDto
>
specialdeductiondto
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
for
(
SpecialDeductionDto
spec
:
specialdeductiondto
)
{
String
name
=
spec
.
getName
();
String
phone
=
spec
.
getPhone
();
String
date
=
spec
.
getDate
();
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
XcglAssoZxfjkc
xcg
=
XcglAssoZxfjkc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoZxfjkc
>().
lambda
().
eq
(
XcglAssoZxfjkc:
:
getTaxmonth
,
date
)
.
eq
(
XcglAssoZxfjkc:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoZxfjkc:
:
getUserid
,
ygl
.
getEmpNum
()));
if
(
xcg
==
null
)
{
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
}
else
{
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setId
(
xcg
.
getId
());
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
fjkc
.
setTotalmoney
(
Double
.
valueOf
(
result
));
//累计专项附加扣除
xcglassozxfjkcmapper
.
updateXcglAssoZxfjkc
(
fjkc
);
}
}
return
ResultUtil
.
success
(
"成功"
);
}
/****************************************************************************/
/****************************************************************************/
...
...
src/main/java/cn/timer/api/dao/xcgl/XcglAssoZxfjkcMapper.java
View file @
680c9f3a
package
cn
.
timer
.
api
.
dao
.
xcgl
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
cn.timer.api.bean.xcgl.XcglAssoZxfjkc
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.dto.xcgl.AdditionalDeductionDto
;
import
cn.timer.api.dto.xcgl.SearchSalariedPeopleDto
;
...
...
@@ -19,7 +23,11 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> {
int
insertXcglAssoZxfjkc
(
XcglAssoZxfjkc
xcglassozxfjkc
);
List
<
AdditionalDeductionDto
>
selectAdditionalDeduction
(
SearchSalariedPeopleDto
searchsalariedpeopledto
);
List
<
AdditionalDeductionDto
>
selectAdditionalDeduction
two
(
SearchSalariedPeopleDto
searchsalariedpeopledto
);
int
updateXcglAssoZxfjkc
(
XcglAssoZxfjkc
xcglassozxfjkc
);
IPage
<
AdditionalDeductionDto
>
selectAdditionalDeduction
(
IPage
<
AdditionalDeductionDto
>
page
,
@Param
(
"param"
)
SearchSalariedPeopleDto
searchsalariedpeopledto
);
}
src/main/java/cn/timer/api/dto/xcgl/AdditionalDeductionDto.java
View file @
680c9f3a
...
...
@@ -15,7 +15,9 @@ public class AdditionalDeductionDto implements Serializable {
*/
private
static
final
long
serialVersionUID
=
-
3829908201010471272L
;
int
zxfjid
;
String
date
;
String
name
;
String
phone
;
String
empNum
;
int
zljy
;
int
zfdk
;
...
...
src/main/java/cn/timer/api/dto/xcgl/SearchSalariedPeopleDto.java
View file @
680c9f3a
...
...
@@ -2,6 +2,7 @@ package cn.timer.api.dto.xcgl;
import
java.io.Serializable
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
@@ -15,7 +16,7 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SearchSalariedPeopleDto
implements
Serializabl
e
{
public
class
SearchSalariedPeopleDto
extends
Pag
e
{
private
static
final
long
serialVersionUID
=
6251994337286870380L
;
...
...
src/main/java/cn/timer/api/dto/xcgl/SpecialDeductionDto.java
0 → 100644
View file @
680c9f3a
package
cn
.
timer
.
api
.
dto
.
xcgl
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SpecialDeductionDto
extends
Page
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"时间"
,
example
=
"1"
)
private
String
date
;
// @JSONField(format="yyyy-MM")
// @ApiModelProperty(value="时间 ",example="时间")
// private Date date;
@ApiModelProperty
(
value
=
"姓名"
,
example
=
"1"
)
private
String
name
;
@ApiModelProperty
(
value
=
"电话号码"
,
example
=
"1"
)
private
String
phone
;
@ApiModelProperty
(
value
=
"子女教育"
,
example
=
"1"
)
private
String
zljy
;
@ApiModelProperty
(
value
=
"住房贷款利息"
,
example
=
"1"
)
private
String
zfdk
;
@ApiModelProperty
(
value
=
"住房租金"
,
example
=
"86"
)
private
String
zfzj
;
@ApiModelProperty
(
value
=
"赡养老人"
,
example
=
"赡养老人"
)
private
String
sylr
;
@ApiModelProperty
(
value
=
"继续教育"
,
example
=
"A"
)
private
String
jxjy
;
@ApiModelProperty
(
value
=
"累计专项附加扣除"
,
example
=
"A"
)
private
String
lj
;
}
src/main/resources/mapping/xcgl/XcglAssoZxfjkcMapper.xml
View file @
680c9f3a
...
...
@@ -19,7 +19,9 @@
<resultMap
id=
"AdditionalDeductionMap"
type=
"cn.timer.api.dto.xcgl.AdditionalDeductionDto"
>
<result
column=
"zxfjid"
property=
"zxfjid"
/>
<result
column=
"date"
property=
"date"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"empNum"
property=
"empNum"
/>
<result
column=
"zljy"
property=
"zljy"
/>
<result
column=
"zfdk"
property=
"zfdk"
/>
...
...
@@ -60,7 +62,36 @@
<select
id=
"selectAdditionalDeduction"
resultMap=
"AdditionalDeductionMap"
>
select emp.`name` as name,
emp.emp_num as empNum,
emp.phone,
zxfj.id as zxfjid,
zxfj.taxmonth as date,
zxfj.childrenedu as zljy,
zxfj.houseloans as zfdk,
zxfj.houserents as zfzj,
zxfj.supportolder as sylr,
zxfj.continueedu as jxjy,
zxfj.totalmoney as lj
from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num
<if
test=
"param.datetime != ''"
>
and zxfj.taxmonth = #{param.datetime}
</if>
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != ''"
>
and emp.job_status = #{param.status}
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select
id=
"selectAdditionalDeductiontwo"
resultMap=
"AdditionalDeductionMap"
>
select emp.`name` as name,
emp.emp_num as empNum,
emp.phone,
zxfj.id as zxfjid,
zxfj.taxmonth as date,
zxfj.childrenedu as zljy,
zxfj.houseloans as zfdk,
zxfj.houserents as zfzj,
...
...
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