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
18a4d8f3
Commit
18a4d8f3
authored
May 07, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
966afa02
470d48d7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
234 additions
and
1 deletions
+234
-1
src/main/java/cn/timer/api/bean/yggl/YgglPersonnelForm.java
+76
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+52
-1
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 @
18a4d8f3
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 @
18a4d8f3
...
...
@@ -5,7 +5,6 @@
*/
package
cn
.
timer
.
api
.
controller
.
yggl
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -26,6 +25,7 @@ import cn.timer.api.bean.yggl.*;
import
cn.timer.api.bean.zzgl.ZzglLogDgjl
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.yggl.YgglAttaHtxxbMapper
;
import
cn.timer.api.dao.yggl.YgglPersonnelFormMapper
;
import
cn.timer.api.dto.yggl.*
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
com.google.common.collect.Lists
;
...
...
@@ -171,6 +171,9 @@ public class YgglController {
@Autowired
private
YgglAttaHtxxbMapper
ygglAttaHtxxbMapper
;
@Autowired
private
YgglPersonnelFormMapper
ygglPersonnelFormMapper
;
/**
* 获取员工档案
*
...
...
@@ -2102,4 +2105,52 @@ public class YgglController {
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 @
18a4d8f3
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 @
18a4d8f3
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 @
18a4d8f3
<?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