feat: 新增仓库库存汇总报表
This commit is contained in:
parent
49c93efdd2
commit
a373ff3533
@ -0,0 +1,59 @@
|
||||
package com.foreverwin.mom.wms.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 库存(物料批次)
|
||||
*
|
||||
* @author philip
|
||||
* @date 2022-10-29 09:03:07
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class InventorySummaryReportDTO {
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
@ExcelProperty("仓库")
|
||||
private String erpStorageLocation;
|
||||
/**
|
||||
* 物料
|
||||
*/
|
||||
@ExcelProperty("物料")
|
||||
private String item;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
@ExcelProperty("批次")
|
||||
private String batchNo;
|
||||
/**
|
||||
* 销售订单
|
||||
*/
|
||||
@ExcelProperty("销售订单")
|
||||
private String dnOrder;
|
||||
/**
|
||||
* 销售订单行号
|
||||
*/
|
||||
@ExcelProperty("销售订单行号")
|
||||
private String dnOrderSeq;
|
||||
/**
|
||||
* 质检等级
|
||||
*/
|
||||
@ExcelProperty("质检等级")
|
||||
private String qualityInspectionStatus;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal qtyOnHand;
|
||||
|
||||
}
|
||||
@ -2,10 +2,13 @@ package com.foreverwin.mom.wms.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.foreverwin.iep.common.base.FrontPage;
|
||||
import com.foreverwin.mom.common.core.util.R;
|
||||
import com.foreverwin.mom.wms.util.ExcelCellWidthStyleStrategy;
|
||||
import com.foreverwin.mom.common.data.tenant.TenantContextHolder;
|
||||
import com.foreverwin.mom.wms.dto.InventoryQueryReportDto;
|
||||
import com.foreverwin.mom.wms.dto.InventorySummaryReportDTO;
|
||||
import com.foreverwin.mom.wms.service.InventoryQueryReportService;
|
||||
import com.foreverwin.mom.wms.util.ExcelCellWidthStyleStrategy;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -28,45 +31,45 @@ import java.util.List;
|
||||
@Api(value = "InventoryQueryReport", tags = "库存查询报表")
|
||||
public class InventoryQueryReportController {
|
||||
|
||||
private final InventoryQueryReportService inventoryQueryReportService;
|
||||
private final InventoryQueryReportService inventoryQueryReportService;
|
||||
|
||||
/**
|
||||
* 库存查询报表 - 分页查询
|
||||
*
|
||||
* @return R
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/selectPage")
|
||||
public R retrieve(Page<InventoryQueryReportDto> page, @RequestBody InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
return R.ok(inventoryQueryReportService.doRetrieve(page,inventoryQueryReportDto));
|
||||
}
|
||||
/**
|
||||
* 库存查询报表 - 分页查询
|
||||
*
|
||||
* @return R
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/selectPage")
|
||||
public R retrieve(Page<InventoryQueryReportDto> page, @RequestBody InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
return R.ok(inventoryQueryReportService.doRetrieve(page, inventoryQueryReportDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 库存查询报表 - 导出
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/tablePageExport")
|
||||
public void tablePageExport( InventoryQueryReportDto inventoryQueryReportDto) throws Exception{
|
||||
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportService.doSelect(inventoryQueryReportDto);
|
||||
String fileName = "库存查询报表";
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletResponse response = attributes.getResponse();
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
// 这里需要设置不关闭流
|
||||
ExcelCellWidthStyleStrategy widthStyleStrategy = new ExcelCellWidthStyleStrategy();
|
||||
EasyExcel.write(response.getOutputStream(), InventoryQueryReportDto.class).registerWriteHandler(widthStyleStrategy).autoCloseStream(Boolean.FALSE).sheet(fileName)
|
||||
.doWrite(inventoryQueryReportList);
|
||||
}
|
||||
/**
|
||||
* 库存查询报表 - 导出
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/tablePageExport")
|
||||
public void tablePageExport(InventoryQueryReportDto inventoryQueryReportDto) throws Exception {
|
||||
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportService.doSelect(inventoryQueryReportDto);
|
||||
String fileName = "库存查询报表";
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletResponse response = attributes.getResponse();
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
// 这里需要设置不关闭流
|
||||
ExcelCellWidthStyleStrategy widthStyleStrategy = new ExcelCellWidthStyleStrategy();
|
||||
EasyExcel.write(response.getOutputStream(), InventoryQueryReportDto.class).registerWriteHandler(widthStyleStrategy).autoCloseStream(Boolean.FALSE).sheet(fileName)
|
||||
.doWrite(inventoryQueryReportList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*
|
||||
* @return R
|
||||
*//*
|
||||
/**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*
|
||||
* @return R
|
||||
*//*
|
||||
@ResponseBody
|
||||
@PostMapping("/selectInventoryDetailedPage")
|
||||
public R retrieveInventoryDetailed(Page<InventoryQueryReportDto> page, @RequestBody InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
@ -74,10 +77,10 @@ public class InventoryQueryReportController {
|
||||
}
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(详细)- 导出
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
* 9001库存查询报表(详细)- 导出
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
@ResponseBody
|
||||
@PostMapping("/tableInventoryDetailedPageExport")
|
||||
public void tableInventoryDetailedPageExport(@RequestBody InventoryQueryReportDto inventoryQueryReportDto) throws Exception{
|
||||
@ -95,10 +98,10 @@ public class InventoryQueryReportController {
|
||||
}
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(托汇总) - 分页查询
|
||||
*
|
||||
* @return R
|
||||
*//*
|
||||
* 9001库存查询报表(托汇总) - 分页查询
|
||||
*
|
||||
* @return R
|
||||
*//*
|
||||
@ResponseBody
|
||||
@PostMapping("/selectInventoryByPalletPage")
|
||||
public R retrieveInventoryByPallet(Page<InventoryQueryReportDto> page, @RequestBody InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
@ -106,10 +109,10 @@ public class InventoryQueryReportController {
|
||||
}
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(托汇总) - 导出
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
* 9001库存查询报表(托汇总) - 导出
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
@ResponseBody
|
||||
@GetMapping("/tableInventoryByPalletPageExport")
|
||||
public void tableInventoryByPalletPageExport( InventoryQueryReportDto inventoryQueryReportDto) throws Exception{
|
||||
@ -139,10 +142,10 @@ public class InventoryQueryReportController {
|
||||
}
|
||||
|
||||
*//**
|
||||
* 全库存查询报表(合并)- 分页查询
|
||||
*
|
||||
* @return R
|
||||
*//*
|
||||
* 全库存查询报表(合并)- 分页查询
|
||||
*
|
||||
* @return R
|
||||
*//*
|
||||
@ResponseBody
|
||||
@PostMapping("/selectInventoryFullReport/page")
|
||||
public R selectInventoryFullReportPage(Page<InventoryQueryReportDto> page, @RequestBody InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
@ -150,10 +153,10 @@ public class InventoryQueryReportController {
|
||||
}
|
||||
|
||||
*//**
|
||||
* 全库存查询报表(合并)- 导出
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
* 全库存查询报表(合并)- 导出
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
@ResponseBody
|
||||
@PostMapping("/selectInventoryFullReport/export")
|
||||
public void exportInventoryFullReportPage(@RequestBody InventoryQueryReportDto inventoryQueryReportDto) throws Exception{
|
||||
@ -169,4 +172,38 @@ public class InventoryQueryReportController {
|
||||
EasyExcel.write(response.getOutputStream(), InvenotryFullReportDTO.class).registerWriteHandler(widthStyleStrategy).autoCloseStream(Boolean.FALSE).sheet(fileName)
|
||||
.doWrite(inventoryQueryReportList);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 库存汇总表
|
||||
*
|
||||
* @return R
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/pageInventorySummaryReport")
|
||||
public R selectInventorySummaryReport(FrontPage page, @RequestBody InventorySummaryReportDTO dto) {
|
||||
return R.ok(inventoryQueryReportService.pageInventorySummaryReport(page, TenantContextHolder.getTenantId(), dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 库存汇总表-导出
|
||||
*
|
||||
* @param dto
|
||||
* @throws Exception
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/exportInventorySummaryReport")
|
||||
public void exportInventorySummaryReport(InventorySummaryReportDTO dto) throws Exception {
|
||||
List<InventorySummaryReportDTO> data = inventoryQueryReportService.selectInventorySummaryReport(TenantContextHolder.getTenantId(), dto);
|
||||
String fileName = "库存汇总表";
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletResponse response = attributes.getResponse();
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
// 这里需要设置不关闭流
|
||||
ExcelCellWidthStyleStrategy widthStyleStrategy = new ExcelCellWidthStyleStrategy();
|
||||
EasyExcel.write(response.getOutputStream(), InventorySummaryReportDTO.class).registerWriteHandler(widthStyleStrategy).autoCloseStream(Boolean.FALSE).sheet(fileName)
|
||||
.doWrite(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.foreverwin.mom.wms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.foreverwin.mom.wms.dto.InvenotryFullReportDTO;
|
||||
import com.foreverwin.mom.wms.dto.InventoryQueryReportDto;
|
||||
import com.foreverwin.mom.wms.dto.InventoryStatisticsReportDTO;
|
||||
import com.foreverwin.mom.wms.dto.InventorySummaryReportDTO;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -15,36 +12,36 @@ import java.util.List;
|
||||
* @author cici
|
||||
* @since 2024-03-29
|
||||
*/
|
||||
public interface InventoryQueryReportService{
|
||||
/**
|
||||
* 库存查询报表(非9001)- 分页查询
|
||||
*/
|
||||
IPage<InventoryQueryReportDto> doRetrieve(IPage<InventoryQueryReportDto> iPage, InventoryQueryReportDto inventoryQueryReportDto);
|
||||
public interface InventoryQueryReportService {
|
||||
/**
|
||||
* 库存查询报表(非9001)- 分页查询
|
||||
*/
|
||||
IPage<InventoryQueryReportDto> doRetrieve(IPage<InventoryQueryReportDto> iPage, InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
/**
|
||||
* 库存查询报表(非9001)- 导出查询
|
||||
*/
|
||||
List<InventoryQueryReportDto> doSelect(InventoryQueryReportDto inventoryQueryReportDto);
|
||||
/**
|
||||
* 库存查询报表(非9001)- 导出查询
|
||||
*/
|
||||
List<InventoryQueryReportDto> doSelect(InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
/*
|
||||
*//**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*//*
|
||||
/*
|
||||
*//**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*//*
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryDetailed(Page<InventoryQueryReportDto> page, InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(详细)- 导出查询
|
||||
*//*
|
||||
* 9001库存查询报表(详细)- 导出查询
|
||||
*//*
|
||||
List<InventoryQueryReportDto> doSelectInventoryDetailed(InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(托汇总) - 分页查询
|
||||
*//*
|
||||
* 9001库存查询报表(托汇总) - 分页查询
|
||||
*//*
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryByPallet(Page<InventoryQueryReportDto> page, InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(托汇总) - 导出查询
|
||||
*//*
|
||||
* 9001库存查询报表(托汇总) - 导出查询
|
||||
*//*
|
||||
List<InventoryQueryReportDto> doSelectInventoryByPallet(InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
List<InventoryStatisticsReportDTO> selectInventoryStatisticsReport(String status, String opType);
|
||||
@ -52,13 +49,20 @@ public interface InventoryQueryReportService{
|
||||
void exportInventoryStatisticsReport(String opType) throws IOException;
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*//*
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*//*
|
||||
IPage<InvenotryFullReportDTO> selectInventoryFullReportPage(Page<InventoryQueryReportDto> page, InventoryQueryReportDto inventoryQueryReportDto);
|
||||
|
||||
*//**
|
||||
* 9001库存查询报表(详细)- 导出查询
|
||||
*//*
|
||||
*/
|
||||
|
||||
/**
|
||||
* 9001库存查询报表(详细)- 导出查询
|
||||
*//*
|
||||
List<InvenotryFullReportDTO> exportInventoryFullReportPage(InventoryQueryReportDto inventoryQueryReportDto);
|
||||
*/
|
||||
|
||||
IPage<InventorySummaryReportDTO> pageInventorySummaryReport(IPage page, String site, InventorySummaryReportDTO dto);
|
||||
|
||||
List<InventorySummaryReportDTO> selectInventorySummaryReport(String site, InventorySummaryReportDTO dto);
|
||||
|
||||
}
|
||||
|
||||
@ -5,13 +5,13 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mom.common.data.tenant.TenantContextHolder;
|
||||
import com.foreverwin.mom.wms.dto.InventoryQueryReportDto;
|
||||
import com.foreverwin.mom.wms.dto.InventorySummaryReportDTO;
|
||||
import com.foreverwin.mom.wms.mapper.InventoryQueryReportMapper;
|
||||
import com.foreverwin.mom.wms.service.InventoryQueryReportService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -25,114 +25,116 @@ import java.util.List;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class InventoryQueryReportServiceImpl implements InventoryQueryReportService {
|
||||
private final InventoryQueryReportMapper inventoryQueryReportMapper;
|
||||
private final InventoryQueryReportMapper inventoryQueryReportMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InventoryQueryReportDto> doRetrieve(IPage<InventoryQueryReportDto> iPage, InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
@Override
|
||||
public IPage<InventoryQueryReportDto> doRetrieve(IPage<InventoryQueryReportDto> iPage, InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
|
||||
List<String> erpStorageLocationList = splitSearchField(inventoryQueryReportDto.getErpStorageLocation());
|
||||
List<String> inventoryIdList = splitSearchField(inventoryQueryReportDto.getInventoryId());
|
||||
List<String> carrierList = splitSearchField(inventoryQueryReportDto.getCarrier());
|
||||
List<String> statusList = splitSearchField(inventoryQueryReportDto.getStatus());
|
||||
List<String> itemList = splitSearchField(inventoryQueryReportDto.getItem());
|
||||
List<String> batchNoList = splitSearchField(inventoryQueryReportDto.getBatchNo());
|
||||
List<String> vendorBatchNoList = splitSearchField(inventoryQueryReportDto.getVendorBatchNo());
|
||||
List<String> qualityInspectionStatusList = splitSearchField(inventoryQueryReportDto.getQualityInspectionStatus());
|
||||
String inventorySpecialMarking = inventoryQueryReportDto.getInventorySpecialMarking();
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
String typeNo = inventoryQueryReportDto.getTypeNo();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
boolean allowZero = inventoryQueryReportDto.isAllowZero();
|
||||
IPage<InventoryQueryReportDto> inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero,typeNo);
|
||||
List<String> erpStorageLocationList = splitSearchField(inventoryQueryReportDto.getErpStorageLocation());
|
||||
List<String> inventoryIdList = splitSearchField(inventoryQueryReportDto.getInventoryId());
|
||||
List<String> carrierList = splitSearchField(inventoryQueryReportDto.getCarrier());
|
||||
List<String> statusList = splitSearchField(inventoryQueryReportDto.getStatus());
|
||||
List<String> itemList = splitSearchField(inventoryQueryReportDto.getItem());
|
||||
List<String> batchNoList = splitSearchField(inventoryQueryReportDto.getBatchNo());
|
||||
List<String> vendorBatchNoList = splitSearchField(inventoryQueryReportDto.getVendorBatchNo());
|
||||
List<String> qualityInspectionStatusList = splitSearchField(inventoryQueryReportDto.getQualityInspectionStatus());
|
||||
String inventorySpecialMarking = inventoryQueryReportDto.getInventorySpecialMarking();
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
String typeNo = inventoryQueryReportDto.getTypeNo();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
boolean allowZero = inventoryQueryReportDto.isAllowZero();
|
||||
IPage<InventoryQueryReportDto> inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(inventoryQueryReportDtoIPage.getRecords())) {
|
||||
BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero);
|
||||
inventoryQueryReportDtoIPage.getRecords().get(0).setTotalQty(totalQty);
|
||||
}
|
||||
return inventoryQueryReportDtoIPage;
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(inventoryQueryReportDtoIPage.getRecords())) {
|
||||
BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero);
|
||||
inventoryQueryReportDtoIPage.getRecords().get(0).setTotalQty(totalQty);
|
||||
}
|
||||
return inventoryQueryReportDtoIPage;
|
||||
}
|
||||
|
||||
private List<String> splitSearchField(String field) {
|
||||
return StrUtil.isNotBlank(field) ? Arrays.asList(field.split(" ")) : null;
|
||||
}
|
||||
private List<String> splitSearchField(String field) {
|
||||
return StrUtil.isNotBlank(field) ? Arrays.asList(field.split(" ")) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InventoryQueryReportDto> doSelect(InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
@Override
|
||||
public List<InventoryQueryReportDto> doSelect(InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
|
||||
List<String> erpStorageLocationList = splitSearchField(inventoryQueryReportDto.getErpStorageLocation());
|
||||
List<String> inventoryIdList = splitSearchField(inventoryQueryReportDto.getInventoryId());
|
||||
List<String> carrierList = splitSearchField(inventoryQueryReportDto.getCarrier());
|
||||
List<String> statusList = splitSearchField(inventoryQueryReportDto.getStatus());
|
||||
List<String> itemList = splitSearchField(inventoryQueryReportDto.getItem());
|
||||
List<String> batchNoList = splitSearchField(inventoryQueryReportDto.getBatchNo());
|
||||
List<String> vendorBatchNoList = splitSearchField(inventoryQueryReportDto.getVendorBatchNo());
|
||||
List<String> qualityInspectionStatusList = splitSearchField(inventoryQueryReportDto.getQualityInspectionStatus());
|
||||
String inventorySpecialMarking = inventoryQueryReportDto.getInventorySpecialMarking();
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
boolean allowZero = inventoryQueryReportDto.isAllowZero();
|
||||
List<String> erpStorageLocationList = splitSearchField(inventoryQueryReportDto.getErpStorageLocation());
|
||||
List<String> inventoryIdList = splitSearchField(inventoryQueryReportDto.getInventoryId());
|
||||
List<String> carrierList = splitSearchField(inventoryQueryReportDto.getCarrier());
|
||||
List<String> statusList = splitSearchField(inventoryQueryReportDto.getStatus());
|
||||
List<String> itemList = splitSearchField(inventoryQueryReportDto.getItem());
|
||||
List<String> batchNoList = splitSearchField(inventoryQueryReportDto.getBatchNo());
|
||||
List<String> vendorBatchNoList = splitSearchField(inventoryQueryReportDto.getVendorBatchNo());
|
||||
List<String> qualityInspectionStatusList = splitSearchField(inventoryQueryReportDto.getQualityInspectionStatus());
|
||||
String inventorySpecialMarking = inventoryQueryReportDto.getInventorySpecialMarking();
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
boolean allowZero = inventoryQueryReportDto.isAllowZero();
|
||||
|
||||
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero);
|
||||
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero);
|
||||
|
||||
for (InventoryQueryReportDto record : inventoryQueryReportList) {
|
||||
String state = record.getStatus();
|
||||
switch (state) {
|
||||
case "1001":
|
||||
state = "可用";
|
||||
break;
|
||||
case "1002":
|
||||
state = "保留";
|
||||
break;
|
||||
case "1003":
|
||||
state = "隔离";
|
||||
break;
|
||||
case "1004":
|
||||
state = "待检";
|
||||
break;
|
||||
case "1005":
|
||||
state = "冻结";
|
||||
break;
|
||||
}
|
||||
record.setStatus(state);
|
||||
String qmsSpecialMarking = record.getQmsSpecialMarking();
|
||||
if (StrUtil.isNotBlank(qmsSpecialMarking)) {
|
||||
switch (qmsSpecialMarking) {
|
||||
case "5":
|
||||
qmsSpecialMarking = "退货";
|
||||
break;
|
||||
case "6":
|
||||
qmsSpecialMarking = "留样";
|
||||
break;
|
||||
}
|
||||
record.setQmsSpecialMarking(qmsSpecialMarking);
|
||||
}
|
||||
String rollType1 = record.getRollType();
|
||||
if (StrUtil.isNotBlank(rollType1)) {
|
||||
switch (rollType1) {
|
||||
case "F":
|
||||
rollType1 = "量产模";
|
||||
break;
|
||||
case "S":
|
||||
rollType1 = "实验膜";
|
||||
break;
|
||||
}
|
||||
record.setRollType(rollType1);
|
||||
}
|
||||
}
|
||||
return inventoryQueryReportList;
|
||||
}
|
||||
for (InventoryQueryReportDto record : inventoryQueryReportList) {
|
||||
String state = record.getStatus();
|
||||
switch (state) {
|
||||
case "1001":
|
||||
state = "可用";
|
||||
break;
|
||||
case "1002":
|
||||
state = "保留";
|
||||
break;
|
||||
case "1003":
|
||||
state = "隔离";
|
||||
break;
|
||||
case "1004":
|
||||
state = "待检";
|
||||
break;
|
||||
case "1005":
|
||||
state = "冻结";
|
||||
break;
|
||||
}
|
||||
record.setStatus(state);
|
||||
String qmsSpecialMarking = record.getQmsSpecialMarking();
|
||||
if (StrUtil.isNotBlank(qmsSpecialMarking)) {
|
||||
switch (qmsSpecialMarking) {
|
||||
case "5":
|
||||
qmsSpecialMarking = "退货";
|
||||
break;
|
||||
case "6":
|
||||
qmsSpecialMarking = "留样";
|
||||
break;
|
||||
}
|
||||
record.setQmsSpecialMarking(qmsSpecialMarking);
|
||||
}
|
||||
String rollType1 = record.getRollType();
|
||||
if (StrUtil.isNotBlank(rollType1)) {
|
||||
switch (rollType1) {
|
||||
case "F":
|
||||
rollType1 = "量产模";
|
||||
break;
|
||||
case "S":
|
||||
rollType1 = "实验膜";
|
||||
break;
|
||||
}
|
||||
record.setRollType(rollType1);
|
||||
}
|
||||
}
|
||||
return inventoryQueryReportList;
|
||||
}
|
||||
|
||||
/* *//**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*//*
|
||||
/* */
|
||||
|
||||
/**
|
||||
* 9001库存查询报表(详细)- 分页查询
|
||||
*//*
|
||||
@Override
|
||||
public IPage<InventoryQueryReportDto> doRetrieveInventoryDetailed(Page<InventoryQueryReportDto> page, InventoryQueryReportDto inventoryQueryReportDto) {
|
||||
|
||||
@ -994,4 +996,17 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
}
|
||||
return inventoryQueryReportList;
|
||||
}*/
|
||||
@Override
|
||||
public IPage<InventorySummaryReportDTO> pageInventorySummaryReport(IPage page, String site, InventorySummaryReportDTO dto) {
|
||||
List<String> erpStorageLocationList = splitSearchField(dto.getErpStorageLocation());
|
||||
List<String> itemList = splitSearchField(dto.getItem());
|
||||
return inventoryQueryReportMapper.selectInventorySummaryReport(page, site, erpStorageLocationList, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InventorySummaryReportDTO> selectInventorySummaryReport(String site, InventorySummaryReportDTO dto) {
|
||||
List<String> erpStorageLocationList = splitSearchField(dto.getErpStorageLocation());
|
||||
List<String> itemList = splitSearchField(dto.getItem());
|
||||
return inventoryQueryReportMapper.selectInventorySummaryReport(site, erpStorageLocationList, itemList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.foreverwin.mom.wms.dto.InvenotryFullReportDTO;
|
||||
import com.foreverwin.mom.wms.dto.InventoryQueryReportDto;
|
||||
import com.foreverwin.mom.wms.dto.InventoryStatisticsReportDTO;
|
||||
import com.foreverwin.mom.wms.dto.InventorySummaryReportDTO;
|
||||
import com.foreverwin.mom.wms.entity.Inventory;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -23,33 +24,39 @@ import java.util.List;
|
||||
*/
|
||||
@Mapper
|
||||
public interface InventoryQueryReportMapper extends BaseMapper<Inventory> {
|
||||
IPage<InventoryQueryReportDto> retrieve(IPage<InventoryQueryReportDto> iPage, @Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero")boolean allowZero, @Param("typeNo") String typeNo);
|
||||
IPage<InventoryQueryReportDto> retrieve(IPage<InventoryQueryReportDto> iPage, @Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo);
|
||||
|
||||
List<InventoryQueryReportDto> retrieve(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero")boolean allowZero);
|
||||
List<InventoryQueryReportDto> retrieve(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero);
|
||||
|
||||
BigDecimal retrieveTotalQty(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero")boolean allowZero);
|
||||
BigDecimal retrieveTotalQty(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero);
|
||||
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryDetailed(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder")String shopOrder, @Param("shopOrderType")String shopOrderType, @Param("zypsqd")String zypsqd);
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryDetailed(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder") String shopOrder, @Param("shopOrderType") String shopOrderType, @Param("zypsqd") String zypsqd);
|
||||
|
||||
List<InventoryQueryReportDto> doRetrieveInventoryDetailed(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder")String shopOrder, @Param("shopOrderType")String shopOrderType, @Param("zypsqd")String zypsqd);
|
||||
List<InventoryQueryReportDto> doRetrieveInventoryDetailed(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder") String shopOrder, @Param("shopOrderType") String shopOrderType, @Param("zypsqd") String zypsqd);
|
||||
|
||||
BigDecimal doRetrieveInventoryDetailedTotalQty(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList);
|
||||
BigDecimal doRetrieveInventoryDetailedTotalQty(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList);
|
||||
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryByPallet(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("palletList") List<String> palletList, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("groesList") List<String> groesList);
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryByPallet(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("palletList") List<String> palletList, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("groesList") List<String> groesList);
|
||||
|
||||
List<InventoryQueryReportDto> doRetrieveInventoryByPallet(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("groesList") List<String> groesList);
|
||||
List<InventoryQueryReportDto> doRetrieveInventoryByPallet(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("groesList") List<String> groesList);
|
||||
|
||||
BigDecimal doRetrieveInventoryByPalletTotalQty(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("groesList") List<String> groesList);
|
||||
BigDecimal doRetrieveInventoryByPalletTotalQty(@Param("site") String site, @Param("palletList") List<String> palletList, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("groesList") List<String> groesList);
|
||||
|
||||
List<InventoryStatisticsReportDTO> selectInventoryStatisticsReport(@Param("status")String status, @Param("itemGroupList") List<String> itemGroupList);
|
||||
List<InventoryStatisticsReportDTO> selectInventoryStatisticsReport(@Param("status") String status, @Param("itemGroupList") List<String> itemGroupList);
|
||||
|
||||
List<InvenotryFullReportDTO> selectInventoryFullReport(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder") String shopOrder, @Param("shopOrderType") String shopOrderType, @Param("zypsqd") String zypsqd
|
||||
, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("carrierList") List<String> carrierList, @Param("startProductionDate") LocalDate startProductionDate, @Param("endStartProductionDate") LocalDate endStartProductionDate);
|
||||
|
||||
IPage<InvenotryFullReportDTO> selectInventoryFullReport(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder") String shopOrder, @Param("shopOrderType") String shopOrderType, @Param("zypsqd") String zypsqd
|
||||
, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("carrierList") List<String> carrierList, @Param("startProductionDate") LocalDate startProductionDate, @Param("endStartProductionDate") LocalDate endStartProductionDate);
|
||||
|
||||
IPage<InventorySummaryReportDTO> selectInventorySummaryReport(IPage page, @Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("itemList") List<String> itemList);
|
||||
|
||||
List<InventorySummaryReportDTO> selectInventorySummaryReport(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("itemList") List<String> itemList);
|
||||
|
||||
List<InvenotryFullReportDTO> selectInventoryFullReport(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder")String shopOrder, @Param("shopOrderType")String shopOrderType, @Param("zypsqd")String zypsqd
|
||||
, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("carrierList") List<String> carrierList, @Param("startProductionDate") LocalDate startProductionDate, @Param("endStartProductionDate") LocalDate endStartProductionDate);
|
||||
IPage<InvenotryFullReportDTO> selectInventoryFullReport(Page<InventoryQueryReportDto> page,@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder")String shopOrder, @Param("shopOrderType")String shopOrderType, @Param("zypsqd")String zypsqd
|
||||
, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("carrierList") List<String> carrierList, @Param("startProductionDate") LocalDate startProductionDate, @Param("endStartProductionDate") LocalDate endStartProductionDate);
|
||||
}
|
||||
|
||||
@ -243,6 +243,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="doRetrieveInventoryDetailed" resultMap="BaseResultMap">
|
||||
WITH A AS (
|
||||
SELECT WI.SITE -- 站点
|
||||
@ -1423,4 +1424,31 @@
|
||||
</where>
|
||||
ORDER BY ERP_STORAGE_LOCATION asc, PALLET asc, BOX asc, ITEM asc, INVENTORY_ID asc
|
||||
</select>
|
||||
|
||||
<select id="selectInventorySummaryReport" resultType="com.foreverwin.mom.wms.dto.InventorySummaryReportDTO">
|
||||
SELECT WI.ERP_STORAGE_LOCATION, SUBSTRING_INDEX(SUBSTRING_INDEX(WI.ITEM_BO, ',', -2), ',', 1) AS ITEM, WI.STATUS, WI.BATCH_NO, WI.DN_ORDER, WI.DN_ORDER_SEQ, WI.QUALITY_INSPECTION_STATUS
|
||||
, WI.QTY_ON_HAND
|
||||
FROM (
|
||||
SELECT WI.ERP_STORAGE_LOCATION, WI.ITEM_BO, WI.STATUS, IFNULL(WI.BATCH_NO, '') AS BATCH_NO, WI.DN_ORDER, WI.DN_ORDER_SEQ , WI.QUALITY_INSPECTION_STATUS
|
||||
, SUM(WI.QTY_ON_HAND) AS QTY_ON_HAND
|
||||
FROM WMS_INVENTORY WI
|
||||
<where>
|
||||
WI.SITE = #{site} AND WI.QTY_ON_HAND > 0
|
||||
<if test="erpStorageLocationList != null and erpStorageLocationList.size > 0">
|
||||
AND WI.ERP_STORAGE_LOCATION IN
|
||||
<foreach collection="erpStorageLocationList" item="erpStorageLocation" open="(" separator="," close=")">
|
||||
#{erpStorageLocation}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="itemList != null and itemList.size > 0">
|
||||
AND SUBSTRING_INDEX(SUBSTRING_INDEX(WI.ITEM_BO, ',', -2), ',', 1) IN
|
||||
<foreach collection="itemList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY WI.ERP_STORAGE_LOCATION, WI.ITEM_BO, WI.STATUS, IFNULL(WI.BATCH_NO, '') , WI.DN_ORDER, WI.DN_ORDER_SEQ , WI.QUALITY_INSPECTION_STATUS
|
||||
)AS WI
|
||||
ORDER BY WI.ERP_STORAGE_LOCATION, ITEM, WI.STATUS, WI.BATCH_NO, WI.DN_ORDER, WI.DN_ORDER_SEQ , WI.QUALITY_INSPECTION_STATUS
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user