|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.permission.service.impl;
|
|
|
|
|
|
import com.goafanti.common.bo.Error;
|
|
|
+import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
import com.goafanti.common.enums.roleResources;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
@@ -52,6 +53,8 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
|
|
|
private TOrderLogMapper tOrderLogMapper;
|
|
|
@Autowired
|
|
|
private AsyncUtils asyncUtils;
|
|
|
+ @Autowired
|
|
|
+ private DepartmentMapper departmentMapper;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -196,10 +199,34 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
|
|
|
roleResourcesMapper.updateDimissionTransfer(s,aid,transferId);
|
|
|
}
|
|
|
}
|
|
|
+ //判定是否要转交财务统计信息
|
|
|
+ transferFinanceCount(aid,transferId);
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ private void transferFinanceCount(String aid, String transferId) {
|
|
|
+ List<Integer> integerList = adminMapper.selectRoleTypeByid(aid);
|
|
|
+ List<Integer> integerList1 = adminMapper.selectRoleTypeByid(transferId);
|
|
|
+ boolean flag=asyncFinanceCount(integerList);
|
|
|
+ boolean flag2=asyncFinanceCount(integerList1);
|
|
|
+ if (flag&&flag2) {
|
|
|
+ departmentMapper.updateDepFinance(aid,transferId);
|
|
|
+ }
|
|
|
+ if (flag){
|
|
|
+ asyncUtils.financeCoutSwitch(aid);
|
|
|
+ }
|
|
|
+ if (flag2){
|
|
|
+ asyncUtils.financeCoutSwitch(transferId);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ private boolean asyncFinanceCount(List<Integer> integerList) {
|
|
|
+ boolean contains = integerList.contains(Integer.parseInt(AFTConstants.FINANCE));
|
|
|
+ if (!contains){
|
|
|
+ contains = integerList.contains(Integer.parseInt(AFTConstants.FINANCE_MANAGER));
|
|
|
+ }
|
|
|
+ return contains;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|