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
056481b0
Commit
056481b0
authored
May 15, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!94
parents
880e4767
a33eb194
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
280 additions
and
19 deletions
+280
-19
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
+2
-0
src/main/java/cn/timer/api/bean/kqgl/AttendanceGroup.java
+1
-0
src/main/java/cn/timer/api/bean/kqmk/KqglAssoMonthPunchSummary.java
+233
-0
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+1
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+14
-17
src/main/java/cn/timer/api/dao/kqmk/KqglAssoMonthPunchSummaryMapper.java
+16
-0
src/main/resources/mapping/kqgl/AttendanceGroupMapper.xml
+13
-2
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+0
-0
No files found.
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
View file @
056481b0
...
...
@@ -49,5 +49,7 @@ public class AttendanceAssistant implements Serializable{
String
attgroupid
;
int
overtimeRulesId
;
//加班id
int
fieldpersonnel
;
//外勤
}
src/main/java/cn/timer/api/bean/kqgl/AttendanceGroup.java
View file @
056481b0
...
...
@@ -43,6 +43,7 @@ public class AttendanceGroup implements Serializable{
private
String
dkfs
;
// 打卡方式
private
Integer
isWq
;
//外勤
private
Integer
overtimeRulesId
;
private
Integer
kqjid
;
...
...
src/main/java/cn/timer/api/bean/kqmk/KqglAssoMonthPunchSummary.java
0 → 100644
View file @
056481b0
package
cn
.
timer
.
api
.
bean
.
kqmk
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
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
;
/**
* @author lal 2020-05-15
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"kqgl_asso_month_punch_summary"
)
@ApiModel
(
"打卡月汇总"
)
public
class
KqglAssoMonthPunchSummary
extends
Model
<
KqglAssoMonthPunchSummary
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"姓名 "
,
example
=
"姓名"
)
private
String
name
;
@ApiModelProperty
(
value
=
"工号 工号"
,
example
=
"101"
)
private
Integer
num
;
@ApiModelProperty
(
value
=
"部门 "
,
example
=
"部门"
)
private
String
dept
;
@ApiModelProperty
(
value
=
"职位 "
,
example
=
"职位"
)
private
String
post
;
@ApiModelProperty
(
value
=
"考勤组id 考勤组id"
,
example
=
"101"
)
private
Integer
attGroup
;
@ApiModelProperty
(
value
=
"班次id 班次id"
,
example
=
"101"
)
private
Integer
shift
;
@ApiModelProperty
(
value
=
"应出勤天数 "
,
example
=
"应出勤天数"
)
private
Double
daysOnDuty
;
@ApiModelProperty
(
value
=
"实际出勤天数 "
,
example
=
"实际出勤天数"
)
private
Double
actualAttDays
;
@ApiModelProperty
(
value
=
"休息天数 "
,
example
=
"休息天数"
)
private
Double
daysOff
;
@ApiModelProperty
(
value
=
"工作时长(分钟) "
,
example
=
"工作时长(分钟)"
)
private
Double
workingHours
;
@ApiModelProperty
(
value
=
"迟到次数 "
,
example
=
"迟到次数"
)
private
Double
lateTimes
;
@ApiModelProperty
(
value
=
"迟到时长(分钟) "
,
example
=
"迟到时长(分钟)"
)
private
Double
lateHours
;
@ApiModelProperty
(
value
=
"严重迟到次数 "
,
example
=
"严重迟到次数"
)
private
Double
seriousLateTimes
;
@ApiModelProperty
(
value
=
"严重迟到时长(分钟) "
,
example
=
"严重迟到时长(分钟)"
)
private
Double
seriousLateHours
;
@ApiModelProperty
(
value
=
"旷工迟到次数 "
,
example
=
"旷工迟到次数"
)
private
Double
absenLateTimes
;
@ApiModelProperty
(
value
=
"早退次数 "
,
example
=
"早退次数"
)
private
Double
earlyLeaveTimes
;
@ApiModelProperty
(
value
=
"早退时长(分钟) "
,
example
=
"早退时长(分钟)"
)
private
Double
lengthEarlyLeave
;
@ApiModelProperty
(
value
=
"上班缺卡次数 "
,
example
=
"上班缺卡次数"
)
private
Double
numberWorkCardShortage
;
@ApiModelProperty
(
value
=
"下班缺卡次数 "
,
example
=
"下班缺卡次数"
)
private
Double
numberDutyCardShortage
;
@ApiModelProperty
(
value
=
"旷工天数 "
,
example
=
"旷工天数"
)
private
Double
absenteeismDays
;
@ApiModelProperty
(
value
=
"出差时长 "
,
example
=
"出差时长"
)
private
Double
lengthBusinessTrip
;
@ApiModelProperty
(
value
=
"外出时长 "
,
example
=
"外出时长"
)
private
Double
timeOut
;
@ApiModelProperty
(
value
=
"加班总时长 "
,
example
=
"加班总时长"
)
private
Double
totalOvertimeHours
;
@ApiModelProperty
(
value
=
"工作日(转调休) "
,
example
=
"工作日(转调休)"
)
private
Double
workingTurnCompenLeave
;
@ApiModelProperty
(
value
=
"休息日(转调休) "
,
example
=
"休息日(转调休)"
)
private
Double
restTurnCompenLeave
;
@ApiModelProperty
(
value
=
"节假日(转调休) "
,
example
=
"节假日(转调休)"
)
private
Double
holidayTurnCompenLeave
;
@ApiModelProperty
(
value
=
"工作日(转加班费) "
,
example
=
"工作日(转加班费)"
)
private
Double
workingTransferOvertime
;
@ApiModelProperty
(
value
=
"休息日(转加班费) "
,
example
=
"休息日(转加班费)"
)
private
Double
restTransferOvertime
;
@ApiModelProperty
(
value
=
"节假日(转加班费) "
,
example
=
"节假日(转加班费)"
)
private
Double
holidayTransferOvertime
;
@ApiModelProperty
(
value
=
"day1 "
,
example
=
"day1"
)
private
String
day1
;
@ApiModelProperty
(
value
=
"day2 "
,
example
=
"day2"
)
private
String
day2
;
@ApiModelProperty
(
value
=
"day3 "
,
example
=
"day3"
)
private
String
day3
;
@ApiModelProperty
(
value
=
"day4 "
,
example
=
"day4"
)
private
String
day4
;
@ApiModelProperty
(
value
=
"day5 "
,
example
=
"day5"
)
private
String
day5
;
@ApiModelProperty
(
value
=
"day6 "
,
example
=
"day6"
)
private
String
day6
;
@ApiModelProperty
(
value
=
"day7 "
,
example
=
"day7"
)
private
String
day7
;
@ApiModelProperty
(
value
=
"day8 "
,
example
=
"day8"
)
private
String
day8
;
@ApiModelProperty
(
value
=
"day9 "
,
example
=
"day9"
)
private
String
day9
;
@ApiModelProperty
(
value
=
"day10 "
,
example
=
"day10"
)
private
String
day10
;
@ApiModelProperty
(
value
=
"day11 "
,
example
=
"day11"
)
private
String
day11
;
@ApiModelProperty
(
value
=
"day12 "
,
example
=
"day12"
)
private
String
day12
;
@ApiModelProperty
(
value
=
"day13 "
,
example
=
"day13"
)
private
String
day13
;
@ApiModelProperty
(
value
=
"day14 "
,
example
=
"day14"
)
private
String
day14
;
@ApiModelProperty
(
value
=
"day15 "
,
example
=
"day15"
)
private
String
day15
;
@ApiModelProperty
(
value
=
"day16 "
,
example
=
"day16"
)
private
String
day16
;
@ApiModelProperty
(
value
=
"day17 "
,
example
=
"day17"
)
private
String
day17
;
@ApiModelProperty
(
value
=
"day18 "
,
example
=
"day18"
)
private
String
day18
;
@ApiModelProperty
(
value
=
"day19 "
,
example
=
"day19"
)
private
String
day19
;
@ApiModelProperty
(
value
=
"day20 "
,
example
=
"day20"
)
private
String
day20
;
@ApiModelProperty
(
value
=
"day21 "
,
example
=
"day21"
)
private
String
day21
;
@ApiModelProperty
(
value
=
"day22 "
,
example
=
"day22"
)
private
String
day22
;
@ApiModelProperty
(
value
=
"day23 "
,
example
=
"day23"
)
private
String
day23
;
@ApiModelProperty
(
value
=
"day24 "
,
example
=
"day24"
)
private
String
day24
;
@ApiModelProperty
(
value
=
"day25 "
,
example
=
"day25"
)
private
String
day25
;
@ApiModelProperty
(
value
=
"day26 "
,
example
=
"day26"
)
private
String
day26
;
@ApiModelProperty
(
value
=
"day27 "
,
example
=
"day27"
)
private
String
day27
;
@ApiModelProperty
(
value
=
"day28 "
,
example
=
"day28"
)
private
String
day28
;
@ApiModelProperty
(
value
=
"day29 "
,
example
=
"day29"
)
private
String
day29
;
@ApiModelProperty
(
value
=
"day30 "
,
example
=
"day30"
)
private
String
day30
;
@ApiModelProperty
(
value
=
"day31 "
,
example
=
"day31"
)
private
String
day31
;
@ApiModelProperty
(
value
=
"年 年"
,
example
=
"101"
)
private
Integer
belongYear
;
@ApiModelProperty
(
value
=
"月 月"
,
example
=
"101"
)
private
Integer
belongMonth
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"最后修改时间 最后修改时间"
,
example
=
"101"
)
private
Integer
lastModified
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
056481b0
...
...
@@ -1437,6 +1437,7 @@ public class AttController {
attgro
.
setZcgzsc
(
attass
.
getNormalWorkTime
());
//正常工作时长(自由工时专用)
attgro
.
setJbzdsc
(
attass
.
getMaxOvertimeTime
());
//加班最大时长(自由工时专用)
}
attgro
.
setOvertimeRulesId
(
attass
.
getOvertimeRulesId
());
//加班规则ID
attendancegroupservice
.
updateByPrimaryKeySelective
(
attgro
);
/*********/
...
...
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
056481b0
...
...
@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.json.JSONObject
;
...
...
@@ -25,6 +24,7 @@ import cn.timer.api.bean.kqmk.KqglAssoDkjl;
import
cn.timer.api.bean.kqmk.KqglAssoDkmx
;
import
cn.timer.api.bean.kqmk.KqglAssoKqj
;
import
cn.timer.api.bean.kqmk.KqglAssoKqzdkfs
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
import
cn.timer.api.bean.kqmk.KqglAssoTeshu
;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
...
...
@@ -32,7 +32,6 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dto.kqmk.AttLateLate
;
import
cn.timer.api.dto.kqmk.AttSchedule
;
import
cn.timer.api.dto.kqmk.AttendanceCardListDto
;
...
...
@@ -49,10 +48,8 @@ import io.swagger.annotations.ApiOperation;
@Transactional
@RequestMapping
(
value
=
"/kqdk"
,
produces
=
{
"application/json"
,
"multipart/form-data"
})
public
class
ClockInController
{
@Autowired
private
KqglMainKqzMapper
kqglmainkqzmapper
;
/**
* 考勤打卡
*
...
...
@@ -65,24 +62,18 @@ public class ClockInController {
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
punchclock
(
@RequestParam
String
json
)
throws
Exception
{
JSONObject
jsonArray
=
new
JSONObject
(
json
);
String
asDevId
=
jsonArray
.
get
(
"dev_id"
).
toString
();
String
asUserId
=
jsonArray
.
get
(
"user_id"
).
toString
();
String
asVerifyMode
=
jsonArray
.
get
(
"verify_mode"
).
toString
();
String
asIOMode
=
"0"
;
String
sStdIoTime
=
jsonArray
.
get
(
"io_time"
).
toString
();
String
asDevId
=
jsonArray
.
get
(
"dev_id"
).
toString
();
//考勤机编码
String
asUserId
=
jsonArray
.
get
(
"user_id"
).
toString
();
//打卡用户id
String
asVerifyMode
=
jsonArray
.
get
(
"verify_mode"
).
toString
();
//考勤机打卡方式(1:指纹;20:人脸;40:掌纹;60:密码(猜的^v^))
String
sStdIoTime
=
jsonArray
.
get
(
"io_time"
).
toString
();
//打卡时间
KqglAssoKqj
kqjdev
=
KqglAssoKqj
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoKqj
>().
lambda
().
eq
(
KqglAssoKqj:
:
getCode
,
asDevId
));
if
(
kqjdev
==
null
)
return
ResultUtil
.
error
(
"考勤机不存在!"
);
// YgglMainEmp user = new LambdaQueryChainWrapper<YgglMainEmp>(ygglmainempmapper).eq(YgglMainEmp::getEmpNum, asUserId).eq(YgglMainEmp::getOrgCode, kqjdev.getQyid()).one();
YgglMainEmp
user
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
asUserId
).
eq
(
YgglMainEmp:
:
getOrgCode
,
kqjdev
.
getQyid
()));
if
(
user
!=
null
)
{
int
qyid
=
user
.
getOrgCode
();
//坏小孩【企业id】
int
userid
=
user
.
getEmpNum
();
//用户id
int
qyid
=
user
.
getOrgCode
();
int
userid
=
user
.
getEmpNum
();
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userid
,
qyid
);
//考勤组信息
//pbfs;// 排班方式 1:固定排班;2:自由排班;3:自由工时
if
(
attgro
!=
null
)
{
...
...
@@ -248,6 +239,12 @@ public class ClockInController {
KqglAssoDkmx
.
builder
().
id
(
dkmc
.
getId
()).
build
().
updateById
();
}
}
//具体打卡时间入汇总表(打卡成功才会录入汇总表)
KqglAssoMonthPunchSummary
summary
=
KqglAssoMonthPunchSummary
.
builder
().
build
();
}
else
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
}
//原始打卡记录数据录入**************************************************************************************************************************************
...
...
@@ -282,7 +279,7 @@ public class ClockInController {
long
attime
;
if
(
punchcardtime
==
0
&&
!
isRange
){
attime
=
new
Date
().
getTime
();}
else
{
attime
=
punchcardtime
;}
// 考勤时间(应打卡时间)
String
remarks
=
""
;
if
((
"1"
).
equals
(
asVerifyMode
))
{
remarks
=
"考勤机指纹打卡"
;}
else
if
((
"20"
).
equals
(
asVerifyMode
))
{
remarks
=
"考勤机人脸打卡"
;}
if
((
"1"
).
equals
(
asVerifyMode
))
{
remarks
=
"考勤机指纹打卡"
;}
else
if
((
"20"
).
equals
(
asVerifyMode
))
{
remarks
=
"考勤机人脸打卡"
;}
else
if
((
"40"
).
equals
(
asVerifyMode
))
{
remarks
=
"考勤机掌纹打卡"
;}
else
if
((
"60"
).
equals
(
asVerifyMode
))
{
remarks
=
"考勤机密码打卡"
;}
//cardtype--1:GPS,2:WIFI,3:考勤机
KqglAssoDkjl
pre
=
KqglAssoDkjl
.
builder
().
dktime
(
time_
).
results
(
results
).
userId
(
userid
).
type
(
type
).
status
(
status
).
sort
(
atttype
)
.
cardType
(
3
).
qyid
(
qyid
).
attdate
(
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
putime
)).
attime
(
attime
).
dkmxid
(
dkmx
).
bcid
(
clockt
.
getShifid
()).
remarks
(
remarks
).
punchmode
(
Integer
.
valueOf
(
asVerifyMode
))
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoMonthPunchSummaryMapper.java
0 → 100644
View file @
056481b0
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
/**
* 打卡月汇总
*
* @author Tang 2020-05-15
*/
@Repository
public
interface
KqglAssoMonthPunchSummaryMapper
extends
BaseMapper
<
KqglAssoMonthPunchSummary
>
{
}
src/main/resources/mapping/kqgl/AttendanceGroupMapper.xml
View file @
056481b0
...
...
@@ -29,6 +29,7 @@
<result
column=
"dkfs"
property=
"dkfs"
jdbcType=
"VARCHAR"
/>
<result
column=
"kqjid"
property=
"kqjid"
jdbcType=
"INTEGER"
/>
<result
column=
"is_wq"
property=
"isWq"
jdbcType=
"INTEGER"
/>
<result
column=
"overtime_rules_id"
property=
"overtimeRulesId"
/>
<collection
property=
"kqzdkfslist"
ofType=
"cn.timer.api.bean.kqgl.AttGroupBinPunchMode"
>
<result
column=
"kqzId"
property=
"kqzId"
jdbcType=
"INTEGER"
/>
...
...
@@ -92,7 +93,7 @@
<sql
id=
"Base_Column_List"
>
id, name, kqbz, pbfs, qyid, is_fdjjr, kqkssj_time, zsgzsc, zcgzsc, jbzdsc, is_dqtx,
txry, txfs, txxhts, txsj_time, tsfs, is_wpbsdk,sybc,is_xzbcdk,is_wq
txry, txfs, txxhts, txsj_time, tsfs, is_wpbsdk,sybc,is_xzbcdk,is_wq
,overtime_rules_id
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
...
...
@@ -180,6 +181,9 @@
<if
test=
"isWq != null"
>
is_wq,
</if>
<if
test=
"overtimeRulesId != null"
>
overtime_rules_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -240,6 +244,9 @@
<if
test=
"isWq != null"
>
#{isWq,jdbcType=INTEGER},
</if>
<if
test=
"overtimeRulesId != null"
>
#{overtimeRulesId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"cn.timer.api.bean.kqgl.AttendanceGroup"
>
...
...
@@ -302,6 +309,9 @@
<if
test=
"isWq != null"
>
is_wq = #{isWq,jdbcType=INTEGER},
</if>
<if
test=
"overtimeRulesId != null"
>
overtime_rules_id = #{overtimeRulesId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
...
...
@@ -325,7 +335,8 @@
is_wpbsdk = #{isWpbsdk,jdbcType=INTEGER},
sybc = #{sybc,jdbcType=VARCHAR},
is_xzbcdk = #{isXzbcdk,jdbcType=INTEGER},
is_wq = #{isWq,jdbcType=INTEGER}
is_wq = #{isWq,jdbcType=INTEGER},
overtime_rules_id = #{overtimeRulesId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
...
...
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
0 → 100644
View file @
056481b0
This diff is collapsed.
Click to expand it.
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