|
@@ -18,10 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Set;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
@RequestMapping("/api/land")
|
|
@RequestMapping("/api/land")
|
|
@RestController("ApiLandController2")
|
|
@RestController("ApiLandController2")
|
|
@@ -60,6 +57,19 @@ public class ApiLandController extends BaseComponent {
|
|
return R.succ(res);
|
|
return R.succ(res);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @RequestMapping("/crop_cutline")
|
|
|
|
+ public BaseResult getCropCutline(){
|
|
|
|
+ List<Map<String,String>> list = new ArrayList<>();
|
|
|
|
+ for(int i=0;i<CropAreaStat.cropTypes.length;i++){
|
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
|
+ map.put("name", CropAreaStat.name2s[i]);
|
|
|
|
+ map.put("type", CropAreaStat.cropTypes[i]);
|
|
|
|
+ map.put("color", CropAreaStat.colors[i]);
|
|
|
|
+ list.add(map);
|
|
|
|
+ }
|
|
|
|
+ return R.succ(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
@RequestMapping("/estimate_stat")
|
|
@RequestMapping("/estimate_stat")
|
|
public BaseResult getEstimate(@RequestBody CommonVo commonVo){
|
|
public BaseResult getEstimate(@RequestBody CommonVo commonVo){
|
|
return R.succ(landService.getEstimate(commonVo.getDistrict(), commonVo.getCity(), commonVo.getCrop_type()));
|
|
return R.succ(landService.getEstimate(commonVo.getDistrict(), commonVo.getCity(), commonVo.getCrop_type()));
|