|
|
|
@ -17,7 +17,6 @@
|
|
|
|
|
package com.logpm.warehouse.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.Query; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
@ -47,11 +46,11 @@ import com.logpm.warehouse.vo.*;
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
@ -98,8 +97,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient; |
|
|
|
|
private final IBasicdataGoodsShelfClient basicdataGoodsShelfClient; |
|
|
|
|
private final IBasicdataGoodsAreaClient basicdataGoodsAreaClient; |
|
|
|
|
private final IBasicdataClientClient basicdataClientClient; |
|
|
|
|
private final IWarehouseTrayTypeService trayTypeService; |
|
|
|
|
private final IWarehouseTaryAllocationService taryAllocationService; |
|
|
|
|
private final IWarehouseGoodsAllocationService warehouseGoodsAllocationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -190,6 +191,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
detailEntity.setWaybillNumber(i.getWaybillNumber()); |
|
|
|
|
detailEntity.setOrderPackageId(i.getId()); |
|
|
|
|
detailEntity.setCategoryName(i.getFirsts()); |
|
|
|
|
detailEntity.setThirdProduct(i.getThirdProduct()); |
|
|
|
|
detailEntity.setFirsts(i.getFirsts()); |
|
|
|
|
detailEntity.setSecond(i.getSecond()); |
|
|
|
|
detailEntity.setStockId(i.getStockId()); //库存品ID
|
|
|
|
|
detailEntity.setQuestStatus(0); |
|
|
|
|
detailEntity.setStockNum(ObjectUtils.isNotNull(i.getQuantity()) ? i.getQuantity() : 0); |
|
|
|
@ -643,8 +647,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
case 1: //随机
|
|
|
|
|
break; |
|
|
|
|
case 2: //库位
|
|
|
|
|
if(ObjectUtils.isNull(taskSearchDTO.getInfoId())){ |
|
|
|
|
return R.fail("参数数据不完整!!InfoId"); |
|
|
|
|
if(ObjectUtils.isNull(taskSearchDTO.getCode())){ |
|
|
|
|
return R.fail("参数数据不完整!!Code"); |
|
|
|
|
} |
|
|
|
|
return getAllocationInfo(taskSearchDTO); |
|
|
|
|
|
|
|
|
@ -679,11 +683,14 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
/*if(ObjectUtils.isNull(taskSearchDTO.getQuestDetailIds())){ |
|
|
|
|
return R.fail("待处理的包件为空!QuestNum"); |
|
|
|
|
}*/ |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
// 在库包件状态修改
|
|
|
|
|
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds())){ |
|
|
|
|
List<QuestDetailEntity> list = new ArrayList<>(); |
|
|
|
|
taskSearchDTO.getQuestDetailIds().forEach( i ->{ |
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
questDetail.setUpdateUser(user.getUserId()); |
|
|
|
|
questDetail.setUpdateTime(new Date()); |
|
|
|
|
questDetail.setId(Long.valueOf(i)); |
|
|
|
|
questDetail.setQuestStatus(1); |
|
|
|
|
list.add(questDetail); |
|
|
|
@ -703,9 +710,21 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
} |
|
|
|
|
if(i.getIsNew().equals(1)){ |
|
|
|
|
//新增数据
|
|
|
|
|
|
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
BeanUtil.copyProperties(i,questDetail); |
|
|
|
|
questDetail.setTenantId(user.getTenantId()); |
|
|
|
|
questDetail.setCreateDept(Long.valueOf(user.getDeptId())); |
|
|
|
|
questDetail.setCreateTime(new Date()); |
|
|
|
|
questDetail.setIsDeleted(0); |
|
|
|
|
questDetail.setStatus(1); |
|
|
|
|
questDetail.setCreateUser(user.getUserId()); |
|
|
|
|
questDetail.setUpdateUser(user.getUserId()); |
|
|
|
|
questDetail.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
|
|
questDetail.setId(taskID); |
|
|
|
|
questDetail.setWarehouseId(warehouseId); |
|
|
|
|
questDetail.setQuestStatus(1); |
|
|
|
|
List<QuestDetailEntity> entityList = new ArrayList<>(); |
|
|
|
|
entityList.add(questDetail); |
|
|
|
|
baseMapper.insertQuestDetail( questNum,entityList); |
|
|
|
@ -730,6 +749,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
if(b){ |
|
|
|
|
//添加
|
|
|
|
|
baseMapper.insertQuestDetailChildList(taskSearchDTO.getQuestNum()+"_child",childList); |
|
|
|
|
//修改盘点数据
|
|
|
|
|
List<QuestDetailEntity> list = new ArrayList<>(); |
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
questDetail.setId(i.getId()); |
|
|
|
|
questDetail.setQuestStatus(1); //已盘
|
|
|
|
|
questDetail.setUpdateUser(user.getUserId()); |
|
|
|
|
questDetail.setUpdateTime(new Date()); |
|
|
|
|
list.add(questDetail); |
|
|
|
|
baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(),list); |
|
|
|
|
}else{ |
|
|
|
|
//修改
|
|
|
|
|
List<QuestDetailChildEntity> collect = childList.stream().filter( ii -> ObjectUtils.isNotNull(ii.getQuestNum()) && ii.getQuestNum() > 0).collect(Collectors.toList()); |
|
|
|
@ -754,12 +782,119 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
return R.success("成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* PC查询盘点数据 |
|
|
|
|
* @param questDetailDTO |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public IPage<QuestDetailVO> selectTaskDataInfo(QuestDetailDTO questDetailDTO,IPage<Object> page) { |
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
BeanUtil.copyProperties(questDetailDTO,questDetail); |
|
|
|
|
// List<QuestDetailEntity> questDetailEntities = baseMapper.selectTaskInfo(questDetailDTO.getQuestNum(), questDetail);
|
|
|
|
|
IPage<QuestDetailEntity> questDetailEntityIPage = baseMapper.selectTaskInfoIPage(page, questDetailDTO.getQuestNum(), questDetail); |
|
|
|
|
IPage<QuestDetailVO> page1 = new Page<>(); |
|
|
|
|
List<QuestDetailVO> questDetailVOS = new ArrayList<>(); |
|
|
|
|
questDetailEntityIPage.getRecords().stream().forEach( i ->{ |
|
|
|
|
QuestDetailVO questDetailVO = new QuestDetailVO(); |
|
|
|
|
BeanUtil.copyProperties(i,questDetailVO); |
|
|
|
|
questDetailVOS.add(questDetailVO); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
page1.setRecords(questDetailVOS); |
|
|
|
|
page1.setTotal(questDetailEntityIPage.getTotal()); |
|
|
|
|
page1.setCurrent(questDetailEntityIPage.getCurrent()); |
|
|
|
|
page1.setPages(questDetailEntityIPage.getPages()); |
|
|
|
|
page1.setSize(questDetailEntityIPage.getSize()); |
|
|
|
|
return page1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量修改盘点数据 |
|
|
|
|
* @param questDetailDTO |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public Boolean updateDataInfo(List<QuestDetailDTO> questDetailDTO) { |
|
|
|
|
if(ObjectUtils.isNotNull(questDetailDTO)){ |
|
|
|
|
|
|
|
|
|
questDetailDTO.stream().collect(Collectors.groupingBy(QuestDetailDTO::getQuestNum)).forEach((k,v) ->{ |
|
|
|
|
|
|
|
|
|
List<QuestDetailEntity> list = new ArrayList<>(); |
|
|
|
|
v.stream().forEach( i ->{ |
|
|
|
|
if(ObjectUtils.isNotNull(i.getQuestId())){ |
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
BeanUtil.copyProperties(i,questDetail); |
|
|
|
|
if(ObjectUtils.isNotNull(i.getPositionCode())){ |
|
|
|
|
i.setGroundingPositionCode(i.getPositionCode()); |
|
|
|
|
i.setPositionCode(null); |
|
|
|
|
} |
|
|
|
|
list.add(questDetail); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if(!list.isEmpty()){ |
|
|
|
|
baseMapper.updatePositionCodeList(k,list); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return true; |
|
|
|
|
}else{ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 修改延期时间 |
|
|
|
|
* @param taskQuest |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public boolean updateDate(TaskQuestDTO taskQuest) { |
|
|
|
|
TaskQuestEntity questDetail = new TaskQuestEntity(); |
|
|
|
|
BeanUtil.copyProperties(taskQuest,questDetail); |
|
|
|
|
return baseMapper.updateById(questDetail) > 0 ? true : false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询盘点对比数据 |
|
|
|
|
* @param questDetailDTO |
|
|
|
|
* @param page |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public List<QuestContrastVO> getContrastInfo(QuestDetailDTO questDetailDTO, IPage<Object> page) { |
|
|
|
|
|
|
|
|
|
List<QuestContrastVO> list = baseMapper.selectContrastDataInfo(questDetailDTO.getQuestNum(),questDetailDTO); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询商场数据 |
|
|
|
|
* @param taskSearchDTO |
|
|
|
|
* @param page |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public R getMaterialName(TaskSearchDTO taskSearchDTO, IPage<Object> page) { |
|
|
|
|
BladePage<BasicdataClientEntity> top = basicdataClientClient.top((int) page.getCurrent(), (int) page.getSize(), taskSearchDTO.getCode()); |
|
|
|
|
return R.data(top); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询货位上的数据 |
|
|
|
|
* @param taskSearchDTO |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public R getAllocationInfo(TaskSearchDTO taskSearchDTO){ |
|
|
|
|
// List<TaskDataVO> lists = new ArrayList<>();
|
|
|
|
|
TaskDataVO taskDataVO = new TaskDataVO(); |
|
|
|
|
String questNum = taskSearchDTO.getQuestNum(); |
|
|
|
|
Long questId = taskSearchDTO.getQuestId(); |
|
|
|
@ -768,7 +903,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
questDetail.setQuestId(questId); |
|
|
|
|
questDetail.setWarehouseId(warehouseId); |
|
|
|
|
questDetail.setAllocationId(String.valueOf(taskSearchDTO.getInfoId())); |
|
|
|
|
questDetail.setAllocationId(code); |
|
|
|
|
List<QuestDetailEntity> questDetailEntities = baseMapper.selectTaskInfo(questNum,questDetail); |
|
|
|
|
if(ObjectUtils.isNull(questDetailEntities)){ |
|
|
|
|
return R.success("没有数据!!"); |
|
|
|
@ -777,18 +912,19 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
for (QuestDetailEntity questDetailEntity : questDetailEntities) { |
|
|
|
|
TaskPackagelistVO packagelistVO = new TaskPackagelistVO(); |
|
|
|
|
BeanUtil.copyProperties(questDetailEntity, packagelistVO); |
|
|
|
|
packagelistVO.setAllocation(questDetailEntity.getPositionCode()); |
|
|
|
|
if(taskSearchDTO.getTypeState().equals(1)){ |
|
|
|
|
//有
|
|
|
|
|
if(questDetailEntity.getQuestTarget().equals(2) || ObjectUtils.isNull( questDetailEntity.getOrderPackageId())){ |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//查询包件信息
|
|
|
|
|
DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity(); |
|
|
|
|
distributionParcelList.setId(questDetailEntity.getOrderPackageId()); |
|
|
|
|
List<DistributionParcelListEntity> parcelList = distributionParcelListClient.getParcelList(distributionParcelList); |
|
|
|
|
if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
// DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity();
|
|
|
|
|
// distributionParcelList.setId(questDetailEntity.getOrderPackageId());
|
|
|
|
|
// List<DistributionParcelListEntity> parcelList = distributionParcelListClient.getParcelList(distributionParcelList);
|
|
|
|
|
// if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
//没有
|
|
|
|
@ -797,20 +933,38 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity(); |
|
|
|
|
questDetailChildEntity.setQuestDetailId(questDetailEntity.getId()); |
|
|
|
|
questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId()); |
|
|
|
|
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum+"_child", questDetailChildEntity); |
|
|
|
|
if(ObjectUtils.isNotNull(questDetailChildEntities)){ |
|
|
|
|
//有处理的数
|
|
|
|
|
packagelistVO.setQuestChildVOList(questDetailChildEntities); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
list.add(packagelistVO); |
|
|
|
|
} |
|
|
|
|
taskDataVO.setList(list); |
|
|
|
|
return R.data(list); |
|
|
|
|
// lists.add(taskDataVO);
|
|
|
|
|
return R.data(taskDataVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<TaskallocationVO> selectallocationList(TaskSearchDTO taskSearchDTO) { |
|
|
|
|
try { |
|
|
|
|
TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId()); |
|
|
|
|
List<TaskallocationVO> list = baseMapper.selectallocationList(taskQuestEntity.getQuestNum(),taskSearchDTO); |
|
|
|
|
|
|
|
|
|
List<TaskallocationVO> list = baseMapper.selectallocationList(taskSearchDTO.getQuestNum(),taskSearchDTO); |
|
|
|
|
if(list.isEmpty()){ |
|
|
|
|
//查询货物信息
|
|
|
|
|
WarehouseGoodsAllocationEntity byId = warehouseGoodsAllocationService.getById(taskSearchDTO.getAllocationId()); |
|
|
|
|
if(ObjectUtils.isNotNull(byId)){ |
|
|
|
|
TaskallocationVO taskallocationVO = new TaskallocationVO(); |
|
|
|
|
taskallocationVO.setAllocationId(taskSearchDTO.getAllocationId()); |
|
|
|
|
taskallocationVO.setPositionCode(byId.getGoodsAllocationName()); |
|
|
|
|
list.add(taskallocationVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return list; |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.debug(e.getMessage()); |
|
|
|
@ -835,16 +989,20 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
// .eq(QuestDetailEntity::getQuestType, 3)
|
|
|
|
|
// .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId());
|
|
|
|
|
List<TaskContractVO> list = new ArrayList<>(); |
|
|
|
|
TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId()); |
|
|
|
|
QuestDetailEntity questDetail = new QuestDetailEntity(); |
|
|
|
|
questDetail.setQuestId( taskSearchDTO.getQuestId()); |
|
|
|
|
questDetail.setQuestType(3); |
|
|
|
|
if(ObjectUtils.isNotNull(taskSearchDTO.getCode())){ |
|
|
|
|
questDetail.setCode(taskSearchDTO.getCode()); |
|
|
|
|
}else{ |
|
|
|
|
questDetail.setQuestType(3); |
|
|
|
|
} |
|
|
|
|
questDetail.setWarehouseId(taskSearchDTO.getWarehouseId()); |
|
|
|
|
IPage<TaskContractVO> taskPageList = new Page<>(); |
|
|
|
|
List<QuestDetailEntity> questDetailEntityList = baseMapper.selectTaskInfo( taskQuestEntity.getQuestNum(),questDetail); |
|
|
|
|
List<QuestDetailEntity> questDetailEntityList = baseMapper.selectTaskInfo( taskSearchDTO.getQuestNum(),questDetail); |
|
|
|
|
if (Func.isEmpty(questDetailEntityList)){ |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
Map<Integer, List<QuestDetailEntity>> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget)); |
|
|
|
|
/*Map<Integer, List<QuestDetailEntity>> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget)); |
|
|
|
|
//订制品
|
|
|
|
|
List<QuestDetailEntity> questDetailEntities = questDetailMap.get(1); |
|
|
|
|
List<QuestDetailEntity> zeroQuestDetailEntities = questDetailMap.get(2); |
|
|
|
@ -902,7 +1060,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
} |
|
|
|
|
list.add(taskContractVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
return taskPageList.setRecords(list); |
|
|
|
|
} |
|
|
|
@ -1061,7 +1219,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
* 托盘ID信息货物处理 |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private TaskDataVO getTaskTrayInfoOwn(List<QuestDetailEntity> list1,String type,Long warehouseId){ |
|
|
|
|
private TaskDataVO getTaskTrayInfoOwn(TaskSearchDTO taskSearchDTO,List<QuestDetailEntity> list1,String type,Long warehouseId){ |
|
|
|
|
TaskDataVO taskDataVO = new TaskDataVO(); |
|
|
|
|
List<TaskPackagelistVO> taskPackagelistVOS = new ArrayList<>(); |
|
|
|
|
list1.stream().collect(Collectors.groupingBy(QuestDetailEntity::getTrayId)) |
|
|
|
@ -1081,10 +1239,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//查询包件信息
|
|
|
|
|
DistributionParcelListEntity byPacketBarCode = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(p.getOrderPackageCode(),warehouseId); |
|
|
|
|
if(ObjectUtils.isNull(byPacketBarCode)){ //去除没有用包件的数据
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
// DistributionParcelListEntity byPacketBarCode = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(p.getOrderPackageCode(),warehouseId);
|
|
|
|
|
// if(ObjectUtils.isNull(byPacketBarCode)){ //去除没有用包件的数据
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
packagelistVO.setQuestDetailId(p.getId()); |
|
|
|
|
packagelistVO.setQuantity(p.getStockNum()); |
|
|
|
|
packagelistVO.setState(String.valueOf(p.getQuestTarget())); |
|
|
|
@ -1098,6 +1256,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
packagelistVO.setQuantity(p.getStockNum()); |
|
|
|
|
packagelistVO.setState(String.valueOf(p.getQuestTarget())); |
|
|
|
|
} |
|
|
|
|
//查询盘点过后的数据
|
|
|
|
|
QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity(); |
|
|
|
|
questDetailChildEntity.setQuestDetailId(p.getId()); |
|
|
|
|
questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId()); |
|
|
|
|
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(taskSearchDTO.getQuestNum()+"_child", questDetailChildEntity); |
|
|
|
|
if(ObjectUtils.isNotNull(questDetailChildEntities)){ |
|
|
|
|
//有处理的数
|
|
|
|
|
packagelistVO.setQuestChildVOList(questDetailChildEntities); |
|
|
|
|
} |
|
|
|
|
taskPackagelistVOS.add(packagelistVO); |
|
|
|
|
// TaskQuestEntity taskQuestEntity = baseMapper.selectById(p.getQuestId());
|
|
|
|
|
// num.set(num.get() + p.getStockNum());
|
|
|
|
@ -1165,7 +1332,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
|
|
|
|
|
List<QuestDetailEntity> questDetailList = getQuestDetailList( taskSearchDTO, myCurrentWarehouse.getId(), trayByTrayCode.getId()); |
|
|
|
|
|
|
|
|
|
return R.data(getTaskTrayInfoOwn(questDetailList, String.valueOf(taskSearchDTO.getTypeState()), myCurrentWarehouse.getId())); |
|
|
|
|
return R.data(getTaskTrayInfoOwn(taskSearchDTO,questDetailList, String.valueOf(taskSearchDTO.getTypeState()), myCurrentWarehouse.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1869,6 +2036,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
QuestDetailEntity detailEntity = new QuestDetailEntity(); |
|
|
|
|
detailEntity.setQuestId(taskSearchDTO.getQuestId()); |
|
|
|
|
detailEntity.setWarehouseId(taskSearchDTO.getWarehouseId()); |
|
|
|
|
detailEntity.setCode(taskSearchDTO.getCode()); |
|
|
|
|
|
|
|
|
|
//查询订单数据
|
|
|
|
|
List<QuestDetailEntity> questDetailEntities = baseMapper.selectTaskInfo(questNum,detailEntity); |
|
|
|
@ -1886,12 +2054,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//查询包件信息
|
|
|
|
|
DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity(); |
|
|
|
|
distributionParcelList.setId(questDetailEntity.getOrderPackageId()); |
|
|
|
|
DistributionParcelListEntity parcelList = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetailEntity.getOrderPackageCode(),taskSearchDTO.getWarehouseId()); |
|
|
|
|
if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
// DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity();
|
|
|
|
|
// distributionParcelList.setId(questDetailEntity.getOrderPackageId());
|
|
|
|
|
// DistributionParcelListEntity parcelList = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetailEntity.getOrderPackageCode(),taskSearchDTO.getWarehouseId());
|
|
|
|
|
// if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
//没有
|
|
|
|
@ -1901,7 +2069,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
} |
|
|
|
|
QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity(); |
|
|
|
|
questDetailChildEntity.setQuestDetailId(questDetailEntity.getId()); |
|
|
|
|
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum, questDetailChildEntity); |
|
|
|
|
questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId()); |
|
|
|
|
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum+"_child", questDetailChildEntity); |
|
|
|
|
if(ObjectUtils.isNotNull(questDetailChildEntities)){ |
|
|
|
|
//有处理的数
|
|
|
|
|
packagelistVO.setQuestChildVOList(questDetailChildEntities); |
|
|
|
|