| | |
| | | TAccountingStrategy one = accountingStrategyService.lambdaQuery().eq(TAccountingStrategy::getId, byId.getParentId()).one(); |
| | | byId.setSiteId(one.getSiteId()); |
| | | //将site表对应的模板id修改为新的这个 |
| | | Site byId1 = siteService.getById(one.getSiteId()); |
| | | if (byId1!=null) { |
| | | byId1.setAccountingStrategyId(byId.getId()); |
| | | siteService.updateById(byId1); |
| | | List<Site> list = siteService.lambdaQuery().eq(Site::getAccountingStrategyId, one.getId()).list(); |
| | | for (Site site : list) { |
| | | site.setAccountingStrategyId(byId.getId()); |
| | | } |
| | | siteService.updateBatchById(list); |
| | | // |
| | | |
| | | |
| | | |
| | | // |
| | | accountingStrategyService.removeById(one.getId()); |
| | | } |
| | | //硬件 |