Browse Source

Merge branch 'master' into dev

# Conflicts:
#	ruoyi-admin/src/main/resources/application-druid.yml
#	ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java
lazhaoqian 4 years ago
parent
commit
0677ca15b5

+ 18 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/KHTWarehousebillsController.java

@@ -238,14 +238,14 @@ public class KHTWarehousebillsController extends BaseController
         List<Map<String, Object>> goodName = itGoodsService.getGoodName();
         return AjaxResult.success(goodName);
     }
-    @Log(title = "凯和网页版订单查询详情", businessType = BusinessType.DELETE)
+   // @Log(title = "凯和网页版订单查询详情", businessType = BusinessType.DELETE)
     @PostMapping("/webVersionOrder")
     public TableDataInfo webVersionOrder(@RequestBody(required = false) TWarehouseBills tWarehouseBills){
         startPage();
         List<TWarehouseBills> warehouseBills = tWarehousebillsService.webVersionOrder(tWarehouseBills);
         return getDataTable(warehouseBills);
     }
-    @Log(title = "凯和网页版订单查询", businessType = BusinessType.DELETE)
+    //@Log(title = "凯和网页版订单查询", businessType = BusinessType.DELETE)
     @GetMapping("/webVersionOrderMessage")
     public TableDataInfo webVersionOrderMessage(TWarehouseBills tWarehouseBills){
         startPage();
@@ -253,7 +253,7 @@ public class KHTWarehousebillsController extends BaseController
         List<Map<String,Object>> warehouseBills = tWarehousebillsService.webVersionOrderMessage(loginUser,tWarehouseBills);
         return getDataTable(warehouseBills);
     }
-    @PreAuthorize("@ss.hasPermi('warehouse:warehousebills:ruoYiVersionOrderList')")
+    //@PreAuthorize("@ss.hasPermi('warehouse:warehousebills:ruoYiVersionOrderList')")
     @Log(title = "凯和若依订单查询", businessType = BusinessType.DELETE)
     @GetMapping("/ruoYiVersionOrderList")
     public TableDataInfo ruoYiVersionOrderList(TWarehouseBills tWarehouseBills){
@@ -262,7 +262,7 @@ public class KHTWarehousebillsController extends BaseController
         List<Map<String,Object>> warehouseBills = tWarehousebillsService.ruoYiVersionOrderList(loginUser,tWarehouseBills);
         return getDataTable(warehouseBills);
     }
-    @PreAuthorize("@ss.hasPermi('warehouse:warehousebills:webVersionOrderDetails')")
+    //@PreAuthorize("@ss.hasPermi('warehouse:warehousebills:webVersionOrderDetails')")
     @Log(title = "凯和若依订单详情", businessType = BusinessType.DELETE)
     @PostMapping("/webVersionOrderDetails")
     public TableDataInfo webVersionOrderDetails(@RequestBody TWarehouseBills tWarehouseBills){
@@ -335,11 +335,24 @@ public class KHTWarehousebillsController extends BaseController
     /**
      * 凯和商务版导入【箱信息】Excel
      */
-    @PostMapping(value = "/importCreate")
+    @PostMapping(value = "/importCreateNew")
     public AjaxResult importCreateCompanyMsg(@RequestParam("file") MultipartFile file)throws Exception
     {
         return tWarehousebillsService.importCreateCompanyMsg(file);
     }
+
+    /**
+     * 凯和商务端新的上传方式
+     * @param file
+     * @return
+     * @throws Exception
+     */
+    @PostMapping(value = "/importCreate")
+    public AjaxResult importCreateCompanyMsgNew(@RequestParam("file") MultipartFile file)throws Exception
+    {
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return tWarehousebillsService.importCreateCompanyMsgNew(file,loginUser);
+    }
     /**
      * 下载箱信息导入模板
      */

+ 118 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TTemporaryFileController.java

@@ -0,0 +1,118 @@
+package com.ruoyi.web.controller.shipping.controller;
+
+import java.util.List;
+
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.shipping.domain.TTemporaryFile;
+import com.ruoyi.shipping.service.ITTemporaryFileService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 凯和商务端上传箱信息暂存数据Controller
+ * 
+ * @author ruoyi
+ * @date 2021-07-01
+ */
+@RestController
+@RequestMapping("/warehouse/file")
+public class TTemporaryFileController extends BaseController
+{
+    @Autowired
+    private ITTemporaryFileService tTemporaryFileService;
+
+    /**
+     * 查询凯和商务端上传箱信息暂存数据列表
+     */
+    //@PreAuthorize("@ss.hasPermi('warehouse:file:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TTemporaryFile tTemporaryFile)
+    {
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        tTemporaryFile.setCreateBy(loginUser.getUser().getUserName());
+        List<TTemporaryFile> temporaryFileList = tTemporaryFileService.selectTTemporaryFileList(tTemporaryFile,loginUser);
+        startPage();
+        List<TTemporaryFile> list = tTemporaryFileService.selectTTemporaryFileList(tTemporaryFile,loginUser);
+        TableDataInfo dataTable = getDataTable(list);
+        dataTable.setTotal(temporaryFileList.size());
+        return dataTable;
+        //return AjaxResult.success(list);
+    }
+
+    /**
+     * 导出凯和商务端上传箱信息暂存数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:file:export')")
+    @Log(title = "凯和商务端上传箱信息暂存数据", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TTemporaryFile tTemporaryFile)
+    {
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        List<TTemporaryFile> list = tTemporaryFileService.selectTTemporaryFileList(tTemporaryFile,loginUser);
+        ExcelUtil<TTemporaryFile> util = new ExcelUtil<TTemporaryFile>(TTemporaryFile.class);
+        return util.exportExcel(list, "file");
+    }
+
+    /**
+     * 获取凯和商务端上传箱信息暂存数据详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:file:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId)
+    {
+        return AjaxResult.success(tTemporaryFileService.selectTTemporaryFileById(fId));
+    }
+
+    /**
+     * 新增凯和商务端上传箱信息暂存数据
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:file:add')")
+    @Log(title = "凯和商务端上传箱信息暂存数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TTemporaryFile tTemporaryFile)
+    {
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return toAjax(tTemporaryFileService.insertTTemporaryFile(tTemporaryFile,loginUser));
+    }
+
+    /**
+     * 修改凯和商务端上传箱信息暂存数据
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:file:edit')")
+    @Log(title = "凯和商务端上传箱信息暂存数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TTemporaryFile tTemporaryFile)
+    {
+        return toAjax(tTemporaryFileService.updateTTemporaryFile(tTemporaryFile));
+    }
+
+    /**
+     * 删除凯和商务端上传箱信息暂存数据
+     */
+    //@PreAuthorize("@ss.hasPermi('warehouse:file:remove')")
+    @Log(title = "凯和商务端上传箱信息暂存数据", businessType = BusinessType.DELETE)
+	@DeleteMapping("/delete/{fileName}")
+    public AjaxResult remove(@PathVariable String fileName)
+    {
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return toAjax(tTemporaryFileService.deleteTTemporaryFilefileName(fileName,loginUser.getUser().getUserName()));
+    }
+}

+ 3 - 0
ruoyi-admin/src/main/resources/application-druid.yml

@@ -6,6 +6,9 @@ spring:
     druid:
       # 主库数据源
       master:
+#        url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ #       url: jdbc:mysql://115.29.151.39:3306/sys?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#        url: jdbc:mysql://124.70.179.5:3306/Test?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
         url: jdbc:mysql://124.70.179.5:3306/LinuxServer?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
         username: root
         password: daasan7ujm^YHN

+ 190 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TTemporaryFile.java

@@ -0,0 +1,190 @@
+package com.ruoyi.shipping.domain;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 凯和商务端上传箱信息暂存数据对象 t_temporary_file
+ * 
+ * @author ruoyi
+ * @date 2021-07-01
+ */
+public class TTemporaryFile extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long fId;
+
+    /** 箱号 */
+    @Excel(name = "箱号")
+    private String fCntrno;
+
+    /** 铅封号 */
+    @Excel(name = "铅封号")
+    private String fSealno;
+
+    /** 商品ID */
+    @Excel(name = "商品ID")
+    private Long fGoodsid;
+
+    /** 包装ID */
+    @Excel(name = "包装ID")
+    private String fPackageid;
+
+    /** 箱型id */
+    @Excel(name = "箱型id")
+    private Long fCntrid;
+
+    /** 单箱重 */
+    @Excel(name = "单箱重")
+    private BigDecimal fCntrweight;
+
+    /** 货名 */
+    @Excel(name = "货名")
+    private String goodsName;
+
+    /** 包装类型中文 */
+    @Excel(name = "包装类型中文")
+    private String packageName;
+
+    /** 箱型中文 */
+    @Excel(name = "箱型中文")
+    private String cntrName;
+
+    /** 文件名 */
+    @Excel(name = "文件名")
+    private String fileName;
+    //存已有数据
+    private String tTemporaryFileList;
+
+    public String gettTemporaryFileList() {
+        return tTemporaryFileList;
+    }
+
+    public void settTemporaryFileList(String tTemporaryFileList) {
+        this.tTemporaryFileList = tTemporaryFileList;
+    }
+
+    public void setfId(Long fId)
+    {
+        this.fId = fId;
+    }
+
+    public Long getfId() 
+    {
+        return fId;
+    }
+    public void setfCntrno(String fCntrno) 
+    {
+        this.fCntrno = fCntrno;
+    }
+
+    public String getfCntrno() 
+    {
+        return fCntrno;
+    }
+    public void setfSealno(String fSealno) 
+    {
+        this.fSealno = fSealno;
+    }
+
+    public String getfSealno() 
+    {
+        return fSealno;
+    }
+    public void setfGoodsid(Long fGoodsid) 
+    {
+        this.fGoodsid = fGoodsid;
+    }
+
+    public Long getfGoodsid() 
+    {
+        return fGoodsid;
+    }
+    public void setfPackageid(String fPackageid) 
+    {
+        this.fPackageid = fPackageid;
+    }
+
+    public String getfPackageid() 
+    {
+        return fPackageid;
+    }
+    public void setfCntrid(Long fCntrid) 
+    {
+        this.fCntrid = fCntrid;
+    }
+
+    public Long getfCntrid() 
+    {
+        return fCntrid;
+    }
+    public void setfCntrweight(BigDecimal fCntrweight) 
+    {
+        this.fCntrweight = fCntrweight;
+    }
+
+    public BigDecimal getfCntrweight() 
+    {
+        return fCntrweight;
+    }
+    public void setGoodsName(String goodsName) 
+    {
+        this.goodsName = goodsName;
+    }
+
+    public String getGoodsName() 
+    {
+        return goodsName;
+    }
+    public void setPackageName(String packageName) 
+    {
+        this.packageName = packageName;
+    }
+
+    public String getPackageName() 
+    {
+        return packageName;
+    }
+    public void setCntrName(String cntrName) 
+    {
+        this.cntrName = cntrName;
+    }
+
+    public String getCntrName() 
+    {
+        return cntrName;
+    }
+    public void setFileName(String fileName) 
+    {
+        this.fileName = fileName;
+    }
+
+    public String getFileName() 
+    {
+        return fileName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("fId", getfId())
+            .append("fCntrno", getfCntrno())
+            .append("fSealno", getfSealno())
+            .append("fGoodsid", getfGoodsid())
+            .append("fPackageid", getfPackageid())
+            .append("fCntrid", getfCntrid())
+            .append("fCntrweight", getfCntrweight())
+            .append("goodsName", getGoodsName())
+            .append("packageName", getPackageName())
+            .append("cntrName", getCntrName())
+            .append("fileName", getFileName())
+            .toString();
+    }
+}

+ 78 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TTemporaryFileMapper.java

@@ -0,0 +1,78 @@
+package com.ruoyi.shipping.mapper;
+
+import com.ruoyi.shipping.domain.TTemporaryFile;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.security.core.parameters.P;
+
+import java.util.List;
+
+/**
+ * 凯和商务端上传箱信息暂存数据Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2021-07-01
+ */
+public interface TTemporaryFileMapper 
+{
+    /**
+     * 查询凯和商务端上传箱信息暂存数据
+     * 
+     * @param fId 凯和商务端上传箱信息暂存数据ID
+     * @return 凯和商务端上传箱信息暂存数据
+     */
+    public TTemporaryFile selectTTemporaryFileById(Long fId);
+
+    /**
+     * 查询凯和商务端上传箱信息暂存数据列表
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 凯和商务端上传箱信息暂存数据集合
+     */
+    public List<TTemporaryFile> selectTTemporaryFileList(TTemporaryFile tTemporaryFile);
+    /**
+     * 查询凯和商务端上传箱信息暂存数据列表
+     *
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 凯和商务端上传箱信息暂存数据集合
+     */
+    public List<TTemporaryFile> selectTTemporaryFileMessage(TTemporaryFile tTemporaryFile);
+
+    /**
+     * 新增凯和商务端上传箱信息暂存数据
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 结果
+     */
+    public int insertTTemporaryFile(TTemporaryFile tTemporaryFile);
+
+    /**
+     * 修改凯和商务端上传箱信息暂存数据
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 结果
+     */
+    public int updateTTemporaryFile(TTemporaryFile tTemporaryFile);
+
+    /**
+     * 删除凯和商务端上传箱信息暂存数据
+     * 
+     * @param fId 凯和商务端上传箱信息暂存数据ID
+     * @return 结果
+     */
+    public int deleteTTemporaryFileById(Long fId);
+
+    /**
+     * 根据文件名删除暂存数据
+     * @param fileName
+     * @return
+     */
+    public int deleteTTemporaryFilefileName(@Param("fileName") String fileName, @Param("createBy")String createBy);
+
+    /**
+     * 批量删除凯和商务端上传箱信息暂存数据
+     * 
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTTemporaryFileByIds(Long[] fIds);
+}

+ 7 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TVoyageMapper.java

@@ -28,6 +28,13 @@ public interface TVoyageMapper
      * @return 航次集合
      */
     public List<TVoyage> selectTVoyageList(TVoyage tVoyage);
+    /**
+     * 查询航次列表
+     *
+     * @param tVoyage 航次
+     * @return 航次集合
+     */
+    public List<TVoyage> selectTVoyageListNew(TVoyage tVoyage);
 
     /**
      * 新增航次

+ 69 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITTemporaryFileService.java

@@ -0,0 +1,69 @@
+package com.ruoyi.shipping.service;
+
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.shipping.domain.TTemporaryFile;
+
+import java.util.List;
+
+/**
+ * 凯和商务端上传箱信息暂存数据Service接口
+ * 
+ * @author ruoyi
+ * @date 2021-07-01
+ */
+public interface ITTemporaryFileService 
+{
+    /**
+     * 查询凯和商务端上传箱信息暂存数据
+     * 
+     * @param fId 凯和商务端上传箱信息暂存数据ID
+     * @return 凯和商务端上传箱信息暂存数据
+     */
+    public TTemporaryFile selectTTemporaryFileById(Long fId);
+
+    /**
+     * 查询凯和商务端上传箱信息暂存数据列表
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 凯和商务端上传箱信息暂存数据集合
+     */
+    public List<TTemporaryFile> selectTTemporaryFileList(TTemporaryFile tTemporaryFile,LoginUser loginUser);
+
+    /**
+     * 新增凯和商务端上传箱信息暂存数据
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 结果
+     */
+    public int insertTTemporaryFile(TTemporaryFile tTemporaryFile,LoginUser loginUser);
+
+    /**
+     * 修改凯和商务端上传箱信息暂存数据
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 结果
+     */
+    public int updateTTemporaryFile(TTemporaryFile tTemporaryFile);
+
+    /**
+     * 批量删除凯和商务端上传箱信息暂存数据
+     * 
+     * @param fIds 需要删除的凯和商务端上传箱信息暂存数据ID
+     * @return 结果
+     */
+    public int deleteTTemporaryFileByIds(Long[] fIds);
+
+    /**
+     * 删除凯和商务端上传箱信息暂存数据信息
+     * 
+     * @param fId 凯和商务端上传箱信息暂存数据ID
+     * @return 结果
+     */
+    public int deleteTTemporaryFileById(Long fId);
+    /**
+     * 根据文件名删除暂存数据
+     * @param fileName
+     * @return
+     */
+    public int deleteTTemporaryFilefileName(String fileName,String createBy);
+}

+ 132 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TTemporaryFileServiceImpl.java

@@ -0,0 +1,132 @@
+package com.ruoyi.shipping.service.impl;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.shipping.domain.TTemporaryFile;
+import com.ruoyi.shipping.mapper.TTemporaryFileMapper;
+import com.ruoyi.shipping.service.ITTemporaryFileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 凯和商务端上传箱信息暂存数据Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2021-07-01
+ */
+@Service
+public class TTemporaryFileServiceImpl implements ITTemporaryFileService
+{
+    @Autowired
+    private TTemporaryFileMapper tTemporaryFileMapper;
+
+    /**
+     * 查询凯和商务端上传箱信息暂存数据
+     * 
+     * @param fId 凯和商务端上传箱信息暂存数据ID
+     * @return 凯和商务端上传箱信息暂存数据
+     */
+    @Override
+    public TTemporaryFile selectTTemporaryFileById(Long fId)
+    {
+        return tTemporaryFileMapper.selectTTemporaryFileById(fId);
+    }
+
+    /**
+     * 查询凯和商务端上传箱信息暂存数据列表
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 凯和商务端上传箱信息暂存数据
+     */
+    @Override
+    public List<TTemporaryFile> selectTTemporaryFileList(TTemporaryFile tTemporaryFile,LoginUser loginUser)
+    {
+        List<TTemporaryFile> tTemporaryFiles = new ArrayList<>();
+        tTemporaryFiles = tTemporaryFileMapper.selectTTemporaryFileMessage(tTemporaryFile);
+        /*if (StringUtils.isNotEmpty(tTemporaryFile.gettTemporaryFileList()) && !"[]".equals(tTemporaryFile.gettTemporaryFileList())){
+            JSONArray jsonCrArray = JSONArray.parseArray(tTemporaryFile.gettTemporaryFileList());
+            List<TTemporaryFile> fileList = JSONObject.parseArray(jsonCrArray.toJSONString(), TTemporaryFile.class);
+            if (CollectionUtils.isNotEmpty(fileList)){
+                for (TTemporaryFile temporaryFile : fileList) {
+                    temporaryFile.setCreateBy(loginUser.getUser().getUserName());
+                    temporaryFile.setCreateTime(new Date());
+                    tTemporaryFileMapper.insertTTemporaryFile(tTemporaryFile);
+                }
+            }*/
+            ArrayList<TTemporaryFile> collect = tTemporaryFiles.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TTemporaryFile -> TTemporaryFile.getfCntrno()
+            ))), ArrayList::new));
+        /*}*/
+        return collect;
+    }
+
+    /**
+     * 新增凯和商务端上传箱信息暂存数据
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 结果
+     */
+    @Override
+    public int insertTTemporaryFile(TTemporaryFile tTemporaryFile,LoginUser loginUser)
+    {
+        int i = 0;
+        if (StringUtils.isNotEmpty(tTemporaryFile.gettTemporaryFileList()) && !"[]".equals(tTemporaryFile.gettTemporaryFileList())) {
+            JSONArray jsonCrArray = JSONArray.parseArray(tTemporaryFile.gettTemporaryFileList());
+            List<TTemporaryFile> fileList = JSONObject.parseArray(jsonCrArray.toJSONString(), TTemporaryFile.class);
+            if (CollectionUtils.isNotEmpty(fileList)) {
+                for (TTemporaryFile temporaryFile : fileList) {
+                    temporaryFile.setCreateBy(loginUser.getUser().getUserName());
+                    temporaryFile.setCreateTime(new Date());
+                    i = tTemporaryFileMapper.insertTTemporaryFile(tTemporaryFile);
+                }
+            }
+        }
+        return i;
+    }
+
+    /**
+     * 修改凯和商务端上传箱信息暂存数据
+     * 
+     * @param tTemporaryFile 凯和商务端上传箱信息暂存数据
+     * @return 结果
+     */
+    @Override
+    public int updateTTemporaryFile(TTemporaryFile tTemporaryFile)
+    {
+        return tTemporaryFileMapper.updateTTemporaryFile(tTemporaryFile);
+    }
+
+    /**
+     * 批量删除凯和商务端上传箱信息暂存数据
+     * 
+     * @param fIds 需要删除的凯和商务端上传箱信息暂存数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTTemporaryFileByIds(Long[] fIds)
+    {
+        return tTemporaryFileMapper.deleteTTemporaryFileByIds(fIds);
+    }
+
+    /**
+     * 删除凯和商务端上传箱信息暂存数据信息
+     * 
+     * @param fId 凯和商务端上传箱信息暂存数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTTemporaryFileById(Long fId)
+    {
+        return tTemporaryFileMapper.deleteTTemporaryFileById(fId);
+    }
+
+    @Override
+    public int deleteTTemporaryFilefileName(String fileName,String createBy) {
+        return tTemporaryFileMapper.deleteTTemporaryFilefileName(fileName,createBy);
+    }
+}

+ 2 - 2
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TVoyageServiceImpl.java

@@ -57,7 +57,7 @@ public class TVoyageServiceImpl implements ITVoyageService
 
     @Override
     public List<TVoyage> freightList(TVoyage tVoyage) {
-        List<TVoyage> tVoyages = tVoyageMapper.selectTVoyageList(tVoyage);
+        List<TVoyage> tVoyages = tVoyageMapper.selectTVoyageListNew(tVoyage);
         if (CollectionUtils.isNotEmpty(tVoyages)){
             for (TVoyage voyage : tVoyages) {
                 voyage.setTwenty(tCtnpriceItemsMapper.selectMoney(voyage.getfPortofloadid(), voyage.getfDistinationid(), "20GP"));
@@ -82,7 +82,7 @@ public class TVoyageServiceImpl implements ITVoyageService
 
     @Override
     public List<TVoyage> freightselect(TVoyage tVoyage) {
-        List<TVoyage> tVoyages = tVoyageMapper.selectTVoyageList(tVoyage);
+        List<TVoyage> tVoyages = tVoyageMapper.selectTVoyageListNew(tVoyage);
         List<TVoyage> tVoyagesList = new ArrayList<>();
         Long fPortoftransshipment = null;
         if (CollectionUtils.isNotEmpty(tVoyages)){

+ 164 - 0
ruoyi-shipping/src/main/resources/mapper/shipping/TTemporaryFileMapper.xml

@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.shipping.mapper.TTemporaryFileMapper">
+    
+    <resultMap type="TTemporaryFile" id="TTemporaryFileResult">
+        <result property="fId"    column="f_id"    />
+        <result property="fCntrno"    column="f_cntrno"    />
+        <result property="fSealno"    column="f_sealno"    />
+        <result property="fGoodsid"    column="f_goodsid"    />
+        <result property="fPackageid"    column="f_packageid"    />
+        <result property="fCntrid"    column="f_cntrid"    />
+        <result property="fCntrweight"    column="f_cntrweight"    />
+        <result property="goodsName"    column="goods_name"    />
+        <result property="packageName"    column="package_name"    />
+        <result property="cntrName"    column="cntr_name"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectTTemporaryFileVo">
+        select f_id, f_cntrno, f_sealno, f_goodsid, f_packageid, f_cntrid, f_cntrweight, goods_name, package_name, cntr_name, file_name, create_by, create_time, update_by, update_time, remark from t_temporary_file
+    </sql>
+
+    <select id="selectTTemporaryFileList" parameterType="TTemporaryFile" resultMap="TTemporaryFileResult">
+        <include refid="selectTTemporaryFileVo"/>
+        <where>  
+            <if test="fCntrno != null  and fCntrno != ''"> and f_cntrno = #{fCntrno}</if>
+            <if test="fSealno != null  and fSealno != ''"> and f_sealno = #{fSealno}</if>
+            <if test="fGoodsid != null "> and f_goodsid = #{fGoodsid}</if>
+            <if test="fPackageid != null  and fPackageid != ''"> and f_packageid = #{fPackageid}</if>
+            <if test="fCntrid != null "> and f_cntrid = #{fCntrid}</if>
+            <if test="fCntrweight != null "> and f_cntrweight = #{fCntrweight}</if>
+            <if test="goodsName != null  and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
+            <if test="packageName != null  and packageName != ''"> and package_name like concat('%', #{packageName}, '%')</if>
+            <if test="cntrName != null  and cntrName != ''"> and cntr_name like concat('%', #{cntrName}, '%')</if>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectTTemporaryFileById" parameterType="Long" resultMap="TTemporaryFileResult">
+        <include refid="selectTTemporaryFileVo"/>
+        where f_id = #{fId}
+    </select>
+        
+    <insert id="insertTTemporaryFile" parameterType="TTemporaryFile" useGeneratedKeys="true" keyProperty="fId">
+        insert into t_temporary_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fCntrno != null">f_cntrno,</if>
+            <if test="fSealno != null">f_sealno,</if>
+            <if test="fGoodsid != null">f_goodsid,</if>
+            <if test="fPackageid != null">f_packageid,</if>
+            <if test="fCntrid != null">f_cntrid,</if>
+            <if test="fCntrweight != null">f_cntrweight,</if>
+            <if test="goodsName != null">goods_name,</if>
+            <if test="packageName != null">package_name,</if>
+            <if test="cntrName != null">cntr_name,</if>
+            <if test="fileName != null">file_name,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fCntrno != null">#{fCntrno},</if>
+            <if test="fSealno != null">#{fSealno},</if>
+            <if test="fGoodsid != null">#{fGoodsid},</if>
+            <if test="fPackageid != null">#{fPackageid},</if>
+            <if test="fCntrid != null">#{fCntrid},</if>
+            <if test="fCntrweight != null">#{fCntrweight},</if>
+            <if test="goodsName != null">#{goodsName},</if>
+            <if test="packageName != null">#{packageName},</if>
+            <if test="cntrName != null">#{cntrName},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTTemporaryFile" parameterType="TTemporaryFile">
+        update t_temporary_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
+            <if test="fSealno != null">f_sealno = #{fSealno},</if>
+            <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
+            <if test="fPackageid != null">f_packageid = #{fPackageid},</if>
+            <if test="fCntrid != null">f_cntrid = #{fCntrid},</if>
+            <if test="fCntrweight != null">f_cntrweight = #{fCntrweight},</if>
+            <if test="goodsName != null">goods_name = #{goodsName},</if>
+            <if test="packageName != null">package_name = #{packageName},</if>
+            <if test="cntrName != null">cntr_name = #{cntrName},</if>
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTTemporaryFileById" parameterType="Long">
+        delete from t_temporary_file where f_id = #{fId}
+    </delete>
+    <delete id="deleteTTemporaryFilefileName" parameterType="string">
+        delete from t_temporary_file where file_name = #{fileName} and create_by = #{createBy}
+    </delete>
+
+    <delete id="deleteTTemporaryFileByIds" parameterType="String">
+        delete from t_temporary_file where f_id in 
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+    <select id="selectTTemporaryFileMessage" parameterType="TTemporaryFile" resultType="com.ruoyi.shipping.domain.TTemporaryFile">
+        SELECT
+        tf.f_id AS fId,
+        tf.f_cntrno AS fCntrno,
+        tf.f_sealno AS fSealno,
+        IFNULL(tg.f_id,0) AS fGoodsid,
+        sd.dict_value AS fPackageid,
+        tc.f_id AS fCntrid,
+        tf.f_cntrweight AS fCntrweight,
+        tf.goods_name AS goodsName,
+        tf.package_name AS packageName,
+        tf.cntr_name AS cntrName,
+        tf.file_name AS fileName,
+        tf.create_by AS createBy,
+        tf.create_time AS createTime,
+        tf.update_by AS updateBy,
+        tf.update_time AS updateTime,
+        tf.remark AS remark
+        FROM
+        t_temporary_file tf
+        LEFT JOIN t_goods tg ON tf.goods_name = tg.f_name
+        LEFT JOIN sys_dict_data sd ON sd.dict_label = tf.package_name
+        AND sd.dict_type = 'f_packageid'
+        LEFT JOIN t_cntr tc ON tc.f_no = tf.cntr_name
+        <where>
+            <if test="fCntrno != null  and fCntrno != ''"> and tf.f_cntrno = #{fCntrno}</if>
+            <if test="fSealno != null  and fSealno != ''"> and tf.f_sealno = #{fSealno}</if>
+            <if test="fGoodsid != null "> and tf.f_goodsid = #{fGoodsid}</if>
+            <if test="fPackageid != null  and fPackageid != ''"> and tf.f_packageid = #{fPackageid}</if>
+            <if test="fCntrid != null "> and tf.f_cntrid = #{fCntrid}</if>
+            <if test="fCntrweight != null "> and tf.f_cntrweight = #{fCntrweight}</if>
+            <if test="goodsName != null  and goodsName != ''"> and tf.goods_name like concat('%', #{goodsName}, '%')</if>
+            <if test="packageName != null  and packageName != ''"> and tf.package_name like concat('%', #{packageName}, '%')</if>
+            <if test="cntrName != null  and cntrName != ''"> and tf.cntr_name like concat('%', #{cntrName}, '%')</if>
+            <if test="fileName != null  and fileName != ''"> and tf.file_name = #{fileName}</if>
+            <if test="createBy != null  and createBy != ''">and tf.create_by = #{createBy}</if>
+        </where>
+        ORDER BY tf.f_cntrno
+    </select>
+    
+</mapper>

+ 81 - 0
ruoyi-shipping/src/main/resources/mapper/shipping/TVoyageMapper.xml

@@ -113,6 +113,87 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
         </where>
     </select>
+    <select id="selectTVoyageListNew" parameterType="TVoyage" resultMap="TVoyageResult">
+        SELECT
+        tv.f_id,
+        tv.f_pid,
+        te.f_name pidName,
+        tv.f_no,
+        tv.f_portofloadid,
+        ta.f_name portofloadidName,
+        tv.f_portofdischargeid,
+        td.f_name portofdischargeidName,
+        tv.f_distinationid,
+        tr.f_name distinationidName,
+        tv.f_portoftransshipment,
+        ts.f_name portoftransshipmentName,
+        tv.f_ETD,
+        tv.f_ATD,
+        tv.f_ETA,
+        tv.f_ATA,
+        tv.f_days,
+        tv.f_ducomentrayoffdate,
+        tv.f_cutoffdate,
+        tv.f_teu,
+        tv.f_manageid,
+        su.user_name manageidName,
+        tv.f_tel,
+        CASE
+
+        WHEN tv.f_status = 'T' THEN
+        '正常' ELSE '停用'
+        END AS f_status,
+        TIMESTAMPDIFF(DAY,tv.f_ETD,DATE_FORMAT(tv.f_ducomentrayoffdate, '%Y-%m-%d %H:%i:%S')) closing,
+        tv.create_by,
+        tv.create_time,
+        tv.update_by,
+        tv.update_time,
+        tv.remark
+        FROM
+        t_voyage tv
+        LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
+        LEFT JOIN t_address ta ON tv.f_portofloadid = ta.f_id
+        LEFT JOIN t_address td ON tv.f_portofdischargeid = td.f_id
+        LEFT JOIN t_address tr ON tv.f_distinationid = tr.f_id
+        LEFT JOIN t_address ts ON tv.f_portoftransshipment = ts.f_id
+        LEFT JOIN sys_user  su ON tv.f_manageid = su.user_id
+        <where>
+            tv.f_status = 'T'
+            AND date(tv.f_ATD) >= DATE_SUB(CURDATE(), INTERVAL 2 DAY)
+            OR tv.f_ATD IS NULL
+            <if test="fPid != null "> and tv.f_pid = #{fPid}</if>
+            <if test="fNo != null  and fNo != ''"> and tv.f_no = #{fNo}</if>
+            <if test="fPortofloadid != null "> and tv.f_portofloadid = #{fPortofloadid}</if>
+            <if test="fPortofdischargeid != null "> and tv.f_portofdischargeid = #{fPortofdischargeid}</if>
+            <if test="fDistinationid != null "> and tv.f_distinationid = #{fDistinationid}</if>
+            <if test="fPortoftransshipment != null "> and tv.f_portoftransshipment = #{fPortoftransshipment}</if>
+            <if test="fPortoftransshipment == null and empty != null"> and tv.f_portoftransshipment IS NULL</if>
+            <if test="fEtd != null "> and tv.f_ETD = #{fEtd}</if>
+            <if test="fAtd != null "> and tv.f_ATD = #{fAtd}</if>
+            <if test="fEta != null "> and tv.f_ETA = #{fEta}</if>
+            <if test="fAta != null "> and tv.f_ATA = #{fAta}</if>
+            <if test="fDays != null "> and tv.f_days = #{fDays}</if>
+            <if test="fDucomentrayoffdate != null "> and tv.f_ducomentrayoffdate = #{fDucomentrayoffdate}</if>
+            <if test="fCutoffdate != null "> and tv.f_cutoffdate = #{fCutoffdate}</if>
+            <if test="fTeu != null  and fTeu != ''"> and tv.f_teu = #{fTeu}</if>
+            <if test="fManageid != null "> and tv.f_manageid = #{fManageid}</if>
+            <if test="fTel != null  and fTel != ''"> and tv.f_tel = #{fTel}</if>
+            <if test="fStatus != null  and fStatus != ''"> and tv.f_status = #{fStatus}</if>
+            <if test="createBy != null  and createBy != ''">and tv.create_by like concat('%', #{createBy}, '%')</if>
+            <if test="remark != null  and remark != ''">and tv.remark like concat('%', #{remark}, '%')</if>
+            <if test="pidName != null  and pidName != ''"> and te.f_name = #{pidName}</if>
+            <if test="portofloadidName != null  and portofloadidName != ''"> and ta.f_name = #{portofloadidName}</if>
+            <if test="portofdischargeidName != null  and portofdischargeidName != ''"> and td.f_name = #{portofdischargeidName}</if>
+            <if test="distinationidName != null  and distinationidName != ''"> and tr.f_name = #{distinationidName}</if>
+            <if test="portoftransshipmentName != null  and portoftransshipmentName != ''"> and ts.f_name = #{portoftransshipmentName}</if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and tv.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and tv.create_time &lt;= #{cLoadDate[1]}
+            </if>
+        </where>
+    </select>
 
     <select id="selectTVoyageById" parameterType="Long" resultMap="TVoyageResult">
         SELECT

+ 6 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -425,6 +425,12 @@ public interface ITWarehouseBillsService {
      * @return  结果
      */
     public AjaxResult importCreateCompanyMsg(MultipartFile file) throws Exception;
+    /**
+     *  导入Excel生成箱信息
+     * @param file  excel
+     * @return  结果
+     */
+    public AjaxResult importCreateCompanyMsgNew(MultipartFile file,LoginUser loginUser) throws Exception;
 
     /**
      * 提交仓库主表审批

+ 116 - 9
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -26,15 +26,9 @@ import com.ruoyi.quotation.mapper.TSeapriceMapper;
 import com.ruoyi.reportManagement.domain.TWareHouseItemsExcel;
 import com.ruoyi.reportManagement.domain.TWhgenleg;
 import com.ruoyi.reportManagement.mapper.TWhgenlegMapper;
-import com.ruoyi.shipping.domain.TCntr;
-import com.ruoyi.shipping.domain.TVoyage;
-import com.ruoyi.shipping.domain.TWarehousebillsCntr;
-import com.ruoyi.shipping.domain.TWarehousebillsCntritems;
+import com.ruoyi.shipping.domain.*;
 import com.ruoyi.shipping.excel.TWarehousebillsCntritemsExcel;
-import com.ruoyi.shipping.mapper.TCntrMapper;
-import com.ruoyi.shipping.mapper.TVoyageMapper;
-import com.ruoyi.shipping.mapper.TWarehousebillsCntrMapper;
-import com.ruoyi.shipping.mapper.TWarehousebillsCntritemsMapper;
+import com.ruoyi.shipping.mapper.*;
 import com.ruoyi.system.domain.SysCheckCode;
 import com.ruoyi.system.domain.SysConfig;
 import com.ruoyi.system.mapper.*;
@@ -48,6 +42,7 @@ import org.apache.poi.ss.util.CellReference;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.omg.CORBA.OBJ_ADAPTER;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -157,6 +152,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 
     @Autowired
     private TWarehousebillsCntritemsMapper tWarehousebillsCntritemsMapper;
+    @Autowired
+    private TTemporaryFileMapper tTemporaryFileMapper;
     private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
 
 
@@ -1724,7 +1721,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     @Override
     public AjaxResult importCreateCompanyMsg(MultipartFile file) throws Exception {
         List<TWarehousebillsCntritemsExcel> fleetCompanyMsgs = new ArrayList<>();
-
         InputStream inputStream = null;
          try {
         inputStream = file.getInputStream();
@@ -1818,6 +1814,117 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 
     }
 
+    @Override
+    @Transactional
+    public AjaxResult importCreateCompanyMsgNew(MultipartFile file,LoginUser loginUser) throws Exception {
+        List<TTemporaryFile> fleetCompanyMsgs = new ArrayList<>();
+
+        InputStream inputStream = null;
+        Map<String,Object> map = new HashMap<>();
+        try {
+            inputStream = file.getInputStream();
+            String originalFilename = file.getOriginalFilename();
+            Workbook workbook = null;
+            if (originalFilename.endsWith("xls")){
+                workbook = WorkbookFactory.create(inputStream);
+            }else if (originalFilename.endsWith("xlsx")){
+                workbook = new XSSFWorkbook(inputStream);
+            }
+            Sheet sheet = workbook.getSheetAt(0);
+            int line = 0;
+            for (Row rows : sheet) {
+                line++;
+                if (rows.getRowNum() == 0) {
+                    continue;
+                }
+                TTemporaryFile companyMsg = new TTemporaryFile();
+                companyMsg.setFileName(originalFilename);
+                companyMsg.setCreateBy(loginUser.getUser().getUserName());
+                companyMsg.setCreateTime(new Date());
+                for (int a = 0; a < rows.getPhysicalNumberOfCells(); a++) {
+                    Cell cell = rows.getCell(a);
+                    String value = filter(sheet.getRow(0), CellReference.convertNumToColString(cell.getColumnIndex()));
+                    switch (value) {
+                        case "箱号":
+                            //设置单元格类型
+                            cell.setCellType(CellType.STRING);
+                            if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                                return AjaxResult.success("Excel箱信息数据第" + line + "行数据缺少箱号",500);
+                            }
+                            companyMsg.setfCntrno(cell.getStringCellValue());
+                            break;
+                        case "铅封号":
+                            //设置单元格类型
+                            cell.setCellType(CellType.STRING);
+                            if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                                return AjaxResult.success("Excel箱信息数据第" + line + "行数据缺少封号",500);
+                            }
+                            companyMsg.setfSealno(cell.getStringCellValue());
+                            break;
+                        case "单箱重(不得超过40)":
+                            //设置单元格类型
+                            cell.setCellType(CellType.STRING);
+                            if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                                return AjaxResult.success("Excel箱信息数据第" + line + "行数据缺少单箱重",500);
+                            }
+                            companyMsg.setfCntrweight(new BigDecimal(cell.getStringCellValue()));
+                            break;
+                        case "货名":
+                            //设置单元格类型
+                            cell.setCellType(CellType.STRING);
+                            if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                                return AjaxResult.success("Excel箱信息数据第" + line + "行数据缺少货名",500);
+                            }
+                            companyMsg.setGoodsName(cell.getStringCellValue());
+                            /*TGoods tGoods = tGoodsMapper.checkUFNnameUnique(companyMsg.getGoodsName());
+                            if (tGoods != null && tGoods.getfId() != null) {
+                                companyMsg.setfGoodsid(tGoods.getfId());
+                            }*/
+                            break;
+                        case "包装类型":
+                            //设置单元格类型
+                            cell.setCellType(CellType.STRING);
+                            if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                                return AjaxResult.success("Excel箱信息数据第" + line + "行数据缺少包装类型",500);
+                            }
+                            companyMsg.setPackageName(cell.getStringCellValue());
+                            /*String fPackageid = sysDictDataMapper.selectDictValue("f_packageid", companyMsg.getPackageName());
+                            if (StringUtils.isNotEmpty(fPackageid)) {
+                                companyMsg.setfPackageid(fPackageid);
+                            }*/
+                            break;
+                        case "箱型":
+                            //设置单元格类型
+                            cell.setCellType(CellType.STRING);
+                            if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                                return AjaxResult.success("Excel箱信息数据第" + line + "行数据缺少箱型",500);
+                            }
+                            companyMsg.setCntrName(cell.getStringCellValue());
+                            /*Long fId = tCntrMapper.selectRcntrFId(companyMsg.getCntrName());
+                            if (fId != null) {
+                                companyMsg.setfCntrid(fId);
+                            }*/
+                            break;
+                    }
+                }
+                tTemporaryFileMapper.insertTTemporaryFile(companyMsg);
+                fleetCompanyMsgs.add(companyMsg);
+            }
+            map.put("total",fleetCompanyMsgs.size());
+            map.put("fileName",originalFilename);
+        } catch (IOException e) {
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return AjaxResult.error("上传文件失败,请检查文件是否损坏");
+        }
+        return AjaxResult.success("success", map);
+    }
+
     /**
      * 提交仓库主表审批
      * @param tWarehouseBills       主表信息