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
7162f2e4
Commit
7162f2e4
authored
May 07, 2022
by
龙于生
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人事 人事表格接口
parent
8b5bc5ab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
237 additions
and
15 deletions
+237
-15
src/main/java/cn/timer/api/bean/yggl/YgglPersonnelForm.java
+76
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+55
-15
src/main/java/cn/timer/api/dao/yggl/YgglPersonnelFormMapper.java
+18
-0
src/main/java/cn/timer/api/dto/yggl/PersonnelFormDto.java
+69
-0
src/main/resources/mapping/yggl/YgglPersonnelFormMapper.xml
+19
-0
No files found.
src/main/java/cn/timer/api/bean/yggl/YgglPersonnelForm.java
0 → 100644
View file @
7162f2e4
package
cn
.
timer
.
api
.
bean
.
yggl
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
/**
* 人事表格表
* @TableName yggl_personnel_form
*/
@TableName
(
value
=
"yggl_personnel_form"
)
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"人事表格表"
)
public
class
YgglPersonnelForm
extends
Model
<
YgglPersonnelForm
>
{
/**
*
*/
@Id
@TableId
private
Long
id
;
/**
* 文件名称
*/
@ApiModelProperty
(
value
=
"文件名称"
)
private
String
fileName
;
/**
* 文件地址
*/
@ApiModelProperty
(
value
=
"文件地址"
)
private
String
fileUrl
;
/**
* 文件图标
*/
@ApiModelProperty
(
value
=
"文件图标"
)
private
String
fileIcon
;
/**
* 类型 0:通知与证明,1:合同与协议,2:人事文档
*/
@ApiModelProperty
(
value
=
"类型 0:通知与证明,1:合同与协议,2:人事文档"
)
private
Integer
type
;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
private
Integer
deleteFlag
;
/**
* 组织机构id
*/
@ApiModelProperty
(
value
=
"组织机构id"
)
private
Integer
orgCode
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
7162f2e4
...
@@ -5,7 +5,8 @@
...
@@ -5,7 +5,8 @@
*/
*/
package
cn
.
timer
.
api
.
controller
.
yggl
;
package
cn
.
timer
.
api
.
controller
.
yggl
;
import
java.io.IOException
;
import
java.io.*
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -22,7 +23,9 @@ import javax.servlet.ServletOutputStream;
...
@@ -22,7 +23,9 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
import
cn.timer.api.bean.yggl.*
;
import
cn.timer.api.dao.yggl.YgglAttaHtxxbMapper
;
import
cn.timer.api.dao.yggl.YgglAttaHtxxbMapper
;
import
cn.timer.api.dao.yggl.YgglPersonnelFormMapper
;
import
cn.timer.api.dto.yggl.*
;
import
cn.timer.api.dto.yggl.*
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -75,20 +78,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
...
@@ -75,20 +78,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import
cn.timer.api.bean.kqmk.KqglAssoYhsb
;
import
cn.timer.api.bean.kqmk.KqglAssoYhsb
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.yggl.YgglAttaClfjb
;
import
cn.timer.api.bean.yggl.YgglAttaCzjlb
;
import
cn.timer.api.bean.yggl.YgglAttaGzjlb
;
import
cn.timer.api.bean.yggl.YgglAttaGzk
;
import
cn.timer.api.bean.yggl.YgglAttaHtxxb
;
import
cn.timer.api.bean.yggl.YgglAttaJjlxr
;
import
cn.timer.api.bean.yggl.YgglAttaJyjlb
;
import
cn.timer.api.bean.yggl.YgglAttaLxxxb
;
import
cn.timer.api.bean.yggl.YgglAttaPxjlxxb
;
import
cn.timer.api.bean.yggl.YgglAttaSbgjj
;
import
cn.timer.api.bean.yggl.YgglAttaZcxxb
;
import
cn.timer.api.bean.yggl.YgglAttaZszjb
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainLzb
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
...
@@ -162,6 +151,9 @@ public class YgglController {
...
@@ -162,6 +151,9 @@ public class YgglController {
@Autowired
@Autowired
private
YgglAttaHtxxbMapper
ygglAttaHtxxbMapper
;
private
YgglAttaHtxxbMapper
ygglAttaHtxxbMapper
;
@Autowired
private
YgglPersonnelFormMapper
ygglPersonnelFormMapper
;
/**
/**
* 获取员工档案
* 获取员工档案
*
*
...
@@ -2056,4 +2048,52 @@ public class YgglController {
...
@@ -2056,4 +2048,52 @@ public class YgglController {
return
ResultUtil
.
data
(
htgkDtos
);
return
ResultUtil
.
data
(
htgkDtos
);
}
}
@GetMapping
(
value
=
"/getPersonnelForm"
)
@ApiOperation
(
value
=
"人事--人事表格列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
YgglPersonnelForm
>>
getPersonnelForm
(
@CurrentUser
UserBean
userBean
,
String
query
)
{
List
<
YgglPersonnelForm
>
personnelForms
=
ygglPersonnelFormMapper
.
selectList
(
new
QueryWrapper
<
YgglPersonnelForm
>().
lambda
()
.
eq
(
YgglPersonnelForm:
:
getDeleteFlag
,
0
)
.
like
(!
StrUtil
.
isEmpty
(
query
),
YgglPersonnelForm:
:
getFileName
,
query
)
.
and
(
QueryWrapper
->
QueryWrapper
.
eq
(
YgglPersonnelForm:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
or
().
isNull
(
YgglPersonnelForm:
:
getOrgCode
)));
return
ResultUtil
.
data
(
personnelForms
);
}
@GetMapping
(
value
=
"/updateFormFileName"
)
@ApiOperation
(
value
=
"人事--修改人事表格文件名"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
updateFormFileName
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
"fileName"
)
String
fileName
,
@RequestParam
(
"id"
)
Long
id
)
{
try
{
YgglPersonnelForm
.
builder
().
id
(
id
).
fileName
(
fileName
).
build
().
updateById
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
}
return
ResultUtil
.
success
();
}
@GetMapping
(
value
=
"/removePersonnelForm"
)
@ApiOperation
(
value
=
"人事--删除人事表格文件"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
removeFormFileName
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
"id"
)
Long
id
)
{
try
{
YgglPersonnelForm
.
builder
().
id
(
id
).
deleteFlag
(
1
).
build
().
updateById
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
}
return
ResultUtil
.
success
();
}
@PostMapping
(
value
=
"/addPersonnelForm"
)
@ApiOperation
(
value
=
"人事--新增人事表格文件"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
addPersonnelForm
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PersonnelFormDto
personnelFormDto
)
{
try
{
YgglPersonnelForm
.
builder
().
fileName
(
personnelFormDto
.
getFileName
()).
fileUrl
(
personnelFormDto
.
getFileUrl
()).
type
(
personnelFormDto
.
getType
()).
build
().
insert
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
}
return
ResultUtil
.
success
();
}
}
}
src/main/java/cn/timer/api/dao/yggl/YgglPersonnelFormMapper.java
0 → 100644
View file @
7162f2e4
package
cn
.
timer
.
api
.
dao
.
yggl
;
import
cn.timer.api.bean.yggl.YgglPersonnelForm
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author admin
* @description 针对表【yggl_personnel_form(人事表格表)】的数据库操作Mapper
* @createDate 2022-05-06 18:16:06
* @Entity generator.domain.YgglPersonnelForm
*/
public
interface
YgglPersonnelFormMapper
extends
BaseMapper
<
YgglPersonnelForm
>
{
}
src/main/java/cn/timer/api/dto/yggl/PersonnelFormDto.java
0 → 100644
View file @
7162f2e4
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
PersonnelFormDto
{
/**
*
*/
@Id
@TableId
private
Long
id
;
/**
* 文件名称
*/
@ApiModelProperty
(
value
=
"文件名称"
)
private
String
fileName
;
/**
* 文件地址
*/
@ApiModelProperty
(
value
=
"文件地址"
)
private
String
fileUrl
;
/**
* 文件图标
*/
@ApiModelProperty
(
value
=
"文件图标"
)
private
String
fileIcon
;
/**
* 类型 0:通知与证明,1:合同与协议,2:人事文档
*/
@ApiModelProperty
(
value
=
"类型 0:通知与证明,1:合同与协议,2:人事文档"
)
private
Integer
type
;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
private
Integer
deleteFlag
;
/**
* 组织机构id
*/
@ApiModelProperty
(
value
=
"组织机构id"
)
private
Integer
orgCode
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
src/main/resources/mapping/yggl/YgglPersonnelFormMapper.xml
0 → 100644
View file @
7162f2e4
<?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.yggl.YgglPersonnelFormMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.yggl.YgglPersonnelForm"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"fileName"
column=
"file_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileUrl"
column=
"file_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileIcon"
column=
"file_icon"
jdbcType=
"VARCHAR"
/>
<result
property=
"type"
column=
"type"
jdbcType=
"TINYINT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,file_name,file_url,
file_icon,type
</sql>
</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