From 329f524e2c112978aecfc05c6c2608f1b7559d53 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期五, 31 三月 2023 15:10:22 +0800
Subject: [PATCH] 默认变更列表
---
src/main/java/com/boying/controller/car/PlateServlet3.java | 12 +++--
src/main/java/com/boying/controller/phone/YCPayController.java | 61 +++++++++++++++++++++++++-----
2 files changed, 57 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/boying/controller/car/PlateServlet3.java b/src/main/java/com/boying/controller/car/PlateServlet3.java
index fc18ed5..a318310 100644
--- a/src/main/java/com/boying/controller/car/PlateServlet3.java
+++ b/src/main/java/com/boying/controller/car/PlateServlet3.java
@@ -433,7 +433,7 @@
outParkService.saveOrUpdate(byCarNoAndBarrierId);
return 0.0;
}else{
- if(w.getParkIds()!=null){
+ if(StringUtils.isNotBlank(w.getParkIds())){
if(w.getEndTime()!=null){
String parkIds = w.getParkIds();
String[] split = parkIds.split(",");
@@ -507,10 +507,12 @@
carType = "鏈堢杞�";
}else {
//鐧藉悕鍗曞浐瀹氬仠杞﹀満杞﹁締
- if(byCarNo.getParkId().equals(barrier.getParkId())){
+ if(StringUtils.isNotBlank(byCarNo.getParkIds()) && byCarNo.getParkIds().contains(barrier.getParkId()+"")){
carType = "鏈堢杞�";
long l = (byCarNo.getEndTime().getTime() - byCarNo.getStartTime().getTime()) / (24 * 3600 * 1000);
carDay = "鏈夋晥鏈熻繕鏈�"+l+"澶�";
+ }else {
+ carType = "涓存椂杞�";
}
}
}
@@ -554,10 +556,10 @@
carType = "鏈堢杞�";
}else {
//鐧藉悕鍗曞浐瀹氬仠杞﹀満杞﹁締
- if(byCarNo.getParkId().equals(barrier.getParkId())){
+ if(StringUtils.isNotBlank(byCarNo.getParkIds()) && byCarNo.getParkIds().contains(barrier.getParkId()+"")){
carType = "鏈堢杞�";
- long l = (byCarNo.getEndTime().getTime() - byCarNo.getStartTime().getTime()) / (24 * 3600 * 1000);
- carDay = "鏈夋晥鏈熻繕鏈�"+l+"澶�";
+ }else {
+ carType = "涓存椂杞�";
}
}
}
diff --git a/src/main/java/com/boying/controller/phone/YCPayController.java b/src/main/java/com/boying/controller/phone/YCPayController.java
index 53481b7..802e7f5 100644
--- a/src/main/java/com/boying/controller/phone/YCPayController.java
+++ b/src/main/java/com/boying/controller/phone/YCPayController.java
@@ -32,6 +32,7 @@
@RequiredArgsConstructor
public class YCPayController {
private final OutParkService outParkService;
+ private final ParkService parkService;
private final OrderRecordService orderRecordService;
private final TicketService ticketService;
private final TicketBlackService ticketBlackService;
@@ -76,25 +77,30 @@
updateOutPark(outPark.getId(),"03");
return R.failed("鏈鍋滆溅鏃犻渶鏀粯璐圭敤!");
}else{
- if(w.getParkId()!=null){
- if(w.getEndTime()!=null){
- if(w.getParkId().equals(outPark.getParkId())&&System.currentTimeMillis()<w.getEndTime().getTime()){
- updateOutPark(outPark.getId(),"03");
- return R.failed("鏈鍋滆溅鏃犻渶鏀粯璐圭敤!");
+ if(StringUtils.isNotBlank(w.getParkIds())){
+ if(w.getParkIds().contains(outPark.getParkId()+"")){
+ if(w.getEndTime()!=null){
+ if(System.currentTimeMillis()<w.getEndTime().getTime()){
+ updateOutPark(outPark.getId(),"03");
+ return R.failed("鏈鍋滆溅鏃犻渶鏀粯璐圭敤!");
+ }
}
}
+
}
}
}
- if(outPark.getStatus() == 0){
-// return R.ok("璺宠浆閭偍鏀粯", "https://hbfs.govpay.ccb.com/online/fssm?fee=130000000001&PyfScnCgycd=01&pyfTpcd=3&BNo="+outPark.getPayCode());
- // return R.ok("璺宠浆閭偍鏀粯", "http://wxtest.smeia.cn/h5/?appid=CUP11234601101¶ms={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
+ if(StringUtils.isNotBlank(outPark.getPayCode()) && outPark.getStatus() == 0){
return R.ok("璺宠浆閭偍鏀粯", "http://wxtest.smeia.cn/h5/static/router.html?rurl=router&router=psbc&appid=CUP16522400671¶ms={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
-
- }else if(outPark.getStatus() == 1){
+ }else if(StringUtils.isNotBlank(outPark.getPayCode()) && outPark.getStatus() == 1){
return R.failed("宸茬即璐�");
+ }
+
+ if(StringUtils.isBlank(outPark.getPayCode())){
+ addOrderRecord(outPark);
+ return R.ok("璺宠浆閭偍鏀粯", "http://wxtest.smeia.cn/h5/static/router.html?rurl=router&router=psbc&appid=CUP16522400671¶ms={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
}else {
- return R.failed("绯荤粺寮傚父");
+ return R.failed("鍑洪敊");
}
}
@@ -230,6 +236,39 @@
}
}
+ //鎻掑叆鍋滆溅璁㈠崟璁板綍
+ public void addOrderRecord(OutPark outPark){
+ outPark.setPayCode(outPark.getId()+"");
+ outParkService.saveOrUpdate(outPark);
+ Park park = parkService.getById(outPark.getParkId());
+ OrderRecord orderRecord = new OrderRecord();
+ orderRecord.setAddress(park.getName());
+ orderRecord.setCarNo(outPark.getCarNo());
+ orderRecord.setCode(outPark.getCode());
+ orderRecord.setCode2(outPark.getCode2());
+ orderRecord.setMoney(outPark.getPrice());
+ orderRecord.setQueryId(outPark.getId());
+ orderRecord.setType(1);
+ orderRecord.setTicketStatus(0);
+ orderRecord.setPayCode(outPark.getPayCode());
+ orderRecordService.saveOrUpdate(orderRecord);
+ }
+
+ //鎻掑叆鎵ф硶璁㈠崟璁板綍
+ public void addOrderRecord2(Ticket ticket){
+ OrderRecord orderRecord = new OrderRecord();
+ orderRecord.setAddress(ticket.getAddress());
+ orderRecord.setCarNo(ticket.getCarNo());
+ orderRecord.setCode(ticket.getCode());
+ orderRecord.setMoney(ticket.getMoney());
+ orderRecord.setQueryId(ticket.getId());
+ orderRecord.setType(0);
+ orderRecord.setPayCode(ticket.getPayCode());
+ orderRecordService.saveOrUpdate(orderRecord);
+ }
+
+
+
private void writeTxt( String txt)
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
--
Gitblit v1.9.1