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
1e2fff65
Commit
1e2fff65
authored
Jul 28, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派单导出+档案导入
parent
ec284ebc
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
295 additions
and
57 deletions
+295
-57
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+12
-12
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+2
-2
TDispatchInfoExportVo.java
...u/cloud/plus/v1/yifu/social/vo/TDispatchInfoExportVo.java
+135
-0
TDispatchInfoSearchVo.java
...u/cloud/plus/v1/yifu/social/vo/TDispatchInfoSearchVo.java
+31
-22
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+4
-4
TDispatchInfoMapper.java
...cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
+13
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+29
-16
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+68
-0
TSocialFundInfoMapper.xml
...l-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
+1
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
1e2fff65
...
...
@@ -1184,7 +1184,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 户籍所在地
if
(
Common
.
isNotNull
(
excel
.
getIdProvince
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getIdProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getIdProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1192,7 +1192,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getIdCity
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getIdCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getIdCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1200,7 +1200,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getIdTown
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getIdTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdCity
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getIdTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdCity
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1209,7 +1209,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 档案所在地
if
(
Common
.
isNotNull
(
excel
.
getFileProvince
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getFileProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getFileProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1217,7 +1217,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getFileCity
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getFileCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getFileCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1225,7 +1225,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getFileTown
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getFileTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileCity
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getFileTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileCity
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1695,7 +1695,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 户籍所在地
if
(
Common
.
isNotNull
(
excel
.
getIdProvince
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getIdProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getIdProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1703,7 +1703,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getIdCity
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getIdCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getIdCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1711,7 +1711,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getIdTown
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getIdTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdCity
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getIdTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getIdCity
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1720,7 +1720,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 档案所在地
if
(
Common
.
isNotNull
(
excel
.
getFileProvince
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getFileProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getFileProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1728,7 +1728,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getFileCity
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getFileCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileProvince
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getFileCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileProvince
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
@@ -1736,7 +1736,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getFileTown
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
"area_"
+
excel
.
getFileTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileCity
().
trim
());
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
excel
.
getFileTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getFileCity
().
trim
());
if
(
Common
.
isEmpty
(
areaStr
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
,
excel
.
getEmpIdcard
()));
}
else
{
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
1e2fff65
...
...
@@ -96,7 +96,7 @@ public class TDispatchInfo extends BaseEntity {
* 员工类型
*/
@Length
(
max
=
32
,
message
=
"员工类型 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"员工类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型"
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
...
...
@@ -112,7 +112,7 @@ public class TDispatchInfo extends BaseEntity {
* 民族
*/
@Length
(
max
=
32
,
message
=
"民族 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"民族"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"民族"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATIONAL
)
@Schema
(
description
=
"民族"
)
@ExcelProperty
(
"民族"
)
private
String
empNational
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoExportVo.java
0 → 100644
View file @
1e2fff65
/*
* 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
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 派单导出Vo
* @author hgw
* @date 2022-7-28 10:40:34
*/
@Data
@Schema
(
description
=
"派单导出Vo"
)
public
class
TDispatchInfoExportVo
{
@Schema
(
description
=
"主键"
)
@ExcelProperty
(
"主键"
)
private
String
id
;
@ExcelAttribute
(
name
=
"申请编码"
,
maxLength
=
30
)
@Schema
(
description
=
"申请编码"
)
@ExcelProperty
(
"申请编码"
)
private
String
dispatchCode
;
@ExcelAttribute
(
name
=
"员工编码"
,
maxLength
=
30
)
@Schema
(
description
=
"员工编码"
)
@ExcelProperty
(
"员工编码"
)
private
String
empNo
;
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
50
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
@ExcelAttribute
(
name
=
"员工类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型"
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
@ExcelAttribute
(
name
=
"社保公积金类型"
,
readConverterExp
=
"0=社保,1=公积金"
)
@Schema
(
description
=
"社保公积金类型:0社保1公积金"
)
@ExcelProperty
(
"社保公积金类型"
)
private
String
typeSub
;
@ExcelAttribute
(
name
=
"单位名称"
,
maxLength
=
50
)
@Schema
(
description
=
"单位名称"
)
@ExcelProperty
(
"单位名称"
)
private
String
belongUnitName
;
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Schema
(
description
=
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
settleDomainName
;
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
settleDomainCode
;
@ExcelAttribute
(
name
=
"派单类型"
,
readConverterExp
=
"0=增加派单,1=减少派单"
)
@Schema
(
description
=
"派单类型:0派增1派减"
)
@ExcelProperty
(
"派单类型"
)
private
String
type
;
@ExcelAttribute
(
name
=
"派单项"
,
maxLength
=
50
)
@Schema
(
description
=
"派单项:如 养老、公积金"
)
@ExcelProperty
(
"派单项"
)
private
String
dispatchItem
;
@ExcelAttribute
(
name
=
"社保户"
,
maxLength
=
32
)
@Schema
(
description
=
"社保户"
)
@ExcelProperty
(
"社保户"
)
private
String
socialHouseholdName
;
@ExcelAttribute
(
name
=
"公积金户"
,
maxLength
=
32
)
@Schema
(
description
=
"公积金户"
)
@ExcelProperty
(
"公积金户"
)
private
String
providentHouseholdName
;
@ExcelAttribute
(
name
=
"审核状态"
,
readConverterExp
=
"1=待审核,2=审核通过,3=审核不通过"
)
@Schema
(
description
=
"审核状态:1待审核2审核通过3审核不通过"
)
@ExcelProperty
(
"审核状态"
)
private
String
status
;
@ExcelAttribute
(
name
=
"社保办理状态"
,
readConverterExp
=
"0=待办理,1=办理成功,2=办理失败,3=部分办理成功,4=办理中"
)
@Schema
(
description
=
"社保办理状态 0 待办理 1 办理成功 2 办理失败 3 部分办理成功 4 办理中"
)
@ExcelProperty
(
"社保办理状态"
)
private
String
socialHandleStatus
;
@ExcelAttribute
(
name
=
"公积金办理状态"
,
readConverterExp
=
"0=待办理,1=办理成功,2=办理失败,3=已派减"
)
@Schema
(
description
=
"公积金办理状态:0 待办理 1办理成功 2 办理失败 3 已派减"
)
@ExcelProperty
(
"公积金办理状态"
)
private
String
fundHandleStatus
;
@Schema
(
description
=
"申请人"
)
@ExcelProperty
(
"申请人"
)
private
String
createName
;
@ExcelAttribute
(
name
=
"申请人所在部门"
,
maxLength
=
50
)
@Schema
(
description
=
"申请人所在部门"
)
@ExcelProperty
(
"申请人所在部门"
)
private
String
organName
;
@Schema
(
description
=
"申请时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ExcelProperty
(
"申请时间"
)
private
LocalDateTime
createTime
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoSearchVo.java
View file @
1e2fff65
...
...
@@ -16,11 +16,14 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Set
;
/**
* 派单信息记录表
...
...
@@ -31,28 +34,34 @@ import java.time.LocalDateTime;
@Data
public
class
TDispatchInfoSearchVo
extends
TDispatchInfo
{
/**
@TableField
(
exist
=
false
)
@Schema
(
description
=
"导出的表头的Set"
)
private
Set
<
String
>
exportFields
;
@Schema
(
description
=
"选中的idList"
)
private
List
<
String
>
idList
;
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
1e2fff65
...
...
@@ -205,12 +205,12 @@ public class TDispatchInfoController {
/**
* 派单信息记录表 批量导出
* @author
fxj
* @date 2022-
07-15 11:38:05
* @author
hgw
* @date 2022-
7-28 11:01:56
**/
@Operation
(
description
=
"导出派单信息记录表 hasPermission('
demo_
tdispatchinfo-export')"
)
@Operation
(
description
=
"导出派单信息记录表 hasPermission('tdispatchinfo-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('
demo_
tdispatchinfo-export')"
)
@PreAuthorize
(
"@pms.hasPermission('tdispatchinfo-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TDispatchInfoSearchVo
searchVo
)
{
tDispatchInfoService
.
listExport
(
response
,
searchVo
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
View file @
1e2fff65
...
...
@@ -21,9 +21,13 @@ 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.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 派单信息记录表
*
...
...
@@ -38,4 +42,13 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
* @return
*/
IPage
<
TDispatchInfo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
@Param
(
"tDispatchInfo"
)
TDispatchInfo
tDispatchInfo
);
/**
* @Description: 派单导出
* @Author: hgw
* @Date: 2022/7/28 10:45
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo>
**/
List
<
TDispatchInfoExportVo
>
exportDispatch
(
@Param
(
"tDispatchInfo"
)
TDispatchInfoSearchVo
tDispatchInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
1e2fff65
...
...
@@ -46,10 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchReduceVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -103,9 +100,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
)
{
String
fileName
=
"
不良记录
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"
派单
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TDispatchInfo
>
list
=
new
ArrayList
<>();
List
<
TDispatchInfo
ExportVo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
...
...
@@ -114,22 +111,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfo
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfo
ExportVo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
list
=
exportDispatch
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TDispatchInfo
>
util
=
new
ExcelUtil
<>(
TDispatchInf
o
.
class
);
for
(
TDispatchInfo
vo
:
list
)
{
ExcelUtil
<
TDispatchInfo
ExportVo
>
util
=
new
ExcelUtil
<>(
TDispatchInfoExportV
o
.
class
);
for
(
TDispatchInfo
ExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"派单
信息记录表
"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"派单"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -139,7 +136,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"派单
信息记录表
"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"派单"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
...
...
@@ -163,8 +160,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
public
List
<
TDispatchInfo
>
noPageDiy
(
TDispatchInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
List
<
String
>
idList
;
if
(
Common
.
isNotNull
(
searchVo
.
getIds
()))
{
idList
=
Common
.
getList
(
searchVo
.
getIds
());
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
}
else
if
(
searchVo
.
getIdList
()
!=
null
)
{
idList
=
searchVo
.
getIdList
();
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
...
...
@@ -174,10 +175,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
baseMapper
.
selectList
(
wrapper
);
}
private
List
<
TDispatchInfoExportVo
>
exportDispatch
(
TDispatchInfoSearchVo
searchVo
)
{
if
(
Common
.
isNotNull
(
searchVo
.
getIds
()))
{
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
searchVo
.
setIdList
(
idList
);
}
return
baseMapper
.
exportDispatch
(
searchVo
);
}
private
Long
noPageCountDiy
(
TDispatchInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
List
<
String
>
idList
;
if
(
Common
.
isNotNull
(
searchVo
.
getIds
()))
{
idList
=
Common
.
getList
(
searchVo
.
getIds
());
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
}
else
if
(
searchVo
.
getIdList
()
!=
null
)
{
idList
=
searchVo
.
getIdList
();
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
1e2fff65
...
...
@@ -97,6 +97,31 @@
</resultMap>
<!-- 派单导出vo -->
<resultMap
id=
"exportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"dispatchCode"
column=
"DISPATCH_CODE"
/>
<result
property=
"empNo"
column=
"EMP_NO"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empType"
column=
"EMP_TYPE"
/>
<result
property=
"typeSub"
column=
"TYPE_SUB"
/>
<result
property=
"belongUnitName"
column=
"BELONG_UNIT_NAME"
/>
<result
property=
"settleDomainName"
column=
"SETTLE_DOMAIN_NAME"
/>
<result
property=
"settleDomainCode"
column=
"SETTLE_DOMAIN_CODE"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"dispatchItem"
column=
"DISPATCH_ITEM"
/>
<result
property=
"socialHouseholdName"
column=
"SOCIAL_HOUSEHOLD_NAME"
/>
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"status"
column=
"STATUS"
/>
<result
property=
"socialHandleStatus"
column=
"SOCIAL_HANDLE_STATUS"
/>
<result
property=
"fundHandleStatus"
column=
"FUND_HANDLE_STATUS"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"organName"
column=
"ORGAN_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.EMP_ID,
...
...
@@ -170,6 +195,12 @@
</sql>
<sql
id=
"tDispatchInfo_where"
>
<if
test=
"tDispatchInfo != null"
>
<if
test=
"tDispatchInfo.idList != null"
>
AND a.ID in
<foreach
item=
"idStr"
index=
"index"
collection=
"tDispatchInfo.idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
<if
test=
"tDispatchInfo.id != null and tDispatchInfo.id.trim() != ''"
>
AND a.ID = #{tDispatchInfo.id}
</if>
...
...
@@ -355,5 +386,42 @@
1=1
<include
refid=
"tDispatchInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
<!-- 派单导出 -->
<select
id=
"exportDispatch"
resultMap=
"exportMap"
>
select
a.ID,
a.DISPATCH_CODE,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.TYPE_SUB,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SETTLE_DOMAIN_CODE,
a.TYPE,
a.DISPATCH_ITEM,
s.SOCIAL_HOUSEHOLD_NAME,
f.PROVIDENT_HOUSEHOLD_NAME,
a.STATUS,
a.SOCIAL_HANDLE_STATUS,
a.FUND_HANDLE_STATUS,
a.CREATE_NAME,
a.ORGAN_NAME,
a.CREATE_TIME
from t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID
<where>
1=1
<include
refid=
"tDispatchInfo_where"
/>
</where>
order by a.CREATE_TIME desc
<if
test=
"tSocialFundInfo.limitStart != null"
>
limit #{tDispatchInfo.limitStart},#{tDispatchInfo.limitEnd}
</if>
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
View file @
1e2fff65
...
...
@@ -392,7 +392,7 @@
<sql
id=
"tSocialFundInfo_where"
>
<if
test=
"tSocialFundInfo != null"
>
<if
test=
"tSocialFundInfo.idList != null"
>
AND a.
id
in
AND a.
ID
in
<foreach
item=
"idStr"
index=
"index"
collection=
"tSocialFundInfo.idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
...
...
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