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
039d7365
Commit
039d7365
authored
Jan 06, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
假勤管理修改
parent
776608d9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
822 additions
and
38 deletions
+822
-38
EmployeeBusinessController.java
.../yifu/archives/controller/EmployeeBusinessController.java
+3
-3
TBusinessEmployeeExtendInfoService.java
.../archives/service/TBusinessEmployeeExtendInfoService.java
+2
-2
TBusinessEmployeeExtendInfoServiceImpl.java
.../service/impl/TBusinessEmployeeExtendInfoServiceImpl.java
+28
-26
TVacationMonitorClearLog.java
...v1/business/entity/vacation/TVacationMonitorClearLog.java
+5
-4
TBusDeptController.java
...lus/v1/business/controller/system/TBusDeptController.java
+3
-2
TBusLeaveController.java
.../v1/business/controller/vacation/TBusLeaveController.java
+292
-0
TVacationMonitorClearLogController.java
...ntroller/vacation/TVacationMonitorClearLogController.java
+56
-0
TBusLeaveMapper.java
...oud/plus/v1/business/mapper/vacation/TBusLeaveMapper.java
+30
-0
TVacationMonitorClearLogMapper.java
...iness/mapper/vacation/TVacationMonitorClearLogMapper.java
+21
-0
TBusLeaveService.java
...d/plus/v1/business/service/vacation/TBusLeaveService.java
+37
-0
TVacationMonitorClearLogService.java
...ess/service/vacation/TVacationMonitorClearLogService.java
+36
-0
TBusLeaveServiceImpl.java
.../business/service/vacation/impl/TBusLeaveServiceImpl.java
+39
-0
TVacationMonitorClearLogServiceImpl.java
...ce/vacation/impl/TVacationMonitorClearLogServiceImpl.java
+104
-0
TBusLeaveMapper.xml
...usiness-biz/src/main/resources/mapper/TBusLeaveMapper.xml
+126
-0
TVacationMonitorClearLogMapper.xml
.../main/resources/mapper/TVacationMonitorClearLogMapper.xml
+23
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+17
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/EmployeeBusinessController.java
View file @
039d7365
...
...
@@ -177,7 +177,7 @@ public class EmployeeBusinessController {
*/
@Inner
@PostMapping
(
"/inner/updateEmployeeExtendRedundancy"
)
public
Boolean
updateEmployeeExtendRedundancy
(
@RequestBody
UpdateEmployeeExtendRedundancyDTO
dtoList
)
{
public
Boolean
updateEmployeeExtendRedundancy
(
@RequestBody
List
<
UpdateEmployeeExtendRedundancyDTO
>
dtoList
)
{
return
this
.
businessEmployeeExtendInfoService
.
updateEmployeeExtendRedundancy
(
dtoList
);
}
...
...
@@ -234,8 +234,8 @@ public class EmployeeBusinessController {
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/
@Inner
@
Ge
tMapping
(
"/inner/getInfoByLeaveMap"
)
public
R
<
Map
<
String
,
BusinessEmployeeExtendByLeave
>
>
getInfoByLeaveMap
()
{
@
Pos
tMapping
(
"/inner/getInfoByLeaveMap"
)
public
Map
<
String
,
BusinessEmployeeExtendByLeave
>
getInfoByLeaveMap
()
{
return
this
.
businessEmployeeExtendInfoService
.
getInfoByLeaveMap
();
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TBusinessEmployeeExtendInfoService.java
View file @
039d7365
...
...
@@ -28,7 +28,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @author: wangweiguo
* @date: 2021/8/12
*/
Boolean
updateEmployeeExtendRedundancy
(
UpdateEmployeeExtendRedundancyDTO
dto
);
Boolean
updateEmployeeExtendRedundancy
(
List
<
UpdateEmployeeExtendRedundancyDTO
>
dto
);
/**
* @description: 根据身份证号查询人员拓展表信息
* @param empIdcard 身份证号
...
...
@@ -84,7 +84,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @Date: 2021/8/18 16:45
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/
R
<
Map
<
String
,
BusinessEmployeeExtendByLeave
>
>
getInfoByLeaveMap
();
Map
<
String
,
BusinessEmployeeExtendByLeave
>
getInfoByLeaveMap
();
/**
* b端人员信息编辑拓展信息
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TBusinessEmployeeExtendInfoServiceImpl.java
View file @
039d7365
...
...
@@ -70,38 +70,40 @@ implements TBusinessEmployeeExtendInfoService {
/**
* 更新人员信息冗余字段
* @description: 更新人员信息冗余字段
* @param
v
* @param
dtoList
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.List<ErrorMessage>>
* @author: wangweiguo
* @date: 2021/8/12
*/
@Override
public
Boolean
updateEmployeeExtendRedundancy
(
UpdateEmployeeExtendRedundancyDTO
v
)
{
if
(
Co
mmon
.
isEmpty
(
v
))
{
public
Boolean
updateEmployeeExtendRedundancy
(
List
<
UpdateEmployeeExtendRedundancyDTO
>
dtoList
)
{
if
(
Co
llUtil
.
isEmpty
(
dtoList
))
{
return
false
;
}
// 根据部门id更新冗余的部门信息
if
(
null
!=
v
.
getDepartId
())
{
this
.
lambdaUpdate
()
.
eq
(
TBusinessEmployeeExtendInfo:
:
getDepartId
,
v
.
getDepartId
())
.
set
(
TBusinessEmployeeExtendInfo:
:
getDepartName
,
v
.
getDepartName
())
.
set
(
TBusinessEmployeeExtendInfo:
:
getDepartCode
,
v
.
getTreeLogo
())
.
set
(
TBusinessEmployeeExtendInfo:
:
getDepartId
,
v
.
getDepartIdVal
())
.
update
();
}
else
{
if
(
StringUtils
.
isBlank
(
v
.
getEmpIdcard
()))
{
return
false
;
for
(
UpdateEmployeeExtendRedundancyDTO
v
:
dtoList
)
{
// 根据部门id更新冗余的部门信息
if
(
null
!=
v
.
getDepartId
())
{
this
.
lambdaUpdate
()
.
eq
(
TBusinessEmployeeExtendInfo:
:
getDepartId
,
v
.
getDepartId
())
.
set
(
TBusinessEmployeeExtendInfo:
:
getDepartName
,
v
.
getDepartName
())
.
set
(
TBusinessEmployeeExtendInfo:
:
getDepartCode
,
v
.
getTreeLogo
())
.
set
(
TBusinessEmployeeExtendInfo:
:
getDepartId
,
v
.
getDepartIdVal
())
.
update
();
}
else
{
if
(
StringUtils
.
isBlank
(
v
.
getEmpIdcard
()))
{
continue
;
}
v
.
setEmployeeTags
(
formatLabelId
(
v
.
getEmployeeTags
()));
// 身份证号更新冗余的离职,标签,证件相关信息
this
.
lambdaUpdate
()
.
eq
(
TBusinessEmployeeExtendInfo:
:
getEmpIdcard
,
v
.
getEmpIdcard
())
.
set
(
null
!=
v
.
getEmployeeTags
(),
TBusinessEmployeeExtendInfo:
:
getEmployeeTags
,
v
.
getEmployeeTags
())
.
set
(
null
!=
v
.
getBusinessLeaveReason
(),
TBusinessEmployeeExtendInfo:
:
getBusinessLeaveReason
,
v
.
getBusinessLeaveReason
())
.
set
(
null
!=
v
.
getBusinessWorkingStatus
(),
TBusinessEmployeeExtendInfo:
:
getBusinessWorkingStatus
,
v
.
getBusinessWorkingStatus
())
.
set
(
null
!=
v
.
getDocumentType
(),
TBusinessEmployeeExtendInfo:
:
getDocumentType
,
v
.
getDocumentType
())
.
set
(
null
!=
v
.
getBusinessLeaveDate
(),
TBusinessEmployeeExtendInfo:
:
getBusinessLeaveDate
,
v
.
getBusinessLeaveDate
())
.
update
();
}
v
.
setEmployeeTags
(
formatLabelId
(
v
.
getEmployeeTags
()));
// 身份证号更新冗余的离职,标签,证件相关信息
this
.
lambdaUpdate
()
.
eq
(
TBusinessEmployeeExtendInfo:
:
getEmpIdcard
,
v
.
getEmpIdcard
())
.
set
(
null
!=
v
.
getEmployeeTags
(),
TBusinessEmployeeExtendInfo:
:
getEmployeeTags
,
v
.
getEmployeeTags
())
.
set
(
null
!=
v
.
getBusinessLeaveReason
(),
TBusinessEmployeeExtendInfo:
:
getBusinessLeaveReason
,
v
.
getBusinessLeaveReason
())
.
set
(
null
!=
v
.
getBusinessWorkingStatus
(),
TBusinessEmployeeExtendInfo:
:
getBusinessWorkingStatus
,
v
.
getBusinessWorkingStatus
())
.
set
(
null
!=
v
.
getDocumentType
(),
TBusinessEmployeeExtendInfo:
:
getDocumentType
,
v
.
getDocumentType
())
.
set
(
null
!=
v
.
getBusinessLeaveDate
(),
TBusinessEmployeeExtendInfo:
:
getBusinessLeaveDate
,
v
.
getBusinessLeaveDate
())
.
update
();
}
return
true
;
}
...
...
@@ -369,7 +371,7 @@ implements TBusinessEmployeeExtendInfoService {
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/
@Override
public
R
<
Map
<
String
,
BusinessEmployeeExtendByLeave
>
>
getInfoByLeaveMap
()
{
public
Map
<
String
,
BusinessEmployeeExtendByLeave
>
getInfoByLeaveMap
()
{
List
<
BusinessEmployeeExtendByLeave
>
list
=
this
.
baseMapper
.
getInfoByLeaveList
();
Map
<
String
,
BusinessEmployeeExtendByLeave
>
leaveMap
=
new
HashMap
<>();
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
...
...
@@ -377,7 +379,7 @@ implements TBusinessEmployeeExtendInfoService {
leaveMap
.
put
(
leave
.
getBusinessTelecomNumber
(),
leave
);
}
}
return
new
R
<>(
leaveMap
)
;
return
leaveMap
;
}
/**
...
...
yifu-business/yifu-business-api/src/main/java/com/yifu/cloud/plus/v1/business/entity/vacation/TVacationMonitorClearLog.java
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
entity
.
vacation
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
* 假期监控清零日志表
* @TableName t_vacation_monitor_clear_log
...
...
@@ -19,7 +20,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> {
/**
* 主键
*/
@TableId
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
/**
...
...
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/controller/system/TBusDeptController.java
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
controller
.
system
;
import
cn.hutool.core.collection.CollUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.business.entity.system.TBusDept
;
...
...
@@ -264,7 +265,7 @@ public class TBusDeptController {
dto
.
setDepartName
(
tBusDept
.
getName
());
dto
.
setTreeLogo
(
tBusDept
.
getTreeLogo
());
dto
.
setDepartIdVal
(
tBusDept
.
getId
());
archivesDaprUtil
.
updateEmployeeExtendRedundancy
(
dto
);
archivesDaprUtil
.
updateEmployeeExtendRedundancy
(
CollUtil
.
newArrayList
(
dto
)
);
}
return
new
R
<>(
isSuccess
);
}
...
...
@@ -298,7 +299,7 @@ public class TBusDeptController {
dto
.
setDepartName
(
null
);
dto
.
setTreeLogo
(
null
);
dto
.
setDepartIdVal
(
null
);
archivesDaprUtil
.
updateEmployeeExtendRedundancy
(
dto
);
archivesDaprUtil
.
updateEmployeeExtendRedundancy
(
CollUtil
.
newArrayList
(
dto
)
);
}
return
new
R
<>(
isSuccess
);
}
...
...
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/controller/vacation/TBusLeaveController.java
0 → 100644
View file @
039d7365
This diff is collapsed.
Click to expand it.
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/controller/vacation/TVacationMonitorClearLogController.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
controller
.
vacation
;
import
com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorClearLogService
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
* @description: 假期监控清零日志表 controller
* @author: wangweiguo
* @date: 2021-08-16
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/vacationMonitorClearLog"
)
@Tag
(
name
=
"假期监控清零日志表相关api"
)
public
class
TVacationMonitorClearLogController
{
private
final
TVacationMonitorClearLogService
tVacationMonitorClearLogService
;
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
*/
@Operation
(
summary
=
"查询-列表: 查询当前年假所有清零记录"
,
description
=
"查询-列表: 查询当前年假所有清零记录"
)
@GetMapping
(
"/getList"
)
public
R
<
List
<
TVacationMonitorClearLogVO
>>
getList
(
@RequestParam
(
"vacationMonitorId"
)
@Parameter
(
description
=
"年假监控id"
,
required
=
true
)
Integer
vacationMonitorId
)
{
return
this
.
tVacationMonitorClearLogService
.
getList
(
vacationMonitorId
);
}
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
*/
@Operation
(
summary
=
"清零说明: 记录年假清零说明"
,
description
=
"清零说明: 记录年假清零说明"
)
@PostMapping
(
"/clearNote"
)
public
R
<
Boolean
>
clearNote
(
@RequestBody
@Valid
AddVacationMonitorClearLogDTO
dto
)
{
return
this
.
tVacationMonitorClearLogService
.
clearNote
(
dto
);
}
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/mapper/vacation/TBusLeaveMapper.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
mapper
.
vacation
;
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.business.entity.vacation.TBusLeave
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@Mapper
public
interface
TBusLeaveMapper
extends
BaseMapper
<
TBusLeave
>
{
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
IPage
<
TBusLeave
>
getTBusLeavePage
(
Page
<
TBusLeave
>
page
,
@Param
(
"tBusLeave"
)
TBusLeave
tBusLeave
);
List
<
TBusLeave
>
getTBusLeaveList
(
@Param
(
"tBusLeave"
)
TBusLeave
tBusLeave
);
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/mapper/vacation/TVacationMonitorClearLogMapper.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
mapper
.
vacation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @description: 假期监控清零日志表 mapper
* @Entity com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitorClearLog
* @author: wangweiguo
* @date: 2021-08-16
*/
@Mapper
public
interface
TVacationMonitorClearLogMapper
extends
BaseMapper
<
TVacationMonitorClearLog
>
{
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/TBusLeaveService.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
service
.
vacation
;
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.business.entity.vacation.TBusLeave
;
import
java.util.List
;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
public
interface
TBusLeaveService
extends
IService
<
TBusLeave
>
{
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
IPage
<
TBusLeave
>
getTBusLeavePage
(
Page
<
TBusLeave
>
page
,
TBusLeave
tBusLeave
);
/**
* @param tBusLeave
* @Description: 获取list
* @Author: hgw
* @Date: 2021/8/18 14:50
* @return: java.util.List<com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TBusLeave>
**/
List
<
TBusLeave
>
getTBusLeaveList
(
TBusLeave
tBusLeave
);
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/TVacationMonitorClearLogService.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
service
.
vacation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO
;
import
com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.util.List
;
/**
* @description: 假期监控清零日志表 service层
* @author: wangweiguo
* @date: 2021-08-16
*/
public
interface
TVacationMonitorClearLogService
extends
IService
<
TVacationMonitorClearLog
>
{
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
*/
R
<
List
<
TVacationMonitorClearLogVO
>>
getList
(
Integer
vacationMonitorId
);
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
*/
R
<
Boolean
>
clearNote
(
AddVacationMonitorClearLogDTO
dto
);
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/impl/TBusLeaveServiceImpl.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
service
.
vacation
.
impl
;
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.business.entity.vacation.TBusLeave
;
import
com.yifu.cloud.plus.v1.business.mapper.vacation.TBusLeaveMapper
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TBusLeaveService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@Service
(
"tBusLeaveService"
)
public
class
TBusLeaveServiceImpl
extends
ServiceImpl
<
TBusLeaveMapper
,
TBusLeave
>
implements
TBusLeaveService
{
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
@Override
public
IPage
<
TBusLeave
>
getTBusLeavePage
(
Page
<
TBusLeave
>
page
,
TBusLeave
tBusLeave
)
{
return
baseMapper
.
getTBusLeavePage
(
page
,
tBusLeave
);
}
@Override
public
List
<
TBusLeave
>
getTBusLeaveList
(
TBusLeave
tBusLeave
)
{
return
baseMapper
.
getTBusLeaveList
(
tBusLeave
);
}
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/impl/TVacationMonitorClearLogServiceImpl.java
0 → 100644
View file @
039d7365
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
service
.
vacation
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO
;
import
com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitor
;
import
com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog
;
import
com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationMonitorClearLogMapper
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorClearLogService
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorService
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.AllArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
util
.
BusinessResultErrorMsg
.*;
/**
* @description: 假期监控清零日志表 service实现层
* @author: wangweiguo
* @date: 2021-08-16
*/
@Service
@AllArgsConstructor
public
class
TVacationMonitorClearLogServiceImpl
extends
ServiceImpl
<
TVacationMonitorClearLogMapper
,
TVacationMonitorClearLog
>
implements
TVacationMonitorClearLogService
{
private
final
TVacationMonitorService
vacationMonitorService
;
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @Author: huyc
* @Date: 2023/1/6 11:14
*/
@Override
public
R
<
List
<
TVacationMonitorClearLogVO
>>
getList
(
Integer
vacationMonitorId
)
{
if
(
vacationMonitorId
==
null
)
{
return
R
.
ok
(
null
,
VACATION_MONITOR_ID_IS_NOT_NULL
);
}
List
<
TVacationMonitorClearLog
>
list
=
this
.
lambdaQuery
()
.
eq
(
TVacationMonitorClearLog:
:
getVacationMonitorId
,
vacationMonitorId
)
.
orderByDesc
(
TVacationMonitorClearLog:
:
getClearTime
)
.
list
();
List
<
TVacationMonitorClearLogVO
>
voList
=
list
.
stream
().
map
(
v
->
{
TVacationMonitorClearLogVO
vo
=
new
TVacationMonitorClearLogVO
();
BeanUtil
.
copyProperties
(
v
,
vo
,
CopyOptions
.
create
().
setIgnoreCase
(
true
));
return
vo
;
}).
collect
(
Collectors
.
toList
());
return
R
.
ok
(
voList
);
}
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @Author: huyc
* @Date: 2023/1/6 11:14
*/
@Override
public
R
<
Boolean
>
clearNote
(
AddVacationMonitorClearLogDTO
dto
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
)
{
return
R
.
failed
(
USER_NOT_LOGIN
);
}
if
(
dto
.
getVacationMonitorId
()
==
null
)
{
return
R
.
ok
(
null
,
VACATION_MONITOR_ID_IS_NOT_NULL
);
}
TVacationMonitor
vacationMonitor
=
this
.
vacationMonitorService
.
getById
(
dto
.
getVacationMonitorId
());
if
(
vacationMonitor
==
null
)
{
return
R
.
failed
(
VACATION_MONITOR_DATA_IS_NOT_EXIST
);
}
TVacationMonitorClearLog
log
=
new
TVacationMonitorClearLog
();
log
.
setClearNote
(
dto
.
getClearNote
());
log
.
setVacationMonitorId
(
dto
.
getVacationMonitorId
());
log
.
setVacationYear
(
vacationMonitor
.
getVacationYear
());
log
.
setClearDuration
(
vacationMonitor
.
getNotUsedVacationDuration
());
log
.
setClearUser
(
user
.
getNickname
());
log
.
setClearUserId
(
Integer
.
valueOf
(
user
.
getId
()));
log
.
setClearTime
(
LocalDateTime
.
now
());
boolean
isSuccess
=
this
.
save
(
log
);
return
R
.
ok
(
isSuccess
);
}
}
yifu-business/yifu-business-biz/src/main/resources/mapper/TBusLeaveMapper.xml
0 → 100644
View file @
039d7365
<?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.business.mapper.vacation.TBusLeaveMapper"
>
<resultMap
id=
"tBusLeaveMap"
type=
"com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"teleNo"
column=
"tele_no"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"idCard"
column=
"id_card"
/>
<result
property=
"post"
column=
"post"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"leaveDate"
column=
"leave_date"
/>
<result
property=
"leavePostDate"
column=
"leave_post_date"
/>
<result
property=
"leaveReason"
column=
"leave_reason"
/>
<result
property=
"createUserId"
column=
"create_user_id"
/>
<result
property=
"createUserName"
column=
"create_user_name"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
/>
<result
property=
"deptTreeLogo"
column=
"dept_tree_logo"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.tele_no,
a.name,
a.id_card,
a.post,
a.dept_id,
a.dept_name,
a.leave_date,
a.leave_post_date,
a.leave_reason,
a.create_user_id,
a.create_user_name,
a.create_time,
a.delete_flag,
a.dept_tree_logo
</sql>
<sql
id=
"tBusLeave_where"
>
<if
test=
"tBusLeave != null"
>
<if
test=
"tBusLeave.id != null and tBusLeave.id.trim() != ''"
>
AND a.id = #{tBusLeave.id}
</if>
<if
test=
"tBusLeave.teleNo != null and tBusLeave.teleNo.trim() != ''"
>
AND a.tele_no like concat('%', #{tBusLeave.teleNo},'%')
</if>
<if
test=
"tBusLeave.name != null and tBusLeave.name.trim() != ''"
>
AND a.name like concat('%', #{tBusLeave.name},'%')
</if>
<if
test=
"tBusLeave.idCard != null and tBusLeave.idCard.trim() != ''"
>
AND a.id_card = #{tBusLeave.idCard}
</if>
<if
test=
"tBusLeave.post != null and tBusLeave.post.trim() != ''"
>
AND a.post like concat('%', #{tBusLeave.post},'%')
</if>
/* 查找部门树以及底下的数据 */
<if
test=
"tBusLeave.deptId != null and tBusLeave.deptId != 1"
>
AND (a.dept_id = #{tBusLeave.deptId} or a.dept_tree_logo like concat('%-', #{tBusLeave.deptId},'-%'))
</if>
<if
test=
"tBusLeave.deptName != null and tBusLeave.deptName.trim() != ''"
>
AND a.dept_name = #{tBusLeave.deptName}
</if>
<if
test=
"tBusLeave.leaveDate != null"
>
AND a.leave_date = #{tBusLeave.leaveDate}
</if>
<if
test=
"tBusLeave.leavePostDate != null"
>
AND a.leave_post_date = #{tBusLeave.leavePostDate}
</if>
<if
test=
"tBusLeave.leaveReason != null and tBusLeave.leaveReason.trim() != ''"
>
AND a.leave_reason = #{tBusLeave.leaveReason}
</if>
<if
test=
"tBusLeave.createUserId != null and tBusLeave.createUserId.trim() != ''"
>
AND a.create_user_id = #{tBusLeave.createUserId}
</if>
<if
test=
"tBusLeave.createUserName != null and tBusLeave.createUserName.trim() != ''"
>
AND a.create_user_name = #{tBusLeave.createUserName}
</if>
<if
test=
"tBusLeave.createTime != null"
>
AND a.create_time = #{tBusLeave.createTime}
</if>
<if
test=
"tBusLeave.deleteFlag != null"
>
AND a.delete_flag = #{tBusLeave.deleteFlag}
</if>
<if
test=
"tBusLeave.leaveDateStart != null"
>
AND a.leave_date >= #{tBusLeave.leaveDateStart}
</if>
<if
test=
"tBusLeave.leaveDateEnd != null"
>
AND a.leave_date
<![CDATA[ <= ]]>
#{tBusLeave.leaveDateEnd}
</if>
<if
test=
"tBusLeave.leavePostStart != null"
>
AND a.leave_post_date >= #{tBusLeave.leavePostStart}
</if>
<if
test=
"tBusLeave.leavePostEnd != null"
>
AND a.leave_post_date
<![CDATA[ <= ]]>
#{tBusLeave.leavePostEnd}
</if>
<if
test=
"tBusLeave.deptTreeLogo != null and tBusLeave.deptTreeLogo.trim() != '' "
>
AND a.dept_tree_logo like concat(#{tBusLeave.deptTreeLogo},'%')
</if>
</if>
</sql>
<!--tBusLeave简单分页查询-->
<select
id=
"getTBusLeavePage"
resultMap=
"tBusLeaveMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_bus_leave a
<where>
a.delete_flag = 0
<include
refid=
"tBusLeave_where"
/>
</where>
order by a.create_time desc
</select>
<!--获取list-->
<select
id=
"getTBusLeaveList"
resultMap=
"tBusLeaveMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_bus_leave a
<where>
a.delete_flag = 0
<include
refid=
"tBusLeave_where"
/>
</where>
order by a.create_time desc
</select>
</mapper>
yifu-business/yifu-business-biz/src/main/resources/mapper/TVacationMonitorClearLogMapper.xml
0 → 100644
View file @
039d7365
<?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.business.mapper.vacation.TVacationMonitorClearLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"clearNote"
column=
"CLEAR_NOTE"
jdbcType=
"VARCHAR"
/>
<result
property=
"clearDuration"
column=
"CLEAR_DURATION"
jdbcType=
"DECIMAL"
/>
<result
property=
"vacationYear"
column=
"VACATION_YEAR"
jdbcType=
"CHAR"
/>
<result
property=
"clearUser"
column=
"CLEAR_USER"
jdbcType=
"VARCHAR"
/>
<result
property=
"clearUserId"
column=
"CLEAR_USER_ID"
jdbcType=
"INTEGER"
/>
<result
property=
"clearTime"
column=
"CLEAR_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"vacationMonitorId"
column=
"VACATION_MONITOR_ID"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,CLEAR_NOTE,CLEAR_DURATION,
VACATION_YEAR,CLEAR_USER,CLEAR_USER_ID,VACATION_MONITOR_ID
CLEAR_TIME
</sql>
</mapper>
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
039d7365
...
...
@@ -307,7 +307,7 @@ public class ArchivesDaprUtil {
* @Param
* @return
**/
public
R
<
Boolean
>
updateEmployeeExtendRedundancy
(
UpdateEmployeeExtendRedundancyDTO
dto
)
{
public
R
<
Boolean
>
updateEmployeeExtendRedundancy
(
List
<
UpdateEmployeeExtendRedundancyDTO
>
dto
)
{
R
<
Boolean
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/customerBusiness/temployeeBusiness/inner/updateEmployeeExtendRedundancy"
,
JSON
.
toJSONString
(
dto
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"更新-对应身份证的冗余信息失败!"
);
...
...
@@ -345,6 +345,22 @@ public class ArchivesDaprUtil {
return
res
;
}
/**
* @Author huyc
* @Description 获取所有附属信息
* @Date 22:11 2022/8/4
* @Param
* @return
**/
public
R
<
Map
<
String
,
BusinessEmployeeExtendByLeave
>>
getInfoByLeaveMap
()
{
R
<
Map
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/customerBusiness/temployeeBusiness/inner/getInfoByLeaveMap"
,
""
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取所有附属信息失败!"
);
}
Map
<
String
,
BusinessEmployeeExtendByLeave
>
map
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
res
.
getData
()),
new
TypeReference
<
HashMap
<
String
,
BusinessEmployeeExtendByLeave
>>(){});
return
R
.
ok
(
map
);
}
/**
* @Author huyc
* @Description 获取所有非离职员工拓展表信息
...
...
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