Forráskód Böngészése

订单详情接口,分销员id为空bug 修复

wanghao 3 hónapja
szülő
commit
63605693b5

+ 16 - 11
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java

@@ -1383,18 +1383,23 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
         // 比例信息 分销员信息
         if (insFeeOrders != null) {
-            HttpResult<SysUserJzgInfo> firstDistributor = orgClient.getUserInfoById(insFeeOrders.getFirstDistributorId());
-            HttpResult<SysUserJzgInfo> secondDistributor = orgClient.getUserInfoById(insFeeOrders.getSecondDistributorId());
-            HttpResult<SysUserJzgInfo> thirdDistributor = orgClient.getUserInfoById(insFeeOrders.getThirdDistributorId());
-            if (firstDistributor.getData() != null) {
-                insFeeOrders.setFirstDistributorName(firstDistributor.getData().getName());
-            }
-            if (secondDistributor.getData() != null) {
-                insFeeOrders.setSecondDistributorName(secondDistributor.getData().getName());
-            }
-            if (thirdDistributor.getData() != null) {
-                insFeeOrders.setThirdDistributorName(thirdDistributor.getData().getName());
+            if(insFeeOrders.getFirstDistributorId() != null &&
+                    insFeeOrders.getSecondDistributorId() != null &&
+                    insFeeOrders.getThirdDistributorId() != null){
+                HttpResult<SysUserJzgInfo> firstDistributor = orgClient.getUserInfoById(insFeeOrders.getFirstDistributorId());
+                HttpResult<SysUserJzgInfo> secondDistributor = orgClient.getUserInfoById(insFeeOrders.getSecondDistributorId());
+                HttpResult<SysUserJzgInfo> thirdDistributor = orgClient.getUserInfoById(insFeeOrders.getThirdDistributorId());
+                if (firstDistributor.getData() != null) {
+                    insFeeOrders.setFirstDistributorName(firstDistributor.getData().getName());
+                }
+                if (secondDistributor.getData() != null) {
+                    insFeeOrders.setSecondDistributorName(secondDistributor.getData().getName());
+                }
+                if (thirdDistributor.getData() != null) {
+                    insFeeOrders.setThirdDistributorName(thirdDistributor.getData().getName());
+                }
             }
+
             resultVo.setCostRatio(new PtlAgreementCostRatioVo(insFeeOrders));
             resultVo.setInsFeeOrders(new InsFeeOrdersVo(insFeeOrders));
         }