|
|
|
@ -8,6 +8,7 @@ import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.BusinessType;
|
|
|
|
|
import com.glxp.api.dto.DictDto;
|
|
|
|
|
import com.glxp.api.entity.auth.*;
|
|
|
|
|
import com.glxp.api.entity.purchase.CustomerContactEntity;
|
|
|
|
|
import com.glxp.api.entity.system.CompanyEntity;
|
|
|
|
@ -31,6 +32,7 @@ import javax.annotation.Resource;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@Slf4j
|
|
|
|
@ -62,6 +64,23 @@ public class CustomerController {
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@GetMapping("/spms/customer/listOptimize")
|
|
|
|
|
public BaseResponse filterCustomersOptimize(CustomerInfoFilterRequest customerFilterRequest) {
|
|
|
|
|
|
|
|
|
|
List<CustomerInfoEntity> customerDetailEntities = customerInfoService.filterCustomerInfo(customerFilterRequest);
|
|
|
|
|
List<DictDto> reList = customerDetailEntities.stream().map(s-> {
|
|
|
|
|
DictDto dictDto = new DictDto(s.getCustomerId().toString(),s.getCompanyName());
|
|
|
|
|
return dictDto;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
PageInfo<DictDto> pageInfo;
|
|
|
|
|
pageInfo = new PageInfo<>(reList);
|
|
|
|
|
PageSimpleResponse<DictDto> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
|
|
|
pageSimpleResponse.setList(reList);
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@GetMapping("salewarehouse/customer/list")
|
|
|
|
|
public BaseResponse filterList(CustomerInfoFilterRequest customerFilterRequest) {
|
|
|
|
@ -83,6 +102,7 @@ public class CustomerController {
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@GetMapping("salewarehouse/customer/detail")
|
|
|
|
|
public BaseResponse customerDetail(CustomerInfoFilterRequest customerFilterRequest) {
|
|
|
|
|