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
f18e8855
Commit
f18e8855
authored
Jun 17, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
f5d79e55
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
895 additions
and
59 deletions
+895
-59
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+8
-0
TWorkHandlerInfo.java
.../cloud/plus/v1/yifu/archives/entity/TWorkHandlerInfo.java
+142
-0
TWorkHandlerInfoSearchVo.java
...lus/v1/yifu/archives/entity/TWorkHandlerInfoSearchVo.java
+73
-0
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+2
-1
TWorkHandlerInfoController.java
.../yifu/archives/controller/TWorkHandlerInfoController.java
+87
-0
TWorkHandlerInfoMapper.java
.../plus/v1/yifu/archives/mapper/TWorkHandlerInfoMapper.java
+48
-0
TWorkHandlerInfoService.java
...lus/v1/yifu/archives/service/TWorkHandlerInfoService.java
+43
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+267
-58
TWorkHandlerInfoServiceImpl.java
...fu/archives/service/impl/TWorkHandlerInfoServiceImpl.java
+106
-0
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+1
-0
TWorkHandlerInfoMapper.xml
...-biz/src/main/resources/mapper/TWorkHandlerInfoMapper.xml
+118
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
f18e8855
...
...
@@ -130,6 +130,14 @@ public class TEmployeeContractInfo extends BaseEntity {
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
128
)
@Schema
(
description
=
"客户名称"
,
name
=
"subjectUnit"
)
private
String
subjectUnit
;
/**
* 0 是 1 否
*/
@NotBlank
(
message
=
"是否同步终止合同、减项、减档"
)
@Length
(
max
=
1
,
message
=
"是否同步终止合同、减项、减档不能超过1个字符"
)
@ExcelAttribute
(
name
=
"是否同步终止合同、减项、减档"
,
maxLength
=
1
)
@Schema
(
description
=
"是否同步终止合同、减项、减档"
,
name
=
"situation"
)
private
String
changeContractAndEmployee
;
/**
* 签订类型(字典也是汉字
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TWorkHandlerInfo.java
0 → 100644
View file @
f18e8855
/*
* 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
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.time.LocalDateTime
;
/**
* 任务处理清单表
*
* @author huyc
* @date 2023-06-15 12:18:28
*/
@Data
@TableName
(
"t_work_handler_info"
)
@EqualsAndHashCode
()
@Schema
(
description
=
"任务处理清单表"
)
public
class
TWorkHandlerInfo
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 结算主体编码
*/
@ExcelAttribute
(
name
=
"结算主体编码"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体编码不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"结算主体编码不能为空"
)
@Length
(
max
=
32
,
message
=
"结算主体编码不能超过32个字符"
)
@ExcelProperty
(
"结算主体编码"
)
@Schema
(
description
=
"结算主体编码"
)
private
String
departNo
;
/**
* 结算主体名称
*/
@ExcelAttribute
(
name
=
"结算主体名称"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"结算主体名称不能为空"
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelProperty
(
"结算主体名称"
)
@Schema
(
description
=
"结算主体名称"
)
private
String
departName
;
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@ExcelProperty
(
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证
*/
@ExcelAttribute
(
name
=
"员工身份证"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"员工身份证不能超过32个字符"
)
@ExcelProperty
(
"员工身份证"
)
@Schema
(
description
=
"员工身份证"
)
private
String
empIdcard
;
/**
* 是否删除(0否/1是)
*/
@ExcelAttribute
(
name
=
"是否删除"
,
isExport
=
false
)
@Schema
(
description
=
"是否删除(0否/1是)"
)
private
String
deleteFlag
;
/**
* 联动端口
*/
@ExcelAttribute
(
name
=
"联动端口"
,
maxLength
=
8
)
@Length
(
max
=
8
,
message
=
"联动端口不能超过8个字符"
)
@ExcelProperty
(
"联动端口"
)
@Schema
(
description
=
"联动端口"
)
private
String
infoFrom
;
/**
* 操作人
*/
@ExcelAttribute
(
name
=
"操作人"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"操作人不能超过32个字符"
)
@ExcelProperty
(
"操作人"
)
@Schema
(
description
=
"操作人"
)
private
String
operUser
;
/**
* 操作时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"操作时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"操作时间"
)
private
LocalDateTime
operTime
;
/**
* 执行结果
*/
@ExcelAttribute
(
name
=
"执行结果"
,
maxLength
=
5
)
@Length
(
max
=
5
,
message
=
"执行结果不能超过5个字符"
)
@ExcelProperty
(
"执行结果"
)
@Schema
(
description
=
"执行结果"
)
private
String
operResult
;
/**
* 执行详情
*/
@ExcelAttribute
(
name
=
"执行详情"
,
maxLength
=
255
)
@Length
(
max
=
255
,
message
=
"执行详情不能超过255个字符"
)
@ExcelProperty
(
"执行详情"
)
@Schema
(
description
=
"执行详情"
)
private
String
operInfo
;
/**
* 原因
*/
@ExcelAttribute
(
name
=
"原因"
,
maxLength
=
255
)
@Length
(
max
=
255
,
message
=
"原因不能超过255个字符"
)
@ExcelProperty
(
"原因"
)
@Schema
(
description
=
"原因"
)
private
String
reason
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TWorkHandlerInfoSearchVo.java
0 → 100644
View file @
f18e8855
/*
* 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
.
entity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.Set
;
/**
* 任务处理清单表
*
* @author huyc
* @date 2023-06-15 12:18:28
*/
@Data
public
class
TWorkHandlerInfoSearchVo
extends
TWorkHandlerInfo
{
@Schema
(
description
=
"导出的表头的Set"
)
private
Set
<
String
>
exportFields
;
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
/**
* 开始日期
*/
@Schema
(
description
=
"开始日期"
)
private
String
startTime
;
/**
* 结束日期
*/
@Schema
(
description
=
"结束日期"
)
private
String
endTime
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
f18e8855
...
...
@@ -56,9 +56,10 @@ public class EmployeeConstants {
public
static
final
String
WORKING_HOURS_EMPTY
=
"工时制不能为空"
;
public
static
final
String
EXIT_PRIJECT_STATUS
=
"人员已有该项目信息,禁止重复添加"
;
public
static
final
String
CONTRACT_REDUCE_INFO_NOT_EMPTY
=
"签订类型为终止时,离职日期
和终止原因
必填"
;
public
static
final
String
CONTRACT_REDUCE_INFO_NOT_EMPTY
=
"签订类型为终止时,离职日期
、终止原因和是否同步终止合同、减项、减档
必填"
;
public
static
final
String
CONTRACT_REDUCE_REASON_NOT_EMPTY
=
"终止原因为其他时,原因说明必填"
;
/**
* 对应项目编码已停止合作
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TWorkHandlerInfoController.java
0 → 100644
View file @
f18e8855
/*
* 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
.
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.TWorkHandlerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TWorkHandlerInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 任务处理清单表
*
* @author huyc
* @date 2023-06-15 12:18:28
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tworkhandlerinfo"
)
@Tag
(
name
=
"任务处理清单表管理"
)
public
class
TWorkHandlerInfoController
{
private
final
TWorkHandlerInfoService
tWorkHandlerInfoService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tWorkHandlerInfo 任务处理清单表
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TWorkHandlerInfo
>>
getTWorkHandlerInfoPage
(
Page
<
TWorkHandlerInfo
>
page
,
TWorkHandlerInfoSearchVo
tWorkHandlerInfo
)
{
return
new
R
<>(
tWorkHandlerInfoService
.
getTWorkHandlerInfoPage
(
page
,
tWorkHandlerInfo
));
}
/**
* 通过id查询任务处理清单表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('archives_tworkhandlerinfo_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tworkhandlerinfo_get')"
)
public
R
<
TWorkHandlerInfo
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tWorkHandlerInfoService
.
getById
(
id
));
}
/**
* 任务处理清单表 批量导出
*
* @author huyc
* @date 2023-06-15 12:18:28
**/
@Operation
(
description
=
"导出任务处理清单表 hasPermission('archives_tworkhandlerinfo-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tworkhandlerinfo-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TWorkHandlerInfoSearchVo
searchVo
)
{
tWorkHandlerInfoService
.
listExport
(
response
,
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TWorkHandlerInfoMapper.java
0 → 100644
View file @
f18e8855
/*
* 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
.
mapper
;
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.TWorkHandlerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 任务处理清单表
*
* @author huyc
* @date 2023-06-15 12:18:28
*/
@Mapper
public
interface
TWorkHandlerInfoMapper
extends
BaseMapper
<
TWorkHandlerInfo
>
{
/**
* 任务处理清单表简单分页查询
* @param tWorkHandlerInfo 任务处理清单表
* @return
*/
IPage
<
TWorkHandlerInfo
>
getTWorkHandlerInfoPage
(
Page
<
TWorkHandlerInfo
>
page
,
@Param
(
"tWorkHandlerInfo"
)
TWorkHandlerInfoSearchVo
tWorkHandlerInfo
);
Integer
noPageCountDiy
(
@Param
(
"tWorkHandlerInfo"
)
TWorkHandlerInfoSearchVo
tWorkHandlerInfo
);
List
<
TWorkHandlerInfo
>
noPageDiy
(
@Param
(
"tWorkHandlerInfo"
)
TWorkHandlerInfoSearchVo
tWorkHandlerInfo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TWorkHandlerInfoService.java
0 → 100644
View file @
f18e8855
/*
* 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
.
service
;
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.TWorkHandlerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 任务处理清单表
*
* @author huyc
* @date 2023-06-15 12:18:28
*/
public
interface
TWorkHandlerInfoService
extends
IService
<
TWorkHandlerInfo
>
{
/**
* 任务处理清单表简单分页查询
* @param tWorkHandlerInfo 任务处理清单表
* @return
*/
IPage
<
TWorkHandlerInfo
>
getTWorkHandlerInfoPage
(
Page
<
TWorkHandlerInfo
>
page
,
TWorkHandlerInfoSearchVo
tWorkHandlerInfo
);
void
listExport
(
HttpServletResponse
response
,
TWorkHandlerInfoSearchVo
searchVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
f18e8855
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TWorkHandlerInfoServiceImpl.java
0 → 100644
View file @
f18e8855
/*
* 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
.
service
.
impl
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TWorkHandlerInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TWorkHandlerInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 任务处理清单表
*
* @author huyc
* @date 2023-06-15 12:18:28
*/
@Log4j2
@Service
public
class
TWorkHandlerInfoServiceImpl
extends
ServiceImpl
<
TWorkHandlerInfoMapper
,
TWorkHandlerInfo
>
implements
TWorkHandlerInfoService
{
/**
* 任务处理清单表简单分页查询
* @param tWorkHandlerInfo 任务处理清单表
* @return
*/
@Override
public
IPage
<
TWorkHandlerInfo
>
getTWorkHandlerInfoPage
(
Page
<
TWorkHandlerInfo
>
page
,
TWorkHandlerInfoSearchVo
tWorkHandlerInfo
){
return
baseMapper
.
getTWorkHandlerInfoPage
(
page
,
tWorkHandlerInfo
);
}
/**
* 任务处理清单表批量导出
* @param searchVo 任务处理清单表
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TWorkHandlerInfoSearchVo
searchVo
){
String
fileName
=
"任务处理清单表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TWorkHandlerInfo
>
list
=
new
ArrayList
<>();
Integer
count
=
baseMapper
.
noPageCountDiy
(
searchVo
);
try
(
ServletOutputStream
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
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TWorkHandlerInfo
.
class
).
includeColumnFieldNames
(
searchVo
.
getExportFields
()).
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
.
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"任务处理清单表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"任务处理清单表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
f18e8855
...
...
@@ -83,6 +83,7 @@
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"leaveDate"
column=
"LEAVE_DATE"
/>
<result
property=
"reduceReason"
column=
"REDUCE_REASON"
/>
<result
property=
"changeContractAndEmployee"
column=
"CHANGE_CONTRACT_AND_EMPLOYEE"
/>
</resultMap>
<!-- 合同审核导出 -->
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TWorkHandlerInfoMapper.xml
0 → 100644
View file @
f18e8855
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TWorkHandlerInfoMapper"
>
<resultMap
id=
"tWorkHandlerInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"departNo"
column=
"DEPART_NO"
/>
<result
property=
"departName"
column=
"DEPART_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
/>
<result
property=
"infoFrom"
column=
"INFO_FROM"
/>
<result
property=
"operUser"
column=
"OPER_USER"
/>
<result
property=
"operTime"
column=
"OPER_TIME"
/>
<result
property=
"operResult"
column=
"OPER_RESULT"
/>
<result
property=
"operInfo"
column=
"OPER_INFO"
/>
<result
property=
"reason"
column=
"REASON"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.DEPART_NO,
a.DEPART_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.DELETE_FLAG,
a.INFO_FROM,
a.OPER_USER,
a.OPER_TIME,
a.OPER_RESULT,
a.OPER_INFO,
a.REASON
</sql>
<sql
id=
"tWorkHandlerInfo_where"
>
<if
test=
"tWorkHandlerInfo != null"
>
<if
test=
"tWorkHandlerInfo.departNo != null and tWorkHandlerInfo.departNo.trim() != ''"
>
AND a.DEPART_NO = #{tWorkHandlerInfo.departNo}
</if>
<if
test=
"tWorkHandlerInfo.departName != null and tWorkHandlerInfo.departName.trim() != ''"
>
AND a.DEPART_NAME = #{tWorkHandlerInfo.departName}
</if>
<if
test=
"tWorkHandlerInfo.empName != null and tWorkHandlerInfo.empName.trim() != ''"
>
AND a.EMP_NAME = like concat('%', #{tWorkHandlerInfo.empName} ,'%')
</if>
<if
test=
"tWorkHandlerInfo.empIdcard != null and tWorkHandlerInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like concat('%', #{tWorkHandlerInfo.empIdcard} ,'%')
</if>
<if
test=
"tWorkHandlerInfo.infoFrom != null and tWorkHandlerInfo.infoFrom.trim() != ''"
>
AND a.INFO_FROM = #{tWorkHandlerInfo.infoFrom}
</if>
<if
test=
"tWorkHandlerInfo.operUser != null and tWorkHandlerInfo.operUser.trim() != ''"
>
AND a.OPER_USER like concat('%', #{tWorkHandlerInfo.operUser} ,'%')
</if>
<if
test=
"tWorkHandlerInfo.startTime != null and tWorkHandlerInfo.startTime.trim() != '' "
>
AND a.OPER_TIME
<![CDATA[ >= ]]>
concat(#{tWorkHandlerInfo.startTime}, ' 00:00:00')
</if>
<if
test=
"tWorkHandlerInfo.endTime != null and tWorkHandlerInfo.endTime.trim() != '' "
>
AND a.OPER_TIME
<![CDATA[ <= ]]>
concat(#{tWorkHandlerInfo.endTime}, ' 23:59:59')
</if>
<if
test=
"tWorkHandlerInfo.operResult != null and tWorkHandlerInfo.operResult.trim() != ''"
>
AND a.OPER_RESULT = #{tWorkHandlerInfo.operResult}
</if>
</if>
</sql>
<!--tWorkHandlerInfo简单分页查询-->
<select
id=
"getTWorkHandlerInfoPage"
resultMap=
"tWorkHandlerInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_work_handler_info a
<where>
1=1
<include
refid=
"tWorkHandlerInfo_where"
/>
</where>
order by a.OPER_TIME desc
</select>
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_work_handler_info a
<where>
1=1
<include
refid=
"tWorkHandlerInfo_where"
/>
</where>
</select>
<select
id=
"noPageDiy"
resultMap=
"tWorkHandlerInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_work_handler_info a
<where>
1=1
<include
refid=
"tWorkHandlerInfo_where"
/>
</where>
order by a.OPER_TIME desc
limit #{tWorkHandlerInfo.limitStart},#{tWorkHandlerInfo.limitEnd}
</select>
</mapper>
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