Explorar o código

1、完成物流订单导入初始定义;

zk %!s(int64=2) %!d(string=hai) anos
pai
achega
8db63a78b6
Modificáronse 15 ficheiros con 509 adicións e 16 borrados
  1. 3 3
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/PasswordUtils.java
  2. 18 0
      sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteSystemService.java
  3. 27 0
      sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/model/dto/res/KwsEntDeptDto.java
  4. 0 2
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/dto/KwfTruckReportExcelImportDto.java
  5. 2 1
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckReportService.java
  6. 15 2
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteBaseService.java
  7. 16 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java
  8. 0 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java
  9. 3 3
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEntDeptDao.xml
  10. 3 0
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml
  11. 16 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/KwtAcceptCarriageOrderController.java
  12. 187 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/CarrierOrderImportDto.java
  13. 9 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtAcceptCarriageOrderService.java
  14. 0 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsOrderGoodsService.java
  15. 210 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsOrderImportService.java

+ 3 - 3
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/PasswordUtils.java

@@ -363,8 +363,8 @@ public class PasswordUtils {
     }
 
     public static void main(String[] args) throws Exception {
-        String account = "admin";
-        String password = "Yy123...";
+        String account = "17358629955";
+        String password = "123456";
         String salt = generateSalt();
         System.out.println(salt);
 
@@ -375,7 +375,7 @@ public class PasswordUtils {
 
         boolean bool = PasswordUtils.validatePassword(account + md5, password1, salt);
         System.out.println(bool);
-        checkDriver();
+        //checkDriver();
         //checkUser();
     }
 }

+ 18 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteSystemService.java

@@ -148,6 +148,15 @@ public interface RemoteSystemService {
      */
     Map<Long, EntCacheResDto> queryEntTreeByIds(List<Long> entIdList);
 
+    /**
+     * @param entPid 父级企业id
+     * @return List<KwsEntDeptDto>
+     * @desc: 查下级企业
+     * @author: czh
+     * @date: 2023/7/17
+     */
+    List<KwsEntDeptDto> queryEntDeptByPid(Long entPid);
+
     /**
      * @param entId 企业id
      * @return EntCacheResDto
@@ -157,6 +166,15 @@ public interface RemoteSystemService {
      */
     EntCacheResDto queryEntTreeById(Long entId);
 
+    /**
+     * @param entName 企业名称
+     * @return EntCacheResDto
+     * @desc: 查企业
+     * @author: czh
+     * @date: 2023/7/17
+     */
+    EntCacheResDto queryEntByName(String entName);
+
     /**
      * @param userId 用户id
      * @return UserCacheResDto

+ 27 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/model/dto/res/KwsEntDeptDto.java

@@ -0,0 +1,27 @@
+package com.sckw.system.api.model.dto.res;
+
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @desc 企业下级企业
+ * @author zk
+ * @date 2023/12/11 0011
+ */
+@Data
+public class KwsEntDeptDto implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 514335442672847826L;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 机构名称
+     */
+    private Long entPid;
+}

+ 0 - 2
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/dto/KwfTruckReportExcelImportDto.java

@@ -6,8 +6,6 @@ import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.Pattern;
 import jakarta.validation.constraints.Size;
 import lombok.Data;
-import org.hibernate.validator.constraints.Length;
-
 import java.io.Serializable;
 
 /**

+ 2 - 1
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckReportService.java

@@ -239,7 +239,8 @@ public class KwfTruckReportService {
      * @author zk
      * @date 2023/07/11
      **/
-    public HttpResult importExcel(MultipartFile file) {/**文件存储**/
+    public HttpResult importExcel(MultipartFile file) {
+        /**文件存储**/
         importFileSave(file);
 
         /**参数校验**/

+ 15 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteBaseService.java

@@ -1,6 +1,7 @@
 package com.sckw.system.dubbo;
 
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.constant.NumberConstant;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.system.api.model.dto.res.REnterpriseVo;
@@ -137,7 +138,6 @@ public class RemoteBaseService {
         return kwsEnterpriseService.findEnts(params);
     }
 
-
     /**
      * @param entCacheResDto 返参
      * @desc: 填充父子属id
@@ -159,7 +159,6 @@ public class RemoteBaseService {
         }
     }
 
-
     public List<KwsEntDept> queryEntDeptCacheByIds(List<Long> entIds) {
         return kwsEntDeptDao.selectByEntPidList(entIds);
     }
@@ -192,6 +191,20 @@ public class RemoteBaseService {
         return kwsEnterpriseService.queryEntDetails(entId);
     }
 
+    /**
+     * @param entName 企业名称
+     * @return EntCacheResDto
+     * @desc: 查企业
+     * @author: czh
+     * @date: 2023/7/17
+     */
+    public EntCacheResDto queryEntByName(String entName) {
+        List<KwsEnterprise> ents = kwsEnterpriseService.findEnts(new HashMap<>(){{put("entName", entName);}});
+        if (CollectionUtils.isEmpty(ents)) {
+            return null;
+        }
+        return kwsEnterpriseService.queryEntDetails(ents.get(NumberConstant.ZERO).getId());
+    }
 
     /**
      * @param cityCode 区域code  entTypeList 企业类型  entIdList 企业id

+ 16 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java

@@ -451,6 +451,17 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
         return result;
     }
 
+    @Override
+    public List<KwsEntDeptDto> queryEntDeptByPid(Long entPid) {
+        List<KwsEntDeptDto> entDeptDtos = new ArrayList<>();
+        List<KwsEntDept> entDepts = remoteBaseService.queryEntDeptCacheByIds(new ArrayList<>(){{add(entPid);}});
+        if (CollectionUtils.isEmpty(entDepts)) {
+            return entDeptDtos;
+        }
+
+        return BeanUtils.copyToList(entDepts, KwsEntDeptDto.class);
+    }
+
     @Override
     public EntCacheResDto queryEntTreeById(Long entId) {
         if (Objects.isNull(entId)) {
@@ -463,6 +474,11 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
         return longEntCacheResDtoMap.get(entId);
     }
 
+    @Override
+    public EntCacheResDto queryEntByName(String entName) {
+        return remoteBaseService.queryEntByName(entName);
+    }
+
     @Override
     public List<EntCacheResDto> queryEntCacheByIds(List<Long> entIds) {
         if (CollectionUtils.isEmpty(entIds)) {

+ 0 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -849,7 +849,6 @@ public class KwsEnterpriseService {
         return kwsEnterpriseDao.findEnts(params);
     }
 
-
     /**
      * @param reqVo 查询入参
      * @return FindListGroupResVo

+ 3 - 3
sckw-modules/sckw-system/src/main/resources/mapper/KwsEntDeptDao.xml

@@ -26,9 +26,9 @@
     where id = #{id,jdbcType=BIGINT}
   </select>
 
-    <select id="selectByEntId" resultType="com.sckw.system.model.KwsEntDept">
-      select * from kws_ent_dep where del_flag = 0 and ent_id = #{entId}
-    </select>
+  <select id="selectByEntId" resultType="com.sckw.system.model.KwsEntDept">
+    select * from kws_ent_dep where del_flag = 0 and ent_id = #{entId}
+  </select>
 
   <select id="selectByEntPid" resultType="com.sckw.system.model.KwsEntDept">
     select * from kws_ent_dep where del_flag = 0 and ent_pid = #{entPid}

+ 3 - 0
sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml

@@ -300,6 +300,9 @@
     <if test="firmName != null and firmName != ''">
       and ke.firm_name like concat('%', #{firmName}, '%')
     </if>
+    <if test="entName != null and entName != ''">
+      and ke.firm_name = #{entName}
+    </if>
     <choose>
       <when test="entTypes != null and entTypes != '' and entTypes.size() > 0">
         and exists (select 1 from kws_ent_type ket where ket.del_flag = 0 and ke.id = ket.ent_id and ket.type in

+ 16 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/KwtAcceptCarriageOrderController.java

@@ -17,6 +17,7 @@ import com.sckw.transport.model.dto.*;
 import com.sckw.transport.model.param.*;
 import com.sckw.transport.model.vo.execlVo.AcceptCarriageOrderExcelVo;
 import com.sckw.transport.service.KwtAcceptCarriageOrderService;
+import com.sckw.transport.service.KwtLogisticsOrderImportService;
 import com.sckw.transport.service.KwtTransportCommonService;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
@@ -27,7 +28,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-
+import org.springframework.web.multipart.MultipartFile;
 import java.util.List;
 
 /**
@@ -48,6 +49,9 @@ public class KwtAcceptCarriageOrderController {
     @Autowired
     KwtTransportCommonService transportCommonService;
 
+    @Autowired
+    KwtLogisticsOrderImportService logisticsOrderImportService;
+
     /**
      * 承运订单首页条件查询
      *
@@ -96,6 +100,17 @@ public class KwtAcceptCarriageOrderController {
         ExcelUtil.downData(response, AcceptCarriageOrderExcelVo.class, list);
     }
 
+    /**
+     * @param file 导入文件
+     * @desc 导入
+     * @author zk
+     * @date 2023/12/10
+     **/
+    @PostMapping("/import")
+    public HttpResult importExcel(@RequestParam("file") MultipartFile file) {
+        return logisticsOrderImportService.importExcel(file);
+    }
+
     /**
      * 获取订单详情-托运订单-承运订单-销售订单-采购订单
      *

+ 187 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/CarrierOrderImportDto.java

@@ -0,0 +1,187 @@
+package com.sckw.transport.model.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.io.Serializable;
+
+/**
+ * @desc 承运订单导入
+ * @author zk
+ * @date 2023/12/10 0010
+ */
+@Data
+public class CarrierOrderImportDto implements Serializable {
+    private static final long serialVersionUID = 307622351109421619L;
+
+    /**
+     * 托运单位[必填]
+     */
+    @ExcelProperty(index = 0)
+    @NotBlank(message = "托运单位不能为空!")
+    @Size(max=40, message = "托运单位长度不能大于40个字符!")
+    private String checkFirmName;
+
+    /**
+     *承运单位[必填]
+     */
+    @ExcelProperty(index = 1)
+    @NotBlank(message = "承运单位不能为空!")
+    @Size(max=40, message = "承运单位长度不能大于40个字符!")
+    private String carrierFirmName;
+
+    /**
+     *货物名称[必填]
+     */
+    @ExcelProperty(index = 2)
+    @NotBlank(message = "货物名称不能为空!")
+    @Size(max=40, message = "货物名称长度不能大于40个字符!")
+    private String goodsName;
+
+    /**
+     *货物分类[必填]
+     */
+    @ExcelProperty(index = 3)
+    @NotBlank(message = "货物分类不能为空!")
+    @Size(max=20, message = "货物分类长度不能大于20个字符!")
+    private String goodsType;
+
+    /**
+     *合同编号[必填]
+     */
+    @ExcelProperty(index = 4)
+    @NotBlank(message = "合同编号不能为空!")
+    @Size(max=20, message = "合同编号长度不能大于20个字符!")
+    private String contractNo;
+
+    /**
+     *计费方式[必填]
+     */
+    @ExcelProperty(index = 5)
+    @NotBlank(message = "计费方式不能为空!")
+    @Size(max=20, message = "计费方式长度不能大于20个字符!")
+    private String billingMode;
+
+    /**
+     *运价[必填]
+     */
+    @ExcelProperty(index = 6)
+    @NotNull(message = "运价不能为空!")
+    //@DecimalMin(value= "0", inclusive=false, message = "运价必须等于或大于0")
+    private String price;
+
+    /**
+     *运价单位[必填]
+     */
+    @ExcelProperty(index = 7)
+    @NotBlank(message = "运价单位不能为空!")
+    @Size(max=20, message = "运价单位长度不能大于20个字符!")
+    private String priceType;
+
+    /**
+     *税率(%)[必填]
+     */
+    @ExcelProperty(index = 8)
+    @NotNull(message = "税率不能为空!")
+    //@DecimalMin(value= "0", inclusive=false, message = "税率必须等于或大于0")
+    private String taxRate;
+
+    /**
+     *分配承运量[必填]
+     */
+    @ExcelProperty(index = 9)
+    @NotNull(message = "分配承运量不能为空!")
+    //@DecimalMin(value= "0", inclusive=false, message = "分配承运量必须等于或大于0")
+    private String amount;
+
+    /**
+     *分配承运量单位[必填]
+     */
+    @ExcelProperty(index = 10)
+    @NotBlank(message = "分配承运量单位不能为空!")
+    @Size(max=20, message = "分配承运量单位长度不能大于20个字符!")
+    private String unit;
+
+    /**
+     *合理耗损(‰)
+     */
+    @ExcelProperty(index = 11)
+    //@DecimalMin(value= "0", inclusive=false, message = "合理耗损必须等于或大于0")
+    private String loss;
+
+    /**
+     *扣亏货值
+     */
+    @ExcelProperty(index = 12)
+    //@DecimalMin(value= "0", inclusive=false, message = "扣亏货值必须等于或大于0")
+    private String goodsPrice;
+
+    /**
+     *扣亏货值单位
+     */
+    @ExcelProperty(index = 13)
+    @Size(max=20, message = "扣亏货值单位长度不能大于20个字符!")
+    private String goodsPriceUnit;
+
+    /**
+     *计划发货时间[必填]
+     */
+    @ExcelProperty(index = 14)
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @NotNull(message = "计划发货时间不能为空!")
+    private String loadTime;
+
+    /**
+     *计划卸货时间[必填]
+     */
+    @ExcelProperty(index = 15)
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @NotNull(message = "计划卸货时间不能为空!")
+    private String unloadTime;
+
+    /**
+     *结算周期[必填]
+     */
+    @ExcelProperty(index = 16)
+    @NotBlank(message = "结算周期不能为空!")
+    @Size(max=20, message = "结算周期长度不能大于20个字符!")
+    private String settlementCycle;
+
+    /**
+     *支付方式[必填]
+     */
+    @ExcelProperty(index = 17)
+    @NotBlank(message = "支付方式不能为空!")
+    @Size(max=20, message = "支付方式长度不能大于20个字符!")
+    private String payment;
+
+    /**
+     *装货地址[必填]
+     */
+    @ExcelProperty(index = 18)
+    @NotBlank(message = "装货地址不能为空!")
+    @Size(max=30, message = "装货地址长度不能大于30个字符!")
+    private String loadAddress;
+
+    /**
+     *卸货地址[必填]
+     */
+    @ExcelProperty(index = 19)
+    @NotBlank(message = "卸货地址不能为空!")
+    @Size(max=30, message = "卸货地址长度不能大于30个字符!")
+    private String unloadAddress;
+
+    /**
+     *备注
+     */
+    @ExcelProperty(index = 20)
+    @Size(max=200, message = "备注长度不能大于200个字符!")
+    private String remark;
+
+}

+ 9 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtAcceptCarriageOrderService.java

@@ -3,6 +3,9 @@ package com.sckw.transport.service;
 import cn.hutool.core.date.DateField;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.util.ArrayUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelReader;
+import com.alibaba.excel.read.metadata.ReadSheet;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -22,7 +25,9 @@ import com.sckw.core.utils.*;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.easyexcel.ExcelImportListener;
 import com.sckw.excel.utils.DateUtil;
+import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.excel.utils.ValidUtil;
 import com.sckw.fleet.api.RemoteFleetService;
 import com.sckw.fleet.api.model.vo.RTruckVo;
@@ -67,7 +72,9 @@ import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.text.DecimalFormat;
@@ -91,6 +98,7 @@ public class KwtAcceptCarriageOrderService {
 
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
     RemoteSystemService remoteSystemService;
+
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
     TradeOrderInfoService tradeOrderInfoService;
 
@@ -3049,4 +3057,5 @@ public class KwtAcceptCarriageOrderService {
         }
         return null;
     }
+
 }

+ 0 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsOrderGoodsService.java

@@ -1,6 +1,5 @@
 package com.sckw.transport.service;
 
-import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.constant.NumberConstant;
 import com.sckw.core.model.enums.LogisticsOrderEnum;
@@ -27,12 +26,10 @@ import com.sckw.transport.model.vo.WaybillCountVo;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * @desc 物流订单关联商品信息

+ 210 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsOrderImportService.java

@@ -0,0 +1,210 @@
+package com.sckw.transport.service;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelReader;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.read.metadata.ReadSheet;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.contract.api.RemoteContractService;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.easyexcel.ExcelImportListener;
+import com.sckw.excel.utils.ExcelUtil;
+import com.sckw.fleet.api.RemoteFleetService;
+import com.sckw.manage.api.RemoteManageService;
+import com.sckw.order.api.dubbo.TradeOrderInfoService;
+import com.sckw.product.api.dubbo.GoodsInfoService;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import com.sckw.system.api.model.dto.res.KwsEntDeptDto;
+import com.sckw.transport.model.dto.CarrierOrderImportDto;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @desc 物流订单导入
+ * @author zk
+ * @date 2023/12/10 0010
+ */
+@Slf4j
+@Service
+@SuppressWarnings("all")
+public class KwtLogisticsOrderImportService {
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
+    RemoteSystemService remoteSystemService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
+    TradeOrderInfoService tradeOrderInfoService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
+    GoodsInfoService goodsInfoService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
+    RemoteFleetService fleetService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
+    RemoteContractService remoteContractService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
+    RemoteManageService remoteManageService;
+
+    @Autowired
+    KwtTransportCommonService transportCommonService;
+
+
+    /**
+     * @param {}
+     * @desc 导出
+     * @author zk
+     * @date 2023/12/10
+     **/
+    public HttpResult importExcel(MultipartFile file) {
+        /**文件存储**/
+        //importFileSave(file);
+
+        /**参数校验**/
+        HttpResult result = this.checkParams(file);
+        if (result.getCode() != HttpStatus.SUCCESS_CODE) {
+            return result;
+        }
+
+        List<CarrierOrderImportDto> carrierOrderExcels = (List)result.getData();
+        result = checkParams(carrierOrderExcels);
+        if (result.getCode() != HttpStatus.SUCCESS_CODE) {
+            return HttpResult.error("导入数据存在已上报,请核对再上传!", result.getData());
+        }
+
+
+        return result;
+    }
+
+    /**
+     * @param file 上传文件
+     * @desc 参数校验
+     * @author zk
+     * @date 2023/12/10
+     **/
+    public HttpResult checkParams(MultipartFile file) {
+        ExcelReader excelReader = null;
+        try {
+            /*数据校验**/
+            if (ExcelUtil.checkExcel(file)) {
+                return HttpResult.error("请上传Excel格式的文件!");
+            }
+
+            ExcelImportListener importListener = new ExcelImportListener();
+            InputStream inputStream = file.getInputStream();
+            excelReader = EasyExcel.read(inputStream, importListener).build();
+
+            ReadSheet readSheet = EasyExcel.readSheet( 0) .headRowNumber(2).head(CarrierOrderImportDto.class).build();
+            excelReader.read(readSheet);
+            if (importListener.getErrorList().size() > 0) {
+                return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, "数据格式不正确,请确认!", importListener.getErrorList());
+            }
+            if (importListener.getDataList().size() == 0) {
+                return HttpResult.error("导入数据不能空!");
+            }
+
+            return HttpResult.ok(importListener.getDataList());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return HttpResult.error("承运订单信息导入异常!");
+        } finally {
+            if (excelReader != null) {
+                excelReader.finish();
+            }
+        }
+    }
+
+    /**
+     * @param carrierOrderExcels 上传信息
+     * @desc 校验上传参数
+     * @author zk
+     * @date 2023/12/10
+     **/
+    public HttpResult checkParams(List<CarrierOrderImportDto> carrierOrderExcels) {
+        int rowNum = Global.NUMERICAL_TWO;
+        List<String> errorList = new ArrayList();
+        List<Map<String, Object>> orderList = new ArrayList<>();
+        for (CarrierOrderImportDto orderExcel:carrierOrderExcels) {
+            rowNum ++;
+            StringBuilder msg = new StringBuilder("第"+ rowNum +"行数据有误,");
+            //msg.append("车牌号"+ truck.getTruckNo() +"已上报!");
+
+            //托运单位[必填] checkFirmName(企业是否存在、是否是合作托运企业)
+            EntCacheResDto checkFirm = remoteSystemService.queryEntByName(orderExcel.getCheckFirmName());
+            if (checkFirm == null) {
+                msg.append("托运单位"+ orderExcel.getCheckFirmName() +"不存在!");
+            } else {
+
+            }
+
+            //承运单位[必填] carrierFirmName(企业是否存在、是否是本企业或下属企业)
+            EntCacheResDto carrierFirm = remoteSystemService.queryEntByName(orderExcel.getCarrierFirmName());
+            if (checkFirm == null) {
+                msg.append("承运单位"+ orderExcel.getCarrierFirmName() +"不存在!");
+            } else {
+                if (carrierFirm.getId().equals(LoginUserHolder.getEntId())) {
+
+                }
+
+                List<KwsEntDeptDto> entDeptDtos = remoteSystemService.queryEntDeptByPid(LoginUserHolder.getEntId());
+            }
+
+
+
+            //货物分类[必填] goodsType
+
+            //合同编号[必填] contractNo
+
+            //计费方式[必填] billingMode
+
+            //运价[必填] price
+
+            //运价单位[必填] priceType
+
+            //税率(%)[必填] taxRate
+
+            //分配承运量[必填] amount
+
+            //分配承运量单位[必填] unit
+
+            //合理耗损(‰) loss
+
+            //扣亏货值 goodsPrice
+
+            //扣亏货值单位 goodsPriceUnit
+
+            //计划发货时间[必填] loadTime
+
+            //计划卸货时间[必填] unloadTime
+
+            //结算周期[必填] settlementCycle
+
+            //支付方式[必填] payment
+
+            //装货地址[必填] loadAddress
+
+            //卸货地址[必填] unloadAddress
+
+        }
+
+
+        return HttpResult.ok();
+    }
+
+}