Browse Source

财务结算- not empty

yangzian 3 years ago
parent
commit
0da1448317

+ 6 - 2
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/service/serviceImpl/SettlementInfoServiceImpl.java

@@ -81,9 +81,13 @@ public class SettlementInfoServiceImpl extends ServiceImpl<SettlementInfoMapper,
 
         //同步 状态
        CtopCwjsSettlementInfo settlementInfo =  settlementInfoMapper.selectById(id);
+
         UserAllocation userAllocation = userAllocationService.getByAccountId(new Long(settlementInfo.getAccountId()));
-        userAllocation.setAccountStatus(status);
-        userAllocationService.editUserAlloCation(userAllocation);
+        if (!Check.isNull(userAllocation)){
+            userAllocation.setAccountStatus(status);
+            userAllocationService.editUserAlloCation(userAllocation);
+        }
+
 
         return Result.successMsg("财务结算-修改账户状态成功。", null);
     }