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
18e00fd8
Commit
18e00fd8
authored
Jul 16, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旅游核销
parent
3abf9761
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
9 deletions
+53
-9
OrderTourVerificationBiz.java
...com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
+19
-0
OrderTourVerificationController.java
.../platform/order/rest/OrderTourVerificationController.java
+0
-7
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+6
-0
TourGoodSiteBiz.java
...main/java/com/xxfc/platform/tour/biz/TourGoodSiteBiz.java
+8
-0
TourGoodVerificationBiz.java
...a/com/xxfc/platform/tour/biz/TourGoodVerificationBiz.java
+7
-2
TourGoodSiteController.java
...a/com/xxfc/platform/tour/rest/TourGoodSiteController.java
+8
-0
TourGoodVerificationController.java
...fc/platform/tour/rest/TourGoodVerificationController.java
+5
-0
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
View file @
18e00fd8
...
...
@@ -16,6 +16,7 @@ import com.xxfc.platform.vehicle.entity.BranchCompany;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.Instant
;
import
java.util.List
;
/**
...
...
@@ -49,6 +50,13 @@ public class OrderTourVerificationBiz{
return
PageDataVO
.
pageInfo
(
page
,
limit
,()->
verificationMapper
.
pageByParm
(
verificationId
));
}
/**
*
* @param no 订单号
* @param list 分公司列表
* @param userDTO
* @return
*/
//核销
public
ObjectRestResponse
VerificationByOrder
(
String
no
,
List
<
BranchCompany
>
list
,
UserDTO
userDTO
){
BaseOrder
baseOrder
=
new
BaseOrder
();
...
...
@@ -79,6 +87,17 @@ public class OrderTourVerificationBiz{
}
}
}
// 出发时间 是否已经发车
Long
departureTime
=
tourFeign
.
selectDepartureTimeByStartCompanyIdAndRouteId
(
tourDetail
.
getStartCompanyId
(),
tourDetail
.
getGoodId
());
if
(
Instant
.
now
().
toEpochMilli
()<
departureTime
){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"还未到发车时间"
,
0
);
}
Integer
departureStatus
=
tourFeign
.
selectDepartureStatusByVerificationId
(
verificationId
);
if
(
departureStatus
==
1
){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"已经发车"
,
1
);
}
baseOrder
=
new
BaseOrder
();
baseOrder
.
setId
(
orderId
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderTourVerificationController.java
View file @
18e00fd8
...
...
@@ -79,11 +79,4 @@ public class OrderTourVerificationController extends CommonBaseController {
public
ObjectRestResponse
list
(
@RequestBody
TourGoodOrderFindVo
tourGoodOrderFindVo
)
{
return
verificationBiz
.
getVerifications
(
tourGoodOrderFindVo
);
}
}
\ No newline at end of file
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
18e00fd8
...
...
@@ -94,4 +94,10 @@ public interface TourFeign {
//获取商品信息
@RequestMapping
(
value
=
"/good/app/unauth/one"
,
method
=
RequestMethod
.
GET
)
public
TourGood
one
(
@RequestParam
(
value
=
"goodId"
,
defaultValue
=
"0"
)
Integer
goodId
);
@GetMapping
(
"/tourGoodSite/departure_time"
)
Long
selectDepartureTimeByStartCompanyIdAndRouteId
(
@RequestParam
(
value
=
"companyId"
)
Integer
companyId
,
@RequestParam
(
value
=
"goodId"
)
Integer
routeId
);
@GetMapping
(
"/tourGood/verfication/departure_status"
)
Integer
selectDepartureStatusByVerificationId
(
@RequestParam
(
value
=
"verificationId"
)
Integer
verificationId
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodSiteBiz.java
View file @
18e00fd8
...
...
@@ -21,4 +21,12 @@ public class TourGoodSiteBiz extends BaseBiz<TourGoodSiteMapper,TourGoodSite> {
//删除站点
public
void
delGoodSite
(
Integer
goodId
,
List
<
Integer
>
ids
){
mapper
.
delSite
(
goodId
,
ids
);}
public
Long
selectDepartureTimeByStartCompanyIdAndRouteId
(
Integer
companyId
,
Integer
routeId
)
{
TourGoodSite
tourGoodSite
=
new
TourGoodSite
();
tourGoodSite
.
setCompanyId
(
companyId
);
tourGoodSite
.
setGoodId
(
routeId
);
TourGoodSite
site
=
mapper
.
selectOne
(
tourGoodSite
);
return
site
.
getDepartTime
();
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodVerificationBiz.java
View file @
18e00fd8
...
...
@@ -9,9 +9,7 @@ import com.xxfc.platform.tour.entity.TourGoodVerification;
import
com.xxfc.platform.tour.mapper.TourGoodVerificationMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalTime
;
import
java.util.*
;
/**
...
...
@@ -85,4 +83,11 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper,
return
mapper
.
updateTourGoodPerNumbs
(
verficationId
,
properties
,
number
);
}
public
Integer
selectDepartureStatusByVerificationId
(
Integer
verificationId
)
{
TourGoodVerification
tourGoodVerification
=
new
TourGoodVerification
();
tourGoodVerification
.
setId
(
verificationId
);
TourGoodVerification
verfication
=
mapper
.
selectByPrimaryKey
(
tourGoodVerification
);
return
verfication
.
getStatus
();
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodSiteController.java
View file @
18e00fd8
...
...
@@ -3,11 +3,19 @@ package com.xxfc.platform.tour.rest;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.tour.biz.TourGoodSiteBiz
;
import
com.xxfc.platform.tour.entity.TourGoodSite
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"tourGoodSite"
)
public
class
TourGoodSiteController
extends
BaseController
<
TourGoodSiteBiz
,
TourGoodSite
>
{
@GetMapping
(
"/departure_time"
)
public
Long
selectDepartureTimeByStartCompanyIdAndRouteId
(
@RequestParam
(
value
=
"companyId"
)
Integer
companyId
,
@RequestParam
(
value
=
"goodId"
)
Integer
routeId
){
return
baseBiz
.
selectDepartureTimeByStartCompanyIdAndRouteId
(
companyId
,
routeId
);
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodVerificationController.java
View file @
18e00fd8
...
...
@@ -62,4 +62,9 @@ public class TourGoodVerificationController extends BaseController<TourGoodVerif
}
return
ObjectRestResponse
.
createDefaultFail
();
}
@GetMapping
(
"/departure_status"
)
public
Integer
selectDepartureStatusByVerificationId
(
@RequestParam
(
value
=
"verificationId"
)
Integer
verificationId
){
return
baseBiz
.
selectDepartureStatusByVerificationId
(
verificationId
);
}
}
\ 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