| | |
| | | Long userId = SecurityUtils.getLoginUser().getUserid(); |
| | | dto.setUserId(userId); |
| | | dto.setAuditStatus(1); |
| | | dto.setId(null); |
| | | dto.setParentId(dto.getId()); |
| | | dto.setId(null); |
| | | accountingStrategyService.save(dto); |
| | | // 添加明细 |
| | | List<TAccountingStrategyDetail> accountingStrategyDetails = dto.getAccountingStrategyDetails(); |
| | |
| | | String twoUserName = sysUserClient.getSysUser(children.getTwoUserId()).getData().getNickName(); |
| | | accountingStrategyVO.setTwoUserName(twoUserName); |
| | | } |
| | | if(null != children.getUserId()){ |
| | | String userName = sysUserClient.getSysUser(children.getUserId()).getData().getNickName(); |
| | | accountingStrategyVO.setUserName(userName); |
| | | } |
| | | accountingStrategyVO.setAccountingStrategyDetailList(accountingStrategyDetailService.list(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, children.getId()))); |
| | | }else { |
| | |
| | | if(null != accountingStrategy.getTwoUserId()){ |
| | | String twoUserName = sysUserClient.getSysUser(accountingStrategy.getTwoUserId()).getData().getNickName(); |
| | | accountingStrategyVO.setTwoUserName(twoUserName); |
| | | } |
| | | if(null != children.getUserId()){ |
| | | String userName = sysUserClient.getSysUser(children.getUserId()).getData().getNickName(); |
| | | accountingStrategyVO.setUserName(userName); |
| | | } |
| | | accountingStrategyVO.setAccountingStrategyDetailList(accountingStrategyDetailService.list(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, id))); |
| | |
| | | byId.setTwoAuditTime(LocalDateTime.now()); |
| | | |
| | | //如果parentId不为空,则将parentId对应的siteId改为现在的,并且将parenId对应的数据删除 |
| | | if (byId.getParentId()!=null) { |
| | | TAccountingStrategy one = accountingStrategyService.lambdaQuery().eq(TAccountingStrategy::getId, byId.getParentId()).one(); |
| | | byId.setSiteId(one.getSiteId()); |
| | | //将site表对应的模板id修改为新的这个 |
| | | Site byId1 = siteService.getById(one.getSiteId()); |
| | | byId1.setAccountingStrategyId(byId.getId()); |
| | | siteService.updateById(byId1); |
| | | } |
| | | |
| | | //硬件 |
| | | |
| | | //将site表对应的模板id修改为新的这个 |
| | | |
| | | } |
| | | }else { |