ICSASNDetailService.java
1.79 KB
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
39
40
41
42
43
44
45
46
47
48
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);
}
}