Commit ea678a8b authored by honghy's avatar honghy

短信放货成功调整,放货列表查询调整

parent 4ea3ef49
...@@ -162,7 +162,8 @@ public interface OrderCargoControlPickMapper extends AbstractMapper<OrderCargoCo ...@@ -162,7 +162,8 @@ public interface OrderCargoControlPickMapper extends AbstractMapper<OrderCargoCo
@Select("SELECT IFNULL(a.num,0) FROM (select SUM(pick_num) as num FROM ecw_order_cargo_control_pick where order_id = #{orderId} and status in(3,4)) as a ") @Select("SELECT IFNULL(a.num,0) FROM (select SUM(pick_num) as num FROM ecw_order_cargo_control_pick where order_id = #{orderId} and status in(3,4)) as a ")
int getPickNumByOrderId(@Param("orderId") Long orderId); int getPickNumByOrderId(@Param("orderId") Long orderId);
long orderDetailListCount(OrderQueryVO query); long orderDetailListCount(@Param("query") OrderQueryVO query);
List<OrderCargoControlReleaseInfoDto> orderDetailList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query); List<OrderCargoControlReleaseInfoDto> orderDetailList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query,
@Param("sort") String sort);
} }
...@@ -19,6 +19,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ ...@@ -19,6 +19,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ApiModel(value = "控货订单放货详情返回值") @ApiModel(value = "控货订单放货详情返回值")
public class OrderCargoControlReleaseInfoDto { public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "id")
private Long id;
@ExcelProperty("订单id") @ExcelProperty("订单id")
@ApiModelProperty(value = "订单id") @ApiModelProperty(value = "订单id")
...@@ -72,6 +74,12 @@ public class OrderCargoControlReleaseInfoDto { ...@@ -72,6 +74,12 @@ public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "入仓重量") @ApiModelProperty(value = "入仓重量")
private BigDecimal sumWeight = BigDecimal.ZERO; private BigDecimal sumWeight = BigDecimal.ZERO;
@ApiModelProperty(value = "收费重量")
private BigDecimal chargeWeight = BigDecimal.ZERO;
@ApiModelProperty(value = "收费体积")
private BigDecimal chargeVolume = BigDecimal.ZERO;
@ExcelProperty("已放货箱数") @ExcelProperty("已放货箱数")
@ApiModelProperty(value = "已放货箱数") @ApiModelProperty(value = "已放货箱数")
private Integer releaseNum = 0; private Integer releaseNum = 0;
...@@ -182,4 +190,7 @@ public class OrderCargoControlReleaseInfoDto { ...@@ -182,4 +190,7 @@ public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "目的地城市法文名称") @ApiModelProperty(value = "目的地城市法文名称")
private String destCityTitleFr; private String destCityTitleFr;
@ApiModelProperty(value = "渠道名称")
private String channelName;
} }
...@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.order.service.orderCargoControlPick; ...@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.order.service.orderCargoControlPick;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.constants.Constants;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
...@@ -18,13 +17,13 @@ import cn.iocoder.yudao.module.bpm.api.BpmCreateServiceFactory; ...@@ -18,13 +17,13 @@ import cn.iocoder.yudao.module.bpm.api.BpmCreateServiceFactory;
import cn.iocoder.yudao.module.bpm.enums.WorkFlowEmus; import cn.iocoder.yudao.module.bpm.enums.WorkFlowEmus;
import cn.iocoder.yudao.module.bpm.resp.TaskResp; import cn.iocoder.yudao.module.bpm.resp.TaskResp;
import cn.iocoder.yudao.module.customer.service.api.CustomerApiImpl; import cn.iocoder.yudao.module.customer.service.api.CustomerApiImpl;
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.internalMessage.ClientInternalMessageApi; import cn.iocoder.yudao.module.ecw.api.internalMessage.ClientInternalMessageApi;
import cn.iocoder.yudao.module.ecw.api.internalMessage.dto.InternalMessageCreateDto; import cn.iocoder.yudao.module.ecw.api.internalMessage.dto.InternalMessageCreateDto;
import cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi; import cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi;
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.member.enums.TransportTypeEnum;
import cn.iocoder.yudao.module.order.convert.approval.OrderApprovalConvert; import cn.iocoder.yudao.module.order.convert.approval.OrderApprovalConvert;
import cn.iocoder.yudao.module.order.convert.orderCargoControlPick.OrderCargoControlPickConvert; import cn.iocoder.yudao.module.order.convert.orderCargoControlPick.OrderCargoControlPickConvert;
import cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO; import cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO;
...@@ -62,6 +61,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -62,6 +61,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.base.CaseFormat;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -132,6 +132,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo ...@@ -132,6 +132,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
private CustomerApiImpl customerApiImpl; private CustomerApiImpl customerApiImpl;
@Resource @Resource
private OrderObjectiveService objectiveService; private OrderObjectiveService objectiveService;
@Resource
private WarehouseLineMapper warehouseLineMapper;
@Override @Override
public Long createOrderCargoControlPick( public Long createOrderCargoControlPick(
OrderCargoControlPickCreateReqVO createReqVO) { OrderCargoControlPickCreateReqVO createReqVO) {
...@@ -1276,8 +1278,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo ...@@ -1276,8 +1278,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
reqDTO.setMobile(consignorPhone); reqDTO.setMobile(consignorPhone);
reqDTO.setUserId(consignorCustomerId); reqDTO.setUserId(consignorCustomerId);
reqDTO.setNodeValue(nodeValue); reqDTO.setNodeValue(nodeValue);
reqDTO.setIsTransport(SmsIsTransportEnum.SMS_IS_TRANSPORT_0.getValue()); reqDTO.setIsTransport(SmsIsTransportEnum.SMS_IS_TRANSPORT_1.getValue());
reqDTO.setTransportId(TransportTypeEnum.OTHER.getValue()); reqDTO.setTransportId(orderDO.getTransportId());
reqDTO.setIsOrders(SmsIsOrdersEnum.SMS_ORDERS_0.getValue()); reqDTO.setIsOrders(SmsIsOrdersEnum.SMS_ORDERS_0.getValue());
reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue()); reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue());
reqDTO.setTemplateParams(templateParams); reqDTO.setTemplateParams(templateParams);
...@@ -1296,14 +1298,17 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo ...@@ -1296,14 +1298,17 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
reqDTO.setMobile(consigneePhone); reqDTO.setMobile(consigneePhone);
reqDTO.setUserId(consigneeCustomerId); reqDTO.setUserId(consigneeCustomerId);
reqDTO.setNodeValue(nodeValue); reqDTO.setNodeValue(nodeValue);
reqDTO.setIsTransport(SmsIsTransportEnum.SMS_IS_TRANSPORT_0.getValue()); reqDTO.setIsTransport(SmsIsTransportEnum.SMS_IS_TRANSPORT_1.getValue());
reqDTO.setTransportId(TransportTypeEnum.OTHER.getValue()); reqDTO.setTransportId(orderDO.getTransportId());
reqDTO.setIsOrders(SmsIsOrdersEnum.SMS_ORDERS_0.getValue()); reqDTO.setIsOrders(SmsIsOrdersEnum.SMS_ORDERS_0.getValue());
reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue()); reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue());
reqDTO.setTemplateParams(templateParams); reqDTO.setTemplateParams(templateParams);
smsMap.put(consigneeCountryCode + consigneePhone, reqDTO); smsMap.put(consigneeCountryCode + consigneePhone, reqDTO);
LogisticsInfoDto logisticsInfoDto = warehouseLineMapper.getStartInfoAndDestInfoByLineId(orderDO.getLineId());
String receive = logisticsInfoDto.getDestCountryId()+ com.baomidou.mybatisplus.core.toolkit.Constants.COLON+logisticsInfoDto.getDestCityId()+ com.baomidou.mybatisplus.core.toolkit.Constants.COLON
+logisticsInfoDto.getDestWarehouseId();
for (Map.Entry<String, SmsSendSingleToUserReqDTOV2> entry : smsMap.entrySet()) { for (Map.Entry<String, SmsSendSingleToUserReqDTOV2> entry : smsMap.entrySet()) {
smsSendApi.sendSingleSmsToAdminV2(entry.getValue(), Constants.RECEIVE_ADDR_KEY); smsSendApi.sendSingleSmsToAdminV2(entry.getValue(), receive);
} }
} }
...@@ -1469,8 +1474,16 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo ...@@ -1469,8 +1474,16 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
long total = orderCargoControlPickMapper.orderDetailListCount(query); long total = orderCargoControlPickMapper.orderDetailListCount(query);
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows(); int size = page.getRows();
String sort = null;
String field = page.getField();
if (StrUtil.isNotBlank(field)) {
boolean reversed = false;
if (0 < page.getSort()) { reversed = true; }
sort= CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, field) + " " + (reversed?"DESC":"ASC");
}
List<OrderCargoControlReleaseInfoDto> list = List<OrderCargoControlReleaseInfoDto> list =
orderCargoControlPickMapper.orderDetailList(start, size, query); orderCargoControlPickMapper.orderDetailList(start, size, query,sort);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize()); return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
} }
......
package cn.iocoder.yudao.module.order.vo.order; package cn.iocoder.yudao.module.order.vo.order;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
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 org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data @Data
...@@ -395,6 +394,22 @@ public class OrderQueryVO { ...@@ -395,6 +394,22 @@ public class OrderQueryVO {
@ApiModelProperty(value = "结束创建时间") @ApiModelProperty(value = "结束创建时间")
private Date endCreateTime; private Date endCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始放货时间")
private Date beginReleaseTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束放货时间")
private Date endReleaseTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始复核时间")
private Date beginCheckTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束复核时间")
private Date endCheckTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始放货时间") @ApiModelProperty(value = "开始放货时间")
private Date beginPickTime; private Date beginPickTime;
...@@ -586,6 +601,12 @@ public class OrderQueryVO { ...@@ -586,6 +601,12 @@ public class OrderQueryVO {
@ApiModelProperty(value = "目的国ids") @ApiModelProperty(value = "目的国ids")
private List<Long> destCountryIds ; private List<Long> destCountryIds ;
@ApiModelProperty(value = "目的地ids")
private List<Long> destCityIds ;
@ApiModelProperty(value = "出货渠道多选")
private List<Long> shippingChannelIdList;
@ApiModelProperty(value = "订单类型筛选条件:0 普通订单 1 集运服务 2 海外仓") @ApiModelProperty(value = "订单类型筛选条件:0 普通订单 1 集运服务 2 海外仓")
private List<String> types; private List<String> types;
...@@ -649,8 +670,8 @@ public class OrderQueryVO { ...@@ -649,8 +670,8 @@ public class OrderQueryVO {
// @ApiModelProperty(value = "动态查询空运可出货状态:0 默认值 1 待出 2 可出 3 备货中 4 已备货 10 可出、备货中、已备货 11 待出、可出、备货中、已备货 12 可出、备货中") // @ApiModelProperty(value = "动态查询空运可出货状态:0 默认值 1 待出 2 可出 3 备货中 4 已备货 10 可出、备货中、已备货 11 待出、可出、备货中、已备货 12 可出、备货中")
// private List<Integer> dynamicAirShipmentList; // private List<Integer> dynamicAirShipmentList;
// //
// @ApiModelProperty(value = "动态查询运输方式") @ApiModelProperty(value = "动态查询运输方式")
// private List<Integer> dynamicTransportIdList; private List<Integer> dynamicTransportIdList;
@ApiModelProperty(value = "动态查询状态字段") @ApiModelProperty(value = "动态查询状态字段")
......
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