Commit f20933e7 authored by Smile's avatar Smile

fix: 放货收货人创建赋值不完整缺少常用网点修改

parent 4ccb3110
......@@ -97,16 +97,19 @@ public class CustomerApiImpl implements CustomerApi {
}
public void associateCargoCustomerAuto(Integer transTypeId,String areaCode, String phone, String newName, String email) {
public void associateCargoCustomerAuto(String destTitleEn,Integer transTypeId,String areaCode, String phone, String newName, String email) {
//先查询此用户是否有关联老客户
CustomerContactsDO customerContactsDO = customerContactsService.getUniqueOneAndValidate(areaCode, phone, null);
if (customerContactsDO == null) {
CustomerCreateReqVO customerCreateReqVO = new CustomerCreateReqVO();
DictDataRespDTO transPortTypeDictDataRespDTO = DictFrameworkUtils.getDictDataFromCache("transport_type", String.valueOf(transTypeId));
DictDataRespDTO customertTransPortTypeDictDataRespDTO = DictFrameworkUtils.parseDictDataFromCache("customer_transport_type", transPortTypeDictDataRespDTO.getLabel());
String value = customertTransPortTypeDictDataRespDTO.getValue();
if (value!=null){
customerCreateReqVO.setTransportType(value);
if (customertTransPortTypeDictDataRespDTO!=null){
customerCreateReqVO.setTransportType(customertTransPortTypeDictDataRespDTO.getValue());
}
DictDataRespDTO pickupPointDictDataRespDTO = DictFrameworkUtils.parseDictDataFromCache("pickup_points", destTitleEn);
if (pickupPointDictDataRespDTO!=null){
customerCreateReqVO.setPickupPoints(pickupPointDictDataRespDTO.getValue());
}
//初始化名字为手机号
customerCreateReqVO.setName(newName);
......
......@@ -16,6 +16,7 @@ import cn.iocoder.yudao.module.bpm.api.BpmCreateServiceFactory;
import cn.iocoder.yudao.module.bpm.enums.WorkFlowEmus;
import cn.iocoder.yudao.module.bpm.resp.TaskResp;
import cn.iocoder.yudao.module.customer.service.api.CustomerApiImpl;
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.dto.InternalMessageCreateDto;
import cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi;
......@@ -32,6 +33,7 @@ import cn.iocoder.yudao.module.order.dal.mysql.approval.OrderApprovalMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControlPick.OrderCargoControlPickMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderPickup.OrderPickupMapper;
import cn.iocoder.yudao.module.order.dto.OrderBackInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.param.OrderControlLogParam;
import cn.iocoder.yudao.module.order.service.order.OrderBusinessService;
......@@ -341,8 +343,11 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
// 订单控货信息日志补充
orderBusinessService.createOrderControlLog(orderCargoControlPick.getOrderId(), 4, "订单放货", msg, 0L);
orderBusinessService.addOrderOperateLog(orderCargoControlPick.getOrderId(),"订单放货", msg, "");
OrderBackInfoDto info = orderQueryService.info(orderDO.getOrderId());
LogisticsInfoDto logisticsInfoDto = info.getLogisticsInfoDto();
String destTitleEn = logisticsInfoDto.getDestAddressEn();
//控货收货人自动创建客户
customerApiImpl.associateCargoCustomerAuto(orderDO.getTransportId(),orderCargoControlPick.getConsigneeCountryCode(), orderCargoControlPick.getConsigneePhone(), orderCargoControlPick.getConsigneeName(), orderCargoControlPick.getConsigneeEmail());
customerApiImpl.associateCargoCustomerAuto(destTitleEn,orderDO.getTransportId(),orderCargoControlPick.getConsigneeCountryCode(), orderCargoControlPick.getConsigneePhone(), orderCargoControlPick.getConsigneeName(), orderCargoControlPick.getConsigneeEmail());
// 返回
return orderCargoControlPick.getId();
}
......
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