|
@@ -5,15 +5,16 @@ import com.gyee.benchmarkingimpala.common.StringUtils;
|
|
|
import com.gyee.benchmarkingimpala.config.R;
|
|
|
import com.gyee.benchmarkingimpala.init.CacheContext;
|
|
|
import com.gyee.benchmarkingimpala.model.auto.*;
|
|
|
-import com.gyee.benchmarkingimpala.model.vo.*;
|
|
|
+import com.gyee.benchmarkingimpala.model.vo.FjjxbVo;
|
|
|
+import com.gyee.benchmarkingimpala.model.vo.FjjxbmxVo;
|
|
|
+import com.gyee.benchmarkingimpala.model.vo.Operation;
|
|
|
+import com.gyee.benchmarkingimpala.model.vo.WxsslVo;
|
|
|
import com.gyee.benchmarkingimpala.service.BenchmarkingService;
|
|
|
import com.gyee.benchmarkingimpala.util.RandomUtil;
|
|
|
import com.gyee.benchmarkingimpala.util.SortUtils;
|
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.text.ParseException;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -533,42 +534,42 @@ public class BenchmarkingController {
|
|
|
i.setComprehensiverate(1.62);
|
|
|
}else if(i.getForeignkeyid().equals("QS_FDC")){
|
|
|
i.setComprehensiverate(1.37);
|
|
|
- }else if(i.getForeignkeyid().equals("SBQ_FDC")){
|
|
|
+ } else if (i.getForeignkeyid().equals("SBQ_FDC")) {
|
|
|
i.setComprehensiverate(0.68);
|
|
|
- }else if(i.getForeignkeyid().equals("XS_FDC")){
|
|
|
+ } else if (i.getForeignkeyid().equals("XS_FDC")) {
|
|
|
i.setComprehensiverate(1.82);
|
|
|
}
|
|
|
- i.setResettimelyrate(RandomUtil.getRandomForDoubleBounded(91,99));
|
|
|
- i.setStatetransitionrate(RandomUtil.getRandomForDoubleBounded(91,99));
|
|
|
- i.setEliminationrate(RandomUtil.getRandomForDoubleBounded(91,99));
|
|
|
+ i.setResettimelyrate(RandomUtil.getRandomForDoubleBounded(91, 99));
|
|
|
+ i.setStatetransitionrate(RandomUtil.getRandomForDoubleBounded(91, 99));
|
|
|
+ i.setEliminationrate(RandomUtil.getRandomForDoubleBounded(91, 99));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (timetype.equals("日")) {
|
|
|
+ resultList.stream().forEach(i -> {
|
|
|
+ if (i.getForeignkeyid().equals("MHS_FDC")) {
|
|
|
+ i.setComprehensiverate(1.06);
|
|
|
+ } else if (i.getForeignkeyid().equals("NSS_FDC")) {
|
|
|
+ i.setComprehensiverate(0.62);
|
|
|
+ } else if (i.getForeignkeyid().equals("QS_FDC")) {
|
|
|
+ i.setComprehensiverate(2.37);
|
|
|
+ } else if (i.getForeignkeyid().equals("SBQ_FDC")) {
|
|
|
+ i.setComprehensiverate(1.68);
|
|
|
+ } else if (i.getForeignkeyid().equals("XS_FDC")) {
|
|
|
+ i.setComprehensiverate(1.82);
|
|
|
+ }
|
|
|
+ i.setResettimelyrate(RandomUtil.getRandomForDoubleBounded(91, 99));
|
|
|
+ i.setStatetransitionrate(RandomUtil.getRandomForDoubleBounded(91, 99));
|
|
|
+ i.setEliminationrate(RandomUtil.getRandomForDoubleBounded(91, 99));
|
|
|
});
|
|
|
- if (timetype.equals("年")){
|
|
|
- resultList.stream().forEach(i->{
|
|
|
- if (i.getForeignkeyid().equals("MHS_FDC")){
|
|
|
- i.setComprehensiverate(1.06);
|
|
|
- }else if(i.getForeignkeyid().equals("NSS_FDC")){
|
|
|
- i.setComprehensiverate(0.62);
|
|
|
- }else if(i.getForeignkeyid().equals("QS_FDC")){
|
|
|
- i.setComprehensiverate(2.37);
|
|
|
- }else if(i.getForeignkeyid().equals("SBQ_FDC")){
|
|
|
- i.setComprehensiverate(1.68);
|
|
|
- }else if(i.getForeignkeyid().equals("XS_FDC")){
|
|
|
- i.setComprehensiverate(1.82);
|
|
|
- }
|
|
|
- i.setResettimelyrate(RandomUtil.getRandomForDoubleBounded(91,99));
|
|
|
- i.setStatetransitionrate(RandomUtil.getRandomForDoubleBounded(91,99));
|
|
|
- i.setEliminationrate(RandomUtil.getRandomForDoubleBounded(91,99));
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
Map<String, Windpowerstation> wpmap = CacheContext.wpmap;
|
|
|
- resultList.stream().forEach(i->{
|
|
|
+ resultList.stream().forEach(i -> {
|
|
|
i.setOrderno(wpmap.get(i.getForeignkeyid()).getOrdernum());
|
|
|
});
|
|
|
- SortUtils.sort(resultList,"orderno",SortUtils.ASC);
|
|
|
+ SortUtils.sort(resultList, "orderno", SortUtils.ASC);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return R.error().message("访问失败");
|
|
|
}
|
|
|
}
|