Commit a416fa9a authored by hongguangwu's avatar hongguangwu

if (data != null) {

parent 6816825d
......@@ -911,11 +911,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuranceExportListVO record : insuranceExportList) {
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
......@@ -979,14 +981,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodesList.getData().getProjectSetInfoVoMap();
if (data != null) {
for (InsuranceExportListVO record : list) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuranceExportListVO record : list) {
record.setProjectName(CommonConstants.EMPTY_STRING);
......@@ -3151,13 +3155,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (data != null) {
for (InsuranceListVO record : insuranceList) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuranceListVO record : insuranceList) {
record.setProjectName(CommonConstants.EMPTY_STRING);
......@@ -3368,12 +3374,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuredListVo record : insuranceList.getRecords()) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}
return insuranceList;
......@@ -3406,12 +3414,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuredListVo record : insuredList) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuredListVo record : insuredList) {
record.setProjectName(CommonConstants.EMPTY_STRING);
......@@ -3448,12 +3458,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuranceRefundListVo record : insuranceRefundPageList.getRecords()) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}catch (Exception e){
log.error(InsurancesConstants.GET_DEPT_DETAIL_ERROR+e);
}
......@@ -3487,14 +3499,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuranceRefundListVo record : insuranceRefundList) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
}
}
}
return R.ok(insuranceRefundList);
}
......@@ -3531,6 +3545,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (RefundExportListVo record : insuranceRefundHandlingPageList.getRecords()) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
......@@ -3539,6 +3554,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
return insuranceRefundHandlingPageList;
}
......@@ -3582,11 +3598,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
TInsuranceDetail detail = getById(record.getId());
TInsuranceRefund refund = new TInsuranceRefund();
detail.setId(record.getId());
......
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