|
1
2
|
package com.huaheng.api.mts;
|
|
3
4
|
import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
import com.huaheng.pc.inventory.InventoryMaterialSummary.service.InventoryMaterialSummaryService;
|
|
5
6
7
8
9
10
11
|
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;
|
|
12
|
import java.util.Collections;
|
|
13
14
15
16
17
18
19
|
import java.util.List;
@RestController
@RequestMapping("/api/mts/v1")
public class MTSController {
@Resource
|
|
20
|
private InventoryMaterialSummaryService inventoryMaterialSummaryService;
|
|
21
22
|
@GetMapping("/inventoryDetail")
|
|
23
24
25
26
27
28
29
30
31
|
public List<InventoryMaterialSummary> getInventoryDetails(){
List<InventoryMaterialSummary> list = inventoryMaterialSummaryService.list();
if (list == null) {
list = Collections.emptyList();
}
//筛选库存汇总数据的专用方法
List<InventoryMaterialSummary> details = inventoryMaterialSummaryService.duplicateRemoval(list);
return details;
|
|
32
33
|
}
}
|