Commit 846e55dc by zhanghj

V1.5.0--历史订单数据处理代码提交

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@24815 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 9977eb58
...@@ -2,7 +2,24 @@ package com.glsx.ordercenter.dto; ...@@ -2,7 +2,24 @@ package com.glsx.ordercenter.dto;
public class HistoricalOrderReq { public class HistoricalOrderReq {
/**
* 第三方订单号
*/
private String workOrderNo; private String workOrderNo;
/**
* 是否取消,0.已取消,1,未取消
*/
private Integer canceled;
/**
* 订单类型:1.安装单、2.拆除单、3.检修单
*
*/
private Integer orderType;
/**
* 渠道
*/
private String channel;
/** /**
* 查询:开始时间 * 查询:开始时间
...@@ -32,5 +49,23 @@ public class HistoricalOrderReq { ...@@ -32,5 +49,23 @@ public class HistoricalOrderReq {
public void setEndDate(String endDate) { public void setEndDate(String endDate) {
this.endDate = endDate; this.endDate = endDate;
} }
public String getChannel() {
return channel;
}
public void setChannel(String channel) {
this.channel = channel;
}
public Integer getCanceled() {
return canceled;
}
public void setCanceled(Integer canceled) {
this.canceled = canceled;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
} }
...@@ -23,4 +23,16 @@ public interface HistoricalDataProcessingMapper { ...@@ -23,4 +23,16 @@ public interface HistoricalDataProcessingMapper {
List<SysOrder> getThirdChannelOrderList( List<SysOrder> getThirdChannelOrderList(
HistoricalOrderReq historicalOrderReq); HistoricalOrderReq historicalOrderReq);
/**
*
* @author zhanghj
* @Title: getThirdChannelList
* @Description: TODO 获取第三方渠道列表
* @param historicalOrderReq
* @return
* List<SysOrder>
* @version
*/
List<SysOrder> getThirdChannelList(HistoricalOrderReq historicalOrderReq);
} }
...@@ -72,14 +72,50 @@ ...@@ -72,14 +72,50 @@
sys_order so sys_order so
<where> <where>
service_code = '' service_code = ''
AND so.work_order_no != '' <if test="orderType != null">
<if test=""> AND so.order_type != #{orderType}
AND so.create_time &gt;= '2019-09-01 00:00:00' </if>
<if test="workOrderNo != null">
AND so.work_order_no = #{workOrderNo}
</if>
<if test="canceled != null">
AND so.canceled = #{canceled}
</if>
<if test="beginDate != null and beginDate !=''">
AND so.create_time &gt;= #{beginDate}
</if> </if>
<if test=""> <if test="endDate != null and endDate !=''">
AND so.create_time &lt;= '2019-09-30 23:59:59' AND so.create_time &lt;= #{endDate}
</if> </if>
</where> </where>
ORDER BY so.id ASC ORDER BY so.id ASC
</select> </select>
<select id="getThirdChannelList" parameterType="com.glsx.ordercenter.dto.HistoricalOrderReq" resultMap="BaseResultMap">
SELECT
so.work_order_no, so.channel
FROM
sys_order so
<where>
service_code = ''
<choose>
<when test="workOrderNo == null">
AND so.work_order_no != ''
</when>
<when test="workOrderNo == ''">
AND so.work_order_no = ''
</when>
<otherwise>
AND so.work_order_no = #{workOrderNo}
</otherwise>
</choose>
<if test="beginDate != null and beginDate !=''">
AND so.create_time &gt;= #{beginDate}
</if>
<if test="endDate != null and endDate !=''">
AND so.create_time &lt;= #{endDate}
</if>
</where>
GROUP BY so.work_order_no, so.channel
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!