Commit 3952123c authored by chenjiuping's avatar chenjiuping

Merge remote-tracking branch 'origin/dev' into dev

parents c9e95124 ddcf924c
......@@ -42,9 +42,57 @@ VALUES (3, '3', '公海捞取', 'Open Sea pick up', 'customer_get_method', 0, 'd
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES ('客户跟进状态', 'customer_followup_status', 0, NULL, '1', now(), '1', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (0, '0', '未提交', 'UnCommited', 'customer_followup_status', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (1, '1', '已提交', 'Commited', 'customer_followup_status', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES ('客户跟进类型', 'customer_followup_type', 0, NULL, '1', now(), '1', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (1, '1', '维系拜访', 'Follow-up Visit', 'customer_followup_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (2, '2', '商机跟进', 'Business opportunities', 'customer_followup_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (3, '3', '联合拜访', 'Joint visit', 'customer_followup_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES ('跟进方式', 'customer_followup_method', 0, NULL, '1', now(), '1', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (1, '1', '电话', 'Phone', 'customer_followup_method', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (2, '2', '面谈', 'Face-to-face', 'customer_followup_method', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (3, '3', '网络聊天', 'Online Chat', 'customer_followup_method', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES ('跟进结果', 'customer_followup_result_type', 0, NULL, '1', now(), '1', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (1, '1', '等待消息', 'Waiting for message', 'customer_followup_result_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
-- 更新客户角色
update ecw_customer set roles = '2' where FIND_IN_SET(2, type) != 0;
update ecw_customer set roles = '3' where FIND_IN_SET(3, type) != 0;
update ecw_customer set roles = '2,3' where FIND_IN_SET(2, type) != 0 and FIND_IN_SET(3, type) != 0;
-- 根据客户日志中的创建/接收/捞取的最后行为时间 来更新归属时间
update ecw_customer a
inner join (
select customer_id, max(create_time) as maxtime from ecw_customer_operate_log where (operate_type = 5 or operate_type = 1 or operate_type = 7) group by customer_id
) b on a.id = b.customer_id
set a.customer_service_confirmed_time = b.maxtime
where a.deleted = 0;
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (22, '22', '设置控货无收货人', 'Set Customer NoConsigee', 'customer_operate_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (23, '23', '设置默认付款', 'Set Customer Default Pay', 'customer_operate_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (24, '24', '设置默认开票', 'Set Customer Default Billing', 'customer_operate_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
-- 客户编号冗余到收发货人表
alter table `ecw_order_consignor`
add column `customer_number` VARCHAR(50) DEFAULT NULL COMMENT '客户编号';
alter table `ecw_order_consignee`
add column `customer_number` VARCHAR(50) DEFAULT NULL COMMENT '客户编号';
-- 批量刷新订单收发货人的客户编号信息
update ecw_order_consignor nor join ecw_customer u on nor.customer_id = u.id set nor.customer_number = u.number;
update ecw_order_consignee nee join ecw_customer u on nee.customer_id = u.id set nee.customer_number = u.number;
-- 提货相关数据冗余到订单表
alter table `ecw_order`
add column `pick_state` tinyint DEFAULT 0 COMMENT '提货状态:0 未提货 1 部分提货 2 已提货';
alter table `ecw_order`
add column `pick_ratio` int DEFAULT 0 COMMENT '提货率';
alter table `ecw_order`
add column `pick_num` int DEFAULT 0 COMMENT '提货箱数';
\ No newline at end of file
package cn.iocoder.yudao.framework.apollo.core.event.export;
import cn.iocoder.yudao.framework.apollo.core.event.export.base.CustomerExportEvent;
import cn.iocoder.yudao.framework.apollo.core.event.export.base.IndirectCustomerExportEvent;
import lombok.Data;
@Data
public class CustomerFollowupExcelExportPushEvent extends CustomerExportEvent {
}
\ No newline at end of file
package cn.iocoder.yudao.module.customer.convert.customerFollowup;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO;
/**
* 客户跟进 Convert
* @author yanghao
*/
@Mapper
public interface CustomerFollowupConvert {
/*****转换MapStruct*****/
CustomerFollowupConvert INSTANCE = Mappers.getMapper(CustomerFollowupConvert.class);
/***
* 创建VO转实体
* @param bean
* @return
*/
CustomerFollowupDO convert(CustomerFollowupCreateReqVO bean);
/***
* 修改VO转实体
* @param bean
* @return
*/
CustomerFollowupDO convert(CustomerFollowupUpdateReqVO bean);
/***
* 实体转返回VO
* @param bean
* @return
*/
CustomerFollowupBackVO convert(CustomerFollowupDO bean);
/***
* 实体列表转返回VO列表
* @param list
* @return
*/
List<CustomerFollowupBackVO> convertList(List<CustomerFollowupDO> list);
/***
* 实体分页转返回分页
* @param page
* @return
*/
PageResult<CustomerFollowupBackVO> convertPage(PageResult<CustomerFollowupDO> page);
}
......@@ -356,12 +356,12 @@ public class CustomerDO extends BaseDO {
/**
* 默认付款,1-是,0-否
*/
private Boolean defaultPay ;
private Boolean defaultPay;
/**
* 控货无收货人,1-是,0-否
*/
private Boolean noConsignee ;
private Boolean noConsignee;
@ApiModelProperty("延期申请次数")
private int delayApprovalNum ;
......@@ -504,6 +504,12 @@ public class CustomerDO extends BaseDO {
@TableField(exist = false)
private String customerServiceName;
/**
* 创建者名字
*/
@TableField(exist = false)
private String createUsername;
/**
* 国家名称
......
package cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 客户跟进 DO
*
* @author yanghao
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("ecw_customer_followup")
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CustomerFollowupDO extends BaseDO {
/**
* 主键
*/
@TableId
private Long id;
/**
* 编号
*/
private String number;
/**
* 上一级跟进单号
*/
private String parentNumber;
/**
* 状态 字典customer_followup_status
*/
private Integer status;
/**
* 客户编号
*/
private Long customerId;
/**
* 报价单
*/
private Long offerId;
/**
* 跟进类型 字典customer_followup_type
*/
private Integer followType;
/**
* 跟进时间
*/
private Date followTime;
/**
* 联系人
*/
private String contactName;
/**
* 跟进方式 字典customer_followup_method
*/
private Integer followMethod;
/**
* 客户经理/跟进业务员id
*/
private Long followUserId;
/**
* 目的
*/
private String purpose;
/**
* 跟进结果 字典customer_followup_result_type
*/
private Integer resultType;
/**
* 客户反馈
*/
private String feedback;
/**
* 附件 多个以逗号分隔
*/
private String attatchment;
/**
* 下次跟进时间
*/
private Date nextTime;
/**
* 下次跟进计划
*/
private String nextPlan;
@TableField(exist = false)
private String customerNumber;
@TableField(exist = false)
private String offerNumber;
//creator_name
@TableField(exist = false)
private String creatorName;
// updater_name
@TableField(exist = false)
private String updaterName;
}
......@@ -36,7 +36,7 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
IPage<CustomerDO> getPage(IPage<CustomerDO> page,
@Param(Constants.WRAPPER) Wrapper<CustomerDO> queryWrapper);
List<CustomerDO> getMyPage(@Param("start") int start, @Param("size") int size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
List<CustomerDO> getMyPage(@Param("start") Integer start, @Param("size") Integer size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
List<CustomerDO> getWaitToAssignedCustomerPageReq(@Param("start") int start, @Param("size") int size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
/**
......
package cn.iocoder.yudao.module.customer.dal.mysql.customerFollowup;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.customer.dto.CustomerPageReqDTO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import org.apache.ibatis.annotations.Param;
/**
* 客户跟进 Mapper
* @author yanghao
*/
@Mapper
public interface CustomerFollowupMapper extends AbstractMapper<CustomerFollowupDO> {
List<CustomerFollowupDO> selectPage1(@Param("start") Integer start, @Param("size") Integer size,
@Param("query") CustomerFollowupQueryVO customerFollowupQueryVO);
Long selectCount1(@Param("query") CustomerFollowupQueryVO customerFollowupQueryVO);
@Override
default PageResult<CustomerFollowupDO> selectPage(PageVO page, Object object) {
if (object instanceof CustomerFollowupQueryVO) {
CustomerFollowupQueryVO vo = (CustomerFollowupQueryVO)object;
return selectPage(page, new LambdaQuery<CustomerFollowupDO>()
.eqIfPresent(CustomerFollowupDO::getNumber, vo.getNumber())
.eqIfPresent(CustomerFollowupDO::getParentNumber, vo.getParentNumber())
.eqIfPresent(CustomerFollowupDO::getStatus, vo.getStatus())
.eqIfPresent(CustomerFollowupDO::getCustomerId, vo.getCustomerId())
.eqIfPresent(CustomerFollowupDO::getOfferId, vo.getOfferId())
.eqIfPresent(CustomerFollowupDO::getFollowType, vo.getFollowType())
.betweenIfPresent(CustomerFollowupDO::getFollowTime, vo.getBeginFollowTime(), vo.getEndFollowTime())
.likeIfPresent(CustomerFollowupDO::getContactName, vo.getContactName())
.eqIfPresent(CustomerFollowupDO::getFollowMethod, vo.getFollowMethod())
.eqIfPresent(CustomerFollowupDO::getFollowUserId, vo.getFollowUserId())
.eqIfPresent(CustomerFollowupDO::getPurpose, vo.getPurpose())
.eqIfPresent(CustomerFollowupDO::getResultType, vo.getResultType())
.eqIfPresent(CustomerFollowupDO::getFeedback, vo.getFeedback())
.eqIfPresent(CustomerFollowupDO::getAttatchment, vo.getAttatchment())
.betweenIfPresent(CustomerFollowupDO::getNextTime, vo.getBeginNextTime(), vo.getEndNextTime())
.eqIfPresent(CustomerFollowupDO::getNextPlan, vo.getNextPlan())
.betweenIfPresent(CustomerFollowupDO::getCreateTime, vo.getBeginCreateTime(), vo.getEndCreateTime())
.orderByDesc(CustomerFollowupDO::getId));
}
return null;
}
@Override
default List<CustomerFollowupDO> selectList(Object object) {
if (object instanceof CustomerFollowupQueryVO) {
CustomerFollowupQueryVO vo = (CustomerFollowupQueryVO)object;
return selectList(new LambdaQuery<CustomerFollowupDO>()
.eqIfPresent(CustomerFollowupDO::getNumber, vo.getNumber())
.eqIfPresent(CustomerFollowupDO::getParentNumber, vo.getParentNumber())
.eqIfPresent(CustomerFollowupDO::getStatus, vo.getStatus())
.eqIfPresent(CustomerFollowupDO::getCustomerId, vo.getCustomerId())
.eqIfPresent(CustomerFollowupDO::getOfferId, vo.getOfferId())
.eqIfPresent(CustomerFollowupDO::getFollowType, vo.getFollowType())
.betweenIfPresent(CustomerFollowupDO::getFollowTime, vo.getBeginFollowTime(), vo.getEndFollowTime())
.likeIfPresent(CustomerFollowupDO::getContactName, vo.getContactName())
.eqIfPresent(CustomerFollowupDO::getFollowMethod, vo.getFollowMethod())
.eqIfPresent(CustomerFollowupDO::getFollowUserId, vo.getFollowUserId())
.eqIfPresent(CustomerFollowupDO::getPurpose, vo.getPurpose())
.eqIfPresent(CustomerFollowupDO::getResultType, vo.getResultType())
.eqIfPresent(CustomerFollowupDO::getFeedback, vo.getFeedback())
.eqIfPresent(CustomerFollowupDO::getAttatchment, vo.getAttatchment())
.betweenIfPresent(CustomerFollowupDO::getNextTime, vo.getBeginNextTime(), vo.getEndNextTime())
.eqIfPresent(CustomerFollowupDO::getNextPlan, vo.getNextPlan())
.betweenIfPresent(CustomerFollowupDO::getCreateTime, vo.getBeginCreateTime(), vo.getEndCreateTime())
.orderByDesc(CustomerFollowupDO::getId));
}
return null;
}
}
......@@ -11,90 +11,90 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
public class CustomerExportReqDTO {
@ApiModelProperty(value = "客户编号")
private String number;
@ApiModelProperty(value = "客户名称")
private String name;
@ApiModelProperty(value = "客户等级")
private List<Integer> level;
@ApiModelProperty(value = "客户来源")
private List<Integer> source;
@ApiModelProperty(value = "客户类别")
private List<String> type;
@ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
private String transportType;
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private List<Integer> resourceType;
@ApiModelProperty(value = "跟进客服")
private List<Long> customerService;
@ApiModelProperty(value = "客户状态")
private List<Integer> status;
@ApiModelProperty(value = "部门")
private String department;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")
private Date beginCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;
@ApiModelProperty(value = "主联系人")
private String defaultContactName;
@ApiModelProperty(value = "主联系电话")
private String defaultContactPhone;
@ApiModelProperty(value = "信用等级")
private List<Integer> creditLevel;
@ApiModelProperty(value = "国家")
private List<Integer> country;
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ApiModelProperty(value = "是否潜在客户")
private Boolean isPotential;
//api不显示此3个字段
//是否接收,后台使用
@JsonIgnore
private Boolean isCustomerServiceConfirmed;
//因接口公用方法新增:24小时内数据查询条件标识
private String flag4QueryCondition;
private List<Integer> marketType;
private int deptId ;
@ApiModelProperty(value = "会员编号")
private String memberCode;
@ApiModelProperty(value = "会员名称")
private String memberName;
@ApiModelProperty(value = "会员手机")
private String memberMobile;
@ApiModelProperty(value = "会员区号")
private String memberAreaCode;
public class CustomerExportReqDTO extends CustomerPageReqDTO {
// @ApiModelProperty(value = "客户编号")
// private String number;
//
// @ApiModelProperty(value = "客户名称")
// private String name;
//
// @ApiModelProperty(value = "客户等级")
// private List<Integer> level;
//
// @ApiModelProperty(value = "客户来源")
// private List<Integer> source;
//
// @ApiModelProperty(value = "客户类别")
// private List<String> type;
//
// @ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
// private String transportType;
//
// @ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
// private List<Integer> resourceType;
//
// @ApiModelProperty(value = "跟进客服")
// private List<Long> customerService;
//
// @ApiModelProperty(value = "客户状态")
// private List<Integer> status;
//
// @ApiModelProperty(value = "部门")
// private String department;
//
// @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
// @ApiModelProperty(value = "开始创建时间")
// private Date beginCreateTime;
//
// @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
// @ApiModelProperty(value = "结束创建时间")
// private Date endCreateTime;
//
//
//
// @ApiModelProperty(value = "主联系人")
// private String defaultContactName;
//
// @ApiModelProperty(value = "主联系电话")
// private String defaultContactPhone;
//
//
//
// @ApiModelProperty(value = "信用等级")
// private List<Integer> creditLevel;
//
// @ApiModelProperty(value = "国家")
// private List<Integer> country;
//
// @ApiModelProperty(value = "是否在公海")
// private Boolean isInOpenSea;
//
// @ApiModelProperty(value = "是否潜在客户")
// private Boolean isPotential;
//
//
//
// //api不显示此3个字段
// //是否接收,后台使用
// @JsonIgnore
// private Boolean isCustomerServiceConfirmed;
//
// //因接口公用方法新增:24小时内数据查询条件标识
// private String flag4QueryCondition;
//
// private List<Integer> marketType;
//
// private int deptId ;
//
// @ApiModelProperty(value = "会员编号")
// private String memberCode;
// @ApiModelProperty(value = "会员名称")
// private String memberName;
// @ApiModelProperty(value = "会员手机")
// private String memberMobile;
// @ApiModelProperty(value = "会员区号")
// private String memberAreaCode;
}
......@@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -35,8 +36,8 @@ public class CustomerPageReqDTO extends PageParam {
@ApiModelProperty(value = "客户类别")
private List<String> type;
@ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
private String transportType;
@ApiModelProperty(value = "出货渠道", notes = "参见customer_transport_type数据字典")
private List<String> transportType;
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private List<Integer> resourceType;
......@@ -51,8 +52,11 @@ public class CustomerPageReqDTO extends PageParam {
@ApiModelProperty(value = "客户状态")
private List<Integer> status;
// @ApiModelProperty(value = "部门")
// private String department;
@ApiModelProperty(value = "部门")
private String department;
private List<Long> deptIds;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")
......@@ -100,4 +104,112 @@ public class CustomerPageReqDTO extends PageParam {
private String memberMobile;
@ApiModelProperty(value = "会员区号")
private String memberAreaCode;
// 20240904 add start
@ApiModelProperty(value = "客户角色")
private List<String> role;
/**
* 业务国家 逗号分隔
*/
@ApiModelProperty(value = "业务国家")
private List<Long> busiCountryIds;
@ApiModelProperty(value = "常用提货网点")
private List<Long> pickupPoints;
@ApiModelProperty(value = "创建人")
private Long founder;
// 开始入公海时间和结束入公海时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始入公海时间")
private Date beginEnterOpenSeaTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束入公海时间")
private Date endEnterOpenSeaTime;
@ApiModelProperty(value = "业绩类型(老客户:0 新客户:1)")
private Boolean isNew;
// 大于等于年度发货量
@ApiModelProperty(value = "大于等于年度发货量")
private BigDecimal geWeightYearly;
// 小于等于年度发货量
@ApiModelProperty(value = "小于等于年度发货量")
private BigDecimal leWeightYearly;
// 等于年度发货量
@ApiModelProperty(value = "等于年度发货量")
private BigDecimal eqWeightYearly;
// 大于等于年度发货次数
@ApiModelProperty(value = "大于等于年度发货次数")
private Integer geNumYearly;
// 小于等于年度发货次数
@ApiModelProperty(value = "小于等于年度发货次数")
private Integer leNumYearly;
// 等于年度发货次数
@ApiModelProperty(value = "等于年度发货次数")
private Integer eqNumYearly;
@ApiModelProperty(value = "主营商品类型")
private List<Long> productTypes;
@ApiModelProperty(value = "主营商品名称")
private List<Long> productIds;
@ApiModelProperty(value = "主要竞争对手")
private List<Long> competitorIds;
@ApiModelProperty(value = "推介人")
private Long promoter;
@ApiModelProperty(value = "到仓确认")
private Integer arrivalConfirm;
@ApiModelProperty(value = "控货无收货人,1-是,0-否")
private Boolean noConsignee;
@ApiModelProperty(value = "默认付款")
private Boolean defaultPay;
@ApiModelProperty(value = "是否显示提单价格")
private Boolean isShowTidanPrice;
//归属时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始归属时间")
private Date beginCustomerServiceConfirmedTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束归属时间")
private Date endCustomerServiceConfirmedTime;
// 首次成交时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始首次成交时间")
private Date beginFirstDealTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束首次成交时间")
private Date endFirstDealTime;
@ApiModelProperty(value = "获取方式")
private List<String> getMethods;
//创建入口
@ApiModelProperty(value = "创建入口")
private List<String> createFroms;
// 结算方式
@ApiModelProperty(value = "结算方式")
private List<String> balances;
// 20240904 add end
}
......@@ -32,5 +32,7 @@ public interface ErrorCodeConstants {
ErrorCode COMPETITOR_NOT_EXISTS = new ErrorCode(1005001011, "客户竞争对手不存在");
ErrorCode COMPETITOR_EXISTS = new ErrorCode(1005001012, "竞争对手名称已存在");
ErrorCode FOLLOWUP_NOT_EXISTS = new ErrorCode(1005001013, "客户跟进不存在");
ErrorCode FOLLOWUP_ALREADY_SUBMITTED = new ErrorCode(1005001014, "客户跟进已提交不可再修改");
}
......@@ -419,6 +419,7 @@ public interface CustomerService extends IService<CustomerDO> {
void changeCustomerNoConsignee(CustomerChangeNoConsigneeReqVO customerChangeNoConsigneeReqVO);
void changeCustomerDefaultPay(CustomerChangeDefaultPayReqVO customerChangeDefaultPayReqVO);
void changeCustomerDefaultBilling(CustomerChangeDefaultBillingReqVO customerChangeDefaultBillingReqVO);
/**
* @param areaCode 区号 eg: 86
......
package cn.iocoder.yudao.module.customer.service.customerFollowup;
import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
/**
* 客户跟进 Service 接口
*
* @author yanghao
*/
public interface CustomerFollowupService extends IService<CustomerFollowupDO> {
String generateFollowupNumber();
/**
* 创建客户跟进
* @param createReqVO 创建信息
* @return 编号
*/
Long createFollowup(@Valid CustomerFollowupCreateReqVO createReqVO);
/**
* 更新客户跟进
* @param updateReqVO 更新信息
*/
void updateFollowup(@Valid CustomerFollowupUpdateReqVO updateReqVO);
void updateFollowupStatus(@Valid CustomerFollowupUpdateStatusReqVO updateStatusReqVO);
/**
* 删除客户跟进
* @param id 编号
*/
void deleteFollowup(Long id);
/**
* 获得客户跟进
* @param id 编号
* @return 客户跟进
*/
CustomerFollowupDO getFollowup(Long id);
/**
* 获得客户跟进列表
* @param ids 编号
* @return 客户跟进列表
*/
List<CustomerFollowupDO> getFollowupList(Collection<Long> ids);
/**
* 获得客户跟进分页
* @param page 分页查询
* @param query 查询
* @return 客户跟进分页
*/
PageResult<CustomerFollowupDO> getFollowupPage(CustomerFollowupQueryVO query, PageVO page);
/**
* 获得客户跟进列表, 用于 Excel 导出
* @param query 查询
* @return 客户跟进列表
*/
List<CustomerFollowupDO> getFollowupList(CustomerFollowupQueryVO query);
}
package cn.iocoder.yudao.module.customer.service.customerFollowup;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import javax.annotation.Resource;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import cn.iocoder.yudao.module.ecw.enums.CustomerFollowupStatusEnum;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert;
import cn.iocoder.yudao.module.customer.dal.mysql.customerFollowup.CustomerFollowupMapper;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.customer.enums.ErrorCodeConstants.*;
/**
* 客户跟进 Service 实现类
*
* @author yanghao
*/
@Service
@Validated
public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowupMapper, CustomerFollowupDO> implements CustomerFollowupService {
@Resource
private CustomerFollowupMapper followupMapper;
/**
* 跟进单编号生成方式:GJ+年份+六位数字,按年份累计
* @return
*/
@Override
public String generateFollowupNumber() {
// 获取当前时间的年份
LocalDate now = LocalDate.now();
int year = now.getYear();
// 获取当前年份的初始化时间
LocalDateTime startOfYear = LocalDateTime.of(year, 1, 1, 0, 0, 0, 0);
Date from = Date.from(startOfYear.atZone(ZoneId.systemDefault()).toInstant());
Long count = followupMapper.selectCount(new LambdaQueryWrapperX<CustomerFollowupDO>()
.ge(CustomerFollowupDO::getCreateTime, from));
return String.format("GJ%d%06d", year, count + 1);
}
@Override
public Long createFollowup(CustomerFollowupCreateReqVO createReqVO) {
String number = generateFollowupNumber();
createReqVO.setNumber(number);
// 插入
CustomerFollowupDO followup = CustomerFollowupConvert.INSTANCE.convert(createReqVO);
followupMapper.insert(followup);
// 返回
return followup.getId();
}
@Override
public void updateFollowup(CustomerFollowupUpdateReqVO updateReqVO) {
// 校验存在
Long id = updateReqVO.getId();
CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id);
if (customerFollowupDO == null) {
throw exception(FOLLOWUP_NOT_EXISTS);
}
if (customerFollowupDO.getStatus().equals(CustomerFollowupStatusEnum.Commited.getValue())) {
throw exception(FOLLOWUP_ALREADY_SUBMITTED);
}
// 更新
CustomerFollowupDO updateObj = CustomerFollowupConvert.INSTANCE.convert(updateReqVO);
followupMapper.updateById(updateObj);
}
@Override
public void updateFollowupStatus(CustomerFollowupUpdateStatusReqVO updateStatusReqVO) {
Long id = updateStatusReqVO.getId();
CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id);
if (customerFollowupDO == null) {
throw exception(FOLLOWUP_NOT_EXISTS);
}
customerFollowupDO.setStatus(updateStatusReqVO.getStatus());
followupMapper.updateById(customerFollowupDO);
}
@Override
public void deleteFollowup(Long id) {
// 校验存在
this.validateFollowupExists(id);
// 删除
followupMapper.deleteById(id);
}
private void validateFollowupExists(Long id) {
if (followupMapper.selectById(id) == null) {
throw exception(FOLLOWUP_NOT_EXISTS);
}
}
@Override
public CustomerFollowupDO getFollowup(Long id) {
return followupMapper.selectById(id);
}
@Override
public List<CustomerFollowupDO> getFollowupList(Collection<Long> ids) {
return followupMapper.selectBatchIds(ids);
}
@Override
public PageResult<CustomerFollowupDO> getFollowupPage(CustomerFollowupQueryVO query, PageVO page) {
page.setPage(query.getPageNo());
page.setRows(query.getPageSize());
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerFollowupDO> list = followupMapper.selectPage1(start, size, query);
long total = followupMapper.selectCount1(query);
return new PageResult<>(list, total,
mpPage.getSize(), page.getPage(),
(total + mpPage.getSize() - 1) / mpPage.getSize());
}
@Override
public List<CustomerFollowupDO> getFollowupList(CustomerFollowupQueryVO query) {
return followupMapper.selectPage1(null, null, query);
}
}
package cn.iocoder.yudao.module.customer.vo.customer.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 默认开票切换 Request VO")
@Data
@EqualsAndHashCode
@ToString
public class CustomerChangeDefaultBillingReqVO {
@ApiModelProperty(value = "客户ID列表", required = true)
@NotEmpty(message = "客户ID列表不能为空")
private List<Long> customerIdList;
@ApiModelProperty(value = "是否默认开票", required = true)
@NotNull(message = "默认开票值不能为空")
private Boolean defaultBilling;
}
......@@ -36,14 +36,20 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "进入公海时间")
private Date enterOpenSeaTime;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "预计进入公海时间")
private Date estimateEnterOpenSeaTime;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "公海池捞取时间")
private Date catchTime;
......@@ -72,6 +78,8 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "关联会员账号id")
private Long memberId;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
@ApiModelProperty(value = "客户生日", example = "1652017501000")
private Date birthday;
......@@ -99,6 +107,7 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
private Date createTime;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
private Date updateTime;
......@@ -191,14 +200,49 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
// ======== 20240821 add start
@ApiModelProperty(value = "首次成交时间")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
private Date firstDealTime;
@ApiModelProperty(value = "获取方式")
private Integer getMethod;
@ApiModelProperty(value = "创建入口")
private Integer createFrom;
/**
* 客户角色
* <p>
* 枚举 {@link TODO customer_role 字典}
* 归属时间
*/
@ApiModelProperty(value = "归属时间")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,
timezone = TIME_ZONE_DEFAULT)
private Date customerServiceConfirmedTime;
@ApiModelProperty(value = "客户角色")
private String roles;
/**
* 默认付款,1-是,0-否
*/
@ApiModelProperty(value = "默认付款,1-是,0-否")
private Boolean defaultPay;
/**
* 控货无收货人,1-是,0-否
*/
@ApiModelProperty(value = "控货无收货人,1-是,0-否")
private Boolean noConsignee;
/**
* 默认开票,1-是,0-否
*/
@ApiModelProperty(value = "默认开票,1-是,0-否")
private Boolean defaultBilling;
/**
* 业务国家 逗号分隔
......@@ -225,13 +269,6 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "年度发货次数")
private Integer numYearly;
/**
* 默认开票,1-是,0-否
*/
@ApiModelProperty(value = "默认开票,1-是,0-否")
private Boolean defaultBilling;
// ======== 20240821 add end
......
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import cn.iocoder.yudao.framework.excel.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.convert.DictConvert;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import com.alibaba.excel.annotation.ExcelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 客户跟进 Response VO
* @author yanghao
*/
@Data
@ApiModel("管理后台 - 客户跟进 Response VO")
public class CustomerFollowupBackVO {
@ExcelProperty("主键")
@ApiModelProperty(value = "主键", required = true)
private Long id;
@ExcelProperty("编号")
@ApiModelProperty(value = "编号")
private String number;
@ExcelProperty("上一级跟进单号")
@ApiModelProperty(value = "上一级跟进单号")
private String parentNumber;
@ExcelProperty(value = "状态", converter = DictConvert.class)
@DictFormat("customer_followup_status")
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
@ApiModelProperty(value = "客户编号")
private Long customerId;
@ApiModelProperty(value = "报价单")
private Long offerId;
@ExcelProperty(value = "跟进类型", converter = DictConvert.class)
@DictFormat("customer_followup_type")
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followType;
@ExcelProperty("跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "跟进时间")
private Date followTime;
@ExcelProperty("联系人")
@ApiModelProperty(value = "联系人")
private String contactName;
@ExcelProperty(value = "跟进方式", converter = DictConvert.class)
@DictFormat("customer_followup_method")
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followMethod;
@ExcelProperty("客户经理/跟进业务员id")
@ApiModelProperty(value = "客户经理/跟进业务员id")
private Long followUserId;
@ExcelProperty("目的")
@ApiModelProperty(value = "目的")
private String purpose;
@ExcelProperty(value = "跟进结果", converter = DictConvert.class)
@DictFormat("customer_followup_result_type")
@ApiModelProperty(value = "跟进结果 字典customer_followup_result_type")
private Integer resultType;
@ExcelProperty("客户反馈")
@ApiModelProperty(value = "客户反馈")
private String feedback;
@ExcelProperty("附件 多个以逗号分隔")
@ApiModelProperty(value = "附件 多个以逗号分隔")
private String attatchment;
@ExcelProperty("下次跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "下次跟进时间")
private Date nextTime;
@ExcelProperty("下次跟进计划")
@ApiModelProperty(value = "下次跟进计划")
private String nextPlan;
@ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ExcelProperty("更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("报价单")
@ApiModelProperty(value = "报价单编号")
private String offerNumber;
//creator_name
@ExcelProperty("创建人id")
@ApiModelProperty(value = "创建人名称")
private String creatorName;
// updater_name
@ExcelProperty("更新人id")
@ApiModelProperty(value = "更新人名称")
private String updaterName;
}
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 客户跟进 Base VO,提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
@Data
public class CustomerFollowupBaseVO {
@ApiModelProperty(value = "编号")
private String number;
@ApiModelProperty(value = "上一级跟进单号")
private String parentNumber;
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
@ApiModelProperty(value = "客户编号")
private Long customerId;
@ApiModelProperty(value = "报价单")
private Long offerId;
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followType;
@ApiModelProperty(value = "跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date followTime;
@ApiModelProperty(value = "联系人")
private String contactName;
@ApiModelProperty(value = "跟进方式 字典customer_followup_method")
private Integer followMethod;
@ApiModelProperty(value = "客户经理/跟进业务员id")
private Long followUserId;
@ApiModelProperty(value = "目的")
private String purpose;
@ApiModelProperty(value = "跟进结果 字典customer_followup_result_type")
private Integer resultType;
@ApiModelProperty(value = "客户反馈")
private String feedback;
@ApiModelProperty(value = "附件 多个以逗号分隔")
private String attatchment;
@ApiModelProperty(value = "下次跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date nextTime;
@ApiModelProperty(value = "下次跟进计划")
private String nextPlan;
}
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel("管理后台 - 客户跟进创建 Request VO")
public class CustomerFollowupCreateReqVO extends CustomerFollowupBaseVO {
}
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 客户跟进 Response VO
* @author yanghao
*/
@Data
@ApiModel("管理后台 - 客户跟进 Response VO")
public class CustomerFollowupExcelVO {
@ExcelProperty("主键")
@ApiModelProperty(value = "主键", required = true)
private Long id;
@ExcelProperty("编号")
@ApiModelProperty(value = "编号")
private String number;
@ExcelProperty("上一级跟进单号")
@ApiModelProperty(value = "上一级跟进单号")
private String parentNumber;
@ExcelProperty("状态 字典customer_followup_status")
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private Long customerId;
@ExcelProperty("报价单")
@ApiModelProperty(value = "报价单")
private Long offerId;
@ExcelProperty("跟进类型 字典customer_followup_type")
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followType;
@ExcelProperty("跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "跟进时间")
private Date followTime;
@ExcelProperty("联系人")
@ApiModelProperty(value = "联系人")
private String contactName;
@ExcelProperty("跟进方式 字典customer_followup_method")
@ApiModelProperty(value = "跟进方式 字典customer_followup_method")
private Integer followMethod;
@ExcelProperty("客户经理/跟进业务员id")
@ApiModelProperty(value = "客户经理/跟进业务员id")
private Long followUserId;
@ExcelProperty("目的")
@ApiModelProperty(value = "目的")
private String purpose;
@ExcelProperty("跟进结果 字典customer_followup_result_type")
@ApiModelProperty(value = "跟进结果 字典customer_followup_result_type")
private Integer resultType;
@ExcelProperty("客户反馈")
@ApiModelProperty(value = "客户反馈")
private String feedback;
@ExcelProperty("附件 多个以逗号分隔")
@ApiModelProperty(value = "附件 多个以逗号分隔")
private String attatchment;
@ExcelProperty("下次跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "下次跟进时间")
private Date nextTime;
@ExcelProperty("下次跟进计划")
@ApiModelProperty(value = "下次跟进计划")
private String nextPlan;
@ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ExcelProperty("更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "报价单编号")
private String offerNumber;
//creator_name
@ApiModelProperty(value = "创建人名称")
private String creatorName;
// updater_name
@ApiModelProperty(value = "更新人名称")
private String updaterName;
}
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
@ApiModel("管理后台 - 客户跟进查询 VO")
public class CustomerFollowupQueryVO extends PageParam {
@ApiModelProperty(value = "编号")
private String number;
@ApiModelProperty(value = "上一级跟进单号")
private String parentNumber;
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
@ApiModelProperty(value = "客户编号")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private Long customerDetailId;
@ApiModelProperty(value = "报价单")
private Long offerId;
@ApiModelProperty(value = "跟进类型 字典customer_followup_type")
private Integer followType;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始跟进时间")
private Date beginFollowTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束跟进时间")
private Date endFollowTime;
@ApiModelProperty(value = "联系人")
private String contactName;
@ApiModelProperty(value = "跟进方式 字典customer_followup_method")
private Integer followMethod;
@ApiModelProperty(value = "客户经理/跟进业务员id")
private Long followUserId;
@ApiModelProperty(value = "目的")
private String purpose;
@ApiModelProperty(value = "跟进结果 字典customer_followup_result_type")
private Integer resultType;
@ApiModelProperty(value = "客户反馈")
private String feedback;
@ApiModelProperty(value = "附件 多个以逗号分隔")
private String attatchment;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始下次跟进时间")
private Date beginNextTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束下次跟进时间")
private Date endNextTime;
@ApiModelProperty(value = "下次跟进计划")
private String nextPlan;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")
private Date beginCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;
}
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 客户跟进更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CustomerFollowupUpdateReqVO extends CustomerFollowupBaseVO {
@ApiModelProperty(value = "主键", required = true)
@NotNull(message = "主键不能为空")
private Long id;
}
package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@ApiModel("管理后台 - 客户跟进更新状态 Request VO")
@Data
@ToString(callSuper = true)
public class CustomerFollowupUpdateStatusReqVO {
@ApiModelProperty(value = "主键", required = true)
@NotNull(message = "主键不能为空")
private Long id;
@ApiModelProperty(value = "状态 字典customer_followup_status")
private Integer status;
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.customer.dal.mysql.customerFollowup.CustomerFollowupMapper">
<sql id="queryCondition">
<if test="query.number != null and query.number != '' ">
AND a.number LIKE concat('%', concat( #{query.number}, '%' ))
</if>
<if test="query.parentNumber != null and query.parentNumber != '' ">
AND a.parent_number LIKE concat('%', concat( #{query.parentNumber}, '%' ))
</if>
<if test="query.contactName != null and query.contactName != '' ">
AND a.contact_name LIKE concat('%', concat( #{query.contactName}, '%' ))
</if>
<if test="query.status != null">
AND a.status = #{query.status}
</if>
<if test="query.customerId != null">
AND a.customer_id = #{query.customerId}
</if>
<if test="query.offerId != null">
AND a.offer_id = #{query.offerId}
</if>
<if test="query.followType != null">
AND a.follow_type = #{query.followType}
</if>
<if test="query.followUserId != null">
AND a.follow_user_id = #{query.followUserId}
</if>
<if test="query.resultType != null">
AND a.result_type = #{query.resultType}
</if>
</sql>
<select id="selectPage1" resultType="cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO">
select a.*, b.number as customer_number, c.number as offer_number,
d.nickname as creator_name, e.nickname as updater_name
from ecw_customer_followup a
left join ecw_customer b on a.customer_id = b.id
left join ecw_offer c on a.offer_id = c.offer_id
left join system_user d on a.creator = d.id
left join system_user e on a.updater = e.id
WHERE 1=1 AND a.deleted = 0
<include refid="queryCondition"/>
order by a.id desc
<if test="start != null and size != null">
limit #{start}, #{size}
</if>
</select>
<select id="selectCount1" resultType="java.lang.Long">
select count(1)
from ecw_customer_followup a
WHERE 1=1 AND a.deleted = 0
<include refid="queryCondition"/>
</select>
</mapper>
......@@ -41,7 +41,7 @@ Content-Type: application/json
{"inquiry":null,"id":"38155","number":"SGP00004","name":"yh2345","nameEn":null,"level":1,"country":194,"type":"0,1","transportType":"1","agentId":null,"company":"","companyEn":null,"payerName":null,"address":null,"productType":null,"productId":null,"pickupPoint":null,"memberId":null,"birthday":null,"balance":null,"source":5,"picture":null,"customerService":null,"customerContacts":[{"customerId":38155,"department":"","position":"","name":"yh12345","nameEn":"","social":null,"socialNumber":"","email":"","isDefault":1,"userid":null,"username":null,"areaCode":"65","phoneNew":"66666666","createTime":1692929203000,"id":69056,"customerContactsId":69056,"customerName":null,"company":""}],"customerLines":[],"lightUnit":null,"promoter":null,"status":1,"founder":118,"department":null,"invoiceTitle":null,"licenseNumber":null,"bank":null,"bankNumber":null,"project":null,"billingAddress":null,"billingTell":null,"taxRate":0,"remarks":null,"arrivalConfirm":0,"weightUnit":null,"createTime":1692924735000,"isShowTidanPrice":true,"carName":null,"carNo":null,"customerBanks":[],"creditLevel":3,"vipLevelScore":1,"vipLevelNameZh":"普通","vipLevelNameEn":"common","creditLevelScore":400,"creditLevelNameZh":"信用良好","creditLevelNameEn":"good credit","customerServiceName":null,"consigneeFirstCustomerService":null,"isNew":true,"resourceType":1,"isInOpenSea":false,"enterOpenSeaTime":null,"estimateEnterOpenSeaTime":null,"catchTime":null,"promoterName":null,"enquiryInfo":null,"isCustomerServiceConfirmed":false,"isWebOrderConsigneeSync":false,"isPotential":false,"founderName":"yanghao","customerBankBackVOList":[],"countryNameZh":"新加坡","countryNameEn":"Singapore","productTypeNameZh":null,"productTypeNameEn":null,"productNameZh":null,"productNameEn":null,"pickupPointNameZh":null,"pickupPointNameEn":null}
### page
GET {{baseUrl}}/ecw/customer/page?pageNo=1&pageSize=100&name=
GET {{baseUrl}}/ecw/customer/page?pageNo=1&pageSize=10&customerService[0]=1144&customerService[1]=2659&beginEnterOpenSeaTime=2024-10-02%2000%3A00%3A00&endEnterOpenSeaTime=2024-10-05%2000%3A00%3A00
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
......
......@@ -1126,8 +1126,7 @@ public class CustomerController {
@PutMapping("/change-customer-no-consignee")
@ApiOperation("设置客户是否是默认付款无收货人")
@PreAuthorize("@ss.hasPermission('ecw:customer:noconsignee')")
@ApiOperation("设置客户是否是默认控货无收货人")
@Idempotent(timeout = 5)
public CommonResult<Boolean> changeCustomerNoConsignee(@Valid @RequestBody CustomerChangeNoConsigneeReqVO customerChangeNoConsigneeReqVO) {
......@@ -1137,8 +1136,7 @@ public class CustomerController {
@PutMapping("/change-customer-default-pay")
@ApiOperation("设置客户是否是默认侍")
@PreAuthorize("@ss.hasPermission('ecw:customer:defaultpay')")
@ApiOperation("设置客户是否是默认付款")
@Idempotent(timeout = 5)
public CommonResult<Boolean> changeCustomerDefaultPay(@Valid @RequestBody CustomerChangeDefaultPayReqVO customerChangeDefaultPayReqVO) {
......@@ -1147,6 +1145,16 @@ public class CustomerController {
}
@PutMapping("/change-customer-default-billing")
@ApiOperation("设置客户是否是默认开票")
@Idempotent(timeout = 5)
public CommonResult<Boolean> changeCustomerDefaultBilling(@Valid @RequestBody CustomerChangeDefaultBillingReqVO customerChangeDefaultBillingReqVO) {
customerService.changeCustomerDefaultBilling(customerChangeDefaultBillingReqVO);
return success(true);
}
@PutMapping("/recycle-unconfirmed-customer")
@ApiOperation("回收已分配未接收的客户")
// @PreAuthorize("@ss.hasPermission('ecw:customer:recycle:unconfirmed')")
......
package cn.iocoder.yudao.module.customer.controller.admin.customerFollowup;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO;
import cn.iocoder.yudao.module.system.api.file.FileMakeApi;
import cn.iocoder.yudao.module.system.api.file.dto.FileMakeReqDTO;
import cn.iocoder.yudao.module.system.enums.download.DownloadTypeEnum;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO;
import cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert;
import cn.iocoder.yudao.module.customer.service.customerFollowup.CustomerFollowupService;
@Validated
@RestController
@Api(tags = "管理后台 - 客户跟进-新")
@RequestMapping("/customer/followup")
public class CustomerFollowupController {
@Resource
private CustomerFollowupService followupService;
@Resource
private FileMakeApi fileMakeApi;
@PostMapping("/create")
@ApiOperation("创建客户跟进")
// @PreAuthorize("@ss.hasPermission('customer:followup:create')")
public CommonResult<Long> createFollowup(@Valid @RequestBody CustomerFollowupCreateReqVO createReqVO) {
return success(followupService.createFollowup(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新客户跟进")
// @PreAuthorize("@ss.hasPermission('customer:followup:update')")
public CommonResult<Boolean> updateFollowup(@Valid @RequestBody CustomerFollowupUpdateReqVO updateReqVO) {
followupService.updateFollowup(updateReqVO);
return success(true);
}
@PutMapping("/update-status")
@ApiOperation("更新客户跟进状态")
// @PreAuthorize("@ss.hasPermission('customer:followup:update')")
public CommonResult<Boolean> updateFollowupStatus(@Valid @RequestBody CustomerFollowupUpdateStatusReqVO updateStatusReqVO) {
followupService.updateFollowupStatus(updateStatusReqVO);
return success(true);
}
@DeleteMapping("/delete")
@ApiOperation("删除客户跟进")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
// @PreAuthorize("@ss.hasPermission('customer:followup:delete')")
public CommonResult<Boolean> deleteFollowup(@RequestParam("id") Long id) {
followupService.deleteFollowup(id);
return success(true);
}
@GetMapping("/get")
@ApiOperation("获得客户跟进")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
// @PreAuthorize("@ss.hasPermission('customer:followup:query')")
public CommonResult<CustomerFollowupBackVO> getFollowup(@RequestParam("id") Long id) {
CustomerFollowupDO followup = followupService.getFollowup(id);
return success(CustomerFollowupConvert.INSTANCE.convert(followup));
}
@GetMapping("/list")
@ApiOperation("获得客户跟进列表")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
// @PreAuthorize("@ss.hasPermission('customer:followup:query')")
public CommonResult<List<CustomerFollowupBackVO>> getFollowupList(@RequestParam("ids") Collection<Long> ids) {
List<CustomerFollowupDO> list = followupService.getFollowupList(ids);
return success(CustomerFollowupConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@ApiOperation("获得客户跟进分页")
// @PreAuthorize("@ss.hasPermission('customer:followup:query')")
public CommonResult<PageResult<CustomerFollowupBackVO>> getFollowupPage(@Valid CustomerFollowupQueryVO query, PageVO page) {
PageResult<CustomerFollowupDO> pageResult = followupService.getFollowupPage(query, page);
return success(CustomerFollowupConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@ApiOperation("导出客户跟进 Excel")
// @PreAuthorize("@ss.hasPermission('customer:followup:export')")
@OperateLog(type = EXPORT)
public CommonResult<Boolean> exportFollowupExcel(@Valid CustomerFollowupQueryVO query,
HttpServletResponse response) throws IOException {
sendFileMake(query, DownloadTypeEnum.CUSTOMER_FOLLOWUP_EXPORT, "跟进纪录导出Excel");
return success(true);
}
/**
* 支持多选
*
* @param query
* @param downloadTypeEnum
* @param fileName
*/
private void sendFileMake(CustomerFollowupQueryVO query, DownloadTypeEnum downloadTypeEnum, String fileName) {
FileMakeReqDTO reqDTO = new FileMakeReqDTO();
reqDTO.setType(downloadTypeEnum.getType());
reqDTO.setName(fileName);
reqDTO.setFileSuffix("xlsx");
reqDTO.setTemporaryFile(true);
reqDTO.setUserType(2);
reqDTO.setLang(I18nMessage.getLang());
reqDTO.setRequestParams(JSONObject.toJSONString(query));
fileMakeApi.sendFileMake(reqDTO);
}
}
package cn.iocoder.yudao.module.ecw.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* 客户状态类型枚举
*/
@AllArgsConstructor
@Getter
public enum CustomerFollowupStatusEnum {
UnCommited(0, "未提交"),
Commited(1, "已提交"),
;
/**
* 类型
*/
private final Integer value;
/**
* 类型名
*/
private final String name;
public static String getNameByValue(Integer value) {
return Arrays.stream(CustomerFollowupStatusEnum.values()).filter(t -> t.getValue().equals(value)).map(CustomerFollowupStatusEnum::getName).findFirst().orElse("");
}
public static CustomerFollowupStatusEnum get(Integer value) {
return Arrays.stream(CustomerFollowupStatusEnum.values()).filter(t -> t.getValue().equals(value)).findFirst().orElse(null);
}
}
......@@ -52,6 +52,8 @@ public enum CustomerOperateTypeEnum {
CHANGE_NO_CONSIGNEE(22, "设置控货无收货人"),
CHANGE_DEFAULT_PAY(23, "设置默认付款"),
CHANGE_DEFAULT_BILLING(24, "设置默认开票"),
DELETE(100, "删除"),
......
package cn.iocoder.yudao.module.member.controller.admin.job;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.module.member.util.ScoreRuleGenCodeUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* 积分规则编号刷新任务
* @author zhaobiyan
*/
@Component
@Slf4j
public class ScoreRuleCodeFlushTask implements JobHandler {
@Resource
private ScoreRuleGenCodeUtils scoreRuleGenCodeUtils;
@Override
public String execute(String param) throws Exception {
scoreRuleGenCodeUtils.historyScoreRuleCodeFlush();
return "success";
}
}
\ No newline at end of file
......@@ -6,9 +6,12 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO;
import cn.iocoder.yudao.module.customer.service.customer.CustomerService;
import cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService;
import cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi;
import cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO;
import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.ecw.service.internalMessage.WebInternalMessageService;
import cn.iocoder.yudao.module.ecw.service.region.RegionService;
......@@ -54,6 +57,7 @@ import javax.validation.Valid;
import java.text.SimpleDateFormat;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
......@@ -79,6 +83,8 @@ public class AppUserController {
@Resource
private CustomerContactsService customerContactsService;
@Resource
private CustomerService customerService;
@Resource
private UserEnterpriseAuthService userEnterpriseAuthService;
@Resource
......@@ -155,6 +161,29 @@ public class AppUserController {
if (passwordEncoder.matches("88888888", user.getPassword())) {
respVO.setIsSimplePassword(Boolean.TRUE);
}
// 根据会员ID获取客户联系人ID与客户ID,并返回部分客户档案设置
CustomerContactsDO customerContacts =
customerContactsService.getOne(new LambdaQueryWrapper<CustomerContactsDO>()
.and(we -> we.eq(CustomerContactsDO::getUserid, user.getId())
.or()
.eq(CustomerContactsDO::getPhoneNew, user.getMobile())
.eq(CustomerContactsDO::getAreaCode, user.getAreaCode())).eq(CustomerContactsDO::getDeleted, 0).last("limit 1"));
if (Objects.isNull(customerContacts)) {
respVO.setDefaultPay(Boolean.FALSE);
respVO.setNoConsignee(Boolean.FALSE);
}else {
CustomerDO customerDO = customerService.getCustomer(customerContacts.getCustomerId());
if (customerDO != null) {
respVO.setDefaultPay(customerDO.getDefaultPay());
respVO.setNoConsignee(customerDO.getNoConsignee());
respVO.setFirstDealTime(customerDO.getFirstDealTime());
}else {
respVO.setDefaultPay(Boolean.FALSE);
respVO.setNoConsignee(Boolean.FALSE);
}
}
//获取用户积分信息
AppMemberUserScoreInfoRespVO userScoreInfo = memberUserScoreService.getUserScoreInfo(user.getId());
respVO.setUserScoreLevelInfo(userScoreInfo);
......
......@@ -67,6 +67,17 @@ public class AppUserInfoRespVO {
@ApiModelProperty(value = "是否简单密码", example = "false")
private Boolean isSimplePassword = Boolean.FALSE;
@ApiModelProperty(value = "客户档案设置的是否默认付款:1 是 0 否")
private Boolean defaultPay ;
@ApiModelProperty(value = "客户档案设置的是否允许控货无收货人:1 是 0 否")
private Boolean noConsignee ;
@ApiModelProperty(value = "客户档案记录的首次成交时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date firstDealTime;
@ApiModelProperty(value = "会员积分信息")
private AppMemberUserScoreInfoRespVO userScoreLevelInfo;
@ApiModelProperty(value = "会员国家id")
......
......@@ -24,6 +24,10 @@ public class ScoreRuleDO extends BaseDO {
*/
@TableId
private Long id;
/**
* 规则编号
*/
private String code;
/**
* 指标类型
*/
......
......@@ -11,6 +11,8 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.member.enums.RelationSymbolEnum;
import cn.iocoder.yudao.module.member.vo.scoreRule.ScoreRuleQueryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
/**
* 积分规则 Mapper
......@@ -69,4 +71,7 @@ public interface ScoreRuleMapper extends AbstractMapper<ScoreRuleDO> {
}
return null;
}
@ResultType(String.class)
@Select({"select code from score_rule order by code desc limit 1"})
String getCurrentMaxScoreRuleCode();
}
......@@ -86,11 +86,11 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
log.info("Order in shipping listener: No score rule match,orderID:{}", orderId);
return;
}
// 规则是否包含目的地提货点
// 规则是否包含目的地提货点,0代表所有提货点
OrderObjectiveApiDO orderObjectiveDO = order.getOrderObjectiveDO();
ScoreRuleOrderVExtraVO extraInfo = JSONUtil.toBean(scoreRuleDO.getExtra(), ScoreRuleOrderVExtraVO.class);
String[] warehouseIds = extraInfo.getReceiveAddr().split(",");
if (!ArrayUtil.contains(warehouseIds, orderObjectiveDO.getObjectiveWarehouseId().toString())) {
if (!Objects.equals(warehouseIds[0], "0") && !ArrayUtil.contains(warehouseIds, orderObjectiveDO.getObjectiveWarehouseId().toString())) {
log.info("Order in shipping listener: The rule does not contain the order destination warehouse,orderID:{},warehouseId:{}", orderId, orderObjectiveDO.getObjectiveWarehouseId().toString());
return;
}
......
......@@ -21,6 +21,7 @@ import cn.iocoder.yudao.module.member.enums.ScoreRuleStatusEnum;
import cn.iocoder.yudao.module.member.enums.ScoreRuleTypeEnum;
import cn.iocoder.yudao.module.member.enums.TransportTypeEnum;
import cn.iocoder.yudao.module.member.enums.YesOrNoTypeEnum;
import cn.iocoder.yudao.module.member.util.ScoreRuleGenCodeUtils;
import cn.iocoder.yudao.module.member.vo.scoreRule.*;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleOrderVExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleRegisterExtraVO;
......@@ -60,6 +61,8 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
private WarehouseService warehouseService;
@Resource
private AdminUserApi adminUserApi;
@Resource
private ScoreRuleGenCodeUtils scoreRuleGenCodeUtils;
@Override
public Long createScoreRule(ScoreRuleCreateReqVO createReqVO) {
......@@ -70,6 +73,7 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
verifyCommon(createReqVO);
Integer scoreRuleType = scoreRule.getType();
verifyAndSetExtraDO(createReqVO, scoreRuleType, scoreRule);
scoreRule.setCode(scoreRuleGenCodeUtils.generateScoreRuleCode());
scoreRuleMapper.insert(scoreRule);
scoreRuleRedisDao.deleteEnableScoreRule(scoreRule.getType());
// 返回
......@@ -367,6 +371,7 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
scoreRuleDO.setCreateTime(null);
scoreRuleDO.setUpdateTime(null);
scoreRuleDO.setUpdater(null);
scoreRuleDO.setCode(scoreRuleGenCodeUtils.generateScoreRuleCode());
scoreRuleMapper.insert(scoreRuleDO);
return scoreRuleDO.getId();
}
......@@ -449,8 +454,9 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
case RECOMMEND:
case REGISTER:
return getEnableScoreRuleByType(scoreRuleType);
default:
return null;
}
return null;
}
@Override
......
package cn.iocoder.yudao.module.member.util;
import cn.iocoder.yudao.framework.redis.helper.RedisHelper;
import cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO;
import cn.iocoder.yudao.module.member.dal.mysql.scoreRule.ScoreRuleMapper;
import com.alibaba.excel.util.DateUtils;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.GET_LOCK_FAILED;
/**
* 根据规则生成各种code
*/
@Component
public class ScoreRuleGenCodeUtils {
@Resource
private RedisHelper redisHelper;
@Resource
private RedissonClient redissonClient;
@Resource
private ScoreRuleMapper scoreRuleMapper;
/**
* 生成积分规则编号
*/
public String generateScoreRuleCode() {
// 编号规则为PR+年份+5位数,例如PR2400001
String key = "scoreRule:max:number";
StringBuilder code = new StringBuilder();
code.append("PR");
code.append(DateUtils.format(new Date(), "yy"));
Long codeNum;
if (redisHelper.hasKey(key)) {
codeNum = redisHelper.incrBy(key, 1);
} else {
RLock lock = redissonClient.getLock("next:scoreRule:code:lock");
try {
boolean lockSuccess = lock.tryLock(2, 2, TimeUnit.SECONDS);
if (!lockSuccess) {
throw exception(GET_LOCK_FAILED);
}
String currentMaxScoreRuleCode = scoreRuleMapper.getCurrentMaxScoreRuleCode();
if (currentMaxScoreRuleCode == null){
codeNum = 1L;
} else {
codeNum = Long.parseLong(currentMaxScoreRuleCode.substring(4)) + 1;
}
redisHelper.set(key, String.valueOf(codeNum),10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw exception(GET_LOCK_FAILED);
} finally {
lock.unlock();
}
}
// 获得5位序列号,不足位前面补0
code.append(String.format("%05d", codeNum));
return code.toString();
}
public void historyScoreRuleCodeFlush() {
long start = 1L;
redisHelper.delete("scoreRule:max:number");
List<ScoreRuleDO> scoreRuleDOS = scoreRuleMapper.selectList();
for (ScoreRuleDO scoreRuleDO : scoreRuleDOS) {
StringBuilder code = new StringBuilder();
code.append("PR");
code.append(DateUtils.format(new Date(), "yy"));
code.append(String.format("%05d", start));
scoreRuleDO.setCode(code.toString());
scoreRuleMapper.updateById(scoreRuleDO);
start += 1;
}
}
}
......@@ -22,6 +22,10 @@ public class ScoreRuleBackVO {
@ApiModelProperty(value = "主键", required = true)
private Long id;
@ExcelProperty("编号")
@ApiModelProperty(value = "编号", required = true)
private String code;
@ExcelProperty("指标类型")
@ApiModelProperty(value = "指标类型", required = true)
private Integer type;
......
package cn.iocoder.yudao.module.member.vo.scoreRule;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleOrderVExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleRegisterExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleShareExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRulerRecommendExtraVO;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Data
@ToString(callSuper = true)
......
......@@ -22,7 +22,7 @@
left join member_user_score mus on mus.member_id = mu.id
left join ecw_region re on re.id = mu.country
left join ecw_region rea on rea.id = mu.city
where 1 = 1
where 1 = 1 and mu.deleted = 0
<include refid="scoreCondition"/>
order by mu.id
limit #{start}, #{size}
......@@ -33,7 +33,7 @@
from member_user mu
left join member_user_score mus on mus.member_id = mu.id
left join ecw_region re on re.id = mu.country
where 1 = 1
where 1 = 1 and mu.deleted = 0
<include refid="scoreCondition"/>
</select>
<select id="getByMemberId"
......
......@@ -533,9 +533,15 @@ public class OrderDO extends BaseDO {
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
//
// @ApiModelProperty(value = "拆单子订单是否变更运输方式")
// private Boolean splitChangeTransport = false;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private String pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
@TableField(exist = false)
@ApiModelProperty(value = "订单商品项列表")
......
......@@ -92,6 +92,10 @@ public class OrderConsigneeDO extends BaseDO {
* 客户id
*/
private Long customerId;
/**
* 客户编号
*/
private String customerNumber;
/**
* 客户联系人id
*/
......
......@@ -75,6 +75,10 @@ public class OrderConsignorDO extends BaseDO {
*
*/
private Long customerId;
/**
* 客户编号
*/
private String customerNumber;
/**
*
*/
......
......@@ -8,7 +8,6 @@ import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dto.OrderExportBackDTO;
import cn.iocoder.yudao.module.order.dto.OrderBackInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.dto.SearchBackDto;
import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionStatisticsExcelVo;
......@@ -662,11 +661,11 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderExcelVO> exportMyOrderExcelList(@Param("start")int start, @Param("size") int size,@Param("query") OrderQueryDTO query);
List<OrderExcelVO> exportMyOrderExcelList(@Param("start")int start, @Param("size") int size,@Param("query") OrderQueryVO query);
long exportOrderExcelCount(@Param("query") OrderQueryVO query);
long exportMyOrderExcelCount(@Param("query") OrderQueryDTO query);
long exportMyOrderExcelCount(@Param("query") OrderQueryVO query);
@ResultType(OrderBackPageVO.class)
@Select({
......@@ -1091,11 +1090,11 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
List<OrderBackPageVO> deptOrderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
List<OrderBackPageVO> deptOrderList1(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryDTO query);
List<OrderBackPageVO> deptOrderList1(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
long deptOrderCount(@Param("query") OrderQueryVO query);
long deptOrderCount1(@Param("query") OrderQueryDTO query);
long deptOrderCount1(@Param("query") OrderQueryVO query);
@ResultType(OrderBackPageVO.class)
@Select({
......@@ -1922,11 +1921,11 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
List<OrderBackPageVO> adminCargoControlOrderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
List<OrderBackPageVO> adminCargoControlMyOrderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryDTO query);
List<OrderBackPageVO> adminCargoControlMyOrderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
long adminCargoControlOrderCount(@Param("query") OrderQueryVO query);
long adminCargoControlMyOrderCount(@Param("query") OrderQueryDTO query);
long adminCargoControlMyOrderCount(@Param("query") OrderQueryVO query);
@ResultType(OrderBackPageVO.class)
@Select({
"<script>",
......@@ -3842,7 +3841,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsList(@Param("query") OrderQueryDTO query);
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsList(@Param("query") OrderQueryVO query);
/**
* 重货统计
......@@ -3850,7 +3849,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderHeavyExcelVo> getHeavyOrderExcelList(@Param("query") OrderQueryDTO query);
List<OrderHeavyExcelVo> getHeavyOrderExcelList(@Param("query") OrderQueryVO query);
/**
* 退仓统计
......@@ -3858,7 +3857,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(@Param("query") OrderQueryDTO query);
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(@Param("query") OrderQueryVO query);
/**
* 售后赔付
......@@ -3866,7 +3865,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(@Param("query") OrderQueryDTO query);
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(@Param("query") OrderQueryVO query);
/**
* 报关数据
......@@ -3874,7 +3873,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(@Param("query") OrderQueryDTO query);
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(@Param("query") OrderQueryVO query);
/**
* 出货量
......@@ -3882,7 +3881,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderShipDataExcelVo> getShipDatasExcelList(@Param("query") OrderQueryDTO query);
List<OrderShipDataExcelVo> getShipDatasExcelList(@Param("query") OrderQueryVO query);
/**
* 预付运费
......@@ -3890,7 +3889,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderShipFeeExcelVo> getShipFeeExcelList(@Param("query") OrderQueryDTO query);
List<OrderShipFeeExcelVo> getShipFeeExcelList(@Param("query") OrderQueryVO query);
@ResultType(OrderDO.class)
@Select({
......
......@@ -99,6 +99,7 @@ public interface OrderCargoControlMapper extends AbstractMapper<OrderCargoContro
"o.create_time, ",
"o.unload_time, ",
"o.is_limit_update_consignee, ",
"o.lock_consignee_day, ",
"o.lock_consignee_time, ",
"nee.name as consignee_name, ",
"nee.name_en as consignee_name_en, ",
......
......@@ -530,6 +530,15 @@ public class OrderBackInfoDto {
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
public void setExceptionReason(String exceptionReason) {
this.exceptionReason = exceptionReason;
if (StringUtils.isNotBlank(exceptionReason) && Objects.nonNull(this.lang)) {
......
......@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderShipDataExcelVo;
......@@ -52,7 +51,7 @@ public class AdvanceOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderShipFeeExcelVo> list = orderQueryService.getShipFeeExcelList(query);
String sheetName = event.getLang() == 0 ? "预付运费统计" : "advance fee statistics";
......
......@@ -10,7 +10,6 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderCostSummaryDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......
......@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -51,7 +50,7 @@ public class CustomsOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderCustomsDatasExcelVo> list = orderQueryService.getCustomsDatasExcelList(query);
String sheetName = event.getLang() == 0 ? "报关数据统计" : "customs data statistics";
......
......@@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.apollo.core.event.export.ExceptionOrderStatist
import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionStatisticsExcelVo;
......@@ -51,7 +50,7 @@ public class ExceptionOrderStatisticsExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderExceptionStatisticsExcelVo> list = orderQueryService.getOrderExceptionStatisticsExcel(query);
String sheetName = event.getLang() == 0 ? "异常单统计" : "Order exception statistics";
......
......@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderHeavyExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -51,7 +50,7 @@ public class HeavyOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderHeavyExcelVo> list = orderQueryService.getHeavyOrderExcelList(query);
String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics";
......
......@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.order.listener.export;
import cn.iocoder.yudao.framework.apollo.core.event.export.OrderCargoControlExcelExportEvent;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.orderCargoControl.OrderCargoControlService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import com.alibaba.fastjson.JSONObject;
......@@ -33,7 +32,7 @@ public class OrderCargoControlExcelExportListener {
public void orderCargoControlExcelExportEvent(OrderCargoControlExcelExportEvent event) {
if (StringUtils.isNotBlank(event.getRequestParams())){
try {
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
FileDO fileDO = orderCargoControlService.makeCargoControlOrderExcelFile(event.getUserId(), event.getUserType(), query);
event.setPath(fileDO.getPath());
......
......@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.order.listener.export;
import cn.iocoder.yudao.framework.apollo.core.event.export.OrderExcelExportEvent;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import com.alibaba.fastjson.JSONObject;
......@@ -59,7 +58,7 @@ public class OrderExcelExportListener {
public void MyOrderExcelExportEvent(OrderExcelExportEvent event) throws IOException {
if (StringUtils.isNotBlank(event.getRequestParams())){
try {
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
FileDO fileDO = orderQueryService.makeMyOrderExcelFile(event.getUserId(), event.getUserType(), query);
event.setPath(fileDO.getPath());
......
......@@ -3,10 +3,8 @@ package cn.iocoder.yudao.module.order.listener.export;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.event.export.ReturnOrderExcelExportEvent;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderReturnOrderExcelVo;
......@@ -51,7 +49,7 @@ public class ReturnOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderReturnOrderExcelVo> list = orderQueryService.getReturnOrderExcelList(query);
String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics";
......
......@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderSaleRepayExcelVo;
......@@ -51,7 +50,7 @@ public class SaleRepayOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderSaleRepayExcelVo> list = orderQueryService.getSaleRepayExcelList(query);
String sheetName = event.getLang() == 0 ? "售后赔偿金额统计" : "sale repay statistics";
......
......@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -52,7 +51,7 @@ public class ShippingOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
List<OrderShipDataExcelVo> list = orderQueryService.getShipDatasExcelList(query);
String sheetName = event.getLang() == 0 ? "客户出货量统计" : "shipping data statistics";
......
......@@ -161,7 +161,7 @@ public interface OrderQueryService {
PageResult<OrderBackPageVO> deptOrderPage(OrderQueryVO query, PageVO page);
PageResult<OrderBackPageVO> deptOrderPage1(OrderQueryDTO query, PageVO page);
PageResult<OrderBackPageVO> deptOrderPage1(OrderQueryVO query, PageVO page);
PageResult<OrderBackPageVO> myIssuedOrderPage(OrderQueryVO query, PageVO page);
......@@ -186,7 +186,7 @@ public interface OrderQueryService {
PageResult<OrderBackPageVO> adminCargoControlOrderPage(OrderQueryVO query, PageVO page);
PageResult<OrderBackPageVO> adminCargoControlMyOrderPage(OrderQueryDTO query, PageVO page);
PageResult<OrderBackPageVO> adminCargoControlMyOrderPage(OrderQueryVO query, PageVO page);
PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page);
......@@ -320,21 +320,21 @@ public interface OrderQueryService {
FileDO makeOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception;
FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryDTO query);
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryVO query);
List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryDTO query);
List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryVO query);
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryDTO query);
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryVO query);
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryDTO query);
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryVO query);
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryDTO query);
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryVO query);
List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryDTO query);
List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryVO query);
List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryDTO query);
List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryVO query);
/**
* 查询订单的身份信息
......
......@@ -30,6 +30,8 @@ import java.util.List;
public interface OrderService extends IService<OrderDO> {
void updateOrderSalesmanId(Long orderId,Long salesman_id);
/**
* 创建订单
*
......@@ -379,4 +381,15 @@ public interface OrderService extends IService<OrderDO> {
void updateOrderCustomerAndSalesmanId(Long customerId, Long salesmanId, Long orderId);
/**
* copy订单
*
* @param copyOrderId 复制的订单id
* @param memberUserDO 会员信息
* @return 编号
*/
Long copyOrder(Long copyOrderId,MemberUserDO memberUserDO);
}
......@@ -7,17 +7,14 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderSendSmsReqVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControl.*;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickApplyVO;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Collection;
import java.util.List;
......@@ -123,7 +120,7 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO>
// FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception;
FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
/**
* 判断是否控货人是否设置了控货密码
......
......@@ -30,7 +30,6 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsigno
import cn.iocoder.yudao.module.order.dal.mysql.approval.OrderApprovalMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.enums.OrderApprovalTypeResultEnum;
import cn.iocoder.yudao.module.order.enums.OrderStatusEnum;
import cn.iocoder.yudao.module.order.service.order.OrderBusinessService;
......@@ -407,7 +406,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
}
@Override
public FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception {
public FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
......@@ -485,6 +484,8 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
}
OrderCargoControlApplyVO applyVO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderCargoControlApplyVO.class);
orderApprovalDO.setStatus(result);
applyVO.setApplyStatus(result);
orderApprovalDO.setDetails(JSONObject.toJSONString(applyVO));
List<ApplyInfoVO> list = new ArrayList<>();
String msg = "";
if (result == 1) {
......@@ -552,8 +553,6 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
}
} else if (orderApprovalDO.getType() == 62) {
// TODO 海外仓修改申请
msg = "海外仓修改申请审批通过";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("订单修改为海外仓模式");
......@@ -569,28 +568,32 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
@Override
public OrderCargoControlApplyVO approvalOrderCargoControlPickLimitUpdateByOrderId(Long orderId) {
OrderApprovalDO orderApprovalDO = orderApprovalMapper.orderApprovalInfoByOrderIdAndType(orderId, 61);
if (Objects.isNull(orderApprovalDO)) {
if (Objects.isNull(orderApprovalDO) || orderApprovalDO.getStatus() > 1) {
OrderCargoControlReleaseInfoDto releaseInfoDto = this.getOrderCargoControlReleaseInfo(orderId);
OrderCargoControlApplyVO orderCargoControlApplyVO = new OrderCargoControlApplyVO();
BeanUtils.copyProperties(releaseInfoDto, orderCargoControlApplyVO);
orderCargoControlApplyVO.setApplyStatus(1);
orderCargoControlApplyVO.setApplyStatus(0);
return orderCargoControlApplyVO;
} else {
return JSONObject.parseObject(orderApprovalDO.getDetails(), OrderCargoControlApplyVO.class);
OrderCargoControlApplyVO applyVO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderCargoControlApplyVO.class);
applyVO.setFormId(orderApprovalDO.getFormId());
return applyVO;
}
}
@Override
public OrderCargoControlApplyVO approvalOrderCargoControlOverseasWarehouseUpdateByOrderId(Long orderId) {
OrderApprovalDO orderApprovalDO = orderApprovalMapper.orderApprovalInfoByOrderIdAndType(orderId, 62);
if (Objects.isNull(orderApprovalDO)) {
if (Objects.isNull(orderApprovalDO) || orderApprovalDO.getStatus() > 1) {
OrderCargoControlReleaseInfoDto releaseInfoDto = this.getOrderCargoControlReleaseInfo(orderId);
OrderCargoControlApplyVO orderCargoControlApplyVO = new OrderCargoControlApplyVO();
BeanUtils.copyProperties(releaseInfoDto, orderCargoControlApplyVO);
orderCargoControlApplyVO.setApplyStatus(1);
orderCargoControlApplyVO.setApplyStatus(0);
return orderCargoControlApplyVO;
} else {
return JSONObject.parseObject(orderApprovalDO.getDetails(), OrderCargoControlApplyVO.class);
OrderCargoControlApplyVO applyVO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderCargoControlApplyVO.class);
applyVO.setFormId(orderApprovalDO.getFormId());
return applyVO;
}
}
......@@ -629,6 +632,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
orderCargoControlApplyVO.setLockConsigneeDay(releaseInfoDto.getLockConsigneeDay());
orderCargoControlApplyVO.setLockConsigneeTime(releaseInfoDto.getLockConsigneeTime());
orderCargoControlApplyVO.setUnloadTime(releaseInfoDto.getUnloadTime());
orderCargoControlApplyVO.setApplyStatus(1);
OrderApprovalDO orderApprovalDO = new OrderApprovalDO();
orderApprovalDO.setFollowUpSalesmanId(String.valueOf(orderDO.getSalesmanId()));//跟进业务员为订单的跟进业务员
......@@ -637,6 +641,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
orderApprovalDO.setUpdater(creator);
orderApprovalDO.setCreateTime(now);
orderApprovalDO.setUpdateTime(now);
orderApprovalDO.setStatus(1);
List<ApplyInfoVO> list = new ArrayList<>();
String msg = "";
if (orderCargoControlApplyVO.getApplyType() == 61) {
......@@ -644,7 +649,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
orderApprovalDO.setType(61);
orderApprovalDO.setDetails(JSONObject.toJSONString(orderCargoControlApplyVO));
orderApprovalMapper.insert(orderApprovalDO);
String formId = bpmCreateServiceFactory.createBmp(userId, orderApprovalDO.getOrderApprovalId(), WorkFlowEmus.ORDER_OVERSEAS_WAREHOUSE_CHANGE.getKey(), orderDO.getOrderNo(),
String formId = bpmCreateServiceFactory.createBmp(userId, orderApprovalDO.getOrderApprovalId(), WorkFlowEmus.ORDER_CONSIGNEE_LIMIT_CHANGE.getKey(), orderDO.getOrderNo(),
StringUtils.isNotBlank(orderCargoControlApplyVO.getCcIds()) ? orderCargoControlApplyVO.getCcIds().split(StrUtil.COMMA) : null);
orderApprovalDO.setFormId(formId);
msg = "收货人限制修改申请";
......@@ -671,7 +676,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
orderApprovalDO.setType(62);
orderApprovalDO.setDetails(JSONObject.toJSONString(orderCargoControlApplyVO));
orderApprovalMapper.insert(orderApprovalDO);
String formId = bpmCreateServiceFactory.createBmp(userId, orderApprovalDO.getOrderApprovalId(), WorkFlowEmus.ORDER_CONSIGNEE_LIMIT_CHANGE.getKey(), orderDO.getOrderNo(),
String formId = bpmCreateServiceFactory.createBmp(userId, orderApprovalDO.getOrderApprovalId(), WorkFlowEmus.ORDER_OVERSEAS_WAREHOUSE_CHANGE.getKey(), orderDO.getOrderNo(),
StringUtils.isNotBlank(orderCargoControlApplyVO.getCcIds()) ? orderCargoControlApplyVO.getCcIds().split(StrUtil.COMMA) : null);
orderApprovalDO.setFormId(formId);
msg = "海外仓修改申请";
......
......@@ -182,6 +182,19 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ExcelProperty("收货人客户id")
@ApiModelProperty(value = "收货人客户id")
private Long consigneeCustomerId;
@ExcelProperty("收货人客户编号")
@ApiModelProperty(value = "收货人客户编号")
private String consigneeCustomerNumber;
@ExcelProperty("收货人跟进客服")
@ApiModelProperty(value = "收货人跟进客服")
private String consigneeFollowCustomerService;
@ExcelProperty("收货人姓名")
@ApiModelProperty(value = "收货人姓名")
private String consigneeName;
......@@ -197,10 +210,23 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "收货人手机国家区号")
private String consigneeCountryCode;
@ExcelProperty("发货人客户id")
@ApiModelProperty(value = "发货人客户id")
private Long consignorCustomerId;
@ExcelProperty("发货人客户编号")
@ApiModelProperty(value = "发货人客户编号")
private String consignorCustomerNumber;
@ExcelProperty("发货人跟进客服")
@ApiModelProperty(value = "发货人跟进客服")
private String consignorFollowCustomerService;
@ExcelProperty("发货人姓名")
@ApiModelProperty(value = "发货人姓名")
private String consignorName;
@ExcelProperty("发货人姓名(英文)")
@ApiModelProperty(value = "发货人姓名(英文)")
private String consignorNameEn;
......@@ -345,6 +371,15 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
/**
* 渠道名称
*/
......@@ -488,9 +523,6 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "业绩归属客户名称")
private String customerName;
@ApiModelProperty(value = "提货数量")
private Integer pickNum;
// -----------end -----------
......
......@@ -589,6 +589,25 @@ public class OrderBackVO {
private Boolean isInOpenSea;
@ApiModelProperty(value = "是否有收货人,1-是,0-否")
private Boolean hasConsignee = true;
@ApiModelProperty(value = "是否允许无收货人,1-是,0-否")
private Boolean noConsignee;
@ApiModelProperty(value = "是否限制修改收货人")
private Boolean isLimitUpdateConsignee;
@ApiModelProperty(value = "放货锁定收货人到期时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date lockConsigneeTime;
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
@ApiModelProperty(value = "订单修改是否变动了归属客户,此字段用来判定订单是否需要重置归属客户经理,下单后归属客户的客户经理是固定的,除非订单归属客户变动,才需要重置客户经理")
@TableField(exist = false)
private Boolean isChargeCustomer;
......@@ -608,8 +627,15 @@ public class OrderBackVO {
*/
private BigDecimal calVValue;
@ApiModelProperty(value = "是否有收货人,1-是,0-否")
private Boolean hasConsignee = true;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
public void setExternalWarehouseJson(String externalWarehouseJson) {
this.externalWarehouseJson = externalWarehouseJson;
......
......@@ -355,6 +355,15 @@ public class OrderBaseVO {
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
public void setExceptionReason(String exceptionReason) {
this.exceptionReason = StringUtils.isNotBlank(exceptionReason) ? I18nMessage.getMessage(exceptionReason) : exceptionReason;
}
......
......@@ -93,10 +93,13 @@ public class OrderCargoControlApplyVO {
@ApiModelProperty(value = "修改原因")
private String reasonZh;
@ApiModelProperty(value = "审批状态: 1 处理中 2 通过 3 不通过 4 已取消")
private Integer applyStatus = 1;
@ApiModelProperty(value = "审批状态: 0 初始化待处理 1 处理中 2 通过 3 不通过 4 已取消")
private Integer applyStatus = 0;
@ApiModelProperty(value = "抄送人(id逗号拼接)")
private String ccIds;
@ApiModelProperty(value = "流程表单实例ID")
private String formId;
}
......@@ -91,6 +91,10 @@ public class OrderConsigneeBackVO {
@ApiModelProperty(value = "客户id", required = true)
private Long customerId;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("客户联系人id")
@ApiModelProperty(value = "客户联系人id", required = true)
private Long customerContactsId;
......
......@@ -61,6 +61,9 @@ public class OrderConsigneeBaseVO {
@NotNull(message = "客户id不能为空")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "客户联系人id", required = true)
@NotNull(message = "客户联系人id不能为空")
private Long customerContactsId;
......
......@@ -61,6 +61,9 @@ public class OrderConsigneeQueryVO {
@ApiModelProperty(value = "客户id")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "客户联系人id")
private Long customerContactsId;
......
......@@ -64,10 +64,15 @@ public class OrderConsignorBackVO {
@ApiModelProperty(value = "国家区号", required = true)
private String countryCode;
@ExcelProperty("")
@ApiModelProperty(value = "", required = true)
@ExcelProperty("客户id")
@ApiModelProperty(value = "客户id", required = true)
private Long customerId;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("")
@ApiModelProperty(value = "", required = true)
private Long customerContactsId;
......
package cn.iocoder.yudao.module.order.vo.orderConsignor;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
......@@ -51,6 +52,9 @@ public class OrderConsignorBaseVO {
@NotNull(message = "不能为空")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "发货客户联系人ID", required = true)
@NotNull(message = "不能为空")
private Long customerContactsId;
......
......@@ -160,6 +160,16 @@ public class OrderController {
}
@PostMapping("/copy/{copyOrderId}")
@ApiOperation("复制订单")
@DynamicRateLimiter(base = "#Headers['Authorization']", permits = 1)
@Idempotent(timeout = 5)
public CommonResult<Long> copyOrder(@PathVariable Long copyOrderId) {
Long orderId = orderService.copyOrder(copyOrderId, null);
return success(orderId);
}
@PutMapping("/update")
@ApiOperation("更新订单")
@Idempotent(timeout = 5)
......
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