32 changed files with 605 additions and 34 deletions
@ -0,0 +1,36 @@ |
|||||
|
package org.dromara.business.controller; |
||||
|
|
||||
|
|
||||
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.dromara.business.domain.bo.BusinessLayerBo; |
||||
|
|
||||
|
import org.dromara.business.domain.vo.BusinessLayerVo; |
||||
|
|
||||
|
import org.dromara.business.service.IBusinessLayerService; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Validated |
||||
|
@RequiredArgsConstructor |
||||
|
@RestController |
||||
|
@Tag(name = "图层模块") |
||||
|
@RequestMapping("/layer") |
||||
|
public class BusinessLayerController { |
||||
|
|
||||
|
private final IBusinessLayerService businessLayerService; |
||||
|
/** |
||||
|
* 图层模块列表 |
||||
|
*/ |
||||
|
@SaCheckPermission("business:task:list") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo<BusinessLayerVo> list(BusinessLayerBo bo, PageQuery pageQuery) { |
||||
|
return businessLayerService.queryPageList(bo, pageQuery); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package org.dromara.business.domain; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import org.dromara.common.translation.annotation.Translation; |
||||
|
import org.dromara.common.translation.constant.TransConstant; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode |
||||
|
@TableName("business_layer") |
||||
|
public class BusinessLayer { |
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
@TableId(value = "id", type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
|
||||
|
|
||||
|
private String layerName; |
||||
|
|
||||
|
|
||||
|
/*0:禁用 1:启用*/ |
||||
|
private Boolean enable; |
||||
|
|
||||
|
/** |
||||
|
* 时间 |
||||
|
* */ |
||||
|
private Date createTime; |
||||
|
|
||||
|
|
||||
|
private Integer layerType; |
||||
|
|
||||
|
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "layerType", other = "layer_type") |
||||
|
private String layerTypeName; |
||||
|
|
||||
|
//租户id
|
||||
|
private String tenantId; |
||||
|
//部门id
|
||||
|
private Long deptId; |
||||
|
//部门名称
|
||||
|
private String deptName; |
||||
|
|
||||
|
//备注
|
||||
|
private String remark; |
||||
|
//排序
|
||||
|
private Integer sort; |
||||
|
//父部门id
|
||||
|
private Integer parentId; |
||||
|
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package org.dromara.business.domain.bo; |
||||
|
|
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
|
import io.github.linpeilie.annotations.AutoMapper; |
||||
|
import jakarta.validation.constraints.NotNull; |
||||
|
import lombok.Data; |
||||
|
import org.dromara.business.domain.BusinessLayer; |
||||
|
import org.dromara.common.core.validate.AddGroup; |
||||
|
import org.dromara.common.core.validate.EditGroup; |
||||
|
import org.dromara.common.translation.annotation.Translation; |
||||
|
import org.dromara.common.translation.constant.TransConstant; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@ExcelIgnoreUnannotated |
||||
|
@AutoMapper(target = BusinessLayer.class,reverseConvertGenerate = false) |
||||
|
public class BusinessLayerBo { |
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
|
||||
|
@NotNull(message = "图层名称不能为空", groups = { AddGroup.class}) |
||||
|
private String layerName; |
||||
|
|
||||
|
/*0:禁用 1:启用*/ |
||||
|
private Boolean enable; |
||||
|
/** |
||||
|
* 时间 |
||||
|
* */ |
||||
|
private Date createTime; |
||||
|
|
||||
|
@NotNull(message = "图层类型不能为空", groups = { AddGroup.class}) |
||||
|
private Integer layerType; |
||||
|
|
||||
|
private String tenantId; |
||||
|
@NotNull(message = "部门id不能为空", groups = { AddGroup.class}) |
||||
|
private Long deptId; |
||||
|
|
||||
|
@NotNull(message = "部门名称不能为空", groups = { AddGroup.class}) |
||||
|
private String deptName; |
||||
|
|
||||
|
private String remark; |
||||
|
|
||||
|
//排序
|
||||
|
private Integer sort; |
||||
|
//父部门id
|
||||
|
private Integer parentId; |
||||
|
|
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package org.dromara.business.domain.vo; |
||||
|
|
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.github.linpeilie.annotations.AutoMapper; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import org.dromara.business.domain.BusinessLayer; |
||||
|
import org.dromara.business.domain.BusinessTask; |
||||
|
import org.dromara.common.translation.annotation.Translation; |
||||
|
import org.dromara.common.translation.constant.TransConstant; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@ExcelIgnoreUnannotated |
||||
|
@AutoMapper(target = BusinessLayer.class) |
||||
|
public class BusinessLayerVo { |
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
|
||||
|
|
||||
|
private String layerName; |
||||
|
|
||||
|
/*0:禁用 1:启用*/ |
||||
|
private Boolean enable; |
||||
|
/** |
||||
|
* 时间 |
||||
|
* */ |
||||
|
private Date createTime; |
||||
|
private Integer layerType; |
||||
|
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "layerType", other = "layer_type") |
||||
|
private String layerTypeName; |
||||
|
private String tenantId; |
||||
|
private Long deptId; |
||||
|
|
||||
|
private String deptName; |
||||
|
|
||||
|
private String remark; |
||||
|
|
||||
|
//排序
|
||||
|
private Integer sort; |
||||
|
//父部门id
|
||||
|
private Integer parentId; |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package org.dromara.business.mapper; |
||||
|
|
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.dromara.business.domain.BusinessLayer; |
||||
|
import org.dromara.business.domain.bo.BusinessLayerBo; |
||||
|
import org.dromara.business.domain.bo.BusinessTaskBo; |
||||
|
import org.dromara.business.domain.vo.BusinessLayerVo; |
||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
||||
|
public interface BusinessLayerMapper extends BaseMapperPlus<BusinessLayer, BusinessLayerVo> { |
||||
|
|
||||
|
Page<BusinessLayerVo> queryPageList(@Param("page") Page<?> page, @Param("bo") BusinessLayerBo bo); |
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package org.dromara.business.service; |
||||
|
|
||||
|
import org.dromara.business.domain.bo.BusinessLayerBo; |
||||
|
import org.dromara.business.domain.vo.BusinessLayerVo; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
|
||||
|
public interface IBusinessLayerService { |
||||
|
|
||||
|
/** |
||||
|
* 分页查询工单预约列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @param pageQuery 分页参数 |
||||
|
* @return 工单预约分页列表 |
||||
|
*/ |
||||
|
TableDataInfo<BusinessLayerVo> queryPageList(BusinessLayerBo bo, PageQuery pageQuery); |
||||
|
|
||||
|
Boolean insert(BusinessLayerBo bo); |
||||
|
Boolean update(BusinessLayerBo bo); |
||||
|
Boolean delete(Long id); |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
package org.dromara.business.service.impl; |
||||
|
|
||||
|
import cn.hutool.core.convert.Convert; |
||||
|
import cn.hutool.core.convert.impl.MapConverter; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.dromara.business.domain.BusinessLayer; |
||||
|
import org.dromara.business.domain.bo.BusinessLayerBo; |
||||
|
import org.dromara.business.domain.vo.BusinessLayerVo; |
||||
|
import org.dromara.business.mapper.BusinessLayerMapper; |
||||
|
import org.dromara.business.service.IBusinessLayerService; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
|
||||
|
|
||||
|
@Slf4j |
||||
|
@RequiredArgsConstructor |
||||
|
@Service |
||||
|
public class BusinessLayerServiceImpl implements IBusinessLayerService { |
||||
|
private final BusinessLayerMapper baseMapper; |
||||
|
|
||||
|
@Override |
||||
|
public TableDataInfo<BusinessLayerVo> queryPageList(BusinessLayerBo bo, PageQuery pageQuery) { |
||||
|
Page<BusinessLayerVo> result = baseMapper.queryPageList(pageQuery.build(), bo); |
||||
|
return TableDataInfo.build(result); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Boolean insert(BusinessLayerBo bo) { |
||||
|
BusinessLayer layerVo = Convert.convert( BusinessLayer.class,bo); |
||||
|
return baseMapper.insert(layerVo)>0; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Boolean update(BusinessLayerBo bo) { |
||||
|
BusinessLayer layerVo = Convert.convert( BusinessLayer.class,bo); |
||||
|
return baseMapper.updateById(layerVo)>0; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Boolean delete(Long id) { |
||||
|
return baseMapper.deleteById(id)>0; |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="org.dromara.business.mapper.BusinessLayerMapper"> |
||||
|
|
||||
|
|
||||
|
<select id="queryPageList" resultType="org.dromara.business.domain.vo.BusinessLayerVo"> |
||||
|
|
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,11 @@ |
|||||
|
package org.dromara.system.utils; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 解析ovkmz文件 |
||||
|
*/ |
||||
|
public class OvkmzParser { |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue