|
@@ -1151,11 +1151,17 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
if (CollUtil.isNotEmpty(records)) {
|
|
if (CollUtil.isNotEmpty(records)) {
|
|
|
Map<String, String> attrTypeMap = orgClient.queryAllTypeAttrMap();
|
|
Map<String, String> attrTypeMap = orgClient.queryAllTypeAttrMap();
|
|
|
List<OrderListVo> list = records.stream().peek(action -> {
|
|
List<OrderListVo> list = records.stream().peek(action -> {
|
|
|
|
|
+ // 转换状态的值
|
|
|
|
|
+ String descByCode = InsOrderStatusEnum.getDescByCode(action.getOrderStatus());
|
|
|
|
|
+ action.setOrderStatusName(descByCode);
|
|
|
|
|
+
|
|
|
String jzgInfoId1 = action.getJzgInfoId();
|
|
String jzgInfoId1 = action.getJzgInfoId();
|
|
|
if (StrUtil.isNotEmpty(jzgInfoId1)) {
|
|
if (StrUtil.isNotEmpty(jzgInfoId1)) {
|
|
|
action.setSalesmanType(attrTypeMap.get(jzgInfoId1));
|
|
action.setSalesmanType(attrTypeMap.get(jzgInfoId1));
|
|
|
}
|
|
}
|
|
|
}).toList();
|
|
}).toList();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
orderListVoPage.setRecords(list);
|
|
orderListVoPage.setRecords(list);
|
|
|
}
|
|
}
|
|
|
if (StringUtils.equals("1", insOrdersParam.getIsLargeOrder())) {
|
|
if (StringUtils.equals("1", insOrdersParam.getIsLargeOrder())) {
|
|
@@ -1536,15 +1542,29 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
}
|
|
}
|
|
|
insOrdersParam.setSystemCode(systemCode);
|
|
insOrdersParam.setSystemCode(systemCode);
|
|
|
Page<OrderListVo> orderListVoPage = queryMainOrderList(insOrdersParam);
|
|
Page<OrderListVo> orderListVoPage = queryMainOrderList(insOrdersParam);
|
|
|
|
|
+ if (null == orderListVoPage){
|
|
|
|
|
+ throw new SystemException("数据为空,导出失败!");
|
|
|
|
|
+ }
|
|
|
List<OrderListVo> orderListVos = orderListVoPage.getRecords();
|
|
List<OrderListVo> orderListVos = orderListVoPage.getRecords();
|
|
|
|
|
+ if (CollUtil.isEmpty(orderListVos)){
|
|
|
|
|
+ throw new SystemException("数据为空,导出失败!");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ insOrdersParam.setParentIds(orderListVos.stream().map(OrderListVo::getOrderNo).toList());
|
|
|
|
|
+ Page<OrderListVo> orderListVoPageVos = queryList(insOrdersParam);
|
|
|
|
|
+ List<OrderListVo> records = orderListVoPageVos.getRecords();
|
|
|
|
|
|
|
|
- log.info("导出订单列表,导出[{}]条记录", CollUtil.size(orderListVos));
|
|
|
|
|
|
|
+ log.info("导出订单列表,导出[{}]条记录", CollUtil.size(records));
|
|
|
// 动态设置要导出的字段
|
|
// 动态设置要导出的字段
|
|
|
String exportDynamicFields = insOrdersParam.getExportDynamicFields();
|
|
String exportDynamicFields = insOrdersParam.getExportDynamicFields();
|
|
|
|
|
+ // 把订单状态的枚举值,转换成订单状态的名称
|
|
|
|
|
+ if (exportDynamicFields.contains("orderStatus")){
|
|
|
|
|
+ exportDynamicFields = exportDynamicFields.replace("orderStatus", "orderStatusName");
|
|
|
|
|
+ }
|
|
|
Set<String> exportFields = new LinkedHashSet<>(Arrays.asList(exportDynamicFields.split(";")));
|
|
Set<String> exportFields = new LinkedHashSet<>(Arrays.asList(exportDynamicFields.split(";")));
|
|
|
|
|
|
|
|
// 调用动态导出
|
|
// 调用动态导出
|
|
|
- return exportBaseService.upLoadFileDynamic(OrderListVo.class, orderListVos, exportFields, "车险出单-订单管理-动态导出-" + Instant.now());
|
|
|
|
|
|
|
+ return exportBaseService.upLoadFileDynamic(OrderListVo.class, records, exportFields, "车险出单-订单管理-动态导出-" + Instant.now());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|