记得上下班打卡 | git大法好,push需谨慎

Commit f1d17722 authored by jiangxiulong's avatar jiangxiulong

快递信息导入 列表展示 查询条件优化

parent fd1f6c92
...@@ -87,10 +87,6 @@ ...@@ -87,10 +87,6 @@
shiro:hasPermission="kylin:performancesExpress:printExpress"> shiro:hasPermission="kylin:performancesExpress:printExpress">
批量打印 批量打印
</a> </a>
<a class="btn btn-info" onclick="$.table.importExcel()"
shiro:hasPermission="kylin:performancesExpress:import">
<i class="fa fa-upload"></i> 导入
</a>
</div> </div>
<div class="col-sm-12 select-table table-bordered"> <div class="col-sm-12 select-table table-bordered">
...@@ -369,8 +365,6 @@ ...@@ -369,8 +365,6 @@
getResultUrl: prefix + "/getResult", getResultUrl: prefix + "/getResult",
listOrderRouteUrl: prefix + "/listOrderRoute", listOrderRouteUrl: prefix + "/listOrderRoute",
generateImageUrl: prefix + "/generateImage", generateImageUrl: prefix + "/generateImage",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
...@@ -489,20 +483,4 @@ ...@@ -489,20 +483,4 @@
</script> </script>
</body> </body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input type="file" id="file" name="file"/>
<div class="mt10 pt5">
&nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div>
<font color="red" class="pull-left mt10">
提示:仅允许导入“xls”或“xlsx”格式文件!
</font>
</div>
</form>
</script>
</html> </html>
\ No newline at end of file
...@@ -29,6 +29,13 @@ ...@@ -29,6 +29,13 @@
</form> </form>
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-info" onclick="$.table.importExcel()"
shiro:hasPermission="kylin:performancesExpress:import">
<i class="fa fa-upload"></i> 导入快递信息
</a>
</div>
<div class="col-sm-12 select-table table-bordered"> <div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
...@@ -318,6 +325,8 @@ ...@@ -318,6 +325,8 @@
batchGenerateImageUrl: prefix + "/batchGenerateImage", batchGenerateImageUrl: prefix + "/batchGenerateImage",
batchPrintExpressUrl: prefix + "/batchPrintExpress", batchPrintExpressUrl: prefix + "/batchPrintExpress",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
modalName: "演出快递", modalName: "演出快递",
columns: [ columns: [
{ {
...@@ -334,7 +343,7 @@ ...@@ -334,7 +343,7 @@
}, },
{ {
field: 'totalNumber', field: 'totalNumber',
title: '总数' title: '快递票总数'
}, },
{ {
field: 'total1', field: 'total1',
...@@ -342,7 +351,7 @@ ...@@ -342,7 +351,7 @@
}, },
{ {
field: 'total2', field: 'total2',
title: '已揽收' title: '运输中'
}, },
{ {
field: 'total3', field: 'total3',
...@@ -368,4 +377,20 @@ ...@@ -368,4 +377,20 @@
</script> </script>
</body> </body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input type="file" id="file" name="file"/>
<div class="mt10 pt5">
&nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div>
<font color="red" class="pull-left mt10">
提示:仅允许导入“xls”或“xlsx”格式文件!
</font>
</div>
</form>
</script>
</html> </html>
\ No newline at end of file
...@@ -19,7 +19,6 @@ import com.liquidnet.service.kylin.dao.*; ...@@ -19,7 +19,6 @@ import com.liquidnet.service.kylin.dao.*;
import com.liquidnet.service.kylin.dto.param.*; import com.liquidnet.service.kylin.dto.param.*;
import com.liquidnet.service.kylin.dto.vo.basicServices.UploadVo; import com.liquidnet.service.kylin.dto.vo.basicServices.UploadVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressPrintVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressPrintVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.entity.*; import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*; import com.liquidnet.service.kylin.mapper.*;
...@@ -29,8 +28,6 @@ import org.springframework.beans.BeanUtils; ...@@ -29,8 +28,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -94,9 +91,6 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -94,9 +91,6 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
@Autowired @Autowired
private KylinOrderExpressRouteMapper kylinOrderExpressRouteMapper; private KylinOrderExpressRouteMapper kylinOrderExpressRouteMapper;
@Autowired
private KylinOrderExpressPerformancesMapper kylinOrderExpressPerformancesMapper;
@Autowired @Autowired
private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper; private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper;
...@@ -129,6 +123,26 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -129,6 +123,26 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
if (null != countInfo) { if (null != countInfo) {
info.setTotalNumber(countInfo.getTotalNumber()); info.setTotalNumber(countInfo.getTotalNumber());
} }
// 已下单
Integer total1 = kylinOrderExpressMapper.selectCount(
Wrappers.lambdaQuery(KylinOrderExpress.class)
.ne(KylinOrderExpress::getExpressStatus, 1).ne(KylinOrderExpress::getExpressStatus, 3)
.eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId())
);
// 运输中
Integer total2 = kylinOrderExpressMapper.selectCount(
Wrappers.lambdaQuery(KylinOrderExpress.class).gt(KylinOrderExpress::getExpressStatus, 3)
.ne(KylinOrderExpress::getExpressStatus, 80)
.eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId())
);
// 已签收
Integer total3 = kylinOrderExpressMapper.selectCount(
Wrappers.lambdaQuery(KylinOrderExpress.class).eq(KylinOrderExpress::getExpressStatus, 80)
.eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId())
);
info.setTotal1(total1);
info.setTotal2(total2);
info.setTotal3(total3);
} }
} }
} catch (Exception e) { } catch (Exception e) {
......
package com.liquidnet.service.kylin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* <p>
* 订单快递演出统计表
* </p>
*
* @author jiangxiulong
* @since 2021-07-06
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpressPerformances implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Integer mid;
private String orderExpressPerformancesId;
private String performancesId;
private Integer total1; // 订单状态
private Integer total2; // 订单状态
private Integer total3; // 订单状态
/**
* 创建时间
*/
private String createdAt;
/**
* 修改时间
*/
private String updatedAt;
private static final KylinOrderExpressPerformances obj = new KylinOrderExpressPerformances();
public static KylinOrderExpressPerformances getNew() {
try {
return (KylinOrderExpressPerformances) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpressPerformances();
}
}
}
package com.liquidnet.service.kylin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.entity.KylinOrderExpressPerformances;
/**
* <p>
* 订单快递演出统计 Mapper 接口 处理数据库
* </p>
*
* @author jiangxiulong
* @since 2021-07-01
*/
public interface KylinOrderExpressPerformancesMapper extends BaseMapper<KylinOrderExpressPerformances> {
}
...@@ -314,6 +314,7 @@ ...@@ -314,6 +314,7 @@
kotr.performance_id = #{performancesId} kotr.performance_id = #{performancesId}
AND kot.get_ticket_type = 'express' AND kot.get_ticket_type = 'express'
AND kots.status IN (1, 3, 4, 6) AND kots.status IN (1, 3, 4, 6)
AND kots.transfer_status IN (0, 1, 3, 5)
AND kots.pay_status = 1 AND kots.pay_status = 1
<if test="orderCode != null and orderCode != ''">AND kot.order_code = #{orderCode}</if> <if test="orderCode != null and orderCode != ''">AND kot.order_code = #{orderCode}</if>
<if test="orderTicketsId != null and orderTicketsId != ''">AND kot.order_tickets_id = #{orderTicketsId} <if test="orderTicketsId != null and orderTicketsId != ''">AND kot.order_tickets_id = #{orderTicketsId}
......
...@@ -518,23 +518,17 @@ ...@@ -518,23 +518,17 @@
</where> </where>
order by sponsor_id order by sponsor_id
</select> </select>
<select id="performanceExpressPerformanceList" <select id="performanceExpressPerformanceList" resultType="com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao">
resultType="com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao">
SELECT SELECT
p.performances_id , p.performances_id ,
p.title , p.title ,
p.time_start , p.time_start ,
p.time_end , p.time_end ,
p.created_at, p.created_at
oep.total1,
oep.total2,
oep.total3
FROM FROM
kylin_performances AS p kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN kylin_order_express_performances AS oep ON oep.performances_id = pr.performance_id
JOIN kylin_ticket_time_relation AS a ON a.performance_id = p.performances_id JOIN kylin_ticket_time_relation AS a ON a.performance_id = p.performances_id
JOIN kylin_ticket_relations AS b ON b.times_id = a.times_id JOIN kylin_ticket_relations AS b ON b.times_id = a.times_id
JOIN kylin_ticket_status AS c ON c.ticket_id = b.ticket_id JOIN kylin_ticket_status AS c ON c.ticket_id = b.ticket_id
...@@ -550,8 +544,7 @@ ...@@ -550,8 +544,7 @@
GROUP BY p.performances_id GROUP BY p.performances_id
ORDER BY p.created_at DESC ORDER BY p.created_at DESC
</select> </select>
<select id="countExpressNumber" <select id="countExpressNumber" resultType="com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao">
resultType="com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao">
SELECT SELECT
COUNT(*) total_number COUNT(*) total_number
FROM FROM
...@@ -560,7 +553,9 @@ ...@@ -560,7 +553,9 @@
LEFT JOIN kylin_order_tickets AS ot ON ot.order_tickets_id = otr.order_id LEFT JOIN kylin_order_tickets AS ot ON ot.order_tickets_id = otr.order_id
LEFT JOIN kylin_order_ticket_status AS ots ON ots.order_id = otr.order_id LEFT JOIN kylin_order_ticket_status AS ots ON ots.order_id = otr.order_id
WHERE pr.performance_id = #{performancesId} WHERE pr.performance_id = #{performancesId}
AND ots.status NOT IN (0, 2, 5) AND ots.status IN (1, 3, 4, 6)
AND ots.pay_status = 1
AND ots.transfer_status IN (0, 1, 3, 5)
AND ot.get_ticket_type = 'express' AND ot.get_ticket_type = 'express'
</select> </select>
</mapper> </mapper>
...@@ -3,7 +3,6 @@ package com.liquidnet.service.platform.service.express.shunfeng; ...@@ -3,7 +3,6 @@ package com.liquidnet.service.platform.service.express.shunfeng;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.*; import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.kylin.dto.param.*; import com.liquidnet.service.kylin.dto.param.*;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo;
...@@ -55,9 +54,6 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd ...@@ -55,9 +54,6 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
@Autowired @Autowired
private KylinOrderExpressStatusMapper kylinOrderExpressStatusMapper; private KylinOrderExpressStatusMapper kylinOrderExpressStatusMapper;
@Autowired
private KylinOrderExpressPerformancesMapper kylinOrderExpressPerformancesMapper;
@Autowired @Autowired
private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper; private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper;
......
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