CostAccountShareServiceImpl.java 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. package com.imed.costaccount.service.impl;
  2. import cn.hutool.core.util.StrUtil;
  3. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6. import com.fasterxml.jackson.core.type.TypeReference;
  7. import com.imed.costaccount.common.exception.CostException;
  8. import com.imed.costaccount.common.util.BeanUtil;
  9. import com.imed.costaccount.common.util.JacksonUtil;
  10. import com.imed.costaccount.common.util.PageUtils;
  11. import com.imed.costaccount.constants.NumberConstant;
  12. import com.imed.costaccount.mapper.CostAccountShareMapper;
  13. import com.imed.costaccount.model.*;
  14. import com.imed.costaccount.model.dto.AccountShareCopyDto;
  15. import com.imed.costaccount.model.dto.CostAccountShareEditDto;
  16. import com.imed.costaccount.model.dto.CostAccountShareSaveDto;
  17. import com.imed.costaccount.model.dto.ShareParamEditDto;
  18. import com.imed.costaccount.model.vo.CostAccountShareVO;
  19. import com.imed.costaccount.model.vo.CostShareParamStatusVO;
  20. import com.imed.costaccount.model.vo.CostShareParamVO;
  21. import com.imed.costaccount.model.vo.ShareParamProportionVO;
  22. import com.imed.costaccount.service.*;
  23. import lombok.extern.slf4j.Slf4j;
  24. import org.apache.shiro.SecurityUtils;
  25. import org.springframework.stereotype.Service;
  26. import org.springframework.transaction.annotation.Propagation;
  27. import org.springframework.transaction.annotation.Transactional;
  28. import org.springframework.util.CollectionUtils;
  29. import org.springframework.util.StringUtils;
  30. import java.util.*;
  31. import java.util.concurrent.atomic.AtomicReference;
  32. import java.util.stream.Collectors;
  33. @Slf4j
  34. @Service("costAccountShareService")
  35. public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMapper, CostAccountShare> implements CostAccountShareService {
  36. private final ResponsibilityService responsibilityService;
  37. private final AccountingService accountingService;
  38. private final CostShareLevelService costShareLevelService;
  39. private final CostShareParamService costShareParamService;
  40. public CostAccountShareServiceImpl(ResponsibilityService responsibilityService, AccountingService accountingService, CostShareLevelService costShareLevelService, CostShareParamService costShareParamService) {
  41. this.responsibilityService = responsibilityService;
  42. this.accountingService = accountingService;
  43. this.costShareLevelService = costShareLevelService;
  44. this.costShareParamService = costShareParamService;
  45. }
  46. /**
  47. * 分页查询责任中心成本对照相关数据
  48. *
  49. * @param current
  50. * @param pageSize
  51. * @param name
  52. * @return
  53. */
  54. @Override
  55. public PageUtils queryList(Integer current, Integer pageSize, String name, Long hospId) {
  56. Page<CostAccountShare> costAccountSharePage = new Page<>(current, pageSize);
  57. Page<CostAccountShare> pages = this.page(costAccountSharePage, new QueryWrapper<CostAccountShare>().lambda()
  58. .eq(!StringUtils.isEmpty(hospId), CostAccountShare::getHospId, hospId)
  59. .like(!StringUtils.isEmpty(name), CostAccountShare::getResponsibilityName, name)
  60. .orderByAsc(CostAccountShare::getShareLevel));
  61. List<CostAccountShare> costAccountShareList = pages.getRecords();
  62. List<CostAccountShareVO> costAccountShareVOList = BeanUtil.convertList(costAccountShareList, CostAccountShareVO.class);
  63. costAccountShareVOList.forEach(i -> {
  64. String accountingIds = i.getAccountingIds();
  65. if (StrUtil.isNotBlank(accountingIds)) {
  66. List<String> list = Arrays.asList(accountingIds.split(StrUtil.COMMA));
  67. i.setAccountingIdList(list);
  68. } else {
  69. i.setAccountingIdList(null);
  70. }
  71. });
  72. // getMessage(hospId, costAccountShareVOList);
  73. PageUtils pageUtils = new PageUtils(pages);
  74. pageUtils.setList(costAccountShareVOList);
  75. return pageUtils;
  76. }
  77. // private void getMessage(Long hospId, List<CostAccountShareVO> costAccountShareList) {
  78. // // 设置责任中心的数据 与 会计科目的数据从对应的id里面获取
  79. // List<Responsibility> list = responsibilityService.list(new QueryWrapper<Responsibility>().lambda().eq(Responsibility::getHospId, hospId));
  80. // List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda().eq(Accounting::getHospId, hospId));
  81. // Map<Long, List<Responsibility>> resMap = list.stream().collect(Collectors.groupingBy(Responsibility::getId));
  82. // Map<Long, List<Accounting>> accountMap = accountingList.stream().collect(Collectors.groupingBy(Accounting::getId));
  83. // costAccountShareList.forEach(i->{
  84. // Long id = i.getResponsibilityId();
  85. // List<Responsibility> responsibilities = resMap.get(id);
  86. // if (!CollectionUtils.isEmpty(responsibilities)){
  87. // i.setResponsibilityId(id);
  88. // i.setResponsibilityName(responsibilities.get(0).getResponsibilityName());
  89. // i.setResponsibilityCode(responsibilities.get(0).getResponsibilityCode());
  90. //
  91. // }
  92. // Long accountingId = i.getAccountingId();
  93. // if (accountingId>0){
  94. // List<Accounting> accountingList1 = accountMap.get(accountingId);
  95. // if (!CollectionUtils.isEmpty(accountingList1)){
  96. // i.setAccountingId(accountingId);
  97. // i.setAccountingName(accountingList1.get(0).getAccountingName());
  98. // i.setAccountingCode(accountingList1.get(0).getAccountingCode());
  99. // i.setAllParentIds(accountingList1.get(0).getAllParentIds());
  100. // }
  101. // }
  102. // });
  103. // }
  104. /**
  105. * 保存成本参数对应成本对照表
  106. *
  107. * @param costAccountShareSaveDto {@link CostAccountShareSaveDto}
  108. */
  109. @Override
  110. @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  111. public void addCostAccountShare(CostAccountShareSaveDto costAccountShareSaveDto) {
  112. User user = (User) SecurityUtils.getSubject().getPrincipal();
  113. Long hospId = user.getHospId();
  114. // 检验输入的数据的合理性
  115. checkAccountShare(costAccountShareSaveDto, hospId);
  116. CostAccountShare costAccountShareRequest = BeanUtil.convertObj(costAccountShareSaveDto, CostAccountShare.class);
  117. costAccountShareRequest.setHospId(hospId);
  118. costAccountShareRequest.setCreateTime(System.currentTimeMillis());
  119. baseMapper.insert(costAccountShareRequest);
  120. }
  121. /**
  122. * 检验输入数据的合理性
  123. *
  124. * @param costAccountShareSaveDto
  125. * @param hospId
  126. */
  127. private void checkAccountShare(CostAccountShareSaveDto costAccountShareSaveDto, Long hospId) {
  128. Long responsibilityId = costAccountShareSaveDto.getResponsibilityId();
  129. Responsibility responsibility = responsibilityService.getOne(new QueryWrapper<Responsibility>().lambda().eq(Responsibility::getHospId, hospId).eq(Responsibility::getId, responsibilityId));
  130. if (Objects.isNull(responsibility)) {
  131. throw new CostException(500, "输入的责任不存在");
  132. }
  133. costAccountShareSaveDto.setResponsibilityId(responsibilityId);
  134. costAccountShareSaveDto.setResponsibilityCode(responsibility.getResponsibilityCode());
  135. costAccountShareSaveDto.setResponsibilityName(responsibility.getResponsibilityName());
  136. costAccountShareSaveDto.setShareLevel(responsibility.getShareLevel());
  137. List<CostAccountShare> costAccountShareList = baseMapper.selectList(new QueryWrapper<CostAccountShare>().lambda().eq(CostAccountShare::getHospId, hospId).eq(CostAccountShare::getResponsibilityId, costAccountShareSaveDto.getResponsibilityId()));
  138. if (!StringUtils.isEmpty(costAccountShareSaveDto.getAccountingIds())) {
  139. // 这个责任中心允许输入会计科目
  140. List<Long> accountIdList = Arrays.stream(costAccountShareSaveDto.getAccountingIds().split(StrUtil.COMMA)).map(Long::valueOf).collect(Collectors.toList());
  141. List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda().eq(Accounting::getHospId, hospId).in(Accounting::getId, accountIdList).orderByDesc(Accounting::getCreateTime));
  142. if (CollectionUtils.isEmpty(accountingList)) {
  143. throw new CostException(500, "输入的会计科目不存在");
  144. } else {
  145. String accountIds = accountingList.stream().map(Accounting::getId).collect(Collectors.toList()).stream().map(String::valueOf).collect(Collectors.joining(StrUtil.COMMA));
  146. costAccountShareSaveDto.setAccountingIds(accountIds);
  147. String accountNames = accountingList.stream().map(Accounting::getAccountingName).map(String::valueOf).collect(Collectors.joining(StrUtil.COMMA));
  148. costAccountShareSaveDto.setAccountingNames(accountNames);
  149. String accountCodes = accountingList.stream().map(Accounting::getAccountingCode).map(String::valueOf).collect(Collectors.joining(StrUtil.COMMA));
  150. costAccountShareSaveDto.setAccountingCodes(accountCodes);
  151. }
  152. // Map<String, List<CostAccountShare>> costAccountMap = costAccountShareList.stream().collect(Collectors.groupingBy(CostAccountShare::getResponsibilityCode));
  153. // List<CostAccountShare> list = costAccountMap.get(costAccountShareSaveDto.getResponsibilityCode());
  154. if (!CollectionUtils.isEmpty(costAccountShareList)) {
  155. costAccountShareList.forEach(i -> {
  156. String accountingIds = i.getAccountingIds();
  157. Integer isShareCost = i.getIsShareCost();
  158. List<Long> accountIdListRequest = Arrays.stream(accountingIds.split(StrUtil.COMMA)).map(Long::valueOf).collect(Collectors.toList());
  159. if (!Collections.disjoint(accountIdListRequest, accountIdList)) {
  160. throw new CostException(500, "存在相同的会计科目数据");
  161. }
  162. if (NumberConstant.ONE.equals(isShareCost) && NumberConstant.ONE.equals(costAccountShareSaveDto.getIsShareCost())) {
  163. throw new CostException(500, "同个责任中心只允许一条设置包含分摊成本");
  164. }
  165. });
  166. }
  167. } else {
  168. // 此时是
  169. // 责任中心只允许出现一次
  170. if (!CollectionUtils.isEmpty(costAccountShareList)) {
  171. throw new CostException(500, "该责任中心合并计算已存在");
  172. }
  173. if (!NumberConstant.ONE.equals(costAccountShareSaveDto.getIsShareCost())) {
  174. throw new CostException(500, "合并计算责任中心必须要设置成包含分摊参数");
  175. }
  176. }
  177. // 检验输入的这个责任中心是否允许输入会计科目
  178. Long shareId = responsibility.getShareId();
  179. CostShareLevel costShareLevel = costShareLevelService.getOne(new QueryWrapper<CostShareLevel>().lambda()
  180. .eq(CostShareLevel::getHospId, hospId).eq(CostShareLevel::getId, shareId));
  181. if (Objects.nonNull(costShareLevel)) {
  182. if ((!StringUtils.isEmpty(costAccountShareSaveDto.getAccountingIds())) && NumberConstant.ZERO.equals(costShareLevel.getCalcType())) {
  183. throw new CostException(500, "合并计算不允许选择会计科目");
  184. }
  185. if ((StringUtils.isEmpty(costAccountShareSaveDto.getAccountingIds())) && NumberConstant.ONE.equals(costShareLevel.getCalcType())) {
  186. throw new CostException(500, "分开计算的责任中心需要选择会计科目");
  187. }
  188. } else {
  189. throw new CostException(500, "对不起该责任中心没有对应分摊层级");
  190. }
  191. }
  192. /**
  193. * 修改成本中心责任对照表
  194. *
  195. * @param costAccountShareEditDto
  196. */
  197. @Override
  198. @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  199. public void updateByCostAccountShare(CostAccountShareEditDto costAccountShareEditDto) {
  200. User user = (User) SecurityUtils.getSubject().getPrincipal();
  201. Long hospId = user.getHospId();
  202. Long id = costAccountShareEditDto.getId();
  203. CostAccountShare costAccountShare = baseMapper.selectById(id);
  204. if (Objects.isNull(costAccountShare)) {
  205. throw new CostException(500, "成本分摊参数对应数据不存在");
  206. }
  207. baseMapper.deleteById(id);
  208. // 新增责任中心成本对照数据
  209. CostAccountShareSaveDto costAccountShareSaveDto = BeanUtil.convertObj(costAccountShareEditDto, CostAccountShareSaveDto.class);
  210. // 检验输入的数据是否符合规则
  211. checkAccountShare(costAccountShareSaveDto, hospId);
  212. CostAccountShareEditDto accountShareEditDto = BeanUtil.convertObj(costAccountShareSaveDto, CostAccountShareEditDto.class);
  213. CostAccountShare costAccountShareRequest = BeanUtil.convertObj(accountShareEditDto, CostAccountShare.class);
  214. costAccountShareRequest.setId(null);
  215. costAccountShareRequest.setHospId(hospId);
  216. costAccountShareRequest.setParamList(costAccountShare.getParamList());
  217. costAccountShareRequest.setCreateTime(System.currentTimeMillis());
  218. baseMapper.insert(costAccountShareRequest);
  219. }
  220. /**
  221. * 修改成本分摊参数的设置
  222. *
  223. * @param shareParamEditDto
  224. */
  225. @Override
  226. @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  227. public void updateShareParam(ShareParamEditDto shareParamEditDto) {
  228. List<ShareParamProportionVO> shareParamProportionVOList1 = shareParamEditDto.getShareParamProportionVOList();
  229. User user = (User) SecurityUtils.getSubject().getPrincipal();
  230. Long hospId = user.getHospId();
  231. Long id = shareParamEditDto.getId();
  232. CostAccountShare costAccountShare = baseMapper.selectOne(new QueryWrapper<CostAccountShare>().lambda()
  233. .eq(CostAccountShare::getHospId, hospId)
  234. .eq(CostAccountShare::getId, id));
  235. if (Objects.isNull(costAccountShare)) {
  236. throw new CostException(500, "分摊参数对应数据不存在");
  237. }
  238. if (!CollectionUtils.isEmpty(shareParamProportionVOList1)) {
  239. List<ShareParamProportionVO> shareParamProportionVOList = shareParamEditDto.getShareParamProportionVOList();
  240. // 检验输入的成本分摊参数是否存在
  241. List<CostShareParamVO> costShareParamServiceAll = costShareParamService.getAll(hospId);
  242. Map<Long, List<CostShareParamVO>> listMap = costShareParamServiceAll.stream().collect(Collectors.groupingBy(CostShareParamVO::getId));
  243. shareParamProportionVOList.forEach(i -> {
  244. if (CollectionUtils.isEmpty(listMap.get(i.getId()))) {
  245. throw new CostException(500, "分摊名称:" + i.getShareParamName() + "未找到");
  246. }
  247. });
  248. // 检验输入的数据的和是否是100
  249. AtomicReference<Integer> sum = new AtomicReference<>(0);
  250. shareParamProportionVOList.forEach(i -> {
  251. sum.updateAndGet(v -> v + i.getShareParamPopout());
  252. });
  253. int max = Integer.parseInt(sum.toString());
  254. if (!NumberConstant.ONE_HUNDRED.equals(max)) {
  255. throw new CostException(500, "分摊比例的和不是100");
  256. }
  257. // 判断添加的分摊是否存在一样的
  258. HashMap<Long, ShareParamProportionVO> hashMap = new HashMap<>();
  259. shareParamProportionVOList.forEach(i -> {
  260. Long paramId = i.getId();
  261. if (hashMap.containsKey(paramId)) {
  262. throw new CostException(500, "不可以添加相同的分摊参数");
  263. }
  264. hashMap.put(paramId, i);
  265. });
  266. //
  267. // String paramList = JsonUtil.toJSONString(shareParamProportionVOList);
  268. String paramList = JacksonUtil.obj2StrPretty(shareParamProportionVOList);
  269. costAccountShare.setParamList(paramList);
  270. } else {
  271. costAccountShare.setParamList(null);
  272. }
  273. baseMapper.updateById(costAccountShare);
  274. }
  275. /**
  276. * 获取责任中心成本表的分摊参数的集合
  277. *
  278. * @param id
  279. * @param hospId
  280. * @return
  281. */
  282. @Override
  283. public List<ShareParamProportionVO> selectShareParamById(Integer id, Long hospId) {
  284. CostAccountShare costAccountShare = baseMapper.selectOne(new QueryWrapper<CostAccountShare>().lambda()
  285. .eq(CostAccountShare::getHospId, hospId).eq(CostAccountShare::getId, id));
  286. if (Objects.isNull(costAccountShare)) {
  287. throw new CostException(500, "责任中心成本不存在");
  288. }
  289. String paramList = costAccountShare.getParamList();
  290. // return JsonUtil.toList(paramList, ShareParamProportionVO.class);
  291. // return JacksonUtil.string2ObjList(paramList, List.class, ShareParamProportionVO.class);
  292. return JacksonUtil.str2ObjList(paramList, new TypeReference<List<ShareParamProportionVO>>() {});
  293. }
  294. /**
  295. * 成本分摊参数中被分摊参数对应选中的状态
  296. *
  297. * @param id
  298. * @param hospId
  299. * @return
  300. */
  301. @Override
  302. public List<CostShareParamStatusVO> getAllShareParamStatusById(Integer id, Long hospId) {
  303. List<CostShareParamVO> costShareParamServiceAll = costShareParamService.getAll(hospId);
  304. CostAccountShare costAccountShare = baseMapper.selectById(id);
  305. if (Objects.isNull(costAccountShare)) {
  306. throw new CostException(500, "成本分摊对应数据不存在");
  307. }
  308. String paramList = costAccountShare.getParamList();
  309. List<CostShareParamStatusVO> costShareParamStatusVOList = BeanUtil.convertList(costShareParamServiceAll, CostShareParamStatusVO.class);
  310. if (!StringUtils.isEmpty(paramList)) {
  311. // List<ShareParamProportionVO> shareParamProportionVOList = JsonUtil.toList(paramList, ShareParamProportionVO.class);
  312. List<ShareParamProportionVO> shareParamProportionVOList = JacksonUtil.str2ObjList(paramList, new TypeReference<List<ShareParamProportionVO>>() {});
  313. Map<Long, List<ShareParamProportionVO>> map = shareParamProportionVOList.stream().collect(Collectors.groupingBy(ShareParamProportionVO::getId));
  314. costShareParamStatusVOList.forEach(i -> {
  315. Long paramId = i.getId();
  316. if (!CollectionUtils.isEmpty(map.get(paramId))) {
  317. i.setShareParamStatus(NumberConstant.ONE);
  318. }
  319. });
  320. }
  321. return costShareParamStatusVOList;
  322. }
  323. /**
  324. * 拷贝
  325. *
  326. * @param accountShareCopyDto 赋值数据
  327. * @param hospId 医院Id
  328. */
  329. @Override
  330. @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  331. public void copyAccountShareData(AccountShareCopyDto accountShareCopyDto, Long hospId) {
  332. Long id = accountShareCopyDto.getId();
  333. CostAccountShare costAccountShare = this.getById(id);
  334. if (Objects.isNull(costAccountShare)) {
  335. throw new CostException(500, "成本分摊参数设置对应数据不存在");
  336. }
  337. List<CostAccountShare> accountShareList = new ArrayList<>();
  338. List<Long> responsibilityIds = accountShareCopyDto.getResponsibilityIds();
  339. Map<Long, Responsibility> responsibilityMap = responsibilityService.list(new QueryWrapper<Responsibility>().lambda()
  340. .eq(Responsibility::getHospId, hospId)).stream().collect(Collectors.toMap(Responsibility::getId, synOne -> synOne));
  341. long millis = System.currentTimeMillis();
  342. responsibilityIds.forEach(i -> {
  343. CostAccountShare accountShareRequest = BeanUtil.convertObj(costAccountShare, CostAccountShare.class);
  344. accountShareRequest.setId(null);
  345. accountShareRequest.setCreateTime(millis);
  346. Responsibility responsibility = responsibilityMap.get(i);
  347. accountShareRequest.setResponsibilityId(i);
  348. accountShareRequest.setResponsibilityCode(responsibility.getResponsibilityCode());
  349. accountShareRequest.setResponsibilityName(responsibility.getResponsibilityName());
  350. accountShareRequest.setShareLevel(responsibility.getShareLevel());
  351. accountShareList.add(accountShareRequest);
  352. });
  353. this.saveBatch(accountShareList);
  354. }
  355. /**
  356. * 获取指定类型的责任中心集合 分开计算还是合并计算
  357. *
  358. * @param accountShareId
  359. * @param hospId
  360. * @return
  361. */
  362. @Override
  363. public List<Responsibility> getResponsibilityCalType(Long accountShareId, Long hospId) {
  364. CostAccountShare costAccountShare = this.getById(accountShareId);
  365. if (Objects.isNull(costAccountShare)) {
  366. throw new CostException(500, "成本分摊参数设置对应数据不存在");
  367. }
  368. Long responsibilityId = costAccountShare.getResponsibilityId();
  369. Responsibility responsibility = responsibilityService.getById(responsibilityId);
  370. Long shareId = responsibility.getShareId();
  371. CostShareLevel costShareLevel = costShareLevelService.getById(shareId);
  372. Integer calcType = costShareLevel.getCalcType();
  373. // 分摊参数设置对饮的责任中心的id集合
  374. // List<Long> responsibilityIds = this.list(new QueryWrapper<CostAccountShare>().lambda().eq(CostAccountShare::getHospId, hospId)).stream().map(CostAccountShare::getResponsibilityId).distinct().collect(Collectors.toList());
  375. // 执行类型的分摊级别的Id的集合
  376. List<Long> costShareIds = costShareLevelService.list(new QueryWrapper<CostShareLevel>().lambda()
  377. .eq(CostShareLevel::getHospId, hospId).eq(CostShareLevel::getCalcType, calcType))
  378. .stream().map(CostShareLevel::getId).distinct().collect(Collectors.toList());
  379. String accountingIds = costAccountShare.getAccountingIds();
  380. List<Long> responsibilityIdList=null;
  381. if (StrUtil.isNotBlank(accountingIds)){
  382. List<String> accountIdList = Arrays.asList(accountingIds.split(StrUtil.COMMA));
  383. responsibilityIdList= baseMapper.getResponsibilityIdsByAccountId(accountIdList);
  384. }
  385. // 筛选指定类型的责任中心 并且当前没有设置的责任中心
  386. List<Long> finalResponsibilityIdList = responsibilityIdList;
  387. List<Responsibility> responsibilityList = responsibilityService.list(new QueryWrapper<Responsibility>().lambda()
  388. .eq(Responsibility::getHospId, hospId)
  389. .ne(Responsibility::getShareId,NumberConstant.ZERO))
  390. .stream().filter(i -> costShareIds.contains(i.getShareId()) && !responsibilityId.equals(i.getId())).collect(Collectors.toList());
  391. // && (CollUtil.isNotEmpty(finalResponsibilityIdList) && !finalResponsibilityIdList.contains(i.getId()))
  392. return responsibilityList;
  393. }
  394. }