|
|
@ -516,7 +516,7 @@ public class DepositoryServiceImpl implements DepositoryService { |
|
|
|
|
|
|
|
|
if (depositoryIdList.size() > 0) { |
|
|
if (depositoryIdList.size() > 0) { |
|
|
// 如果有剩余,开启线程进行处理
|
|
|
// 如果有剩余,开启线程进行处理
|
|
|
Future<Object> future = completionService.submit(new Task(depositoryIdList,type, adminorg, userByPort)); |
|
|
Future<Object> future = completionService.submit(new Task(depositoryIdList, type, adminorg, userByPort)); |
|
|
futureList.add(future); |
|
|
futureList.add(future); |
|
|
openThreadSize++; |
|
|
openThreadSize++; |
|
|
} |
|
|
} |
|
|
@ -966,7 +966,7 @@ public class DepositoryServiceImpl implements DepositoryService { |
|
|
// 当前选择仓库的类型
|
|
|
// 当前选择仓库的类型
|
|
|
String type; |
|
|
String type; |
|
|
|
|
|
|
|
|
public Task(List<Integer> depositoryIdList, String type,String adminorg, UserByPort userByPort) { |
|
|
public Task(List<Integer> depositoryIdList, String type, String adminorg, UserByPort userByPort) { |
|
|
this.depositoryIdList = depositoryIdList; |
|
|
this.depositoryIdList = depositoryIdList; |
|
|
this.adminorg = adminorg; |
|
|
this.adminorg = adminorg; |
|
|
this.userByPort = userByPort; |
|
|
this.userByPort = userByPort; |
|
|
@ -980,11 +980,11 @@ public class DepositoryServiceImpl implements DepositoryService { |
|
|
*/ |
|
|
*/ |
|
|
List<Depository> depositories = depositoryMapper.selectDepositoryByIds(depositoryIdList); |
|
|
List<Depository> depositories = depositoryMapper.selectDepositoryByIds(depositoryIdList); |
|
|
|
|
|
|
|
|
List<Integer> integerList = new ArrayList<>(); |
|
|
List<Integer> integerList = new ArrayList<>(); |
|
|
if("1".equals(type)){ |
|
|
if ("1".equals(type)) { |
|
|
// 如果是因为入库、库存转移而打开的仓库列表
|
|
|
// 如果是因为入库、库存转移而打开的仓库列表
|
|
|
integerList = roleService.findDepositoryIdForUser(userByPort); |
|
|
integerList = roleService.findDepositoryIdForUser(userByPort); |
|
|
}else{ |
|
|
} else { |
|
|
// 如果是其他
|
|
|
// 如果是其他
|
|
|
integerList = roleService.findDepositoryIdForUserHas(userByPort); |
|
|
integerList = roleService.findDepositoryIdForUserHas(userByPort); |
|
|
|
|
|
|
|
|
@ -1026,9 +1026,9 @@ public class DepositoryServiceImpl implements DepositoryService { |
|
|
CompletionService<Object> completionService = new ExecutorCompletionService<Object>(exs); |
|
|
CompletionService<Object> completionService = new ExecutorCompletionService<Object>(exs); |
|
|
|
|
|
|
|
|
// 定义开启线程数
|
|
|
// 定义开启线程数
|
|
|
Integer openThreadSize = 0; |
|
|
int openThreadSize = 0; |
|
|
for (Depository depository : depositories) { |
|
|
for (Depository depository : depositories) { |
|
|
if ("".equals(adminorg) || "361".equals(adminorg)) { // 如果不按部门分类或是仓储中心人员,则全部加载
|
|
|
if (("".equals(adminorg) || PublicConfig.roleAdminorgList.contains(Integer.parseInt(adminorg))) && !"21".equals(type)) { // 如果不按部门分类或是仓储中心人员且不是入库、库存转移,则全部加载
|
|
|
Future<Object> submit = completionService.submit(new PlaceTask(depository)); |
|
|
Future<Object> submit = completionService.submit(new PlaceTask(depository)); |
|
|
futureList.add(submit); |
|
|
futureList.add(submit); |
|
|
openThreadSize++; |
|
|
openThreadSize++; |
|
|
|