| | |
| | | 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; |
| | |
| | | Page<MdcEquipment> page = new Page<MdcEquipment>(pageNo, pageSize); |
| | | IPage<MdcEquipment> pageList = mdcEquipmentService.findEquipmentList(page, userId, mdcEquipment); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户查询设备列表信息 |
| | | */ |
| | | @AutoLog(value = "设备表-根据用户查询设备列表信息") |
| | | @ApiOperation(value = "设备表-根据用户查询设备列表信息", notes = "设备表-根据用户查询设备列表信息") |
| | | @GetMapping(value = "/getEquipmentList") |
| | | public Result<List<MdcEquipment>> getEquipmentList() { |
| | | List<MdcEquipment> list = mdcEquipmentService.getEquipmentList(); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | @AutoLog(value = "设备表-加载产线设备树") |
| | | @ApiOperation(value = "设备表-加载产线设备树", notes = "设备表-加载产线设备树") |
| | | @GetMapping(value = "/queryTreeListByProduction") |
| | | public Result<List<MdcEquipmentTree>> queryTreeListByProduction(String type) { |
| | | public Result<List<MdcEquipmentTree>> queryTreeListByProduction() { |
| | | Result<List<MdcEquipmentTree>> result = new Result<>(); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | try { |
| | | List<MdcEquipmentTree> mdcEquipmentTreeList = mdcEquipmentService.loadTreeListByProduction(userId,type); |
| | | List<MdcEquipmentTree> mdcEquipmentTreeList = mdcEquipmentService.loadTreeListByProduction(userId); |
| | | result.setSuccess(true); |
| | | result.setResult(mdcEquipmentTreeList); |
| | | } catch (Exception e) { |
| | |
| | | @AutoLog(value = "设备表-通过车间ids获取设备树") |
| | | @ApiOperation(value = "设备表-通过车间ids获取设备树", notes = "设备表-通过车间ids获取设备树") |
| | | @GetMapping(value = "/loadTreeListByProductionIds") |
| | | public Result<?> loadTreeListByProductionIds(@RequestParam(name = "ids", required = true) String ids,@RequestParam(name = "type", required = true)String type) { |
| | | public Result<?> loadTreeListByProductionIds(@RequestParam(name = "ids", required = true) String ids) { |
| | | Result<List<MdcEquipmentTree>> result = new Result<>(); |
| | | try { |
| | | List<MdcEquipmentTree> mdcEquipmentTreeList = mdcEquipmentService.loadTreeListByProductionIds(ids,type); |
| | | List<MdcEquipmentTree> mdcEquipmentTreeList = mdcEquipmentService.loadTreeListByProductionIds(ids); |
| | | result.setSuccess(true); |
| | | result.setResult(mdcEquipmentTreeList); |
| | | } catch (Exception e) { |