feature:合并客户信息

release
gaorl 2 years ago
commit f2af7d6208
  1. 26
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/controller/BuyerController.java
  2. 8
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/model/BuyerEntity.java
  3. 23
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/protocol/BuyerEntityBankBO.java
  4. 2
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/protocol/MdmBankListBO.java
  5. 2
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/protocol/MdmGmfxxtbMulticodeValuelistBO.java
  6. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/api/InvoiceRestApiV6.java
  7. 1
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/protocol/v6/sdenergy/MdmGmfxxtbMulticodeBO.java
  8. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java

@ -1,8 +1,10 @@
package com.dxhy.order.baseservice.module.buyer.controller;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.dxhy.order.baseservice.module.buyer.protocol.MdmBankListBO;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.constant.OrderInfoContentEnum;
import com.dxhy.order.constant.OrderInfoEnum;
@ -120,6 +122,29 @@ public class BuyerController {
// 获取当前登录人id
Long userId = userInfoService.getUser().getUserId();
String id = buyerEntity.getId();
// 处理MDM默认银行账户等信息
List<MdmBankListBO> bankListBOS = new ArrayList<>();
if (CollectionUtil.isNotEmpty(buyerEntity.getBanks())) {
buyerEntity.getBanks().forEach(i -> {
MdmBankListBO temp = new MdmBankListBO();
temp.setAddress(i.getAddress());
temp.setPhone(i.getPhone());
temp.setBankNumber(i.getBankNumber());
temp.setBankOfDeposit(i.getBankOfDeposit());
bankListBOS.add(temp);
});
if (buyerEntity.getBankDefaultIndex() != null) {
buyerEntity.getBanks().get(buyerEntity.getBankDefaultIndex());
Integer index = buyerEntity.getBankDefaultIndex();
buyerEntity.setAddress(buyerEntity.getBanks().get(index).getAddress());
buyerEntity.setPhone(buyerEntity.getBanks().get(index).getPhone());
buyerEntity.setBankNumber(buyerEntity.getBanks().get(index).getBankNumber());
buyerEntity.setBankOfDeposit(buyerEntity.getBanks().get(index).getBankOfDeposit());
}
}
if (StringUtils.isNotBlank(id)) {
// 修改
buyerEntity.setModifyUserId(userId.toString());
@ -224,6 +249,7 @@ public class BuyerController {
}
buyerEntity.setStatus("1");
//购方名称 带中文括号的转换成英文括号
// 购方名称 带中文括号的转换成英文括号
buyerEntity.setPurchaseName(StringUtil.replaceStr(buyerEntity.getPurchaseName(), true));
buyerEntityList.add(buyerEntity);
}

@ -1,10 +1,12 @@
package com.dxhy.order.baseservice.module.buyer.model;
import com.dxhy.order.baseservice.module.buyer.protocol.BuyerEntityBankBO;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 购方信息实体类
@ -123,4 +125,10 @@ public class BuyerEntity implements Serializable {
* 客户状态(0:冻结;1:非冻结)
*/
private String status;
// 银行账户
private List<BuyerEntityBankBO> banks;
// 默认银行账户的索引7
private Integer bankDefaultIndex;
}

@ -0,0 +1,23 @@
package com.dxhy.order.baseservice.module.buyer.protocol;
import lombok.Data;
/**
* @Description 购方银行账户
* @Author 巩权林
* @Date 2023/4/11 21:27
**/
@Data
public class BuyerEntityBankBO {
// 购方地址
private String address;
// 购方电话
private String phone;
// 开户行
private String bankOfDeposit;
// 开户账号
private String bankNumber;
}

@ -1,4 +1,4 @@
package com.dxhy.order.consumer.openapi.protocol.v6.sdenergy;
package com.dxhy.order.baseservice.module.buyer.protocol;
import lombok.Data;
import lombok.NoArgsConstructor;

@ -39,7 +39,7 @@ import com.dxhy.order.consumer.openapi.protocol.v5.order.DdfpcxReqV5;
import com.dxhy.order.consumer.openapi.protocol.v5.order.DdfpcxRspV5;
import com.dxhy.order.consumer.openapi.protocol.v5.order.DdpcxxRspV5;
import com.dxhy.order.consumer.openapi.protocol.v6.hzqrd.QdCommonRspV6;
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbMulticodeValuelistBO;
import com.dxhy.order.baseservice.module.buyer.protocol.MdmGmfxxtbMulticodeValuelistBO;
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbReqBO;
import com.dxhy.order.consumer.openapi.service.*;
import com.dxhy.order.consumer.utils.BeanTransitionUtils;

@ -1,6 +1,7 @@
package com.dxhy.order.consumer.openapi.protocol.v6.sdenergy;
import com.alibaba.fastjson.annotation.JSONField;
import com.dxhy.order.baseservice.module.buyer.protocol.MdmGmfxxtbMulticodeValuelistBO;
import lombok.ToString;
import java.util.List;

@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject;
import com.dxhy.order.baseservice.module.base.service.BaseService;
import com.dxhy.order.baseservice.module.buyer.dao.BuyerMapper;
import com.dxhy.order.baseservice.module.buyer.model.BuyerEntity;
import com.dxhy.order.baseservice.module.buyer.protocol.MdmBankListBO;
import com.dxhy.order.baseservice.module.buyer.protocol.MdmGmfxxtbMulticodeValuelistBO;
import com.dxhy.order.baseservice.module.commodity.dao.CommodityMapper;
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity;
import com.dxhy.order.baseservice.module.taxclass.dao.GroupTaxClassCodeMapper;

Loading…
Cancel
Save