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
d53145bb
Commit
d53145bb
authored
Oct 24, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品列表
parent
ce434d38
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
231 additions
and
5 deletions
+231
-5
VehicleApply.java
...n/java/com/xxfc/platform/vehicle/entity/VehicleApply.java
+1
-1
VehicleManageApply.java
.../com/xxfc/platform/vehicle/entity/VehicleManageApply.java
+76
-0
VehicleVO.java
...ain/java/com/xxfc/platform/vehicle/pojo/vo/VehicleVO.java
+14
-1
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+84
-3
VehicleManageApplyBiz.java
.../com/xxfc/platform/vehicle/biz/VehicleManageApplyBiz.java
+43
-0
VehicleManageApplyMapper.java
...xfc/platform/vehicle/mapper/VehicleManageApplyMapper.java
+13
-0
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleApply.java
View file @
d53145bb
...
@@ -18,7 +18,7 @@ public class VehicleApply {
...
@@ -18,7 +18,7 @@ public class VehicleApply {
* 主键(uuid)
* 主键(uuid)
*/
*/
@Id
@Id
private
String
id
;
private
Integer
id
;
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleManageApply.java
0 → 100644
View file @
d53145bb
package
com
.
xxfc
.
platform
.
vehicle
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.*
;
@Data
@Table
(
name
=
"vehicle_manage_apply"
)
public
class
VehicleManageApply
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
@Column
(
name
=
"vehicle_id"
)
@ApiModelProperty
(
"商品id"
)
private
String
vehicleId
;
@Column
(
name
=
"type"
)
@ApiModelProperty
(
"申请类型:1-申请经营;2-取消经营;3-还车"
)
private
Integer
type
;
@Column
(
name
=
"apply_id"
)
@ApiModelProperty
(
"申请公司id"
)
private
Integer
applyId
;
@Column
(
name
=
"to_apply_id"
)
@ApiModelProperty
(
"被申请公司id"
)
private
Integer
toApplyId
;
@Column
(
name
=
"verify_id"
)
@ApiModelProperty
(
"审核公司id"
)
private
Integer
verifyId
;
@Column
(
name
=
"status"
)
@ApiModelProperty
(
"状态:0-未审核;1-审核通过;2-审核失败"
)
private
Integer
status
;
@ApiModelProperty
(
"失败原因"
)
private
String
reason
;
@Column
(
name
=
"crt_time"
)
private
Long
crtTime
;
@Column
(
name
=
"upd_time"
)
private
Long
updTime
;
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
}
\ No newline at end of file
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/VehicleVO.java
View file @
d53145bb
...
@@ -5,8 +5,8 @@ import com.xxfc.platform.vehicle.entity.VehicleApply;
...
@@ -5,8 +5,8 @@ import com.xxfc.platform.vehicle.entity.VehicleApply;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
public
class
VehicleVO
extends
Vehicle
{
public
class
VehicleVO
extends
Vehicle
{
...
@@ -36,4 +36,17 @@ public class VehicleVO extends Vehicle {
...
@@ -36,4 +36,17 @@ public class VehicleVO extends Vehicle {
private
List
<
VehicleExtensionVO
>
extensionVOS
;
private
List
<
VehicleExtensionVO
>
extensionVOS
;
private
Double
distance
;
private
Double
distance
;
private
String
statusText
;
// 状态的处理
private
String
vehicleTitle
;
//头部标题
private
Map
<
String
,
Object
>
handleOption
;
// 可操作的选项
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
d53145bb
...
@@ -119,6 +119,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -119,6 +119,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
@Autowired
@Autowired
MQSenderFeign
mqSenderFeign
;
MQSenderFeign
mqSenderFeign
;
@Autowired
VehicleManageApplyBiz
vehicleManageApplyBiz
;
@Override
@Override
public
UserFeign
getUserFeign
()
{
public
UserFeign
getUserFeign
()
{
return
userFeign
;
return
userFeign
;
...
@@ -1670,9 +1673,87 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1670,9 +1673,87 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
vehicleFindDTO
.
setDataCompanyIds
(
dataCompanyIds
);
vehicleFindDTO
.
setDataCompanyIds
(
dataCompanyIds
);
}
}
}
}
PageHelper
.
startPage
(
vehicleFindDTO
.
getPage
(),
vehicleFindDTO
.
getLimit
());
PageDataVO
<
VehicleVO
>
dataVo
=
PageDataVO
.
pageInfo
(
vehicleFindDTO
.
initQuery
(),()->
getList
(
vehicleFindDTO
));
PageInfo
<
VehicleVO
>
pageInfo
=
new
PageInfo
<>(
getList
(
vehicleFindDTO
));
List
<
VehicleVO
>
list
=
dataVo
.
getData
();
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
pageInfo
));
if
(
type
>
0
){
if
(
list
!=
null
&&
list
.
size
()
>
0
){
for
(
VehicleVO
vehicleVO
:
list
){
Map
<
String
,
Object
>
handleOption
=
new
HashMap
();
handleOption
.
put
(
"update"
,
false
);
// 编辑操作
handleOption
.
put
(
"verify"
,
false
);
// 审核操作
handleOption
.
put
(
"receive"
,
false
);
// 收车操作
handleOption
.
put
(
"cancleManage"
,
false
);
// 取消经营操作
handleOption
.
put
(
"applyManage"
,
false
);
// 申请经营操作
handleOption
.
put
(
"return"
,
false
);
// 还车操作
Integer
manageCompanyId
=
vehicleVO
.
getManageCompanyId
()
==
null
?
0
:
vehicleVO
.
getManageCompanyId
();
//我的经营
Integer
subordinateBranc
=
vehicleVO
.
getSubordinateBranch
()
==
null
?
0
:
vehicleVO
.
getSubordinateBranch
();
//我的资产
Integer
parkBranchCompanyId
=
vehicleVO
.
getParkBranchCompanyId
()
==
null
?
0
:
vehicleVO
.
getParkBranchCompanyId
();
//我的停靠
String
vehicleId
=
vehicleVO
.
getId
();
String
vehicleTitle
=
""
;
String
statusText
=
""
;
if
(
type
==
1
){
VehicleManageApply
vehicleManageApply
=
vehicleManageApplyBiz
.
getApplyByOrder
(
vehicleId
);
//类型是申请经营并且状态是未审核
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
1
&&
vehicleManageApply
.
getStatus
()
==
0
){
handleOption
.
put
(
"verify"
,
true
);
// 审核操作
BranchCompany
branchCompany
=
branchCompanyBiz
.
selectById
(
vehicleManageApply
.
getApplyId
());
vehicleTitle
=
branchCompany
.
getName
()+
"申请经营"
;
//类型是还车并且状态是未审核
}
else
if
(
vehicleManageApply
!=
null
&&
vehicleManageApply
.
getType
()
==
3
&&
vehicleManageApply
.
getStatus
()
==
0
){
handleOption
.
put
(
"receive"
,
true
);
// 收车操作
BranchCompany
branchCompany
=
branchCompanyBiz
.
selectById
(
vehicleManageApply
.
getApplyId
());
vehicleTitle
=
branchCompany
.
getName
()+
"已取消经营"
;
statusText
=
"待收车"
;
//经营 == 资产
}
else
if
(
manageCompanyId
.
equals
(
subordinateBranc
)
){
handleOption
.
put
(
"update"
,
true
);
// 编辑操作
}
else
{
statusText
=
"已调出"
;
}
}
else
if
(
type
==
2
){
//经营 != 资产
if
(!
manageCompanyId
.
equals
(
subordinateBranc
)
){
handleOption
.
put
(
"cancleManage"
,
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
.
getStatus
()
==
0
){
statusText
=
"审核中"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
1
){
statusText
=
"申请通过"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
2
){
statusText
=
"申请失败"
;
}
}
//类型是还车并且申请公司是停靠公司
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
){
statusText
+=
"还车成功"
;
}
else
if
(
vehicleManageApply
.
getStatus
()
==
2
){
statusText
+=
"还车失败"
;
}
}
else
if
(
vehicleManageApply
==
null
||
!
vehicleManageApply
.
getApplyId
().
equals
(
parkBranchCompanyId
)
){
handleOption
.
put
(
"applyManage"
,
true
);
// 申请经营操作
handleOption
.
put
(
"return"
,
true
);
// 还车操作
}
}
vehicleVO
.
setStatusText
(
statusText
);
vehicleVO
.
setHandleOption
(
handleOption
);
vehicleVO
.
setVehicleTitle
(
vehicleTitle
);
}
}
}
return
ObjectRestResponse
.
succ
(
dataVo
);
}
}
public
PageDataVO
<
VehicleVO
>
appSelectList
(
VehicleFindAppDTO
vehicleFindAppDTO
){
public
PageDataVO
<
VehicleVO
>
appSelectList
(
VehicleFindAppDTO
vehicleFindAppDTO
){
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleManageApplyBiz.java
0 → 100644
View file @
d53145bb
package
com
.
xxfc
.
platform
.
vehicle
.
biz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.xxfc.platform.vehicle.entity.VehicleManageApply
;
import
com.xxfc.platform.vehicle.mapper.VehicleManageApplyMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
@Service
public
class
VehicleManageApplyBiz
extends
BaseBiz
<
VehicleManageApplyMapper
,
VehicleManageApply
>
{
public
List
<
VehicleManageApply
>
getManageApply
(
VehicleManageApply
vehicleManageApply
){
Example
example
=
new
Example
(
VehicleManageApply
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
);
if
(
vehicleManageApply
.
getType
()
!=
null
){
criteria
.
andEqualTo
(
"type"
,
vehicleManageApply
.
getType
());
}
if
(
StringUtils
.
isNotBlank
(
vehicleManageApply
.
getVehicleId
())){
criteria
.
andEqualTo
(
"vehicleId"
,
vehicleManageApply
.
getVehicleId
());
}
if
(
vehicleManageApply
.
getStatus
()
!=
null
){
criteria
.
andEqualTo
(
"status"
,
vehicleManageApply
.
getStatus
());
}
return
selectByExample
(
vehicleManageApply
);
}
public
VehicleManageApply
getApplyByOrder
(
String
vehicleId
){
return
mapper
.
getVehicleApply
(
vehicleId
);
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleManageApplyMapper.java
0 → 100644
View file @
d53145bb
package
com
.
xxfc
.
platform
.
vehicle
.
mapper
;
import
com.xxfc.platform.vehicle.entity.VehicleManageApply
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.common.Mapper
;
public
interface
VehicleManageApplyMapper
extends
Mapper
<
VehicleManageApply
>
{
@Select
(
"SELECT * FROM vehicle_manage_apply WHERE is_del = 0 and vehicle_id =#{vehicleId} ORDER BY id DESC LIMIT 1"
)
VehicleManageApply
getVehicleApply
(
@Param
(
"vehicleId"
)
String
vehicleId
);
}
\ 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