|
@@ -40,13 +40,20 @@ public class TKSimpleService {
|
|
|
|
|
|
|
|
token = identityTokenResult.getTkCarRequestToken();
|
|
token = identityTokenResult.getTkCarRequestToken();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
TKLoginSession session = new TKLoginSession();
|
|
TKLoginSession session = new TKLoginSession();
|
|
|
- session.setUsername(loginInfo.getWebsysUserVo().getUsername());
|
|
|
|
|
|
|
+ session.setToken(token);
|
|
|
session.setTplatformId(tplatformId);
|
|
session.setTplatformId(tplatformId);
|
|
|
- session.setTplatLoginKey(loginInfo.getTplatLoginKey());
|
|
|
|
|
- session.setFromid(loginInfo.getWebsysUserVo().getFromid());
|
|
|
|
|
session.setLoginInfo(loginInfo);
|
|
session.setLoginInfo(loginInfo);
|
|
|
- session.setToken(token);
|
|
|
|
|
|
|
+ session.setTplatLoginKey(loginInfo.getTplatLoginKey());
|
|
|
|
|
+
|
|
|
|
|
+ LoginResult.WebsysUserVo websysUserVo = loginInfo.getWebsysUserVo();
|
|
|
|
|
+ if (websysUserVo != null) {
|
|
|
|
|
+ session.setUsername(websysUserVo.getUsername());
|
|
|
|
|
+ session.setFromid(websysUserVo.getFromid());
|
|
|
|
|
+ String comCode = websysUserVo.getWebsysUserAreaVos().get(0).getAreacode();
|
|
|
|
|
+ session.setComCode(comCode);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return session;
|
|
return session;
|
|
|
}
|
|
}
|
|
@@ -531,9 +538,9 @@ public class TKSimpleService {
|
|
|
* <pre>
|
|
* <pre>
|
|
|
* var _carOwnerNature = $("#ownerNature input:radio[name=nature]:checked").val();//车主性质
|
|
* var _carOwnerNature = $("#ownerNature input:radio[name=nature]:checked").val();//车主性质
|
|
|
* if (passengerSeat == '1'){
|
|
* if (passengerSeat == '1'){
|
|
|
- * obj.carInfoVo.carType = _carType;
|
|
|
|
|
|
|
+ * obj.carInfoVo.carType = _carType;
|
|
|
* } else {
|
|
* } else {
|
|
|
- * if ( _carType == 'A' && _carOwnerNature == '1'){//个人客车
|
|
|
|
|
|
|
+ * if ( _carType == 'A' && _carOwnerNature == '1'){//个人客车
|
|
|
* obj.carInfoVo.carType = 'A';
|
|
* obj.carInfoVo.carType = 'A';
|
|
|
* } else if (_carType == 'A' && == '2'){//机关团体客车
|
|
* } else if (_carType == 'A' && == '2'){//机关团体客车
|
|
|
* obj.carInfoVo.carType = 'C';
|
|
* obj.carInfoVo.carType = 'C';
|
|
@@ -551,6 +558,10 @@ public class TKSimpleService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public String carType(String passengerSeat, String carType, String carOwnerNature) {
|
|
public String carType(String passengerSeat, String carType, String carOwnerNature) {
|
|
|
|
|
+ if (passengerSeat == null || carType == null || carOwnerNature == null) {
|
|
|
|
|
+ return carType;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!passengerSeat.equals("1")) {
|
|
if (!passengerSeat.equals("1")) {
|
|
|
if (carType.equals("A")) {
|
|
if (carType.equals("A")) {
|
|
|
if (carOwnerNature.equals("1")) {
|
|
if (carOwnerNature.equals("1")) {
|
|
@@ -588,6 +599,25 @@ public class TKSimpleService {
|
|
|
String tplatLoginKey = session.getTplatLoginKey();
|
|
String tplatLoginKey = session.getTplatLoginKey();
|
|
|
String fromId = session.getFromid();
|
|
String fromId = session.getFromid();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 车辆所有人信息
|
|
|
|
|
+ TKCarOwnerVo carOwnerVo = new TKCarOwnerVo();
|
|
|
|
|
+
|
|
|
|
|
+ CustomerInfoVo commonCustomersInfo = commonQuoteVo.getOwnersInfo();
|
|
|
|
|
+
|
|
|
|
|
+ if (commonCustomersInfo != null) {
|
|
|
|
|
+ carOwnerVo.setCarOwnerNature("1"); // todo
|
|
|
|
|
+ carOwnerVo.setCertificateType("01"); // 身份证
|
|
|
|
|
+ carOwnerVo.setId(commonCustomersInfo.getIdentifyNumber());
|
|
|
|
|
+ carOwnerVo.setName(commonCustomersInfo.getName());
|
|
|
|
|
+ carOwnerVo.setBirthDate(commonCustomersInfo.getBirthday());
|
|
|
|
|
+ carOwnerVo.setSerialno(BigDecimal.ZERO);
|
|
|
|
|
+ carOwnerVo.setSex(commonCustomersInfo.getGender()); // todo
|
|
|
|
|
+ carOwnerVo.setInsuredAddress("");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 投保人信息
|
|
// 投保人信息
|
|
|
SaveBasicInfoParam.InsureInfo insureInfo = new SaveBasicInfoParam.InsureInfo();
|
|
SaveBasicInfoParam.InsureInfo insureInfo = new SaveBasicInfoParam.InsureInfo();
|
|
|
insureInfo.setAppliInfo(new SaveBasicInfoParam.AppliInfo());
|
|
insureInfo.setAppliInfo(new SaveBasicInfoParam.AppliInfo());
|
|
@@ -602,12 +632,20 @@ public class TKSimpleService {
|
|
|
car.setCarBookingTime(""); // 页面上没有输入框,原注释为“上海地区开具发票日期”,但感觉是车辆时间。
|
|
car.setCarBookingTime(""); // 页面上没有输入框,原注释为“上海地区开具发票日期”,但感觉是车辆时间。
|
|
|
car.setBillNo(""); // 页面上没有输入框,发票号
|
|
car.setBillNo(""); // 页面上没有输入框,发票号
|
|
|
|
|
|
|
|
- String passengerSeat = "";
|
|
|
|
|
- car.setCarType(carType(passengerSeat, tkCarModel.getModelName(), tkCarModel.getFuelType()));
|
|
|
|
|
-
|
|
|
|
|
CarInfoVo commonCarInfoVo = commonQuoteVo.getCarInfoVo();
|
|
CarInfoVo commonCarInfoVo = commonQuoteVo.getCarInfoVo();
|
|
|
|
|
|
|
|
if (commonCarInfoVo != null) {
|
|
if (commonCarInfoVo != null) {
|
|
|
|
|
+ // 车辆大类
|
|
|
|
|
+ String carKindCode = commonCarInfoVo.getCarKindCode();
|
|
|
|
|
+
|
|
|
|
|
+ if (carKindCode.equals(CarKindCode.CAR_KIND_CODE_A0.getCode())) {
|
|
|
|
|
+ car.setCarType("A");
|
|
|
|
|
+ } else if (carKindCode.equals(CarKindCode.CAR_KIND_CODE_A1.getCode())) {
|
|
|
|
|
+ car.setCarType("D");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ throw new RuntimeException("未知车辆大类:" + carKindCode);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
car.setVinNo(commonCarInfoVo.getVinNo()); // 车架号
|
|
car.setVinNo(commonCarInfoVo.getVinNo()); // 车架号
|
|
|
car.setEngineNo(commonCarInfoVo.getEngineNo()); // 发动机号
|
|
car.setEngineNo(commonCarInfoVo.getEngineNo()); // 发动机号
|
|
|
car.setEnrollDate(commonCarInfoVo.getRegisterDate()); // 初登日期
|
|
car.setEnrollDate(commonCarInfoVo.getRegisterDate()); // 初登日期
|
|
@@ -662,26 +700,19 @@ public class TKSimpleService {
|
|
|
TKSimpleService.setLicenseTypeByLicenseNo(car, car.getLicenseNo());
|
|
TKSimpleService.setLicenseTypeByLicenseNo(car, car.getLicenseNo());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- orderCreateOther(null);
|
|
|
|
|
- car.setCarModel(Arrays.asList(tkCarModel));
|
|
|
|
|
- car.setBrandName(tkCarModel.getModelName()); // todo 与 commonCarInfoVo.getBrandName() 重复
|
|
|
|
|
-
|
|
|
|
|
- // 车辆所有人信息
|
|
|
|
|
- TKCarOwnerVo carOwnerVo = new TKCarOwnerVo();
|
|
|
|
|
|
|
+ String passengerSeat = httpService.carTypePassengerSeat(session.getToken(), session.getTplatformId(), session.getFromid(), session.getComCode());
|
|
|
|
|
|
|
|
- CustomerInfoVo commonCustomersInfo = commonQuoteVo.getOwnersInfo();
|
|
|
|
|
|
|
+ String carType = carType(passengerSeat, car.getCarType(), carOwnerVo.getCarOwnerNature());
|
|
|
|
|
|
|
|
- if (commonCustomersInfo != null) {
|
|
|
|
|
- carOwnerVo.setCarOwnerNature("1"); // todo
|
|
|
|
|
- carOwnerVo.setCertificateType("01"); // 身份证
|
|
|
|
|
- carOwnerVo.setId(commonCustomersInfo.getIdentifyNumber());
|
|
|
|
|
- carOwnerVo.setName(commonCustomersInfo.getName());
|
|
|
|
|
- carOwnerVo.setBirthDate(commonCustomersInfo.getBirthday());
|
|
|
|
|
- carOwnerVo.setSerialno(BigDecimal.ZERO);
|
|
|
|
|
- carOwnerVo.setSex(commonCustomersInfo.getGender()); // todo
|
|
|
|
|
- carOwnerVo.setInsuredAddress("");
|
|
|
|
|
|
|
+ if (carType != null) {
|
|
|
|
|
+ car.setCarType(carType);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ orderCreateOther(null);
|
|
|
|
|
+ car.setCarModel(Arrays.asList(tkCarModel));
|
|
|
|
|
+ car.setBrandName(tkCarModel.getModelName()); // todo 与 commonCarInfoVo.getBrandName() 重复
|
|
|
|
|
+
|
|
|
// 车船税信息
|
|
// 车船税信息
|
|
|
TKCarTax carTax = new TKCarTax();
|
|
TKCarTax carTax = new TKCarTax();
|
|
|
carTax.setIsPayTax("1"); // 是否代缴车船税
|
|
carTax.setIsPayTax("1"); // 是否代缴车船税
|