Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
cf26680f
Commit
cf26680f
authored
Jun 18, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.12-瓜子导出offer
parent
fee071c6
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
619 additions
and
31 deletions
+619
-31
TGzOfferInfoExportDetailVo.java
.../plus/v1/yifu/archives/vo/TGzOfferInfoExportDetailVo.java
+135
-0
TGzOfferInfoExportMainVo.java
...ud/plus/v1/yifu/archives/vo/TGzOfferInfoExportMainVo.java
+62
-0
TGzOfferInfoExportSearchVo.java
.../plus/v1/yifu/archives/vo/TGzOfferInfoExportSearchVo.java
+50
-0
TGzOfferInfoController.java
...s/v1/yifu/archives/controller/TGzOfferInfoController.java
+30
-4
TGzOfferInfoMapper.java
...loud/plus/v1/yifu/archives/mapper/TGzOfferInfoMapper.java
+10
-0
TGzOfferInfoService.java
...ud/plus/v1/yifu/archives/service/TGzOfferInfoService.java
+35
-6
TGzOfferInfoServiceImpl.java
...1/yifu/archives/service/impl/TGzOfferInfoServiceImpl.java
+210
-21
TGzOfferInfoMapper.xml
...ives-biz/src/main/resources/mapper/TGzOfferInfoMapper.xml
+77
-0
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+10
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzOfferInfoExportDetailVo.java
0 → 100644
View file @
cf26680f
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* 导出-瓜子offer信息接收表
*
* @author hgw
* @date 2025-6-17 09:38:47
*/
@Data
public
class
TGzOfferInfoExportDetailVo
implements
Serializable
{
@ExcelProperty
(
"流程ID"
)
private
String
bizId
;
@ExcelProperty
(
"人员类别编码"
)
private
String
empType
;
@ExcelProperty
(
"人员类别名称"
)
private
String
empTypeDescr
;
/**
* 外签类型:A: 洼地外签/ B:属地外签
*/
@ExcelAttribute
(
name
=
"外签类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
GZ_OUT_SGIN_TYPE
)
@ExcelProperty
(
"外签类型"
)
private
String
outSginType
;
/**
* 合同公司主体:公司信息表
*/
@ExcelProperty
(
"合同公司主体"
)
private
String
com
ра
n
у
;
@ExcelProperty
(
"姓名"
)
private
String
name
;
@ExcelProperty
(
"姓名拼音"
)
private
String
nameAc
;
@ExcelProperty
(
"姓氏拼音"
)
private
String
lastNameAc
;
@ExcelProperty
(
"名字拼音"
)
private
String
firstNameAc
;
@ExcelProperty
(
"国籍编码"
)
private
String
country
;
@ExcelProperty
(
"国籍描述"
)
private
String
countryDescr
;
@ExcelProperty
(
"证件类型编码"
)
private
String
nationalIdType
;
@ExcelProperty
(
"证件类型描述"
)
private
String
nationalIdTypeDescr
;
@ExcelProperty
(
"证件号码"
)
private
String
nationalId
;
@ExcelAttribute
(
name
=
"性别"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
GZ_SEX
)
@ExcelProperty
(
"性别"
)
private
String
sex
;
@ExcelProperty
(
"个人手机号"
)
private
String
phone
;
@ExcelProperty
(
"个人邮箱"
)
private
String
email
;
@ExcelProperty
(
"直接上级姓名"
)
private
String
supervisorName
;
@ExcelProperty
(
"职务描述"
)
private
String
jobcodeDescr
;
@ExcelProperty
(
"工作地点"
)
private
String
workLocation
;
@ExcelProperty
(
"工作地点描述"
)
private
String
workLocationDescr
;
@ExcelProperty
(
"预计入职日期"
)
private
String
expEntryDate
;
@ExcelProperty
(
"部门名称"
)
private
String
deptName
;
/**
* 基本工资,两位小数
*/
@ExcelProperty
(
"基本工资"
)
private
BigDecimal
basePay
;
/**
* 绩效工资,两位小数
*/
@ExcelProperty
(
"绩效工资"
)
private
BigDecimal
perfomPay
;
@ExcelProperty
(
"年终奖月数"
)
private
Integer
yearBonusMonth
;
@ExcelProperty
(
"社保缴纳地编码"
)
private
String
socialInsuranceLocation
;
@ExcelProperty
(
"社保缴纳地"
)
private
String
socialInsuranceLocationDescr
;
@ExcelProperty
(
"社保基数"
)
private
BigDecimal
socialInsuranceBase
;
@ExcelProperty
(
"公积金基数"
)
private
BigDecimal
houseAccFundBaseMax
;
/**
* 是否转正后缴纳公积金(Y:是 N:否)
*/
@ExcelAttribute
(
name
=
"是否转正后缴纳公积金"
,
isDataId
=
true
,
readConverterExp
=
"Y=是,N=否"
)
@ExcelProperty
(
"是否转正后缴纳公积金"
)
private
String
beRegularEmpPay
;
@ExcelProperty
(
"申请人邮箱"
)
private
String
applyUserEmail
;
@ExcelProperty
(
"接收瓜子Offer时间"
)
private
String
createTime
;
@ExcelAttribute
(
name
=
"Offer短信通知状态"
,
isDataId
=
true
,
readConverterExp
=
"0=已发送,1=未发送"
)
@ExcelProperty
(
"Offer短信通知状态"
)
private
String
offerSendStatus
;
@ExcelAttribute
(
name
=
"Offer短信通知状态"
,
isDataId
=
true
,
readConverterExp
=
"3=待发送Offer,4=待接受Offer,5=拒绝Offer,7=接受offer,9=候选人填写信息,10=取消offer,12=候选人信息审核,13=待签署,8=合同审核通过,99=已归档,98=信息待收集,97=候选人审核通过"
)
@ExcelProperty
(
"Offer状态"
)
private
String
offerStatus
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzOfferInfoExportMainVo.java
0 → 100644
View file @
cf26680f
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 导出-瓜子offer信息接收表
*
* @author hgw
* @date 2025-6-17 09:38:47
*/
@Data
public
class
TGzOfferInfoExportMainVo
implements
Serializable
{
@ExcelProperty
(
"流程ID"
)
private
String
bizId
;
@ExcelProperty
(
"姓名"
)
private
String
name
;
@ExcelProperty
(
"证件号码"
)
private
String
nationalId
;
@ExcelProperty
(
"个人手机号"
)
private
String
phone
;
@ExcelProperty
(
"职务描述"
)
private
String
jobcodeDescr
;
@ExcelProperty
(
"预计入职日期"
)
private
String
expEntryDate
;
@ExcelProperty
(
"接收瓜子Offer时间"
)
private
String
createTime
;
@ExcelAttribute
(
name
=
"Offer短信通知状态"
,
isDataId
=
true
,
readConverterExp
=
"0=已发送,1=未发送"
)
@ExcelProperty
(
"Offer短信通知状态"
)
private
String
offerSendStatus
;
@ExcelAttribute
(
name
=
"Offer短信通知状态"
,
isDataId
=
true
,
readConverterExp
=
"3=待发送Offer,4=待接受Offer,5=拒绝Offer,7=接受offer,9=候选人填写信息,10=取消offer,12=候选人信息审核,13=待签署,8=合同审核通过,99=已归档,98=信息待收集,97=候选人审核通过"
)
@ExcelProperty
(
"Offer状态"
)
private
String
offerStatus
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzOfferInfoExportSearchVo.java
0 → 100644
View file @
cf26680f
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDate
;
/**
* 瓜子offer信息接收表——导出查询vo,主要加limit参数
*
* @author hgw
* @date 2025-6-17 10:00:43
*/
@Data
public
class
TGzOfferInfoExportSearchVo
extends
TGzOfferInfo
{
private
LocalDate
createTimeStart
;
private
LocalDate
createTimeEnd
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"id集合"
)
private
String
[]
idList
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"查询起"
)
private
int
limitStart
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"查询止"
)
private
int
limitEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TGzOfferInfoController.java
View file @
cf26680f
...
...
@@ -19,21 +19,23 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -181,4 +183,28 @@ public class TGzOfferInfoController {
return
tGzOfferInfoService
.
sendOfferAlert
(
tGzOfferInfo
);
}
/**
* 社保导出花名册记录表 批量导出
* @author hgw
* @date 2025-06-16 14:29:13
**/
@SysLog
(
"导出瓜子offer列表"
)
@Operation
(
description
=
"导出瓜子offer列表"
)
@PostMapping
(
"/exportMain"
)
public
void
exportMain
(
HttpServletResponse
response
,
@RequestBody
TGzOfferInfoExportSearchVo
searchVo
)
{
tGzOfferInfoService
.
exportMain
(
response
,
searchVo
);
}
/**
* 社保导出花名册记录表 批量导出
* @author hgw
* @date 2025-06-16 14:29:13
**/
@SysLog
(
"导出瓜子offer详情"
)
@Operation
(
description
=
"导出瓜子offer详情"
)
@PostMapping
(
"/exportDetail"
)
public
void
exportDetail
(
HttpServletResponse
response
,
@RequestBody
TGzOfferInfoExportSearchVo
searchVo
)
{
tGzOfferInfoService
.
exportDetail
(
response
,
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TGzOfferInfoMapper.java
View file @
cf26680f
...
...
@@ -21,6 +21,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportMainVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -64,4 +67,11 @@ public interface TGzOfferInfoMapper extends BaseMapper<TGzOfferInfo> {
*/
Integer
getTGzOfferInfoCount
(
@Param
(
"tGzOfferInfo"
)
TGzOfferInfoVo
tGzOfferInfo
);
int
getTGzOfferCount
(
@Param
(
"tGzOfferInfo"
)
TGzOfferInfoExportSearchVo
tGzOfferInfo
);
List
<
TGzOfferInfoExportMainVo
>
getTGzOfferMainList
(
@Param
(
"tGzOfferInfo"
)
TGzOfferInfoExportSearchVo
tGzOfferInfo
);
List
<
TGzOfferInfoExportDetailVo
>
getTGzOfferDetailList
(
@Param
(
"tGzOfferInfo"
)
TGzOfferInfoExportSearchVo
tGzOfferInfo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TGzOfferInfoService.java
View file @
cf26680f
...
...
@@ -21,10 +21,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
...
...
@@ -37,6 +40,7 @@ import java.util.List;
public
interface
TGzOfferInfoService
extends
IService
<
TGzOfferInfo
>
{
/**
* 瓜子offer信息接收表简单分页查询
*
* @param tGzOfferInfo 瓜子offer信息接收表
* @return
*/
...
...
@@ -62,6 +66,7 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> {
/**
* 修改瓜子offer信息
*
* @param tGzOfferInfo 字典
* @return R<String>
*/
...
...
@@ -69,6 +74,7 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> {
/**
* 瓜子offer手动状态更新
*
* @param tGzOfferInfo 字典
* @return R<String>
*/
...
...
@@ -83,8 +89,31 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> {
/**
* @Description: 批量导入
* @Author: hgw
* @Date: 2025/6/17 9:32
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
R
<
String
>
sendOfferAlert
(
TGzOfferInfoVo
tGzOfferInfo
);
/**
* @Description: 导出列表
* @Author: hgw
* @Date: 2025/6/17 9:33
* @return: void
**/
void
exportMain
(
HttpServletResponse
response
,
TGzOfferInfoExportSearchVo
searchVo
);
/**
* @Description: 导出详情
* @Author: hgw
* @Date: 2025/6/17 9:33
* @return: void
**/
void
exportDetail
(
HttpServletResponse
response
,
TGzOfferInfoExportSearchVo
searchVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TGzOfferInfoServiceImpl.java
View file @
cf26680f
...
...
@@ -18,11 +18,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -41,17 +45,30 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.AliSmsResult
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.RegistParamVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchExportLog
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Field
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 瓜子offer信息接收表
...
...
@@ -118,7 +135,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
TGzOfferInfo
findInfo
=
this
.
getInfoCommon
(
tGzOfferInfo
.
getId
());
if
(
Common
.
isEmpty
(
findInfo
)){
if
(
Common
.
isEmpty
(
findInfo
))
{
return
R
.
failed
(
CommonConstants
.
ERROR_NO_DOMAIN
);
}
...
...
@@ -143,28 +160,28 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
if
(
Common
.
isEmpty
(
tGzOfferInfo
.
getId
()))
{
if
(
Common
.
isEmpty
(
tGzOfferInfo
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
if
(
Common
.
isEmpty
(
tGzOfferInfo
.
getOfferStatus
()))
{
if
(
Common
.
isEmpty
(
tGzOfferInfo
.
getOfferStatus
()))
{
return
R
.
failed
(
"更新状态不能为空"
);
}
TGzOfferInfo
findInfo
=
this
.
getInfoCommon
(
tGzOfferInfo
.
getId
());
if
(
Common
.
isEmpty
(
findInfo
)){
if
(
Common
.
isEmpty
(
findInfo
))
{
return
R
.
failed
(
CommonConstants
.
ERROR_NO_DOMAIN
);
}
// 更新为同一状态的提示操作失败
if
(
findInfo
.
getOfferStatus
().
equals
(
tGzOfferInfo
.
getOfferStatus
()))
{
if
(
findInfo
.
getOfferStatus
().
equals
(
tGzOfferInfo
.
getOfferStatus
()))
{
return
R
.
failed
(
"当前Offer更新状态失败,请刷新页面后重试"
);
}
// 当前Offer更新状态,无法再发起更新:5:拒绝Offer、10:取消offer、8:合同审核通过、99:已归档
String
[]
forbidStatusArr
=
{
"5"
,
"10"
,
"8"
,
"99"
};
String
[]
forbidStatusArr
=
{
"5"
,
"10"
,
"8"
,
"99"
};
if
(
ArrayUtils
.
contains
(
forbidStatusArr
,
findInfo
.
getOfferStatus
()))
{
return
R
.
failed
(
"当前Offer更新状态,无法再发起更新"
);
}
// 获取当前状态下,允许更新的状态列表
List
<
String
>
allowUpdateStatusList
=
this
.
allowUpdateStatus
(
findInfo
.
getOfferStatus
());
if
(!
allowUpdateStatusList
.
contains
(
tGzOfferInfo
.
getOfferStatus
()))
{
if
(!
allowUpdateStatusList
.
contains
(
tGzOfferInfo
.
getOfferStatus
()))
{
return
R
.
failed
(
"当前Offer更新状态失败,禁止更新为所选状态,请刷新页面后重试"
);
}
// 更新状态
...
...
@@ -238,31 +255,31 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
* @param orgStatus 当前状态
* @return List<String> 允许更新的状态列表
*/
private
List
<
String
>
allowUpdateStatus
(
String
orgStatus
){
private
List
<
String
>
allowUpdateStatus
(
String
orgStatus
)
{
List
<
String
>
allowUpdateStatusList
=
new
ArrayList
<>();
// 3:待发送Offer
if
(
CommonConstants
.
THREE_STRING
.
equals
(
orgStatus
))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
orgStatus
))
{
// 可更新为:4:待接受Offer、10:取消offer
allowUpdateStatusList
.
add
(
CommonConstants
.
FOUR_STRING
);
allowUpdateStatusList
.
add
(
CommonConstants
.
TEN_STRING
);
}
// 4:待接受Offer
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
orgStatus
))
{
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
orgStatus
))
{
// 可更新为:5:拒绝Offer、7:接受offer、10:取消offer
allowUpdateStatusList
.
add
(
CommonConstants
.
FIVE_STRING
);
allowUpdateStatusList
.
add
(
CommonConstants
.
SEVEN_STRING
);
allowUpdateStatusList
.
add
(
CommonConstants
.
TEN_STRING
);
}
// 7:接受Offer
if
(
CommonConstants
.
SEVEN_STRING
.
equals
(
orgStatus
))
{
if
(
CommonConstants
.
SEVEN_STRING
.
equals
(
orgStatus
))
{
// 可更新为:98:信息待收集、10:取消offer
allowUpdateStatusList
.
add
(
"98"
);
allowUpdateStatusList
.
add
(
CommonConstants
.
TEN_STRING
);
}
// 98:信息待收集、9:候选人填写信息、12:候选人信息审核、97:候选人审核通过、13:待签署
if
(
"98"
.
equals
(
orgStatus
)
||
CommonConstants
.
NINE_STRING
.
equals
(
orgStatus
)
if
(
"98"
.
equals
(
orgStatus
)
||
CommonConstants
.
NINE_STRING
.
equals
(
orgStatus
)
||
CommonConstants
.
TWELVE_STRING
.
equals
(
orgStatus
)
||
"97"
.
equals
(
orgStatus
)
||
CommonConstants
.
THIRTEEN_STRING
.
equals
(
orgStatus
)){
||
CommonConstants
.
THIRTEEN_STRING
.
equals
(
orgStatus
))
{
// 可更新为:10:取消offer
allowUpdateStatusList
.
add
(
CommonConstants
.
TEN_STRING
);
}
...
...
@@ -270,7 +287,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
return
allowUpdateStatusList
;
}
private
TGzOfferInfo
getInfoCommon
(
Integer
id
){
private
TGzOfferInfo
getInfoCommon
(
Integer
id
)
{
return
this
.
getOne
(
Wrappers
.<
TGzOfferInfo
>
query
().
lambda
()
.
eq
(
TGzOfferInfo:
:
getId
,
id
)
.
eq
(
TGzOfferInfo:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
...
...
@@ -300,11 +317,11 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
public
void
invoke
(
TGzOfferInfoImportVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
)){
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
}
else
{
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
...
...
@@ -313,6 +330,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
...
...
@@ -323,17 +341,18 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTDispatchExportLog
(
cachedDataList
,
errorMessageList
);
importTDispatchExportLog
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
@Override
public
R
<
String
>
sendOfferAlert
(
TGzOfferInfoVo
tGzOfferInfo
)
{
//获取所有满足条件的未发送offer提醒的数据
...
...
@@ -422,6 +441,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
/**
* 插入excel bad record
*/
...
...
@@ -431,4 +451,173 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
this
.
save
(
insert
);
}
/**
* 导出瓜子OFFER
*
* @return
*/
@Override
public
void
exportMain
(
HttpServletResponse
response
,
TGzOfferInfoExportSearchVo
searchVo
)
{
String
prfName
=
"瓜子OFFER信息"
;
String
fileName
=
prfName
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TGzOfferInfoExportMainVo
>
list
=
new
ArrayList
<>();
long
count
=
baseMapper
.
getTGzOfferCount
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
getConverterDicTypeAndArea
(
TGzOfferInfoExportMainVo
.
class
,
redisLabelMap
);
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzOfferInfoExportMainVo
.
class
).
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
)).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
){
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTGzOfferMainList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TGzOfferInfoExportMainVo
>
util
=
new
ExcelUtil
<>(
TGzOfferInfoExportMainVo
.
class
);
for
(
TGzOfferInfoExportMainVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
/**
* 导出瓜子OFFER详情
*
* @return
*/
@Override
public
void
exportDetail
(
HttpServletResponse
response
,
TGzOfferInfoExportSearchVo
searchVo
)
{
String
prfName
=
"瓜子OFFER详情信息"
;
String
fileName
=
prfName
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TGzOfferInfoExportDetailVo
>
list
=
new
ArrayList
<>();
long
count
=
baseMapper
.
getTGzOfferCount
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这是获取所有字典的值
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
getConverterDicTypeAndArea
(
TGzOfferInfoExportDetailVo
.
class
,
redisLabelMap
);
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzOfferInfoExportDetailVo
.
class
).
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
)).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
){
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTGzOfferDetailList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
private
Map
<
String
,
String
>
getConverterDicTypeAndArea
(
Class
<?>
clazz
,
Map
<
String
,
String
>
redisLabelMap
)
{
// 得到所有定义字段
Field
[]
allFields
=
clazz
.
getDeclaredFields
();
Map
<
String
,
String
>
nameDicMap
=
new
HashMap
<>();
List
<
Field
>
fields
=
new
ArrayList
<>();
// 将需要字典表头存起来备用,如果没传,则全部翻译
for
(
Field
field
:
allFields
)
{
if
(
field
.
isAnnotationPresent
(
ExcelAttribute
.
class
))
{
fields
.
add
(
field
);
}
}
ExcelAttribute
attr
;
Field
field
;
String
[]
convertSource
;
String
[]
itemArray
;
for
(
int
j
=
0
;
j
<
fields
.
size
();
j
++)
{
field
=
fields
.
get
(
j
);
attr
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
if
(
Common
.
isNotNull
(
field
)
&&
Common
.
isNotNull
(
attr
)){
if
(
Common
.
isNotNull
(
attr
.
dataType
()))
{
nameDicMap
.
put
(
field
.
getName
(),
attr
.
dataType
());
}
else
if
(
Common
.
isNotNull
(
attr
.
isArea
())
&&
attr
.
isArea
())
{
nameDicMap
.
put
(
field
.
getName
(),
CacheConstants
.
AREA_VALUE_ALL
);
}
else
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
convertSource
=
attr
.
readConverterExp
().
split
(
","
);
if
(
Common
.
isNotNull
(
convertSource
))
{
for
(
String
item
:
convertSource
)
{
itemArray
=
item
.
split
(
"="
);
if
(
itemArray
.
length
>
1
)
{
redisLabelMap
.
put
(
field
.
getName
()+
CommonConstants
.
DOWN_LINE_STRING
+
itemArray
[
0
],
itemArray
[
1
]);
}
}
nameDicMap
.
put
(
field
.
getName
(),
field
.
getName
());
}
}
}
}
return
nameDicMap
;
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TGzOfferInfoMapper.xml
View file @
cf26680f
...
...
@@ -290,4 +290,81 @@
<include
refid=
"tGzOfferInfo_where"
/>
</where>
</select>
<!--导出先查条数-->
<select
id=
"getTGzOfferCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_gz_offer_info a
where a.del_flag = '0'
<include
refid=
"tGzOfferInfo_where"
/>
ORDER by a.create_time desc,a.id desc
</select>
<!-- 导出ORRER字段 -->
<sql
id=
"Export_Column_List"
>
a.biz_id,
a.offer_status,
a.offer_send_status,
a.update_by,
a.update_time,
a.emp_type,
a.emp_type_descr,
a.out_sgin_type,
a.comраnу,
a.name,
a.name_ac,
a.last_name_ac,
a.first_name_ac,
a.country,
a.country_descr,
a.national_id_type,
a.national_id_type_descr,
a.national_id,
a.sex,
a.phone,
a.email,
a.supervisor_name,
a.jobcode_descr,
a.work_location,
a.work_location_descr,
date_format(a.exp_entry_date, '%Y-%m-%d') exp_entry_date,
a.dept_name,
a.base_pay,
a.perfom_pay,
a.year_bonus_month,
a.social_insurance_location,
a.social_insurance_location_descr,
a.social_insurance_base,
a.house_acc_fund_base_max,
a.be_regular_emp_pay,
a.apply_user_email,
date_format(a.create_time, '%Y-%m-%d %H:%i:%s') create_time
</sql>
<!--导出主表-->
<select
id=
"getTGzOfferMainList"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportMainVo"
>
SELECT
<include
refid=
"Export_Column_List"
/>
FROM t_gz_offer_info a
where a.del_flag = '0'
<include
refid=
"tGzOfferInfo_where"
/>
ORDER by a.create_time desc,a.id desc
<if
test=
"tGzOfferInfo.limitStart != null"
>
limit #{tGzOfferInfo.limitStart},#{tGzOfferInfo.limitEnd}
</if>
</select>
<!--导出详情-->
<select
id=
"getTGzOfferDetailList"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportDetailVo"
>
SELECT
<include
refid=
"Export_Column_List"
/>
FROM t_gz_offer_info a
where a.del_flag = '0'
<include
refid=
"tGzOfferInfo_where"
/>
ORDER by a.create_time desc,a.id desc
<if
test=
"tGzOfferInfo.limitStart != null"
>
limit #{tGzOfferInfo.limitStart},#{tGzOfferInfo.limitEnd}
</if>
</select>
</mapper>
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
cf26680f
...
...
@@ -165,4 +165,14 @@ public class ExcelAttributeConstants {
//社保派减委托备注
public
static
final
String
TRUST_REMARK_ADD
=
"trustRemark"
;
// 瓜子的人员类别编码
public
static
final
String
GZ_EMP_TYPE
=
"gz_emp_type"
;
// 瓜子的证件类型编码
public
static
final
String
GZ_NATIONAL_ID_TYPE
=
"gz_national_id_type"
;
// 瓜子的国籍
public
static
final
String
GZ_COUNTRY
=
"gz_country"
;
// 瓜子的性别
public
static
final
String
GZ_SEX
=
"gz_sex"
;
// 瓜子的外签类型
public
static
final
String
GZ_OUT_SGIN_TYPE
=
"gz_out_sgin_type"
;
}
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