| | |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.mdc.dto.MdcEquipmentDto; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentMonitor; |
| | | import org.jeecg.modules.mdc.model.MdcEquipmentTree; |
| | |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | //QueryWrapper<MdcEquipment> queryWrapper = QueryGenerator.initQueryWrapper(mdcEquipment, req.getParameterMap()); |
| | | Page<MdcEquipment> page = new Page<MdcEquipment>(pageNo, pageSize); |
| | | IPage<MdcEquipment> pageList = mdcEquipmentService.pageList(page, mdcEquipment, req); |
| | | |
| | |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | @AutoLog(value = "设备表-设备详细信息") |
| | | @ApiOperation(value = "设备表-设备详细信息", notes = "设备表-设备详细信息") |
| | | @AutoLog(value = "设备表-设备实时详细信息") |
| | | @ApiOperation(value = "设备表-设备实时详细信息", notes = "设备表-设备实时详细信息") |
| | | @GetMapping(value = "/mdcEquipmentDetailedInfo") |
| | | public Result<MdcEquipmentDto> mdcEquipmentDetailedInfo(@RequestParam(name = "id", required = true) String id) { |
| | | MdcEquipmentDto mdcEquipmentDto = mdcEquipmentService.mdcEquipmentDetailedInfo(id); |
| | | return Result.OK(mdcEquipmentDto); |
| | | public Result<?> mdcEquipmentDetailedInfo(@RequestParam(name = "id", required = true) String id) { |
| | | Map<String, Object> result = mdcEquipmentService.mdcEquipmentDetailedInfo(id); |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | /** |
| | |
| | | Result<MdcEquipment> result = new Result<>(); |
| | | String selectedDeparts = mdcEquipment.getSelectedDeparts(); |
| | | String selectedProduction = mdcEquipment.getSelectedProduction(); |
| | | mdcEquipment.setEquipmentStatus(CommonConstant.STATUS_NORMAL); |
| | | // mdcEquipment.setEquipmentStatus(CommonConstant.STATUS_NORMAL); |
| | | try { |
| | | mdcEquipmentService.saveMdcEquipment(mdcEquipment, selectedDeparts, selectedProduction); |
| | | result.success("添加成功!"); |
| | |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, MdcEquipmentVo mdcEquipment) { |
| | | // Step.1 组装查询条件 |
| | | //QueryWrapper<MdcEquipment> queryWrapper = QueryGenerator.initQueryWrapper(mdcEquipment, request.getParameterMap()); |
| | | //Step.2 AutoPoi 导出Excel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | List<MdcEquipment> pageList = mdcEquipmentService.exportXlsList(mdcEquipment); |
| | |
| | | mv.addObject(NormalExcelConstants.CLASS, MdcEquipment.class); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | ExportParams exportParams = new ExportParams("设备列表数据", "导出人:" + user.getRealname(), "导出信息"); |
| | | // exportParams.setImageBasePath(upLoadPath); |
| | | mv.addObject(NormalExcelConstants.PARAMS, exportParams); |
| | | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
| | | return mv; |