Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
49bd7801
提交
49bd7801
authored
4月 15, 2019
作者:
宋文杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(attendance): add the module of attendance records
上级
266b3b6a
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
234 行增加
和
8 行删除
+234
-8
attendance.sql
db/attendance.sql
+37
-8
AttendanceRecordsController.java
...le/attendance/controller/AttendanceRecordsController.java
+82
-0
AttendanceRecords.java
...axy/aroad/module/attendance/entity/AttendanceRecords.java
+53
-0
AttendanceRecordsMapper.java
...oad/module/attendance/mapper/AttendanceRecordsMapper.java
+14
-0
AttendanceRecordsService.java
...d/module/attendance/service/AttendanceRecordsService.java
+14
-0
AttendanceRecordsServiceImpl.java
...attendance/service/impl/AttendanceRecordsServiceImpl.java
+18
-0
AttendanceRecordsMapper.xml
...n/resources/mapper/attendance/AttendanceRecordsMapper.xml
+16
-0
没有找到文件。
db/attendance.sql
浏览文件 @
49bd7801
-- MySQL Script generated by MySQL Workbench
--
Thu Apr 11 09:57:40
2019
--
Mon Apr 15 09:33:45
2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
...
...
@@ -18,7 +18,7 @@ CREATE SCHEMA IF NOT EXISTS `aroad` DEFAULT CHARACTER SET utf8 ;
USE
`aroad`
;
-- -----------------------------------------------------
-- Table `aroad`.`attendance_template`
-- Table `aroad`.`attendance_template
s
`
-- -----------------------------------------------------
DROP
TABLE
IF
EXISTS
`aroad`
.
`attendance_templates`
;
...
...
@@ -46,7 +46,7 @@ CREATE TABLE IF NOT EXISTS `aroad`.`attendance` (
`attendance_id`
INT
NOT
NULL
AUTO_INCREMENT
COMMENT
'排班id'
,
`shift_id`
INT
NOT
NULL
COMMENT
'班次表主键'
,
PRIMARY
KEY
(
`attendance_id`
),
INDEX
`shift_id_index`
(
`shift_id`
ASC
))
INDEX
`shift_id_index`
(
`shift_id`
ASC
)
VISIBLE
)
ENGINE
=
InnoDB
COMMENT
=
'排班表'
;
...
...
@@ -61,18 +61,33 @@ CREATE TABLE IF NOT EXISTS `aroad`.`attendance_members` (
`attendance_id`
INT
NOT
NULL
,
`name`
VARCHAR
(
10
)
NOT
NULL
COMMENT
'值班人员姓名'
,
PRIMARY
KEY
(
`id`
),
INDEX
`attendance_id_index`
(
`attendance_id`
ASC
))
INDEX
`attendance_id_index`
(
`attendance_id`
ASC
)
INVISIBLE
)
ENGINE
=
InnoDB
COMMENT
=
'值班人员表'
;
-- -----------------------------------------------------
-- Table `aroad`.`attendance_records`
-- -----------------------------------------------------
DROP
TABLE
IF
EXISTS
`aroad`
.
`attendance_records`
;
CREATE
TABLE
IF
NOT
EXISTS
`aroad`
.
`attendance_records`
(
`record_id`
INT
NOT
NULL
AUTO_INCREMENT
COMMENT
'通讯录id'
,
`unit`
VARCHAR
(
30
)
NOT
NULL
,
`department`
VARCHAR
(
30
)
NOT
NULL
COMMENT
'部门id'
,
`position`
VARCHAR
(
30
)
NULL
,
`name`
VARCHAR
(
10
)
NOT
NULL
,
`telphone`
VARCHAR
(
15
)
NULL
,
`remark`
VARCHAR
(
100
)
NULL
,
PRIMARY
KEY
(
`record_id`
))
ENGINE
=
InnoDB
COMMENT
=
'值班通讯录'
;
SET
SQL_MODE
=@
OLD_SQL_MODE
;
SET
FOREIGN_KEY_CHECKS
=@
OLD_FOREIGN_KEY_CHECKS
;
SET
UNIQUE_CHECKS
=@
OLD_UNIQUE_CHECKS
;
-- 菜单SQL
INSERT
INTO
`sys_menu`
(
`parent_id`
,
`component`
,
...
...
@@ -170,4 +185,19 @@ insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`,
insert
into
`sys_menu`
(
`parent_id`
,
`component`
,
`permission`
,
`type`
,
`path`
,
`icon`
,
`menu_id`
,
`del_flag`
,
`create_time`
,
`sort`
,
`update_time`
,
`name`
)
values
(
'8200'
,
null
,
'attendancetemplates_edit'
,
'1'
,
null
,
'1'
,
'8202'
,
'0'
,
'2018-05-15 21:35:18'
,
'1'
,
'2018-07-29 13:38:59'
,
'修改'
);
insert
into
`sys_menu`
(
`parent_id`
,
`component`
,
`permission`
,
`type`
,
`path`
,
`icon`
,
`menu_id`
,
`del_flag`
,
`create_time`
,
`sort`
,
`update_time`
,
`name`
)
values
(
'8200'
,
null
,
'attendancetemplates_del'
,
'1'
,
null
,
'1'
,
'8203'
,
'0'
,
'2018-05-15 21:35:18'
,
'2'
,
'2018-07-29 13:38:59'
,
'删除'
);
\ No newline at end of file
values
(
'8200'
,
null
,
'attendancetemplates_del'
,
'1'
,
null
,
'1'
,
'8203'
,
'0'
,
'2018-05-15 21:35:18'
,
'2'
,
'2018-07-29 13:38:59'
,
'删除'
);
-- 菜单SQL
insert
into
`sys_menu`
(
`parent_id`
,
`component`
,
`permission`
,
`type`
,
`path`
,
`icon`
,
`menu_id`
,
`del_flag`
,
`create_time`
,
`sort`
,
`update_time`
,
`name`
)
values
(
'8000'
,
'views/attendance/attendancerecords/index_manage'
,
''
,
'0'
,
'/recordsmanage'
,
'icon-bangzhushouji'
,
'8400'
,
'0'
,
'2018-01-20 13:17:19'
,
'8'
,
'2018-07-29 13:38:19'
,
'通讯录管理'
);
-- 菜单对应按钮SQL
insert
into
`sys_menu`
(
`parent_id`
,
`component`
,
`permission`
,
`type`
,
`path`
,
`icon`
,
`menu_id`
,
`del_flag`
,
`create_time`
,
`sort`
,
`update_time`
,
`name`
)
values
(
'8400'
,
null
,
'attendancerecords_add'
,
'1'
,
null
,
'1'
,
'8401'
,
'0'
,
'2018-05-15 21:35:18'
,
'0'
,
'2018-07-29 13:38:59'
,
'新增'
);
insert
into
`sys_menu`
(
`parent_id`
,
`component`
,
`permission`
,
`type`
,
`path`
,
`icon`
,
`menu_id`
,
`del_flag`
,
`create_time`
,
`sort`
,
`update_time`
,
`name`
)
values
(
'8400'
,
null
,
'attendancerecords_edit'
,
'1'
,
null
,
'1'
,
'8402'
,
'0'
,
'2018-05-15 21:35:18'
,
'1'
,
'2018-07-29 13:38:59'
,
'修改'
);
insert
into
`sys_menu`
(
`parent_id`
,
`component`
,
`permission`
,
`type`
,
`path`
,
`icon`
,
`menu_id`
,
`del_flag`
,
`create_time`
,
`sort`
,
`update_time`
,
`name`
)
values
(
'8400'
,
null
,
'attendancerecords_del'
,
'1'
,
null
,
'1'
,
'8403'
,
'0'
,
'2018-05-15 21:35:18'
,
'2'
,
'2018-07-29 13:38:59'
,
'删除'
);
src/main/java/com/elephant/framework/galaxy/aroad/module/attendance/controller/AttendanceRecordsController.java
0 → 100644
浏览文件 @
49bd7801
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
attendance
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog
;
import
com.elephant.framework.galaxy.aroad.module.attendance.entity.AttendanceRecords
;
import
com.elephant.framework.galaxy.aroad.module.attendance.service.AttendanceRecordsService
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
com.elephant.framework.galaxy.aroad.module.common.controller.BaseController
;
/**
* 值班通讯录表
*
* @author songwenjie
* @date 2019-04-15 09:34:54
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/attendancerecords"
)
public
class
AttendanceRecordsController
extends
BaseController
{
private
final
AttendanceRecordsService
attendanceRecordsService
;
/**
* 分页查询
* @param page 分页对象
* @param attendanceRecords 值班通讯录表
* @return
*/
@GetMapping
(
"/page"
)
public
R
getAttendanceRecordsPage
(
Page
page
,
AttendanceRecords
attendanceRecords
)
{
return
new
R
<>(
attendanceRecordsService
.
page
(
page
,
Wrappers
.
query
(
attendanceRecords
)));
}
/**
* 通过id查询值班通讯录表
* @param recordId id
* @return R
*/
@GetMapping
(
"/{recordId}"
)
public
R
getById
(
@PathVariable
(
"recordId"
)
Integer
recordId
){
return
new
R
<>(
attendanceRecordsService
.
getById
(
recordId
));
}
/**
* 新增值班通讯录表
* @param attendanceRecords 值班通讯录表
* @return R
*/
@SysLog
(
"新增值班通讯录表"
)
@PostMapping
public
R
save
(
@RequestBody
AttendanceRecords
attendanceRecords
){
return
new
R
<>(
attendanceRecordsService
.
save
(
attendanceRecords
));
}
/**
* 修改值班通讯录表
* @param attendanceRecords 值班通讯录表
* @return R
*/
@SysLog
(
"修改值班通讯录表"
)
@PutMapping
public
R
updateById
(
@RequestBody
AttendanceRecords
attendanceRecords
){
return
new
R
<>(
attendanceRecordsService
.
updateById
(
attendanceRecords
));
}
/**
* 通过id删除值班通讯录表
* @param recordId id
* @return R
*/
@SysLog
(
"删除值班通讯录表"
)
@DeleteMapping
(
"/{recordId}"
)
public
R
removeById
(
@PathVariable
Integer
recordId
){
return
new
R
<>(
attendanceRecordsService
.
removeById
(
recordId
));
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/attendance/entity/AttendanceRecords.java
0 → 100644
浏览文件 @
49bd7801
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
attendance
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* 值班通讯录表
*
* @author songwenjie
* @date 2019-04-15 09:34:54
*/
@Data
@TableName
(
"attendance_records"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AttendanceRecords
extends
Model
<
AttendanceRecords
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 通讯录id
*/
@TableId
private
Integer
recordId
;
/**
*
*/
private
String
unit
;
/**
* 部门id
*/
private
String
department
;
/**
*
*/
private
String
position
;
/**
*
*/
private
String
name
;
/**
*
*/
private
String
telphone
;
/**
*
*/
private
String
remark
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/attendance/mapper/AttendanceRecordsMapper.java
0 → 100644
浏览文件 @
49bd7801
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
attendance
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.elephant.framework.galaxy.aroad.module.attendance.entity.AttendanceRecords
;
/**
* 值班通讯录表
*
* @author songwenjie
* @date 2019-04-15 09:34:54
*/
public
interface
AttendanceRecordsMapper
extends
BaseMapper
<
AttendanceRecords
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/attendance/service/AttendanceRecordsService.java
0 → 100644
浏览文件 @
49bd7801
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
attendance
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.elephant.framework.galaxy.aroad.module.attendance.entity.AttendanceRecords
;
/**
* 值班通讯录表
*
* @author songwenjie
* @date 2019-04-15 09:34:54
*/
public
interface
AttendanceRecordsService
extends
IService
<
AttendanceRecords
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/attendance/service/impl/AttendanceRecordsServiceImpl.java
0 → 100644
浏览文件 @
49bd7801
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
attendance
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.attendance.entity.AttendanceRecords
;
import
com.elephant.framework.galaxy.aroad.module.attendance.mapper.AttendanceRecordsMapper
;
import
com.elephant.framework.galaxy.aroad.module.attendance.service.AttendanceRecordsService
;
import
org.springframework.stereotype.Service
;
/**
* 值班通讯录表
*
* @author songwenjie
* @date 2019-04-15 09:34:54
*/
@Service
public
class
AttendanceRecordsServiceImpl
extends
ServiceImpl
<
AttendanceRecordsMapper
,
AttendanceRecords
>
implements
AttendanceRecordsService
{
}
src/main/resources/mapper/attendance/AttendanceRecordsMapper.xml
0 → 100644
浏览文件 @
49bd7801
<?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.elephant.framework.galaxy.aroad.module.attendance.mapper.AttendanceRecordsMapper"
>
<resultMap
id=
"attendanceRecordsMap"
type=
"com.elephant.framework.galaxy.aroad.module.attendance.entity.AttendanceRecords"
>
<id
property=
"recordId"
column=
"record_id"
/>
<result
property=
"unit"
column=
"unit"
/>
<result
property=
"department"
column=
"department"
/>
<result
property=
"position"
column=
"position"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"telphone"
column=
"telphone"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论