|
|
@@ -5,6 +5,9 @@ import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.AdminMapper;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
+import groovy.util.logging.Log4j;
|
|
|
+import groovy.util.logging.Log4j2;
|
|
|
+import org.apache.commons.collections4.bag.SynchronizedSortedBag;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -34,17 +37,17 @@ public class PushOrderService {
|
|
|
List<String> deps = adminMapper.getFinanceDep(TokenManager.getAdminId());
|
|
|
boolean flag = false;
|
|
|
for (String dep : deps) {
|
|
|
- if (orderDep.equals(deps)) {
|
|
|
+ if (dep.equals(orderDep)) {
|
|
|
flag = true;
|
|
|
break;
|
|
|
}
|
|
|
- if (flag) {
|
|
|
- return url;
|
|
|
- } else {
|
|
|
- return DEFAULTS_URL;
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
+ if (flag) {
|
|
|
+ return url;
|
|
|
+ } else {
|
|
|
+ return DEFAULTS_URL;
|
|
|
+ }
|
|
|
+
|
|
|
} else if (TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)) {
|
|
|
List<String> deps = adminMapper.getLowerFinanceDep(TokenManager.getAdminId());
|
|
|
boolean flag = false;
|
|
|
@@ -53,14 +56,12 @@ public class PushOrderService {
|
|
|
flag = true;
|
|
|
break;
|
|
|
}
|
|
|
- if (flag) {
|
|
|
- return url;
|
|
|
- } else {
|
|
|
- return DEFAULTS_URL;
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
+ if (flag) {
|
|
|
+ return url;
|
|
|
+ } else {
|
|
|
+ return DEFAULTS_URL;
|
|
|
+ }
|
|
|
} else if (TokenManager.hasRole(AFTConstants.SALESMAN)) {
|
|
|
if (TokenManager.getAdminId().equals(aid)) {
|
|
|
return url;
|
|
|
@@ -73,4 +74,6 @@ public class PushOrderService {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|