Commit 5df7e2e8b6950d95ebb1bb912707a5bfcd7d9349

Authored by 房远帅
1 parent 198b0b55

楚江ERP:补货单-移动端新增搜索条件

... ... @@ -58,4 +58,11 @@ public class QueryReplenishmentOrderVo extends PageVo implements BaseVo, Seriali
58 58 */
59 59 @ApiModelProperty("申请时间结束")
60 60 private LocalDate applicationDateEnd;
61   -}
\ No newline at end of file
  61 +
  62 +
  63 + /**
  64 + * 补货单编号和购货单位名称模糊搜索
  65 + */
  66 + @ApiModelProperty("搜索条件")
  67 + private String searchKey;
  68 +}
... ...
... ... @@ -43,6 +43,7 @@
43 43 tb.create_time,
44 44 tb.update_time
45 45 FROM tbl_replenishment_order AS tb
  46 + left join base_data_customer as cu on cu.id = tb.customer_id
46 47 </sql>
47 48
48 49 <select id="query" resultMap="ReplenishmentOrder">
... ... @@ -69,6 +70,9 @@
69 70 <if test="vo.applicationDateEnd != null">
70 71 AND tb.create_time &lt;= #{vo.applicationDateEnd}
71 72 </if>
  73 + <if test="vo.searchKey != null and vo.searchKey != ''">
  74 + AND (tb.code LIKE CONCAT('%', #{vo.searchKey},'%') OR cu.name LIKE CONCAT('%', #{vo.searchKey},'%'))
  75 + </if>
72 76 </where>
73 77 order by tb.create_time desc
74 78 </select>
... ...