Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
cbfafb73
Commit
cbfafb73
authored
Oct 23, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
e975b2e9
2fdd2179
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
365 additions
and
31 deletions
+365
-31
AppUserPositionTempDTO.java
...ub/wxiaoqi/security/admin/dto/AppUserPositionTempDTO.java
+10
-1
AppUserPositionTempFindDTO.java
...xiaoqi/security/admin/dto/AppUserPositionTempFindDTO.java
+1
-0
AppUserJobLevel.java
...github/wxiaoqi/security/admin/entity/AppUserJobLevel.java
+77
-0
AppUserPositionTemp.java
...ub/wxiaoqi/security/admin/entity/AppUserPositionTemp.java
+18
-0
AppUserPositionTempVo.java
...thub/wxiaoqi/security/admin/vo/AppUserPositionTempVo.java
+14
-0
AppUserJobLevelBiz.java
...github/wxiaoqi/security/admin/biz/AppUserJobLevelBiz.java
+49
-0
AppUserPositionBiz.java
...github/wxiaoqi/security/admin/biz/AppUserPositionBiz.java
+0
-3
AppUserPositionTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
+81
-11
AppUserJobLevelMapper.java
.../wxiaoqi/security/admin/mapper/AppUserJobLevelMapper.java
+19
-0
AppUserPositionController.java
.../security/admin/rest/admin/AppUserPositionController.java
+21
-3
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+16
-12
CompanyBaseBiz.java
...in/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
+33
-0
CompanyBaseMapper.java
...a/com/xxfc/platform/vehicle/mapper/CompanyBaseMapper.java
+5
-0
CompanyController.java
...m/xxfc/platform/vehicle/rest/admin/CompanyController.java
+8
-1
CompanyBaseMapper.xml
...le-server/src/main/resources/mapper/CompanyBaseMapper.xml
+13
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserPositionTempDTO.java
View file @
cbfafb73
...
...
@@ -25,7 +25,16 @@ public class AppUserPositionTempDTO {
private
String
name
;
@ApiModelProperty
(
value
=
"
职位
id"
)
@ApiModelProperty
(
value
=
"
身份
id"
)
private
Integer
positionId
;
@ApiModelProperty
(
value
=
"员工职位id"
)
private
Integer
jobId
;
@ApiModelProperty
(
value
=
"分公司id"
)
private
Integer
companyId
;
@ApiModelProperty
(
value
=
"分公司"
)
private
String
companyName
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserPositionTempFindDTO.java
View file @
cbfafb73
...
...
@@ -14,4 +14,5 @@ public class AppUserPositionTempFindDTO extends PageParam {
private
String
phone
;
private
String
name
;
private
Integer
status
;
private
Integer
companyId
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserJobLevel.java
0 → 100644
View file @
cbfafb73
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
/**
* 用户职位表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-09 10:00:42
*/
@Data
@Table
(
name
=
"app_user_job_level"
)
public
class
AppUserJobLevel
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 角色名称
*/
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"角色名称"
)
private
String
name
;
/**
* 等级
*/
@Column
(
name
=
"level"
)
@ApiModelProperty
(
value
=
"等级"
)
private
Integer
level
;
/**
* 状态:0-正常;1-禁用
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"状态:0-正常;1-禁用"
)
private
Integer
status
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 是否删除:0-正常;1-删除
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserPositionTemp.java
View file @
cbfafb73
...
...
@@ -43,6 +43,19 @@ public class AppUserPositionTemp implements Serializable {
@ApiModelProperty
(
value
=
"职位id"
)
private
Integer
positionId
;
@Column
(
name
=
"job_id"
)
@ApiModelProperty
(
value
=
"员工职位id"
)
private
Integer
jobId
;
@Column
(
name
=
"company_id"
)
@ApiModelProperty
(
value
=
"分公司id"
)
private
Integer
companyId
;
@Column
(
name
=
"company_name"
)
@ApiModelProperty
(
value
=
"分公司名称"
)
private
String
companyName
;
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
...
...
@@ -51,6 +64,11 @@ public class AppUserPositionTemp implements Serializable {
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
@Column
(
name
=
"is_del"
)
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AppUserPositionTempVo.java
View file @
cbfafb73
...
...
@@ -37,4 +37,18 @@ public class AppUserPositionTempVo {
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
@ApiModelProperty
(
value
=
"员工职位id"
)
private
Integer
jobId
;
@ApiModelProperty
(
value
=
"员工职位名称"
)
private
String
jobName
;
@ApiModelProperty
(
value
=
"分公司id"
)
private
Integer
companyId
;
@ApiModelProperty
(
value
=
"分公司名称"
)
private
String
companyName
;
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserJobLevelBiz.java
0 → 100644
View file @
cbfafb73
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.github.wxiaoqi.security.admin.dto.UserPostionDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserJobLevel
;
import
com.github.wxiaoqi.security.admin.entity.AppUserPosition
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserJobLevelMapper
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserPositionMapper
;
import
com.github.wxiaoqi.security.admin.vo.WalletPostionVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
* 用户身份职位表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-09 10:00:42
*/
@Transactional
@Service
public
class
AppUserJobLevelBiz
extends
BaseBiz
<
AppUserJobLevelMapper
,
AppUserJobLevel
>
{
public
Map
<
Integer
,
AppUserJobLevel
>
findJobIdAndJobMapByIds
(
List
<
Integer
>
jobIds
)
{
Map
<
Integer
,
AppUserJobLevel
>
postionMap
=
new
HashMap
<>();
List
<
AppUserJobLevel
>
data
=
mapper
.
selectByIdList
(
jobIds
);
if
(
CollectionUtils
.
isEmpty
(
data
)){
return
postionMap
;
}
postionMap
=
data
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserJobLevel:
:
getId
,
Function
.
identity
()));
return
postionMap
;
}
public
Map
<
Integer
,
String
>
findJobIdAndNameMap
()
{
List
<
AppUserJobLevel
>
postions
=
selectListAll
();
return
postions
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserJobLevel:
:
getId
,
AppUserJobLevel:
:
getName
));
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionBiz.java
View file @
cbfafb73
...
...
@@ -3,15 +3,12 @@ package com.github.wxiaoqi.security.admin.biz;
import
com.github.wxiaoqi.security.admin.dto.UserPostionDTO
;
import
com.github.wxiaoqi.security.admin.vo.WalletPostionVo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.jsoup.select.Collector
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
com.github.wxiaoqi.security.admin.entity.AppUserPosition
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserPositionMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.Function
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
View file @
cbfafb73
...
...
@@ -2,6 +2,7 @@ package com.github.wxiaoqi.security.admin.biz;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempFindDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserJobLevel
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.entity.AppUserPosition
;
import
com.github.wxiaoqi.security.admin.entity.AppUserPositionTemp
;
...
...
@@ -13,6 +14,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -51,12 +54,28 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
private
Map
<
Integer
,
String
>
postionIdAndNameMap
;
@Autowired
private
VehicleFeign
vehicleFeign
;
@Autowired
AppUserJobLevelBiz
jobLevelBiz
;
public
ObjectRestResponse
add
(
AppUserPositionTempDTO
appUserPositionTempDTO
)
{
if
(
appUserPositionTempDTO
==
null
||
StringUtils
.
isBlank
(
appUserPositionTempDTO
.
getPhone
())
||
StringUtils
.
isBlank
(
appUserPositionTempDTO
.
getName
())
||
appUserPositionTempDTO
.
getPositionId
()
==
null
||
appUserPositionTempDTO
.
getPositionId
()
==
0
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"参数不能为空"
);
}
Integer
companyId
=
appUserPositionTempDTO
.
getCompanyId
();
String
companyName
=
appUserPositionTempDTO
.
getCompanyName
();
if
(!(
companyId
!=
null
&&
companyId
>
0
&&
StringUtils
.
isNotBlank
(
companyName
)))
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"分公司不存在"
);
BranchCompany
branchCompany
=
vehicleFeign
.
companyId
(
companyName
);
if
(
branchCompany
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"分公司不存在"
);
}
companyId
=
branchCompany
.
getId
();
companyName
=
branchCompany
.
getName
();
String
phone
=
appUserPositionTempDTO
.
getPhone
();
Integer
id
=
appUserPositionTempDTO
.
getId
()
==
null
?
0
:
appUserPositionTempDTO
.
getId
();
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
...
...
@@ -73,6 +92,8 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
AppUserPositionTemp
userPositionTemp
=
new
AppUserPositionTemp
();
BeanUtils
.
copyProperties
(
appUserPositionTempDTO
,
userPositionTemp
);
userPositionTemp
.
setUserId
(
userId
);
userPositionTemp
.
setCompanyId
(
companyId
);
userPositionTemp
.
setCompanyName
(
companyName
);
//编辑
if
(
id
==
null
||
id
==
0
)
{
insertSelective
(
userPositionTemp
);
...
...
@@ -103,14 +124,18 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
if
(
StringUtils
.
isNotEmpty
(
appUserPositionTempFindDTO
.
getPhone
()))
{
criteria
.
andEqualTo
(
"phone"
,
appUserPositionTempFindDTO
.
getPhone
());
}
if
(
Objects
.
nonNull
(
appUserPositionTempFindDTO
.
getCompanyId
()))
{
criteria
.
andEqualTo
(
"companyId"
,
appUserPositionTempFindDTO
.
getCompanyId
());
}
if
(
Objects
.
nonNull
(
appUserPositionTempFindDTO
.
getStatus
()))
{
if
(
DataStatus
.
USERED
.
code
==
appUserPositionTempFindDTO
.
getStatus
())
{
criteria
.
and
IsNotNull
(
"userId"
);
criteria
.
and
NotEqualTo
(
"userId"
,
0
);
}
if
(
DataStatus
.
NO_USERED
.
code
==
appUserPositionTempFindDTO
.
getStatus
())
{
criteria
.
and
IsNull
(
"userId"
);
criteria
.
and
EqualTo
(
"userId"
,
0
);
}
}
example
.
setOrderByClause
(
"upd_time desc"
);
PageDataVO
<
AppUserPositionTemp
>
pageDataVO
=
PageDataVO
.
pageInfo
(
appUserPositionTempFindDTO
.
getPage
(),
appUserPositionTempFindDTO
.
getLimit
(),
()
->
mapper
.
selectByExample
(
example
));
List
<
AppUserPositionTemp
>
data
=
pageDataVO
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
data
))
{
...
...
@@ -122,14 +147,17 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
List
<
Integer
>
postionIds
=
data
.
stream
().
map
(
AppUserPositionTemp:
:
getPositionId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
AppUserPosition
>
postionMap
=
appUserPositionBiz
.
findPostionIdAndPostionMapByIds
(
postionIds
);
List
<
Integer
>
jobIds
=
data
.
stream
().
map
(
AppUserPositionTemp:
:
getJobId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
AppUserJobLevel
>
jobMap
=
jobLevelBiz
.
findJobIdAndJobMapByIds
(
jobIds
);
List
<
AppUserPositionTempVo
>
appUserPositionTempVos
=
new
ArrayList
<>();
AppUserPositionTempVo
appUserPositionTempVo
;
for
(
AppUserPositionTemp
appUserPositionTemp
:
data
)
{
appUserPositionTempVo
=
new
AppUserPositionTempVo
();
BeanUtils
.
copyProperties
(
appUserPositionTemp
,
appUserPositionTempVo
);
String
postionName
=
postionMap
==
null
?
""
:
postionMap
.
get
(
appUserPositionTemp
.
getPositionId
())==
null
?
""
:
postionMap
.
get
(
appUserPositionTemp
.
getPositionId
()).
getName
();
String
jobName
=
jobMap
==
null
?
""
:
jobMap
.
get
(
appUserPositionTemp
.
getJobId
())==
null
?
""
:
jobMap
.
get
(
appUserPositionTemp
.
getJobId
()).
getName
();
appUserPositionTempVo
.
setPositionName
(
postionName
);
appUserPositionTempVo
.
setJobName
(
jobName
);
appUserPositionTempVo
.
setStatus
(
appUserPositionTemp
.
getUserId
()
==
null
?
DataStatus
.
NO_USERED
.
code
:
appUserPositionTemp
.
getUserId
()==
0
?
DataStatus
.
NO_USERED
.
code
:
DataStatus
.
USERED
.
code
);
appUserPositionTempVos
.
add
(
appUserPositionTempVo
);
}
...
...
@@ -165,26 +193,67 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
if
(
StringUtils
.
isEmpty
(
postionName
)){
throw
new
BaseException
(
"身份为空"
);
}
//根据手机号查询userId
AppUserLogin
userLogin
=
loginBiz
.
checkeUserLogin
(
phone
);
if
(
StringUtils
.
isNotBlank
(
name
)){
name
.
replaceAll
(
" "
,
""
);
}
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
example
.
createCriteria
().
andEqualTo
(
"phone"
,
phone
).
andEqualTo
(
"isDel"
,
0
);
List
<
AppUserPositionTemp
>
list
=
selectByExample
(
example
);
Integer
id
=
0
;
Integer
userId
=
0
;
if
(
list
.
size
()>
0
){
AppUserPositionTemp
appUserPositionTemp1
=
list
.
get
(
0
);
id
=
appUserPositionTemp1
.
getId
();
userId
=
appUserPositionTemp1
.
getUserId
();
}
if
(
userId
==
null
||
userId
==
0
){
//根据手机号查询userId
AppUserLogin
userLogin
=
loginBiz
.
checkeUserLogin
(
phone
);
if
(
Objects
.
nonNull
(
userLogin
))
{
userId
=
userLogin
.
getId
();
}
}
for
(
Map
.
Entry
<
Integer
,
String
>
integerStringEntry
:
entrySet
)
{
if
(
integerStringEntry
.
getValue
().
contains
(
postionName
))
{
postionId
=
integerStringEntry
.
getKey
();
break
;
}
}
String
companyName
=
data
[
3
];
Integer
companyId
=
0
;
if
(
StringUtils
.
isNotBlank
(
companyName
)){
BranchCompany
branchCompany
=
vehicleFeign
.
companyId
(
companyName
);
if
(
branchCompany
!=
null
){
companyId
=
branchCompany
.
getId
();
companyName
=
branchCompany
.
getName
();
}
else
{
companyName
=
null
;
}
}
String
jobName
=
data
[
4
];
Integer
jobId
=
2
;
if
(
StringUtils
.
isNotBlank
(
jobName
)&&
jobName
.
contains
(
"销售"
)){
jobId
=
1
;
}
appUserPositionTemp
=
new
AppUserPositionTemp
();
appUserPositionTemp
.
setCrtTime
(
Instant
.
now
().
toEpochMilli
());
appUserPositionTemp
.
setName
(
name
);
appUserPositionTemp
.
setPositionId
(
postionId
);
appUserPositionTemp
.
setPhone
(
phone
);
appUserPositionTemp
.
setUserId
(
0
);
if
(
Objects
.
nonNull
(
userLogin
))
{
appUserPositionTemp
.
setCompanyId
(
companyId
);
appUserPositionTemp
.
setCompanyName
(
companyName
);
appUserPositionTemp
.
setJobId
(
jobId
);
if
(
userId
!=
null
&&
userId
>
0
)
{
//更新用户身份信息
detailBiz
.
updateUserPositionByUserId
(
userLogin
.
getId
(),
postionId
);
appUserPositionTemp
.
setUserId
(
userLogin
.
getId
());
detailBiz
.
updateUserPositionByUserId
(
userId
,
postionId
);
appUserPositionTemp
.
setUserId
(
userId
);
}
if
(
id
!=
null
&&
id
>
0
){
appUserPositionTemp
.
setId
(
id
);
updateSelectiveById
(
appUserPositionTemp
);
}
else
{
insertSelective
(
appUserPositionTemp
);
}
mapper
.
insertWithIgnoreRepeat
(
appUserPositionTemp
);
}
catch
(
BaseException
ex
)
{
errorResultMap
=
new
HashMap
<>(
1
);
errorResultMap
.
put
(
"num"
,
i
);
...
...
@@ -229,4 +298,5 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
postionIdAndNameMap
=
appUserPositionBiz
.
findPostionIdAndNameMap
()
==
null
?
Collections
.
EMPTY_MAP
:
appUserPositionBiz
.
findPostionIdAndNameMap
();
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/AppUserJobLevelMapper.java
0 → 100644
View file @
cbfafb73
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
mapper
;
import
com.github.wxiaoqi.security.admin.entity.AppUserJobLevel
;
import
tk.mybatis.mapper.additional.idlist.IdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* 用户身份职位表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-09 10:00:42
*/
public
interface
AppUserJobLevelMapper
extends
Mapper
<
AppUserJobLevel
>,
IdListMapper
<
AppUserJobLevel
,
Integer
>
{
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/AppUserPositionController.java
View file @
cbfafb73
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
.
admin
;
import
com.github.wxiaoqi.security.admin.biz.AppUserJobLevelBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserPositionBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserPositionTempBiz
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempDTO
;
...
...
@@ -30,9 +31,17 @@ public class AppUserPositionController {
@Autowired
private
AppUserPositionBiz
appUserPositionBiz
;
@Autowired
private
AppUserJobLevelBiz
jobLevelBiz
;
@Autowired
private
AppUserPositionTempBiz
appUserPositionTempBiz
;
@GetMapping
(
"/jobs"
)
public
ObjectRestResponse
findAllJobs
()
{
return
ObjectRestResponse
.
succ
(
jobLevelBiz
.
selectListAll
());
}
@GetMapping
(
"/postions"
)
public
ObjectRestResponse
<
List
<
WalletPostionVo
>>
findAllPostions
()
{
List
<
WalletPostionVo
>
walletPostionVos
=
appUserPositionBiz
.
findAllPostions
();
...
...
@@ -50,10 +59,19 @@ public class AppUserPositionController {
* 新增或编辑身份信息
* @return
*/
@PostMapping
(
"/add"
)
@PostMapping
(
"/add
UserPostion
"
)
public
ObjectRestResponse
<
Void
>
addUserPostion
(
@RequestBody
AppUserPositionTempDTO
appUserPositionTempDTO
){
appUserPositionTempBiz
.
add
(
appUserPositionTempDTO
);
return
ObjectRestResponse
.
succ
();
return
appUserPositionTempBiz
.
add
(
appUserPositionTempDTO
);
}
/**
* 新增或编辑身份信息
* @return
*/
@PostMapping
(
"/updUserPostion"
)
public
ObjectRestResponse
<
Void
>
updUserPostion
(
@RequestBody
AppUserPositionTempDTO
appUserPositionTempDTO
){
return
appUserPositionTempBiz
.
add
(
appUserPositionTempDTO
);
}
/**
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
cbfafb73
...
...
@@ -30,7 +30,7 @@ public interface VehicleFeign {
public
ObjectRestResponse
<
Vehicle
>
get
(
@PathVariable
(
value
=
"id"
)
String
id
);
@RequestMapping
(
value
=
"/vehicleInfo/findById"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
Vehicle
>
findById
(
@RequestParam
(
value
=
"id"
)
String
id
);
public
RestResponse
<
Vehicle
>
findById
(
@RequestParam
(
value
=
"id"
)
String
id
);
@RequestMapping
(
value
=
"/vehicleInfo/getByIds"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
List
<
Vehicle
>>
getByIds
(
@RequestParam
(
value
=
"ids"
)
List
<
String
>
id
);
...
...
@@ -44,11 +44,11 @@ public interface VehicleFeign {
public
RestResponse
arrivalBySmall
(
@RequestBody
VehicleArrivalVo
arrivalVo
);
@GetMapping
(
value
=
"/vehicleModel/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
//修改评分
@RequestMapping
(
value
=
"/vehicleModel/app/addScore"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
addScore
(
@RequestParam
(
value
=
"id"
)
Integer
id
,
@RequestParam
(
value
=
"score"
)
Integer
score
);
public
RestResponse
addScore
(
@RequestParam
(
value
=
"id"
)
Integer
id
,
@RequestParam
(
value
=
"score"
)
Integer
score
);
@RequestMapping
(
value
=
"/vehicleInfo/rent/book/vehicle"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
VehicleBookRecord
>
rentApplyVehicle
(
@RequestBody
RentVehicleBookDTO
rentVehicleBookDTO
);
...
...
@@ -71,25 +71,29 @@ public interface VehicleFeign {
//获取分公司列表
@GetMapping
(
"/branchCompany/all"
)
public
List
<
BranchCompany
>
companyAll
(
@RequestParam
(
value
=
"dataAll"
)
Integer
dataAll
,
@RequestParam
(
value
=
"dataCompany"
)
String
dataCompany
,
@RequestParam
(
value
=
"dataZone"
)
String
dataZone
);
@RequestParam
(
value
=
"dataAll"
)
Integer
dataAll
,
@RequestParam
(
value
=
"dataCompany"
)
String
dataCompany
,
@RequestParam
(
value
=
"dataZone"
)
String
dataZone
);
//获取分公司列表
@GetMapping
(
"/company/base/app/unauth/companyId"
)
public
BranchCompany
companyId
(
@RequestParam
(
value
=
"name"
)
String
name
);
@GetMapping
(
"/branchCompany/entityList"
)
public
ObjectRestResponse
<
List
<
BranchCompany
>>
branchCompanyEntityList
(
@RequestParam
(
"entity"
)
Map
<
String
,
Object
>
entity
);
@RequestMapping
(
value
=
"/user/license/one"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
VehicleUserLicense
>
one
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
public
RestResponse
<
VehicleUserLicense
>
one
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestMapping
(
value
=
"/user/license/company/getOne"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
VehicleUserLicense
>
getOne
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestMapping
(
value
=
"/user/license/multi"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
VehicleUserLicense
>>
multi
(
@RequestBody
QueryMultiDTO
dto
)
throws
Exception
;
@GetMapping
(
"/user/license/getVehicleLicenseList"
)
public
ObjectRestResponse
<
List
<
VehicleUserLicense
>>
getVehicleLicenseList
(
@RequestParam
(
value
=
"ids"
)
String
ids
);
public
ObjectRestResponse
<
List
<
VehicleUserLicense
>>
getVehicleLicenseList
(
@RequestParam
(
value
=
"ids"
)
String
ids
);
/**
* 获取优质车型接口
...
...
@@ -122,8 +126,8 @@ public interface VehicleFeign {
* @return
*/
@GetMapping
(
"/city/corporationCity"
)
ObjectRestResponse
<
Set
<
Integer
>>
corporationCity
(
@RequestParam
(
value
=
"zoneList"
)
String
zoneList
,
@RequestParam
(
value
=
"companyList"
)
String
companyList
);
ObjectRestResponse
<
Set
<
Integer
>>
corporationCity
(
@RequestParam
(
value
=
"zoneList"
)
String
zoneList
,
@RequestParam
(
value
=
"companyList"
)
String
companyList
);
@GetMapping
(
"/accompanyingItem/app/unauth/items"
)
...
...
@@ -163,7 +167,7 @@ public interface VehicleFeign {
PageDataVO
<
BranchCompanyListVO
>
findBranchCompanyWithPage
(
@RequestBody
BranchCompanyFindDTO
branchCompanyFindDTO
);
@GetMapping
(
"/vehicleInfo/findVehicleIds"
)
List
<
String
>
findbyPlateNumberAndVehicleCod
(
@RequestParam
(
value
=
"plateNumber"
)
String
plateNumber
,
@RequestParam
(
value
=
"vehicleCode"
)
String
vehicleCode
);
List
<
String
>
findbyPlateNumberAndVehicleCod
(
@RequestParam
(
value
=
"plateNumber"
)
String
plateNumber
,
@RequestParam
(
value
=
"vehicleCode"
)
String
vehicleCode
);
@RequestMapping
(
value
=
"/vehicleInfo/bookRecord/update"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
update
(
@RequestBody
BookRecordUpdateLog
bookRecordUpdateLog
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
View file @
cbfafb73
...
...
@@ -198,6 +198,35 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
return
ObjectRestResponse
.
succ
();
}
//临时数据同步6
public
ObjectRestResponse
synchro6
(){
List
<
CompanyBase
>
list
=
mapper
.
getBaseList
();
if
(
list
.
size
()>
0
){
int
num
=
0
;
for
(
CompanyBase
companyBase:
list
){
String
name
=
companyBase
.
getName
();
BranchCompany
branchCompany
=
new
BranchCompany
();
branchCompany
.
setCompanyBaseId
(
companyBase
.
getId
());
name
=
name
.
substring
(
name
.
indexOf
(
"("
)+
1
,
name
.
indexOf
(
")"
));
name
+=
"分公司"
;
log
.
info
(
"----name=="
+
name
);
branchCompany
.
setName
(
name
);
branchCompany
.
setAddrProvince
(
companyBase
.
getAddrProvince
());
branchCompany
.
setProvinceName
(
companyBase
.
getProvinceName
());
branchCompany
.
setAddrCity
(
companyBase
.
getAddrCity
());
branchCompany
.
setCityName
(
companyBase
.
getCityName
());
branchCompany
.
setAddrTown
(
companyBase
.
getAddrTown
());
branchCompany
.
setTownName
(
companyBase
.
getTownName
());
branchCompany
.
setZoneId
(
companyBase
.
getZoneId
());
branchCompany
.
setStatus
(
1
);
branchCompanyBiz
.
insertSelective
(
branchCompany
);
num
++;
log
.
info
(
"----成功---num=="
+
num
+
"---companyBaseId==="
+
companyBase
.
getId
());
}
}
return
ObjectRestResponse
.
succ
();
}
//临时数据同步3
public
ObjectRestResponse
synchro3
(){
List
<
BranchCompanyStockInfo
>
list
=
stockInfoMapper
.
selectAll
();
...
...
@@ -434,4 +463,8 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
return
companyBaseVo
;
}
public
BranchCompany
getCompanyId
(
String
name
){
return
mapper
.
getCompanyId
(
name
);
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/CompanyBaseMapper.java
View file @
cbfafb73
package
com
.
xxfc
.
platform
.
vehicle
.
mapper
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.CompanyBase
;
import
com.xxfc.platform.vehicle.pojo.dto.CompanyBaseDetailDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.CompanyVo
;
...
...
@@ -25,4 +26,8 @@ public interface CompanyBaseMapper extends Mapper<CompanyBase> {
CompanyBaseDetailDTO
findCompanyBaseById
(
@Param
(
"id"
)
Integer
id
);
List
<
CompanyBase
>
getList
(
CompanyVo
companyVo
);
List
<
CompanyBase
>
getBaseList
();
BranchCompany
getCompanyId
(
@Param
(
"name"
)
String
name
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/CompanyController.java
View file @
cbfafb73
...
...
@@ -5,6 +5,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.vehicle.biz.CompanyBaseBiz
;
import
com.xxfc.platform.vehicle.common.BaseController
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.pojo.vo.CompanyVo
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -34,7 +35,7 @@ public class CompanyController extends BaseController<CompanyBaseBiz> {
@ApiOperation
(
"同步股权3"
)
@PostMapping
(
"synchro3"
)
public
ObjectRestResponse
synchro3
()
{
return
baseBiz
.
synchro
5
();
return
baseBiz
.
synchro
6
();
}
...
...
@@ -91,6 +92,12 @@ public class CompanyController extends BaseController<CompanyBaseBiz> {
return
baseBiz
.
importExcel
(
multipartfile
,
request
);
}
@ApiOperation
(
"获取分公司"
)
@GetMapping
(
"app/unauth/companyId"
)
public
BranchCompany
companyId
(
@RequestParam
(
value
=
"name"
)
String
name
)
{
return
baseBiz
.
getCompanyId
(
name
);
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/CompanyBaseMapper.xml
View file @
cbfafb73
...
...
@@ -55,4 +55,17 @@
</where>
order by b.upd_time desc
</select>
<select
id=
"getBaseList"
resultType=
"com.xxfc.platform.vehicle.entity.CompanyBase"
>
SELECT b.id,b.`name`,b.addr_province as addrProvince,b.province_name as provinceName,b.addr_city as addrCity,b.city_name as cityName,b.zone_id as zoneId FROM company_base b LEFT JOIN branch_company c ON b.id=c.company_base_id
WHERE c.id IS NULL
</select>
<select
id=
"getCompanyId"
resultType=
"com.xxfc.platform.vehicle.entity.BranchCompany"
>
SELECT b.id,b.`name` FROM branch_company b LEFT JOIN company_base c ON b.company_base_id=c.id
WHERE c.`name` LIKE concat('%',#{name},'%') or b.`name` LIKE concat('%',#{name},'%')
LIMIT 1
</select>
</mapper>
\ No newline at end of file
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