Commit fe5521a6 authored by Smile's avatar Smile

集运包裹主页修改

parent 9bd1deaa
......@@ -92,6 +92,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
ConsItemQueryVO consItemQueryVO = new ConsItemQueryVO();
consItemQueryVO.setLang(I18nMessage.getLang());
List<ConsBackVO> consBackVOS = consMapper.myConsPageList(start, size, query);
consBackVOS.removeAll(Collections.singleton(null));
consBackVOS.forEach(consBackVO -> {
consItemQueryVO.setConsId(consBackVO.getId());
List<ConsItemBackVO> consItemBackVOList = consItemService.getConsItemBackVOList(consItemQueryVO);
......
......@@ -44,6 +44,15 @@ public class ConsBackVO {
@ApiModelProperty(value = "订单ID,关联订单表")
private Long orderId;
@ExcelProperty("订单编号")
@ApiModelProperty(value = "订单编号")
private Long orderNo;
@ExcelProperty("订单状态")
@ApiModelProperty(value = "订单状态")
private Long orderStatus;
@ExcelProperty("平台ID,关联平台表数据,为后面系统对接预留字段")
@ApiModelProperty(value = "平台ID,关联平台表数据,为后面系统对接预留字段")
private Long platformId;
......@@ -196,4 +205,13 @@ public class ConsBackVO {
@ApiModelProperty(value = "动态")
private Integer businessNode;
@ExcelProperty("最新跟进时间")
@ApiModelProperty(value = "最新跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date trackingTime;
@ExcelProperty("退仓状态")
@ApiModelProperty(value = "退仓状态")
private Integer returnStatus;
}
......@@ -133,4 +133,18 @@ public class ConsQueryVO {
@ApiModelProperty(value = "语言")
private Integer lang;
@ApiModelProperty(value = "编号搜索(包括快递号、包裹号、订单号)")
private String numberKey;
@ApiModelProperty(value = "反向编号搜索(包括快递号、包裹号、订单号)不包含的数据")
private String notNumberKey;
@ApiModelProperty(value = "编号搜索强等于(包括快递号、包裹号、订单号)")
private String eqNumberKey;
@ApiModelProperty(value = "编号搜索强不等于(包括快递号、包裹号、订单号)")
private String notEqNumberKey;
@ApiModelProperty(value = "发货人(发货人手机号、客户编号)")
private String customerKey;
}
......@@ -5,10 +5,14 @@
select count(1)
FROM ecw_cons cons
left join ecw_customer ec on cons.customer_id = ec.id
left join ecw_customer_contacts eccs on ec.id = eccs.customer_id
left join ecw_warehouse_line el on cons.warehouse_line_id = el.id
LEFT JOIN ecw_warehouse ew_start ON ew_start.id = el.start_warehouse_id
LEFT JOIN ecw_warehouse ew_dest ON ew_dest.id = el.dest_warehouse_id
left join ecw_cons_tracking_record ctr on cons.id = ctr.cons_id
left join ecw_order o on cons.order_id = o.order_id
WHERE cons.deleted = 0
<include refid="myConsQuery"/>
order by cons.update_time desc
</select>
......@@ -22,6 +26,9 @@
ew_dest.title_en as destTitleEn,
ew_dest.title_fr as destTitleFr,
ctr.business_node,
ctr.tracking_time,
o.order_no,
o.status as orderStatus,
GROUP_CONCAT(
CASE #{query.lang}
WHEN 0 then ecc.name_zh
......@@ -32,19 +39,43 @@
) AS channelName
FROM ecw_cons cons
left join ecw_customer ec on cons.customer_id = ec.id
left join ecw_customer_contacts eccs on ec.id = eccs.customer_id
left join ecw_warehouse_line el on cons.warehouse_line_id = el.id
left join ecw_warehouse ew_start ON ew_start.id = el.start_warehouse_id
left join ecw_warehouse ew_dest ON ew_dest.id = el.dest_warehouse_id
left join ecw_line_channel_packaging elcp on cons.warehouse_line_id = elcp.line_id
LEFT JOIN ecw_channel ecc ON FIND_IN_SET(ecc.channel_id, elcp.channel_ids)
left join ecw_cons_tracking_record ctr on cons.id = ctr.cons_id
left join ecw_order o on cons.order_id = o.order_id
WHERE cons.deleted = 0
and elcp.deleted = 0
<include refid="myConsQuery"/>
order by cons.update_time desc
limit #{start}, #{size}
</select>
<sql id="myOrderQuery">
<sql id="myConsQuery">
<if test="query.numberKey != null and query.numberKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(cons.`cons_num`,''), IFNULL(cons.`express_no`,'')) like
concat("%",concat(#{query.numberKey},"%"))
</if>
<if test="query.notNumberKey != null and query.notNumberKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(cons.`cons_num`,''), IFNULL(cons.`express_no`,'')) not like
concat("%",concat(#{query.notNumberKey},"%"))
</if>
<if test="query.eqNumberKey != null and query.eqNumberKey != '' ">
AND (cons.`cons_num` = #{query.eqNumberKey})
or (o.`order_no` is not null and o.`order_no` != '' and o.`order_no` = #{query.eqNumberKey})
or (cons.`express_no` is not null and cons.`express_no` != '' and cons.`express_no` = #{query.eqNumberKey})
</if>
<if test="query.notEqNumberKey != null and query.notEqNumberKey != '' ">
AND (cons.`cons_num` != #{query.eqNumberKey})
AND (o.`order_no` is not null and o.`order_no` != '' and o.`order_no` != #{query.eqNumberKey})
AND (cons.`express_no` is not null and cons.`express_no` != '' and cons.`express_no` != #{query.eqNumberKey})
</if>
<if test="query.customerKey != null and query.customerKey != '' ">
AND concat(IFNULL(cons.`customer_number`,''), IFNULL(eccs.`phone_new`,'')) like
concat("%",concat(#{query.customerKey},"%"))
</if>
</sql>
</mapper>
\ No newline at end of file
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