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
36d9da75
Commit
36d9da75
authored
May 09, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
4f3fc3bf
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
318 additions
and
28 deletions
+318
-28
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveBalance.java
+68
-0
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
+4
-0
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+55
-18
src/main/java/cn/timer/api/dao/kqmk/KqglAssoLeaveBalanceMapper.java
+16
-0
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
+3
-2
src/main/resources/mapping/kqmk/KqglAssOvertimeViceMapper.xml
+1
-1
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+151
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveRulesMapper.xml
+19
-6
src/main/resources/mapping/kqmk/KqglAssoRulesViceMapper.xml
+1
-1
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveBalance.java
0 → 100644
View file @
36d9da75
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-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"kqgl_asso_leave_balance"
)
@ApiModel
(
"员工假期余额"
)
public
class
KqglAssoLeaveBalance
extends
Model
<
KqglAssoLeaveBalance
>
{
/**
*
*/
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
leaveRulesId
;
@ApiModelProperty
(
value
=
"员工id 员工id"
,
example
=
"101"
)
private
Integer
userid
;
@ApiModelProperty
(
value
=
"修改动作 1:增加;2:减少"
,
example
=
"101"
)
private
Integer
modifyAction
;
@ApiModelProperty
(
value
=
"余额天数 "
,
example
=
"余额天数"
)
private
String
balanceDays
;
@ApiModelProperty
(
value
=
"理由 "
,
example
=
"理由"
)
private
String
reason
;
@ApiModelProperty
(
value
=
"修改人 修改人"
,
example
=
"101"
)
private
Integer
modifyUserid
;
@ApiModelProperty
(
value
=
"修改时间 修改时间"
,
example
=
"101"
)
private
Long
modifyTimer
;
@ApiModelProperty
(
value
=
"修改序号 修改序号"
,
example
=
"101"
)
private
Integer
modifyNumber
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
View file @
36d9da75
...
@@ -61,4 +61,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
...
@@ -61,4 +61,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
@ApiModelProperty
(
value
=
"是否开启 0:否;1:是"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"是否开启 0:否;1:是"
,
example
=
"101"
)
private
Integer
isOpen
;
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)"
,
example
=
"101"
)
private
Integer
leaveBalance
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
36d9da75
...
@@ -23,13 +23,12 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...
@@ -23,13 +23,12 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.lang.Console
;
import
cn.timer.api.bean.kqgl.AttendanceGroup
;
import
cn.timer.api.bean.kqgl.PunchCardWiFi
;
import
cn.timer.api.bean.kqmk.KqglAssOvertimeVice
;
import
cn.timer.api.bean.kqmk.KqglAssOvertimeVice
;
import
cn.timer.api.bean.kqmk.KqglAssoBcsz
;
import
cn.timer.api.bean.kqmk.KqglAssoBcsz
;
import
cn.timer.api.bean.kqmk.KqglAssoDkdz
;
import
cn.timer.api.bean.kqmk.KqglAssoDkdz
;
import
cn.timer.api.bean.kqmk.KqglAssoDkwx
;
import
cn.timer.api.bean.kqmk.KqglAssoDkwx
;
import
cn.timer.api.bean.kqmk.KqglAssoKqj
;
import
cn.timer.api.bean.kqmk.KqglAssoKqj
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRules
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRules
;
...
@@ -41,6 +40,7 @@ import cn.timer.api.dao.kqmk.KqglAssoBcszMapper;
...
@@ -41,6 +40,7 @@ import cn.timer.api.dao.kqmk.KqglAssoBcszMapper;
import
cn.timer.api.dao.kqmk.KqglAssoDkdzMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoDkdzMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoDkwxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoDkwxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoKqjMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoKqjMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRulesViceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRulesViceMapper
;
...
@@ -255,20 +255,23 @@ public class TimeCardController {
...
@@ -255,20 +255,23 @@ public class TimeCardController {
List
<
KqglAssoLeaveRules
>
ruless
=
new
LambdaQueryChainWrapper
<
KqglAssoLeaveRules
>(
kqglassoleaverulesmapper
).
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
0
).
list
();
List
<
KqglAssoLeaveRules
>
ruless
=
new
LambdaQueryChainWrapper
<
KqglAssoLeaveRules
>(
kqglassoleaverulesmapper
).
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
0
).
list
();
//查询当前公司是否已初始化
//查询当前公司是否已初始化
KqglAssoLeaveRules
rule
=
kqglassoleaverulesmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
userBean
.
getOrgCode
())
KqglAssoLeaveRules
rule
=
kqglassoleaverulesmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
KqglAssoLeaveRules:
:
getLeaveType
,
1
));
.
eq
(
KqglAssoLeaveRules:
:
getLeaveType
,
1
)
.
last
(
"LIMIT 1"
)
);
if
(
rule
==
null
)
{
if
(
rule
==
null
)
{
List
<
KqglAssoLeaveRules
>
rullist
=
new
ArrayList
<
KqglAssoLeaveRules
>();
List
<
KqglAssoLeaveRules
>
rullist
=
new
ArrayList
<
KqglAssoLeaveRules
>();
for
(
KqglAssoLeaveRules
rul
:
ruless
){
for
(
KqglAssoLeaveRules
rul
:
ruless
){
KqglAssoLeaveRules
vice
=
KqglAssoLeaveRules
.
builder
().
name
(
rul
.
getName
()).
company
(
rul
.
getCompany
()).
leaveType
(
rul
.
getLeaveType
())
KqglAssoLeaveRules
vice
=
KqglAssoLeaveRules
.
builder
().
name
(
rul
.
getName
()).
company
(
rul
.
getCompany
()).
leaveType
(
rul
.
getLeaveType
())
.
apply
(
rul
.
getApply
()).
createTime
(
new
Date
().
getTime
()).
createUserid
(
userBean
.
getEmpNum
()).
orgCode
(
userBean
.
getOrgCode
())
.
apply
(
rul
.
getApply
()).
createTime
(
new
Date
().
getTime
()).
createUserid
(
userBean
.
getEmpNum
()).
orgCode
(
userBean
.
getOrgCode
())
.
isOpen
(
rul
.
getIsOpen
()).
build
();
.
isOpen
(
rul
.
getIsOpen
()).
leaveBalance
(
rul
.
getLeaveBalance
()).
build
();
rullist
.
add
(
vice
);
rullist
.
add
(
vice
);
}
}
if
(
rullist
.
size
()
>
0
)
{
if
(
rullist
.
size
()
>
0
)
{
kqglassoleaverulesmapper
.
insertleaverulesList
(
rullist
);
kqglassoleaverulesmapper
.
insertleaverulesList
(
rullist
);
}
}
}
return
ResultUtil
.
success
(
"操作成功!"
);
return
ResultUtil
.
success
(
"操作成功!"
);
}
else
{
return
ResultUtil
.
success
(
"重复初始化数据!"
);
}
}
}
@Autowired
@Autowired
...
@@ -293,6 +296,11 @@ public class TimeCardController {
...
@@ -293,6 +296,11 @@ public class TimeCardController {
Integer
id
=
learul
.
getId
();
Integer
id
=
learul
.
getId
();
Console
.
log
(
"新增/修改--假期规则id: "
+
id
);
Console
.
log
(
"新增/修改--假期规则id: "
+
id
);
if
(
leaverules
.
getLeaveBalance
()
==
0
)
{
//假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)
KqglAssoLeaveBalance
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getLeaveRulesId
,
id
)
.
eq
(
KqglAssoLeaveBalance
::
getOrgCode
,
userBean
.
getOrgCode
()));
}
List
<
KqglAssoRulesVice
>
vices
=
new
ArrayList
<
KqglAssoRulesVice
>();
List
<
KqglAssoRulesVice
>
vices
=
new
ArrayList
<
KqglAssoRulesVice
>();
String
[]
rest
=
leaverules
.
getRange
();
String
[]
rest
=
leaverules
.
getRange
();
if
(
rest
!=
null
&&
rest
.
length
>
0
){
if
(
rest
!=
null
&&
rest
.
length
>
0
){
...
@@ -547,30 +555,59 @@ public class TimeCardController {
...
@@ -547,30 +555,59 @@ public class TimeCardController {
// return ResultUtil.data(attwifiownlist);
// return ResultUtil.data(attwifiownlist);
// }
// }
@Autowired
private
KqglAssoLeaveBalanceMapper
kqglassoleavebalancemapper
;
/**
* 新增/修改--员工假期余额
*/
@PostMapping
(
value
=
"/Leave_balance"
)
@ApiOperation
(
value
=
"28:新增/修改--员工假期余额"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
28
)
public
Result
<
Object
>
LeaveBalance
(
@CurrentUser
UserBean
userBean
,
@RequestBody
KqglAssoLeaveBalance
balance
)
{
balance
.
setModifyUserid
(
userBean
.
getEmpNum
());
balance
.
setModifyTimer
(
new
Date
().
getTime
());
balance
.
setOrgCode
(
userBean
.
getOrgCode
());
KqglAssoLeaveBalance
balan
=
kqglassoleavebalancemapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getUserid
,
balance
.
getUserid
())
.
orderByDesc
(
KqglAssoLeaveBalance
::
getModifyNumber
).
last
(
"LIMIT 1"
));
if
(
balan
!=
null
)
{
balance
.
setModifyNumber
(
balan
.
getModifyNumber
()+
1
);
}
else
{
balance
.
setModifyNumber
(
1
);
}
return
balance
.
insert
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
}
/**
* 根据 组织机构代码获取员工假期余额表头
*/
@GetMapping
(
value
=
"/balance_header"
)
@ApiOperation
(
value
=
"29:根据 组织机构代码获取员工假期余额表头"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
29
)
public
Result
<
Object
>
BalanceHeader
(
@CurrentUser
UserBean
userBean
)
{
List
<
KqglAssoLeaveRules
>
balheas
=
new
LambdaQueryChainWrapper
<
KqglAssoLeaveRules
>(
kqglassoleaverulesmapper
).
eq
(
KqglAssoLeaveRules
::
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
KqglAssoLeaveRules
::
getLeaveType
,
2
).
or
().
eq
(
KqglAssoLeaveRules
::
getIsOpen
,
1
).
list
();
return
ResultUtil
.
data
(
balheas
,
"操作成功!"
);
}
/**********************************************测试数据********************************************************/
/**
/**
* 查询列表-假期规则
* 查询列表-假期规则
*/
*/
@GetMapping
(
value
=
"/list_leave_rules"
)
@GetMapping
(
value
=
"/list_leave_rules"
)
@ApiOperation
(
value
=
"111: 查询列表-假期规则"
,
httpMethod
=
"GET"
,
notes
=
" 查询列表-假期规则"
)
@ApiOperation
(
value
=
"111: 查询列表-假期规则"
,
httpMethod
=
"GET"
,
notes
=
" 查询列表-假期规则"
)
public
Result
<
Object
>
selectListLeaveRules
()
{
@ApiOperationSupport
(
order
=
111
)
public
Result
<
Object
>
selectListLeaveRules
(
@CurrentUser
UserBean
userBean
)
{
List
<
KqglAssoLeaveRules
>
balheas
=
new
LambdaQueryChainWrapper
<
KqglAssoLeaveRules
>(
kqglassoleaverulesmapper
).
eq
(
KqglAssoLeaveRules
::
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
KqglAssoLeaveRules
::
getLeaveType
,
2
).
or
().
eq
(
KqglAssoLeaveRules
::
getIsOpen
,
1
).
list
();
List
<
LeaveTypeDto
>
leas
=
new
ArrayList
<
LeaveTypeDto
>();
List
<
LeaveTypeDto
>
leas
=
new
ArrayList
<
LeaveTypeDto
>();
for
(
KqglAssoLeaveRules
rul
:
balheas
)
{
LeaveTypeDto
lea
=
LeaveTypeDto
.
builder
().
build
();
LeaveTypeDto
lea
=
LeaveTypeDto
.
builder
().
build
();
lea
.
setId
(
1
);
lea
.
setId
(
rul
.
getId
()
);
lea
.
setValue
(
"事假"
);
lea
.
setValue
(
rul
.
getName
()
);
leas
.
add
(
lea
);
leas
.
add
(
lea
);
LeaveTypeDto
lea2
=
LeaveTypeDto
.
builder
().
build
();
}
lea2
.
setId
(
2
);
lea2
.
setValue
(
"调休"
);
leas
.
add
(
lea2
);
LeaveTypeDto
lea3
=
LeaveTypeDto
.
builder
().
build
();
lea3
.
setId
(
3
);
lea3
.
setValue
(
"病假"
);
leas
.
add
(
lea3
);
return
ResultUtil
.
data
(
leas
,
"操作成功!"
);
return
ResultUtil
.
data
(
leas
,
"操作成功!"
);
}
}
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoLeaveBalanceMapper.java
0 → 100644
View file @
36d9da75
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
/**
* 员工假期余额
*
* @author LAL 2020-05-09
*/
@Repository
public
interface
KqglAssoLeaveBalanceMapper
extends
BaseMapper
<
KqglAssoLeaveBalance
>
{
}
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
View file @
36d9da75
package
cn
.
timer
.
api
.
dto
.
kqmk
;
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -16,7 +15,6 @@ import lombok.NoArgsConstructor;
...
@@ -16,7 +15,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@AllArgsConstructor
public
class
KqglAssoLeaveRulesDto
{
public
class
KqglAssoLeaveRulesDto
{
@ApiModelProperty
(
value
=
"假期规则编号 假期规则编号"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"假期规则编号 假期规则编号"
,
example
=
"101"
)
private
Integer
id
;
private
Integer
id
;
...
@@ -44,6 +42,9 @@ public class KqglAssoLeaveRulesDto {
...
@@ -44,6 +42,9 @@ public class KqglAssoLeaveRulesDto {
@ApiModelProperty
(
value
=
"是否开启 0:否;1:是"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"是否开启 0:否;1:是"
,
example
=
"1"
)
private
Integer
isOpen
;
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)"
,
example
=
"101"
)
private
Integer
leaveBalance
;
@ApiModelProperty
(
value
=
"适用范围集合"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"适用范围集合"
,
example
=
"101"
)
private
String
[]
range
;
private
String
[]
range
;
...
...
src/main/resources/mapping/kqmk/KqglAssOvertimeViceMapper.xml
View file @
36d9da75
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#{item.breakEndTime,jdbcType=VARCHAR},
#{item.breakEndTime,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"item.overType != null"
>
<if
test=
"item.overType != null"
>
#{item.overType,jdbcType=INTEGER}
,
#{item.overType,jdbcType=INTEGER}
</if>
</if>
)
)
</foreach>
</foreach>
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
0 → 100644
View file @
36d9da75
<?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.KqglAssoLeaveBalanceMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqmk.KqglAssoLeaveBalance"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"leave_rules_id"
property=
"leaveRulesId"
/>
<result
column=
"userid"
property=
"userid"
/>
<result
column=
"modify_action"
property=
"modifyAction"
/>
<result
column=
"balance_days"
property=
"balanceDays"
/>
<result
column=
"reason"
property=
"reason"
/>
<result
column=
"modify_userid"
property=
"modifyUserid"
/>
<result
column=
"modify_timer"
property=
"modifyTimer"
/>
<result
column=
"modify_number"
property=
"modifyNumber"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
leave_rules_id,
userid,
modify_action,
balance_days,
reason,
modify_userid,
modify_timer,
modify_number,
org_code
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id KqglAssoLeaveBalance_id,
leave_rules_id KqglAssoLeaveBalance_leave_rules_id,
userid KqglAssoLeaveBalance_userid,
modify_action KqglAssoLeaveBalance_modify_action,
balance_days KqglAssoLeaveBalance_balance_days,
reason KqglAssoLeaveBalance_reason,
modify_userid KqglAssoLeaveBalance_modify_userid,
modify_timer KqglAssoLeaveBalance_modify_timer,
modify_number KqglAssoLeaveBalance_modify_number,
org_code KqglAssoLeaveBalance_org_code
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveBalance">
INSERT INTO kqgl_asso_leave_balance
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != leaveRulesId'>
leave_rules_id,
</if>
<if test ='null != userid'>
userid,
</if>
<if test ='null != modifyAction'>
modify_action,
</if>
<if test ='null != balanceDays'>
balance_days,
</if>
<if test ='null != reason'>
reason,
</if>
<if test ='null != modifyUserid'>
modify_userid,
</if>
<if test ='null != modifyTimer'>
modify_timer,
</if>
<if test ='null != modifyNumber'>
modify_number,
</if>
<if test ='null != orgCode'>
org_code
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != leaveRulesId'>
#{leaveRulesId},
</if>
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != modifyAction'>
#{modifyAction},
</if>
<if test ='null != balanceDays'>
#{balanceDays},
</if>
<if test ='null != reason'>
#{reason},
</if>
<if test ='null != modifyUserid'>
#{modifyUserid},
</if>
<if test ='null != modifyTimer'>
#{modifyTimer},
</if>
<if test ='null != modifyNumber'>
#{modifyNumber},
</if>
<if test ='null != orgCode'>
#{orgCode}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_leave_balance
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveBalance">
UPDATE kqgl_asso_leave_balance
<set>
<if test ='null != leaveRulesId'>leave_rules_id = #{leaveRulesId},</if>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != modifyAction'>modify_action = #{modifyAction},</if>
<if test ='null != balanceDays'>balance_days = #{balanceDays},</if>
<if test ='null != reason'>reason = #{reason},</if>
<if test ='null != modifyUserid'>modify_userid = #{modifyUserid},</if>
<if test ='null != modifyTimer'>modify_timer = #{modifyTimer},</if>
<if test ='null != modifyNumber'>modify_number = #{modifyNumber},</if>
<if test ='null != orgCode'>org_code = #{orgCode}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_leave_balance
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_leave_balance
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_leave_balance
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/kqmk/KqglAssoLeaveRulesMapper.xml
View file @
36d9da75
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<result
column=
"create_userid"
property=
"createUserid"
/>
<result
column=
"create_userid"
property=
"createUserid"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"is_open"
property=
"isOpen"
/>
<result
column=
"is_open"
property=
"isOpen"
/>
<result
column=
"leave_balance"
property=
"leaveBalance"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -24,7 +25,8 @@
...
@@ -24,7 +25,8 @@
create_time,
create_time,
create_userid,
create_userid,
org_code,
org_code,
is_open
is_open,
leave_balance
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias"
>
<sql
id=
"Base_Column_List_Alias"
>
...
@@ -36,11 +38,12 @@
...
@@ -36,11 +38,12 @@
create_time KqglAssoLeaveRules_create_time,
create_time KqglAssoLeaveRules_create_time,
create_userid KqglAssoLeaveRules_create_userid,
create_userid KqglAssoLeaveRules_create_userid,
org_code KqglAssoLeaveRules_org_code,
org_code KqglAssoLeaveRules_org_code,
is_open KqglAssoLeaveRules_is_open
is_open KqglAssoLeaveRules_is_open,
leave_balance KqglAssoLeaveRules_leave_balance
</sql>
</sql>
<insert
id=
"insertleaverulesList"
parameterType=
"java.util.List"
>
<insert
id=
"insertleaverulesList"
parameterType=
"java.util.List"
>
insert into kqgl_asso_leave_rules (name,company,leave_type,apply,create_time,create_userid,org_code,is_open)
insert into kqgl_asso_leave_rules (name,company,leave_type,apply,create_time,create_userid,org_code,is_open
,leave_balance
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
(
<if
test=
"item.name != null"
>
<if
test=
"item.name != null"
>
...
@@ -67,6 +70,9 @@
...
@@ -67,6 +70,9 @@
<if
test=
"item.isOpen != null"
>
<if
test=
"item.isOpen != null"
>
#{item.isOpen,jdbcType=INTEGER},
#{item.isOpen,jdbcType=INTEGER},
</if>
</if>
<if
test=
"item.leaveBalance != null"
>
#{item.leaveBalance,jdbcType=INTEGER}
</if>
)
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -98,7 +104,10 @@
...
@@ -98,7 +104,10 @@
org_code,
org_code,
</if>
</if>
<if test ='null != isOpen'>
<if test ='null != isOpen'>
is_open
is_open,
</if>
<if test ='null != leaveBalance'>
leave_balance
</if>
</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
@@ -124,7 +133,10 @@
...
@@ -124,7 +133,10 @@
#{orgCode},
#{orgCode},
</if>
</if>
<if test ='null != isOpen'>
<if test ='null != isOpen'>
#{isOpen}
#{isOpen},
</if>
<if test ='null != leaveBalance'>
#{leaveBalance}
</if>
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -144,7 +156,8 @@
...
@@ -144,7 +156,8 @@
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != createUserid'>create_userid = #{createUserid},</if>
<if test ='null != createUserid'>create_userid = #{createUserid},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != isOpen'>is_open = #{isOpen}</if>
<if test ='null != isOpen'>is_open = #{isOpen},</if>
<if test ='null != leaveBalance'>leave_balance = #{leaveBalance}</if>
</set>
</set>
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/resources/mapping/kqmk/KqglAssoRulesViceMapper.xml
View file @
36d9da75
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#{item.leaveRulesId,jdbcType=INTEGER},
#{item.leaveRulesId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"item.attgroupId != null"
>
<if
test=
"item.attgroupId != null"
>
#{item.attgroupId,jdbcType=INTEGER}
,
#{item.attgroupId,jdbcType=INTEGER}
</if>
</if>
)
)
</foreach>
</foreach>
...
...
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