Commit 4c8c8e1d authored by honghy's avatar honghy

短信目的仓取值调整

parent 4b3fe376
package cn.iocoder.yudao.module.order.dal.mysql.orderCargoControlPick;
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.order.dal.dataobject.orderCargoControlPick.OrderCargoControlPickDO;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControlPick.OrderCargoControlPickDO;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickBackVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickQueryVO;
import org.apache.ibatis.annotations.*;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.*;
import java.util.List;
/**
* 订单控货人放货记录 Mapper
......@@ -160,4 +162,7 @@ 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 ")
int getPickNumByOrderId(@Param("orderId") Long orderId);
long orderDetailListCount(OrderQueryVO query);
List<OrderCargoControlReleaseInfoDto> orderDetailList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
}
......@@ -48,6 +48,15 @@ public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "0 控货中;1 已放完货;2 部分控货")
private Integer cargoControlStatus;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "操作人")
private String operator;
@ApiModelProperty(value = "入仓数量")
private Integer sumQuantity = 0;
......@@ -103,6 +112,9 @@ public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "收货人姓名")
private String consigneeName;
@ApiModelProperty(value = "收货人编号")
private String consigneeNumber;
@ApiModelProperty(value = "收货人姓名(英文)")
private String consigneeNameEn;
......@@ -115,11 +127,27 @@ public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "收货人邮箱")
private String consigneeEmail;
@ApiModelProperty(value = "发货人编号")
private String consignerNumber;
@ApiModelProperty(value = "运输方式")
private Integer transportId;
@ApiModelProperty(value = "卸柜/到仓时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date unloadTime;
@ApiModelProperty(value = "放货日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date createTime;
@ApiModelProperty(value = "复核日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date checkTime;
@ApiModelProperty(value = "是否限制修改收货人")
private Boolean isLimitUpdateConsignee;
......@@ -136,4 +164,22 @@ public class OrderCargoControlReleaseInfoDto {
@ApiModelProperty(value = "放货修改审批记录列表")
private List<OrderApprovalBackVO> orderApprovalBackVOList;
@ApiModelProperty(value = "始发地仓库中文名称")
private String startTitleZh;
@ApiModelProperty(value = "始发地仓库英文名称")
private String startTitleEn;
@ApiModelProperty(value = "始发地仓库法文名称")
private String startTitleFr;
@ApiModelProperty(value = "目的地城市中文名称")
private String destCityTitleZh;
@ApiModelProperty(value = "目的地城市英文名称")
private String destCityTitleEn;
@ApiModelProperty(value = "目的地城市法文名称")
private String destCityTitleFr;
}
package cn.iocoder.yudao.module.order.service.orderCargoControlPick;
import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.vo.approval.OrderSpecialApplyVO;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControl.OrderCargoControlBackVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.*;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControlPick.OrderCargoControlPickDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickApplyVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickQueryVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickUpdateReqVO;
import javax.validation.Valid;
import java.util.Collection;
import java.util.List;
/**
* 订单控货人放货记录 Service 接口
......@@ -153,5 +155,8 @@ public interface OrderCargoControlPickService extends IService<OrderCargoControl
*/
void cancelApprovalByOrderApprovalId(Long orderApprovalId, String reason);
/*
控货订单详情列表
*/
PageResult<OrderCargoControlReleaseInfoDto> orderDetailList(OrderQueryVO query, PageVO page);
}
......@@ -10,6 +10,7 @@ import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
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.vo.PageVO;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
......@@ -43,6 +44,7 @@ import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.service.order.OrderService;
import cn.iocoder.yudao.module.order.service.orderCargoControl.OrderCargoControlService;
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.orderCargoControlPick.OrderCargoControlPickApplyVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickQueryVO;
......@@ -59,6 +61,7 @@ import cn.iocoder.yudao.module.system.enums.sms.SmsNodeEnum;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
......@@ -1456,4 +1459,19 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
bpmCreateServiceFactory.cancelBmpById(userId, approvalDO.getFormId(), reason);
}
/*
控货订单详情列表
*/
@Override
public PageResult<OrderCargoControlReleaseInfoDto> orderDetailList(OrderQueryVO query, PageVO page) {
query.setLang(I18nMessage.getLang());
IPage<OrderCargoControlReleaseInfoDto> mpPage = MyBatisUtils.buildPage(page);
long total = orderCargoControlPickMapper.orderDetailListCount(query);
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<OrderCargoControlReleaseInfoDto> list =
orderCargoControlPickMapper.orderDetailList(start, size, query);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
}
......@@ -2373,7 +2373,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
"短信发送", SmsNodeEnum.getCodeByNodeValue(nodeValue).getDescription(), "");
// 发送追加通知短信
smsSendApi.sendSingleSmsToAdminV2(reqDTO,logisticsInfoDto.getDestCountryId()+ Constants.COLON+logisticsInfoDto.getDestCityId()+Constants.COLON
+logisticsInfoDto.getChannelId());
+logisticsInfoDto.getDestWarehouseId());
} else {
// 入仓短信 发送给发货人与收货人
String nodeValue = SmsNodeEnum.WAREHOUSE_IN.getNodeValue();
......@@ -2431,7 +2431,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue());
smsSendApi.sendSingleSmsToAdminV2(reqDTO,logisticsInfoDto.getDestCountryId()+ Constants.COLON+logisticsInfoDto.getDestCityId()+Constants.COLON
+logisticsInfoDto.getChannelId());
+logisticsInfoDto.getDestWarehouseId());
}
} else {
Map<String, Object> consignorParamMap = new HashMap<>();
......@@ -2480,7 +2480,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue());
smsSendApi.sendSingleSmsToAdminV2(reqDTO,logisticsInfoDto.getDestCountryId()+ Constants.COLON+logisticsInfoDto.getDestCityId()+Constants.COLON
+logisticsInfoDto.getChannelId());
+logisticsInfoDto.getDestWarehouseId());
// 收货人 短信发送信息
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOne(new LambdaQueryWrapper<OrderConsigneeDO>().eq(OrderConsigneeDO::getOrderId, orderDO.getOrderId())
......@@ -2524,7 +2524,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
reqDTO2.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue());
smsSendApi.sendSingleSmsToAdminV2(reqDTO2,logisticsInfoDto.getDestCountryId()+ Constants.COLON+logisticsInfoDto.getDestCityId()+Constants.COLON
+logisticsInfoDto.getChannelId());
+logisticsInfoDto.getDestWarehouseId());
}
}
}
......
<?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.order.dal.mysql.orderCargoControlPick.OrderCargoControlPickMapper">
<select id="orderDetailListCount" resultType="java.lang.Long">
</select>
<select id="orderDetailList"
resultType="cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto">
SELECT o.order_no,
nor.customer_number AS consignerNumber,
nee.customer_number AS consigneeNumber,
nee.NAME AS consigneeName,
nee.phone AS consigneePhone,
o.sum_num,
occ.pick_num,
occ.pick_volume,
occ.pick_weight,
occ.status,
occ.remarks,
occ.operator,
occ.create_time,
occ.check_time,
o.pick_state AS cargoControlStatus,
ew_start.title_zh startTitleZh,
ew_start.title_en startTitleEn,
ew_start.title_fr startTitleFr,
o.transport_id,
ew_dest.address_zh destCityTitleZh,
ew_dest.address_en destCityTitleEn,
ew_dest.address_fr destCityTitleFr,
o.create_time AS unloadTime
FROM ecw_order_cargo_control_pick occ
JOIN ecw_order o on o.order_id = occ.order_id
LEFT JOIN ecw_order_consignor nor ON nor.order_id = o.order_id AND nor.deleted = 0
LEFT JOIN ecw_order_consignee nee ON nee.order_id = o.order_id AND nee.deleted = 0
LEFT JOIN ecw_warehouse_line ewl on ewl.id = o.line_id
LEFT JOIN ecw_warehouse ew_start ON ew_start.id = ewl.start_warehouse_id
JOIN ecw_warehouse ew_dest ON ew_dest.id = ewl.dest_warehouse_id
WHERE occ.create_time between '2024-01-01' and '2024-12-17'
AND occ.deleted = 0
AND o.is_cargo_control = 1
ORDER BY occ.create_time DESC LIMIT 100;
</select>
</mapper>
......@@ -2,33 +2,36 @@ package cn.iocoder.yudao.module.order.controller.admin.orderCargoControlPick;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControlPick.OrderCargoControlPickDO;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.service.orderCargoControl.OrderCargoControlService;
import cn.iocoder.yudao.module.order.service.orderCargoControlPick.OrderCargoControlPickService;
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.orderCargoControlPick.OrderCargoControlPickApplyVO;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickCreateReqVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.*;
import javax.validation.*;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import javax.validation.Valid;
import java.util.Arrays;
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.pojo.CommonResult.success;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.*;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.*;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControlPick.OrderCargoControlPickDO;
import cn.iocoder.yudao.module.order.service.orderCargoControlPick.OrderCargoControlPickService;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_CARGO_CONTROL_PICK_NOT_EXISTS;
@Validated
@RestController
......@@ -41,6 +44,18 @@ public class OrderCargoControlPickController {
@Resource
private OrderCargoControlService orderCargoControlService;
/*
控货订单详情列表
*/
@GetMapping("/cargo/control/orderDetail")
@ApiOperation("获得控货订单列表查询订单分页")
public CommonResult<PageResult<OrderCargoControlReleaseInfoDto>> orderDetailList(OrderQueryVO query, PageVO page) {
PageResult<OrderCargoControlReleaseInfoDto> pageResult =
orderCargoControlPickService.orderDetailList(query, page);
return success(pageResult);
}
@PostMapping("/create")
@ApiOperation("创建订单控货人放货记录")
@Idempotent(timeout = 5)
......
......@@ -1792,7 +1792,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
//给收发货人发送短信
smsSendApi.sendSingleSmsToAdminV2(reqDTO,logisticsInfoDto.getDestCountryId()+ Constants.COLON+logisticsInfoDto.getDestCityId()+Constants.COLON
+logisticsInfoDto.getChannelId());
+logisticsInfoDto.getDestWarehouseId());
// 发送短信后初始化参数值
orders = null;
marks = null;
......
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