|
@@ -22,6 +22,7 @@ import com.jpsoft.bus.modules.bus.service.*;
|
|
|
import com.jpsoft.bus.modules.common.utils.CommonUtil;
|
|
|
import com.jpsoft.bus.modules.pay.service.AlipayService;
|
|
|
import com.jpsoft.bus.modules.pay.service.WechatService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -31,6 +32,7 @@ import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.bus.modules.common.dto.Sort;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Transactional
|
|
|
@Component(value = "passengerInfoService")
|
|
|
public class PassengerInfoServiceImpl implements PassengerInfoService {
|
|
@@ -132,8 +134,22 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
|
|
|
if (passengerInfoList.size() > 0) {
|
|
|
PassengerInfo passengerInfo = passengerInfoList.get(0);
|
|
|
|
|
|
+ boolean allow = true;
|
|
|
+
|
|
|
//如果已过站则不改状态
|
|
|
- if(!"2".equals(passengerInfo.getPayStatus())) {
|
|
|
+ if("2".equals(passengerInfo.getPayStatus())) {
|
|
|
+ log.warn("乘客:{}已过站,不修改状态",passengerInfo.getId());
|
|
|
+ allow = false;
|
|
|
+ }
|
|
|
+ else if("0".equals(passengerInfo.getPayStatus())){
|
|
|
+ //未购票,同时已过站
|
|
|
+ if (!passengerInfo.getUpStationId().equals(shiftInfo.getCurrentStationId())){
|
|
|
+ log.warn("乘客:{}未购票且已过站,不修改状态", passengerInfo.getId());
|
|
|
+ allow = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(allow){
|
|
|
passengerInfo.setLocalImageUrl(localImageUrl);
|
|
|
passengerInfo.setDownTime(recordDate);
|
|
|
passengerInfo.setDownStationId(stationId);
|