Commit e77bccbb authored by lcl's avatar lcl

u

parent 5750242e
...@@ -13,10 +13,7 @@ import com.dsk.cscec.service.IDCustomerService; ...@@ -13,10 +13,7 @@ import com.dsk.cscec.service.IDCustomerService;
import com.dsk.system.domain.SysDept; import com.dsk.system.domain.SysDept;
import com.dsk.system.domain.vo.SysDeptVo; import com.dsk.system.domain.vo.SysDeptVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
...@@ -39,8 +36,8 @@ public class DCustomerController extends BaseController { ...@@ -39,8 +36,8 @@ public class DCustomerController extends BaseController {
/** /**
* 供应商总台账筛选 * 供应商总台账筛选
*/ */
@GetMapping("/all/searchList") @PostMapping("/all/searchList")
public TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query) { public TableDataInfo<DCustomer> allSearchList(@RequestBody DCustomerSearchBo bo, PageQuery query) {
return baseService.allSearchList(bo,query); return baseService.allSearchList(bo,query);
} }
......
...@@ -12,26 +12,37 @@ ...@@ -12,26 +12,37 @@
from d_customer from d_customer
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475' where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
<if test="bo.customerName != null and bo.customerName != '' "> and customer_name like concat('%',#{bo.customerName},'%')</if> <if test="bo.customerName != null and bo.customerName != '' "> and customer_name like concat('%',#{bo.customerName},'%')</if>
<if test="bo.region != null and bo.region != '' "> <!-- <if test="bo.region != null and bo.region != '' ">-->
and ( <!-- and register_region in-->
<foreach collection="region" item="item" open="(" separator=" or " close=")"> <!-- <foreach collection="region" item="item" open="(" separator="," close=")">-->
register_region = #{item} <!-- #{item}-->
<if test="bo.province != null and bo.province != '' "> <!-- </foreach>-->
and ( <!-- </if>-->
<foreach collection="province" item="item" open="(" separator=" or " close=")"> <choose>
register_province = #{item} <when test="bo.province != null ">
<if test="bo.city != null and bo.city != '' "> and register_province in
<foreach collection="province" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</when>
<when test="bo.city != null ">
and register_city in and register_city in
<foreach collection="city" item="item" open="(" separator="," close=")"> <foreach collection="city" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </when>
<otherwise>
and ( register_province in
<foreach collection="province" item="item" open="(" separator="," close=")">
#{item}
</foreach> </foreach>
) or register_city in
</if> <foreach collection="city" item="item" open="(" separator="," close=")">
#{item}
</foreach> </foreach>
) )
</if> </otherwise>
</choose>
<if test="bo.customerClass != null and bo.customerClass != '' "> <if test="bo.customerClass != null and bo.customerClass != '' ">
and customer_class in and customer_class in
<foreach collection="customerClass" item="item" open="(" separator="," close=")"> <foreach collection="customerClass" item="item" open="(" separator="," close=")">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment