| | |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.mdc.constant.MdcConstant; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.mdc.service.IMdcHomeService; |
| | |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | @ApiOperation(value = "MDC首页接口-设备级设备列表", notes = "MDC首页接口-设备级设备列表") |
| | | @GetMapping("/equipmentList") |
| | | public Result<?> equipmentList(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | String key = ""; |
| | | if (StringUtils.isNotBlank(productionCode)) { |
| | | //厂区 |
| | | MdcProduction mdcProduction = mdcProductionService.getOne(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getProductionCode, productionCode).eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0.toString())); |
| | | key = mdcProduction.getId(); |
| | | } else { |
| | | //工段 查询用户拥有的工段权限 |
| | | key = mdcProductionService.findThreeProductionId(userId); |
| | | } |
| | | List<MdcEquipment> result = mdcHomeService.getEquipmentList(key); |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo; |
| | | import org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | |
| | | */ |
| | | List<MdcEquipmentStatisticalInfo> getEquipmentSevenUtilizationStatistics(@Param("equipmentIdList") List<String> equipmentIdList, @Param("start") String start, @Param("end") String end); |
| | | |
| | | List<MdcEquipment> getEquipmentList(@Param("productionId") String productionId); |
| | | } |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getEquipmentList" resultType="org.jeecg.modules.mdc.entity.MdcEquipment"> |
| | | SELECT |
| | | t1.* |
| | | FROM |
| | | mdc_equipment t1 |
| | | LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id |
| | | WHERE |
| | | t2.production_id = #{productionId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | package org.jeecg.modules.mdc.service; |
| | | |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency; |
| | | import org.jeecg.modules.mdc.vo.MdcCommonVo; |
| | | import org.jeecg.modules.mdc.vo.MdcHomeEfficiencyVo; |
| | |
| | | */ |
| | | Map<String, Object> getEquipmentAnnualEfficiencyStatistics(String equipmentId); |
| | | |
| | | /** |
| | | * 根据车间id获取设备列表 |
| | | */ |
| | | List<MdcEquipment> getEquipmentList(String key); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import org.jeecg.modules.mdc.entity.EquipmentLog; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo; |
| | | import org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency; |
| | | import org.jeecg.modules.mdc.mapper.MdcHomeMapper; |
| | |
| | | result.put("dataList", dataList); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 设备级设备列表 |
| | | */ |
| | | @Override |
| | | public List<MdcEquipment> getEquipmentList(String key) { |
| | | return mdcHomeMapper.getEquipmentList(key); |
| | | } |
| | | } |