ICSASNDetailService.java 1.79 KB
package com.huaheng.pc.srm.service;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.Wrappers;
import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
import com.huaheng.pc.srm.domain.ICSASNDetail;
import com.huaheng.pc.srm.domain.SrmHeader;
import com.huaheng.pc.srm.mapper.ICSASNDetailMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ICSASNDetailService extends ServiceImpl<ICSASNDetailMapper, ICSASNDetail> {

    @Resource
    private ICSASNDetailService icsasnDetailService;


    public List<ICSASNDetail> selectListEntity(ICSASNDetail icsasnDetail) {
        LambdaQueryWrapper<ICSASNDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(StringUtils.isNotEmpty(icsasnDetail.getMaterialCode()),ICSASNDetail::getMaterialCode, icsasnDetail.getMaterialCode());
        lambdaQueryWrapper.eq(StringUtils.isNotEmpty(icsasnDetail.getSTNO()),ICSASNDetail::getSTNO, icsasnDetail.getSTNO());
        return this.list(lambdaQueryWrapper);
    }
    public List<ICSASNDetail> selectBySTNO(List<String> STNOS) {
        if(STNOS!=null&&STNOS.size()>0){
            String[] split=STNOS.toArray(new String[0]);
            LambdaQueryWrapper<ICSASNDetail> queryWrapper = Wrappers.lambdaQuery();
            queryWrapper.in(ICSASNDetail::getSTNO,split);
            return this.list(queryWrapper);
        }
        return null;
    }
    public boolean insert(ICSASNDetail icsasnDetail) {
        return this.save(icsasnDetail);
    }

    public boolean update(ICSASNDetail icsasnDetail) {
        return this.update(icsasnDetail);
    }


}