Commit 6d1f25e7 authored by daniel's avatar daniel

feat(delivery): 赛包邮寄优化查询

parent 8e5675a7
package com.dlbridge.jadp.plugins.partner.bean; package com.dlbridge.jadp.plugins.partner.bean;
import com.dlbridge.jadp.common.persistence.JaapRecord; import com.dlbridge.jadp.common.persistence.JaapRecord;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.*;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.sql.Date;
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "赛包存取实体类", description = "赛包存取实体类") @ApiModel(value = "赛包存取实体类", description = "赛包存取实体类")
@Getter @Data
@Setter
@Accessors(chain = true) @Accessors(chain = true)
@ToString @ToString
public class BagDelivery extends JaapRecord<BagDelivery> { public class BagDelivery extends JaapRecord<BagDelivery> {
...@@ -23,6 +25,14 @@ public class BagDelivery extends JaapRecord<BagDelivery> { ...@@ -23,6 +25,14 @@ public class BagDelivery extends JaapRecord<BagDelivery> {
@ApiModelProperty(value = "姓名", notes = "姓名") @ApiModelProperty(value = "姓名", notes = "姓名")
private String name; private String name;
@ApiModelProperty(value = "创建时间", notes = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间", notes = "更新时间")
private Date updateDate;
@ApiModelProperty(value = "参赛号", notes = "参赛号") @ApiModelProperty(value = "参赛号", notes = "参赛号")
private String markNo; private String markNo;
......
...@@ -14,4 +14,8 @@ public class BagParam { ...@@ -14,4 +14,8 @@ public class BagParam {
@ApiModelProperty(value = "状态(1:提交,2:已处理)", notes = "状态(1:提交,2:已处理)") @ApiModelProperty(value = "状态(1:提交,2:已处理)", notes = "状态(1:提交,2:已处理)")
private Integer status; private Integer status;
@ApiModelProperty(value = "关键字", notes = "关键字")
private String keyword;
@ApiModelProperty(value = "参赛号", notes = "参赛号")
private String markNo;
} }
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
select select
id, id,
cmpt_id cmptId, cmpt_id cmptId,
create_date createDate,
update_date updateDate,
name, name,
mark_no markNo, mark_no markNo,
phone, phone,
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
from bag_delivery from bag_delivery
where del_flag = 0 where del_flag = 0
<include refid="bag-where-sql"/> <include refid="bag-where-sql"/>
order by create_date order by create_date desc
limit #{page.offset},#{page.size} limit #{page.offset},#{page.size}
</select> </select>
...@@ -85,8 +87,12 @@ ...@@ -85,8 +87,12 @@
<if test="param.status != null"> <if test="param.status != null">
and status=#{param.status} and status=#{param.status}
</if> </if>
<if test="param.keyword != null and param.keyword != ''">
and mark_no like concat('%',#{param.keyword},'%') or name like concat('%',#{param.keyword},'%') or phone like concat('%',#{param.keyword},'%')
</if>
<if test="param.markNo != null and param.markNo != ''">
and mark_no = #{param.markNo}
</if>
</sql> </sql>
</mapper> </mapper>
\ No newline at end of file
...@@ -270,6 +270,16 @@ ...@@ -270,6 +270,16 @@
{{statusOpt.name}} {{statusOpt.name}}
</button> </button>
</div> </div>
<div class="input-group ml-2 mr-2">
<input type="text" class="form-control" placeholder="请输入搜索关键字"
@keyup.enter="fetchData" v-model="keyword"
aria-label="Input group example" aria-describedby="btnGroupAddon">
</div>
<button class="btn btn-sm ml-auto " :class="{
'btn-danger':keyword
}" @click="fetchData">
搜索
</button>
</div> </div>
</div> </div>
...@@ -285,7 +295,7 @@ ...@@ -285,7 +295,7 @@
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th style="text-align: left">选手</th> <th style="text-align: left;padding-left:5px;">选手</th>
<th style="text-align: left">地址</th> <th style="text-align: left">地址</th>
<th style="text-align: left">物流</th> <th style="text-align: left">物流</th>
<th style="text-align: left">状态</th> <th style="text-align: left">状态</th>
...@@ -305,6 +315,9 @@ ...@@ -305,6 +315,9 @@
<span class="lh-1.2"> <span class="lh-1.2">
手机号:{{item.phone}} 手机号:{{item.phone}}
</span> </span>
<span class="lh-1.2">
申请时间:{{item.createDate}}
</span>
<span v-if="item.remark" class="lh-1.2"> <span v-if="item.remark" class="lh-1.2">
备注:{{item.remark}} 备注:{{item.remark}}
</span> </span>
...@@ -460,6 +473,7 @@ ...@@ -460,6 +473,7 @@
dialog: false, dialog: false,
title: '赛包邮寄', title: '赛包邮寄',
statusIndex: 0, statusIndex: 0,
keyword: '',
statusOptions: [ statusOptions: [
{ {
name: "全部", name: "全部",
...@@ -589,7 +603,7 @@ ...@@ -589,7 +603,7 @@
// 查询所有 // 查询所有
fetchData() { fetchData() {
if (!getCId()) return if (!getCId()) return
const url = '/gk/bag/delivery/list?status=' + this.statusOptions[this.statusIndex].value + '&cmptId=' + getCId() const url = '/gk/bag/delivery/list?status=' + this.statusOptions[this.statusIndex].value + '&cmptId=' + getCId() + '&keyword=' + this.keyword
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
contentType: 'application/json', contentType: 'application/json',
......
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