SrmDetailHistoryService.java 3.4 KB
package com.huaheng.pc.srm.service;


import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;

import javax.annotation.Resource;

import com.huaheng.pc.srm.mapper.SrmDetailHistoryMapper;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.common.constant.QuantityConstant;
import com.huaheng.common.exception.service.ServiceException;
import com.huaheng.common.utils.DateUtils;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.Wrappers;
import com.huaheng.common.utils.http.HttpUtils;
import com.huaheng.common.utils.http.OkHttpUtils;
import com.huaheng.common.utils.security.ShiroUtils;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.config.address.domain.Address;
import com.huaheng.pc.config.address.service.AddressService;
import com.huaheng.pc.config.company.domain.Company;
import com.huaheng.pc.config.company.service.CompanyService;
import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService;
import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
import com.huaheng.pc.srm.domain.*;
import com.huaheng.pc.srm.mapper.SrmDetailMapper;
import com.huaheng.pc.system.config.service.IConfigService;
import com.huaheng.pc.system.user.domain.User;
import com.huaheng.pc.system.user.service.IUserService;
import com.huaheng.pc.u8.domain.ICSReceiptDetail;
import com.huaheng.pc.u8.domain.ICSReceiptHeader;
import com.huaheng.pc.u8.service.ICSReceiptDetailService;
import com.huaheng.pc.u8.service.ICSReceiptHeaderService;

@Service
public class SrmDetailHistoryService extends ServiceImpl<SrmDetailHistoryMapper, SrmDetailHistory> {

    public List<SrmDetailHistory> selectList(SrmDetailHistory srmDetail) {
        LambdaQueryWrapper<SrmDetailHistory> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(StringUtils.isNotNull(srmDetail.getHeaderId()), SrmDetailHistory::getHeaderId, srmDetail.getHeaderId());
        queryWrapper.eq(StringUtils.isNotEmpty(srmDetail.getWarehouseCode()), SrmDetailHistory::getWarehouseCode, srmDetail.getWarehouseCode());
        queryWrapper.eq(StringUtils.isNotEmpty(srmDetail.getCode()), SrmDetailHistory::getCode, srmDetail.getCode());
        queryWrapper.eq(StringUtils.isNotNull(srmDetail.getEnable()), SrmDetailHistory::getEnable, srmDetail.getEnable());
        queryWrapper.eq(StringUtils.isNotNull(srmDetail.getCheckCode()), SrmDetailHistory::getCheckCode, srmDetail.getCheckCode());
        queryWrapper.eq(StringUtils.isNotNull(srmDetail.getUploadStatus1()), SrmDetailHistory::getUploadStatus1, srmDetail.getUploadStatus1());
        queryWrapper.eq(StringUtils.isNotNull(srmDetail.getUploadStatus2()), SrmDetailHistory::getUploadStatus2, srmDetail.getUploadStatus2());
        queryWrapper.eq(StringUtils.isNotNull(srmDetail.getUploadStatus4()), SrmDetailHistory::getUploadStatus4, srmDetail.getUploadStatus4());

        return this.list(queryWrapper);
    }

}