电子围栏0523

master
guochaojie 5 months ago
parent 0964d15b91
commit d71aa4575d

@ -2,7 +2,9 @@ package jnpf.service;
import jnpf.model.stationarea.*;
import jnpf.entity.*;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -32,4 +34,5 @@ public interface StationAreaService extends IService<StationAreaEntity> {
void saveOrUpdate(StationAreaForm stationAreaForm, String id, boolean isSave) throws Exception;
List<StationAreaEntity> getOthersArea(String id);
}

@ -1,5 +1,6 @@
package jnpf.service.impl;
import com.alibaba.fastjson.JSONArray;
import jnpf.entity.*;
import jnpf.mapper.StationAreaMapper;
import jnpf.service.*;
@ -358,7 +359,7 @@ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stati
entity.setOrganizeJsonId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "all"));
entity.setLastModifyUserId(userInfo.getUserId());
entity.setLastModifyTime(DateUtil.getNowDate());
entity.setCompanyId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(),"company"));
entity.setCompanyId("");
entity.setId(mainId);
} else {
entity.setCreatorUserId(userInfo.getUserId());
@ -371,4 +372,12 @@ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stati
this.saveOrUpdate(entity);
}
@Override
public List<StationAreaEntity> getOthersArea(String id) {
QueryWrapper<StationAreaEntity> wrapper = new QueryWrapper<>();
wrapper.ne("id", id);
List<StationAreaEntity> list = this.list(wrapper);
return list;
}
}

@ -251,4 +251,11 @@ public class StationAreaController {
}
}
@PostMapping("/getOthersArea/{id}")
@Operation(summary = "获取非当前编辑的其他区域信息")
public ActionResult getOthersArea(@PathVariable String id) {
List<StationAreaEntity> othersArea = stationAreaService.getOthersArea(id);
return ActionResult.success(othersArea);
}
}

@ -88,7 +88,24 @@
areaType : "",
status : "1",
companyId : "",
areaMapInfo : "[{'lat':39.98423552382614,'lng':116.3059581286434},{'lat':39.986865947052266,'lng':116.3783954344508},{'lat':39.94897808062252,'lng':116.37942533460955},{'lat':39.94818852953558,'lng':116.3093911759388},{'lat':39.960820297511674,'lng':116.30801795711886}]",
areaMapInfo : "[\n" +
" {\n" +
" \"lat\": 39.9629611771165,\n" +
" \"lng\": 116.30936980247498\n" +
" },\n" +
" {\n" +
" \"lat\": 39.96348746127829,\n" +
" \"lng\": 116.46523833274841\n" +
" },\n" +
" {\n" +
" \"lat\": 39.85815003104041,\n" +
" \"lng\": 116.4590585231781\n" +
" },\n" +
" {\n" +
" \"lat\": 39.85235177327065,\n" +
" \"lng\": 116.31966948509216\n" +
" }\n" +
"] \n",
areaDesc : '',
creatorUserId : "",
creatorTime : "",

Loading…
Cancel
Save