feature 1.客户信息导入增加客户状态字段

release
zhenghaiyang@ele-cloud.com 2 years ago
parent ca5fc6a439
commit 0bb3fa09a5
  1. 24
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/controller/BuyerController.java
  2. 1
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/model/BuyerImportExcel.java
  3. 6
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/model/BuyerImportExcelEnum.java
  4. BIN
      order-management-consumer/src/main/resources/download/BuyerExcel.xlsx

@ -1,10 +1,16 @@
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.baseservice.annotation.SysLog;
import com.dxhy.order.baseservice.config.BaseServiceConfig;
import com.dxhy.order.baseservice.module.base.service.ExcelReadService;
import com.dxhy.order.baseservice.module.buyer.model.BuyerEntity;
import com.dxhy.order.baseservice.module.buyer.model.BuyerImportExcel;
import com.dxhy.order.baseservice.module.buyer.model.BuyerImportExcelEnum;
import com.dxhy.order.baseservice.module.buyer.service.BuyerService;
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.constant.OrderInfoContentEnum;
import com.dxhy.order.constant.OrderInfoEnum;
@ -14,14 +20,6 @@ import com.dxhy.order.model.R;
import com.dxhy.order.utils.JsonUtils;
import com.dxhy.order.utils.NsrsbhUtils;
import com.dxhy.order.utils.StringUtil;
import com.dxhy.order.baseservice.annotation.SysLog;
import com.dxhy.order.baseservice.config.BaseServiceConfig;
import com.dxhy.order.baseservice.module.base.service.ExcelReadService;
import com.dxhy.order.baseservice.module.buyer.model.BuyerEntity;
import com.dxhy.order.baseservice.module.buyer.model.BuyerImportExcel;
import com.dxhy.order.baseservice.module.buyer.model.BuyerImportExcelEnum;
import com.dxhy.order.baseservice.module.buyer.service.BuyerService;
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -225,13 +223,17 @@ public class BuyerController {
if (StringUtils.isEmpty(buyerEntity.getTaxpayerCode())) {
buyerEntity.setGhfQylx(OrderInfoEnum.GHF_QYLX_03.getKey());
}
//客户状态(0:冻结;1:非冻结)
if("冻结".equals(buyerImportExcel.getKhzt())){
buyerEntity.setStatus("0");
} else if ("非冻结".equals(buyerImportExcel.getKhzt())){
buyerEntity.setStatus("1");
}
//购方名称 带中文括号的转换成英文括号
// 购方名称 带中文括号的转换成英文括号
buyerEntity.setPurchaseName(StringUtil.replaceStr(buyerEntity.getPurchaseName(), true));
buyerEntityList.add(buyerEntity);
}
r = buyerService.importBuyerByExcel(buyerEntityList);
} catch (Exception e) {
Map<String, Object> map = new HashMap<>(2);

@ -64,5 +64,6 @@ public class BuyerImportExcel {
* 购货方手机号
*/
private String ghfSjh;
private String khzt;
}

@ -69,6 +69,12 @@ public enum BuyerImportExcelEnum {
*/
GHF_SJH("购方手机号", BuyerImportExcel.class.getDeclaredFields()[9].getName()),
/**
* 客户状态(0:冻结;1:非冻结)
*/
// private String status;
KH_ZT("客户状态", BuyerImportExcel.class.getDeclaredFields()[10].getName()),
;

Loading…
Cancel
Save