|
@@ -6,6 +6,7 @@ import com.project.zcustom.service.logistics.ILargePlatAssetService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -58,29 +59,58 @@ public class LargePlatAssetServiceImpl implements ILargePlatAssetService {
|
|
|
return platLogisticsMapper.getMainlyRate(appOrg);
|
|
|
}
|
|
|
|
|
|
- public List<LargeLogistics> getSceneRate(int flag){
|
|
|
+ public Map<String, Object> getSceneRate(int flag){
|
|
|
List<LargeLogistics> list;
|
|
|
+ List<String> list1 = new ArrayList<>();
|
|
|
+ List<BigDecimal> list2 = new ArrayList<>();
|
|
|
if (flag == 0){
|
|
|
list = platLogisticsMapper.getSceneRateX();
|
|
|
+ for (LargeLogistics it : list){
|
|
|
+ it.setAppName(it.getAppName().substring(2, 4));
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
list = platLogisticsMapper.getSceneRateY();
|
|
|
}
|
|
|
for (LargeLogistics it : list){
|
|
|
- it.setAppName(it.getAppName().substring(2, 4));
|
|
|
+ list1.add(it.getAppName());
|
|
|
+ list2.add(it.getSceneRate());
|
|
|
}
|
|
|
- return list;
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("xList", list1);
|
|
|
+ map.put("yList", list2);
|
|
|
+ return map;
|
|
|
}
|
|
|
|
|
|
public List<LargeLogistics> getOperation(String appOrg){
|
|
|
return platLogisticsMapper.getOperation(appOrg);
|
|
|
}
|
|
|
|
|
|
- public List<LargeLogistics> getInspectionSchemeNumX(){
|
|
|
- return platLogisticsMapper.getInspectionSchemeNumX();
|
|
|
+ public Map<String, Object> getInspectionSchemeNumX(){
|
|
|
+ List<LargeLogistics> list = platLogisticsMapper.getInspectionSchemeNumX();
|
|
|
+ List<String> list1 = new ArrayList<>();
|
|
|
+ List<Long> list2 = new ArrayList<>();
|
|
|
+ for (LargeLogistics it : list){
|
|
|
+ list1.add(it.getAppName().substring(2, 4));
|
|
|
+ list2.add(it.getInspectionSchemeNum());
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("xList", list1);
|
|
|
+ map.put("yList", list2);
|
|
|
+ return map;
|
|
|
}
|
|
|
|
|
|
- public List<LargeLogistics> getInspectionSchemeNumY(){
|
|
|
- return platLogisticsMapper.getInspectionSchemeNumY();
|
|
|
+ public Map<String, Object> getInspectionSchemeNumY(){
|
|
|
+ List<LargeLogistics> list = platLogisticsMapper.getInspectionSchemeNumY();
|
|
|
+ List<String> list1 = new ArrayList<>();
|
|
|
+ List<Long> list2 = new ArrayList<>();
|
|
|
+ for (LargeLogistics it : list){
|
|
|
+ list1.add(it.getAppName());
|
|
|
+ list2.add(it.getInspectionSchemeNum());
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("xList", list1);
|
|
|
+ map.put("yList", list2);
|
|
|
+ return map;
|
|
|
}
|
|
|
}
|