|
|
@@ -21,7 +21,6 @@ import com.qtzl.alterSales.manager.enums.BlacklistOpType; |
|
|
|
import com.qtzl.alterSales.manager.handler.ActivateDataModelVoFindByDayHandler; |
|
|
|
import com.qtzl.alterSales.manager.handler.AflServerFeeRefundExportHandler; |
|
|
|
import com.qtzl.alterSales.manager.handler.FssPaccountPayResultFindByPayIdHandler; |
|
|
|
import com.qtzl.alterSales.manager.model.protocol.NoAttributeResponse; |
|
|
|
import com.qtzl.alterSales.manager.model.protocol.sales.ActivateDataFindByDayRequest; |
|
|
|
import com.qtzl.alterSales.manager.model.protocol.sales.AflServerFeeRefundPageRequest; |
|
|
|
import com.qtzl.alterSales.manager.model.protocol.sales.ChoiceBillsPayRequest; |
|
|
@@ -54,12 +53,12 @@ import org.springframework.test.context.junit4.SpringRunner; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.io.IOException; |
|
|
|
import java.text.DateFormat; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/*** |
|
|
@@ -255,40 +254,45 @@ public class SaleTest { |
|
|
|
|
|
|
|
@Test |
|
|
|
public void test22() throws ServiceHandleException, IOException { |
|
|
|
// testVehicleStatusListChange("川AAW7500",4,1); |
|
|
|
// testVehicleStatusListChange("沪AC03969",4,1); |
|
|
|
// testVehicleStatusListChange("鲁DA2H11",0,2); |
|
|
|
testVehicleStatusListChange("粤ABR1180",4,2); |
|
|
|
// testVehicleStatusListChange("苏U563AR",0,1); |
|
|
|
// testVehicleStatusListChange("鲁DA2H11",0,1); |
|
|
|
// testVehicleStatusListChange("云JLU738",0,1); |
|
|
|
// testVehicleStatusListChange("皖GBP580",0,1); |
|
|
|
// testVehicleStatusListChange("苏A66SV8",0,1); |
|
|
|
// testVehicleStatusListChange("蒙G902J5",0,1); |
|
|
|
// testVehicleStatusListChange("鄂C8217N",0,1); |
|
|
|
// testVehicleStatusListChange("贵HDA1822",4,1); |
|
|
|
// testVehicleStatusListChange("粤ABR1180",4,2); |
|
|
|
testVehicleStatusListChange("鲁US515S", 0, 1); |
|
|
|
// testVehicleStatusListChange("蒙KGS076", 0, 1); |
|
|
|
// testVehicleStatusListChange("贵DZM491", 0, 1); |
|
|
|
// testVehicleStatusListChange("鲁EX6567", 0, 1); |
|
|
|
// testVehicleStatusListChange("晋BQJ793", 0, 1); |
|
|
|
// testVehicleStatusListChange("皖GDQ169", 0, 1); |
|
|
|
// testVehicleStatusListChange("豫LA792Z", 0, 1); |
|
|
|
// testVehicleStatusListChange("豫A314DE", 0, 1); |
|
|
|
// testVehicleStatusListChange("苏U669AL", 0, 1); |
|
|
|
// testVehicleStatusListChange("鲁AF98000", 4, 1); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
* 操作单辆车状态名单 |
|
|
|
*/ |
|
|
|
public void testVehicleStatusListChange(String plateNum,Integer plateColor,Integer type) throws ServiceHandleException { |
|
|
|
public void testVehicleStatusListChange(String plateNum, Integer plateColor, Integer type) throws ServiceHandleException { |
|
|
|
VehicleStatusListChangeRequest request = new VehicleStatusListChangeRequest(); |
|
|
|
request.setAgentId("52010188930"); |
|
|
|
request.setReason(4); |
|
|
|
request.setType(type); |
|
|
|
request.setCreateTime(DateUtil.format(LocalDateTime.now(),"yyyy-MM-dd'T'HH:mm:ss")); |
|
|
|
request.setCreateTime(DateUtil.format(LocalDateTime.now(), "yyyy-MM-dd'T'HH:mm:ss")); |
|
|
|
request.setUniqueKey("AFL_YQ_SECOND"); |
|
|
|
String vehicleId = ""; |
|
|
|
List<AflBindInfo> aflBindInfo = aflBindInfoRepo.findByPlateNumAndPlateColor(plateNum, plateColor); |
|
|
|
if (!aflBindInfo.isEmpty()) { |
|
|
|
vehicleId = aflBindInfo.get(0).getVehicleId(); |
|
|
|
if (aflBindInfo.size() > 0) { |
|
|
|
vehicleId = aflBindInfo.stream().sorted(Comparator.comparing(AflBindInfo::getInsertTime).reversed()) |
|
|
|
.toList().get(0).getVehicleId(); |
|
|
|
} else { |
|
|
|
AflCenterVehicleInfo aflCenterVehicleInfo = aflCenterVehicleInfoRepo.findByPlateNumAndPlateColor(plateNum |
|
|
|
, plateColor); |
|
|
|
if (aflCenterVehicleInfo == null) { |
|
|
|
List<AflCenterVehicleInfo> aflCenterVehicleInfo = |
|
|
|
aflCenterVehicleInfoRepo.findListByPlateNumAndPlateColor(plateNum |
|
|
|
, plateColor); |
|
|
|
if (aflCenterVehicleInfo == null && aflCenterVehicleInfo.size() == 0){ |
|
|
|
System.out.println("车辆信息不存在,车牌号:" + plateNum); |
|
|
|
return; |
|
|
|
} |
|
|
|
vehicleId = aflCenterVehicleInfo.getVehicleId(); |
|
|
|
vehicleId = aflCenterVehicleInfo.get(0).getVehicleId(); |
|
|
|
} |
|
|
|
request.setVehicleId(vehicleId); |
|
|
|
if (ObjectUtil.isNotEmpty(vehicleId)) { |
|
|
@@ -303,7 +307,7 @@ public class SaleTest { |
|
|
|
System.out.println("车辆卡信息不存在,车牌号:" + plateNum); |
|
|
|
return; |
|
|
|
} |
|
|
|
request.setCpuId(cardId.replaceAll("9901","")); |
|
|
|
request.setCpuId(cardId.replaceAll("9901", "")); |
|
|
|
aflVehicleStatusInfoService.VehicleStatusListChange(request); |
|
|
|
System.out.println("操作状态名单成功,车牌号:" + plateNum); |
|
|
|
} |