jg-waiwang-pro
胡川虎 5 months ago
parent 65000b33e8
commit 2bf7a96e31

@ -4,8 +4,8 @@ import cn.dev33.satoken.context.SaHolder;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.config.ConfigValueUtil; import jnpf.config.ConfigValueUtil;
import jnpf.database.util.NotTenantPluginHolder; import jnpf.database.util.NotTenantPluginHolder;
import jnpf.util.data.DataSourceContextHolder;
import jnpf.util.StringUtil; import jnpf.util.StringUtil;
import jnpf.util.data.DataSourceContextHolder;
import jnpf.util.UserProvider; import jnpf.util.UserProvider;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;

@ -2,12 +2,10 @@ package jnpf.database.config;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.constant.PermissionConst; import jnpf.constant.PermissionConst;
import jnpf.permission.entity.OrganizeEntity; import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService; import jnpf.permission.service.OrganizeService;
import jnpf.util.DateUtil; import jnpf.util.DateUtil;
import jnpf.util.StringUtil; import jnpf.util.StringUtil;

@ -26,7 +26,7 @@
(SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 3 THEN '退货入库' WHEN 16 THEN '销售收货单入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType, case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_storage a from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
@ -53,16 +53,15 @@
(SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 3 THEN '退货入库' WHEN 16 THEN '销售收货单入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType, case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_storage a from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id LEFT JOIN jg_receipt_order c ON a.warehousing_id = c.id
LEFT JOIN jg_return_cargo_order f ON c.business_id = f.id LEFT JOIN jg_business_order d ON c.business_id = d.id
LEFT JOIN jg_business_order d ON f.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id LEFT JOIN jg_business_line e ON a.warehouse_id = e.id
${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) ${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type = '3' and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type = '15'
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId} and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
@ -78,18 +77,19 @@
a.warehouse_id warehouseId, a.warehouse_id warehouseId,
a.warehousing_time warehousingTime, a.warehousing_time warehousingTime,
d.code orderCode, d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 3 THEN '退货入库' WHEN 16 THEN '销售收货单入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType, case a.warehousing_outbound_type WHEN 3 THEN '退供出库' WHEN 11 THEN '采购发货单出库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_storage a from jg_warehousing_outbound a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_receipt_order c ON a.warehousing_id = c.id LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
LEFT JOIN jg_business_order d ON c.business_id = d.id LEFT JOIN jg_return_cargo_order f ON f.id = c.business_id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id LEFT JOIN jg_business_order d ON f.business_id = d.id
${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment}
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type = '15' and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type = '3'
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId} and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
@ -105,19 +105,19 @@
a.warehouse_id warehouseId, a.warehouse_id warehouseId,
a.warehousing_time warehousingTime, a.warehousing_time warehousingTime,
d.code orderCode, d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 3 THEN '退货入库' WHEN 16 THEN '销售收货单入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType, case a.warehousing_outbound_type WHEN 3 THEN '退供出库' WHEN 11 THEN '采购发货单出库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_storage a from jg_warehousing_outbound a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_receipt_order c ON a.warehousing_id = c.id LEFT JOIN jg_delivery_order c ON a.warehousing_id = c.id
LEFT JOIN jg_return_cargo_order f ON f.id = c.business_id LEFT JOIN jg_return_cargo_order f ON f.id = c.business_id
LEFT JOIN jg_business_order d ON f.business_id = d.id LEFT JOIN jg_business_order d ON f.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment}
${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type = '16' and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type = 11
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId} and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
@ -138,7 +138,7 @@
(SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 3 THEN '退供出库' WHEN 12 THEN '销售发货单出库' WHEN 11 THEN '采购发货单出库' END warehousingStorageType, case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 12 THEN '销售发货单出库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_outbound a from jg_warehousing_outbound a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
@ -165,16 +165,15 @@
(SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 3 THEN '退供出库' WHEN 12 THEN '销售发货单出库' WHEN 11 THEN '采购发货单出库' END warehousingStorageType, case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 12 THEN '销售发货单出库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_outbound a from jg_warehousing_outbound a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id LEFT JOIN jg_delivery_order c ON a.warehousing_id = c.id
LEFT JOIN jg_return_cargo_order f ON f.id = c.business_id LEFT JOIN jg_business_order d ON c.business_id = d.id
LEFT JOIN jg_business_order d ON f.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment} LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment}
and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type = '3' and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type = 12
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId} and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
@ -190,18 +189,19 @@
a.warehouse_id warehouseId, a.warehouse_id warehouseId,
a.warehousing_time warehousingTime, a.warehousing_time warehousingTime,
d.code orderCode, d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 3 THEN '退供出库' WHEN 12 THEN '销售发货单出库' WHEN 11 THEN '采购发货单出库' END warehousingStorageType, case a.warehousing_storage_type WHEN 3 THEN '退货入库' WHEN 16 THEN '销售收货单入库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_outbound a from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_delivery_order c ON a.warehousing_id = c.id LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
LEFT JOIN jg_business_order d ON c.business_id = d.id LEFT JOIN jg_return_cargo_order f ON c.business_id = f.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment} LEFT JOIN jg_business_order d ON f.business_id = d.id
and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) LEFT JOIN jg_business_line e ON a.warehouse_id = e.id
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type = 12 ${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type = '3'
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId} and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
@ -217,19 +217,19 @@
a.warehouse_id warehouseId, a.warehouse_id warehouseId,
a.warehousing_time warehousingTime, a.warehousing_time warehousingTime,
d.code orderCode, d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 3 THEN '退供出库' WHEN 12 THEN '销售发货单出库' WHEN 11 THEN '采购发货单出库' END warehousingStorageType, case a.warehousing_storage_type WHEN 3 THEN '退货入库' WHEN 16 THEN '销售收货单入库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_outbound a from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_delivery_order c ON a.warehousing_id = c.id LEFT JOIN jg_receipt_order c ON a.warehousing_id = c.id
LEFT JOIN jg_return_cargo_order f ON f.id = c.business_id LEFT JOIN jg_return_cargo_order f ON f.id = c.business_id
LEFT JOIN jg_business_order d ON f.business_id = d.id LEFT JOIN jg_business_order d ON f.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment} LEFT JOIN jg_business_line e ON a.warehouse_id = e.id
and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) ${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type = 11 and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type = '16'
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId} and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in

@ -3,18 +3,8 @@ package jnpf.scheduletask.task;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import jnpf.base.UserInfo;
import jnpf.base.entity.DataInterfaceEntity;
import jnpf.base.service.DataInterfaceService;
import jnpf.base.service.DbLinkService;
import jnpf.entity.*; import jnpf.entity.*;
import jnpf.scheduletask.entity.TimeTaskEntity;
import jnpf.scheduletask.model.ContentNewModel;
import jnpf.scheduletask.model.TaskParameterModel;
import jnpf.service.*; import jnpf.service.*;
import jnpf.util.JsonUtil;
import jnpf.util.StringUtil;
import jnpf.util.data.DataSourceContextHolder;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

@ -33,5 +33,11 @@
<artifactId>jnpf-common-all</artifactId> <artifactId>jnpf-common-all</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.jnpf</groupId>
<artifactId>jnpf-file-controller</artifactId>
<version>3.5.0-RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -0,0 +1,521 @@
package jnpf.util;
import cn.hutool.http.ContentType;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import jnpf.base.ActionResult;
import jnpf.controller.UtilsController;
import jnpf.model.UploaderVO;
import jnpf.model.voucher.VehiclePictureFolder;
import jnpf.util.context.SpringContext;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.NumberToTextConverter;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Encoder;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import java.awt.image.BufferedImage;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @Author: WangChuang
* @Date: 22/2/2023 11:00
* @Description // TODO实现文件或文件夹的复制到指定目录
* @Version 1.0
*/
public class FileCopy {
public static ArrayList<Object> getInfoAndUpFile(File[] fileList, HttpServletRequest httpServletRequest) throws Exception {
String fileName = "";
// 磅单图片对应的信息
HashMap<String, Object> fileMap = new HashMap<>();
// 车辆图片对应的信息
HashMap<String, Object> carFileMap = new HashMap<>();
HashMap<String, VehiclePictureFolder> folderHashMap = new HashMap<>();
ArrayList<Object> resultList = new ArrayList<>();
File excelFile = null;
for (int i = 0; i < fileList.length; i++) {
File file = fileList[i];
String name = file.getName();
int xlsIndex = 0;
// 将文件夹中的文件上传到文件服务器
if (file.isDirectory()) {
String path = file.getPath();
String parentName = path.substring(path.lastIndexOf("\\") + 1, path.length());
VehiclePictureFolder vehiclePictureFolder = VehiclePictureFolderUtils.getVehiclePictureFolder(parentName);
// 序号
parentName=vehiclePictureFolder.getSerialNumber();
if (!folderHashMap.containsKey(parentName)){
folderHashMap.put(parentName,vehiclePictureFolder);
}
ArrayList<Object> resultListt = getInfoAndUpFile(file.listFiles(), httpServletRequest);
if (resultListt.get(0) != null) {
fileName = fileName+String.valueOf(resultListt.get(0));
}
if (resultListt.get(1) != null) {
carFileMap.putAll ((HashMap<String, Object>) resultListt.get(1));
}
if (resultListt.get(2) != null) {
fileMap.putAll ((HashMap<String, Object>) resultListt.get(2));
}
if (resultListt.get(3)!=null){
folderHashMap.putAll((HashMap<String,VehiclePictureFolder>) resultListt.get(3));
}
}
if (file.isFile()) {
String indexString = name.substring(0, name.lastIndexOf("."));
String parent = file.getParent();
String parentName = parent.substring(parent.lastIndexOf("\\") + 1, parent.length());
VehiclePictureFolder vehiclePictureFolder = VehiclePictureFolderUtils.getVehiclePictureFolder(parentName);
// 序号
parentName=vehiclePictureFolder.getSerialNumber();
if (!folderHashMap.containsKey(parentName)){
folderHashMap.put(parentName,vehiclePictureFolder);
}
// if (parentName.contains("-")){
// parentName=parentName.substring(0,parentName.lastIndexOf("-"));
// }
String substring = name.substring(name.lastIndexOf(".") + 1, name.length());
if (substring.contains("xls") || substring.contains("xlsx")) {
// 进行word操作
excelFile = file;
xlsIndex = i;
} else {
// 这个文件图片的信息
ArrayList<Object> list = new ArrayList<>();
InputStream input = new FileInputStream(file);
// MultipartFile multipartFile = new MultipartFileDto(file.getName(),input);
MultipartFile multipartFile = new MultipartFileDto(file.getName(), file.getName(), ContentType.JSON.toString(), FileCopyUtils.copyToByteArray(input));
UtilsController utilsController = SpringContext.getBean(UtilsController.class);
ActionResult annex = utilsController.uploader("annex", multipartFile, httpServletRequest);
UploaderVO data = (UploaderVO)annex.getData();
String url = data.getUrl();
Map<String,Object> dataMap= JsonUtil.entityToMap(annex.getData());
if (!dataMap.containsKey("fileId")) {
dataMap.put("fileId",url.substring(url.lastIndexOf("/")+1,url.length()));
}
list.add(dataMap);
// 将磅单照片存在磅单列表中
if (indexString.equals("1")||indexString.equals(parentName)) {
if (fileMap.containsKey(parentName)) {
List<Object> o = (List<Object>) fileMap.get(parentName);
o.add(dataMap);
fileMap.put(parentName, o);
} else {
fileMap.put(parentName, list);
}
} else {
if (carFileMap.containsKey(parentName)) {
List<Object> o = (List<Object>) carFileMap.get(parentName);
o.add(dataMap);
carFileMap.put(parentName, o);
} else {
carFileMap.put(parentName, list);
}
}
// 将车辆照片存在车辆照片中
input.close();
}
}
if (i == fileList.length - 1) {
if (excelFile != null) {
ExcelReader reader = ExcelUtil.getReader(excelFile);
reader.setIgnoreEmptyRow(true);
// List<HashMap> read = reader.read(3, reader.read().size(), HashMap.class);
// List<Object> objects1 = reader.readRow(0);
// System.out.println(objects1);
List<Object> objects2 = reader.readColumn(0, 0, 1);
// 公司名字
// String companyStr = String.valueOf(objects2.get(0));
// companyStr=companyStr.substring(0,companyStr.lastIndexOf("公司")+2);
// 销售合同编码
String infoStr = String.valueOf(objects2.get(1));
infoStr = infoStr.replaceAll(" ", "");
// 销售合同编码
String str = infoStr.substring(7, infoStr.indexOf("采购合同编码"));
// 采购合同编码
String str3 = infoStr.substring(infoStr.lastIndexOf("") + 1, infoStr.length());
List<Object> objects = reader.readColumn(0, 3);
// 写入工具类
ExcelWriter writer = reader.getWriter();
// Workbook workbook = writer.getWorkbook();
Sheet sheet = writer.getSheet();
for (int i1 = 0; i1 < objects.size(); i1++) {
Object o = objects.get(i1);
Row row = sheet.getRow(i1 + 3);
if (String.valueOf(o).isEmpty()) {
continue;
}
//// System.out.println(row.getCell(0).getStringCellValue());
// if ( row.getCell(0).getStringCellValue().isEmpty()){
// continue;
// }
Cell cell111 = row.createCell(19);
Cell cell222 = row.createCell(20);
Cell cell333 = row.createCell(21);
Cell cell444 = row.createCell(22);
/*Cell cell6 = row.createCell(25);
Cell cell7 = row.createCell(26);
Cell cell8 = row.createCell(27);*/
Cell strCell7 = row.getCell(1);//日期时间
/*Cell cell5 = row.getCell(9);
Cell strCell1 = row.getCell(8);
Cell strCell2 = row.getCell(7);
Cell strCell3 = row.getCell(6);
Cell strCell4 = row.getCell(5);
Cell strCell5 = row.getCell(11);
Cell strCell6 = row.getCell(12);
Cell strCell7 = row.getCell(1);
Cell strCell8 = row.getCell(3);*/
if (i1 == 0) {
Row row1 = sheet.getRow(2);
Cell cell11 = row1.createCell(19);
cell11.setCellValue("业务类型");
Cell cell22 = row1.createCell(20);
cell22.setCellValue("单据类型");
Cell cell33 = row1.createCell(21);
cell33.setCellValue("凭证图片");
Cell cell44 = row1.createCell(22);
cell44.setCellValue("车辆信息");
}
Object o1 = fileMap.get(String.valueOf(o));
Object o2 = carFileMap.get(String.valueOf(o));
VehiclePictureFolder vehiclePictureFolder1 = folderHashMap.get(String.valueOf(o));
cell111.setCellValue(httpServletRequest.getParameter("businessType"));
cell222.setCellValue(httpServletRequest.getParameter("documentType"));
cell333.setCellValue(String.valueOf(o1).equals("null") ? "" : JsonUtil.getListToJsonArray((List<Map<String,Object>>)o1).toString());
cell444.setCellValue(String.valueOf(o2).equals("null") ? "" :JsonUtil.getListToJsonArray((List<Map<String,Object>>)o2).toString());
/*if (vehiclePictureFolder1!=null){
cell6.setCellValue(vehiclePictureFolder1.getDriverName()!=null?vehiclePictureFolder1.getDriverName():"");
cell7.setCellValue(vehiclePictureFolder1.getPhoneNumber()!=null?vehiclePictureFolder1.getPhoneNumber():"");
cell8.setCellValue(vehiclePictureFolder1.getCarNumber()!=null?vehiclePictureFolder1.getCarNumber():"");
}*/
String stringCellValue = VehiclePictureFolderUtils.getValue(strCell7);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//定义新的日期格式
SimpleDateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy/MM/dd K:mm:ss a");//定义新的日期格式
SimpleDateFormat formatter3 = new SimpleDateFormat("yyyy.MM.dd");//定义新的日期格式
//format():将给定的 Date 格式化为日期/时间字符串。即date--->String
try {
if (stringCellValue.contains("/")){
Date date = formatter2.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
}
else if (stringCellValue.contains("-")&&stringCellValue.contains(":")){
Date date = formatter.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
} else if (stringCellValue.contains("-")) {
Date date = formatter1.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
} else if (stringCellValue.contains(".")) {
Date date = formatter3.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
}
} catch (Exception e) {
e.printStackTrace();
}
}
writer.flush(excelFile);
writer.close();
reader.close();
InputStream input = new FileInputStream(excelFile);
// MultipartFile multipartFile = new MultipartFileDto(file.getName(),input);
MultipartFile multipartFile = new MultipartFileDto(excelFile.getName(), excelFile.getName(), ContentType.JSON.toString(), FileCopyUtils.copyToByteArray(input));
UtilsController utilsController = SpringContext.getBean(UtilsController.class);
System.out.println(multipartFile.getName());
ActionResult annex = utilsController.uploader("annex", multipartFile, httpServletRequest);
if (annex.getCode() == 200) {
UploaderVO fileLoader = (UploaderVO) annex.getData();
System.out.println(fileLoader);
System.out.println(fileLoader.getName());
resultList.add(fileLoader.getName());
resultList.add(carFileMap);
resultList.add(fileMap);
resultList.add(folderHashMap);
return resultList;
}
input.close();
}
}
}
resultList.add(fileName);
resultList.add(carFileMap);
resultList.add(fileMap);
resultList.add(folderHashMap);
return resultList;
}
public static void createFile(String path) {
File file = new File(path);
if (!file.exists()) {
file.mkdirs();
}
}
/**
* @param path
* @return
* @TODO
*/
public static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
return flag;
}
if (!file.isDirectory()) {
return flag;
}
String[] tempList = file.list();
File temp = null;
for (int i = 0; i < tempList.length; i++) {
if (path.endsWith(File.separator)) {
temp = new File(path + tempList[i]);
} else {
temp = new File(path + File.separator + tempList[i]);
}
if (temp.isFile()) {
temp.delete();
}
if (temp.isDirectory()) {
delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
// delFolder(path + "/" + tempList[i]);//再删除空文件夹
flag = true;
}
}
return flag;
}
/**
* base64
*
* @param picturesInfo
* @return
* @throws Exception
*/
public static List<Map<String, Object>> getImageInfo(String picturesInfo) throws Exception {
List<Map<String, Object>> imageBaseList = new ArrayList<>();
if (!picturesInfo.equals("null")) {
for (Object o : JsonUtil.getJsonToJsonArray(picturesInfo)) {
Map<String, String> map = (Map<String, String>) o;
String url = map.get("url");
// System.out.println(url);
String fileName=url.substring(url.lastIndexOf("/")+1,url.length());
int i = url.indexOf("/", 16);
String type = url.substring(16, i);
// System.out.println("type"+type);
// System.out.println("type.toLowerCase()"+type.toLowerCase());
// String fileId = map.get("name");
// 本地文件路径
String filePath = FilePathUtil.getFilePath(type.toLowerCase()) + fileName;
// 获得图片的base64码
String imageBase = FileCopy.getImageBase(filePath);
int[] imgWidthHeight = FileCopy.getImgWidthHeight(filePath);
HashMap<String, Object> map1 = new HashMap<>();
map1.put("imgBase", imageBase);
map1.put("name", fileName);
map1.put("filePath", filePath);
if (imgWidthHeight != null) {
map1.put("width", String.valueOf(imgWidthHeight[0]));
map1.put("height", String.valueOf(imgWidthHeight[1]));
}
imageBaseList.add(map1);
// System.out.println(filePath);
// System.out.println(imageBase);
}
}
return imageBaseList;
}
/**
*
*
* @param
* @return
*/
public static int[] getImgWidthHeight(String srcc) {
if (srcc == null || srcc == "") {
return null;
}
File file = new File(srcc);
if (!file.exists()) {
return null;
}
InputStream is = null;
BufferedImage src = null;
int result[] = {0, 0};
try {
// 获得文件输入流
is = new FileInputStream(file);
// 从流里将图片写入缓冲图片区
src = ImageIO.read(is);
result[0] = src.getWidth(null); // 得到源图片宽
result[1] = src.getHeight(null);// 得到源图片高
is.close(); //关闭输入流
src = null;
} catch (Exception ef) {
ef.printStackTrace();
}
System.gc();
return result;
}
//获得图片的base64码
public static String getImageBase(String src) throws Exception {
if (src == null || src == "") {
return "";
}
File file = new File(src);
if (!file.exists()) {
return "";
}
InputStream in = null;
byte[] data = null;
try {
in = new FileInputStream(file);
data = new byte[in.available()];
in.read(data);
in.close();
} catch (IOException e) {
e.printStackTrace();
}
BASE64Encoder encoder = new BASE64Encoder();
return encoder.encode(data);
}
public static String setSteColumn(Cell cell){
String cellValue=null;
// 判断数据的类型
switch ( cell.getCellType()) {
case NUMERIC: // 数字
cellValue = String.valueOf(cell.getNumericCellValue());
break;
case STRING: // 字符串
cellValue = String.valueOf(cell.getStringCellValue());
break;
case BOOLEAN: // Boolean
cellValue = String.valueOf(cell.getBooleanCellValue());
break;
case FORMULA: // 公式
cellValue =NumberToTextConverter.toText(cell.getNumericCellValue());//重点,无精度缺失的确切值.
break;
case BLANK: // 空值
cellValue = "";
break;
case ERROR: // 故障
cellValue = "非法字符";
break;
default:
cellValue = "未知类型";
break;
}
return cellValue;
}
public static void copySCMFile(File source, String dest) throws IOException {
File parentFile = source.getParentFile();
if (!parentFile.exists()) {
parentFile.mkdirs();
copyFile(source, dest);
} else {
copyFile(source, dest);
}
}
public static void copyFile(File source, String dest) throws IOException {
if (source.exists()) {
//创建目的地文件夹
File destfile = new File(dest);
if (!destfile.exists()) {
destfile.mkdir();
}
//如果source是文件夹则在目的地址中创建新的文件夹
if (source.isDirectory()) {
File file = new File(dest + "\\" + source.getName());//用目的地址加上source的文件夹名称创建新的文件夹
file.mkdir();
//得到source文件夹的所有文件及目录
File[] files = source.listFiles();
if (files.length == 0) {
return;
} else {
for (int i = 0; i < files.length; i++) {
copyFile(files[i], file.getPath());
}
}
}
//source是文件则用字节输入输出流复制文件
else if (source.isFile()) {
FileInputStream fis = new FileInputStream(source);
//创建新的文件,保存复制内容,文件名称与源文件名称一致
File dfile = new File(dest + "\\" + source.getName());
if (!dfile.exists()) {
dfile.createNewFile();
}
FileOutputStream fos = new FileOutputStream(dfile);
// 读写数据
// 定义数组
byte[] b = new byte[1024];
// 定义长度
int len;
// 循环读取
while ((len = fis.read(b)) != -1) {
// 写出数据
fos.write(b, 0, len);
}
//关闭资源
fos.close();
fis.close();
}
}
}
}

@ -0,0 +1,117 @@
package jnpf.util;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
/**
* @Author: WangChuang
* @Date: 18/2/2023 1:50
* @Description //注释:
* fileMultipartFileMockMultipartFile
* * spring-test
* * MultipartFile
* * MockMultipartFile
* @Version 1.0
*/
public class MultipartFileDto implements MultipartFile {
private final String name;
private String originalFilename;
private String contentType;
private final byte[] content;
/**
* Create a new MultipartFileDto with the given content.
* @param name the name of the file
* @param content the content of the file
*/
public MultipartFileDto(String name, byte[] content) {
this(name, "", null, content);
}
/**
* Create a new MultipartFileDto with the given content.
* @param name the name of the file
* @param contentStream the content of the file as stream
* @throws IOException if reading from the stream failed
*/
public MultipartFileDto(String name, InputStream contentStream) throws IOException {
this(name, "", null, FileCopyUtils.copyToByteArray(contentStream));
}
/**
* Create a new MultipartFileDto with the given content.
* @param name the name of the file
* @param originalFilename the original filename (as on the client's machine)
* @param contentType the content type (if known)
* @param content the content of the file
*/
public MultipartFileDto(String name, String originalFilename, String contentType, byte[] content) {
this.name = name;
this.originalFilename = (originalFilename != null ? originalFilename : "");
this.contentType = contentType;
this.content = (content != null ? content : new byte[0]);
}
/**
* Create a new MultipartFileDto with the given content.
* @param name the name of the file
* @param originalFilename the original filename (as on the client's machine)
* @param contentType the content type (if known)
* @param contentStream the content of the file as stream
* @throws IOException if reading from the stream failed
*/
public MultipartFileDto(String name, String originalFilename, String contentType, InputStream contentStream)
throws IOException {
this(name, originalFilename, contentType, FileCopyUtils.copyToByteArray(contentStream));
}
@Override
public String getName() {
return this.name;
}
@Override
public String getOriginalFilename() {
return this.originalFilename;
}
@Override
public String getContentType() {
return this.contentType;
}
@Override
public boolean isEmpty() {
return (this.content.length == 0);
}
@Override
public long getSize() {
return this.content.length;
}
@Override
public byte[] getBytes() throws IOException {
return this.content;
}
@Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(this.content);
}
@Override
public void transferTo(File dest) throws IOException, IllegalStateException {
FileCopyUtils.copy(this.content, dest);
}
}

@ -0,0 +1,145 @@
package jnpf.util;
import jnpf.model.voucher.VehiclePictureFolder;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Pattern;
/**
* @Author: WangChuang
* @Date: 3/4/2023 2:01
* @Description //注释:
* @Version 1.0
*/
public class VehiclePictureFolderUtils {
/**
*
* @param str
* @return
*/
public static VehiclePictureFolder getVehiclePictureFolder(String str){
str=str.trim();
VehiclePictureFolder vehiclePictureFolder = new VehiclePictureFolder();
String charStr = getCharStr(str);
vehiclePictureFolder.setSerialNumber(charStr);
String substring = str.substring(str.indexOf(vehiclePictureFolder.getSerialNumber()) + vehiclePictureFolder.getSerialNumber().length(), str.length() );
String carRegex="^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[警京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{0,1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$";
String phoneRegex="0?(13|14|15|16|18|17|19)[0-9]{9}";
String charRegex="[A-Z0-9]{1}";
if (substring.length()>=7){
for (int i = 0; i <= substring.length()-7; i++) {
String carNumber = StringUtil.substring(substring, i, i + 7);
if ( Pattern.matches(carRegex, carNumber)){
String charValue = StringUtil.substring(substring, i+7, i + 8);
if (Pattern.matches(charRegex, charValue)){
vehiclePictureFolder.setCarNumber(carNumber+charValue);
}else {
vehiclePictureFolder.setCarNumber(carNumber);
}
break;
}
}
if (vehiclePictureFolder.getCarNumber()!=null){
String substring1 = substring.substring(0, substring.indexOf(vehiclePictureFolder.getCarNumber()));
String substring2 = substring.substring(substring.indexOf(vehiclePictureFolder.getCarNumber()) + vehiclePictureFolder.getCarNumber().length(), substring.length() );
substring=substring1+substring2;
if (substring1.length()>0){
substring=substring.replaceAll(substring1,"");
}
}
if (substring.length()>=11){
for (int i = 0; i <= substring.length()-11; i++) {
String phone = StringUtil.substring(substring, i, i + 11);
if ( Pattern.matches(phoneRegex, phone)){
vehiclePictureFolder.setPhoneNumber(phone);
break;
}
}
if (vehiclePictureFolder.getPhoneNumber()!=null){
String substring1 = substring.substring(0, substring.indexOf(vehiclePictureFolder.getPhoneNumber()));
String substring2 = substring.substring(substring.indexOf(vehiclePictureFolder.getPhoneNumber()) + vehiclePictureFolder.getPhoneNumber().length(), substring.length() );
substring=substring1+substring2;
}
if (substring.length()>=2){
vehiclePictureFolder.setDriverName(substring);
}
}else {
vehiclePictureFolder.setDriverName(substring);
}
}
return vehiclePictureFolder;
}
/*@Test
public void test1(){ //System.out.println(
System.out.println( VehiclePictureFolderUtils.getVehiclePictureFolder("2-皖D39239F-王柴油-13955463796"));
// String a=" 济钢集团/济钢城市矿产科技有限公司/再生资源事业部 ";
// System.out.println(StringUtil.indexOf(a, "/", 6));
}*/
public static String getValue(Cell cell) {
if (cell.getCellType() == CellType.BOOLEAN) {
return String.valueOf(cell.getBooleanCellValue());
} else if (cell.getCellType() == CellType.NUMERIC) {
//20180622,支持日期格式
if(HSSFDateUtil.isCellDateFormatted(cell)){
Date d = (Date) cell.getDateCellValue();
DateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//HH:mm:ss
return df2.format(d);
}
//数字
else{
//使用DecimalFormat对double进行了格式化随后使用format方法获得的String就是你想要的值了。
DecimalFormat df = new DecimalFormat("0");
return String.valueOf(df.format(cell.getNumericCellValue()));
}
} else {
return String.valueOf(cell.getStringCellValue());
}
}
public static String getCharStr(String str){
StringBuffer stringBuffer = new StringBuffer();
char[] bytes = str.toCharArray();
for (int i = 0; i < bytes.length; i++) {
char aByte = bytes[i];
boolean isNumber=false;
switch (aByte){
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
isNumber=true;
break;
default:
isNumber=false;
break;
}
if (isNumber){
stringBuffer.append(aByte);
}else {
break;
}
}
return stringBuffer.toString();
}
}

@ -35,6 +35,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Base64Util; import org.apache.logging.log4j.util.Base64Util;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -43,6 +44,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import jnpf.annotation.JnpfField; import jnpf.annotation.JnpfField;
import jnpf.base.vo.PageListVO; import jnpf.base.vo.PageListVO;
@ -1334,4 +1337,242 @@ public class VoucherController {
} }
@PostMapping("/Uploader")
public ActionResult Uploader(HttpServletRequest httpServletRequest, @RequestParam("businessType") String businessType, @RequestParam("documentType") String documentType) throws Exception {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(new Date());
List<MultipartFile> list = UpUtil.getFileAll();
MultipartFile file = list.get(0);
if (file.getOriginalFilename().endsWith(".zip")) {
String s = UUID.randomUUID().toString();
cn.hutool.core.io.FileUtil.del(new File(configValueUtil.getTemporaryFilePath() + "unzip\\" + s + "\\"));
String filePath = configValueUtil.getTemporaryFilePath() + "unzip\\" + s + "\\";
//上传文件
File temporaryFile = new File(filePath);
if (!temporaryFile.exists()) {
temporaryFile.mkdirs();
}
InputStream inputStream = file.getInputStream();
File gbk = cn.hutool.core.util.ZipUtil.unzip(inputStream, temporaryFile, Charset.forName("GBK"));
List<Object> resultList = null;
System.out.println(gbk.listFiles());
try {
resultList = FileCopy.getInfoAndUpFile(gbk.listFiles(), httpServletRequest);
} catch (Exception e) {
log.info("loadProperties IOException:" + e.getMessage());
return ActionResult.fail("上传文件不符合导入规则或文件夹里面有错误文件");
}
inputStream.close();
DownloadVO vo = DownloadVO.builder().build();
Optional<List<Object>> userOptional = Optional.ofNullable(resultList);
userOptional.ifPresent(o -> vo.setName(String.valueOf(o.get(0))));
return ActionResult.success(vo);
} else {
return ActionResult.fail("选择文件不符合导入");
}
}
/**
*
*
* @return
*/
@Operation(summary = "模板下载")
@GetMapping("/TemplateDownload")
public ActionResult<DownloadVO> TemplateDownload(){
DownloadVO vo = DownloadVO.builder().build();
UserInfo userInfo = userProvider.get();
Map<String, Object> dataMap = new HashMap<>();
//主表对象
List<ExcelExportEntity> entitys = new ArrayList<>();
//以下添加字段
entitys.add(new ExcelExportEntity("凭证编号" ,"voucherCode"));
dataMap.put("voucherCode", "系统自动生成");
entitys.add(new ExcelExportEntity("凭证类型" ,"voucherType"));
entitys.add(new ExcelExportEntity("制单时间" ,"preparationTime"));
dataMap.put("preparationTime", "例: yyyy-MM-dd");
entitys.add(new ExcelExportEntity("磅单编号" ,"poundCode"));
entitys.add(new ExcelExportEntity("车牌号" ,"vehicleName"));
entitys.add(new ExcelExportEntity("发货单位" ,"supplierName"));
entitys.add(new ExcelExportEntity("收货单位" ,"customerName"));
entitys.add(new ExcelExportEntity("运输方式" ,"modeTransport"));
entitys.add(new ExcelExportEntity("承运方式" ,"transportationMethod"));
entitys.add(new ExcelExportEntity("承运商" ,"carrier"));
entitys.add(new ExcelExportEntity("起运地" ,"placeDispatch"));
dataMap.put("placeDispatch", "例:福建省/莆田市/城厢区");
entitys.add(new ExcelExportEntity("到达地" ,"destination"));
dataMap.put("destination", "例:福建省/莆田市/城厢区");
entitys.add(new ExcelExportEntity("运费" ,"freight"));
entitys.add(new ExcelExportEntity("关联单据号" ,"associatedDocumentNo"));
entitys.add(new ExcelExportEntity("单据类型" ,"documentType"));
entitys.add(new ExcelExportEntity("凭证状态" ,"voucherStatus"));
//tableField111子表对象
ExcelExportEntity tableField111ExcelEntity = new ExcelExportEntity("","tableField111");
List<ExcelExportEntity> tableField111ExcelEntityList = new ArrayList<>();
Map<String, Object> tableField111ChildData = new HashMap<>();
List<Map<String, Object>> tableField111ChildDataList = new ArrayList<>();
tableField111ExcelEntityList.add(new ExcelExportEntity("规格" ,"spec"));
tableField111ExcelEntityList.add(new ExcelExportEntity("单位" ,"unit"));
tableField111ExcelEntityList.add(new ExcelExportEntity("毛重" ,"grossWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("皮重" ,"tareWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("扣重" ,"buckleWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("净重" ,"netWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("备注" ,"remark"));
tableField111ExcelEntityList.add(new ExcelExportEntity("打印时间" ,"printTime"));
tableField111ChildData.put("printTime", "例: yyyy-MM-dd");
tableField111ChildDataList.add(tableField111ChildData);
dataMap.put("tableField111",tableField111ChildDataList);
tableField111ExcelEntity.setList(tableField111ExcelEntityList);
entitys.add(tableField111ExcelEntity);
//tableField140子表对象
ExcelExportEntity tableField140ExcelEntity = new ExcelExportEntity("","tableField140");
List<ExcelExportEntity> tableField140ExcelEntityList = new ArrayList<>();
Map<String, Object> tableField140ChildData = new HashMap<>();
List<Map<String, Object>> tableField140ChildDataList = new ArrayList<>();
tableField140ExcelEntityList.add(new ExcelExportEntity("驾驶员名称" ,"driverName"));
tableField140ExcelEntityList.add(new ExcelExportEntity("联系电话" ,"telephone"));
tableField140ExcelEntityList.add(new ExcelExportEntity("承运商" ,"carrier"));
tableField140ChildDataList.add(tableField140ChildData);
dataMap.put("tableField140",tableField140ChildDataList);
tableField140ExcelEntity.setList(tableField140ExcelEntityList);
entitys.add(tableField140ExcelEntity);
List<Map<String, Object>> list = new ArrayList<>();
list.add(dataMap);
ExportParams exportParams = new ExportParams(null, "凭证单模板");
exportParams.setType(ExcelType.XSSF);
try{
@Cleanup Workbook workbook = new HSSFWorkbook();
if (entitys.size()>0){
if (list.size()==0){
list.add(new HashMap<>());
}
//复杂表头-表头和数据处理
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(VoucherConstant.getColumnData(), ColumnDataModel.class);
List<HeaderModel> complexHeaderList = columnDataModel.getComplexHeaderList();
if (!Objects.equals(columnDataModel.getType(), 3) && !Objects.equals(columnDataModel.getType(), 5)) {
entitys = VisualUtils.complexHeaderHandel(entitys, complexHeaderList);
list = VisualUtils.complexHeaderDataHandel(list, complexHeaderList);
}
workbook = ExcelExportUtil.exportExcel(exportParams, entitys, list);
}
String fileName = "凭证单模板" + DateUtil.dateNow("yyyyMMddHHmmss") + ".xlsx";
MultipartFile multipartFile = ExcelUtil.workbookToCommonsMultipartFile(workbook, fileName);
String temporaryFilePath = configValueUtil.getTemporaryFilePath();
FileInfo fileInfo = FileUploadUtils.uploadFile(multipartFile, temporaryFilePath, fileName);
vo.setName(fileInfo.getFilename());
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + fileName);
} catch (Exception e) {
log.error("模板信息导出Excel错误:{}", e.getMessage());
e.printStackTrace();
}
return ActionResult.success(vo);
}
/**
*
*
* @return
*/
@Operation(summary = "导入预览" )
@GetMapping("/ImportPreview")
public ActionResult<Map<String, Object>> ImportPreview(String fileName) throws Exception {
fileName = "6642d1dc64a4fc5279e1560b.xls";
Map<String, Object> headAndDataMap = new HashMap<>(2);
String filePath = FileUploadUtils.getLocalBasePath() + configValueUtil.getWebAnnexFilePath();
FileUploadUtils.downLocal(configValueUtil.getTemporaryFilePath(), filePath, fileName);
File temporary = new File(XSSEscape.escapePath(filePath + fileName));
int headerRowIndex = 1;
ImportParams params = new ImportParams();
params.setTitleRows(0);
params.setHeadRows(headerRowIndex);
params.setNeedVerify(true);
try {
List<VoucherExcelVO222> excelDataList = ExcelImportUtil.importExcel(temporary, VoucherExcelVO222.class, params);
//List<VoucherExcelVO222> excelDataList = ExcelUtil.importExcel(temporary, 2, 1, VoucherExcelVO222.class);
// 导入字段
List<ExcelImFieldModel> columns = new ArrayList<>();
columns.add(new ExcelImFieldModel("businessType","业务类型"));
columns.add(new ExcelImFieldModel("documentType","单据类型"));
//columns.add(new ExcelImFieldModel("voucherCode","凭证编号"));
columns.add(new ExcelImFieldModel("voucherType","凭证类型"));
columns.add(new ExcelImFieldModel("voucherSource","凭证来源"));
columns.add(new ExcelImFieldModel("voucherStatus","凭证状态"));
columns.add(new ExcelImFieldModel("poundlistTime","磅单时间"));
columns.add(new ExcelImFieldModel("preparationTime","制单时间"));
columns.add(new ExcelImFieldModel("poundCode","磅单编号"));
columns.add(new ExcelImFieldModel("vehicleName","车牌号"));
columns.add(new ExcelImFieldModel("supplierName","发货单位"));
columns.add(new ExcelImFieldModel("customerName","收货单位"));
columns.add(new ExcelImFieldModel("modeTransport","运输方式"));
columns.add(new ExcelImFieldModel("transportationMethod","承运方式"));
columns.add(new ExcelImFieldModel("carrier","承运商"));
columns.add(new ExcelImFieldModel("placeDispatch","起运地"));
columns.add(new ExcelImFieldModel("destination","到达地"));
columns.add(new ExcelImFieldModel("freight","运费"));
columns.add(new ExcelImFieldModel("associatedDocumentNo","关联单据号"));
columns.add(new ExcelImFieldModel("voucherStatus","凭证状态"));
//tableField111子表对象
List<ExcelImFieldModel> tableField111columns = new ArrayList<>();
tableField111columns.add(new ExcelImFieldModel("spec" ,"规格"));
tableField111columns.add(new ExcelImFieldModel("unit" ,"单位"));
tableField111columns.add(new ExcelImFieldModel("grossWeight" ,"毛重"));
tableField111columns.add(new ExcelImFieldModel("tareWeight" ,"皮重"));
tableField111columns.add(new ExcelImFieldModel("buckleWeight" ,"扣重"));
tableField111columns.add(new ExcelImFieldModel("netWeight" ,"净重"));
tableField111columns.add(new ExcelImFieldModel("remark" ,"备注"));
tableField111columns.add(new ExcelImFieldModel("printTime" ,"打印时间"));
columns.add(new ExcelImFieldModel("tableField111","",tableField111columns));
//tableField140子表对象
List<ExcelImFieldModel> tableField140columns = new ArrayList<>();
tableField140columns.add(new ExcelImFieldModel("driverName" ,"驾驶员名称"));
tableField140columns.add(new ExcelImFieldModel("telephone" ,"联系电话"));
tableField140columns.add(new ExcelImFieldModel("carrier" ,"承运商"));
columns.add(new ExcelImFieldModel("tableField140","",tableField140columns));
headAndDataMap.put("dataRow" , JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(excelDataList)));
headAndDataMap.put("headerRow" , JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(columns)));
} catch (Exception e){
e.printStackTrace();
return ActionResult.fail("表头名称不可更改,表头行不能删除");
}
return ActionResult.success(headAndDataMap);
}
/**
*
*
* @return
*/
@Operation(summary = "导入数据" )
@PostMapping("/ImportData")
public ActionResult<ExcelImportModel> ImportData(@RequestBody VisualImportModel visualImportModel) throws Exception {
List<Map<String, Object>> listData=new ArrayList<>();
for(Map<String, Object> map : visualImportModel.getList()){
listData.add(map);
}
ImportFormCheckUniqueModel uniqueModel = new ImportFormCheckUniqueModel();
uniqueModel.setDbLinkId(VoucherConstant.DBLINKID);
uniqueModel.setUpdate(Objects.equals("2", "2"));
uniqueModel.setFlowId(visualImportModel.getFlowId()); ExcelImportModel excelImportModel = generaterSwapUtil.importData(VoucherConstant.getFormData(),listData,uniqueModel,
VoucherConstant.TABLEFIELDKEY,VoucherConstant.getTableList());
List<ImportDataModel> importDataModel = uniqueModel.getImportDataModel();
for (ImportDataModel model : importDataModel) {
String id = model.getId();
Map<String, Object> result = model.getResultData();
if(StringUtil.isNotEmpty(id)){
update(id, JsonUtil.getJsonToBean(result,VoucherForm.class), true);
}else {
create(RandomUtil.uuId(), JsonUtil.getJsonToBean(result,VoucherForm.class));
}
}
return ActionResult.success(excelImportModel);
}
} }

@ -0,0 +1,23 @@
package jnpf.model.voucher;
import lombok.Data;
/**
* @Author: WangChuang
* @Date: 3/4/2023 1:50
* @Description //注释: 车辆图片的文件夹获取的信息
* @Version 1.0
*/
@Data
public class VehiclePictureFolder {
/**序号 **/
private String serialNumber;
/**车牌号**/
private String carNumber;
/**司机名字**/
private String driverName;
/**手机号**/
private String phoneNumber;
}

@ -0,0 +1,22 @@
package jnpf.model.voucher;
import lombok.Data;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* Voucher
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-05-10
*/
@Data
public class VoucherExcelErrorVO extends VoucherExcelVO{
@Excel(name = "异常原因",orderNum = "999")
@JSONField(name = "errorsInfo")
private String errorsInfo;
}

@ -0,0 +1,115 @@
package jnpf.model.voucher;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
/**
*
* Voucher
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-05-10
*/
@Data
public class VoucherExcelVO{
/** 凭证编号 **/
@JSONField(name = "voucherCode")
@Excel(name = "凭证编号" )
private String voucherCode;
/** 凭证类型 **/
@JSONField(name = "voucherType")
@Excel(name = "凭证类型")
private String voucherType;
/** 制单时间 **/
@JSONField(name = "preparationTime")
@Excel(name = "制单时间" )
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private String preparationTime;
/** 磅单编号 **/
@JSONField(name = "poundCode")
@Excel(name = "磅单编号" )
private String poundCode;
/** 车牌号 **/
@JSONField(name = "vehicleName")
@Excel(name = "车牌号" )
private String vehicleName;
/** 发货单位 **/
@JSONField(name = "supplierName")
@Excel(name = "发货单位" )
private String supplierName;
/** 收货单位 **/
@JSONField(name = "customerName")
@Excel(name = "收货单位" )
private String customerName;
/** 运输方式 **/
@JSONField(name = "modeTransport")
@Excel(name = "运输方式" )
private String modeTransport;
/** 承运方式 **/
@JSONField(name = "transportationMethod")
@Excel(name = "承运方式" )
private String transportationMethod;
/** 承运商 **/
@JSONField(name = "carrier")
@Excel(name = "承运商" )
private String carrier;
/** 起运地 **/
@JSONField(name = "placeDispatch")
@Excel(name = "起运地" )
private String placeDispatch;
/** 到达地 **/
@JSONField(name = "destination")
@Excel(name = "到达地" )
private String destination;
/** 运费 **/
@JSONField(name = "freight")
@Excel(name = "运费" )
private String freight;
/** 关联单据号 **/
@JSONField(name = "associatedDocumentNo")
@Excel(name = "关联单据号" )
private String associatedDocumentNo;
/** 单据类型 **/
@JSONField(name = "documentType")
@Excel(name = "单据类型")
private String documentType;
/** 凭证状态 **/
@JSONField(name = "voucherStatus")
@Excel(name = "凭证状态" )
private String voucherStatus;
@JsonProperty("tableField111")
@ExcelCollection(name="",orderNum = "8")
private List<VoucherproductExcelVO> tableField111;
@JsonProperty("tableField140")
@ExcelCollection(name="",orderNum = "3")
private List<VouchervehicleExcelVO> tableField140;
}

@ -0,0 +1,27 @@
package jnpf.model.voucher;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
/**
*
* Voucher
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-05-10
*/
@Data
public class VoucherExcelVO222 {
/** 凭证类型 **/
@Excel(name = "凭证类型")
private String voucherType;
/** 单据类型 **/
@Excel(name = "单据类型")
private String documentType;
}

@ -0,0 +1,66 @@
package jnpf.model.voucher;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
/**
*
* Voucher
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-05-10
*/
@Data
public class VoucherproductExcelVO{
/** 规格 **/
@JSONField(name = "spec")
@Excel(name = "规格",orderNum = "1", isImportField = "true" )
private String spec;
/** 单位 **/
@JSONField(name = "unit")
@Excel(name = "单位",orderNum = "1", isImportField = "true" )
private String unit;
/** 毛重 **/
@JSONField(name = "grossWeight")
@Excel(name = "毛重",orderNum = "1", isImportField = "true" )
private String grossWeight;
/** 皮重 **/
@JSONField(name = "tareWeight")
@Excel(name = "皮重",orderNum = "1", isImportField = "true" )
private String tareWeight;
/** 扣重 **/
@JSONField(name = "buckleWeight")
@Excel(name = "扣重",orderNum = "1", isImportField = "true" )
private String buckleWeight;
/** 净重 **/
@JSONField(name = "netWeight")
@Excel(name = "净重",orderNum = "1", isImportField = "true" )
private String netWeight;
/** 备注 **/
@JSONField(name = "remark")
@Excel(name = "备注",orderNum = "1", isImportField = "true" )
private String remark;
/** 打印时间 **/
@JSONField(name = "printTime")
@Excel(name = "打印时间",orderNum = "1", isImportField = "true" )
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private String printTime;
}

@ -0,0 +1,40 @@
package jnpf.model.voucher;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
/**
*
* Voucher
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-05-10
*/
@Data
public class VouchervehicleExcelVO{
/** 驾驶员名称 **/
@JSONField(name = "driverName")
@Excel(name = "驾驶员名称",orderNum = "1", isImportField = "true" )
private String driverName;
/** 联系电话 **/
@JSONField(name = "telephone")
@Excel(name = "联系电话",orderNum = "1", isImportField = "true" )
private String telephone;
/** 承运商 **/
@JSONField(name = "carrier")
@Excel(name = "承运商",orderNum = "1", isImportField = "true" )
private String carrier;
}

@ -16,8 +16,8 @@
<p class="tip">文件后缀名必须是xls或xlsx文件大小不超过500KB最多支持导入1000条数据</p> <p class="tip">文件后缀名必须是xls或xlsx文件大小不超过500KB最多支持导入1000条数据</p>
<el-upload :action="actionUrl" :headers="{ Authorization: $store.getters.token}" <el-upload :action="actionUrl" :headers="{ Authorization: $store.getters.token}"
:on-success="handleSuccess" :on-remove="handleRemove" :before-remove="beforeRemove" :on-success="handleSuccess" :on-remove="handleRemove" :before-remove="beforeRemove"
:on-change="handleChange" :file-list="fileList" accept=".xls,.xlsx" :on-change="handleChange" :file-list="fileList" accept=".xls,.xlsx,.zip"
:before-upload="beforeUpload" class="upload-area"> :before-upload="beforeUpload" class="upload-area" :data="uploadObjs">
<el-button type="text">上传文件</el-button> <el-button type="text">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
@ -164,6 +164,10 @@ export default {
snum: 0, snum: 0,
fnum: 0 fnum: 0
}, },
uploadObjs: {
businessType: '',
documentType: ''
},
modelId: "", modelId: "",
url: '', url: '',
actionUrl: '', actionUrl: '',
@ -174,7 +178,13 @@ export default {
} }
}, },
methods: { methods: {
init(modelId, url, enableFlow, flowList) { init(modelId, url, enableFlow, flowList, businessType, documentType) {
if(businessType && businessType != ''){
this.uploadObjs.businessType = businessType
}
if(documentType && documentType != ''){
this.uploadObjs.documentType = documentType
}
this.active = 1 this.active = 1
this.fileList = [] this.fileList = []
this.fileName = '' this.fileName = ''
@ -187,8 +197,8 @@ export default {
this.url = url ? url : `visualdev/OnlineDev/${this.modelId}` this.url = url ? url : `visualdev/OnlineDev/${this.modelId}`
}, },
beforeUpload(file) { beforeUpload(file) {
let isRightSize = file.size / 1024 < 500 let isRightSize = file.size / 1024 / 1024 < 100
if (!isRightSize) this.$message.error(`文件大小不能超过500KB`) if (!isRightSize) this.$message.error(`文件大小不能超过100MB`)
return isRightSize return isRightSize
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {

@ -26,7 +26,7 @@
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false"> <JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
<el-table-column prop="documentNo" label="单据编号" align="center" sortable width="200" fixed="left"> <el-table-column prop="documentNo" label="单据编号" align="center" sortable width="200" fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="warehousingStorageTypeName" label="业务类型" align="center" sortable width="200" fixed="left"> <el-table-column prop="warehousingStorageType" label="业务类型" align="center" sortable width="200" fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="入库仓库" align="center" width="150"> <el-table-column prop="warehouseName" label="入库仓库" align="center" width="150">
</el-table-column> </el-table-column>

@ -428,7 +428,6 @@ export default {
deliveryFlag = false; deliveryFlag = false;
} }
}); });
debugger
if (!stateFlag) { if (!stateFlag) {
this.$message({ this.$message({
type: 'error', type: 'error',
@ -820,7 +819,7 @@ export default {
handelUpload() { handelUpload() {
this.uploadBoxVisible = true this.uploadBoxVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/Voucher") this.$refs.UploadBox.init("", "scm/Voucher", undefined, undefined, "采购", "收货凭证")
}) })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {

Loading…
Cancel
Save