同步材料数据
This commit is contained in:
@ -16,6 +16,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
@ -47,7 +49,12 @@ public class MaterialsTest {
|
|||||||
List<MatMaterials> materials = materialsService.lambdaQuery()
|
List<MatMaterials> materials = materialsService.lambdaQuery()
|
||||||
.eq(MatMaterials::getProjectId, PROJECT_ID)
|
.eq(MatMaterials::getProjectId, PROJECT_ID)
|
||||||
.list();
|
.list();
|
||||||
log.info("材料数据:{}", materials);
|
Map<String, List<MatMaterials>> map = materials.stream()
|
||||||
|
.collect(Collectors.groupingBy(MatMaterials::getFormCode));
|
||||||
|
for (Map.Entry<String, List<MatMaterials>> entry : map.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
List<MatMaterials> value = entry.getValue();
|
||||||
|
}
|
||||||
for (MatMaterials material : materials) {
|
for (MatMaterials material : materials) {
|
||||||
String formCode = material.getFormCode();
|
String formCode = material.getFormCode();
|
||||||
// 查看入库数据
|
// 查看入库数据
|
||||||
|
|||||||
Reference in New Issue
Block a user