Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
aa3726a0
Commit
aa3726a0
authored
Aug 22, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专项扣除
parent
1116cc31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
9 deletions
+23
-9
TSpecialDeducationSum.java
...oud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
+2
-2
TSalaryConfigStandardController.java
...fu/salary/controller/TSalaryConfigStandardController.java
+12
-0
TSpecialDeducationSumController.java
...fu/salary/controller/TSpecialDeducationSumController.java
+6
-6
TSpecialDeducationSumServiceImpl.java
...salary/service/impl/TSpecialDeducationSumServiceImpl.java
+3
-1
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
View file @
aa3726a0
...
@@ -81,14 +81,14 @@ public class TSpecialDeducationSum extends BaseEntity {
...
@@ -81,14 +81,14 @@ public class TSpecialDeducationSum extends BaseEntity {
* 所得期间起
* 所得期间起
*/
*/
@Length
(
max
=
20
,
message
=
"所得期间起不能超过20个字符"
)
@Length
(
max
=
20
,
message
=
"所得期间起不能超过20个字符"
)
@ExcelAttribute
(
name
=
"所得期间起"
,
maxLength
=
20
,
isNotEmpty
=
true
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"所得期间起"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelProperty
(
value
=
"所得期间起"
)
@ExcelProperty
(
value
=
"所得期间起"
)
private
String
createStart
;
private
String
createStart
;
/**
/**
* 所得期间止
* 所得期间止
*/
*/
@Length
(
max
=
20
,
message
=
"所得期间止不能超过20个字符"
)
@Length
(
max
=
20
,
message
=
"所得期间止不能超过20个字符"
)
@ExcelAttribute
(
name
=
"所得期间止"
,
maxLength
=
20
,
isNotEmpty
=
true
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"所得期间止"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelProperty
(
value
=
"所得期间止"
)
@ExcelProperty
(
value
=
"所得期间止"
)
private
String
createEnd
;
private
String
createEnd
;
/**
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryConfigStandardController.java
View file @
aa3726a0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
@@ -119,6 +120,11 @@ public class TSalaryConfigStandardController {
...
@@ -119,6 +120,11 @@ public class TSalaryConfigStandardController {
if
(
null
==
user
||
null
==
user
.
getId
())
{
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
NO_USER
);
return
R
.
failed
(
NO_USER
);
}
}
long
res
=
tSalaryConfigStandardService
.
count
(
Wrappers
.<
TSalaryConfigStandard
>
query
().
lambda
()
.
eq
(
TSalaryConfigStandard:
:
getDbFiedName
,
tSalaryConfigStandard
.
getDbFiedName
()));
if
(
res
>
0
){
return
R
.
failed
(
"已存在系统标准数据项"
);
}
// 填充个人代扣等java字段
// 填充个人代扣等java字段
this
.
setJavaFiedName
(
tSalaryConfigStandard
);
this
.
setJavaFiedName
(
tSalaryConfigStandard
);
tSalaryConfigStandard
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
tSalaryConfigStandard
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
...
@@ -144,6 +150,12 @@ public class TSalaryConfigStandardController {
...
@@ -144,6 +150,12 @@ public class TSalaryConfigStandardController {
if
(
null
==
user
||
null
==
user
.
getId
())
{
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
NO_USER
);
return
R
.
failed
(
NO_USER
);
}
}
long
res
=
tSalaryConfigStandardService
.
count
(
Wrappers
.<
TSalaryConfigStandard
>
query
().
lambda
()
.
eq
(
TSalaryConfigStandard:
:
getDbFiedName
,
tSalaryConfigStandard
.
getDbFiedName
())
.
ne
(
TSalaryConfigStandard:
:
getId
,
tSalaryConfigStandard
.
getId
()));
if
(
res
>
0
){
return
R
.
failed
(
"已存在系统标准数据项"
);
}
// 填充个人代扣等java字段
// 填充个人代扣等java字段
this
.
setJavaFiedName
(
tSalaryConfigStandard
);
this
.
setJavaFiedName
(
tSalaryConfigStandard
);
if
(
String
.
valueOf
(
user
.
getId
()).
equals
(
tSalaryConfigStandard
.
getCreateBy
()))
{
if
(
String
.
valueOf
(
user
.
getId
()).
equals
(
tSalaryConfigStandard
.
getCreateBy
()))
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSpecialDeducationSumController.java
View file @
aa3726a0
...
@@ -76,7 +76,7 @@ public class TSpecialDeducationSumController {
...
@@ -76,7 +76,7 @@ public class TSpecialDeducationSumController {
@Operation
(
description
=
"新增(wxhr:tspecialdeducationsum_add)"
)
@Operation
(
description
=
"新增(wxhr:tspecialdeducationsum_add)"
)
@PostMapping
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tspecialdeducationsum_add')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tspecialdeducationsum_add')"
)
public
R
save
(
@Valid
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
public
R
<
Boolean
>
save
(
@Valid
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
new
R
<>(
tSpecialDeducationSumService
.
save
(
tSpecialDeducationSum
));
return
new
R
<>(
tSpecialDeducationSumService
.
save
(
tSpecialDeducationSum
));
}
}
...
@@ -90,7 +90,7 @@ public class TSpecialDeducationSumController {
...
@@ -90,7 +90,7 @@ public class TSpecialDeducationSumController {
@SysLog
(
"修改"
)
@SysLog
(
"修改"
)
@PutMapping
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tspecialdeducationsum_edit')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tspecialdeducationsum_edit')"
)
public
R
update
(
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
public
R
<
Boolean
>
update
(
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
new
R
<>(
tSpecialDeducationSumService
.
updateById
(
tSpecialDeducationSum
));
return
new
R
<>(
tSpecialDeducationSumService
.
updateById
(
tSpecialDeducationSum
));
}
}
...
@@ -104,7 +104,7 @@ public class TSpecialDeducationSumController {
...
@@ -104,7 +104,7 @@ public class TSpecialDeducationSumController {
@SysLog
(
"删除"
)
@SysLog
(
"删除"
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tspecialdeducationsum_del')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tspecialdeducationsum_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>(
tSpecialDeducationSumService
.
removeById
(
id
));
return
new
R
<>(
tSpecialDeducationSumService
.
removeById
(
id
));
}
}
...
@@ -151,7 +151,7 @@ public class TSpecialDeducationSumController {
...
@@ -151,7 +151,7 @@ public class TSpecialDeducationSumController {
@Operation
(
description
=
"删除本月全部专项扣除"
)
@Operation
(
description
=
"删除本月全部专项扣除"
)
@SysLog
(
"删除本月全部专项扣除"
)
@SysLog
(
"删除本月全部专项扣除"
)
@PostMapping
(
"/doDeleteTSumSpecialDeducationAll"
)
@PostMapping
(
"/doDeleteTSumSpecialDeducationAll"
)
public
R
doDeleteTSumSpecialDeducationAll
(
String
yearMonth
,
String
declareTitle
)
{
public
R
<
Boolean
>
doDeleteTSumSpecialDeducationAll
(
String
yearMonth
,
String
declareTitle
)
{
if
(
Common
.
isEmpty
(
yearMonth
))
{
if
(
Common
.
isEmpty
(
yearMonth
))
{
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyyMM"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyyMM"
);
yearMonth
=
df
.
format
(
new
Date
());
yearMonth
=
df
.
format
(
new
Date
());
...
@@ -163,7 +163,7 @@ public class TSpecialDeducationSumController {
...
@@ -163,7 +163,7 @@ public class TSpecialDeducationSumController {
if
(
num
==
0
)
{
if
(
num
==
0
)
{
return
R
.
failed
(
"当前条件查询无数据,未删除"
);
return
R
.
failed
(
"当前条件查询无数据,未删除"
);
}
else
{
}
else
{
return
new
R
<>(
"已删除"
+
num
+
"条数据"
);
return
R
.
ok
(
null
,
"已删除"
+
num
+
"条数据"
);
}
}
}
}
...
@@ -177,7 +177,7 @@ public class TSpecialDeducationSumController {
...
@@ -177,7 +177,7 @@ public class TSpecialDeducationSumController {
@Operation
(
description
=
"导出专项扣除"
)
@Operation
(
description
=
"导出专项扣除"
)
@SysLog
(
"导出专项扣除"
)
@SysLog
(
"导出专项扣除"
)
@GetMapping
(
"/doExportSpecialDeducationSum"
)
@GetMapping
(
"/doExportSpecialDeducationSum"
)
public
R
doExportSpecialDeducationSum
(
TSpecialDeducationSum
tSpecialDeducationSum
)
{
public
R
<
List
<
TSpecialDeducationSum
>>
doExportSpecialDeducationSum
(
TSpecialDeducationSum
tSpecialDeducationSum
)
{
if
(
Common
.
isEmpty
(
tSpecialDeducationSum
.
getCreateMonth
()))
{
if
(
Common
.
isEmpty
(
tSpecialDeducationSum
.
getCreateMonth
()))
{
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
//本月
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
//本月
tSpecialDeducationSum
.
setCreateMonth
(
nowMonth
);
tSpecialDeducationSum
.
setCreateMonth
(
nowMonth
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSpecialDeducationSumServiceImpl.java
View file @
aa3726a0
...
@@ -114,7 +114,9 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
...
@@ -114,7 +114,9 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
return
R
.
ok
(
errorMessages
);
return
R
.
ok
(
errorMessages
);
}
}
String
nowYearMonth
=
DateUtil
.
getCurrentDateString
(
"yyyyMM"
);
String
nowYearMonth
=
DateUtil
.
getCurrentDateString
(
"yyyyMM"
);
String
yearMonth
=
DateUtil
.
getYearMonth
(
sdsList
.
get
(
0
).
getCreateStart
());
String
yearMonth
=
DateUtil
.
getYearMonth
(
sdsList
.
get
(
0
).
getCreateStart
()
.
replace
(
"/"
,
""
)
.
replace
(
"-"
,
""
));
if
(
Common
.
isNotNull
(
yearMonth
))
{
if
(
Common
.
isNotNull
(
yearMonth
))
{
if
(!
yearMonth
.
equals
(
nowYearMonth
))
{
if
(!
yearMonth
.
equals
(
nowYearMonth
))
{
return
R
.
failed
(
"所得期间-不是当前年月:"
+
nowYearMonth
+
",不允许导入"
);
return
R
.
failed
(
"所得期间-不是当前年月:"
+
nowYearMonth
+
",不允许导入"
);
...
...
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