Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
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
吴学德
gdtel-gztel-school-center
Commits
82642895
Commit
82642895
authored
May 07, 2020
by
彭祥礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增兑换券信息管理模块
parent
f5cdad74
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2356 additions
and
4 deletions
+2356
-4
common/src/main/java/com/winsun/bean/YxtCoupon.java
+62
-0
common/src/main/java/com/winsun/bean/ZjlWage.java
+352
-0
common/src/main/java/com/winsun/mapper/YxtCouponMapper.java
+17
-0
common/src/main/java/com/winsun/mapper/ZjlWageMapper.java
+18
-0
service-manager/src/main/java/com/winsun/controller/ManagerKpiController.java
+2
-0
service-manager/src/main/java/com/winsun/controller/exchangeCouponController.java
+483
-0
service-manager/src/main/java/com/winsun/controller/zjlSalaryController.java
+1331
-0
service-manager/src/main/java/com/winsun/utils/ExcelDealUtils.java
+91
-4
No files found.
common/src/main/java/com/winsun/bean/YxtCoupon.java
0 → 100644
View file @
82642895
package
com
.
winsun
.
bean
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 〈院线通兑换券〉
*
* @author PXL
* @create 2020/5/7 10:48
*/
@Data
@TableName
(
"hhr_yxt_card"
)
public
class
YxtCoupon
implements
Serializable
{
/**
*
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
*兑换券账号
*/
@TableField
(
"card_number"
)
private
String
cardNumber
;
/**
*
*/
@TableField
(
"password"
)
private
String
password
;
/**
*上传时间
*/
@TableField
(
"update_date"
)
private
Date
updateDate
;
/**
*1: 未售出 2:已售出 3:售出中
*/
@TableField
(
"state"
)
private
Integer
state
;
/**
*有效截止日期
*/
@TableField
(
"validity_period"
)
private
Date
validityPeriod
;
/**
*上架状态 1:已上架 2:已下架
*/
@TableField
(
"shelf_state"
)
private
Integer
shelfState
;
/**
* 是否删除(0:未删除,1:已删除)
*/
@TableField
(
"del_flag"
)
private
Integer
delFlag
;
}
common/src/main/java/com/winsun/bean/ZjlWage.java
0 → 100644
View file @
82642895
package
com
.
winsun
.
bean
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 〈总经理薪酬〉
* @author PXL
* @create 2020/5/6 14:25
*/
@Data
@TableName
(
"hhr_manager_wage"
)
public
class
ZjlWage
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7341453717011045526L
;
/**
*
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
*
*/
@TableField
(
"month"
)
private
String
month
;
/**
*归属
*/
@TableField
(
"department"
)
private
String
department
;
/**
*
*/
@TableField
(
"name"
)
private
String
name
;
/**
*身份证
*/
@TableField
(
"id_card"
)
private
String
idCard
;
/**
*分公司
*/
@TableField
(
"company"
)
private
String
company
;
/**
*属性
*/
@TableField
(
"attribute"
)
private
String
attribute
;
/**
*岗位工资
*/
@TableField
(
"position_wage"
)
private
double
positionWage
;
/**
*绩效奖金(绩效工资+提成)
*/
@TableField
(
"performance_bonus"
)
private
double
performanceBonus
;
/**
*专项奖
*/
@TableField
(
"special_bonus"
)
private
double
specialBonus
;
/**
*年终奖
*/
@TableField
(
"year_end_bonus"
)
private
double
yearEndBonus
;
/**
*节日费(元旦,春节,五一,十一)
*/
@TableField
(
"festival_fee"
)
private
double
festivalFee
;
/**
*高温补贴(6-10月)
*/
@TableField
(
"high_subsidy"
)
private
double
highSubsidy
;
/**
*通讯补贴
*/
@TableField
(
"correspondence_subsidy"
)
private
double
correspondenceSubsidy
;
/**
*餐费补贴
*/
@TableField
(
"table_money_subsidy"
)
private
double
tableMoneySubsidy
;
/**
*交通补贴
*/
@TableField
(
"traffic_subsidy"
)
private
double
trafficSubsidy
;
/**
*专项奖(秋营奖励)
*/
@TableField
(
"special_bonus_autumn"
)
private
double
specialBonusAutumn
;
/**
*其他补扣补退
*/
@TableField
(
"other_subsidy"
)
private
double
otherSubsidy
;
/**
*应发合计
*/
@TableField
(
"total_yf"
)
private
double
totalYf
;
/**
*个人养老保险
*/
@TableField
(
"endowment_insurance_personal"
)
private
double
endowmentInsurancePersonal
;
/**
*个人缴纳失业保险
*/
@TableField
(
"unenployment_insurance_personal"
)
private
double
unenploymentInsurancePersonal
;
/**
*个人缴纳医疗保险
*/
@TableField
(
"medicare_personal"
)
private
double
medicarePersonal
;
/**
*个人保险小计
*/
@TableField
(
"total_insurance"
)
private
double
totalInsurance
;
/**
*个人缴纳住房公积金
*/
@TableField
(
"reserved_fund"
)
private
double
reservedFund
;
/**
*个税
*/
@TableField
(
"reserved_fund_tax"
)
private
double
reservedFundTax
;
/**
*年终奖个税
*/
@TableField
(
"year_end_bonus_tax"
)
private
double
yearEndBonusTax
;
/**
*个人其他补交补退
*/
@TableField
(
"other_fee_personal"
)
private
double
otherFeePersonal
;
/**
*个人工会费
*/
@TableField
(
"dues_personal"
)
private
double
duesPersonal
;
/**
*个人缴交小计
*/
@TableField
(
"total_fee_personal"
)
private
double
totalFeePersonal
;
/**
*实发合计
*/
@TableField
(
"total_sf"
)
private
double
totalSf
;
/**
*单位养老保险
*/
@TableField
(
"endowment_insurance_unit"
)
private
double
endowmentInsuranceUnit
;
/**
*单位失业保险
*/
@TableField
(
"unenployment_insurance_unit"
)
private
double
unenploymentInsuranceUnit
;
/**
*单位医疗保险
*/
@TableField
(
"medicare_unit"
)
private
double
medicareUnit
;
/**
*单位工伤保险
*/
@TableField
(
"employment_injury_insurance_unit"
)
private
double
employmentInjuryInsuranceUnit
;
/**
*单位生育保险
*/
@TableField
(
"birth_insurance_unit"
)
private
double
birthInsuranceUnit
;
/**
*重大疾病保险
*/
@TableField
(
"illness_insurance_unit"
)
private
double
illnessInsuranceUnit
;
/**
*单位公积金
*/
@TableField
(
"reserved_fund_unit"
)
private
double
reservedFundUnit
;
/**
*工会计提
*/
@TableField
(
"labor_union_fee_unit"
)
private
double
laborUnionFeeUnit
;
/**
*商业意外险
*/
@TableField
(
"accident_insurance_unit"
)
private
double
accidentInsuranceUnit
;
/**
*残保金
*/
@TableField
(
"disability_insurance_unit"
)
private
double
disabilityInsuranceUnit
;
/**
*单位其他补交补退
*/
@TableField
(
"other_fee_unit"
)
private
double
otherFeeUnit
;
/**
*单位缴交小计
*/
@TableField
(
"total_fee_unit"
)
private
double
totalFeeUnit
;
/**
*总个人人工成本合计
*/
@TableField
(
"total_cast_personal"
)
private
double
totalCastPersonal
;
/**
*附加信息
*/
@TableField
(
"addition_msg"
)
private
String
additionMsg
;
/**
*邮电人才服务管理费(200/人)
*/
@TableField
(
"manage_fee"
)
private
double
manageFee
;
/**
*单位总成本(含支出税点)
*/
@TableField
(
"total_cast_unit"
)
private
double
totalCastUnit
;
/**
*个人缴纳养老保险2
*/
@TableField
(
"endowment_insurance_personal2"
)
private
double
endowmentInsurancePersonal2
;
/**
*个人缴纳失业保险2
*/
@TableField
(
"unenployment_insurance_personal2"
)
private
double
unenploymentInsurancePersonal2
;
/**
*个人缴纳医疗保险2
*/
@TableField
(
"medicare_personal2"
)
private
double
medicarePersonal2
;
/**
*个人缴纳住房公积金2
*/
@TableField
(
"resvered_fund_personal2"
)
private
double
resveredFundPersonal2
;
/**
*单位养老保险2
*/
@TableField
(
"endowment_insurance_unit2"
)
private
double
endowmentInsuranceUnit2
;
/**
*单位失业保险2
*/
@TableField
(
"unenployment_insurance_unit2"
)
private
double
unenploymentInsuranceUnit2
;
/**
*单位医疗保险2
*/
@TableField
(
"medicare_unit2"
)
private
double
medicareUnit2
;
/**
*单位工伤保险2
*/
@TableField
(
"employment_injury_insurance_unit2"
)
private
double
employmentInjuryInsuranceUnit2
;
/**
*单位生育保险2
*/
@TableField
(
"birth_insurance_unit2"
)
private
double
birthInsuranceUnit2
;
/**
*重大疾病保险企业缴纳2
*/
@TableField
(
"illness_insurance_unit2"
)
private
double
illnessInsuranceUnit2
;
/**
*单位住房公积金2
*/
@TableField
(
"reserved_insurance_unit2"
)
private
double
reservedInsuranceUnit2
;
/**
*合并计税
*/
@TableField
(
"total_insurance_unit2"
)
private
double
totalInsuranceUnit2
;
/**
*本月计税工资
*/
@TableField
(
"wage"
)
private
double
wage
;
/**
*本月抵税扣除
*/
@TableField
(
"wage_tax"
)
private
double
wageTax
;
/**
*本月工资抵税
*/
@TableField
(
"wage_tax_after"
)
private
double
wageTaxAfter
;
/**
*年终奖应税
*/
@TableField
(
"last_year_end_bonus"
)
private
double
lastYearEndBonus
;
/**
*年终奖个税计算
*/
@TableField
(
"last_year_end_bonus_tax"
)
private
double
lastYearEndBonusTax
;
/**
*银行账号
*/
@TableField
(
"bank_account"
)
private
String
bankAccount
;
/**
*督导成本
*/
@TableField
(
"manager_cast"
)
private
double
managerCast
;
/**
*学子公司成本
*/
@TableField
(
"xz_company_cast"
)
private
double
xzCompanyCast
;
}
common/src/main/java/com/winsun/mapper/YxtCouponMapper.java
0 → 100644
View file @
82642895
package
com
.
winsun
.
mapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.winsun.bean.YxtCoupon
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
/**
* 〈兑换券Mapper〉
*
* @author PXL
* @create 2020/5/7 10:55
*/
@Mapper
@Component
public
interface
YxtCouponMapper
extends
BaseMapper
<
YxtCoupon
>
{
}
common/src/main/java/com/winsun/mapper/ZjlWageMapper.java
0 → 100644
View file @
82642895
package
com
.
winsun
.
mapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.winsun.bean.ZjlWage
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
/**
* 〈总经理薪酬Mapper〉
*
* @author PXL
* @create 2020/5/6 15:04
*/
@Mapper
@Component
public
interface
ZjlWageMapper
extends
BaseMapper
<
ZjlWage
>
{
}
service-manager/src/main/java/com/winsun/controller/ManagerKpiController.java
View file @
82642895
...
@@ -184,6 +184,7 @@ public class ManagerKpiController extends BaseController {
...
@@ -184,6 +184,7 @@ public class ManagerKpiController extends BaseController {
Page
<
ManagerKpi
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
Page
<
ManagerKpi
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
Wrapper
<
ManagerKpi
>
managerKpiWrapper
=
new
EntityWrapper
<>();
Wrapper
<
ManagerKpi
>
managerKpiWrapper
=
new
EntityWrapper
<>();
managerKpiWrapper
.
like
(
StringUtils
.
isNotBlank
(
name
),
"name"
,
name
,
SqlLike
.
DEFAULT
);
managerKpiWrapper
.
like
(
StringUtils
.
isNotBlank
(
name
),
"name"
,
name
,
SqlLike
.
DEFAULT
);
if
(
StringUtils
.
isNotBlank
(
month
)){
String
[]
months
=
month
.
split
(
"\\,"
);
String
[]
months
=
month
.
split
(
"\\,"
);
if
(!
month
.
equals
(
","
)
&&
StringUtils
.
isNotEmpty
(
month
)){
if
(!
month
.
equals
(
","
)
&&
StringUtils
.
isNotEmpty
(
month
)){
String
m1
=
months
[
0
].
substring
(
0
,
7
);
String
m1
=
months
[
0
].
substring
(
0
,
7
);
...
@@ -193,6 +194,7 @@ public class ManagerKpiController extends BaseController {
...
@@ -193,6 +194,7 @@ public class ManagerKpiController extends BaseController {
managerKpiWrapper
.
ge
(
StringUtils
.
isNotBlank
(
month1
),
"month"
,
month1
);
managerKpiWrapper
.
ge
(
StringUtils
.
isNotBlank
(
month1
),
"month"
,
month1
);
managerKpiWrapper
.
le
(
StringUtils
.
isNotBlank
(
month2
),
"month"
,
month2
);
managerKpiWrapper
.
le
(
StringUtils
.
isNotBlank
(
month2
),
"month"
,
month2
);
}
}
}
List
<
ManagerKpi
>
managerKpiList
=
managerKpiMapper
.
selectList
(
managerKpiWrapper
);
List
<
ManagerKpi
>
managerKpiList
=
managerKpiMapper
.
selectList
(
managerKpiWrapper
);
List
<
ManagerKpi
>
dataList
=
new
ArrayList
<>();
List
<
ManagerKpi
>
dataList
=
new
ArrayList
<>();
...
...
service-manager/src/main/java/com/winsun/controller/exchangeCouponController.java
0 → 100644
View file @
82642895
package
com
.
winsun
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.enums.SqlLike
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.winsun.auth.core.annotion.Permission
;
import
com.winsun.auth.core.base.controller.BaseController
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.shiro.ShiroUser
;
import
com.winsun.auth.core.util.DateUtil
;
import
com.winsun.auth.core.util.IOUtils
;
import
com.winsun.bean.YxtCoupon
;
import
com.winsun.mapper.YxtCouponMapper
;
import
com.winsun.utils.ExcelDealUtils
;
import
com.winsun.utils.ImportExcel
;
import
com.winsun.utils.MyBatisPlusUpdateUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.util.CellRangeAddressList
;
import
org.apache.poi.xssf.usermodel.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
* 兑换券校检
*
* @Author: xiangli
* @Date:
*/
@Slf4j
@RestController
@RequestMapping
(
"/yxtCoupon"
)
public
class
exchangeCouponController
extends
BaseController
{
/**
* 导入
*/
private
static
final
int
HEADER_NUM
=
-
1
;
private
static
final
int
SHEET_INDEX
=
0
;
private
static
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
/**
* KPI信息模板列名
*/
private
static
String
SL_cardNumber
=
"兑换券账号"
;
private
static
String
SL_password
=
"密码"
;
private
static
String
SL_updateDate
=
"有效截止日期"
;
private
static
String
SL_state
=
"出售状态(1:未售出,2:已售出,3:售出中)"
;
private
static
String
SL_validityPeriod
=
"有效截止日期"
;
private
static
String
SL_shelfState
=
"上架状态(1:已上架,2:已下架)"
;
private
static
String
SL_delFlag
=
"是否删除(0:未删除,1:已删除)"
;
@Autowired
private
YxtCouponMapper
yxtCouponMapper
;
@Autowired
@Qualifier
(
"redisStringTemplate"
)
private
RedisTemplate
redisTemplate
;
/**
* 兑换券添加
*
* @param yxtCoupon 添加对象json字符串
* @return
*/
@Permission
(
menuname
=
"添加兑换券信息"
,
value
=
"insert"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
insertProduct
(
@RequestParam
(
"yxtCoupon"
)
String
yxtCoupon
)
{
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
}
YxtCoupon
yxt
=
JSON
.
parseObject
(
yxtCoupon
,
YxtCoupon
.
class
);
yxt
.
setUpdateDate
(
new
Date
());
yxtCouponMapper
.
insert
(
yxt
);
return
ResponseData
.
success
(
"添加成功!"
);
}
/**
* kpi删除
*
* @param id 需要删除的id
* @return
*/
@Permission
(
menuname
=
"删除兑换券信息"
,
value
=
"delete"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
deleteProduct
(
@RequestParam
(
name
=
"id"
,
required
=
false
)
String
id
,
@RequestParam
(
name
=
"isdel"
,
required
=
false
)
String
isdel
)
{
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
}
Wrapper
wrapper
=
new
EntityWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
Map
<
String
,
Object
>
dataMapping
=
new
HashMap
<>();
dataMapping
.
put
(
"del_flag"
,
isdel
);
yxtCouponMapper
.
updateForSet
(
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
/*if(StringUtils.isNotBlank(id)){
lzKpiMapper.deleteById(id);
return ResponseData.success("操作成功!");
}*/
return
ResponseData
.
success
(
"操作成功!"
);
}
/**
* 兑换券信息编辑
*
* @param yxtCoupon 编辑对象json字符串
* @return
*/
@Permission
(
menuname
=
"修改兑换券信息"
,
value
=
"update"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
updateProduct
(
@RequestParam
(
"yxtCoupon"
)
String
yxtCoupon
)
{
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
}
YxtCoupon
pro
=
JSON
.
parseObject
(
yxtCoupon
,
YxtCoupon
.
class
);
Wrapper
wrapper
=
new
EntityWrapper
<>();
wrapper
.
eq
(
"id"
,
pro
.
getId
());
Map
<
String
,
Object
>
dataMapping
=
new
HashMap
<>();
dataMapping
.
put
(
"card_number"
,
pro
.
getCardNumber
());
dataMapping
.
put
(
"password"
,
pro
.
getPassword
());
dataMapping
.
put
(
"update_date"
,
pro
.
getUpdateDate
());
dataMapping
.
put
(
"state"
,
pro
.
getState
());
dataMapping
.
put
(
"validity_period"
,
pro
.
getValidityPeriod
());
dataMapping
.
put
(
"shelf_state"
,
pro
.
getShelfState
());
dataMapping
.
put
(
"del_flag"
,
pro
.
getDelFlag
());
yxtCouponMapper
.
updateForSet
(
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
return
ResponseData
.
success
(
"修改成功!"
);
}
/**
* @param card
* @param state
* @param shelfState
* @param pageNo
* @param pageSize
* @return
*/
@Permission
(
menuname
=
"查询兑换券信息"
,
value
=
"list"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Page
<
YxtCoupon
>>
listProduct
(
@RequestParam
(
name
=
"card"
,
required
=
false
)
String
card
,
@RequestParam
(
name
=
"state"
,
required
=
false
)
String
state
,
@RequestParam
(
name
=
"shelfState"
,
required
=
false
)
String
shelfState
,
@RequestParam
(
name
=
"pageNo"
)
int
pageNo
,
@RequestParam
(
name
=
"pageSize"
)
int
pageSize
)
{
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
}
Page
<
YxtCoupon
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
List
<
YxtCoupon
>
dataList
=
new
LinkedList
<>();
Wrapper
<
YxtCoupon
>
yxtCouponWrapper
=
new
EntityWrapper
<>();
yxtCouponWrapper
.
like
(
StringUtils
.
isNotBlank
(
card
),
"card_number"
,
card
,
SqlLike
.
DEFAULT
);
yxtCouponWrapper
.
eq
(
StringUtils
.
isNotBlank
(
state
),
"state"
,
state
);
yxtCouponWrapper
.
eq
(
StringUtils
.
isNotBlank
(
shelfState
),
"shelf_state"
,
shelfState
);
List
<
YxtCoupon
>
yxtCouponList
=
yxtCouponMapper
.
selectList
(
yxtCouponWrapper
);
if
(
yxtCouponList
.
size
()
<
pageSize
)
{
dataList
=
yxtCouponList
;
}
else
{
dataList
=
yxtCouponList
.
subList
((
pageNo
-
1
)
*
pageSize
,
pageNo
*
pageSize
);
}
page
.
setRecords
(
dataList
);
page
.
setTotal
(
yxtCouponList
.
size
());
return
ResponseData
.
success
(
page
,
"查询成功!"
);
}
/**
* @param card
* @param state
* @param shelfState
* @param pageNo
* @param pageSize
* @return
*/
@Permission
(
menuname
=
"导出兑换券信息"
,
value
=
"excelOut"
,
method
=
RequestMethod
.
POST
)
public
void
excelOut
(
@RequestParam
(
name
=
"card"
,
required
=
false
)
String
card
,
@RequestParam
(
name
=
"state"
,
required
=
false
)
String
state
,
@RequestParam
(
name
=
"shelfState"
,
required
=
false
)
String
shelfState
,
@RequestParam
(
name
=
"pageNo"
)
int
pageNo
,
@RequestParam
(
name
=
"pageSize"
)
int
pageSize
)
throws
IOException
{
ShiroUser
user
=
getShiroUser
();
List
<
Map
<
String
,
Object
>>
list
=
new
LinkedList
<>();
Wrapper
<
YxtCoupon
>
yxtCouponWrapper
=
new
EntityWrapper
<>();
yxtCouponWrapper
.
like
(
StringUtils
.
isNotBlank
(
card
),
"card_number"
,
card
,
SqlLike
.
DEFAULT
);
yxtCouponWrapper
.
eq
(
StringUtils
.
isNotBlank
(
state
),
"state"
,
state
);
yxtCouponWrapper
.
eq
(
StringUtils
.
isNotBlank
(
shelfState
),
"shelf_state"
,
shelfState
);
List
<
YxtCoupon
>
yxtCouponList
=
yxtCouponMapper
.
selectList
(
yxtCouponWrapper
);
for
(
YxtCoupon
yxt
:
yxtCouponList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
yxt
.
getId
());
map
.
put
(
"cardNumber"
,
yxt
.
getCardNumber
());
map
.
put
(
"password"
,
yxt
.
getPassword
());
map
.
put
(
"updateDate"
,
DateUtil
.
formatDate
(
yxt
.
getUpdateDate
(),
"yyyy-mm-dd"
));
Integer
state0
=
yxt
.
getState
();
if
(
state0
==
1
){
map
.
put
(
"state"
,
"未售出"
);
}
else
if
(
state0
==
2
){
map
.
put
(
"state"
,
"已售出"
);
}
else
{
map
.
put
(
"state"
,
"售出中"
);
}
map
.
put
(
"validityPeriod"
,
DateUtil
.
formatDate
(
yxt
.
getValidityPeriod
(),
"yyyy-mm-dd"
));
Integer
shelfState0
=
yxt
.
getShelfState
();
if
(
shelfState0
==
1
){
map
.
put
(
"shelfState"
,
"已上架"
);
}
else
{
map
.
put
(
"shelfState"
,
"已下架"
);
}
Integer
delFlag0
=
yxt
.
getShelfState
();
if
(
delFlag0
==
0
){
map
.
put
(
"delFlag"
,
"未删除"
);
}
else
{
map
.
put
(
"delFlag"
,
"已删除"
);
}
list
.
add
(
map
);
}
ServletOutputStream
os
=
null
;
XSSFWorkbook
workbook
=
ExcelDealUtils
.
getWorkBook
(
ExcelDealUtils
.
exchangeCouponExcel
(
"兑换券清单"
),
list
);
try
{
HttpServletResponse
response
=
getHttpServletResponse
();
response
.
reset
();
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"application/octet-stream"
);
os
=
response
.
getOutputStream
();
workbook
.
write
(
os
);
os
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
"文件出错!"
+
e
.
getMessage
(),
e
);
}
finally
{
IOUtils
.
closeQuite
(
workbook
,
os
);
}
}
/**
* 受理订单模板下载
*
* @return
*/
@Permission
(
menuname
=
"兑换券信息导入模板"
,
method
=
RequestMethod
.
POST
,
value
=
"downloadMoBan"
)
public
ResponseData
downloadMoBan
()
{
ArrayList
<
String
>
columns
=
new
ArrayList
<>();
columns
.
add
(
SL_cardNumber
);
columns
.
add
(
SL_password
);
columns
.
add
(
SL_state
);
columns
.
add
(
SL_shelfState
);
columns
.
add
(
SL_validityPeriod
);
columns
.
add
(
SL_updateDate
);
columns
.
add
(
SL_delFlag
);
ServletOutputStream
os
=
null
;
XSSFWorkbook
workbook
=
new
XSSFWorkbook
();
try
{
//创建工作表
XSSFSheet
sheet
=
workbook
.
createSheet
(
"兑换券信息模板"
);
sheet
.
setColumnWidth
(
0
,
6000
);
sheet
.
setColumnWidth
(
1
,
6000
);
sheet
.
setColumnWidth
(
2
,
6000
);
sheet
.
setColumnWidth
(
3
,
6000
);
sheet
.
setColumnWidth
(
4
,
6000
);
sheet
.
setColumnWidth
(
5
,
6000
);
sheet
.
setColumnWidth
(
6
,
6000
);
//下拉选项
/*List<String> fengju = new ArrayList<>();
fengju.add("受理不成功");
fengju.add("受理成功");
sheet = this.getXSSFSheet(sheet, fengju, 1, 1);*/
//添加表头
final
XSSFRow
row
=
sheet
.
createRow
(
0
);
XSSFCellStyle
cellStyle
=
workbook
.
createCellStyle
();
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
columns
.
forEach
(
val
->
{
XSSFCell
cell
=
row
.
createCell
(
Math
.
max
(
row
.
getLastCellNum
(),
0
));
cell
.
setCellValue
(
val
);
});
HttpServletResponse
response
=
getHttpServletResponse
();
response
.
reset
();
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"application/vnd.ms-excel"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName=data.xlsx"
);
os
=
response
.
getOutputStream
();
workbook
.
write
(
os
);
os
.
flush
();
}
catch
(
IOException
e
)
{
log
.
error
(
"兑换券信息模板文件出错!"
+
e
.
getMessage
(),
e
);
}
finally
{
IOUtils
.
closeQuite
(
workbook
,
os
);
}
return
ResponseData
.
error
(
"兑换券信息模板出错"
);
}
XSSFSheet
getXSSFSheet
(
XSSFSheet
sheet
,
List
<
String
>
datas
,
int
firstcol
,
int
lastcol
)
{
if
(
datas
.
size
()
==
0
)
{
return
sheet
;
}
String
[]
strdata
=
new
String
[
datas
.
size
()];
for
(
int
i
=
0
;
i
<
datas
.
size
();
i
++)
{
strdata
[
i
]
=
datas
.
get
(
i
);
}
XSSFDataValidationHelper
dvHelper
=
new
XSSFDataValidationHelper
(
sheet
);
XSSFDataValidationConstraint
dvConstraint1
=
(
XSSFDataValidationConstraint
)
dvHelper
.
createExplicitListConstraint
(
strdata
);
CellRangeAddressList
addressList
=
new
CellRangeAddressList
(
1
,
20000
,
firstcol
,
lastcol
);
XSSFDataValidation
validation
=
(
XSSFDataValidation
)
dvHelper
.
createValidation
(
dvConstraint1
,
addressList
);
sheet
.
addValidationData
(
validation
);
return
sheet
;
}
/**
* 受理订单
*
* @param file 上传的数据文件
* @return
*/
@Permission
(
menuname
=
"上传数据"
,
value
=
"importDate"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
updateDatas
(
@RequestParam
(
name
=
"file"
)
MultipartFile
file
)
{
StringBuffer
error
=
new
StringBuffer
();
if
(!
StringUtils
.
endsWithAny
(
file
.
getOriginalFilename
(),
"xlsx"
,
"xls"
))
{
return
ResponseData
.
error
(
"手工上传数据仅支持Excel文件,其他格式不支持!"
);
}
ShiroUser
user
=
getShiroUser
();
// 当前是否有数据权限
boolean
hasDataPermission
=
user
.
getRoleNames
().
stream
().
anyMatch
(
data
->
StringUtils
.
equalsAny
(
data
,
"活动上单员"
,
"数据管理员"
,
"超级管理员"
));
if
(!
hasDataPermission
)
{
return
ResponseData
.
error
(
"无数据权限!"
);
}
ImportExcel
importExcel
=
null
;
try
{
importExcel
=
new
ImportExcel
(
file
,
HEADER_NUM
,
SHEET_INDEX
);
}
catch
(
Exception
e
)
{
log
.
error
(
"兑换券信息导入异常"
,
e
.
getMessage
());
return
ResponseData
.
error
(
"导入异常!"
);
}
List
<
Map
<
String
,
Object
>>
listMap
=
importExcel
.
getDataListMap
();
if
(
listMap
.
size
()
==
1
)
{
return
ResponseData
.
error
(
"文件不能为空"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"a"
).
toString
().
equals
(
SL_cardNumber
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"b"
).
toString
().
equals
(
SL_password
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"c"
).
toString
().
equals
(
SL_state
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"d"
).
toString
().
equals
(
SL_shelfState
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"e"
).
toString
().
equals
(
SL_validityPeriod
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"f"
).
toString
().
equals
(
SL_updateDate
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"g"
).
toString
().
equals
(
SL_delFlag
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(
listMap
.
get
(
0
).
size
()
!=
7
)
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
List
<
String
>
accountList
=
new
LinkedList
<>();
List
<
Map
<
String
,
Object
>>
sysUserList
=
new
LinkedList
<>();
//校验数据
try
{
//校验数据
for
(
int
i
=
1
;
i
<
listMap
.
size
();
i
++)
{
Map
<
String
,
Object
>
temp
=
listMap
.
get
(
i
);
if
(!
temp
.
containsKey
(
"a"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的兑换券账号不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"a"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的兑换券账号不能为空"
);
}
if
(!
temp
.
containsKey
(
"b"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的密码不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"b"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的密码不能为空"
);
}
if
(!
temp
.
containsKey
(
"c"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的出售状态不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"c"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的出售状态不能为空"
);
}
if
(!
temp
.
containsKey
(
"d"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的上架状态不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"d"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的上架状态不能为空"
);
}
if
(!
temp
.
containsKey
(
"e"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的有限日期不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"e"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的有限日期不能为空"
);
}
if
(!
temp
.
containsKey
(
"f"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的上传时间不能为空"
);
}
if
(!
temp
.
containsKey
(
"g"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的是否删除不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"g"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的是否删除不能为空"
);
}
}
//检查excel表中是否有重复人员编号
/*int size = listMap.size();
Set<String> accountSet = new HashSet<>(size);
for (int i = 0; i < size; i++) {
Map<String, Object> temp = listMap.get(i);
accountSet.add((String) temp.get("b"));
}
if (accountSet.size() != size) {
return ResponseData.error("文件中有重复的用户账号,请确认用户账号不能重复!");
}*/
}
catch
(
Exception
e
)
{
log
.
error
(
"兑换券信息导入异常"
,
e
.
getMessage
());
return
ResponseData
.
error
(
"导入异常!"
);
}
int
number
=
0
;
Date
acceptDate
=
new
Date
();
for
(
int
i
=
1
;
i
<
listMap
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
listMap
.
get
(
i
);
YxtCoupon
yxt
=
new
YxtCoupon
();
String
cardNumber
=
map
.
get
(
"a"
).
toString
();
yxt
.
setCardNumber
(
cardNumber
);
String
password
=
map
.
get
(
"b"
).
toString
();
yxt
.
setPassword
(
password
);
String
state
=
map
.
get
(
"c"
).
toString
();
if
(
state
.
equals
(
"未售出"
)){
yxt
.
setState
(
1
);
}
else
if
(
state
.
equals
(
"已售出"
)){
yxt
.
setState
(
2
);
}
else
{
yxt
.
setState
(
3
);
}
String
shelfState
=
map
.
get
(
"d"
).
toString
();
if
(
shelfState
.
equals
(
"已上架"
)){
yxt
.
setShelfState
(
1
);
}
else
{
yxt
.
setShelfState
(
2
);
}
Date
validityPeriod
=
DateUtil
.
parse
(
map
.
get
(
"e"
).
toString
(),
"yyyy-mm-dd"
);
yxt
.
setValidityPeriod
(
validityPeriod
);
yxt
.
setUpdateDate
(
DateUtil
.
parse
((
new
Date
()).
toString
(),
"yyyy-mm-dd"
));
String
delFlag
=
map
.
get
(
"f"
).
toString
();
if
(
delFlag
.
equals
(
"未删除"
)){
yxt
.
setDelFlag
(
0
);
}
else
{
yxt
.
setDelFlag
(
1
);
}
Integer
integer
=
yxtCouponMapper
.
insert
(
yxt
);
if
(
integer
==
1
)
{
number
++;
}
else
{
error
.
append
(
"第"
+
(
i
+
1
)
+
"行的更新失败,"
);
}
}
error
.
append
(
"成功更新"
+
number
+
"条数据!"
);
return
ResponseData
.
success
(
error
.
toString
(),
"导入完成"
);
}
}
service-manager/src/main/java/com/winsun/controller/zjlSalaryController.java
0 → 100644
View file @
82642895
package
com
.
winsun
.
controller
;
import
com.baomidou.mybatisplus.enums.SqlLike
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.winsun.auth.core.annotion.Permission
;
import
com.winsun.auth.core.base.controller.BaseController
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.shiro.ShiroUser
;
import
com.winsun.auth.core.util.IOUtils
;
import
com.winsun.bean.ManagerKpi
;
import
com.winsun.bean.ZjlWage
;
import
com.winsun.mapper.ManagerKpiMapper
;
import
com.winsun.mapper.ZjlWageMapper
;
import
com.winsun.utils.ExcelDealUtils
;
import
com.winsun.utils.ImportExcel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.util.CellRangeAddressList
;
import
org.apache.poi.xssf.usermodel.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.util.*
;
/**
* 总经理薪酬管理
* @Author: pxl
* @create 2020/4/29 14:08
*/
@Slf4j
@RestController
@RequestMapping
(
"/zjlWage"
)
public
class
zjlSalaryController
extends
BaseController
{
/**
* 导入
*/
private
static
final
int
HEADER_NUM
=
-
1
;
private
static
final
int
SHEET_INDEX
=
0
;
/**
* 总经理薪酬信息模板列名
*/
private
static
String
SL_month
=
"月份"
;
private
static
String
SL_department
=
"归属"
;
private
static
String
SL_name
=
"姓名"
;
private
static
String
SL_idCard
=
"身份证"
;
private
static
String
SL_company
=
"分公司"
;
private
static
String
SL_attribute
=
"属性"
;
private
static
String
SL_positionWage
=
"岗位工资"
;
private
static
String
SL_performanceBonus
=
"绩效奖金\n(绩效工资+提成)"
;
private
static
String
SL_specialBonus
=
"专项奖"
;
private
static
String
SL_yearEndBonus
=
"年终奖"
;
private
static
String
SL_festivalFee
=
"节日费(元旦,春节,五一,十一)"
;
private
static
String
SL_highSubsidy
=
"高温补贴(6-10月)"
;
private
static
String
SL_correspondenceSubsidy
=
"通讯补贴"
;
private
static
String
SL_tableMoneySubsidy
=
"餐费补贴"
;
private
static
String
SL_trafficSubsidy
=
"交通补贴"
;
private
static
String
SL_specialBonusAutumn
=
"专项奖(秋营奖励)"
;
private
static
String
SL_otherSubsidy
=
"其他补扣补退"
;
private
static
String
SL_endowmentInsurancePersonal
=
"个人养老保险"
;
private
static
String
SL_unenploymentInsurancePersonal
=
"个人缴纳失业保险"
;
private
static
String
SL_medicarePersonal
=
"个人缴纳医疗保险"
;
private
static
String
SL_reservedFund
=
"个人缴纳住房公积金"
;
private
static
String
SL_reservedFundTax
=
"个税"
;
private
static
String
SL_yearEndBonusTax
=
"年终奖个税"
;
private
static
String
SL_otherFeePersonal
=
"个人其他补交补退"
;
private
static
String
SL_duesPersonal
=
"个人工会费"
;
private
static
String
SL_endowmentInsuranceUnit
=
"单位养老保险"
;
private
static
String
SL_unenploymentInsuranceUnit
=
"单位失业保险"
;
private
static
String
SL_medicareUnit
=
"单位医疗保险"
;
private
static
String
SL_employmentInjuryInsuranceUnit
=
"单位工伤保险"
;
private
static
String
SL_birthInsuranceUnit
=
"单位生育保险"
;
private
static
String
SL_illnessInsuranceUnit
=
"重大疾病保险"
;
private
static
String
SL_reservedFundUnit
=
"单位公积金"
;
private
static
String
SL_laborUnionFeeUnit
=
"工会计提"
;
private
static
String
SL_accidentInsuranceUnit
=
"商业意外险"
;
private
static
String
SL_disabilityInsuranceUnit
=
"残保金"
;
private
static
String
SL_otherFeeUnit
=
"单位其他补交补退"
;
private
static
String
SL_additionMsg
=
"附加信息"
;
private
static
String
SL_manageFee
=
"邮电人才服务管理费(200/人)"
;
private
static
String
SL_endowmentInsurancePersonal2
=
"个人缴纳养老保险2"
;
private
static
String
SL_unenploymentInsurancePersonal2
=
"个人缴纳失业保险2"
;
private
static
String
SL_medicarePersonal2
=
"个人缴纳医疗保险2"
;
private
static
String
SL_resveredFundPersonal2
=
"个人缴纳住房公积金2"
;
private
static
String
SL_endowmentInsuranceUnit2
=
"单位养老保险2"
;
private
static
String
SL_unenploymentInsuranceUnit2
=
"单位失业保险2"
;
private
static
String
SL_medicareUnit2
=
"单位医疗保险2"
;
private
static
String
SL_employmentInjuryInsuranceUnit2
=
"单位工伤保险2"
;
private
static
String
SL_birthInsuranceUnit2
=
"单位生育保险2"
;
private
static
String
SL_illnessInsuranceUnit2
=
"重大疾病保险企业缴纳2"
;
private
static
String
SL_reservedInsuranceUnit2
=
"单位住房公积金2"
;
private
static
String
SL_wage
=
"本月计税工资"
;
private
static
String
SL_wageTax
=
"本月抵税扣除"
;
private
static
String
SL_wageTaxAfter
=
"本月工资抵税"
;
private
static
String
SL_lastYearEndBonus
=
"年终奖应税"
;
private
static
String
SL_lastYearEndBonusTax
=
"年终奖个税计算"
;
private
static
String
SL_bankAccount
=
"银行账号"
;
private
static
String
SL_isDuDao
=
"是否督导"
;
@Autowired
private
ZjlWageMapper
zjlWageMapper
;
@Autowired
private
ManagerKpiMapper
managerKpiMapper
;
@Autowired
@Qualifier
(
"redisStringTemplate"
)
private
RedisTemplate
redisTemplate
;
/**
* 总经理薪酬删除
* @param id 需要删除的id
* @return
*/
@Permission
(
menuname
=
"删除总经理薪酬信息"
,
value
=
"delete"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
false
)
Integer
id
)
{
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
}
if
(
StringUtils
.
isNotBlank
(
id
.
toString
())){
zjlWageMapper
.
deleteById
(
id
);
return
ResponseData
.
success
(
"操作成功!"
);
}
return
ResponseData
.
error
(
"删除id不能为空!"
);
}
/**
* 修改总经理薪酬信息
* @param zjlKpi 编辑对象json字符串
* @return
*/
/*@Permission(menuname = "修改总经理薪酬信息", value = "update", method = RequestMethod.POST)
public ResponseData<String> update(@RequestParam("zjlKpi") String zjlKpi) {
ShiroUser user = getShiroUser();
if (!user.getRoleNames().stream().anyMatch(roleName -> StringUtils.equalsAny(roleName, "超级管理员"))) {
return ResponseData.error("无数据权限");
}
LzKpi pro = JSON.parseObject(zjlKpi, LzKpi.class);
Wrapper wrapper = new EntityWrapper<>();
wrapper.eq("id", pro.getId());
Map<String, Object> dataMapping = new HashMap<>();
dataMapping.put("report_daily", pro.getReportDaily());
dataMapping.put("collective_sales", pro.getCollectiveSales());
dataMapping.put("weekly_meeting", pro.getWeeklyMeeting());
dataMapping.put("organ_training", pro.getOrganTraining());
dataMapping.put("design_plan", pro.getDesignPlan());
dataMapping.put("kpi", pro.getKpi());
dataMapping.put("user_id", pro.getUserId());
dataMapping.put("month", pro.getMonth());
dataMapping.put("is_Del", pro.getIsDel());
ZjlWageMapper.updateForSet(MyBatisPlusUpdateUtils.toUpdateSet(dataMapping), wrapper);
return ResponseData.success("修改成功!");
}*/
/**
* @param name
* @param month
* @param pageNo
* @param pageSize
* @return
*/
@Permission
(
menuname
=
"查询总经理薪酬信息"
,
value
=
"list"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Page
<
ZjlWage
>>
listProduct
(
@RequestParam
(
name
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
name
=
"month"
,
required
=
false
)
String
month
,
@RequestParam
(
name
=
"pageNo"
)
int
pageNo
,
@RequestParam
(
name
=
"pageSize"
)
int
pageSize
)
{
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
}
Page
<
ZjlWage
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
List
<
ZjlWage
>
dataList
=
new
LinkedList
<>();
Wrapper
<
ZjlWage
>
wrapper
=
new
EntityWrapper
();
wrapper
.
like
(
StringUtils
.
isNotBlank
(
name
),
"name"
,
name
,
SqlLike
.
DEFAULT
);
if
(
StringUtils
.
isNotBlank
(
month
)){
String
[]
months
=
month
.
split
(
"\\,"
);
if
(!
month
.
equals
(
","
)
&&
StringUtils
.
isNotEmpty
(
month
)){
String
m1
=
months
[
0
].
substring
(
0
,
7
);
String
month1
=
m1
.
substring
(
0
,
4
)
+
m1
.
substring
(
5
);
String
m2
=
months
[
1
].
substring
(
0
,
7
);
String
month2
=
m2
.
substring
(
0
,
4
)
+
m2
.
substring
(
5
);
wrapper
.
ge
(
StringUtils
.
isNotBlank
(
month1
),
"month"
,
month1
);
wrapper
.
le
(
StringUtils
.
isNotBlank
(
month2
),
"month"
,
month2
);
}
}
List
<
ZjlWage
>
zjlWages
=
zjlWageMapper
.
selectList
(
wrapper
);
if
(
zjlWages
.
size
()==
0
){
page
.
setRecords
(
null
);
page
.
setTotal
(
0
);
return
ResponseData
.
success
(
page
,
"没有数据!"
);
}
if
(
zjlWages
.
size
()
<
pageSize
)
{
dataList
=
zjlWages
;
}
else
{
dataList
=
zjlWages
.
subList
((
pageNo
-
1
)*
pageSize
,
pageNo
*
pageSize
);
}
page
.
setRecords
(
dataList
);
page
.
setTotal
(
zjlWages
.
size
());
return
ResponseData
.
success
(
page
,
"查询成功!"
);
}
/**
* @param month
* @param pageNo
* @param pageSize
* @return
*/
@Permission
(
menuname
=
"导出总经理薪酬信息"
,
value
=
"excelOut"
,
method
=
RequestMethod
.
POST
)
public
void
excelOut
(
@RequestParam
(
name
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
name
=
"month"
,
required
=
false
)
String
month
,
@RequestParam
(
name
=
"pageNo"
)
int
pageNo
,
@RequestParam
(
name
=
"pageSize"
)
int
pageSize
)
throws
IOException
{
ShiroUser
user
=
getShiroUser
();
List
<
Map
<
String
,
Object
>>
list
=
new
LinkedList
<>();
Wrapper
<
ZjlWage
>
wrapper
=
new
EntityWrapper
();
wrapper
.
like
(
StringUtils
.
isNotBlank
(
name
),
"name"
,
name
,
SqlLike
.
DEFAULT
);
if
(
StringUtils
.
isNotBlank
(
month
)){
String
[]
months
=
month
.
split
(
"\\,"
);
if
(!
month
.
equals
(
","
)
&&
StringUtils
.
isNotEmpty
(
month
)){
String
m1
=
months
[
0
].
substring
(
0
,
7
);
String
month1
=
m1
.
substring
(
0
,
4
)
+
m1
.
substring
(
5
);
String
m2
=
months
[
1
].
substring
(
0
,
7
);
String
month2
=
m2
.
substring
(
0
,
4
)
+
m2
.
substring
(
5
);
wrapper
.
ge
(
StringUtils
.
isNotBlank
(
month1
),
"month"
,
month1
);
wrapper
.
le
(
StringUtils
.
isNotBlank
(
month2
),
"month"
,
month2
);
}
}
List
<
ZjlWage
>
zjlWages
=
zjlWageMapper
.
selectList
(
wrapper
);
if
(
zjlWages
.
size
()==
0
){
log
.
error
(
"查询数据为空!"
);
}
for
(
ZjlWage
zjlWage
:
zjlWages
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
zjlWage
.
getId
());
map
.
put
(
"month"
,
zjlWage
.
getMonth
());
map
.
put
(
"department"
,
zjlWage
.
getDepartment
());
map
.
put
(
"name"
,
zjlWage
.
getName
());
map
.
put
(
"idCard"
,
zjlWage
.
getIdCard
());
map
.
put
(
"company"
,
zjlWage
.
getCompany
());
map
.
put
(
"attribute"
,
zjlWage
.
getAttribute
());
map
.
put
(
"positionWage"
,
zjlWage
.
getPositionWage
());
map
.
put
(
"performanceBonus"
,
zjlWage
.
getPerformanceBonus
());
map
.
put
(
"specialBonus"
,
zjlWage
.
getSpecialBonus
());
map
.
put
(
"yearEndBonus"
,
zjlWage
.
getYearEndBonus
());
map
.
put
(
"festivalFee"
,
zjlWage
.
getFestivalFee
());
map
.
put
(
"highSubsidy"
,
zjlWage
.
getHighSubsidy
());
map
.
put
(
"correspondenceSubsidy"
,
zjlWage
.
getCorrespondenceSubsidy
());
map
.
put
(
"tableMoneySubsidy"
,
zjlWage
.
getTableMoneySubsidy
());
map
.
put
(
"trafficSubsidy"
,
zjlWage
.
getTrafficSubsidy
());
map
.
put
(
"specialBonusAutumn"
,
zjlWage
.
getSpecialBonusAutumn
());
map
.
put
(
"otherSubsidy"
,
zjlWage
.
getOtherSubsidy
());
map
.
put
(
"totalYf"
,
zjlWage
.
getTotalYf
());
map
.
put
(
"endowmentInsurancePersonal"
,
zjlWage
.
getEndowmentInsurancePersonal
());
map
.
put
(
"unenploymentInsurancePersonal"
,
zjlWage
.
getUnenploymentInsurancePersonal
());
map
.
put
(
"medicarePersonal"
,
zjlWage
.
getMedicarePersonal
());
map
.
put
(
"totalInsurance"
,
zjlWage
.
getTotalInsurance
());
map
.
put
(
"reservedFund"
,
zjlWage
.
getReservedFund
());
map
.
put
(
"reservedFundTax"
,
zjlWage
.
getReservedFundTax
());
map
.
put
(
"yearEndBonusTax"
,
zjlWage
.
getYearEndBonusTax
());
map
.
put
(
"otherFeePersonal"
,
zjlWage
.
getOtherFeePersonal
());
map
.
put
(
"duesPersonal"
,
zjlWage
.
getDuesPersonal
());
map
.
put
(
"totalFeePersonal"
,
zjlWage
.
getTotalFeePersonal
());
map
.
put
(
"totalSf"
,
zjlWage
.
getTotalSf
());
map
.
put
(
"endowmentInsuranceUnit"
,
zjlWage
.
getEndowmentInsuranceUnit
());
map
.
put
(
"unenploymentInsuranceUnit"
,
zjlWage
.
getUnenploymentInsuranceUnit
());
map
.
put
(
"medicareUnit"
,
zjlWage
.
getMedicareUnit
());
map
.
put
(
"employmentInjuryInsuranceUnit"
,
zjlWage
.
getEmploymentInjuryInsuranceUnit
());
map
.
put
(
"birthInsuranceUnit"
,
zjlWage
.
getBirthInsuranceUnit
());
map
.
put
(
"illnessInsuranceUnit"
,
zjlWage
.
getIllnessInsuranceUnit
());
map
.
put
(
"reservedFundUnit"
,
zjlWage
.
getReservedFundUnit
());
map
.
put
(
"laborUnionFeeUnit"
,
zjlWage
.
getLaborUnionFeeUnit
());
map
.
put
(
"accidentInsuranceUnit"
,
zjlWage
.
getAccidentInsuranceUnit
());
map
.
put
(
"disabilityInsuranceUnit"
,
zjlWage
.
getDisabilityInsuranceUnit
());
map
.
put
(
"otherFeeUnit"
,
zjlWage
.
getOtherFeeUnit
());
map
.
put
(
"totalFeeUnit"
,
zjlWage
.
getTotalFeeUnit
());
map
.
put
(
"totalCastPersonal"
,
zjlWage
.
getTotalCastPersonal
());
map
.
put
(
"additionMsg"
,
zjlWage
.
getAdditionMsg
());
map
.
put
(
"manageFee"
,
zjlWage
.
getManageFee
());
map
.
put
(
"totalCastUnit"
,
zjlWage
.
getTotalCastUnit
());
map
.
put
(
"endowmentInsurancePersonal2"
,
zjlWage
.
getEndowmentInsurancePersonal2
());
map
.
put
(
"unenploymentInsurancePersonal2"
,
zjlWage
.
getUnenploymentInsurancePersonal2
());
map
.
put
(
"medicarePersonal2"
,
zjlWage
.
getMedicarePersonal2
());
map
.
put
(
"resveredFundPersonal2"
,
zjlWage
.
getResveredFundPersonal2
());
map
.
put
(
"endowmentInsuranceUnit2"
,
zjlWage
.
getEndowmentInsuranceUnit2
());
map
.
put
(
"unenploymentInsuranceUnit2"
,
zjlWage
.
getUnenploymentInsuranceUnit2
());
map
.
put
(
"medicareUnit2"
,
zjlWage
.
getMedicareUnit2
());
map
.
put
(
"employmentInjuryInsuranceUnit2"
,
zjlWage
.
getEmploymentInjuryInsuranceUnit2
());
map
.
put
(
"birthInsuranceUnit2"
,
zjlWage
.
getBirthInsuranceUnit2
());
map
.
put
(
"illnessInsuranceUnit2"
,
zjlWage
.
getIllnessInsuranceUnit2
());
map
.
put
(
"reservedInsuranceUnit2"
,
zjlWage
.
getReservedInsuranceUnit2
());
map
.
put
(
"totalInsuranceUnit2"
,
zjlWage
.
getTotalInsuranceUnit2
());
map
.
put
(
"wage"
,
zjlWage
.
getWage
());
map
.
put
(
"wageTax"
,
zjlWage
.
getWageTax
());
map
.
put
(
"wageTaxAfter"
,
zjlWage
.
getWageTaxAfter
());
map
.
put
(
"lastYearEndBonus"
,
zjlWage
.
getLastYearEndBonus
());
map
.
put
(
"lastYearEndBonusTax"
,
zjlWage
.
getLastYearEndBonusTax
());
map
.
put
(
"bankAccount"
,
zjlWage
.
getBankAccount
());
map
.
put
(
"managerCast"
,
zjlWage
.
getManagerCast
());
map
.
put
(
"xzCompanyCast"
,
zjlWage
.
getXzCompanyCast
());
list
.
add
(
map
);
}
ServletOutputStream
os
=
null
;
XSSFWorkbook
workbook
=
ExcelDealUtils
.
getWorkBook
(
ExcelDealUtils
.
zjlWageExcel
(
"总经理薪酬清单"
),
list
);
try
{
HttpServletResponse
response
=
getHttpServletResponse
();
response
.
reset
();
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"application/octet-stream"
);
os
=
response
.
getOutputStream
();
workbook
.
write
(
os
);
os
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
"文件出错!"
+
e
.
getMessage
(),
e
);
}
finally
{
IOUtils
.
closeQuite
(
workbook
,
os
);
}
}
/**
* 受理订单模板下载
*
* @return
*/
@Permission
(
menuname
=
"总经理总经理薪酬管理信息导入模板"
,
method
=
RequestMethod
.
POST
,
value
=
"downloadMoBan"
)
public
ResponseData
downloadMoBan
()
{
ArrayList
<
String
>
columns
=
new
ArrayList
<>();
columns
.
add
(
SL_month
);
columns
.
add
(
SL_department
);
columns
.
add
(
SL_name
);
columns
.
add
(
SL_idCard
);
columns
.
add
(
SL_company
);
columns
.
add
(
SL_attribute
);
columns
.
add
(
SL_positionWage
);
columns
.
add
(
SL_performanceBonus
);
columns
.
add
(
SL_specialBonus
);
columns
.
add
(
SL_yearEndBonus
);
columns
.
add
(
SL_festivalFee
);
columns
.
add
(
SL_highSubsidy
);
columns
.
add
(
SL_correspondenceSubsidy
);
columns
.
add
(
SL_tableMoneySubsidy
);
columns
.
add
(
SL_trafficSubsidy
);
columns
.
add
(
SL_specialBonusAutumn
);
columns
.
add
(
SL_otherSubsidy
);
columns
.
add
(
SL_endowmentInsurancePersonal
);
columns
.
add
(
SL_unenploymentInsurancePersonal
);
columns
.
add
(
SL_medicarePersonal
);
columns
.
add
(
SL_reservedFund
);
columns
.
add
(
SL_reservedFundTax
);
columns
.
add
(
SL_yearEndBonusTax
);
columns
.
add
(
SL_otherFeePersonal
);
columns
.
add
(
SL_duesPersonal
);
columns
.
add
(
SL_endowmentInsuranceUnit
);
columns
.
add
(
SL_unenploymentInsuranceUnit
);
columns
.
add
(
SL_medicareUnit
);
columns
.
add
(
SL_employmentInjuryInsuranceUnit
);
columns
.
add
(
SL_birthInsuranceUnit
);
columns
.
add
(
SL_illnessInsuranceUnit
);
columns
.
add
(
SL_reservedFundUnit
);
columns
.
add
(
SL_laborUnionFeeUnit
);
columns
.
add
(
SL_accidentInsuranceUnit
);
columns
.
add
(
SL_disabilityInsuranceUnit
);
columns
.
add
(
SL_otherFeeUnit
);
columns
.
add
(
SL_additionMsg
);
columns
.
add
(
SL_manageFee
);
columns
.
add
(
SL_endowmentInsurancePersonal2
);
columns
.
add
(
SL_unenploymentInsurancePersonal2
);
columns
.
add
(
SL_medicarePersonal2
);
columns
.
add
(
SL_resveredFundPersonal2
);
columns
.
add
(
SL_endowmentInsuranceUnit2
);
columns
.
add
(
SL_unenploymentInsuranceUnit2
);
columns
.
add
(
SL_medicareUnit2
);
columns
.
add
(
SL_employmentInjuryInsuranceUnit2
);
columns
.
add
(
SL_birthInsuranceUnit2
);
columns
.
add
(
SL_illnessInsuranceUnit2
);
columns
.
add
(
SL_reservedInsuranceUnit2
);
columns
.
add
(
SL_wage
);
columns
.
add
(
SL_wageTax
);
columns
.
add
(
SL_wageTaxAfter
);
columns
.
add
(
SL_lastYearEndBonus
);
columns
.
add
(
SL_lastYearEndBonusTax
);
columns
.
add
(
SL_bankAccount
);
columns
.
add
(
SL_isDuDao
);
ServletOutputStream
os
=
null
;
XSSFWorkbook
workbook
=
new
XSSFWorkbook
();
try
{
//创建工作表
XSSFSheet
sheet
=
workbook
.
createSheet
(
"总经理总经理薪酬管理信息"
);
sheet
.
setColumnWidth
(
0
,
3000
);
sheet
.
setColumnWidth
(
1
,
3000
);
sheet
.
setColumnWidth
(
2
,
5000
);
sheet
.
setColumnWidth
(
3
,
3000
);
sheet
.
setColumnWidth
(
4
,
3000
);
sheet
.
setColumnWidth
(
5
,
3000
);
sheet
.
setColumnWidth
(
6
,
3000
);
sheet
.
setColumnWidth
(
7
,
3000
);
sheet
.
setColumnWidth
(
8
,
3000
);
sheet
.
setColumnWidth
(
9
,
3000
);
sheet
.
setColumnWidth
(
10
,
3000
);
sheet
.
setColumnWidth
(
11
,
3000
);
sheet
.
setColumnWidth
(
12
,
5000
);
sheet
.
setColumnWidth
(
13
,
3000
);
sheet
.
setColumnWidth
(
14
,
3000
);
sheet
.
setColumnWidth
(
15
,
3000
);
sheet
.
setColumnWidth
(
16
,
3000
);
sheet
.
setColumnWidth
(
17
,
3000
);
sheet
.
setColumnWidth
(
18
,
3000
);
sheet
.
setColumnWidth
(
19
,
3000
);
sheet
.
setColumnWidth
(
20
,
3000
);
sheet
.
setColumnWidth
(
21
,
3000
);
sheet
.
setColumnWidth
(
22
,
5000
);
sheet
.
setColumnWidth
(
23
,
3000
);
sheet
.
setColumnWidth
(
24
,
3000
);
sheet
.
setColumnWidth
(
25
,
3000
);
sheet
.
setColumnWidth
(
26
,
3000
);
sheet
.
setColumnWidth
(
27
,
3000
);
sheet
.
setColumnWidth
(
28
,
3000
);
sheet
.
setColumnWidth
(
29
,
3000
);
sheet
.
setColumnWidth
(
30
,
3000
);
sheet
.
setColumnWidth
(
31
,
3000
);
sheet
.
setColumnWidth
(
32
,
5000
);
sheet
.
setColumnWidth
(
33
,
3000
);
sheet
.
setColumnWidth
(
34
,
3000
);
sheet
.
setColumnWidth
(
35
,
3000
);
sheet
.
setColumnWidth
(
36
,
3000
);
sheet
.
setColumnWidth
(
37
,
3000
);
sheet
.
setColumnWidth
(
38
,
3000
);
sheet
.
setColumnWidth
(
39
,
3000
);
sheet
.
setColumnWidth
(
40
,
3000
);
sheet
.
setColumnWidth
(
41
,
3000
);
sheet
.
setColumnWidth
(
42
,
5000
);
sheet
.
setColumnWidth
(
43
,
3000
);
sheet
.
setColumnWidth
(
44
,
3000
);
sheet
.
setColumnWidth
(
45
,
3000
);
sheet
.
setColumnWidth
(
46
,
3000
);
sheet
.
setColumnWidth
(
47
,
3000
);
sheet
.
setColumnWidth
(
48
,
3000
);
sheet
.
setColumnWidth
(
49
,
3000
);
sheet
.
setColumnWidth
(
50
,
3000
);
sheet
.
setColumnWidth
(
51
,
3000
);
sheet
.
setColumnWidth
(
52
,
5000
);
sheet
.
setColumnWidth
(
53
,
3000
);
sheet
.
setColumnWidth
(
54
,
3000
);
sheet
.
setColumnWidth
(
55
,
3000
);
//下拉选项
/*List<String> fengju = new ArrayList<>();
fengju.add("受理不成功");
fengju.add("受理成功");
sheet = this.getXSSFSheet(sheet, fengju, 1, 1);*/
//添加表头
final
XSSFRow
row
=
sheet
.
createRow
(
0
);
XSSFCellStyle
cellStyle
=
workbook
.
createCellStyle
();
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
columns
.
forEach
(
val
->
{
XSSFCell
cell
=
row
.
createCell
(
Math
.
max
(
row
.
getLastCellNum
(),
0
));
cell
.
setCellValue
(
val
);
});
HttpServletResponse
response
=
getHttpServletResponse
();
response
.
reset
();
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"application/vnd.ms-excel"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName=data.xlsx"
);
os
=
response
.
getOutputStream
();
workbook
.
write
(
os
);
os
.
flush
();
}
catch
(
IOException
e
)
{
log
.
error
(
"总经理总经理薪酬管理信息模板文件出错!"
+
e
.
getMessage
(),
e
);
}
finally
{
IOUtils
.
closeQuite
(
workbook
,
os
);
}
return
ResponseData
.
error
(
"总经理总经理薪酬管理信息模板出错"
);
}
XSSFSheet
getXSSFSheet
(
XSSFSheet
sheet
,
List
<
String
>
datas
,
int
firstcol
,
int
lastcol
)
{
if
(
datas
.
size
()
==
0
)
{
return
sheet
;
}
String
[]
strdata
=
new
String
[
datas
.
size
()];
for
(
int
i
=
0
;
i
<
datas
.
size
();
i
++)
{
strdata
[
i
]
=
datas
.
get
(
i
);
}
XSSFDataValidationHelper
dvHelper
=
new
XSSFDataValidationHelper
(
sheet
);
XSSFDataValidationConstraint
dvConstraint1
=
(
XSSFDataValidationConstraint
)
dvHelper
.
createExplicitListConstraint
(
strdata
);
CellRangeAddressList
addressList
=
new
CellRangeAddressList
(
1
,
20000
,
firstcol
,
lastcol
);
XSSFDataValidation
validation
=
(
XSSFDataValidation
)
dvHelper
.
createValidation
(
dvConstraint1
,
addressList
);
sheet
.
addValidationData
(
validation
);
return
sheet
;
}
/**
* 受理订单
*
* @param file 上传的数据文件
* @return
*/
@Permission
(
menuname
=
"上传数据"
,
value
=
"importDate"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
updateDatas
(
@RequestParam
(
name
=
"file"
)
MultipartFile
file
)
{
StringBuffer
error
=
new
StringBuffer
();
if
(!
StringUtils
.
endsWithAny
(
file
.
getOriginalFilename
(),
"xlsx"
,
"xls"
))
{
return
ResponseData
.
error
(
"手工上传数据仅支持Excel文件,其他格式不支持!"
);
}
ShiroUser
user
=
getShiroUser
();
// 当前是否有数据权限
boolean
hasDataPermission
=
user
.
getRoleNames
().
stream
().
anyMatch
(
data
->
StringUtils
.
equalsAny
(
data
,
"活动上单员"
,
"数据管理员"
,
"超级管理员"
));
if
(!
hasDataPermission
)
{
return
ResponseData
.
error
(
"无数据权限!"
);
}
ImportExcel
importExcel
=
null
;
try
{
importExcel
=
new
ImportExcel
(
file
,
HEADER_NUM
,
SHEET_INDEX
);
}
catch
(
Exception
e
)
{
log
.
error
(
"总经理总经理薪酬管理信息导入异常"
,
e
.
getMessage
());
return
ResponseData
.
error
(
"导入异常!"
);
}
List
<
Map
<
String
,
Object
>>
listMap
=
importExcel
.
getDataListMap
();
if
(
listMap
.
size
()
==
1
)
{
return
ResponseData
.
error
(
"文件不能为空"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"a"
).
toString
().
equals
(
SL_month
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"b"
).
toString
().
equals
(
SL_department
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"c"
).
toString
().
equals
(
SL_name
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"d"
).
toString
().
equals
(
SL_idCard
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"e"
).
toString
().
equals
(
SL_company
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"f"
).
toString
().
equals
(
SL_attribute
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"g"
).
toString
().
equals
(
SL_positionWage
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"h"
).
toString
().
equals
(
SL_performanceBonus
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"i"
).
toString
().
equals
(
SL_specialBonus
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"j"
).
toString
().
equals
(
SL_yearEndBonus
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"k"
).
toString
().
equals
(
SL_festivalFee
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"l"
).
toString
().
equals
(
SL_highSubsidy
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"m"
).
toString
().
equals
(
SL_correspondenceSubsidy
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"n"
).
toString
().
equals
(
SL_tableMoneySubsidy
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"o"
).
toString
().
equals
(
SL_trafficSubsidy
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"p"
).
toString
().
equals
(
SL_specialBonusAutumn
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"q"
).
toString
().
equals
(
SL_otherSubsidy
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"r"
).
toString
().
equals
(
SL_endowmentInsurancePersonal
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"s"
).
toString
().
equals
(
SL_unenploymentInsurancePersonal
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"t"
).
toString
().
equals
(
SL_medicarePersonal
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"u"
).
toString
().
equals
(
SL_reservedFund
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"v"
).
toString
().
equals
(
SL_reservedFundTax
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"w"
).
toString
().
equals
(
SL_yearEndBonusTax
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"x"
).
toString
().
equals
(
SL_otherFeePersonal
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"y"
).
toString
().
equals
(
SL_duesPersonal
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"z"
).
toString
().
equals
(
SL_endowmentInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"aa"
).
toString
().
equals
(
SL_unenploymentInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ab"
).
toString
().
equals
(
SL_medicareUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ac"
).
toString
().
equals
(
SL_employmentInjuryInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ad"
).
toString
().
equals
(
SL_birthInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ae"
).
toString
().
equals
(
SL_illnessInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"af"
).
toString
().
equals
(
SL_reservedFundUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ag"
).
toString
().
equals
(
SL_laborUnionFeeUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ah"
).
toString
().
equals
(
SL_accidentInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ai"
).
toString
().
equals
(
SL_disabilityInsuranceUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"aj"
).
toString
().
equals
(
SL_otherFeeUnit
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ak"
).
toString
().
equals
(
SL_additionMsg
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"al"
).
toString
().
equals
(
SL_manageFee
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"am"
).
toString
().
equals
(
SL_endowmentInsurancePersonal2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"an"
).
toString
().
equals
(
SL_unenploymentInsurancePersonal2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ao"
).
toString
().
equals
(
SL_medicarePersonal2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ap"
).
toString
().
equals
(
SL_resveredFundPersonal2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"aq"
).
toString
().
equals
(
SL_endowmentInsuranceUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ar"
).
toString
().
equals
(
SL_unenploymentInsuranceUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"as"
).
toString
().
equals
(
SL_medicareUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"at"
).
toString
().
equals
(
SL_employmentInjuryInsuranceUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"au"
).
toString
().
equals
(
SL_birthInsuranceUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"av"
).
toString
().
equals
(
SL_illnessInsuranceUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"aw"
).
toString
().
equals
(
SL_reservedInsuranceUnit2
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ax"
).
toString
().
equals
(
SL_wage
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ay"
).
toString
().
equals
(
SL_wageTax
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"az"
).
toString
().
equals
(
SL_wageTaxAfter
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"ba"
).
toString
().
equals
(
SL_lastYearEndBonus
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"bb"
).
toString
().
equals
(
SL_lastYearEndBonusTax
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"bc"
).
toString
().
equals
(
SL_bankAccount
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
if
(!
listMap
.
get
(
0
).
get
(
"bd"
).
toString
().
equals
(
SL_isDuDao
))
{
return
ResponseData
.
error
(
"模板不对,请选择正确的模板!"
);
}
List
<
String
>
accountList
=
new
LinkedList
<>();
List
<
String
>
userNameList
=
new
LinkedList
<>();
List
<
Map
<
String
,
Object
>>
sysUserList
=
new
LinkedList
<>();
//校验数据
try
{
//校验数据
for
(
int
i
=
1
;
i
<
listMap
.
size
();
i
++)
{
Map
<
String
,
Object
>
temp
=
listMap
.
get
(
i
);
if
(!
temp
.
containsKey
(
"a"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的月份不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"a"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的月份不能为空"
);
}
if
(!
temp
.
containsKey
(
"b"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的归属不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"b"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的归属不能为空"
);
}
if
(!
temp
.
containsKey
(
"c"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的姓名不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"c"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的姓名不能为空"
);
}
if
(!
temp
.
containsKey
(
"d"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的身份证不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"d"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的身份证不能为空"
);
}
if
(!
temp
.
containsKey
(
"e"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的分公司不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"e"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的分公司不能为空"
);
}
if
(!
temp
.
containsKey
(
"f"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的属性不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"f"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的属性不能为空"
);
}
if
(!
temp
.
containsKey
(
"g"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的岗位工资不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"g"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的岗位工资不能为空"
);
}
if
(!
temp
.
containsKey
(
"h"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的绩效奖金不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"h"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的绩效奖金不能为空"
);
}
if
(!
temp
.
containsKey
(
"i"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的专项奖不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"i"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的专项奖不能为空"
);
}
if
(!
temp
.
containsKey
(
"j"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的年终奖不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("j").toString())) {
return ResponseData.error("第" + (i + 1) + "行的年终奖不能为空");
}*/
if
(!
temp
.
containsKey
(
"k"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的节日费不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("k").toString())) {
return ResponseData.error("第" + (i + 1) + "行的节日费不能为空");
}*/
if
(!
temp
.
containsKey
(
"l"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的高温补贴不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("l").toString())) {
return ResponseData.error("第" + (i + 1) + "行的高温补贴不能为空");
}*/
if
(!
temp
.
containsKey
(
"m"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的通讯补贴不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"m"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的通讯补贴不能为空"
);
}
if
(!
temp
.
containsKey
(
"n"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的餐费补贴不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"n"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的餐费补贴不能为空"
);
}
if
(!
temp
.
containsKey
(
"o"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的交通补贴不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"o"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的交通补贴不能为空"
);
}
if
(!
temp
.
containsKey
(
"p"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的专项奖(秋营奖励)不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("p").toString())) {
return ResponseData.error("第" + (i + 1) + "行的专项奖(秋营奖励)不能为空");
}*/
if
(!
temp
.
containsKey
(
"q"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的其他补扣补退不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("q").toString())) {
return ResponseData.error("第" + (i + 1) + "行的其他补扣补退不能为空");
}*/
if
(!
temp
.
containsKey
(
"r"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人养老保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("r").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人养老保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"s"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳失业保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("s").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳失业保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"t"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳医疗保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("t").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳医疗保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"u"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳住房公积金不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("u").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳住房公积金不能为空");
}*/
if
(!
temp
.
containsKey
(
"v"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个税不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("v").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个税不能为空");
}*/
if
(!
temp
.
containsKey
(
"w"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的年终奖个税不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("w").toString())) {
return ResponseData.error("第" + (i + 1) + "行的年终奖个税不能为空");
}*/
if
(!
temp
.
containsKey
(
"x"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人其他补交补退不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("x").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人其他补交补退不能为空");
}*/
if
(!
temp
.
containsKey
(
"y"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人工会费不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("y").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人工会费不能为空");
}*/
if
(!
temp
.
containsKey
(
"z"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位养老保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("z").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位养老保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"aa"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位失业保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("aa").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位失业保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"ab"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位医疗保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ab").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位医疗保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"ac"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位工伤保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ac").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位工伤保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"ad"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位生育保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ad").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位生育保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"ae"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的重大疾病保险不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ae").toString())) {
return ResponseData.error("第" + (i + 1) + "行的重大疾病保险不能为空");
}*/
if
(!
temp
.
containsKey
(
"af"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位公积金不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("af").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位公积金不能为空");
}*/
if
(!
temp
.
containsKey
(
"ag"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的工会计提不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"ag"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的工会计提不能为空"
);
}
if
(!
temp
.
containsKey
(
"ah"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的商业意外险不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"ah"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的商业意外险不能为空"
);
}
if
(!
temp
.
containsKey
(
"ai"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的残保金不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"ai"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的残保金不能为空"
);
}
if
(!
temp
.
containsKey
(
"aj"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位其他补交补退不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("aj").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位其他补交补退不能为空");
}*/
if
(!
temp
.
containsKey
(
"ak"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的附加信息不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ak").toString())) {
return ResponseData.error("第" + (i + 1) + "行的附加信息不能为空");
}*/
if
(!
temp
.
containsKey
(
"al"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的邮电人才服务管理费不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"al"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的高邮电人才服务管理费不能为空"
);
}
if
(!
temp
.
containsKey
(
"am"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳养老保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("am").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳养老保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"an"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳失业保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("an").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳失业保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"ao"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳医疗保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ao").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳医疗保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"ap"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的个人缴纳住房公积金2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ap").toString())) {
return ResponseData.error("第" + (i + 1) + "行的个人缴纳住房公积金2不能为空");
}*/
if
(!
temp
.
containsKey
(
"aq"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位养老保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("aq").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位养老保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"ar"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位失业保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ar").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位失业保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"as"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位医疗保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("as").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位医疗保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"at"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位工伤保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("at").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位工伤保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"au"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位生育保险2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("au").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位生育保险2不能为空");
}*/
if
(!
temp
.
containsKey
(
"av"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的重大疾病保险企业缴纳2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("av").toString())) {
return ResponseData.error("第" + (i + 1) + "行的重大疾病保险企业缴纳2不能为空");
}*/
if
(!
temp
.
containsKey
(
"aw"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的单位住房公积金2不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ax").toString())) {
return ResponseData.error("第" + (i + 1) + "行的单位住房公积金2不能为空");
}*/
if
(!
temp
.
containsKey
(
"ax"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的本月计税工资不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"ax"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的本月计税工资不能为空"
);
}
if
(!
temp
.
containsKey
(
"ay"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的本月抵税扣除不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"ay"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的本月抵税扣除不能为空"
);
}
if
(!
temp
.
containsKey
(
"az"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的本月工资抵税不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("bz").toString())) {
return ResponseData.error("第" + (i + 1) + "行的本月工资抵税不能为空");
}*/
if
(!
temp
.
containsKey
(
"ba"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的年终奖应税不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("ba").toString())) {
return ResponseData.error("第" + (i + 1) + "行的年终奖应税不能为空");
}*/
if
(!
temp
.
containsKey
(
"bb"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的年终奖个税计算不能为空"
);
}
/*if (StringUtils.isBlank(temp.get("bb").toString())) {
return ResponseData.error("第" + (i + 1) + "行的年终奖个税计算不能为空");
}*/
if
(!
temp
.
containsKey
(
"bc"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的银行账号不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"bc"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的银行账号不能为空"
);
}
if
(!
temp
.
containsKey
(
"bd"
))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的是否督导不能为空"
);
}
if
(
StringUtils
.
isBlank
(
temp
.
get
(
"bd"
).
toString
()))
{
return
ResponseData
.
error
(
"第"
+
(
i
+
1
)
+
"行的是否督导不能为空"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"总经理总经理薪酬管理信息导入异常"
,
e
.
getMessage
());
return
ResponseData
.
error
(
"导入异常!"
);
}
List
<
Integer
>
idList
=
new
ArrayList
<>();
Wrapper
<
ZjlWage
>
zjlWageWrapper
=
new
EntityWrapper
<>();
List
<
ZjlWage
>
zjlWages
=
zjlWageMapper
.
selectList
(
zjlWageWrapper
);
if
(
zjlWages
.
size
()>
0
){
for
(
ZjlWage
zjlWage
:
zjlWages
)
{
idList
.
add
(
zjlWage
.
getId
());
}
Wrapper
<
ZjlWage
>
zjlWrapper
=
new
EntityWrapper
<>();
zjlWrapper
.
in
(
"id"
,
idList
);
zjlWageMapper
.
delete
(
zjlWrapper
);
}
int
number
=
0
;
for
(
int
i
=
1
;
i
<
listMap
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
listMap
.
get
(
i
);
ZjlWage
zjlWage
=
new
ZjlWage
();
String
month
=
map
.
get
(
"a"
).
toString
();
zjlWage
.
setMonth
(
month
);
zjlWage
.
setDepartment
(
map
.
get
(
"b"
).
toString
());
String
name
=
map
.
get
(
"c"
).
toString
();
zjlWage
.
setName
(
name
);
zjlWage
.
setIdCard
(
map
.
get
(
"d"
).
toString
());
zjlWage
.
setCompany
(
map
.
get
(
"e"
).
toString
());
zjlWage
.
setAttribute
(
map
.
get
(
"f"
).
toString
());
//岗位工资
double
positionWage
=
Double
.
valueOf
(
map
.
get
(
"g"
).
toString
());
zjlWage
.
setPositionWage
(
positionWage
);
Wrapper
<
ManagerKpi
>
managerKpiWrapper
=
new
EntityWrapper
<>();
managerKpiWrapper
.
eq
(
"name"
,
name
);
managerKpiWrapper
.
eq
(
"month"
,
month
);
List
<
ManagerKpi
>
list
=
managerKpiMapper
.
selectList
(
managerKpiWrapper
);
ManagerKpi
managerKpi
=
null
;
if
(
list
.
size
()>
0
){
managerKpi
=
list
.
get
(
0
);
}
//绩效奖金(绩效工资+提成)没有值 就取kpi的应发绩效
double
performanceBonus
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"h"
).
toString
())){
performanceBonus
=
Double
.
valueOf
(
map
.
get
(
"h"
).
toString
());
}
else
{
if
(
managerKpi
!=
null
){
performanceBonus
=
managerKpi
.
getYfPerformance
();
}
}
zjlWage
.
setPerformanceBonus
(
performanceBonus
);
//专项奖 没有值 就取kpi的应发提成
double
specialBonus
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"i"
).
toString
())){
specialBonus
=
Double
.
valueOf
(
map
.
get
(
"i"
).
toString
());
}
else
{
if
(
managerKpi
!=
null
){
specialBonus
=
managerKpi
.
getYfBonus
();
}
}
BigDecimal
bzxj
=
new
BigDecimal
(
specialBonus
);
double
zxjl
=
bzxj
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setSpecialBonus
(
zxjl
);
//年终奖
double
yearEndBonus
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"j"
).
toString
())){
yearEndBonus
=
Double
.
valueOf
(
map
.
get
(
"j"
).
toString
());
}
zjlWage
.
setYearEndBonus
(
yearEndBonus
);
//节日费
double
festivalFee
=
Double
.
valueOf
(
map
.
get
(
"k"
).
toString
());
zjlWage
.
setFestivalFee
(
festivalFee
);
//高温补贴
double
highSubsidy
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"l"
).
toString
())){
highSubsidy
=
Double
.
valueOf
(
map
.
get
(
"l"
).
toString
());
}
zjlWage
.
setHighSubsidy
(
highSubsidy
);
//通讯补贴
double
correspondenceSubsidy
=
Double
.
valueOf
(
map
.
get
(
"m"
).
toString
());
zjlWage
.
setCorrespondenceSubsidy
(
correspondenceSubsidy
);
//餐费补贴
double
tableMoneySubsidy
=
Double
.
valueOf
(
map
.
get
(
"n"
).
toString
());
zjlWage
.
setTableMoneySubsidy
(
tableMoneySubsidy
);
//交通补贴
double
trafficSubsidy
=
Double
.
valueOf
(
map
.
get
(
"o"
).
toString
());
zjlWage
.
setTrafficSubsidy
(
trafficSubsidy
);
//专项奖(秋营奖励)
double
specialBonusAutumn
=
Double
.
valueOf
(
map
.
get
(
"p"
).
toString
());
zjlWage
.
setSpecialBonusAutumn
(
specialBonusAutumn
);
//其他补扣补退
double
otherSubsidy
=
Double
.
valueOf
(
map
.
get
(
"q"
).
toString
());
zjlWage
.
setOtherSubsidy
(
otherSubsidy
);
//个人养老保险
double
endowmentInsurancePersonal
=
Double
.
valueOf
(
map
.
get
(
"r"
).
toString
());
zjlWage
.
setEndowmentInsurancePersonal
(
endowmentInsurancePersonal
);
//个人缴纳失业保险
double
unenploymentInsurancePersonal
=
Double
.
valueOf
(
map
.
get
(
"s"
).
toString
());
zjlWage
.
setUnenploymentInsurancePersonal
(
unenploymentInsurancePersonal
);
//个人缴纳医疗保险
double
medicarePersonal
=
Double
.
valueOf
(
map
.
get
(
"t"
).
toString
());
zjlWage
.
setMedicarePersonal
(
medicarePersonal
);
//个人缴纳住房公积金
double
reservedFund
=
Double
.
valueOf
(
map
.
get
(
"u"
).
toString
());
zjlWage
.
setReservedFund
(
reservedFund
);
//个税
double
reservedFundTax
=
Double
.
valueOf
(
map
.
get
(
"v"
).
toString
());
BigDecimal
b00
=
new
BigDecimal
(
reservedFundTax
);
double
f00
=
b00
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setReservedFundTax
(
f00
);
//年终奖个税
double
yearEndBonusTax
=
Double
.
valueOf
(
map
.
get
(
"w"
).
toString
());
zjlWage
.
setYearEndBonusTax
(
yearEndBonusTax
);
//个人其他补交补退
double
otherFeePersonal
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"x"
).
toString
())){
otherFeePersonal
=
Double
.
valueOf
(
map
.
get
(
"x"
).
toString
());
}
zjlWage
.
setOtherFeePersonal
(
otherFeePersonal
);
//个人工会费
double
duesPersonal
=
Double
.
valueOf
(
map
.
get
(
"y"
).
toString
());
zjlWage
.
setDuesPersonal
(
duesPersonal
);
double
endowmentInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"z"
).
toString
());
zjlWage
.
setEndowmentInsuranceUnit
(
endowmentInsuranceUnit
);
double
unenploymentInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"aa"
).
toString
());
zjlWage
.
setUnenploymentInsuranceUnit
(
unenploymentInsuranceUnit
);
double
medicareUnit
=
Double
.
valueOf
(
map
.
get
(
"ab"
).
toString
());
zjlWage
.
setMedicareUnit
(
medicareUnit
);
double
employmentInjuryInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"ac"
).
toString
());
zjlWage
.
setEmploymentInjuryInsuranceUnit
(
employmentInjuryInsuranceUnit
);
double
birthInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"ad"
).
toString
());
zjlWage
.
setBirthInsuranceUnit
(
birthInsuranceUnit
);
double
illnessInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"ae"
).
toString
());
zjlWage
.
setIllnessInsuranceUnit
(
illnessInsuranceUnit
);
double
reservedFundUnit
=
Double
.
valueOf
(
map
.
get
(
"af"
).
toString
());
zjlWage
.
setReservedFundUnit
(
reservedFundUnit
);
double
laborUnionFeeUnit
=
Double
.
valueOf
(
map
.
get
(
"ag"
).
toString
());
zjlWage
.
setLaborUnionFeeUnit
(
laborUnionFeeUnit
);
double
accidentInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"ah"
).
toString
());
zjlWage
.
setAccidentInsuranceUnit
(
accidentInsuranceUnit
);
double
disabilityInsuranceUnit
=
Double
.
valueOf
(
map
.
get
(
"ai"
).
toString
());
zjlWage
.
setDisabilityInsuranceUnit
(
disabilityInsuranceUnit
);
double
otherFeeUnit
=
Double
.
valueOf
(
map
.
get
(
"aj"
).
toString
());
zjlWage
.
setOtherFeeUnit
(
otherFeeUnit
);
String
additionMsg
=
map
.
get
(
"ak"
).
toString
();
zjlWage
.
setAdditionMsg
(
additionMsg
);
double
manageFee
=
Double
.
valueOf
(
map
.
get
(
"al"
).
toString
());
zjlWage
.
setManageFee
(
manageFee
);
double
endowmentInsurancePersonal2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"am"
).
toString
())){
endowmentInsurancePersonal2
=
Double
.
valueOf
(
map
.
get
(
"am"
).
toString
());
}
zjlWage
.
setEndowmentInsurancePersonal2
(
endowmentInsurancePersonal2
);
double
unenploymentInsurancePersonal2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"an"
).
toString
())){
unenploymentInsurancePersonal2
=
Double
.
valueOf
(
map
.
get
(
"an"
).
toString
());
}
zjlWage
.
setUnenploymentInsurancePersonal2
(
unenploymentInsurancePersonal2
);
double
medicarePersonal2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"ao"
).
toString
())){
medicarePersonal2
=
Double
.
valueOf
(
map
.
get
(
"ao"
).
toString
());
}
zjlWage
.
setMedicarePersonal2
(
medicarePersonal2
);
double
resveredFundPersonal2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"ap"
).
toString
())){
resveredFundPersonal2
=
Double
.
valueOf
(
map
.
get
(
"ap"
).
toString
());
}
zjlWage
.
setResveredFundPersonal2
(
resveredFundPersonal2
);
double
endowmentInsuranceUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"aq"
).
toString
())){
endowmentInsuranceUnit2
=
Double
.
valueOf
(
map
.
get
(
"aq"
).
toString
());
}
zjlWage
.
setEndowmentInsurancePersonal2
(
endowmentInsuranceUnit2
);
double
unenploymentInsuranceUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"ar"
).
toString
())){
unenploymentInsuranceUnit2
=
Double
.
valueOf
(
map
.
get
(
"ar"
).
toString
());
}
zjlWage
.
setUnenploymentInsuranceUnit2
(
unenploymentInsuranceUnit2
);
double
medicareUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"as"
).
toString
())){
medicareUnit2
=
Double
.
valueOf
(
map
.
get
(
"as"
).
toString
());
}
zjlWage
.
setMedicareUnit2
(
medicareUnit2
);
double
employmentInjuryInsuranceUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"at"
).
toString
())){
employmentInjuryInsuranceUnit2
=
Double
.
valueOf
(
map
.
get
(
"at"
).
toString
());
}
zjlWage
.
setEmploymentInjuryInsuranceUnit2
(
employmentInjuryInsuranceUnit2
);
double
birthInsuranceUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"au"
).
toString
())){
birthInsuranceUnit2
=
Double
.
valueOf
(
map
.
get
(
"au"
).
toString
());
}
zjlWage
.
setBirthInsuranceUnit2
(
birthInsuranceUnit2
);
double
illnessInsuranceUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"av"
).
toString
())){
illnessInsuranceUnit2
=
Double
.
valueOf
(
map
.
get
(
"av"
).
toString
());
}
zjlWage
.
setIllnessInsuranceUnit2
(
illnessInsuranceUnit2
);
double
reservedInsuranceUnit2
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"aw"
).
toString
())){
reservedInsuranceUnit2
=
Double
.
valueOf
(
map
.
get
(
"aw"
).
toString
());
}
zjlWage
.
setReservedInsuranceUnit2
(
reservedInsuranceUnit2
);
double
wage
=
Double
.
valueOf
(
map
.
get
(
"ax"
).
toString
());
BigDecimal
bwage
=
new
BigDecimal
(
wage
);
double
fwage
=
bwage
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setWage
(
fwage
);
double
wageTax
=
Double
.
valueOf
(
map
.
get
(
"ay"
).
toString
());
zjlWage
.
setWageTax
(
wageTax
);
double
wageTaxAfter
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"az"
).
toString
())){
wageTaxAfter
=
Double
.
valueOf
(
map
.
get
(
"az"
).
toString
());
}
zjlWage
.
setWageTaxAfter
(
wageTaxAfter
);
double
lastYearEndBonus
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"ba"
).
toString
())){
lastYearEndBonus
=
Double
.
valueOf
(
map
.
get
(
"ba"
).
toString
());
}
zjlWage
.
setLastYearEndBonus
(
lastYearEndBonus
);
double
lastYearEndBonusTax
=
0
;
if
(
StringUtils
.
isNotBlank
(
map
.
get
(
"bb"
).
toString
())){
lastYearEndBonusTax
=
Double
.
valueOf
(
map
.
get
(
"bb"
).
toString
());
}
zjlWage
.
setLastYearEndBonusTax
(
lastYearEndBonusTax
);
String
bankAccount
=
map
.
get
(
"bc"
).
toString
();
zjlWage
.
setBankAccount
(
bankAccount
);
//是否督导(1是。0不是) 如果是督导 学子公司成本 = 专项奖/0.922 否则为0
Integer
isDuDao
=
Integer
.
valueOf
(
map
.
get
(
"bd"
).
toString
());
double
xzCompanyCast
=
0
;
if
(
isDuDao
==
1
){
xzCompanyCast
=
specialBonus
/
0.922
;
}
BigDecimal
b0
=
new
BigDecimal
(
xzCompanyCast
);
double
f0
=
b0
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setXzCompanyCast
(
f0
);
//应发合计=岗位工资+绩效奖金+专项奖+年终奖+节日费+高温补贴+通讯补贴+餐费补贴+交通补贴+专项奖(秋营奖励)+其他补扣补退
double
totalYf
=
positionWage
+
performanceBonus
+
specialBonus
+
yearEndBonus
+
festivalFee
+
highSubsidy
+
correspondenceSubsidy
+
tableMoneySubsidy
+
trafficSubsidy
+
specialBonusAutumn
+
otherSubsidy
;
BigDecimal
b1
=
new
BigDecimal
(
totalYf
);
double
f1
=
b1
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setTotalYf
(
f1
);
//个人保险小计=养老保险(个人缴费)+失业保险(个人缴费)+医疗保险(个人缴费)
double
totalInsurance
=
endowmentInsurancePersonal
+
unenploymentInsurancePersonal
+
medicarePersonal
;
zjlWage
.
setTotalInsurance
(
totalInsurance
);
//个人缴交小计=个人保险小计+公积金(个人缴费)+个税+年终奖个税+个人其他补交补退+个人工会费
double
totalFeePersonal
=
totalInsurance
+
reservedFund
+
f00
+
yearEndBonusTax
+
otherFeePersonal
+
otherFeePersonal
;
BigDecimal
b11
=
new
BigDecimal
(
totalFeePersonal
);
double
f11
=
b11
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setTotalFeePersonal
(
f11
);
//实发合计=应发合计-个人缴交小计
double
totalSf
=
totalYf
-
totalFeePersonal
;
BigDecimal
b2
=
new
BigDecimal
(
totalSf
);
double
f2
=
b2
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setTotalSf
(
f2
);
//单位缴交小计=单位养老保险+单位失业保险+单位医疗保险+单位工伤保险+单位生育保险+重大疾病保险+单位公积金+工会计提+商业意外险+残保金+单位其他补交补退
double
totalFeeUnit
=
endowmentInsuranceUnit
+
unenploymentInsuranceUnit
+
medicareUnit
+
employmentInjuryInsuranceUnit
+
birthInsuranceUnit
+
illnessInsuranceUnit
+
reservedFundUnit
+
laborUnionFeeUnit
+
accidentInsuranceUnit
+
disabilityInsuranceUnit
+
otherFeeUnit
;
zjlWage
.
setTotalFeeUnit
(
totalFeeUnit
);
//总个人人工成本合计=单位缴交小计+应发合计
double
totalCastPersonal
=
totalFeeUnit
+
totalYf
;
BigDecimal
b3
=
new
BigDecimal
(
totalCastPersonal
);
double
f3
=
b3
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setTotalCastPersonal
(
f3
);
//单位总成本(含支出税点)=(总个人人工成本合计+邮电人才服务管理费)/0.922
double
totalCastUnit
=
(
totalCastPersonal
+
manageFee
)/
0.922
;
BigDecimal
b4
=
new
BigDecimal
(
totalCastUnit
);
double
f4
=
b4
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setTotalCastUnit
(
f4
);
//合并计税=个人缴纳养老保险2+个人缴纳失业保险2+个人缴纳医疗保险2+个人缴纳住房公积金2+单位养老保险2+单位失业保险2+单位医疗保险2+单位工伤保险2+单位生育保险2+重大疾病保险企业缴纳2+单位住房公积金2
double
totalInsuranceUnit2
=
endowmentInsurancePersonal2
+
unenploymentInsurancePersonal2
+
medicarePersonal2
+
resveredFundPersonal2
+
endowmentInsuranceUnit2
+
unenploymentInsuranceUnit2
+
medicareUnit2
+
employmentInjuryInsuranceUnit2
+
birthInsuranceUnit
+
illnessInsuranceUnit2
+
reservedInsuranceUnit2
;
zjlWage
.
setTotalInsuranceUnit2
(
totalInsuranceUnit2
);
//督导成本=单位总成本(含支出税点)- 学子公司成本
double
managerCast
=
totalCastUnit
-
xzCompanyCast
;
BigDecimal
b5
=
new
BigDecimal
(
managerCast
);
double
f5
=
b5
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
zjlWage
.
setManagerCast
(
f5
);
Integer
integer
=
zjlWageMapper
.
insert
(
zjlWage
);
if
(
integer
==
1
)
{
number
++;
}
else
{
error
.
append
(
"第"
+
(
i
+
1
)
+
"行的更新失败,"
);
}
}
error
.
append
(
"成功更新"
+
number
+
"条数据!"
);
return
ResponseData
.
success
(
error
.
toString
(),
"导入完成"
);
}
}
service-manager/src/main/java/com/winsun/utils/ExcelDealUtils.java
View file @
82642895
...
@@ -94,14 +94,25 @@ public class ExcelDealUtils {
...
@@ -94,14 +94,25 @@ public class ExcelDealUtils {
headMap
.
put
(
"组织培训"
,
"designPlan"
);
headMap
.
put
(
"组织培训"
,
"designPlan"
);
headMap
.
put
(
"KPI总值"
,
"kpi"
);
headMap
.
put
(
"KPI总值"
,
"kpi"
);
headMap
.
put
(
"KPI月份"
,
"month"
);
headMap
.
put
(
"KPI月份"
,
"month"
);
Map
<
String
,
Object
>
resultMap
=
dealHeadMap
(
headMap
);
Map
<
String
,
Object
>
resultMap
=
dealHeadMap
(
headMap
);
resultMap
.
put
(
"sheetName"
,
sheetName
);
resultMap
.
put
(
"sheetName"
,
sheetName
);
return
resultMap
;
return
resultMap
;
}
}
// 兑换券导出excel表头
// kpi管理导出excel表头
public
static
Map
<
String
,
Object
>
exchangeCouponExcel
(
String
sheetName
){
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<
String
,
Object
>();
headMap
.
put
(
"兑换券账号"
,
"cardNumber"
);
headMap
.
put
(
"密码"
,
"password"
);
headMap
.
put
(
"出售状态(1:未售出,2:已售出,3:售出中)"
,
"state"
);
headMap
.
put
(
"上架状态(1:已上架,2:已下架)"
,
"shelfState"
);
headMap
.
put
(
"有效截止日期"
,
"validityPeriod"
);
headMap
.
put
(
"上传时间"
,
"updateDate"
);
headMap
.
put
(
"是否删除(0:未删除,1:已删除)"
,
"delFlag"
);
Map
<
String
,
Object
>
resultMap
=
dealHeadMap
(
headMap
);
resultMap
.
put
(
"sheetName"
,
sheetName
);
return
resultMap
;
}
// 管理导出excel表头
public
static
Map
<
String
,
Object
>
wageExcel
(
String
sheetName
){
public
static
Map
<
String
,
Object
>
wageExcel
(
String
sheetName
){
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<
String
,
Object
>();
headMap
.
put
(
"KPI月份"
,
"month"
);
headMap
.
put
(
"KPI月份"
,
"month"
);
...
@@ -121,6 +132,82 @@ public class ExcelDealUtils {
...
@@ -121,6 +132,82 @@ public class ExcelDealUtils {
return
resultMap
;
return
resultMap
;
}
}
// 总经理薪酬管理导出excel表头
public
static
Map
<
String
,
Object
>
zjlWageExcel
(
String
sheetName
){
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<
String
,
Object
>();
headMap
.
put
(
"序号"
,
"id"
);
headMap
.
put
(
"月份"
,
"month"
);
headMap
.
put
(
"归属"
,
"department"
);
headMap
.
put
(
"姓名"
,
"name"
);
headMap
.
put
(
"身份证"
,
"idCard"
);
headMap
.
put
(
"分公司"
,
"company"
);
headMap
.
put
(
"属性"
,
"attribute"
);
headMap
.
put
(
"岗位工资"
,
"positionWage"
);
headMap
.
put
(
"绩效奖金\n(绩效工资+提成)"
,
"performanceBonus"
);
headMap
.
put
(
"专项奖"
,
"specialBonus"
);
headMap
.
put
(
"年终奖"
,
"yearEndBonus"
);
headMap
.
put
(
"节日费(元旦,春节,五一,十一)"
,
"festivalFee"
);
headMap
.
put
(
"高温补贴(6-10月)"
,
"highSubsidy"
);
headMap
.
put
(
"通讯补贴"
,
"correspondenceSubsidy"
);
headMap
.
put
(
"餐费补贴"
,
"tableMoneySubsidy"
);
headMap
.
put
(
"交通补贴"
,
"trafficSubsidy"
);
headMap
.
put
(
"专项奖(秋营奖励)"
,
"specialBonusAutumn"
);
headMap
.
put
(
"其他补扣补退"
,
"otherSubsidy"
);
headMap
.
put
(
"应发合计"
,
"totalYf"
);
headMap
.
put
(
"个人养老保险"
,
"endowmentInsurancePersonal"
);
headMap
.
put
(
"个人缴纳失业保险"
,
"unenploymentInsurancePersonal"
);
headMap
.
put
(
"个人缴纳医疗保险"
,
"medicarePersonal"
);
headMap
.
put
(
"个人保险小计"
,
"totalInsurance"
);
headMap
.
put
(
"个人缴纳住房公积金"
,
"reservedFund"
);
headMap
.
put
(
"个税"
,
"reservedFundTax"
);
headMap
.
put
(
"年终奖个税"
,
"yearEndBonusTax"
);
headMap
.
put
(
"个人其他补交补退"
,
"otherFeePersonal"
);
headMap
.
put
(
"个人工会费"
,
"duesPersonal"
);
headMap
.
put
(
"个人缴交小计"
,
"totalFeePersonal"
);
headMap
.
put
(
"实发合计"
,
"totalSf"
);
headMap
.
put
(
"单位养老保险"
,
"endowmentInsuranceUnit"
);
headMap
.
put
(
"单位失业保险"
,
"unenploymentInsuranceUnit"
);
headMap
.
put
(
"单位医疗保险"
,
"medicareUnit"
);
headMap
.
put
(
"单位工伤保险"
,
"employmentInjuryInsuranceUnit"
);
headMap
.
put
(
"单位生育保险"
,
"birthInsuranceUnit"
);
headMap
.
put
(
"重大疾病保险"
,
"illnessInsuranceUnit"
);
headMap
.
put
(
"单位公积金"
,
"reservedFundUnit"
);
headMap
.
put
(
"工会计提"
,
"laborUnionFeeUnit"
);
headMap
.
put
(
"商业意外险"
,
"accidentInsuranceUnit"
);
headMap
.
put
(
"残保金"
,
"disabilityInsuranceUnit"
);
headMap
.
put
(
"单位其他补交补退"
,
"otherFeeUnit"
);
headMap
.
put
(
"单位缴交小计"
,
"totalFeeUnit"
);
headMap
.
put
(
"总个人人工成本合计"
,
"totalCastPersonal"
);
headMap
.
put
(
"附加信息"
,
"additionMsg"
);
headMap
.
put
(
"邮电人才服务管理费(200/人)"
,
"manageFee"
);
headMap
.
put
(
"单位总成本(含支出税点)"
,
"totalCastUnit"
);
headMap
.
put
(
"个人缴纳养老保险2"
,
"endowmentInsurancePersonal2"
);
headMap
.
put
(
"个人缴纳失业保险2"
,
"unenploymentInsurancePersonal2"
);
headMap
.
put
(
"个人缴纳医疗保险2"
,
"medicarePersonal2"
);
headMap
.
put
(
"个人缴纳住房公积金2"
,
"resveredFundPersonal2"
);
headMap
.
put
(
"单位养老保险2"
,
"endowmentInsuranceUnit2"
);
headMap
.
put
(
"单位失业保险2"
,
"unenploymentInsuranceUnit2"
);
headMap
.
put
(
"单位医疗保险2"
,
"medicareUnit2"
);
headMap
.
put
(
"单位工伤保险2"
,
"employmentInjuryInsuranceUnit2"
);
headMap
.
put
(
"单位生育保险2"
,
"birthInsuranceUnit2"
);
headMap
.
put
(
"重大疾病保险企业缴纳2"
,
"illnessInsuranceUnit2"
);
headMap
.
put
(
"单位住房公积金2"
,
"reservedInsuranceUnit2"
);
headMap
.
put
(
"合并计税"
,
"totalInsuranceUnit2"
);
headMap
.
put
(
"本月计税工资"
,
"wage"
);
headMap
.
put
(
"本月抵税扣除"
,
"wageTax"
);
headMap
.
put
(
"本月工资抵税"
,
"wageTaxAfter"
);
headMap
.
put
(
"年终奖应税"
,
"lastYearEndBonus"
);
headMap
.
put
(
"年终奖个税计算"
,
"lastYearEndBonusTax"
);
headMap
.
put
(
"银行账号"
,
"bankAccount"
);
headMap
.
put
(
"督导成本"
,
"managerCast"
);
headMap
.
put
(
"学子公司成本"
,
"xzCompanyCast"
);
Map
<
String
,
Object
>
resultMap
=
dealHeadMap
(
headMap
);
resultMap
.
put
(
"sheetName"
,
sheetName
);
return
resultMap
;
}
// 总经理kpi管理导出excel表头
// 总经理kpi管理导出excel表头
public
static
Map
<
String
,
Object
>
managerKpiExcel
(
String
sheetName
){
public
static
Map
<
String
,
Object
>
managerKpiExcel
(
String
sheetName
){
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<
String
,
Object
>();
...
...
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