diff --git a/src/main/java/com/spring/modules/customer/mapper/CustomerInformationMapper.java b/src/main/java/com/spring/modules/customer/mapper/CustomerInformationMapper.java index 9ec3782d..c3e08740 100644 --- a/src/main/java/com/spring/modules/customer/mapper/CustomerInformationMapper.java +++ b/src/main/java/com/spring/modules/customer/mapper/CustomerInformationMapper.java @@ -14,4 +14,5 @@ public interface CustomerInformationMapper extends BaseMapper customerInformationSearchForCheck(Page customerInformationVoPage, @Param("query") CustomerInformationVo data); + String queryNextCustomerNo(String site); } diff --git a/src/main/java/com/spring/modules/customer/service/impl/CustomerInformationServiceImpl.java b/src/main/java/com/spring/modules/customer/service/impl/CustomerInformationServiceImpl.java index 7197adac..bb95e7da 100644 --- a/src/main/java/com/spring/modules/customer/service/impl/CustomerInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/customer/service/impl/CustomerInformationServiceImpl.java @@ -79,6 +79,9 @@ public class CustomerInformationServiceImpl extends ServiceImpl - - + SELECT site, + customer_no, + customer_desc, + dbo.plm_get_dictDataLabel('plm_customer_information_customer_customer_currency', customer_currency, + site) as customer_currency, + turnover_of_year, + potential_revenue_of_year, + dbo.plm_get_dictDataLabel('plm_customer_information_important_customer', important_customer, + site) as important_customer, + customer_group_id1, + dbo.get_customer_group_name(site, customer_group_id1, '1') as customerGroupName1, + customer_group_id2, + dbo.get_customer_group_name(site, customer_group_id2, '2') as customerGroupName2, + customer_status, + case + when customer_status = 'Y' then '启用' + when customer_status = 'N' then '停用' + else '' end as customerStatusDesc, + customer_type, + customer_description, + dbo.plm_get_dictDataLabel('plm_customer_information_customer_industry', customer_industry, + site) as customer_industry, + create_date, + create_by, + update_date, + update_by, + dbo.plm_get_contactName(site, customer_no, 'Y') as contactName, + dbo.plm_get_contactPhoneNumber(site, customer_no, 'Y') as contactPhoneNumber1, + dbo.plm_get_addressName(site, customer_no) as addressName FROM plm_customer_information site = #{query.site} - + AND customer_no like #{query.customerNo} - + AND customer_desc like #{query.customerDesc} - + AND customer_status = #{query.customerStatus} + order by CAST(SUBSTRING(customer_no, 2, 6) AS INT) desc - + SELECT site, + customer_no, + customer_desc, + customer_currency, + turnover_of_year, + potential_revenue_of_year, + important_customer, + customer_group_id1, + dbo.get_customer_group_name(site, customer_group_id1, '1') as customerGroupName1, + customer_group_id2, + dbo.get_customer_group_name(site, customer_group_id2, '2') as customerGroupName2, + customer_status, + customer_type, + customer_description, + customer_industry, + create_date, + create_by, + update_date, + update_by, + dbo.plm_get_contactName(site, customer_no, 'Y') as contactName, + dbo.plm_get_contactPhoneNumber(site, customer_no, 'Y') as contactPhoneNumber1, + dbo.plm_get_addressName(site, customer_no) as addressName FROM plm_customer_information site = #{query.site} - AND customer_no = #{query.customerNo} + AND customer_no = #{query.customerNo} - + AND customer_desc like #{query.customerDesc} - + AND customer_status = #{query.customerStatus} + order by CAST(SUBSTRING(customer_no, 2, 6) AS INT) desc +