Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
2cdcb969
Commit
2cdcb969
authored
Mar 18, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
招聘管理业务代码
parent
9589ce2c
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
990 additions
and
113 deletions
+990
-113
src/main/java/cn/timer/api/bean/zpgl/ZpglCompany.java
+77
-0
src/main/java/cn/timer/api/bean/zpgl/ZpglGzdd.java
+107
-0
src/main/java/cn/timer/api/bean/zpgl/ZpglRcxx.java
+15
-0
src/main/java/cn/timer/api/bean/zpgl/ZpglZj.java
+77
-0
src/main/java/cn/timer/api/controller/zpgl/ZpglCompanyController.java
+73
-0
src/main/java/cn/timer/api/controller/zpgl/ZpglController.java
+190
-89
src/main/java/cn/timer/api/controller/zpgl/ZpglFailController.java
+16
-22
src/main/java/cn/timer/api/controller/zpgl/ZpglGzddController.java
+97
-0
src/main/java/cn/timer/api/controller/zpgl/ZpglZjController.java
+73
-0
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglMslcLogService.java
+1
-1
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglMslcLogServiceImpl.java
+1
-1
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglService.java
+22
-0
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglServiceImpl.java
+122
-0
src/main/java/cn/timer/api/dao/zpgl/ZpglCompanyMapper.java
+17
-0
src/main/java/cn/timer/api/dao/zpgl/ZpglGzddMapper.java
+18
-0
src/main/java/cn/timer/api/dao/zpgl/ZpglZjMapper.java
+18
-0
src/main/resources/mapping/zpgl/ZpglCompanyMapper.xml
+19
-0
src/main/resources/mapping/zpgl/ZpglGzddMapper.xml
+25
-0
src/main/resources/mapping/zpgl/ZpglRcxxMapper.xml
+3
-0
src/main/resources/mapping/zpgl/ZpglZjMapper.xml
+19
-0
No files found.
src/main/java/cn/timer/api/bean/zpgl/ZpglCompany.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
bean
.
zpgl
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* 招聘管理合同公司字典表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-17 15:14:40
*/
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"zpgl_company"
)
@Data
public
class
ZpglCompany
extends
Model
<
ZpglCompany
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
)
private
Integer
id
;
/**
* 公司名称
*/
@ApiModelProperty
(
value
=
"公司名称"
)
private
String
companyName
;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
private
Integer
deleteFlag
;
/**
* 创建者
*/
@ApiModelProperty
(
value
=
"创建者"
)
private
Integer
createUserId
;
/**
* 更新者
*/
@ApiModelProperty
(
value
=
"更新者"
)
private
Integer
updateUserId
;
/**
* 组织机构代码
*/
@ApiModelProperty
(
value
=
"组织机构代码"
)
private
Integer
orgCode
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
}
src/main/java/cn/timer/api/bean/zpgl/ZpglGzdd.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
bean
.
zpgl
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* 招聘管理工作地点字典表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-17 15:14:40
*/
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"zpgl_gzdd"
)
@Data
public
class
ZpglGzdd
extends
Model
<
ZpglGzdd
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
)
private
Integer
id
;
/**
* 省名
*/
@ApiModelProperty
(
value
=
"省名"
)
private
String
provinceId
;
/**
* 省名
*/
@ApiModelProperty
(
value
=
"省名"
)
private
String
province
;
/**
* 区名
*/
@ApiModelProperty
(
value
=
"区名"
)
private
String
districtId
;
/**
* 区名
*/
@ApiModelProperty
(
value
=
"区名"
)
private
String
district
;
/**
* 城市
*/
@ApiModelProperty
(
value
=
"城市"
)
private
String
cityId
;
/**
* 城市
*/
@ApiModelProperty
(
value
=
"城市"
)
private
String
city
;
/**
* 工作地点
*/
@ApiModelProperty
(
value
=
"工作地点"
)
private
String
gzddName
;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
private
Integer
deleteFlag
;
/**
* 创建者
*/
@ApiModelProperty
(
value
=
"创建者"
)
private
Integer
createUserId
;
/**
* 更新者
*/
@ApiModelProperty
(
value
=
"更新者"
)
private
Integer
updateUserId
;
/**
* 组织机构代码
*/
@ApiModelProperty
(
value
=
"组织机构代码"
)
private
Integer
orgCode
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
}
src/main/java/cn/timer/api/bean/zpgl/ZpglRcxx.java
View file @
2cdcb969
...
...
@@ -275,6 +275,21 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
@ApiModelProperty
(
value
=
"对应淘汰原因字典ID"
)
private
Integer
zpglFailId
;
/**
* 对应合同公司字典ID
*/
@ApiModelProperty
(
value
=
"对应合同公司字典ID"
)
private
Integer
zpglCompanyId
;
/**
* 对应职级字典ID
*/
@ApiModelProperty
(
value
=
"对应职级字典ID"
)
private
Integer
zpglZjId
;
/**
* 对应工作地点字典ID
*/
@ApiModelProperty
(
value
=
"对应工作地点字典ID"
)
private
Integer
zpglGzddId
;
/**
* 面试官id
*/
@ApiModelProperty
(
value
=
"面试官id"
)
...
...
src/main/java/cn/timer/api/bean/zpgl/ZpglZj.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
bean
.
zpgl
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* 招聘管理职级字典表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-17 15:14:40
*/
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"zpgl_zj"
)
@Data
public
class
ZpglZj
extends
Model
<
ZpglZj
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
)
private
Integer
id
;
/**
* 职级名称
*/
@ApiModelProperty
(
value
=
"职级名称"
)
private
String
zjName
;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
private
Integer
deleteFlag
;
/**
* 创建者
*/
@ApiModelProperty
(
value
=
"创建者"
)
private
Integer
createUserId
;
/**
* 更新者
*/
@ApiModelProperty
(
value
=
"更新者"
)
private
Integer
updateUserId
;
/**
* 组织机构代码
*/
@ApiModelProperty
(
value
=
"组织机构代码"
)
private
Integer
orgCode
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
}
src/main/java/cn/timer/api/controller/zpgl/ZpglCompanyController.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglCompany
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.transaction.Transactional
;
import
java.util.List
;
/**
* 招聘管理
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-18 15:14:40
*/
@Api
(
tags
=
"招聘管理"
)
@Transactional
(
rollbackOn
=
Exception
.
class
)
@RestController
@RequestMapping
(
value
=
"/zpgl"
,
produces
=
{
"application/json"
})
public
class
ZpglCompanyController
{
/**
* 招聘-合同公司字典
*
* @param
* @return
*/
@GetMapping
(
value
=
"/conpany"
)
@ApiOperation
(
value
=
"1.合同公司字典"
,
httpMethod
=
"GET"
,
notes
=
"合同公司字典"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
fail
(
@CurrentUser
UserBean
userBean
)
{
try
{
QueryWrapper
<
ZpglCompany
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
ZpglCompany:
:
getDeleteFlag
,
0
).
eq
(
ZpglCompany:
:
getOrgCode
,
userBean
.
getOrgCode
());
List
<
ZpglCompany
>
zpglCompany
=
ZpglCompany
.
builder
().
build
().
selectList
(
queryWrapper
);
return
ResultUtil
.
data
(
zpglCompany
,
"查询成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-合同公司字典失败"
);
}
}
/**
* 招聘-添加合同公司
*
* @param
* @return
*/
@PostMapping
(
value
=
"/company/save"
)
@ApiOperation
(
value
=
"2.招聘-添加合同公司"
,
httpMethod
=
"POST"
,
notes
=
"招聘-添加合同公司"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
save
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglCompany
zpglCompany
)
{
try
{
zpglCompany
.
setCreateUserId
(
userBean
.
getEmpNum
());
zpglCompany
.
setUpdateUserId
(
userBean
.
getEmpNum
());
zpglCompany
.
setOrgCode
(
userBean
.
getOrgCode
());
return
zpglCompany
.
insert
()
?
ResultUtil
.
success
()
:
ResultUtil
.
error
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-添加合同公司失败"
);
}
}
}
src/main/java/cn/timer/api/controller/zpgl/ZpglController.java
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.kqgl.UserEquiRelation
;
import
cn.timer.api.bean.kqmk.*
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zpgl.ZpglFail
;
import
cn.timer.api.bean.zpgl.ZpglMslcLog
;
...
...
@@ -11,27 +18,51 @@ import cn.timer.api.bean.zpgl.ZpglZwxx;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.JxglEnumInterface
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.enums.SysRoleType
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.config.exception.Regular
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.kqgl.atttimer.RealTimeUpdate
;
import
cn.timer.api.controller.zpgl.sevice.ZpglMslcLogService
;
import
cn.timer.api.controller.zpgl.sevice.ZpglService
;
import
cn.timer.api.dao.kqgl.UserEquiRelationMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zpgl.ZpglMslcLogMapper
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.zpgl.ZpglRcxxDto
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ZpglMessageTemplate
;
import
cn.timer.api.utils.query.BaseQuery
;
import
cn.timer.api.config.enuminterface.YgEnumInterface.jobStatus
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.util.StringUtils
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
javax.transaction.Transactional
;
import
java.text.MessageFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -51,10 +82,23 @@ import java.util.Map;
@RequestMapping
(
value
=
"/zpgl"
,
produces
=
{
"application/json"
})
public
class
ZpglController
{
@Value
(
value
=
"${config-8timer.init-password}"
)
private
String
pwd
;
// 回调地址
@Value
(
"${config-8timer.machine8timerUrl}"
)
public
String
mac_command
;
@Autowired
private
ZpglMslcLogMapper
zpglMslcLogM
apper
;
private
KqglAssoKqzdkfsMapper
kqglassokqzdkfsm
apper
;
@Autowired
private
ZpglMslcLogService
zpglMslcLogService
;
private
QyzxEmpLoginMapper
qyzxEmpLoginMapper
;
@Autowired
private
RealTimeUpdate
realtimeupdate
;
@Autowired
private
UserEquiRelationMapper
userequirelationmapper
;
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
@Autowired
private
ZpglService
zpglService
;
/**
* 招聘-招聘中
...
...
@@ -69,6 +113,7 @@ public class ZpglController {
@ApiParam
(
"搜索关键字"
)
@RequestParam
(
required
=
false
)
String
query
,
@ApiParam
(
"职位ID"
)
@RequestParam
(
required
=
false
)
Integer
zpglZwxxId
,
@ApiParam
(
"状态"
)
@RequestParam
(
required
=
false
)
Integer
status
)
{
try
{
Page
<
ZpglRcxx
>
page
=
new
Page
<
ZpglRcxx
>(
baseQuery
.
getPageNum
(),
baseQuery
.
getPageSize
());
QueryWrapper
<
ZpglRcxx
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
ZpglRcxx:
:
getOrgCode
,
userBean
.
getOrgCode
());
...
...
@@ -96,6 +141,12 @@ public class ZpglController {
map
.
put
(
"OFFER"
,
ZpglRcxx
.
builder
().
build
().
selectCount
(
new
QueryWrapper
<
ZpglRcxx
>().
lambda
().
eq
(
ZpglRcxx:
:
getStatus
,
JxglEnumInterface
.
ResumeStatus
.
OFFER
.
getType
())));
map
.
put
(
"ENTRYING"
,
ZpglRcxx
.
builder
().
build
().
selectCount
(
new
QueryWrapper
<
ZpglRcxx
>().
lambda
().
eq
(
ZpglRcxx:
:
getStatus
,
JxglEnumInterface
.
ResumeStatus
.
ENTRYING
.
getType
())));
return
ResultUtil
.
data
(
ygglMainEmpPage
,
map
,
"搜索成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-招聘列表失败"
);
}
}
/**
...
...
@@ -108,112 +159,162 @@ public class ZpglController {
@ApiOperation
(
value
=
"2.职位信息"
,
httpMethod
=
"GET"
,
notes
=
"职位信息"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
zwxx
(
@CurrentUser
UserBean
userBean
)
{
try
{
QueryWrapper
<
ZpglZwxx
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
ZpglZwxx:
:
getOrgCode
,
userBean
.
getOrgCode
());
List
<
ZpglZwxx
>
zpglZwxxs
=
ZpglZwxx
.
builder
().
build
().
selectList
(
queryWrapper
);
return
ResultUtil
.
data
(
zpglZwxxs
,
"查询成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-职位信息失败"
);
}
}
/**
* 招聘-变更状态
* 招聘-变更
人才信息
状态
*
* @param
* @return
*/
@PostMapping
(
value
=
"/operation"
)
@ApiOperation
(
value
=
"3.招聘-变更
状态"
,
httpMethod
=
"POST"
,
notes
=
"招聘-变更
状态"
)
@ApiOperation
(
value
=
"3.招聘-变更
人才信息状态"
,
httpMethod
=
"POST"
,
notes
=
"招聘-变更人才信息
状态"
)
@ApiOperationSupport
(
order
=
3
)
public
Result
<
Object
>
operation
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglRcxxDto
zpglRcxxDto
)
{
try
{
ZpglRcxx
zpglRcxx
=
ZpglRcxx
.
builder
().
id
(
zpglRcxxDto
.
getId
()).
status
(
zpglRcxxDto
.
getStatus
()).
build
();
ZpglMslcLog
zpglMslcLog
=
new
ZpglMslcLog
();
zpglMslcLog
.
setZpglRcxxId
(
zpglRcxxDto
.
getId
());
zpglMslcLog
.
setUserId
(
userBean
.
getEmpNum
());
zpglMslcLog
.
setUserName
(
userBean
.
getQyzxEmpLogin
().
getUsername
());
String
detail
=
""
;
switch
(
zpglRcxxDto
.
getStatus
())
{
case
2
:
//初筛通过 填充字段
zpglRcxx
.
setIfrck
(
zpglRcxxDto
.
getIfrck
());
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
FILTER_PASS
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
3
:
//安排面试 填充字段
zpglRcxx
.
setInterviewNum
(
zpglRcxxDto
.
getInterviewNum
());
zpglRcxx
.
setInterviewWay
(
zpglRcxxDto
.
getInterviewWay
());
zpglRcxx
.
setInterviewerId
(
zpglRcxxDto
.
getInterviewerId
());
zpglRcxx
.
setInterviewTime
(
zpglRcxxDto
.
getInterviewTime
());
zpglRcxx
.
setNoticeWay
(
zpglRcxxDto
.
getNoticeWay
());
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
select
(
"name"
).
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
zpglRcxxDto
.
getInterviewerId
()));
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
INTERVIEW
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
(),
zpglRcxxDto
.
getInterviewNum
().
toString
(),
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
zpglRcxxDto
.
getInterviewTime
()),
ygglMainEmp
.
getName
()});
break
;
case
4
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
INTERVIEWED
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
(),
zpglRcxxDto
.
getInterviewNum
().
toString
()});
break
;
case
5
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
INTERVIEW_PASS
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
6
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
EMPLOY
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
7
:
//发送offer 填充字段
zpglRcxx
.
setBmgwId
(
zpglRcxxDto
.
getBmgwId
());
zpglRcxx
.
setJobType
(
zpglRcxxDto
.
getJobType
());
zpglRcxx
.
setYjrzTime
(
zpglRcxxDto
.
getYjrzTime
());
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
OFFER
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
//发送offer
break
;
case
8
:
//待入职 填充字段
zpglRcxx
.
setBmgwId
(
zpglRcxxDto
.
getBmgwId
());
zpglRcxx
.
setJobType
(
zpglRcxxDto
.
getJobType
());
zpglRcxx
.
setYjrzTime
(
zpglRcxxDto
.
getYjrzTime
());
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
WAIT
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
9
:
//淘汰 填充字段
zpglRcxx
.
setZpglFailId
(
zpglRcxxDto
.
getZpglFailId
());
zpglRcxx
.
setRemarks
(
zpglRcxxDto
.
getRemarks
());
ZpglFail
zpglFail
=
ZpglFail
.
builder
().
id
(
zpglRcxxDto
.
getZpglFailId
()).
build
().
selectById
();
String
messageTemplate
=
ZpglMessageTemplate
.
ENTRYING
;
if
(!
StringUtils
.
isEmpty
(
zpglFail
))
{
if
(
zpglFail
.
getZpglRcxxStatus
().
equals
(
JxglEnumInterface
.
ResumeStatus
.
INTERVIEW_PASS
.
getType
()))
{
messageTemplate
=
ZpglMessageTemplate
.
INTERVIEWED_ENTRYING
;
}
if
(
zpglFail
.
getZpglRcxxStatus
().
equals
(
JxglEnumInterface
.
ResumeStatus
.
OFFER
.
getType
()))
{
messageTemplate
=
ZpglMessageTemplate
.
OFFER_ENTRYING
;
}
detail
=
ZpglMessageTemplate
.
print
(
messageTemplate
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
(),
zpglFail
.
getFailCause
(),
zpglRcxxDto
.
getRemarks
()});
}
break
;
case
10
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
ENTRY
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
default
:
break
;
}
zpglMslcLog
.
setDetail
(
detail
);
zpglRcxx
.
updateById
();
zpglMslcLogService
.
saveZpglMslcLog
(
zpglMslcLog
);
return
zpglService
.
updateZpglRcxx
(
userBean
,
zpglRcxxDto
)?
ResultUtil
.
success
():
ResultUtil
.
error
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-变更状态失败"
);
}
return
ResultUtil
.
success
();
}
/**
* 添加员工档案
*
* @param userBean
* @param addygdaDto
* @return
*/
@PostMapping
(
value
=
"/addygda"
)
@ApiOperation
(
value
=
"4.招聘-确认入职添加员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
)
public
Result
<
Object
>
addygda
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AddygdaDto
addygdaDto
)
{
try
{
Integer
orgCode
=
userBean
.
getOrgCode
();
String
customNum
=
addygdaDto
.
getCustomNum
();
//自定义工号
String
name
=
addygdaDto
.
getName
();
String
phone
=
addygdaDto
.
getPhone
();
Integer
zjType
=
addygdaDto
.
getZjType
();
String
zjNum
=
addygdaDto
.
getZjNum
();
Integer
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
Integer
jobType
=
addygdaDto
.
getJobType
();
Date
rzTime
=
addygdaDto
.
getRzTime
()
==
null
?
new
Date
()
:
addygdaDto
.
getRzTime
();
Integer
syq
=
addygdaDto
.
getSyq
();
Integer
sex
=
addygdaDto
.
getSex
();
Integer
bmgwId
=
addygdaDto
.
getBmgwId
();
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(!
StrUtil
.
hasBlank
(
phone
),
QyzxEmpLogin:
:
getPhone
,
phone
).
one
();
if
(
login
==
null
)
{
// 初始化密码 pwd
login
=
QyzxEmpLogin
.
builder
().
phone
(
phone
).
pw
(
Md5
.
md5
(
pwd
))
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
userBean
.
getOrgCode
()).
username
(
name
).
build
();
if
(!
login
.
insert
())
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"添加员工登录表失败,请检查输入信息"
);
}
}
YgglMainEmp
ygglMainEmp
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
if
(!
StringUtils
.
isEmpty
(
ygglMainEmp
)){
return
ResultUtil
.
error
(
"该手机号已被使用,请输入正确手机号"
);
}
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
userType
(
SysRoleType
.
U_TYPE_EMP
.
getType
())
.
status
(
CommonEnum
.
U_STS_ON
.
getType
()).
build
().
insert
();
ygglMainEmp
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
).
jobType
(
jobType
)
.
jobStatus
(
jobStatus
.
SHIYONG
.
getType
()).
rzTime
(
rzTime
).
syq
(
syq
).
sex
(
sex
)
.
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
bmgwId
(
bmgwId
).
customNum
(
customNum
).
build
();
if
(
addygdaDto
.
getAttgroupid
()
!=
null
)
{
KqglAssoYhkqz
.
builder
().
kqzid
(
attgroupid
).
userid
(
login
.
getId
()).
qyid
(
userBean
.
getOrgCode
()).
build
().
insert
();
List
<
KqglAssoKqzdkfs
>
kqjs
=
kqglassokqzdkfsmapper
.
selectList
(
new
QueryWrapper
<
KqglAssoKqzdkfs
>().
lambda
().
eq
(
KqglAssoKqzdkfs:
:
getKqzId
,
addygdaDto
.
getAttgroupid
()).
eq
(
KqglAssoKqzdkfs:
:
getType
,
1
));
for
(
KqglAssoKqzdkfs
abp
:
kqjs
)
{
KqglAssoKqj
kqj
=
KqglAssoKqj
.
builder
().
id
(
abp
.
getDkfsid
()).
build
().
selectById
();
KqglAssoYhsb
kqjry
=
KqglAssoYhsb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
login
.
getId
()).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
if
(
kqjry
==
null
)
{
// YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, login.getId()));
String
url
=
mac_command
+
"/addUserName"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"devId"
,
kqj
.
getCode
());
params
.
add
(
"userId"
,
login
.
getId
());
params
.
add
(
"userName"
,
ygglMainEmp
.
getName
());
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
login
.
getId
()).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
KqglAssoYhsb
uskqj
=
KqglAssoYhsb
.
builder
().
userId
(
login
.
getId
()).
kqjid
(
kqj
.
getId
()).
type
(
1
).
build
();
UserEquiRelation
isgly
=
userequirelationmapper
.
selectByuserId
(
login
.
getId
());
if
(
isgly
!=
null
)
{
uskqj
.
setIsGly
(
isgly
.
getIsGly
());
}
else
{
uskqj
.
setIsGly
(
0
);
}
if
(!
uskqj
.
insert
()){
return
ResultUtil
.
error
(
"操作失败--新增用户与设备关系"
);
}
}
}
}
if
(
syq
==
0
)
{
ygglMainEmp
.
setZzTime
(
rzTime
);
}
else
{
String
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
rzTime
);
String
zztime
=
ClockInTool
.
requires_extra_times
(
sdf
,
syq
,
4
,
1
);
ygglMainEmp
.
setZzTime
(
ClockInTool
.
strToDateLong
(
zztime
));
}
ygglMainEmp
.
insert
();
//假期规则初始化
String
current_time
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
());
List
<
KqglAssoLeaveRules
>
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
orgCode
));
for
(
KqglAssoLeaveRules
r
:
rul
)
{
if
(
r
.
getLeaveBalance
()
==
0
)
{
KqglAssoLeaveEmployeeBalance
.
builder
().
leaveRulesId
(
r
.
getId
()).
userid
(
ygglMainEmp
.
getEmpNum
()).
balanceDays
(-
1
).
modifyUserid
(
userBean
.
getEmpNum
()).
modifyTimer
(
current_time
).
orgCode
(
userBean
.
getOrgCode
()).
build
().
insert
();
}
else
{
KqglAssoLeaveEmployeeBalance
.
builder
().
leaveRulesId
(
r
.
getId
()).
userid
(
ygglMainEmp
.
getEmpNum
()).
balanceDays
(
0.0
).
modifyUserid
(
userBean
.
getEmpNum
()).
modifyTimer
(
current_time
).
orgCode
(
userBean
.
getOrgCode
()).
build
().
insert
();
}
}
try
{
realtimeupdate
.
AttendanceTask
(
userBean
.
getOrgCode
(),
ygglMainEmp
.
getEmpNum
(),
2
,
null
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"确认入职成功!"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-确认入职失败"
);
}
}
}
src/main/java/cn/timer/api/controller/zpgl/ZpglFailController.java
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglFail
;
import
cn.timer.api.bean.zpgl.ZpglMslcLog
;
import
cn.timer.api.bean.zpgl.ZpglRcxx
;
import
cn.timer.api.bean.zpgl.ZpglZwxx
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.JxglEnumInterface
;
import
cn.timer.api.controller.zpgl.sevice.ZpglMslcLogService
;
import
cn.timer.api.dao.zpgl.ZpglMslcLogMapper
;
import
cn.timer.api.dto.zpgl.ZpglRcxxDto
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.query.BaseQuery
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
javax.transaction.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 招聘管理
*
...
...
@@ -41,11 +29,6 @@ import java.util.Map;
@RequestMapping
(
value
=
"/zpgl"
,
produces
=
{
"application/json"
})
public
class
ZpglFailController
{
@Autowired
private
ZpglMslcLogMapper
zpglMslcLogMapper
;
@Autowired
private
ZpglMslcLogService
zpglMslcLogService
;
/**
* 招聘-淘汰原因字典
*
...
...
@@ -55,12 +38,18 @@ public class ZpglFailController {
@GetMapping
(
value
=
"/fail"
)
@ApiOperation
(
value
=
"1.淘汰原因字典"
,
httpMethod
=
"GET"
,
notes
=
"淘汰原因字典"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
fail
(
@CurrentUser
UserBean
userBean
,
@ApiParam
(
"招聘状态"
)
@RequestParam
(
required
=
false
)
Integer
status
)
{
public
Result
<
Object
>
fail
(
@CurrentUser
UserBean
userBean
,
@ApiParam
(
"招聘状态"
)
@RequestParam
(
required
=
false
)
Integer
status
)
{
try
{
QueryWrapper
<
ZpglFail
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
ZpglFail:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
ZpglFail:
:
getZpglRcxxStatus
,
status
);
queryWrapper
.
lambda
().
eq
(
ZpglFail:
:
getDeleteFlag
,
0
).
eq
(
ZpglFail:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
ZpglFail:
:
getZpglRcxxStatus
,
status
);
List
<
ZpglFail
>
zpglFail
=
ZpglFail
.
builder
().
build
().
selectList
(
queryWrapper
);
return
ResultUtil
.
data
(
zpglFail
,
"查询成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-淘汰原因字典失败"
);
}
}
/**
* 招聘-添加淘汰原因
*
...
...
@@ -71,10 +60,15 @@ public class ZpglFailController {
@ApiOperation
(
value
=
"2.招聘-添加淘汰原因"
,
httpMethod
=
"POST"
,
notes
=
"招聘-添加淘汰原因"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
save
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglFail
zpglFail
)
{
try
{
zpglFail
.
setCreateUserId
(
userBean
.
getEmpNum
());
zpglFail
.
setUpdateUserId
(
userBean
.
getEmpNum
());
zpglFail
.
setOrgCode
(
userBean
.
getOrgCode
());
return
zpglFail
.
insert
()?
ResultUtil
.
success
():
ResultUtil
.
error
();
return
zpglFail
.
insert
()
?
ResultUtil
.
success
()
:
ResultUtil
.
error
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-添加淘汰原因失败"
);
}
}
}
src/main/java/cn/timer/api/controller/zpgl/ZpglGzddController.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
;
import
cn.timer.api.bean.clazz.SysRegion
;
import
cn.timer.api.bean.zpgl.ZpglGzdd
;
import
cn.timer.api.bean.zpgl.ZpglZj
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
javax.transaction.Transactional
;
import
java.util.List
;
/**
* 招聘管理
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-18 15:14:40
*/
@Api
(
tags
=
"招聘管理"
)
@Transactional
(
rollbackOn
=
Exception
.
class
)
@RestController
@RequestMapping
(
value
=
"/zpgl"
,
produces
=
{
"application/json"
})
public
class
ZpglGzddController
{
/**
* 招聘-工作地点
*
* @param
* @return
*/
@GetMapping
(
value
=
"/gzdd"
)
@ApiOperation
(
value
=
"1.工作地点字典"
,
httpMethod
=
"GET"
,
notes
=
"工作地点字典"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
fail
(
@CurrentUser
UserBean
userBean
)
{
try
{
QueryWrapper
<
ZpglGzdd
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
ZpglGzdd:
:
getDeleteFlag
,
0
).
eq
(
ZpglGzdd:
:
getOrgCode
,
userBean
.
getOrgCode
());
List
<
ZpglGzdd
>
zpglGzdd
=
ZpglGzdd
.
builder
().
build
().
selectList
(
queryWrapper
);
zpglGzdd
.
forEach
(
zg
->
{
zg
.
setGzddName
(
zg
.
getProvince
()+
"/"
+
zg
.
getCity
()+
"/"
+
zg
.
getDistrict
()+
"/"
+
zg
.
getGzddName
());
});
return
ResultUtil
.
data
(
zpglGzdd
,
"查询成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-工作地点失败"
);
}
}
/**
* 招聘-添加职级
*
* @param
* @return
*/
@PostMapping
(
value
=
"/gzdd/save"
)
@ApiOperation
(
value
=
"2.招聘-添加工作地点"
,
httpMethod
=
"POST"
,
notes
=
"招聘-添加工作地点"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
save
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglGzdd
zpglGzdd
)
{
try
{
if
(
StringUtils
.
isEmpty
(
zpglGzdd
.
getDistrictId
())
||
zpglGzdd
.
getDistrictId
().
length
()
<=
0
){
return
ResultUtil
.
error
();
}
SysRegion
district
=
getSysRegion
(
Integer
.
parseInt
(
zpglGzdd
.
getDistrictId
()));
if
(
district
!=
null
)
{
zpglGzdd
.
setDistrict
(
district
.
getRegionName
());
SysRegion
city
=
getSysRegion
(
district
.
getRegionCode
());
zpglGzdd
.
setCity
(
city
.
getRegionName
());
zpglGzdd
.
setCityId
(
city
.
getKeyId
().
toString
());
SysRegion
province
=
getSysRegion
(
city
.
getRegionCode
());
zpglGzdd
.
setProvinceId
(
province
.
getKeyId
().
toString
());
zpglGzdd
.
setProvince
(
province
.
getRegionName
());
}
zpglGzdd
.
setCreateUserId
(
userBean
.
getEmpNum
());
zpglGzdd
.
setUpdateUserId
(
userBean
.
getEmpNum
());
zpglGzdd
.
setOrgCode
(
userBean
.
getOrgCode
());
return
zpglGzdd
.
insert
()
?
ResultUtil
.
success
()
:
ResultUtil
.
error
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-添加职级失败"
);
}
}
private
SysRegion
getSysRegion
(
Integer
keyId
)
{
return
SysRegion
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
SysRegion
>().
lambda
().
eq
(
SysRegion:
:
getKeyId
,
keyId
).
select
(
SysRegion:
:
getRegionName
,
SysRegion:
:
getKeyId
,
SysRegion:
:
getZipCode
,
SysRegion:
:
getRegionCode
));
}
}
src/main/java/cn/timer/api/controller/zpgl/ZpglZjController.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglZj
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.transaction.Transactional
;
import
java.util.List
;
/**
* 招聘管理
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-18 15:14:40
*/
@Api
(
tags
=
"招聘管理"
)
@Transactional
(
rollbackOn
=
Exception
.
class
)
@RestController
@RequestMapping
(
value
=
"/zpgl"
,
produces
=
{
"application/json"
})
public
class
ZpglZjController
{
/**
* 招聘-职级字典
*
* @param
* @return
*/
@GetMapping
(
value
=
"/zj"
)
@ApiOperation
(
value
=
"1.职级字典"
,
httpMethod
=
"GET"
,
notes
=
"职级字典"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
fail
(
@CurrentUser
UserBean
userBean
)
{
try
{
QueryWrapper
<
ZpglZj
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
ZpglZj:
:
getDeleteFlag
,
0
).
eq
(
ZpglZj:
:
getOrgCode
,
userBean
.
getOrgCode
());
List
<
ZpglZj
>
zpglCompany
=
ZpglZj
.
builder
().
build
().
selectList
(
queryWrapper
);
return
ResultUtil
.
data
(
zpglCompany
,
"查询成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-职级字典失败"
);
}
}
/**
* 招聘-添加职级
*
* @param
* @return
*/
@PostMapping
(
value
=
"/zj/save"
)
@ApiOperation
(
value
=
"2.招聘-添加职级"
,
httpMethod
=
"POST"
,
notes
=
"招聘-添加职级"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
save
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglZj
zpglZj
)
{
try
{
zpglZj
.
setCreateUserId
(
userBean
.
getEmpNum
());
zpglZj
.
setUpdateUserId
(
userBean
.
getEmpNum
());
zpglZj
.
setOrgCode
(
userBean
.
getOrgCode
());
return
zpglZj
.
insert
()
?
ResultUtil
.
success
()
:
ResultUtil
.
error
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"招聘-添加职级失败"
);
}
}
}
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglMslcLogService.java
View file @
2cdcb969
...
...
@@ -14,7 +14,7 @@ public interface ZpglMslcLogService {
* @param zpglMslcLog
* @return
*/
boolean
save
ZpglMslcLog
(
ZpglMslcLog
zpglMslcLog
);
boolean
add
ZpglMslcLog
(
ZpglMslcLog
zpglMslcLog
);
}
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglMslcLogServiceImpl.java
View file @
2cdcb969
...
...
@@ -16,7 +16,7 @@ public class ZpglMslcLogServiceImpl implements ZpglMslcLogService {
@Override
public
boolean
save
ZpglMslcLog
(
ZpglMslcLog
zpglMslcLog
)
{
public
boolean
add
ZpglMslcLog
(
ZpglMslcLog
zpglMslcLog
)
{
return
zpglMslcLog
.
insert
();
}
}
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglService.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
.
sevice
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dto.zpgl.ZpglRcxxDto
;
/**
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022/3/18
*/
public
interface
ZpglService
{
/**
* 招聘-变更人才信息状态
* 添加面试流程记录
* @param userBean zpglRcxxDto
* @return
*/
boolean
updateZpglRcxx
(
UserBean
userBean
,
ZpglRcxxDto
zpglRcxxDto
);
}
src/main/java/cn/timer/api/controller/zpgl/sevice/ZpglServiceImpl.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
controller
.
zpgl
.
sevice
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zpgl.ZpglFail
;
import
cn.timer.api.bean.zpgl.ZpglMslcLog
;
import
cn.timer.api.bean.zpgl.ZpglRcxx
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.JxglEnumInterface
;
import
cn.timer.api.dto.zpgl.ZpglRcxxDto
;
import
cn.timer.api.utils.ZpglMessageTemplate
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.transaction.Transactional
;
import
java.text.SimpleDateFormat
;
/**
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022/3/18
*/
@Service
@Transactional
(
rollbackOn
=
Exception
.
class
)
public
class
ZpglServiceImpl
implements
ZpglService
{
@Autowired
private
ZpglMslcLogService
zpglMslcLogService
;
@Override
public
boolean
updateZpglRcxx
(
UserBean
userBean
,
ZpglRcxxDto
zpglRcxxDto
)
{
boolean
count
=
false
;
ZpglRcxx
zpglRcxx
=
ZpglRcxx
.
builder
().
id
(
zpglRcxxDto
.
getId
()).
status
(
zpglRcxxDto
.
getStatus
()).
build
();
ZpglMslcLog
zpglMslcLog
=
new
ZpglMslcLog
();
zpglMslcLog
.
setZpglRcxxId
(
zpglRcxxDto
.
getId
());
zpglMslcLog
.
setUserId
(
userBean
.
getEmpNum
());
zpglMslcLog
.
setUserName
(
userBean
.
getQyzxEmpLogin
().
getUsername
());
String
detail
=
""
;
switch
(
zpglRcxxDto
.
getStatus
())
{
case
2
:
//初筛通过 填充字段
zpglRcxx
.
setIfrck
(
zpglRcxxDto
.
getIfrck
());
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
FILTER_PASS
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
3
:
//安排面试 填充字段
zpglRcxx
.
setInterviewNum
(
zpglRcxxDto
.
getInterviewNum
());
zpglRcxx
.
setInterviewWay
(
zpglRcxxDto
.
getInterviewWay
());
zpglRcxx
.
setInterviewerId
(
zpglRcxxDto
.
getInterviewerId
());
zpglRcxx
.
setInterviewTime
(
zpglRcxxDto
.
getInterviewTime
());
zpglRcxx
.
setNoticeWay
(
zpglRcxxDto
.
getNoticeWay
());
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
select
(
"name"
).
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
zpglRcxxDto
.
getInterviewerId
()));
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
INTERVIEW
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
(),
zpglRcxxDto
.
getInterviewNum
().
toString
(),
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
zpglRcxxDto
.
getInterviewTime
()),
ygglMainEmp
.
getName
()});
break
;
case
4
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
INTERVIEWED
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
(),
zpglRcxxDto
.
getInterviewNum
().
toString
()});
break
;
case
5
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
INTERVIEW_PASS
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
6
:
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
EMPLOY
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
7
:
//发送offer 填充字段
zpglRcxx
.
setBmgwId
(
zpglRcxxDto
.
getBmgwId
());
zpglRcxx
.
setJobType
(
zpglRcxxDto
.
getJobType
());
zpglRcxx
.
setYjrzTime
(
zpglRcxxDto
.
getYjrzTime
());
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
OFFER
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
//发送offer
break
;
case
8
:
//待入职 填充字段
zpglRcxx
.
setBmgwId
(
zpglRcxxDto
.
getBmgwId
());
zpglRcxx
.
setJobType
(
zpglRcxxDto
.
getJobType
());
zpglRcxx
.
setYjrzTime
(
zpglRcxxDto
.
getYjrzTime
());
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
WAIT
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
case
9
:
//淘汰 填充字段
zpglRcxx
.
setZpglFailId
(
zpglRcxxDto
.
getZpglFailId
());
zpglRcxx
.
setRemarks
(
zpglRcxxDto
.
getRemarks
());
ZpglFail
zpglFail
=
ZpglFail
.
builder
().
id
(
zpglRcxxDto
.
getZpglFailId
()).
build
().
selectById
();
String
messageTemplate
=
ZpglMessageTemplate
.
ENTRYING
;
if
(!
StringUtils
.
isEmpty
(
zpglFail
))
{
if
(
zpglFail
.
getZpglRcxxStatus
().
equals
(
JxglEnumInterface
.
ResumeStatus
.
INTERVIEW_PASS
.
getType
()))
{
messageTemplate
=
ZpglMessageTemplate
.
INTERVIEWED_ENTRYING
;
}
if
(
zpglFail
.
getZpglRcxxStatus
().
equals
(
JxglEnumInterface
.
ResumeStatus
.
OFFER
.
getType
()))
{
messageTemplate
=
ZpglMessageTemplate
.
OFFER_ENTRYING
;
}
detail
=
ZpglMessageTemplate
.
print
(
messageTemplate
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
(),
zpglFail
.
getFailCause
(),
zpglRcxxDto
.
getRemarks
()});
}
break
;
case
10
:
//确认入职
detail
=
ZpglMessageTemplate
.
print
(
ZpglMessageTemplate
.
ENTRY
,
new
String
[]{
userBean
.
getQyzxEmpLogin
().
getUsername
()});
break
;
default
:
break
;
}
zpglMslcLog
.
setDetail
(
detail
);
count
=
zpglRcxx
.
updateById
();
zpglMslcLogService
.
addZpglMslcLog
(
zpglMslcLog
);
return
count
;
}
}
src/main/java/cn/timer/api/dao/zpgl/ZpglCompanyMapper.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
dao
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglCompany
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 招聘管理合同公司字典表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-17 15:14:40
*/
@Repository
public
interface
ZpglCompanyMapper
extends
BaseMapper
<
ZpglCompany
>
{
}
src/main/java/cn/timer/api/dao/zpgl/ZpglGzddMapper.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
dao
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglGzdd
;
import
cn.timer.api.bean.zpgl.ZpglZj
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 招聘管理工作地点字典表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-17 15:14:40
*/
@Repository
public
interface
ZpglGzddMapper
extends
BaseMapper
<
ZpglGzdd
>
{
}
src/main/java/cn/timer/api/dao/zpgl/ZpglZjMapper.java
0 → 100644
View file @
2cdcb969
package
cn
.
timer
.
api
.
dao
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglCompany
;
import
cn.timer.api.bean.zpgl.ZpglZj
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 招聘管理职级字典表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-17 15:14:40
*/
@Repository
public
interface
ZpglZjMapper
extends
BaseMapper
<
ZpglZj
>
{
}
src/main/resources/mapping/zpgl/ZpglCompanyMapper.xml
0 → 100644
View file @
2cdcb969
<?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=
"cn.timer.api.dao.zpgl.ZpglCompanyMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.zpgl.ZpglCompany"
id=
"zpglCompanyMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"companyName"
column=
"company_name"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
/>
<result
property=
"createUserId"
column=
"create_user_id"
/>
<result
property=
"updateUserId"
column=
"update_user_id"
/>
<result
property=
"orgCode"
column=
"org_code"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/main/resources/mapping/zpgl/ZpglGzddMapper.xml
0 → 100644
View file @
2cdcb969
<?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=
"cn.timer.api.dao.zpgl.ZpglGzddMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.zpgl.ZpglGzdd"
id=
"ZpglGzddMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"provinceId"
column=
"province_id"
/>
<result
property=
"province"
column=
"province"
/>
<result
property=
"districtId"
column=
"district_id"
/>
<result
property=
"district"
column=
"district"
/>
<result
property=
"cityId"
column=
"city_id"
/>
<result
property=
"city"
column=
"city"
/>
<result
property=
"gzddName"
column=
"zj_name"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
/>
<result
property=
"createUserId"
column=
"create_user_id"
/>
<result
property=
"updateUserId"
column=
"update_user_id"
/>
<result
property=
"orgCode"
column=
"org_code"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/main/resources/mapping/zpgl/ZpglRcxxMapper.xml
View file @
2cdcb969
...
...
@@ -52,6 +52,9 @@
<result
property=
"label"
column=
"label"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"zpglFailId"
column=
"zpgl_fail_id"
/>
<result
property=
"zpglCompanyId"
column=
"zpgl_company_id"
/>
<result
property=
"zpglZjId"
column=
"zpgl_zj_id"
/>
<result
property=
"zpglGzddId"
column=
"zpgl_gzdd_id"
/>
<result
property=
"interviewerId"
column=
"interviewer_id"
/>
<result
property=
"interviewTime"
column=
"interview_time"
/>
<result
property=
"noticeWay"
column=
"notice_way"
/>
...
...
src/main/resources/mapping/zpgl/ZpglZjMapper.xml
0 → 100644
View file @
2cdcb969
<?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=
"cn.timer.api.dao.zpgl.ZpglZjMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.zpgl.ZpglZj"
id=
"zpglZjMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"zjName"
column=
"zj_name"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
/>
<result
property=
"createUserId"
column=
"create_user_id"
/>
<result
property=
"updateUserId"
column=
"update_user_id"
/>
<result
property=
"orgCode"
column=
"org_code"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
</mapper>
\ 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