mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
设备厂家和设备分类
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package cn.lihongjie.coal.deviceCategory.controller;
|
||||
|
||||
import cn.lihongjie.coal.annotation.OrgScope;
|
||||
import cn.lihongjie.coal.annotation.SysLog;
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery;
|
||||
import cn.lihongjie.coal.base.dto.IdRequest;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.CreateDeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.DeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.UpdateDeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.service.DeviceCategoryService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/deviceCategory")
|
||||
@SysLog(module = "设备分类")
|
||||
@Slf4j
|
||||
@OrgScope
|
||||
public class DeviceCategoryController {
|
||||
@Autowired private DeviceCategoryService service;
|
||||
|
||||
@PostMapping("/create")
|
||||
public DeviceCategoryDto create(@RequestBody CreateDeviceCategoryDto request) {
|
||||
return this.service.create(request);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public DeviceCategoryDto update(@RequestBody UpdateDeviceCategoryDto request) {
|
||||
return this.service.update(request);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public Object delete(@RequestBody IdRequest request) {
|
||||
this.service.delete(request);
|
||||
return true;
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public DeviceCategoryDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
public Page<DeviceCategoryDto> list(@RequestBody CommonQuery request) {
|
||||
return this.service.list(request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package cn.lihongjie.coal.deviceCategory.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CreateDeviceCategoryDto extends OrgCommonDto {
|
||||
|
||||
private String parent;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package cn.lihongjie.coal.deviceCategory.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceCategoryDto extends OrgCommonDto {
|
||||
private String parent;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package cn.lihongjie.coal.deviceCategory.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UpdateDeviceCategoryDto extends OrgCommonDto {
|
||||
private String parent;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.lihongjie.coal.deviceCategory.entity;
|
||||
|
||||
import cn.lihongjie.coal.base.entity.OrgCommonEntity;
|
||||
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
public class DeviceCategoryEntity extends OrgCommonEntity {
|
||||
|
||||
|
||||
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
|
||||
private List<DeviceCategoryEntity> children;
|
||||
|
||||
@ManyToOne
|
||||
private DeviceCategoryEntity parent;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.lihongjie.coal.deviceCategory.mapper;
|
||||
|
||||
import cn.lihongjie.coal.base.mapper.BaseMapper;
|
||||
import cn.lihongjie.coal.base.mapper.CommonEntityMapper;
|
||||
import cn.lihongjie.coal.base.mapper.CommonMapper;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.CreateDeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.DeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.UpdateDeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.entity.DeviceCategoryEntity;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.control.DeepClone;
|
||||
|
||||
@Mapper(
|
||||
componentModel = org.mapstruct.MappingConstants.ComponentModel.SPRING,
|
||||
uses = {CommonMapper.class, CommonEntityMapper.class},
|
||||
mappingControl = DeepClone.class)
|
||||
public interface DeviceCategoryMapper
|
||||
extends BaseMapper<
|
||||
DeviceCategoryEntity,
|
||||
DeviceCategoryDto,
|
||||
CreateDeviceCategoryDto,
|
||||
UpdateDeviceCategoryDto> {}
|
||||
@@ -0,0 +1,9 @@
|
||||
package cn.lihongjie.coal.deviceCategory.repository;
|
||||
|
||||
import cn.lihongjie.coal.base.dao.BaseRepository;
|
||||
import cn.lihongjie.coal.deviceCategory.entity.DeviceCategoryEntity;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DeviceCategoryRepository extends BaseRepository<DeviceCategoryEntity> {}
|
||||
@@ -0,0 +1,71 @@
|
||||
package cn.lihongjie.coal.deviceCategory.service;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery;
|
||||
import cn.lihongjie.coal.base.dto.IdRequest;
|
||||
import cn.lihongjie.coal.base.service.BaseService;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.CreateDeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.DeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.dto.UpdateDeviceCategoryDto;
|
||||
import cn.lihongjie.coal.deviceCategory.entity.DeviceCategoryEntity;
|
||||
import cn.lihongjie.coal.deviceCategory.mapper.DeviceCategoryMapper;
|
||||
import cn.lihongjie.coal.deviceCategory.repository.DeviceCategoryRepository;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional
|
||||
public class DeviceCategoryService
|
||||
extends BaseService<DeviceCategoryEntity, DeviceCategoryRepository> {
|
||||
@Autowired private DeviceCategoryRepository repository;
|
||||
|
||||
@Autowired private DeviceCategoryMapper mapper;
|
||||
|
||||
@Autowired private ConversionService conversionService;
|
||||
|
||||
public DeviceCategoryDto create(CreateDeviceCategoryDto request) {
|
||||
DeviceCategoryEntity entity = mapper.toEntity(request);
|
||||
|
||||
this.repository.save(entity);
|
||||
return getById(entity.getId());
|
||||
}
|
||||
|
||||
public DeviceCategoryDto update(UpdateDeviceCategoryDto request) {
|
||||
DeviceCategoryEntity entity = this.repository.get(request.getId());
|
||||
this.mapper.updateEntity(entity, request);
|
||||
|
||||
this.repository.save(entity);
|
||||
|
||||
return getById(entity.getId());
|
||||
}
|
||||
|
||||
public void delete(IdRequest request) {
|
||||
this.repository.deleteAllById(request.getIds());
|
||||
}
|
||||
|
||||
public DeviceCategoryDto getById(String id) {
|
||||
DeviceCategoryEntity entity = repository.get(id);
|
||||
|
||||
return mapper.toDto(entity);
|
||||
}
|
||||
|
||||
public Page<DeviceCategoryDto> list(CommonQuery query) {
|
||||
Page<DeviceCategoryEntity> page =
|
||||
repository.findAll(
|
||||
query.specification(conversionService),
|
||||
PageRequest.of(
|
||||
query.getPageNo(),
|
||||
query.getPageSize(),
|
||||
Sort.by(query.getOrders())));
|
||||
|
||||
return page.map(this.mapper::toDto);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.controller;
|
||||
|
||||
import cn.lihongjie.coal.annotation.OrgScope;
|
||||
import cn.lihongjie.coal.annotation.SysLog;
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery;
|
||||
import cn.lihongjie.coal.base.dto.IdRequest;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.CreateDeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.DeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.UpdateDeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.service.DeviceSupplierService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/deviceSupplier")
|
||||
@SysLog(module = "设备供应商")
|
||||
@Slf4j
|
||||
@OrgScope
|
||||
public class DeviceSupplierController {
|
||||
@Autowired private DeviceSupplierService service;
|
||||
|
||||
@PostMapping("/create")
|
||||
public DeviceSupplierDto create(@RequestBody CreateDeviceSupplierDto request) {
|
||||
return this.service.create(request);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public DeviceSupplierDto update(@RequestBody UpdateDeviceSupplierDto request) {
|
||||
return this.service.update(request);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public Object delete(@RequestBody IdRequest request) {
|
||||
this.service.delete(request);
|
||||
return true;
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public DeviceSupplierDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
public Page<DeviceSupplierDto> list(@RequestBody CommonQuery request) {
|
||||
return this.service.list(request);
|
||||
}
|
||||
|
||||
@PostMapping("/archive")
|
||||
public Object archive(@RequestBody IdRequest request) {
|
||||
this.service.archive(request);
|
||||
return true;
|
||||
}
|
||||
|
||||
@PostMapping("/unarchive")
|
||||
public Object unarchive(@RequestBody IdRequest request) {
|
||||
this.service.unarchive(request);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CreateDeviceSupplierDto extends OrgCommonDto {
|
||||
private String contact;
|
||||
|
||||
private String contactPhone;
|
||||
|
||||
private String address;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceSupplierDto extends OrgCommonDto {
|
||||
private String archiveStatus;
|
||||
|
||||
private String archiveStatusName;
|
||||
|
||||
private String contact;
|
||||
|
||||
private String contactPhone;
|
||||
|
||||
private String address;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UpdateDeviceSupplierDto extends OrgCommonDto {
|
||||
private String contact;
|
||||
|
||||
private String contactPhone;
|
||||
|
||||
private String address;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.entity;
|
||||
|
||||
import cn.lihongjie.coal.base.entity.OrgCommonEntity;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
public class DeviceSupplierEntity extends OrgCommonEntity {
|
||||
@Comment("归档状态")
|
||||
@ColumnDefault("'0'")
|
||||
private String archiveStatus = "0";
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'archiveStatus'\n"
|
||||
+ " and i.code = archive_status)")
|
||||
private String archiveStatusName;
|
||||
|
||||
|
||||
|
||||
|
||||
private String contact;
|
||||
|
||||
private String contactPhone;
|
||||
|
||||
private String address;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.mapper;
|
||||
|
||||
import cn.lihongjie.coal.base.mapper.BaseMapper;
|
||||
import cn.lihongjie.coal.base.mapper.CommonEntityMapper;
|
||||
import cn.lihongjie.coal.base.mapper.CommonMapper;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.CreateDeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.DeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.UpdateDeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.entity.DeviceSupplierEntity;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.control.DeepClone;
|
||||
|
||||
@Mapper(
|
||||
componentModel = org.mapstruct.MappingConstants.ComponentModel.SPRING,
|
||||
uses = {CommonMapper.class, CommonEntityMapper.class},
|
||||
mappingControl = DeepClone.class)
|
||||
public interface DeviceSupplierMapper
|
||||
extends BaseMapper<
|
||||
DeviceSupplierEntity,
|
||||
DeviceSupplierDto,
|
||||
CreateDeviceSupplierDto,
|
||||
UpdateDeviceSupplierDto> {}
|
||||
@@ -0,0 +1,9 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.repository;
|
||||
|
||||
import cn.lihongjie.coal.base.dao.BaseRepository;
|
||||
import cn.lihongjie.coal.deviceSupplier.entity.DeviceSupplierEntity;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DeviceSupplierRepository extends BaseRepository<DeviceSupplierEntity> {}
|
||||
@@ -0,0 +1,118 @@
|
||||
package cn.lihongjie.coal.deviceSupplier.service;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery;
|
||||
import cn.lihongjie.coal.base.dto.IdRequest;
|
||||
import cn.lihongjie.coal.base.service.BaseService;
|
||||
import cn.lihongjie.coal.common.ArchiveUtils;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.CreateDeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.DeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.dto.UpdateDeviceSupplierDto;
|
||||
import cn.lihongjie.coal.deviceSupplier.entity.DeviceSupplierEntity;
|
||||
import cn.lihongjie.coal.deviceSupplier.mapper.DeviceSupplierMapper;
|
||||
import cn.lihongjie.coal.deviceSupplier.repository.DeviceSupplierRepository;
|
||||
import cn.lihongjie.coal.exception.BizException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional
|
||||
public class DeviceSupplierService
|
||||
extends BaseService<DeviceSupplierEntity, DeviceSupplierRepository> {
|
||||
@Autowired private DeviceSupplierRepository repository;
|
||||
|
||||
@Autowired private DeviceSupplierMapper mapper;
|
||||
|
||||
@Autowired private ConversionService conversionService;
|
||||
|
||||
public DeviceSupplierDto create(CreateDeviceSupplierDto request) {
|
||||
DeviceSupplierEntity entity = mapper.toEntity(request);
|
||||
|
||||
this.repository.save(entity);
|
||||
return getById(entity.getId());
|
||||
}
|
||||
|
||||
public DeviceSupplierDto update(UpdateDeviceSupplierDto request) {
|
||||
DeviceSupplierEntity entity = this.repository.get(request.getId());
|
||||
ArchiveUtils.checkArchiveStatus(
|
||||
entity,
|
||||
DeviceSupplierEntity::getArchiveStatus,
|
||||
x -> "0",
|
||||
(e, actual, expected) -> {
|
||||
throw new BizException("数据 " + "已归档,无法编辑");
|
||||
});
|
||||
this.mapper.updateEntity(entity, request);
|
||||
|
||||
this.repository.save(entity);
|
||||
|
||||
return getById(entity.getId());
|
||||
}
|
||||
|
||||
public void delete(IdRequest request) {
|
||||
ArchiveUtils.checkArchiveStatus(
|
||||
this.repository::findAllById,
|
||||
request.getIds(),
|
||||
DeviceSupplierEntity::getArchiveStatus,
|
||||
x -> "0",
|
||||
(e, actual, expected) -> {
|
||||
throw new BizException("数据 " + "已归档,无法删除");
|
||||
});
|
||||
this.repository.deleteAllById(request.getIds());
|
||||
}
|
||||
|
||||
public DeviceSupplierDto getById(String id) {
|
||||
DeviceSupplierEntity entity = repository.get(id);
|
||||
|
||||
return mapper.toDto(entity);
|
||||
}
|
||||
|
||||
public Page<DeviceSupplierDto> list(CommonQuery query) {
|
||||
Page<DeviceSupplierEntity> page =
|
||||
repository.findAll(
|
||||
query.specification(conversionService),
|
||||
PageRequest.of(
|
||||
query.getPageNo(),
|
||||
query.getPageSize(),
|
||||
Sort.by(query.getOrders())));
|
||||
|
||||
return page.map(this.mapper::toDto);
|
||||
}
|
||||
|
||||
public void archive(IdRequest dto) {
|
||||
this.repository.findAllById(dto.getIds()).stream()
|
||||
.peek(
|
||||
x ->
|
||||
ArchiveUtils.checkArchiveStatus(
|
||||
x,
|
||||
DeviceSupplierEntity::getArchiveStatus,
|
||||
y -> "0",
|
||||
(e, actual, expected) -> {
|
||||
throw new BizException("数据 " + "已归档,无法再次归档");
|
||||
}))
|
||||
.peek(x -> x.setArchiveStatus("1"))
|
||||
.forEach(this.repository::save);
|
||||
}
|
||||
|
||||
public void unarchive(IdRequest dto) {
|
||||
this.repository.findAllById(dto.getIds()).stream()
|
||||
.peek(
|
||||
x ->
|
||||
ArchiveUtils.checkArchiveStatus(
|
||||
x,
|
||||
DeviceSupplierEntity::getArchiveStatus,
|
||||
y -> "1",
|
||||
(e, actual, expected) -> {
|
||||
throw new BizException("数据" + "未归档,无法取消归档");
|
||||
}))
|
||||
.peek(x -> x.setArchiveStatus("0"))
|
||||
.forEach(this.repository::save);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
package scripts.dict
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery
|
||||
import cn.lihongjie.coal.deviceCategory.controller.DeviceCategoryController
|
||||
import org.springframework.context.ApplicationContext
|
||||
|
||||
ApplicationContext ioc = ioc
|
||||
|
||||
def controller = ioc.getBean(DeviceCategoryController.class)
|
||||
|
||||
|
||||
|
||||
|
||||
return controller.list(new CommonQuery())
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
package scripts.dict
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery
|
||||
import cn.lihongjie.coal.deviceCategroy.controller.DeviceCategroyController
|
||||
import org.springframework.context.ApplicationContext
|
||||
|
||||
ApplicationContext ioc = ioc
|
||||
|
||||
def controller = ioc.getBean(DeviceCategroyController.class)
|
||||
|
||||
|
||||
|
||||
|
||||
return controller.list(new CommonQuery())
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
package scripts.dict
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery
|
||||
import cn.lihongjie.coal.deviceSupplier.controller.DeviceSupplierController
|
||||
import org.springframework.context.ApplicationContext
|
||||
|
||||
ApplicationContext ioc = ioc
|
||||
|
||||
def controller = ioc.getBean(DeviceSupplierController.class)
|
||||
|
||||
|
||||
|
||||
|
||||
return controller.list(new CommonQuery())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user