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
3a297c3f
Commit
3a297c3f
authored
Aug 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
daf0d06f
e2bcc1d4
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
320 additions
and
41 deletions
+320
-41
TStatisticsAnnualBonusImportVo.java
...lus/v1/yifu/salary/vo/TStatisticsAnnualBonusImportVo.java
+108
-0
TStatisticsAnnualBonusVo.java
...loud/plus/v1/yifu/salary/vo/TStatisticsAnnualBonusVo.java
+0
-10
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+13
-0
TStatisticsAnnualBonusController.java
...u/salary/controller/TStatisticsAnnualBonusController.java
+21
-4
TSalaryStandardMapper.java
...oud/plus/v1/yifu/salary/mapper/TSalaryStandardMapper.java
+7
-0
TSalaryStandardService.java
...d/plus/v1/yifu/salary/service/TSalaryStandardService.java
+7
-0
TStatisticsAnnualBonusService.java
...v1/yifu/salary/service/TStatisticsAnnualBonusService.java
+9
-1
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+5
-0
TStatisticsAnnualBonusServiceImpl.java
...alary/service/impl/TStatisticsAnnualBonusServiceImpl.java
+98
-0
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+26
-0
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+26
-26
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsAnnualBonusImportVo.java
0 → 100644
View file @
3a297c3f
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* 统计-全年一次性奖金
*
* @author huyc
* @date 2022-08-05 11:40:15
*/
@Data
public
class
TStatisticsAnnualBonusImportVo
extends
RowIndex
implements
Serializable
{
/**
* 员工姓名
*/
@Length
(
max
=
50
,
message
=
"员工姓名 不能超过50 个字符"
)
@NotNull
(
message
=
"员工姓名不可为空"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Length
(
max
=
25
,
message
=
"身份证号不能超过25个字符"
)
@NotNull
(
message
=
"身份证号不可为空"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
25
,
isNotEmpty
=
true
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 年终奖
*/
@ExcelAttribute
(
name
=
"待发年终奖"
,
isNotEmpty
=
true
)
@NotNull
(
message
=
"待发年终奖不可为空"
)
@Schema
(
description
=
"待发年终奖"
)
@ExcelProperty
(
"待发年终奖"
)
private
BigDecimal
preAnnualBonus
;
/**
* 年终奖单独税
*/
@ExcelAttribute
(
name
=
"待发12月工资"
,
isNotEmpty
=
true
)
@NotNull
(
message
=
"待发12月工资不可为空"
)
@Schema
(
description
=
"待发12月工资"
)
@ExcelProperty
(
"待发12月工资"
)
private
BigDecimal
preDecSalary
;
/**
* 年终奖单独扣税12月税费
*/
@ExcelAttribute
(
name
=
"年终奖单独扣税12月税费"
)
@Schema
(
description
=
"年终奖单独扣税12月税费"
)
@ExcelProperty
(
"年终奖单独扣税12月税费"
)
private
BigDecimal
onlyTax
;
/**
* 年终奖合并扣税12月税费
*/
@ExcelAttribute
(
name
=
"年终奖合并扣税12月税费"
)
@Schema
(
description
=
"年终奖合并扣税12月税费"
)
@ExcelProperty
(
"年终奖合并扣税12月税费"
)
private
BigDecimal
sumTax
;
/**
* 最优方案-年终奖
*/
@ExcelAttribute
(
name
=
"最优方案-年终奖"
)
@Schema
(
description
=
"最优方案-年终奖"
)
@ExcelProperty
(
"最优方案-年终奖"
)
private
BigDecimal
bestSolutionTax
;
/**
* 最优方案-12月扣税
*/
@ExcelAttribute
(
name
=
"最优方案-12月扣税"
)
@Schema
(
description
=
"最优方案-12月扣税"
)
@ExcelProperty
(
"最优方案-12月扣税"
)
private
BigDecimal
bestSolutionDecTax
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsAnnualBonusVo.java
View file @
3a297c3f
...
@@ -38,16 +38,6 @@ import java.math.BigDecimal;
...
@@ -38,16 +38,6 @@ import java.math.BigDecimal;
@Data
@Data
public
class
TStatisticsAnnualBonusVo
extends
RowIndex
implements
Serializable
{
public
class
TStatisticsAnnualBonusVo
extends
RowIndex
implements
Serializable
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@NotBlank
(
message
=
"id 不能为空"
)
@Length
(
max
=
32
,
message
=
"id 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"id"
,
isNotEmpty
=
true
,
errorInfo
=
"id 不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"id"
)
@ExcelProperty
(
"id"
)
private
String
id
;
/**
/**
* 税务主体(封面抬头)
* 税务主体(封面抬头)
*/
*/
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
3a297c3f
...
@@ -127,4 +127,17 @@ public class TSalaryStandardController {
...
@@ -127,4 +127,17 @@ public class TSalaryStandardController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TSalaryStandardSearchVo
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TSalaryStandardSearchVo
searchVo
)
{
tSalaryStandardService
.
listExport
(
response
,
searchVo
);
tSalaryStandardService
.
listExport
(
response
,
searchVo
);
}
}
/**
* 审核页面简单分页查询
*
* @param page 分页对象
* @param tSalaryStandard 标准薪酬工资表
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/auditPage"
)
public
R
<
IPage
<
TSalaryStandard
>>
getTSalaryStandardAuditPage
(
Page
<
TSalaryStandard
>
page
,
TSalaryStandardSearchVo
tSalaryStandard
)
{
return
new
R
<>(
tSalaryStandardService
.
getTSalaryStandardAuditPage
(
page
,
tSalaryStandard
));
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsAnnualBonusController.java
View file @
3a297c3f
...
@@ -19,7 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
...
@@ -19,7 +19,7 @@ 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.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.
R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.
*
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsAnnualBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsAnnualBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsAnnualBonusService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsAnnualBonusService
;
...
@@ -27,10 +27,13 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusSearchVo;
...
@@ -27,10 +27,13 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusSearchVo;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
...
@@ -44,11 +47,11 @@ import java.util.List;
...
@@ -44,11 +47,11 @@ import java.util.List;
@RequiredArgsConstructor
@RequiredArgsConstructor
@RequestMapping
(
"/tstatisticsannualbonus"
)
@RequestMapping
(
"/tstatisticsannualbonus"
)
@Tag
(
name
=
"统计-全年一次性奖金管理"
)
@Tag
(
name
=
"统计-全年一次性奖金管理"
)
@Slf4j
public
class
TStatisticsAnnualBonusController
{
public
class
TStatisticsAnnualBonusController
{
private
final
TStatisticsAnnualBonusService
tStatisticsAnnualBonusService
;
private
final
TStatisticsAnnualBonusService
tStatisticsAnnualBonusService
;
/**
/**
* 简单分页查询
* 简单分页查询
*
*
...
@@ -70,7 +73,6 @@ public class TStatisticsAnnualBonusController {
...
@@ -70,7 +73,6 @@ public class TStatisticsAnnualBonusController {
*/
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('salary_tstatisticsannualbonus_get')" )
public
R
<
List
<
TStatisticsAnnualBonus
>>
getTStatisticsAnnualBonusNoPage
(
@RequestBody
TStatisticsAnnualBonusSearchVo
tStatisticsAnnualBonus
)
{
public
R
<
List
<
TStatisticsAnnualBonus
>>
getTStatisticsAnnualBonusNoPage
(
@RequestBody
TStatisticsAnnualBonusSearchVo
tStatisticsAnnualBonus
)
{
return
R
.
ok
(
tStatisticsAnnualBonusService
.
noPageDiy
(
tStatisticsAnnualBonus
));
return
R
.
ok
(
tStatisticsAnnualBonusService
.
noPageDiy
(
tStatisticsAnnualBonus
));
}
}
...
@@ -81,7 +83,7 @@ public class TStatisticsAnnualBonusController {
...
@@ -81,7 +83,7 @@ public class TStatisticsAnnualBonusController {
* @param id id
* @param id id
* @return R
* @return R
*/
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询
:hasPermission('salary_tstatisticsannualbonus_get')
"
)
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
public
R
<
TStatisticsAnnualBonus
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
<
TStatisticsAnnualBonus
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tStatisticsAnnualBonusService
.
getById
(
id
));
return
R
.
ok
(
tStatisticsAnnualBonusService
.
getById
(
id
));
...
@@ -128,4 +130,19 @@ public class TStatisticsAnnualBonusController {
...
@@ -128,4 +130,19 @@ public class TStatisticsAnnualBonusController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsAnnualBonusSearchVo
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsAnnualBonusSearchVo
searchVo
)
{
tStatisticsAnnualBonusService
.
listExport
(
response
,
searchVo
);
tStatisticsAnnualBonusService
.
listExport
(
response
,
searchVo
);
}
}
/**
* 年终奖分配方案导入导出
*
* @author huyc
* @date 2022-08-08
**/
@Operation
(
description
=
"年终奖分配方案导入导出 hasPermission('salary_tstatisticsannualbonus_import')"
)
@PostMapping
(
"/bestSolutionExport"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticsannualbonus_import')"
)
public
R
<
List
<
ErrorMessage
>>
bestSolutionExport
(
@RequestBody
MultipartFile
file
,
HttpServletResponse
response
,
List
<
String
>
exportFields
)
throws
IOException
{
return
tStatisticsAnnualBonusService
.
bestSendExport
(
file
.
getInputStream
(),
response
,
exportFields
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryStandardMapper.java
View file @
3a297c3f
...
@@ -37,4 +37,11 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
...
@@ -37,4 +37,11 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
* @return
* @return
*/
*/
IPage
<
TSalaryStandard
>
getTSalaryStandardPage
(
Page
<
TSalaryStandard
>
page
,
@Param
(
"tSalaryStandard"
)
TSalaryStandard
tSalaryStandard
);
IPage
<
TSalaryStandard
>
getTSalaryStandardPage
(
Page
<
TSalaryStandard
>
page
,
@Param
(
"tSalaryStandard"
)
TSalaryStandard
tSalaryStandard
);
/**
* 标准薪酬工资表审核页面简单分页查询
* @param tSalaryStandard 标准薪酬工资表
* @return
*/
IPage
<
TSalaryStandard
>
getTSalaryStandardAuditPage
(
Page
<
TSalaryStandard
>
page
,
@Param
(
"tSalaryStandard"
)
TSalaryStandard
tSalaryStandard
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryStandardService.java
View file @
3a297c3f
...
@@ -48,4 +48,11 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
...
@@ -48,4 +48,11 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
void
listExport
(
HttpServletResponse
response
,
TSalaryStandardSearchVo
searchVo
);
void
listExport
(
HttpServletResponse
response
,
TSalaryStandardSearchVo
searchVo
);
List
<
TSalaryStandard
>
noPageDiy
(
TSalaryStandardSearchVo
searchVo
);
List
<
TSalaryStandard
>
noPageDiy
(
TSalaryStandardSearchVo
searchVo
);
/**
* 标准薪酬工资表审核页面简单分页查询
* @param tSalaryStandard 标准薪酬工资表
* @return
*/
IPage
<
TSalaryStandard
>
getTSalaryStandardAuditPage
(
Page
<
TSalaryStandard
>
page
,
TSalaryStandardSearchVo
tSalaryStandard
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsAnnualBonusService.java
View file @
3a297c3f
...
@@ -41,11 +41,19 @@ public interface TStatisticsAnnualBonusService extends IService<TStatisticsAnnua
...
@@ -41,11 +41,19 @@ public interface TStatisticsAnnualBonusService extends IService<TStatisticsAnnua
* @param tStatisticsAnnualBonus 统计-全年一次性奖金
* @param tStatisticsAnnualBonus 统计-全年一次性奖金
* @return
* @return
*/
*/
IPage
<
TStatisticsAnnualBonus
>
getTStatisticsAnnualBonusPage
(
Page
<
TStatisticsAnnualBonus
>
page
,
TStatisticsAnnualBonusSearchVo
tStatisticsAnnualBonus
);
IPage
<
TStatisticsAnnualBonus
>
getTStatisticsAnnualBonusPage
(
Page
<
TStatisticsAnnualBonus
>
page
,
TStatisticsAnnualBonusSearchVo
tStatisticsAnnualBonus
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
TStatisticsAnnualBonusSearchVo
searchVo
);
void
listExport
(
HttpServletResponse
response
,
TStatisticsAnnualBonusSearchVo
searchVo
);
List
<
TStatisticsAnnualBonus
>
noPageDiy
(
TStatisticsAnnualBonusSearchVo
searchVo
);
List
<
TStatisticsAnnualBonus
>
noPageDiy
(
TStatisticsAnnualBonusSearchVo
searchVo
);
/**
* 年终奖分配方案导入导出
* @param inputStream
* @return
*/
R
<
List
<
ErrorMessage
>>
bestSendExport
(
InputStream
inputStream
,
HttpServletResponse
response
,
List
<
String
>
exportFields
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
3a297c3f
...
@@ -250,4 +250,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -250,4 +250,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
BeanUtil
.
copyProperties
(
excel
,
insert
);
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
this
.
save
(
insert
);
}
}
@Override
public
IPage
<
TSalaryStandard
>
getTSalaryStandardAuditPage
(
Page
<
TSalaryStandard
>
page
,
TSalaryStandardSearchVo
tSalaryStandard
)
{
return
baseMapper
.
getTSalaryStandardAuditPage
(
page
,
tSalaryStandard
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsAnnualBonusServiceImpl.java
View file @
3a297c3f
...
@@ -29,11 +29,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -29,11 +29,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
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.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsAnnualBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsAnnualBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsAnnualBonusMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsAnnualBonusMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsAnnualBonusService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsAnnualBonusService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusImportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsAnnualBonusVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
...
@@ -145,6 +149,100 @@ public class TStatisticsAnnualBonusServiceImpl extends ServiceImpl<TStatisticsAn
...
@@ -145,6 +149,100 @@ public class TStatisticsAnnualBonusServiceImpl extends ServiceImpl<TStatisticsAn
return
baseMapper
.
selectList
(
wrapper
);
return
baseMapper
.
selectList
(
wrapper
);
}
}
@Override
public
R
<
List
<
ErrorMessage
>>
bestSendExport
(
InputStream
inputStream
,
HttpServletResponse
response
,
List
<
String
>
exportFields
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TStatisticsAnnualBonusImportVo
>
util1
=
new
ExcelUtil
<>(
TStatisticsAnnualBonusImportVo
.
class
);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
TStatisticsAnnualBonusImportVo
.
class
,
new
ReadListener
<
TStatisticsAnnualBonusImportVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
TStatisticsAnnualBonusImportVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
void
invoke
(
TStatisticsAnnualBonusImportVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importBestSendTax
(
cachedDataList
,
errorMessageList
,
user
,
response
,
exportFields
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
private
void
importBestSendTax
(
List
<
TStatisticsAnnualBonusImportVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
HttpServletResponse
response
,
List
<
String
>
exportFields
)
{
if
(
errorMessageList
.
size
()
==
CommonConstants
.
ZERO_INT
)
{
String
fileName
=
"年终奖测算导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
ServletOutputStream
out
=
null
;
for
(
TStatisticsAnnualBonusImportVo
infoVo
:
list
)
{
//todo
}
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
TStatisticsAnnualBonusImportVo
.
class
).
includeColumnFiledNames
(
exportFields
).
sheet
(
"年终奖测算"
)
.
doWrite
(
list
);
out
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
private
Long
noPageCountDiy
(
TStatisticsAnnualBonusSearchVo
searchVo
)
{
private
Long
noPageCountDiy
(
TStatisticsAnnualBonusSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TStatisticsAnnualBonus
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TStatisticsAnnualBonus
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
3a297c3f
...
@@ -212,4 +212,30 @@
...
@@ -212,4 +212,30 @@
<include
refid=
"tSalaryStandard_where"
/>
<include
refid=
"tSalaryStandard_where"
/>
</where>
</where>
</select>
</select>
<!--tSalaryStandard简单分页查询-->
<select
id=
"getTSalaryStandardAuditPage"
resultMap=
"tSalaryStandardMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_standard a
<where>
1=1
<if
test=
"tSalaryStandard != null"
>
<if
test=
"tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''"
>
AND a.DEPT_NAME like concat(#{'%',#{tSalaryStandard.deptName},'%')
</if>
<if
test=
"tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''"
>
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
</if>
<if
test=
"tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if
test=
"tSalaryStandard.status == null"
>
AND a.STATUS = 1 OR a.STATUS = 2
</if>
<if
test=
"tSalaryStandard.status != null"
>
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
</where>
</select>
</mapper>
</mapper>
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
3a297c3f
...
@@ -369,7 +369,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -369,7 +369,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
errorMessageList
=
handleFileAddress
(
1
,
preInfo
,
areaMap
,
areaIdMap
,
importVo
,
errorMessageList
);
errorMessageList
=
handleFileAddress
(
1
,
preInfo
,
areaMap
,
areaIdMap
,
importVo
,
errorMessageList
);
}
}
// 档案地市没问题 开始派单处理
// 档案地市没问题 开始派单处理
if
(
Common
.
isEmpty
(
errorMessageList
)
)
{
if
(
errorMessageList
.
size
()
==
CommonConstants
.
ZERO_INT
)
{
dispatchInfoService
.
importTDispatchInfo
(
importVoList
,
errorMessageList
,
user
);
dispatchInfoService
.
importTDispatchInfo
(
importVoList
,
errorMessageList
,
user
);
}
}
// 处理派增结果
// 处理派增结果
...
@@ -456,8 +456,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -456,8 +456,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
.
eq
(
TPreDispatchInfo:
:
getDispatchFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TPreDispatchInfo:
:
getDispatchFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TPreDispatchInfo:
:
getPreStatus
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TPreDispatchInfo:
:
getPreStatus
,
CommonConstants
.
ZERO_STRING
));
}
}
if
(
Common
.
isEmpty
(
preList
))
{
if
(
!
Common
.
isNotNull
(
preList
))
{
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
// 找出所有需要派减的社保或公积金数据 主要用于派减是获取项目相关数据
// 找出所有需要派减的社保或公积金数据 主要用于派减是获取项目相关数据
HashMap
<
String
,
TSocialInfo
>
socialMap
=
new
HashMap
<>();
HashMap
<
String
,
TSocialInfo
>
socialMap
=
new
HashMap
<>();
...
@@ -501,7 +501,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -501,7 +501,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
resetMessageList
(
pre
,
errorMessageList
,
errorMsgList
,
i
+
1
);
resetMessageList
(
pre
,
errorMessageList
,
errorMsgList
,
i
+
1
);
}
}
}
}
return
R
.
ok
(
errorMsgList
);
if
(
Common
.
isNotNull
(
errorMsgList
))
{
return
R
.
failed
(
errorMsgList
);
}
return
R
.
ok
();
}
}
@Override
@Override
...
@@ -2094,27 +2097,24 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -2094,27 +2097,24 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Date 2022-07-18
* @Date 2022-07-18
**/
**/
private
R
<
Boolean
>
handleDispatchAddRes
(
TPreDispatchInfo
preInfo
,
List
<
ErrorMessage
>
errorMessageList
)
{
private
R
<
Boolean
>
handleDispatchAddRes
(
TPreDispatchInfo
preInfo
,
List
<
ErrorMessage
>
errorMessageList
)
{
if
(
Common
.
isEmpty
(
errorMessageList
))
{
if
(
errorMessageList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
preInfo
.
getEmpIdcard
()
+
ErrorMessage
errorMessage
=
errorMessageList
.
get
(
CommonConstants
.
ZERO_INT
);
CommonConstants
.
COLON_STRING
+
if
(
null
!=
errorMessage
)
{
PreDispatchConstants
.
PREDISPATCH_EXCEPTION
);
if
(
errorMessage
.
getMessage
().
indexOf
(
PreDispatchConstants
.
DISPATCH_ADD_SUCCESS
)
>=
CommonConstants
.
ZERO_INT
)
{
}
preInfo
.
setPreStatus
(
CommonConstants
.
TWO_STRING
);
ErrorMessage
errorMessage
=
errorMessageList
.
get
(
CommonConstants
.
ZERO_INT
);
preInfo
.
setExceptionContent
(
CommonConstants
.
EMPTY_STRING
);
if
(
null
!=
errorMessage
)
{
baseMapper
.
updatePreStatusById
(
preInfo
);
if
(
errorMessage
.
getMessage
().
indexOf
(
PreDispatchConstants
.
DISPATCH_ADD_SUCCESS
)
>=
CommonConstants
.
ZERO_INT
)
{
return
R
.
ok
(
null
,
preInfo
.
getEmpIdcard
()
+
preInfo
.
setPreStatus
(
CommonConstants
.
TWO_STRING
);
CommonConstants
.
COLON_STRING
+
preInfo
.
setExceptionContent
(
CommonConstants
.
EMPTY_STRING
);
PreDispatchConstants
.
DISPATCH_ADD_SUCCESS
);
baseMapper
.
updatePreStatusById
(
preInfo
);
}
else
{
return
R
.
ok
(
null
,
preInfo
.
getEmpIdcard
()
+
preInfo
.
setPreStatus
(
CommonConstants
.
ONE_STRING
);
CommonConstants
.
COLON_STRING
+
preInfo
.
setExceptionContent
(
errorMessage
.
getMessage
());
PreDispatchConstants
.
DISPATCH_ADD_SUCCESS
);
baseMapper
.
updatePreStatusById
(
preInfo
);
}
else
{
return
R
.
failed
(
preInfo
.
getEmpIdcard
()
+
preInfo
.
setPreStatus
(
CommonConstants
.
ONE_STRING
);
CommonConstants
.
COLON_STRING
+
preInfo
.
setExceptionContent
(
errorMessage
.
getMessage
());
errorMessage
.
getMessage
());
baseMapper
.
updatePreStatusById
(
preInfo
);
}
return
R
.
failed
(
preInfo
.
getEmpIdcard
()
+
CommonConstants
.
COLON_STRING
+
errorMessage
.
getMessage
());
}
}
}
}
return
null
;
return
null
;
...
@@ -2371,7 +2371,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -2371,7 +2371,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
errorMessageList
=
handleFileAddress
(
i
,
pre
,
areaMap
,
areaIdMap
,
importVo
,
errorMessageList
);
errorMessageList
=
handleFileAddress
(
i
,
pre
,
areaMap
,
areaIdMap
,
importVo
,
errorMessageList
);
}
}
// 档案地市没问题 开始派单处理
// 档案地市没问题 开始派单处理
if
(
Common
.
isEmpty
(
errorMessageList
)){
if
(
!
Common
.
isNotNull
(
errorMessageList
)){
dispatchInfoService
.
importTDispatchInfo
(
importVoList
,
errorMessageList
,
user
);
dispatchInfoService
.
importTDispatchInfo
(
importVoList
,
errorMessageList
,
user
);
}
}
// 处理派增结果
// 处理派增结果
...
...
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