Commit c4147846 by zhanghj

V1.0.0--售后检修列表去掉未完成的

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18684 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent e9850d41
...@@ -56,6 +56,7 @@ public interface BizConstants { ...@@ -56,6 +56,7 @@ public interface BizConstants {
* 订单是否取消。0.已取消 * 订单是否取消。0.已取消
*/ */
public static final int ORDER_CANCELED = 0; public static final int ORDER_CANCELED = 0;
public static final int ORDER_NOT_CANCELED = 1;
/** /**
......
...@@ -55,7 +55,7 @@ public interface SysOrderMapper { ...@@ -55,7 +55,7 @@ public interface SysOrderMapper {
* List<SysOrder> * List<SysOrder>
* *
*/ */
List<SysOrder> getAfterSaleRepairList(@Param("orderId") Integer orderId, @Param("queryContent") String queryContent); List<SysOrder> getAfterSaleRepairList(SysOrder order);
/** /**
* *
......
...@@ -158,6 +158,10 @@ public class SysOrder { ...@@ -158,6 +158,10 @@ public class SysOrder {
private CarInfo carInfo; private CarInfo carInfo;
/**
* 搜索内容
*/
private String queryContent;
public CarInfo getCarInfo() { public CarInfo getCarInfo() {
return carInfo; return carInfo;
...@@ -593,5 +597,13 @@ public class SysOrder { ...@@ -593,5 +597,13 @@ public class SysOrder {
public void setIsDismantle(Boolean isDismantle) { public void setIsDismantle(Boolean isDismantle) {
this.isDismantle = isDismantle; this.isDismantle = isDismantle;
} }
public String getQueryContent() {
return queryContent;
}
public void setQueryContent(String queryContent) {
this.queryContent = queryContent;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -1470,7 +1470,9 @@ public class OrderServiceImpl implements IOrderService { ...@@ -1470,7 +1470,9 @@ public class OrderServiceImpl implements IOrderService {
/** /**
* 此单有在进行中的检修单或者经历过拆除,不能发起售后检修 * 此单有在进行中的检修单或者经历过拆除,不能发起售后检修
*/ */
List<SysOrder> repairs = orderDao.getAfterSaleRepairList(orderId, null); SysOrder repOrder = new SysOrder();
repOrder.setId(orderId);
List<SysOrder> repairs = orderDao.getAfterSaleRepairList(repOrder);
for (SysOrder order : repairs) { for (SysOrder order : repairs) {
Integer afterSaleType = order.getAfterSaleType(); Integer afterSaleType = order.getAfterSaleType();
Byte ordType = order.getOrderType(); Byte ordType = order.getOrderType();
...@@ -1757,7 +1759,12 @@ public class OrderServiceImpl implements IOrderService { ...@@ -1757,7 +1759,12 @@ public class OrderServiceImpl implements IOrderService {
if (page != null) { if (page != null) {
PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true); PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true);
} }
List<SysOrder> list = orderDao.getAfterSaleRepairList(orderId, queryContent); SysOrder repOrder = new SysOrder();
repOrder.setId(orderId);
repOrder.setQueryContent(queryContent);
repOrder.setCanceled((byte) BizConstants.ORDER_NOT_CANCELED);
repOrder.setActiveStatus((byte) OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_FINISH.getActiveStatus());
List<SysOrder> list = orderDao.getAfterSaleRepairList(repOrder);
for (SysOrder order : list) { for (SysOrder order : list) {
// 车辆信息信息 // 车辆信息信息
Integer serId=order.getCarSeries(); Integer serId=order.getCarSeries();
...@@ -1844,9 +1851,11 @@ public class OrderServiceImpl implements IOrderService { ...@@ -1844,9 +1851,11 @@ public class OrderServiceImpl implements IOrderService {
SysOrder sysOrder = orderDao.selectByPrimaryKey(orderId); SysOrder sysOrder = orderDao.selectByPrimaryKey(orderId);
/* /*
* 查该订单的售后列表,0:表示查所有的售后列表 * 查该订单的售后列表,查所有的售后列表
*/ */
List<SysOrder> repairs = orderDao.getAfterSaleRepairList(orderId, null); SysOrder repOrder = new SysOrder();
repOrder.setId(orderId);
List<SysOrder> repairs = orderDao.getAfterSaleRepairList(repOrder);
/* /*
* 取消分为取消有售后 和无售后两种,1.无售后,取消本身;2:有售后,取消售后单 * 取消分为取消有售后 和无售后两种,1.无售后,取消本身;2:有售后,取消售后单
......
...@@ -655,7 +655,7 @@ ...@@ -655,7 +655,7 @@
ORDER BY count desc ORDER BY count desc
</select> </select>
<select id="getAfterSaleRepairList" resultMap="BaseResultMap"> <select id="getAfterSaleRepairList" parameterType="com.glsx.ordercenter.pojo.SysOrder" resultMap="BaseResultMap">
<if test="queryContent != null and queryContent != ''"> <if test="queryContent != null and queryContent != ''">
<bind name="queryContent" value="'%' + queryContent + '%'"/> <bind name="queryContent" value="'%' + queryContent + '%'"/>
</if> </if>
...@@ -673,8 +673,13 @@ ...@@ -673,8 +673,13 @@
sys_order_repair sor sys_order_repair sor
LEFT JOIN sys_order so on sor.sub_order_id = so.id LEFT JOIN sys_order so on sor.sub_order_id = so.id
<where> <where>
sor.order_id = #{orderId} sor.order_id = #{id}
and so.canceled = 1 <if test="canceled != null">
and so.canceled = #{canceled}
</if>
<if test="activeStatus != null">
and so.active_status = #{activeStatus}
</if>
<if test="queryContent != null and queryContent != ''"> <if test="queryContent != null and queryContent != ''">
and (so.order_sn like #{queryContent} or so.vin_no like #{queryContent} or so.car_owner like #{queryContent}) and (so.order_sn like #{queryContent} or so.vin_no like #{queryContent} or so.car_owner like #{queryContent})
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!