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
89abec5a
Commit
89abec5a
authored
May 16, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
入职材料
parent
3e2c1b45
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
397 additions
and
0 deletions
+397
-0
src/main/java/cn/timer/api/bean/zpgl/ZpglRcxxMaterial.java
+142
-0
src/main/java/cn/timer/api/controller/zpgl/ZpglRcxxMaterialController.java
+93
-0
src/main/java/cn/timer/api/dao/zpgl/ZpglRcxxMaterialMapper.java
+17
-0
src/main/resources/mapping/zpgl/ZpglRcxxMaterialMapper.xml
+145
-0
No files found.
src/main/java/cn/timer/api/bean/zpgl/ZpglRcxxMaterial.java
0 → 100644
View file @
89abec5a
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.*
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 入职申请材料附件
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-05-12 18:00:06
*/
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"zpgl_rcxx_material"
)
@Data
public
class
ZpglRcxxMaterial
extends
Model
<
ZpglRcxxMaterial
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
)
private
Integer
id
;
/**
* 用户user_id
*/
private
Integer
numId
;
/**
* 路径
*/
private
String
url
;
/**
* 1身份证正面 2身份证背面 3学历证书 4学位证书 5离职证明 6入职体检报告 7银行卡正面 8银行卡背面
*/
private
Integer
type
;
/**
* 上传时间
*/
private
Date
createTime
;
/**
* 企业id
*/
private
Integer
orgCode
;
private
Integer
zpglRcxxId
;
@Transient
private
List
<
Map
<
Integer
,
String
>>
dataList
;
/**
* 设置:
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取:
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置:用户user_id
*/
public
void
setNumId
(
Integer
numId
)
{
this
.
numId
=
numId
;
}
/**
* 获取:用户user_id
*/
public
Integer
getNumId
()
{
return
numId
;
}
/**
* 设置:路径
*/
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
/**
* 获取:路径
*/
public
String
getUrl
()
{
return
url
;
}
/**
* 设置:1身份证正面 2身份证背面 3学历证书 4学位证书 5离职证明 6入职体检报告 7银行卡正面 8银行卡背面
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* 获取:1身份证正面 2身份证背面 3学历证书 4学位证书 5离职证明 6入职体检报告 7银行卡正面 8银行卡背面
*/
public
Integer
getType
()
{
return
type
;
}
/**
* 设置:上传时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:上传时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:企业id
*/
public
void
setOrgCode
(
Integer
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
/**
* 获取:企业id
*/
public
Integer
getOrgCode
()
{
return
orgCode
;
}
}
src/main/java/cn/timer/api/controller/zpgl/ZpglRcxxMaterialController.java
0 → 100644
View file @
89abec5a
package
cn
.
timer
.
api
.
controller
.
zpgl
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zpgl.ZpglMslcLog
;
import
cn.timer.api.bean.zpgl.ZpglRcxx
;
import
cn.timer.api.bean.zpgl.ZpglRcxxMaterial
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.zpgl.ZpglRcxxMaterialMapper
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.models.auth.In
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.transaction.Transactional
;
/**
* 入职申请材料附件
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-05-12 18:00:06
*/
@Api
(
tags
=
"招聘管理"
)
@Transactional
(
rollbackOn
=
Exception
.
class
)
@RestController
@RequestMapping
(
"/zpgl/rzcl"
)
public
class
ZpglRcxxMaterialController
{
@Autowired
private
ZpglRcxxMaterialMapper
zpglRcxxMaterialMapper
;
@PostMapping
(
"/subrz"
)
@ApiOperation
(
value
=
"提交入职材料"
,
httpMethod
=
"GET"
,
notes
=
"查询面试申请信息"
)
@Log
(
title
=
"interviewApplicationIofo"
,
businessType
=
BusinessType
.
INSERT_UPDATE
)
public
Result
<
Object
>
subrz
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZpglRcxxMaterial
zpglRcxxMaterial
)
{
if
(
zpglRcxxMaterial
.
getZpglRcxxId
()
<=
0
||
zpglRcxxMaterial
.
getZpglRcxxId
()
==
null
)
{
return
ResultUtil
.
error
(
"人才不存在"
);
}
if
(
zpglRcxxMaterial
.
getDataList
().
size
()
<=
0
)
{
return
ResultUtil
.
error
(
"文件不存在"
);
}
ZpglRcxx
zpglRcxx
=
ZpglRcxx
.
builder
().
id
(
zpglRcxxMaterial
.
getZpglRcxxId
()).
build
().
selectById
();
if
(
zpglRcxx
==
null
)
{
return
ResultUtil
.
error
(
"人才不存在"
);
}
zpglRcxxMaterial
.
getDataList
().
stream
().
forEach
(
v
->{
ZpglRcxxMaterial
data
=
new
ZpglRcxxMaterial
();
data
.
setOrgCode
(
userBean
.
getOrgCode
());
data
.
setCreateTime
(
new
Date
());
data
.
setZpglRcxxId
(
zpglRcxxMaterial
.
getZpglRcxxId
());
data
.
setType
(
Integer
.
parseInt
(
v
.
get
(
"type"
)));
data
.
setUrl
(
v
.
get
(
"url"
).
toString
());
data
.
insert
();
});
return
ResultUtil
.
data
(
"提交成功"
);
}
@GetMapping
(
"/materialList"
)
@ApiOperation
(
value
=
"入职材料列表"
,
httpMethod
=
"GET"
,
notes
=
"查询面试申请信息"
)
@Log
(
title
=
"interviewApplicationIofo"
,
businessType
=
BusinessType
.
INSERT_UPDATE
)
public
Result
<
Object
>
materialList
(
@CurrentUser
UserBean
userBean
,
Integer
empNum
)
{
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
.
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
if
(
ygglMainEmp
==
null
){
return
ResultUtil
.
error
(
"用户不存在"
);
}
List
<
ZpglRcxxMaterial
>
list
=
ZpglRcxxMaterial
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
ZpglRcxxMaterial
>().
lambda
()
.
eq
(
ZpglRcxxMaterial:
:
getNumId
,
empNum
));
if
(
list
.
size
()<=
0
){
return
ResultUtil
.
error
(
"当前用户没有材料"
);
}
return
ResultUtil
.
data
(
list
);
}
}
src/main/java/cn/timer/api/dao/zpgl/ZpglRcxxMaterialMapper.java
0 → 100644
View file @
89abec5a
package
cn
.
timer
.
api
.
dao
.
zpgl
;
import
cn.timer.api.bean.zpgl.ZpglRcxxMaterial
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 入职申请材料附件
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-05-12 18:00:06
*/
@Repository
public
interface
ZpglRcxxMaterialMapper
extends
BaseMapper
<
ZpglRcxxMaterial
>
{
}
src/main/resources/mapping/zpgl/ZpglRcxxMaterialMapper.xml
0 → 100644
View file @
89abec5a
<?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.ZpglRcxxMaterialMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
id=
"zpglRcxxMaterialMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"numId"
column=
"num_id"
/>
<result
property=
"url"
column=
"url"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"orgCode"
column=
"org_code"
/>
<result
property=
"zpglRcxxId"
column=
"zpgl_rcxx_id"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
>
select *
from zpgl_rcxx_material
where id = #{value}
</select>
<select
id=
"queryList"
resultType=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
>
select * from zpgl_rcxx_material
<where>
<if
test=
"id != null and id != ''"
>
AND `id` = #{id}
</if>
<if
test=
"numId != null and numId != ''"
>
AND `num_id` = #{numId}
</if>
<if
test=
"url != null and url != ''"
>
AND `url` = #{url}
</if>
<if
test=
"type != null and type != ''"
>
AND `type` = #{type}
</if>
<if
test=
"createTime != null and createTime != ''"
>
AND `create_time` = #{createTime}
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
AND `org_code` = #{orgCode}
</if>
</where>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from zpgl_rcxx_material
<where>
<if
test=
"id != null and id != ''"
>
AND `id` = #{id}
</if>
<if
test=
"numId != null and numId != ''"
>
AND `num_id` = #{numId}
</if>
<if
test=
"url != null and url != ''"
>
AND `url` = #{url}
</if>
<if
test=
"type != null and type != ''"
>
AND `type` = #{type}
</if>
<if
test=
"createTime != null and createTime != ''"
>
AND `create_time` = #{createTime}
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
AND `org_code` = #{orgCode}
</if>
</where>
</select>
<insert
id=
"save"
parameterType=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
>
insert into zpgl_rcxx_material
(`id`,
`num_id`,
`url`,
`type`,
`create_time`,
`org_code`)
values (#{id},
#{numId},
#{url},
#{type},
#{createTime},
#{orgCode})
</insert>
<insert
id=
"saveSelective"
parameterType=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
>
insert into zpgl_rcxx_material
(
<if
test=
"id != null"
>
`id`
</if>
<if
test=
"numId != null"
>
,`num_id`
</if>
<if
test=
"url != null"
>
,`url`
</if>
<if
test=
"type != null"
>
,`type`
</if>
<if
test=
"createTime != null"
>
,`create_time`
</if>
<if
test=
"orgCode != null"
>
,`org_code`
</if>
)
values
(
<if
test=
"id != null"
>
#{id}
</if>
<if
test=
"numId != null"
>
,#{numId}
</if>
<if
test=
"url != null"
>
,#{url}
</if>
<if
test=
"type != null"
>
,#{type}
</if>
<if
test=
"createTime != null"
>
,#{createTime}
</if>
<if
test=
"orgCode != null"
>
,#{orgCode}
</if>
)
</insert>
<insert
id=
"saveList"
parameterType=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
>
insert into zpgl_rcxx_material
(
`id`,
`num_id`,
`url`,
`type`,
`create_time`,
`org_code`
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.id},
#{item.numId},
#{item.url},
#{item.type},
#{item.createTime},
#{item.orgCode}
)
</foreach>
</insert>
<update
id=
"update"
parameterType=
"cn.timer.api.bean.zpgl.ZpglRcxxMaterial"
>
update zpgl_rcxx_material
<set>
<if
test=
"numId != null"
>
`num_id` = #{numId},
</if>
<if
test=
"url != null"
>
`url` = #{url},
</if>
<if
test=
"type != null"
>
`type` = #{type},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"orgCode != null"
>
`org_code` = #{orgCode}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete
from zpgl_rcxx_material
where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from zpgl_rcxx_material where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
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