Commit e08680a1 authored by zhengyi's avatar zhengyi

控货订单有收货人时也发送短信

parent 9f4160b1
......@@ -2382,21 +2382,49 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
cargoControlParamMap.put("marks", marks);
cargoControlParamMap.put("cmb", chargeVolume);
cargoControlParamMap.put("kg", chargeWeight);
// if (orderDO.getIsCollection()) {
// Map<Integer, CurrencyRespDTO> currencyRespDTOMap = currencyApi.getAllCurrency();
// CurrencyRespDTO respDTO = currencyRespDTOMap.get(orderDO.getCollectionProxyCurrency());
// String currencyName = Objects.isNull(respDTO) ? "RMB" : respDTO.getTitleEn();
// cargoControlParamMap.put("collectofgoods", orderDO.getCollectionProxy() + currencyName);
// templateCode = SmsSceneEnum.WAREHOUSE_IN_CONTROL_COLLECT_OF_GOODS.getTemplateCode();
// } else {
if (orderDO.getTransportId() == 3) {
templateCode = SmsSceneEnum.AIR_WAREHOUSE_IN_CONTROL.getTemplateCode();
} else {
templateCode = SmsSceneEnum.WAREHOUSE_IN_CONTROL.getTemplateCode();
}
// }
// 给控货人发送入仓控货成功短信
this.smsSendNotice(cargoControlCode, cargoControlPhone, cargoControlCustomerId, templateCode, cargoControlParamMap);
// 收货人 短信发送信息
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOne(new LambdaQueryWrapper<OrderConsigneeDO>().eq(OrderConsigneeDO::getOrderId, orderDO.getOrderId())
.orderByDesc(OrderConsigneeDO::getId)
.last("limit 1"));
if (orderConsigneeDO != null) {
Map<String, Object> consigneeParamMap = new HashMap<>();
String consigneeCountryCode = orderConsigneeDO.getCountryCode();
String consigneePhone = orderConsigneeDO.getPhone();
Long consigneeCustomerId = orderConsigneeDO.getCustomerId();
String consigneeStartWarehouseName = consigneeCountryCode.equals("86") ? logisticsInfoDto.getStartTitleZh() : logisticsInfoDto.getStartTitleEn();
String consigneeDestWearehouseName = consigneeCountryCode.equals("86") ? logisticsInfoDto.getDestTitleZh() : logisticsInfoDto.getDestTitleEn();
if (!StringUtils.equals(consignorCountryCode.concat(consignorPhone), consigneeCountryCode.concat(consigneePhone))) {
consigneeParamMap.put("date", DateUtils.formatDateTime(orderDO.getRucangTime()));
consigneeParamMap.put("cnts", orderDO.getSumNum()); // 多少箱
consigneeParamMap.put("warehouse", consigneeStartWarehouseName); // 入仓名
consigneeParamMap.put("year", ruchang.year());
consigneeParamMap.put("month", ruchang.month() + 1);
consigneeParamMap.put("day", ruchang.dayOfMonth());
consigneeParamMap.put("order", orderDO.getOrderNo()); // orderNo
consigneeParamMap.put("branch", consigneeDestWearehouseName); // 提货点
consigneeParamMap.put("box", orderDO.getSumNum()); // 多少箱
consigneeParamMap.put("marks", marks);
consigneeParamMap.put("cmb", chargeVolume);
consigneeParamMap.put("kg", chargeWeight);
}
if (!StringUtils.equals(cargoControlCode.concat(cargoControlPhone), consigneeCountryCode.concat(consigneePhone))) {
// 给收货人发送短信
this.smsSendNotice(consigneeCountryCode, consigneePhone, consigneeCustomerId, templateCode, consigneeParamMap);
}
}
}
} else {
Map<String, Object> consignorParamMap = new HashMap<>();
......
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