gongdecai 3 лет назад
Родитель
Сommit
9b93b80d91
20 измененных файлов с 1467 добавлено и 26 удалено
  1. 7 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ExpressBillService.java
  2. 22 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ExpressBillServiceImpl.java
  3. 12 2
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ForeignExchangeService.java
  4. 13 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ForeignExchangeServiceImpl.java
  5. 13 1
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/MaritimeAdministrationService.java
  6. 132 19
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/MaritimeAdministrationServiceImpl.java
  7. 10 1
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ProductSalesService.java
  8. 10 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ProductSalesServiceImpl.java
  9. 36 1
      unimall-core/pom.xml
  10. 103 0
      unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelClassField.java
  11. 24 0
      unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelExport.java
  12. 26 0
      unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelImport.java
  13. 968 0
      unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelUtils.java
  14. 5 0
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/MaritimeAdministrationDO.java
  15. 20 1
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/MaritimeDetailDO.java
  16. 13 0
      unimall-data/src/main/java/com/iotechn/unimall/data/dto/ExpressBillDTO.java
  17. 10 0
      unimall-data/src/main/java/com/iotechn/unimall/data/dto/ForeignExchangeDTO.java
  18. 4 0
      unimall-data/src/main/java/com/iotechn/unimall/data/dto/MaritimeAdministrationDTO.java
  19. 13 1
      unimall-data/src/main/java/com/iotechn/unimall/data/dto/MaritimeDetailDTO.java
  20. 26 0
      unimall-data/src/main/java/com/iotechn/unimall/data/dto/ProductSalesDTO.java

+ 7 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ExpressBillService.java

@@ -7,10 +7,12 @@ import com.iotechn.unimall.core.annotation.HttpParamType;
 import com.iotechn.unimall.core.annotation.param.NotNull;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.dto.ExpressBusinessDTO;
+import com.iotechn.unimall.data.dto.SettlementManagementDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.iotechn.unimall.data.domain.ExpressBillDO;
 import com.iotechn.unimall.data.dto.ExpressBillDTO;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -47,6 +49,11 @@ public interface ExpressBillService {
     public void createAll(
             @HttpParam(name = "ExpressBillDTO", type = HttpParamType.COMMON, description = "ExpressBillDTO") List<ExpressBillDTO> expressBillDTOS) throws ServiceException;
 
+    @HttpMethod(description = "导出", permission = "expressBill:expressbill:export", permissionParentName = "其他", permissionName = "ExpressBill")
+    public String export(
+            @HttpParam(name = "ExpressBillDTO", type = HttpParamType.COMMON, description = "ExpressBillDTO") ExpressBillDTO expressBillDTO,
+            @HttpParam(name = "HttpServletResponse", type = HttpParamType.COMMON, description = "response") HttpServletResponse response) throws Exception;
+
 
 
 }

+ 22 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ExpressBillServiceImpl.java

@@ -8,19 +8,23 @@ import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.domain.ExpressBusinessDO;
 import com.iotechn.unimall.data.dto.ExpressBusinessDTO;
+import com.iotechn.unimall.data.dto.SettlementManagementDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.iotechn.unimall.data.domain.ExpressBillDO;
 import com.iotechn.unimall.data.dto.ExpressBillDTO;
 import com.iotechn.unimall.data.mapper.ExpressBillMapper;
+import com.iotechn.unimall.data.util.ExcelUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.BeanUtils;
 import org.springframework.util.CollectionUtils;
+import tk.mybatis.mapper.util.StringUtil;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.Date;
 import java.util.List;
 
@@ -41,6 +45,12 @@ public class ExpressBillServiceImpl implements ExpressBillService {
     @Override
     public Page<ExpressBillDO> list(ExpressBillDTO selectDTO, Integer page, Integer limit, Long adminId) throws ServiceException {
         Wrapper<ExpressBillDO> wrapper = new EntityWrapper<ExpressBillDO>();
+        if(StringUtil.isNotEmpty(selectDTO.getCustomer())){
+            wrapper.eq("customer",selectDTO.getCustomer());
+        }
+        if(StringUtil.isNotEmpty(selectDTO.getCourierAervices())){
+            wrapper.eq("courier_aervices",selectDTO.getCourierAervices());
+        }
         List<ExpressBillDO> list = expressBillMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
         Integer count = expressBillMapper.selectCount(wrapper);
         return new Page<ExpressBillDO>(list, page, limit, count);
@@ -94,4 +104,16 @@ public class ExpressBillServiceImpl implements ExpressBillService {
     }
 
 
+
+    @Override
+    public String export(ExpressBillDTO expressBillDTO, HttpServletResponse response) throws Exception {
+
+        ExcelUtil<ExpressBillDTO> util = new ExcelUtil<ExpressBillDTO>(ExpressBillDTO.class);
+        return util.exportExcel(expressBillDTO.getExpressBillDTOS(), "快递业务");
+
+    }
+
+
+
+
 }

+ 12 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ForeignExchangeService.java

@@ -7,10 +7,12 @@ import com.iotechn.unimall.core.annotation.HttpParamType;
 import com.iotechn.unimall.core.annotation.param.NotNull;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.dto.ExpressBillDTO;
+import com.iotechn.unimall.data.dto.ProductSalesDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.iotechn.unimall.data.domain.ForeignExchangeDO;
 import com.iotechn.unimall.data.dto.ForeignExchangeDTO;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -42,10 +44,18 @@ public interface ForeignExchangeService {
             @HttpParam(name = "ForeignExchangeDTO", type = HttpParamType.COMMON, description = "ForeignExchangeDTO") ForeignExchangeDTO editDTO,
             @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;
 
-
-    @HttpMethod(description = "添加", permission = "foreignExchange:foreignexchange:createAll", permissionParentName = "其他", permissionName = "ForeignExchange")
+    @HttpMethod(description = "添加", permission = "foreignExchange:foreignExchange:createAll", permissionParentName = "其他", permissionName = "ForeignExchange")
     public void createAll(
             @HttpParam(name = "ForeignExchangeDTO", type = HttpParamType.COMMON, description = "ForeignExchangeDTO") List<ForeignExchangeDTO> foreignExchangeDTOS) throws ServiceException;
 
 
+
+
+    @HttpMethod(description = "导出", permission = "foreignExchange:foreignExchange:export", permissionParentName = "其他", permissionName = "ForeignExchange")
+    public String export(
+            @HttpParam(name = "ForeignExchangeDTO", type = HttpParamType.COMMON, description = "ForeignExchangeDTO") ForeignExchangeDTO foreignExchangeDTO,
+            @HttpParam(name = "HttpServletResponse", type = HttpParamType.COMMON, description = "response") HttpServletResponse response) throws Exception;
+
+
+
 }

+ 13 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ForeignExchangeServiceImpl.java

@@ -7,6 +7,7 @@ import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.domain.ExpressBusinessDO;
+import com.iotechn.unimall.data.dto.ExpressBillDTO;
 import com.iotechn.unimall.data.dto.ExpressBusinessDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.iotechn.unimall.data.domain.ForeignExchangeDO;
 import com.iotechn.unimall.data.dto.ForeignExchangeDTO;
 import com.iotechn.unimall.data.mapper.ForeignExchangeMapper;
+import com.iotechn.unimall.data.util.ExcelUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -21,6 +23,7 @@ import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.BeanUtils;
 import org.springframework.util.CollectionUtils;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.Date;
 import java.util.List;
 
@@ -92,4 +95,14 @@ public class ForeignExchangeServiceImpl implements ForeignExchangeService {
     }
 
 
+    @Override
+    public String export(ForeignExchangeDTO foreignExchangeDTO, HttpServletResponse response) throws Exception {
+
+        ExcelUtil<ForeignExchangeDTO> util = new ExcelUtil<ForeignExchangeDTO>(ForeignExchangeDTO.class);
+        return util.exportExcel(foreignExchangeDTO.getForeignExchangeDTOS(), "外汇信息");
+
+    }
+
+
+
 }

+ 13 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/MaritimeAdministrationService.java

@@ -6,10 +6,13 @@ import com.iotechn.unimall.core.annotation.HttpParam;
 import com.iotechn.unimall.core.annotation.HttpParamType;
 import com.iotechn.unimall.core.annotation.param.NotNull;
 import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.dto.ForeignExchangeDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.iotechn.unimall.data.domain.MaritimeAdministrationDO;
 import com.iotechn.unimall.data.dto.MaritimeAdministrationDTO;
 
+import javax.servlet.http.HttpServletResponse;
+
 /**
  * Generate Code By Unimall
  */
@@ -39,4 +42,13 @@ public interface MaritimeAdministrationService {
             @HttpParam(name = "MaritimeAdministrationDTO", type = HttpParamType.COMMON, description = "MaritimeAdministrationDTO") MaritimeAdministrationDTO editDTO,
             @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;
 
-    }
+
+
+
+    @HttpMethod(description = "导出", permission = "maritimeAdministration:maritimeAdministration:export", permissionParentName = "其他", permissionName = "MaritimeAdministration")
+    public void export(
+            @HttpParam(name = "MaritimeAdministrationDTO", type = HttpParamType.COMMON, description = "MaritimeAdministrationDTO") MaritimeAdministrationDTO foreignExchangeDTO,
+            @HttpParam(name = "HttpServletResponse", type = HttpParamType.COMMON, description = "response") HttpServletResponse response) throws Exception;
+
+
+}

+ 132 - 19
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/MaritimeAdministrationServiceImpl.java

@@ -1,9 +1,14 @@
 package com.iotechn.unimall.admin.api.sys;
 
 
+import cn.hutool.poi.excel.ExcelUtil;
 import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.core.util.ExcelUtils;
+import com.iotechn.unimall.data.domain.MaritimeDetailDO;
+import com.iotechn.unimall.data.dto.MaritimeDetailDTO;
+import com.iotechn.unimall.data.mapper.MaritimeDetailMapper;
 import com.iotechn.unimall.data.model.Page;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
@@ -15,6 +20,11 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.BeanUtils;
+import org.springframework.util.CollectionUtils;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -27,8 +37,11 @@ public class MaritimeAdministrationServiceImpl implements MaritimeAdministration
     @Autowired
     private MaritimeAdministrationMapper maritimeAdministrationMapper;
 
+    @Autowired
+    private MaritimeDetailMapper maritimeDetailMapper;
+
     @Override
-    public boolean delete(Long id,  Long adminId) throws ServiceException {
+    public boolean delete(Long id, Long adminId) throws ServiceException {
         return maritimeAdministrationMapper.deleteById(id) > 0;
     }
 
@@ -36,6 +49,13 @@ public class MaritimeAdministrationServiceImpl implements MaritimeAdministration
     public Page<MaritimeAdministrationDO> list(MaritimeAdministrationDTO selectDTO, Integer page, Integer limit, Long adminId) throws ServiceException {
         Wrapper<MaritimeAdministrationDO> wrapper = new EntityWrapper<MaritimeAdministrationDO>();
         List<MaritimeAdministrationDO> list = maritimeAdministrationMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        if (!CollectionUtils.isEmpty(list)) {
+            list.forEach(maritimeAdministrationDO -> {
+                List<MaritimeDetailDO> maritimeDetailDOS = maritimeDetailMapper.selectList(new EntityWrapper<MaritimeDetailDO>()
+                        .eq("info_id", maritimeAdministrationDO.getId()));
+                maritimeAdministrationDO.setMaritimeDetailDOS(maritimeDetailDOS);
+            });
+        }
         Integer count = maritimeAdministrationMapper.selectCount(wrapper);
         return new Page<MaritimeAdministrationDO>(list, page, limit, count);
     }
@@ -43,28 +63,121 @@ public class MaritimeAdministrationServiceImpl implements MaritimeAdministration
     @Override
     @Transactional(rollbackFor = Exception.class)
     public MaritimeAdministrationDO create(MaritimeAdministrationDTO insertDTO, Long adminId) throws ServiceException {
-         Date now = new Date();
-         MaritimeAdministrationDO insertDO = new MaritimeAdministrationDO();
-         BeanUtils.copyProperties(insertDTO, insertDO);
-         insertDO.setGmtUpdate(now);
-         insertDO.setGmtCreate(now);
-         if (maritimeAdministrationMapper.insert(insertDO) > 0) {
-             return insertDO;
-         }
-         throw new AdminServiceException(ExceptionDefinition.ADMIN_UNKNOWN_EXCEPTION);
+        Date now = new Date();
+        MaritimeAdministrationDO insertDO = new MaritimeAdministrationDO();
+        BeanUtils.copyProperties(insertDTO, insertDO);
+        insertDO.setGmtUpdate(now);
+        insertDO.setGmtCreate(now);
+        if (maritimeAdministrationMapper.insert(insertDO) > 0) {
+            // 新增详情
+            List<MaritimeDetailDTO> maritimeDetailDTOS = insertDTO.getMaritimeDetailDTOS();
+            if (!CollectionUtils.isEmpty(maritimeDetailDTOS)) {
+                for (MaritimeDetailDTO maritimeDetailDTO : maritimeDetailDTOS) {
+                    maritimeDetailDTO.setInfoId(insertDO.getId());
+                    MaritimeDetailDO maritimeDetailDO = new MaritimeDetailDO();
+                    BeanUtils.copyProperties(maritimeDetailDTO, maritimeDetailDO);
+                    maritimeDetailMapper.insert(maritimeDetailDO);
+                }
+            }
+            return insertDO;
+        }
+        throw new AdminServiceException(ExceptionDefinition.ADMIN_UNKNOWN_EXCEPTION);
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public String edit(MaritimeAdministrationDTO editDTO,Long adminId) throws ServiceException {
-         Date now = new Date();
-         MaritimeAdministrationDO updateDO = new MaritimeAdministrationDO();
-         BeanUtils.copyProperties(editDTO, updateDO);
-         updateDO.setGmtUpdate(now);
-         if (maritimeAdministrationMapper.updateById(updateDO) > 0) {
-             return "ok";
-         }
-         throw new AdminServiceException(ExceptionDefinition.ADMIN_UNKNOWN_EXCEPTION);
+    public String edit(MaritimeAdministrationDTO editDTO, Long adminId) throws ServiceException {
+        Date now = new Date();
+        MaritimeAdministrationDO updateDO = new MaritimeAdministrationDO();
+        BeanUtils.copyProperties(editDTO, updateDO);
+        updateDO.setGmtUpdate(now);
+        if (maritimeAdministrationMapper.updateById(updateDO) > 0) {
+            maritimeDetailMapper.delete(new EntityWrapper<MaritimeDetailDO>()
+                    .eq("info_id", updateDO.getId()));
+            List<MaritimeDetailDTO> maritimeDetailDTOS = editDTO.getMaritimeDetailDTOS();
+            if (!CollectionUtils.isEmpty(maritimeDetailDTOS)) {
+                for (MaritimeDetailDTO maritimeDetailDTO : maritimeDetailDTOS) {
+                    maritimeDetailDTO.setInfoId(updateDO.getId());
+                    MaritimeDetailDO maritimeDetailDO = new MaritimeDetailDO();
+                    BeanUtils.copyProperties(maritimeDetailDTO, maritimeDetailDO);
+                    maritimeDetailMapper.insert(maritimeDetailDO);
+                }
+            }
+            return "ok";
+        }
+        throw new AdminServiceException(ExceptionDefinition.ADMIN_UNKNOWN_EXCEPTION);
+    }
+
+    @Override
+    public void export(MaritimeAdministrationDTO maritimeAdministrationDTO, HttpServletResponse response) {
+        // 表头处理
+        List<Object> head = Arrays.asList("客户编号", "快递公司", "已收到单号", "内件明细", "实重", "长", "宽", "高", "体积重", "包裹数", "人民币", "欧元");
+        // 汇总集合
+        List<List<Object>> sheetDateList = new ArrayList<>();
+        sheetDateList.add(head);
+        //  导出信息处理
+        Wrapper<MaritimeAdministrationDO> wrapper = new EntityWrapper<MaritimeAdministrationDO>();
+        List<MaritimeAdministrationDO> list = maritimeAdministrationMapper.selectList(wrapper);
+        if (!CollectionUtils.isEmpty(list)) {
+            list.forEach(maritimeAdministrationDO -> {
+                List<MaritimeDetailDO> maritimeDetailDOS = maritimeDetailMapper.selectList(new EntityWrapper<MaritimeDetailDO>()
+                        .eq("info_id", maritimeAdministrationDO.getId()));
+                if (!CollectionUtils.isEmpty(maritimeDetailDOS)) {
+//                        maritimeDetailDO.setContainerNo(maritimeAdministrationDO.getContainerNo());
+//                        maritimeDetailDO.setCustomerNo(maritimeAdministrationDO.getCustomerNo());
+//                        maritimeDetailDO.setCount(maritimeAdministrationDO.getCount());
+//                        maritimeDetailDO.setRmb(maritimeAdministrationDO.getRmb());
+//                        maritimeDetailDO.setEuro(maritimeAdministrationDO.getEuro());
+                    for (int i = 0; i < maritimeDetailDOS.size(); i++) {
+                        MaritimeDetailDO maritimeDetailDO = new MaritimeDetailDO();
+                        if (i == 0) {
+                            List<Object> objects = new ArrayList<>();
+                            objects.add(maritimeAdministrationDO.getContainerNo());
+                            objects.add(maritimeAdministrationDO.getCustomerNo());
+
+                            objects.add(maritimeDetailDO.getCourierServicesCompany());
+                            objects.add(maritimeDetailDO.getReceivedNo());
+                            objects.add(maritimeDetailDO.getInternalDetails());
+                            objects.add(maritimeDetailDO.getWeight());
+                            objects.add(maritimeDetailDO.getLong1());
+                            objects.add(maritimeDetailDO.getWide());
+                            objects.add(maritimeDetailDO.getHeight());
+                            objects.add(maritimeDetailDO.getBulkWeight());
+
+                            objects.add(maritimeAdministrationDO.getCount());
+                            objects.add(maritimeAdministrationDO.getRmb());
+                            objects.add(maritimeAdministrationDO.getEuro());
+
+                            sheetDateList.add(objects);
+                        } else {
+                            List<Object> objects = new ArrayList<>();
+                            objects.add(ExcelUtils.ROW_MERGE);
+                            objects.add(ExcelUtils.ROW_MERGE);
+
+                            objects.add(maritimeDetailDO.getCourierServicesCompany());
+                            objects.add(maritimeDetailDO.getReceivedNo());
+                            objects.add(maritimeDetailDO.getInternalDetails());
+                            objects.add(maritimeDetailDO.getWeight());
+                            objects.add(maritimeDetailDO.getLong1());
+                            objects.add(maritimeDetailDO.getWide());
+                            objects.add(maritimeDetailDO.getHeight());
+                            objects.add(maritimeDetailDO.getBulkWeight());
+
+                            objects.add(ExcelUtils.ROW_MERGE);
+                            objects.add(ExcelUtils.ROW_MERGE);
+                            objects.add(ExcelUtils.ROW_MERGE);
+
+                            sheetDateList.add(objects);
+                        }
+                    }
+
+
+                }
+            });
+        }
+
+        ExcelUtils.export(response,"海运清单",sheetDateList);
+
     }
 
 }

+ 10 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ProductSalesService.java

@@ -6,11 +6,13 @@ import com.iotechn.unimall.core.annotation.HttpParam;
 import com.iotechn.unimall.core.annotation.HttpParamType;
 import com.iotechn.unimall.core.annotation.param.NotNull;
 import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.dto.ExpressBillDTO;
 import com.iotechn.unimall.data.dto.ForeignExchangeDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.iotechn.unimall.data.domain.ProductSalesDO;
 import com.iotechn.unimall.data.dto.ProductSalesDTO;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -42,9 +44,16 @@ public interface ProductSalesService {
             @HttpParam(name = "ProductSalesDTO", type = HttpParamType.COMMON, description = "ProductSalesDTO") ProductSalesDTO editDTO,
             @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;
 
-    @HttpMethod(description = "添加", permission = "productSales:productsales:createAll", permissionParentName = "其他", permissionName = "ProductSalesDTO")
+    @HttpMethod(description = "添加", permission = "productSales:productsales:createAll", permissionParentName = "其他", permissionName = "ProductSales")
     public void createAll(
             @HttpParam(name = "ProductSalesDTO", type = HttpParamType.COMMON, description = "ProductSalesDTO") List<ProductSalesDTO> productSalesDTOS) throws ServiceException;
 
 
+    @HttpMethod(description = "导出", permission = "productSales:productsales:export", permissionParentName = "其他", permissionName = "ProductSales")
+    public String export(
+            @HttpParam(name = "ProductSalesDTO", type = HttpParamType.COMMON, description = "ProductSalesDTO") ProductSalesDTO productSalesDTO,
+            @HttpParam(name = "HttpServletResponse", type = HttpParamType.COMMON, description = "response") HttpServletResponse response) throws Exception;
+
+
+
 }

+ 10 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/sys/ProductSalesServiceImpl.java

@@ -7,6 +7,7 @@ import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.domain.ForeignExchangeDO;
+import com.iotechn.unimall.data.dto.ExpressBillDTO;
 import com.iotechn.unimall.data.dto.ForeignExchangeDTO;
 import com.iotechn.unimall.data.model.Page;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.iotechn.unimall.data.domain.ProductSalesDO;
 import com.iotechn.unimall.data.dto.ProductSalesDTO;
 import com.iotechn.unimall.data.mapper.ProductSalesMapper;
+import com.iotechn.unimall.data.util.ExcelUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -21,6 +23,7 @@ import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.BeanUtils;
 import org.springframework.util.CollectionUtils;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.Date;
 import java.util.List;
 
@@ -93,5 +96,12 @@ public class ProductSalesServiceImpl implements ProductSalesService {
         }
     }
 
+    @Override
+    public String export(ProductSalesDTO productSalesDTO, HttpServletResponse response) throws Exception {
+
+        ExcelUtil<ProductSalesDTO> util = new ExcelUtil<ProductSalesDTO>(ProductSalesDTO.class);
+        return util.exportExcel(productSalesDTO.getProductSalesDTOS(), "产品销售");
+
+    }
 
 }

+ 36 - 1
unimall-core/pom.xml

@@ -74,9 +74,44 @@
 		<dependency>
 			<groupId>org.apache.poi</groupId>
 			<artifactId>poi</artifactId>
-			<version>3.15</version>
+			<version>3.16</version>
 			<scope>compile</scope>
 		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.41</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>cn.afterturn</groupId>
+			<artifactId>easypoi-base</artifactId>
+			<version>3.3.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpmime</artifactId>
+			<version>4.5.7</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>3.17</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.tomcat.embed</groupId>
+			<artifactId>tomcat-embed-core</artifactId>
+		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>com.iotechn</groupId>-->
+<!--			<artifactId>unimall-data</artifactId>-->
+<!--			<version>0.0.1-RELEASE</version>-->
+<!--			<scope>compile</scope>-->
+<!--		</dependency>-->
 	</dependencies>
 
 </project>

+ 103 - 0
unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelClassField.java

@@ -0,0 +1,103 @@
+package com.iotechn.unimall.core.util;
+
+import java.util.LinkedHashMap;
+
+public class ExcelClassField {
+ 
+          /** 字段名称 */
+          
+    private String fieldName;
+ 
+          /** 表头名称 */
+          
+    private String name;
+ 
+          /** 映射关系 */
+          
+    private LinkedHashMap<String, String> kvMap;
+ 
+          /** 示例值 */
+          
+    private Object example;
+ 
+          /** 排序 */
+          
+    private int sort;
+ 
+          /** 是否为注解字段:0-否,1-是 */
+          
+    private int hasAnnotation;
+ 
+          
+
+    public String getFieldName() {
+   return fieldName;
+  }
+ 
+          
+
+    public void setFieldName(String fieldName) {
+   this.fieldName = fieldName;
+  }
+ 
+          
+
+    public String getName() {
+   return name;
+  }
+ 
+          
+
+    public void setName(String name) {
+   this.name = name;
+  }
+ 
+          
+
+    public LinkedHashMap<String, String> getKvMap() {
+   return kvMap;
+  }
+ 
+          
+
+    public void setKvMap(LinkedHashMap<String, String> kvMap) {
+   this.kvMap = kvMap;
+  }
+ 
+          
+
+    public Object getExample() {
+   return example;
+  }
+ 
+          
+
+    public void setExample(Object example) {
+   this.example = example;
+  }
+ 
+          
+
+    public int getSort() {
+   return sort;
+  }
+ 
+          
+
+    public void setSort(int sort) {
+   this.sort = sort;
+  }
+ 
+          
+
+    public int getHasAnnotation() {
+   return hasAnnotation;
+  }
+ 
+          
+
+    public void setHasAnnotation(int hasAnnotation) {
+   this.hasAnnotation = hasAnnotation;
+  }
+ 
+}

+ 24 - 0
unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelExport.java

@@ -0,0 +1,24 @@
+package com.iotechn.unimall.core.util;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ExcelExport {
+
+    /** 字段名称 */
+    String value();
+
+    /** 导出排序先后: 数字越小越靠前(默认按Java类字段顺序导出) */
+    int sort() default 0;
+
+    /** 导出映射,格式如:0-未知;1-男;2-女 */
+    String kv() default "";
+
+    /** 导出模板示例值(有值的话,直接取该值,不做映射) */
+    String example() default "";
+
+}

+ 26 - 0
unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelImport.java

@@ -0,0 +1,26 @@
+package com.iotechn.unimall.core.util;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ExcelImport {
+
+    /** 字段名称 */
+    String value();
+
+    /** 导出映射,格式如:0-未知;1-男;2-女 */
+    String kv() default "";
+
+    /** 是否为必填字段(默认为非必填) */
+    boolean required() default false;
+
+    /** 最大长度(默认255) */
+    int maxLength() default 255;
+
+    /** 导入唯一性验证(多个字段则取联合验证) */
+    boolean unique() default false;
+
+}

+ 968 - 0
unimall-core/src/main/java/com/iotechn/unimall/core/util/ExcelUtils.java

@@ -0,0 +1,968 @@
+package com.iotechn.unimall.core.util;
+
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.net.URL;
+import java.text.NumberFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.Map.Entry;
+
+
+import org.apache.poi.hssf.usermodel.HSSFDataValidation;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.ClientAnchor.AnchorType;
+import org.apache.poi.ss.usermodel.DataValidation;
+import org.apache.poi.ss.usermodel.DataValidationConstraint;
+import org.apache.poi.ss.usermodel.DataValidationHelper;
+import org.apache.poi.ss.usermodel.Drawing;
+import org.apache.poi.ss.usermodel.FillPatternType;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.IndexedColors;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.VerticalAlignment;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.CellRangeAddressList;
+import org.apache.poi.xssf.streaming.SXSSFWorkbook;
+import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Excel导入导出工具类
+ *
+ * @author sunnyzyq
+ * @date 2021/12/17
+ */
+public class ExcelUtils {
+
+    private static final String XLSX = ".xlsx";
+    private static final String XLS = ".xls";
+    public static final String ROW_MERGE = "row_merge";
+    public static final String COLUMN_MERGE = "column_merge";
+    private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
+    private static final String ROW_NUM = "rowNum";
+    private static final String ROW_DATA = "rowData";
+    private static final String ROW_TIPS = "rowTips";
+    private static final int CELL_OTHER = 0;
+    private static final int CELL_ROW_MERGE = 1;
+    private static final int CELL_COLUMN_MERGE = 2;
+    private static final int IMG_HEIGHT = 30;
+    private static final int IMG_WIDTH = 30;
+    private static final char LEAN_LINE = '/';
+    private static final int BYTES_DEFAULT_LENGTH = 10240;
+    private static final NumberFormat NUMBER_FORMAT = NumberFormat.getNumberInstance();
+
+
+    public static <T> List<T> readFile(File file, Class<T> clazz) throws Exception {
+        JSONArray array = readFile(file);
+        return getBeanList(array, clazz);
+    }
+
+    public static <T> List<T> readMultipartFile(MultipartFile mFile, Class<T> clazz) throws Exception {
+        JSONArray array = readMultipartFile(mFile);
+        return getBeanList(array, clazz);
+    }
+
+    public static JSONArray readFile(File file) throws Exception {
+        return readExcel(null, file);
+    }
+
+    public static JSONArray readMultipartFile(MultipartFile mFile) throws Exception {
+        return readExcel(mFile, null);
+    }
+
+    private static <T> List<T> getBeanList(JSONArray array, Class<T> clazz) throws Exception {
+        List<T> list = new ArrayList<>();
+        Map<Integer, String> uniqueMap = new HashMap<>(16);
+        for (int i = 0; i < array.size(); i++) {
+            list.add(getBean(clazz, array.getJSONObject(i), uniqueMap));
+        }
+        return list;
+    }
+
+    /**
+     * 获取每个对象的数据
+     */
+    private static <T> T getBean(Class<T> c, JSONObject obj, Map<Integer, String> uniqueMap) throws Exception {
+        T t = c.newInstance();
+        Field[] fields = c.getDeclaredFields();
+        List<String> errMsgList = new ArrayList<>();
+        boolean hasRowTipsField = false;
+        StringBuilder uniqueBuilder = new StringBuilder();
+        int rowNum = 0;
+        for (Field field : fields) {
+            // 行号
+            if (field.getName().equals(ROW_NUM)) {
+                rowNum = obj.getInteger(ROW_NUM);
+                field.setAccessible(true);
+                field.set(t, rowNum);
+                continue;
+            }
+            // 是否需要设置异常信息
+            if (field.getName().equals(ROW_TIPS)) {
+                hasRowTipsField = true;
+                continue;
+            }
+            // 原始数据
+            if (field.getName().equals(ROW_DATA)) {
+                field.setAccessible(true);
+                field.set(t, obj.toString());
+                continue;
+            }
+            // 设置对应属性值
+            setFieldValue(t,field, obj, uniqueBuilder, errMsgList);
+        }
+        // 数据唯一性校验
+        if (uniqueBuilder.length() > 0) {
+            if (uniqueMap.containsValue(uniqueBuilder.toString())) {
+                Set<Integer> rowNumKeys = uniqueMap.keySet();
+                for (Integer num : rowNumKeys) {
+                    if (uniqueMap.get(num).equals(uniqueBuilder.toString())) {
+                        errMsgList.add(String.format("数据唯一性校验失败,(%s)与第%s行重复)", uniqueBuilder, num));
+                    }
+                }
+            } else {
+                uniqueMap.put(rowNum, uniqueBuilder.toString());
+            }
+        }
+        // 失败处理
+        if (errMsgList.isEmpty() && !hasRowTipsField) {
+            return t;
+        }
+        StringBuilder sb = new StringBuilder();
+        int size = errMsgList.size();
+        for (int i = 0; i < size; i++) {
+            if (i == size - 1) {
+                sb.append(errMsgList.get(i));
+            } else {
+                sb.append(errMsgList.get(i)).append(";");
+            }
+        }
+        // 设置错误信息
+        for (Field field : fields) {
+            if (field.getName().equals(ROW_TIPS)) {
+                field.setAccessible(true);
+                field.set(t, sb.toString());
+            }
+        }
+        return t;
+    }
+
+    private static <T> void setFieldValue(T t, Field field, JSONObject obj, StringBuilder uniqueBuilder, List<String> errMsgList) {
+        // 获取 ExcelImport 注解属性
+        ExcelImport annotation = field.getAnnotation(ExcelImport.class);
+        if (annotation == null) {
+            return;
+        }
+        String cname = annotation.value();
+        if (cname.trim().length() == 0) {
+            return;
+        }
+        // 获取具体值
+        String val = null;
+        if (obj.containsKey(cname)) {
+            val = getString(obj.getString(cname));
+        }
+        if (val == null) {
+            return;
+        }
+        field.setAccessible(true);
+        // 判断是否必填
+        boolean require = annotation.required();
+        if (require && val.isEmpty()) {
+            errMsgList.add(String.format("[%s]不能为空", cname));
+            return;
+        }
+        // 数据唯一性获取
+        boolean unique = annotation.unique();
+        if (unique) {
+            if (uniqueBuilder.length() > 0) {
+                uniqueBuilder.append("--").append(val);
+            } else {
+                uniqueBuilder.append(val);
+            }
+        }
+        // 判断是否超过最大长度
+        int maxLength = annotation.maxLength();
+        if (maxLength > 0 && val.length() > maxLength) {
+            errMsgList.add(String.format("[%s]长度不能超过%s个字符(当前%s个字符)", cname, maxLength, val.length()));
+        }
+        // 判断当前属性是否有映射关系
+        LinkedHashMap<String, String> kvMap = getKvMap(annotation.kv());
+        if (!kvMap.isEmpty()) {
+            boolean isMatch = false;
+            for (String key : kvMap.keySet()) {
+                if (kvMap.get(key).equals(val)) {
+                    val = key;
+                    isMatch = true;
+                    break;
+                }
+            }
+            if (!isMatch) {
+                errMsgList.add(String.format("[%s]的值不正确(当前值为%s)", cname, val));
+                return;
+            }
+        }
+        // 其余情况根据类型赋值
+        String fieldClassName = field.getType().getSimpleName();
+        try {
+            if ("String".equalsIgnoreCase(fieldClassName)) {
+                field.set(t, val);
+            } else if ("boolean".equalsIgnoreCase(fieldClassName)) {
+                field.set(t, Boolean.valueOf(val));
+            } else if ("int".equalsIgnoreCase(fieldClassName) || "Integer".equals(fieldClassName)) {
+                try {
+                    field.set(t, Integer.valueOf(val));
+                } catch (NumberFormatException e) {
+                    errMsgList.add(String.format("[%s]的值格式不正确(当前值为%s)", cname, val));
+                }
+            } else if ("double".equalsIgnoreCase(fieldClassName)) {
+                field.set(t, Double.valueOf(val));
+            } else if ("long".equalsIgnoreCase(fieldClassName)) {
+                field.set(t, Long.valueOf(val));
+            } else if ("BigDecimal".equalsIgnoreCase(fieldClassName)) {
+                field.set(t, new BigDecimal(val));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private static JSONArray readExcel(MultipartFile mFile, File file) throws IOException {
+        boolean fileNotExist = (file == null || !file.exists());
+        if (mFile == null && fileNotExist) {
+            return new JSONArray();
+        }
+        // 解析表格数据
+        InputStream in;
+        String fileName;
+        if (mFile != null) {
+            // 上传文件解析
+            in = mFile.getInputStream();
+            fileName = getString(mFile.getOriginalFilename()).toLowerCase();
+        } else {
+            // 本地文件解析
+            in = new FileInputStream(file);
+            fileName = file.getName().toLowerCase();
+        }
+        Workbook book;
+        if (fileName.endsWith(XLSX)) {
+            book = new XSSFWorkbook(in);
+        } else if (fileName.endsWith(XLS)) {
+            POIFSFileSystem poifsFileSystem = new POIFSFileSystem(in);
+            book = new HSSFWorkbook(poifsFileSystem);
+        } else {
+            return new JSONArray();
+        }
+        JSONArray array = read(book);
+        book.close();
+        in.close();
+        return array;
+    }
+
+    private static JSONArray read(Workbook book) {
+        // 获取 Excel 文件第一个 Sheet 页面
+        Sheet sheet = book.getSheetAt(0);
+        return readSheet(sheet);
+    }
+
+    private static JSONArray readSheet(Sheet sheet) {
+        // 首行下标
+        int rowStart = sheet.getFirstRowNum();
+        // 尾行下标
+        int rowEnd = sheet.getLastRowNum();
+        // 获取表头行
+        Row headRow = sheet.getRow(rowStart);
+        if (headRow == null) {
+            return new JSONArray();
+        }
+        int cellStart = headRow.getFirstCellNum();
+        int cellEnd = headRow.getLastCellNum();
+        Map<Integer, String> keyMap = new HashMap<>();
+        for (int j = cellStart; j < cellEnd; j++) {
+            // 获取表头数据
+            String val = getCellValue(headRow.getCell(j));
+            if (val != null && val.trim().length() != 0) {
+                keyMap.put(j, val);
+            }
+        }
+        // 如果表头没有数据则不进行解析
+        if (keyMap.isEmpty()) {
+            return (JSONArray) Collections.emptyList();
+        }
+        // 获取每行JSON对象的值
+        JSONArray array = new JSONArray();
+        // 如果首行与尾行相同,表明只有一行,返回表头数据
+        if (rowStart == rowEnd) {
+            JSONObject obj = new JSONObject();
+            // 添加行号
+            obj.put(ROW_NUM, 1);
+            for (int i : keyMap.keySet()) {
+                obj.put(keyMap.get(i), "");
+            }
+            array.add(obj);
+            return array;
+        }
+        for (int i = rowStart + 1; i <= rowEnd; i++) {
+            Row eachRow = sheet.getRow(i);
+            JSONObject obj = new JSONObject();
+            // 添加行号
+            obj.put(ROW_NUM, i + 1);
+            StringBuilder sb = new StringBuilder();
+            for (int k = cellStart; k < cellEnd; k++) {
+                if (eachRow != null) {
+                    String val = getCellValue(eachRow.getCell(k));
+                    // 所有数据添加到里面,用于判断该行是否为空
+                    sb.append(val);
+                    obj.put(keyMap.get(k), val);
+                }
+            }
+            if (sb.length() > 0) {
+                array.add(obj);
+            }
+        }
+        return array;
+    }
+
+    private static String getCellValue(Cell cell) {
+        // 空白或空
+        if (cell == null || cell.getCellTypeEnum() == CellType.BLANK) {
+            return "";
+        }
+        // String类型
+        if (cell.getCellTypeEnum() == CellType.STRING) {
+            String val = cell.getStringCellValue();
+            if (val == null || val.trim().length() == 0) {
+                return "";
+            }
+            return val.trim();
+        }
+        // 数字类型
+        if (cell.getCellTypeEnum() == CellType.NUMERIC) {
+            // 科学计数法类型
+            return NUMBER_FORMAT.format(cell.getNumericCellValue()) + "";
+        }
+        // 布尔值类型
+        if (cell.getCellTypeEnum() == CellType.BOOLEAN) {
+            return cell.getBooleanCellValue() + "";
+        }
+        // 错误类型
+        return cell.getCellFormula();
+    }
+
+    public static <T> void exportTemplate(HttpServletResponse response, String fileName, Class<T> clazz) {
+        exportTemplate(response, fileName, fileName, clazz, false);
+    }
+
+    public static <T> void exportTemplate(HttpServletResponse response, String fileName, String sheetName,
+                                          Class<T> clazz) {
+        exportTemplate(response, fileName, sheetName, clazz, false);
+    }
+
+    public static <T> void exportTemplate(HttpServletResponse response, String fileName, Class<T> clazz,
+                                          boolean isContainExample) {
+        exportTemplate(response, fileName, fileName, clazz, isContainExample);
+    }
+
+    public static <T> void exportTemplate(HttpServletResponse response, String fileName, String sheetName,
+                                          Class<T> clazz, boolean isContainExample) {
+        // 获取表头字段
+        List<ExcelClassField> headFieldList = getExcelClassFieldList(clazz);
+        // 获取表头数据和示例数据
+        List<List<Object>> sheetDataList = new ArrayList<>();
+        List<Object> headList = new ArrayList<>();
+        List<Object> exampleList = new ArrayList<>();
+        Map<Integer, List<String>> selectMap = new LinkedHashMap<>();
+        for (int i = 0; i < headFieldList.size(); i++) {
+            ExcelClassField each = headFieldList.get(i);
+            headList.add(each.getName());
+            exampleList.add(each.getExample());
+            LinkedHashMap<String, String> kvMap = each.getKvMap();
+            if (kvMap != null && kvMap.size() > 0) {
+                selectMap.put(i, new ArrayList<>(kvMap.values()));
+            }
+        }
+        sheetDataList.add(headList);
+        if (isContainExample) {
+            sheetDataList.add(exampleList);
+        }
+        // 导出数据
+        export(response, fileName, sheetName, sheetDataList, selectMap);
+    }
+
+    private static <T> List<ExcelClassField> getExcelClassFieldList(Class<T> clazz) {
+        // 解析所有字段
+        Field[] fields = clazz.getDeclaredFields();
+        boolean hasExportAnnotation = false;
+        Map<Integer, List<ExcelClassField>> map = new LinkedHashMap<>();
+        List<Integer> sortList = new ArrayList<>();
+        for (Field field : fields) {
+            ExcelClassField cf = getExcelClassField(field);
+            if (cf.getHasAnnotation() == 1) {
+                hasExportAnnotation = true;
+            }
+            int sort = cf.getSort();
+            if (map.containsKey(sort)) {
+                map.get(sort).add(cf);
+            } else {
+                List<ExcelClassField> list = new ArrayList<>();
+                list.add(cf);
+                sortList.add(sort);
+                map.put(sort, list);
+            }
+        }
+        Collections.sort(sortList);
+        // 获取表头
+        List<ExcelClassField> headFieldList = new ArrayList<>();
+        if (hasExportAnnotation) {
+            for (Integer sort : sortList) {
+                for (ExcelClassField cf : map.get(sort)) {
+                    if (cf.getHasAnnotation() == 1) {
+                        headFieldList.add(cf);
+                    }
+                }
+            }
+        } else {
+            headFieldList.addAll(map.get(0));
+        }
+        return headFieldList;
+    }
+
+    private static ExcelClassField getExcelClassField(Field field) {
+        ExcelClassField cf = new ExcelClassField();
+        String fieldName = field.getName();
+        cf.setFieldName(fieldName);
+        ExcelExport annotation = field.getAnnotation(ExcelExport.class);
+        // 无 ExcelExport 注解情况
+        if (annotation == null) {
+            cf.setHasAnnotation(0);
+            cf.setName(fieldName);
+            cf.setSort(0);
+            return cf;
+        }
+        // 有 ExcelExport 注解情况
+        cf.setHasAnnotation(1);
+        cf.setName(annotation.value());
+        String example = getString(annotation.example());
+        if (!example.isEmpty()) {
+            if (isNumeric(example)) {
+                cf.setExample(Double.valueOf(example));
+            } else {
+                cf.setExample(example);
+            }
+        } else {
+            cf.setExample("");
+        }
+        cf.setSort(annotation.sort());
+        // 解析映射
+        String kv = getString(annotation.kv());
+        cf.setKvMap(getKvMap(kv));
+        return cf;
+    }
+
+    private static LinkedHashMap<String, String> getKvMap(String kv) {
+        LinkedHashMap<String, String> kvMap = new LinkedHashMap<>();
+        if (kv.isEmpty()) {
+            return kvMap;
+        }
+        String[] kvs = kv.split(";");
+        if (kvs.length == 0) {
+            return kvMap;
+        }
+        for (String each : kvs) {
+            String[] eachKv = getString(each).split("-");
+            if (eachKv.length != 2) {
+                continue;
+            }
+            String k = eachKv[0];
+            String v = eachKv[1];
+            if (k.isEmpty() || v.isEmpty()) {
+                continue;
+            }
+            kvMap.put(k, v);
+        }
+        return kvMap;
+    }
+
+    /**
+     * 导出表格到本地
+     *
+     * @param file      本地文件对象
+     * @param sheetData 导出数据
+     */
+    public static void exportFile(File file, List<List<Object>> sheetData) {
+        if (file == null) {
+            System.out.println("文件创建失败");
+            return;
+        }
+        if (sheetData == null) {
+            sheetData = new ArrayList<>();
+        }
+        export(null, file, file.getName(), file.getName(), sheetData, null);
+    }
+
+    /**
+     * 导出表格到本地
+     *
+     * @param <T>      导出数据类似,和K类型保持一致
+     * @param filePath 文件父路径(如:D:/doc/excel/)
+     * @param fileName 文件名称(不带尾缀,如:学生表)
+     * @param list     导出数据
+     * @throws IOException IO异常
+     */
+    public static <T> File exportFile(String filePath, String fileName, List<T> list) throws IOException {
+        File file = getFile(filePath, fileName);
+        List<List<Object>> sheetData = getSheetData(list);
+        exportFile(file, sheetData);
+        return file;
+    }
+
+    /**
+     * 获取文件
+     *
+     * @param filePath filePath 文件父路径(如:D:/doc/excel/)
+     * @param fileName 文件名称(不带尾缀,如:用户表)
+     * @return 本地File文件对象
+     */
+    private static File getFile(String filePath, String fileName) throws IOException {
+        String dirPath = getString(filePath);
+        String fileFullPath;
+        if (dirPath.isEmpty()) {
+            fileFullPath = fileName;
+        } else {
+            // 判定文件夹是否存在,如果不存在,则级联创建
+            File dirFile = new File(dirPath);
+            if (!dirFile.exists()) {
+                dirFile.mkdirs();
+            }
+            // 获取文件夹全名
+            if (dirPath.endsWith(String.valueOf(LEAN_LINE))) {
+                fileFullPath = dirPath + fileName + XLSX;
+            } else {
+                fileFullPath = dirPath + LEAN_LINE + fileName + XLSX;
+            }
+        }
+        System.out.println(fileFullPath);
+        File file = new File(fileFullPath);
+        if (!file.exists()) {
+            file.createNewFile();
+        }
+        return file;
+    }
+
+    private static <T> List<List<Object>> getSheetData(List<T> list) {
+        // 获取表头字段
+        List<ExcelClassField> excelClassFieldList = getExcelClassFieldList(list.get(0).getClass());
+        List<String> headFieldList = new ArrayList<>();
+        List<Object> headList = new ArrayList<>();
+        Map<String, ExcelClassField> headFieldMap = new HashMap<>();
+        for (ExcelClassField each : excelClassFieldList) {
+            String fieldName = each.getFieldName();
+            headFieldList.add(fieldName);
+            headFieldMap.put(fieldName, each);
+            headList.add(each.getName());
+        }
+        // 添加表头名称
+        List<List<Object>> sheetDataList = new ArrayList<>();
+        sheetDataList.add(headList);
+        // 获取表数据
+        for (T t : list) {
+            Map<String, Object> fieldDataMap = getFieldDataMap(t);
+            Set<String> fieldDataKeys = fieldDataMap.keySet();
+            List<Object> rowList = new ArrayList<>();
+            for (String headField : headFieldList) {
+                if (!fieldDataKeys.contains(headField)) {
+                    continue;
+                }
+                Object data = fieldDataMap.get(headField);
+                if (data == null) {
+                    rowList.add("");
+                    continue;
+                }
+                ExcelClassField cf = headFieldMap.get(headField);
+                // 判断是否有映射关系
+                LinkedHashMap<String, String> kvMap = cf.getKvMap();
+                if (kvMap == null || kvMap.isEmpty()) {
+                    rowList.add(data);
+                    continue;
+                }
+                String val = kvMap.get(data.toString());
+                if (isNumeric(val)) {
+                    rowList.add(Double.valueOf(val));
+                } else {
+                    rowList.add(val);
+                }
+            }
+            sheetDataList.add(rowList);
+        }
+        return sheetDataList;
+    }
+
+    private static <T> Map<String, Object> getFieldDataMap(T t) {
+        Map<String, Object> map = new HashMap<>();
+        Field[] fields = t.getClass().getDeclaredFields();
+        try {
+            for (Field field : fields) {
+                String fieldName = field.getName();
+                field.setAccessible(true);
+                Object object = field.get(t);
+                map.put(fieldName, object);
+            }
+        } catch (IllegalArgumentException | IllegalAccessException e) {
+            e.printStackTrace();
+        }
+        return map;
+    }
+
+    public static void exportEmpty(HttpServletResponse response, String fileName) {
+        List<List<Object>> sheetDataList = new ArrayList<>();
+        List<Object> headList = new ArrayList<>();
+        headList.add("导出无数据");
+        sheetDataList.add(headList);
+        export(response, fileName, sheetDataList);
+    }
+
+    public static void export(HttpServletResponse response, String fileName, List<List<Object>> sheetDataList) {
+        export(response, fileName, fileName, sheetDataList, null);
+    }
+
+    public static void export(HttpServletResponse response, String fileName, String sheetName,
+                              List<List<Object>> sheetDataList) {
+        export(response, fileName, sheetName, sheetDataList, null);
+    }
+
+    public static void export(HttpServletResponse response, String fileName, String sheetName,
+                              List<List<Object>> sheetDataList, Map<Integer, List<String>> selectMap) {
+        export(response, null, fileName, sheetName, sheetDataList, selectMap);
+    }
+
+    public static <T, K> void export(HttpServletResponse response, String fileName, List<T> list, Class<K> template) {
+        // list 是否为空
+        boolean lisIsEmpty = list == null || list.isEmpty();
+        // 如果模板数据为空,且导入的数据为空,则导出空文件
+        if (template == null && lisIsEmpty) {
+            exportEmpty(response, fileName);
+            return;
+        }
+        // 如果 list 数据,则导出模板数据
+        if (lisIsEmpty) {
+            exportTemplate(response, fileName, template);
+            return;
+        }
+        // 导出数据
+        List<List<Object>> sheetDataList = getSheetData(list);
+        export(response, fileName, sheetDataList);
+    }
+
+    public static void export(HttpServletResponse response, String fileName, List<List<Object>> sheetDataList, Map<Integer, List<String>> selectMap) {
+        export(response, fileName, fileName, sheetDataList, selectMap);
+    }
+
+    private static void export(HttpServletResponse response, File file, String fileName, String sheetName,
+                               List<List<Object>> sheetDataList, Map<Integer, List<String>> selectMap) {
+        // 整个 Excel 表格 book 对象
+        SXSSFWorkbook book = new SXSSFWorkbook();
+        // 每个 Sheet 页
+        Sheet sheet = book.createSheet(sheetName);
+        Drawing<?> patriarch = sheet.createDrawingPatriarch();
+        // 设置表头背景色(灰色)
+        CellStyle headStyle = book.createCellStyle();
+        headStyle.setFillForegroundColor(IndexedColors.GREY_80_PERCENT.index);
+        headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+        headStyle.setAlignment(HorizontalAlignment.CENTER);
+        headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index);
+        // 设置表身背景色(默认色)
+        CellStyle rowStyle = book.createCellStyle();
+        rowStyle.setAlignment(HorizontalAlignment.CENTER);
+        rowStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        // 设置表格列宽度(默认为15个字节)
+        sheet.setDefaultColumnWidth(15);
+        // 创建合并算法数组
+        int rowLength = sheetDataList.size();
+        int columnLength = sheetDataList.get(0).size();
+        int[][] mergeArray = new int[rowLength][columnLength];
+        for (int i = 0; i < sheetDataList.size(); i++) {
+            // 每个 Sheet 页中的行数据
+            Row row = sheet.createRow(i);
+            List<Object> rowList = sheetDataList.get(i);
+            for (int j = 0; j < rowList.size(); j++) {
+                // 每个行数据中的单元格数据
+                Object o = rowList.get(j);
+                int v = 0;
+                if (o instanceof URL) {
+                    // 如果要导出图片的话, 链接需要传递 URL 对象
+                    setCellPicture(book, row, patriarch, i, j, (URL) o);
+                } else {
+                    Cell cell = row.createCell(j);
+                    if (i == 0) {
+                        // 第一行为表头行,采用灰色底背景
+                        v = setCellValue(cell, o, headStyle);
+                    } else {
+                        // 其他行为数据行,默认白底色
+                        v = setCellValue(cell, o, rowStyle);
+                    }
+                }
+                mergeArray[i][j] = v;
+            }
+        }
+        // 合并单元格
+        mergeCells(sheet, mergeArray);
+        // 设置下拉列表
+        setSelect(sheet, selectMap);
+        // 写数据
+        if (response != null) {
+            // 前端导出
+            try {
+                write(response, book, fileName);
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        } else {
+            // 本地导出
+            FileOutputStream fos;
+            try {
+                fos = new FileOutputStream(file);
+                ByteArrayOutputStream ops = new ByteArrayOutputStream();
+                book.write(ops);
+                fos.write(ops.toByteArray());
+                fos.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * 合并当前Sheet页的单元格
+     *
+     * @param sheet      当前 sheet 页
+     * @param mergeArray 合并单元格算法
+     */
+    private static void mergeCells(Sheet sheet, int[][] mergeArray) {
+        // 横向合并
+        for (int x = 0; x < mergeArray.length; x++) {
+            int[] arr = mergeArray[x];
+            boolean merge = false;
+            int y1 = 0;
+            int y2 = 0;
+            for (int y = 0; y < arr.length; y++) {
+                int value = arr[y];
+                if (value == CELL_COLUMN_MERGE) {
+                    if (!merge) {
+                        y1 = y;
+                    }
+                    y2 = y;
+                    merge = true;
+                } else {
+                    merge = false;
+                    if (y1 > 0) {
+                        sheet.addMergedRegion(new CellRangeAddress(x, x, (y1 - 1), y2));
+                    }
+                    y1 = 0;
+                    y2 = 0;
+                }
+            }
+            if (y1 > 0) {
+                sheet.addMergedRegion(new CellRangeAddress(x, x, (y1 - 1), y2));
+            }
+        }
+        // 纵向合并
+        int xLen = mergeArray.length;
+        int yLen = mergeArray[0].length;
+        for (int y = 0; y < yLen; y++) {
+            boolean merge = false;
+            int x1 = 0;
+            int x2 = 0;
+            for (int x = 0; x < xLen; x++) {
+                int value = mergeArray[x][y];
+                if (value == CELL_ROW_MERGE) {
+                    if (!merge) {
+                        x1 = x;
+                    }
+                    x2 = x;
+                    merge = true;
+                } else {
+                    merge = false;
+                    if (x1 > 0) {
+                        sheet.addMergedRegion(new CellRangeAddress((x1 - 1), x2, y, y));
+                    }
+                    x1 = 0;
+                    x2 = 0;
+                }
+            }
+            if (x1 > 0) {
+                sheet.addMergedRegion(new CellRangeAddress((x1 - 1), x2, y, y));
+            }
+        }
+    }
+
+    private static void write(HttpServletResponse response, SXSSFWorkbook book, String fileName) throws IOException {
+        response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+        response.setCharacterEncoding("utf-8");
+        String name = new String(fileName.getBytes("GBK"), "ISO8859_1") + XLSX;
+        response.addHeader("Content-Disposition", "attachment;filename=" + name);
+        ServletOutputStream out = response.getOutputStream();
+        book.write(out);
+        out.flush();
+        out.close();
+    }
+
+    private static int setCellValue(Cell cell, Object o, CellStyle style) {
+        // 设置样式
+        cell.setCellStyle(style);
+        // 数据为空时
+        if (o == null) {
+            cell.setCellType(CellType.STRING);
+            cell.setCellValue("");
+            return CELL_OTHER;
+        }
+        // 是否为字符串
+        if (o instanceof String) {
+            String s = o.toString();
+            if (isNumeric(s)) {
+                cell.setCellType(CellType.NUMERIC);
+                cell.setCellValue(Double.parseDouble(s));
+                return CELL_OTHER;
+            } else {
+                cell.setCellType(CellType.STRING);
+                cell.setCellValue(s);
+            }
+            if (s.equals(ROW_MERGE)) {
+                return CELL_ROW_MERGE;
+            } else if (s.equals(COLUMN_MERGE)) {
+                return CELL_COLUMN_MERGE;
+            } else {
+                return CELL_OTHER;
+            }
+        }
+        // 是否为字符串
+        if (o instanceof Integer || o instanceof Long || o instanceof Double || o instanceof Float) {
+            cell.setCellType(CellType.NUMERIC);
+            cell.setCellValue(Double.parseDouble(o.toString()));
+            return CELL_OTHER;
+        }
+        // 是否为Boolean
+        if (o instanceof Boolean) {
+            cell.setCellType(CellType.BOOLEAN);
+            cell.setCellValue((Boolean) o);
+            return CELL_OTHER;
+        }
+        // 如果是BigDecimal,则默认3位小数
+        if (o instanceof BigDecimal) {
+            cell.setCellType(CellType.NUMERIC);
+            cell.setCellValue(((BigDecimal) o).setScale(3, RoundingMode.HALF_UP).doubleValue());
+            return CELL_OTHER;
+        }
+        // 如果是Date数据,则显示格式化数据
+        if (o instanceof Date) {
+            cell.setCellType(CellType.STRING);
+            cell.setCellValue(formatDate((Date) o));
+            return CELL_OTHER;
+        }
+        // 如果是其他,则默认字符串类型
+        cell.setCellType(CellType.STRING);
+        cell.setCellValue(o.toString());
+        return CELL_OTHER;
+    }
+
+    private static void setCellPicture(SXSSFWorkbook wb, Row sr, Drawing<?> patriarch, int x, int y, URL url) {
+        // 设置图片宽高
+        sr.setHeight((short) (IMG_WIDTH * IMG_HEIGHT));
+        // (jdk1.7版本try中定义流可自动关闭)
+        try (InputStream is = url.openStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
+            byte[] buff = new byte[BYTES_DEFAULT_LENGTH];
+            int rc;
+            while ((rc = is.read(buff, 0, BYTES_DEFAULT_LENGTH)) > 0) {
+                outputStream.write(buff, 0, rc);
+            }
+            // 设置图片位置
+            XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, y, x, y + 1, x + 1);
+            // 设置这个,图片会自动填满单元格的长宽
+            anchor.setAnchorType(AnchorType.MOVE_AND_RESIZE);
+            patriarch.createPicture(anchor, wb.addPicture(outputStream.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private static String formatDate(Date date) {
+        if (date == null) {
+            return "";
+        }
+        SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT);
+        return format.format(date);
+    }
+
+    private static void setSelect(Sheet sheet, Map<Integer, List<String>> selectMap) {
+        if (selectMap == null || selectMap.isEmpty()) {
+            return;
+        }
+        Set<Entry<Integer, List<String>>> entrySet = selectMap.entrySet();
+        for (Entry<Integer, List<String>> entry : entrySet) {
+            int y = entry.getKey();
+            List<String> list = entry.getValue();
+            if (list == null || list.isEmpty()) {
+                continue;
+            }
+            String[] arr = new String[list.size()];
+            for (int i = 0; i < list.size(); i++) {
+                arr[i] = list.get(i);
+            }
+            DataValidationHelper helper = sheet.getDataValidationHelper();
+            CellRangeAddressList addressList = new CellRangeAddressList(1, 65000, y, y);
+            DataValidationConstraint dvc = helper.createExplicitListConstraint(arr);
+            DataValidation dv = helper.createValidation(dvc, addressList);
+            if (dv instanceof HSSFDataValidation) {
+                dv.setSuppressDropDownArrow(false);
+            } else {
+                dv.setSuppressDropDownArrow(true);
+                dv.setShowErrorBox(true);
+            }
+            sheet.addValidationData(dv);
+        }
+    }
+
+    private static boolean isNumeric(String str) {
+        if ("0.0".equals(str)) {
+            return true;
+        }
+        for (int i = str.length(); --i >= 0; ) {
+            if (!Character.isDigit(str.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private static String getString(String s) {
+        if (s == null) {
+            return "";
+        }
+        if (s.isEmpty()) {
+            return s;
+        }
+        return s.trim();
+    }
+
+}

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/MaritimeAdministrationDO.java

@@ -3,6 +3,8 @@ package com.iotechn.unimall.data.domain;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableName;
 import java.util.Date;
+import java.util.List;
+
 import lombok.Data;
 
 /**
@@ -54,5 +56,8 @@ public class MaritimeAdministrationDO extends SuperDO {
      /* updatePeople */
     @TableField("update_people")
     private String updatePeople;
+    /* updatePeople */
+    @TableField(exist = false)
+    private List<MaritimeDetailDO> maritimeDetailDOS;
 
 }

+ 20 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/domain/MaritimeDetailDO.java

@@ -32,7 +32,7 @@ public class MaritimeDetailDO extends SuperDO {
     private String weight;
      /* 长 */
     @TableField("long")
-    private String long;
+    private String long1;
      /* 宽 */
     @TableField("wide")
     private String wide;
@@ -67,4 +67,23 @@ public class MaritimeDetailDO extends SuperDO {
     @TableField("update_people")
     private String updatePeople;
 
+
+
+//    /* 集装箱柜号 */
+//    @TableField(exist = false)
+//    private String containerNo;
+//    /* 客户编号 */
+//    @TableField(exist = false)
+//    private String customerNo;
+//    /* 包裹数 */
+//    @TableField(exist = false)
+//    private Integer count;
+//    /* 人民币 */
+//    @TableField(exist = false)
+//    private Double rmb;
+//    /* 欧元 */
+//    @TableField(exist = false)
+//    private Double euro;
+
+
 }

+ 13 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/dto/ExpressBillDTO.java

@@ -2,6 +2,9 @@ package com.iotechn.unimall.data.dto;
 
 import com.baomidou.mybatisplus.annotations.TableName;
 import java.util.Date;
+import java.util.List;
+
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
 import lombok.Data;
 
 /**
@@ -14,22 +17,31 @@ public class ExpressBillDTO extends SuperDTO {
      /* id */
     private Long id;
      /* 客户编号 */
+     @Excel(name = "客户编号")
     private String customerNo;
      /* 客户名称 */
+     @Excel(name = "客户名称")
     private String customer;
      /* 快递种类 */
+     @Excel(name = "快递种类")
     private String courierAervices;
      /* 产品 */
+     @Excel(name = "产品")
     private String goods;
      /* 重量 */
+     @Excel(name = "重量")
     private String weight;
      /* 单价 */
+     @Excel(name = "单价")
     private Double price;
      /* 总价 */
+     @Excel(name = "总价")
     private Double amount;
      /* 支付方式 */
+     @Excel(name = "支付方式")
     private String payType;
      /* 备注 */
+     @Excel(name = "备注")
     private String remarks;
      /* remark */
     private String remark;
@@ -47,5 +59,6 @@ public class ExpressBillDTO extends SuperDTO {
     private Long companyId;
      /* updatePeople */
     private String updatePeople;
+    private List<ExpressBillDTO> expressBillDTOS;
 
 }

+ 10 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/dto/ForeignExchangeDTO.java

@@ -2,6 +2,9 @@ package com.iotechn.unimall.data.dto;
 
 import com.baomidou.mybatisplus.annotations.TableName;
 import java.util.Date;
+import java.util.List;
+
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
 import lombok.Data;
 
 /**
@@ -14,16 +17,22 @@ public class ForeignExchangeDTO extends SuperDTO {
      /* id */
     private Long id;
      /* 客户编号 */
+     @Excel(name = "客户编号")
     private String customerNo;
      /* 收款日期 */
+     @Excel(name = "收款日期")
     private String collectionDate;
      /* 汇率 */
+     @Excel(name = "汇率")
     private Double exchange;
      /* 人民币 */
+     @Excel(name = "人民币")
     private Double rmb;
      /* 欧元 */
+     @Excel(name = "欧元")
     private Double euro;
      /* 备注 */
+     @Excel(name = "备注")
     private String remark;
      /* status */
     private Integer status;
@@ -39,5 +48,6 @@ public class ForeignExchangeDTO extends SuperDTO {
     private Long companyId;
      /* updatePeople */
     private String updatePeople;
+    private List<ForeignExchangeDTO> foreignExchangeDTOS;
 
 }

+ 4 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/dto/MaritimeAdministrationDTO.java

@@ -2,6 +2,8 @@ package com.iotechn.unimall.data.dto;
 
 import com.baomidou.mybatisplus.annotations.TableName;
 import java.util.Date;
+import java.util.List;
+
 import lombok.Data;
 
 /**
@@ -40,4 +42,6 @@ public class MaritimeAdministrationDTO extends SuperDTO {
      /* updatePeople */
     private String updatePeople;
 
+    private List<MaritimeDetailDTO> maritimeDetailDTOS;
+
 }

+ 13 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/dto/MaritimeDetailDTO.java

@@ -24,7 +24,7 @@ public class MaritimeDetailDTO extends SuperDTO {
      /* 实重 */
     private String weight;
      /* 长 */
-    private String long;
+    private String long1;
      /* 宽 */
     private String wide;
      /* 高 */
@@ -48,4 +48,16 @@ public class MaritimeDetailDTO extends SuperDTO {
      /* updatePeople */
     private String updatePeople;
 
+
+    /* 集装箱柜号 */
+    private String containerNo;
+    /* 客户编号 */
+    private String customerNo;
+    /* 包裹数 */
+    private Integer count;
+    /* 人民币 */
+    private Double rmb;
+    /* 欧元 */
+    private Double euro;
+
 }

+ 26 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/dto/ProductSalesDTO.java

@@ -2,6 +2,9 @@ package com.iotechn.unimall.data.dto;
 
 import com.baomidou.mybatisplus.annotations.TableName;
 import java.util.Date;
+import java.util.List;
+
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
 import lombok.Data;
 
 /**
@@ -14,48 +17,70 @@ public class ProductSalesDTO extends SuperDTO {
      /* id */
     private Long id;
      /* 日期 */
+     @Excel(name = "日期")
     private String saleDate;
      /* 销售单号 */
+     @Excel(name = "销售单号")
     private String saleNo;
      /* 客户名称 */
+     @Excel(name = "客户名称")
     private String customer;
      /* 电话 */
+     @Excel(name = "电话")
     private String phone;
      /* 备注 */
+     @Excel(name = "备注")
     private String remark;
      /* 商品名称 */
+     @Excel(name = "商品名称")
     private String tradeName;
      /* 货品 */
+     @Excel(name = "货品")
     private String articleNo;
      /* 规格型号 */
+     @Excel(name = "规格型号")
     private String specification;
      /* 销售数量 */
+     @Excel(name = "销售数量")
     private Integer num;
      /* 单位 */
+     @Excel(name = "单位")
     private String unit;
      /* 期初库存 */
+     @Excel(name = "期初库存")
     private Integer openingInventory;
      /* 当前库存 */
+     @Excel(name = "当前库存")
     private Integer currentInventory;
      /* 单价 */
+     @Excel(name = "单价")
     private Double price;
      /* 单盒成本 */
+     @Excel(name = "单盒成本")
     private Double singleCost;
      /* 折扣 */
+     @Excel(name = "折扣")
     private String discount;
      /* 折后价 */
+     @Excel(name = "折后价")
     private Double discountedPrice;
      /* 应收金额 */
+     @Excel(name = "应收金额")
     private Double amountReceivable;
      /* 实收金额 */
+     @Excel(name = "实收金额")
     private Double paidAmount;
      /* 总成本 */
+     @Excel(name = "总成本")
     private Double totalCost;
      /* 毛利润 */
+     @Excel(name = "毛利润")
     private Double grossProfit;
      /* 支付方式 */
+     @Excel(name = "支付方式")
     private String payType;
      /* 备注 */
+     @Excel(name = "备注")
     private String remarks;
      /* status */
     private Integer status;
@@ -71,5 +96,6 @@ public class ProductSalesDTO extends SuperDTO {
     private Long companyId;
      /* updatePeople */
     private String updatePeople;
+    private List<ProductSalesDTO> productSalesDTOS;
 
 }