| | |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.modules.dnc.entity.DevicePermission; |
| | | import org.jeecg.modules.dnc.mapper.DevicePermissionMapper; |
| | | import org.jeecg.modules.dnc.service.IDevicePermissionService; |
| | | import org.jeecg.modules.dnc.ucenter.UserDepartExt; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | |
| | | import org.jeecg.modules.mdc.util.FindsEquipmentProductionUtil; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.dnc.service.IDevicePermissionService; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.jeecg.modules.system.service.IMdcUserProductionService; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private IMdcUserProductionService mdcUserProductionService; |
| | | @Resource |
| | | private MdcEquipmentMapper mdcEquipmentMapper; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public DevicePermission getByUserIdAndDeviceId(String userId, String deviceId) { |
| | |
| | | List<MdcEquipment> equipmentList = mdcEquipmentMapper.queryByProductionIdAndType(mdcEquipmentTree.getKey(),deviceIds); |
| | | if (equipmentList != null && !equipmentList.isEmpty()) { |
| | | for (MdcEquipment mdcEquipment : equipmentList) { |
| | | if (mdcEquipment.getCreateBy()!=null&& !mdcEquipment.getCreateBy().isEmpty()){ |
| | | mdcEquipment.setCreateBy(sysUserService.getUserByName(mdcEquipment.getCreateBy()).getRealname()); |
| | | } |
| | | if (mdcEquipment.getUpdateBy()!=null&& !mdcEquipment.getUpdateBy().isEmpty()){ |
| | | mdcEquipment.setUpdateBy(sysUserService.getUserByName(mdcEquipment.getUpdateBy()).getRealname()); |
| | | } |
| | | MdcEquipmentTree tree = new MdcEquipmentTree().convert(mdcEquipment); |
| | | tree.setParentId(mdcEquipmentTree.getKey()); |
| | | tree.setEntity(mdcEquipment); |