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
bf0abf9c
Commit
bf0abf9c
authored
May 13, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!88
parents
cb98fecd
83f9450c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
234 additions
and
19 deletions
+234
-19
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
+4
-1
src/main/java/cn/timer/api/bean/kqmk/KqglAssoOvertimeRules.java
+2
-2
src/main/java/cn/timer/api/bean/kqmk/KqglAssoYhkqz.java
+50
-0
src/main/java/cn/timer/api/bean/kqmk/KqglMainKqz.java
+4
-0
src/main/java/cn/timer/api/config/Initialization/InitializeSetting.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+0
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoYhkqzMapper.java
+16
-0
src/main/java/cn/timer/api/dao/kqmk/KqglMainKqzMapper.java
+6
-0
src/main/java/cn/timer/api/dto/kqmk/AttendanceGroupDto.java
+7
-6
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
+5
-1
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
+2
-2
src/main/java/cn/timer/api/dto/kqmk/KqglMainKqzDto.java
+3
-0
src/main/resources/mapping/kqmk/KqglAssoYhkqzMapper.xml
+91
-0
src/main/resources/mapping/kqmk/KqglMainKqzMapper.xml
+43
-6
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
View file @
bf0abf9c
...
...
@@ -47,7 +47,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
private
Integer
leaveType
;
@ApiModelProperty
(
value
=
"适用范围 "
,
example
=
"0:全公司 >0:考勤组id"
)
private
String
apply
;
private
Integer
apply
;
@ApiModelProperty
(
value
=
"创建时间 创建时间"
,
example
=
"101"
)
private
Long
createTime
;
...
...
@@ -63,5 +63,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
@ApiModelProperty
(
value
=
"假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)"
,
example
=
"101"
)
private
Integer
leaveBalance
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglAssoOvertimeRules.java
View file @
bf0abf9c
...
...
@@ -40,8 +40,8 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
@ApiModelProperty
(
value
=
"规则名称 "
,
example
=
"以审批时间计算加班"
)
private
String
name
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"
1
"
)
private
String
appliedScope
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"
(0:全公司 >0:考勤组id)
"
)
private
Integer
appliedScope
;
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
private
Integer
isWorkovertime
;
...
...
src/main/java/cn/timer/api/bean/kqmk/KqglAssoYhkqz.java
0 → 100644
View file @
bf0abf9c
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-12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"kqgl_asso_yhkqz"
)
@ApiModel
(
"用户和考勤组关系表"
)
public
class
KqglAssoYhkqz
extends
Model
<
KqglAssoYhkqz
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"考勤组id 考勤组id"
,
example
=
"101"
)
private
Integer
kqzid
;
@ApiModelProperty
(
value
=
"用户id 用户id"
,
example
=
"101"
)
private
Integer
userid
;
@ApiModelProperty
(
value
=
"企业id 企业id"
,
example
=
"101"
)
private
Integer
qyid
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglMainKqz.java
View file @
bf0abf9c
...
...
@@ -93,5 +93,8 @@ public class KqglMainKqz extends Model<KqglMainKqz> {
@ApiModelProperty
(
value
=
"外勤 外勤"
,
example
=
"101"
)
private
Integer
isWq
;
@ApiModelProperty
(
value
=
"加班规则 加班规则"
,
example
=
"101"
)
private
Integer
overtimeRulesId
;
}
\ No newline at end of file
src/main/java/cn/timer/api/config/Initialization/InitializeSetting.java
View file @
bf0abf9c
...
...
@@ -19,7 +19,7 @@ public class InitializeSetting implements ApplicationRunner {
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
StaticVariable
.
mac_command
=
"http://1
92.168.3.143:8088
/cmd"
;
//考勤机执行命令
StaticVariable
.
mac_command
=
"http://1
20.24.24.239:8095
/cmd"
;
//考勤机执行命令
}
}
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
bf0abf9c
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/kqmk/KqglAssoYhkqzMapper.java
0 → 100644
View file @
bf0abf9c
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
cn.timer.api.bean.kqmk.KqglAssoYhkqz
;
/**
* 用户和考勤组关系表
*
* @author LAL 2020-05-12
*/
@Repository
public
interface
KqglAssoYhkqzMapper
extends
BaseMapper
<
KqglAssoYhkqz
>
{
}
src/main/java/cn/timer/api/dao/kqmk/KqglMainKqzMapper.java
View file @
bf0abf9c
...
...
@@ -2,11 +2,14 @@ package cn.timer.api.dao.kqmk;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
/**
...
...
@@ -20,4 +23,7 @@ public interface KqglMainKqzMapper extends BaseMapper<KqglMainKqz> {
List
<
KqglMainKqzDto
>
selectAttGroupMachineByQyid
(
int
qyid
);
KqglMainKqz
getAttendanceGroupInformationByUserid
(
int
userid
,
int
qyid
);
IPage
<
KqglMainKqzDto
>
selectPageByQueryKqglMain
(
IPage
<
KqglMainKqzDto
>
page
,
@Param
(
"param"
)
AttqueryCriteriaDto
attquerycriteriadto
);
}
src/main/java/cn/timer/api/dto/kqmk/AttendanceGroupDto.java
View file @
bf0abf9c
...
...
@@ -14,10 +14,10 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
AttendanceGroupDto
implements
Serializable
{
public
class
AttendanceGroupDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
5573272776427338217L
;
private
Integer
id
;
private
String
name
;
// 名称
private
String
kqbz
;
// 考勤备注
...
...
@@ -45,9 +45,9 @@ public class AttendanceGroupDto implements Serializable{
private
String
pbfsnm
;
// 排班方式
private
String
dkfs
;
// 打卡方式
private
Integer
isWq
;
//外勤
private
Integer
isWq
;
//
外勤
private
Integer
kqjid
;
private
List
<
AttGroupBinPunchMode
>
kqzdkfslist
=
new
ArrayList
<
AttGroupBinPunchMode
>()
;
private
List
<
AttGroupBinPunchMode
>
kqzdkfslist
;
}
\ No newline at end of file
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
View file @
bf0abf9c
...
...
@@ -28,7 +28,7 @@ public class KqglAssoLeaveRulesDto {
private
Integer
leaveType
;
@ApiModelProperty
(
value
=
"适用范围 "
,
example
=
"0:全公司 -1:考勤组id"
)
private
String
apply
;
private
Integer
apply
;
@ApiModelProperty
(
value
=
"创建时间 创建时间"
,
example
=
"101"
)
private
Long
createTime
;
...
...
@@ -47,5 +47,8 @@ public class KqglAssoLeaveRulesDto {
@ApiModelProperty
(
value
=
"适用范围集合"
,
example
=
"101"
)
private
String
[]
range
;
@ApiModelProperty
(
value
=
"适用范围名称"
,
example
=
"101"
)
private
String
[]
applyrange
;
}
\ No newline at end of file
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
View file @
bf0abf9c
...
...
@@ -20,8 +20,8 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty
(
value
=
"规则名称 "
,
example
=
"以审批时间计算加班"
)
private
String
name
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"
1
"
)
private
String
appliedScope
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"
(0:全公司 >0:考勤组id)
"
)
private
Integer
appliedScope
;
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
private
Integer
isWorkovertime
;
...
...
src/main/java/cn/timer/api/dto/kqmk/KqglMainKqzDto.java
View file @
bf0abf9c
...
...
@@ -74,6 +74,9 @@ public class KqglMainKqzDto {
@ApiModelProperty
(
value
=
"外勤 外勤"
,
example
=
"101"
)
private
Integer
isWq
;
@ApiModelProperty
(
value
=
"加班规则 加班规则"
,
example
=
"101"
)
private
Integer
overtimeRulesId
;
@ApiModelProperty
(
value
=
"考勤组人员数"
,
example
=
"100"
)
...
...
src/main/resources/mapping/kqmk/KqglAssoYhkqzMapper.xml
0 → 100644
View file @
bf0abf9c
<?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.kqmk.KqglAssoYhkqzMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqmk.KqglAssoYhkqz"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"kqzid"
property=
"kqzid"
/>
<result
column=
"userid"
property=
"userid"
/>
<result
column=
"qyid"
property=
"qyid"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
kqzid,
userid,
qyid
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id KqglAssoYhkqz_id,
kqzid KqglAssoYhkqz_kqzid,
userid KqglAssoYhkqz_userid,
qyid KqglAssoYhkqz_qyid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhkqz">
INSERT INTO kqgl_asso_yhkqz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
kqzid,
</if>
<if test ='null != userid'>
userid,
</if>
<if test ='null != qyid'>
qyid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
#{kqzid},
</if>
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != qyid'>
#{qyid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_yhkqz
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhkqz">
UPDATE kqgl_asso_yhkqz
<set>
<if test ='null != kqzid'>kqzid = #{kqzid},</if>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != qyid'>qyid = #{qyid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_yhkqz
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_yhkqz
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_yhkqz
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/kqmk/KqglMainKqzMapper.xml
View file @
bf0abf9c
...
...
@@ -24,6 +24,7 @@
<result
column=
"sybc"
property=
"sybc"
/>
<result
column=
"is_xzbcdk"
property=
"isXzbcdk"
/>
<result
column=
"is_wq"
property=
"isWq"
/>
<result
column=
"overtime_rules_id"
property=
"overtimeRulesId"
/>
</resultMap>
<resultMap
id=
"AuxiliaryMap"
type=
"cn.timer.api.dto.kqmk.KqglMainKqzDto"
>
...
...
@@ -47,6 +48,7 @@
<result
column=
"sybc"
property=
"sybc"
/>
<result
column=
"is_xzbcdk"
property=
"isXzbcdk"
/>
<result
column=
"is_wq"
property=
"isWq"
/>
<result
column=
"overtime_rules_id"
property=
"overtimeRulesId"
/>
<result
column=
"kqznum"
property=
"kqznum"
/>
<result
column=
"pbfsnm"
property=
"pbfsnm"
/>
...
...
@@ -74,7 +76,8 @@
is_wpbsdk,
sybc,
is_xzbcdk,
is_wq
is_wq,
overtime_rules_id
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
@@ -97,7 +100,8 @@
is_wpbsdk KqglMainKqz_is_wpbsdk,
sybc KqglMainKqz_sybc,
is_xzbcdk KqglMainKqz_is_xzbcdk,
is_wq KqglMainKqz_is_wq
is_wq KqglMainKqz_is_wq,
overtime_rules_id KqglMainKqz_overtime_rules_id
</sql>
<sql
id=
"Base_Column_List_a"
>
...
...
@@ -120,7 +124,8 @@
a.is_wpbsdk,
a.sybc,
a.is_xzbcdk,
a.is_wq
a.is_wq,
a.overtime_rules_id
</sql>
<select
id=
"selectAttGroupMachineByQyid"
resultMap=
"AuxiliaryMap"
>
...
...
@@ -137,6 +142,31 @@
where kqz.id = (select yhkqz.kqzid from kqgl_asso_yhkqz yhkqz
where yhkqz.userid = #{userid,jdbcType=INTEGER} and yhkqz.qyid = #{qyid,jdbcType=INTEGER})
</select>
<select
id=
"selectPageByQueryKqglMain"
resultMap=
"AuxiliaryMap"
>
select kqz.*,
case kqz.pbfs
WHEN '1' then '固定排班'
WHEN '2' then '排班制'
else '自由工时'
end as pbfsnm,
znm.kqznum,
dkfs.type
from kqgl_main_kqz kqz
LEFT JOIN (select count(yhkqz.kqzid) as kqznum,
yhkqz.kqzid as kqzid
from kqgl_asso_yhkqz yhkqz
where yhkqz.qyid = #{param.orgCode}
GROUP BY yhkqz.kqzid) as znm on znm.kqzid = kqz.id
LEFT JOIN (select kqzdkfs.kqz_id as kqzId,kqzdkfs.type as type from kqgl_asso_kqzdkfs kqzdkfs
where kqzdkfs.qyid = #{param.orgCode} ) as dkfs on dkfs.kqzId = kqz.id
where 1=1
and kqz.qyid = #{param.orgCode}
<if
test=
"param.query != null and param.query != ''"
>
and kqz.`name` like CONCAT('%',#{param.query},'%')
</if>
</select>
<!--
...
...
@@ -198,7 +228,10 @@
is_xzbcdk,
</if>
<if test ='null != isWq'>
is_wq
is_wq,
</if>
<if test ='null != overtimeRulesId'>
overtime_rules_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
...
@@ -257,7 +290,10 @@
#{isXzbcdk},
</if>
<if test ='null != isWq'>
#{isWq}
#{isWq},
</if>
<if test ='null != overtimeRulesId'>
#{overtimeRulesId}
</if>
</trim>
</insert>
...
...
@@ -288,7 +324,8 @@
<if test ='null != isWpbsdk'>is_wpbsdk = #{isWpbsdk},</if>
<if test ='null != sybc'>sybc = #{sybc},</if>
<if test ='null != isXzbcdk'>is_xzbcdk = #{isXzbcdk},</if>
<if test ='null != isWq'>is_wq = #{isWq}</if>
<if test ='null != isWq'>is_wq = #{isWq},</if>
<if test ='null != overtimeRulesId'>overtime_rules_id = #{overtimeRulesId}</if>
</set>
WHERE id = #{id}
</update>
...
...
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