Commit 4cb06535 authored by honghy's avatar honghy Committed by wux

需求95 报价单页面和列表调整

parent 7173ecb6
ALTER TABLE ecw_offer
ADD sale_stage tinyint comment '销售阶段',
ADD customer_status tinyint comment '客户状态',
ADD cargo_status tinyint comment '货物状态',
ADD inquiry_source tinyint comment '询盘来源',
ADD manufacturer VARCHAR(255) comment '厂家',
ADD manufacturer_phone VARCHAR(255) comment '厂家电话',
ADD reason_dict tinyint comment '原因数据字典',
ADD estimated_shipping_time datetime comment '预计发货时间';
INSERT INTO `jiedao`.`system_dict_type`(`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('客户状态', 'ecw_offer_customer_status', 0, NULL, '1', '2025-02-11 10:08:50', '1', '2025-02-11 10:08:50', b'0');
INSERT INTO `jiedao`.`system_dict_type`(`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('货物状态', 'ecw_offer_cargo_status', 0, NULL, '1', '2025-02-11 10:08:50', '1', '2025-02-11 10:08:50', b'0');
INSERT INTO `jiedao`.`system_dict_type`(`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('询盘来源', 'ecw_offer_inquiry_source', 0, NULL, '1', '2025-02-11 10:08:50', '1', '2025-02-11 10:08:50', b'0');
INSERT INTO `jiedao`.`system_dict_type`(`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('输单原因', 'ecw_offer_reason_dict', 0, NULL, '1', '2025-02-11 10:08:50', '1', '2025-02-11 10:08:50', b'0');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (3, '关系(指定)', '3', 'ecw_offer_reason_dict', 0, 'default', '', NULL, '2741', '2025-02-11 16:31:08', '2741', '2025-02-11 16:31:08', b'0', 'Specified Relationship', 'Relation Spécifiée');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (2, '服务', '2', 'ecw_offer_reason_dict', 0, 'default', '', NULL, '2741', '2025-02-11 16:30:46', '2741', '2025-02-11 16:30:46', b'0', 'Service', 'Service');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (1, '价格', '1', 'ecw_offer_reason_dict', 0, 'default', '', NULL, '2741', '2025-02-11 16:30:12', '2741', '2025-02-11 16:30:12', b'0', 'Price', 'Prix');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (6, '目的港线索', '6', 'ecw_offer_inquiry_source', 0, 'default', '', NULL, '2741', '2025-02-11 16:12:52', '2741', '2025-02-11 16:12:52', b'0', 'Destination Port Leads', 'Pistes du Port de Destination');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (5, '公海(注意下掉时间)', '5', 'ecw_offer_inquiry_source', 0, 'default', '', NULL, '2741', '2025-02-11 16:12:27', '2741', '2025-02-11 16:12:27', b'0', 'Open Sea (Note the Drop Time)', 'Mer Ouverte (Notez le Temps de Chute)');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (4, '市场部', '4', 'ecw_offer_inquiry_source', 0, 'default', '', NULL, '2741', '2025-02-11 16:12:00', '2741', '2025-02-11 16:12:00', b'0', 'Marketing Department', 'Département Marketing');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (3, '收货人推荐', '3', 'ecw_offer_inquiry_source', 0, 'default', '', NULL, '2741', '2025-02-11 16:11:25', '2741', '2025-02-11 16:11:25', b'0', 'Consignee Recommendation', 'Recommandation de Destinataire');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (2, '发货人推荐', '2', 'ecw_offer_inquiry_source', 0, 'default', '', NULL, '2741', '2025-02-11 16:10:58', '2741', '2025-02-11 16:10:58', b'0', 'Shipper Recommendation', 'Recommandation d\'Expéditeur');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (1, '成交客户复购', '1', 'ecw_offer_inquiry_source', 0, 'default', '', NULL, '2741', '2025-02-11 16:07:14', '2741', '2025-02-11 16:07:14', b'0', 'Repeat Purchase by Closed Customers', 'Achat Répété par Clients Fermés');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (4, '货好,尾款已付', '4', 'ecw_offer_cargo_status', 0, 'default', '', NULL, '2741', '2025-02-11 16:01:33', '2741', '2025-02-11 16:01:33', b'0', 'Goods ready, final payment made', 'Marchandises prêtes, paiement final effectué');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (3, '货好,未付尾款', '3', 'ecw_offer_cargo_status', 0, 'default', '', NULL, '2741', '2025-02-11 16:01:06', '2741', '2025-02-11 16:01:06', b'0', 'Goods ready, final payment not made', 'Marchandises prêtes, paiement final non effectué');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (2, '已下订金,货物生产中', '2', 'ecw_offer_cargo_status', 0, 'default', '', NULL, '2741', '2025-02-11 16:00:43', '2741', '2025-02-11 16:00:43', b'0', 'Deposit paid, goods in production', 'Acompte versé, production en cours');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (1, '未向工厂下单', '1', 'ecw_offer_cargo_status', 0, 'default', '', NULL, '2741', '2025-02-11 16:00:19', '2741', '2025-02-11 16:00:19', b'0', 'Order not placed with the factory', 'Commande non passée à l\'usine');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (6, '回访', '6', 'ecw_offer_customer_status', 0, 'default', '', NULL, '2741', '2025-02-11 15:57:13', '2741', '2025-02-11 15:57:13', b'0', 'Follow-up Visit', 'Visite de Suivi');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (5, '增量', '5', 'ecw_offer_customer_status', 0, 'default', '', NULL, '2741', '2025-02-11 15:56:52', '2741', '2025-02-11 15:56:52', b'0', 'Increment', 'Incrément');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (4, '流失', '4', 'ecw_offer_customer_status', 0, 'default', '', NULL, '2741', '2025-02-11 15:54:07', '2741', '2025-02-11 15:54:07', b'0', 'Loss', 'Perte');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (3, '轻货', '3', 'ecw_offer_customer_status', 0, 'default', '', NULL, '2741', '2025-02-11 15:52:32', '2741', '2025-02-11 15:52:32', b'0', 'Light Cargo', 'Marchandises Légères');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (2, '重货', '2', 'ecw_offer_customer_status', 0, 'default', '', NULL, '2741', '2025-02-11 15:52:10', '2741', '2025-02-11 15:52:10', b'0', 'Heavy Cargo', 'Marchandises Lourdes');
INSERT INTO `jiedao`.`system_dict_data`(`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`, `label_fr`) VALUES (1, '线索', '1', 'ecw_offer_customer_status', 0, 'default', '', NULL, '2741', '2025-02-11 15:50:47', '2741', '2025-02-11 15:50:47', b'0', 'Clue', 'Indice');
package cn.iocoder.yudao.module.sale.dal.dataobject.offer; package cn.iocoder.yudao.module.sale.dal.dataobject.offer;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import javax.validation.constraints.NotNull;
/** /**
...@@ -169,6 +170,46 @@ public class OfferDO extends BaseDO { ...@@ -169,6 +170,46 @@ public class OfferDO extends BaseDO {
*/ */
private Integer transportId; private Integer transportId;
/**
* 销售阶段 字典sale_stage
*/
private Integer saleStage;
/**
* 销售阶段 字典ecw_offer_customer_status
*/
private Integer customerStatus;
/**
* 销售阶段 字典ecw_offer_cargo_status
*/
private Integer cargoStatus;
/**
* 销售阶段 字典ecw_offer_inquiry_source
*/
private Integer inquirySource;
/**
* 厂家
*/
private String manufacturer;
/**
* 厂家电话
*/
private String manufacturerPhone;
/**
* 原因数据字典
*/
private Integer reasonDict;
/**
* 预计发货时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date estimatedShippingTime;
@ApiModelProperty(value = "线路id") @ApiModelProperty(value = "线路id")
private Long lineId; private Long lineId;
......
package cn.iocoder.yudao.module.sale.service.offer; package cn.iocoder.yudao.module.sale.service.offer;
import java.io.IOException;
import java.util.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.*;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.commission.CustomerCommissionDO;
import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService; import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferDO;
import cn.iocoder.yudao.module.sale.vo.offer.*; import cn.iocoder.yudao.module.sale.vo.offer.*;
import cn.iocoder.yudao.module.sale.vo.offer.prod.OfferProdCreateReqVO;
import cn.iocoder.yudao.module.sale.vo.offerApproval.OfferApprovalBackInfoVO; import cn.iocoder.yudao.module.sale.vo.offerApproval.OfferApprovalBackInfoVO;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
/** /**
* 报价单管理 Service 接口 * 报价单管理 Service 接口
* *
...@@ -197,4 +196,11 @@ public interface OfferService extends IService<OfferDO> { ...@@ -197,4 +196,11 @@ public interface OfferService extends IService<OfferDO> {
* @return * @return
*/ */
List<OfferRespVO> getCustomerOfferSelect(Long customerId, String searchKey); List<OfferRespVO> getCustomerOfferSelect(Long customerId, String searchKey);
/**
* 汇总
* @param pageVO
* @return
*/
OfferRespVO statistics(OfferPageReqVO pageVO);
} }
...@@ -7,24 +7,26 @@ import cn.iocoder.yudao.framework.common.util.code.CodeUtils; ...@@ -7,24 +7,26 @@ import cn.iocoder.yudao.framework.common.util.code.CodeUtils;
import cn.iocoder.yudao.framework.common.util.validation.StrValidationUtils; import cn.iocoder.yudao.framework.common.util.validation.StrValidationUtils;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService; import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.bpm.enums.WorkFlowEmus;
import cn.iocoder.yudao.module.bpm.api.BpmCreateServiceFactory; import cn.iocoder.yudao.module.bpm.api.BpmCreateServiceFactory;
import cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseLineDO; import cn.iocoder.yudao.module.bpm.enums.WorkFlowEmus;
import cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseLineMapper; 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.customer.service.zhongPao.ZhongPaoService;
import cn.iocoder.yudao.module.customer.vo.zhongPao.CustomerZhongPaoQueryVO; import cn.iocoder.yudao.module.customer.vo.zhongPao.CustomerZhongPaoQueryVO;
import cn.iocoder.yudao.module.customer.vo.zhongPao.ZhongPaoBestVO; import cn.iocoder.yudao.module.customer.vo.zhongPao.ZhongPaoBestVO;
import cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseLineMapper;
import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto; import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto;
import cn.iocoder.yudao.module.ecw.api.customer.CustomerApi; import cn.iocoder.yudao.module.ecw.api.customer.CustomerApi;
import cn.iocoder.yudao.module.ecw.dal.dataobject.currency.CurrencyDO; import cn.iocoder.yudao.module.ecw.dal.dataobject.currency.CurrencyDO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO; import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO;
import cn.iocoder.yudao.module.ecw.service.currency.CurrencyService; import cn.iocoder.yudao.module.ecw.service.currency.CurrencyService;
import cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService; import cn.iocoder.yudao.module.ecw.service.region.RegionService;
import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO; import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO; import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
...@@ -35,22 +37,18 @@ import cn.iocoder.yudao.module.order.enums.OrderNumberEnum; ...@@ -35,22 +37,18 @@ import cn.iocoder.yudao.module.order.enums.OrderNumberEnum;
import cn.iocoder.yudao.module.order.enums.OrderStatusEnum; import cn.iocoder.yudao.module.order.enums.OrderStatusEnum;
import cn.iocoder.yudao.module.order.service.order.OrderConsigneeService; import cn.iocoder.yudao.module.order.service.order.OrderConsigneeService;
import cn.iocoder.yudao.module.order.service.order.OrderConsignorService; import cn.iocoder.yudao.module.order.service.order.OrderConsignorService;
import cn.iocoder.yudao.module.order.service.orderNumberLog.OrderNumberLogService;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductAttrDO;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductDO;
import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.product.dto.CouponAvailableGroupDto;
import cn.iocoder.yudao.module.product.dto.FeeDto;
import cn.iocoder.yudao.module.product.enums.FeeTypeEnum;
import cn.iocoder.yudao.module.customer.service.customer.CustomerService;
import cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService;
import cn.iocoder.yudao.module.ecw.service.region.RegionService;
import cn.iocoder.yudao.module.order.service.order.OrderService; import cn.iocoder.yudao.module.order.service.order.OrderService;
import cn.iocoder.yudao.module.order.service.orderNumberLog.OrderNumberLogService;
import cn.iocoder.yudao.module.order.vo.order.OrderCreateReqVO; import cn.iocoder.yudao.module.order.vo.order.OrderCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCreateReqVO; import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCreateReqVO;
import cn.iocoder.yudao.module.product.component.ProdCostCalculation; import cn.iocoder.yudao.module.product.component.ProdCostCalculation;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductAttrDO;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductDO;
import cn.iocoder.yudao.module.product.dto.CalculationCostResultDto; import cn.iocoder.yudao.module.product.dto.CalculationCostResultDto;
import cn.iocoder.yudao.module.product.dto.CouponAvailableGroupDto;
import cn.iocoder.yudao.module.product.dto.FeeDto;
import cn.iocoder.yudao.module.product.dto.ProdCostDto; import cn.iocoder.yudao.module.product.dto.ProdCostDto;
import cn.iocoder.yudao.module.product.enums.FeeTypeEnum;
import cn.iocoder.yudao.module.product.param.ProdConditionParam; import cn.iocoder.yudao.module.product.param.ProdConditionParam;
import cn.iocoder.yudao.module.product.service.product.ProductService; import cn.iocoder.yudao.module.product.service.product.ProductService;
import cn.iocoder.yudao.module.sale.convert.offer.OfferConvert; import cn.iocoder.yudao.module.sale.convert.offer.OfferConvert;
...@@ -105,10 +103,10 @@ import java.util.stream.Stream; ...@@ -105,10 +103,10 @@ import java.util.stream.Stream;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.*;
import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.NOT_FIND_CURRENCY; import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.NOT_FIND_CURRENCY;
import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.*;
import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.DEPARTURE_NOT_EXISTS; import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.DEPARTURE_NOT_EXISTS;
import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.OBJECTIVE_NOT_EXISTS; import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.OBJECTIVE_NOT_EXISTS;
import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.PROD_NOT_EXISTS; import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.PROD_NOT_EXISTS;
import static cn.iocoder.yudao.module.sale.enums.ErrorCodeConstants.*;
/** /**
* 报价单管理 Service 实现类 * 报价单管理 Service 实现类
...@@ -379,11 +377,13 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -379,11 +377,13 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
param.setOneSeaFreight(offerProdDO.getOneSeaFreight()); param.setOneSeaFreight(offerProdDO.getOneSeaFreight());
param.setOrgFreightPrice(offerProdDO.getOriginalSeaFreight());
param.setFreightCurrency(Objects.isNull(offerProdDO.getSeaFreightCurrency()) ? null : Integer.valueOf(String.valueOf(offerProdDO.getSeaFreightCurrency()))); param.setFreightCurrency(Objects.isNull(offerProdDO.getSeaFreightCurrency()) ? null : Integer.valueOf(String.valueOf(offerProdDO.getSeaFreightCurrency())));
param.setFreightVolume(offerProdDO.getSeaFreightVolume()); param.setFreightVolume(offerProdDO.getSeaFreightVolume());
param.setOneClearanceFee(offerProdDO.getOneClearanceFreight()); param.setOneClearanceFee(offerProdDO.getOneClearanceFreight());
param.setClearanceFeeCurrency(Objects.isNull(offerProdDO.getClearanceFreightCurrency()) ? null : Integer.valueOf(String.valueOf(offerProdDO.getClearanceFreightCurrency()))); param.setClearanceFeeCurrency(Objects.isNull(offerProdDO.getClearanceFreightCurrency()) ? null : Integer.valueOf(String.valueOf(offerProdDO.getClearanceFreightCurrency())));
param.setClearanceFeeVolume(offerProdDO.getClearanceFreightVolume()); param.setClearanceFeeVolume(offerProdDO.getClearanceFreightVolume());
param.setOrgClearanceFeePrice(offerProdDO.getOriginalClearanceFreight());
param.setLiquidFreightPrice(offerProdDO.getLiquidFreightPrice()); param.setLiquidFreightPrice(offerProdDO.getLiquidFreightPrice());
param.setLiquidClearanceFeePrice(offerProdDO.getLiquidClearanceFeePrice()); param.setLiquidClearanceFeePrice(offerProdDO.getLiquidClearanceFeePrice());
...@@ -777,7 +777,9 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -777,7 +777,9 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
if (specialApplyVO.getType() == 1 || specialApplyVO.getType() == 2) { if (specialApplyVO.getType() == 1 || specialApplyVO.getType() == 2) {
offerProdDO.setSpecialPriceType(Boolean.TRUE); offerProdDO.setSpecialPriceType(Boolean.TRUE);
offerProdDO.setOneSeaFreight(specialApplyVO.getSeaFreight()); offerProdDO.setOneSeaFreight(specialApplyVO.getSeaFreight());
offerProdDO.setOriginalSeaFreight(specialApplyVO.getOrgSeaFreight());
offerProdDO.setOneClearanceFreight(specialApplyVO.getClearanceFreight()); offerProdDO.setOneClearanceFreight(specialApplyVO.getClearanceFreight());
offerProdDO.setOriginalClearanceFreight(specialApplyVO.getOrgClearanceFreight());
} }
if (specialApplyVO.getType() == 3) { if (specialApplyVO.getType() == 3) {
// 计算新的销售价 // 计算新的销售价
...@@ -903,6 +905,7 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -903,6 +905,7 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
if (offerResultVO.getResult() == 0) { if (offerResultVO.getResult() == 0) {
// 输单 // 输单
offerDO.setReason(offerResultVO.getReason()); offerDO.setReason(offerResultVO.getReason());
offerDO.setReasonDict(offerResultVO.getReasonDict());
offerDO.setOldStatus(offerDO.getStatus()); offerDO.setOldStatus(offerDO.getStatus());
offerDO.setStatus(5); offerDO.setStatus(5);
offerDO.setOrderId(-1L); offerDO.setOrderId(-1L);
...@@ -1100,6 +1103,11 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -1100,6 +1103,11 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
} }
@Override
public OfferRespVO statistics(OfferPageReqVO pageVO) {
return offerMapper.statistics(pageVO);
}
// @Override // @Override
// public PageResult<OfferRespVO> deptOfferPage(OfferPageReqVO pageReqVO) { // public PageResult<OfferRespVO> deptOfferPage(OfferPageReqVO pageReqVO) {
// IPage<OfferRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); // IPage<OfferRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO);
...@@ -1539,4 +1547,5 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -1539,4 +1547,5 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
.orderByDesc(OfferDO::getOrderId).last("limit 10")); .orderByDesc(OfferDO::getOrderId).last("limit 10"));
return OfferConvert.INSTANCE.convertList(offerDOList); return OfferConvert.INSTANCE.convertList(offerDOList);
} }
} }
package cn.iocoder.yudao.module.sale.vo.offer; package cn.iocoder.yudao.module.sale.vo.offer;
import cn.iocoder.yudao.framework.common.validation.Marks;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.Date;
import io.swagger.annotations.*;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.*;
/** /**
...@@ -167,5 +164,44 @@ public class OfferBaseVO { ...@@ -167,5 +164,44 @@ public class OfferBaseVO {
@ApiModelProperty(value = "商户洽谈的跟进记录数量") @ApiModelProperty(value = "商户洽谈的跟进记录数量")
private Integer logCount; private Integer logCount;
/**
* 销售阶段 字典sale_stage
*/
private Integer saleStage;
/**
* 销售阶段 字典ecw_offer_customer_status
*/
private Integer customerStatus;
/**
* 销售阶段 字典ecw_offer_cargo_status
*/
private Integer cargoStatus;
/**
* 销售阶段 字典ecw_offer_inquiry_source
*/
private Integer inquirySource;
/**
* 厂家
*/
private String manufacturer;
/**
* 厂家电话
*/
private String manufacturerPhone;
/**
* 原因数据字典
*/
private Integer reasonDict;
/**
* 预计发货时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date estimatedShippingTime;
} }
...@@ -64,6 +64,14 @@ public class OfferPageReqVO extends PageParam { ...@@ -64,6 +64,14 @@ public class OfferPageReqVO extends PageParam {
@ApiModelProperty(value = "结束预计结束时间") @ApiModelProperty(value = "结束预计结束时间")
private Date endStopTime; private Date endStopTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始预计发货时间")
private Date beginEstimatedShippingTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束预计发货时间")
private Date endEstimatedShippingTime;
@ApiModelProperty(value = "控货") @ApiModelProperty(value = "控货")
private Boolean control; private Boolean control;
...@@ -180,6 +188,9 @@ public class OfferPageReqVO extends PageParam { ...@@ -180,6 +188,9 @@ public class OfferPageReqVO extends PageParam {
@ApiModelProperty(value = "目的仓ID集合") @ApiModelProperty(value = "目的仓ID集合")
private List<Long> destWarehouseIds; private List<Long> destWarehouseIds;
@ApiModelProperty(value = "客户状态")
private List<Long> customerStatusList;
@ApiModelProperty(value = "有效期") @ApiModelProperty(value = "有效期")
private TimeSlot expired; private TimeSlot expired;
...@@ -201,4 +212,21 @@ public class OfferPageReqVO extends PageParam { ...@@ -201,4 +212,21 @@ public class OfferPageReqVO extends PageParam {
@ApiModelProperty(value = "客户来源列表") @ApiModelProperty(value = "客户来源列表")
private List<Long> sourceIds; private List<Long> sourceIds;
@ApiModelProperty(value = "询盘来源")
private List<Long> inquirySourceList;
@ApiModelProperty(value = "销售阶段")
private List<Long> saleStageList;
@ApiModelProperty(value = "货物状态")
private List<Long> cargoStatusList;
@ApiModelProperty(value = "联系人手机号")
private String relationPhone;
@ApiModelProperty(value = "厂家电话")
private String manufacturer;
@ApiModelProperty(value = "厂家电话")
private String manufacturerPhone;
} }
...@@ -2,17 +2,21 @@ package cn.iocoder.yudao.module.sale.vo.offer; ...@@ -2,17 +2,21 @@ package cn.iocoder.yudao.module.sale.vo.offer;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupBackVO; import cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupBackVO;
import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto; import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto;
import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferProdDO;
import cn.iocoder.yudao.module.sale.vo.offer.prod.OfferProdRespVO; import cn.iocoder.yudao.module.sale.vo.offer.prod.OfferProdRespVO;
import cn.iocoder.yudao.module.sale.vo.offer.transport.OfferTransportCreateReqVO;
import cn.iocoder.yudao.module.sale.vo.offer.transport.OfferTransportRespVO; import cn.iocoder.yudao.module.sale.vo.offer.transport.OfferTransportRespVO;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.*; import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.*; import java.util.List;
@ApiModel("管理后台 - 报价单管理 Response VO") @ApiModel("管理后台 - 报价单管理 Response VO")
@Data @Data
...@@ -90,6 +94,17 @@ public class OfferRespVO extends OfferBaseVO { ...@@ -90,6 +94,17 @@ public class OfferRespVO extends OfferBaseVO {
@ApiModelProperty(value = "客户编号") @ApiModelProperty(value = "客户编号")
private String customerNumber; private String customerNumber;
@ApiModelProperty(value = "客户名称")
private String customerName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "进入公海时间")
private Date enterOpenSeaTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "预计进入公海时间")
private Date estimateEnterOpenSeaTime;
@ApiModelProperty(value = "客户经理所属部门") @ApiModelProperty(value = "客户经理所属部门")
private String deptName; private String deptName;
...@@ -100,4 +115,60 @@ public class OfferRespVO extends OfferBaseVO { ...@@ -100,4 +115,60 @@ public class OfferRespVO extends OfferBaseVO {
@TableField(exist = false) @TableField(exist = false)
private CustomerFollowupBackVO followupBackVO; private CustomerFollowupBackVO followupBackVO;
@ApiModelProperty("商品明细")
@TableField(exist = false)
private List<OfferProdDO> offerProds;
/**
* 销售阶段 字典sale_stage
*/
private Integer saleStage;
/**
* 销售阶段 字典ecw_offer_customer_status
*/
private Integer customerStatus;
/**
* 销售阶段 字典ecw_offer_cargo_status
*/
private Integer cargoStatus;
/**
* 销售阶段 字典ecw_offer_inquiry_source
*/
private Integer inquirySource;
/**
* 厂家
*/
private String manufacturer;
/**
* 厂家电话
*/
private String manufacturerPhone;
/**
* 原因数据字典
*/
private Integer reasonDict;
/**
* 预计发货时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date estimatedShippingTime;
/**
* 体积
*/
private BigDecimal volume;
/**
* 重量
*/
private BigDecimal weight;
@ApiModelProperty(value = "是否特价")
private Boolean specialPriceType;
} }
...@@ -24,4 +24,9 @@ public class OfferResultVO { ...@@ -24,4 +24,9 @@ public class OfferResultVO {
@ApiModelProperty(value = "关联订单号") @ApiModelProperty(value = "关联订单号")
private String orderNo; private String orderNo;
/**
* 原因数据字典
*/
private Integer reasonDict;
} }
package cn.iocoder.yudao.module.sale.controller.admin.offer; package cn.iocoder.yudao.module.sale.controller.admin.offer;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent; import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert; import cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO;
import cn.iocoder.yudao.module.customer.service.customerFollowup.CustomerFollowupService; import cn.iocoder.yudao.module.customer.service.customerFollowup.CustomerFollowupService;
import cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerRespVO;
import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferDO; import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferDO;
import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferProdDO;
import cn.iocoder.yudao.module.sale.service.offer.OfferProdService;
import cn.iocoder.yudao.module.sale.service.offer.OfferService;
import cn.iocoder.yudao.module.sale.vo.offer.*; import cn.iocoder.yudao.module.sale.vo.offer.*;
import cn.iocoder.yudao.module.sale.vo.offerApproval.OfferApprovalBackInfoVO; import cn.iocoder.yudao.module.sale.vo.offerApproval.OfferApprovalBackInfoVO;
import cn.iocoder.yudao.module.system.api.permission.RoleApi; import cn.iocoder.yudao.module.system.api.permission.RoleApi;
import cn.iocoder.yudao.module.system.api.permission.dto.RoleRespDTO; import cn.iocoder.yudao.module.system.api.permission.dto.RoleRespDTO;
import cn.iocoder.yudao.module.system.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.system.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.system.enums.permission.DataScopeEnum; import cn.iocoder.yudao.module.system.enums.permission.DataScopeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.*; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*; import javax.validation.Valid;
import java.util.*;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import java.util.ArrayList;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import java.util.List;
import java.util.Objects;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ROLE_NOT_EXISTS; import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ROLE_NOT_EXISTS;
import cn.iocoder.yudao.module.sale.service.offer.OfferService;
@Api(tags = "管理后台 - 报价单管理") @Api(tags = "管理后台 - 报价单管理")
@RestController @RestController
@RequestMapping("/ecw/offer") @RequestMapping("/ecw/offer")
...@@ -56,6 +56,8 @@ public class OfferController { ...@@ -56,6 +56,8 @@ public class OfferController {
private RoleApi roleApi; private RoleApi roleApi;
@Resource @Resource
private CustomerFollowupService customerFollowupService; private CustomerFollowupService customerFollowupService;
@Resource
private OfferProdService offerProdService;
@PostMapping("/create") @PostMapping("/create")
@ApiOperation("创建报价单管理") @ApiOperation("创建报价单管理")
...@@ -191,14 +193,38 @@ public class OfferController { ...@@ -191,14 +193,38 @@ public class OfferController {
.eq(CustomerFollowupDO::getOfferId, respVO.getOfferId()) .eq(CustomerFollowupDO::getOfferId, respVO.getOfferId())
.orderByDesc(CustomerFollowupDO::getId) .orderByDesc(CustomerFollowupDO::getId)
.last("limit 1")); .last("limit 1"));
List<OfferProdDO> offerProdDOList = offerProdService.selectList(new LambdaQueryWrapperX<OfferProdDO>()
.eq(OfferProdDO::getOfferId, respVO.getOfferId())
.orderByDesc(OfferProdDO::getOfferProdId));
if (Objects.nonNull(customerFollowupDO)) { if (Objects.nonNull(customerFollowupDO)) {
respVO.setFollowupBackVO(CustomerFollowupConvert.INSTANCE.convert(customerFollowupDO)); respVO.setFollowupBackVO(CustomerFollowupConvert.INSTANCE.convert(customerFollowupDO));
} }
if (offerProdDOList!=null) {
BigDecimal volume= new BigDecimal(0);
BigDecimal weight=new BigDecimal(0);
for (OfferProdDO offerProdDO : offerProdDOList) {
volume = volume.add(offerProdDO.getVolume());
weight = weight.add(offerProdDO.getWeight());
if (offerProdDO.getSpecialPriceType()){
respVO.setSpecialPriceType(offerProdDO.getSpecialPriceType());
}
}
respVO.setVolume(volume);
respVO.setWeight(weight);
respVO.setOfferProds(offerProdDOList);
}
} }
} }
return success(pageResult); return success(pageResult);
} }
@GetMapping("/statistics")
@ApiOperation("汇总")
// @PreAuthorize("@ss.hasPermission('ecw:offer:query')")
public CommonResult<OfferRespVO> statistics(@Valid OfferPageReqVO pageVO) {
return success(offerService.statistics(pageVO));
}
@GetMapping("/data/space/page") @GetMapping("/data/space/page")
@ApiOperation("获得报价单管理数据权限分页") @ApiOperation("获得报价单管理数据权限分页")
......
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