|
@@ -206,6 +206,16 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
//设置completeBatchNo
|
|
|
Map<String,String> completeBatchNoMap = new HashMap<String,String>();
|
|
|
double totalOpNum = 0.0;
|
|
|
+
|
|
|
+ LbqWrapper<StationUserLoginInfo> stationUserLoginInfoWrapper = new LbqWrapper<StationUserLoginInfo>().in(StationUserLoginInfo::getUserId, userIds);
|
|
|
+ List<StationUserLoginInfo> stationUserLoginInfos = stationUserLoginInfoMapper.selectList(stationUserLoginInfoWrapper);
|
|
|
+ // 工人上下料站人员信息
|
|
|
+ List<Long> stationResourcesIds = stationUserLoginInfos.stream().map(p -> p.getStationId()).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if(stationResourcesIds.size() == 0){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
for(int partIndex = 1;partIndex <= planProductList.size(); partIndex++){
|
|
|
PlanProduct planProduct = planProductList.get(partIndex - 1);
|
|
|
OrderProduct orderProduct = orderProductMap.get(planProduct.getOrderProductId());
|
|
@@ -224,14 +234,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
LbqWrapper<User> userWrapper = new LbqWrapper<User>().eq(User::getOrg, orgId);
|
|
|
List<User> orgUsers = userMapper.selectList(userWrapper);
|
|
|
List<Long> userIds = orgUsers.stream().map(p -> p.getId()).collect(Collectors.toList());
|
|
|
- LbqWrapper<StationUserLoginInfo> stationUserLoginInfoWrapper = new LbqWrapper<StationUserLoginInfo>().in(StationUserLoginInfo::getUserId, userIds);
|
|
|
- List<StationUserLoginInfo> stationUserLoginInfos = stationUserLoginInfoMapper.selectList(stationUserLoginInfoWrapper);
|
|
|
- // 工人上下料站人员信息
|
|
|
- List<Long> stationResourcesIds = stationUserLoginInfos.stream().map(p -> p.getStationId()).collect(Collectors.toList());
|
|
|
|
|
|
- if(stationResourcesIds.size() == 0){
|
|
|
- return null;
|
|
|
- }
|
|
|
|
|
|
//产品批次号,用于产品分解任务关联
|
|
|
String bomBatchNo = UUID.randomUUID().toString().replace("-", "");
|