Commit c8d11fdc authored by duanruiming's avatar duanruiming

[update] 辖区校验

parent 9b8a98be
...@@ -14,7 +14,9 @@ import org.springframework.web.bind.annotation.*; ...@@ -14,7 +14,9 @@ import org.springframework.web.bind.annotation.*;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
...@@ -173,7 +175,7 @@ public class SituationDetectionController extends BaseController { ...@@ -173,7 +175,7 @@ public class SituationDetectionController extends BaseController {
@AspectLog(description = "辖区分组", operationType = BaseEnum.OperationTypeEnum.QUERY) @AspectLog(description = "辖区分组", operationType = BaseEnum.OperationTypeEnum.QUERY)
@ApiOperation(value = "辖区分组", notes = "辖区分组") @ApiOperation(value = "辖区分组", notes = "辖区分组")
@GetMapping("/jurisdictionTree") @GetMapping("/jurisdictionTree")
public JsonViewObject jurisdictionTree(Integer areaId, Integer type) throws Exception { public JsonViewObject jurisdictionTree(Integer areaId, @RequestParam Integer type) throws Exception {
List<JurisdictionAreaTreeVO> result = situationDetectionService.jurisdictionTree(areaId, type); List<JurisdictionAreaTreeVO> result = situationDetectionService.jurisdictionTree(areaId, type);
JsonViewObject jsonViewObject = JsonViewObject.newInstance(); JsonViewObject jsonViewObject = JsonViewObject.newInstance();
return jsonViewObject.success(result); return jsonViewObject.success(result);
......
...@@ -419,7 +419,9 @@ public class SituationDetectionServiceImpl implements SituationDetectionService ...@@ -419,7 +419,9 @@ public class SituationDetectionServiceImpl implements SituationDetectionService
List<TBaseAreaInfo> tBaseAreaInfos = tBaseAreaInfoMapper.selectList(queryWrapper); List<TBaseAreaInfo> tBaseAreaInfos = tBaseAreaInfoMapper.selectList(queryWrapper);
List<Integer> areadCodeList = tBaseAreaInfos.stream().map(TBaseAreaInfo::getCode).collect(Collectors.toList()); List<Integer> areadCodeList = tBaseAreaInfos.stream().map(TBaseAreaInfo::getCode).collect(Collectors.toList());
LambdaQueryWrapper<TBaseAreaCross> crossQuery = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TBaseAreaCross> crossQuery = new LambdaQueryWrapper<>();
crossQuery.in(TBaseAreaCross::getAreaId, areadCodeList); if (!CollectionUtils.isEmpty(areadCodeList)) {
crossQuery.in(TBaseAreaCross::getAreaId, areadCodeList);
}
List<TBaseAreaCross> tBaseAreaCrosses = tBaseAreaCrossMapper.selectList(crossQuery); List<TBaseAreaCross> tBaseAreaCrosses = tBaseAreaCrossMapper.selectList(crossQuery);
LambdaQueryWrapper<TBaseCrossInfo> crossInfoQuery = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TBaseCrossInfo> crossInfoQuery = new LambdaQueryWrapper<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment