|
|
|
@ -30,6 +30,8 @@ import org.jeecg.modules.device.entity.ZyDevice; |
|
|
|
|
import org.jeecg.modules.zydevice.devicemodel.entity.ZyDevicemodel; |
|
|
|
|
import org.jeecg.modules.zytool.toolmodel.entity.ZyToolModel; |
|
|
|
|
|
|
|
|
|
import org.jeecg.modules.zytool.tooltype.entity.ZyToolType; |
|
|
|
|
import org.jeecg.modules.zytool.tooltype.service.IZyToolTypeService; |
|
|
|
|
import org.jeecg.modules.zytool.zytool.entity.ZyTool; |
|
|
|
|
import org.jeecg.modules.zytool.zytool.service.IZyToolService; |
|
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
@ -61,7 +63,9 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { |
|
|
|
|
@Autowired |
|
|
|
|
private IZyToolService zyToolService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IZyToolTypeService zyToolTypeService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
@ -133,16 +137,17 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { |
|
|
|
|
@AutoLog(value = "设备信息-分页列表查询") |
|
|
|
|
@ApiOperation(value="设备信息-分页列表查询", notes="设备信息-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list1") |
|
|
|
|
public Result<?> queryPageList1(ZyTool zyTool, |
|
|
|
|
public Result<?> queryPageList1(ZyToolType zyToolType, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) throws WriterException, IOException { |
|
|
|
|
QueryWrapper<ZyTool> queryWrapper = QueryGenerator.initQueryWrapper(zyTool, req.getParameterMap()); |
|
|
|
|
Page<ZyTool> page = new Page<ZyTool>(pageNo, pageSize); |
|
|
|
|
IPage<ZyTool> pageList = zyToolService.page(page, queryWrapper); |
|
|
|
|
QueryWrapper<ZyToolType> queryWrapper = QueryGenerator.initQueryWrapper(zyToolType, req.getParameterMap()); |
|
|
|
|
queryWrapper.orderByDesc("code"); |
|
|
|
|
Page<ZyToolType> page = new Page<ZyToolType>(pageNo, pageSize); |
|
|
|
|
IPage<ZyToolType> pageList = zyToolTypeService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
@ -180,7 +185,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { |
|
|
|
|
return Result.error("添加失败,设备名称重复!!!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
* |
|
|
|
@ -201,7 +206,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { |
|
|
|
|
return Result.error("编辑失败,设备名称重复!!!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
@ -219,7 +224,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { |
|
|
|
|
zyToolService.removeById(id); |
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除 |
|
|
|
|
* |
|
|
|
@ -233,7 +238,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { |
|
|
|
|
this.zyToolService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
|