给供应商查询增加联系人的参数

This commit is contained in:
jishenghua
2025-04-13 17:04:28 +08:00
parent 29ac8d4e29
commit c5324f4ef1
4 changed files with 9 additions and 3 deletions

View File

@@ -69,9 +69,10 @@ public class SupplierController extends BaseController {
HttpServletRequest request)throws Exception { HttpServletRequest request)throws Exception {
String supplier = StringUtil.getInfo(search, "supplier"); String supplier = StringUtil.getInfo(search, "supplier");
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String contacts = StringUtil.getInfo(search, "contacts");
String phonenum = StringUtil.getInfo(search, "phonenum"); String phonenum = StringUtil.getInfo(search, "phonenum");
String telephone = StringUtil.getInfo(search, "telephone"); String telephone = StringUtil.getInfo(search, "telephone");
List<Supplier> list = supplierService.select(supplier, type, phonenum, telephone); List<Supplier> list = supplierService.select(supplier, type, contacts, phonenum, telephone);
return getDataTable(list); return getDataTable(list);
} }

View File

@@ -12,6 +12,7 @@ public interface SupplierMapperEx {
List<Supplier> selectByConditionSupplier( List<Supplier> selectByConditionSupplier(
@Param("supplier") String supplier, @Param("supplier") String supplier,
@Param("type") String type, @Param("type") String type,
@Param("contacts") String contacts,
@Param("phonenum") String phonenum, @Param("phonenum") String phonenum,
@Param("telephone") String telephone, @Param("telephone") String telephone,
@Param("creatorArray") String[] creatorArray); @Param("creatorArray") String[] creatorArray);

View File

@@ -87,12 +87,12 @@ public class SupplierService {
return list; return list;
} }
public List<Supplier> select(String supplier, String type, String phonenum, String telephone) throws Exception{ public List<Supplier> select(String supplier, String type, String contacts, String phonenum, String telephone) throws Exception{
List<Supplier> list = new ArrayList<>(); List<Supplier> list = new ArrayList<>();
try{ try{
String [] creatorArray = depotHeadService.getCreatorArray(); String [] creatorArray = depotHeadService.getCreatorArray();
PageUtils.startPage(); PageUtils.startPage();
list = supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, creatorArray); list = supplierMapperEx.selectByConditionSupplier(supplier, type, contacts, phonenum, telephone, creatorArray);
for(Supplier s : list) { for(Supplier s : list) {
Integer supplierId = s.getId().intValue(); Integer supplierId = s.getId().intValue();
String beginTime = Tools.getYearBegin(); String beginTime = Tools.getYearBegin();

View File

@@ -12,6 +12,10 @@
<if test="type != null and type !=''"> <if test="type != null and type !=''">
and type=#{type} and type=#{type}
</if> </if>
<if test="contacts != null and contacts !=''">
<bind name="bindContacts" value="'%'+contacts+'%'"/>
and contacts like #{bindContacts}
</if>
<if test="phonenum != null and phonenum !=''"> <if test="phonenum != null and phonenum !=''">
<bind name="bindPhoneNum" value="'%'+phonenum+'%'"/> <bind name="bindPhoneNum" value="'%'+phonenum+'%'"/>
and phone_num like #{bindPhoneNum} and phone_num like #{bindPhoneNum}