Merge pull request 'develop' (#234) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/234
This commit is contained in:
commit
5bb627f793
@ -26,74 +26,92 @@ public class MonthlyCustomerShipmentStatVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
/* 客户编号 */
|
||||
private String customerCode;
|
||||
|
||||
/* 月结卡号 */
|
||||
@Excel(name = "月结卡号")
|
||||
private String custNo;
|
||||
|
||||
/* 总票数 */
|
||||
@Excel(name = "总票数")
|
||||
private Integer totalTickets;
|
||||
|
||||
/* 总重量 */
|
||||
@Excel(name = "总重量")
|
||||
private BigDecimal totalWeight;
|
||||
|
||||
/* 销售联系人(多个用/分隔) */
|
||||
@Excel(name = "销售联系人")
|
||||
private String salesmen;
|
||||
|
||||
/* 快递票数 */
|
||||
@Excel(name = "快递票数")
|
||||
private Integer expressTickets;
|
||||
|
||||
/* 快递实际重量 */
|
||||
@Excel(name = "快递实际重量")
|
||||
private BigDecimal expressWeight;
|
||||
|
||||
/* 空运票数 */
|
||||
@Excel(name = "空运票数")
|
||||
private Integer airTickets;
|
||||
|
||||
/* 空运实际重量 */
|
||||
@Excel(name = "空运实际重量")
|
||||
private BigDecimal airWeight;
|
||||
|
||||
/* 陆运票数 */
|
||||
@Excel(name = "陆运票数")
|
||||
private Integer landTickets;
|
||||
|
||||
/* 陆运实际重量 */
|
||||
@Excel(name = "陆运实际重量")
|
||||
private BigDecimal landWeight;
|
||||
|
||||
/* 海运票数 */
|
||||
@Excel(name = "海运票数")
|
||||
private Integer seaTickets;
|
||||
|
||||
/* 海运实际重量 */
|
||||
@Excel(name = "海运实际重量")
|
||||
private BigDecimal seaWeight;
|
||||
|
||||
/* 进口票数 */
|
||||
@Excel(name = "进口票数")
|
||||
private Integer importTickets;
|
||||
|
||||
/* 进口实际重量 */
|
||||
@Excel(name = "进口实际重量")
|
||||
private BigDecimal importWeight;
|
||||
|
||||
/* 其他票数 */
|
||||
@Excel(name = "其他票数")
|
||||
private Integer otherTickets;
|
||||
|
||||
/* 其他实际重量 */
|
||||
@Excel(name = "其他实际重量")
|
||||
private BigDecimal otherWeight;
|
||||
|
||||
/* 中国票数 */
|
||||
private Integer chinaTickets;
|
||||
/* 中国实际重量 */
|
||||
private BigDecimal chinaWeight;
|
||||
|
||||
/* 越南票数 */
|
||||
private Integer vietnamTickets;
|
||||
/* 越南实际重量 */
|
||||
private BigDecimal vietnamWeight;
|
||||
|
||||
/* 柬埔寨票数 */
|
||||
private Integer cambodiaTickets;
|
||||
/* 柬埔寨实际重量 */
|
||||
private BigDecimal cambodiaWeight;
|
||||
|
||||
/* 缅甸票数 */
|
||||
private Integer myanmarTickets;
|
||||
/* 缅甸实际重量 */
|
||||
private BigDecimal myanmarWeight;
|
||||
|
||||
/* 孟加拉票数 */
|
||||
private Integer bangladeshTickets;
|
||||
/* 孟加拉实际重量 */
|
||||
private BigDecimal bangladeshWeight;
|
||||
|
||||
/* 老挝票数 */
|
||||
private Integer laosTickets;
|
||||
/* 老挝实际重量 */
|
||||
private BigDecimal laosWeight;
|
||||
|
||||
/* 泰国票数 */
|
||||
private Integer thailandTickets;
|
||||
/* 泰国实际重量 */
|
||||
private BigDecimal thailandWeight;
|
||||
}
|
||||
|
||||
|
||||
@ -373,6 +373,14 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
|
||||
*/
|
||||
List<MonthlyCustomerShipmentStatVO> selectMonthlyCustomerShipmentStat(EmisWaybill emisWaybill);
|
||||
|
||||
/**
|
||||
* 按目的国家查询月结客户出货统计
|
||||
*
|
||||
* @param emisWaybill 查询条件
|
||||
* @return 统计结果列表
|
||||
*/
|
||||
List<MonthlyCustomerShipmentStatVO> selectMonthlyCustomerShipmentStatByCountry(EmisWaybill emisWaybill);
|
||||
|
||||
/**
|
||||
* 查询月结客户出货明细
|
||||
*
|
||||
|
||||
@ -11,8 +11,6 @@
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.xdadan.erp.common.utils.SecurityUtils;
|
||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||
@ -162,7 +160,12 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
|
||||
*/
|
||||
@Override
|
||||
public List<MonthlyCustomerShipmentStatVO> selectMonthlyCustomerShipmentStat(EmisWaybill emisWaybill) {
|
||||
return emisWaybillMapper.selectMonthlyCustomerShipmentStat(emisWaybill);
|
||||
if("1".equals(emisWaybill.getParams().get("statType"))){
|
||||
// 按运输方式统计
|
||||
return emisWaybillMapper.selectMonthlyCustomerShipmentStat(emisWaybill);
|
||||
}
|
||||
// 按目的国家统计
|
||||
return emisWaybillMapper.selectMonthlyCustomerShipmentStatByCountry(emisWaybill);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -3174,17 +3174,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
if (StringUtils.isEmpty(billCode)) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号不能为空");
|
||||
}
|
||||
|
||||
|
||||
// 检查是否只包含数字、字母、横杠
|
||||
if (!billCode.matches("^[0-9a-zA-Z\\-]+$")) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号只能包含数字、字母和横杠");
|
||||
}
|
||||
|
||||
|
||||
// 检查横杠是否在两端
|
||||
if (billCode.startsWith("-") || billCode.endsWith("-")) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号横杠不能在两端");
|
||||
}
|
||||
|
||||
|
||||
// 检查是否有连续的横杠
|
||||
if (billCode.contains("--")) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号不能有连续的横杠");
|
||||
@ -3203,6 +3203,19 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
// 校验运单号格式
|
||||
validateBillCodeFormat(emisWaybillSave.getBillCode());
|
||||
|
||||
String blVirtual = emisWaybillSave.getBlVirtual();
|
||||
String masterBillCode = emisWaybillSave.getMasterBillCode();
|
||||
boolean masterBillCodeEmpty = StringUtils.isBlank(masterBillCode);
|
||||
if (masterBillCodeEmpty) {
|
||||
if ("1".equals(blVirtual)) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "主单号与虚拟单标识要么同时存在,要么同时为空");
|
||||
}
|
||||
} else {
|
||||
if (!"1".equals(blVirtual)) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "主单号与虚拟单标识要么同时存在,要么同时为空");
|
||||
}
|
||||
}
|
||||
|
||||
// 获取运单号,判断是不是子单已存在
|
||||
boolean isExists = checkWaybillIsExists(emisWaybillSave.getBillCode());
|
||||
if(isExists){
|
||||
|
||||
@ -391,6 +391,7 @@
|
||||
left join emis_site a2 on a.destination_center_code=a2.site_code and a2.del_flag='0'
|
||||
left join emis_site start on a.start_site_code=start.site_code and start.del_flag='0'
|
||||
left join emis_customer_user a3 on a.customer_code=a3.customer_code and a3.del_flag='0'
|
||||
left join emis_customer_user a4 on a.cust_no=a4.monthly_pay_code and a4.del_flag='0'
|
||||
left join emis_site seaway1 on a.departure_port=seaway1.site_code and seaway1.del_flag='0'
|
||||
left join emis_site seaway2 on a.destination_port=seaway2.site_code and seaway2.del_flag='0'
|
||||
|
||||
@ -4250,15 +4251,15 @@
|
||||
</if>
|
||||
<!-- 销售主管 -->
|
||||
<if test="salesExecutive != null and salesExecutive != ''">
|
||||
AND a3.sales_executive LIKE CONCAT('%', #{salesExecutive}, '%')
|
||||
AND a4.sales_executive LIKE CONCAT('%', #{salesExecutive}, '%')
|
||||
</if>
|
||||
<!-- 销售支持 -->
|
||||
<if test="salesSupport != null and salesSupport != ''">
|
||||
AND a3.sales_support LIKE CONCAT('%', #{salesSupport}, '%')
|
||||
AND a4.sales_support LIKE CONCAT('%', #{salesSupport}, '%')
|
||||
</if>
|
||||
<!-- 销售联系人 -->
|
||||
<if test="salesmen != null and salesmen != ''">
|
||||
AND a3.salesmen LIKE CONCAT('%', #{salesmen}, '%')
|
||||
AND a4.salesmen LIKE CONCAT('%', #{salesmen}, '%')
|
||||
</if>
|
||||
<!-- 运输方式筛选 -->
|
||||
<if test="transType != null and transType != ''">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user