Commit a416fa9a authored by hongguangwu's avatar hongguangwu

if (data != null) {

parent 6816825d
...@@ -911,10 +911,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -911,10 +911,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) { if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuranceExportListVO record : insuranceExportList) { for (InsuranceExportListVO record : insuranceExportList) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
} }
//购买月数 //购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
...@@ -979,11 +981,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -979,11 +981,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList); R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) { if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodesList.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodesList.getData().getProjectSetInfoVoMap();
for (InsuranceExportListVO record : list) { if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); for (InsuranceExportListVO record : list) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
} }
} }
} }
...@@ -3151,10 +3155,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3151,10 +3155,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect); R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) { if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuranceListVO record : insuranceList) { if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); for (InsuranceListVO record : insuranceList) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
} }
} }
} }
...@@ -3368,9 +3374,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3368,9 +3374,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuredListVo record : insuranceList.getRecords()) { for (InsuredListVo record : insuranceList.getRecords()) {
//购买月数 //购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
} }
} }
} }
...@@ -3406,9 +3414,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3406,9 +3414,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuredListVo record : insuredList) { for (InsuredListVo record : insuredList) {
//购买月数 //购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString()));
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject) { ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
} }
} }
} }
...@@ -3448,9 +3458,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3448,9 +3458,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuranceRefundListVo record : insuranceRefundPageList.getRecords()) { for (InsuranceRefundListVo record : insuranceRefundPageList.getRecords()) {
//购买月数 //购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
} }
} }
} }
...@@ -3487,10 +3499,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3487,10 +3499,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuranceRefundListVo record : insuranceRefundList) { for (InsuranceRefundListVo record : insuranceRefundList) {
//购买月数 //购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
} }
} }
} }
...@@ -3531,9 +3545,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3531,9 +3545,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (RefundExportListVo record : insuranceRefundHandlingPageList.getRecords()) { for (RefundExportListVo record : insuranceRefundHandlingPageList.getRecords()) {
//购买月数 //购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString()));
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject) { ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
} }
} }
} }
...@@ -3582,10 +3598,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3582,10 +3598,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数 //购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); if (data != null) {
if (null != jsonObject){ ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
} }
TInsuranceDetail detail = getById(record.getId()); TInsuranceDetail detail = getById(record.getId());
TInsuranceRefund refund = new TInsuranceRefund(); TInsuranceRefund refund = new TInsuranceRefund();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment