Commit 62c647a0 authored by liuzeheng's avatar liuzeheng

控货

parent 72976dc8
...@@ -366,6 +366,34 @@ public class CustomerDO extends BaseDO { ...@@ -366,6 +366,34 @@ public class CustomerDO extends BaseDO {
@ApiModelProperty("延期申请次数") @ApiModelProperty("延期申请次数")
private int delayApprovalNum ; private int delayApprovalNum ;
/**
* 年度发货量
*/
private Integer annualShipmentAmount ;
/**
* 年度发货次数
*/
private Integer annualShipmentNum ;
/**
* 竞争对手
*/
private String competitor ;
/**
* 首次成交时间
*/
private Date firstDate ;
/**
* 获取获取方式
*/
private int getWay ;
/**
* 创建入口
*/
private int createEntrance ;
/** /**
* vip等级-中文 * vip等级-中文
*/ */
......
...@@ -4,9 +4,13 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; ...@@ -4,9 +4,13 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineDetailVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineExportReqVO; import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineExportReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLinePageReqVO; import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLinePageReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.vo.UserVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
...@@ -37,5 +41,23 @@ public interface CustomerLineMapper extends BaseMapperX<CustomerLineDO> { ...@@ -37,5 +41,23 @@ public interface CustomerLineMapper extends BaseMapperX<CustomerLineDO> {
.betweenIfPresent(CustomerLineDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .betweenIfPresent(CustomerLineDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
.orderByDesc(CustomerLineDO::getId)); .orderByDesc(CustomerLineDO::getId));
} }
@ResultType(CustomerLineDetailVO.class)
@Select("SELECT " +
"l.*, " +
" dep.title_zh as departureNameZh ," +
" dep.title_en as departureNameEn ," +
"GROUP_CONCAT(obje.title_zh) as objectiveNameZh," +
"GROUP_CONCAT(obje.title_en) as objectiveNameEn " +
"" +
"FROM " +
"ecw_customer_line l " +
"LEFT JOIN ecw_warehouse dep ON dep.id = l.departure_id AND dep.deleted = 0 " +
" LEFT JOIN ecw_warehouse obje ON FIND_IN_SET(obje.id,l.objective_ids) AND obje.deleted = 0 " +
"WHERE " +
"l.customer_id = #{customerId} " +
" AND l.deleted = 0 " +
"" +
"GROUP BY l.id" +
"")
List<CustomerLineDetailVO> getCustomerLineDataListByCustomerId(Long customerId);
} }
...@@ -72,7 +72,9 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> { ...@@ -72,7 +72,9 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
"n.title_zh as pickup_point_name_zh, n.title_en as pickup_point_name_en,", "n.title_zh as pickup_point_name_zh, n.title_en as pickup_point_name_en,",
"", "",
"c.customer_service,", "c.customer_service,",
"u.nickname as customer_service_name", "u.nickname as customer_service_name,",
"dict.label as resourceTypeName , " ,
"u2.nickname as updaterName" ,
"", "",
"from ecw_customer c", "from ecw_customer c",
"left join ecw_customer_level cl on c.level = cl.id", "left join ecw_customer_level cl on c.level = cl.id",
...@@ -82,6 +84,8 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> { ...@@ -82,6 +84,8 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
"left join ecw_product p on c.product_id = p.id", "left join ecw_product p on c.product_id = p.id",
"left join ecw_node n on c.pickup_point = n.id", "left join ecw_node n on c.pickup_point = n.id",
"left join system_user u on c.customer_service = u.id", "left join system_user u on c.customer_service = u.id",
"left join system_user u2 on c.updater = u2.id",
"left join system_dict_data dict ON c.resource_type =dict.value and dict.dict_type = 'customer_resource_type' " ,
"where c.id = #{id}", "where c.id = #{id}",
"</script>" "</script>"
}) })
......
...@@ -3,10 +3,7 @@ package cn.iocoder.yudao.module.customer.service.customer.line; ...@@ -3,10 +3,7 @@ package cn.iocoder.yudao.module.customer.service.customer.line;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService; import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineCreateReqVO; import cn.iocoder.yudao.module.customer.vo.customer.line.*;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineExportReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLinePageReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineUpdateReqVO;
import cn.iocoder.yudao.module.customer.vo.zhongPao.CustomerZhongPaoQueryVO; import cn.iocoder.yudao.module.customer.vo.zhongPao.CustomerZhongPaoQueryVO;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -73,5 +70,5 @@ public interface CustomerLineService extends IService<CustomerLineDO> { ...@@ -73,5 +70,5 @@ public interface CustomerLineService extends IService<CustomerLineDO> {
*/ */
List<CustomerLineDO> getCustomerLineList(CustomerLineExportReqVO exportReqVO); List<CustomerLineDO> getCustomerLineList(CustomerLineExportReqVO exportReqVO);
List<CustomerLineDetailVO> getCustomerLineDataListByCustomerId(Long customerId ) ;
} }
...@@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService; ...@@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.module.customer.convert.customer.line.CustomerLineConvert; import cn.iocoder.yudao.module.customer.convert.customer.line.CustomerLineConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO;
import cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerLineMapper; import cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerLineMapper;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineCreateReqVO; import cn.iocoder.yudao.module.customer.vo.customer.line.*;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineExportReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLinePageReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineUpdateReqVO;
import cn.iocoder.yudao.module.customer.vo.zhongPao.CustomerZhongPaoQueryVO; import cn.iocoder.yudao.module.customer.vo.zhongPao.CustomerZhongPaoQueryVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -93,4 +90,8 @@ public class CustomerLineServiceImpl extends AbstractService<CustomerLineMapper, ...@@ -93,4 +90,8 @@ public class CustomerLineServiceImpl extends AbstractService<CustomerLineMapper,
return customerLineMapper.selectList(exportReqVO); return customerLineMapper.selectList(exportReqVO);
} }
@Override
public List<CustomerLineDetailVO> getCustomerLineDataListByCustomerId(Long customerId) {
return customerLineMapper.getCustomerLineDataListByCustomerId(customerId);
}
} }
package cn.iocoder.yudao.module.customer.vo.customer.line;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 客户线路 Response VO")
@Data
public class CustomerLineDetailVO extends CustomerLineDO {
@ApiModelProperty(value = "指定路线始发港")
private String departureNameZh ;
private String departureNameEn ;
@ApiModelProperty(value = "指定路线目的地")
private String objectiveNameZh ;
private String objectiveNameEn ;
}
...@@ -191,5 +191,36 @@ public class CustomerCreateReqVO extends CustomerBaseVO { ...@@ -191,5 +191,36 @@ public class CustomerCreateReqVO extends CustomerBaseVO {
*/ */
private Boolean isPotential = false; private Boolean isPotential = false;
/**
* 年度发货量
*/
private Integer annualShipmentAmount ;
/**
* 年度发货次数
*/
private Integer annualShipmentNum ;
/**
* 竞争对手
*/
private String competitor ;
private Boolean defaultPay =false;
/**
* 控货无收货人,1-是,0-否
*/
private Boolean noConsignee =false;
/**
* 首次成交时间
*/
private Date firstDate ;
/**
* 获取获取方式
*/
private int getWay ;
/**
* 创建入口
*/
private int createEntrance ;
} }
...@@ -32,6 +32,9 @@ public class CustomerDetailRespVO extends CustomerBaseVO { ...@@ -32,6 +32,9 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典") @ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private Integer resourceType; private Integer resourceType;
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private String resourceTypeName ;
@ApiModelProperty(value = "是否在公海") @ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea; private Boolean isInOpenSea;
...@@ -132,9 +135,21 @@ public class CustomerDetailRespVO extends CustomerBaseVO { ...@@ -132,9 +135,21 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "重货标准(CBM)") @ApiModelProperty(value = "重货标准(CBM)")
private BigDecimal weightUnit; private BigDecimal weightUnit;
@ApiModelProperty(value = "重货标准-指定路线始发港")
private String weightDepartureName ;
@ApiModelProperty(value = "重货标准-指定路线目的地")
private String weightObjectiveName ;
@ApiModelProperty(value = "泡货标准(CBM)") @ApiModelProperty(value = "泡货标准(CBM)")
private BigDecimal lightUnit; private BigDecimal lightUnit;
@ApiModelProperty(value = "泡货标准-指定路线始发港")
private String lightDepartureName ;
@ApiModelProperty(value = "泡货标准-指定路线目的地")
private String lightObjectiveName ;
@ApiModelProperty(value = "询价详情") @ApiModelProperty(value = "询价详情")
private String enquiryInfo; private String enquiryInfo;
...@@ -203,4 +218,50 @@ public class CustomerDetailRespVO extends CustomerBaseVO { ...@@ -203,4 +218,50 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "付款人姓名") @ApiModelProperty(value = "付款人姓名")
private String payerName; private String payerName;
@ApiModelProperty(value = "更新人id")
private Long updater ;
@ApiModelProperty(value = "更新人姓名")
private String updaterName ;
@ApiModelProperty(value = "更新时间")
private Date updateTime ;
/**
* 年度发货量
*/
@ApiModelProperty(value = "年度发货量")
private Integer annualShipmentAmount ;
/**
* 年度发货次数
*/
@ApiModelProperty(value = "年度发货次数")
private Integer annualShipmentNum ;
/**
* 竞争对手
*/
@ApiModelProperty(value = "竞争对手")
private String competitor ;
private Boolean defaultPay ;
/**
* 控货无收货人,1-是,0-否
*/
private Boolean noConsignee ;
/**
* 首次成交时间
*/
private Date firstDate ;
/**
* 获取获取方式
*/
private int getWay ;
/**
* 创建入口
*/
private int createEntrance ;
@ApiModelProperty(value = "归属时间")
private Date ownershipTime ;
} }
...@@ -181,4 +181,40 @@ public class CustomerUpdateReqVO extends CustomerBaseVO { ...@@ -181,4 +181,40 @@ public class CustomerUpdateReqVO extends CustomerBaseVO {
@ApiModelProperty(value = "是否潜在客户") @ApiModelProperty(value = "是否潜在客户")
private Boolean isPotential = false; private Boolean isPotential = false;
/**
* 年度发货量
*/
@ApiModelProperty(value = "年度发货量")
private Integer annualShipmentAmount ;
/**
* 年度发货次数
*/
@ApiModelProperty(value = "年度发货次数")
private Integer annualShipmentNum ;
/**
* 竞争对手
*/
@ApiModelProperty(value = "竞争对手")
private String competitor ;
private Boolean defaultPay =false;
/**
* 控货无收货人,1-是,0-否
*/
private Boolean noConsignee =false;
/**
* 首次成交时间
*/
private Date firstDate ;
/**
* 获取获取方式
*/
private int getWay ;
/**
* 创建入口
*/
private int createEntrance ;
} }
...@@ -21,6 +21,9 @@ public class CustomerOfferBackVo { ...@@ -21,6 +21,9 @@ public class CustomerOfferBackVo {
@ApiModelProperty(value = "客户名称") @ApiModelProperty(value = "客户名称")
private String consignorName; private String consignorName;
@ApiModelProperty(value = "联系方式")
private String phone ;
@ApiModelProperty(value = "目的地中文") @ApiModelProperty(value = "目的地中文")
private String objectiveName; private String objectiveName;
......
...@@ -19,11 +19,14 @@ ...@@ -19,11 +19,14 @@
s.title_en as objective_name_en, s.title_en as objective_name_en,
t.status as status, t.status as status,
t.stop_time as stop_time, t.stop_time as stop_time,
u.nickname as business_manager_name u.nickname as business_manager_name ,
ecc.name as consignorName ,
concat(ecc.area_code, ecc.phone_new, '') as phone
from ecw_offer t from ecw_offer t
left join ecw_region s left join ecw_region s
on t.objective_id = s.id on t.objective_id = s.id
left join system_user u on t.follow_up_salesman_id = u.id left join system_user u on t.follow_up_salesman_id = u.id
left join ecw_customer_contacts ecc on ecc.customer_id = t.relation_id and ecc.deleted = 0
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="selectCustomerFollowPage" <select id="selectCustomerFollowPage"
......
...@@ -26,6 +26,7 @@ import cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto; ...@@ -26,6 +26,7 @@ import cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto;
import cn.iocoder.yudao.module.customer.dto.CustomerPageReqDTO; import cn.iocoder.yudao.module.customer.dto.CustomerPageReqDTO;
import cn.iocoder.yudao.module.customer.service.customer.CustomerService; import cn.iocoder.yudao.module.customer.service.customer.CustomerService;
import cn.iocoder.yudao.module.customer.service.customer.commission.CustomerCommissionService; import cn.iocoder.yudao.module.customer.service.customer.commission.CustomerCommissionService;
import cn.iocoder.yudao.module.customer.service.customer.line.CustomerLineService;
import cn.iocoder.yudao.module.customer.service.customerBank.CustomerBankService; import cn.iocoder.yudao.module.customer.service.customerBank.CustomerBankService;
import cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService; import cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService;
import cn.iocoder.yudao.module.customer.service.customerCredit.CustomerCreditService; import cn.iocoder.yudao.module.customer.service.customerCredit.CustomerCreditService;
...@@ -34,6 +35,7 @@ import cn.iocoder.yudao.module.customer.service.customerPublicCatchLog.CustomerP ...@@ -34,6 +35,7 @@ import cn.iocoder.yudao.module.customer.service.customerPublicCatchLog.CustomerP
import cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService; import cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService;
import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsCreateReqVO; import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsCreateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsUpdateReqVO; import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsUpdateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineDetailVO;
import cn.iocoder.yudao.module.customer.vo.customer.vo.*; import cn.iocoder.yudao.module.customer.vo.customer.vo.*;
import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO; import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO;
import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankQueryVO; import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankQueryVO;
...@@ -93,6 +95,9 @@ public class CustomerController { ...@@ -93,6 +95,9 @@ public class CustomerController {
@Resource @Resource
private CustomerBankService customerBankService; private CustomerBankService customerBankService;
@Resource
private CustomerLineService customerLineService;
@Resource @Resource
private CustomerPublicCatchLogService publicCatchLogService; private CustomerPublicCatchLogService publicCatchLogService;
...@@ -352,6 +357,36 @@ public class CustomerController { ...@@ -352,6 +357,36 @@ public class CustomerController {
.stream().sorted(Comparator.comparing(CustomerBankBackVO::getId)).collect(Collectors.toList()); .stream().sorted(Comparator.comparing(CustomerBankBackVO::getId)).collect(Collectors.toList());
respVO.setCustomerBankBackVOList(customerBankBackVOS); respVO.setCustomerBankBackVOList(customerBankBackVOS);
//重泡货标准-指定线路
// List<CustomerLineDO> customerLineDOS = customerLineService.selectList(CustomerLineDO::getCustomerId, respVO.getId());
List<CustomerLineDetailVO> customerLineDOS = customerLineService.getCustomerLineDataListByCustomerId( respVO.getId()) ;
if(CollectionUtil.isNotEmpty(customerLineDOS)){
CustomerLineDetailVO zhongLineDO = customerLineDOS.stream().filter(l-> l.getZhongPaoType().equals("1") || l.getZhongPaoType()==1).findFirst().orElse(null);
if(Objects.nonNull(zhongLineDO) ){
//始发港
if(Objects.nonNull(zhongLineDO.getDepartureId()) && zhongLineDO.getDepartureId()>0 && StringUtils.isNotEmpty(zhongLineDO.getDepartureNameZh())){
respVO.setWeightDepartureName(zhongLineDO.getDepartureNameZh()) ;
}
//目的港
if(Objects.nonNull(zhongLineDO.getObjectiveIds()) && StringUtils.isNotEmpty(zhongLineDO.getObjectiveIds()) && StringUtils.isNotEmpty(zhongLineDO.getObjectiveNameZh())){
respVO.setWeightObjectiveName(zhongLineDO.getObjectiveNameZh()) ;
}
}
CustomerLineDetailVO paoLineDO = customerLineDOS.stream().filter(l-> l.getZhongPaoType().equals("2") || l.getZhongPaoType()==2).findFirst().orElse(null);
if(Objects.nonNull(paoLineDO)){
//始发港
if(Objects.nonNull(paoLineDO.getDepartureId()) && paoLineDO.getDepartureId()>0 && StringUtils.isNotEmpty(paoLineDO.getDepartureNameZh())){
respVO.setLightDepartureName(paoLineDO.getDepartureNameZh()) ;
}
//目的港
if(Objects.nonNull(paoLineDO.getObjectiveIds()) && StringUtils.isNotEmpty(paoLineDO.getObjectiveIds()) && StringUtils.isNotEmpty(paoLineDO.getObjectiveNameZh())){
respVO.setLightObjectiveName(paoLineDO.getObjectiveNameZh()) ;
}
}
}
return success(respVO); return success(respVO);
} }
......
...@@ -159,6 +159,8 @@ public class OrderBackPageVO { ...@@ -159,6 +159,8 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "下单的客户id", required = true) @ApiModelProperty(value = "下单的客户id", required = true)
private Long customerId; private Long customerId;
@ApiModelProperty(value = "业绩归属客户方")
private String customerName ;
/** /**
* 完成入仓的入仓体积 * 完成入仓的入仓体积
*/ */
...@@ -381,6 +383,9 @@ public class OrderBackPageVO { ...@@ -381,6 +383,9 @@ public class OrderBackPageVO {
*/ */
@ApiModelProperty(value = "报价单ID") @ApiModelProperty(value = "报价单ID")
private Long offerId; private Long offerId;
@ApiModelProperty(value = "报价单编号")
private String offerNo ;
/** /**
* 报价单状态 * 报价单状态
*/ */
...@@ -451,7 +456,7 @@ public class OrderBackPageVO { ...@@ -451,7 +456,7 @@ public class OrderBackPageVO {
private Boolean isReleaseAfterGoods; private Boolean isReleaseAfterGoods;
/** /**
* 端口 {@link UserTypeEnum} * 端口 UserTypeEnum
*/ */
@ApiModelProperty(value = "端口(默认管理端)") @ApiModelProperty(value = "端口(默认管理端)")
private Integer userType = 2; private Integer userType = 2;
...@@ -459,6 +464,19 @@ public class OrderBackPageVO { ...@@ -459,6 +464,19 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "语言") @ApiModelProperty(value = "语言")
private Integer lang; private Integer lang;
private Data unloadTime ;
@ApiModelProperty(value = "入库总箱数")
private int chargeQuantity ;
@ApiModelProperty(value = "提货数")
private int pickNum ;
/*
提货率
*/
@ApiModelProperty(value = "提货率")
private String thL;
public void setGuanLianOrderStatus(String guanLianOrderStatus) { public void setGuanLianOrderStatus(String guanLianOrderStatus) {
this.guanLianOrderStatus = guanLianOrderStatus; this.guanLianOrderStatus = guanLianOrderStatus;
......
...@@ -1005,8 +1005,11 @@ ...@@ -1005,8 +1005,11 @@
o.exception_reason, o.exception_reason,
o.is_exception, o.is_exception,
o.create_time, o.create_time,
o.customer_id ,
o.load_time, o.load_time,
o.unload_time ,
(select su.nickname from system_user su where su.deleted = 0 and su.id = o.salesman_id) as salesman_name, (select su.nickname from system_user su where su.deleted = 0 and su.id = o.salesman_id) as salesman_name,
ecu.name as customer_name,
(select min(wi.`in_time`) from ecw_order_warehouse_in wi where wi.deleted = 0 and wi.order_id = o.order_id ) as (select min(wi.`in_time`) from ecw_order_warehouse_in wi where wi.deleted = 0 and wi.order_id = o.order_id ) as
in_time, in_time,
if(#{query.userType} = 1, 1, 2) as user_type, if(#{query.userType} = 1, 1, 2) as user_type,
...@@ -1020,7 +1023,10 @@ ...@@ -1020,7 +1023,10 @@
nee.country_code as consignee_country_code, nee.country_code as consignee_country_code,
if(#{query.lang} = 0, channel.name_zh, channel.name_en) as channel_name, if(#{query.lang} = 0, channel.name_zh, channel.name_en) as channel_name,
o.update_time, o.update_time,
#{query.lang} as lang #{query.lang} as lang ,
offer.offer_id as offerId ,
offer.number as offerNo
from ecw_order o from ecw_order o
left join ( left join (
SELECT SELECT
...@@ -1040,6 +1046,8 @@ ...@@ -1040,6 +1046,8 @@
left join ecw_order_consignor nor on nor.order_id = o.order_id left join ecw_order_consignor nor on nor.order_id = o.order_id
left join ecw_order_consignee nee on nee.order_id = o.order_id left join ecw_order_consignee nee on nee.order_id = o.order_id
left join ecw_channel channel on channel.channel_id = o.channel_id left join ecw_channel channel on channel.channel_id = o.channel_id
left join ecw_offer offer on offer.order_id = o.order_id and offer.deleted = 0
left join ecw_customer ecu on ecu.id = o.customer_id and ecu.deleted = 0
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10 where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
<if test="query.deptId != null "> <if test="query.deptId != null ">
AND o.dept_id = #{query.deptId} AND o.dept_id = #{query.deptId}
......
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