车间能级提升-智能设备管理系统
朱桂飞
2025-02-14 fc76b6c4a7ccd2d875b0fb998a868fe4bea188f7
eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsEquServiceImpl.java
@@ -46,8 +46,15 @@
     * @return 【设备台账】
     */
    @Override
    public EimsEquVo queryById(Long equId){
    public EimsEquVo queryById(Long equId) {
        return baseMapper.selectVoById(equId);
    }
    @Override
    public EimsEquVo queryByAssetNo(String assetNo) {
        LambdaQueryWrapper<EimsEqu> lqw = new LambdaQueryWrapper<>();
        lqw.eq(EimsEqu::getAssetNo, assetNo);
        return baseMapper.selectVoOne(lqw);
    }
    /**
@@ -87,7 +94,7 @@
         */
        if (equTypeId != null && equTypeId > 0) {
            List<Long> allDescendantIds = getAllDescendantIds(equTypeId);
            lqw.in(EimsEqu::getEquTypeId,allDescendantIds);
            lqw.in(EimsEqu::getEquTypeId, allDescendantIds);
        }
        lqw.like(StringUtils.isNotBlank(bo.getEquName()), EimsEqu::getEquName, bo.getEquName());
@@ -117,6 +124,7 @@
    /**
     * 根据id,获取所有后代id
     *
     * @param rootId
     * @return
     */
@@ -140,6 +148,7 @@
            }
        }
    }
    /**
     * 新增【设备台账】
     *
@@ -173,7 +182,7 @@
    /**
     * 保存前的数据校验
     */
    private void validEntityBeforeSave(EimsEqu entity){
    private void validEntityBeforeSave(EimsEqu entity) {
        //TODO 做一些数据校验,如唯一约束
    }
@@ -186,7 +195,7 @@
     */
    @Override
    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
        if(isValid){
        if (isValid) {
            //TODO 做一些业务上的校验,判断是否需要校验
        }
        return baseMapper.deleteByIds(ids) > 0;