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
e8b25718
Commit
e8b25718
authored
May 19, 2020
by
lal
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal
parents
923be99f
d942a883
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
200 additions
and
118 deletions
+200
-118
src/main/java/cn/timer/api/bean/qyzx/QyzxEntInfoM.java
+5
-2
src/main/java/cn/timer/api/bean/qyzx/auth/QyzxAuthAccount.java
+71
-0
src/main/java/cn/timer/api/controller/LoginController.java
+10
-16
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
+48
-0
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
+2
-3
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+59
-83
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+5
-14
No files found.
src/main/java/cn/timer/api/bean/qyzx/QyzxEntInfoM.java
View file @
e8b25718
...
@@ -52,7 +52,7 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
...
@@ -52,7 +52,7 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
@ApiModelProperty
(
value
=
"法人 "
,
example
=
"刘德华"
)
@ApiModelProperty
(
value
=
"法人 "
,
example
=
"刘德华"
)
private
String
operName
;
private
String
operName
;
@ApiModelProperty
(
value
=
"企业规模
10人以下、10-19人、20-99人、100-500人、
500人以上"
,
example
=
"3"
)
@ApiModelProperty
(
value
=
"企业规模
0:10人以下、1:10-19人、2:20-99人、3:100-500人、4:
500人以上"
,
example
=
"3"
)
private
Integer
size
;
private
Integer
size
;
@ApiModelProperty
(
value
=
"电话号码 "
,
example
=
"18712345678"
)
@ApiModelProperty
(
value
=
"电话号码 "
,
example
=
"18712345678"
)
...
@@ -73,7 +73,7 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
...
@@ -73,7 +73,7 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
@ApiModelProperty
(
value
=
"行业类型 1:农、林、牧、渔业、2:采矿业、3:制造业、4:电力、燃气及水的生产和供应业、5:建筑业、6:交通运输、仓储和邮政业、7:信息传输、计算机服务和软件业、8:批发和零售业、9:住宿和餐饮业、10:金融业、11:房地产业、12:租赁和商务服务业、13:科学研究、技术服务和地质勘查业、14:水利、环境和公共设施管理业、15:居民服务和其他服务业"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"行业类型 1:农、林、牧、渔业、2:采矿业、3:制造业、4:电力、燃气及水的生产和供应业、5:建筑业、6:交通运输、仓储和邮政业、7:信息传输、计算机服务和软件业、8:批发和零售业、9:住宿和餐饮业、10:金融业、11:房地产业、12:租赁和商务服务业、13:科学研究、技术服务和地质勘查业、14:水利、环境和公共设施管理业、15:居民服务和其他服务业"
,
example
=
"101"
)
private
Integer
industryType
;
private
Integer
industryType
;
@ApiModelProperty
(
value
=
"开通渠道 1直属、2总代理、3独家代理、4一般代理商、5区域代理商"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"开通渠道 1直属、2总代理、3独家代理、4一般代理商、5区域代理商
"
,
example
=
"101"
)
private
Integer
openChannel
;
private
Integer
openChannel
;
@ApiModelProperty
(
value
=
"联系人"
,
example
=
"刘德华"
)
@ApiModelProperty
(
value
=
"联系人"
,
example
=
"刘德华"
)
...
@@ -101,6 +101,9 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
...
@@ -101,6 +101,9 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
@ApiModelProperty
(
value
=
"认证时间 "
,
example
=
"2019-12-12 08:00:00"
)
@ApiModelProperty
(
value
=
"认证时间 "
,
example
=
"2019-12-12 08:00:00"
)
private
Date
attestTime
;
private
Date
attestTime
;
@ApiModelProperty
(
value
=
"认证通过时间 "
,
example
=
"2019-12-12 08:00:00"
)
private
Date
attestPassTime
;
@ApiModelProperty
(
value
=
"到期时间 "
,
example
=
"2039-12-12 08:00:00"
)
@ApiModelProperty
(
value
=
"到期时间 "
,
example
=
"2039-12-12 08:00:00"
)
private
Date
endTime
;
private
Date
endTime
;
...
...
src/main/java/cn/timer/api/bean/qyzx/auth/QyzxAuthAccount.java
0 → 100644
View file @
e8b25718
/**
* <p>Title: QyzxAuthAccount.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月19日
* @version 1.0
*/
package
cn
.
timer
.
api
.
bean
.
qyzx
.
auth
;
import
java.util.Date
;
import
javax.persistence.Entity
;
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
;
/**
* <p>Title: QyzxAuthAccount.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月19日
* @version 1.0
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"qyzx_auth_account"
)
@ApiModel
(
"权限账号表"
)
public
class
QyzxAuthAccount
extends
Model
<
QyzxAuthAccount
>{
private
static
final
long
serialVersionUID
=
-
7906463769401403202L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"主键"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"员工id"
,
example
=
"9688"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"企业id"
,
example
=
"117"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"头像url"
,
example
=
"ossUrl"
)
private
String
headUrl
;
@ApiModelProperty
(
value
=
"姓名"
,
example
=
"tz"
)
private
String
name
;
@ApiModelProperty
(
value
=
"主账号手机"
,
example
=
"18711519125"
)
private
String
accountPhone
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2020-05-20"
)
private
Date
createdTime
;
}
src/main/java/cn/timer/api/controller/LoginController.java
View file @
e8b25718
...
@@ -3,9 +3,7 @@ package cn.timer.api.controller;
...
@@ -3,9 +3,7 @@ package cn.timer.api.controller;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
javax.servlet.http.HttpSession
;
...
@@ -14,7 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -14,7 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -406,21 +403,18 @@ public class LoginController {
...
@@ -406,21 +403,18 @@ public class LoginController {
qyzxEmpLogin1
.
setPw
(
Md5
.
md5
(
"123456"
));
// 密码初始化
qyzxEmpLogin1
.
setPw
(
Md5
.
md5
(
"123456"
));
// 密码初始化
qyzxEmpLogin1
.
updateById
();
qyzxEmpLogin1
.
updateById
();
//员工信息 手机号修改
// 员工信息 手机号修改
YgglMainEmp
.
builder
().
phone
(
phone
).
build
().
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
qyzxEmpLogin1
.
getId
()));
YgglMainEmp
.
builder
().
phone
(
phone
).
build
().
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
qyzxEmpLogin1
.
getId
()));
return
ResultUtil
.
success
(
"修改手机号/用户名成功"
);
return
ResultUtil
.
success
(
"修改手机号/用户名成功"
);
}
}
return
ResultUtil
.
error
(
"修改手机号/用户名失败"
);
return
ResultUtil
.
error
(
"修改手机号/用户名失败"
);
}
}
@Autowired
@Autowired
SpmkServiceImpl
SpmkService
;
SpmkServiceImpl
SpmkService
;
/**
/**
* 注册企业
* 注册企业
...
@@ -464,7 +458,7 @@ public class LoginController {
...
@@ -464,7 +458,7 @@ public class LoginController {
}
}
// 企业信息
// 企业信息
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
name
(
name
).
registerTime
(
DateUtil
.
date
())
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
name
(
name
).
registerTime
(
DateUtil
.
date
())
.
phone
(
phone
).
operName
(
username
)
.
endTime
(
DateUtil
.
offsetDay
(
new
Date
(),
offset
)).
level
(
CommonEnum
.
LEVEL_PROBATION
.
getType
())
.
endTime
(
DateUtil
.
offsetDay
(
new
Date
(),
offset
)).
level
(
CommonEnum
.
LEVEL_PROBATION
.
getType
())
.
build
();
.
build
();
boolean
b1
=
qyzxEntInfoM
.
insert
();
boolean
b1
=
qyzxEntInfoM
.
insert
();
...
@@ -506,9 +500,9 @@ public class LoginController {
...
@@ -506,9 +500,9 @@ public class LoginController {
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"注册企业失败4"
);
return
ResultUtil
.
error
(
"注册企业失败4"
);
}
}
SpmkService
.
createCustomApproval
(
qyzxEntInfoM
.
getId
());
SpmkService
.
createCustomApproval
(
qyzxEntInfoM
.
getId
());
return
ResultUtil
.
success
(
"注册企业成功"
);
return
ResultUtil
.
success
(
"注册企业成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
@@ -635,7 +629,7 @@ public class LoginController {
...
@@ -635,7 +629,7 @@ public class LoginController {
if
(
qyzxEmpLogin1
!=
null
)
{
if
(
qyzxEmpLogin1
!=
null
)
{
if
(
StrUtil
.
hasBlank
(
pw
)
||
!
qyzxEmpLogin1
.
getPw
().
equals
(
Md5
.
md5
(
pw
)))
if
(
StrUtil
.
hasBlank
(
pw
)
||
!
qyzxEmpLogin1
.
getPw
().
equals
(
Md5
.
md5
(
pw
)))
return
ResultUtil
.
error
(
"帐号密码错误"
);
return
ResultUtil
.
error
(
"帐号密码错误"
);
return
loginhan
(
qyzxEmpLogin1
,
request
);
return
loginhan
(
qyzxEmpLogin1
,
request
);
}
else
{
}
else
{
return
ResultUtil
.
error
(
"帐号不存在-错误"
);
return
ResultUtil
.
error
(
"帐号不存在-错误"
);
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
0 → 100644
View file @
e8b25718
/**
* <p>Title: QyzxAuthController.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月19日
* @version 1.0
*/
package
cn
.
timer
.
api
.
controller
.
qyzx
;
import
java.util.List
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.utils.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* <p>Title: QyzxAuthController.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月19日
* @version 1.0
*/
@Transactional
@RestController
@Api
(
tags
=
"4.2企业中心(账号权限)"
)
@RequestMapping
(
value
=
"/qyzxAuth"
,
produces
=
{
"application/json"
})
public
class
QyzxAuthController
{
@GetMapping
(
value
=
"/getAll"
)
@ApiOperation
(
value
=
"获取全部账号信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Void
>
getAll
(
@CurrentUser
UserBean
userBean
)
{
return
null
;
}
}
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
View file @
e8b25718
...
@@ -14,8 +14,7 @@ import java.util.List;
...
@@ -14,8 +14,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.transaction.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -72,7 +71,7 @@ public class QyzxBusinessController {
...
@@ -72,7 +71,7 @@ public class QyzxBusinessController {
@GetMapping
(
value
=
"/getAllQuantity"
)
@GetMapping
(
value
=
"/getAllQuantity"
)
@ApiOperation
(
value
=
"获取全部套餐余量信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"获取全部套餐余量信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxRemainingQuantity
>>
s
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
List
<
QyzxRemainingQuantity
>>
getAllQuantity
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxRemainingQuantity
>
list
=
QyzxRemainingQuantity
.
builder
().
build
()
List
<
QyzxRemainingQuantity
>
list
=
QyzxRemainingQuantity
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxRemainingQuantity
>().
eq
(
QyzxRemainingQuantity:
:
getIsDelete
,
0
)
.
selectList
(
new
LambdaQueryWrapper
<
QyzxRemainingQuantity
>().
eq
(
QyzxRemainingQuantity:
:
getIsDelete
,
0
)
.
eq
(
QyzxRemainingQuantity:
:
getOrgCode
,
userBean
.
getOrgCode
()));
.
eq
(
QyzxRemainingQuantity:
:
getOrgCode
,
userBean
.
getOrgCode
()));
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
e8b25718
...
@@ -49,6 +49,7 @@ import cn.hutool.core.date.DateUtil;
...
@@ -49,6 +49,7 @@ import cn.hutool.core.date.DateUtil;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -116,7 +117,7 @@ public class YgglController {
...
@@ -116,7 +117,7 @@ public class YgglController {
@Value
(
value
=
"${config-8timer.init-password}"
)
@Value
(
value
=
"${config-8timer.init-password}"
)
private
String
pwd
;
private
String
pwd
;
@Autowired
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
private
YgglMainEmpMapper
ygglMainEmpMapper
;
...
@@ -153,12 +154,14 @@ public class YgglController {
...
@@ -153,12 +154,14 @@ public class YgglController {
if
(
ygglMainEmp
!=
null
)
{
if
(
ygglMainEmp
!=
null
)
{
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
)
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
.
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
).
eq
(
ZzglBmgwM:
:
getId
,
gw
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
if
(
gwObj
!=
null
)
{
if
(
gwObj
!=
null
)
{
ZzglBmgwM
bmObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getId
,
ZzglBmgwM:
:
getName
)
ZzglBmgwM
bmObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getId
,
gwObj
.
getUpId
()).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
.
select
(
ZzglBmgwM:
:
getId
,
ZzglBmgwM:
:
getName
).
eq
(
ZzglBmgwM:
:
getId
,
gwObj
.
getUpId
())
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
loginInfo
.
setBmId
(
bmObj
!=
null
?
bmObj
.
getId
()
:
null
);
loginInfo
.
setBmId
(
bmObj
!=
null
?
bmObj
.
getId
()
:
null
);
loginInfo
.
setBmName
(
bmObj
!=
null
?
bmObj
.
getName
()
:
null
);
loginInfo
.
setBmName
(
bmObj
!=
null
?
bmObj
.
getName
()
:
null
);
}
}
...
@@ -335,6 +338,7 @@ public class YgglController {
...
@@ -335,6 +338,7 @@ public class YgglController {
/**
/**
* 添加员工档案
* 添加员工档案
*
* @param userBean
* @param userBean
* @param addygdaDto
* @param addygdaDto
* @return
* @return
...
@@ -342,7 +346,8 @@ public class YgglController {
...
@@ -342,7 +346,8 @@ public class YgglController {
@PostMapping
(
value
=
"/addygda"
)
@PostMapping
(
value
=
"/addygda"
)
@ApiOperation
(
value
=
"添加员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"添加员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
)
@ApiOperationSupport
(
order
=
4
)
public
Result
<
Object
>
addygda
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AddygdaDto
addygdaDto
)
throws
Exception
{
public
Result
<
Object
>
addygda
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AddygdaDto
addygdaDto
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
String
name
=
addygdaDto
.
getName
();
String
name
=
addygdaDto
.
getName
();
String
phone
=
addygdaDto
.
getPhone
();
String
phone
=
addygdaDto
.
getPhone
();
...
@@ -372,21 +377,28 @@ public class YgglController {
...
@@ -372,21 +377,28 @@ public class YgglController {
}
}
Integer
jobType
=
addygdaDto
.
getJobType
();
Integer
jobType
=
addygdaDto
.
getJobType
();
Date
rzTime
=
addygdaDto
.
getRzTime
();
Date
rzTime
=
null
;
if
(
addygdaDto
.
getRzTime
()
==
null
)
rzTime
=
new
Date
();
else
rzTime
=
addygdaDto
.
getRzTime
();
Integer
syq
=
addygdaDto
.
getSyq
();
Integer
syq
=
addygdaDto
.
getSyq
();
Integer
sex
=
addygdaDto
.
getSex
();
Integer
sex
=
addygdaDto
.
getSex
();
Integer
bmgwId
=
addygdaDto
.
getBmgwId
();
Integer
bmgwId
=
addygdaDto
.
getBmgwId
();
if
(
StrUtil
.
hasBlank
(
phone
)
||
StrUtil
.
hasBlank
(
name
)
||
StrUtil
.
hasBlank
(
zjNum
))
{
if
(
StrUtil
.
hasBlank
(
phone
)
||
StrUtil
.
hasBlank
(
name
)
||
StrUtil
.
hasBlank
(
zjNum
))
{
return
ResultUtil
.
error
(
"请输入员工姓名,手机号和身份证号"
);
return
ResultUtil
.
error
(
"请输入员工姓名,手机号和身份证号"
);
}
}
if
(!
ObjectUtil
.
isAllNotEmpty
(
name
,
phone
,
zjType
,
zjNum
,
jobType
,
rzTime
,
syq
,
bmgwId
,
sex
))
{
if
(!
ObjectUtil
.
isAllNotEmpty
(
name
,
phone
,
zjType
,
zjNum
,
jobType
,
rzTime
,
syq
,
bmgwId
,
sex
))
{
return
ResultUtil
.
error
(
"请完善员工信息!"
);
return
ResultUtil
.
error
(
"请完善员工信息!"
);
}
}
if
(!
IdcardUtil
.
isValidCard
(
zjNum
))
{
return
ResultUtil
.
error
(
"请输入有效的证件信息!"
);
}
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(!
StrUtil
.
hasBlank
(
phone
),
QyzxEmpLogin:
:
getPhone
,
phone
).
one
();
.
eq
(!
StrUtil
.
hasBlank
(
phone
),
QyzxEmpLogin:
:
getPhone
,
phone
).
one
();
if
(
login
==
null
)
{
if
(
login
==
null
)
{
// 初始化密码
pwd
// 初始化密码 pwd
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
phone
).
pw
(
Md5
.
md5
(
pwd
))
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
phone
).
pw
(
Md5
.
md5
(
pwd
))
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
userBean
.
getOrgCode
()).
username
(
name
).
build
();
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
userBean
.
getOrgCode
()).
username
(
name
).
build
();
if
(!
qyzxEmpLogin
.
insert
())
{
if
(!
qyzxEmpLogin
.
insert
())
{
...
@@ -396,71 +408,39 @@ public class YgglController {
...
@@ -396,71 +408,39 @@ public class YgglController {
// 添加三张表
// 添加三张表
// 员工权限表(未定)
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso
.
builder
()
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
orgCode
)
.
empNum
(
qyzxEmpLogin
.
getId
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// usertype2普通员工 status1正常
.
orgCode
(
orgCode
)
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
())
.
jobType
(
jobType
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
rzTime
(
rzTime
).
syq
(
syq
)
.
status
(
1
)
.
sex
(
sex
).
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
orgCode
).
build
();
.
build
()
.
insert
();
// usertype2普通员工 status1正常
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
()
.
name
(
name
)
.
phone
(
phone
)
.
zjType
(
zjType
)
.
zjNum
(
zjNum
)
.
jobType
(
jobType
)
.
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
())
.
rzTime
(
rzTime
)
.
syq
(
syq
)
.
sex
(
sex
)
.
empNum
(
qyzxEmpLogin
.
getId
())
.
orgCode
(
orgCode
)
.
build
();
ygglMainEmp
.
insert
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
get
OrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
get
Id
,
ygglMainEmp
.
getId
()).
update
();
.
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
}
else
{
}
else
{
YgglMainEmp
ishad
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
YgglMainEmp
ishad
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
lambda
()
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
if
(
ishad
==
null
)
{
if
(
ishad
==
null
)
{
// 添加三张表
// 添加三张表
// 员工权限表(未定)
// 员工权限表(未定)
QyzxEmpEntAsso
.
builder
()
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
orgCode
)
.
empNum
(
login
.
getId
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// usertype2普通员工
.
orgCode
(
orgCode
)
// status1正常
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
())
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
)
.
status
(
1
)
.
jobType
(
jobType
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
rzTime
(
rzTime
).
syq
(
syq
)
.
build
()
.
sex
(
sex
).
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
build
();
.
insert
();
// usertype2普通员工
// status1正常
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
()
.
name
(
name
)
.
phone
(
phone
)
.
zjType
(
zjType
)
.
zjNum
(
zjNum
)
.
jobType
(
jobType
)
.
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
())
.
rzTime
(
rzTime
)
.
syq
(
syq
)
.
sex
(
sex
)
.
empNum
(
login
.
getId
())
.
orgCode
(
orgCode
)
.
build
();
ygglMainEmp
.
insert
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
get
OrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
get
Id
,
ygglMainEmp
.
getId
()).
update
();
.
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工档案成功!"
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工档案成功!"
);
}
else
{
}
else
{
...
@@ -534,7 +514,7 @@ public class YgglController {
...
@@ -534,7 +514,7 @@ public class YgglController {
return
ResultUtil
.
data
(
ygglMainEmpPage
,
"员工搜索成功"
);
return
ResultUtil
.
data
(
ygglMainEmpPage
,
"员工搜索成功"
);
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
}
}
/**
/**
* 导入员工档案
* 导入员工档案
*/
*/
...
@@ -543,32 +523,27 @@ public class YgglController {
...
@@ -543,32 +523,27 @@ public class YgglController {
@ApiOperationSupport
(
order
=
7
)
@ApiOperationSupport
(
order
=
7
)
public
Result
<
List
<
YgDrjqbDto
>>
importEmpRecord
(
public
Result
<
List
<
YgDrjqbDto
>>
importEmpRecord
(
@CurrentUser
UserBean
userBean
/* ,@Validated @RequestBody List<AddygdaDto> listAddygdaDto */
)
{
@CurrentUser
UserBean
userBean
/* ,@Validated @RequestBody List<AddygdaDto> listAddygdaDto */
)
{
List
<
QyzxEmpLogin
>
listEl
=
qyzxEmpLoginMapper
List
<
QyzxEmpLogin
>
listEl
=
qyzxEmpLoginMapper
.
selectList
(
new
QueryWrapper
<
QyzxEmpLogin
>().
lambda
()
.
selectList
(
new
QueryWrapper
<
QyzxEmpLogin
>().
lambda
().
select
(
QyzxEmpLogin:
:
getPhone
));
.
select
(
QyzxEmpLogin:
:
getPhone
));
listEl
=
listEl
!=
null
?
listEl
.
stream
()
listEl
=
listEl
!=
null
?
listEl
.
stream
()
.
filter
(
o
->
o
!=
null
&&
o
.
getPhone
()
!=
null
).
collect
(
Collectors
.
toList
())
:
null
;
.
filter
(
o
->
o
!=
null
&&
o
.
getPhone
()
!=
null
)
.
collect
(
Collectors
.
toList
())
:
null
;
System
.
out
.
println
(
JSONUtil
.
parseObj
(
listEl
));
System
.
out
.
println
(
JSONUtil
.
parseObj
(
listEl
));
// listEl.stream().filter(predicate)
// listEl.stream().filter(predicate)
// listEl.stream().filter(item -> objId.equals(item.getUpId())).forEach(zzglBmgwM -> {
// listEl.stream().filter(item -> objId.equals(item.getUpId())).forEach(zzglBmgwM -> {
// list.add(zzglBmgwM.getId());
// list.add(zzglBmgwM.getId());
// getDepts(list, zzglBmgwM.getId(), objs);
// getDepts(list, zzglBmgwM.getId(), objs);
// });
// });
//抽取 登录表 的phone的集合
// 抽取 登录表 的phone的集合
List
<
String
>
listPhone
=
listEl
.
stream
()
List
<
String
>
listPhone
=
listEl
.
stream
().
map
(
QyzxEmpLogin:
:
getPhone
).
collect
(
Collectors
.
toList
());
.
map
(
QyzxEmpLogin:
:
getPhone
)
.
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
JSONUtil
.
parseObj
(
listPhone
));
System
.
out
.
println
(
JSONUtil
.
parseObj
(
listPhone
));
listEl
.
stream
().
filter
(
i
->
i
!=
null
).
collect
(
Collectors
.<
QyzxEmpLogin
>
toList
());
listEl
.
stream
().
filter
(
i
->
i
!=
null
).
collect
(
Collectors
.<
QyzxEmpLogin
>
toList
());
return
null
;
return
null
;
}
}
/**
/**
* 导入威力加强版
* 导入威力加强版
*
*
...
@@ -624,8 +599,8 @@ public class YgglController {
...
@@ -624,8 +599,8 @@ public class YgglController {
}
}
// 员工权限表(未定)
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
())
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
).
zjNum
(
e
.
getZj
())
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
).
zjNum
(
e
.
getZj
())
.
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
()).
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
)
.
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
()).
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
)
.
sex
(
sex
).
jobNum
(
jobNum
).
bmgwId
(
gw
).
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
sex
(
sex
).
jobNum
(
jobNum
).
bmgwId
(
gw
).
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
...
@@ -643,8 +618,8 @@ public class YgglController {
...
@@ -643,8 +618,8 @@ public class YgglController {
.
eq
(
"phone"
,
e
.
getPhone
()).
eq
(
"org_code"
,
userBean
.
getOrgCode
()));
.
eq
(
"phone"
,
e
.
getPhone
()).
eq
(
"org_code"
,
userBean
.
getOrgCode
()));
if
(
ishad
==
null
)
{
if
(
ishad
==
null
)
{
// 员工权限表(未定)
// 员工权限表(未定)
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
)
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
build
().
insert
();
// userType2普通员工,status1正常
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
)
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
)
.
zjNum
(
e
.
getZj
()).
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
())
.
zjNum
(
e
.
getZj
()).
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
())
.
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
).
sex
(
sex
).
jobNum
(
jobNum
).
empNum
(
login
.
getId
())
.
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
).
sex
(
sex
).
jobNum
(
jobNum
).
empNum
(
login
.
getId
())
...
@@ -1633,7 +1608,8 @@ public class YgglController {
...
@@ -1633,7 +1608,8 @@ public class YgglController {
updateWrapper
.
eq
(
"emp_num"
,
empNum
);
updateWrapper
.
eq
(
"emp_num"
,
empNum
);
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
empNum
);
updateWrapper1
.
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
build
().
update
(
updateWrapper
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
())
.
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
...
@@ -1653,13 +1629,13 @@ public class YgglController {
...
@@ -1653,13 +1629,13 @@ public class YgglController {
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
// 删除员工档案表
// 删除员工档案表
ygglMainEmpMapper
.
delete
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
ygglMainEmpMapper
.
delete
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
YgglMainLzb
.
builder
().
empNum
(
empNum
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
sjlzTime
(
new
Date
())
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
));
// 确认离职 删除员工关联表
// 确认离职 删除员工关联表
QyzxEmpEntAsso
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
build
()
QyzxEmpEntAsso
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
build
()
.
delete
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
empNum
));
.
delete
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
empNum
));
// 初始化 部门主管
// 初始化 部门主管
zzglBmgwMMapper
.
update
(
ZzglBmgwM
.
builder
().
leader
(
null
).
build
(),
zzglBmgwMMapper
.
update
(
ZzglBmgwM
.
builder
().
leader
(
null
).
build
(),
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
e8b25718
package
cn
.
timer
.
api
.
controller
.
zzgl
;
package
cn
.
timer
.
api
.
controller
.
zzgl
;
import
java.lang.reflect.Type
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
...
@@ -27,11 +22,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp
...
@@ -27,11 +22,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.ValueProvider
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNode
;
import
cn.hutool.core.lang.tree.TreeNode
;
...
@@ -114,14 +105,14 @@ public class ZzglController {
...
@@ -114,14 +105,14 @@ public class ZzglController {
// treeNodeConfig.setDeep(10);
// treeNodeConfig.setDeep(10);
//转换器
//转换器
List
<
Tree
<
String
>>
treeNodes
=
TreeUtil
.
build
(
nodeList
,
"0"
,
treeNodeConfig
,
List
<
Tree
<
String
>>
treeNodes
=
TreeUtil
.
build
(
zzglBmgwMs
,
"0"
,
treeNodeConfig
,
(
treeNode
,
tree
)
->
{
(
treeNode
,
tree
)
->
{
tree
.
setId
(
treeNode
.
getId
(
));
tree
.
setId
(
Convert
.
toStr
(
treeNode
.
getId
()
));
tree
.
setParentId
(
treeNode
.
getParentId
(
));
tree
.
setParentId
(
Convert
.
toStr
(
treeNode
.
getUpId
()
));
tree
.
setWeight
(
treeNode
.
getWeight
());
//
tree.setWeight(treeNode.getWeight());
tree
.
setName
(
treeNode
.
getName
());
tree
.
setName
(
treeNode
.
getName
());
// 扩展属性 ...
// 扩展属性 ...
// tree.putExtra("extraField", 666
);
tree
.
putExtra
(
"leader"
,
treeNode
.
getLeader
()
);
// tree.putExtra("other", new Object());
// tree.putExtra("other", new Object());
});
});
...
...
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