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
4db73623
Commit
4db73623
authored
Jun 17, 2020
by
lal
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal
parents
ccd6cbc6
86210576
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
319 additions
and
109 deletions
+319
-109
src/main/java/cn/timer/api/Application.java
+1
-1
src/main/java/cn/timer/api/aspect/LogAspect.java
+1
-2
src/main/java/cn/timer/api/aspect/lang/enums/BusinessType.java
+6
-1
src/main/java/cn/timer/api/bean/yggl/YgglMainLzb.java
+23
-5
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+8
-6
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/helper/AccountHelper.java
+2
-1
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+3
-0
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+11
-12
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
+5
-1
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+30
-7
src/main/java/cn/timer/api/controller/qyzx/service/QyzxOperLogServiceImpl.java
+1
-1
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+1
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+25
-11
src/main/java/cn/timer/api/controller/yggl/service/YgglServiceImpl.java
+1
-3
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+51
-5
src/main/java/cn/timer/api/dao/qyzx/QyzxOperLogMapper.java
+2
-1
src/main/java/cn/timer/api/dao/yggl/YgglMainEmpMapper.java
+0
-2
src/main/java/cn/timer/api/dto/qyzx/QyzxOperLogQuaryDto.java
+5
-0
src/main/java/cn/timer/api/dto/yggl/YgQueryDto.java
+33
-30
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
+11
-6
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
+11
-2
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
+9
-1
src/main/resources/mapping/qyzx/QyzxOperLogMapper.xml
+47
-1
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
+11
-6
No files found.
src/main/java/cn/timer/api/Application.java
View file @
4db73623
...
...
@@ -18,7 +18,7 @@ import org.springframework.web.filter.CorsFilter;
import
cn.hutool.core.net.NetUtil
;
@MapperScan
(
"cn.timer.api.dao"
)
// 扫描的mapper
@MapperScan
(
{
"cn.timer.api.dao"
}
)
// 扫描的mapper
@ComponentScan
(
basePackages
=
{
"cn.timer.api"
})
@SpringBootApplication
@EnableScheduling
...
...
src/main/java/cn/timer/api/aspect/LogAspect.java
View file @
4db73623
...
...
@@ -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
)
...
...
src/main/java/cn/timer/api/aspect/lang/enums/BusinessType.java
View file @
4db73623
...
...
@@ -21,7 +21,12 @@ public enum BusinessType
* 修改
*/
UPDATE
,
/**
* 新增/修改
*/
INSERT_UPDATE
,
/**
* 删除
*/
...
...
src/main/java/cn/timer/api/bean/yggl/YgglMainLzb.java
View file @
4db73623
...
...
@@ -86,11 +86,29 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
@ApiModelProperty
(
value
=
"政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众"
,
example
=
"101"
)
private
Integer
zzmm
;
@ApiModelProperty
(
value
=
"籍贯 省/市/区 例:广东/广州/白云"
,
example
=
"101"
)
private
Integer
jg
;
@ApiModelProperty
(
value
=
"户籍城市 省/市/区 例:广东/广州/白云"
,
example
=
"101"
)
private
Integer
city
;
// @ApiModelProperty(value="籍贯 省/市/区 例:广东/广州/白云",example="101")
// private Integer jg;
//
// @ApiModelProperty(value="户籍城市 省/市/区 例:广东/广州/白云",example="101")
// private Integer city;
@ApiModelProperty
(
value
=
"籍贯 省"
,
example
=
"101"
)
private
String
jg
;
@ApiModelProperty
(
value
=
"籍贯 省id"
,
example
=
"101"
)
private
String
jgId
;
@ApiModelProperty
(
value
=
"省"
)
private
String
province
;
@ApiModelProperty
(
value
=
"省id"
)
private
String
provinceId
;
@ApiModelProperty
(
value
=
"市"
)
private
String
city
;
@ApiModelProperty
(
value
=
"市id"
)
private
String
cityId
;
@ApiModelProperty
(
value
=
"区"
)
private
String
district
;
@ApiModelProperty
(
value
=
"区编号"
)
private
String
districtId
;
@ApiModelProperty
(
value
=
"户口性质 1:城镇户口;2:农村户口;3:居民户口"
,
example
=
"101"
)
private
Integer
hkType
;
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
4db73623
...
...
@@ -172,17 +172,19 @@ public class DzhtController2 {
TokenHelper
.
getTokenData
();
j
=
AccountHelper
.
createOrgAcct
(
thirdPartyUserId
,
creator
,
qyzc
.
getName
(),
qyzc
.
getIdType
(),
qyzc
.
getIdNumber
());
Integer
code
=
j
.
getInteger
(
"code"
);
if
(
code
!=
null
&&
code
!=
0
)
return
ResultUtil
.
error
(
j
.
getString
(
"message"
));
}
catch
(
DefineException
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
e
.
getStackTrace
();
}
String
orgId
=
j
.
getString
(
"orgId"
);
String
accountId
=
j
.
getString
(
"accountId"
);
qyzc
.
setOrgId
(
orgId
);
qyzc
.
setOrgCode
(
userBean
.
getOrgCode
());
if
(
j
.
getString
(
"accountId"
)
!=
null
)
{
if
(
accountId
!=
null
)
qyzc
.
insert
();
}
return
ResultUtil
.
data
(
orgId
,
"创建成功"
);
}
...
...
@@ -204,8 +206,8 @@ public class DzhtController2 {
@GetMapping
(
"/getOrganizations"
)
@ApiOperation
(
value
=
"查询企业信息s"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getOrganizations
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxEmpEntAsso
>
list
=
QyzxEmpEntAsso
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
List
<
QyzxEmpEntAsso
>
list
=
QyzxEmpEntAsso
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
List
<
Integer
>
orgCodeList
=
Lists
.
transform
(
list
,
newList
->
newList
.
getOrgCode
());
List
<
String
>
orgIds
=
new
ArrayList
<
String
>();
for
(
Integer
orgCode
:
orgCodeList
)
{
...
...
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/helper/AccountHelper.java
View file @
4db73623
...
...
@@ -207,7 +207,8 @@ public class AccountHelper {
String
param
=
AccountParamUtil
.
createOrgAcctParam
(
thirdPartyUserId
,
creatorId
,
name
,
idType
,
idNumber
);
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
POST
,
ConfigConstant
.
createOrgAcc_URL
(),
param
);
return
JSONHelper
.
castDataJson
(
json
,
JSONObject
.
class
);
return
json
;
// return JSONHelper.castDataJson(json,JSONObject.class);
}
/**
...
...
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
4db73623
...
...
@@ -726,6 +726,8 @@ public class JxglController {
@PutMapping
(
value
=
"/termination_performance_appraisal"
)
@ApiOperation
(
value
=
"8.终止-绩效考核"
,
httpMethod
=
"PUT"
,
notes
=
"终止-绩效考核"
)
@ApiOperationSupport
(
order
=
8
)
@Role
@Log
(
title
=
"终止-绩效考核"
)
public
Result
<
Object
>
terminationPA
(
@CurrentUser
UserBean
userBean
,
@NotNull
@RequestParam
Integer
id
)
{
JxglPerformanceAppraisal
performanceAppraisal
=
jxglPerformanceAppraisalMapper
...
...
@@ -955,6 +957,7 @@ public class JxglController {
@ApiOperation
(
value
=
"13.终止-考核"
,
httpMethod
=
"PUT"
,
notes
=
"终止-考核"
)
@ApiOperationSupport
(
order
=
13
)
@Role
@Log
(
title
=
"终止-考核"
)
public
Result
<
Object
>
terminationAssessment
(
@CurrentUser
UserBean
userBean
,
@NotNull
@RequestParam
Integer
id
)
{
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectById
(
id
);
...
...
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
4db73623
...
...
@@ -358,8 +358,8 @@ public class CmsController {
// 查询条件
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"organization_id"
,
userBean
.
getOrgCode
())
.
select
(
"id"
,
"publisher_name"
,
"auditopinion"
,
"modularid"
,
"status"
,
"title"
,
"releasetime"
,
"addeddate"
,
"author
"
,
"summary"
,
"releasetype"
,
"fmtpath"
)
.
select
(
"id"
,
"publisher_name"
,
"auditopinion"
,
"modularid"
,
"status"
,
"title"
,
"releasetime
"
,
"
addeddate"
,
"author"
,
"
summary"
,
"releasetype"
,
"fmtpath"
)
.
ne
(
"status"
,
1
).
eq
(
t
!=
null
&&
t
>
-
1
,
"modularid"
,
t
)
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
!
StrUtil
.
hasBlank
(
s
)
?
s
:
"1000-01-01 00:00:00"
,
...
...
@@ -526,17 +526,16 @@ public class CmsController {
@ApiOperation
(
value
=
"设置默认轮播信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Void
>
setDefault
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"id"
)
Integer
id
)
{
// 将所有设为非默认
UpdateWrapper
<
CmsAnnouncement
>
updateWrapper
=
new
UpdateWrapper
<
CmsAnnouncement
>();
CmsAnnouncement
q
=
CmsAnnouncement
.
builder
().
orgCode
(
userBean
.
getOrgCode
()).
isDefault
(
0
).
build
();
cmsAnnouncementMapper
.
update
(
q
,
updateWrapper
);
boolean
cmsAnnouncement
=
CmsAnnouncement
.
builder
().
isDefault
(
0
).
build
().
update
(
new
LambdaQueryWrapper
<
CmsAnnouncement
>().
eq
(
CmsAnnouncement:
:
getOrgCode
,
userBean
.
getOrgCode
()));
// 根据id设为默认
updateWrapper
.
eq
(
"id"
,
id
);
CmsAnnouncement
w
=
CmsAnnouncement
.
builder
().
orgCode
(
userBean
.
getOrgCode
()).
id
(
id
).
isDefault
(
1
).
build
();
cmsAnnouncementMapper
.
update
(
w
,
updateWrapper
);
// 返回成功
return
ResultUtil
.
success
(
"设置成功"
);
if
(
cmsAnnouncement
)
{
if
(
CmsAnnouncement
.
builder
().
id
(
id
).
isDefault
(
1
).
build
().
updateById
())
return
ResultUtil
.
success
(
"设置成功"
);
else
return
ResultUtil
.
success
(
"设置失败"
);
}
return
ResultUtil
.
success
(
"设置失败"
);
}
}
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
View file @
4db73623
...
...
@@ -11,7 +11,6 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -28,6 +27,8 @@ import org.springframework.web.bind.annotation.RestController;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.qyzx.auth.QyzxAuthAccount
;
import
cn.timer.api.bean.qyzx.auth.QyzxAuthChild
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
...
...
@@ -59,6 +60,7 @@ public class QyzxAuthController {
@Transactional
@PostMapping
(
value
=
"/addChildAccount"
)
@ApiOperation
(
value
=
"新增子账号"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"新增-子账号"
,
businessType
=
BusinessType
.
INSERT
)
public
Result
<
QyzxAuthChild
>
addChildAccount
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
childEmpNum
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
empNum
=
userBean
.
getEmpNum
();
...
...
@@ -115,6 +117,7 @@ public class QyzxAuthController {
@Transactional
@DeleteMapping
(
value
=
"/delChildAccount/{childEmpNum}"
)
@ApiOperation
(
value
=
"删除子账号"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"删除-子账号"
,
businessType
=
BusinessType
.
DELETE
)
public
Result
<
String
>
delChildAccount
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
childEmpNum
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
QyzxAuthAccount
qyzxAuthAccount
=
QyzxAuthAccount
.
builder
().
build
().
selectOne
(
...
...
@@ -136,6 +139,7 @@ public class QyzxAuthController {
@PostMapping
(
value
=
"/modifyMaxChild"
)
@ApiOperation
(
value
=
"修改子账号最大数量"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"修改-子账号最大数量"
,
businessType
=
BusinessType
.
UPDATE
)
public
Result
<
QyzxAuthChild
>
modifyMaxChild
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
maxNum
)
{
if
(
QyzxAuthAccount
.
builder
().
maxChildAccount
(
maxNum
).
build
().
update
(
new
QueryWrapper
<
QyzxAuthAccount
>().
lambda
().
eq
(
QyzxAuthAccount:
:
getOrgCode
,
userBean
.
getOrgCode
())))
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
4db73623
package
cn
.
timer
.
api
.
controller
.
qyzx
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
javax.servlet.http.HttpSession
;
...
...
@@ -26,6 +29,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.qyzx.QyzxAttaFwjsb
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
...
...
@@ -35,6 +40,7 @@ import cn.timer.api.bean.qyzx.QyzxLogBuy;
import
cn.timer.api.bean.qyzx.QyzxOperLog
;
import
cn.timer.api.bean.qyzx.QyzxPayServe
;
import
cn.timer.api.bean.qyzx.QyzxSuggestionFeeback
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
...
...
@@ -113,6 +119,7 @@ public class QyzxController {
*/
@PostMapping
(
value
=
"/ent"
)
@ApiOperation
(
value
=
"添加/修改企业信息"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"修改-企业信息"
,
businessType
=
BusinessType
.
UPDATE
)
public
Result
<
QyzxEntInfoM
>
addent
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QyzxEntInfoM
qyzxEntInfoM
)
{
qyzxEntInfoM
.
setId
(
userBean
.
getOrgCode
());
...
...
@@ -133,6 +140,7 @@ public class QyzxController {
*/
@PostMapping
(
value
=
"/entauth"
)
@ApiOperation
(
value
=
"企业认证"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"企业认证"
,
businessType
=
BusinessType
.
INSERT
)
public
Result
<
QyzxEntInfoM
>
entauth
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QyzxEntInfoM
qyzxEntInfoM
)
{
// 设置审核状态
qyzxEntInfoM
.
setAttestStatus
(
CommonEnum
.
AUTH_TYPE_UNDEREVIEW
.
getType
());
...
...
@@ -249,10 +257,9 @@ public class QyzxController {
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
select
(
QyzxEmpEntAsso:
:
getOrgCode
)
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
.
select
(
QyzxEmpEntAsso:
:
getOrgCode
).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
List
<
QyzxEntInfoM
>
qyzxEntInfoMs
=
new
LambdaQueryChainWrapper
<
QyzxEntInfoM
>(
qyzxEntInfoMMapper
)
.
in
(
CollUtil
.
isNotEmpty
(
orgCodes
),
QyzxEntInfoM:
:
getId
,
orgCodes
).
list
();
return
ResultUtil
.
data
(
qyzxEntInfoMs
,
"获取企业信息成功"
);
...
...
@@ -277,7 +284,7 @@ public class QyzxController {
if
(
ctrl
==
null
)
{
return
ResultUtil
.
data
(
menus
,
"你不是该企业的用户!"
);
}
if
(
SysRoleType
.
U_TYPE_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
())
||
SysRoleType
.
U_TYPE_C_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
()))
{
}
else
{
...
...
@@ -396,8 +403,8 @@ public class QyzxController {
@GetMapping
(
value
=
"/fwjs"
)
@ApiOperation
(
value
=
"查看服务计算"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxAttaFwjsb
>>
fwjs
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxAttaFwjsb
>
qyzxAttaFpgl
=
QyzxAttaFwjsb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
().
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()));
List
<
QyzxAttaFwjsb
>
qyzxAttaFpgl
=
QyzxAttaFwjsb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
().
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
qyzxAttaFpgl
,
"获取服务计算成功"
);
}
...
...
@@ -469,7 +476,23 @@ public class QyzxController {
qyzxOperLogQuaryDto
.
getTotalPage
()
==
null
?
10
:
qyzxOperLogQuaryDto
.
getTotalPage
());
qyzxOperLogQuaryDto
.
setOrgCode
(
userBean
.
getOrgCode
());
IPage
<
QyzxOperLog
>
pages
=
qyzxOperLogMapper
.
selectPageByQuery
(
page
,
qyzxOperLogQuaryDto
);
// IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery(page, qyzxOperLogQuaryDto);
if
(
qyzxOperLogQuaryDto
.
getEmpNums
()
==
null
)
{
YgglMainEmp
main
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
1
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
List
<
YgglMainEmp
>
child
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
2
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
child
.
add
(
main
);
Collections
.
sort
(
child
,
Comparator
.
comparing
(
YgglMainEmp:
:
getIsManager
));
List
<
Integer
>
empNums
=
child
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
qyzxOperLogQuaryDto
.
setEmpNums
(
empNums
);
}
IPage
<
QyzxOperLog
>
pages
=
qyzxOperLogMapper
.
selectPageByQuery2
(
page
,
qyzxOperLogQuaryDto
);
List
<
QyzxOperLog
>
listOl
=
pages
.
getRecords
();
return
ResultUtil
.
data
(
pages
,
listOl
,
"操作成功!"
);
...
...
src/main/java/cn/timer/api/controller/qyzx/service/QyzxOperLogServiceImpl.java
View file @
4db73623
...
...
@@ -42,7 +42,7 @@ public class QyzxOperLogServiceImpl implements QyzxOperLogService
@Override
public
IPage
<
QyzxOperLog
>
selectPageByQuery
(
IPage
<
QyzxOperLog
>
page
,
QyzxOperLogQuaryDto
operLog
)
{
return
operLogMapper
.
selectPageByQuery
(
page
,
operLog
);
return
operLogMapper
.
selectPageByQuery
2
(
page
,
operLog
);
}
/**
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
4db73623
...
...
@@ -671,7 +671,7 @@ public class SpmkController {
jSONObject
.
set
(
"approveId"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
asId
)));
//审批完成后 业务
SpmkAssoBusiness
sab
=
SpmkAssoBusinessFactory
.
createSpmkAssoType
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
SpmkAssoBusiness
sab
=
SpmkAssoBusinessFactory
.
getFactory
().
createSpmkAssoType
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
if
(
sab
!=
null
)
sab
.
handleApprove
(
jSONObject
);
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
4db73623
...
...
@@ -1224,7 +1224,7 @@ public class YgglController {
}
/**
* 员工转正
* 员工转正
0-1
*
* @param
* @return
...
...
@@ -1241,7 +1241,7 @@ public class YgglController {
}
/**
* 计划离职 type
2-3
* 计划离职 type
1-2
*
* @param
* @return
...
...
@@ -1254,7 +1254,8 @@ public class YgglController {
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
YgglMainEmp
ygglMainEmp
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
YgglMainLzb
ygglMainLzb
=
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
build
();
// 移动员工表数据到离职表
BeanUtil
.
copyProperties
(
ygglMainEmp
,
ygglMainLzb
,
"before_leaving_sts"
);
...
...
@@ -1262,16 +1263,21 @@ public class YgglController {
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
jobStatus
.
LIZHIZHONG
.
getType
())
.
beforeLeavingSts
(
ygglMainEmp
.
getJobStatus
()).
build
()
.
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
.
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
YgglMainLzb
.
builder
().
jobStatus
(
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
()
.
update
(
new
UpdateWrapper
<
YgglMainLzb
>().
lambda
().
eq
(
YgglMainLzb:
:
getEmpNum
,
empNum
));
.
update
(
new
UpdateWrapper
<
YgglMainLzb
>().
lambda
()
.
eq
(
YgglMainLzb:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainLzb:
:
getOrgCode
,
userBean
.
getOrgCode
()));
return
ResultUtil
.
data
(
ygglMainLzb
,
"添加待离职员工成功"
);
}
/**
* 确认离职 type
3-4
* 确认离职 type
2-3
*
* @param
* @return
...
...
@@ -1282,20 +1288,28 @@ public class YgglController {
public
Result
<
Void
>
addlzb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
LzygQueryDto
lzygQueryDto
)
{
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
// 删除员工档案表
ygglMainEmpMapper
.
delete
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
ygglMainEmpMapper
.
delete
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
YgglMainLzb
.
builder
().
empNum
(
empNum
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
sjlzTime
(
new
Date
())
.
build
().
update
(
new
UpdateWrapper
<
YgglMainLzb
>().
lambda
().
eq
(
YgglMainLzb:
:
getEmpNum
,
empNum
));
.
build
().
update
(
new
UpdateWrapper
<
YgglMainLzb
>().
lambda
()
.
eq
(
YgglMainLzb:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainLzb:
:
getOrgCode
,
userBean
.
getOrgCode
()));
LambdaQueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
empNum
);
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
empNum
)
.
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
())
;
// 确认离职 删除员工关联表
qyzxEmpEntAssoMapper
.
delete
(
queryWrapper
);
// 初始化 部门主管
zzglBmgwMMapper
.
update
(
ZzglBmgwM
.
builder
().
leader
(
null
).
build
(),
new
UpdateWrapper
<
ZzglBmgwM
>().
lambda
().
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
new
UpdateWrapper
<
ZzglBmgwM
>().
lambda
()
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
// 更新当前企业
List
<
QyzxEmpEntAsso
>
listEEA
=
qyzxEmpEntAssoMapper
.
selectList
(
queryWrapper
);
...
...
@@ -1307,7 +1321,7 @@ public class YgglController {
}
/**
* 放弃离职 type
3-2
* 放弃离职 type
2-1
*
* @param
* @return
...
...
src/main/java/cn/timer/api/controller/yggl/service/YgglServiceImpl.java
View file @
4db73623
...
...
@@ -12,8 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainLzb
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
...
...
@@ -100,7 +98,7 @@ public class YgglServiceImpl implements YgglService {
return
leaderId
;
}
p
rivate
ZzglBmgwM
getLeaderEmp
(
List
<
ZzglBmgwM
>
listBM
,
Integer
baseBmgwId
)
{
p
ublic
ZzglBmgwM
getLeaderEmp
(
List
<
ZzglBmgwM
>
listBM
,
Integer
baseBmgwId
)
{
ZzglBmgwM
zzglBmgwM
=
baseBmgwId
!=
null
?
CollUtil
.
getFirst
(
listBM
.
stream
()
.
filter
(
bM
->
bM
.
getId
().
equals
(
baseBmgwId
)).
collect
(
Collectors
.
toList
()))
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
4db73623
...
...
@@ -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
)
...
...
@@ -235,13 +280,14 @@ public class ZzglController {
}
/**
* 添加/修改部门
* 添加/修改部门
岗位
*
* @param
* @return
*/
@PostMapping
(
value
=
"/dept"
)
@ApiOperation
(
value
=
"添加/修改部门"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"添加/修改部门岗位"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"添加/修改-部门岗位"
,
businessType
=
BusinessType
.
INSERT_UPDATE
)
public
Result
<
ZzglBmgwM
>
adddept
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZzglBmgwM
zzglBmgwM
)
{
Integer
count
=
zzglBmgwMMapper
.
selectCount
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
...
...
@@ -272,7 +318,7 @@ public class ZzglController {
*/
@DeleteMapping
(
value
=
"/dept"
)
@ApiOperation
(
value
=
"删除部门岗位"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@Log
(
title
=
"删除岗位"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"删除
-部门
岗位"
,
businessType
=
BusinessType
.
DELETE
)
public
Result
<
Integer
>
deldepts
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
ids
)
{
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
();
...
...
src/main/java/cn/timer/api/dao/qyzx/QyzxOperLogMapper.java
View file @
4db73623
...
...
@@ -27,7 +27,8 @@ public interface QyzxOperLogMapper extends BaseMapper<QyzxOperLog> {
* @param operLog 操作日志对象
* @return 操作日志集合
*/
public
IPage
<
QyzxOperLog
>
selectPageByQuery
(
IPage
<
QyzxOperLog
>
page
,
@Param
(
"param"
)
QyzxOperLogQuaryDto
operLog
);
// public IPage<QyzxOperLog> selectPageByQuery(IPage<QyzxOperLog> page,@Param("param") QyzxOperLogQuaryDto operLog);
public
IPage
<
QyzxOperLog
>
selectPageByQuery2
(
IPage
<
QyzxOperLog
>
page
,
@Param
(
"param"
)
QyzxOperLogQuaryDto
operLog
);
//
// /**
// * 批量删除系统操作日志
...
...
src/main/java/cn/timer/api/dao/yggl/YgglMainEmpMapper.java
View file @
4db73623
...
...
@@ -4,7 +4,6 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -13,7 +12,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dto.yggl.EmpQuery
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
...
...
src/main/java/cn/timer/api/dto/qyzx/QyzxOperLogQuaryDto.java
View file @
4db73623
package
cn
.
timer
.
api
.
dto
.
qyzx
;
import
java.util.List
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -19,6 +21,9 @@ public class QyzxOperLogQuaryDto extends Page{
@ApiModelProperty
(
value
=
"企业id"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"员工id"
,
example
=
"101"
)
private
List
<
Integer
>
empNums
;
@ApiModelProperty
(
value
=
"业务类型(0其它 1新增 2修改 3删除)"
,
example
=
"101"
)
private
Integer
businessType
;
...
...
src/main/java/cn/timer/api/dto/yggl/YgQueryDto.java
View file @
4db73623
...
...
@@ -16,7 +16,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
/**
* @date 2019年11月16日
* @date 2019年11月16日
* @author 翁东州
* @方法中文名称:
*/
...
...
@@ -24,49 +24,52 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
YgQueryDto
extends
Page
implements
Serializable
{
public
class
YgQueryDto
extends
Page
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1230023773946170942L
;
@ApiModelProperty
(
value
=
"员工姓名"
,
example
=
"华仔"
)
@ApiModelProperty
(
value
=
"员工姓名"
,
example
=
"华仔"
)
private
String
empName
;
@ApiModelProperty
(
value
=
"员工号"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"员工号"
,
example
=
"1"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"部门名"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"部门名"
,
example
=
"1"
)
private
String
deptName
;
@ApiModelProperty
(
value
=
"上级部门名"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"上级部门名"
,
example
=
"1"
)
private
String
upName
;
@ApiModelProperty
(
value
=
"入职时间"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"入职时间"
,
example
=
"1"
)
private
Date
rzTime
;
@ApiModelProperty
(
value
=
"应离职时间"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"应离职时间"
,
example
=
"1"
)
private
Date
ylzTime
;
@ApiModelProperty
(
value
=
"工作性质1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"工作性质1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘"
,
example
=
"1"
)
private
Integer
jobType
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"1"
)
private
String
phone
;
@ApiModelProperty
(
value
=
"部门id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"部门id"
,
example
=
"101"
)
private
Integer
bmgwid
;
@ApiModelProperty
(
value
=
"员工状态1正式、2试用、3离职中、4已离职"
,
example
=
"2"
)
@ApiModelProperty
(
value
=
"员工状态1正式、2试用、3离职中、4已离职"
,
example
=
"2"
)
private
Integer
jobStatus
;
@ApiModelProperty
(
value
=
"手机号、姓名"
,
example
=
"1388888888 or 张三"
)
@ApiModelProperty
(
value
=
"手机号、姓名"
,
example
=
"1388888888 or 张三"
)
private
String
query
;
@ApiModelProperty
(
value
=
"备注"
,
example
=
"123"
)
@ApiModelProperty
(
value
=
"备注"
,
example
=
"123"
)
private
String
bz
;
@ApiModelProperty
(
value
=
"离职原因"
,
example
=
"123"
)
@ApiModelProperty
(
value
=
"离职原因"
,
example
=
"123"
)
private
String
lzyy
;
@ApiModelProperty
(
value
=
"头像url"
,
example
=
"url"
)
@ApiModelProperty
(
value
=
"头像url"
,
example
=
"url"
)
private
String
headUrl
;
@ApiModelProperty
(
value
=
"性别"
,
example
=
"1"
)
private
Integer
sex
;
}
src/main/java/cn/timer/api/utils/AddressUtils.java
View file @
4db73623
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
);
...
...
src/main/java/cn/timer/api/utils/UserIp.java
View file @
4db73623
...
...
@@ -351,6 +351,7 @@ public class UserIp {
return
macAddress
;
}
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
4db73623
...
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.convert.ConvertException
;
import
cn.hutool.core.lang.Console
;
...
...
@@ -118,14 +119,14 @@ public class RouterUtils {
router
.
setFlow
(
true
);
List
<
User
>
listUser
=
router
.
getRelation
().
get
(
0
).
getUsers
();
user:
user:
for
(
int
i
=
0
;
i
<
listUser
.
size
();
i
++)
{
String
execute
=
listUser
.
get
(
i
).
getExecute
();
switch
(
execute
)
{
case
UNEXECUTED:
listUser
.
get
(
i
).
setExecute
(
EXECUTING
);
// 首次发起申请时,写入 审批人名称 至 obj 中
if
(
isFirse
)
{
if
(
isFirse
&&
obj
.
getStr
(
"current_approver"
)
==
null
)
{
obj
.
set
(
"current_approver"
,
listUser
.
get
(
i
).
getName
());
}
...
...
@@ -420,10 +421,14 @@ public class RouterUtils {
for
(
int
i
=
0
,
n
=
listFlowChildren
.
size
();
i
<
n
;
i
++)
{
// 新增 执行人
List
<
User
>
listUser
=
listFlowChildren
.
get
(
i
).
getRelation
().
get
(
0
).
getUsers
();
if
(
EXECUTED
.
equals
(
listFlowChildren
.
get
(
i
).
getExecute
()))
{
}
else
if
(
EXECUTING
.
equals
(
listFlowChildren
.
get
(
i
).
getExecute
()))
{
List
<
User
>
listUser
=
CollUtil
.
toList
();
List
<
Relation
>
listR
=
listFlowChildren
.
get
(
i
).
getRelation
();
if
(
CollectionUtil
.
isNotEmpty
(
listR
))
{
listUser
=
listR
.
get
(
0
).
getUsers
();
}
if
(
EXECUTING
.
equals
(
listFlowChildren
.
get
(
i
).
getExecute
()))
{
for
(
int
i_user
=
0
,
n_user
=
listUser
.
size
();
i_user
<
n_user
;
i_user
++)
{
if
(
EXECUTED
.
equals
(
listUser
.
get
(
i_user
).
getExecute
()))
{
...
...
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
View file @
4db73623
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
java.
text.ParseException
;
import
java.
util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.controller.yggl.service.YgglService
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.dto.yggl.YgzzDto
;
...
...
@@ -60,7 +63,13 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
.
build
();
// 调 员工管理 业务
ygglService
.
applicationRegularization
(
ygzzDto
);
YgglMainEmp
.
builder
()
.
jobStatus
(
2
)
.
zzTime
(
ygzzDto
.
getZzTime
())
.
sjzzTime
(
new
Date
())
.
zzRemark
(
ygzzDto
.
getZzRemark
())
.
build
().
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
ygzzDto
.
getEmpNum
()));
// ygglService.applicationRegularization(ygzzDto);
}
}
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
View file @
4db73623
...
...
@@ -8,8 +8,16 @@ import cn.timer.api.utils.router.enums.ApproveEnum;
*
*/
public
class
SpmkAssoBusinessFactory
{
static
SpmkAssoBusinessFactory
factory
;
public
static
SpmkAssoBusinessFactory
getFactory
()
{
return
factory
==
null
?
new
SpmkAssoBusinessFactory
()
:
factory
;
}
public
static
SpmkAssoBusiness
createSpmkAssoType
(
ApproveEnum
assotype
)
{
public
SpmkAssoBusiness
createSpmkAssoType
(
ApproveEnum
assotype
)
{
SpmkAssoBusiness
sat
=
null
;
switch
(
assotype
)
{
case
DEFAULT:
...
...
src/main/resources/mapping/qyzx/QyzxOperLogMapper.xml
View file @
4db73623
...
...
@@ -39,7 +39,7 @@
oper_ip,
oper_location,
<!-- oper_param, -->
json_result,
<!-- json_result, -->
status,
error_msg,
oper_time
...
...
@@ -96,6 +96,52 @@
ORDER BY a.oper_time DESC
</select>
<select
id=
"selectPageByQuery2"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM qyzx_oper_log a
WHERE a.org_code = #{param.orgCode}
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
AND a.emp_num IN
(
<foreach
item=
"it"
index=
"index"
collection=
"param.empNums"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
AND a.emp_num = #{param.empNums[0]}
</otherwise>
</choose>
</if>
<if
test=
"param.query != null and param.query != ''"
>
and (
a.title like CONCAT('%',#{param.query},'%') or
a.oper_name like CONCAT('%',#{param.query},'%') or
a.oper_id like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.businessType != null"
>
and a.business_type = #{param.businessType}
</if>
<if
test=
"param.operatorType != null"
>
and a.operator_type = #{param.operatorType}
</if>
<if
test=
"param.requestMethod != null"
>
and a.request_method = #{param.requestMethod}
</if>
<if
test=
"param.startTime != null and param.startTime != ''"
>
and a.oper_time
<![CDATA[ >= ]]>
#{param.startTime}
</if>
<if
test=
"param.endTime != null and param.endTime != ''"
>
and a.oper_time
<![CDATA[ <= ]]>
#{param.endTime}
</if>
ORDER BY a.oper_time DESC
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxOperLog">
...
...
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
View file @
4db73623
...
...
@@ -133,7 +133,11 @@
a.job_status,
a.rz_time,
a.bmgw_id,
a.org_code
a.org_code,
a.zj_type,
a.zj_num,
a.syq
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
@@ -257,7 +261,8 @@
a.job_type jobType,
a.phone phone,
a.job_status jobStatus,
a.head_url headUrl
a.head_url headUrl,
a.sex sex
FROM
yggl_main_emp a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
...
...
@@ -384,17 +389,17 @@
<!-- 籍贯统计(省份)查询 -->
<select
id=
"queryNativeplace"
resultType=
"cn.timer.api.dto.yggl.YgglCartogramDto"
>
SELECT
IFNULL(c.
name,'null') province,count(y.jg
) provinceNum
IFNULL(c.
city_name,'null') province,count(y.jg_id
) provinceNum
FROM
yggl_main_emp y
LEFT JOIN
c
ity_class
c
c
ommon_area
c
ON
y.jg
= c.
id
y.jg
_id = c.code_
id
WHERE
org_code = #{orgCode}
GROUP BY
c.name
c.
city_
name
</select>
<!-- 员工工龄分布查询 -->
...
...
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