Commit 37a25d72 by zhangjing

PC端竞价单管理 - 导出和微调

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@23377 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent f25affa0
......@@ -31,7 +31,7 @@ import java.util.Objects;
* @version 1.4.0
*/
@RestController
@RequestMapping("/orderBidding")
@RequestMapping("/biddingOrder")
public class BiddingOrderController extends BaseController {
@Autowired
......
......@@ -206,7 +206,7 @@ public class ReportController extends BaseReportController {
}
@Autowired
private IOrderBiddingService orderBiddingService;
private IBiddingOrderService biddingOrderService;
/**
* 竞价单导出
......@@ -220,8 +220,8 @@ public class ReportController extends BaseReportController {
public void exportBiddingOrder(HttpServletRequest request, HttpServletResponse response, QueryOrderReq oueryOrderReq) {
List<ExportOrderVo> list1 = new ArrayList<>();
oueryOrderReq.setUserId(UserUtils.getUserId(request));
List<SysOrder> list = orderBiddingService.getBiddingOrderListByExample(null, null, oueryOrderReq);
if (list.size() > 10000) { //todo 数据量大于1万以后无法导出?
List<SysOrder> list = biddingOrderService.getBiddingOrderListByExample(null, null, oueryOrderReq);
if (list.size() > 10000) {
throw SysException.create(ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getCode(), ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getMsg());
}
if (list.size() > 0) {
......
......@@ -59,7 +59,11 @@ public class QueryOrderReq implements Serializable {
private String reserveInstallTimeEnd;
private String serviceName;
private Integer orderType;
/**
* v1.4新增 竞价列表
* 订单编号/商户名称 模糊查询
*/
private String conditions;
/**
* 竞价单指派日期
*/
......@@ -142,6 +146,14 @@ public class QueryOrderReq implements Serializable {
return vinNo;
}
public String getConditions() {
return conditions;
}
public void setConditions(String conditions) {
this.conditions = conditions;
}
public void setVinNo(String vinNo) {
this.vinNo = vinNo;
}
......
......@@ -32,4 +32,11 @@ public interface SysBiddingOrderMapper {
int updateByPrimaryKey(SysOrder record);
/**
* PC端竞价单管理--列表
*
* @param oueryOrderReq
* @return
*/
List<SysOrder> getBiddingOrderList(QueryOrderReq oueryOrderReq);
}
\ No newline at end of file
......@@ -4,7 +4,10 @@
<mapper namespace="com.glsx.ordercenter.mapper.biddingorder.SysBiddingOrderMapper">
<!--新增PC端竞价单管理SQL脚本文件 v1.4.0 2019/8/13 jin-->
<select id="getOrderListByExample" resultType="com.glsx.ordercenter.pojo.SysOrder">
<select id="getBiddingOrderList" resultType="com.glsx.ordercenter.pojo.SysOrder">
<if test="conditions != null ">
<bind name="conditions" value="'%' + conditions + '%'"/>
</if>
select
DISTINCT
so.id id,
......@@ -15,6 +18,7 @@
so.shop_id shopId,
so.address address,
so.create_time createTime,
CONCAT(TIMEDIFF(NOW(),so.create_time),'') noBidingDuration,
so.mechanic_id mechanicId,
so.install_device_type installDeviceType,
so.service_type serviceType,
......@@ -27,7 +31,8 @@
dd.data_value as installDeviceTypeName,
so.reserve_install_time reserveInstallTime,
sd.data_value reserveInstallReason,
sc.name serviceName
sc.name serviceName,
FROM
<choose>
<when test="userId == 0">
......@@ -41,6 +46,8 @@
LEFT JOIN sys_area d ON d.id = so.district
LEFT JOIN sys_area c ON d.parent_id = c.id
LEFT JOIN sys_area p ON c.parent_id = p.id
LEFT JOIN sys_order_service_type os ON os.order_id = so.id
LEFT JOIN sys_order_service_type os ON os.order_id = so.id
WHERE so.active_status &lt;&gt; 9
</when>
<otherwise>
......@@ -88,6 +95,9 @@
AND (so.shop_id) IS NOT NULL
)
)
<if test="conditions != null and orderSn!=''">
and (so.order_sn like "%"#{conditions}"%" or ssm.shop_name like "%"#{conditions}"%")
</if>
<if test="orderSn != null and orderSn!=''">
and so.order_sn like "%"#{orderSn}"%"
</if>
......@@ -216,7 +226,7 @@
and (sm.name like "%"#{machanicInfo}"%" or sm.phone_number like "%"#{machanicInfo}"%" )
and sm.user_type = 3
</if>
order by so.create_time desc
and so.order_type=4 order by noBidingDuration desc
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!