fix
This commit is contained in:
parent
f888a77581
commit
11e250dd21
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.bonus.zlpt.common.core.domain.order.vo;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
||||||
|
|
||||||
|
public class OrderInfoVo extends OrderInfo {
|
||||||
|
/* 装备类别 grandpa */
|
||||||
|
private String typeName;
|
||||||
|
/* 装备组别 parent */
|
||||||
|
private String groupName;
|
||||||
|
/* 装备名称 child */
|
||||||
|
private String deviceName;
|
||||||
|
private Long maId;
|
||||||
|
private String order_phone;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.zlpt.order.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
||||||
import com.bonus.zlpt.common.core.utils.poi.ExcelUtil;
|
import com.bonus.zlpt.common.core.utils.poi.ExcelUtil;
|
||||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||||
|
|
@ -10,6 +11,7 @@ import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.zlpt.common.log.annotation.Log;
|
import com.bonus.zlpt.common.log.annotation.Log;
|
||||||
import com.bonus.zlpt.common.log.enums.BusinessType;
|
import com.bonus.zlpt.common.log.enums.BusinessType;
|
||||||
import com.bonus.zlpt.common.security.annotation.RequiresPermissions;
|
import com.bonus.zlpt.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.bonus.zlpt.order.feign.EquipClient;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
@ -33,16 +35,18 @@ public class OrderInfoController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOrderInfoService orderInfoService;
|
private IOrderInfoService orderInfoService;
|
||||||
|
@Autowired
|
||||||
|
EquipClient equipClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单信息列表
|
* 查询订单信息列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("order:info:list")
|
@RequiresPermissions("order:info:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(OrderInfo orderInfo)
|
public TableDataInfo list(OrderInfoVo orderInfo)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
List<OrderInfoVo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,10 +56,10 @@ public class OrderInfoController extends BaseController
|
||||||
@RequiresPermissions("order:info:export")
|
@RequiresPermissions("order:info:export")
|
||||||
@Log(title = "订单信息", businessType = BusinessType.EXPORT)
|
@Log(title = "订单信息", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, OrderInfo orderInfo)
|
public void export(HttpServletResponse response, OrderInfoVo orderInfo)
|
||||||
{
|
{
|
||||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
List<OrderInfoVo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||||
ExcelUtil<OrderInfo> util = new ExcelUtil<OrderInfo>(OrderInfo.class);
|
ExcelUtil<OrderInfoVo> util = new ExcelUtil<OrderInfoVo>(OrderInfoVo.class);
|
||||||
util.exportExcel(response, list, "订单信息数据");
|
util.exportExcel(response, list, "订单信息数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.order.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
||||||
|
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单信息Mapper接口
|
* 订单信息Mapper接口
|
||||||
|
|
@ -25,7 +26,7 @@ public interface OrderInfoMapper
|
||||||
* @param orderInfo 订单信息
|
* @param orderInfo 订单信息
|
||||||
* @return 订单信息集合
|
* @return 订单信息集合
|
||||||
*/
|
*/
|
||||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
public List<OrderInfoVo> selectOrderInfoList(OrderInfoVo orderInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增订单信息
|
* 新增订单信息
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.order.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
||||||
|
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单信息Service接口
|
* 订单信息Service接口
|
||||||
|
|
@ -25,7 +26,7 @@ public interface IOrderInfoService
|
||||||
* @param orderInfo 订单信息
|
* @param orderInfo 订单信息
|
||||||
* @return 订单信息集合
|
* @return 订单信息集合
|
||||||
*/
|
*/
|
||||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
public List<OrderInfoVo> selectOrderInfoList(OrderInfoVo orderInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增订单信息
|
* 新增订单信息
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.bonus.zlpt.order.service.impl;
|
package com.bonus.zlpt.order.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.zlpt.order.mapper.OrderInfoMapper;
|
import com.bonus.zlpt.order.mapper.OrderInfoMapper;
|
||||||
|
|
@ -38,7 +40,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
||||||
* @return 订单信息
|
* @return 订单信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo)
|
public List<OrderInfoVo> selectOrderInfoList(OrderInfoVo orderInfo)
|
||||||
{
|
{
|
||||||
return orderInfoMapper.selectOrderInfoList(orderInfo);
|
return orderInfoMapper.selectOrderInfoList(orderInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,20 +22,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select order_id, p_id, code, time, deposit, cost, pay_type, supplier, order_status, order_user, order_company from ma_order_info
|
select order_id, p_id, code, time, deposit, cost, pay_type, supplier, order_status, order_user, order_company from ma_order_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectOrderInfoList" parameterType="com.bonus.zlpt.common.core.domain.order.OrderInfo" resultMap="OrderInfoResult">
|
<select id="selectOrderInfoList" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
|
||||||
<include refid="selectOrderInfoVo"/>
|
select o.*,d.phone as order_phone,d.ma_id
|
||||||
|
from ma_order_info o
|
||||||
|
left join ma_order_details d on o.order_id=d.order_id
|
||||||
<where>
|
<where>
|
||||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
<if test="orderId != null "> and o.order_id = #{orderId}</if>
|
||||||
<if test="pId != null "> and p_id = #{pId}</if>
|
<if test="pId != null "> and o.p_id = #{pId}</if>
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
<if test="code != null and code != ''"> and o.code = #{code}</if>
|
||||||
<if test="time != null and time != ''"> and time = #{time}</if>
|
<if test="time != null and time != ''"> and o.time = #{time}</if>
|
||||||
<if test="deposit != null "> and deposit = #{deposit}</if>
|
<if test="deposit != null "> and o.deposit = #{deposit}</if>
|
||||||
<if test="cost != null "> and cost = #{cost}</if>
|
<if test="cost != null "> and o.cost = #{cost}</if>
|
||||||
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
<if test="payType != null and payType != ''"> and o.pay_type = #{payType}</if>
|
||||||
<if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if>
|
<if test="supplier != null and supplier != ''"> and o.supplier = #{supplier}</if>
|
||||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
<if test="orderStatus != null and orderStatus != ''"> and o.order_status = #{orderStatus}</if>
|
||||||
<if test="orderUser != null "> and order_user = #{orderUser}</if>
|
<if test="orderUser != null "> and o.order_user = #{orderUser}</if>
|
||||||
<if test="orderCompany != null and orderCompany != ''"> and order_company = #{orderCompany}</if>
|
<if test="orderCompany != null and orderCompany != ''"> and o.order_company = #{orderCompany}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue