|
|
@@ -38,12 +38,22 @@ import com.ydtech.modules.order.convert.MapToYaExtendInfoDto;
|
|
|
import com.ydtech.modules.order.dao.InsOrdersMapper;
|
|
|
import com.ydtech.modules.order.entity.*;
|
|
|
import com.ydtech.modules.order.entity.bo.InsOrdersBo;
|
|
|
+import com.ydtech.modules.order.entity.BasePageResult;
|
|
|
+import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
+import com.ydtech.modules.order.entity.InsOrders;
|
|
|
+import com.ydtech.modules.order.entity.InsOrdersTrack;
|
|
|
+import com.ydtech.modules.order.entity.bo.UnderwritingRulesBo;
|
|
|
+import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
|
|
|
import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
|
|
|
import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
|
|
|
import com.ydtech.modules.order.entity.po.*;
|
|
|
import com.ydtech.modules.order.entity.vo.OrderVo;
|
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
|
import com.ydtech.modules.order.entity.vo.ya.YaExtendInfoDto;
|
|
|
+import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
+import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
+import com.ydtech.modules.order.service.InsOrdersTrackService;
|
|
|
+import com.ydtech.modules.protocol.entity.constants.PtlApiType;
|
|
|
import com.ydtech.modules.order.service.*;
|
|
|
import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementService;
|
|
|
@@ -269,9 +279,11 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
|
|
|
|
|
|
if (isCdy) {//如果是出单员查询时,只查自己的 与代客录单一致,查operatorid (手机前端userid传过来是出单用户,直接用该字段查询查operatorid)
|
|
|
- wrapper.eq(StringUtils.isNotEmpty(orderQueryVo.getUserId()), InsOrders::getOperatorid, orderQueryVo.getUserId());
|
|
|
+ wrapper.eq(StringUtils.isNotEmpty(orderQueryVo.getUserId()), InsOrders::getOperatorid,
|
|
|
+ orderQueryVo.getUserId());
|
|
|
} else {
|
|
|
- wrapper.eq(!isTeamLeader && StringUtils.isNotEmpty(orderQueryVo.getUserId()), InsOrders::getUserid, orderQueryVo.getUserId());
|
|
|
+ wrapper.eq(!isTeamLeader && StringUtils.isNotEmpty(orderQueryVo.getUserId()), InsOrders::getUserid,
|
|
|
+ orderQueryVo.getUserId());
|
|
|
}
|
|
|
|
|
|
Page<InsOrders> page = new Page<>(orderQueryVo.getPageNum(), orderQueryVo.getPageSize());
|
|
|
@@ -279,7 +291,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
if (StringUtils.isNotEmpty(orderQueryVo.getCompanyId())) {
|
|
|
List<InsAreaCompany> list = insAreaCompanyService.query().select("DISTINCT orderno").eq("company_id",
|
|
|
orderQueryVo.getCompanyId()).list();
|
|
|
- List<String> collect = list.stream().map(InsAreaCompany::getOrderno).distinct().collect(Collectors.toList());
|
|
|
+ List<String> collect =
|
|
|
+ list.stream().map(InsAreaCompany::getOrderno).distinct().collect(Collectors.toList());
|
|
|
if (!collect.isEmpty()) {
|
|
|
wrapper.in(InsOrders::getOrderno, collect);
|
|
|
}
|
|
|
@@ -295,7 +308,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(orderQueryVo.getAuditStatus()) && orderQueryVo.getAuditStatus().equals("0")) {
|
|
|
- List<InsFeeAudit> list = insFeeAuditService.query().select("DISTINCT orderno").eq("auditstatus", "1").list();
|
|
|
+ List<InsFeeAudit> list =
|
|
|
+ insFeeAuditService.query().select("DISTINCT orderno").eq("auditstatus", "1").list();
|
|
|
List<String> collect = list.stream().map(InsFeeAudit::getOrderno).distinct().collect(Collectors.toList());
|
|
|
|
|
|
if (!collect.isEmpty()) {
|
|
|
@@ -303,9 +317,21 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //查出报价状态为 3
|
|
|
+ List<InsAreaCompany> insAreaCompanies = insAreaCompanyService.getorDerIds();
|
|
|
+// 新的费用订单表
|
|
|
+ if (insAreaCompanies.size() > 0) {
|
|
|
+ List<String> collect =
|
|
|
+ insAreaCompanies.stream().map(insAreaCompany -> insAreaCompany.getOrderno()).collect(Collectors.toList());
|
|
|
+ if (!collect.isEmpty()) {
|
|
|
+ wrapper.in(InsOrders::getOrderno, collect);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Page<InsOrders> insOrdersPage = page(page, wrapper);
|
|
|
|
|
|
- return new BasePageResult<>(orderQueryVo.getPageNum(), page.getSize(), insOrdersPage.getTotal(), page.getPages(),
|
|
|
+ return new BasePageResult<>(orderQueryVo.getPageNum(), page.getSize(), insOrdersPage.getTotal(),
|
|
|
+ page.getPages(),
|
|
|
insOrdersPage.getRecords());
|
|
|
}
|
|
|
|
|
|
@@ -331,7 +357,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
insOrdersExcel.setRegisterDate(carInfoVo.getRegisterDate());
|
|
|
insOrdersExcel.setIssueDate(carInfoVo.getIssueDate());
|
|
|
|
|
|
- String natureOfVehicleUse = NatureOfVehicleUse.getNatureOfVehicleUse(carInfoVo.getCarnature(), carInfoVo.getVehicleUse());
|
|
|
+ String natureOfVehicleUse = NatureOfVehicleUse.getNatureOfVehicleUse(carInfoVo.getCarnature(),
|
|
|
+ carInfoVo.getVehicleUse());
|
|
|
insOrdersExcel.setVehicleUse(natureOfVehicleUse);
|
|
|
|
|
|
insOrdersExcel.setCarNature(NatureOfVehicleUse.getDesc(carInfoVo.getCarnature()));
|
|
|
@@ -363,7 +390,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
|
|
|
//非车
|
|
|
if (!ObjectUtils.isEmpty(insOrdersExcel.getCrossInsurance())) {
|
|
|
- List<DrivingInsuranceDto> drivingInsuranceDtos = insOrdersExcel.getCrossInsurance().toJavaList(DrivingInsuranceDto.class);
|
|
|
+ List<DrivingInsuranceDto> drivingInsuranceDtos =
|
|
|
+ insOrdersExcel.getCrossInsurance().toJavaList(DrivingInsuranceDto.class);
|
|
|
if (!drivingInsuranceDtos.isEmpty()) {
|
|
|
String policyNumber = drivingInsuranceDtos.get(0).getPolicyNumber();
|
|
|
insOrdersExcel.setJyPolicyno(policyNumber);
|
|
|
@@ -403,7 +431,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
return HttpResult.ok("", EasyExcelUtils.downExcel(uploadFilePath, InsOrdersExcel.class, insOrdersExcels));
|
|
|
} else {
|
|
|
if (folder.mkdirs()) {
|
|
|
- return HttpResult.ok("", EasyExcelUtils.downExcel(uploadFilePath, InsOrdersExcel.class, insOrdersExcels));
|
|
|
+ return HttpResult.ok("", EasyExcelUtils.downExcel(uploadFilePath, InsOrdersExcel.class,
|
|
|
+ insOrdersExcels));
|
|
|
} else {
|
|
|
throw new SystemException("文件导出失败");
|
|
|
}
|
|
|
@@ -427,8 +456,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
JSONObject reptxt = orderAndAreaCompany.getReptxt();
|
|
|
ResponseDataC2 responseDataC2 = JSON.toJavaObject(reptxt, ResponseDataC2.class);
|
|
|
List<ExtendInfoDto> extendInfoDtos = responseDataC2.getResponseBody().getExtendInfo();
|
|
|
- Map<String, String> stringStringMap = extendInfoDtos.stream().collect(LinkedHashMap::new, (m, v) -> m.put(v.getKey(),
|
|
|
- v.getValue()), LinkedHashMap::putAll);
|
|
|
+ Map<String, String> stringStringMap = extendInfoDtos.stream().collect(LinkedHashMap::new,
|
|
|
+ (m, v) -> m.put(v.getKey(),
|
|
|
+ v.getValue()), LinkedHashMap::putAll);
|
|
|
yaExtendInfoDto = MapToYaExtendInfoDto.INSTANCE.mapToYaExtendInfoDto(stringStringMap);
|
|
|
orderAndAreaCompany.setExtendInfo(yaExtendInfoDto);
|
|
|
}
|
|
|
@@ -871,7 +901,6 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
SysUser sysUser = (SysUser) saSession.get(SaSession.USER);
|
|
|
final InsOrdersTrack insOrdersTrack = new InsOrdersTrack(insOrders, sysUser.getId(), sysUser.getName());
|
|
|
insOrdersTrackService.save(insOrdersTrack);
|
|
|
- this.baseMapper.insert(insOrders);
|
|
|
return true;
|
|
|
}
|
|
|
|