mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-02-01 04:00:54 +08:00
feat:添加地点范围管理
This commit is contained in:
parent
b2dc95aac9
commit
82560db163
13 changed files with 406 additions and 16 deletions
|
@ -0,0 +1,90 @@
|
|||
package com.skyeye.school.building.controller;
|
||||
|
||||
import com.skyeye.annotation.api.Api;
|
||||
import com.skyeye.annotation.api.ApiImplicitParam;
|
||||
import com.skyeye.annotation.api.ApiImplicitParams;
|
||||
import com.skyeye.annotation.api.ApiOperation;
|
||||
import com.skyeye.common.entity.search.CommonPageInfo;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.school.building.entity.LocationRange;
|
||||
import com.skyeye.school.building.entity.TeachBuilding;
|
||||
import com.skyeye.school.building.service.LocationRangeService;
|
||||
import com.skyeye.school.building.service.RangeVertexService;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName: LocationRangeController
|
||||
* @Description: 地点范围控制层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/10 15:17
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@RestController
|
||||
@Api(value = "地点范围管理", tags = "地点范围管理", modelName = "地点范围管理")
|
||||
public class LocationRangeController {
|
||||
|
||||
@Autowired
|
||||
private LocationRangeService locationRangeService;
|
||||
|
||||
/**
|
||||
* 添加地点范围
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "writeLocationRange", value = "添加地点范围", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = LocationRange.class)
|
||||
@RequestMapping("/post/LocationRangeController/writeLocationRange")
|
||||
public void writeLocationRange(InputObject inputObject, OutputObject outputObject) {
|
||||
locationRangeService.createEntity(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地点范围信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "deleteLocationRangeById", value = "根据ID删除地点范围信息", method = "DELETE", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
@RequestMapping("/post/LocationRangeController/deleteLocationRangeById")
|
||||
public void deleteLocationRangeById(InputObject inputObject, OutputObject outputObject) {
|
||||
locationRangeService.deleteById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id获取获取地点范围信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryLocationRangeById", value = "根据id获取获取地点范围信息", method = "GET", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id",name = "id", value = "地点id", required = "required")
|
||||
})
|
||||
@RequestMapping("/post/LocationRangeController/queryLocationRangeById")
|
||||
public void queryLocationRangeById(InputObject inputObject, OutputObject outputObject) {
|
||||
locationRangeService.selectById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取地点范围信息列表
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryLocationRangeList", value = "获取地点范围信息列表", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = CommonPageInfo.class)
|
||||
@RequestMapping("/post/LocationRangeController/queryLocationRangeList")
|
||||
public void queryLocationRangeList(InputObject inputObject, OutputObject outputObject) {
|
||||
locationRangeService.queryLocationRangeList(inputObject, outputObject);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -19,26 +19,26 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
/**
|
||||
* @ClassName: TeachBuildingController
|
||||
* @Description: 教学楼管理控制层
|
||||
* @Description: 地点管理控制层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2023/8/8 14:55
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@RestController
|
||||
@Api(value = "地点教学楼管理", tags = "地点教学楼管理", modelName = "地点教学楼管理")
|
||||
@Api(value = "地点管理", tags = "地点管理", modelName = "地点管理")
|
||||
public class TeachBuildingController {
|
||||
|
||||
@Autowired
|
||||
private TeachBuildingService teachBuildingService;
|
||||
|
||||
/**
|
||||
* 获取教学楼信息列表
|
||||
* 获取地点信息列表
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryTeachBuildingList", value = "获取教学楼信息", method = "POST", allUse = "2")
|
||||
@ApiOperation(id = "queryTeachBuildingList", value = "获取地点信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = CommonPageInfo.class)
|
||||
@RequestMapping("/post/TeachBuildingController/queryTeachBuildingList")
|
||||
public void queryTeachBuildingList(InputObject inputObject, OutputObject outputObject) {
|
||||
|
@ -46,12 +46,12 @@ public class TeachBuildingController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 添加或修改地点教学楼
|
||||
* 添加或修改地点
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "writeTeachBuilding", value = "新增/编辑地点教学楼信息", method = "POST", allUse = "2")
|
||||
@ApiOperation(id = "writeTeachBuilding", value = "新增/编辑地点信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = TeachBuilding.class)
|
||||
@RequestMapping("/post/TeachBuildingController/writeTeachBuilding")
|
||||
public void writeTeachBuilding(InputObject inputObject, OutputObject outputObject) {
|
||||
|
@ -59,12 +59,12 @@ public class TeachBuildingController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 删除地点教学楼信息
|
||||
* 删除地点信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "deleteTeachBuildingById", value = "根据ID删除地点教学楼信息", method = "DELETE", allUse = "2")
|
||||
@ApiOperation(id = "deleteTeachBuildingById", value = "根据ID删除地点信息", method = "DELETE", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
@RequestMapping("/post/TeachBuildingController/deleteTeachBuildingById")
|
||||
|
@ -73,12 +73,12 @@ public class TeachBuildingController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据学校id获取教学楼信息
|
||||
* 根据学校id获取地点信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryTeachBuildingBySchoolId", value = "根据学校id获取教学楼信息", method = "GET", allUse = "2")
|
||||
@ApiOperation(id = "queryTeachBuildingBySchoolId", value = "根据学校id获取地点信息", method = "GET", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "schoolId", name = "schoolId", value = "学校id", required = "required")})
|
||||
@RequestMapping("/post/TeachBuildingController/queryTeachBuildingBySchoolId")
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.skyeye.school.building.dao;
|
||||
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.school.building.entity.LocationRange;
|
||||
|
||||
/**
|
||||
* @ClassName: LocationRangeDao
|
||||
* @Description: 地带范围数据层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/6 11:40
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface LocationRangeDao extends SkyeyeBaseMapper<LocationRange> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.skyeye.school.building.dao;
|
||||
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.school.building.entity.RangeVertex;
|
||||
|
||||
/**
|
||||
* @ClassName: RangeVertexDao
|
||||
* @Description: 范围顶点数据层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/6 11:40
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface RangeVertexDao extends SkyeyeBaseMapper<RangeVertex> {
|
||||
}
|
|
@ -9,7 +9,7 @@ import com.skyeye.school.building.entity.TeachBuilding;
|
|||
|
||||
/**
|
||||
* @ClassName: TeachBuildingDao
|
||||
* @Description: 教学楼管理数据层
|
||||
* @Description: 地点管理数据层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2021/8/7 20:48
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package com.skyeye.school.building.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.api.Property;
|
||||
import com.skyeye.common.entity.features.OperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: LocationRange
|
||||
* @Description: 地点范围实体层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/10 15:17
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@TableName("school_location_range")
|
||||
@ApiModel(description = "地点范围")
|
||||
public class LocationRange extends OperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id,为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
@TableField("name")
|
||||
@ApiModelProperty(value = "地点范围名称", required = "required")
|
||||
private String name;
|
||||
|
||||
@TableField("logo")
|
||||
@ApiModelProperty(value = "地点范围logo",required = "required")
|
||||
private String logo;
|
||||
|
||||
@TableField("description")
|
||||
@ApiModelProperty(value = "地点范围描述")
|
||||
private String description;
|
||||
|
||||
@TableField("vertex_num")
|
||||
@ApiModelProperty(value = "顶点数量",required = "required")
|
||||
private Integer vertexNum;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "顶点表信息" , required = "json")
|
||||
private List<RangeVertex> rangeVertexMation;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.skyeye.school.building.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.common.entity.features.OperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName: RangeVertex
|
||||
* @Description: 范围顶点管理实体类
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/6 11:40
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@TableName("school_vertex")
|
||||
@ApiModel(description = "范围顶点管理实体类")
|
||||
public class RangeVertex extends OperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id,为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
@TableField("range_id")
|
||||
@ApiModelProperty(value = "范围id")
|
||||
private String rangeId;
|
||||
|
||||
@TableField("order_num")
|
||||
@ApiModelProperty(value = "顺序")
|
||||
private Integer orderNum;
|
||||
|
||||
|
||||
@TableField("longitude")
|
||||
@ApiModelProperty(value = "经度",required = "required")
|
||||
private Float longitude;
|
||||
|
||||
@TableField("latitude")
|
||||
@ApiModelProperty(value = "纬度",required = "required")
|
||||
private Float latitude;
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.skyeye.school.building.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.school.building.entity.LocationRange;
|
||||
|
||||
/**
|
||||
* @ClassName: LocationRangeService
|
||||
* @Description: 楼层教室管理服务接口层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/6 14:55
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface LocationRangeService extends SkyeyeBusinessService<LocationRange> {
|
||||
void queryLocationRangeList(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.skyeye.school.building.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.school.building.entity.RangeVertex;
|
||||
|
||||
/**
|
||||
* @ClassName: RangeVertexService
|
||||
* @Description: 范围顶点服务接口层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/11/6 14:55
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface RangeVertexService extends SkyeyeBusinessService<RangeVertex> {
|
||||
}
|
|
@ -11,7 +11,7 @@ import com.skyeye.school.building.entity.TeachBuilding;
|
|||
|
||||
/**
|
||||
* @ClassName: TeachBuildingService
|
||||
* @Description: 教学楼管理服务接口层
|
||||
* @Description: 地点管理服务接口层
|
||||
* @author: xqz
|
||||
* @date: 2023/8/9 9:52
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
package com.skyeye.school.building.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.skyeye.annotation.service.SkyeyeService;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.common.entity.search.CommonPageInfo;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
||||
import com.skyeye.school.building.dao.LocationRangeDao;
|
||||
import com.skyeye.school.building.entity.LocationRange;
|
||||
import com.skyeye.school.building.entity.RangeVertex;
|
||||
import com.skyeye.school.building.service.LocationRangeService;
|
||||
import com.skyeye.school.building.service.RangeVertexService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: LocationRangeServiceImpl
|
||||
* @Description: 地点范围实现类
|
||||
* @author: skyeye云系列--,lqy
|
||||
* @date: 2023/9/5 17:15
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
@SkyeyeService(name = "地点范围管理", groupName = "地点范围管理")
|
||||
public class LocationRangeServiceImpl extends SkyeyeBusinessServiceImpl<LocationRangeDao, LocationRange> implements LocationRangeService {
|
||||
|
||||
@Autowired
|
||||
private RangeVertexService rangeVertexService;
|
||||
|
||||
@Override
|
||||
public void queryLocationRangeList(InputObject inputObject, OutputObject outputObject) {
|
||||
CommonPageInfo commonPageInfo = inputObject.getParams(CommonPageInfo.class);
|
||||
Page page = PageHelper.startPage(commonPageInfo.getPage(), commonPageInfo.getLimit());
|
||||
QueryWrapper<LocationRange> queryWrapper = new QueryWrapper<>();
|
||||
List<LocationRange> bean = list(queryWrapper);
|
||||
for(LocationRange locationRange : bean){
|
||||
String rangeId = locationRange.getId();
|
||||
QueryWrapper<RangeVertex> vertexQueryWrapper= new QueryWrapper<>();
|
||||
vertexQueryWrapper.eq(MybatisPlusUtil.toColumns(RangeVertex::getRangeId), rangeId);
|
||||
vertexQueryWrapper.orderByAsc(MybatisPlusUtil.toColumns(RangeVertex::getOrderNum));
|
||||
List<RangeVertex> vertexList = rangeVertexService.list(vertexQueryWrapper);
|
||||
locationRange.setRangeVertexMation(vertexList);
|
||||
}
|
||||
outputObject.setBeans(bean);
|
||||
outputObject.settotal(page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationRange selectById(String id) {
|
||||
LocationRange locationRange = super.selectById(id);
|
||||
String rangeId = locationRange.getId();
|
||||
QueryWrapper<RangeVertex> vertexQueryWrapper= new QueryWrapper<>();
|
||||
vertexQueryWrapper.eq(MybatisPlusUtil.toColumns(RangeVertex::getRangeId), rangeId);
|
||||
vertexQueryWrapper.orderByAsc(MybatisPlusUtil.toColumns(RangeVertex::getOrderNum));
|
||||
List<RangeVertex> vertexList = rangeVertexService.list(vertexQueryWrapper);
|
||||
locationRange.setRangeVertexMation(vertexList);
|
||||
return locationRange;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteById(String id) {
|
||||
super.deleteById(id);
|
||||
QueryWrapper<RangeVertex> vertexQueryWrapper= new QueryWrapper<>();
|
||||
vertexQueryWrapper.eq(MybatisPlusUtil.toColumns(RangeVertex::getRangeId), id);
|
||||
rangeVertexService.remove(vertexQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createPostpose(LocationRange locationRange,String userId) {
|
||||
String rangeId = locationRange.getId();
|
||||
List<RangeVertex> rangeVertexMation = locationRange.getRangeVertexMation();
|
||||
for (RangeVertex rangeVertex : rangeVertexMation) {
|
||||
rangeVertex.setRangeId(rangeId);
|
||||
}
|
||||
rangeVertexService.createEntity(rangeVertexMation, userId);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.skyeye.school.building.service.impl;
|
||||
|
||||
import com.skyeye.annotation.service.SkyeyeService;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.school.building.dao.RangeVertexDao;
|
||||
import com.skyeye.school.building.entity.RangeVertex;
|
||||
import com.skyeye.school.building.service.RangeVertexService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @ClassName: RangeVertexServiceImpl
|
||||
* @Description: 范围顶点管理实现层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2023/9/5 17:15
|
||||
* @Copyright: 2023 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
@SkyeyeService(name = "范围顶点管理", groupName = "范围顶点管理")
|
||||
public class RangeVertexServiceImpl extends SkyeyeBusinessServiceImpl<RangeVertexDao, RangeVertex> implements RangeVertexService {
|
||||
}
|
|
@ -18,29 +18,40 @@ import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
|||
import com.skyeye.eve.service.SchoolService;
|
||||
import com.skyeye.exception.CustomException;
|
||||
import com.skyeye.school.building.dao.TeachBuildingDao;
|
||||
import com.skyeye.school.building.entity.Floor;
|
||||
import com.skyeye.school.building.entity.LocationServe;
|
||||
import com.skyeye.school.building.entity.TeachBuilding;
|
||||
import com.skyeye.school.building.service.FloorService;
|
||||
import com.skyeye.school.building.service.LocationServeService;
|
||||
import com.skyeye.school.building.service.TeachBuildingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: TeachBuildingServiceImpl
|
||||
* @Description: 地点教学楼管理服务层
|
||||
* @Description: 地点管理服务层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2021/8/7 20:48
|
||||
* @date: 2024/8/7 20:48
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
@SkyeyeService(name = "地点教学楼管理", groupName = "地点教学楼管理")
|
||||
@SkyeyeService(name = "地点管理", groupName = "地点管理")
|
||||
public class TeachBuildingServiceImpl extends SkyeyeBusinessServiceImpl<TeachBuildingDao, TeachBuilding> implements TeachBuildingService {
|
||||
|
||||
@Autowired
|
||||
private SchoolService schoolService;
|
||||
|
||||
@Autowired
|
||||
private FloorService floorService;
|
||||
|
||||
@Autowired
|
||||
private LocationServeService locationServeService;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryPageDataList(InputObject inputObject) {
|
||||
List<Map<String, Object>> beans = super.queryPageDataList(inputObject);
|
||||
|
@ -63,7 +74,7 @@ public class TeachBuildingServiceImpl extends SkyeyeBusinessServiceImpl<TeachBui
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据学校id获取教学楼信息
|
||||
* 根据学校id获取地点信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
|
@ -98,4 +109,24 @@ public class TeachBuildingServiceImpl extends SkyeyeBusinessServiceImpl<TeachBui
|
|||
outputObject.settotal(page.getTotal());
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void deleteById(InputObject inputObject, OutputObject outputObject) {
|
||||
String id = inputObject.getParams().get("id").toString();
|
||||
if(StringUtils.isEmpty(id)){
|
||||
return;
|
||||
}
|
||||
deleteById(id);
|
||||
QueryWrapper<Floor> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(Floor::getLocationId), id);
|
||||
List<Floor> floorList = floorService.list(queryWrapper);
|
||||
floorService.remove(queryWrapper);
|
||||
|
||||
for(Floor floor : floorList){
|
||||
QueryWrapper<LocationServe> serveQueryWrapper = new QueryWrapper<>();
|
||||
serveQueryWrapper.eq(MybatisPlusUtil.toColumns(LocationServe::getFloorId), floor.getId());
|
||||
locationServeService.remove(serveQueryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue