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
83c378ff
Commit
83c378ff
authored
Mar 13, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.8' into MVP1.7.8
parents
97c644f0
074a3bf5
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1276 additions
and
9 deletions
+1276
-9
UpmsDaprUtils.java
...fu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
+12
-1
EmployeeRegistration.java
...m/yifu/cloud/plus/v1/csp/entity/EmployeeRegistration.java
+3
-0
EmployeeRegistrationPre.java
...ifu/cloud/plus/v1/csp/entity/EmployeeRegistrationPre.java
+96
-0
EmployeeRegistrationPreSearchVo.java
...cloud/plus/v1/csp/vo/EmployeeRegistrationPreSearchVo.java
+42
-0
EmployeeRegistrationPreVo.java
.../yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationPreVo.java
+222
-0
EmployeeRegistrationSearchVo.java
...fu/cloud/plus/v1/csp/vo/EmployeeRegistrationSearchVo.java
+4
-0
EmployeeRegistrationController.java
...lus/v1/csp/controller/EmployeeRegistrationController.java
+12
-0
EmployeeRegistrationPreController.java
.../v1/csp/controller/EmployeeRegistrationPreController.java
+99
-0
EmployeeRegistrationPreMapper.java
...oud/plus/v1/csp/mapper/EmployeeRegistrationPreMapper.java
+24
-0
EmployeeRegistrationPreService.java
...d/plus/v1/csp/service/EmployeeRegistrationPreService.java
+46
-0
EmployeeRegistrationService.java
...loud/plus/v1/csp/service/EmployeeRegistrationService.java
+7
-0
EmployeeRegistrationPreServiceImpl.java
.../csp/service/impl/EmployeeRegistrationPreServiceImpl.java
+150
-0
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+17
-0
EmployeeRegistrationMapper.xml
.../src/main/resources/mapper/EmployeeRegistrationMapper.xml
+6
-1
EmployeeRegistrationPreMapper.xml
...c/main/resources/mapper/EmployeeRegistrationPreMapper.xml
+160
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+5
-0
SysConfig.java
.../yifu/cloud/plus/v1/yifu/insurances/entity/SysConfig.java
+90
-0
SysConfigMapper.java
...v1/yifu/insurances/mapper/insurances/SysConfigMapper.java
+41
-0
TInsuranceWarnServiceImpl.java
...ces/service/insurance/impl/TInsuranceWarnServiceImpl.java
+152
-2
SysConfigMapper.xml
.../src/main/resources/mapper/insurances/SysConfigMapper.xml
+40
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+1
-1
SysUsersVo.java
.../com/yifu.cloud.plus.v1/yifu/admin/api/vo/SysUsersVo.java
+17
-0
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+30
-4
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
View file @
83c378ff
...
...
@@ -95,7 +95,18 @@ public class UpmsDaprUtils {
}
return
allUserVoR
;
}
/**
* @Author fxj
* @Description 通过用户ID 获取 在用的MVP系统的用户
* @Date 17:24 2025/3/12
**/
public
R
<
SysUsersVo
>
getUserVoByUserIds
(
String
userIds
)
{
R
<
SysUsersVo
>
allUserVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
(),
"/user/inner/getUserVoByUserIds"
,
userIds
,
SysUsersVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
allUserVoR
)){
return
R
.
failed
(
"获取指定用户IDS对应用户信息失败!"
);
}
return
allUserVoR
;
}
public
R
<
SysUser
>
getSimpleUser
(
String
userId
)
{
R
<
SysUser
>
userR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
(),
"/user/inner/getSimpleUser"
,
userId
,
SysUser
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
userR
)){
...
...
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/entity/EmployeeRegistration.java
View file @
83c378ff
...
...
@@ -90,6 +90,9 @@ public class EmployeeRegistration extends BaseEntity {
@TableField
(
exist
=
false
)
private
LocalDateTime
projectCreateTime
;
@Schema
(
description
=
"数据来源"
)
private
String
dataSource
;
@Schema
(
description
=
"入职登记人数"
)
@TableField
(
exist
=
false
)
private
int
inNum
;
...
...
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/entity/EmployeeRegistrationPre.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
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
;
import
java.util.Date
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Data
@TableName
(
"employee_registration_pre"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"入职待建档表"
)
public
class
EmployeeRegistrationPre
extends
BaseEntity
{
/**
* 主键ID
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键ID"
)
private
String
id
;
@Schema
(
description
=
"员工姓名"
)
private
String
employeeName
;
@Schema
(
description
=
"身份证号"
)
private
String
empIdcard
;
@Schema
(
description
=
"手机号码"
)
private
String
empPhone
;
@Schema
(
description
=
"就职岗位"
)
private
String
position
;
@Schema
(
description
=
"入职日期"
)
private
Date
joinLeaveDate
;
@Schema
(
description
=
"状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职"
)
private
String
processStatus
;
@Schema
(
description
=
"前端客服"
)
private
String
customerUsername
;
@Schema
(
description
=
"前端客服登录名"
)
private
String
customerUserLoginname
;
@Schema
(
description
=
"项目名称"
)
private
String
deptName
;
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
@Schema
(
description
=
"员工类型(字典值,0外包1派遣2代理)"
)
private
String
empNature
;
@Schema
(
description
=
"合同类型(字典值)"
)
private
String
contractType
;
@Schema
(
description
=
"数据来源"
)
private
String
dataSource
;
@Schema
(
description
=
"预计收集时间"
)
private
Date
expectedCollectionTime
;
@Schema
(
description
=
"服务事项"
)
private
String
serverItem
;
@Schema
(
description
=
"档案所在地-省"
)
private
String
fileProvince
;
@Schema
(
description
=
"档案所在地-市"
)
private
String
fileCity
;
@Schema
(
description
=
"档案所在地-县"
)
private
String
fileTown
;
@Schema
(
description
=
"确认人"
)
private
String
confirmUser
;
@Schema
(
description
=
"确认时间"
)
private
Date
confirmTime
;
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationPreSearchVo.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
vo
;
import
com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationPre
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Data
public
class
EmployeeRegistrationPreSearchVo
extends
EmployeeRegistrationPre
{
/**
* 多选导出或删除等操作
*/
@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-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationPreVo.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
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
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Data
public
class
EmployeeRegistrationPreVo
extends
RowIndex
implements
Serializable
{
/**
* 员工姓名
*/
@Length
(
max
=
30
,
message
=
"员工姓名 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
30
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
employeeName
;
/**
* 身份证号
*/
@NotBlank
(
message
=
"身份证号 不能为空"
)
@Length
(
max
=
18
,
message
=
"身份证号 不能超过18 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号 不能为空"
,
maxLength
=
18
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 手机号码
*/
@Length
(
max
=
11
,
message
=
"手机号码 不能超过11 个字符"
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
11
)
@Schema
(
description
=
"手机号码"
)
@ExcelProperty
(
"手机号码"
)
private
String
empPhone
;
/**
* 就职岗位
*/
@Length
(
max
=
50
,
message
=
"就职岗位 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"就职岗位"
,
maxLength
=
50
)
@Schema
(
description
=
"就职岗位"
)
@ExcelProperty
(
"就职岗位"
)
private
String
position
;
/**
* 入职日期
*/
@ExcelAttribute
(
name
=
"入职日期"
,
isDate
=
true
)
@Schema
(
description
=
"入职日期"
)
@ExcelProperty
(
"入职日期"
)
private
Date
joinLeaveDate
;
/**
* 状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职
*/
@Length
(
max
=
1
,
message
=
"状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职"
,
maxLength
=
1
)
@Schema
(
description
=
"状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职"
)
@ExcelProperty
(
"状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职"
)
private
String
processStatus
;
/**
* 前端客服
*/
@Length
(
max
=
30
,
message
=
"前端客服 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"前端客服"
,
maxLength
=
30
)
@Schema
(
description
=
"前端客服"
)
@ExcelProperty
(
"前端客服"
)
private
String
customerUsername
;
/**
* 前端客服登录名
*/
@Length
(
max
=
30
,
message
=
"前端客服登录名 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"前端客服登录名"
,
maxLength
=
30
)
@Schema
(
description
=
"前端客服登录名"
)
@ExcelProperty
(
"前端客服登录名"
)
private
String
customerUserLoginname
;
/**
* 项目名称
*/
@Length
(
max
=
50
,
message
=
"项目名称 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Schema
(
description
=
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
/**
* 项目编码
*/
@Length
(
max
=
30
,
message
=
"项目编码 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
30
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
/**
* 项目id
*/
@Length
(
max
=
36
,
message
=
"项目id 不能超过36 个字符"
)
@ExcelAttribute
(
name
=
"项目id"
,
maxLength
=
36
)
@Schema
(
description
=
"项目id"
)
@ExcelProperty
(
"项目id"
)
private
String
deptId
;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@Length
(
max
=
2
,
message
=
"员工类型(字典值,0外包1派遣2代理) 不能超过2 个字符"
)
@ExcelAttribute
(
name
=
"员工类型(字典值,0外包1派遣2代理)"
,
maxLength
=
2
)
@Schema
(
description
=
"员工类型(字典值,0外包1派遣2代理)"
)
@ExcelProperty
(
"员工类型(字典值,0外包1派遣2代理)"
)
private
String
empNature
;
/**
* 合同类型(字典值)
*/
@Length
(
max
=
2
,
message
=
"合同类型(字典值) 不能超过2 个字符"
)
@ExcelAttribute
(
name
=
"合同类型(字典值)"
,
maxLength
=
2
)
@Schema
(
description
=
"合同类型(字典值)"
)
@ExcelProperty
(
"合同类型(字典值)"
)
private
String
contractType
;
/**
* 数据来源
*/
@Length
(
max
=
5
,
message
=
"数据来源 不能超过5 个字符"
)
@ExcelAttribute
(
name
=
"数据来源"
,
maxLength
=
5
)
@Schema
(
description
=
"数据来源"
)
@ExcelProperty
(
"数据来源"
)
private
String
dataSource
;
/**
* 预计收集时间
*/
@ExcelAttribute
(
name
=
"预计收集时间"
,
isDate
=
true
)
@Schema
(
description
=
"预计收集时间"
)
@ExcelProperty
(
"预计收集时间"
)
private
Date
expectedCollectionTime
;
/**
* 服务事项
*/
@Length
(
max
=
50
,
message
=
"服务事项 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"服务事项"
,
maxLength
=
50
)
@Schema
(
description
=
"服务事项"
)
@ExcelProperty
(
"服务事项"
)
private
String
serverItem
;
/**
* 档案所在地-省
*/
@ExcelAttribute
(
name
=
"档案所在地-省"
)
@Schema
(
description
=
"档案所在地-省"
)
@ExcelProperty
(
"档案所在地-省"
)
private
String
fileProvince
;
/**
* 档案所在地-市
*/
@ExcelAttribute
(
name
=
"档案所在地-市"
)
@Schema
(
description
=
"档案所在地-市"
)
@ExcelProperty
(
"档案所在地-市"
)
private
String
fileCity
;
/**
* 档案所在地-县
*/
@ExcelAttribute
(
name
=
"档案所在地-县"
)
@Schema
(
description
=
"档案所在地-县"
)
@ExcelProperty
(
"档案所在地-县"
)
private
String
fileTown
;
/**
* 确认人
*/
@Length
(
max
=
30
,
message
=
"确认人 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"确认人"
,
maxLength
=
30
)
@Schema
(
description
=
"确认人"
)
@ExcelProperty
(
"确认人"
)
private
String
confirmUser
;
/**
* 确认时间
*/
@ExcelAttribute
(
name
=
"确认时间"
,
isDate
=
true
)
@Schema
(
description
=
"确认时间"
)
@ExcelProperty
(
"确认时间"
)
private
Date
confirmTime
;
/**
* 创建人姓名
*/
@Length
(
max
=
36
,
message
=
"创建人姓名 不能超过36 个字符"
)
@ExcelAttribute
(
name
=
"创建人姓名"
,
maxLength
=
36
)
@Schema
(
description
=
"创建人姓名"
)
@ExcelProperty
(
"创建人姓名"
)
private
String
createName
;
@ExcelAttribute
(
name
=
"创建时间"
,
isDate
=
true
)
@Schema
(
description
=
"创建时间"
)
@ExcelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationSearchVo.java
View file @
83c378ff
...
...
@@ -79,4 +79,8 @@ public class EmployeeRegistrationSearchVo extends EmployeeRegistration {
@TableField
(
exist
=
false
)
private
Set
<
String
>
departIdSet
;
@Schema
(
description
=
"项目权限数组"
)
@TableField
(
exist
=
false
)
private
Set
<
String
>
deptIdSet
;
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
View file @
83c378ff
...
...
@@ -192,4 +192,16 @@ public class EmployeeRegistrationController {
return
null
;
}
/**
* 入职待确认列表简单分页查询
*
* @param page 分页对象
* @param employeeRegistration 入离职登记表
* @return
*/
@Operation
(
description
=
"入职待确认列表简单分页查询"
)
@GetMapping
(
"/hrConfirmPage"
)
public
R
<
IPage
<
EmployeeRegistration
>>
getHrConfirmEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
)
{
return
new
R
<>(
employeeRegistrationService
.
getHrConfirmEmployeeRegistrationPage
(
page
,
employeeRegistration
));
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationPreController.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationPreService
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationPreSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/employeeregistrationpre"
)
@Tag
(
name
=
"入职待建档表管理"
)
public
class
EmployeeRegistrationPreController
{
private
final
EmployeeRegistrationPreService
employeeRegistrationPreService
;
/**
* 简单分页查询
* @param page 分页对象
* @param employeeRegistrationPre 入职待建档表
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
EmployeeRegistrationPre
>>
getEmployeeRegistrationPrePage
(
Page
<
EmployeeRegistrationPre
>
page
,
EmployeeRegistrationPreSearchVo
employeeRegistrationPre
)
{
return
new
R
<>(
employeeRegistrationPreService
.
getEmployeeRegistrationPrePage
(
page
,
employeeRegistrationPre
));
}
/**
* 不分页查询
* @param employeeRegistrationPre 入职待建档表
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
public
R
<
List
<
EmployeeRegistrationPre
>>
getEmployeeRegistrationPreNoPage
(
@RequestBody
EmployeeRegistrationPreSearchVo
employeeRegistrationPre
)
{
return
R
.
ok
(
employeeRegistrationPreService
.
noPageDiy
(
employeeRegistrationPre
));
}
/**
* 通过id查询入职待建档表
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
public
R
<
EmployeeRegistrationPre
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
employeeRegistrationPreService
.
getById
(
id
));
}
/**
* 新增入职待建档表
* @param employeeRegistrationPre 入职待建档表
* @return R
*/
@Operation
(
summary
=
"新增入职待建档表"
,
description
=
"新增入职待建档表"
)
@SysLog
(
"新增入职待建档表"
)
@PostMapping
public
R
<
Boolean
>
save
(
@RequestBody
EmployeeRegistrationPre
employeeRegistrationPre
)
{
return
R
.
ok
(
employeeRegistrationPreService
.
save
(
employeeRegistrationPre
));
}
/**
* 修改入职待建档表
* @param employeeRegistrationPre 入职待建档表
* @return R
*/
@Operation
(
summary
=
"修改入职待建档表"
,
description
=
"修改入职待建档表"
)
@SysLog
(
"修改入职待建档表"
)
@PostMapping
(
"/updateById"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
EmployeeRegistrationPre
employeeRegistrationPre
)
{
return
R
.
ok
(
employeeRegistrationPreService
.
updateById
(
employeeRegistrationPre
));
}
/**
* 入职待建档表 批量导出
* @author huych
* @date 2025-03-12 17:14:19
**/
@Operation
(
description
=
"导出入职待建档表"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
EmployeeRegistrationPreSearchVo
searchVo
)
{
employeeRegistrationPreService
.
listExport
(
response
,
searchVo
);
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/mapper/EmployeeRegistrationPreMapper.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
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.csp.entity.EmployeeRegistrationPre
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Mapper
public
interface
EmployeeRegistrationPreMapper
extends
BaseMapper
<
EmployeeRegistrationPre
>
{
/**
* 入职待建档表简单分页查询
* @param employeeRegistrationPre 入职待建档表
* @return
*/
IPage
<
EmployeeRegistrationPre
>
getEmployeeRegistrationPrePage
(
Page
<
EmployeeRegistrationPre
>
page
,
@Param
(
"employeeRegistrationPre"
)
EmployeeRegistrationPre
employeeRegistrationPre
);
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationPreService.java
0 → 100644
View file @
83c378ff
/*
* 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
.
csp
.
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.csp.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationPreSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
public
interface
EmployeeRegistrationPreService
extends
IService
<
EmployeeRegistrationPre
>
{
/**
* 入职待建档表简单分页查询
* @param employeeRegistrationPre 入职待建档表
* @return
*/
IPage
<
EmployeeRegistrationPre
>
getEmployeeRegistrationPrePage
(
Page
<
EmployeeRegistrationPre
>
page
,
EmployeeRegistrationPreSearchVo
employeeRegistrationPre
);
void
listExport
(
HttpServletResponse
response
,
EmployeeRegistrationPreSearchVo
searchVo
);
List
<
EmployeeRegistrationPre
>
noPageDiy
(
EmployeeRegistrationPreSearchVo
searchVo
);
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
View file @
83c378ff
...
...
@@ -35,6 +35,13 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
*/
IPage
<
EmployeeRegistration
>
getHrEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
);
/**
* 入职待确认简单分页查询
* @param employeeRegistration 入离职登记表
* @return
*/
IPage
<
EmployeeRegistration
>
getHrConfirmEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
);
/**
* 入离职登记表导入
* @param inputStream 文件流
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationPreServiceImpl.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationPreMapper
;
import
com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationPreService
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationPreSearchVo
;
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
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
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.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Log4j2
@Service
public
class
EmployeeRegistrationPreServiceImpl
extends
ServiceImpl
<
EmployeeRegistrationPreMapper
,
EmployeeRegistrationPre
>
implements
EmployeeRegistrationPreService
{
/**
* 入职待建档表简单分页查询
* @param employeeRegistrationPre 入职待建档表
* @return
*/
@Override
public
IPage
<
EmployeeRegistrationPre
>
getEmployeeRegistrationPrePage
(
Page
<
EmployeeRegistrationPre
>
page
,
EmployeeRegistrationPreSearchVo
employeeRegistrationPre
){
return
baseMapper
.
getEmployeeRegistrationPrePage
(
page
,
employeeRegistrationPre
);
}
/**
* 入职待建档表批量导出
* @param searchVo 入职待建档表
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
EmployeeRegistrationPreSearchVo
searchVo
){
String
fileName
=
"入职待建档表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
EmployeeRegistrationPre
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
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
,
EmployeeRegistrationPre
.
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
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
EmployeeRegistrationPre
>
util
=
new
ExcelUtil
<>(
EmployeeRegistrationPre
.
class
);
for
(
EmployeeRegistrationPre
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
List
<
EmployeeRegistrationPre
>
noPageDiy
(
EmployeeRegistrationPreSearchVo
searchVo
)
{
LambdaQueryWrapper
<
EmployeeRegistrationPre
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
EmployeeRegistrationPre:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
){
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
Long
noPageCountDiy
(
EmployeeRegistrationPreSearchVo
searchVo
)
{
LambdaQueryWrapper
<
EmployeeRegistrationPre
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
EmployeeRegistrationPre:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
EmployeeRegistrationPreSearchVo
entity
){
LambdaQueryWrapper
<
EmployeeRegistrationPre
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
EmployeeRegistrationPre:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
EmployeeRegistrationPre:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
())){
wrapper
.
eq
(
EmployeeRegistrationPre:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
83c378ff
...
...
@@ -113,6 +113,23 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return
baseMapper
.
getEmployeeRegistrationPage
(
page
,
employeeRegistration
);
}
/**
* 入职待确认简单分页查询表简单分页查询
*
* @param employeeRegistration 入离职登记表
* @return
*/
@Override
public
IPage
<
EmployeeRegistration
>
getHrConfirmEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
long
roleId
=
1839501715787390978L
;
boolean
isSsc
=
this
.
haveRole
(
user
,
roleId
);
if
(
isSsc
)
{
employeeRegistration
.
setCustomerUserLoginname
(
null
);
}
return
baseMapper
.
getEmployeeRegistrationPage
(
page
,
employeeRegistration
);
}
/**
* 入离职登记表批量导出
*
...
...
yifu-csp/yifu-csp-biz/src/main/resources/mapper/EmployeeRegistrationMapper.xml
View file @
83c378ff
...
...
@@ -30,6 +30,7 @@
<result
property=
"customerPhone"
column=
"customer_phone"
/>
<result
property=
"customerUsername"
column=
"customer_username"
/>
<result
property=
"customerUserLoginname"
column=
"customer_user_loginname"
/>
<result
property=
"dataSource"
column=
"data_source"
/>
</resultMap>
<resultMap
id=
"employeeRegistrationExportMap"
type=
"com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationExportVo"
>
...
...
@@ -84,7 +85,8 @@
a.dept_no,
a.customer_username,
a.customer_phone,
a.customer_user_loginname
a.customer_user_loginname,
a.data_source
</sql>
<sql
id=
"employeeRegistration_where"
>
<if
test=
"employeeRegistration != null"
>
...
...
@@ -163,6 +165,9 @@
<if
test=
"employeeRegistration.deptNo != null and employeeRegistration.deptNo.trim() != ''"
>
AND a.dept_no = #{employeeRegistration.deptNo}
</if>
<if
test=
"employeeRegistration.dataSource != null and employeeRegistration.dataSource.trim() != ''"
>
AND a.data_source = #{employeeRegistration.dataSource}
</if>
<if
test=
"employeeRegistration.departIdSet != null and employeeRegistration.departIdSet.size > 0"
>
AND a.emp_deptid in
<foreach
item=
"idStr"
index=
"index"
collection=
"employeeRegistration.departIdSet"
open=
"("
separator=
","
...
...
yifu-csp/yifu-csp-biz/src/main/resources/mapper/EmployeeRegistrationPreMapper.xml
0 → 100644
View file @
83c378ff
<?xml version="1.0" encoding="UTF-8"?>
<!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.csp.mapper.EmployeeRegistrationPreMapper"
>
<resultMap
id=
"employeeRegistrationPreMap"
type=
"com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationPre"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"employeeName"
column=
"employee_name"
/>
<result
property=
"empIdcard"
column=
"emp_idcard"
/>
<result
property=
"empPhone"
column=
"emp_phone"
/>
<result
property=
"position"
column=
"position"
/>
<result
property=
"joinLeaveDate"
column=
"join_leave_date"
/>
<result
property=
"processStatus"
column=
"process_status"
/>
<result
property=
"customerUsername"
column=
"customer_username"
/>
<result
property=
"customerUserLoginname"
column=
"customer_user_loginname"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"deptNo"
column=
"dept_no"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"empNature"
column=
"emp_nature"
/>
<result
property=
"contractType"
column=
"contract_type"
/>
<result
property=
"dataSource"
column=
"data_source"
/>
<result
property=
"expectedCollectionTime"
column=
"expected_collection_time"
/>
<result
property=
"serverItem"
column=
"server_item"
/>
<result
property=
"fileProvince"
column=
"file_province"
/>
<result
property=
"fileCity"
column=
"file_city"
/>
<result
property=
"fileTown"
column=
"file_town"
/>
<result
property=
"confirmUser"
column=
"confirm_user"
/>
<result
property=
"confirmTime"
column=
"confirm_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createName"
column=
"create_name"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
a.join_leave_date,
a.process_status,
a.customer_username,
a.customer_user_loginname,
a.dept_name,
a.dept_no,
a.dept_id,
a.emp_nature,
a.contract_type,
a.data_source,
a.expected_collection_time,
a.server_item,
a.file_province,
a.file_city,
a.file_town,
a.confirm_user,
a.confirm_time,
a.create_by,
a.create_name,
a.create_time,
a.update_by,
a.update_time
</sql>
<sql
id=
"employeeRegistrationPre_where"
>
<if
test=
"employeeRegistrationPre != null"
>
<if
test=
"employeeRegistrationPre.id != null and employeeRegistrationPre.id.trim() != ''"
>
AND a.id = #{employeeRegistrationPre.id}
</if>
<if
test=
"employeeRegistrationPre.employeeName != null and employeeRegistrationPre.employeeName.trim() != ''"
>
AND a.employee_name = #{employeeRegistrationPre.employeeName}
</if>
<if
test=
"employeeRegistrationPre.empIdcard != null and employeeRegistrationPre.empIdcard.trim() != ''"
>
AND a.emp_idcard = #{employeeRegistrationPre.empIdcard}
</if>
<if
test=
"employeeRegistrationPre.empPhone != null and employeeRegistrationPre.empPhone.trim() != ''"
>
AND a.emp_phone = #{employeeRegistrationPre.empPhone}
</if>
<if
test=
"employeeRegistrationPre.position != null and employeeRegistrationPre.position.trim() != ''"
>
AND a.position = #{employeeRegistrationPre.position}
</if>
<if
test=
"employeeRegistrationPre.joinLeaveDate != null"
>
AND a.join_leave_date = #{employeeRegistrationPre.joinLeaveDate}
</if>
<if
test=
"employeeRegistrationPre.processStatus != null and employeeRegistrationPre.processStatus.trim() != ''"
>
AND a.process_status = #{employeeRegistrationPre.processStatus}
</if>
<if
test=
"employeeRegistrationPre.customerUsername != null and employeeRegistrationPre.customerUsername.trim() != ''"
>
AND a.customer_username = #{employeeRegistrationPre.customerUsername}
</if>
<if
test=
"employeeRegistrationPre.customerUserLoginname != null and employeeRegistrationPre.customerUserLoginname.trim() != ''"
>
AND a.customer_user_loginname = #{employeeRegistrationPre.customerUserLoginname}
</if>
<if
test=
"employeeRegistrationPre.deptName != null and employeeRegistrationPre.deptName.trim() != ''"
>
AND a.dept_name = #{employeeRegistrationPre.deptName}
</if>
<if
test=
"employeeRegistrationPre.deptNo != null and employeeRegistrationPre.deptNo.trim() != ''"
>
AND a.dept_no = #{employeeRegistrationPre.deptNo}
</if>
<if
test=
"employeeRegistrationPre.deptId != null and employeeRegistrationPre.deptId.trim() != ''"
>
AND a.dept_id = #{employeeRegistrationPre.deptId}
</if>
<if
test=
"employeeRegistrationPre.empNature != null and employeeRegistrationPre.empNature.trim() != ''"
>
AND a.emp_nature = #{employeeRegistrationPre.empNature}
</if>
<if
test=
"employeeRegistrationPre.contractType != null and employeeRegistrationPre.contractType.trim() != ''"
>
AND a.contract_type = #{employeeRegistrationPre.contractType}
</if>
<if
test=
"employeeRegistrationPre.dataSource != null and employeeRegistrationPre.dataSource.trim() != ''"
>
AND a.data_source = #{employeeRegistrationPre.dataSource}
</if>
<if
test=
"employeeRegistrationPre.expectedCollectionTime != null"
>
AND a.expected_collection_time = #{employeeRegistrationPre.expectedCollectionTime}
</if>
<if
test=
"employeeRegistrationPre.serverItem != null and employeeRegistrationPre.serverItem.trim() != ''"
>
AND a.server_item = #{employeeRegistrationPre.serverItem}
</if>
<if
test=
"employeeRegistrationPre.fileProvince != null"
>
AND a.file_province = #{employeeRegistrationPre.fileProvince}
</if>
<if
test=
"employeeRegistrationPre.fileCity != null"
>
AND a.file_city = #{employeeRegistrationPre.fileCity}
</if>
<if
test=
"employeeRegistrationPre.fileTown != null"
>
AND a.file_town = #{employeeRegistrationPre.fileTown}
</if>
<if
test=
"employeeRegistrationPre.confirmUser != null and employeeRegistrationPre.confirmUser.trim() != ''"
>
AND a.confirm_user = #{employeeRegistrationPre.confirmUser}
</if>
<if
test=
"employeeRegistrationPre.confirmTime != null"
>
AND a.confirm_time = #{employeeRegistrationPre.confirmTime}
</if>
<if
test=
"employeeRegistrationPre.createBy != null and employeeRegistrationPre.createBy.trim() != ''"
>
AND a.create_by = #{employeeRegistrationPre.createBy}
</if>
<if
test=
"employeeRegistrationPre.createName != null and employeeRegistrationPre.createName.trim() != ''"
>
AND a.create_name = #{employeeRegistrationPre.createName}
</if>
<if
test=
"employeeRegistrationPre.createTime != null"
>
AND a.create_time = #{employeeRegistrationPre.createTime}
</if>
<if
test=
"employeeRegistrationPre.updateBy != null and employeeRegistrationPre.updateBy.trim() != ''"
>
AND a.update_by = #{employeeRegistrationPre.updateBy}
</if>
<if
test=
"employeeRegistrationPre.updateTime != null"
>
AND a.update_time = #{employeeRegistrationPre.updateTime}
</if>
</if>
</sql>
<!--employeeRegistrationPre简单分页查询-->
<select
id=
"getEmployeeRegistrationPrePage"
resultMap=
"employeeRegistrationPreMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM employee_registration_pre a
<where>
1=1
<include
refid=
"employeeRegistrationPre_where"
/>
</where>
</select>
</mapper>
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
83c378ff
...
...
@@ -1319,4 +1319,9 @@ public class InsurancesConstants {
* 商险到期提醒批量导出
*/
public
static
final
String
INSURANCE_ALERT_EXPORT
=
"商险到期提醒批量导出"
;
/**
* 商险到期提醒默认提醒人配置KEY
*/
public
static
final
String
INSURANCE_ALERT_DEFAULT_PERSON
=
"INSURANCE_ALERT_DEFAULT_PERSON"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/SysConfig.java
0 → 100644
View file @
83c378ff
/*
* 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
.
insurances
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
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.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author fxj
* @Description 系统配置表
* @Date 9:38 2025/3/13
* @Param
* @return
**/
@Data
@TableName
(
"sys_config"
)
@Schema
(
description
=
"系统配置表"
)
public
class
SysConfig
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 配置键
*/
@ExcelAttribute
(
name
=
"配置键"
,
isNotEmpty
=
true
,
errorInfo
=
"配置键不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"配置键不能为空"
)
@Length
(
max
=
32
,
message
=
"配置键不能超过32个字符"
)
@ExcelProperty
(
"配置键"
)
@Schema
(
description
=
"配置键"
)
private
String
configKey
;
/**
* 配置值
*/
@ExcelAttribute
(
name
=
"配置值"
,
isNotEmpty
=
true
,
errorInfo
=
"配置值不能为空"
)
@NotBlank
(
message
=
"配置值不能为空"
)
@ExcelProperty
(
"配置值"
)
@Schema
(
description
=
"配置值"
)
private
String
configValue
;
/**
* 配置值1
*/
@ExcelAttribute
(
name
=
"配置值1"
)
@ExcelProperty
(
"配置值1"
)
@Schema
(
description
=
"配置值1"
)
private
String
configValue1
;
/**
* 配置值2
*/
@ExcelAttribute
(
name
=
"配置值2"
)
@ExcelProperty
(
"配置值2"
)
@Schema
(
description
=
"配置值2"
)
private
String
configValue2
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
255
)
@Length
(
max
=
255
,
message
=
"备注不能超过255个字符"
)
@ExcelProperty
(
"备注"
)
@Schema
(
description
=
"备注"
)
private
String
remark
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/SysConfigMapper.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
/*
* 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)
*/
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.SysConfig
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* @Author fxj
* @Description 系统配置表
* @Date 9:40 2025/3/13
* @Param
* @return
**/
@Mapper
public
interface
SysConfigMapper
extends
BaseMapper
<
SysConfig
>
{
/**
* 系统限制配置表简单分页查询
*
* @param configKey 键
* @return
*/
SysConfig
getSysConfigLimitByKey
(
@Param
(
"configKey"
)
String
configKey
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceWarnServiceImpl.java
View file @
83c378ff
...
...
@@ -2,13 +2,30 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUsersVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.SysConfig
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.SysConfigMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -18,6 +35,13 @@ import java.util.List;
*/
@Service
public
class
TInsuranceWarnServiceImpl
extends
ServiceImpl
<
TInsuranceWarnMapper
,
TInsuranceAlert
>
implements
TInsuranceWarnService
{
@Autowired
private
UpmsDaprUtils
upmsDaprUtils
;
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
@Autowired
private
SysConfigMapper
sysConfigMapper
;
@Override
public
void
createInsuranceAlert
()
{
...
...
@@ -26,6 +50,132 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
.
eq
(
TInsuranceAlert:
:
getExpireIgnoreFlag
,
CommonConstants
.
ONE_STRING
));
//批量生成或者更新商险到期提醒数据
List
<
TInsuranceAlert
>
list
=
baseMapper
.
selectInsuranceAlert
();
this
.
saveOrUpdateBatch
(
list
);
//获取所有在用的(未删除未锁定)MVP的用户信息
String
userIds
;
if
(
Common
.
isNotKong
(
list
)){
try
{
SysConfig
sysConfig
=
sysConfigMapper
.
getSysConfigLimitByKey
(
InsurancesConstants
.
INSURANCE_ALERT_DEFAULT_PERSON
);
userIds
=
list
.
stream
().
map
(
BaseEntity:
:
getCreateBy
).
distinct
().
collect
(
Collectors
.
joining
(
","
));
// 获取停用账号信息
Map
<
String
,
SysUser
>
userMap
=
null
;
// 前端客服对应的账号信息
Map
<
String
,
SysUser
>
sysUserMap
=
null
;
//账号停用的提醒对应的项目信息
Map
<
String
,
TSettleDomain
>
domainHashMap
=
new
HashMap
<>();
userMap
=
getStopSysUserMap
(
userIds
,
userMap
);
//获取停用账户对应的项目的前端客服信息
if
(!
Common
.
isEmpty
(
userMap
))
{
Map
<
String
,
SysUser
>
finalUserMap
=
userMap
;
List
<
String
>
codes
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
vo
->
{
if
(
Common
.
isNotNull
(
finalUserMap
.
get
(
vo
.
getCreateBy
())))
{
codes
.
add
(
vo
.
getDeptNo
());
}
});
if
(
Common
.
isNotKong
(
codes
))
{
//获取对应项目信息
R
<
TSettleDomainListVo
>
infoByCodes
=
archivesDaprUtil
.
getSettleInfoByCodes
(
codes
);
if
(
null
!=
infoByCodes
&&
Common
.
isNotNull
(
infoByCodes
.
getData
())
&&
Common
.
isNotNull
(
infoByCodes
.
getData
().
getMapVO
()))
{
domainHashMap
=
infoByCodes
.
getData
().
getMapVO
();
}
// 获取项目对应的前端客服用户信息
sysUserMap
=
getStringSysUserMap
(
sysUserMap
,
domainHashMap
);
}
}
// 停用的账号的提醒信息对应的项目信息不为空 ,遍历更新 前端客服名称及前端客服ID
initStopInfo
(
list
,
userMap
,
sysUserMap
,
domainHashMap
,
sysConfig
);
}
catch
(
Exception
e
){
log
.
error
(
"商险不购买提醒初始化停用客服异常:"
,
e
);
}
this
.
saveOrUpdateBatch
(
list
);
}
}
/**
* @Author fxj
* @Description 获取停用账号信息
* @Date 19:09 2025/3/12
**/
private
Map
<
String
,
SysUser
>
getStopSysUserMap
(
String
userIds
,
Map
<
String
,
SysUser
>
userMap
)
{
if
(
Common
.
isNotKong
(
userIds
)){
R
<
SysUsersVo
>
res
=
upmsDaprUtils
.
getUserVoByUserIds
(
userIds
);
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
())
&&
Common
.
isNotNull
(
res
.
getData
().
getUserList
())){
userMap
=
res
.
getData
().
getUserList
();
}
}
return
userMap
;
}
/**
* @Author fxj
* @Description 更加项目编码CODES 获取项目前端客服用户信息
* @Date 19:07 2025/3/12
**/
private
Map
<
String
,
SysUser
>
getStringSysUserMap
(
Map
<
String
,
SysUser
>
sysUserMap
,
Map
<
String
,
TSettleDomain
>
domainHashMap
)
{
if
(
Common
.
isNotKong
(
domainHashMap
))
{
StringBuilder
userNames
=
new
StringBuilder
();
for
(
TSettleDomain
val
:
domainHashMap
.
values
())
{
if
(
Common
.
isEmpty
(
userNames
.
toString
()))
{
userNames
.
append
(
val
.
getCsLoginName
());
}
else
{
userNames
.
append
(
CommonConstants
.
COMMA_STRING
);
userNames
.
append
(
val
.
getCsLoginName
());
}
}
if
(!
Common
.
isEmpty
(
userNames
.
toString
()))
{
R
<
SysUserListVo
>
res
=
upmsDaprUtils
.
getUserIdsByUserNames
(
userNames
.
toString
());
List
<
SysUser
>
users
=
null
;
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
())
&&
Common
.
isNotNull
(
res
.
getData
().
getUserList
()))
{
users
=
res
.
getData
().
getUserList
();
}
if
(
Common
.
isNotKong
(
users
))
{
sysUserMap
=
users
.
stream
().
collect
(
Collectors
.
toMap
(
k
->
k
.
getUsername
(),
v
->
v
));
}
}
}
return
sysUserMap
;
}
/**
* @Author fxj
* @Description 封装停用账号为项目前端客服账号
* @Date 19:05 2025/3/12
**/
private
void
initStopInfo
(
List
<
TInsuranceAlert
>
list
,
Map
<
String
,
SysUser
>
userMap
,
Map
<
String
,
SysUser
>
sysUserMap
,
Map
<
String
,
TSettleDomain
>
domainHashMap
,
SysConfig
sysConfig
)
{
if
(
Common
.
isNotNull
(
userMap
)
&&
Common
.
isNotKong
(
domainHashMap
)){
TSettleDomain
domain
;
SysUser
user
=
null
;
String
loginName
;
String
nickName
=
null
;
String
userId
=
null
;
for
(
TInsuranceAlert
alert:
list
){
if
(
Common
.
isNotNull
(
userMap
.
get
(
alert
.
getCreateBy
()))){
domain
=
domainHashMap
.
get
(
alert
.
getDeptNo
());
if
(
Common
.
isNotNull
(
domain
)){
loginName
=
domain
.
getCsLoginName
();
if
(
Common
.
isNotNull
(
loginName
)){
user
=
null
==
sysUserMap
?
null
:
sysUserMap
.
get
(
loginName
);
if
(
Common
.
isNotNull
(
user
)
&&
!
CommonConstants
.
NINE_STRING
.
equals
(
user
.
getLockFlag
())){
userId
=
user
.
getUserId
();
nickName
=
user
.
getNickname
();
}
}
}
// 找不到对应前端客服或前端客服停用 发给徐瑞玲
if
(
Common
.
isEmpty
(
userId
)
&&
Common
.
isNotNull
(
sysConfig
)){
userId
=
sysConfig
.
getConfigValue
();
nickName
=
sysConfig
.
getConfigValue1
();
}
if
(
Common
.
isNotNull
(
nickName
)
&&
Common
.
isNotNull
(
userId
)){
alert
.
setCreateBy
(
userId
);
alert
.
setCreateName
(
nickName
);
}
}
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/SysConfigMapper.xml
0 → 100644
View file @
83c378ff
<?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.insurances.mapper.insurances.SysConfigMapper"
>
<resultMap
id=
"sysConfigLimitMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.SysConfig"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"configKey"
column=
"CONFIG_KEY"
/>
<result
property=
"configValue"
column=
"CONFIG_VALUE"
/>
<result
property=
"configValue1"
column=
"CONFIG_VALUE_1"
/>
<result
property=
"configValue2"
column=
"CONFIG_VALUE_2"
/>
<result
property=
"remark"
column=
"REMARK"
/>
</resultMap>
<!-- 根据key获取value -->
<select
id=
"getSysConfigLimitByKey"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.SysConfig"
>
SELECT a.CONFIG_VALUE,CONFIG_VALUE_1,CONFIG_VALUE_2
FROM sys_config a
where a.CONFIG_KEY = #{configKey} limit 1
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
83c378ff
...
...
@@ -452,7 +452,7 @@
and a.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME
like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
and a.INSURANCE_COMPANY_NAME
= #{param.insuranceCompanyName}
</if>
<if
test=
"param.buyType != null"
>
and a.BUY_TYPE = #{param.buyType}
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/SysUsersVo.java
0 → 100644
View file @
83c378ff
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Map
;
/**
* @Author fxj
* @Description 通过用户ID 获取 在用的MVP系统的用户
* @Date 17:26 2025/3/12
**/
@Data
public
class
SysUsersVo
implements
Serializable
{
private
Map
<
String
,
SysUser
>
userList
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
83c378ff
...
...
@@ -50,10 +50,8 @@ import javax.servlet.http.HttpServletRequest;
import
javax.validation.Valid
;
import
java.nio.charset.StandardCharsets
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author lengleng
...
...
@@ -690,4 +688,32 @@ public class UserController {
public
R
<
SysCspDeptVo
>
selectCspDeptByUserDeptId
(
@RequestBody
SysCspDeptVo
vo
)
{
return
R
.
ok
(
userService
.
selectCspDeptByUserDeptId
(
vo
));
}
/**
* @return
* @Author fxj
* @Description 获取所有用户-- 指定用户名
* @Date 18:20 2022/8/16
* @Param
**/
@Inner
@PostMapping
(
value
=
{
"/inner/getUserVoByUserIds"
})
public
SysUsersVo
getUserVoByUserIds
(
@RequestBody
String
userIds
)
{
SysUsersVo
naVo
=
new
SysUsersVo
();
if
(
Common
.
isEmpty
(
userIds
))
{
return
naVo
;
}
//获取锁定或删除账号
List
<
SysUser
>
sysUsers
=
userService
.
list
(
Wrappers
.<
SysUser
>
query
().
lambda
()
.
and
(
obj
->
obj
.
eq
(
SysUser:
:
getLockFlag
,
CommonConstants
.
NINE_STRING
)
.
or
().
eq
(
SysUser:
:
getDelFlag
,
CommonConstants
.
ONE_STRING
)
).
in
(
SysUser:
:
getUserId
,
Common
.
getList
(
userIds
)));
if
(
Common
.
isNotEmpty
(
sysUsers
))
{
Map
<
String
,
SysUser
>
userMap
;
userMap
=
sysUsers
.
stream
().
collect
(
Collectors
.
toMap
(
k
->
k
.
getUserId
(),
v
->
v
));
naVo
.
setUserList
(
userMap
);
}
return
naVo
;
}
}
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