|
@@ -1,8 +1,11 @@
|
|
|
package com.ydtech.modules.order.service.impl;
|
|
package com.ydtech.modules.order.service.impl;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ydtech.constants.enums.dict.BusinessPropertyEnum;
|
|
import com.ydtech.constants.enums.dict.BusinessPropertyEnum;
|
|
|
import com.ydtech.constants.enums.dict.BusinessSegmentsSZEnum;
|
|
import com.ydtech.constants.enums.dict.BusinessSegmentsSZEnum;
|
|
|
import com.ydtech.exception.SystemException;
|
|
import com.ydtech.exception.SystemException;
|
|
|
|
|
+import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
|
|
|
import com.ydtech.modules.order.dao.InsOrdersMapper;
|
|
import com.ydtech.modules.order.dao.InsOrdersMapper;
|
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
|
import com.ydtech.modules.order.service.ExcelExportService;
|
|
import com.ydtech.modules.order.service.ExcelExportService;
|
|
@@ -13,6 +16,7 @@ import org.springframework.stereotype.Service;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
|
|
@Service
|
|
@Service
|
|
|
public class ExcelExportServiceImpl implements ExcelExportService {
|
|
public class ExcelExportServiceImpl implements ExcelExportService {
|
|
@@ -20,6 +24,9 @@ public class ExcelExportServiceImpl implements ExcelExportService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private InsOrdersMapper insOrdersMapper;
|
|
private InsOrdersMapper insOrdersMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private InsPlyIncomeMapper insPlyIncomeMapper;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取车险业务明细
|
|
* 获取车险业务明细
|
|
|
* @param userId
|
|
* @param userId
|
|
@@ -106,4 +113,28 @@ public class ExcelExportServiceImpl implements ExcelExportService {
|
|
|
return auditExportList;
|
|
return auditExportList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<ReceivableExportVo> getReceivableExportList(AuditExportQueryVo auditExportQueryVo) {
|
|
|
|
|
+ if(auditExportQueryVo.getSignStartDate() == null || auditExportQueryVo.getSignEndDate() == null) {
|
|
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
+ LocalDateTime halfYearAgo = now.minusMonths(6);
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+ }
|
|
|
|
|
+ List<ReceivableExportVo> receivableExportList = insPlyIncomeMapper.getReceivableExportList(auditExportQueryVo);
|
|
|
|
|
+ receivableExportList.forEach(item->{
|
|
|
|
|
+ JSONArray crossInsrances = JSONArray.parseArray(item.getCrossInsurance());
|
|
|
|
|
+ if(Objects.nonNull(item.getCrossInsurance())){
|
|
|
|
|
+ crossInsrances = JSONArray.parseArray(item.getCrossInsurance());
|
|
|
|
|
+ }
|
|
|
|
|
+// JSONArray crossInsruance = item.getCrossInsurance();
|
|
|
|
|
+ if (Objects.nonNull(crossInsrances)){
|
|
|
|
|
+ if(crossInsrances.size()>0){
|
|
|
|
|
+ JSONObject cross = crossInsrances.getJSONObject(0);
|
|
|
|
|
+ item.setJypolicyno(cross.getString("application"));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return receivableExportList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|