md
This commit is contained in:
parent
a371e07494
commit
9c3f77a882
@ -11,11 +11,14 @@
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xdadan.erp.common.annotation.filter.jackson.JacksonFilter;
|
||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -32,7 +35,6 @@ import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.StringUtils;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisSite;
|
||||
@ -76,6 +78,14 @@ public class EmisSiteController extends EmisBaseController
|
||||
public TableDataInfo listSimple(EmisSite emisSite)
|
||||
{
|
||||
startPage();
|
||||
if(!StringUtils.isEmpty(emisSite.getSiteCode())){
|
||||
emisSite.setSiteCode(WaybillHelper.formatQueryValue(emisSite.getSiteCode()));
|
||||
String[] siteCodeSortList = emisSite.getSiteCode().split(",");
|
||||
if(siteCodeSortList.length>1){
|
||||
emisSite.getParams().put("siteCodeSortList", Arrays.asList(siteCodeSortList));
|
||||
}
|
||||
}
|
||||
|
||||
List<EmisSite> list = emisSiteService.selectEmisSiteList(emisSite);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
<include refid="selectEmisSiteVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="siteCode != null and siteCode != ''"> and site_code = #{siteCode}</if>
|
||||
<if test="siteCode != null and siteCode != ''"> and FIND_IN_SET(`site_code`,#{siteCode}) </if>
|
||||
<if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if>
|
||||
<if test="siteNameEn != null and siteNameEn != ''"> and site_name_en like concat('%', #{siteNameEn}, '%')</if>
|
||||
<if test="defaultCurrency != null and defaultCurrency != ''"> and default_currency like concat('%', #{defaultCurrency}, '%')</if>
|
||||
@ -292,9 +292,19 @@
|
||||
AND ( site_code like concat(#{searchValue}, '%') or site_name like concat(#{searchValue}, '%') )
|
||||
</if>
|
||||
|
||||
|
||||
</where>
|
||||
order by order_num desc
|
||||
|
||||
<if test="params.siteCodeSortList != null and params.siteCodeSortList.size >0 ">
|
||||
ORDER BY FIELD
|
||||
<foreach collection="params.siteCodeSortList" item="item" open="(site_code," separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="params.siteCodeSortList == null ">
|
||||
ORDER BY order_num desc
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- <if test="parentSiteCode != null and parentSiteCode != ''"> and parent_site_code = #{parentSiteCode}</if>-->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user