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
657bfda9
Commit
657bfda9
authored
Oct 27, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-chw' into dev-chw
parents
321a895b
e5269e88
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
230 additions
and
21 deletions
+230
-21
CompanyApplyFindDTO.java
...ithub/wxiaoqi/security/admin/dto/CompanyApplyFindDTO.java
+2
-0
CompanyInfoBiz.java
...com/github/wxiaoqi/security/admin/biz/CompanyInfoBiz.java
+7
-0
AppCompanyInfoController.java
...wxiaoqi/security/admin/rest/AppCompanyInfoController.java
+19
-0
AdminBranchCompanyBannerController.java
.../admin/rest/admin/AdminBranchCompanyBannerController.java
+11
-1
BranchCompanyBannerMapper.xml
...n/src/main/resources/mapper/BranchCompanyBannerMapper.xml
+7
-0
CompanyInfoApplyMapper.xml
...dmin/src/main/resources/mapper/CompanyInfoApplyMapper.xml
+3
-0
VehicleVO.java
...ain/java/com/xxfc/platform/vehicle/pojo/vo/VehicleVO.java
+18
-2
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+23
-14
VehicleManageApplyBiz.java
.../com/xxfc/platform/vehicle/biz/VehicleManageApplyBiz.java
+57
-3
AppVehicleExtensionController.java
.../platform/vehicle/rest/AppVehicleExtensionController.java
+9
-0
AppVehicleManageApplyController.java
...latform/vehicle/rest/AppVehicleManageApplyController.java
+68
-0
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+6
-1
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/CompanyApplyFindDTO.java
View file @
657bfda9
...
@@ -16,4 +16,6 @@ public class CompanyApplyFindDTO extends PageParam {
...
@@ -16,4 +16,6 @@ public class CompanyApplyFindDTO extends PageParam {
private
String
name
;
private
String
name
;
private
Integer
formType
;
private
Integer
formType
;
private
Integer
userId
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/CompanyInfoBiz.java
View file @
657bfda9
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
...
@@ -50,6 +51,9 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
...
@@ -50,6 +51,9 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
@Autowired
@Autowired
BranchCompanyBiz
branchCompanyBiz
;
BranchCompanyBiz
branchCompanyBiz
;
@Autowired
GroupBiz
groupBiz
;
public
static
final
String
CODE
=
"SHOP-"
;
public
static
final
String
CODE
=
"SHOP-"
;
...
@@ -178,6 +182,9 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
...
@@ -178,6 +182,9 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
user
.
setDataCorporation
(
branchId
+
""
);
user
.
setDataCorporation
(
branchId
+
""
);
user
.
setAppUserId
(
appUserId
);
user
.
setAppUserId
(
appUserId
);
userBiz
.
insertSelective
(
user
);
userBiz
.
insertSelective
(
user
);
List
<
Integer
>
members
=
new
ArrayList
<>();
members
.
add
(
6
);
groupBiz
.
modifyUserGroups
(
user
.
getId
(),
members
);
}
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppCompanyInfoController.java
View file @
657bfda9
...
@@ -2,9 +2,12 @@ package com.github.wxiaoqi.security.admin.rest;
...
@@ -2,9 +2,12 @@ package com.github.wxiaoqi.security.admin.rest;
import
com.github.wxiaoqi.security.admin.biz.*
;
import
com.github.wxiaoqi.security.admin.biz.*
;
import
com.github.wxiaoqi.security.admin.dto.CompanyApplyFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.entity.CompanyInfo
;
import
com.github.wxiaoqi.security.admin.entity.CompanyInfo
;
import
com.github.wxiaoqi.security.admin.vo.CompanyApplyVo
;
import
com.github.wxiaoqi.security.admin.vo.CompanySearchVO
;
import
com.github.wxiaoqi.security.admin.vo.CompanySearchVO
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
...
@@ -47,6 +50,22 @@ public class AppCompanyInfoController extends BaseController<CompanyInfoApplyBiz
...
@@ -47,6 +50,22 @@ public class AppCompanyInfoController extends BaseController<CompanyInfoApplyBiz
}
}
@GetMapping
(
"app/unauth/checkApply"
)
@ApiModelProperty
(
"商家检查申请"
)
@IgnoreUserToken
public
ObjectRestResponse
checkApply
(
@RequestBody
CompanyApplyFindDTO
companyApplyFindDTO
)
{
Integer
currentUserIdInt
=
getCurrentUserIdInt
();
if
(
currentUserIdInt
!=
null
){
companyApplyFindDTO
.
setUserId
(
getCurrentUserIdInt
());
List
<
CompanyApplyVo
>
list
=
baseBiz
.
getList
(
companyApplyFindDTO
);
if
(
list
.
size
()
>
0
){
return
ObjectRestResponse
.
succ
(
list
.
get
(
0
));
}
}
return
ObjectRestResponse
.
succ
();
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/AdminBranchCompanyBannerController.java
View file @
657bfda9
...
@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.rest.admin;
...
@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.rest.admin;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyBannerBiz
;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyBannerBiz
;
import
com.github.wxiaoqi.security.admin.dto.BranchCompanyBannerDTO
;
import
com.github.wxiaoqi.security.admin.dto.BranchCompanyBannerDTO
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompanyBanner
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompanyBanner
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -20,13 +22,21 @@ import org.springframework.web.bind.annotation.*;
...
@@ -20,13 +22,21 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping
(
"backstage/companyBanner"
)
@RequestMapping
(
"backstage/companyBanner"
)
@RequiredArgsConstructor
(
onConstructor_
=
{
@Autowired
})
@RequiredArgsConstructor
(
onConstructor_
=
{
@Autowired
})
@Api
(
tags
=
{
"店铺Banner"
})
@Api
(
tags
=
{
"店铺Banner"
})
public
class
AdminBranchCompanyBannerController
extends
BaseController
<
BranchCompanyBannerBiz
,
BranchCompanyBanner
>{
public
class
AdminBranchCompanyBannerController
extends
BaseController
<
BranchCompanyBannerBiz
,
BranchCompanyBanner
>
implements
UserRestInterface
{
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@GetMapping
(
"selectList"
)
@GetMapping
(
"selectList"
)
@ApiModelProperty
(
"店铺Banner列表"
)
@ApiModelProperty
(
"店铺Banner列表"
)
public
ObjectRestResponse
selectList
(
BranchCompanyBannerDTO
branchCompanyBannerDTO
)
{
public
ObjectRestResponse
selectList
(
BranchCompanyBannerDTO
branchCompanyBannerDTO
)
{
setPowerData
(
branchCompanyBannerDTO
);
return
baseBiz
.
selectList
(
branchCompanyBannerDTO
);
return
baseBiz
.
selectList
(
branchCompanyBannerDTO
);
}
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/BranchCompanyBannerMapper.xml
View file @
657bfda9
...
@@ -15,12 +15,19 @@
...
@@ -15,12 +15,19 @@
<if
test=
"status != null "
>
<if
test=
"status != null "
>
AND a.`status`= #{status}
AND a.`status`= #{status}
</if>
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
and b.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size > 0"
>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size > 0"
>
and b.company_id in
and b.company_id in
<foreach
collection=
"dataCorporationIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"dataCorporationIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
#{id}
</foreach>
</foreach>
</if>
</if>
</where>
</where>
order by a.upd_time DESC
order by a.upd_time DESC
</select>
</select>
...
...
ace-modules/ace-admin/src/main/resources/mapper/CompanyInfoApplyMapper.xml
View file @
657bfda9
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
<if
test=
"formType != null "
>
<if
test=
"formType != null "
>
AND a.`form_type`= #{formType}
AND a.`form_type`= #{formType}
</if>
</if>
<if
test=
"userId != null "
>
AND a.`app_user_id`= #{userId}
</if>
</where>
</where>
order by a.upd_time DESC
order by a.upd_time DESC
</select>
</select>
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/VehicleVO.java
View file @
657bfda9
...
@@ -35,8 +35,24 @@ public class VehicleVO extends Vehicle {
...
@@ -35,8 +35,24 @@ public class VehicleVO extends Vehicle {
private
String
manageCompanyName
;
private
String
manageCompanyName
;
@ApiModelProperty
(
"停靠店铺名称"
)
@ApiModelProperty
(
"经营店铺联系人"
)
private
String
parkCompanyName
;
private
String
manageCompanyLeader
;
@ApiModelProperty
(
"经营店铺联系电话"
)
private
String
manageCompanyLeaderContact
;
@ApiModelProperty
(
"停靠店铺名称"
)
private
String
parkCompanyName
;
@ApiModelProperty
(
"停靠店铺联系人"
)
private
String
parkCompanyLeader
;
@ApiModelProperty
(
"停靠店铺联系电话"
)
private
String
parkCompanyLeaderContact
;
private
VehicleApply
vehicleApply
;
private
VehicleApply
vehicleApply
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
657bfda9
...
@@ -1691,8 +1691,8 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1691,8 +1691,8 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
String
vehicleId
=
vehicleVO
.
getId
();
String
vehicleId
=
vehicleVO
.
getId
();
String
vehicleTitle
=
""
;
String
vehicleTitle
=
""
;
String
statusText
=
""
;
String
statusText
=
""
;
VehicleManageApply
vehicleManageApply
=
vehicleManageApplyBiz
.
getApplyByOrder
(
vehicleId
);
if
(
type
==
1
){
if
(
type
==
1
){
VehicleManageApply
vehicleManageApply
=
vehicleManageApplyBiz
.
getApplyByOrder
(
vehicleId
);
//类型是申请经营并且状态是未审核
//类型是申请经营并且状态是未审核
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
1
&&
vehicleManageApply
.
getStatus
()
==
0
){
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
1
&&
vehicleManageApply
.
getStatus
()
==
0
){
handleOption
.
put
(
"verify"
,
true
);
// 审核操作
handleOption
.
put
(
"verify"
,
true
);
// 审核操作
...
@@ -1704,22 +1704,34 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1704,22 +1704,34 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
BranchCompany
branchCompany
=
branchCompanyBiz
.
selectById
(
vehicleManageApply
.
getApplyId
());
BranchCompany
branchCompany
=
branchCompanyBiz
.
selectById
(
vehicleManageApply
.
getApplyId
());
vehicleTitle
=
branchCompany
.
getName
()+
"已取消经营"
;
vehicleTitle
=
branchCompany
.
getName
()+
"已取消经营"
;
statusText
=
"待收车"
;
statusText
=
"待收车"
;
//经营 == 资产
//经营 == 资产
并且 资产 == 停靠
}
else
if
(
manageCompanyId
.
equals
(
subordinateBranc
)
){
}
else
if
(
manageCompanyId
.
equals
(
subordinateBranc
)
&&
subordinateBranc
.
equals
(
parkBranchCompanyId
)
){
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
}
else
{
}
else
{
if
(!
manageCompanyId
.
equals
(
subordinateBranc
)){
vehicleTitle
=
vehicleVO
.
getManageCompanyName
()+
"已经营"
;
}
else
if
(!
manageCompanyId
.
equals
(
parkBranchCompanyId
)){
vehicleTitle
=
vehicleVO
.
getParkCompanyName
()+
"已停靠"
;
}
statusText
=
"已调出"
;
statusText
=
"已调出"
;
}
}
}
else
if
(
type
==
2
){
}
else
if
(
type
==
2
){
//经营 != 资产
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
1
&&
vehicleManageApply
.
getStatus
()
==
0
){
if
(!
manageCompanyId
.
equals
(
subordinateBranc
)
){
statusText
=
"申请经营,审核中"
;
handleOption
.
put
(
"cancleManage"
,
true
);
// 取消经营操作
}
else
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
3
&&
vehicleManageApply
.
getStatus
()
==
0
){
statusText
=
"取消经营,还车中"
;
}
}
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
else
{
//经营 != 资产
if
(!
manageCompanyId
.
equals
(
subordinateBranc
)
){
handleOption
.
put
(
"cancleManage"
,
true
);
// 取消经营操作
}
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
}
}
else
if
(
type
==
3
){
}
else
if
(
type
==
3
){
VehicleManageApply
vehicleManageApply
=
vehicleManageApplyBiz
.
getApplyByOrder
(
vehicleId
);
//类型是申请经营并且申请公司是停靠公司
//类型是申请经营并且申请公司是停靠公司
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getApplyId
()
==
parkBranchCompanyId
&&
vehicleManageApply
.
getType
()
==
1
){
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getApplyId
()
.
equals
(
parkBranchCompanyId
)
&&
vehicleManageApply
.
getType
()
==
1
){
if
(
vehicleManageApply
.
getStatus
()
==
0
){
if
(
vehicleManageApply
.
getStatus
()
==
0
){
statusText
=
"审核中"
;
statusText
=
"审核中"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
...
@@ -1729,14 +1741,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1729,14 +1741,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
}
}
//类型是还车并且申请公司是停靠公司
}
//类型是还车并且申请公司是停靠公司
else
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getApplyId
().
equals
(
parkBranchCompanyId
)
&&
vehicleManageApply
.
getType
()
==
3
){
else
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getApplyId
().
equals
(
parkBranchCompanyId
)
&&
vehicleManageApply
.
getType
()
==
3
){
//经营公司 == 停靠公司
if
(
manageCompanyId
==
parkBranchCompanyId
){
statusText
=
"取消经营,"
;
}
if
(
vehicleManageApply
.
getStatus
()
==
0
){
if
(
vehicleManageApply
.
getStatus
()
==
0
){
statusText
+=
"还车中"
;
statusText
+=
"还车中"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
statusText
+=
"还车成功"
;
handleOption
.
put
(
"applyManage"
,
true
);
// 申请经营操作
handleOption
.
put
(
"return"
,
true
);
// 还车操作
}
else
if
(
vehicleManageApply
.
getStatus
()
==
2
){
}
else
if
(
vehicleManageApply
.
getStatus
()
==
2
){
statusText
+=
"还车失败"
;
statusText
+=
"还车失败"
;
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleManageApplyBiz.java
View file @
657bfda9
...
@@ -2,7 +2,9 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -2,7 +2,9 @@ package com.xxfc.platform.vehicle.biz;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleManageApply
;
import
com.xxfc.platform.vehicle.entity.VehicleManageApply
;
import
com.xxfc.platform.vehicle.mapper.VehicleManageApplyMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleManageApplyMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -32,11 +34,14 @@ public class VehicleManageApplyBiz extends BaseBiz<VehicleManageApplyMapper, Veh
...
@@ -32,11 +34,14 @@ public class VehicleManageApplyBiz extends BaseBiz<VehicleManageApplyMapper, Veh
if
(
StringUtils
.
isNotBlank
(
vehicleManageApply
.
getVehicleId
())){
if
(
StringUtils
.
isNotBlank
(
vehicleManageApply
.
getVehicleId
())){
criteria
.
andEqualTo
(
"vehicleId"
,
vehicleManageApply
.
getVehicleId
());
criteria
.
andEqualTo
(
"vehicleId"
,
vehicleManageApply
.
getVehicleId
());
}
}
if
(
vehicleManageApply
.
getToApplyId
()
!=
null
&&
vehicleManageApply
.
getToApplyId
()
>
0
){
criteria
.
andEqualTo
(
"toApplyId"
,
vehicleManageApply
.
getToApplyId
());
}
if
(
vehicleManageApply
.
getStatus
()
!=
null
){
if
(
vehicleManageApply
.
getStatus
()
!=
null
){
criteria
.
andEqualTo
(
"status"
,
vehicleManageApply
.
getStatus
());
criteria
.
andEqualTo
(
"status"
,
vehicleManageApply
.
getStatus
());
}
}
return
selectByExample
(
vehicleManageApply
);
return
selectByExample
(
example
);
}
}
...
@@ -46,10 +51,59 @@ public class VehicleManageApplyBiz extends BaseBiz<VehicleManageApplyMapper, Veh
...
@@ -46,10 +51,59 @@ public class VehicleManageApplyBiz extends BaseBiz<VehicleManageApplyMapper, Veh
public
void
applyManage
(
VehicleManageApply
vehicleManageApply
){
public
void
applyManage
(
VehicleManageApply
vehicleManageApply
){
vehicleManageApply
.
setStatus
(
0
);
List
<
VehicleManageApply
>
manageApply
=
getManageApply
(
vehicleManageApply
);
if
(
manageApply
.
size
()
>
0
){
throw
new
BaseException
(
"已存在未审核的记录"
,
ResultCode
.
FAILED_CODE
);
}
Vehicle
vehicle
=
vehicleBiz
.
selectById
(
vehicleManageApply
.
getVehicleId
());
if
(
vehicle
==
null
){
throw
new
BaseException
(
"车辆信息不存在"
,
ResultCode
.
FAILED_CODE
);
}
vehicleManageApply
.
setToApplyId
(
vehicle
.
getSubordinateBranch
());
if
(
vehicleManageApply
.
getApplyId
().
equals
(
vehicleManageApply
.
getToApplyId
())){
throw
new
BaseException
(
"无申请权限"
,
ResultCode
.
FAILED_CODE
);
}
Integer
type
=
vehicleManageApply
.
getType
()
==
null
?
1
:
vehicleManageApply
.
getType
();
Integer
type
=
vehicleManageApply
.
getType
()
==
null
?
1
:
vehicleManageApply
.
getType
();
if
(
type
==
2
){
if
(
type
==
2
){
vehicleManageApply
.
setStatus
(
1
);
insertSelective
(
vehicleManageApply
);
vehicleManageApply
.
setId
(
null
);
vehicleManageApply
.
setType
(
3
);
vehicleManageApply
.
setStatus
(
0
);
insertSelective
(
vehicleManageApply
);
vehicleBiz
.
setState
(
vehicleManageApply
.
getVehicleId
(),
2
);
vehicleBiz
.
setState
(
vehicleManageApply
.
getVehicleId
(),
2
);
}
else
{
insertSelective
(
vehicleManageApply
);
}
}
public
void
setVerify
(
VehicleManageApply
vehicleManageApply
){
Vehicle
vehicle
=
vehicleBiz
.
selectById
(
vehicleManageApply
.
getVehicleId
());
if
(
vehicle
==
null
){
throw
new
BaseException
(
"车辆信息不存在"
,
ResultCode
.
FAILED_CODE
);
}
Integer
status
=
vehicleManageApply
.
getStatus
()
==
null
?
1
:
vehicleManageApply
.
getStatus
();
vehicleManageApply
.
setStatus
(
0
);
List
<
VehicleManageApply
>
manageApply
=
getManageApply
(
vehicleManageApply
);
if
(
manageApply
.
size
()
==
0
){
throw
new
BaseException
(
"不存在未审核的记录"
,
ResultCode
.
FAILED_CODE
);
}
VehicleManageApply
vehicleManageApply1
=
manageApply
.
get
(
0
);
vehicleManageApply
.
setId
(
vehicleManageApply1
.
getId
());
vehicleManageApply
.
setStatus
(
status
);
updateSelectiveById
(
vehicleManageApply
);
if
(
status
==
1
){
Integer
type
=
vehicleManageApply1
.
getType
();
Integer
applyId
=
vehicleManageApply1
.
getApplyId
();
Integer
toApplyId
=
vehicleManageApply1
.
getToApplyId
();
if
(
type
==
1
){
vehicle
.
setManageCompanyId
(
applyId
);
}
else
if
(
type
==
3
){
vehicle
.
setManageCompanyId
(
toApplyId
);
vehicle
.
setParkBranchCompanyId
(
toApplyId
);
}
vehicleBiz
.
updateSelectiveById
(
vehicle
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/AppVehicleExtensionController.java
View file @
657bfda9
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.rest;
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.rest;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.vehicle.biz.VehicleExtensionBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleExtensionBiz
;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleExtensionFindDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.VehicleExtensionVO
;
import
com.xxfc.platform.vehicle.pojo.vo.VehicleExtensionVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -57,6 +58,14 @@ public class AppVehicleExtensionController extends BaseController<VehicleExtensi
...
@@ -57,6 +58,14 @@ public class AppVehicleExtensionController extends BaseController<VehicleExtensi
}
}
@GetMapping
(
"app/unauth/updTree"
)
@ApiModelProperty
(
"编辑扩展详情"
)
@IgnoreUserToken
public
ObjectRestResponse
updTree
(
VehicleExtensionFindDTO
extensionFindDTO
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
getTreeByPlatCata
(
extensionFindDTO
));
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/AppVehicleManageApplyController.java
0 → 100644
View file @
657bfda9
package
com
.
xxfc
.
platform
.
vehicle
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.vehicle.biz.VehicleManageApplyBiz
;
import
com.xxfc.platform.vehicle.entity.VehicleManageApply
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author Administrator
*/
@Slf4j
@RestController
@RequestMapping
(
"app/vehicleManageApply"
)
@Api
(
tags
=
{
"经营申请"
})
public
class
AppVehicleManageApplyController
extends
BaseController
<
VehicleManageApplyBiz
>
{
@PostMapping
(
"save"
)
@ApiModelProperty
(
"申请"
)
public
ObjectRestResponse
save
(
@RequestBody
VehicleManageApply
vehicleManageApply
)
{
if
(
vehicleManageApply
.
getApplyId
()
==
null
||
vehicleManageApply
.
getApplyId
()
==
0
){
List
<
Integer
>
companyIds
=
getBusinessUserCompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
vehicleManageApply
.
setApplyId
(
companyIds
.
get
(
0
));
}
}
baseBiz
.
applyManage
(
vehicleManageApply
);
return
ObjectRestResponse
.
succ
();
}
@PostMapping
(
"verify"
)
@ApiModelProperty
(
"申请"
)
public
ObjectRestResponse
verify
(
@RequestBody
VehicleManageApply
vehicleManageApply
)
{
if
(
vehicleManageApply
.
getToApplyId
()
==
null
||
vehicleManageApply
.
getToApplyId
()
==
0
){
List
<
Integer
>
companyIds
=
getBusinessUserCompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
Integer
companyId
=
companyIds
.
get
(
0
);
vehicleManageApply
.
setToApplyId
(
companyId
);
vehicleManageApply
.
setVerifyId
(
companyId
);
}
}
baseBiz
.
setVerify
(
vehicleManageApply
);
return
ObjectRestResponse
.
succ
();
}
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
657bfda9
...
@@ -1313,8 +1313,13 @@
...
@@ -1313,8 +1313,13 @@
c.`name` categoryName,
c.`name` categoryName,
bc.`leader` as companyLeader,
bc.`leader` as companyLeader,
bc.`leader_contact_info` as companyLeaderContact,
bc.`leader_contact_info` as companyLeaderContact,
bc.`name` as companyName,
bc1.`name` as manageCompanyName,
bc1.`name` as manageCompanyName,
bc2.`name` as parkCompanyName
bc1.`leader` as manageCompanyLeader,
bc1.`leader_contact_info` as manageCompanyLeaderContact,
bc2.`name` as parkCompanyName,
bc2.`leader` as parkCompanyLeader,
bc2.`leader_contact_info` as parkCompanyLeaderContact
FROM vehicle v
FROM vehicle v
LEFT JOIN vehicle_brand b ON v.brand_id=b.id
LEFT JOIN vehicle_brand b ON v.brand_id=b.id
LEFT JOIN vehicle_category c ON v.category_id=c.id
LEFT JOIN vehicle_category c ON v.category_id=c.id
...
...
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