Commit bb9733bd authored by Smile's avatar Smile

Merge remote-tracking branch 'origin/release' into jd_dev

# Conflicts:
#	yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
parents c964d7c8 df0bc8d0
......@@ -4348,9 +4348,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
// 这里存在状态更新,当前订单如果无审批状态,且审批动态文案不为空时,需要重置审批动态文案为空字符串(避免订单更新时不执行null值更新)
if (currentOrderDO.getAuditType() == 0 && StringUtils.isNotBlank(currentOrderDO.getAuditResult())) {
currentOrderDO.setAuditResult("");
}
if (Objects.nonNull(auditType)) {
// TODO 这里可能出现并行的审批任务,当结束一个审批任务变更为0时,需要同步查询当前正在进行的其他审批任务
// 这里可能出现并行的审批任务,当结束一个审批任务变更为0时,需要同步查询当前正在进行的其他审批任务
currentOrderDO.setAuditType(auditType);
currentOrderDO.setAuditResult(auditResult);
if (StringUtils.isNotBlank(auditResult)) {
......@@ -4361,9 +4364,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
this.checkOrderProcessingApprovalType(currentOrderDO, auditType, auditResult);
}
}
if (currentOrderDO.getAuditType() == 0 && StringUtils.isBlank(currentOrderDO.getAuditResult())) {
currentOrderDO.setAuditResult("");
}
orderMapper.updateById(currentOrderDO);
// 完成入仓时设置入仓体积和入仓重量
......@@ -6749,7 +6749,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderItemDO.setNum(io.getNum());
orderItemDO.setWorth(io.getWorth());
orderItemDO.setBoxGauge(io.getBoxGauge());
orderItemDO.setBrand(io.getBrand());
orderItemDO.setBrandType(io.getBrandType());
orderItemDO.setCreateTime(now);
orderItemDO.setCreator(creator);
......
package cn.iocoder.yudao.module.order.service.orderWarehouseIn;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
......@@ -2410,15 +2411,8 @@ 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 {
nodeValue = SmsNodeEnum.WAREHOUSE_IN_CONTROL.getNodeValue();
// }
// 给控货人发送入仓控货成功短信
SmsSendSingleToUserReqDTOV2 reqDTO = new SmsSendSingleToUserReqDTOV2();
reqDTO.setTemplateParams(cargoControlParamMap);
......@@ -2433,6 +2427,41 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
smsSendApi.sendSingleSmsToAdminV2(reqDTO,logisticsInfoDto.getDestCountryId()+ Constants.COLON+logisticsInfoDto.getDestCityId()+Constants.COLON
+logisticsInfoDto.getDestWarehouseId());
// 收货人 短信发送信息
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<>();
......@@ -4780,6 +4809,27 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}).collect(Collectors.joining(","));
orderWarehouseInBackItemDo.setOrderLocationStr4Merge(orderLocationStr4Merge);
// 设置明细产品名称
List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList = orderWarehouseInBackItemDo.getOrderWarehouseInDetailsVOList();
if (CollUtil.isNotEmpty(orderWarehouseInDetailsVOList)) {
for (OrderWarehouseInDetailsVO orderWarehouseInDetailsVO : orderWarehouseInDetailsVOList) {
if (orderWarehouseInDetailsVO.getProdId() != null) {
ProductDO productDO = productService.getProduct(orderWarehouseInDetailsVO.getProdId());
if (productDO != null) {
orderWarehouseInDetailsVO.setProdTitleZh(productDO.getTitleZh());
orderWarehouseInDetailsVO.setProdTitleEn(productDO.getTitleEn());
}
}
// 品牌名称
if (orderWarehouseInDetailsVO.getBrand() != null) {
ProductBrankDO productBrank = productBrankService.getProductBrank(orderWarehouseInDetailsVO.getBrand());
if (productBrank != null) {
orderWarehouseInDetailsVO.setBrandName(I18nMessage.getLang() == 0 ? productBrank.getTitleZh() : productBrank.getTitleEn());
}
}
}
}
return orderWarehouseInBackItemDo;
}).collect(Collectors.toList());
......
......@@ -77,4 +77,17 @@ public class OrderWarehouseInDetailsVO {
@ApiModelProperty(value = "材质")
private String material;
@ApiModelProperty(value = "产品中文标题")
private String prodTitleZh;
@ApiModelProperty(value = "产品英文标题")
private String prodTitleEn;
@ApiModelProperty(value = "品牌名称")
private String brandName;
}
......@@ -149,7 +149,7 @@ Content-Type: application/json
#### 获取订单的入仓纪录信息
GET {{baseUrl}}/order/order-warehouse-in/get-order-warehouse-in?orderId=19419
GET {{baseUrl}}/order/order-warehouse-in/get-order-warehouse-in?orderId=83641
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
......
......@@ -2848,9 +2848,9 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
if (StringUtils.isNotBlank(orderPreloadVO.getGuanLianOrderStatus())) {
List<GuanLianOrderStatusVO> guanLianOrderStatusVOList = JSONObject.parseArray(orderPreloadVO.getGuanLianOrderStatus(), GuanLianOrderStatusVO.class);
if (CollectionUtil.isNotEmpty(guanLianOrderStatusVOList) && guanLianOrderStatusVOList.size() > 0) {
List<GuanLianOrderStatusVO> approvalGuanLianOrderList = guanLianOrderStatusVOList.stream().filter(vo -> vo.getType() == 2).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(approvalGuanLianOrderList)) {
boolean isApproval = approvalGuanLianOrderList.stream().anyMatch(o -> {
// List<GuanLianOrderStatusVO> approvalGuanLianOrderList = guanLianOrderStatusVOList.stream().filter(vo -> vo.getType() == 2).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(guanLianOrderStatusVOList)) {
boolean isApproval = guanLianOrderStatusVOList.stream().anyMatch(o -> {
if (o.getType() == 2) {
// 关联单进行中的审批类型校验
OrderApprovalTypeCheckEvent guanLianApprovalTypeCheckEvent = new OrderApprovalTypeCheckEvent(o.getOrderId(), null, null, Arrays.asList(6, 11, 13, 14, 22, 23), false);
......
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