| | |
| | | import cn.iocoder.yudao.module.mes.dal.dataobject.dv.machinery.MesDvMachineryDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * MES 设备台账 Mapper |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Mapper |
| | | public interface MesDvMachineryMapper extends BaseMapperX<MesDvMachineryDO> { |
| | |
| | | .eqIfPresent(MesDvMachineryDO::getMachineryTypeId, reqVO.getMachineryTypeId()) |
| | | .inIfPresent(MesDvMachineryDO::getMachineryTypeId, reqVO.getMachineryTypeIds()) |
| | | .eqIfPresent(MesDvMachineryDO::getWorkshopId, reqVO.getWorkshopId()) |
| | | .eqIfPresent(MesDvMachineryDO::getWorkstationId, reqVO.getWorkstationId()) |
| | | .eqIfPresent(MesDvMachineryDO::getCollectDeviceCode, reqVO.getCollectDeviceCode()) |
| | | .eqIfPresent(MesDvMachineryDO::getCollectEnabled, reqVO.getCollectEnabled()) |
| | | .eqIfPresent(MesDvMachineryDO::getStatus, reqVO.getStatus()) |
| | | .orderByDesc(MesDvMachineryDO::getId)); |
| | | } |
| | |
| | | return selectOne(MesDvMachineryDO::getCode, code); |
| | | } |
| | | |
| | | default MesDvMachineryDO selectByCollectDeviceCode(String collectDeviceCode) { |
| | | return selectOne(MesDvMachineryDO::getCollectDeviceCode, collectDeviceCode); |
| | | } |
| | | |
| | | default List<MesDvMachineryDO> selectListWithCollectDeviceCode() { |
| | | return selectList(new LambdaQueryWrapperX<MesDvMachineryDO>() |
| | | .isNotNull(MesDvMachineryDO::getCollectDeviceCode) |
| | | .orderByAsc(MesDvMachineryDO::getId)); |
| | | } |
| | | |
| | | default Long selectCountByMachineryTypeId(Long machineryTypeId) { |
| | | return selectCount(MesDvMachineryDO::getMachineryTypeId, machineryTypeId); |
| | | } |