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
8bcdbbb8
Commit
8bcdbbb8
authored
Jan 05, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
假勤管理修改
parent
3986e920
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
447 additions
and
140 deletions
+447
-140
TBusinessDataListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TBusinessDataListVo.java
+14
-0
TSettleDomainListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
+0
-3
EmployeeBusinessController.java
.../yifu/archives/controller/EmployeeBusinessController.java
+35
-35
TBusinessEmployeeExtendInfoService.java
.../archives/service/TBusinessEmployeeExtendInfoService.java
+17
-16
TBusinessEmployeeExtendInfoServiceImpl.java
.../service/impl/TBusinessEmployeeExtendInfoServiceImpl.java
+30
-26
TVacationInfo.java
...cloud/plus/v1/business/entity/vacation/TVacationInfo.java
+2
-1
TVacationRuleConfigController.java
...ss/controller/vacation/TVacationRuleConfigController.java
+63
-0
TVacationRuleConfigMapper.java
...1/business/mapper/vacation/TVacationRuleConfigMapper.java
+20
-0
TVacationRuleConfigService.java
...business/service/vacation/TVacationRuleConfigService.java
+45
-0
TVacationInfoServiceImpl.java
...iness/service/vacation/impl/TVacationInfoServiceImpl.java
+2
-2
TVacationMonitorServiceImpl.java
...ss/service/vacation/impl/TVacationMonitorServiceImpl.java
+59
-54
TVacationRuleConfigServiceImpl.java
...service/vacation/impl/TVacationRuleConfigServiceImpl.java
+122
-0
TVacationRuleConfigMapper.xml
...z/src/main/resources/mapper/TVacationRuleConfigMapper.xml
+20
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+17
-2
BusinessTask.java
...java/com/yifu/cloud/plus/v1/job/compont/BusinessTask.java
+1
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TBusinessDataListVo.java
0 → 100644
View file @
8bcdbbb8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
TBusinessDataListVo
{
private
List
<
TBusinessEmployeeExtendInfo
>
extendInfo
;
private
List
<
BusinessEmployeeExtendVO
>
extendVO
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
View file @
8bcdbbb8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
lombok.Data
;
...
...
@@ -19,8 +18,6 @@ public class TSettleDomainListVo {
private
Map
<
String
,
TSettleDomain
>
mapVO
;
private
List
<
TBusinessEmployeeExtendInfo
>
extendInfo
;
/**
* 合同主体IDS
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/EmployeeBusinessController.java
View file @
8bcdbbb8
...
...
@@ -4,11 +4,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TBusinessEmployeeExtendInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.T
SettleDomain
ListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.T
BusinessData
ListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
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.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -192,20 +193,20 @@ public class EmployeeBusinessController {
// }
// return this.businessEmployeeExtendInfoService.getListByIdcartList(idcardList);
// }
//
//
/**
//
* 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
//
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
//
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
//
* @author: wangweiguo
//
* @date: 2021/8/17
//
*/
//
@Inner
// @Ge
tMapping("/inner/getNotLeaveExtendList")
// public R<List<BusinessEmployeeExtendVO>>
getNotLeaveExtendList() {
//
return this.businessEmployeeExtendInfoService.getNotLeaveExtendList();
//
}
//
/**
* 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
* @author: wangweiguo
* @date: 2021/8/17
*/
@Inner
@Pos
tMapping
(
"/inner/getNotLeaveExtendList"
)
public
TBusinessDataListVo
getNotLeaveExtendList
()
{
return
this
.
businessEmployeeExtendInfoService
.
getNotLeaveExtendList
();
}
/**
* 查询-列表:内部服务调用,获取所有员工拓展表信息
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
...
...
@@ -215,8 +216,8 @@ public class EmployeeBusinessController {
*/
@Inner
@PostMapping
(
"/inner/getAllExtendList"
)
public
T
SettleDomain
ListVo
getAllExtendList
()
{
T
SettleDomainListVo
vo
=
new
TSettleDomain
ListVo
();
public
T
BusinessData
ListVo
getAllExtendList
()
{
T
BusinessDataListVo
vo
=
new
TBusinessData
ListVo
();
List
<
TBusinessEmployeeExtendInfo
>
list
=
this
.
businessEmployeeExtendInfoService
.
list
();
vo
.
setExtendInfo
(
list
);
return
vo
;
...
...
@@ -230,12 +231,11 @@ public class EmployeeBusinessController {
*/
@Inner
@PostMapping
(
"/inner/getExtendByBusinessTelecomNumber"
)
R
<
TBusinessEmployeeExtendInfo
>
getExtendByBusinessTelecomNumber
(
@RequestParam
(
"businessTelecomNumber"
)
String
businessTelecomNumber
)
{
TBusinessEmployeeExtendInfo
businessEmployeeExtendInfo
=
this
.
businessEmployeeExtendInfoService
.
lambdaQuery
()
public
TBusinessEmployeeExtendInfo
getExtendByBusinessTelecomNumber
(
@RequestBody
String
businessTelecomNumber
)
{
return
this
.
businessEmployeeExtendInfoService
.
lambdaQuery
()
.
eq
(
TBusinessEmployeeExtendInfo:
:
getBusinessTelecomNumber
,
businessTelecomNumber
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
one
();
return
R
.
ok
(
businessEmployeeExtendInfo
,
CommonConstants
.
SEARCH_SUCCESS
);
}
// /**
...
...
@@ -386,17 +386,17 @@ public class EmployeeBusinessController {
// return new R<>(tEmployeeContractInfoService.getOtherContractBusinessInfo(empId,contractId));
// }
//
//
/**
//
* @param businessTelecomNumber
//
* @Description: 根据电信编号,获取附属信息
//
* @Author: hgw
//
* @Date: 2021/8/18 17:06
//
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo>
//
**/
// @ApiOperation(value
= "根据电信编号,获取附属信息")
// @Ge
tMapping("/getByBusinessTelecomNumber")
//
public R<TBusinessEmployeeExtendInfo> getByBusinessTelecomNumber(@RequestParam String businessTelecomNumber) {
//
return new R<>(businessEmployeeExtendInfoService.getByBusinessTelecomNumber(businessTelecomNumber));
//
}
/**
* @param businessTelecomNumber
* @Description: 根据电信编号,获取附属信息
* @Author: hgw
* @Date: 2021/8/18 17:06
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo>
**/
@Operation
(
description
=
"根据电信编号,获取附属信息"
)
@Pos
tMapping
(
"/getByBusinessTelecomNumber"
)
public
R
<
TBusinessEmployeeExtendInfo
>
getByBusinessTelecomNumber
(
@RequestParam
String
businessTelecomNumber
)
{
return
new
R
<>(
businessEmployeeExtendInfoService
.
getByBusinessTelecomNumber
(
businessTelecomNumber
));
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TBusinessEmployeeExtendInfoService.java
View file @
8bcdbbb8
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TBusinessDataListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO
;
/**
...
...
@@ -21,14 +22,14 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
// */
// TBusinessEmployeeExtendInfo getByEmpIdCard(String empIdcard);
//
//
/**
//
* @param businessTelecomNumber
//
* @Description: 根据工号返回附属信息
//
* @Author: hgw
//
* @Date: 2021/8/18 17:03
//
* @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
//
**/
//
TBusinessEmployeeExtendInfo getByBusinessTelecomNumber(String businessTelecomNumber);
/**
* @param businessTelecomNumber
* @Description: 根据工号返回附属信息
* @Author: hgw
* @Date: 2021/8/18 17:03
* @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
**/
TBusinessEmployeeExtendInfo
getByBusinessTelecomNumber
(
String
businessTelecomNumber
);
//
// /**
// * 根据jsonStr批量更新人员信息拓展表信息
...
...
@@ -61,14 +62,14 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
// */
// R<List<TBusinessEmployeeExtendInfo>> getListByIdcartList(List<String> idcardList);
//
//
/**
//
* 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
//
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
//
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
//
* @author: wangweiguo
//
* @date: 2021/8/17
//
*/
// R<List<BusinessEmployeeExtendVO>>
getNotLeaveExtendList();
/**
* 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
* @author: wangweiguo
* @date: 2021/8/17
*/
TBusinessDataListVo
getNotLeaveExtendList
();
//
// /**
// * @param
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TBusinessEmployeeExtendInfoServiceImpl.java
View file @
8bcdbbb8
...
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TBusinessEmployeeExtendInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TBusinessEmployeeExtendInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtendVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TBusinessDataListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
...
@@ -41,20 +43,20 @@ implements TBusinessEmployeeExtendInfoService {
// return null;
// }
//
//
/**
//
* @param businessTelecomNumber
//
* @Description: 根据电信工号获取详情
//
* @Author: hgw
//
* @Date: 2021/8/18 17:04
//
* @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
//
**/
//
@Override
//
public TBusinessEmployeeExtendInfo getByBusinessTelecomNumber(String businessTelecomNumber) {
//
if (StringUtils.isNotBlank(businessTelecomNumber)) {
// return this.lambdaQuery().eq(TBusinessEmployeeExtendInfo::getBusinessTelecomNumber, businessTelecomNumber).last(CommonConstants.SQL_LIMIT_ONE
).one();
//
}
//
return null;
//
}
/**
* @param businessTelecomNumber
* @Description: 根据电信工号获取详情
* @Author: hgw
* @Date: 2021/8/18 17:04
* @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
**/
@Override
public
TBusinessEmployeeExtendInfo
getByBusinessTelecomNumber
(
String
businessTelecomNumber
)
{
if
(
StringUtils
.
isNotBlank
(
businessTelecomNumber
))
{
return
this
.
lambdaQuery
().
eq
(
TBusinessEmployeeExtendInfo:
:
getBusinessTelecomNumber
,
businessTelecomNumber
).
last
(
CommonConstants
.
LAST_ONE_SQL
).
one
();
}
return
null
;
}
//
// /**
// * 根据jsonStr批量更新人员信息拓展表信息
...
...
@@ -280,18 +282,20 @@ implements TBusinessEmployeeExtendInfoService {
// return R.success(CommonConstants.SEARCH_SUCCESS, list);
// }
//
// /**
// * 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
// * @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
// * @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
// * @author: wangweiguo
// * @date: 2021/8/17
// */
// @Override
// public R<List<BusinessEmployeeExtendVO>> getNotLeaveExtendList() {
// List<BusinessEmployeeExtendVO> list = this.baseMapper.getNotLeaveExtendList();
// return R.success(CommonConstants.SEARCH_SUCCESS, list);
// }
/**
* 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
* @author: wangweiguo
* @date: 2021/8/17
*/
@Override
public
TBusinessDataListVo
getNotLeaveExtendList
()
{
List
<
BusinessEmployeeExtendVO
>
list
=
this
.
baseMapper
.
getNotLeaveExtendList
();
TBusinessDataListVo
vo
=
new
TBusinessDataListVo
();
vo
.
setExtendVO
(
list
);
return
vo
;
}
//
// /**
// * @param
...
...
yifu-business/yifu-business-api/src/main/java/com/yifu/cloud/plus/v1/business/entity/vacation/TVacationInfo.java
View file @
8bcdbbb8
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
;
...
...
@@ -19,7 +20,7 @@ public class TVacationInfo implements Serializable {
/**
* 主键
*/
@TableId
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
/**
...
...
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/controller/vacation/TVacationRuleConfigController.java
0 → 100644
View file @
8bcdbbb8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
controller
.
vacation
;
import
com.yifu.cloud.plus.v1.business.dto.vacation.AddOrSaveVacationRuleDTO
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationRuleConfigService
;
import
com.yifu.cloud.plus.v1.business.util.BusinessResultErrorMsg
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.VacationRuleConfigVO
;
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
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
* @description: 假期配置controller
* @author: wangweiguo
* @date: 2021/8/13
*/
@AllArgsConstructor
@RequestMapping
(
"/vacationRule"
)
@RestController
@Tag
(
name
=
"假期配置表"
)
public
class
TVacationRuleConfigController
{
private
final
TVacationRuleConfigService
tVacationRuleConfigService
;
/**
* @description: 获取年假配置规则
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.VacationRuleConfigVO>
* @author: wangweiguo
* @date: 2021/8/13
*/
@Operation
(
summary
=
"获取年假配置规则"
,
description
=
"获取年假配置规则"
)
@GetMapping
(
"/getVacationRuleConfig"
)
public
R
<
VacationRuleConfigVO
>
getVacationRuleConfig
()
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
R
.
failed
(
BusinessResultErrorMsg
.
USER_NOT_LOGIN
);
}
return
this
.
tVacationRuleConfigService
.
getVacationRuleConfig
();
}
/**
* @description:
* @param dto
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/13
*/
@Operation
(
summary
=
"新增或保存假期配置规则"
,
description
=
"新增或保存假期配置规则"
)
@PostMapping
(
"/addOrSave"
)
public
R
<
Boolean
>
addOrSave
(
@Valid
@RequestBody
AddOrSaveVacationRuleDTO
dto
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
R
.
failed
(
BusinessResultErrorMsg
.
USER_NOT_LOGIN
);
}
return
this
.
tVacationRuleConfigService
.
addOrSave
(
user
,
dto
);
}
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/mapper/vacation/TVacationRuleConfigMapper.java
0 → 100644
View file @
8bcdbbb8
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.TVacationRuleConfig
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @description: 假期配置表mapper
* @Entity generator.domain.TVacationRuleConfig
* @author: wangweiguo
* @date: 2021/8/13
*/
@Mapper
public
interface
TVacationRuleConfigMapper
extends
BaseMapper
<
TVacationRuleConfig
>
{
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/TVacationRuleConfigService.java
0 → 100644
View file @
8bcdbbb8
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.AddOrSaveVacationRuleDTO
;
import
com.yifu.cloud.plus.v1.business.entity.vacation.TVacationRuleConfig
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.VacationRuleConfigVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
java.time.LocalDateTime
;
/**
* @description: 假期配置 service
* @author: wangweiguo
* @date: 2021/8/13
*/
public
interface
TVacationRuleConfigService
extends
IService
<
TVacationRuleConfig
>
{
/**
* @description: 获取年假配置规则
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.VacationRuleConfigVO>
* @author: wangweiguo
* @date: 2021/8/13
*/
R
<
VacationRuleConfigVO
>
getVacationRuleConfig
();
/**
* @description:
* @param user
* @param dto
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/13
*/
R
<
Boolean
>
addOrSave
(
YifuUser
user
,
AddOrSaveVacationRuleDTO
dto
);
/**
* @description: 根据入职时间返回年假天数
* @param enjoinDate 入职时间
* @return: java.lang.Integer 年假天数
* @author: wangweiguo
* @date: 2021/8/13
*/
Integer
annualLeaveCalculationFormula
(
LocalDateTime
enjoinDate
);
}
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/impl/TVacationInfoServiceImpl.java
View file @
8bcdbbb8
...
...
@@ -26,7 +26,7 @@ import com.yifu.cloud.plus.v1.business.util.BusinessCommonContants;
import
com.yifu.cloud.plus.v1.business.util.BusinessResultErrorMsg
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.TVacationInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.T
SettleDomain
ListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.T
BusinessData
ListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
...
...
@@ -170,7 +170,7 @@ implements TVacationInfoService {
errorMessageList
.
addAll
(
Common
.
commonImportErrorMessage
(
list
));
List
<
TBusinessEmployeeExtendInfo
>
employeeExtentList
=
new
ArrayList
<>();
List
<
TBusDept
>
busDeptList
=
busDeptService
.
list
();
R
<
T
SettleDomain
ListVo
>
sdRes
=
archivesDaprUtil
.
getAllExtendList
();
R
<
T
BusinessData
ListVo
>
sdRes
=
archivesDaprUtil
.
getAllExtendList
();
if
(
Common
.
isNotNull
(
sdRes
)
&&
Common
.
isNotNull
(
sdRes
.
getData
())){
employeeExtentList
=
sdRes
.
getData
().
getExtendInfo
();
}
...
...
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/impl/TVacationMonitorServiceImpl.java
View file @
8bcdbbb8
...
...
@@ -9,15 +9,19 @@ import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitor;
import
com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationMonitorMapper
;
import
com.yifu.cloud.plus.v1.business.query.vacation.TVacationMonitorQuery
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorService
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationRuleConfigService
;
import
com.yifu.cloud.plus.v1.business.util.BusinessResultErrorMsg
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorVO
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.VacationRuleConfigVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtendVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TBusinessDataListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
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
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.AllArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
...
...
@@ -25,6 +29,8 @@ import java.time.Duration;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
* @description: 假期监控表 service实现层
...
...
@@ -36,9 +42,9 @@ import java.util.List;
public
class
TVacationMonitorServiceImpl
extends
ServiceImpl
<
TVacationMonitorMapper
,
TVacationMonitor
>
implements
TVacationMonitorService
{
// private final RemoteBasiBusinessService remoteBasiBusiness
Service;
//
// private final TVacationRuleConfigService vacationRuleConfigService
;
private
final
TVacationRuleConfigService
vacationRuleConfig
Service
;
private
ArchivesDaprUtil
archivesDaprUtil
;
/**
* @description: 分页查询: 条件分页查询
...
...
@@ -55,7 +61,7 @@ implements TVacationMonitorService {
List
<
TVacationMonitorVO
>
voList
=
page
.
getRecords
();
// 设置vo展示 工龄计算
voList
.
forEach
(
v
->
v
.
setWorkingAge
(
BigDecimalUtils
.
safeDivide
(
BigDecimal
.
valueOf
(
Duration
.
between
(
v
.
getBusinessEnjoinDate
(),
LocalDateTime
.
now
()).
toDays
()),
BigDecimal
.
valueOf
(
365L
),
1
)));
return
R
.
ok
(
page
,
BusinessResultErrorMsg
.
SUCCESS
);
return
R
.
ok
(
page
,
BusinessResultErrorMsg
.
SUCCESS
);
}
/**
...
...
@@ -69,7 +75,7 @@ implements TVacationMonitorService {
public
R
<
List
<
TVacationMonitorVO
>>
exportByParams
(
TVacationMonitorQuery
query
)
{
List
<
TVacationMonitorVO
>
list
=
this
.
baseMapper
.
getList
(
query
);
list
.
forEach
(
v
->
v
.
setWorkingAge
(
BigDecimalUtils
.
safeDivide
(
BigDecimal
.
valueOf
(
Duration
.
between
(
v
.
getBusinessEnjoinDate
(),
LocalDateTime
.
now
()).
toDays
()),
BigDecimal
.
valueOf
(
365L
),
1
)));
return
R
.
ok
(
list
,
CommonConstants
.
SEARCH_SUCCESS
);
return
R
.
ok
(
list
,
CommonConstants
.
SEARCH_SUCCESS
);
}
/**
...
...
@@ -131,38 +137,38 @@ implements TVacationMonitorService {
*/
@Override
public
R
<
Boolean
>
buildMonitorData
()
{
//
R<VacationRuleConfigVO> vacationRuleConfigR = this.vacationRuleConfigService.getVacationRuleConfig();
// if (R.haveData(vacationRuleConfigR) && StringUtils.equals(vacationRuleConfigR.getData().getVacationAutoInit(), CommonConstants.ONE_STRING
)) {
//
VacationRuleConfigVO ruleConfig = vacationRuleConfigR.getData();
// R<List<BusinessEmployeeExtendVO>> listR = remoteBasiBusinessService.getNotLeaveExtendList(SecurityConstants.FROM_IN
);
// if (R.isSuccess(listR) && !CollUtil.isEmpty(listR.getData
())) {
// List<BusinessEmployeeExtendVO> list = listR.getData
();
//
List<TVacationMonitor> collect = list.stream().map(vo -> {
//
TVacationMonitor monitor = null;
//
if (null != vo.getBusinessEnjoinDate()) {
//
String curentYear = String.valueOf(LocalDate.now().getYear());
//
monitor = this.lambdaQuery()
//
.eq(TVacationMonitor::getVacationYear, curentYear)
//
.eq(TVacationMonitor::getEmpIdcard, vo.getEmpIdcard()).last(CommonConstants.LAST_ONE_SQL).one();
//
// 计算年假时长
//
Integer vacationDuration = this.vacationRuleConfigService.annualLeaveCalculationFormula(vo.getBusinessEnjoinDate());
//
//
// 没有年假监控记录并且至少有一天年假,初始化年假监控 && 四舍五入至少有一天年假再发放
//
if (monitor == null && vacationDuration >= 1) {
//
monitor = buildVacationMonitor(vo, ruleConfig, null);
//
return monitor;
//
}
//
}
//
return null;
//
}).filter(Objects::nonNull).collect(Collectors.toList());
//
boolean isSuccess = this.batchSaveOrUpdateData(collect);
//
if (isSuccess) {
//
return R.ok(null,CommonConstants.RESULT_DATA_SUCESS);
//
} else {
//
return R.failed(CommonConstants.RESULT_DATA_SUCESS);
//
}
//
}
//
}
R
<
VacationRuleConfigVO
>
vacationRuleConfigR
=
this
.
vacationRuleConfigService
.
getVacationRuleConfig
();
if
(
R
.
haveData
(
vacationRuleConfigR
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
vacationRuleConfigR
.
getData
().
getVacationAutoInit
()
))
{
VacationRuleConfigVO
ruleConfig
=
vacationRuleConfigR
.
getData
();
R
<
TBusinessDataListVo
>
listR
=
archivesDaprUtil
.
getNotLeaveExtendList
(
);
if
(
R
.
isSuccess
(
listR
)
&&
Common
.
isNotNull
(
listR
.
getData
())
&&
Common
.
isNotNull
(
listR
.
getData
().
getExtendVO
()))
{
List
<
BusinessEmployeeExtendVO
>
list
=
listR
.
getData
().
getExtendVO
();
List
<
TVacationMonitor
>
collect
=
list
.
stream
().
map
(
vo
->
{
TVacationMonitor
monitor
=
null
;
if
(
null
!=
vo
.
getBusinessEnjoinDate
())
{
String
curentYear
=
String
.
valueOf
(
LocalDate
.
now
().
getYear
());
monitor
=
this
.
lambdaQuery
()
.
eq
(
TVacationMonitor:
:
getVacationYear
,
curentYear
)
.
eq
(
TVacationMonitor:
:
getEmpIdcard
,
vo
.
getEmpIdcard
()).
last
(
CommonConstants
.
LAST_ONE_SQL
).
one
();
// 计算年假时长
Integer
vacationDuration
=
this
.
vacationRuleConfigService
.
annualLeaveCalculationFormula
(
vo
.
getBusinessEnjoinDate
());
// 没有年假监控记录并且至少有一天年假,初始化年假监控 && 四舍五入至少有一天年假再发放
if
(
monitor
==
null
&&
vacationDuration
>=
1
)
{
monitor
=
buildVacationMonitor
(
vo
,
ruleConfig
,
null
);
return
monitor
;
}
}
return
null
;
}).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
boolean
isSuccess
=
this
.
batchSaveOrUpdateData
(
collect
);
if
(
isSuccess
)
{
return
R
.
ok
(
null
,
CommonConstants
.
RESULT_DATA_SUCESS
);
}
else
{
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_SUCESS
);
}
}
}
return
R
.
ok
(
null
,
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
...
...
@@ -265,22 +271,21 @@ implements TVacationMonitorService {
* @return com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitor
**/
private
TVacationMonitor
buildVacationMonitor
(
BusinessEmployeeExtendVO
vo
,
VacationRuleConfigVO
ruleConfig
,
TVacationMonitor
monitor
)
{
// if (null == monitor) {
// monitor = new TVacationMonitor();
// }
// Integer vacationDuration = this.vacationRuleConfigService.annualLeaveCalculationFormula(vo.getBusinessEnjoinDate());
// monitor.setVacationYear(String.valueOf(LocalDate.now().getYear()));
// monitor.setNotUsedVacationDuration(BigDecimalUtils.safeMultiply(BigDecimal.valueOf(vacationDuration), ruleConfig.getTimeValue()));
// monitor.setVacationDuration(BigDecimalUtils.safeMultiply(BigDecimal.valueOf(vacationDuration), ruleConfig.getTimeValue()));
// monitor.setDepartId(vo.getDepartId());
// monitor.setBusinessEnjoinDate(vo.getBusinessEnjoinDate());
// monitor.setBusinessPost(vo.getBusinessPost());
// monitor.setBusinessTelecomNumber(vo.getBusinessTelecomNumber());
// monitor.setEmpIdcard(vo.getEmpIdcard());
// monitor.setEmpName(vo.getEmpName());
// monitor.setVacationStatus(CommonConstants.ZERO_STRING);
// return monitor;
return
null
;
if
(
null
==
monitor
)
{
monitor
=
new
TVacationMonitor
();
}
Integer
vacationDuration
=
this
.
vacationRuleConfigService
.
annualLeaveCalculationFormula
(
vo
.
getBusinessEnjoinDate
());
monitor
.
setVacationYear
(
String
.
valueOf
(
LocalDate
.
now
().
getYear
()));
monitor
.
setNotUsedVacationDuration
(
BigDecimalUtils
.
safeMultiply
(
BigDecimal
.
valueOf
(
vacationDuration
),
ruleConfig
.
getTimeValue
()));
monitor
.
setVacationDuration
(
BigDecimalUtils
.
safeMultiply
(
BigDecimal
.
valueOf
(
vacationDuration
),
ruleConfig
.
getTimeValue
()));
monitor
.
setDepartId
(
vo
.
getDepartId
());
monitor
.
setBusinessEnjoinDate
(
vo
.
getBusinessEnjoinDate
());
monitor
.
setBusinessPost
(
vo
.
getBusinessPost
());
monitor
.
setBusinessTelecomNumber
(
vo
.
getBusinessTelecomNumber
());
monitor
.
setEmpIdcard
(
vo
.
getEmpIdcard
());
monitor
.
setEmpName
(
vo
.
getEmpName
());
monitor
.
setVacationStatus
(
CommonConstants
.
ZERO_STRING
);
return
monitor
;
}
}
...
...
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/vacation/impl/TVacationRuleConfigServiceImpl.java
0 → 100644
View file @
8bcdbbb8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
business
.
service
.
vacation
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.business.dto.vacation.AddOrSaveVacationRuleDTO
;
import
com.yifu.cloud.plus.v1.business.entity.vacation.TVacationRuleConfig
;
import
com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationRuleConfigMapper
;
import
com.yifu.cloud.plus.v1.business.service.vacation.TVacationRuleConfigService
;
import
com.yifu.cloud.plus.v1.business.vo.vacation.VacationRuleConfigVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.Duration
;
import
java.time.LocalDateTime
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.TemporalAdjusters
;
/**
* @description: 假期配置 service实现层
* @author: wangweiguo
* @date: 2021/8/13
*/
@Service
public
class
TVacationRuleConfigServiceImpl
extends
ServiceImpl
<
TVacationRuleConfigMapper
,
TVacationRuleConfig
>
implements
TVacationRuleConfigService
{
public
static
final
Integer
YEAR
=
365
;
/**
* @description: 获取年假配置规则
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.VacationRuleConfigVO>
* @author: wangweiguo
* @date: 2021/8/13
*/
@Override
public
R
<
VacationRuleConfigVO
>
getVacationRuleConfig
()
{
TVacationRuleConfig
tVacationRuleConfig
=
this
.
lambdaQuery
()
.
eq
(
TVacationRuleConfig:
:
getType
,
CommonConstants
.
ONE_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
).
one
();
VacationRuleConfigVO
vo
=
new
VacationRuleConfigVO
();
vo
=
TVacationRuleConfig
.
entityConvertToObj
(
vo
,
tVacationRuleConfig
);
return
R
.
ok
(
vo
,
"查询成功"
);
}
/**
* @description:
* @param user
* @param dto
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/13
*/
@Override
public
R
<
Boolean
>
addOrSave
(
YifuUser
user
,
AddOrSaveVacationRuleDTO
dto
)
{
TVacationRuleConfig
tVacationRuleConfig
=
TVacationRuleConfig
.
objConvertToEntity
(
dto
);
TVacationRuleConfig
entity
=
this
.
lambdaQuery
().
eq
(
TVacationRuleConfig:
:
getType
,
tVacationRuleConfig
.
getType
()).
one
();
if
(
null
==
entity
)
{
// 新增
tVacationRuleConfig
.
setCreateTime
(
LocalDateTime
.
now
());
tVacationRuleConfig
.
setCreateUserId
(
String
.
valueOf
(
user
.
getId
()));
}
else
{
// 更新
if
(
null
==
tVacationRuleConfig
.
getId
())
{
return
R
.
failed
(
"数据校验失败:更新状态下id不能为空"
);
}
tVacationRuleConfig
.
setUpdateTime
(
LocalDateTime
.
now
());
tVacationRuleConfig
.
setUpdateUserId
(
String
.
valueOf
(
user
.
getId
()));
}
boolean
isSuccess
=
this
.
saveOrUpdate
(
tVacationRuleConfig
);
if
(
isSuccess
)
{
return
R
.
ok
(
true
,
"操作成功"
);
}
return
R
.
failed
(
false
,
"操作失败"
);
}
/**
* @description: 根据入职时间返回年假天数
* @param enjoinDate 入职时间
* @return: java.lang.Integer 年假天数
* @author: wangweiguo
* @date: 2021/8/13
*/
@Override
public
Integer
annualLeaveCalculationFormula
(
LocalDateTime
enjoinDate
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
// 当前距离入职天数
long
offsetDays
=
Duration
.
between
(
enjoinDate
,
now
).
toDays
();
// 入职满一年的时间
LocalDateTime
enjoinOnYear
=
enjoinDate
.
plus
(
YEAR
,
ChronoUnit
.
DAYS
);
LocalDateTime
oneYear
=
enjoinDate
.
plus
(
YEAR
,
ChronoUnit
.
DAYS
).
with
(
TemporalAdjusters
.
lastDayOfYear
());
LocalDateTime
tenYear
=
enjoinDate
.
plus
(
10L
*
YEAR
,
ChronoUnit
.
DAYS
).
with
(
TemporalAdjusters
.
lastDayOfYear
());
LocalDateTime
twentyYear
=
enjoinDate
.
plus
(
20L
*
YEAR
,
ChronoUnit
.
DAYS
).
with
(
TemporalAdjusters
.
lastDayOfYear
());
// 入职满一年距离下次1月1日
long
lastDay
=
Duration
.
between
(
enjoinOnYear
,
oneYear
).
toDays
();
if
(
offsetDays
>=
YEAR
&&
now
.
isBefore
(
oneYear
))
{
// 入职=1年,年假天数=(年末-当前日期)/365天*休假天数5,四舍五入,立即发放
return
BigDecimalUtils
.
safeMultiply
(
5
,
BigDecimalUtils
.
safeDivide
(
lastDay
,
YEAR
,
BigDecimal
.
ZERO
,
4
)).
setScale
(
0
,
RoundingMode
.
HALF_UP
).
intValue
();
}
else
if
(
now
.
isAfter
(
oneYear
)
&&
now
.
isBefore
(
tenYear
))
{
// 入职年限>1年<10年,当年度已发放休假天数的,次年发放:年假天数5天
return
5
;
}
else
if
((
now
.
isAfter
(
tenYear
)
||
now
.
isEqual
(
tenYear
))
&&
now
.
isBefore
(
twentyYear
)){
// 入职年限≥10年<20年,当年度已发放休假天数的,次年发放:年假天数10天
return
10
;
}
else
if
(
now
.
isEqual
(
twentyYear
)
||
now
.
isAfter
(
twentyYear
))
{
// 大于等于20 发放15天
return
15
;
}
else
{
return
0
;
}
}
}
yifu-business/yifu-business-biz/src/main/resources/mapper/TVacationRuleConfigMapper.xml
0 → 100644
View file @
8bcdbbb8
<?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.TVacationRuleConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.business.entity.vacation.TVacationRuleConfig"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"INTEGER"
/>
<result
property=
"type"
column=
"TYPE"
jdbcType=
"CHAR"
/>
<result
property=
"vacationAutoInit"
column=
"VACATION_AUTO_INIT"
jdbcType=
"CHAR"
/>
<result
property=
"vacationInitDate"
column=
"VACATION_INIT_DATE"
jdbcType=
"DATE"
/>
<result
property=
"timeScale"
column=
"TIME_SCALE"
jdbcType=
"CHAR"
/>
<result
property=
"timeValue"
column=
"TIME_VALUE"
jdbcType=
"DECIMAL"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,TYPE,VACATION_AUTO_INIT,
VACATION_INIT_DATE,TIME_SCALE,TIME_VALUE
</sql>
</mapper>
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
8bcdbbb8
...
...
@@ -322,8 +322,8 @@ public class ArchivesDaprUtil {
* @Param
* @return
**/
public
R
<
T
SettleDomain
ListVo
>
getAllExtendList
()
{
R
<
T
SettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/customerBusiness/temployeeBusiness/inner/getAllExtendList"
,
""
,
TSettleDomain
ListVo
.
class
,
SecurityConstants
.
FROM_IN
);
public
R
<
T
BusinessData
ListVo
>
getAllExtendList
()
{
R
<
T
BusinessDataListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/customerBusiness/temployeeBusiness/inner/getAllExtendList"
,
""
,
TBusinessData
ListVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取所有员工拓展表信息失败!"
);
}
...
...
@@ -345,6 +345,21 @@ public class ArchivesDaprUtil {
return
res
;
}
/**
* @Author huyc
* @Description 获取所有非离职员工拓展表信息
* @Date 22:11 2022/8/4
* @Param
* @return
**/
public
R
<
TBusinessDataListVo
>
getNotLeaveExtendList
()
{
R
<
TBusinessDataListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/customerBusiness/temployeeBusiness/inner/getNotLeaveExtendList"
,
""
,
TBusinessEmployeeExtendInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取所有非离职员工拓展表信息失败!"
);
}
return
res
;
}
/**
* @Author fxj
* @Description 更新项目档案和人员档案的社保公积金状态
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/BusinessTask.java
View file @
8bcdbbb8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
job
.
compont
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprBusinessProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/** * @author wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/
@Component
(
value
=
"businessTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprBusinessProperties
.
class
)
public
class
BusinessTask
{
@Autowired
private
DaprBusinessProperties
daprBusinessProperties
;
// // /** // * @author wangweiguo // * @description 每天初始化年假信息 // * @date 22:35 2021/8/17 // * @return void // **/ // public void buildMonitorData() { // remoteVacationMonitorService.buildMonitorData(SecurityConstants.FROM_IN); // } // /** // * @author fxj // * @description 每天更新证件状态 // * @date 2021-08-23 // * @return void // **/ // public void updateCertStatusTask() { // log.info("------------扫描定时任务开始:定时更新B端证据状态信息开始------------"); // remoteBusinessService.updateCertStatusTask(SecurityConstants.FROM_IN); // log.info("------------扫描定时任务开始:定时更新B端证据状态信息结束------------"); // } /** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doBatchSendBusSms(){ log.info("------------发送短信定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doBatchSendBusSms", "", Object.class, SecurityConstants.FROM_IN); log.info("------------发送短信定时任务-结束------------"); } /** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doUpdateSendBusSmsStatus(){ log.info("------------短信状态更新定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doUpdateSendBusSmsStatus", "", Object.class, SecurityConstants.FROM_IN); log.info("------------短信状态更新定时任务-结束------------"); } }
\ No newline at end of file
package
com
.
yifu
.
cloud
.
plus
.
v1
.
job
.
compont
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprBusinessProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/** * @author wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/
@Component
(
value
=
"businessTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprBusinessProperties
.
class
)
public
class
BusinessTask
{
@Autowired
private
DaprBusinessProperties
daprBusinessProperties
;
/** * @Description: 发送短信定时任务 * @Author: huyc * @Date: 2023/1/5 9:35 * @return: void **/
public
void
buildMonitorData
(){
log
.
info
(
"------------初始化年假信息定时任务-开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprBusinessProperties
.
getAppUrl
(),
daprBusinessProperties
.
getAppId
(),
"/vacationMonitor/inner/buildMonitorDataForCurrentYear"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------初始化年假信息定时任务-结束------------"
);
}
// /** // * @author fxj // * @description 每天更新证件状态 // * @date 2021-08-23 // * @return void // **/ // public void updateCertStatusTask() { // log.info("------------扫描定时任务开始:定时更新B端证据状态信息开始------------"); // remoteBusinessService.updateCertStatusTask(SecurityConstants.FROM_IN); // log.info("------------扫描定时任务开始:定时更新B端证据状态信息结束------------"); // } /** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doBatchSendBusSms(){ log.info("------------发送短信定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doBatchSendBusSms", "", Object.class, SecurityConstants.FROM_IN); log.info("------------发送短信定时任务-结束------------"); } /** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doUpdateSendBusSmsStatus(){ log.info("------------短信状态更新定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doUpdateSendBusSmsStatus", "", 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