Commit feab29a6 by wangnb

包活干V2.0.0订单管理查询功能完善--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@28230 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent ecb70230
......@@ -152,26 +152,23 @@ public class ReportController extends BaseReportController {
}
@RequestMapping(value = "/exportOrder", method = {RequestMethod.GET, RequestMethod.POST})
public void exportOrder(HttpServletRequest request, HttpServletResponse response,
QueryOrderReq orderReq) {
public void exportOrder(HttpServletRequest request, HttpServletResponse response, QueryOrderReq orderReq) {
List<ExportOrderVo> list1 = new ArrayList<>();
orderReq.setUserId(UserUtils.getUserId(request));
JSONObject user = this.userClient.getUserById(orderReq.getUserId());
int userType = user.getIntValue("userType");
orderReq.setUserType(userType);
// 先不获取详细数据,只查出所有总数
orderReq.setNeedMoreInfo(false);
int totalSize = this.orderService.getOrderListByExample(null, null, orderReq).size();
int totalSize = orderService.getOrderListByExample(null, null, orderReq).size();
if (totalSize > 10000) {
throw SysException.create(ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getCode(),
ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getMsg());
}
// 开始获取详细数据
orderReq.setNeedMoreInfo(true);
List<SysOrder> list = this.orderService.getOrderListByExample(null, null, orderReq);
List<SysOrder> list = orderService.getOrderListByExample(null, null, orderReq);
if (!list.isEmpty()) {
for (SysOrder sysOrder : list) {
ExportOrderVo exportOrderVo = new ExportOrderVo();
......@@ -181,9 +178,8 @@ public class ReportController extends BaseReportController {
} else {
exportOrderVo.setServiceType("驻店");
}
exportOrderVo.setActiveStatus(
this.tranceActiveStatus(sysOrder.getActiveStatus(), userType,
sysOrder.getCanceled()));
exportOrderVo.setActiveStatus(this.tranceActiveStatus(sysOrder.getActiveStatus(), userType,
sysOrder.getCanceled()));
if (sysOrder.getMachanicInfo() != null) {
exportOrderVo.setMechanicInfo(
sysOrder.getMachanicInfo().getName() + "\n" + sysOrder.getMachanicInfo()
......
......@@ -1421,26 +1421,26 @@
or so.vin_no like "%"#{keyWord}"%"
or so.work_order_no like "%"#{keyWord}"%")
</if>
<if test="carBrand != null">
and so.car_brand = #{carBrand}
<if test="carBrand != null ">
AND so.car_brand = #{carBrand}
</if>
<if test="carSeries != null">
and so.car_series = #{carSeries}
<if test="carSeries != null ">
AND so.car_series = #{carSeries}
</if>
<if test="carOwnerPhone != null and carOwnerPhone != ''">
and so.car_owner_phone like "%"#{carOwnerPhone}"%"
AND so.car_owner_phone LIKE "%"#{carOwnerPhone}"%"
</if>
<choose>
<when test="subsidy == 1">
and sos.id IS NOT NULL
AND sos.id IS NOT NULL
</when>
<when test="subsidy == 0">
and sos.id IS NULL
AND sos.id IS NULL
</when>
</choose>
and so.order_type != 4 and so.order_type != 5
AND so.order_type IN (1,2,3)
GROUP BY so.id
order by so.create_time desc
ORDER BY so.create_time DESC
</select>
<insert id="insertUserOrder">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!