|
|
@ -52,6 +52,7 @@ import org.springframework.stereotype.Service; |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
public class PmsPurchaseBillInvoiceService extends MybatisBaseService<PmsPurchaseBillInvoiceMapper, PmsPurchaseBillInvoice> { |
|
|
|
|
|
|
|
private QueryWrapper<PmsPurchaseBillInvoice> createQueryWrapper(PmsPurchaseBillInvoiceQuery query) { |
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
@ -69,12 +70,7 @@ public class PmsPurchaseBillInvoiceService extends MybatisBaseService<PmsPurchas |
|
|
|
} |
|
|
|
|
|
|
|
public void saveOrUpdateDto(PmsPurchaseBillInvoiceDto dto){ |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
this.insertByDto(dto); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.updateByDto(dto); |
|
|
|
} |
|
|
|
|
|
|
|
public void insertByDto(PmsPurchaseBillInvoiceDto dto){ |
|
|
@ -83,16 +79,6 @@ public class PmsPurchaseBillInvoiceService extends MybatisBaseService<PmsPurchas |
|
|
|
baseMapper.insert(entity); |
|
|
|
} |
|
|
|
|
|
|
|
public void updateByDto(PmsPurchaseBillInvoiceDto dto){ |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
PmsPurchaseBillInvoice entity = fetchBySid(dtoSid); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
public PmsPurchaseBillInvoiceDetailsVo fetchDetailsVoBySid(String sid){ |
|
|
|
PmsPurchaseBillInvoice entity = fetchBySid(sid); |
|
|
|
PmsPurchaseBillInvoiceDetailsVo vo = new PmsPurchaseBillInvoiceDetailsVo(); |
|
|
|