Lius
2024-10-24 a7a4e0e6ae09c720e50dc22fc50c67519414067c
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
30
31
32
33
34
35
36
37
38
package org.jeecg.modules.mdc.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.mdc.entity.MdcComponentInfo;
import org.jeecg.modules.mdc.mapper.MdcComponentInfoMapper;
import org.jeecg.modules.mdc.service.IMdcComponentInfoService;
import org.slf4j.MDC;
import org.springframework.stereotype.Service;
 
import javax.servlet.http.HttpServletRequest;
import java.util.List;
 
/**
 * @Description: 零件表
 * @Author: lius
 * @Date: 2024-10-21
 * @Version: V1.0
 */
@Service
public class MdcComponentInfoServiceImpl extends ServiceImpl<MdcComponentInfoMapper, MdcComponentInfo> implements IMdcComponentInfoService {
 
    @Override
    public IPage<MdcComponentInfo> pageList(Page<MdcComponentInfo> page, MdcComponentInfo mdcComponentInfo, HttpServletRequest req) {
        return this.baseMapper.pageList(page, mdcComponentInfo);
    }
 
    @Override
    public MdcComponentInfo findByComponentNo(String equipmentId, String productNo) {
        List<MdcComponentInfo> mdcComponentInfoList = this.baseMapper.findByComponentNo(equipmentId, productNo);
        if (mdcComponentInfoList != null && !mdcComponentInfoList.isEmpty()) {
            return mdcComponentInfoList.get(0);
        } else {
            return null;
        }
    }
}