|
@@ -12,12 +12,14 @@ import com.sd.business.entity.in.dto.InOutStorageBomDto;
|
|
|
import com.sd.business.entity.in.dto.InOutStorageBomSelectDto;
|
|
|
import com.sd.business.entity.in.emums.InDetailTypeEnum;
|
|
|
import com.sd.business.entity.in.emums.InOutTypeEnum;
|
|
|
+import com.sd.business.entity.in.emums.OutDetailTypeEnum;
|
|
|
import com.sd.business.entity.in.po.InOutStorage;
|
|
|
import com.sd.business.entity.in.po.InOutStorageBom;
|
|
|
import com.sd.business.entity.in.vo.InOutStorageBomErpExportVo;
|
|
|
import com.sd.business.entity.in.vo.InOutStorageBomVo;
|
|
|
import com.sd.business.entity.in.vo.InOutStorageErpExportVo;
|
|
|
import com.sd.business.entity.purchase.po.Purchase;
|
|
|
+import com.sd.business.entity.warehouse.constant.WarehouseConstant;
|
|
|
import com.sd.business.entity.warehouse.po.Warehouse;
|
|
|
import com.sd.business.mapper.in.InOutStorageBomMapper;
|
|
|
import com.sd.business.service.in.InOutStorageBomService;
|
|
@@ -101,13 +103,23 @@ public class InOutStorageBomServiceImpl extends ServiceImpl<InOutStorageBomMappe
|
|
|
List<InOutStorageBomVo> list = page.getRecords();
|
|
|
List<InOutStorageBomVo> inOutStorageBomList = list.stream()
|
|
|
.filter(item -> {
|
|
|
- // 导出入库明细,入库类型不为采购入库时。筛选掉采购入库记录
|
|
|
- if (ObjectUtil.equals(dto.getType(), InOutTypeEnum.IN.getKey())
|
|
|
- && ObjectUtil.notEqual(dto.getDetailType(), InDetailTypeEnum.PURCHASE.getKey())
|
|
|
- && ObjectUtil.equals(item.getDetailType(), InDetailTypeEnum.PURCHASE.getKey())) {
|
|
|
+ if (!(ObjectUtil.equals(item.getWarehouseCode(), "509")
|
|
|
+ || ObjectUtil.equals(item.getWarehouseCode(),"503"))) {
|
|
|
return false;
|
|
|
}
|
|
|
- return true;
|
|
|
+ if (dto.getDetailType() != null) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ // 数据筛选,出库导出生产出库,入库导出退货和归还
|
|
|
+ if (ObjectUtil.equals(dto.getType(), InOutTypeEnum.IN.getKey())
|
|
|
+ && (ObjectUtil.equals(item.getDetailType(), InDetailTypeEnum.RETURN_GOODS.getKey())
|
|
|
+ || ObjectUtil.equals(item.getDetailType(), InDetailTypeEnum.GIVE_BACK.getKey()))) {
|
|
|
+ return true;
|
|
|
+ } else if (ObjectUtil.equals(dto.getType(), InOutTypeEnum.OUT.getKey())
|
|
|
+ && ObjectUtil.equals(item.getDetailType(), OutDetailTypeEnum.PRODUCTION.getKey())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
})
|
|
|
.collect(Collectors.toList());
|
|
|
// 查询详情信息
|