|
|
|
@ -15,7 +15,9 @@ import org.jeecg.common.system.base.controller.JeecgController; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.modules.demo.tool.entity.ZyTool; |
|
|
|
|
import org.jeecg.modules.demo.tool.service.IZyToolService; |
|
|
|
|
import org.jeecg.modules.device.entity.ZyDevice; |
|
|
|
|
import org.jeecg.modules.device.service.IZyDeviceService; |
|
|
|
|
import org.jeecg.modules.team.entity.StationMachine; |
|
|
|
|
import org.jeecg.modules.team.entity.StationTool; |
|
|
|
|
import org.jeecg.modules.team.service.IStationToolService; |
|
|
|
|
import org.jeecg.modules.team.vo.StationToolVo; |
|
|
|
@ -69,6 +71,13 @@ public class StationToolController extends JeecgController<StationTool, IStation |
|
|
|
|
QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); |
|
|
|
|
Page<StationTool> page = new Page<StationTool>(pageNo, pageSize); |
|
|
|
|
IPage<StationTool> pageList = stationToolService.page(page, queryWrapper); |
|
|
|
|
List<StationTool> records = pageList.getRecords(); |
|
|
|
|
if (!ObjectUtils.isEmpty(records)) { |
|
|
|
|
records.forEach(e -> { |
|
|
|
|
ZyTool zyTool = iZyToolService.getById(e.getToolsId()); |
|
|
|
|
e.setNums(StringUtils.isNotBlank(zyTool.getNums()) ? zyTool.getNums() : ""); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -77,14 +86,14 @@ public class StationToolController extends JeecgController<StationTool, IStation |
|
|
|
|
public Result<?> list2(StationTool stationTool, |
|
|
|
|
// @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
|
|
// @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
// QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
|
|
|
|
|
// Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
|
|
|
|
|
// IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
|
|
|
|
|
List<StationToolVo> voList = new LinkedList<>(); |
|
|
|
|
List<StationTool> toolList = stationToolService.list(new LambdaQueryWrapper<StationTool>().eq(StationTool::getStationId, stationTool.getStationId())); |
|
|
|
|
if(!ObjectUtils.isEmpty(toolList)){ |
|
|
|
|
toolList.forEach(en->{ |
|
|
|
|
if (!ObjectUtils.isEmpty(toolList)) { |
|
|
|
|
toolList.forEach(en -> { |
|
|
|
|
StationToolVo stationVo = new StationToolVo(); |
|
|
|
|
stationVo.setId(en.getToolsId()); |
|
|
|
|
stationVo.setValue(en.getToolsId()); |
|
|
|
|