md
This commit is contained in:
parent
d3bad9b7c8
commit
1b34aabeea
@ -366,8 +366,21 @@ public class Oms2cWaybillController extends BaseController
|
||||
return AjaxResult.success("成功",emisWaybillService.selectUserSendAndReciveOrderCount(getLoginUser().getUser().getCustomerCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我订单统计信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getOmsOrderStatInfo")
|
||||
public AjaxResult getOmsOrderStatInfo()
|
||||
{
|
||||
return AjaxResult.success("成功",emisWaybillService.getOmsOrderStatInfo(getLoginUser().getUser().getCustomerCode()));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getLatestMonthCreateOrderMapLis")
|
||||
public AjaxResult getLatestMonthCreateOrderMapLis()
|
||||
{
|
||||
return AjaxResult.success("成功",emisWaybillService.selectLatestMonthCreateOrderMapList(getLoginUser().getUser().getCustomerCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定月结卡号
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.xdadan.erp.oms.domain.stat;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* OMS 订单统计
|
||||
*/
|
||||
@Data
|
||||
public class OmsOrderPayStatInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 待付款
|
||||
private Integer waitPayMoney;
|
||||
|
||||
// 已付款
|
||||
private Integer payedMoney;
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.xdadan.erp.oms.domain.stat;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* OMS 订单统计
|
||||
*/
|
||||
@Data
|
||||
public class OmsOrderStatInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 问题件数
|
||||
private Integer issueCount;
|
||||
|
||||
// 总订单数
|
||||
private Integer totalCount;
|
||||
|
||||
// 待接单
|
||||
private Integer waitGotCount;
|
||||
|
||||
// 运输中
|
||||
private Integer transCount;
|
||||
|
||||
// 派送中
|
||||
private Integer dispatchCount;
|
||||
|
||||
// 已签收
|
||||
private Integer signCount;
|
||||
|
||||
|
||||
}
|
||||
@ -15,6 +15,7 @@ import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.oms.domain.EmisWaybill;
|
||||
import com.xdadan.erp.oms.domain.stat.OmsOrderStatInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@ -38,6 +39,14 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
|
||||
*/
|
||||
public List<EmisWaybill> selectUserOrderList(EmisWaybill emisWaybill);
|
||||
|
||||
|
||||
/**
|
||||
* 获取最近一个个下单统计
|
||||
* @param customerCode
|
||||
* @return
|
||||
*/
|
||||
public List<Map> selectLatestMonthCreateOrderMapList(@Param("customerCode") String customerCode);
|
||||
|
||||
/**
|
||||
* 获取寄件订单数量
|
||||
* @param customerCode
|
||||
@ -45,6 +54,8 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
|
||||
*/
|
||||
public Long selectUserSendOrderCount(@Param("customerCode") String customerCode);
|
||||
|
||||
public OmsOrderStatInfo selectOmsOrderStatInfo(@Param("customerCode") String customerCode);
|
||||
|
||||
|
||||
/**
|
||||
* 获取收件订单数量
|
||||
|
||||
@ -14,6 +14,7 @@ import java.util.Map;
|
||||
|
||||
import com.xdadan.erp.oms.domain.EmisWaybill;
|
||||
import com.xdadan.erp.oms.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.oms.domain.stat.OmsOrderStatInfo;
|
||||
import com.xdadan.erp.oms.domain.vo.Salesmen;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -33,9 +34,13 @@ public interface IEmisWaybillService
|
||||
*/
|
||||
public List<EmisWaybill> selectUserOrderList(EmisWaybill emisWaybill);
|
||||
|
||||
public List<Map> selectLatestMonthCreateOrderMapList(String customerCode);
|
||||
|
||||
|
||||
public Map selectUserSendAndReciveOrderCount(String customerCode);
|
||||
|
||||
public OmsOrderStatInfo getOmsOrderStatInfo(String customerCode);
|
||||
|
||||
|
||||
public List<Map> selectUserBindSalesmenList(Salesmen salesmen);
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ import com.xdadan.erp.oms.common.utils.SecurityUtils;
|
||||
import com.xdadan.erp.oms.domain.*;
|
||||
import com.xdadan.erp.oms.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.oms.domain.enumtype.EmisBizErrorType;
|
||||
import com.xdadan.erp.oms.domain.stat.OmsOrderStatInfo;
|
||||
import com.xdadan.erp.oms.domain.vo.*;
|
||||
import com.xdadan.erp.oms.mapper.EmisTransLineMapper;
|
||||
import com.xdadan.erp.oms.service.*;
|
||||
@ -76,6 +77,23 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
return cntMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取OMS 首页统计数据
|
||||
* @param customerCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OmsOrderStatInfo getOmsOrderStatInfo(String customerCode)
|
||||
{
|
||||
return emisWaybillMapper.selectOmsOrderStatInfo(customerCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> selectLatestMonthCreateOrderMapList(String customerCode)
|
||||
{
|
||||
return emisWaybillMapper.selectLatestMonthCreateOrderMapList(customerCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务员
|
||||
*
|
||||
|
||||
@ -213,12 +213,61 @@
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="OmsOrderStatInfo" id="OmsOrderStatInfoResult">
|
||||
|
||||
<result property="issueCount" column="issueCount" />
|
||||
<result property="totalCount" column="totalCount" />
|
||||
<result property="waitGotCount" column="waitGotCount" />
|
||||
<result property="transCount" column="transCount" />
|
||||
<result property="dispatchCount" column="dispatchCount" />
|
||||
<result property="signCount" column="signCount" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="EmisWaybillResult" extends="BaseEmisWaybillResult" type="EmisWaybill">
|
||||
<!-- 获取订单最后一条扫描记录 -->
|
||||
<!-- <association property="lastScanRecord" column="bill_code" select="com.xdadan.erp.emis.mapper.EmisTmsScanRecordMapper.selectLastRecordBaseInfoByBillCode"/>-->
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectOmsOrderStatInfo" parameterType="String" resultMap="OmsOrderStatInfoResult">
|
||||
SELECT
|
||||
tb1.totalCount,
|
||||
tb2.issueCount,
|
||||
tb3.waitGotCount,
|
||||
tb4.transCount,
|
||||
tb5.dispatchCount,
|
||||
tb6.signCount
|
||||
FROM
|
||||
( SELECT count( 1 ) AS totalCount FROM emis_waybill WHERE del_flag='0' and customer_code = #{customerCode}
|
||||
) tb1,
|
||||
( SELECT count( 1 ) AS issueCount FROM emis_waybill WHERE del_flag='0' and bl_is_question = '1' AND customer_code = #{customerCode}
|
||||
) tb2,
|
||||
( SELECT count( 1 ) AS waitGotCount FROM emis_waybill WHERE del_flag='0' and order_status = '0' AND waybill_status = 0 AND customer_code = #{customerCode}
|
||||
) tb3,
|
||||
( SELECT count( 1 ) AS transCount FROM emis_waybill WHERE del_flag='0' and order_status != '2' AND waybill_status != 0 AND bl_sign != '1' AND customer_code = #{customerCode}
|
||||
) tb4,
|
||||
( SELECT count( 1 ) AS dispatchCount FROM emis_waybill WHERE del_flag='0' and order_status != '2' AND waybill_status = '40' AND bl_sign != '1' AND customer_code = #{customerCode}
|
||||
) tb5,
|
||||
( SELECT count( 1 ) AS signCount FROM emis_waybill WHERE del_flag='0' and bl_sign = '1' AND customer_code = #{customerCode}
|
||||
) tb6
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectLatestMonthCreateOrderMapList" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' ) AS createDay,
|
||||
count( 1 ) AS totalNum
|
||||
FROM
|
||||
emis_waybill
|
||||
WHERE
|
||||
create_time >= DATE_SUB( CURDATE(), INTERVAL 1 MONTH ) and customer_code = #{customerCode}
|
||||
GROUP BY
|
||||
createDay
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 其他基本信息 a.bill_code_sub, 列表中不要显示子单 -->
|
||||
<sql id="selectEmisWaybillVo">
|
||||
select
|
||||
|
||||
Loading…
Reference in New Issue
Block a user