fix:看板接口优化
This commit is contained in:
@@ -5,6 +5,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.bigscreen_manage.service.BigScreenService;
|
||||
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -40,10 +42,11 @@ public class BigScreenController {
|
||||
@Log("大屏数据")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getData(@RequestBody JSONObject stors) {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("GW");
|
||||
list.add("GW");
|
||||
List<JSONObject> data = bigScreenService.getData(list);
|
||||
String string = stors.getString("stors");
|
||||
List<JSONObject> data = new ArrayList<>();
|
||||
if (!StringUtils.isEmpty(string)){
|
||||
data = bigScreenService.getData(Arrays.asList(string.split(",")));
|
||||
}
|
||||
return new ResponseEntity<>(TableDataInfo.build(data), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class BigScreenServiceImpl implements BigScreenService {
|
||||
for (String storCode : stors) {
|
||||
JSONObject item = new JSONObject();
|
||||
//1.【货位使用】数据
|
||||
item.put("title","GW仓库");
|
||||
item.put("title",storCode+"仓库");
|
||||
item.put("pointUse", pointUse(storCode));
|
||||
// //2.【实时库存分析】数据
|
||||
item.put("ivtAnalyse", ivtAnalyse(storCode));
|
||||
|
||||
Reference in New Issue
Block a user