WwucErpService.java
1.52 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
package com.huaheng.pc.receipt.receiving.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.framework.aspectj.lang.annotation.Ds;
import com.huaheng.framework.aspectj.lang.constant.DataSourceName;
import com.huaheng.pc.config.address.domain.Address;
import com.huaheng.pc.receipt.receiving.domain.ProductAErp;
import com.huaheng.pc.receipt.receiving.domain.WwucErp;
import com.huaheng.pc.receipt.receiving.mapper.ProductAErpMapper;
import com.huaheng.pc.receipt.receiving.mapper.WwucErpMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.List;
@Service
public class WwucErpService extends ServiceImpl<WwucErpMapper, WwucErp>{
/**
* 查找erp数据库的客户数据
* @return
*/
@Ds(name= DataSourceName.SLAVE)
@Transactional(propagation = Propagation.REQUIRES_NEW)
public List<WwucErp> findProductAData(String workCode,String erpcompanyCode,Address address){
QueryWrapper<WwucErp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("pmdlsite", erpcompanyCode);
queryWrapper.eq("pmdp003", workCode);
// queryWrapper.eq("企业编号", address.getUserDef2());
// queryWrapper.eq("企业编号","98");
List<WwucErp> lists = this.list(queryWrapper);
return lists;
}
}