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