新火炬后端单体项目初始化代码
zhangherong
昨天 2cf76b152d6dd556bade813ea843899e7d4ba42e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package org.jeecg.modules.base.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.base.entity.LineSideWarehouse;
import org.jeecg.modules.base.mapper.LineSideWarehouseMapper;
import org.jeecg.modules.base.service.ILineSideWarehouseService;
import org.springframework.stereotype.Service;
 
/**
 * @Description: 线边仓库信息
 * @Author: jeecg-boot
 * @Date:   2025-06-24
 * @Version: V1.0
 */
@Service
public class LineSideWarehouseServiceImpl extends ServiceImpl<LineSideWarehouseMapper, LineSideWarehouse> implements ILineSideWarehouseService {
 
    @Override
    public LineSideWarehouse queryByFactoryId(String factoryId) {
        LambdaQueryWrapper<LineSideWarehouse> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(LineSideWarehouse::getFactoryId, factoryId);
        LineSideWarehouse entity = this.getBaseMapper().selectOne(wrapper);
        if(entity != null) {
            entity.setWarehouseName(entity.getWarehouseName() + "(" + entity.getWarehouseCode() + ")");
        }
        return entity;
    }
}