Jelajahi Sumber

客户档案导入

changhaoning 1 tahun lalu
induk
melakukan
6a38f3f8d2

+ 11 - 0
src/main/java/com/dk/mdm/controller/mst/CustomerController.java

@@ -2,8 +2,10 @@ package com.dk.mdm.controller.mst;
 
 import com.dk.common.model.pojo.PageList;
 import com.dk.common.response.ResponseResultVO;
+import com.dk.common.util.ExcelUtils;
 import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.common.service.BaseService;
+import com.dk.mdm.model.pojo.mst.GoodsSku;
 import com.dk.mdm.model.query.mst.CustomerQuery;
 import com.dk.mdm.model.response.mst.CustomerResponse;
 import com.dk.mdm.model.vo.mst.CustomerVO;
@@ -12,7 +14,9 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.mst.CustomerService;
+import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 @Api(tags = "客户资料API接口")
@@ -87,4 +91,11 @@ public class CustomerController{
     public ResponseResultVO selectCustomerById(@PathVariable String id) {
         return customerService.selectCustomerById(id);
     }
+
+    @ApiOperation(value = "导入",notes = "导入")
+    @PostMapping("import/{cpId}")
+    public ResponseResultVO<String> importList(MultipartFile file, HttpServletResponse response,@PathVariable Integer cpId) {
+        List<Customer> list = ExcelUtils.importExcel(file, 1, 1, Customer.class);
+        return customerService.importCUS(list,response,cpId);
+    }
 }

+ 2 - 0
src/main/java/com/dk/mdm/mapper/core/OrganizationMapper.java

@@ -1,8 +1,10 @@
 package com.dk.mdm.mapper.core;
 
 import com.dk.common.mapper.BaseMapper;
+import com.dk.common.model.response.mst.OrgResponse;
 import com.dk.mdm.model.query.core.OrganizationQuery;
 import com.dk.mdm.model.pojo.core.Organization;
+import com.dk.mdm.model.query.mst.OrgQuery;
 import com.dk.mdm.model.response.core.OrganizationResponse;
 import org.springframework.stereotype.Repository;
 

+ 6 - 0
src/main/java/com/dk/mdm/mapper/mst/OrgMapper.java

@@ -56,6 +56,12 @@ public interface OrgMapper extends BaseMapper<Org>{
      */
     Boolean resetLevelOrg(Org org);
 
+    /**
+     * @desc   : 根据名称查ID
+     * @author : 常皓宁
+     * @date   : 2024/6/12 8:38
+     */
+    OrgResponse selectByUuId(OrgQuery orgQuery);
 
 
 }

+ 12 - 0
src/main/java/com/dk/mdm/mapper/mst/OrgMapper.xml

@@ -302,4 +302,16 @@
         ORDER BY level_code
     </select>
 
+    <!-- 根据名称查ID -->
+    <select id="selectByUuId" resultMap="BaseResultMapResponse">
+        SELECT org_id
+        FROM dkic_b.t_mst_org
+        WHERE
+        cp_id = #{cpId}
+        AND flg_valid = TRUE
+        <if test="orgName != null and orgName != ''">
+            AND org_name = #{orgName}
+        </if>
+    </select>
+
 </mapper>

+ 7 - 0
src/main/java/com/dk/mdm/mapper/mst/StaffMapper.java

@@ -52,5 +52,12 @@ public interface StaffMapper extends BaseMapper<Staff>{
      */
     StaffResponse selectById(@Param("id") String id);
 
+    /**
+     * @desc   : 根据名称查ID
+     * @author : 常皓宁
+     * @date   : 2024/6/12 8:38
+     */
+    StaffResponse selectByUuId(StaffQuery staffQuery);
+
 }
 

+ 12 - 0
src/main/java/com/dk/mdm/mapper/mst/StaffMapper.xml

@@ -231,4 +231,16 @@
             )
         </foreach>
     </insert>
+
+    <!-- 根据名称查ID -->
+    <select id="selectByUuId" resultMap="BaseResultMap">
+        SELECT staff_id
+        FROM dkic_b.t_mst_staff
+        WHERE
+        cp_id = #{cpId}
+        AND flg_valid = TRUE
+        <if test="staffName != null and staffName != ''">
+            AND staff_name = #{staffName}
+        </if>
+    </select>
 </mapper>

+ 39 - 33
src/main/java/com/dk/mdm/model/pojo/mst/Customer.java

@@ -33,6 +33,13 @@ import java.time.LocalDateTime;
 @ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
 public class Customer extends PageInfo<Customer> implements Serializable {
 
+    /**
+     * 错误信息
+     */
+    @Excel(name = "错误提示")
+    @TableField(exist = false)
+    private String errorMessage;
+
     /*
      * 数据库字段
      */
@@ -73,7 +80,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 行政区划 (a1:省 a2:市 a3:区)
      */
-    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
     @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
     @TableField(typeHandler = JsonTypeHandler.class)
     private JSONObject addressArea;
@@ -82,12 +88,19 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 小区或POI
      */
-    @Excel(name = "小区或POI")
     @ApiModelProperty(value = "小区或POI")
     private String addressName;
 
 
     /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
      * 门牌号
      */
     @Excel(name = "门牌号")
@@ -98,21 +111,12 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
      */
-    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
     @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
     @TableField(typeHandler = JsonTypeHandler.class)
     private JSONObject addressGcj02;
 
 
     /**
-     * 详细地址
-     */
-    @Excel(name = "详细地址")
-    @ApiModelProperty(value = "详细地址")
-    private String addressFull;
-
-
-    /**
      * 联系人
      */
     @Excel(name = "联系人")
@@ -131,7 +135,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 客户来源 (【数据字典】)
      */
-    @Excel(name = "客户来源 (【数据字典】)")
     @ApiModelProperty(value = "客户来源 (【数据字典】)")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String cusFrom;
@@ -140,7 +143,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 销售渠道
      */
-    @Excel(name = "销售渠道")
     @ApiModelProperty(value = "销售渠道")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String channelId;
@@ -149,34 +151,54 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 部门
      */
-    @Excel(name = "部门")
     @ApiModelProperty(value = "部门")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String orgId;
 
+    /**
+     * 组织名称
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "组织名称")
+    @TableField(exist = false)
+    private String orgName;
+
 
     /**
      * 业务员
      */
-    @Excel(name = "业务员")
     @ApiModelProperty(value = "业务员")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String staffId;
 
+    /**
+     * 员工名称
+     */
+    @Excel(name = "业务员")
+    @ApiModelProperty(value = "员工名称")
+    @TableField(exist = false)
+    private String staffName;
+
 
     /**
      * 报备人
      */
-    @Excel(name = "报备人")
     @ApiModelProperty(value = "报备人")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String reportStaff;
 
+    /**
+     * 报备人
+     */
+    @Excel(name = "报备人")
+    @ApiModelProperty(value = "报备人")
+    @TableField(exist = false)
+    private String reportStaffName;
+
 
     /**
      * 报备时间
      */
-    @Excel(name = "报备时间")
     @ApiModelProperty(value = "报备时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
@@ -186,7 +208,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
      */
-    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
     @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
     private String saleStatus;
 
@@ -202,7 +223,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 当前跟进人
      */
-    @Excel(name = "当前跟进人")
     @ApiModelProperty(value = "当前跟进人")
     @TableField(typeHandler = UuidListTypeHandler.class)
     private List<String> followStaffs;
@@ -211,7 +231,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 最后跟进人
      */
-    @Excel(name = "最后跟进人")
     @ApiModelProperty(value = "最后跟进人")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String lastFollowStaff;
@@ -220,7 +239,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 最后跟进ID
      */
-    @Excel(name = "最后跟进ID")
     @ApiModelProperty(value = "最后跟进ID")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String lastFollowId;
@@ -229,7 +247,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
      */
-    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
     @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
     private String lastFollowStatus;
 
@@ -237,7 +254,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 最后跟进时间
      */
-    @Excel(name = "最后跟进时间")
     @ApiModelProperty(value = "最后跟进时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
@@ -247,7 +263,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 跟进次数
      */
-    @Excel(name = "跟进次数")
     @ApiModelProperty(value = "跟进次数")
     private Integer followCount;
 
@@ -255,7 +270,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 有效标识 (1:正常 0:停用)
      */
-    @Excel(name = "有效标识 (1:正常 0:停用)")
     @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
     private Boolean flgValid;
 
@@ -263,7 +277,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 企业ID
      */
-    @Excel(name = "企业ID")
     @ApiModelProperty(value = "企业ID")
     @TableField(fill = FieldFill.INSERT)
     private Integer cpId;
@@ -272,7 +285,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 创建时间 (触发器自动处理)
      */
-    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
     @ApiModelProperty(value = "创建时间 (触发器自动处理)")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
@@ -282,7 +294,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 创建用户 (触发器自动处理)
      */
-    @Excel(name = "创建用户 (触发器自动处理)")
     @ApiModelProperty(value = "创建用户 (触发器自动处理)")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String opCreateUserId;
@@ -291,7 +302,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 修改时间 (触发器自动处理)
      */
-    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
     @ApiModelProperty(value = "修改时间 (触发器自动处理)")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
@@ -301,7 +311,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 修改用户 (触发器自动处理)
      */
-    @Excel(name = "修改用户 (触发器自动处理)")
     @ApiModelProperty(value = "修改用户 (触发器自动处理)")
     @TableField(typeHandler = UuidTypeHandler.class)
     private String opUpdateUserId;
@@ -310,7 +319,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 数据操作应用 (触发器自动处理)
      */
-    @Excel(name = "数据操作应用 (触发器自动处理)")
     @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
     private String opAppCode;
 
@@ -318,7 +326,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 数据时间戳 (触发器自动处理)
      */
-    @Excel(name = "数据时间戳 (触发器自动处理)")
     @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
@@ -328,7 +335,6 @@ public class Customer extends PageInfo<Customer> implements Serializable {
     /**
      * 数据操作数据库用户 (触发器自动处理)
      */
-    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
     @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
     private String opDbUser;
 

+ 7 - 0
src/main/java/com/dk/mdm/model/query/mst/OrgQuery.java

@@ -108,6 +108,13 @@ public class OrgQuery extends PageInfo<com.dk.mdm.model.query.mst.OrgQuery> impl
     @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
     private List<Boolean> flgValidList;
 
+    /**
+     * 公司ID (关联的商户ID)
+     */
+    @Excel(name = "公司ID (关联的商户ID)")
+    @ApiModelProperty(value = "公司ID (关联的商户ID)")
+    private Integer cpId;
+
 
 
     private static final long serialVersionUID = 1L;

+ 150 - 4
src/main/java/com/dk/mdm/service/mst/CustomerService.java

@@ -4,17 +4,27 @@ import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.constant.Constant;
 import com.dk.common.infrastructure.enums.ErrorCodeEnum;
 import com.dk.common.model.pojo.PageList;
+import com.dk.common.model.pojo.mst.StaffRight;
+import com.dk.common.model.response.mst.OrgResponse;
+import com.dk.common.model.response.mst.StaffResponse;
 import com.dk.common.response.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
+import com.dk.common.util.ExcelUtils;
 import com.dk.mdm.infrastructure.convert.mst.CustomerConvert;
 import com.dk.mdm.infrastructure.util.AuthUtils;
 import com.dk.mdm.mapper.common.CommonMapper;
+import com.dk.mdm.mapper.core.OrganizationMapper;
+import com.dk.mdm.mapper.mst.OrgMapper;
+import com.dk.mdm.mapper.mst.StaffMapper;
 import com.dk.mdm.model.pojo.mst.Customer;
 import com.dk.mdm.mapper.mst.CustomerMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
+import com.dk.mdm.model.pojo.mst.GoodsSku;
 import com.dk.mdm.model.query.mst.CustomerQuery;
+import com.dk.mdm.model.query.mst.OrgQuery;
+import com.dk.mdm.model.query.mst.StaffQuery;
 import com.dk.mdm.model.response.mst.CustomerResponse;
 import com.dk.mdm.model.vo.mac.*;
 import com.dk.mdm.model.vo.mst.CustomerVO;
@@ -22,18 +32,20 @@ import com.dk.mdm.service.common.CommonService;
 import com.dk.mdm.service.mac.OtherPayableService;
 import com.dk.mdm.service.mac.OtherReceivableService;
 import com.dk.mdm.service.mac.ReceiptService;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PathVariable;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 @Service
 @Transactional
@@ -70,6 +82,12 @@ public class CustomerService extends BaseService<Customer> {
     @Autowired
     private AuthUtils authUtils;
 
+    @Autowired
+    private OrgMapper orgMapper;
+
+    @Autowired
+    private StaffMapper staffMapper;
+
     /**
      * @desc : 重写主键
      * @author : 于继渤
@@ -231,4 +249,132 @@ public class CustomerService extends BaseService<Customer> {
         List<CustomerResponse> customerResponses = customerMapper.selectByCond(customerQuery);
         return ResponseResultUtil.success(customerResponses);
     }
+
+    /**
+     * @desc   : 导入
+     * @author : 常皓宁
+     * @date   : 2024/6/13 14:21
+     */
+    @Transactional(rollbackFor = {Exception.class})
+    public ResponseResultVO<String> importCUS(List<Customer> list, HttpServletResponse response, @PathVariable Integer cpId) {
+        List<Customer> messageList = new ArrayList<>();
+        Workbook workbook = null;
+        Boolean importMessage = false;
+        //规则校验
+        for (Customer customer : list) {
+            customer.setCpId(cpId);
+            customer.setErrorMessage("");
+            //TODO 校验规则
+            //客户编号不能为空
+            if(customer.getCusCode() == null){
+                customer.setErrorMessage(customer.getErrorMessage() + "客户编号不能为空,");
+                importMessage = true;
+            }
+            //客户名称不能为空
+            if(customer.getCusName() == null){
+                customer.setErrorMessage(customer.getErrorMessage() + "客户名称不能为空,");
+                importMessage = true;
+            }
+            //电话不能相同
+            if(customer.getCusPhone() != null){
+                // 同商户 电话不同
+                Long count = customerMapper.countByCond(
+                        new CustomerQuery().setCpId(customer.getCpId()).setCusPhone(customer.getCusPhone()).setFlgValid(true)
+                );
+                if (count > 0) {
+                    customer.setErrorMessage(customer.getErrorMessage() + "当前电话号码已存在,");
+                    importMessage = true;
+                }
+                //客户电话规则校验
+                if(!customer.getCusPhone().matches("^1[34578]\\d{9}$")){
+                    customer.setErrorMessage(customer.getErrorMessage() + "客户电话规则不正确,");
+                    importMessage = true;
+                }
+            }
+            //客户电话不能为空
+            else{
+                customer.setErrorMessage(customer.getErrorMessage() + "客户电话不能为空,");
+                importMessage = true;
+            }
+            //联系电话规则校验
+            if(!customer.getContactPhone().matches("^1[34578]\\d{9}$")){
+                customer.setErrorMessage(customer.getErrorMessage() + "联系电话规则不正确,");
+                importMessage = true;
+            }
+            //部门
+            if(customer.getOrgName() != null){
+                String orgName = customer.getOrgName();
+                OrgResponse orgResponse = orgMapper.selectByUuId(new OrgQuery().setOrgName(orgName).setCpId(cpId));
+                if(orgResponse == null){
+                    customer.setErrorMessage(customer.getErrorMessage() + "部门填写错误,");
+                    importMessage = true;
+                }else{
+                    customer.setOrgId(orgResponse.getOrgId());
+                }
+            }else{
+                customer.setErrorMessage(customer.getErrorMessage() + "部门不能为空");
+                importMessage = true;
+            }
+            //业务员
+            if(customer.getStaffName() != null){
+                String staffName = customer.getStaffName();
+                StaffResponse staffResponse = staffMapper.selectByUuId(new StaffQuery().setStaffName(staffName).setCpId(cpId));
+                if(staffResponse == null){
+                    customer.setErrorMessage(customer.getErrorMessage() + "业务员填写错误,");
+                    importMessage = true;
+                }else{
+                    customer.setStaffId(staffResponse.getStaffId());
+                }
+            }else{
+                customer.setErrorMessage(customer.getErrorMessage() + "业务员不能为空,");
+                importMessage = true;
+            }
+            //报备人
+            if(customer.getReportStaffName() != null){
+                String reportStaffName = customer.getReportStaffName();
+                StaffResponse staffResponse = staffMapper.selectByUuId(new StaffQuery().setStaffName(reportStaffName).setCpId(cpId));
+                if(staffResponse == null){
+                    customer.setErrorMessage(customer.getErrorMessage() + "报备人填写错误,");
+                    importMessage = true;
+                }else{
+                    customer.setReportStaff(staffResponse.getStaffId());
+                }
+            }else{
+                customer.setErrorMessage(customer.getErrorMessage() + "报备人不能为空,");
+                importMessage = true;
+            }
+            messageList.add(customer);
+        }
+        //导出错误提示
+        if (importMessage){
+            workbook = ExcelUtils.exportExcelUrl(messageList,"错误数据反馈","错误数据反馈",Customer.class,"客户档案错误数据反馈.xls", response);
+            UUID uuid = UUID.randomUUID();
+            String randomUUIDString = uuid.toString();
+            //TODO 导出文件位置
+            String fileName = "D:/练习/" + randomUUIDString;
+            File outputFile = new File(fileName);
+            //创建文件夹
+            if(!outputFile.exists()){
+                outputFile.mkdir();
+            }
+            File uploadFile = new File(fileName,"客户档案错误数据反馈.xls");
+            try (FileOutputStream fos = new FileOutputStream(uploadFile)) {
+                workbook.write(fos);
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            return ResponseResultUtil.error(-300,"D:/练习/" + randomUUIDString + "/客户档案错误数据反馈.xls");
+        }
+        else{
+            //插入数据
+            for(Customer customer:messageList){
+                //新建默认就是潜客
+                customer.setSaleStatus(Constant.saleCustomerStatusConstant.SALE_STATUS_POTE.getName());
+                //报备日期
+                customer.setReportTime(LocalDateTime.now());
+                super.insert(customer);
+            }
+            return ResponseResultUtil.success();
+        }
+    }
 }

+ 7 - 7
src/main/java/com/dk/mdm/service/mst/GoodsSkuService.java

@@ -189,12 +189,12 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 			//TODO 校验规则
 			//商品编号不能为空
 			if(goodsSku.getSkuCode()==null){
-				goodsSku.setErrorMessage("商品编号不能为空,");
+				goodsSku.setErrorMessage(goodsSku.getErrorMessage() + "商品编号不能为空,");
 				importMessage = true;
 			}
 			//商品型号不能为空
 			if(goodsSku.getSkuModel()==null){
-				goodsSku.setErrorMessage("商品型号不能为空,");
+				goodsSku.setErrorMessage(goodsSku.getErrorMessage() + "商品型号不能为空,");
 				importMessage = true;
 			}
 			//品牌
@@ -202,13 +202,13 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 				String brandName = goodsSku.getBrandName();
 				GoodsBrandResponse goodsBrandResponse = goodsBrandMapper.selectByUuId(new GoodsBrandQuery().setBrandName(brandName).setCpId(goodsSku.getCpId()));
 				if(goodsBrandResponse == null){
-					goodsSku.setErrorMessage("商品品牌填写错误,");
+					goodsSku.setErrorMessage(goodsSku.getErrorMessage() + "商品品牌填写错误,");
 					importMessage = true;
 				}else{
 					goodsSku.setBrandId(goodsBrandResponse.getBrandId());
 				}
 			}else{
-				goodsSku.setErrorMessage("商品品牌不能为空,");
+				goodsSku.setErrorMessage(goodsSku.getErrorMessage() + "商品品牌不能为空,");
 				importMessage = true;
 			}
 			//种类
@@ -267,7 +267,7 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 
 		//导出错误提示
 		if (importMessage) {
-			workbook = ExcelUtils.exportExcelUrl(messageList, "错误数据反馈", "错误数据反馈", GoodsSku.class, "错误数据反馈" + ".xls", response);
+			workbook = ExcelUtils.exportExcelUrl(messageList, "错误数据反馈", "错误数据反馈", GoodsSku.class, "商品档案错误数据反馈.xls", response);
 			UUID uuid = UUID.randomUUID();
 			String randomUUIDString = uuid.toString();
 			//TODO 导出文件位置
@@ -277,13 +277,13 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 			if (!outputFile.exists()) {
 				outputFile.mkdir();
 			}
-			File uploadFile = new File(fileName, "错误数据反馈.xls");
+			File uploadFile = new File(fileName, "商品档案错误数据反馈.xls");
 			try (FileOutputStream fos = new FileOutputStream(uploadFile)) {
 				workbook.write(fos);
 			} catch (IOException e) {
 				e.printStackTrace();
 			}
-			return ResponseResultUtil.error(-300,"D:/练习/" + randomUUIDString + "/错误数据反馈.xls");
+			return ResponseResultUtil.error(-300,"D:/练习/" + randomUUIDString + "/商品档案错误数据反馈.xls");
 		}
 		else{
 			//插入数据