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
f88ffbc2
Commit
f88ffbc2
authored
Aug 27, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into lb_dev
parents
23a8d7af
dcddf3c7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
127 additions
and
41 deletions
+127
-41
pom.xml
pom.xml
+1
-1
pom.xml
xx-campsite/xx-campsite-api/pom.xml
+0
-1
pom.xml
xx-campsite/xx-campsite-server/pom.xml
+0
-1
pom.xml
xx-uccn/xx-uccn-server/pom.xml
+6
-0
VehicleModelController.java
...a/com/xxfc/platform/uccn/rest/VehicleModelController.java
+58
-0
BranchCompany.java
.../java/com/xxfc/platform/vehicle/entity/BranchCompany.java
+5
-1
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+8
-0
CompanyVo.java
...ain/java/com/xxfc/platform/vehicle/pojo/vo/CompanyVo.java
+2
-0
BranchCompanyStockApplyInfoBiz.java
.../platform/vehicle/biz/BranchCompanyStockApplyInfoBiz.java
+1
-0
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+17
-34
VehicleBookHourInfoBiz.java
...com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
+1
-1
VehicleModelController.java
...om/xxfc/platform/vehicle/rest/VehicleModelController.java
+27
-2
CompanyBaseMapper.xml
...le-server/src/main/resources/mapper/CompanyBaseMapper.xml
+1
-0
No files found.
pom.xml
View file @
f88ffbc2
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
<version>
0.2.
1
.RELEASE
</version>
<version>
0.2.
2
.RELEASE
</version>
<type>
pom
</type>
<type>
pom
</type>
<scope>
import
</scope>
<scope>
import
</scope>
</dependency>
</dependency>
...
...
xx-campsite/xx-campsite-api/pom.xml
View file @
f88ffbc2
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<groupId>
com.xxfc.common
</groupId>
<groupId>
com.xxfc.common
</groupId>
<artifactId>
xx-common-platform
</artifactId>
<artifactId>
xx-common-platform
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<version>
2.0-SNAPSHOT
</version>
<relativePath>
../../xx-common/xx-common-platform/pom.xml
</relativePath>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.xxfc.platform
</groupId>
<groupId>
com.xxfc.platform
</groupId>
...
...
xx-campsite/xx-campsite-server/pom.xml
View file @
f88ffbc2
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<groupId>
com.xxfc.common
</groupId>
<groupId>
com.xxfc.common
</groupId>
<artifactId>
xx-common-platform-web
</artifactId>
<artifactId>
xx-common-platform-web
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<version>
2.0-SNAPSHOT
</version>
<relativePath>
../../xx-common/xx-common-platform-web/pom.xml
</relativePath>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.xxfc.platform
</groupId>
<groupId>
com.xxfc.platform
</groupId>
...
...
xx-uccn/xx-uccn-server/pom.xml
View file @
f88ffbc2
...
@@ -27,6 +27,12 @@
...
@@ -27,6 +27,12 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot
</artifactId>
<artifactId>
spring-boot
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-vehicle-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/VehicleModelController.java
0 → 100644
View file @
f88ffbc2
package
com
.
xxfc
.
platform
.
uccn
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.pojo.VModelDetailVO
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelQueryCondition
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelVo
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
@RestController
@RequestMapping
(
"/vehicleModel"
)
@Slf4j
@IgnoreClientToken
public
class
VehicleModelController
extends
CommonBaseController
{
@Autowired
VehicleFeign
vehicleFeign
;
/**
* 车型详情
*
* @param name
* @return
*/
@ApiOperation
(
"车型详情"
)
@RequestMapping
(
value
=
"/detail/{name}"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
<
VModelDetailVO
>
detail
(
@PathVariable
(
"name"
)
@ApiParam
(
"车型名称"
)
String
name
)
{
return
vehicleFeign
.
detailByParam
(
BeanUtil
.
beanToMap
(
new
VehicleModel
(){{
setName
(
name
);
}},
false
,
true
));
}
/**
* 车型列表查
*
* @param vmqc 条件
* @return
*/
@ApiOperation
(
"车型列表"
)
@PostMapping
(
value
=
"/app/unauth/findVehicleModelPage"
)
@IgnoreUserToken
public
ObjectRestResponse
<
VehicleModelVo
>
findVehicleModelPageUnauthfind
(
@RequestBody
VehicleModelQueryCondition
vmqc
)
{
return
vehicleFeign
.
findVehicleModelPageUnauthfind
(
vmqc
);
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/BranchCompany.java
View file @
f88ffbc2
...
@@ -150,7 +150,11 @@ public class BranchCompany {
...
@@ -150,7 +150,11 @@ public class BranchCompany {
* 上下架:1-上架;2-下架
* 上下架:1-上架;2-下架
*/
*/
private
Integer
state
;
private
Integer
state
;
/**
* 是否app展示:1-是;2-否
*/
@Column
(
name
=
"is_show"
)
private
Integer
isShow
;
/**
/**
* 是否删除:0-正常;1-删除
* 是否删除:0-正常;1-删除
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
f88ffbc2
...
@@ -7,9 +7,11 @@ import com.xxfc.platform.vehicle.entity.*;
...
@@ -7,9 +7,11 @@ import com.xxfc.platform.vehicle.entity.*;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.vo.AccompanyingItemVo
;
import
com.xxfc.platform.vehicle.pojo.vo.AccompanyingItemVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -126,4 +128,10 @@ public interface VehicleFeign {
...
@@ -126,4 +128,10 @@ public interface VehicleFeign {
@GetMapping
(
"/branchCompany/company"
)
@GetMapping
(
"/branchCompany/company"
)
Map
<
Integer
,
BranComanyLeaderVo
>
findCompanyLeaderMapByIds
(
@RequestParam
(
value
=
"companyIds"
)
List
<
Integer
>
companyIds
);
Map
<
Integer
,
BranComanyLeaderVo
>
findCompanyLeaderMapByIds
(
@RequestParam
(
value
=
"companyIds"
)
List
<
Integer
>
companyIds
);
@GetMapping
(
"/vehicleModel/app/unauth/detail-param"
)
ObjectRestResponse
<
VModelDetailVO
>
detailByParam
(
@RequestParam
(
"vehicleModel"
)
Map
<
String
,
Object
>
vehicleModel
);
@PostMapping
(
"/vehicleModel/app/unauth/findVehicleModelPage"
)
public
ObjectRestResponse
<
VehicleModelVo
>
findVehicleModelPageUnauthfind
(
@RequestBody
VehicleModelQueryCondition
vmqc
);
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/CompanyVo.java
View file @
f88ffbc2
...
@@ -55,6 +55,8 @@ public class CompanyVo extends PageParam {
...
@@ -55,6 +55,8 @@ public class CompanyVo extends PageParam {
String
addrDetail
;
String
addrDetail
;
@ApiModelProperty
(
"上下架:1-上架;2-下架"
)
@ApiModelProperty
(
"上下架:1-上架;2-下架"
)
Integer
state
;
Integer
state
;
@ApiModelProperty
(
"是否app展示:1-是;2-否"
)
Integer
isShow
;
@ApiModelProperty
(
"负责人"
)
@ApiModelProperty
(
"负责人"
)
private
String
leader
;
private
String
leader
;
@ApiModelProperty
(
"负责人联系方式"
)
@ApiModelProperty
(
"负责人联系方式"
)
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyStockApplyInfoBiz.java
View file @
f88ffbc2
...
@@ -46,6 +46,7 @@ public class BranchCompanyStockApplyInfoBiz extends BaseBiz<BranchCompanyStockAp
...
@@ -46,6 +46,7 @@ public class BranchCompanyStockApplyInfoBiz extends BaseBiz<BranchCompanyStockAp
BeanUtils
.
copyProperties
(
applyVo
,
applyInfo
);
BeanUtils
.
copyProperties
(
applyVo
,
applyInfo
);
applyInfo
.
setState
(
BranchCompanyStockApplyState
.
Apply
.
getCode
());
applyInfo
.
setState
(
BranchCompanyStockApplyState
.
Apply
.
getCode
());
applyInfo
.
setCreateTime
(
new
Date
());
applyInfo
.
setCreateTime
(
new
Date
());
applyInfo
.
setCompanyId
(
applyVo
.
getStockRightId
());
mapper
.
insertSelective
(
applyInfo
);
mapper
.
insertSelective
(
applyInfo
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
f88ffbc2
...
@@ -439,19 +439,14 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -439,19 +439,14 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
if
(
yearMonthAndDate
.
size
()>
3
){
//连续的日期最多夸3个月
if
(
yearMonthAndDate
.
size
()>
3
){
//连续的日期最多夸3个月
throw
new
BaseException
(
ResultCode
.
ONLY_BOOK_TWO_MONTH
);
throw
new
BaseException
(
ResultCode
.
ONLY_BOOK_TWO_MONTH
);
}
}
//检验时间是否可以预定
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
//加入预定申请记录
//加入预定申请记录
VehicleBookRecord
vehicleBookRecord
=
null
;
VehicleBookRecord
vehicleBookRecord
=
null
;
if
(
bookVehicleVo
.
getVehicleBookRecordId
()
==
null
)
{
if
(
bookVehicleVo
.
getVehicleBookRecordId
()
==
null
)
{
//检验时间是否可以预定
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
bookVehicleVo
.
getBookStartDate
(),
bookVehicleVo
.
getBookEndDate
(),
bookVehicleVo
.
getNotCheckTimeLegal
());
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
bookVehicleVo
.
getBookStartDate
(),
bookVehicleVo
.
getBookEndDate
(),
bookVehicleVo
.
getNotCheckTimeLegal
());
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry:
yearMonthAndDate
.
entrySet
()){
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
(),
map
);
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
ResultCode
.
VEHICLE_IS_BOOKED
);
}
}
vehicleBookRecord
=
new
VehicleBookRecord
();
vehicleBookRecord
=
new
VehicleBookRecord
();
BeanUtil
.
copyProperties
(
bookVehicleVo
,
vehicleBookRecord
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
BeanUtil
.
copyProperties
(
bookVehicleVo
,
vehicleBookRecord
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
...
@@ -471,19 +466,24 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -471,19 +466,24 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
bookVehicleVo
.
setUnbookStartDate
(
new
DateTime
(
vehicleBookRecord
.
getBookStartDate
()).
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookStartDate
(
new
DateTime
(
vehicleBookRecord
.
getBookStartDate
()).
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookEndDate
(
new
DateTime
(
vehicleBookRecord
.
getBookEndDate
()).
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookEndDate
(
new
DateTime
(
vehicleBookRecord
.
getBookEndDate
()).
toString
(
DATE_TIME_FORMATTER
));
unbookVehicle
(
bookVehicleVo
);
unbookVehicle
(
bookVehicleVo
);
//检验时间是否可以预定
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
startDay
.
toString
(
DATE_TIME_FORMATTER
),
endDay
.
toString
(
DATE_TIME_FORMATTER
),
bookVehicleVo
.
getNotCheckTimeLegal
());
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
bookVehicleVo
.
getBookStartDate
(),
bookVehicleVo
.
getBookEndDate
(),
bookVehicleVo
.
getNotCheckTimeLegal
());
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry
:
yearMonthAndDate
.
entrySet
())
{
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
(),
map
);
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
ResultCode
.
VEHICLE_IS_BOOKED
);
}
}
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookEndDate
(
endDay
.
toDate
());
vehicleBookRecord
.
setBookEndDate
(
endDay
.
toDate
());
vehicleBookRecordBiz
.
updateSelectiveByIdRe
(
vehicleBookRecord
);
vehicleBookRecordBiz
.
updateSelectiveByIdRe
(
vehicleBookRecord
);
}
}
}
}
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry
:
yearMonthAndDate
.
entrySet
())
{
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
(),
map
);
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
ResultCode
.
VEHICLE_IS_BOOKED
);
}
}
//添加预定日期记录
Boolean
hasSuc
=
bookedVehicle
(
bookVehicleVo
);
if
(!
hasSuc
){
throw
new
BaseException
(
ResultCode
.
BOOKED_FAILED_CODE
);
}
// //添加预定时间记录
// //添加预定时间记录
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
...
@@ -494,12 +494,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -494,12 +494,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
vehicleBookHourInfoBiz
.
save
(
vehicleBookHourInfoDto
);
vehicleBookHourInfoBiz
.
save
(
vehicleBookHourInfoDto
);
}
}
//修改相关车辆预定记录
Boolean
hasSuc
=
bookedVehicle
(
bookVehicleVo
);
if
(!
hasSuc
){
throw
new
BaseException
(
ResultCode
.
BOOKED_FAILED_CODE
);
}
//添加随车物品
//添加随车物品
List
<
Map
<
String
,
Object
>>
params
=
Lists
.
newArrayList
();
List
<
Map
<
String
,
Object
>>
params
=
Lists
.
newArrayList
();
if
(
MapUtils
.
isNotEmpty
(
bookVehicleVo
.
getSelectedAccItem
())){
if
(
MapUtils
.
isNotEmpty
(
bookVehicleVo
.
getSelectedAccItem
())){
...
@@ -937,10 +931,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -937,10 +931,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
vehicleBookHourInfoDto
.
setVehicleId
(
vehicleId
);
vehicleBookHourInfoDto
.
setVehicleId
(
vehicleId
);
List
<
VehicleBookHourInfo
>
vehicleBookHourInfos
=
vehicleBookHourInfoBiz
.
selectByVehicleAndDate
(
vehicleBookHourInfoDto
);
List
<
VehicleBookHourInfo
>
vehicleBookHourInfos
=
vehicleBookHourInfoBiz
.
selectByVehicleAndDate
(
vehicleBookHourInfoDto
);
if
(
vehicleBookHourInfos
!=
null
&&
vehicleBookHourInfos
.
size
()
>
0
)
{
if
(
vehicleBookHourInfos
!=
null
&&
vehicleBookHourInfos
.
size
()
>
0
)
{
if
((
vehicleBookHourInfos
.
get
(
0
).
getBookedHour
()
&
~
entry
.
getValue
())
==
0
)
{
if
((
vehicleBookHourInfos
.
get
(
0
).
getBookedHour
()
&
~
entry
.
getValue
())
==
0
)
{
//时间取与运算为0说明当天全部取消预定
DateTime
dateTime
=
DateTime
.
parse
(
entry
.
getKey
(),
DEFAULT_DATE_TIME_FORMATTER
);
DateTime
dateTime
=
DateTime
.
parse
(
entry
.
getKey
(),
DEFAULT_DATE_TIME_FORMATTER
);
Integer
andOperationFactor
=
0
;
Integer
andOperationFactor
=
0
;
andOperationFactor
|=
1
<<
(
dateTime
.
dayOfMonth
().
get
()
);
andOperationFactor
|=
1
<<
(
dateTime
.
dayOfMonth
().
get
()
-
1
);
VehicleBookInfo
vehicleBookInfo
=
getByVehicleIdAndYearMonth
(
vehicleId
,
dateTime
.
toString
(
YEARMONTH_DATE_TIME_FORMATTER
));
VehicleBookInfo
vehicleBookInfo
=
getByVehicleIdAndYearMonth
(
vehicleId
,
dateTime
.
toString
(
YEARMONTH_DATE_TIME_FORMATTER
));
if
(
vehicleBookInfo
!=
null
)
{
if
(
vehicleBookInfo
!=
null
)
{
vehicleBookInfo
.
setBookedDate
(
vehicleBookInfo
.
getBookedDate
()
&
~
andOperationFactor
);
vehicleBookInfo
.
setBookedDate
(
vehicleBookInfo
.
getBookedDate
()
&
~
andOperationFactor
);
...
@@ -964,17 +958,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -964,17 +958,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
public
Map
<
String
,
Integer
>
getDateInfo
(
String
yearMonthDay
)
{
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
if
(
StringUtils
.
isNotBlank
(
yearMonthDay
))
{
DateTime
dateTime
=
DateTime
.
parse
(
yearMonthDay
,
YEARMONTH_DATE_TIME_FORMATTER
);
Integer
andOperationFactor
=
0
;
andOperationFactor
|=
1
<<(
dateTime
.
dayOfMonth
().
get
()-
1
);
map
.
put
(
dateTime
.
toString
(
YEARMONTH_DATE_TIME_FORMATTER
),
andOperationFactor
);
}
return
map
;
}
/**
/**
* 获取某月份相应预定日期查询条件
* 获取某月份相应预定日期查询条件
* @param yearMonthAndDate 年月 - 预定日期条件字符串(yyyy-MM-dd)
* @param yearMonthAndDate 年月 - 预定日期条件字符串(yyyy-MM-dd)
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
View file @
f88ffbc2
...
@@ -88,7 +88,7 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
...
@@ -88,7 +88,7 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
predictableHours
.
put
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
startPredictableHour
);
predictableHours
.
put
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
startPredictableHour
);
predictableHours
.
put
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
endPredictableHour
);
predictableHours
.
put
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
endPredictableHour
);
}
}
if
(
endDay
.
get
DayOfMonth
()
-
startDay
.
getDayOfMonth
()
>
1
){
//
if
(
endDay
.
get
Millis
()
-
startDay
.
getMillis
()
>
24
*
3600
*
1000
){
//
for
(
DateTime
curDate
=
startDay
.
plusDays
(
1
);
curDate
.
compareTo
(
endDay
)
<
0
;
curDate
=
curDate
.
plusDays
(
1
))
{
for
(
DateTime
curDate
=
startDay
.
plusDays
(
1
);
curDate
.
compareTo
(
endDay
)
<
0
;
curDate
=
curDate
.
plusDays
(
1
))
{
String
curDateStr
=
curDate
.
toString
(
DATE_TIME_FORMATTER
);
String
curDateStr
=
curDate
.
toString
(
DATE_TIME_FORMATTER
);
//全天预定
//全天预定
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleModelController.java
View file @
f88ffbc2
...
@@ -77,7 +77,7 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
...
@@ -77,7 +77,7 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
}
}
/**
/**
*
订单
*
车型详情
*
*
* @param id
* @param id
* @return
* @return
...
@@ -91,11 +91,36 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
...
@@ -91,11 +91,36 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
VehicleModel
vm
=
baseBiz
.
selectById
(
id
);
VehicleModel
vm
=
baseBiz
.
selectById
(
id
);
if
(
null
==
vm
)
if
(
null
==
vm
)
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
VModelDetailVO
vModelDetailVO
=
initVModelDetailVO
(
vm
);
return
new
ObjectRestResponse
().
data
(
vModelDetailVO
);
}
/**
* 车型详情
*
* @param vehicleModel
* @return
*/
@ApiOperation
(
"车型详情"
)
@RequestMapping
(
value
=
"/app/unauth/detail-param"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
<
VModelDetailVO
>
detailByParam
(
VehicleModel
vehicleModel
)
{
//查询车型信息,车型类型关系
//公司信息,系统信息(购车须知,预定须知)
ObjectRestResponse
<
List
<
VehicleModel
>>
vms
=
entityList
(
vehicleModel
);
if
(
null
==
vms
.
getData
()
||
null
==
vms
.
getData
().
get
(
0
))
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
VehicleModel
vm
=
vms
.
getData
().
get
(
0
);
VModelDetailVO
vModelDetailVO
=
initVModelDetailVO
(
vm
);
return
new
ObjectRestResponse
().
data
(
vModelDetailVO
);
}
private
VModelDetailVO
initVModelDetailVO
(
VehicleModel
vm
)
{
VModelDetailVO
vModelDetailVO
=
BeanUtil
.
toBean
(
vm
,
VModelDetailVO
.
class
);
VModelDetailVO
vModelDetailVO
=
BeanUtil
.
toBean
(
vm
,
VModelDetailVO
.
class
);
vModelDetailVO
.
setVehiclePlatCatas
(
vehiclePlatCataBiz
.
getByModelId
(
vm
.
getId
()));
vModelDetailVO
.
setVehiclePlatCatas
(
vehiclePlatCataBiz
.
getByModelId
(
vm
.
getId
()));
vModelDetailVO
.
setAppUserDTO
(
getAppUser
());
vModelDetailVO
.
setAppUserDTO
(
getAppUser
());
vModelDetailVO
.
setUserMemberLevel
(
userFeign
.
levels
());
vModelDetailVO
.
setUserMemberLevel
(
userFeign
.
levels
());
return
new
ObjectRestResponse
().
data
(
vModelDetailVO
)
;
return
vModelDetailVO
;
}
}
/**
/**
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/CompanyBaseMapper.xml
View file @
f88ffbc2
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
c.addr_detail as addrDetail,
c.addr_detail as addrDetail,
c.state,
c.state,
c.status,
c.status,
c.is_show as isShow,
c.leader,
c.leader,
c.leader_contact_info as leaderContactInfo,
c.leader_contact_info as leaderContactInfo,
c.latitude,
c.latitude,
...
...
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