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
7e8ed885
Commit
7e8ed885
authored
Apr 13, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交考勤
parent
edd5a22c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
195 additions
and
152 deletions
+195
-152
dber/考勤管理.dmj
+32
-3
src/main/java/cn/timer/api/config/Initialization/InitializeSetting.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+4
-1
src/main/java/cn/timer/api/dao/kqgl/AttendanceMachineMapper.java
+25
-22
src/main/resources/mapping/kqgl/AttendanceMachineMapper.xml
+133
-125
No files found.
dber/考勤管理.dmj
View file @
7e8ed885
{
{
...
...
@@ -1137,7 +1137,7 @@
"OrderNo": 11,
"GraphDesc": "Left=661.40\r\nTop=311.30",
"MetaFields": {
"Count":
4
,
"Count":
5
,
"items": [
{
"ID": 1,
...
...
@@ -1180,6 +1180,16 @@
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true
},
{
"ID": 16,
"Name": "is_gly",
"Memo": "0:否;1:是",
"CreateDate": "2020/4/10 15:03:44",
"OrderNo": 5,
"DisplayName": "是否为管理员",
"DataType": 2,
"Nullable": true
}
]
}
...
...
@@ -1190,7 +1200,7 @@
"OrderNo": 12,
"GraphDesc": "Left=758.00\r\nTop=929.00",
"MetaFields": {
"Count":
19
,
"Count":
21
,
"items": [
{
"ID": 1,
...
...
@@ -1370,6 +1380,25 @@
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true
},
{
"ID": 42,
"Name": "punchmode",
"Memo": "==>1:指紋;2:人脸;3:密码;4:ID卡",
"CreateDate": "2020/4/10 15:01:03",
"OrderNo": 20,
"DisplayName": "考勤机打卡方式",
"DataType": 2,
"Nullable": true
},
{
"ID": 43,
"Name": "punchequipment",
"CreateDate": "2020/4/10 15:01:03",
"OrderNo": 21,
"DisplayName": "打卡设备",
"DataType": 1,
"Nullable": true
}
]
}
...
...
src/main/java/cn/timer/api/config/Initialization/InitializeSetting.java
View file @
7e8ed885
...
...
@@ -19,7 +19,7 @@ public class InitializeSetting implements ApplicationRunner {
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
StaticVariable
.
mac_command
=
"http://192.168.
172.116
:8088/cmd"
;
//考勤机执行命令
StaticVariable
.
mac_command
=
"http://192.168.
3.143
:8088/cmd"
;
//考勤机执行命令
}
}
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
7e8ed885
...
...
@@ -34,6 +34,7 @@ import org.springframework.web.client.RestClientException;
import
org.springframework.web.client.RestTemplate
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -5885,9 +5886,11 @@ public class AttController {
String
asIOMode
=
"0"
;
String
sStdIoTime
=
jsonArray
.
get
(
"sStdIoTime"
).
toString
();
AttendanceMachine
kqjdev
=
attendancemachineservice
.
selectByQyidDev
(
asDevId
);
/***********************************************************考勤机打卡(开始)********************************************************************************************/
YgglMainEmp
user
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglmainempmapper
).
eq
(
YgglMainEmp:
:
getEmpNum
,
asUserId
).
one
();
YgglMainEmp
user
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglmainempmapper
).
eq
(
YgglMainEmp:
:
getEmpNum
,
asUserId
).
eq
(
YgglMainEmp:
:
getOrgCode
,
kqjdev
.
getQyid
()).
one
();
if
(
user
!=
null
)
{
int
qyid
=
user
.
getOrgCode
();
//坏小孩【企业id】
int
userid
=
user
.
getEmpNum
();
//用户id
...
...
src/main/java/cn/timer/api/dao/kqgl/AttendanceMachineMapper.java
View file @
7e8ed885
package
cn
.
timer
.
api
.
dao
.
kqgl
;
import
java.util.List
;
import
cn.timer.api.bean.kqgl.AttendanceMachine
;
public
interface
AttendanceMachineMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
AttendanceMachine
record
);
int
insertSelective
(
AttendanceMachine
record
);
AttendanceMachine
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
AttendanceMachine
record
);
int
updateByPrimaryKey
(
AttendanceMachine
record
);
List
<
AttendanceMachine
>
selectByPrimaryByQyid
(
Integer
qyid
);
int
updateByPrimaryByid
(
String
name
,
int
id
);
package
cn
.
timer
.
api
.
dao
.
kqgl
;
import
java.util.List
;
import
cn.timer.api.bean.kqgl.AttendanceMachine
;
public
interface
AttendanceMachineMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
AttendanceMachine
record
);
int
insertSelective
(
AttendanceMachine
record
);
AttendanceMachine
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
AttendanceMachine
record
);
int
updateByPrimaryKey
(
AttendanceMachine
record
);
List
<
AttendanceMachine
>
selectByPrimaryByQyid
(
Integer
qyid
);
int
updateByPrimaryByid
(
String
name
,
int
id
);
AttendanceMachine
selectByQyidDev
(
String
code
);
}
\ No newline at end of file
src/main/resources/mapping/kqgl/AttendanceMachineMapper.xml
View file @
7e8ed885
<?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.kqgl.AttendanceMachineMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"qyid"
property=
"qyid"
jdbcType=
"INTEGER"
/>
<result
column=
"lusj_time"
property=
"lusjTime"
jdbcType=
"BIGINT"
/>
<result
column=
"luryid"
property=
"luryid"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, name, code, qyid, lusj_time, luryid, type
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_kqj
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from kqgl_asso_kqj
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into kqgl_asso_kqj (name, code,
qyid, lusj_time, luryid,
type)
values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{qyid,jdbcType=INTEGER}, #{lusjTime,jdbcType=BIGINT}, #{luryid,jdbcType=INTEGER},
#{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into kqgl_asso_kqj
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"code != null"
>
code,
</if>
<if
test=
"qyid != null"
>
qyid,
</if>
<if
test=
"lusjTime != null"
>
lusj_time,
</if>
<if
test=
"luryid != null"
>
luryid,
</if>
<if
test=
"type != null"
>
type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"code != null"
>
#{code,jdbcType=VARCHAR},
</if>
<if
test=
"qyid != null"
>
#{qyid,jdbcType=INTEGER},
</if>
<if
test=
"lusjTime != null"
>
#{lusjTime,jdbcType=BIGINT},
</if>
<if
test=
"luryid != null"
>
#{luryid,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
update kqgl_asso_kqj
<set
>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"code != null"
>
code = #{code,jdbcType=VARCHAR},
</if>
<if
test=
"qyid != null"
>
qyid = #{qyid,jdbcType=INTEGER},
</if>
<if
test=
"lusjTime != null"
>
lusj_time = #{lusjTime,jdbcType=BIGINT},
</if>
<if
test=
"luryid != null"
>
luryid = #{luryid,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
update kqgl_asso_kqj
set name = #{name,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
qyid = #{qyid,jdbcType=INTEGER},
lusj_time = #{lusjTime,jdbcType=BIGINT},
luryid = #{luryid,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectByPrimaryByQyid"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_kqj
where qyid = #{qyid,jdbcType=INTEGER}
</select>
<update
id=
"updateByPrimaryByid"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
update kqgl_asso_kqj
set name = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<?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.kqgl.AttendanceMachineMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"qyid"
property=
"qyid"
jdbcType=
"INTEGER"
/>
<result
column=
"lusj_time"
property=
"lusjTime"
jdbcType=
"BIGINT"
/>
<result
column=
"luryid"
property=
"luryid"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, name, code, qyid, lusj_time, luryid, type
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_kqj
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from kqgl_asso_kqj
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into kqgl_asso_kqj (name, code,
qyid, lusj_time, luryid,
type)
values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{qyid,jdbcType=INTEGER}, #{lusjTime,jdbcType=BIGINT}, #{luryid,jdbcType=INTEGER},
#{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into kqgl_asso_kqj
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"code != null"
>
code,
</if>
<if
test=
"qyid != null"
>
qyid,
</if>
<if
test=
"lusjTime != null"
>
lusj_time,
</if>
<if
test=
"luryid != null"
>
luryid,
</if>
<if
test=
"type != null"
>
type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"code != null"
>
#{code,jdbcType=VARCHAR},
</if>
<if
test=
"qyid != null"
>
#{qyid,jdbcType=INTEGER},
</if>
<if
test=
"lusjTime != null"
>
#{lusjTime,jdbcType=BIGINT},
</if>
<if
test=
"luryid != null"
>
#{luryid,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
update kqgl_asso_kqj
<set
>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"code != null"
>
code = #{code,jdbcType=VARCHAR},
</if>
<if
test=
"qyid != null"
>
qyid = #{qyid,jdbcType=INTEGER},
</if>
<if
test=
"lusjTime != null"
>
lusj_time = #{lusjTime,jdbcType=BIGINT},
</if>
<if
test=
"luryid != null"
>
luryid = #{luryid,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
update kqgl_asso_kqj
set name = #{name,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
qyid = #{qyid,jdbcType=INTEGER},
lusj_time = #{lusjTime,jdbcType=BIGINT},
luryid = #{luryid,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectByPrimaryByQyid"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_kqj
where qyid = #{qyid,jdbcType=INTEGER}
</select>
<update
id=
"updateByPrimaryByid"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceMachine"
>
update kqgl_asso_kqj
set name = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectByQyidDev"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_kqj
where code = #{code,jdbcType=VARCHAR}
</select>
</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