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
44c4ef8c
Commit
44c4ef8c
authored
4 years ago
by
邓实川
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://develop-gitlab.youlingrc.com/8timerv2/8timerapiv200.git
into dsc
parents
02f725e3
acf60984
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
92 additions
and
13 deletions
+92
-13
src/main/java/cn/timer/api/aspect/LogAspect.java
+1
-2
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+10
-1
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+2
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+1
-1
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+47
-2
src/main/java/cn/timer/api/dto/jxgl/MyPerformance.java
+4
-1
src/main/java/cn/timer/api/utils/AddressUtils.java
+20
-3
src/main/java/cn/timer/api/utils/UserIp.java
+1
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+1
-1
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
+0
-1
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
+5
-1
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+0
-0
No files found.
src/main/java/cn/timer/api/aspect/LogAspect.java
View file @
44c4ef8c
...
...
@@ -94,7 +94,6 @@ public class LogAspect
// 获取当前的用户
// LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
QyzxEmpLogin
eld
=
(
QyzxEmpLogin
)
session
.
getAttribute
(
"ui"
);
System
.
out
.
println
(
eld
);
// *========数据库日志=========*//
QyzxOperLog
operLog
=
new
QyzxOperLog
();
...
...
@@ -110,7 +109,7 @@ public class LogAspect
operLog
.
setOperUrl
(
ServletUtils
.
getRequest
().
getRequestURI
());
if
(
eld
!=
null
)
{
operLog
.
setOperName
(
eld
.
get
Usern
ame
());
operLog
.
setOperName
(
eld
.
get
YgglMainEmp
().
getN
ame
());
}
if
(
e
!=
null
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
44c4ef8c
...
...
@@ -302,7 +302,10 @@ public class JxglController {
IPage
<
JxglAppraisalT
>
p
=
new
Page
<
JxglAppraisalT
>(
page
.
getCurrentPage
(),
page
.
getTotalPage
());
IPage
<
JxglAppraisalT
>
pageAT
=
jxglAppraisalTMapper
.
selectPage
(
p
,
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
().
eq
(
JxglAppraisalT:
:
getOrgCode
,
userBean
.
getOrgCode
()));
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
()
.
eq
(
JxglAppraisalT:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
orderByDesc
(
JxglAppraisalT:
:
getId
)
);
List
<
JxglAppraisalT
>
listAT
=
pageAT
.
getRecords
();
...
...
@@ -1102,6 +1105,12 @@ public class JxglController {
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setId
(
userBean
.
getEmpNum
());
// 当查询的数据不为 2评分,清空 节点状态
if
(
query
.
getSts
()
!=
2
)
{
query
.
setNoteSts
(
null
);
}
IPage
<
JxglPerformanceAppraisal
>
pagePA
=
jxglPerformanceAppraisalMapper
.
selectMyByQuery
(
page
,
query
);
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
44c4ef8c
...
...
@@ -268,6 +268,7 @@ public class ClockInController {
Map
<
String
,
Integer
>
comparemap
=
new
HashMap
();
if
(
dkmc
==
null
)
{
kskd
=
false
;
//打卡时间 对比班次 接近哪个时间就打哪个时间的卡
if
(
attdate
.
getAttsch
().
size
()
==
2
||
attdate
.
getAttsch
().
size
()
==
4
||
attdate
.
getAttsch
().
size
()
==
6
)
{
comparemap
.
put
(
"1"
,
dakjg1
);
comparemap
.
put
(
"2"
,
dakjg2
);
...
...
@@ -290,6 +291,7 @@ public class ClockInController {
}
//最后一次卡的时候 再继续打视为更新最后一次打卡
if
(
dkmc
.
getXbdk1
()
!=
null
)
{
kskd
=
true
;
comparemap
.
put
(
"2"
,
dakjg2
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
44c4ef8c
...
...
@@ -105,7 +105,7 @@ public class AttendanceTaskTiming{
*/
//3.添加定时任务 每天下午七点执行一次
@Scheduled
(
cron
=
"0
37 10
* * ?"
)
@Scheduled
(
cron
=
"0
0 19
* * ?"
)
//或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
44c4ef8c
...
...
@@ -2,6 +2,7 @@ package cn.timer.api.controller.zzgl;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.transaction.Transactional
;
...
...
@@ -24,6 +25,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
...
...
@@ -91,7 +93,7 @@ public class ZzglController {
}
/**
*
架构树/架构图/导出
*
获取部门岗位-升级版
*
* @param
* @return
...
...
@@ -99,7 +101,7 @@ public class ZzglController {
@GetMapping
(
value
=
"/deptlist_plus"
)
@ApiOperation
(
value
=
"1.获取部门岗位-升级版"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
List
<
Tree
<
String
>>>
selectlistdept2
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
List
<
Tree
<
String
>>>
deptlistPlus
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
...
...
@@ -134,6 +136,49 @@ public class ZzglController {
return
ResultUtil
.
data
(
treeNodes
);
}
/**
* 获取部门
*
* @param
* @return
*/
@GetMapping
(
value
=
"/depts_tree"
)
@ApiOperation
(
value
=
"2.获取部门"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
List
<
Tree
<
String
>>>
deptsOnlyone
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
if
(
CollectionUtil
.
isNotEmpty
(
zzglBmgwMs
))
{
zzglBmgwMs
=
zzglBmgwMs
.
stream
().
filter
(
z
->
z
.
getType
()
==
0
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
zzglBmgwMs
))
{
//配置
TreeNodeConfig
treeNodeConfig
=
new
TreeNodeConfig
();
// 自定义属性名 都要默认值的
treeNodeConfig
.
setIdKey
(
"id"
);
treeNodeConfig
.
setParentIdKey
(
"upId"
);
//转换器
List
<
Tree
<
String
>>
treeNodes
=
TreeUtil
.
build
(
zzglBmgwMs
,
"0"
,
treeNodeConfig
,
(
treeNode
,
tree
)
->
{
tree
.
setId
(
Convert
.
toStr
(
treeNode
.
getId
()));
tree
.
setParentId
(
Convert
.
toStr
(
treeNode
.
getUpId
()));
tree
.
setName
(
treeNode
.
getName
());
// 扩展属性 ...
tree
.
putExtra
(
"leader"
,
treeNode
.
getLeader
());
tree
.
putExtra
(
"type"
,
treeNode
.
getType
());
});
return
ResultUtil
.
data
(
treeNodes
);
}
}
return
ResultUtil
.
success
();
}
@GetMapping
(
value
=
"/depts"
)
@ApiOperation
(
value
=
"2.获取部门"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/jxgl/MyPerformance.java
View file @
44c4ef8c
...
...
@@ -21,5 +21,8 @@ public class MyPerformance extends Page {
@ApiModelProperty
(
value
=
"状态 0目标填写 1目标确认 2评分 3 结果确认"
,
example
=
""
)
private
Integer
sts
;
@ApiModelProperty
(
value
=
"状态 1执行中 2已执行 "
,
example
=
""
)
private
Integer
noteSts
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/AddressUtils.java
View file @
44c4ef8c
package
cn
.
timer
.
api
.
utils
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
com.alibaba.fastjson.JSONObject
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.http.Header
;
import
cn.hutool.http.HttpRequest
;
/**
* 获取地址类
...
...
@@ -13,19 +18,31 @@ import cn.hutool.core.util.StrUtil;
*/
public
class
AddressUtils
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AddressUtils
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AddressUtils
.
class
);
public
static
final
String
IP_URL
=
"http://ip.taobao.com/service/getIpInfo.php"
;
public
static
final
String
IP_URL
=
"http://ip.taobao.com/outGetIpInfo"
;
public
static
Map
<
String
,
Object
>
PARAM_MAP
=
new
HashMap
<
String
,
Object
>();
static
{
PARAM_MAP
.
put
(
"accessKey"
,
"alibaba-inc"
);
}
public
static
String
getRealAddressByIP
(
String
ip
)
{
PARAM_MAP
.
put
(
"ip"
,
ip
);
String
address
=
"XX XX"
;
// 内网不查询
if
(
UserIp
.
internalIp
(
ip
))
{
return
"内网IP"
;
}
String
rspStr
=
HttpUtils
.
sendPost
(
IP_URL
,
"ip="
+
ip
);
//链式构建请求
String
rspStr
=
HttpRequest
.
post
(
IP_URL
)
.
header
(
Header
.
USER_AGENT
,
"Hutool http"
)
//头信息,多个头信息多次调用此方法即可
.
form
(
PARAM_MAP
)
//表单内容
.
timeout
(
20000
)
//超时,毫秒
.
execute
().
body
();
if
(
StrUtil
.
isEmpty
(
rspStr
))
{
log
.
error
(
"获取地理位置异常 {}"
,
ip
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/UserIp.java
View file @
44c4ef8c
...
...
@@ -351,6 +351,7 @@ public class UserIp {
return
macAddress
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
44c4ef8c
...
...
@@ -126,7 +126,7 @@ public class RouterUtils {
case
UNEXECUTED:
listUser
.
get
(
i
).
setExecute
(
EXECUTING
);
// 首次发起申请时,写入 审批人名称 至 obj 中
if
(
isFirse
&&
obj
.
getStr
(
"current_approver"
)
!
=
null
)
{
if
(
isFirse
&&
obj
.
getStr
(
"current_approver"
)
=
=
null
)
{
obj
.
set
(
"current_approver"
,
listUser
.
get
(
i
).
getName
());
}
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
View file @
44c4ef8c
...
...
@@ -347,7 +347,6 @@
</where>
GROUP BY a.emp_num
ORDER BY a.id DESC
</select>
<select
id=
"selectDetailById"
resultMap=
"BaseResultMap_Detail"
>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
View file @
44c4ef8c
...
...
@@ -206,7 +206,7 @@
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND b.sts = d.process_type
LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code
WHERE a.org_code = #{param.orgCode} AND b.emp_num = #{param.id}
ORDER BY a.id DESC
</select>
<select
id=
"selectMyByQuery"
resultMap=
"BaseResultMap_ALl"
>
...
...
@@ -239,7 +239,11 @@
<if
test=
"param.sts != null and param.sts == 3"
>
AND b.sts = 4
</if>
<if
test=
"param.noteSts != null"
>
AND d.sts = #{param.noteSts}
</if>
</where>
ORDER BY a.id DESC
</select>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
View file @
44c4ef8c
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