Przeglądaj źródła

Merge branch 'test'

yangzian 3 lat temu
rodzic
commit
58f50fe29b

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

@@ -205,11 +205,17 @@ public class SettlementInfoServiceImpl extends ServiceImpl<SettlementInfoMapper,
                 if (importResult.getList().size() < 1){
                     return Result.error("读取Excel失败,数据不能为空,请重新检查数据并导入");
                 }
-
                 for (AccountImportVo importVo : importResult.getList()) {
                     if (Check.isNull(importVo.getAccountId())){
                         continue;
                     }
+                    //查询账户状态
+                    UserAllocation userAllocation = userAllocationService.getByAccountId(new Long(importVo.getAccountId()));
+                    if (Check.isNull(userAllocation)){
+                        settlementInfo.setStatus(0);
+                    }else {
+                        settlementInfo.setStatus(userAllocation.getAccountStatus());
+                    }
                     BeanUtils.copyProperties(importVo,settlementInfo);
                     //根据账户id 查看
                     CtopCwjsSettlementInfo cwjs = settlementInfoMapper.getSettlementByAccountId(importVo.getAccountId());
@@ -220,12 +226,7 @@ public class SettlementInfoServiceImpl extends ServiceImpl<SettlementInfoMapper,
                         settlementInfo.setId(cwjs.getId());
                         settlementInfoMapper.updateById(settlementInfo);
                     }
-
                 }
-
-
-
-
             }catch (Exception e){
                 e.printStackTrace();
                 return Result.error("账户数据上传失败,请使用正确的模板导入!");