Browse Source

客户新下拉接口 样品单添加汇率字段

yzc 1 year ago
parent
commit
c83b86542f

+ 9 - 1
hx-customer/src/main/java/com/fjhx/customer/controller/customer/CustomerController.java

@@ -36,6 +36,14 @@ public class CustomerController {
     /**
     /**
      * 客户表分页
      * 客户表分页
      */
      */
+    @PostMapping("/selPage")
+    public Page<CustomerVo> selPage(@RequestBody CustomerSelectDto dto) {
+        return customerService.selPage(dto);
+    }
+
+    /**
+     * 客户表分页
+     */
     @PostMapping("/page")
     @PostMapping("/page")
     public Page<CustomerVo> page(@RequestBody CustomerSelectDto dto) {
     public Page<CustomerVo> page(@RequestBody CustomerSelectDto dto) {
         return customerService.getPage(dto);
         return customerService.getPage(dto);
@@ -103,7 +111,7 @@ public class CustomerController {
      * 客户来源统计
      * 客户来源统计
      */
      */
     @PostMapping("/sourceStatistics")
     @PostMapping("/sourceStatistics")
-    public Map<String,Object> sourceStatistics(@RequestBody  CustomerSelectDto  customerDto){
+    public Map<String, Object> sourceStatistics(@RequestBody CustomerSelectDto customerDto) {
         return customerService.sourceStatistics(customerDto);
         return customerService.sourceStatistics(customerDto);
     }
     }
 
 

+ 2 - 0
hx-customer/src/main/java/com/fjhx/customer/service/customer/CustomerService.java

@@ -22,6 +22,8 @@ import java.util.Map;
 public interface CustomerService extends BaseService<Customer> {
 public interface CustomerService extends BaseService<Customer> {
 
 
 
 
+    Page<CustomerVo> selPage(CustomerSelectDto dto);
+
     /**
     /**
      * 客户表分页
      * 客户表分页
      */
      */

+ 16 - 3
hx-customer/src/main/java/com/fjhx/customer/service/customer/impl/CustomerServiceImpl.java

@@ -70,6 +70,19 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
 
 
 
 
     /**
     /**
+     * 客户下拉分页
+     */
+    @Override
+    public Page<CustomerVo> selPage(CustomerSelectDto dto) {
+        IWrapper<CustomerVo> wrapper = IWrapper.getWrapper();
+        wrapper.like(Customer::getName, dto.getKeyword());
+        wrapper.eq("c", Customer::getUserId, dto.getUserId());
+        Page<CustomerVo> page = baseMapper.getPage(dto.getPage(), wrapper);
+        CustomizeAreaUtil.setAreaName(page.getRecords());
+        return page;
+    }
+
+    /**
      * 查询客户的列表
      * 查询客户的列表
      *
      *
      * @param dto
      * @param dto
@@ -279,12 +292,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
      * 客户来源统计
      * 客户来源统计
      */
      */
     @Override
     @Override
-    public Map<String,Object> sourceStatistics(CustomerSelectDto customerDto) {
-        if (ObjectUtil.isEmpty(customerDto) && ObjectUtil.isEmpty(customerDto.getStatisticsType())){
+    public Map<String, Object> sourceStatistics(CustomerSelectDto customerDto) {
+        if (ObjectUtil.isEmpty(customerDto) && ObjectUtil.isEmpty(customerDto.getStatisticsType())) {
             throw new ServiceException("参数异常:统计类型不能为null");
             throw new ServiceException("参数异常:统计类型不能为null");
         }
         }
         //存放统计数据
         //存放统计数据
-        Map<String,Object> map = new HashMap<>();
+        Map<String, Object> map = new HashMap<>();
         QueryWrapper<Customer> query = Wrappers.query();
         QueryWrapper<Customer> query = Wrappers.query();
         if (ObjectUtil.isNotEmpty(customerDto.getType())) {
         if (ObjectUtil.isNotEmpty(customerDto.getType())) {
             // 私海客户查询
             // 私海客户查询

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/sample/po/Sample.java

@@ -240,6 +240,11 @@ public class Sample extends BasePo {
      */
      */
     private String versions;
     private String versions;
 
 
+    /**
+     * 汇率
+     */
+    private BigDecimal rate;
+
 
 
     /**
     /**
      * 交接单附件列表
      * 交接单附件列表