|
|
|
@ -465,24 +465,21 @@ public class StockService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return stock;
|
|
|
|
return stock;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
CategoryMapper categoryMapper;
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String,String> getCategoryList() {
|
|
|
|
public Map<String,String> getCategoryList() {
|
|
|
|
|
|
|
|
List<Category> category = categoryMapper.selectList(new QueryWrapper<Category>());
|
|
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
if(configProperties.getProductDoc() != null){
|
|
|
|
for (Category c : category)
|
|
|
|
List<String> list = new ArrayList<>();
|
|
|
|
map.put(c.getCode(),c.getName());
|
|
|
|
list = FileUtil.readLinesToList(configProperties.getProductDoc());
|
|
|
|
|
|
|
|
for(String s : list){
|
|
|
|
|
|
|
|
String[] split = s.split(":");
|
|
|
|
|
|
|
|
if(split.length == 2) {
|
|
|
|
|
|
|
|
map.put(split[0], split[1]);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
map.put(split[0], split[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
System.out.println(FileUtil.readLinesToList("D:\\品规.txt"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String,Object> overview() {
|
|
|
|
public Map<String,Object> overview() {
|
|
|
|
List<Stock> list = stockMapper.selectList(new QueryWrapper<Stock>());
|
|
|
|
List<Stock> list = stockMapper.selectList(new QueryWrapper<Stock>());
|
|
|
|
|