|
|
@@ -1,6 +1,7 @@
|
|
|
package com.ydtech.components;
|
|
|
|
|
|
|
|
|
+import com.ydtech.constants.enums.dict.insurance.VehicleType;
|
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.service.SysDeptService;
|
|
|
import com.ydtech.modules.admin.service.SysUserService;
|
|
|
@@ -9,14 +10,14 @@ import com.ydtech.modules.esm.service.EsmAgreementProdfeeService;
|
|
|
import com.ydtech.modules.esm.service.EsmAgreementService;
|
|
|
import com.ydtech.modules.esm.service.EsmRetailService;
|
|
|
import com.ydtech.modules.ins.model.InsOrder;
|
|
|
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.RiskInfoVo;
|
|
|
import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
|
|
|
import com.ydtech.modules.ins.service.InsCommissionService;
|
|
|
import com.ydtech.modules.ins.service.InsDeptFeeService;
|
|
|
import com.ydtech.modules.ins.service.InsFeeDetailService;
|
|
|
import com.ydtech.modules.ins.service.InsOrderService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
+import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
@@ -114,7 +115,8 @@ public class OrderComponents {
|
|
|
// deptFee.setAgreeprodid(order.getProductid());
|
|
|
// deptFee.setAuditstatus("0");
|
|
|
// deptFee.setSettlestatus("0");
|
|
|
-// List<EsmAgreementProdfee> prodfees = esmAgreementProdfeeService.selectList(" where agreeprodid=?", new Object[]{order.getProductid()});
|
|
|
+// List<EsmAgreementProdfee> prodfees = esmAgreementProdfeeService.selectList(" where agreeprodid=?", new Object[]{order
|
|
|
+// .getProductid()});
|
|
|
// for (EsmAgreementProdfee prodfee : prodfees) {
|
|
|
// deptFee.setKeeprate(prodfee.getKeeprate() * 0.01);
|
|
|
// BigDecimal amount = new BigDecimal((order.getJqpremium() + order.getSypremium()) * prodfee.getKeeprate() * 0.01);
|
|
|
@@ -293,6 +295,13 @@ public class OrderComponents {
|
|
|
throw new SystemException("投保信息 不能为空!");
|
|
|
}
|
|
|
|
|
|
+ CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
|
|
|
+ if (VehicleType.VT_A1.getCode().equals(carInfo.getCimodelclass())) {
|
|
|
+ String limitLoad = carInfo.getLimitLoad();
|
|
|
+ AssertionUtils.isFail(StringUtils.isEmpty(limitLoad), "车辆种类为货车时,核定载质量必传");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
for (RiskInfoVo riskInfoVo : yaQuoteInfoVo.getRiskList()) {
|
|
|
if (riskInfoVo.getStartDate() == null || riskInfoVo.getEndDate() == null) {
|
|
|
throw new SystemException("投保信息 起保日期 或 终保日期 不能为空!");
|
|
|
@@ -326,7 +335,8 @@ public class OrderComponents {
|
|
|
// insOrder.setCarinfo(JSONObject.parseObject(JSONObject.toJSONString(record.getCarInfo())));
|
|
|
//
|
|
|
// // 关闭订单 不含当前报价号
|
|
|
-// InsOrder orderObj = insOrderService.queryQuoteno(new Object[]{record.getUserId(), record.getCarInfo().getFrameNo(), record.getQuoteno()});
|
|
|
+// InsOrder orderObj = insOrderService.queryQuoteno(new Object[]{record.getUserId(), record.getCarInfo().getFrameNo(), record
|
|
|
+// .getQuoteno()});
|
|
|
// if (orderObj != null) {
|
|
|
// List<InsOrder> listo = insOrderService.selectList(" where quoteno=?", new Object[]{orderObj.getQuoteno()});
|
|
|
// String status = "0";
|
|
|
@@ -373,7 +383,9 @@ public class OrderComponents {
|
|
|
// String productId = "";
|
|
|
// String productname = "";
|
|
|
//
|
|
|
-// List<EsmAgreement> agreements = esmAgreementService.selectList(" where t.agreestatus='1' and t.insure1 like ? " + "and exists (select 1 from esm_agreement_prod t2 where t.id=t2.agreeid and t2.authcomcode like ?)", new Object[]{authComCode + "%", "%" + user.getDeptId() + "%"});
|
|
|
+// List<EsmAgreement> agreements = esmAgreementService.selectList(" where t.agreestatus='1' and t.insure1 like ? " + "and exists
|
|
|
+// (select 1 from esm_agreement_prod t2 where t.id=t2.agreeid and t2.authcomcode like ?)", new Object[]{authComCode + "%", "%" +
|
|
|
+// user.getDeptId() + "%"});
|
|
|
// if (agreements.size() == 0) {
|
|
|
// throw new SystemException("不存在有效协议或机构" + user.getDeptId() + "未授权");
|
|
|
// }
|