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
3b5fa9f4
Commit
3b5fa9f4
authored
Nov 08, 2021
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
ac386e79
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
26 deletions
+54
-26
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+16
-8
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+19
-13
src/main/java/cn/timer/api/dto/kqmk/KqglAssoMonthPunchSummaryDto.java
+3
-0
src/main/java/cn/timer/api/dto/zzgl/UpEmpDeptDto.java
+6
-0
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+10
-5
No files found.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
3b5fa9f4
...
...
@@ -10,6 +10,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.concurrent.locks.ReentrantLock
;
import
cn.timer.api.bean.dzht.DzhtAssoMbzj
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
...
...
@@ -19,14 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestClientException
;
import
org.springframework.web.client.RestTemplate
;
...
...
@@ -569,6 +565,18 @@ public class TimeCardController {
overrule
.
setRange
(
vice
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
}
/**
* 是否开启假期规则
*/
@PutMapping
(
value
=
"/leave_rules_open"
)
@ApiOperation
(
value
=
"14.1:是否开启假期规则 "
,
httpMethod
=
"PUT"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
14
)
public
Result
<
Object
>
leaveRulesOpen
(
@RequestBody
KqglAssoLeaveRulesDto
kqglAssoLeaveRulesDto
)
{
UpdateWrapper
<
KqglAssoLeaveRules
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
eq
(
"id"
,
kqglAssoLeaveRulesDto
.
getId
()).
set
(
"is_open"
,
kqglAssoLeaveRulesDto
.
getIsOpen
());
KqglAssoLeaveRules
.
builder
().
build
().
update
(
updateWrapper
);
return
ResultUtil
.
success
();
}
@Autowired
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
3b5fa9f4
...
...
@@ -6,16 +6,13 @@ import java.util.stream.Collectors;
import
javax.transaction.Transactional
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
import
freemarker.template.utility.StringUtil
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -234,7 +231,7 @@ public class ZzglController {
*/
@GetMapping
(
value
=
"/otherlistent/{id}"
)
@ApiOperation
(
value
=
"获取岗位成员列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
YgglMainEmp
>>
selectOtherlistent
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
List
<
YgglMainEmp
>>
selectOtherlistent
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@ApiParam
(
"过滤参数"
)
@RequestParam
(
value
=
"param"
,
required
=
false
,
defaultValue
=
""
)
String
param
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
...
...
@@ -251,8 +248,10 @@ public class ZzglController {
LambdaQueryWrapper
<
YgglMainEmp
>
ygglMainEmpsLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
ygglMainEmpsLambdaQueryWrapper
.
select
(
YgglMainEmp:
:
getId
,
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getBmgwId
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
and
(
i
->
i
.
in
(
YgglMainEmp:
:
getBmgwId
,
list
.
toArray
()))
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getCustomNum
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
and
(
i
->
i
.
in
(
YgglMainEmp:
:
getBmgwId
,
list
.
toArray
()))
.
and
(!
StrUtil
.
hasBlank
(
param
),
w
->
w
.
like
(
YgglMainEmp:
:
getName
,
param
).
or
().
like
(
YgglMainEmp:
:
getEmpNum
,
param
).
or
().
eq
(
YgglMainEmp:
:
getPhone
,
param
).
or
().
like
(
YgglMainEmp:
:
getCustomNum
,
param
))
.
last
(
lead
!=
null
,
"order by if (emp_num='"
+
lead
+
"',0,1)"
);
List
<
YgglMainEmp
>
ygglMainEmps
=
YgglMainEmp
.
builder
().
build
().
selectList
(
ygglMainEmpsLambdaQueryWrapper
);
return
ResultUtil
.
data
(
ygglMainEmps
);
...
...
@@ -409,6 +408,7 @@ public class ZzglController {
Integer
dpetId
=
upEmpDeptDto
.
getDpetId
();
List
<
Integer
>
empNums
=
upEmpDeptDto
.
getEmpNum
();
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
();
KqglAssoMonthPunchSummary
kqglAssoMonthPunchSummary
=
KqglAssoMonthPunchSummary
.
builder
().
build
();
zzglLogDgjlMapper
.
insertbyaddemp
(
empNums
,
userBean
.
getEmpNum
(),
dpetId
,
userBean
.
getOrgCode
(),
dpetId
==
null
||
dpetId
==
0
?
"岗位删除员工"
:
upEmpDeptDto
.
getIsdg
()
==
null
?
"岗位添加员工"
:
"员工调岗"
);
// 清楚 leader 主管标记
...
...
@@ -420,9 +420,15 @@ public class ZzglController {
}
ygglMainEmp
.
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
()
.
set
(
YgglMainEmp:
:
getBmgwId
,
dpetId
)
.
set
(
YgglMainEmp:
:
getBmgwId
,
dpetId
)
.
set
(
YgglMainEmp:
:
getBmgwName
,
upEmpDeptDto
.
getDept
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
YgglMainEmp:
:
getEmpNum
,
empNums
));
// 调岗 同步部门 和 岗位信息 打卡月汇总
if
(!
StringUtils
.
isEmpty
(
upEmpDeptDto
.
getIsdg
())
&&
upEmpDeptDto
.
getIsdg
().
intValue
()==
1
){
kqglAssoMonthPunchSummary
.
update
(
new
UpdateWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
()
.
set
(
KqglAssoMonthPunchSummary:
:
getDept
,
upEmpDeptDto
.
getDept
()).
set
(
KqglAssoMonthPunchSummary:
:
getPost
,
upEmpDeptDto
.
getPost
())
.
eq
(
KqglAssoMonthPunchSummary:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
KqglAssoMonthPunchSummary:
:
getNum
,
empNums
)
);
}
return
ResultUtil
.
success
();
}
...
...
src/main/java/cn/timer/api/dto/kqmk/KqglAssoMonthPunchSummaryDto.java
View file @
3b5fa9f4
...
...
@@ -45,6 +45,9 @@ public class KqglAssoMonthPunchSummaryDto implements Serializable{
@ApiModelProperty
(
value
=
"工号 工号"
,
example
=
"101"
)
private
Integer
num
;
@ApiModelProperty
(
value
=
"自定义员工工号"
,
example
=
"101"
)
private
String
customNum
;
@ApiModelProperty
(
value
=
"部门 "
,
example
=
"部门"
)
private
String
dept
;
...
...
src/main/java/cn/timer/api/dto/zzgl/UpEmpDeptDto.java
View file @
3b5fa9f4
...
...
@@ -19,6 +19,12 @@ public class UpEmpDeptDto implements Serializable{
@ApiModelProperty
(
value
=
"部门岗位id"
,
example
=
"1"
)
private
Integer
dpetId
;
@ApiModelProperty
(
value
=
"部门"
,
example
=
"'部门'"
)
private
String
dept
;
@ApiModelProperty
(
value
=
"'职位'"
,
example
=
"''职位''"
)
private
String
post
;
@ApiModelProperty
(
value
=
"员工工号"
,
example
=
"2"
)
private
List
<
Integer
>
empNum
;
...
...
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
View file @
3b5fa9f4
...
...
@@ -138,8 +138,9 @@
<result
column=
"belong_month"
property=
"belongMonth"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"last_modified"
property=
"lastModified"
/>
<result
column=
"turnover_status"
property=
"turnover_status"
/>
<result
column=
"turnover_status"
property=
"turnover_status"
/>
<result
column=
"custom_num"
property=
"customNum"
/>
<collection
property=
"balanceTo"
ofType=
"cn.timer.api.dto.kqmk.BalanceSheetDataDto"
>
<id
column=
"yzid"
property=
"yzid"
/>
...
...
@@ -283,15 +284,19 @@
<select
id=
"AttendanceSummaryData"
resultMap=
"SummarydataMap"
>
select sum.*,
(select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = sum.num and em.org_code = sum.org_code LIMIT 1),0) as turnover_status
(select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = sum.num and em.org_code = sum.org_code LIMIT 1),0) as turnover_status,
yme.custom_num AS custom_num
from kqgl_asso_month_punch_summary sum
LEFT JOIN yggl_main_emp yme ON yme.org_code = sum.org_code and yme.emp_num=sum.num
where sum.org_code = #{param.orgCode}
and sum.belong_year = #{param.year}
and sum.belong_month = #{param.month}
<if
test=
"param.query != null and param.query != ''"
>
and ( sum.`name` like CONCAT('%',#{param.query},'%') or
sum.num like CONCAT('%',#{param.query},'%'))
sum.num like CONCAT('%',#{param.query},'%')
or yme.custom_num like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.attid != null and param.attid != ''"
>
and sum.att_group = #{param.attid}
...
...
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