Commit 77e1f49c authored by machengbo's avatar machengbo

平台 我的订单 和 订单交易明细

parent 6910b82f
...@@ -6,38 +6,51 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -6,38 +6,51 @@ import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
* 平台利润中心--累计收入和企业总数 * 平台利润中心--我的订单--返回对象
* *
* @author Bellamy * @author Bellamy
* @since 2020-12-01 10:41:43 * @since 2020-12-01 10:41:43
*/ */
@ApiModel(value = "累计收入和企业总数返回对象", description = "累计收入和企业总数返回对象") @ApiModel(value = "我的订单--返回对象", description = "我的订单--返回对象")
public class OrderCountInfoDto { public class OrderCountInfoDto {
/** /**
* 累计收入 * 订单金额
*/ */
@ApiModelProperty(value = "累计收入") @ApiModelProperty(value = "订单金额")
private BigDecimal platformReceiveMoney; private BigDecimal orderMoney;
/** /**
* 企业总数 * 订单时间
*/ */
@ApiModelProperty(value = "企业总数") @ApiModelProperty(value = "订单时间")
private String departTotal; private String orderTime;
/**
* 订单总数
*/
@ApiModelProperty(value = "订单总数")
private String orderTotal;
public BigDecimal getOrderMoney() {
return orderMoney;
}
public void setOrderMoney(BigDecimal orderMoney) {
this.orderMoney = orderMoney;
}
public BigDecimal getPlatformReceiveMoney() { public String getOrderTime() {
return platformReceiveMoney; return orderTime;
} }
public void setPlatformReceiveMoney(BigDecimal platformReceiveMoney) { public void setOrderTime(String orderTime) {
this.platformReceiveMoney = platformReceiveMoney; this.orderTime = orderTime;
} }
public String getDepartTotal() { public String getOrderTotal() {
return departTotal; return orderTotal;
} }
public void setDepartTotal(String departTotal) { public void setOrderTotal(String orderTotal) {
this.departTotal = departTotal; this.orderTotal = orderTotal;
} }
} }
\ No newline at end of file
...@@ -4,8 +4,6 @@ import com.jz.common.bean.BasePageBean; ...@@ -4,8 +4,6 @@ import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/** /**
* 平台利润中心--财务管理交易明细参数对象 * 平台利润中心--财务管理交易明细参数对象
* *
...@@ -19,7 +17,7 @@ public class TradeDetilRequest extends BasePageBean { ...@@ -19,7 +17,7 @@ public class TradeDetilRequest extends BasePageBean {
* 企业名 * 企业名
*/ */
@ApiModelProperty(value = "企业名") @ApiModelProperty(value = "企业名")
private BigDecimal departmentName; private String departmentName;
/** /**
* 数据名称 * 数据名称
*/ */
...@@ -38,11 +36,11 @@ public class TradeDetilRequest extends BasePageBean { ...@@ -38,11 +36,11 @@ public class TradeDetilRequest extends BasePageBean {
@ApiModelProperty(value = "订单方式") @ApiModelProperty(value = "订单方式")
private String orderMethod; private String orderMethod;
public BigDecimal getDepartmentName() { public String getDepartmentName() {
return departmentName; return departmentName;
} }
public void setDepartmentName(BigDecimal departmentName) { public void setDepartmentName(String departmentName) {
this.departmentName = departmentName; this.departmentName = departmentName;
} }
......
...@@ -11,6 +11,7 @@ import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto; ...@@ -11,6 +11,7 @@ import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilRequest; import com.jz.manage.moduls.controller.finance.platForm.TradeDetilRequest;
import com.jz.manage.moduls.mapper.PlatformTradeFlowInfoDao; import com.jz.manage.moduls.mapper.PlatformTradeFlowInfoDao;
import com.jz.manage.moduls.service.PlatformTradeFlowInfoService; import com.jz.manage.moduls.service.PlatformTradeFlowInfoService;
import org.apache.commons.lang3.StringUtils;
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 org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -38,6 +39,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe ...@@ -38,6 +39,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
return platformTradeFlowInfoDao.queryPlatFormMoneyAndDepart(map); return platformTradeFlowInfoDao.queryPlatFormMoneyAndDepart(map);
} }
/*
* 财务管理---我的订单
* */
@Override @Override
public PageInfoResponse<OrderCountInfoDto> findListOrderCount(BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception { public PageInfoResponse<OrderCountInfoDto> findListOrderCount(BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<OrderCountInfoDto> pageInfoResponse = new PageInfoResponse<>(); PageInfoResponse<OrderCountInfoDto> pageInfoResponse = new PageInfoResponse<>();
...@@ -57,6 +61,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe ...@@ -57,6 +61,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
return pageInfoResponse; return pageInfoResponse;
} }
/*
* 财务管理--交易明细
* */
@Override @Override
public PageInfoResponse<TradeDetilDto> findListFinanceTradeDetil(TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception { public PageInfoResponse<TradeDetilDto> findListFinanceTradeDetil(TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<TradeDetilDto> pageInfoResponse = new PageInfoResponse<>(); PageInfoResponse<TradeDetilDto> pageInfoResponse = new PageInfoResponse<>();
...@@ -64,7 +71,23 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe ...@@ -64,7 +71,23 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
Map param = new HashMap(); Map param = new HashMap();
//从session中获取平台用户id //从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser"); //SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId()); //param.put("userId", user.getUserId());
//数据行业
if (StringUtils.isNotEmpty(tradeDetilRequest.getCategoryId())) {
param.put("categoryId", tradeDetilRequest.getCategoryId());
}
//订单方式
if (StringUtils.isNotEmpty(tradeDetilRequest.getOrderMethod())) {
param.put("orderMethod", tradeDetilRequest.getOrderMethod());
}
//企业名
if (StringUtils.isNotEmpty(tradeDetilRequest.getDepartmentName())) {
param.put("departmentName", tradeDetilRequest.getDepartmentName());
}
//数据名称
if (StringUtils.isNotEmpty(tradeDetilRequest.getDataName())) {
param.put("dataName", tradeDetilRequest.getDataName());
}
PageHelper.startPage(tradeDetilRequest.getPageNum(), tradeDetilRequest.getPageSize()); PageHelper.startPage(tradeDetilRequest.getPageNum(), tradeDetilRequest.getPageSize());
List<TradeDetilDto> list = platformTradeFlowInfoDao.findListFinanceTradeDetil(param); List<TradeDetilDto> list = platformTradeFlowInfoDao.findListFinanceTradeDetil(param);
......
...@@ -137,12 +137,41 @@ ...@@ -137,12 +137,41 @@
)t2 )t2
</select> </select>
<!--平台利润中心,我的订单-->
<select id="findListOrderCount" resultType="com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto" parameterType="map"> <select id="findListOrderCount" resultType="com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto" parameterType="map">
select
order_time as orderTime,
ifnull(sum(order_money),'0') as orderMoney,
count(order_id) as orderTotal
from t_order t1
group by date_format(order_time,'%Y-%m-%d')
order by date_format(order_time,'%Y-%m-%d') desc
</select> </select>
<!--平台利润中心,订单交易明细-->
<select id="findListFinanceTradeDetil" resultType="com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto" parameterType="map"> <select id="findListFinanceTradeDetil" resultType="com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto" parameterType="map">
select
t1.order_id,
t1.order_number as orderNumber,
t1.order_time as orderTime,
t1.order_money as orderMoney,
(case when t1.payment_method ='01' then '余额' else '其他' end) as paymentMethod,
(case when t1.purchase_method ='01' then '年' when t1.purchase_method ='02' then '季' when t1.purchase_method ='03' then '月'
when t1.purchase_method ='04' then '次' end) as purchaseMethod
t3.data_name as dataName,
t3.category_id as categoryId,
t5.department_name as departmentName
from t_order t1
inner join t_order_goods_info t2 on t1.order_id=t2.order_id
inner join t_data_goods t3 on t2.data_goods_id=t3.data_goods_id
left join t_mall_customer t4 on t4.customer_id=t1.customer_id and t4.del_flag='N'
left join t_department t5 on t5.department_id=t1.department_id and t5.del_flag='N'
where 1=1 and t1.order_status='02' and t1.del_flag='N'
<if test="creTime != null">and date_format(t1.cre_time,'%Y-%m-%d')= #{creTime}</if>
<if test="departmentName != null">and t5.department_name like concat('%',#{departmentName},'%')</if>
<if test="dataName != null">and t3.data_name like concat('%',#{dataName},'%')</if>
<if test="categoryId != null">and t3.category_id = #{categoryId}</if>
<if test="orderMethod != null">and t1.purchase_method = #{orderMethod}</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment