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
eb6c0e2d
Commit
eb6c0e2d
authored
Jun 21, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.6.6' into MVP1.6.6
parents
a446d73b
a0d61ea5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1177 additions
and
0 deletions
+1177
-0
TCompleteMonitor.java
.../cloud/plus/v1/yifu/archives/entity/TCompleteMonitor.java
+75
-0
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+7
-0
TCompleteMonitorFlagVo.java
...loud/plus/v1/yifu/archives/vo/TCompleteMonitorFlagVo.java
+90
-0
TCompleteMonitorInfoVo.java
...loud/plus/v1/yifu/archives/vo/TCompleteMonitorInfoVo.java
+37
-0
TCompleteMonitorSearchVo.java
...ud/plus/v1/yifu/archives/vo/TCompleteMonitorSearchVo.java
+45
-0
TCompleteMonitorVo.java
...fu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorVo.java
+137
-0
TCompleteMonitorController.java
.../yifu/archives/controller/TCompleteMonitorController.java
+131
-0
TCompleteMonitorMapper.java
.../plus/v1/yifu/archives/mapper/TCompleteMonitorMapper.java
+95
-0
TEmployeeProjectMapper.java
.../plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
+7
-0
TCompleteMonitorService.java
...lus/v1/yifu/archives/service/TCompleteMonitorService.java
+53
-0
TCompleteMonitorServiceImpl.java
...fu/archives/service/impl/TCompleteMonitorServiceImpl.java
+205
-0
TCompleteMonitorMapper.xml
...-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml
+279
-0
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+8
-0
ArchiveTask.java
.../java/com/yifu/cloud/plus/v1/job/compont/ArchiveTask.java
+8
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCompleteMonitor.java
0 → 100644
View file @
eb6c0e2d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
@TableName
(
"t_complete_monitor"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"档案完整度监控"
)
public
class
TCompleteMonitor
extends
BaseEntity
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
@Schema
(
description
=
"客户名称"
)
private
String
unitName
;
@Schema
(
description
=
"客户编码"
)
private
String
unitNo
;
@Schema
(
description
=
"项目名称"
)
private
String
deptName
;
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
@Schema
(
description
=
"业务类型一级分类"
)
private
String
businessPrimaryType
;
@Schema
(
description
=
"业务类型二级分类"
)
private
String
businessSecondType
;
@Schema
(
description
=
"业务类型三级分类"
)
private
String
businessThirdType
;
@Schema
(
description
=
"在项人数"
)
private
Integer
inusePersonNum
;
@Schema
(
description
=
"信息是否完整 0是 1 否"
)
private
String
isComplete
;
@Schema
(
description
=
"信息不完整人数"
)
private
Integer
incompleteNum
;
@Schema
(
description
=
"完整度占比"
)
private
String
completePer
;
@Schema
(
description
=
"6月及后入职人数"
)
private
Integer
afterEmployment
;
@Schema
(
description
=
"6月及后入职信息是否完整 0是 1 否"
)
private
String
afterIsComplete
;
@Schema
(
description
=
"6月及后入职信息不完整人数"
)
private
Integer
afterIncompleteNum
;
@Schema
(
description
=
"立项申请人"
)
private
String
alertUser
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
eb6c0e2d
...
...
@@ -273,6 +273,13 @@ public class TEmployeeProject extends BaseEntity {
@Schema
(
description
=
"是否删除 0否/1是"
)
private
String
deleteFlag
;
/**
* 是否完整 0是 1 否
*/
@Schema
(
description
=
"是否完整0是 1 否"
)
private
String
isComplete
;
/**
* 备注
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorFlagVo.java
0 → 100644
View file @
eb6c0e2d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public
class
TCompleteMonitorFlagVo
implements
Serializable
{
private
String
empSex
;
private
Date
validityStart
;
private
Date
validityEnd
;
private
Date
empBirthday
;
private
Integer
empAge
;
private
String
empMarriStatus
;
private
String
empNational
;
private
String
politicalStatus
;
private
String
empPhone
;
private
String
empRegisType
;
private
Integer
fileProvince
;
private
Integer
fileCity
;
private
Integer
isCollege
;
private
String
hignEducation
;
private
String
school
;
private
String
major
;
private
Date
admissionDate
;
private
Date
gradutionDate
;
private
String
contactAddress
;
private
String
firstWorkFlag
;
private
String
haveQualification
;
private
String
deptName
;
private
String
unitName
;
private
String
businessPrimaryType
;
private
String
businessSecondType
;
private
String
businessThirdType
;
private
String
workingHours
;
private
String
tryPeriod
;
private
Date
enjoinDate
;
private
String
post
;
private
String
empProjectId
;
private
String
contactInfoId
;
private
String
disabilityFlag
;
private
String
badRecordFlag
;
private
String
educationFlag
;
private
String
familyFlag
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorInfoVo.java
0 → 100644
View file @
eb6c0e2d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public
class
TCompleteMonitorInfoVo
implements
Serializable
{
@Schema
(
description
=
"姓名"
)
private
String
empName
;
@Schema
(
description
=
"身份证号"
)
private
String
empIdCard
;
@Schema
(
description
=
"手机号码"
)
private
String
phone
;
@Schema
(
description
=
"进项目时间"
)
private
LocalDateTime
inTime
;
@Schema
(
description
=
"信息是否完整"
)
private
String
isComplete
;
@Schema
(
description
=
"人员档案id"
)
private
String
empInfoId
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorSearchVo.java
0 → 100644
View file @
eb6c0e2d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public
class
TCompleteMonitorSearchVo
extends
TCompleteMonitor
{
/**
* 多选导出或删除等操作
*/
@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
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorVo.java
0 → 100644
View file @
eb6c0e2d
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.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public
class
TCompleteMonitorVo
extends
RowIndex
implements
Serializable
{
/**
* 客户名称
*/
@Length
(
max
=
50
,
message
=
"客户名称 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Schema
(
description
=
"客户名称"
)
@ExcelProperty
(
"客户名称"
)
private
String
unitName
;
/**
* 客户编码
*/
@Length
(
max
=
32
,
message
=
"客户编码 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"客户编码"
,
maxLength
=
32
)
@Schema
(
description
=
"客户编码"
)
@ExcelProperty
(
"客户编码"
)
private
String
unitNo
;
/**
* 项目名称
*/
@Length
(
max
=
50
,
message
=
"项目名称 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Schema
(
description
=
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
/**
* 项目编码
*/
@NotBlank
(
message
=
"项目编码 不能为空"
)
@Length
(
max
=
30
,
message
=
"项目编码 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"项目编码"
,
isNotEmpty
=
true
,
errorInfo
=
"项目编码不能为空"
,
maxLength
=
30
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
/**
* 业务类型一级分类
*/
@Length
(
max
=
64
,
message
=
"业务类型一级分类 不能超过64 个字符"
)
@ExcelAttribute
(
name
=
"业务类型"
,
maxLength
=
64
)
@Schema
(
description
=
"业务类型"
)
@ExcelProperty
(
"业务类型"
)
private
String
businessPrimaryType
;
/**
* 在项人数
*/
@ExcelAttribute
(
name
=
"在项人数"
)
@Schema
(
description
=
"在项人数"
)
@ExcelProperty
(
"在项人数"
)
private
Integer
inusePersonNum
;
/**
* 信息是否完整
*/
@Length
(
max
=
1
,
message
=
"信息是否完整 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"信息是否完整"
,
maxLength
=
1
,
readConverterExp
=
"0=否,1=是"
)
@Schema
(
description
=
"信息是否完整"
)
@ExcelProperty
(
"信息是否完整"
)
private
String
isComplete
;
/**
* 信息不完整人数
*/
@ExcelAttribute
(
name
=
"信息不完整人数"
)
@Schema
(
description
=
"信息不完整人数"
)
@ExcelProperty
(
"信息不完整人数"
)
private
Integer
incompleteNum
;
/**
* 完整度占比
*/
@Length
(
max
=
8
,
message
=
"完整度占比 不能超过8 个字符"
)
@ExcelAttribute
(
name
=
"完整度占比"
,
maxLength
=
8
)
@Schema
(
description
=
"完整度占比"
)
@ExcelProperty
(
"完整度占比"
)
private
String
completePer
;
/**
* 6月及后入职人数
*/
@ExcelAttribute
(
name
=
"6月及后入职人数"
)
@Schema
(
description
=
"6月及后入职人数"
)
@ExcelProperty
(
"6月及后入职人数"
)
private
Integer
afterEmployment
;
/**
* 6月及后入职信息是否完整
*/
@Length
(
max
=
1
,
message
=
"6月及后入职信息是否完整 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"6月及后入职信息是否完整"
,
maxLength
=
1
,
readConverterExp
=
"0=否,1=是"
)
@Schema
(
description
=
"6月及后入职信息是否完整"
)
@ExcelProperty
(
"6月及后入职信息是否完整"
)
private
String
afterIsComplete
;
/**
* 6月及后入职信息不完整人数
*/
@ExcelAttribute
(
name
=
"6月及后入职信息不完整人数"
)
@Schema
(
description
=
"6月及后入职信息不完整人数"
)
@ExcelProperty
(
"6月及后入职信息不完整人数"
)
private
Integer
afterIncompleteNum
;
/**
* 立项申请人
*/
@Length
(
max
=
32
,
message
=
"立项申请人 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"立项申请人"
,
maxLength
=
32
)
@Schema
(
description
=
"立项申请人"
)
@ExcelProperty
(
"立项申请人"
)
private
String
alertUser
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCompleteMonitorController.java
0 → 100644
View file @
eb6c0e2d
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.TCompleteMonitor
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo
;
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.common.security.annotation.Inner
;
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 2024-06-17 16:08:58
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tcompletemonitor"
)
@Tag
(
name
=
"档案完整度监控管理"
)
public
class
TCompleteMonitorController
{
private
final
TCompleteMonitorService
tCompleteMonitorService
;
/**
* 简单分页查询
* @param page 分页对象
* @param tCompleteMonitor 档案完整度监控
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TCompleteMonitor
>>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
tCompleteMonitor
)
{
return
new
R
<>(
tCompleteMonitorService
.
getTCompleteMonitorPage
(
page
,
tCompleteMonitor
));
}
/**
* 查询人员明细
* @param page 分页对象
* @param deptNo 查询人员明细
* @return
*/
@Operation
(
description
=
"根据项目查询人员明细"
)
@GetMapping
(
"/empPage"
)
public
R
<
IPage
<
TCompleteMonitorInfoVo
>>
getMonitorEmpInfoListPage
(
Page
<
TCompleteMonitorInfoVo
>
page
,
String
deptNo
)
{
return
new
R
<>(
tCompleteMonitorService
.
getMonitorEmpInfoListPage
(
page
,
deptNo
));
}
/**
* 通过id查询档案完整度监控
* @param id id
* @return R
*/
@Operation
(
summary
=
"查看详情"
,
description
=
"查看详情"
)
@GetMapping
(
"/{id}"
)
public
R
<
TCompleteMonitor
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tCompleteMonitorService
.
getById
(
id
));
}
/**
* 修改档案完整度监控
* @param tCompleteMonitor 档案完整度监控
* @return R
*/
@Operation
(
summary
=
"修改档案完整度监控"
,
description
=
"修改档案完整度监控:hasPermission('archves_tcompletemonitor_edit')"
)
@SysLog
(
"修改档案完整度监控"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('archves_tcompletemonitor_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TCompleteMonitor
tCompleteMonitor
)
{
return
R
.
ok
(
tCompleteMonitorService
.
updateById
(
tCompleteMonitor
));
}
/**
* 通过id删除档案完整度监控
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除档案完整度监控"
,
description
=
"通过id删除档案完整度监控:hasPermission('archves_tcompletemonitor_del')"
)
@SysLog
(
"通过id删除档案完整度监控"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('archves_tcompletemonitor_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tCompleteMonitorService
.
removeById
(
id
));
}
/**
* 档案完整度监控 批量导出
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation
(
description
=
"导出档案完整度监控 hasPermission('archves_tcompletemonitor-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('archves_tcompletemonitor-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TCompleteMonitorSearchVo
searchVo
)
{
tCompleteMonitorService
.
listExport
(
response
,
searchVo
);
}
/**
* 档案完整度监控 批量生成
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation
(
description
=
"生成档案完整度监控"
)
@Inner
@PostMapping
(
"/inner/createComlpeteMonitor"
)
public
void
createComlpeteMonitor
()
throws
IllegalAccessException
{
tCompleteMonitorService
.
createComlpeteMonitor
();
}
/**
* 档案完整度监控 批量生成
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation
(
description
=
"根据项目编码刷新项目完整度状态"
)
@PostMapping
(
"/updateProjectStatusByDeptNo"
)
public
R
updateProjectStatusByDeptNo
(
@RequestParam
String
deptNo
)
throws
IllegalAccessException
{
tCompleteMonitorService
.
updateProjectStatusByDeptNo
(
deptNo
);
return
R
.
ok
();
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TCompleteMonitorMapper.java
0 → 100644
View file @
eb6c0e2d
/*
* 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.TCompleteMonitor
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorFlagVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Mapper
public
interface
TCompleteMonitorMapper
extends
BaseMapper
<
TCompleteMonitor
>
{
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
@Param
(
"tCompleteMonitor"
)
TCompleteMonitor
tCompleteMonitor
);
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
long
getExportCount
(
@Param
(
"tCompleteMonitor"
)
TCompleteMonitorSearchVo
tCompleteMonitor
);
/**
* 档案完整度监控批量导出
* @param tCompleteMonitor 档案完整度监控
* @return
*/
List
<
TCompleteMonitorVo
>
getTCompleteMonitorExportList
(
@Param
(
"tCompleteMonitor"
)
TCompleteMonitorSearchVo
tCompleteMonitor
);
/**
* 查询人员明细
* @param deptNo 项目编码
* @return
*/
IPage
<
TCompleteMonitorInfoVo
>
getMonitorEmpInfoList
(
Page
<
TCompleteMonitorInfoVo
>
page
,
@Param
(
"deptNo"
)
String
deptNo
);
/**
* 获取所有监控数据
* @return
*/
List
<
TCompleteMonitor
>
getAllMonitorEmpList
(
@Param
(
"deptNo"
)
String
deptNo
);
/**
* 删除所有监控数据
* @return
*/
void
deleteAllMonitorInfo
();
/**
* 判断项目档案的完整状态
* @return
*/
List
<
TCompleteMonitorFlagVo
>
checkEmpProjectCompleteFlag
(
@Param
(
"deptNo"
)
String
deptNo
);
/**
* 根据项目编码删除监控数据
* @return
*/
void
deleteMonitorInfoByDeptNo
(
@Param
(
"deptNo"
)
String
deptNo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
View file @
eb6c0e2d
...
...
@@ -118,4 +118,11 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
void
updateContractStatus
(
@Param
(
"empId"
)
String
empId
,
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"status"
)
int
status
);
int
updatePostByEmpDeptNo
(
@Param
(
"deptNo"
)
String
deptNo
,
@Param
(
"post"
)
String
post
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
* 批量刷新项目档案的是否完整状态
* @return
*/
void
batchUpdateEmpProjectCompleteStatus
(
@Param
(
"idList"
)
List
<
String
>
idList
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TCompleteMonitorService.java
0 → 100644
View file @
eb6c0e2d
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.TCompleteMonitor
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
public
interface
TCompleteMonitorService
extends
IService
<
TCompleteMonitor
>
{
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
tCompleteMonitor
);
/**
* 档案完整度监控导出
* @param searchVo 档案完整度监控
* @return
*/
void
listExport
(
HttpServletResponse
response
,
TCompleteMonitorSearchVo
searchVo
);
/**
* 档案完整度监控生成
* @return
*/
void
createComlpeteMonitor
()
throws
IllegalAccessException
;
/**
* 根据项目编码刷新项目完整度状态
* @return
*/
void
updateProjectStatusByDeptNo
(
String
deptNo
)
throws
IllegalAccessException
;
/**
* 档案完整度监控简单分页查询
* @param deptNo 项目编码
* @return
*/
IPage
<
TCompleteMonitorInfoVo
>
getMonitorEmpInfoListPage
(
Page
<
TCompleteMonitorInfoVo
>
page
,
String
deptNo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCompleteMonitorServiceImpl.java
0 → 100644
View file @
eb6c0e2d
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.TCompleteMonitor
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorFlagVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo
;
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
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.lang.reflect.Field
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Log4j2
@Service
@RequiredArgsConstructor
public
class
TCompleteMonitorServiceImpl
extends
ServiceImpl
<
TCompleteMonitorMapper
,
TCompleteMonitor
>
implements
TCompleteMonitorService
{
private
final
TEmployeeProjectMapper
projectMapper
;
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
@Override
public
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
tCompleteMonitor
){
return
baseMapper
.
getTCompleteMonitorPage
(
page
,
tCompleteMonitor
);
}
/**
* 档案完整度监控批量导出
* @param searchVo 档案完整度监控
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TCompleteMonitorSearchVo
searchVo
){
String
fileName
=
"档案完整度监控批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TCompleteMonitorVo
>
list
=
new
ArrayList
<>();
long
count
=
baseMapper
.
getExportCount
(
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
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TCompleteMonitorVo
.
class
).
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
=
baseMapper
.
getTCompleteMonitorExportList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TCompleteMonitorVo
>
util
=
new
ExcelUtil
<>(
TCompleteMonitorVo
.
class
);
for
(
TCompleteMonitorVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"档案完整度监控"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"档案完整度监控"
+
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
);
}
}
}
@Override
public
void
createComlpeteMonitor
()
throws
IllegalAccessException
{
//先删除所有的档案监控数据
baseMapper
.
deleteAllMonitorInfo
();
//批量查询项目档案的是否完整状态
List
<
TCompleteMonitorFlagVo
>
flagList
=
baseMapper
.
checkEmpProjectCompleteFlag
(
null
);
if
(!
flagList
.
isEmpty
())
{
List
<
String
>
projectIdList
=
new
ArrayList
<>();
String
projectId
;
for
(
TCompleteMonitorFlagVo
flagVo
:
flagList
)
{
boolean
flag
=
checkObjFieldIsNull
(
flagVo
);
if
(!
flag
){
projectId
=
flagVo
.
getEmpProjectId
();
projectIdList
.
add
(
projectId
);
}
}
//批量更新
if
(!
projectIdList
.
isEmpty
())
projectMapper
.
batchUpdateEmpProjectCompleteStatus
(
projectIdList
);
}
//查询项目维度的信息
List
<
TCompleteMonitor
>
list
=
baseMapper
.
getAllMonitorEmpList
(
null
);
//查询当天新增的项目档案数据来筛选需要刷新的数据
this
.
saveBatch
(
list
);
}
/**
* 档案完整度监控简单分页查询
* @param deptNo 项目编码
* @return
*/
@Override
public
IPage
<
TCompleteMonitorInfoVo
>
getMonitorEmpInfoListPage
(
Page
<
TCompleteMonitorInfoVo
>
page
,
String
deptNo
){
return
baseMapper
.
getMonitorEmpInfoList
(
page
,
deptNo
);
}
@Override
public
void
updateProjectStatusByDeptNo
(
String
deptNo
)
throws
IllegalAccessException
{
//批量查询项目档案的是否完整状态
List
<
TCompleteMonitorFlagVo
>
flagList
=
baseMapper
.
checkEmpProjectCompleteFlag
(
deptNo
);
if
(!
flagList
.
isEmpty
())
{
List
<
String
>
projectIdList
=
new
ArrayList
<>();
String
projectId
;
for
(
TCompleteMonitorFlagVo
flagVo
:
flagList
)
{
boolean
flag
=
checkObjFieldIsNull
(
flagVo
);
if
(!
flag
){
projectId
=
flagVo
.
getEmpProjectId
();
projectIdList
.
add
(
projectId
);
}
}
//批量更新
if
(!
projectIdList
.
isEmpty
())
projectMapper
.
batchUpdateEmpProjectCompleteStatus
(
projectIdList
);
}
//删除项目监控表数据
baseMapper
.
deleteMonitorInfoByDeptNo
(
deptNo
);
//查询项目维度的信息
List
<
TCompleteMonitor
>
list
=
baseMapper
.
getAllMonitorEmpList
(
deptNo
);
//查询当天新增的项目档案数据来筛选需要刷新的数据
this
.
saveBatch
(
list
);
}
/**
*
* @param obj 对象
// * @param checkField 要检查的属性集合
* @return true 指定属性有为空的 false 所有属性值都不为空
* @throws IllegalAccessException
*/
public
boolean
checkObjFieldIsNull
(
Object
obj
)
throws
IllegalAccessException
{
//获取对象的类
Class
<?>
aClass
=
obj
.
getClass
();
Field
[]
declaredFields
=
aClass
.
getDeclaredFields
();
//筛选出包含在要检查的list 并且 属性为null的字段
for
(
Field
field
:
declaredFields
){
if
(
null
==
field
.
get
(
obj
))
{
return
true
;
}
}
return
false
;
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml
0 → 100644
View file @
eb6c0e2d
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
eb6c0e2d
...
...
@@ -1086,4 +1086,12 @@
set a.POST = #{post}
WHERE a.DEPT_NO=#{deptNo} and a.EMP_IDCARD=#{empIdcard} and a.DELETE_FLAG ='0'
</update>
<!-- 批量刷新项目档案的是否完整状态 -->
<update
id=
"batchUpdateEmpProjectCompleteStatus"
>
update t_employee_project a set a.IS_COMPLETE = '0' where a.id in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/ArchiveTask.java
View file @
eb6c0e2d
...
...
@@ -68,4 +68,12 @@ public class ArchiveTask {
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每月26号更新人员花名册-定时任务开始------------"
);
}
public
void
everyDayCreateComlpeteMonitor
()
{
log
.
info
(
"-------------每月刷新档案完整监控数据------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tcompletemonitor/inner/createComlpeteMonitor"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每月刷新档案完整监控数据-定时任务开始------------"
);
}
}
\ No newline at end of file
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