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
afdaae23
Commit
afdaae23
authored
Oct 26, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品经营申请
parent
bcc28dea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
14 deletions
+133
-14
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+11
-11
VehicleManageApplyBiz.java
.../com/xxfc/platform/vehicle/biz/VehicleManageApplyBiz.java
+54
-3
AppVehicleManageApplyController.java
...latform/vehicle/rest/AppVehicleManageApplyController.java
+68
-0
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
afdaae23
...
...
@@ -1691,8 +1691,8 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
String
vehicleId
=
vehicleVO
.
getId
();
String
vehicleTitle
=
""
;
String
statusText
=
""
;
VehicleManageApply
vehicleManageApply
=
vehicleManageApplyBiz
.
getApplyByOrder
(
vehicleId
);
if
(
type
==
1
){
VehicleManageApply
vehicleManageApply
=
vehicleManageApplyBiz
.
getApplyByOrder
(
vehicleId
);
//类型是申请经营并且状态是未审核
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
1
&&
vehicleManageApply
.
getStatus
()
==
0
){
handleOption
.
put
(
"verify"
,
true
);
// 审核操作
...
...
@@ -1711,15 +1711,19 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
statusText
=
"已调出"
;
}
}
else
if
(
type
==
2
){
//经营 != 资产
if
(!
manageCompanyId
.
equals
(
subordinateBranc
)
){
handleOption
.
put
(
"cancleManage"
,
true
);
// 取消经营操作
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
3
&&
vehicleManageApply
.
getStatus
()
==
0
){
statusText
=
"取消经营,还车中"
;
}
else
{
//经营 != 资产
if
(!
manageCompanyId
.
equals
(
subordinateBranc
)
){
handleOption
.
put
(
"cancleManage"
,
true
);
// 取消经营操作
}
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
}
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
}
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
){
statusText
=
"审核中"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
...
...
@@ -1729,10 +1733,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
}
//类型是还车并且申请公司是停靠公司
else
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getApplyId
().
equals
(
parkBranchCompanyId
)
&&
vehicleManageApply
.
getType
()
==
3
){
//经营公司 == 停靠公司
if
(
manageCompanyId
==
parkBranchCompanyId
){
statusText
=
"取消经营,"
;
}
if
(
vehicleManageApply
.
getStatus
()
==
0
){
statusText
+=
"还车中"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleManageApplyBiz.java
View file @
afdaae23
...
...
@@ -2,7 +2,9 @@ package com.xxfc.platform.vehicle.biz;
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.mapper.VehicleManageApplyMapper
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -32,11 +34,14 @@ public class VehicleManageApplyBiz extends BaseBiz<VehicleManageApplyMapper, Veh
if
(
StringUtils
.
isNotBlank
(
vehicleManageApply
.
getVehicleId
())){
criteria
.
andEqualTo
(
"vehicleId"
,
vehicleManageApply
.
getVehicleId
());
}
if
(
vehicleManageApply
.
getToApplyId
()
!=
null
&&
vehicleManageApply
.
getToApplyId
()
>
0
){
criteria
.
andEqualTo
(
"toApplyId"
,
vehicleManageApply
.
getToApplyId
());
}
if
(
vehicleManageApply
.
getStatus
()
!=
null
){
criteria
.
andEqualTo
(
"status"
,
vehicleManageApply
.
getStatus
());
}
return
selectByExample
(
vehicleManageApply
);
return
selectByExample
(
example
);
}
...
...
@@ -46,10 +51,56 @@ public class VehicleManageApplyBiz extends BaseBiz<VehicleManageApplyMapper, Veh
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
());
Integer
type
=
vehicleManageApply
.
getType
()
==
null
?
1
:
vehicleManageApply
.
getType
();
if
(
type
==
2
){
vehicleManageApply
.
setStatus
(
1
);
insertSelective
(
vehicleManageApply
);
vehicleManageApply
.
setId
(
null
);
vehicleManageApply
.
setType
(
3
);
vehicleManageApply
.
setStatus
(
0
);
insertSelective
(
vehicleManageApply
);
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/AppVehicleManageApplyController.java
0 → 100644
View file @
afdaae23
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
();
}
}
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