MTSController.java
1.24 KB
package com.huaheng.api.mts;
import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
import com.huaheng.pc.inventory.InventoryMaterialSummary.service.InventoryMaterialSummaryService;
import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@RestController
@RequestMapping("/api/mts/v1")
public class MTSController {
@Resource
private InventoryMaterialSummaryService inventoryMaterialSummaryService;
@GetMapping("/inventoryDetail")
public List<InventoryMaterialSummary> getInventoryDetails(){
List<InventoryMaterialSummary> list = inventoryMaterialSummaryService.list();
if (list == null) {
list = Collections.emptyList();
}
//筛选库存汇总数据的专用方法
List<InventoryMaterialSummary> details = inventoryMaterialSummaryService.duplicateRemoval(list);
return details;
}
}